forked from Gitlink/build
45933 lines
2.0 MiB
45933 lines
2.0 MiB
webpackJsonp([80],{
|
||
|
||
/***/ 1000:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var nativeCreate = __webpack_require__(919);
|
||
|
||
/** Used for built-in method references. */
|
||
var objectProto = Object.prototype;
|
||
|
||
/** Used to check objects for own properties. */
|
||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||
|
||
/**
|
||
* Checks if a hash value for `key` exists.
|
||
*
|
||
* @private
|
||
* @name has
|
||
* @memberOf Hash
|
||
* @param {string} key The key of the entry to check.
|
||
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
||
*/
|
||
function hashHas(key) {
|
||
var data = this.__data__;
|
||
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
||
}
|
||
|
||
module.exports = hashHas;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1001:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var nativeCreate = __webpack_require__(919);
|
||
|
||
/** Used to stand-in for `undefined` hash values. */
|
||
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
||
|
||
/**
|
||
* Sets the hash `key` to `value`.
|
||
*
|
||
* @private
|
||
* @name set
|
||
* @memberOf Hash
|
||
* @param {string} key The key of the value to set.
|
||
* @param {*} value The value to set.
|
||
* @returns {Object} Returns the hash instance.
|
||
*/
|
||
function hashSet(key, value) {
|
||
var data = this.__data__;
|
||
this.size += this.has(key) ? 0 : 1;
|
||
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
||
return this;
|
||
}
|
||
|
||
module.exports = hashSet;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1002:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var getMapData = __webpack_require__(920);
|
||
|
||
/**
|
||
* Removes `key` and its value from the map.
|
||
*
|
||
* @private
|
||
* @name delete
|
||
* @memberOf MapCache
|
||
* @param {string} key The key of the value to remove.
|
||
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
||
*/
|
||
function mapCacheDelete(key) {
|
||
var result = getMapData(this, key)['delete'](key);
|
||
this.size -= result ? 1 : 0;
|
||
return result;
|
||
}
|
||
|
||
module.exports = mapCacheDelete;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1003:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Checks if `value` is suitable for use as unique object key.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to check.
|
||
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
||
*/
|
||
function isKeyable(value) {
|
||
var type = typeof value;
|
||
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
||
? (value !== '__proto__')
|
||
: (value === null);
|
||
}
|
||
|
||
module.exports = isKeyable;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1004:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var getMapData = __webpack_require__(920);
|
||
|
||
/**
|
||
* Gets the map value for `key`.
|
||
*
|
||
* @private
|
||
* @name get
|
||
* @memberOf MapCache
|
||
* @param {string} key The key of the value to get.
|
||
* @returns {*} Returns the entry value.
|
||
*/
|
||
function mapCacheGet(key) {
|
||
return getMapData(this, key).get(key);
|
||
}
|
||
|
||
module.exports = mapCacheGet;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1005:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var getMapData = __webpack_require__(920);
|
||
|
||
/**
|
||
* Checks if a map value for `key` exists.
|
||
*
|
||
* @private
|
||
* @name has
|
||
* @memberOf MapCache
|
||
* @param {string} key The key of the entry to check.
|
||
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
||
*/
|
||
function mapCacheHas(key) {
|
||
return getMapData(this, key).has(key);
|
||
}
|
||
|
||
module.exports = mapCacheHas;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1006:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var getMapData = __webpack_require__(920);
|
||
|
||
/**
|
||
* Sets the map `key` to `value`.
|
||
*
|
||
* @private
|
||
* @name set
|
||
* @memberOf MapCache
|
||
* @param {string} key The key of the value to set.
|
||
* @param {*} value The value to set.
|
||
* @returns {Object} Returns the map cache instance.
|
||
*/
|
||
function mapCacheSet(key, value) {
|
||
var data = getMapData(this, key),
|
||
size = data.size;
|
||
|
||
data.set(key, value);
|
||
this.size += data.size == size ? 0 : 1;
|
||
return this;
|
||
}
|
||
|
||
module.exports = mapCacheSet;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1007:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseGetTag = __webpack_require__(323),
|
||
isObjectLike = __webpack_require__(324);
|
||
|
||
/** `Object#toString` result references. */
|
||
var argsTag = '[object Arguments]';
|
||
|
||
/**
|
||
* The base implementation of `_.isArguments`.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to check.
|
||
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
||
*/
|
||
function baseIsArguments(value) {
|
||
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
||
}
|
||
|
||
module.exports = baseIsArguments;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1008:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var memoizeCapped = __webpack_require__(1009);
|
||
|
||
/** Used to match property names within property paths. */
|
||
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
||
|
||
/** Used to match backslashes in property paths. */
|
||
var reEscapeChar = /\\(\\)?/g;
|
||
|
||
/**
|
||
* Converts `string` to a property path array.
|
||
*
|
||
* @private
|
||
* @param {string} string The string to convert.
|
||
* @returns {Array} Returns the property path array.
|
||
*/
|
||
var stringToPath = memoizeCapped(function(string) {
|
||
var result = [];
|
||
if (string.charCodeAt(0) === 46 /* . */) {
|
||
result.push('');
|
||
}
|
||
string.replace(rePropName, function(match, number, quote, subString) {
|
||
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
||
});
|
||
return result;
|
||
});
|
||
|
||
module.exports = stringToPath;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1009:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var memoize = __webpack_require__(1010);
|
||
|
||
/** Used as the maximum memoize cache size. */
|
||
var MAX_MEMOIZE_SIZE = 500;
|
||
|
||
/**
|
||
* A specialized version of `_.memoize` which clears the memoized function's
|
||
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
||
*
|
||
* @private
|
||
* @param {Function} func The function to have its output memoized.
|
||
* @returns {Function} Returns the new memoized function.
|
||
*/
|
||
function memoizeCapped(func) {
|
||
var result = memoize(func, function(key) {
|
||
if (cache.size === MAX_MEMOIZE_SIZE) {
|
||
cache.clear();
|
||
}
|
||
return key;
|
||
});
|
||
|
||
var cache = result.cache;
|
||
return result;
|
||
}
|
||
|
||
module.exports = memoizeCapped;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1010:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var MapCache = __webpack_require__(933);
|
||
|
||
/** Error message constants. */
|
||
var FUNC_ERROR_TEXT = 'Expected a function';
|
||
|
||
/**
|
||
* Creates a function that memoizes the result of `func`. If `resolver` is
|
||
* provided, it determines the cache key for storing the result based on the
|
||
* arguments provided to the memoized function. By default, the first argument
|
||
* provided to the memoized function is used as the map cache key. The `func`
|
||
* is invoked with the `this` binding of the memoized function.
|
||
*
|
||
* **Note:** The cache is exposed as the `cache` property on the memoized
|
||
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
||
* constructor with one whose instances implement the
|
||
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
||
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 0.1.0
|
||
* @category Function
|
||
* @param {Function} func The function to have its output memoized.
|
||
* @param {Function} [resolver] The function to resolve the cache key.
|
||
* @returns {Function} Returns the new memoized function.
|
||
* @example
|
||
*
|
||
* var object = { 'a': 1, 'b': 2 };
|
||
* var other = { 'c': 3, 'd': 4 };
|
||
*
|
||
* var values = _.memoize(_.values);
|
||
* values(object);
|
||
* // => [1, 2]
|
||
*
|
||
* values(other);
|
||
* // => [3, 4]
|
||
*
|
||
* object.a = 2;
|
||
* values(object);
|
||
* // => [1, 2]
|
||
*
|
||
* // Modify the result cache.
|
||
* values.cache.set(object, ['a', 'b']);
|
||
* values(object);
|
||
* // => ['a', 'b']
|
||
*
|
||
* // Replace `_.memoize.Cache`.
|
||
* _.memoize.Cache = WeakMap;
|
||
*/
|
||
function memoize(func, resolver) {
|
||
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
||
throw new TypeError(FUNC_ERROR_TEXT);
|
||
}
|
||
var memoized = function() {
|
||
var args = arguments,
|
||
key = resolver ? resolver.apply(this, args) : args[0],
|
||
cache = memoized.cache;
|
||
|
||
if (cache.has(key)) {
|
||
return cache.get(key);
|
||
}
|
||
var result = func.apply(this, args);
|
||
memoized.cache = cache.set(key, result) || cache;
|
||
return result;
|
||
};
|
||
memoized.cache = new (memoize.Cache || MapCache);
|
||
return memoized;
|
||
}
|
||
|
||
// Expose `MapCache`.
|
||
memoize.Cache = MapCache;
|
||
|
||
module.exports = memoize;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1019:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var React = _interopRequireWildcard(__webpack_require__(0));
|
||
|
||
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
||
|
||
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
|
||
|
||
var _configProvider = __webpack_require__(14);
|
||
|
||
var _RowContext = _interopRequireDefault(__webpack_require__(943));
|
||
|
||
var _type = __webpack_require__(71);
|
||
|
||
var _responsiveObserve = _interopRequireWildcard(__webpack_require__(1033));
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||
|
||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
||
var t = {};
|
||
|
||
for (var p in s) {
|
||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||
}
|
||
|
||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||
}
|
||
return t;
|
||
};
|
||
|
||
var RowAligns = (0, _type.tuple)('top', 'middle', 'bottom', 'stretch');
|
||
var RowJustify = (0, _type.tuple)('start', 'end', 'center', 'space-around', 'space-between');
|
||
|
||
var Row =
|
||
/*#__PURE__*/
|
||
function (_React$Component) {
|
||
_inherits(Row, _React$Component);
|
||
|
||
function Row() {
|
||
var _this;
|
||
|
||
_classCallCheck(this, Row);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Row).apply(this, arguments));
|
||
_this.state = {
|
||
screens: {}
|
||
};
|
||
|
||
_this.renderRow = function (_ref) {
|
||
var _classNames;
|
||
|
||
var getPrefixCls = _ref.getPrefixCls;
|
||
|
||
var _a = _this.props,
|
||
customizePrefixCls = _a.prefixCls,
|
||
type = _a.type,
|
||
justify = _a.justify,
|
||
align = _a.align,
|
||
className = _a.className,
|
||
style = _a.style,
|
||
children = _a.children,
|
||
others = __rest(_a, ["prefixCls", "type", "justify", "align", "className", "style", "children"]);
|
||
|
||
var prefixCls = getPrefixCls('row', customizePrefixCls);
|
||
|
||
var gutter = _this.getGutter();
|
||
|
||
var classes = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, prefixCls, !type), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(type), type), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(type, "-").concat(justify), type && justify), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(type, "-").concat(align), type && align), _classNames), className);
|
||
|
||
var rowStyle = _extends(_extends(_extends({}, gutter[0] > 0 ? {
|
||
marginLeft: gutter[0] / -2,
|
||
marginRight: gutter[0] / -2
|
||
} : {}), gutter[1] > 0 ? {
|
||
marginTop: gutter[1] / -2,
|
||
marginBottom: gutter[1] / -2
|
||
} : {}), style);
|
||
|
||
var otherProps = _extends({}, others);
|
||
|
||
delete otherProps.gutter;
|
||
return React.createElement(_RowContext["default"].Provider, {
|
||
value: {
|
||
gutter: gutter
|
||
}
|
||
}, React.createElement("div", _extends({}, otherProps, {
|
||
className: classes,
|
||
style: rowStyle
|
||
}), children));
|
||
};
|
||
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Row, [{
|
||
key: "componentDidMount",
|
||
value: function componentDidMount() {
|
||
var _this2 = this;
|
||
|
||
this.token = _responsiveObserve["default"].subscribe(function (screens) {
|
||
var gutter = _this2.props.gutter;
|
||
|
||
if (_typeof(gutter) === 'object' || Array.isArray(gutter) && (_typeof(gutter[0]) === 'object' || _typeof(gutter[1]) === 'object')) {
|
||
_this2.setState({
|
||
screens: screens
|
||
});
|
||
}
|
||
});
|
||
}
|
||
}, {
|
||
key: "componentWillUnmount",
|
||
value: function componentWillUnmount() {
|
||
_responsiveObserve["default"].unsubscribe(this.token);
|
||
}
|
||
}, {
|
||
key: "getGutter",
|
||
value: function getGutter() {
|
||
var results = [0, 0];
|
||
var gutter = this.props.gutter;
|
||
var screens = this.state.screens;
|
||
var normalizedGutter = Array.isArray(gutter) ? gutter : [gutter, 0];
|
||
normalizedGutter.forEach(function (g, index) {
|
||
if (_typeof(g) === 'object') {
|
||
for (var i = 0; i < _responsiveObserve.responsiveArray.length; i++) {
|
||
var breakpoint = _responsiveObserve.responsiveArray[i];
|
||
|
||
if (screens[breakpoint] && g[breakpoint] !== undefined) {
|
||
results[index] = g[breakpoint];
|
||
break;
|
||
}
|
||
}
|
||
} else {
|
||
results[index] = g || 0;
|
||
}
|
||
});
|
||
return results;
|
||
}
|
||
}, {
|
||
key: "render",
|
||
value: function render() {
|
||
return React.createElement(_configProvider.ConfigConsumer, null, this.renderRow);
|
||
}
|
||
}]);
|
||
|
||
return Row;
|
||
}(React.Component);
|
||
|
||
exports["default"] = Row;
|
||
Row.defaultProps = {
|
||
gutter: 0
|
||
};
|
||
Row.propTypes = {
|
||
type: PropTypes.oneOf(['flex']),
|
||
align: PropTypes.oneOf(RowAligns),
|
||
justify: PropTypes.oneOf(RowJustify),
|
||
className: PropTypes.string,
|
||
children: PropTypes.node,
|
||
gutter: PropTypes.oneOfType([PropTypes.object, PropTypes.number, PropTypes.array]),
|
||
prefixCls: PropTypes.string
|
||
};
|
||
//# sourceMappingURL=row.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1020:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var React = _interopRequireWildcard(__webpack_require__(0));
|
||
|
||
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
|
||
|
||
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
||
|
||
var _RowContext = _interopRequireDefault(__webpack_require__(943));
|
||
|
||
var _configProvider = __webpack_require__(14);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
||
var t = {};
|
||
|
||
for (var p in s) {
|
||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||
}
|
||
|
||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||
}
|
||
return t;
|
||
};
|
||
|
||
var objectOrNumber = PropTypes.oneOfType([PropTypes.object, PropTypes.number]);
|
||
|
||
var Col =
|
||
/*#__PURE__*/
|
||
function (_React$Component) {
|
||
_inherits(Col, _React$Component);
|
||
|
||
function Col() {
|
||
var _this;
|
||
|
||
_classCallCheck(this, Col);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Col).apply(this, arguments));
|
||
|
||
_this.renderCol = function (_ref) {
|
||
var _classNames;
|
||
|
||
var getPrefixCls = _ref.getPrefixCls;
|
||
|
||
var _assertThisInitialize = _assertThisInitialized(_this),
|
||
props = _assertThisInitialize.props;
|
||
|
||
var customizePrefixCls = props.prefixCls,
|
||
span = props.span,
|
||
order = props.order,
|
||
offset = props.offset,
|
||
push = props.push,
|
||
pull = props.pull,
|
||
className = props.className,
|
||
children = props.children,
|
||
others = __rest(props, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children"]);
|
||
|
||
var prefixCls = getPrefixCls('col', customizePrefixCls);
|
||
var sizeClassObj = {};
|
||
['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach(function (size) {
|
||
var _extends2;
|
||
|
||
var sizeProps = {};
|
||
var propSize = props[size];
|
||
|
||
if (typeof propSize === 'number') {
|
||
sizeProps.span = propSize;
|
||
} else if (_typeof(propSize) === 'object') {
|
||
sizeProps = propSize || {};
|
||
}
|
||
|
||
delete others[size];
|
||
sizeClassObj = _extends(_extends({}, sizeClassObj), (_extends2 = {}, _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-").concat(sizeProps.span), sizeProps.span !== undefined), _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-order-").concat(sizeProps.order), sizeProps.order || sizeProps.order === 0), _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-offset-").concat(sizeProps.offset), sizeProps.offset || sizeProps.offset === 0), _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-push-").concat(sizeProps.push), sizeProps.push || sizeProps.push === 0), _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-pull-").concat(sizeProps.pull), sizeProps.pull || sizeProps.pull === 0), _extends2));
|
||
});
|
||
var classes = (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(span), span !== undefined), _defineProperty(_classNames, "".concat(prefixCls, "-order-").concat(order), order), _defineProperty(_classNames, "".concat(prefixCls, "-offset-").concat(offset), offset), _defineProperty(_classNames, "".concat(prefixCls, "-push-").concat(push), push), _defineProperty(_classNames, "".concat(prefixCls, "-pull-").concat(pull), pull), _classNames), className, sizeClassObj);
|
||
return React.createElement(_RowContext["default"].Consumer, null, function (_ref2) {
|
||
var gutter = _ref2.gutter;
|
||
var style = others.style;
|
||
|
||
if (gutter) {
|
||
style = _extends(_extends(_extends({}, gutter[0] > 0 ? {
|
||
paddingLeft: gutter[0] / 2,
|
||
paddingRight: gutter[0] / 2
|
||
} : {}), gutter[1] > 0 ? {
|
||
paddingTop: gutter[1] / 2,
|
||
paddingBottom: gutter[1] / 2
|
||
} : {}), style);
|
||
}
|
||
|
||
return React.createElement("div", _extends({}, others, {
|
||
style: style,
|
||
className: classes
|
||
}), children);
|
||
});
|
||
};
|
||
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Col, [{
|
||
key: "render",
|
||
value: function render() {
|
||
return React.createElement(_configProvider.ConfigConsumer, null, this.renderCol);
|
||
}
|
||
}]);
|
||
|
||
return Col;
|
||
}(React.Component);
|
||
|
||
exports["default"] = Col;
|
||
Col.propTypes = {
|
||
span: PropTypes.number,
|
||
order: PropTypes.number,
|
||
offset: PropTypes.number,
|
||
push: PropTypes.number,
|
||
pull: PropTypes.number,
|
||
className: PropTypes.string,
|
||
children: PropTypes.node,
|
||
xs: objectOrNumber,
|
||
sm: objectOrNumber,
|
||
md: objectOrNumber,
|
||
lg: objectOrNumber,
|
||
xl: objectOrNumber,
|
||
xxl: objectOrNumber
|
||
};
|
||
//# sourceMappingURL=col.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1021:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var MediaQueryDispatch = __webpack_require__(1022);
|
||
module.exports = new MediaQueryDispatch();
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1022:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var MediaQuery = __webpack_require__(1023);
|
||
var Util = __webpack_require__(940);
|
||
var each = Util.each;
|
||
var isFunction = Util.isFunction;
|
||
var isArray = Util.isArray;
|
||
|
||
/**
|
||
* Allows for registration of query handlers.
|
||
* Manages the query handler's state and is responsible for wiring up browser events
|
||
*
|
||
* @constructor
|
||
*/
|
||
function MediaQueryDispatch () {
|
||
if(!window.matchMedia) {
|
||
throw new Error('matchMedia not present, legacy browsers require a polyfill');
|
||
}
|
||
|
||
this.queries = {};
|
||
this.browserIsIncapable = !window.matchMedia('only all').matches;
|
||
}
|
||
|
||
MediaQueryDispatch.prototype = {
|
||
|
||
constructor : MediaQueryDispatch,
|
||
|
||
/**
|
||
* Registers a handler for the given media query
|
||
*
|
||
* @param {string} q the media query
|
||
* @param {object || Array || Function} options either a single query handler object, a function, or an array of query handlers
|
||
* @param {function} options.match fired when query matched
|
||
* @param {function} [options.unmatch] fired when a query is no longer matched
|
||
* @param {function} [options.setup] fired when handler first triggered
|
||
* @param {boolean} [options.deferSetup=false] whether setup should be run immediately or deferred until query is first matched
|
||
* @param {boolean} [shouldDegrade=false] whether this particular media query should always run on incapable browsers
|
||
*/
|
||
register : function(q, options, shouldDegrade) {
|
||
var queries = this.queries,
|
||
isUnconditional = shouldDegrade && this.browserIsIncapable;
|
||
|
||
if(!queries[q]) {
|
||
queries[q] = new MediaQuery(q, isUnconditional);
|
||
}
|
||
|
||
//normalise to object in an array
|
||
if(isFunction(options)) {
|
||
options = { match : options };
|
||
}
|
||
if(!isArray(options)) {
|
||
options = [options];
|
||
}
|
||
each(options, function(handler) {
|
||
if (isFunction(handler)) {
|
||
handler = { match : handler };
|
||
}
|
||
queries[q].addHandler(handler);
|
||
});
|
||
|
||
return this;
|
||
},
|
||
|
||
/**
|
||
* unregisters a query and all it's handlers, or a specific handler for a query
|
||
*
|
||
* @param {string} q the media query to target
|
||
* @param {object || function} [handler] specific handler to unregister
|
||
*/
|
||
unregister : function(q, handler) {
|
||
var query = this.queries[q];
|
||
|
||
if(query) {
|
||
if(handler) {
|
||
query.removeHandler(handler);
|
||
}
|
||
else {
|
||
query.clear();
|
||
delete this.queries[q];
|
||
}
|
||
}
|
||
|
||
return this;
|
||
}
|
||
};
|
||
|
||
module.exports = MediaQueryDispatch;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1023:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var QueryHandler = __webpack_require__(1024);
|
||
var each = __webpack_require__(940).each;
|
||
|
||
/**
|
||
* Represents a single media query, manages it's state and registered handlers for this query
|
||
*
|
||
* @constructor
|
||
* @param {string} query the media query string
|
||
* @param {boolean} [isUnconditional=false] whether the media query should run regardless of whether the conditions are met. Primarily for helping older browsers deal with mobile-first design
|
||
*/
|
||
function MediaQuery(query, isUnconditional) {
|
||
this.query = query;
|
||
this.isUnconditional = isUnconditional;
|
||
this.handlers = [];
|
||
this.mql = window.matchMedia(query);
|
||
|
||
var self = this;
|
||
this.listener = function(mql) {
|
||
// Chrome passes an MediaQueryListEvent object, while other browsers pass MediaQueryList directly
|
||
self.mql = mql.currentTarget || mql;
|
||
self.assess();
|
||
};
|
||
this.mql.addListener(this.listener);
|
||
}
|
||
|
||
MediaQuery.prototype = {
|
||
|
||
constuctor : MediaQuery,
|
||
|
||
/**
|
||
* add a handler for this query, triggering if already active
|
||
*
|
||
* @param {object} handler
|
||
* @param {function} handler.match callback for when query is activated
|
||
* @param {function} [handler.unmatch] callback for when query is deactivated
|
||
* @param {function} [handler.setup] callback for immediate execution when a query handler is registered
|
||
* @param {boolean} [handler.deferSetup=false] should the setup callback be deferred until the first time the handler is matched?
|
||
*/
|
||
addHandler : function(handler) {
|
||
var qh = new QueryHandler(handler);
|
||
this.handlers.push(qh);
|
||
|
||
this.matches() && qh.on();
|
||
},
|
||
|
||
/**
|
||
* removes the given handler from the collection, and calls it's destroy methods
|
||
*
|
||
* @param {object || function} handler the handler to remove
|
||
*/
|
||
removeHandler : function(handler) {
|
||
var handlers = this.handlers;
|
||
each(handlers, function(h, i) {
|
||
if(h.equals(handler)) {
|
||
h.destroy();
|
||
return !handlers.splice(i,1); //remove from array and exit each early
|
||
}
|
||
});
|
||
},
|
||
|
||
/**
|
||
* Determine whether the media query should be considered a match
|
||
*
|
||
* @return {Boolean} true if media query can be considered a match, false otherwise
|
||
*/
|
||
matches : function() {
|
||
return this.mql.matches || this.isUnconditional;
|
||
},
|
||
|
||
/**
|
||
* Clears all handlers and unbinds events
|
||
*/
|
||
clear : function() {
|
||
each(this.handlers, function(handler) {
|
||
handler.destroy();
|
||
});
|
||
this.mql.removeListener(this.listener);
|
||
this.handlers.length = 0; //clear array
|
||
},
|
||
|
||
/*
|
||
* Assesses the query, turning on all handlers if it matches, turning them off if it doesn't match
|
||
*/
|
||
assess : function() {
|
||
var action = this.matches() ? 'on' : 'off';
|
||
|
||
each(this.handlers, function(handler) {
|
||
handler[action]();
|
||
});
|
||
}
|
||
};
|
||
|
||
module.exports = MediaQuery;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1024:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Delegate to handle a media query being matched and unmatched.
|
||
*
|
||
* @param {object} options
|
||
* @param {function} options.match callback for when the media query is matched
|
||
* @param {function} [options.unmatch] callback for when the media query is unmatched
|
||
* @param {function} [options.setup] one-time callback triggered the first time a query is matched
|
||
* @param {boolean} [options.deferSetup=false] should the setup callback be run immediately, rather than first time query is matched?
|
||
* @constructor
|
||
*/
|
||
function QueryHandler(options) {
|
||
this.options = options;
|
||
!options.deferSetup && this.setup();
|
||
}
|
||
|
||
QueryHandler.prototype = {
|
||
|
||
constructor : QueryHandler,
|
||
|
||
/**
|
||
* coordinates setup of the handler
|
||
*
|
||
* @function
|
||
*/
|
||
setup : function() {
|
||
if(this.options.setup) {
|
||
this.options.setup();
|
||
}
|
||
this.initialised = true;
|
||
},
|
||
|
||
/**
|
||
* coordinates setup and triggering of the handler
|
||
*
|
||
* @function
|
||
*/
|
||
on : function() {
|
||
!this.initialised && this.setup();
|
||
this.options.match && this.options.match();
|
||
},
|
||
|
||
/**
|
||
* coordinates the unmatch event for the handler
|
||
*
|
||
* @function
|
||
*/
|
||
off : function() {
|
||
this.options.unmatch && this.options.unmatch();
|
||
},
|
||
|
||
/**
|
||
* called when a handler is to be destroyed.
|
||
* delegates to the destroy or unmatch callbacks, depending on availability.
|
||
*
|
||
* @function
|
||
*/
|
||
destroy : function() {
|
||
this.options.destroy ? this.options.destroy() : this.off();
|
||
},
|
||
|
||
/**
|
||
* determines equality by reference.
|
||
* if object is supplied compare options, if function, compare match callback
|
||
*
|
||
* @function
|
||
* @param {object || function} [target] the target for comparison
|
||
*/
|
||
equals : function(target) {
|
||
return this.options === target || this.options.match === target;
|
||
}
|
||
|
||
};
|
||
|
||
module.exports = QueryHandler;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1027:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*
|
||
*/
|
||
|
||
|
||
|
||
var React = __webpack_require__(0);
|
||
var factory = __webpack_require__(1028);
|
||
|
||
if (typeof React === 'undefined') {
|
||
throw Error(
|
||
'create-react-class could not find the React object. If you are using script tags, ' +
|
||
'make sure that React is being loaded before create-react-class.'
|
||
);
|
||
}
|
||
|
||
// Hack to grab NoopUpdateQueue from isomorphic React
|
||
var ReactNoopUpdateQueue = new React.Component().updater;
|
||
|
||
module.exports = factory(
|
||
React.Component,
|
||
React.isValidElement,
|
||
ReactNoopUpdateQueue
|
||
);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1028:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*
|
||
*/
|
||
|
||
|
||
|
||
var _assign = __webpack_require__(63);
|
||
|
||
var emptyObject = __webpack_require__(1029);
|
||
var _invariant = __webpack_require__(1030);
|
||
|
||
if (false) {
|
||
var warning = require('fbjs/lib/warning');
|
||
}
|
||
|
||
var MIXINS_KEY = 'mixins';
|
||
|
||
// Helper function to allow the creation of anonymous functions which do not
|
||
// have .name set to the name of the variable being assigned to.
|
||
function identity(fn) {
|
||
return fn;
|
||
}
|
||
|
||
var ReactPropTypeLocationNames;
|
||
if (false) {
|
||
ReactPropTypeLocationNames = {
|
||
prop: 'prop',
|
||
context: 'context',
|
||
childContext: 'child context'
|
||
};
|
||
} else {
|
||
ReactPropTypeLocationNames = {};
|
||
}
|
||
|
||
function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
|
||
/**
|
||
* Policies that describe methods in `ReactClassInterface`.
|
||
*/
|
||
|
||
var injectedMixins = [];
|
||
|
||
/**
|
||
* Composite components are higher-level components that compose other composite
|
||
* or host components.
|
||
*
|
||
* To create a new type of `ReactClass`, pass a specification of
|
||
* your new class to `React.createClass`. The only requirement of your class
|
||
* specification is that you implement a `render` method.
|
||
*
|
||
* var MyComponent = React.createClass({
|
||
* render: function() {
|
||
* return <div>Hello World</div>;
|
||
* }
|
||
* });
|
||
*
|
||
* The class specification supports a specific protocol of methods that have
|
||
* special meaning (e.g. `render`). See `ReactClassInterface` for
|
||
* more the comprehensive protocol. Any other properties and methods in the
|
||
* class specification will be available on the prototype.
|
||
*
|
||
* @interface ReactClassInterface
|
||
* @internal
|
||
*/
|
||
var ReactClassInterface = {
|
||
/**
|
||
* An array of Mixin objects to include when defining your component.
|
||
*
|
||
* @type {array}
|
||
* @optional
|
||
*/
|
||
mixins: 'DEFINE_MANY',
|
||
|
||
/**
|
||
* An object containing properties and methods that should be defined on
|
||
* the component's constructor instead of its prototype (static methods).
|
||
*
|
||
* @type {object}
|
||
* @optional
|
||
*/
|
||
statics: 'DEFINE_MANY',
|
||
|
||
/**
|
||
* Definition of prop types for this component.
|
||
*
|
||
* @type {object}
|
||
* @optional
|
||
*/
|
||
propTypes: 'DEFINE_MANY',
|
||
|
||
/**
|
||
* Definition of context types for this component.
|
||
*
|
||
* @type {object}
|
||
* @optional
|
||
*/
|
||
contextTypes: 'DEFINE_MANY',
|
||
|
||
/**
|
||
* Definition of context types this component sets for its children.
|
||
*
|
||
* @type {object}
|
||
* @optional
|
||
*/
|
||
childContextTypes: 'DEFINE_MANY',
|
||
|
||
// ==== Definition methods ====
|
||
|
||
/**
|
||
* Invoked when the component is mounted. Values in the mapping will be set on
|
||
* `this.props` if that prop is not specified (i.e. using an `in` check).
|
||
*
|
||
* This method is invoked before `getInitialState` and therefore cannot rely
|
||
* on `this.state` or use `this.setState`.
|
||
*
|
||
* @return {object}
|
||
* @optional
|
||
*/
|
||
getDefaultProps: 'DEFINE_MANY_MERGED',
|
||
|
||
/**
|
||
* Invoked once before the component is mounted. The return value will be used
|
||
* as the initial value of `this.state`.
|
||
*
|
||
* getInitialState: function() {
|
||
* return {
|
||
* isOn: false,
|
||
* fooBaz: new BazFoo()
|
||
* }
|
||
* }
|
||
*
|
||
* @return {object}
|
||
* @optional
|
||
*/
|
||
getInitialState: 'DEFINE_MANY_MERGED',
|
||
|
||
/**
|
||
* @return {object}
|
||
* @optional
|
||
*/
|
||
getChildContext: 'DEFINE_MANY_MERGED',
|
||
|
||
/**
|
||
* Uses props from `this.props` and state from `this.state` to render the
|
||
* structure of the component.
|
||
*
|
||
* No guarantees are made about when or how often this method is invoked, so
|
||
* it must not have side effects.
|
||
*
|
||
* render: function() {
|
||
* var name = this.props.name;
|
||
* return <div>Hello, {name}!</div>;
|
||
* }
|
||
*
|
||
* @return {ReactComponent}
|
||
* @required
|
||
*/
|
||
render: 'DEFINE_ONCE',
|
||
|
||
// ==== Delegate methods ====
|
||
|
||
/**
|
||
* Invoked when the component is initially created and about to be mounted.
|
||
* This may have side effects, but any external subscriptions or data created
|
||
* by this method must be cleaned up in `componentWillUnmount`.
|
||
*
|
||
* @optional
|
||
*/
|
||
componentWillMount: 'DEFINE_MANY',
|
||
|
||
/**
|
||
* Invoked when the component has been mounted and has a DOM representation.
|
||
* However, there is no guarantee that the DOM node is in the document.
|
||
*
|
||
* Use this as an opportunity to operate on the DOM when the component has
|
||
* been mounted (initialized and rendered) for the first time.
|
||
*
|
||
* @param {DOMElement} rootNode DOM element representing the component.
|
||
* @optional
|
||
*/
|
||
componentDidMount: 'DEFINE_MANY',
|
||
|
||
/**
|
||
* Invoked before the component receives new props.
|
||
*
|
||
* Use this as an opportunity to react to a prop transition by updating the
|
||
* state using `this.setState`. Current props are accessed via `this.props`.
|
||
*
|
||
* componentWillReceiveProps: function(nextProps, nextContext) {
|
||
* this.setState({
|
||
* likesIncreasing: nextProps.likeCount > this.props.likeCount
|
||
* });
|
||
* }
|
||
*
|
||
* NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
|
||
* transition may cause a state change, but the opposite is not true. If you
|
||
* need it, you are probably looking for `componentWillUpdate`.
|
||
*
|
||
* @param {object} nextProps
|
||
* @optional
|
||
*/
|
||
componentWillReceiveProps: 'DEFINE_MANY',
|
||
|
||
/**
|
||
* Invoked while deciding if the component should be updated as a result of
|
||
* receiving new props, state and/or context.
|
||
*
|
||
* Use this as an opportunity to `return false` when you're certain that the
|
||
* transition to the new props/state/context will not require a component
|
||
* update.
|
||
*
|
||
* shouldComponentUpdate: function(nextProps, nextState, nextContext) {
|
||
* return !equal(nextProps, this.props) ||
|
||
* !equal(nextState, this.state) ||
|
||
* !equal(nextContext, this.context);
|
||
* }
|
||
*
|
||
* @param {object} nextProps
|
||
* @param {?object} nextState
|
||
* @param {?object} nextContext
|
||
* @return {boolean} True if the component should update.
|
||
* @optional
|
||
*/
|
||
shouldComponentUpdate: 'DEFINE_ONCE',
|
||
|
||
/**
|
||
* Invoked when the component is about to update due to a transition from
|
||
* `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
|
||
* and `nextContext`.
|
||
*
|
||
* Use this as an opportunity to perform preparation before an update occurs.
|
||
*
|
||
* NOTE: You **cannot** use `this.setState()` in this method.
|
||
*
|
||
* @param {object} nextProps
|
||
* @param {?object} nextState
|
||
* @param {?object} nextContext
|
||
* @param {ReactReconcileTransaction} transaction
|
||
* @optional
|
||
*/
|
||
componentWillUpdate: 'DEFINE_MANY',
|
||
|
||
/**
|
||
* Invoked when the component's DOM representation has been updated.
|
||
*
|
||
* Use this as an opportunity to operate on the DOM when the component has
|
||
* been updated.
|
||
*
|
||
* @param {object} prevProps
|
||
* @param {?object} prevState
|
||
* @param {?object} prevContext
|
||
* @param {DOMElement} rootNode DOM element representing the component.
|
||
* @optional
|
||
*/
|
||
componentDidUpdate: 'DEFINE_MANY',
|
||
|
||
/**
|
||
* Invoked when the component is about to be removed from its parent and have
|
||
* its DOM representation destroyed.
|
||
*
|
||
* Use this as an opportunity to deallocate any external resources.
|
||
*
|
||
* NOTE: There is no `componentDidUnmount` since your component will have been
|
||
* destroyed by that point.
|
||
*
|
||
* @optional
|
||
*/
|
||
componentWillUnmount: 'DEFINE_MANY',
|
||
|
||
/**
|
||
* Replacement for (deprecated) `componentWillMount`.
|
||
*
|
||
* @optional
|
||
*/
|
||
UNSAFE_componentWillMount: 'DEFINE_MANY',
|
||
|
||
/**
|
||
* Replacement for (deprecated) `componentWillReceiveProps`.
|
||
*
|
||
* @optional
|
||
*/
|
||
UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',
|
||
|
||
/**
|
||
* Replacement for (deprecated) `componentWillUpdate`.
|
||
*
|
||
* @optional
|
||
*/
|
||
UNSAFE_componentWillUpdate: 'DEFINE_MANY',
|
||
|
||
// ==== Advanced methods ====
|
||
|
||
/**
|
||
* Updates the component's currently mounted DOM representation.
|
||
*
|
||
* By default, this implements React's rendering and reconciliation algorithm.
|
||
* Sophisticated clients may wish to override this.
|
||
*
|
||
* @param {ReactReconcileTransaction} transaction
|
||
* @internal
|
||
* @overridable
|
||
*/
|
||
updateComponent: 'OVERRIDE_BASE'
|
||
};
|
||
|
||
/**
|
||
* Similar to ReactClassInterface but for static methods.
|
||
*/
|
||
var ReactClassStaticInterface = {
|
||
/**
|
||
* This method is invoked after a component is instantiated and when it
|
||
* receives new props. Return an object to update state in response to
|
||
* prop changes. Return null to indicate no change to state.
|
||
*
|
||
* If an object is returned, its keys will be merged into the existing state.
|
||
*
|
||
* @return {object || null}
|
||
* @optional
|
||
*/
|
||
getDerivedStateFromProps: 'DEFINE_MANY_MERGED'
|
||
};
|
||
|
||
/**
|
||
* Mapping from class specification keys to special processing functions.
|
||
*
|
||
* Although these are declared like instance properties in the specification
|
||
* when defining classes using `React.createClass`, they are actually static
|
||
* and are accessible on the constructor instead of the prototype. Despite
|
||
* being static, they must be defined outside of the "statics" key under
|
||
* which all other static methods are defined.
|
||
*/
|
||
var RESERVED_SPEC_KEYS = {
|
||
displayName: function(Constructor, displayName) {
|
||
Constructor.displayName = displayName;
|
||
},
|
||
mixins: function(Constructor, mixins) {
|
||
if (mixins) {
|
||
for (var i = 0; i < mixins.length; i++) {
|
||
mixSpecIntoComponent(Constructor, mixins[i]);
|
||
}
|
||
}
|
||
},
|
||
childContextTypes: function(Constructor, childContextTypes) {
|
||
if (false) {
|
||
validateTypeDef(Constructor, childContextTypes, 'childContext');
|
||
}
|
||
Constructor.childContextTypes = _assign(
|
||
{},
|
||
Constructor.childContextTypes,
|
||
childContextTypes
|
||
);
|
||
},
|
||
contextTypes: function(Constructor, contextTypes) {
|
||
if (false) {
|
||
validateTypeDef(Constructor, contextTypes, 'context');
|
||
}
|
||
Constructor.contextTypes = _assign(
|
||
{},
|
||
Constructor.contextTypes,
|
||
contextTypes
|
||
);
|
||
},
|
||
/**
|
||
* Special case getDefaultProps which should move into statics but requires
|
||
* automatic merging.
|
||
*/
|
||
getDefaultProps: function(Constructor, getDefaultProps) {
|
||
if (Constructor.getDefaultProps) {
|
||
Constructor.getDefaultProps = createMergedResultFunction(
|
||
Constructor.getDefaultProps,
|
||
getDefaultProps
|
||
);
|
||
} else {
|
||
Constructor.getDefaultProps = getDefaultProps;
|
||
}
|
||
},
|
||
propTypes: function(Constructor, propTypes) {
|
||
if (false) {
|
||
validateTypeDef(Constructor, propTypes, 'prop');
|
||
}
|
||
Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
|
||
},
|
||
statics: function(Constructor, statics) {
|
||
mixStaticSpecIntoComponent(Constructor, statics);
|
||
},
|
||
autobind: function() {}
|
||
};
|
||
|
||
function validateTypeDef(Constructor, typeDef, location) {
|
||
for (var propName in typeDef) {
|
||
if (typeDef.hasOwnProperty(propName)) {
|
||
// use a warning instead of an _invariant so components
|
||
// don't show up in prod but only in __DEV__
|
||
if (false) {
|
||
warning(
|
||
typeof typeDef[propName] === 'function',
|
||
'%s: %s type `%s` is invalid; it must be a function, usually from ' +
|
||
'React.PropTypes.',
|
||
Constructor.displayName || 'ReactClass',
|
||
ReactPropTypeLocationNames[location],
|
||
propName
|
||
);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
function validateMethodOverride(isAlreadyDefined, name) {
|
||
var specPolicy = ReactClassInterface.hasOwnProperty(name)
|
||
? ReactClassInterface[name]
|
||
: null;
|
||
|
||
// Disallow overriding of base class methods unless explicitly allowed.
|
||
if (ReactClassMixin.hasOwnProperty(name)) {
|
||
_invariant(
|
||
specPolicy === 'OVERRIDE_BASE',
|
||
'ReactClassInterface: You are attempting to override ' +
|
||
'`%s` from your class specification. Ensure that your method names ' +
|
||
'do not overlap with React methods.',
|
||
name
|
||
);
|
||
}
|
||
|
||
// Disallow defining methods more than once unless explicitly allowed.
|
||
if (isAlreadyDefined) {
|
||
_invariant(
|
||
specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
|
||
'ReactClassInterface: You are attempting to define ' +
|
||
'`%s` on your component more than once. This conflict may be due ' +
|
||
'to a mixin.',
|
||
name
|
||
);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Mixin helper which handles policy validation and reserved
|
||
* specification keys when building React classes.
|
||
*/
|
||
function mixSpecIntoComponent(Constructor, spec) {
|
||
if (!spec) {
|
||
if (false) {
|
||
var typeofSpec = typeof spec;
|
||
var isMixinValid = typeofSpec === 'object' && spec !== null;
|
||
|
||
if (process.env.NODE_ENV !== 'production') {
|
||
warning(
|
||
isMixinValid,
|
||
"%s: You're attempting to include a mixin that is either null " +
|
||
'or not an object. Check the mixins included by the component, ' +
|
||
'as well as any mixins they include themselves. ' +
|
||
'Expected object but got %s.',
|
||
Constructor.displayName || 'ReactClass',
|
||
spec === null ? null : typeofSpec
|
||
);
|
||
}
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
_invariant(
|
||
typeof spec !== 'function',
|
||
"ReactClass: You're attempting to " +
|
||
'use a component class or function as a mixin. Instead, just use a ' +
|
||
'regular object.'
|
||
);
|
||
_invariant(
|
||
!isValidElement(spec),
|
||
"ReactClass: You're attempting to " +
|
||
'use a component as a mixin. Instead, just use a regular object.'
|
||
);
|
||
|
||
var proto = Constructor.prototype;
|
||
var autoBindPairs = proto.__reactAutoBindPairs;
|
||
|
||
// By handling mixins before any other properties, we ensure the same
|
||
// chaining order is applied to methods with DEFINE_MANY policy, whether
|
||
// mixins are listed before or after these methods in the spec.
|
||
if (spec.hasOwnProperty(MIXINS_KEY)) {
|
||
RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
|
||
}
|
||
|
||
for (var name in spec) {
|
||
if (!spec.hasOwnProperty(name)) {
|
||
continue;
|
||
}
|
||
|
||
if (name === MIXINS_KEY) {
|
||
// We have already handled mixins in a special case above.
|
||
continue;
|
||
}
|
||
|
||
var property = spec[name];
|
||
var isAlreadyDefined = proto.hasOwnProperty(name);
|
||
validateMethodOverride(isAlreadyDefined, name);
|
||
|
||
if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
|
||
RESERVED_SPEC_KEYS[name](Constructor, property);
|
||
} else {
|
||
// Setup methods on prototype:
|
||
// The following member methods should not be automatically bound:
|
||
// 1. Expected ReactClass methods (in the "interface").
|
||
// 2. Overridden methods (that were mixed in).
|
||
var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
|
||
var isFunction = typeof property === 'function';
|
||
var shouldAutoBind =
|
||
isFunction &&
|
||
!isReactClassMethod &&
|
||
!isAlreadyDefined &&
|
||
spec.autobind !== false;
|
||
|
||
if (shouldAutoBind) {
|
||
autoBindPairs.push(name, property);
|
||
proto[name] = property;
|
||
} else {
|
||
if (isAlreadyDefined) {
|
||
var specPolicy = ReactClassInterface[name];
|
||
|
||
// These cases should already be caught by validateMethodOverride.
|
||
_invariant(
|
||
isReactClassMethod &&
|
||
(specPolicy === 'DEFINE_MANY_MERGED' ||
|
||
specPolicy === 'DEFINE_MANY'),
|
||
'ReactClass: Unexpected spec policy %s for key %s ' +
|
||
'when mixing in component specs.',
|
||
specPolicy,
|
||
name
|
||
);
|
||
|
||
// For methods which are defined more than once, call the existing
|
||
// methods before calling the new property, merging if appropriate.
|
||
if (specPolicy === 'DEFINE_MANY_MERGED') {
|
||
proto[name] = createMergedResultFunction(proto[name], property);
|
||
} else if (specPolicy === 'DEFINE_MANY') {
|
||
proto[name] = createChainedFunction(proto[name], property);
|
||
}
|
||
} else {
|
||
proto[name] = property;
|
||
if (false) {
|
||
// Add verbose displayName to the function, which helps when looking
|
||
// at profiling tools.
|
||
if (typeof property === 'function' && spec.displayName) {
|
||
proto[name].displayName = spec.displayName + '_' + name;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
function mixStaticSpecIntoComponent(Constructor, statics) {
|
||
if (!statics) {
|
||
return;
|
||
}
|
||
|
||
for (var name in statics) {
|
||
var property = statics[name];
|
||
if (!statics.hasOwnProperty(name)) {
|
||
continue;
|
||
}
|
||
|
||
var isReserved = name in RESERVED_SPEC_KEYS;
|
||
_invariant(
|
||
!isReserved,
|
||
'ReactClass: You are attempting to define a reserved ' +
|
||
'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
|
||
'as an instance property instead; it will still be accessible on the ' +
|
||
'constructor.',
|
||
name
|
||
);
|
||
|
||
var isAlreadyDefined = name in Constructor;
|
||
if (isAlreadyDefined) {
|
||
var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)
|
||
? ReactClassStaticInterface[name]
|
||
: null;
|
||
|
||
_invariant(
|
||
specPolicy === 'DEFINE_MANY_MERGED',
|
||
'ReactClass: You are attempting to define ' +
|
||
'`%s` on your component more than once. This conflict may be ' +
|
||
'due to a mixin.',
|
||
name
|
||
);
|
||
|
||
Constructor[name] = createMergedResultFunction(Constructor[name], property);
|
||
|
||
return;
|
||
}
|
||
|
||
Constructor[name] = property;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Merge two objects, but throw if both contain the same key.
|
||
*
|
||
* @param {object} one The first object, which is mutated.
|
||
* @param {object} two The second object
|
||
* @return {object} one after it has been mutated to contain everything in two.
|
||
*/
|
||
function mergeIntoWithNoDuplicateKeys(one, two) {
|
||
_invariant(
|
||
one && two && typeof one === 'object' && typeof two === 'object',
|
||
'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
|
||
);
|
||
|
||
for (var key in two) {
|
||
if (two.hasOwnProperty(key)) {
|
||
_invariant(
|
||
one[key] === undefined,
|
||
'mergeIntoWithNoDuplicateKeys(): ' +
|
||
'Tried to merge two objects with the same key: `%s`. This conflict ' +
|
||
'may be due to a mixin; in particular, this may be caused by two ' +
|
||
'getInitialState() or getDefaultProps() methods returning objects ' +
|
||
'with clashing keys.',
|
||
key
|
||
);
|
||
one[key] = two[key];
|
||
}
|
||
}
|
||
return one;
|
||
}
|
||
|
||
/**
|
||
* Creates a function that invokes two functions and merges their return values.
|
||
*
|
||
* @param {function} one Function to invoke first.
|
||
* @param {function} two Function to invoke second.
|
||
* @return {function} Function that invokes the two argument functions.
|
||
* @private
|
||
*/
|
||
function createMergedResultFunction(one, two) {
|
||
return function mergedResult() {
|
||
var a = one.apply(this, arguments);
|
||
var b = two.apply(this, arguments);
|
||
if (a == null) {
|
||
return b;
|
||
} else if (b == null) {
|
||
return a;
|
||
}
|
||
var c = {};
|
||
mergeIntoWithNoDuplicateKeys(c, a);
|
||
mergeIntoWithNoDuplicateKeys(c, b);
|
||
return c;
|
||
};
|
||
}
|
||
|
||
/**
|
||
* Creates a function that invokes two functions and ignores their return vales.
|
||
*
|
||
* @param {function} one Function to invoke first.
|
||
* @param {function} two Function to invoke second.
|
||
* @return {function} Function that invokes the two argument functions.
|
||
* @private
|
||
*/
|
||
function createChainedFunction(one, two) {
|
||
return function chainedFunction() {
|
||
one.apply(this, arguments);
|
||
two.apply(this, arguments);
|
||
};
|
||
}
|
||
|
||
/**
|
||
* Binds a method to the component.
|
||
*
|
||
* @param {object} component Component whose method is going to be bound.
|
||
* @param {function} method Method to be bound.
|
||
* @return {function} The bound method.
|
||
*/
|
||
function bindAutoBindMethod(component, method) {
|
||
var boundMethod = method.bind(component);
|
||
if (false) {
|
||
boundMethod.__reactBoundContext = component;
|
||
boundMethod.__reactBoundMethod = method;
|
||
boundMethod.__reactBoundArguments = null;
|
||
var componentName = component.constructor.displayName;
|
||
var _bind = boundMethod.bind;
|
||
boundMethod.bind = function(newThis) {
|
||
for (
|
||
var _len = arguments.length,
|
||
args = Array(_len > 1 ? _len - 1 : 0),
|
||
_key = 1;
|
||
_key < _len;
|
||
_key++
|
||
) {
|
||
args[_key - 1] = arguments[_key];
|
||
}
|
||
|
||
// User is trying to bind() an autobound method; we effectively will
|
||
// ignore the value of "this" that the user is trying to use, so
|
||
// let's warn.
|
||
if (newThis !== component && newThis !== null) {
|
||
if (process.env.NODE_ENV !== 'production') {
|
||
warning(
|
||
false,
|
||
'bind(): React component methods may only be bound to the ' +
|
||
'component instance. See %s',
|
||
componentName
|
||
);
|
||
}
|
||
} else if (!args.length) {
|
||
if (process.env.NODE_ENV !== 'production') {
|
||
warning(
|
||
false,
|
||
'bind(): You are binding a component method to the component. ' +
|
||
'React does this for you automatically in a high-performance ' +
|
||
'way, so you can safely remove this call. See %s',
|
||
componentName
|
||
);
|
||
}
|
||
return boundMethod;
|
||
}
|
||
var reboundMethod = _bind.apply(boundMethod, arguments);
|
||
reboundMethod.__reactBoundContext = component;
|
||
reboundMethod.__reactBoundMethod = method;
|
||
reboundMethod.__reactBoundArguments = args;
|
||
return reboundMethod;
|
||
};
|
||
}
|
||
return boundMethod;
|
||
}
|
||
|
||
/**
|
||
* Binds all auto-bound methods in a component.
|
||
*
|
||
* @param {object} component Component whose method is going to be bound.
|
||
*/
|
||
function bindAutoBindMethods(component) {
|
||
var pairs = component.__reactAutoBindPairs;
|
||
for (var i = 0; i < pairs.length; i += 2) {
|
||
var autoBindKey = pairs[i];
|
||
var method = pairs[i + 1];
|
||
component[autoBindKey] = bindAutoBindMethod(component, method);
|
||
}
|
||
}
|
||
|
||
var IsMountedPreMixin = {
|
||
componentDidMount: function() {
|
||
this.__isMounted = true;
|
||
}
|
||
};
|
||
|
||
var IsMountedPostMixin = {
|
||
componentWillUnmount: function() {
|
||
this.__isMounted = false;
|
||
}
|
||
};
|
||
|
||
/**
|
||
* Add more to the ReactClass base class. These are all legacy features and
|
||
* therefore not already part of the modern ReactComponent.
|
||
*/
|
||
var ReactClassMixin = {
|
||
/**
|
||
* TODO: This will be deprecated because state should always keep a consistent
|
||
* type signature and the only use case for this, is to avoid that.
|
||
*/
|
||
replaceState: function(newState, callback) {
|
||
this.updater.enqueueReplaceState(this, newState, callback);
|
||
},
|
||
|
||
/**
|
||
* Checks whether or not this composite component is mounted.
|
||
* @return {boolean} True if mounted, false otherwise.
|
||
* @protected
|
||
* @final
|
||
*/
|
||
isMounted: function() {
|
||
if (false) {
|
||
warning(
|
||
this.__didWarnIsMounted,
|
||
'%s: isMounted is deprecated. Instead, make sure to clean up ' +
|
||
'subscriptions and pending requests in componentWillUnmount to ' +
|
||
'prevent memory leaks.',
|
||
(this.constructor && this.constructor.displayName) ||
|
||
this.name ||
|
||
'Component'
|
||
);
|
||
this.__didWarnIsMounted = true;
|
||
}
|
||
return !!this.__isMounted;
|
||
}
|
||
};
|
||
|
||
var ReactClassComponent = function() {};
|
||
_assign(
|
||
ReactClassComponent.prototype,
|
||
ReactComponent.prototype,
|
||
ReactClassMixin
|
||
);
|
||
|
||
/**
|
||
* Creates a composite component class given a class specification.
|
||
* See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
|
||
*
|
||
* @param {object} spec Class specification (which must define `render`).
|
||
* @return {function} Component constructor function.
|
||
* @public
|
||
*/
|
||
function createClass(spec) {
|
||
// To keep our warnings more understandable, we'll use a little hack here to
|
||
// ensure that Constructor.name !== 'Constructor'. This makes sure we don't
|
||
// unnecessarily identify a class without displayName as 'Constructor'.
|
||
var Constructor = identity(function(props, context, updater) {
|
||
// This constructor gets overridden by mocks. The argument is used
|
||
// by mocks to assert on what gets mounted.
|
||
|
||
if (false) {
|
||
warning(
|
||
this instanceof Constructor,
|
||
'Something is calling a React component directly. Use a factory or ' +
|
||
'JSX instead. See: https://fb.me/react-legacyfactory'
|
||
);
|
||
}
|
||
|
||
// Wire up auto-binding
|
||
if (this.__reactAutoBindPairs.length) {
|
||
bindAutoBindMethods(this);
|
||
}
|
||
|
||
this.props = props;
|
||
this.context = context;
|
||
this.refs = emptyObject;
|
||
this.updater = updater || ReactNoopUpdateQueue;
|
||
|
||
this.state = null;
|
||
|
||
// ReactClasses doesn't have constructors. Instead, they use the
|
||
// getInitialState and componentWillMount methods for initialization.
|
||
|
||
var initialState = this.getInitialState ? this.getInitialState() : null;
|
||
if (false) {
|
||
// We allow auto-mocks to proceed as if they're returning null.
|
||
if (
|
||
initialState === undefined &&
|
||
this.getInitialState._isMockFunction
|
||
) {
|
||
// This is probably bad practice. Consider warning here and
|
||
// deprecating this convenience.
|
||
initialState = null;
|
||
}
|
||
}
|
||
_invariant(
|
||
typeof initialState === 'object' && !Array.isArray(initialState),
|
||
'%s.getInitialState(): must return an object or null',
|
||
Constructor.displayName || 'ReactCompositeComponent'
|
||
);
|
||
|
||
this.state = initialState;
|
||
});
|
||
Constructor.prototype = new ReactClassComponent();
|
||
Constructor.prototype.constructor = Constructor;
|
||
Constructor.prototype.__reactAutoBindPairs = [];
|
||
|
||
injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
|
||
|
||
mixSpecIntoComponent(Constructor, IsMountedPreMixin);
|
||
mixSpecIntoComponent(Constructor, spec);
|
||
mixSpecIntoComponent(Constructor, IsMountedPostMixin);
|
||
|
||
// Initialize the defaultProps property after all mixins have been merged.
|
||
if (Constructor.getDefaultProps) {
|
||
Constructor.defaultProps = Constructor.getDefaultProps();
|
||
}
|
||
|
||
if (false) {
|
||
// This is a tag to indicate that the use of these method names is ok,
|
||
// since it's used with createClass. If it's not, then it's likely a
|
||
// mistake so we'll warn you to use the static property, property
|
||
// initializer or constructor respectively.
|
||
if (Constructor.getDefaultProps) {
|
||
Constructor.getDefaultProps.isReactClassApproved = {};
|
||
}
|
||
if (Constructor.prototype.getInitialState) {
|
||
Constructor.prototype.getInitialState.isReactClassApproved = {};
|
||
}
|
||
}
|
||
|
||
_invariant(
|
||
Constructor.prototype.render,
|
||
'createClass(...): Class specification must implement a `render` method.'
|
||
);
|
||
|
||
if (false) {
|
||
warning(
|
||
!Constructor.prototype.componentShouldUpdate,
|
||
'%s has a method called ' +
|
||
'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
|
||
'The name is phrased as a question because the function is ' +
|
||
'expected to return a value.',
|
||
spec.displayName || 'A component'
|
||
);
|
||
warning(
|
||
!Constructor.prototype.componentWillRecieveProps,
|
||
'%s has a method called ' +
|
||
'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
|
||
spec.displayName || 'A component'
|
||
);
|
||
warning(
|
||
!Constructor.prototype.UNSAFE_componentWillRecieveProps,
|
||
'%s has a method called UNSAFE_componentWillRecieveProps(). ' +
|
||
'Did you mean UNSAFE_componentWillReceiveProps()?',
|
||
spec.displayName || 'A component'
|
||
);
|
||
}
|
||
|
||
// Reduce time spent doing lookups by setting these on the prototype.
|
||
for (var methodName in ReactClassInterface) {
|
||
if (!Constructor.prototype[methodName]) {
|
||
Constructor.prototype[methodName] = null;
|
||
}
|
||
}
|
||
|
||
return Constructor;
|
||
}
|
||
|
||
return createClass;
|
||
}
|
||
|
||
module.exports = factory;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1029:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*
|
||
*/
|
||
|
||
|
||
|
||
var emptyObject = {};
|
||
|
||
if (false) {
|
||
Object.freeze(emptyObject);
|
||
}
|
||
|
||
module.exports = emptyObject;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1030:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*
|
||
*/
|
||
|
||
|
||
|
||
/**
|
||
* Use invariant() to assert state which your program assumes to be true.
|
||
*
|
||
* Provide sprintf-style format (only %s is supported) and arguments
|
||
* to provide information about what broke and what you were
|
||
* expecting.
|
||
*
|
||
* The invariant message will be stripped in production, but the invariant
|
||
* will remain to ensure logic does not differ in production.
|
||
*/
|
||
|
||
var validateFormat = function validateFormat(format) {};
|
||
|
||
if (false) {
|
||
validateFormat = function validateFormat(format) {
|
||
if (format === undefined) {
|
||
throw new Error('invariant requires an error message argument');
|
||
}
|
||
};
|
||
}
|
||
|
||
function invariant(condition, format, a, b, c, d, e, f) {
|
||
validateFormat(format);
|
||
|
||
if (!condition) {
|
||
var error;
|
||
if (format === undefined) {
|
||
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
||
} else {
|
||
var args = [a, b, c, d, e, f];
|
||
var argIndex = 0;
|
||
error = new Error(format.replace(/%s/g, function () {
|
||
return args[argIndex++];
|
||
}));
|
||
error.name = 'Invariant Violation';
|
||
}
|
||
|
||
error.framesToPop = 1; // we don't care about invariant's own frame
|
||
throw error;
|
||
}
|
||
}
|
||
|
||
module.exports = invariant;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1031:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||
|
||
// load the styles
|
||
var content = __webpack_require__(1032);
|
||
if(typeof content === 'string') content = [[module.i, content, '']];
|
||
// Prepare cssTransformation
|
||
var transform;
|
||
|
||
var options = {"hmr":false}
|
||
options.transform = transform
|
||
// add the styles to the DOM
|
||
var update = __webpack_require__(317)(content, options);
|
||
if(content.locals) module.exports = content.locals;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1032:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
exports = module.exports = __webpack_require__(316)(true);
|
||
// imports
|
||
|
||
|
||
// module
|
||
exports.push([module.i, ".ant-row{position:relative;height:auto;margin-right:0;margin-left:0;zoom:1;display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.ant-row:after,.ant-row:before{display:table;content:\"\"}.ant-row:after{clear:both}.ant-row-flex{-ms-flex-flow:row wrap;flex-flow:row wrap}.ant-row-flex,.ant-row-flex:after,.ant-row-flex:before{display:-ms-flexbox;display:flex}.ant-row-flex-start{-ms-flex-pack:start;justify-content:flex-start}.ant-row-flex-center{-ms-flex-pack:center;justify-content:center}.ant-row-flex-end{-ms-flex-pack:end;justify-content:flex-end}.ant-row-flex-space-between{-ms-flex-pack:justify;justify-content:space-between}.ant-row-flex-space-around{-ms-flex-pack:distribute;justify-content:space-around}.ant-row-flex-top{-ms-flex-align:start;align-items:flex-start}.ant-row-flex-middle{-ms-flex-align:center;align-items:center}.ant-row-flex-bottom{-ms-flex-align:end;align-items:flex-end}.ant-col{position:relative;min-height:1px}.ant-col-1,.ant-col-2,.ant-col-3,.ant-col-4,.ant-col-5,.ant-col-6,.ant-col-7,.ant-col-8,.ant-col-9,.ant-col-10,.ant-col-11,.ant-col-12,.ant-col-13,.ant-col-14,.ant-col-15,.ant-col-16,.ant-col-17,.ant-col-18,.ant-col-19,.ant-col-20,.ant-col-21,.ant-col-22,.ant-col-23,.ant-col-24,.ant-col-lg-1,.ant-col-lg-2,.ant-col-lg-3,.ant-col-lg-4,.ant-col-lg-5,.ant-col-lg-6,.ant-col-lg-7,.ant-col-lg-8,.ant-col-lg-9,.ant-col-lg-10,.ant-col-lg-11,.ant-col-lg-12,.ant-col-lg-13,.ant-col-lg-14,.ant-col-lg-15,.ant-col-lg-16,.ant-col-lg-17,.ant-col-lg-18,.ant-col-lg-19,.ant-col-lg-20,.ant-col-lg-21,.ant-col-lg-22,.ant-col-lg-23,.ant-col-lg-24,.ant-col-md-1,.ant-col-md-2,.ant-col-md-3,.ant-col-md-4,.ant-col-md-5,.ant-col-md-6,.ant-col-md-7,.ant-col-md-8,.ant-col-md-9,.ant-col-md-10,.ant-col-md-11,.ant-col-md-12,.ant-col-md-13,.ant-col-md-14,.ant-col-md-15,.ant-col-md-16,.ant-col-md-17,.ant-col-md-18,.ant-col-md-19,.ant-col-md-20,.ant-col-md-21,.ant-col-md-22,.ant-col-md-23,.ant-col-md-24,.ant-col-sm-1,.ant-col-sm-2,.ant-col-sm-3,.ant-col-sm-4,.ant-col-sm-5,.ant-col-sm-6,.ant-col-sm-7,.ant-col-sm-8,.ant-col-sm-9,.ant-col-sm-10,.ant-col-sm-11,.ant-col-sm-12,.ant-col-sm-13,.ant-col-sm-14,.ant-col-sm-15,.ant-col-sm-16,.ant-col-sm-17,.ant-col-sm-18,.ant-col-sm-19,.ant-col-sm-20,.ant-col-sm-21,.ant-col-sm-22,.ant-col-sm-23,.ant-col-sm-24,.ant-col-xs-1,.ant-col-xs-2,.ant-col-xs-3,.ant-col-xs-4,.ant-col-xs-5,.ant-col-xs-6,.ant-col-xs-7,.ant-col-xs-8,.ant-col-xs-9,.ant-col-xs-10,.ant-col-xs-11,.ant-col-xs-12,.ant-col-xs-13,.ant-col-xs-14,.ant-col-xs-15,.ant-col-xs-16,.ant-col-xs-17,.ant-col-xs-18,.ant-col-xs-19,.ant-col-xs-20,.ant-col-xs-21,.ant-col-xs-22,.ant-col-xs-23,.ant-col-xs-24{position:relative;padding-right:0;padding-left:0}.ant-col-1,.ant-col-2,.ant-col-3,.ant-col-4,.ant-col-5,.ant-col-6,.ant-col-7,.ant-col-8,.ant-col-9,.ant-col-10,.ant-col-11,.ant-col-12,.ant-col-13,.ant-col-14,.ant-col-15,.ant-col-16,.ant-col-17,.ant-col-18,.ant-col-19,.ant-col-20,.ant-col-21,.ant-col-22,.ant-col-23,.ant-col-24{-ms-flex:0 0 auto;flex:0 0 auto;float:left}.ant-col-24{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%}.ant-col-push-24{left:100%}.ant-col-pull-24{right:100%}.ant-col-offset-24{margin-left:100%}.ant-col-order-24{-ms-flex-order:24;order:24}.ant-col-23{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:95.83333333%}.ant-col-push-23{left:95.83333333%}.ant-col-pull-23{right:95.83333333%}.ant-col-offset-23{margin-left:95.83333333%}.ant-col-order-23{-ms-flex-order:23;order:23}.ant-col-22{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:91.66666667%}.ant-col-push-22{left:91.66666667%}.ant-col-pull-22{right:91.66666667%}.ant-col-offset-22{margin-left:91.66666667%}.ant-col-order-22{-ms-flex-order:22;order:22}.ant-col-21{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:87.5%}.ant-col-push-21{left:87.5%}.ant-col-pull-21{right:87.5%}.ant-col-offset-21{margin-left:87.5%}.ant-col-order-21{-ms-flex-order:21;order:21}.ant-col-20{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:83.33333333%}.ant-col-push-20{left:83.33333333%}.ant-col-pull-20{right:83.33333333%}.ant-col-offset-20{margin-left:83.33333333%}.ant-col-order-20{-ms-flex-order:20;order:20}.ant-col-19{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:79.16666667%}.ant-col-push-19{left:79.16666667%}.ant-col-pull-19{right:79.16666667%}.ant-col-offset-19{margin-left:79.16666667%}.ant-col-order-19{-ms-flex-order:19;order:19}.ant-col-18{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:75%}.ant-col-push-18{left:75%}.ant-col-pull-18{right:75%}.ant-col-offset-18{margin-left:75%}.ant-col-order-18{-ms-flex-order:18;order:18}.ant-col-17{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:70.83333333%}.ant-col-push-17{left:70.83333333%}.ant-col-pull-17{right:70.83333333%}.ant-col-offset-17{margin-left:70.83333333%}.ant-col-order-17{-ms-flex-order:17;order:17}.ant-col-16{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:66.66666667%}.ant-col-push-16{left:66.66666667%}.ant-col-pull-16{right:66.66666667%}.ant-col-offset-16{margin-left:66.66666667%}.ant-col-order-16{-ms-flex-order:16;order:16}.ant-col-15{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:62.5%}.ant-col-push-15{left:62.5%}.ant-col-pull-15{right:62.5%}.ant-col-offset-15{margin-left:62.5%}.ant-col-order-15{-ms-flex-order:15;order:15}.ant-col-14{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:58.33333333%}.ant-col-push-14{left:58.33333333%}.ant-col-pull-14{right:58.33333333%}.ant-col-offset-14{margin-left:58.33333333%}.ant-col-order-14{-ms-flex-order:14;order:14}.ant-col-13{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:54.16666667%}.ant-col-push-13{left:54.16666667%}.ant-col-pull-13{right:54.16666667%}.ant-col-offset-13{margin-left:54.16666667%}.ant-col-order-13{-ms-flex-order:13;order:13}.ant-col-12{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:50%}.ant-col-push-12{left:50%}.ant-col-pull-12{right:50%}.ant-col-offset-12{margin-left:50%}.ant-col-order-12{-ms-flex-order:12;order:12}.ant-col-11{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:45.83333333%}.ant-col-push-11{left:45.83333333%}.ant-col-pull-11{right:45.83333333%}.ant-col-offset-11{margin-left:45.83333333%}.ant-col-order-11{-ms-flex-order:11;order:11}.ant-col-10{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:41.66666667%}.ant-col-push-10{left:41.66666667%}.ant-col-pull-10{right:41.66666667%}.ant-col-offset-10{margin-left:41.66666667%}.ant-col-order-10{-ms-flex-order:10;order:10}.ant-col-9{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:37.5%}.ant-col-push-9{left:37.5%}.ant-col-pull-9{right:37.5%}.ant-col-offset-9{margin-left:37.5%}.ant-col-order-9{-ms-flex-order:9;order:9}.ant-col-8{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:33.33333333%}.ant-col-push-8{left:33.33333333%}.ant-col-pull-8{right:33.33333333%}.ant-col-offset-8{margin-left:33.33333333%}.ant-col-order-8{-ms-flex-order:8;order:8}.ant-col-7{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:29.16666667%}.ant-col-push-7{left:29.16666667%}.ant-col-pull-7{right:29.16666667%}.ant-col-offset-7{margin-left:29.16666667%}.ant-col-order-7{-ms-flex-order:7;order:7}.ant-col-6{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:25%}.ant-col-push-6{left:25%}.ant-col-pull-6{right:25%}.ant-col-offset-6{margin-left:25%}.ant-col-order-6{-ms-flex-order:6;order:6}.ant-col-5{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:20.83333333%}.ant-col-push-5{left:20.83333333%}.ant-col-pull-5{right:20.83333333%}.ant-col-offset-5{margin-left:20.83333333%}.ant-col-order-5{-ms-flex-order:5;order:5}.ant-col-4{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:16.66666667%}.ant-col-push-4{left:16.66666667%}.ant-col-pull-4{right:16.66666667%}.ant-col-offset-4{margin-left:16.66666667%}.ant-col-order-4{-ms-flex-order:4;order:4}.ant-col-3{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:12.5%}.ant-col-push-3{left:12.5%}.ant-col-pull-3{right:12.5%}.ant-col-offset-3{margin-left:12.5%}.ant-col-order-3{-ms-flex-order:3;order:3}.ant-col-2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:8.33333333%}.ant-col-push-2{left:8.33333333%}.ant-col-pull-2{right:8.33333333%}.ant-col-offset-2{margin-left:8.33333333%}.ant-col-order-2{-ms-flex-order:2;order:2}.ant-col-1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:4.16666667%}.ant-col-push-1{left:4.16666667%}.ant-col-pull-1{right:4.16666667%}.ant-col-offset-1{margin-left:4.16666667%}.ant-col-order-1{-ms-flex-order:1;order:1}.ant-col-0{display:none}.ant-col-offset-0{margin-left:0}.ant-col-order-0{-ms-flex-order:0;order:0}.ant-col-xs-1,.ant-col-xs-2,.ant-col-xs-3,.ant-col-xs-4,.ant-col-xs-5,.ant-col-xs-6,.ant-col-xs-7,.ant-col-xs-8,.ant-col-xs-9,.ant-col-xs-10,.ant-col-xs-11,.ant-col-xs-12,.ant-col-xs-13,.ant-col-xs-14,.ant-col-xs-15,.ant-col-xs-16,.ant-col-xs-17,.ant-col-xs-18,.ant-col-xs-19,.ant-col-xs-20,.ant-col-xs-21,.ant-col-xs-22,.ant-col-xs-23,.ant-col-xs-24{-ms-flex:0 0 auto;flex:0 0 auto;float:left}.ant-col-xs-24{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%}.ant-col-xs-push-24{left:100%}.ant-col-xs-pull-24{right:100%}.ant-col-xs-offset-24{margin-left:100%}.ant-col-xs-order-24{-ms-flex-order:24;order:24}.ant-col-xs-23{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:95.83333333%}.ant-col-xs-push-23{left:95.83333333%}.ant-col-xs-pull-23{right:95.83333333%}.ant-col-xs-offset-23{margin-left:95.83333333%}.ant-col-xs-order-23{-ms-flex-order:23;order:23}.ant-col-xs-22{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:91.66666667%}.ant-col-xs-push-22{left:91.66666667%}.ant-col-xs-pull-22{right:91.66666667%}.ant-col-xs-offset-22{margin-left:91.66666667%}.ant-col-xs-order-22{-ms-flex-order:22;order:22}.ant-col-xs-21{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:87.5%}.ant-col-xs-push-21{left:87.5%}.ant-col-xs-pull-21{right:87.5%}.ant-col-xs-offset-21{margin-left:87.5%}.ant-col-xs-order-21{-ms-flex-order:21;order:21}.ant-col-xs-20{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:83.33333333%}.ant-col-xs-push-20{left:83.33333333%}.ant-col-xs-pull-20{right:83.33333333%}.ant-col-xs-offset-20{margin-left:83.33333333%}.ant-col-xs-order-20{-ms-flex-order:20;order:20}.ant-col-xs-19{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:79.16666667%}.ant-col-xs-push-19{left:79.16666667%}.ant-col-xs-pull-19{right:79.16666667%}.ant-col-xs-offset-19{margin-left:79.16666667%}.ant-col-xs-order-19{-ms-flex-order:19;order:19}.ant-col-xs-18{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:75%}.ant-col-xs-push-18{left:75%}.ant-col-xs-pull-18{right:75%}.ant-col-xs-offset-18{margin-left:75%}.ant-col-xs-order-18{-ms-flex-order:18;order:18}.ant-col-xs-17{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:70.83333333%}.ant-col-xs-push-17{left:70.83333333%}.ant-col-xs-pull-17{right:70.83333333%}.ant-col-xs-offset-17{margin-left:70.83333333%}.ant-col-xs-order-17{-ms-flex-order:17;order:17}.ant-col-xs-16{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:66.66666667%}.ant-col-xs-push-16{left:66.66666667%}.ant-col-xs-pull-16{right:66.66666667%}.ant-col-xs-offset-16{margin-left:66.66666667%}.ant-col-xs-order-16{-ms-flex-order:16;order:16}.ant-col-xs-15{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:62.5%}.ant-col-xs-push-15{left:62.5%}.ant-col-xs-pull-15{right:62.5%}.ant-col-xs-offset-15{margin-left:62.5%}.ant-col-xs-order-15{-ms-flex-order:15;order:15}.ant-col-xs-14{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:58.33333333%}.ant-col-xs-push-14{left:58.33333333%}.ant-col-xs-pull-14{right:58.33333333%}.ant-col-xs-offset-14{margin-left:58.33333333%}.ant-col-xs-order-14{-ms-flex-order:14;order:14}.ant-col-xs-13{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:54.16666667%}.ant-col-xs-push-13{left:54.16666667%}.ant-col-xs-pull-13{right:54.16666667%}.ant-col-xs-offset-13{margin-left:54.16666667%}.ant-col-xs-order-13{-ms-flex-order:13;order:13}.ant-col-xs-12{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:50%}.ant-col-xs-push-12{left:50%}.ant-col-xs-pull-12{right:50%}.ant-col-xs-offset-12{margin-left:50%}.ant-col-xs-order-12{-ms-flex-order:12;order:12}.ant-col-xs-11{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:45.83333333%}.ant-col-xs-push-11{left:45.83333333%}.ant-col-xs-pull-11{right:45.83333333%}.ant-col-xs-offset-11{margin-left:45.83333333%}.ant-col-xs-order-11{-ms-flex-order:11;order:11}.ant-col-xs-10{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:41.66666667%}.ant-col-xs-push-10{left:41.66666667%}.ant-col-xs-pull-10{right:41.66666667%}.ant-col-xs-offset-10{margin-left:41.66666667%}.ant-col-xs-order-10{-ms-flex-order:10;order:10}.ant-col-xs-9{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:37.5%}.ant-col-xs-push-9{left:37.5%}.ant-col-xs-pull-9{right:37.5%}.ant-col-xs-offset-9{margin-left:37.5%}.ant-col-xs-order-9{-ms-flex-order:9;order:9}.ant-col-xs-8{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:33.33333333%}.ant-col-xs-push-8{left:33.33333333%}.ant-col-xs-pull-8{right:33.33333333%}.ant-col-xs-offset-8{margin-left:33.33333333%}.ant-col-xs-order-8{-ms-flex-order:8;order:8}.ant-col-xs-7{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:29.16666667%}.ant-col-xs-push-7{left:29.16666667%}.ant-col-xs-pull-7{right:29.16666667%}.ant-col-xs-offset-7{margin-left:29.16666667%}.ant-col-xs-order-7{-ms-flex-order:7;order:7}.ant-col-xs-6{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:25%}.ant-col-xs-push-6{left:25%}.ant-col-xs-pull-6{right:25%}.ant-col-xs-offset-6{margin-left:25%}.ant-col-xs-order-6{-ms-flex-order:6;order:6}.ant-col-xs-5{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:20.83333333%}.ant-col-xs-push-5{left:20.83333333%}.ant-col-xs-pull-5{right:20.83333333%}.ant-col-xs-offset-5{margin-left:20.83333333%}.ant-col-xs-order-5{-ms-flex-order:5;order:5}.ant-col-xs-4{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:16.66666667%}.ant-col-xs-push-4{left:16.66666667%}.ant-col-xs-pull-4{right:16.66666667%}.ant-col-xs-offset-4{margin-left:16.66666667%}.ant-col-xs-order-4{-ms-flex-order:4;order:4}.ant-col-xs-3{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:12.5%}.ant-col-xs-push-3{left:12.5%}.ant-col-xs-pull-3{right:12.5%}.ant-col-xs-offset-3{margin-left:12.5%}.ant-col-xs-order-3{-ms-flex-order:3;order:3}.ant-col-xs-2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:8.33333333%}.ant-col-xs-push-2{left:8.33333333%}.ant-col-xs-pull-2{right:8.33333333%}.ant-col-xs-offset-2{margin-left:8.33333333%}.ant-col-xs-order-2{-ms-flex-order:2;order:2}.ant-col-xs-1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:4.16666667%}.ant-col-xs-push-1{left:4.16666667%}.ant-col-xs-pull-1{right:4.16666667%}.ant-col-xs-offset-1{margin-left:4.16666667%}.ant-col-xs-order-1{-ms-flex-order:1;order:1}.ant-col-xs-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-xs-push-0{left:auto}.ant-col-xs-pull-0{right:auto}.ant-col-xs-offset-0{margin-left:0}.ant-col-xs-order-0{-ms-flex-order:0;order:0}@media (min-width:576px){.ant-col-sm-1,.ant-col-sm-2,.ant-col-sm-3,.ant-col-sm-4,.ant-col-sm-5,.ant-col-sm-6,.ant-col-sm-7,.ant-col-sm-8,.ant-col-sm-9,.ant-col-sm-10,.ant-col-sm-11,.ant-col-sm-12,.ant-col-sm-13,.ant-col-sm-14,.ant-col-sm-15,.ant-col-sm-16,.ant-col-sm-17,.ant-col-sm-18,.ant-col-sm-19,.ant-col-sm-20,.ant-col-sm-21,.ant-col-sm-22,.ant-col-sm-23,.ant-col-sm-24{-ms-flex:0 0 auto;flex:0 0 auto;float:left}.ant-col-sm-24{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%}.ant-col-sm-push-24{left:100%}.ant-col-sm-pull-24{right:100%}.ant-col-sm-offset-24{margin-left:100%}.ant-col-sm-order-24{-ms-flex-order:24;order:24}.ant-col-sm-23{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:95.83333333%}.ant-col-sm-push-23{left:95.83333333%}.ant-col-sm-pull-23{right:95.83333333%}.ant-col-sm-offset-23{margin-left:95.83333333%}.ant-col-sm-order-23{-ms-flex-order:23;order:23}.ant-col-sm-22{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:91.66666667%}.ant-col-sm-push-22{left:91.66666667%}.ant-col-sm-pull-22{right:91.66666667%}.ant-col-sm-offset-22{margin-left:91.66666667%}.ant-col-sm-order-22{-ms-flex-order:22;order:22}.ant-col-sm-21{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:87.5%}.ant-col-sm-push-21{left:87.5%}.ant-col-sm-pull-21{right:87.5%}.ant-col-sm-offset-21{margin-left:87.5%}.ant-col-sm-order-21{-ms-flex-order:21;order:21}.ant-col-sm-20{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:83.33333333%}.ant-col-sm-push-20{left:83.33333333%}.ant-col-sm-pull-20{right:83.33333333%}.ant-col-sm-offset-20{margin-left:83.33333333%}.ant-col-sm-order-20{-ms-flex-order:20;order:20}.ant-col-sm-19{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:79.16666667%}.ant-col-sm-push-19{left:79.16666667%}.ant-col-sm-pull-19{right:79.16666667%}.ant-col-sm-offset-19{margin-left:79.16666667%}.ant-col-sm-order-19{-ms-flex-order:19;order:19}.ant-col-sm-18{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:75%}.ant-col-sm-push-18{left:75%}.ant-col-sm-pull-18{right:75%}.ant-col-sm-offset-18{margin-left:75%}.ant-col-sm-order-18{-ms-flex-order:18;order:18}.ant-col-sm-17{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:70.83333333%}.ant-col-sm-push-17{left:70.83333333%}.ant-col-sm-pull-17{right:70.83333333%}.ant-col-sm-offset-17{margin-left:70.83333333%}.ant-col-sm-order-17{-ms-flex-order:17;order:17}.ant-col-sm-16{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:66.66666667%}.ant-col-sm-push-16{left:66.66666667%}.ant-col-sm-pull-16{right:66.66666667%}.ant-col-sm-offset-16{margin-left:66.66666667%}.ant-col-sm-order-16{-ms-flex-order:16;order:16}.ant-col-sm-15{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:62.5%}.ant-col-sm-push-15{left:62.5%}.ant-col-sm-pull-15{right:62.5%}.ant-col-sm-offset-15{margin-left:62.5%}.ant-col-sm-order-15{-ms-flex-order:15;order:15}.ant-col-sm-14{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:58.33333333%}.ant-col-sm-push-14{left:58.33333333%}.ant-col-sm-pull-14{right:58.33333333%}.ant-col-sm-offset-14{margin-left:58.33333333%}.ant-col-sm-order-14{-ms-flex-order:14;order:14}.ant-col-sm-13{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:54.16666667%}.ant-col-sm-push-13{left:54.16666667%}.ant-col-sm-pull-13{right:54.16666667%}.ant-col-sm-offset-13{margin-left:54.16666667%}.ant-col-sm-order-13{-ms-flex-order:13;order:13}.ant-col-sm-12{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:50%}.ant-col-sm-push-12{left:50%}.ant-col-sm-pull-12{right:50%}.ant-col-sm-offset-12{margin-left:50%}.ant-col-sm-order-12{-ms-flex-order:12;order:12}.ant-col-sm-11{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:45.83333333%}.ant-col-sm-push-11{left:45.83333333%}.ant-col-sm-pull-11{right:45.83333333%}.ant-col-sm-offset-11{margin-left:45.83333333%}.ant-col-sm-order-11{-ms-flex-order:11;order:11}.ant-col-sm-10{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:41.66666667%}.ant-col-sm-push-10{left:41.66666667%}.ant-col-sm-pull-10{right:41.66666667%}.ant-col-sm-offset-10{margin-left:41.66666667%}.ant-col-sm-order-10{-ms-flex-order:10;order:10}.ant-col-sm-9{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:37.5%}.ant-col-sm-push-9{left:37.5%}.ant-col-sm-pull-9{right:37.5%}.ant-col-sm-offset-9{margin-left:37.5%}.ant-col-sm-order-9{-ms-flex-order:9;order:9}.ant-col-sm-8{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:33.33333333%}.ant-col-sm-push-8{left:33.33333333%}.ant-col-sm-pull-8{right:33.33333333%}.ant-col-sm-offset-8{margin-left:33.33333333%}.ant-col-sm-order-8{-ms-flex-order:8;order:8}.ant-col-sm-7{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:29.16666667%}.ant-col-sm-push-7{left:29.16666667%}.ant-col-sm-pull-7{right:29.16666667%}.ant-col-sm-offset-7{margin-left:29.16666667%}.ant-col-sm-order-7{-ms-flex-order:7;order:7}.ant-col-sm-6{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:25%}.ant-col-sm-push-6{left:25%}.ant-col-sm-pull-6{right:25%}.ant-col-sm-offset-6{margin-left:25%}.ant-col-sm-order-6{-ms-flex-order:6;order:6}.ant-col-sm-5{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:20.83333333%}.ant-col-sm-push-5{left:20.83333333%}.ant-col-sm-pull-5{right:20.83333333%}.ant-col-sm-offset-5{margin-left:20.83333333%}.ant-col-sm-order-5{-ms-flex-order:5;order:5}.ant-col-sm-4{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:16.66666667%}.ant-col-sm-push-4{left:16.66666667%}.ant-col-sm-pull-4{right:16.66666667%}.ant-col-sm-offset-4{margin-left:16.66666667%}.ant-col-sm-order-4{-ms-flex-order:4;order:4}.ant-col-sm-3{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:12.5%}.ant-col-sm-push-3{left:12.5%}.ant-col-sm-pull-3{right:12.5%}.ant-col-sm-offset-3{margin-left:12.5%}.ant-col-sm-order-3{-ms-flex-order:3;order:3}.ant-col-sm-2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:8.33333333%}.ant-col-sm-push-2{left:8.33333333%}.ant-col-sm-pull-2{right:8.33333333%}.ant-col-sm-offset-2{margin-left:8.33333333%}.ant-col-sm-order-2{-ms-flex-order:2;order:2}.ant-col-sm-1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:4.16666667%}.ant-col-sm-push-1{left:4.16666667%}.ant-col-sm-pull-1{right:4.16666667%}.ant-col-sm-offset-1{margin-left:4.16666667%}.ant-col-sm-order-1{-ms-flex-order:1;order:1}.ant-col-sm-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-sm-push-0{left:auto}.ant-col-sm-pull-0{right:auto}.ant-col-sm-offset-0{margin-left:0}.ant-col-sm-order-0{-ms-flex-order:0;order:0}}@media (min-width:768px){.ant-col-md-1,.ant-col-md-2,.ant-col-md-3,.ant-col-md-4,.ant-col-md-5,.ant-col-md-6,.ant-col-md-7,.ant-col-md-8,.ant-col-md-9,.ant-col-md-10,.ant-col-md-11,.ant-col-md-12,.ant-col-md-13,.ant-col-md-14,.ant-col-md-15,.ant-col-md-16,.ant-col-md-17,.ant-col-md-18,.ant-col-md-19,.ant-col-md-20,.ant-col-md-21,.ant-col-md-22,.ant-col-md-23,.ant-col-md-24{-ms-flex:0 0 auto;flex:0 0 auto;float:left}.ant-col-md-24{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%}.ant-col-md-push-24{left:100%}.ant-col-md-pull-24{right:100%}.ant-col-md-offset-24{margin-left:100%}.ant-col-md-order-24{-ms-flex-order:24;order:24}.ant-col-md-23{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:95.83333333%}.ant-col-md-push-23{left:95.83333333%}.ant-col-md-pull-23{right:95.83333333%}.ant-col-md-offset-23{margin-left:95.83333333%}.ant-col-md-order-23{-ms-flex-order:23;order:23}.ant-col-md-22{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:91.66666667%}.ant-col-md-push-22{left:91.66666667%}.ant-col-md-pull-22{right:91.66666667%}.ant-col-md-offset-22{margin-left:91.66666667%}.ant-col-md-order-22{-ms-flex-order:22;order:22}.ant-col-md-21{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:87.5%}.ant-col-md-push-21{left:87.5%}.ant-col-md-pull-21{right:87.5%}.ant-col-md-offset-21{margin-left:87.5%}.ant-col-md-order-21{-ms-flex-order:21;order:21}.ant-col-md-20{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:83.33333333%}.ant-col-md-push-20{left:83.33333333%}.ant-col-md-pull-20{right:83.33333333%}.ant-col-md-offset-20{margin-left:83.33333333%}.ant-col-md-order-20{-ms-flex-order:20;order:20}.ant-col-md-19{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:79.16666667%}.ant-col-md-push-19{left:79.16666667%}.ant-col-md-pull-19{right:79.16666667%}.ant-col-md-offset-19{margin-left:79.16666667%}.ant-col-md-order-19{-ms-flex-order:19;order:19}.ant-col-md-18{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:75%}.ant-col-md-push-18{left:75%}.ant-col-md-pull-18{right:75%}.ant-col-md-offset-18{margin-left:75%}.ant-col-md-order-18{-ms-flex-order:18;order:18}.ant-col-md-17{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:70.83333333%}.ant-col-md-push-17{left:70.83333333%}.ant-col-md-pull-17{right:70.83333333%}.ant-col-md-offset-17{margin-left:70.83333333%}.ant-col-md-order-17{-ms-flex-order:17;order:17}.ant-col-md-16{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:66.66666667%}.ant-col-md-push-16{left:66.66666667%}.ant-col-md-pull-16{right:66.66666667%}.ant-col-md-offset-16{margin-left:66.66666667%}.ant-col-md-order-16{-ms-flex-order:16;order:16}.ant-col-md-15{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:62.5%}.ant-col-md-push-15{left:62.5%}.ant-col-md-pull-15{right:62.5%}.ant-col-md-offset-15{margin-left:62.5%}.ant-col-md-order-15{-ms-flex-order:15;order:15}.ant-col-md-14{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:58.33333333%}.ant-col-md-push-14{left:58.33333333%}.ant-col-md-pull-14{right:58.33333333%}.ant-col-md-offset-14{margin-left:58.33333333%}.ant-col-md-order-14{-ms-flex-order:14;order:14}.ant-col-md-13{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:54.16666667%}.ant-col-md-push-13{left:54.16666667%}.ant-col-md-pull-13{right:54.16666667%}.ant-col-md-offset-13{margin-left:54.16666667%}.ant-col-md-order-13{-ms-flex-order:13;order:13}.ant-col-md-12{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:50%}.ant-col-md-push-12{left:50%}.ant-col-md-pull-12{right:50%}.ant-col-md-offset-12{margin-left:50%}.ant-col-md-order-12{-ms-flex-order:12;order:12}.ant-col-md-11{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:45.83333333%}.ant-col-md-push-11{left:45.83333333%}.ant-col-md-pull-11{right:45.83333333%}.ant-col-md-offset-11{margin-left:45.83333333%}.ant-col-md-order-11{-ms-flex-order:11;order:11}.ant-col-md-10{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:41.66666667%}.ant-col-md-push-10{left:41.66666667%}.ant-col-md-pull-10{right:41.66666667%}.ant-col-md-offset-10{margin-left:41.66666667%}.ant-col-md-order-10{-ms-flex-order:10;order:10}.ant-col-md-9{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:37.5%}.ant-col-md-push-9{left:37.5%}.ant-col-md-pull-9{right:37.5%}.ant-col-md-offset-9{margin-left:37.5%}.ant-col-md-order-9{-ms-flex-order:9;order:9}.ant-col-md-8{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:33.33333333%}.ant-col-md-push-8{left:33.33333333%}.ant-col-md-pull-8{right:33.33333333%}.ant-col-md-offset-8{margin-left:33.33333333%}.ant-col-md-order-8{-ms-flex-order:8;order:8}.ant-col-md-7{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:29.16666667%}.ant-col-md-push-7{left:29.16666667%}.ant-col-md-pull-7{right:29.16666667%}.ant-col-md-offset-7{margin-left:29.16666667%}.ant-col-md-order-7{-ms-flex-order:7;order:7}.ant-col-md-6{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:25%}.ant-col-md-push-6{left:25%}.ant-col-md-pull-6{right:25%}.ant-col-md-offset-6{margin-left:25%}.ant-col-md-order-6{-ms-flex-order:6;order:6}.ant-col-md-5{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:20.83333333%}.ant-col-md-push-5{left:20.83333333%}.ant-col-md-pull-5{right:20.83333333%}.ant-col-md-offset-5{margin-left:20.83333333%}.ant-col-md-order-5{-ms-flex-order:5;order:5}.ant-col-md-4{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:16.66666667%}.ant-col-md-push-4{left:16.66666667%}.ant-col-md-pull-4{right:16.66666667%}.ant-col-md-offset-4{margin-left:16.66666667%}.ant-col-md-order-4{-ms-flex-order:4;order:4}.ant-col-md-3{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:12.5%}.ant-col-md-push-3{left:12.5%}.ant-col-md-pull-3{right:12.5%}.ant-col-md-offset-3{margin-left:12.5%}.ant-col-md-order-3{-ms-flex-order:3;order:3}.ant-col-md-2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:8.33333333%}.ant-col-md-push-2{left:8.33333333%}.ant-col-md-pull-2{right:8.33333333%}.ant-col-md-offset-2{margin-left:8.33333333%}.ant-col-md-order-2{-ms-flex-order:2;order:2}.ant-col-md-1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:4.16666667%}.ant-col-md-push-1{left:4.16666667%}.ant-col-md-pull-1{right:4.16666667%}.ant-col-md-offset-1{margin-left:4.16666667%}.ant-col-md-order-1{-ms-flex-order:1;order:1}.ant-col-md-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-md-push-0{left:auto}.ant-col-md-pull-0{right:auto}.ant-col-md-offset-0{margin-left:0}.ant-col-md-order-0{-ms-flex-order:0;order:0}}@media (min-width:992px){.ant-col-lg-1,.ant-col-lg-2,.ant-col-lg-3,.ant-col-lg-4,.ant-col-lg-5,.ant-col-lg-6,.ant-col-lg-7,.ant-col-lg-8,.ant-col-lg-9,.ant-col-lg-10,.ant-col-lg-11,.ant-col-lg-12,.ant-col-lg-13,.ant-col-lg-14,.ant-col-lg-15,.ant-col-lg-16,.ant-col-lg-17,.ant-col-lg-18,.ant-col-lg-19,.ant-col-lg-20,.ant-col-lg-21,.ant-col-lg-22,.ant-col-lg-23,.ant-col-lg-24{-ms-flex:0 0 auto;flex:0 0 auto;float:left}.ant-col-lg-24{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%}.ant-col-lg-push-24{left:100%}.ant-col-lg-pull-24{right:100%}.ant-col-lg-offset-24{margin-left:100%}.ant-col-lg-order-24{-ms-flex-order:24;order:24}.ant-col-lg-23{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:95.83333333%}.ant-col-lg-push-23{left:95.83333333%}.ant-col-lg-pull-23{right:95.83333333%}.ant-col-lg-offset-23{margin-left:95.83333333%}.ant-col-lg-order-23{-ms-flex-order:23;order:23}.ant-col-lg-22{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:91.66666667%}.ant-col-lg-push-22{left:91.66666667%}.ant-col-lg-pull-22{right:91.66666667%}.ant-col-lg-offset-22{margin-left:91.66666667%}.ant-col-lg-order-22{-ms-flex-order:22;order:22}.ant-col-lg-21{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:87.5%}.ant-col-lg-push-21{left:87.5%}.ant-col-lg-pull-21{right:87.5%}.ant-col-lg-offset-21{margin-left:87.5%}.ant-col-lg-order-21{-ms-flex-order:21;order:21}.ant-col-lg-20{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:83.33333333%}.ant-col-lg-push-20{left:83.33333333%}.ant-col-lg-pull-20{right:83.33333333%}.ant-col-lg-offset-20{margin-left:83.33333333%}.ant-col-lg-order-20{-ms-flex-order:20;order:20}.ant-col-lg-19{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:79.16666667%}.ant-col-lg-push-19{left:79.16666667%}.ant-col-lg-pull-19{right:79.16666667%}.ant-col-lg-offset-19{margin-left:79.16666667%}.ant-col-lg-order-19{-ms-flex-order:19;order:19}.ant-col-lg-18{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:75%}.ant-col-lg-push-18{left:75%}.ant-col-lg-pull-18{right:75%}.ant-col-lg-offset-18{margin-left:75%}.ant-col-lg-order-18{-ms-flex-order:18;order:18}.ant-col-lg-17{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:70.83333333%}.ant-col-lg-push-17{left:70.83333333%}.ant-col-lg-pull-17{right:70.83333333%}.ant-col-lg-offset-17{margin-left:70.83333333%}.ant-col-lg-order-17{-ms-flex-order:17;order:17}.ant-col-lg-16{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:66.66666667%}.ant-col-lg-push-16{left:66.66666667%}.ant-col-lg-pull-16{right:66.66666667%}.ant-col-lg-offset-16{margin-left:66.66666667%}.ant-col-lg-order-16{-ms-flex-order:16;order:16}.ant-col-lg-15{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:62.5%}.ant-col-lg-push-15{left:62.5%}.ant-col-lg-pull-15{right:62.5%}.ant-col-lg-offset-15{margin-left:62.5%}.ant-col-lg-order-15{-ms-flex-order:15;order:15}.ant-col-lg-14{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:58.33333333%}.ant-col-lg-push-14{left:58.33333333%}.ant-col-lg-pull-14{right:58.33333333%}.ant-col-lg-offset-14{margin-left:58.33333333%}.ant-col-lg-order-14{-ms-flex-order:14;order:14}.ant-col-lg-13{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:54.16666667%}.ant-col-lg-push-13{left:54.16666667%}.ant-col-lg-pull-13{right:54.16666667%}.ant-col-lg-offset-13{margin-left:54.16666667%}.ant-col-lg-order-13{-ms-flex-order:13;order:13}.ant-col-lg-12{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:50%}.ant-col-lg-push-12{left:50%}.ant-col-lg-pull-12{right:50%}.ant-col-lg-offset-12{margin-left:50%}.ant-col-lg-order-12{-ms-flex-order:12;order:12}.ant-col-lg-11{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:45.83333333%}.ant-col-lg-push-11{left:45.83333333%}.ant-col-lg-pull-11{right:45.83333333%}.ant-col-lg-offset-11{margin-left:45.83333333%}.ant-col-lg-order-11{-ms-flex-order:11;order:11}.ant-col-lg-10{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:41.66666667%}.ant-col-lg-push-10{left:41.66666667%}.ant-col-lg-pull-10{right:41.66666667%}.ant-col-lg-offset-10{margin-left:41.66666667%}.ant-col-lg-order-10{-ms-flex-order:10;order:10}.ant-col-lg-9{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:37.5%}.ant-col-lg-push-9{left:37.5%}.ant-col-lg-pull-9{right:37.5%}.ant-col-lg-offset-9{margin-left:37.5%}.ant-col-lg-order-9{-ms-flex-order:9;order:9}.ant-col-lg-8{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:33.33333333%}.ant-col-lg-push-8{left:33.33333333%}.ant-col-lg-pull-8{right:33.33333333%}.ant-col-lg-offset-8{margin-left:33.33333333%}.ant-col-lg-order-8{-ms-flex-order:8;order:8}.ant-col-lg-7{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:29.16666667%}.ant-col-lg-push-7{left:29.16666667%}.ant-col-lg-pull-7{right:29.16666667%}.ant-col-lg-offset-7{margin-left:29.16666667%}.ant-col-lg-order-7{-ms-flex-order:7;order:7}.ant-col-lg-6{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:25%}.ant-col-lg-push-6{left:25%}.ant-col-lg-pull-6{right:25%}.ant-col-lg-offset-6{margin-left:25%}.ant-col-lg-order-6{-ms-flex-order:6;order:6}.ant-col-lg-5{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:20.83333333%}.ant-col-lg-push-5{left:20.83333333%}.ant-col-lg-pull-5{right:20.83333333%}.ant-col-lg-offset-5{margin-left:20.83333333%}.ant-col-lg-order-5{-ms-flex-order:5;order:5}.ant-col-lg-4{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:16.66666667%}.ant-col-lg-push-4{left:16.66666667%}.ant-col-lg-pull-4{right:16.66666667%}.ant-col-lg-offset-4{margin-left:16.66666667%}.ant-col-lg-order-4{-ms-flex-order:4;order:4}.ant-col-lg-3{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:12.5%}.ant-col-lg-push-3{left:12.5%}.ant-col-lg-pull-3{right:12.5%}.ant-col-lg-offset-3{margin-left:12.5%}.ant-col-lg-order-3{-ms-flex-order:3;order:3}.ant-col-lg-2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:8.33333333%}.ant-col-lg-push-2{left:8.33333333%}.ant-col-lg-pull-2{right:8.33333333%}.ant-col-lg-offset-2{margin-left:8.33333333%}.ant-col-lg-order-2{-ms-flex-order:2;order:2}.ant-col-lg-1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:4.16666667%}.ant-col-lg-push-1{left:4.16666667%}.ant-col-lg-pull-1{right:4.16666667%}.ant-col-lg-offset-1{margin-left:4.16666667%}.ant-col-lg-order-1{-ms-flex-order:1;order:1}.ant-col-lg-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-lg-push-0{left:auto}.ant-col-lg-pull-0{right:auto}.ant-col-lg-offset-0{margin-left:0}.ant-col-lg-order-0{-ms-flex-order:0;order:0}}@media (min-width:1200px){.ant-col-xl-1,.ant-col-xl-2,.ant-col-xl-3,.ant-col-xl-4,.ant-col-xl-5,.ant-col-xl-6,.ant-col-xl-7,.ant-col-xl-8,.ant-col-xl-9,.ant-col-xl-10,.ant-col-xl-11,.ant-col-xl-12,.ant-col-xl-13,.ant-col-xl-14,.ant-col-xl-15,.ant-col-xl-16,.ant-col-xl-17,.ant-col-xl-18,.ant-col-xl-19,.ant-col-xl-20,.ant-col-xl-21,.ant-col-xl-22,.ant-col-xl-23,.ant-col-xl-24{-ms-flex:0 0 auto;flex:0 0 auto;float:left}.ant-col-xl-24{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%}.ant-col-xl-push-24{left:100%}.ant-col-xl-pull-24{right:100%}.ant-col-xl-offset-24{margin-left:100%}.ant-col-xl-order-24{-ms-flex-order:24;order:24}.ant-col-xl-23{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:95.83333333%}.ant-col-xl-push-23{left:95.83333333%}.ant-col-xl-pull-23{right:95.83333333%}.ant-col-xl-offset-23{margin-left:95.83333333%}.ant-col-xl-order-23{-ms-flex-order:23;order:23}.ant-col-xl-22{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:91.66666667%}.ant-col-xl-push-22{left:91.66666667%}.ant-col-xl-pull-22{right:91.66666667%}.ant-col-xl-offset-22{margin-left:91.66666667%}.ant-col-xl-order-22{-ms-flex-order:22;order:22}.ant-col-xl-21{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:87.5%}.ant-col-xl-push-21{left:87.5%}.ant-col-xl-pull-21{right:87.5%}.ant-col-xl-offset-21{margin-left:87.5%}.ant-col-xl-order-21{-ms-flex-order:21;order:21}.ant-col-xl-20{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:83.33333333%}.ant-col-xl-push-20{left:83.33333333%}.ant-col-xl-pull-20{right:83.33333333%}.ant-col-xl-offset-20{margin-left:83.33333333%}.ant-col-xl-order-20{-ms-flex-order:20;order:20}.ant-col-xl-19{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:79.16666667%}.ant-col-xl-push-19{left:79.16666667%}.ant-col-xl-pull-19{right:79.16666667%}.ant-col-xl-offset-19{margin-left:79.16666667%}.ant-col-xl-order-19{-ms-flex-order:19;order:19}.ant-col-xl-18{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:75%}.ant-col-xl-push-18{left:75%}.ant-col-xl-pull-18{right:75%}.ant-col-xl-offset-18{margin-left:75%}.ant-col-xl-order-18{-ms-flex-order:18;order:18}.ant-col-xl-17{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:70.83333333%}.ant-col-xl-push-17{left:70.83333333%}.ant-col-xl-pull-17{right:70.83333333%}.ant-col-xl-offset-17{margin-left:70.83333333%}.ant-col-xl-order-17{-ms-flex-order:17;order:17}.ant-col-xl-16{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:66.66666667%}.ant-col-xl-push-16{left:66.66666667%}.ant-col-xl-pull-16{right:66.66666667%}.ant-col-xl-offset-16{margin-left:66.66666667%}.ant-col-xl-order-16{-ms-flex-order:16;order:16}.ant-col-xl-15{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:62.5%}.ant-col-xl-push-15{left:62.5%}.ant-col-xl-pull-15{right:62.5%}.ant-col-xl-offset-15{margin-left:62.5%}.ant-col-xl-order-15{-ms-flex-order:15;order:15}.ant-col-xl-14{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:58.33333333%}.ant-col-xl-push-14{left:58.33333333%}.ant-col-xl-pull-14{right:58.33333333%}.ant-col-xl-offset-14{margin-left:58.33333333%}.ant-col-xl-order-14{-ms-flex-order:14;order:14}.ant-col-xl-13{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:54.16666667%}.ant-col-xl-push-13{left:54.16666667%}.ant-col-xl-pull-13{right:54.16666667%}.ant-col-xl-offset-13{margin-left:54.16666667%}.ant-col-xl-order-13{-ms-flex-order:13;order:13}.ant-col-xl-12{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:50%}.ant-col-xl-push-12{left:50%}.ant-col-xl-pull-12{right:50%}.ant-col-xl-offset-12{margin-left:50%}.ant-col-xl-order-12{-ms-flex-order:12;order:12}.ant-col-xl-11{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:45.83333333%}.ant-col-xl-push-11{left:45.83333333%}.ant-col-xl-pull-11{right:45.83333333%}.ant-col-xl-offset-11{margin-left:45.83333333%}.ant-col-xl-order-11{-ms-flex-order:11;order:11}.ant-col-xl-10{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:41.66666667%}.ant-col-xl-push-10{left:41.66666667%}.ant-col-xl-pull-10{right:41.66666667%}.ant-col-xl-offset-10{margin-left:41.66666667%}.ant-col-xl-order-10{-ms-flex-order:10;order:10}.ant-col-xl-9{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:37.5%}.ant-col-xl-push-9{left:37.5%}.ant-col-xl-pull-9{right:37.5%}.ant-col-xl-offset-9{margin-left:37.5%}.ant-col-xl-order-9{-ms-flex-order:9;order:9}.ant-col-xl-8{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:33.33333333%}.ant-col-xl-push-8{left:33.33333333%}.ant-col-xl-pull-8{right:33.33333333%}.ant-col-xl-offset-8{margin-left:33.33333333%}.ant-col-xl-order-8{-ms-flex-order:8;order:8}.ant-col-xl-7{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:29.16666667%}.ant-col-xl-push-7{left:29.16666667%}.ant-col-xl-pull-7{right:29.16666667%}.ant-col-xl-offset-7{margin-left:29.16666667%}.ant-col-xl-order-7{-ms-flex-order:7;order:7}.ant-col-xl-6{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:25%}.ant-col-xl-push-6{left:25%}.ant-col-xl-pull-6{right:25%}.ant-col-xl-offset-6{margin-left:25%}.ant-col-xl-order-6{-ms-flex-order:6;order:6}.ant-col-xl-5{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:20.83333333%}.ant-col-xl-push-5{left:20.83333333%}.ant-col-xl-pull-5{right:20.83333333%}.ant-col-xl-offset-5{margin-left:20.83333333%}.ant-col-xl-order-5{-ms-flex-order:5;order:5}.ant-col-xl-4{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:16.66666667%}.ant-col-xl-push-4{left:16.66666667%}.ant-col-xl-pull-4{right:16.66666667%}.ant-col-xl-offset-4{margin-left:16.66666667%}.ant-col-xl-order-4{-ms-flex-order:4;order:4}.ant-col-xl-3{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:12.5%}.ant-col-xl-push-3{left:12.5%}.ant-col-xl-pull-3{right:12.5%}.ant-col-xl-offset-3{margin-left:12.5%}.ant-col-xl-order-3{-ms-flex-order:3;order:3}.ant-col-xl-2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:8.33333333%}.ant-col-xl-push-2{left:8.33333333%}.ant-col-xl-pull-2{right:8.33333333%}.ant-col-xl-offset-2{margin-left:8.33333333%}.ant-col-xl-order-2{-ms-flex-order:2;order:2}.ant-col-xl-1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:4.16666667%}.ant-col-xl-push-1{left:4.16666667%}.ant-col-xl-pull-1{right:4.16666667%}.ant-col-xl-offset-1{margin-left:4.16666667%}.ant-col-xl-order-1{-ms-flex-order:1;order:1}.ant-col-xl-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-xl-push-0{left:auto}.ant-col-xl-pull-0{right:auto}.ant-col-xl-offset-0{margin-left:0}.ant-col-xl-order-0{-ms-flex-order:0;order:0}}@media (min-width:1600px){.ant-col-xxl-1,.ant-col-xxl-2,.ant-col-xxl-3,.ant-col-xxl-4,.ant-col-xxl-5,.ant-col-xxl-6,.ant-col-xxl-7,.ant-col-xxl-8,.ant-col-xxl-9,.ant-col-xxl-10,.ant-col-xxl-11,.ant-col-xxl-12,.ant-col-xxl-13,.ant-col-xxl-14,.ant-col-xxl-15,.ant-col-xxl-16,.ant-col-xxl-17,.ant-col-xxl-18,.ant-col-xxl-19,.ant-col-xxl-20,.ant-col-xxl-21,.ant-col-xxl-22,.ant-col-xxl-23,.ant-col-xxl-24{-ms-flex:0 0 auto;flex:0 0 auto;float:left}.ant-col-xxl-24{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%}.ant-col-xxl-push-24{left:100%}.ant-col-xxl-pull-24{right:100%}.ant-col-xxl-offset-24{margin-left:100%}.ant-col-xxl-order-24{-ms-flex-order:24;order:24}.ant-col-xxl-23{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:95.83333333%}.ant-col-xxl-push-23{left:95.83333333%}.ant-col-xxl-pull-23{right:95.83333333%}.ant-col-xxl-offset-23{margin-left:95.83333333%}.ant-col-xxl-order-23{-ms-flex-order:23;order:23}.ant-col-xxl-22{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:91.66666667%}.ant-col-xxl-push-22{left:91.66666667%}.ant-col-xxl-pull-22{right:91.66666667%}.ant-col-xxl-offset-22{margin-left:91.66666667%}.ant-col-xxl-order-22{-ms-flex-order:22;order:22}.ant-col-xxl-21{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:87.5%}.ant-col-xxl-push-21{left:87.5%}.ant-col-xxl-pull-21{right:87.5%}.ant-col-xxl-offset-21{margin-left:87.5%}.ant-col-xxl-order-21{-ms-flex-order:21;order:21}.ant-col-xxl-20{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:83.33333333%}.ant-col-xxl-push-20{left:83.33333333%}.ant-col-xxl-pull-20{right:83.33333333%}.ant-col-xxl-offset-20{margin-left:83.33333333%}.ant-col-xxl-order-20{-ms-flex-order:20;order:20}.ant-col-xxl-19{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:79.16666667%}.ant-col-xxl-push-19{left:79.16666667%}.ant-col-xxl-pull-19{right:79.16666667%}.ant-col-xxl-offset-19{margin-left:79.16666667%}.ant-col-xxl-order-19{-ms-flex-order:19;order:19}.ant-col-xxl-18{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:75%}.ant-col-xxl-push-18{left:75%}.ant-col-xxl-pull-18{right:75%}.ant-col-xxl-offset-18{margin-left:75%}.ant-col-xxl-order-18{-ms-flex-order:18;order:18}.ant-col-xxl-17{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:70.83333333%}.ant-col-xxl-push-17{left:70.83333333%}.ant-col-xxl-pull-17{right:70.83333333%}.ant-col-xxl-offset-17{margin-left:70.83333333%}.ant-col-xxl-order-17{-ms-flex-order:17;order:17}.ant-col-xxl-16{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:66.66666667%}.ant-col-xxl-push-16{left:66.66666667%}.ant-col-xxl-pull-16{right:66.66666667%}.ant-col-xxl-offset-16{margin-left:66.66666667%}.ant-col-xxl-order-16{-ms-flex-order:16;order:16}.ant-col-xxl-15{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:62.5%}.ant-col-xxl-push-15{left:62.5%}.ant-col-xxl-pull-15{right:62.5%}.ant-col-xxl-offset-15{margin-left:62.5%}.ant-col-xxl-order-15{-ms-flex-order:15;order:15}.ant-col-xxl-14{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:58.33333333%}.ant-col-xxl-push-14{left:58.33333333%}.ant-col-xxl-pull-14{right:58.33333333%}.ant-col-xxl-offset-14{margin-left:58.33333333%}.ant-col-xxl-order-14{-ms-flex-order:14;order:14}.ant-col-xxl-13{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:54.16666667%}.ant-col-xxl-push-13{left:54.16666667%}.ant-col-xxl-pull-13{right:54.16666667%}.ant-col-xxl-offset-13{margin-left:54.16666667%}.ant-col-xxl-order-13{-ms-flex-order:13;order:13}.ant-col-xxl-12{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:50%}.ant-col-xxl-push-12{left:50%}.ant-col-xxl-pull-12{right:50%}.ant-col-xxl-offset-12{margin-left:50%}.ant-col-xxl-order-12{-ms-flex-order:12;order:12}.ant-col-xxl-11{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:45.83333333%}.ant-col-xxl-push-11{left:45.83333333%}.ant-col-xxl-pull-11{right:45.83333333%}.ant-col-xxl-offset-11{margin-left:45.83333333%}.ant-col-xxl-order-11{-ms-flex-order:11;order:11}.ant-col-xxl-10{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:41.66666667%}.ant-col-xxl-push-10{left:41.66666667%}.ant-col-xxl-pull-10{right:41.66666667%}.ant-col-xxl-offset-10{margin-left:41.66666667%}.ant-col-xxl-order-10{-ms-flex-order:10;order:10}.ant-col-xxl-9{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:37.5%}.ant-col-xxl-push-9{left:37.5%}.ant-col-xxl-pull-9{right:37.5%}.ant-col-xxl-offset-9{margin-left:37.5%}.ant-col-xxl-order-9{-ms-flex-order:9;order:9}.ant-col-xxl-8{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:33.33333333%}.ant-col-xxl-push-8{left:33.33333333%}.ant-col-xxl-pull-8{right:33.33333333%}.ant-col-xxl-offset-8{margin-left:33.33333333%}.ant-col-xxl-order-8{-ms-flex-order:8;order:8}.ant-col-xxl-7{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:29.16666667%}.ant-col-xxl-push-7{left:29.16666667%}.ant-col-xxl-pull-7{right:29.16666667%}.ant-col-xxl-offset-7{margin-left:29.16666667%}.ant-col-xxl-order-7{-ms-flex-order:7;order:7}.ant-col-xxl-6{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:25%}.ant-col-xxl-push-6{left:25%}.ant-col-xxl-pull-6{right:25%}.ant-col-xxl-offset-6{margin-left:25%}.ant-col-xxl-order-6{-ms-flex-order:6;order:6}.ant-col-xxl-5{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:20.83333333%}.ant-col-xxl-push-5{left:20.83333333%}.ant-col-xxl-pull-5{right:20.83333333%}.ant-col-xxl-offset-5{margin-left:20.83333333%}.ant-col-xxl-order-5{-ms-flex-order:5;order:5}.ant-col-xxl-4{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:16.66666667%}.ant-col-xxl-push-4{left:16.66666667%}.ant-col-xxl-pull-4{right:16.66666667%}.ant-col-xxl-offset-4{margin-left:16.66666667%}.ant-col-xxl-order-4{-ms-flex-order:4;order:4}.ant-col-xxl-3{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:12.5%}.ant-col-xxl-push-3{left:12.5%}.ant-col-xxl-pull-3{right:12.5%}.ant-col-xxl-offset-3{margin-left:12.5%}.ant-col-xxl-order-3{-ms-flex-order:3;order:3}.ant-col-xxl-2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:8.33333333%}.ant-col-xxl-push-2{left:8.33333333%}.ant-col-xxl-pull-2{right:8.33333333%}.ant-col-xxl-offset-2{margin-left:8.33333333%}.ant-col-xxl-order-2{-ms-flex-order:2;order:2}.ant-col-xxl-1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:4.16666667%}.ant-col-xxl-push-1{left:4.16666667%}.ant-col-xxl-pull-1{right:4.16666667%}.ant-col-xxl-offset-1{margin-left:4.16666667%}.ant-col-xxl-order-1{-ms-flex-order:1;order:1}.ant-col-xxl-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-xxl-push-0{left:auto}.ant-col-xxl-pull-0{right:auto}.ant-col-xxl-offset-0{margin-left:0}.ant-col-xxl-order-0{-ms-flex-order:0;order:0}}", "", {"version":3,"sources":["/Users/hs/forgeplus-react/node_modules/antd/lib/grid/style/index.css"],"names":[],"mappings":"AAIA,SACE,kBAAmB,AACnB,YAAa,AACb,eAAgB,AAChB,cAAe,AACf,OAAQ,AACR,cAAe,AACf,8BAA+B,AACvB,qBAAuB,CAChC,AACD,+BAEE,cAAe,AACf,UAAY,CACb,AACD,eACE,UAAY,CACb,AACD,cAGE,uBAAwB,AACxB,kBAAoB,CACrB,AACD,uDALE,oBAAqB,AACrB,YAAc,CAQf,AACD,oBACE,oBAAqB,AACjB,0BAA4B,CACjC,AACD,qBACE,qBAAsB,AAClB,sBAAwB,CAC7B,AACD,kBACE,kBAAmB,AACf,wBAA0B,CAC/B,AACD,4BACE,sBAAuB,AACnB,6BAA+B,CACpC,AACD,2BACE,yBAA0B,AACtB,4BAA8B,CACnC,AACD,kBACE,qBAAsB,AAClB,sBAAwB,CAC7B,AACD,qBACE,sBAAuB,AACnB,kBAAoB,CACzB,AACD,qBACE,mBAAoB,AAChB,oBAAsB,CAC3B,AACD,SACE,kBAAmB,AACnB,cAAgB,CACjB,AACD,mpDAwHE,kBAAmB,AACnB,gBAAiB,AACjB,cAAgB,CACjB,AACD,uRAwBE,kBAAmB,AACf,cAAe,AACnB,UAAY,CACb,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,UAAY,CACb,AACD,iBACE,SAAW,CACZ,AACD,iBACE,UAAY,CACb,AACD,mBACE,gBAAkB,CACnB,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,iBACE,iBAAmB,CACpB,AACD,iBACE,kBAAoB,CACrB,AACD,mBACE,wBAA0B,CAC3B,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,iBACE,iBAAmB,CACpB,AACD,iBACE,kBAAoB,CACrB,AACD,mBACE,wBAA0B,CAC3B,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,iBACE,UAAY,CACb,AACD,iBACE,WAAa,CACd,AACD,mBACE,iBAAmB,CACpB,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,iBACE,iBAAmB,CACpB,AACD,iBACE,kBAAoB,CACrB,AACD,mBACE,wBAA0B,CAC3B,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,iBACE,iBAAmB,CACpB,AACD,iBACE,kBAAoB,CACrB,AACD,mBACE,wBAA0B,CAC3B,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,iBACE,QAAU,CACX,AACD,iBACE,SAAW,CACZ,AACD,mBACE,eAAiB,CAClB,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,iBACE,iBAAmB,CACpB,AACD,iBACE,kBAAoB,CACrB,AACD,mBACE,wBAA0B,CAC3B,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,iBACE,iBAAmB,CACpB,AACD,iBACE,kBAAoB,CACrB,AACD,mBACE,wBAA0B,CAC3B,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,iBACE,UAAY,CACb,AACD,iBACE,WAAa,CACd,AACD,mBACE,iBAAmB,CACpB,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,iBACE,iBAAmB,CACpB,AACD,iBACE,kBAAoB,CACrB,AACD,mBACE,wBAA0B,CAC3B,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,iBACE,iBAAmB,CACpB,AACD,iBACE,kBAAoB,CACrB,AACD,mBACE,wBAA0B,CAC3B,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,iBACE,QAAU,CACX,AACD,iBACE,SAAW,CACZ,AACD,mBACE,eAAiB,CAClB,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,iBACE,iBAAmB,CACpB,AACD,iBACE,kBAAoB,CACrB,AACD,mBACE,wBAA0B,CAC3B,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,YACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,iBACE,iBAAmB,CACpB,AACD,iBACE,kBAAoB,CACrB,AACD,mBACE,wBAA0B,CAC3B,AACD,kBACE,kBAAmB,AACf,QAAU,CACf,AACD,WACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,gBACE,UAAY,CACb,AACD,gBACE,WAAa,CACd,AACD,kBACE,iBAAmB,CACpB,AACD,iBACE,iBAAkB,AACd,OAAS,CACd,AACD,WACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,gBACE,iBAAmB,CACpB,AACD,gBACE,kBAAoB,CACrB,AACD,kBACE,wBAA0B,CAC3B,AACD,iBACE,iBAAkB,AACd,OAAS,CACd,AACD,WACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,gBACE,iBAAmB,CACpB,AACD,gBACE,kBAAoB,CACrB,AACD,kBACE,wBAA0B,CAC3B,AACD,iBACE,iBAAkB,AACd,OAAS,CACd,AACD,WACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,gBACE,QAAU,CACX,AACD,gBACE,SAAW,CACZ,AACD,kBACE,eAAiB,CAClB,AACD,iBACE,iBAAkB,AACd,OAAS,CACd,AACD,WACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,gBACE,iBAAmB,CACpB,AACD,gBACE,kBAAoB,CACrB,AACD,kBACE,wBAA0B,CAC3B,AACD,iBACE,iBAAkB,AACd,OAAS,CACd,AACD,WACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,gBACE,iBAAmB,CACpB,AACD,gBACE,kBAAoB,CACrB,AACD,kBACE,wBAA0B,CAC3B,AACD,iBACE,iBAAkB,AACd,OAAS,CACd,AACD,WACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,gBACE,UAAY,CACb,AACD,gBACE,WAAa,CACd,AACD,kBACE,iBAAmB,CACpB,AACD,iBACE,iBAAkB,AACd,OAAS,CACd,AACD,WACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAmB,CACpB,AACD,gBACE,gBAAkB,CACnB,AACD,gBACE,iBAAmB,CACpB,AACD,kBACE,uBAAyB,CAC1B,AACD,iBACE,iBAAkB,AACd,OAAS,CACd,AACD,WACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAmB,CACpB,AACD,gBACE,gBAAkB,CACnB,AACD,gBACE,iBAAmB,CACpB,AACD,kBACE,uBAAyB,CAC1B,AACD,iBACE,iBAAkB,AACd,OAAS,CACd,AACD,WACE,YAAc,CACf,AAaD,kBACE,aAAe,CAChB,AACD,iBACE,iBAAkB,AACd,OAAS,CACd,AACD,+VAwBE,kBAAmB,AACf,cAAe,AACnB,UAAY,CACb,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,UAAY,CACb,AACD,oBACE,SAAW,CACZ,AACD,oBACE,UAAY,CACb,AACD,sBACE,gBAAkB,CACnB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,oBACE,UAAY,CACb,AACD,oBACE,WAAa,CACd,AACD,sBACE,iBAAmB,CACpB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,oBACE,QAAU,CACX,AACD,oBACE,SAAW,CACZ,AACD,sBACE,eAAiB,CAClB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,oBACE,UAAY,CACb,AACD,oBACE,WAAa,CACd,AACD,sBACE,iBAAmB,CACpB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,oBACE,QAAU,CACX,AACD,oBACE,SAAW,CACZ,AACD,sBACE,eAAiB,CAClB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,mBACE,UAAY,CACb,AACD,mBACE,WAAa,CACd,AACD,qBACE,iBAAmB,CACpB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,mBACE,QAAU,CACX,AACD,mBACE,SAAW,CACZ,AACD,qBACE,eAAiB,CAClB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,mBACE,UAAY,CACb,AACD,mBACE,WAAa,CACd,AACD,qBACE,iBAAmB,CACpB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAmB,CACpB,AACD,mBACE,gBAAkB,CACnB,AACD,mBACE,iBAAmB,CACpB,AACD,qBACE,uBAAyB,CAC1B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAmB,CACpB,AACD,mBACE,gBAAkB,CACnB,AACD,mBACE,iBAAmB,CACpB,AACD,qBACE,uBAAyB,CAC1B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,YAAc,CACf,AACD,gBACE,SAAW,CACZ,AACD,gBACE,UAAY,CACb,AACD,mBACE,SAAW,CACZ,AACD,mBACE,UAAY,CACb,AACD,qBACE,aAAe,CAChB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,yBACE,+VAwBE,kBAAmB,AACf,cAAe,AACnB,UAAY,CACb,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,UAAY,CACb,AACD,oBACE,SAAW,CACZ,AACD,oBACE,UAAY,CACb,AACD,sBACE,gBAAkB,CACnB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,oBACE,UAAY,CACb,AACD,oBACE,WAAa,CACd,AACD,sBACE,iBAAmB,CACpB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,oBACE,QAAU,CACX,AACD,oBACE,SAAW,CACZ,AACD,sBACE,eAAiB,CAClB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,oBACE,UAAY,CACb,AACD,oBACE,WAAa,CACd,AACD,sBACE,iBAAmB,CACpB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,oBACE,QAAU,CACX,AACD,oBACE,SAAW,CACZ,AACD,sBACE,eAAiB,CAClB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,mBACE,UAAY,CACb,AACD,mBACE,WAAa,CACd,AACD,qBACE,iBAAmB,CACpB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,mBACE,QAAU,CACX,AACD,mBACE,SAAW,CACZ,AACD,qBACE,eAAiB,CAClB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,mBACE,UAAY,CACb,AACD,mBACE,WAAa,CACd,AACD,qBACE,iBAAmB,CACpB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAmB,CACpB,AACD,mBACE,gBAAkB,CACnB,AACD,mBACE,iBAAmB,CACpB,AACD,qBACE,uBAAyB,CAC1B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAmB,CACpB,AACD,mBACE,gBAAkB,CACnB,AACD,mBACE,iBAAmB,CACpB,AACD,qBACE,uBAAyB,CAC1B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,YAAc,CACf,AACD,gBACE,SAAW,CACZ,AACD,gBACE,UAAY,CACb,AACD,mBACE,SAAW,CACZ,AACD,mBACE,UAAY,CACb,AACD,qBACE,aAAe,CAChB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,CACF,AACD,yBACE,+VAwBE,kBAAmB,AACf,cAAe,AACnB,UAAY,CACb,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,UAAY,CACb,AACD,oBACE,SAAW,CACZ,AACD,oBACE,UAAY,CACb,AACD,sBACE,gBAAkB,CACnB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,oBACE,UAAY,CACb,AACD,oBACE,WAAa,CACd,AACD,sBACE,iBAAmB,CACpB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,oBACE,QAAU,CACX,AACD,oBACE,SAAW,CACZ,AACD,sBACE,eAAiB,CAClB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,oBACE,UAAY,CACb,AACD,oBACE,WAAa,CACd,AACD,sBACE,iBAAmB,CACpB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,oBACE,QAAU,CACX,AACD,oBACE,SAAW,CACZ,AACD,sBACE,eAAiB,CAClB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,mBACE,UAAY,CACb,AACD,mBACE,WAAa,CACd,AACD,qBACE,iBAAmB,CACpB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,mBACE,QAAU,CACX,AACD,mBACE,SAAW,CACZ,AACD,qBACE,eAAiB,CAClB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,mBACE,UAAY,CACb,AACD,mBACE,WAAa,CACd,AACD,qBACE,iBAAmB,CACpB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAmB,CACpB,AACD,mBACE,gBAAkB,CACnB,AACD,mBACE,iBAAmB,CACpB,AACD,qBACE,uBAAyB,CAC1B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAmB,CACpB,AACD,mBACE,gBAAkB,CACnB,AACD,mBACE,iBAAmB,CACpB,AACD,qBACE,uBAAyB,CAC1B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,YAAc,CACf,AACD,gBACE,SAAW,CACZ,AACD,gBACE,UAAY,CACb,AACD,mBACE,SAAW,CACZ,AACD,mBACE,UAAY,CACb,AACD,qBACE,aAAe,CAChB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,CACF,AACD,yBACE,+VAwBE,kBAAmB,AACf,cAAe,AACnB,UAAY,CACb,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,UAAY,CACb,AACD,oBACE,SAAW,CACZ,AACD,oBACE,UAAY,CACb,AACD,sBACE,gBAAkB,CACnB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,oBACE,UAAY,CACb,AACD,oBACE,WAAa,CACd,AACD,sBACE,iBAAmB,CACpB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,oBACE,QAAU,CACX,AACD,oBACE,SAAW,CACZ,AACD,sBACE,eAAiB,CAClB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,oBACE,UAAY,CACb,AACD,oBACE,WAAa,CACd,AACD,sBACE,iBAAmB,CACpB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,oBACE,QAAU,CACX,AACD,oBACE,SAAW,CACZ,AACD,sBACE,eAAiB,CAClB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,mBACE,UAAY,CACb,AACD,mBACE,WAAa,CACd,AACD,qBACE,iBAAmB,CACpB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,mBACE,QAAU,CACX,AACD,mBACE,SAAW,CACZ,AACD,qBACE,eAAiB,CAClB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,mBACE,UAAY,CACb,AACD,mBACE,WAAa,CACd,AACD,qBACE,iBAAmB,CACpB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAmB,CACpB,AACD,mBACE,gBAAkB,CACnB,AACD,mBACE,iBAAmB,CACpB,AACD,qBACE,uBAAyB,CAC1B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAmB,CACpB,AACD,mBACE,gBAAkB,CACnB,AACD,mBACE,iBAAmB,CACpB,AACD,qBACE,uBAAyB,CAC1B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,YAAc,CACf,AACD,gBACE,SAAW,CACZ,AACD,gBACE,UAAY,CACb,AACD,mBACE,SAAW,CACZ,AACD,mBACE,UAAY,CACb,AACD,qBACE,aAAe,CAChB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,CACF,AACD,0BACE,+VAwBE,kBAAmB,AACf,cAAe,AACnB,UAAY,CACb,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,UAAY,CACb,AACD,oBACE,SAAW,CACZ,AACD,oBACE,UAAY,CACb,AACD,sBACE,gBAAkB,CACnB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,oBACE,UAAY,CACb,AACD,oBACE,WAAa,CACd,AACD,sBACE,iBAAmB,CACpB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,oBACE,QAAU,CACX,AACD,oBACE,SAAW,CACZ,AACD,sBACE,eAAiB,CAClB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,oBACE,UAAY,CACb,AACD,oBACE,WAAa,CACd,AACD,sBACE,iBAAmB,CACpB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,oBACE,QAAU,CACX,AACD,oBACE,SAAW,CACZ,AACD,sBACE,eAAiB,CAClB,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,kBAAmB,AACf,QAAU,CACf,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,mBACE,UAAY,CACb,AACD,mBACE,WAAa,CACd,AACD,qBACE,iBAAmB,CACpB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,mBACE,QAAU,CACX,AACD,mBACE,SAAW,CACZ,AACD,qBACE,eAAiB,CAClB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,mBACE,iBAAmB,CACpB,AACD,mBACE,kBAAoB,CACrB,AACD,qBACE,wBAA0B,CAC3B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,mBACE,UAAY,CACb,AACD,mBACE,WAAa,CACd,AACD,qBACE,iBAAmB,CACpB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAmB,CACpB,AACD,mBACE,gBAAkB,CACnB,AACD,mBACE,iBAAmB,CACpB,AACD,qBACE,uBAAyB,CAC1B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAmB,CACpB,AACD,mBACE,gBAAkB,CACnB,AACD,mBACE,iBAAmB,CACpB,AACD,qBACE,uBAAyB,CAC1B,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,AACD,cACE,YAAc,CACf,AACD,gBACE,SAAW,CACZ,AACD,gBACE,UAAY,CACb,AACD,mBACE,SAAW,CACZ,AACD,mBACE,UAAY,CACb,AACD,qBACE,aAAe,CAChB,AACD,oBACE,iBAAkB,AACd,OAAS,CACd,CACF,AACD,0BACE,uXAwBE,kBAAmB,AACf,cAAe,AACnB,UAAY,CACb,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,UAAY,CACb,AACD,qBACE,SAAW,CACZ,AACD,qBACE,UAAY,CACb,AACD,uBACE,gBAAkB,CACnB,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,qBACE,iBAAmB,CACpB,AACD,qBACE,kBAAoB,CACrB,AACD,uBACE,wBAA0B,CAC3B,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,qBACE,iBAAmB,CACpB,AACD,qBACE,kBAAoB,CACrB,AACD,uBACE,wBAA0B,CAC3B,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,qBACE,UAAY,CACb,AACD,qBACE,WAAa,CACd,AACD,uBACE,iBAAmB,CACpB,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,qBACE,iBAAmB,CACpB,AACD,qBACE,kBAAoB,CACrB,AACD,uBACE,wBAA0B,CAC3B,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,qBACE,iBAAmB,CACpB,AACD,qBACE,kBAAoB,CACrB,AACD,uBACE,wBAA0B,CAC3B,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,qBACE,QAAU,CACX,AACD,qBACE,SAAW,CACZ,AACD,uBACE,eAAiB,CAClB,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,qBACE,iBAAmB,CACpB,AACD,qBACE,kBAAoB,CACrB,AACD,uBACE,wBAA0B,CAC3B,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,qBACE,iBAAmB,CACpB,AACD,qBACE,kBAAoB,CACrB,AACD,uBACE,wBAA0B,CAC3B,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,qBACE,UAAY,CACb,AACD,qBACE,WAAa,CACd,AACD,uBACE,iBAAmB,CACpB,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,qBACE,iBAAmB,CACpB,AACD,qBACE,kBAAoB,CACrB,AACD,uBACE,wBAA0B,CAC3B,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,qBACE,iBAAmB,CACpB,AACD,qBACE,kBAAoB,CACrB,AACD,uBACE,wBAA0B,CAC3B,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,qBACE,QAAU,CACX,AACD,qBACE,SAAW,CACZ,AACD,uBACE,eAAiB,CAClB,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,qBACE,iBAAmB,CACpB,AACD,qBACE,kBAAoB,CACrB,AACD,uBACE,wBAA0B,CAC3B,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,gBACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,qBACE,iBAAmB,CACpB,AACD,qBACE,kBAAoB,CACrB,AACD,uBACE,wBAA0B,CAC3B,AACD,sBACE,kBAAmB,AACf,QAAU,CACf,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,oBACE,UAAY,CACb,AACD,oBACE,WAAa,CACd,AACD,sBACE,iBAAmB,CACpB,AACD,qBACE,iBAAkB,AACd,OAAS,CACd,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,iBAAkB,AACd,OAAS,CACd,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,iBAAkB,AACd,OAAS,CACd,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,SAAW,CACZ,AACD,oBACE,QAAU,CACX,AACD,oBACE,SAAW,CACZ,AACD,sBACE,eAAiB,CAClB,AACD,qBACE,iBAAkB,AACd,OAAS,CACd,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,iBAAkB,AACd,OAAS,CACd,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,kBAAoB,CACrB,AACD,oBACE,iBAAmB,CACpB,AACD,oBACE,kBAAoB,CACrB,AACD,sBACE,wBAA0B,CAC3B,AACD,qBACE,iBAAkB,AACd,OAAS,CACd,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,WAAa,CACd,AACD,oBACE,UAAY,CACb,AACD,oBACE,WAAa,CACd,AACD,sBACE,iBAAmB,CACpB,AACD,qBACE,iBAAkB,AACd,OAAS,CACd,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAmB,CACpB,AACD,oBACE,gBAAkB,CACnB,AACD,oBACE,iBAAmB,CACpB,AACD,sBACE,uBAAyB,CAC1B,AACD,qBACE,iBAAkB,AACd,OAAS,CACd,AACD,eACE,cAAe,AACf,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAmB,CACpB,AACD,oBACE,gBAAkB,CACnB,AACD,oBACE,iBAAmB,CACpB,AACD,sBACE,uBAAyB,CAC1B,AACD,qBACE,iBAAkB,AACd,OAAS,CACd,AACD,eACE,YAAc,CACf,AACD,gBACE,SAAW,CACZ,AACD,gBACE,UAAY,CACb,AACD,oBACE,SAAW,CACZ,AACD,oBACE,UAAY,CACb,AACD,sBACE,aAAe,CAChB,AACD,qBACE,iBAAkB,AACd,OAAS,CACd,CACF","file":"index.css","sourcesContent":["/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.ant-row {\n position: relative;\n height: auto;\n margin-right: 0;\n margin-left: 0;\n zoom: 1;\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ant-row::before,\n.ant-row::after {\n display: table;\n content: '';\n}\n.ant-row::after {\n clear: both;\n}\n.ant-row-flex {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-flow: row wrap;\n flex-flow: row wrap;\n}\n.ant-row-flex::before,\n.ant-row-flex::after {\n display: -ms-flexbox;\n display: flex;\n}\n.ant-row-flex-start {\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n.ant-row-flex-center {\n -ms-flex-pack: center;\n justify-content: center;\n}\n.ant-row-flex-end {\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n.ant-row-flex-space-between {\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.ant-row-flex-space-around {\n -ms-flex-pack: distribute;\n justify-content: space-around;\n}\n.ant-row-flex-top {\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.ant-row-flex-middle {\n -ms-flex-align: center;\n align-items: center;\n}\n.ant-row-flex-bottom {\n -ms-flex-align: end;\n align-items: flex-end;\n}\n.ant-col {\n position: relative;\n min-height: 1px;\n}\n.ant-col-1,\n.ant-col-xs-1,\n.ant-col-sm-1,\n.ant-col-md-1,\n.ant-col-lg-1,\n.ant-col-2,\n.ant-col-xs-2,\n.ant-col-sm-2,\n.ant-col-md-2,\n.ant-col-lg-2,\n.ant-col-3,\n.ant-col-xs-3,\n.ant-col-sm-3,\n.ant-col-md-3,\n.ant-col-lg-3,\n.ant-col-4,\n.ant-col-xs-4,\n.ant-col-sm-4,\n.ant-col-md-4,\n.ant-col-lg-4,\n.ant-col-5,\n.ant-col-xs-5,\n.ant-col-sm-5,\n.ant-col-md-5,\n.ant-col-lg-5,\n.ant-col-6,\n.ant-col-xs-6,\n.ant-col-sm-6,\n.ant-col-md-6,\n.ant-col-lg-6,\n.ant-col-7,\n.ant-col-xs-7,\n.ant-col-sm-7,\n.ant-col-md-7,\n.ant-col-lg-7,\n.ant-col-8,\n.ant-col-xs-8,\n.ant-col-sm-8,\n.ant-col-md-8,\n.ant-col-lg-8,\n.ant-col-9,\n.ant-col-xs-9,\n.ant-col-sm-9,\n.ant-col-md-9,\n.ant-col-lg-9,\n.ant-col-10,\n.ant-col-xs-10,\n.ant-col-sm-10,\n.ant-col-md-10,\n.ant-col-lg-10,\n.ant-col-11,\n.ant-col-xs-11,\n.ant-col-sm-11,\n.ant-col-md-11,\n.ant-col-lg-11,\n.ant-col-12,\n.ant-col-xs-12,\n.ant-col-sm-12,\n.ant-col-md-12,\n.ant-col-lg-12,\n.ant-col-13,\n.ant-col-xs-13,\n.ant-col-sm-13,\n.ant-col-md-13,\n.ant-col-lg-13,\n.ant-col-14,\n.ant-col-xs-14,\n.ant-col-sm-14,\n.ant-col-md-14,\n.ant-col-lg-14,\n.ant-col-15,\n.ant-col-xs-15,\n.ant-col-sm-15,\n.ant-col-md-15,\n.ant-col-lg-15,\n.ant-col-16,\n.ant-col-xs-16,\n.ant-col-sm-16,\n.ant-col-md-16,\n.ant-col-lg-16,\n.ant-col-17,\n.ant-col-xs-17,\n.ant-col-sm-17,\n.ant-col-md-17,\n.ant-col-lg-17,\n.ant-col-18,\n.ant-col-xs-18,\n.ant-col-sm-18,\n.ant-col-md-18,\n.ant-col-lg-18,\n.ant-col-19,\n.ant-col-xs-19,\n.ant-col-sm-19,\n.ant-col-md-19,\n.ant-col-lg-19,\n.ant-col-20,\n.ant-col-xs-20,\n.ant-col-sm-20,\n.ant-col-md-20,\n.ant-col-lg-20,\n.ant-col-21,\n.ant-col-xs-21,\n.ant-col-sm-21,\n.ant-col-md-21,\n.ant-col-lg-21,\n.ant-col-22,\n.ant-col-xs-22,\n.ant-col-sm-22,\n.ant-col-md-22,\n.ant-col-lg-22,\n.ant-col-23,\n.ant-col-xs-23,\n.ant-col-sm-23,\n.ant-col-md-23,\n.ant-col-lg-23,\n.ant-col-24,\n.ant-col-xs-24,\n.ant-col-sm-24,\n.ant-col-md-24,\n.ant-col-lg-24 {\n position: relative;\n padding-right: 0;\n padding-left: 0;\n}\n.ant-col-1,\n.ant-col-2,\n.ant-col-3,\n.ant-col-4,\n.ant-col-5,\n.ant-col-6,\n.ant-col-7,\n.ant-col-8,\n.ant-col-9,\n.ant-col-10,\n.ant-col-11,\n.ant-col-12,\n.ant-col-13,\n.ant-col-14,\n.ant-col-15,\n.ant-col-16,\n.ant-col-17,\n.ant-col-18,\n.ant-col-19,\n.ant-col-20,\n.ant-col-21,\n.ant-col-22,\n.ant-col-23,\n.ant-col-24 {\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n float: left;\n}\n.ant-col-24 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 100%;\n}\n.ant-col-push-24 {\n left: 100%;\n}\n.ant-col-pull-24 {\n right: 100%;\n}\n.ant-col-offset-24 {\n margin-left: 100%;\n}\n.ant-col-order-24 {\n -ms-flex-order: 24;\n order: 24;\n}\n.ant-col-23 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 95.83333333%;\n}\n.ant-col-push-23 {\n left: 95.83333333%;\n}\n.ant-col-pull-23 {\n right: 95.83333333%;\n}\n.ant-col-offset-23 {\n margin-left: 95.83333333%;\n}\n.ant-col-order-23 {\n -ms-flex-order: 23;\n order: 23;\n}\n.ant-col-22 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 91.66666667%;\n}\n.ant-col-push-22 {\n left: 91.66666667%;\n}\n.ant-col-pull-22 {\n right: 91.66666667%;\n}\n.ant-col-offset-22 {\n margin-left: 91.66666667%;\n}\n.ant-col-order-22 {\n -ms-flex-order: 22;\n order: 22;\n}\n.ant-col-21 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 87.5%;\n}\n.ant-col-push-21 {\n left: 87.5%;\n}\n.ant-col-pull-21 {\n right: 87.5%;\n}\n.ant-col-offset-21 {\n margin-left: 87.5%;\n}\n.ant-col-order-21 {\n -ms-flex-order: 21;\n order: 21;\n}\n.ant-col-20 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 83.33333333%;\n}\n.ant-col-push-20 {\n left: 83.33333333%;\n}\n.ant-col-pull-20 {\n right: 83.33333333%;\n}\n.ant-col-offset-20 {\n margin-left: 83.33333333%;\n}\n.ant-col-order-20 {\n -ms-flex-order: 20;\n order: 20;\n}\n.ant-col-19 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 79.16666667%;\n}\n.ant-col-push-19 {\n left: 79.16666667%;\n}\n.ant-col-pull-19 {\n right: 79.16666667%;\n}\n.ant-col-offset-19 {\n margin-left: 79.16666667%;\n}\n.ant-col-order-19 {\n -ms-flex-order: 19;\n order: 19;\n}\n.ant-col-18 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 75%;\n}\n.ant-col-push-18 {\n left: 75%;\n}\n.ant-col-pull-18 {\n right: 75%;\n}\n.ant-col-offset-18 {\n margin-left: 75%;\n}\n.ant-col-order-18 {\n -ms-flex-order: 18;\n order: 18;\n}\n.ant-col-17 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 70.83333333%;\n}\n.ant-col-push-17 {\n left: 70.83333333%;\n}\n.ant-col-pull-17 {\n right: 70.83333333%;\n}\n.ant-col-offset-17 {\n margin-left: 70.83333333%;\n}\n.ant-col-order-17 {\n -ms-flex-order: 17;\n order: 17;\n}\n.ant-col-16 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 66.66666667%;\n}\n.ant-col-push-16 {\n left: 66.66666667%;\n}\n.ant-col-pull-16 {\n right: 66.66666667%;\n}\n.ant-col-offset-16 {\n margin-left: 66.66666667%;\n}\n.ant-col-order-16 {\n -ms-flex-order: 16;\n order: 16;\n}\n.ant-col-15 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 62.5%;\n}\n.ant-col-push-15 {\n left: 62.5%;\n}\n.ant-col-pull-15 {\n right: 62.5%;\n}\n.ant-col-offset-15 {\n margin-left: 62.5%;\n}\n.ant-col-order-15 {\n -ms-flex-order: 15;\n order: 15;\n}\n.ant-col-14 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 58.33333333%;\n}\n.ant-col-push-14 {\n left: 58.33333333%;\n}\n.ant-col-pull-14 {\n right: 58.33333333%;\n}\n.ant-col-offset-14 {\n margin-left: 58.33333333%;\n}\n.ant-col-order-14 {\n -ms-flex-order: 14;\n order: 14;\n}\n.ant-col-13 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 54.16666667%;\n}\n.ant-col-push-13 {\n left: 54.16666667%;\n}\n.ant-col-pull-13 {\n right: 54.16666667%;\n}\n.ant-col-offset-13 {\n margin-left: 54.16666667%;\n}\n.ant-col-order-13 {\n -ms-flex-order: 13;\n order: 13;\n}\n.ant-col-12 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 50%;\n}\n.ant-col-push-12 {\n left: 50%;\n}\n.ant-col-pull-12 {\n right: 50%;\n}\n.ant-col-offset-12 {\n margin-left: 50%;\n}\n.ant-col-order-12 {\n -ms-flex-order: 12;\n order: 12;\n}\n.ant-col-11 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 45.83333333%;\n}\n.ant-col-push-11 {\n left: 45.83333333%;\n}\n.ant-col-pull-11 {\n right: 45.83333333%;\n}\n.ant-col-offset-11 {\n margin-left: 45.83333333%;\n}\n.ant-col-order-11 {\n -ms-flex-order: 11;\n order: 11;\n}\n.ant-col-10 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 41.66666667%;\n}\n.ant-col-push-10 {\n left: 41.66666667%;\n}\n.ant-col-pull-10 {\n right: 41.66666667%;\n}\n.ant-col-offset-10 {\n margin-left: 41.66666667%;\n}\n.ant-col-order-10 {\n -ms-flex-order: 10;\n order: 10;\n}\n.ant-col-9 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 37.5%;\n}\n.ant-col-push-9 {\n left: 37.5%;\n}\n.ant-col-pull-9 {\n right: 37.5%;\n}\n.ant-col-offset-9 {\n margin-left: 37.5%;\n}\n.ant-col-order-9 {\n -ms-flex-order: 9;\n order: 9;\n}\n.ant-col-8 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 33.33333333%;\n}\n.ant-col-push-8 {\n left: 33.33333333%;\n}\n.ant-col-pull-8 {\n right: 33.33333333%;\n}\n.ant-col-offset-8 {\n margin-left: 33.33333333%;\n}\n.ant-col-order-8 {\n -ms-flex-order: 8;\n order: 8;\n}\n.ant-col-7 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 29.16666667%;\n}\n.ant-col-push-7 {\n left: 29.16666667%;\n}\n.ant-col-pull-7 {\n right: 29.16666667%;\n}\n.ant-col-offset-7 {\n margin-left: 29.16666667%;\n}\n.ant-col-order-7 {\n -ms-flex-order: 7;\n order: 7;\n}\n.ant-col-6 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 25%;\n}\n.ant-col-push-6 {\n left: 25%;\n}\n.ant-col-pull-6 {\n right: 25%;\n}\n.ant-col-offset-6 {\n margin-left: 25%;\n}\n.ant-col-order-6 {\n -ms-flex-order: 6;\n order: 6;\n}\n.ant-col-5 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 20.83333333%;\n}\n.ant-col-push-5 {\n left: 20.83333333%;\n}\n.ant-col-pull-5 {\n right: 20.83333333%;\n}\n.ant-col-offset-5 {\n margin-left: 20.83333333%;\n}\n.ant-col-order-5 {\n -ms-flex-order: 5;\n order: 5;\n}\n.ant-col-4 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 16.66666667%;\n}\n.ant-col-push-4 {\n left: 16.66666667%;\n}\n.ant-col-pull-4 {\n right: 16.66666667%;\n}\n.ant-col-offset-4 {\n margin-left: 16.66666667%;\n}\n.ant-col-order-4 {\n -ms-flex-order: 4;\n order: 4;\n}\n.ant-col-3 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 12.5%;\n}\n.ant-col-push-3 {\n left: 12.5%;\n}\n.ant-col-pull-3 {\n right: 12.5%;\n}\n.ant-col-offset-3 {\n margin-left: 12.5%;\n}\n.ant-col-order-3 {\n -ms-flex-order: 3;\n order: 3;\n}\n.ant-col-2 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 8.33333333%;\n}\n.ant-col-push-2 {\n left: 8.33333333%;\n}\n.ant-col-pull-2 {\n right: 8.33333333%;\n}\n.ant-col-offset-2 {\n margin-left: 8.33333333%;\n}\n.ant-col-order-2 {\n -ms-flex-order: 2;\n order: 2;\n}\n.ant-col-1 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 4.16666667%;\n}\n.ant-col-push-1 {\n left: 4.16666667%;\n}\n.ant-col-pull-1 {\n right: 4.16666667%;\n}\n.ant-col-offset-1 {\n margin-left: 4.16666667%;\n}\n.ant-col-order-1 {\n -ms-flex-order: 1;\n order: 1;\n}\n.ant-col-0 {\n display: none;\n}\n.ant-col-push-0 {\n left: auto;\n}\n.ant-col-pull-0 {\n right: auto;\n}\n.ant-col-push-0 {\n left: auto;\n}\n.ant-col-pull-0 {\n right: auto;\n}\n.ant-col-offset-0 {\n margin-left: 0;\n}\n.ant-col-order-0 {\n -ms-flex-order: 0;\n order: 0;\n}\n.ant-col-xs-1,\n.ant-col-xs-2,\n.ant-col-xs-3,\n.ant-col-xs-4,\n.ant-col-xs-5,\n.ant-col-xs-6,\n.ant-col-xs-7,\n.ant-col-xs-8,\n.ant-col-xs-9,\n.ant-col-xs-10,\n.ant-col-xs-11,\n.ant-col-xs-12,\n.ant-col-xs-13,\n.ant-col-xs-14,\n.ant-col-xs-15,\n.ant-col-xs-16,\n.ant-col-xs-17,\n.ant-col-xs-18,\n.ant-col-xs-19,\n.ant-col-xs-20,\n.ant-col-xs-21,\n.ant-col-xs-22,\n.ant-col-xs-23,\n.ant-col-xs-24 {\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n float: left;\n}\n.ant-col-xs-24 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 100%;\n}\n.ant-col-xs-push-24 {\n left: 100%;\n}\n.ant-col-xs-pull-24 {\n right: 100%;\n}\n.ant-col-xs-offset-24 {\n margin-left: 100%;\n}\n.ant-col-xs-order-24 {\n -ms-flex-order: 24;\n order: 24;\n}\n.ant-col-xs-23 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 95.83333333%;\n}\n.ant-col-xs-push-23 {\n left: 95.83333333%;\n}\n.ant-col-xs-pull-23 {\n right: 95.83333333%;\n}\n.ant-col-xs-offset-23 {\n margin-left: 95.83333333%;\n}\n.ant-col-xs-order-23 {\n -ms-flex-order: 23;\n order: 23;\n}\n.ant-col-xs-22 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 91.66666667%;\n}\n.ant-col-xs-push-22 {\n left: 91.66666667%;\n}\n.ant-col-xs-pull-22 {\n right: 91.66666667%;\n}\n.ant-col-xs-offset-22 {\n margin-left: 91.66666667%;\n}\n.ant-col-xs-order-22 {\n -ms-flex-order: 22;\n order: 22;\n}\n.ant-col-xs-21 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 87.5%;\n}\n.ant-col-xs-push-21 {\n left: 87.5%;\n}\n.ant-col-xs-pull-21 {\n right: 87.5%;\n}\n.ant-col-xs-offset-21 {\n margin-left: 87.5%;\n}\n.ant-col-xs-order-21 {\n -ms-flex-order: 21;\n order: 21;\n}\n.ant-col-xs-20 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 83.33333333%;\n}\n.ant-col-xs-push-20 {\n left: 83.33333333%;\n}\n.ant-col-xs-pull-20 {\n right: 83.33333333%;\n}\n.ant-col-xs-offset-20 {\n margin-left: 83.33333333%;\n}\n.ant-col-xs-order-20 {\n -ms-flex-order: 20;\n order: 20;\n}\n.ant-col-xs-19 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 79.16666667%;\n}\n.ant-col-xs-push-19 {\n left: 79.16666667%;\n}\n.ant-col-xs-pull-19 {\n right: 79.16666667%;\n}\n.ant-col-xs-offset-19 {\n margin-left: 79.16666667%;\n}\n.ant-col-xs-order-19 {\n -ms-flex-order: 19;\n order: 19;\n}\n.ant-col-xs-18 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 75%;\n}\n.ant-col-xs-push-18 {\n left: 75%;\n}\n.ant-col-xs-pull-18 {\n right: 75%;\n}\n.ant-col-xs-offset-18 {\n margin-left: 75%;\n}\n.ant-col-xs-order-18 {\n -ms-flex-order: 18;\n order: 18;\n}\n.ant-col-xs-17 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 70.83333333%;\n}\n.ant-col-xs-push-17 {\n left: 70.83333333%;\n}\n.ant-col-xs-pull-17 {\n right: 70.83333333%;\n}\n.ant-col-xs-offset-17 {\n margin-left: 70.83333333%;\n}\n.ant-col-xs-order-17 {\n -ms-flex-order: 17;\n order: 17;\n}\n.ant-col-xs-16 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 66.66666667%;\n}\n.ant-col-xs-push-16 {\n left: 66.66666667%;\n}\n.ant-col-xs-pull-16 {\n right: 66.66666667%;\n}\n.ant-col-xs-offset-16 {\n margin-left: 66.66666667%;\n}\n.ant-col-xs-order-16 {\n -ms-flex-order: 16;\n order: 16;\n}\n.ant-col-xs-15 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 62.5%;\n}\n.ant-col-xs-push-15 {\n left: 62.5%;\n}\n.ant-col-xs-pull-15 {\n right: 62.5%;\n}\n.ant-col-xs-offset-15 {\n margin-left: 62.5%;\n}\n.ant-col-xs-order-15 {\n -ms-flex-order: 15;\n order: 15;\n}\n.ant-col-xs-14 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 58.33333333%;\n}\n.ant-col-xs-push-14 {\n left: 58.33333333%;\n}\n.ant-col-xs-pull-14 {\n right: 58.33333333%;\n}\n.ant-col-xs-offset-14 {\n margin-left: 58.33333333%;\n}\n.ant-col-xs-order-14 {\n -ms-flex-order: 14;\n order: 14;\n}\n.ant-col-xs-13 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 54.16666667%;\n}\n.ant-col-xs-push-13 {\n left: 54.16666667%;\n}\n.ant-col-xs-pull-13 {\n right: 54.16666667%;\n}\n.ant-col-xs-offset-13 {\n margin-left: 54.16666667%;\n}\n.ant-col-xs-order-13 {\n -ms-flex-order: 13;\n order: 13;\n}\n.ant-col-xs-12 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 50%;\n}\n.ant-col-xs-push-12 {\n left: 50%;\n}\n.ant-col-xs-pull-12 {\n right: 50%;\n}\n.ant-col-xs-offset-12 {\n margin-left: 50%;\n}\n.ant-col-xs-order-12 {\n -ms-flex-order: 12;\n order: 12;\n}\n.ant-col-xs-11 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 45.83333333%;\n}\n.ant-col-xs-push-11 {\n left: 45.83333333%;\n}\n.ant-col-xs-pull-11 {\n right: 45.83333333%;\n}\n.ant-col-xs-offset-11 {\n margin-left: 45.83333333%;\n}\n.ant-col-xs-order-11 {\n -ms-flex-order: 11;\n order: 11;\n}\n.ant-col-xs-10 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 41.66666667%;\n}\n.ant-col-xs-push-10 {\n left: 41.66666667%;\n}\n.ant-col-xs-pull-10 {\n right: 41.66666667%;\n}\n.ant-col-xs-offset-10 {\n margin-left: 41.66666667%;\n}\n.ant-col-xs-order-10 {\n -ms-flex-order: 10;\n order: 10;\n}\n.ant-col-xs-9 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 37.5%;\n}\n.ant-col-xs-push-9 {\n left: 37.5%;\n}\n.ant-col-xs-pull-9 {\n right: 37.5%;\n}\n.ant-col-xs-offset-9 {\n margin-left: 37.5%;\n}\n.ant-col-xs-order-9 {\n -ms-flex-order: 9;\n order: 9;\n}\n.ant-col-xs-8 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 33.33333333%;\n}\n.ant-col-xs-push-8 {\n left: 33.33333333%;\n}\n.ant-col-xs-pull-8 {\n right: 33.33333333%;\n}\n.ant-col-xs-offset-8 {\n margin-left: 33.33333333%;\n}\n.ant-col-xs-order-8 {\n -ms-flex-order: 8;\n order: 8;\n}\n.ant-col-xs-7 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 29.16666667%;\n}\n.ant-col-xs-push-7 {\n left: 29.16666667%;\n}\n.ant-col-xs-pull-7 {\n right: 29.16666667%;\n}\n.ant-col-xs-offset-7 {\n margin-left: 29.16666667%;\n}\n.ant-col-xs-order-7 {\n -ms-flex-order: 7;\n order: 7;\n}\n.ant-col-xs-6 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 25%;\n}\n.ant-col-xs-push-6 {\n left: 25%;\n}\n.ant-col-xs-pull-6 {\n right: 25%;\n}\n.ant-col-xs-offset-6 {\n margin-left: 25%;\n}\n.ant-col-xs-order-6 {\n -ms-flex-order: 6;\n order: 6;\n}\n.ant-col-xs-5 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 20.83333333%;\n}\n.ant-col-xs-push-5 {\n left: 20.83333333%;\n}\n.ant-col-xs-pull-5 {\n right: 20.83333333%;\n}\n.ant-col-xs-offset-5 {\n margin-left: 20.83333333%;\n}\n.ant-col-xs-order-5 {\n -ms-flex-order: 5;\n order: 5;\n}\n.ant-col-xs-4 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 16.66666667%;\n}\n.ant-col-xs-push-4 {\n left: 16.66666667%;\n}\n.ant-col-xs-pull-4 {\n right: 16.66666667%;\n}\n.ant-col-xs-offset-4 {\n margin-left: 16.66666667%;\n}\n.ant-col-xs-order-4 {\n -ms-flex-order: 4;\n order: 4;\n}\n.ant-col-xs-3 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 12.5%;\n}\n.ant-col-xs-push-3 {\n left: 12.5%;\n}\n.ant-col-xs-pull-3 {\n right: 12.5%;\n}\n.ant-col-xs-offset-3 {\n margin-left: 12.5%;\n}\n.ant-col-xs-order-3 {\n -ms-flex-order: 3;\n order: 3;\n}\n.ant-col-xs-2 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 8.33333333%;\n}\n.ant-col-xs-push-2 {\n left: 8.33333333%;\n}\n.ant-col-xs-pull-2 {\n right: 8.33333333%;\n}\n.ant-col-xs-offset-2 {\n margin-left: 8.33333333%;\n}\n.ant-col-xs-order-2 {\n -ms-flex-order: 2;\n order: 2;\n}\n.ant-col-xs-1 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 4.16666667%;\n}\n.ant-col-xs-push-1 {\n left: 4.16666667%;\n}\n.ant-col-xs-pull-1 {\n right: 4.16666667%;\n}\n.ant-col-xs-offset-1 {\n margin-left: 4.16666667%;\n}\n.ant-col-xs-order-1 {\n -ms-flex-order: 1;\n order: 1;\n}\n.ant-col-xs-0 {\n display: none;\n}\n.ant-col-push-0 {\n left: auto;\n}\n.ant-col-pull-0 {\n right: auto;\n}\n.ant-col-xs-push-0 {\n left: auto;\n}\n.ant-col-xs-pull-0 {\n right: auto;\n}\n.ant-col-xs-offset-0 {\n margin-left: 0;\n}\n.ant-col-xs-order-0 {\n -ms-flex-order: 0;\n order: 0;\n}\n@media (min-width: 576px) {\n .ant-col-sm-1,\n .ant-col-sm-2,\n .ant-col-sm-3,\n .ant-col-sm-4,\n .ant-col-sm-5,\n .ant-col-sm-6,\n .ant-col-sm-7,\n .ant-col-sm-8,\n .ant-col-sm-9,\n .ant-col-sm-10,\n .ant-col-sm-11,\n .ant-col-sm-12,\n .ant-col-sm-13,\n .ant-col-sm-14,\n .ant-col-sm-15,\n .ant-col-sm-16,\n .ant-col-sm-17,\n .ant-col-sm-18,\n .ant-col-sm-19,\n .ant-col-sm-20,\n .ant-col-sm-21,\n .ant-col-sm-22,\n .ant-col-sm-23,\n .ant-col-sm-24 {\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n float: left;\n }\n .ant-col-sm-24 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 100%;\n }\n .ant-col-sm-push-24 {\n left: 100%;\n }\n .ant-col-sm-pull-24 {\n right: 100%;\n }\n .ant-col-sm-offset-24 {\n margin-left: 100%;\n }\n .ant-col-sm-order-24 {\n -ms-flex-order: 24;\n order: 24;\n }\n .ant-col-sm-23 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 95.83333333%;\n }\n .ant-col-sm-push-23 {\n left: 95.83333333%;\n }\n .ant-col-sm-pull-23 {\n right: 95.83333333%;\n }\n .ant-col-sm-offset-23 {\n margin-left: 95.83333333%;\n }\n .ant-col-sm-order-23 {\n -ms-flex-order: 23;\n order: 23;\n }\n .ant-col-sm-22 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 91.66666667%;\n }\n .ant-col-sm-push-22 {\n left: 91.66666667%;\n }\n .ant-col-sm-pull-22 {\n right: 91.66666667%;\n }\n .ant-col-sm-offset-22 {\n margin-left: 91.66666667%;\n }\n .ant-col-sm-order-22 {\n -ms-flex-order: 22;\n order: 22;\n }\n .ant-col-sm-21 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 87.5%;\n }\n .ant-col-sm-push-21 {\n left: 87.5%;\n }\n .ant-col-sm-pull-21 {\n right: 87.5%;\n }\n .ant-col-sm-offset-21 {\n margin-left: 87.5%;\n }\n .ant-col-sm-order-21 {\n -ms-flex-order: 21;\n order: 21;\n }\n .ant-col-sm-20 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 83.33333333%;\n }\n .ant-col-sm-push-20 {\n left: 83.33333333%;\n }\n .ant-col-sm-pull-20 {\n right: 83.33333333%;\n }\n .ant-col-sm-offset-20 {\n margin-left: 83.33333333%;\n }\n .ant-col-sm-order-20 {\n -ms-flex-order: 20;\n order: 20;\n }\n .ant-col-sm-19 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 79.16666667%;\n }\n .ant-col-sm-push-19 {\n left: 79.16666667%;\n }\n .ant-col-sm-pull-19 {\n right: 79.16666667%;\n }\n .ant-col-sm-offset-19 {\n margin-left: 79.16666667%;\n }\n .ant-col-sm-order-19 {\n -ms-flex-order: 19;\n order: 19;\n }\n .ant-col-sm-18 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 75%;\n }\n .ant-col-sm-push-18 {\n left: 75%;\n }\n .ant-col-sm-pull-18 {\n right: 75%;\n }\n .ant-col-sm-offset-18 {\n margin-left: 75%;\n }\n .ant-col-sm-order-18 {\n -ms-flex-order: 18;\n order: 18;\n }\n .ant-col-sm-17 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 70.83333333%;\n }\n .ant-col-sm-push-17 {\n left: 70.83333333%;\n }\n .ant-col-sm-pull-17 {\n right: 70.83333333%;\n }\n .ant-col-sm-offset-17 {\n margin-left: 70.83333333%;\n }\n .ant-col-sm-order-17 {\n -ms-flex-order: 17;\n order: 17;\n }\n .ant-col-sm-16 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 66.66666667%;\n }\n .ant-col-sm-push-16 {\n left: 66.66666667%;\n }\n .ant-col-sm-pull-16 {\n right: 66.66666667%;\n }\n .ant-col-sm-offset-16 {\n margin-left: 66.66666667%;\n }\n .ant-col-sm-order-16 {\n -ms-flex-order: 16;\n order: 16;\n }\n .ant-col-sm-15 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 62.5%;\n }\n .ant-col-sm-push-15 {\n left: 62.5%;\n }\n .ant-col-sm-pull-15 {\n right: 62.5%;\n }\n .ant-col-sm-offset-15 {\n margin-left: 62.5%;\n }\n .ant-col-sm-order-15 {\n -ms-flex-order: 15;\n order: 15;\n }\n .ant-col-sm-14 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 58.33333333%;\n }\n .ant-col-sm-push-14 {\n left: 58.33333333%;\n }\n .ant-col-sm-pull-14 {\n right: 58.33333333%;\n }\n .ant-col-sm-offset-14 {\n margin-left: 58.33333333%;\n }\n .ant-col-sm-order-14 {\n -ms-flex-order: 14;\n order: 14;\n }\n .ant-col-sm-13 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 54.16666667%;\n }\n .ant-col-sm-push-13 {\n left: 54.16666667%;\n }\n .ant-col-sm-pull-13 {\n right: 54.16666667%;\n }\n .ant-col-sm-offset-13 {\n margin-left: 54.16666667%;\n }\n .ant-col-sm-order-13 {\n -ms-flex-order: 13;\n order: 13;\n }\n .ant-col-sm-12 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 50%;\n }\n .ant-col-sm-push-12 {\n left: 50%;\n }\n .ant-col-sm-pull-12 {\n right: 50%;\n }\n .ant-col-sm-offset-12 {\n margin-left: 50%;\n }\n .ant-col-sm-order-12 {\n -ms-flex-order: 12;\n order: 12;\n }\n .ant-col-sm-11 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 45.83333333%;\n }\n .ant-col-sm-push-11 {\n left: 45.83333333%;\n }\n .ant-col-sm-pull-11 {\n right: 45.83333333%;\n }\n .ant-col-sm-offset-11 {\n margin-left: 45.83333333%;\n }\n .ant-col-sm-order-11 {\n -ms-flex-order: 11;\n order: 11;\n }\n .ant-col-sm-10 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 41.66666667%;\n }\n .ant-col-sm-push-10 {\n left: 41.66666667%;\n }\n .ant-col-sm-pull-10 {\n right: 41.66666667%;\n }\n .ant-col-sm-offset-10 {\n margin-left: 41.66666667%;\n }\n .ant-col-sm-order-10 {\n -ms-flex-order: 10;\n order: 10;\n }\n .ant-col-sm-9 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 37.5%;\n }\n .ant-col-sm-push-9 {\n left: 37.5%;\n }\n .ant-col-sm-pull-9 {\n right: 37.5%;\n }\n .ant-col-sm-offset-9 {\n margin-left: 37.5%;\n }\n .ant-col-sm-order-9 {\n -ms-flex-order: 9;\n order: 9;\n }\n .ant-col-sm-8 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 33.33333333%;\n }\n .ant-col-sm-push-8 {\n left: 33.33333333%;\n }\n .ant-col-sm-pull-8 {\n right: 33.33333333%;\n }\n .ant-col-sm-offset-8 {\n margin-left: 33.33333333%;\n }\n .ant-col-sm-order-8 {\n -ms-flex-order: 8;\n order: 8;\n }\n .ant-col-sm-7 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 29.16666667%;\n }\n .ant-col-sm-push-7 {\n left: 29.16666667%;\n }\n .ant-col-sm-pull-7 {\n right: 29.16666667%;\n }\n .ant-col-sm-offset-7 {\n margin-left: 29.16666667%;\n }\n .ant-col-sm-order-7 {\n -ms-flex-order: 7;\n order: 7;\n }\n .ant-col-sm-6 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 25%;\n }\n .ant-col-sm-push-6 {\n left: 25%;\n }\n .ant-col-sm-pull-6 {\n right: 25%;\n }\n .ant-col-sm-offset-6 {\n margin-left: 25%;\n }\n .ant-col-sm-order-6 {\n -ms-flex-order: 6;\n order: 6;\n }\n .ant-col-sm-5 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 20.83333333%;\n }\n .ant-col-sm-push-5 {\n left: 20.83333333%;\n }\n .ant-col-sm-pull-5 {\n right: 20.83333333%;\n }\n .ant-col-sm-offset-5 {\n margin-left: 20.83333333%;\n }\n .ant-col-sm-order-5 {\n -ms-flex-order: 5;\n order: 5;\n }\n .ant-col-sm-4 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 16.66666667%;\n }\n .ant-col-sm-push-4 {\n left: 16.66666667%;\n }\n .ant-col-sm-pull-4 {\n right: 16.66666667%;\n }\n .ant-col-sm-offset-4 {\n margin-left: 16.66666667%;\n }\n .ant-col-sm-order-4 {\n -ms-flex-order: 4;\n order: 4;\n }\n .ant-col-sm-3 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 12.5%;\n }\n .ant-col-sm-push-3 {\n left: 12.5%;\n }\n .ant-col-sm-pull-3 {\n right: 12.5%;\n }\n .ant-col-sm-offset-3 {\n margin-left: 12.5%;\n }\n .ant-col-sm-order-3 {\n -ms-flex-order: 3;\n order: 3;\n }\n .ant-col-sm-2 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 8.33333333%;\n }\n .ant-col-sm-push-2 {\n left: 8.33333333%;\n }\n .ant-col-sm-pull-2 {\n right: 8.33333333%;\n }\n .ant-col-sm-offset-2 {\n margin-left: 8.33333333%;\n }\n .ant-col-sm-order-2 {\n -ms-flex-order: 2;\n order: 2;\n }\n .ant-col-sm-1 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 4.16666667%;\n }\n .ant-col-sm-push-1 {\n left: 4.16666667%;\n }\n .ant-col-sm-pull-1 {\n right: 4.16666667%;\n }\n .ant-col-sm-offset-1 {\n margin-left: 4.16666667%;\n }\n .ant-col-sm-order-1 {\n -ms-flex-order: 1;\n order: 1;\n }\n .ant-col-sm-0 {\n display: none;\n }\n .ant-col-push-0 {\n left: auto;\n }\n .ant-col-pull-0 {\n right: auto;\n }\n .ant-col-sm-push-0 {\n left: auto;\n }\n .ant-col-sm-pull-0 {\n right: auto;\n }\n .ant-col-sm-offset-0 {\n margin-left: 0;\n }\n .ant-col-sm-order-0 {\n -ms-flex-order: 0;\n order: 0;\n }\n}\n@media (min-width: 768px) {\n .ant-col-md-1,\n .ant-col-md-2,\n .ant-col-md-3,\n .ant-col-md-4,\n .ant-col-md-5,\n .ant-col-md-6,\n .ant-col-md-7,\n .ant-col-md-8,\n .ant-col-md-9,\n .ant-col-md-10,\n .ant-col-md-11,\n .ant-col-md-12,\n .ant-col-md-13,\n .ant-col-md-14,\n .ant-col-md-15,\n .ant-col-md-16,\n .ant-col-md-17,\n .ant-col-md-18,\n .ant-col-md-19,\n .ant-col-md-20,\n .ant-col-md-21,\n .ant-col-md-22,\n .ant-col-md-23,\n .ant-col-md-24 {\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n float: left;\n }\n .ant-col-md-24 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 100%;\n }\n .ant-col-md-push-24 {\n left: 100%;\n }\n .ant-col-md-pull-24 {\n right: 100%;\n }\n .ant-col-md-offset-24 {\n margin-left: 100%;\n }\n .ant-col-md-order-24 {\n -ms-flex-order: 24;\n order: 24;\n }\n .ant-col-md-23 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 95.83333333%;\n }\n .ant-col-md-push-23 {\n left: 95.83333333%;\n }\n .ant-col-md-pull-23 {\n right: 95.83333333%;\n }\n .ant-col-md-offset-23 {\n margin-left: 95.83333333%;\n }\n .ant-col-md-order-23 {\n -ms-flex-order: 23;\n order: 23;\n }\n .ant-col-md-22 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 91.66666667%;\n }\n .ant-col-md-push-22 {\n left: 91.66666667%;\n }\n .ant-col-md-pull-22 {\n right: 91.66666667%;\n }\n .ant-col-md-offset-22 {\n margin-left: 91.66666667%;\n }\n .ant-col-md-order-22 {\n -ms-flex-order: 22;\n order: 22;\n }\n .ant-col-md-21 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 87.5%;\n }\n .ant-col-md-push-21 {\n left: 87.5%;\n }\n .ant-col-md-pull-21 {\n right: 87.5%;\n }\n .ant-col-md-offset-21 {\n margin-left: 87.5%;\n }\n .ant-col-md-order-21 {\n -ms-flex-order: 21;\n order: 21;\n }\n .ant-col-md-20 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 83.33333333%;\n }\n .ant-col-md-push-20 {\n left: 83.33333333%;\n }\n .ant-col-md-pull-20 {\n right: 83.33333333%;\n }\n .ant-col-md-offset-20 {\n margin-left: 83.33333333%;\n }\n .ant-col-md-order-20 {\n -ms-flex-order: 20;\n order: 20;\n }\n .ant-col-md-19 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 79.16666667%;\n }\n .ant-col-md-push-19 {\n left: 79.16666667%;\n }\n .ant-col-md-pull-19 {\n right: 79.16666667%;\n }\n .ant-col-md-offset-19 {\n margin-left: 79.16666667%;\n }\n .ant-col-md-order-19 {\n -ms-flex-order: 19;\n order: 19;\n }\n .ant-col-md-18 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 75%;\n }\n .ant-col-md-push-18 {\n left: 75%;\n }\n .ant-col-md-pull-18 {\n right: 75%;\n }\n .ant-col-md-offset-18 {\n margin-left: 75%;\n }\n .ant-col-md-order-18 {\n -ms-flex-order: 18;\n order: 18;\n }\n .ant-col-md-17 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 70.83333333%;\n }\n .ant-col-md-push-17 {\n left: 70.83333333%;\n }\n .ant-col-md-pull-17 {\n right: 70.83333333%;\n }\n .ant-col-md-offset-17 {\n margin-left: 70.83333333%;\n }\n .ant-col-md-order-17 {\n -ms-flex-order: 17;\n order: 17;\n }\n .ant-col-md-16 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 66.66666667%;\n }\n .ant-col-md-push-16 {\n left: 66.66666667%;\n }\n .ant-col-md-pull-16 {\n right: 66.66666667%;\n }\n .ant-col-md-offset-16 {\n margin-left: 66.66666667%;\n }\n .ant-col-md-order-16 {\n -ms-flex-order: 16;\n order: 16;\n }\n .ant-col-md-15 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 62.5%;\n }\n .ant-col-md-push-15 {\n left: 62.5%;\n }\n .ant-col-md-pull-15 {\n right: 62.5%;\n }\n .ant-col-md-offset-15 {\n margin-left: 62.5%;\n }\n .ant-col-md-order-15 {\n -ms-flex-order: 15;\n order: 15;\n }\n .ant-col-md-14 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 58.33333333%;\n }\n .ant-col-md-push-14 {\n left: 58.33333333%;\n }\n .ant-col-md-pull-14 {\n right: 58.33333333%;\n }\n .ant-col-md-offset-14 {\n margin-left: 58.33333333%;\n }\n .ant-col-md-order-14 {\n -ms-flex-order: 14;\n order: 14;\n }\n .ant-col-md-13 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 54.16666667%;\n }\n .ant-col-md-push-13 {\n left: 54.16666667%;\n }\n .ant-col-md-pull-13 {\n right: 54.16666667%;\n }\n .ant-col-md-offset-13 {\n margin-left: 54.16666667%;\n }\n .ant-col-md-order-13 {\n -ms-flex-order: 13;\n order: 13;\n }\n .ant-col-md-12 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 50%;\n }\n .ant-col-md-push-12 {\n left: 50%;\n }\n .ant-col-md-pull-12 {\n right: 50%;\n }\n .ant-col-md-offset-12 {\n margin-left: 50%;\n }\n .ant-col-md-order-12 {\n -ms-flex-order: 12;\n order: 12;\n }\n .ant-col-md-11 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 45.83333333%;\n }\n .ant-col-md-push-11 {\n left: 45.83333333%;\n }\n .ant-col-md-pull-11 {\n right: 45.83333333%;\n }\n .ant-col-md-offset-11 {\n margin-left: 45.83333333%;\n }\n .ant-col-md-order-11 {\n -ms-flex-order: 11;\n order: 11;\n }\n .ant-col-md-10 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 41.66666667%;\n }\n .ant-col-md-push-10 {\n left: 41.66666667%;\n }\n .ant-col-md-pull-10 {\n right: 41.66666667%;\n }\n .ant-col-md-offset-10 {\n margin-left: 41.66666667%;\n }\n .ant-col-md-order-10 {\n -ms-flex-order: 10;\n order: 10;\n }\n .ant-col-md-9 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 37.5%;\n }\n .ant-col-md-push-9 {\n left: 37.5%;\n }\n .ant-col-md-pull-9 {\n right: 37.5%;\n }\n .ant-col-md-offset-9 {\n margin-left: 37.5%;\n }\n .ant-col-md-order-9 {\n -ms-flex-order: 9;\n order: 9;\n }\n .ant-col-md-8 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 33.33333333%;\n }\n .ant-col-md-push-8 {\n left: 33.33333333%;\n }\n .ant-col-md-pull-8 {\n right: 33.33333333%;\n }\n .ant-col-md-offset-8 {\n margin-left: 33.33333333%;\n }\n .ant-col-md-order-8 {\n -ms-flex-order: 8;\n order: 8;\n }\n .ant-col-md-7 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 29.16666667%;\n }\n .ant-col-md-push-7 {\n left: 29.16666667%;\n }\n .ant-col-md-pull-7 {\n right: 29.16666667%;\n }\n .ant-col-md-offset-7 {\n margin-left: 29.16666667%;\n }\n .ant-col-md-order-7 {\n -ms-flex-order: 7;\n order: 7;\n }\n .ant-col-md-6 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 25%;\n }\n .ant-col-md-push-6 {\n left: 25%;\n }\n .ant-col-md-pull-6 {\n right: 25%;\n }\n .ant-col-md-offset-6 {\n margin-left: 25%;\n }\n .ant-col-md-order-6 {\n -ms-flex-order: 6;\n order: 6;\n }\n .ant-col-md-5 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 20.83333333%;\n }\n .ant-col-md-push-5 {\n left: 20.83333333%;\n }\n .ant-col-md-pull-5 {\n right: 20.83333333%;\n }\n .ant-col-md-offset-5 {\n margin-left: 20.83333333%;\n }\n .ant-col-md-order-5 {\n -ms-flex-order: 5;\n order: 5;\n }\n .ant-col-md-4 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 16.66666667%;\n }\n .ant-col-md-push-4 {\n left: 16.66666667%;\n }\n .ant-col-md-pull-4 {\n right: 16.66666667%;\n }\n .ant-col-md-offset-4 {\n margin-left: 16.66666667%;\n }\n .ant-col-md-order-4 {\n -ms-flex-order: 4;\n order: 4;\n }\n .ant-col-md-3 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 12.5%;\n }\n .ant-col-md-push-3 {\n left: 12.5%;\n }\n .ant-col-md-pull-3 {\n right: 12.5%;\n }\n .ant-col-md-offset-3 {\n margin-left: 12.5%;\n }\n .ant-col-md-order-3 {\n -ms-flex-order: 3;\n order: 3;\n }\n .ant-col-md-2 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 8.33333333%;\n }\n .ant-col-md-push-2 {\n left: 8.33333333%;\n }\n .ant-col-md-pull-2 {\n right: 8.33333333%;\n }\n .ant-col-md-offset-2 {\n margin-left: 8.33333333%;\n }\n .ant-col-md-order-2 {\n -ms-flex-order: 2;\n order: 2;\n }\n .ant-col-md-1 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 4.16666667%;\n }\n .ant-col-md-push-1 {\n left: 4.16666667%;\n }\n .ant-col-md-pull-1 {\n right: 4.16666667%;\n }\n .ant-col-md-offset-1 {\n margin-left: 4.16666667%;\n }\n .ant-col-md-order-1 {\n -ms-flex-order: 1;\n order: 1;\n }\n .ant-col-md-0 {\n display: none;\n }\n .ant-col-push-0 {\n left: auto;\n }\n .ant-col-pull-0 {\n right: auto;\n }\n .ant-col-md-push-0 {\n left: auto;\n }\n .ant-col-md-pull-0 {\n right: auto;\n }\n .ant-col-md-offset-0 {\n margin-left: 0;\n }\n .ant-col-md-order-0 {\n -ms-flex-order: 0;\n order: 0;\n }\n}\n@media (min-width: 992px) {\n .ant-col-lg-1,\n .ant-col-lg-2,\n .ant-col-lg-3,\n .ant-col-lg-4,\n .ant-col-lg-5,\n .ant-col-lg-6,\n .ant-col-lg-7,\n .ant-col-lg-8,\n .ant-col-lg-9,\n .ant-col-lg-10,\n .ant-col-lg-11,\n .ant-col-lg-12,\n .ant-col-lg-13,\n .ant-col-lg-14,\n .ant-col-lg-15,\n .ant-col-lg-16,\n .ant-col-lg-17,\n .ant-col-lg-18,\n .ant-col-lg-19,\n .ant-col-lg-20,\n .ant-col-lg-21,\n .ant-col-lg-22,\n .ant-col-lg-23,\n .ant-col-lg-24 {\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n float: left;\n }\n .ant-col-lg-24 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 100%;\n }\n .ant-col-lg-push-24 {\n left: 100%;\n }\n .ant-col-lg-pull-24 {\n right: 100%;\n }\n .ant-col-lg-offset-24 {\n margin-left: 100%;\n }\n .ant-col-lg-order-24 {\n -ms-flex-order: 24;\n order: 24;\n }\n .ant-col-lg-23 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 95.83333333%;\n }\n .ant-col-lg-push-23 {\n left: 95.83333333%;\n }\n .ant-col-lg-pull-23 {\n right: 95.83333333%;\n }\n .ant-col-lg-offset-23 {\n margin-left: 95.83333333%;\n }\n .ant-col-lg-order-23 {\n -ms-flex-order: 23;\n order: 23;\n }\n .ant-col-lg-22 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 91.66666667%;\n }\n .ant-col-lg-push-22 {\n left: 91.66666667%;\n }\n .ant-col-lg-pull-22 {\n right: 91.66666667%;\n }\n .ant-col-lg-offset-22 {\n margin-left: 91.66666667%;\n }\n .ant-col-lg-order-22 {\n -ms-flex-order: 22;\n order: 22;\n }\n .ant-col-lg-21 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 87.5%;\n }\n .ant-col-lg-push-21 {\n left: 87.5%;\n }\n .ant-col-lg-pull-21 {\n right: 87.5%;\n }\n .ant-col-lg-offset-21 {\n margin-left: 87.5%;\n }\n .ant-col-lg-order-21 {\n -ms-flex-order: 21;\n order: 21;\n }\n .ant-col-lg-20 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 83.33333333%;\n }\n .ant-col-lg-push-20 {\n left: 83.33333333%;\n }\n .ant-col-lg-pull-20 {\n right: 83.33333333%;\n }\n .ant-col-lg-offset-20 {\n margin-left: 83.33333333%;\n }\n .ant-col-lg-order-20 {\n -ms-flex-order: 20;\n order: 20;\n }\n .ant-col-lg-19 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 79.16666667%;\n }\n .ant-col-lg-push-19 {\n left: 79.16666667%;\n }\n .ant-col-lg-pull-19 {\n right: 79.16666667%;\n }\n .ant-col-lg-offset-19 {\n margin-left: 79.16666667%;\n }\n .ant-col-lg-order-19 {\n -ms-flex-order: 19;\n order: 19;\n }\n .ant-col-lg-18 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 75%;\n }\n .ant-col-lg-push-18 {\n left: 75%;\n }\n .ant-col-lg-pull-18 {\n right: 75%;\n }\n .ant-col-lg-offset-18 {\n margin-left: 75%;\n }\n .ant-col-lg-order-18 {\n -ms-flex-order: 18;\n order: 18;\n }\n .ant-col-lg-17 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 70.83333333%;\n }\n .ant-col-lg-push-17 {\n left: 70.83333333%;\n }\n .ant-col-lg-pull-17 {\n right: 70.83333333%;\n }\n .ant-col-lg-offset-17 {\n margin-left: 70.83333333%;\n }\n .ant-col-lg-order-17 {\n -ms-flex-order: 17;\n order: 17;\n }\n .ant-col-lg-16 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 66.66666667%;\n }\n .ant-col-lg-push-16 {\n left: 66.66666667%;\n }\n .ant-col-lg-pull-16 {\n right: 66.66666667%;\n }\n .ant-col-lg-offset-16 {\n margin-left: 66.66666667%;\n }\n .ant-col-lg-order-16 {\n -ms-flex-order: 16;\n order: 16;\n }\n .ant-col-lg-15 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 62.5%;\n }\n .ant-col-lg-push-15 {\n left: 62.5%;\n }\n .ant-col-lg-pull-15 {\n right: 62.5%;\n }\n .ant-col-lg-offset-15 {\n margin-left: 62.5%;\n }\n .ant-col-lg-order-15 {\n -ms-flex-order: 15;\n order: 15;\n }\n .ant-col-lg-14 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 58.33333333%;\n }\n .ant-col-lg-push-14 {\n left: 58.33333333%;\n }\n .ant-col-lg-pull-14 {\n right: 58.33333333%;\n }\n .ant-col-lg-offset-14 {\n margin-left: 58.33333333%;\n }\n .ant-col-lg-order-14 {\n -ms-flex-order: 14;\n order: 14;\n }\n .ant-col-lg-13 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 54.16666667%;\n }\n .ant-col-lg-push-13 {\n left: 54.16666667%;\n }\n .ant-col-lg-pull-13 {\n right: 54.16666667%;\n }\n .ant-col-lg-offset-13 {\n margin-left: 54.16666667%;\n }\n .ant-col-lg-order-13 {\n -ms-flex-order: 13;\n order: 13;\n }\n .ant-col-lg-12 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 50%;\n }\n .ant-col-lg-push-12 {\n left: 50%;\n }\n .ant-col-lg-pull-12 {\n right: 50%;\n }\n .ant-col-lg-offset-12 {\n margin-left: 50%;\n }\n .ant-col-lg-order-12 {\n -ms-flex-order: 12;\n order: 12;\n }\n .ant-col-lg-11 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 45.83333333%;\n }\n .ant-col-lg-push-11 {\n left: 45.83333333%;\n }\n .ant-col-lg-pull-11 {\n right: 45.83333333%;\n }\n .ant-col-lg-offset-11 {\n margin-left: 45.83333333%;\n }\n .ant-col-lg-order-11 {\n -ms-flex-order: 11;\n order: 11;\n }\n .ant-col-lg-10 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 41.66666667%;\n }\n .ant-col-lg-push-10 {\n left: 41.66666667%;\n }\n .ant-col-lg-pull-10 {\n right: 41.66666667%;\n }\n .ant-col-lg-offset-10 {\n margin-left: 41.66666667%;\n }\n .ant-col-lg-order-10 {\n -ms-flex-order: 10;\n order: 10;\n }\n .ant-col-lg-9 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 37.5%;\n }\n .ant-col-lg-push-9 {\n left: 37.5%;\n }\n .ant-col-lg-pull-9 {\n right: 37.5%;\n }\n .ant-col-lg-offset-9 {\n margin-left: 37.5%;\n }\n .ant-col-lg-order-9 {\n -ms-flex-order: 9;\n order: 9;\n }\n .ant-col-lg-8 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 33.33333333%;\n }\n .ant-col-lg-push-8 {\n left: 33.33333333%;\n }\n .ant-col-lg-pull-8 {\n right: 33.33333333%;\n }\n .ant-col-lg-offset-8 {\n margin-left: 33.33333333%;\n }\n .ant-col-lg-order-8 {\n -ms-flex-order: 8;\n order: 8;\n }\n .ant-col-lg-7 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 29.16666667%;\n }\n .ant-col-lg-push-7 {\n left: 29.16666667%;\n }\n .ant-col-lg-pull-7 {\n right: 29.16666667%;\n }\n .ant-col-lg-offset-7 {\n margin-left: 29.16666667%;\n }\n .ant-col-lg-order-7 {\n -ms-flex-order: 7;\n order: 7;\n }\n .ant-col-lg-6 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 25%;\n }\n .ant-col-lg-push-6 {\n left: 25%;\n }\n .ant-col-lg-pull-6 {\n right: 25%;\n }\n .ant-col-lg-offset-6 {\n margin-left: 25%;\n }\n .ant-col-lg-order-6 {\n -ms-flex-order: 6;\n order: 6;\n }\n .ant-col-lg-5 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 20.83333333%;\n }\n .ant-col-lg-push-5 {\n left: 20.83333333%;\n }\n .ant-col-lg-pull-5 {\n right: 20.83333333%;\n }\n .ant-col-lg-offset-5 {\n margin-left: 20.83333333%;\n }\n .ant-col-lg-order-5 {\n -ms-flex-order: 5;\n order: 5;\n }\n .ant-col-lg-4 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 16.66666667%;\n }\n .ant-col-lg-push-4 {\n left: 16.66666667%;\n }\n .ant-col-lg-pull-4 {\n right: 16.66666667%;\n }\n .ant-col-lg-offset-4 {\n margin-left: 16.66666667%;\n }\n .ant-col-lg-order-4 {\n -ms-flex-order: 4;\n order: 4;\n }\n .ant-col-lg-3 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 12.5%;\n }\n .ant-col-lg-push-3 {\n left: 12.5%;\n }\n .ant-col-lg-pull-3 {\n right: 12.5%;\n }\n .ant-col-lg-offset-3 {\n margin-left: 12.5%;\n }\n .ant-col-lg-order-3 {\n -ms-flex-order: 3;\n order: 3;\n }\n .ant-col-lg-2 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 8.33333333%;\n }\n .ant-col-lg-push-2 {\n left: 8.33333333%;\n }\n .ant-col-lg-pull-2 {\n right: 8.33333333%;\n }\n .ant-col-lg-offset-2 {\n margin-left: 8.33333333%;\n }\n .ant-col-lg-order-2 {\n -ms-flex-order: 2;\n order: 2;\n }\n .ant-col-lg-1 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 4.16666667%;\n }\n .ant-col-lg-push-1 {\n left: 4.16666667%;\n }\n .ant-col-lg-pull-1 {\n right: 4.16666667%;\n }\n .ant-col-lg-offset-1 {\n margin-left: 4.16666667%;\n }\n .ant-col-lg-order-1 {\n -ms-flex-order: 1;\n order: 1;\n }\n .ant-col-lg-0 {\n display: none;\n }\n .ant-col-push-0 {\n left: auto;\n }\n .ant-col-pull-0 {\n right: auto;\n }\n .ant-col-lg-push-0 {\n left: auto;\n }\n .ant-col-lg-pull-0 {\n right: auto;\n }\n .ant-col-lg-offset-0 {\n margin-left: 0;\n }\n .ant-col-lg-order-0 {\n -ms-flex-order: 0;\n order: 0;\n }\n}\n@media (min-width: 1200px) {\n .ant-col-xl-1,\n .ant-col-xl-2,\n .ant-col-xl-3,\n .ant-col-xl-4,\n .ant-col-xl-5,\n .ant-col-xl-6,\n .ant-col-xl-7,\n .ant-col-xl-8,\n .ant-col-xl-9,\n .ant-col-xl-10,\n .ant-col-xl-11,\n .ant-col-xl-12,\n .ant-col-xl-13,\n .ant-col-xl-14,\n .ant-col-xl-15,\n .ant-col-xl-16,\n .ant-col-xl-17,\n .ant-col-xl-18,\n .ant-col-xl-19,\n .ant-col-xl-20,\n .ant-col-xl-21,\n .ant-col-xl-22,\n .ant-col-xl-23,\n .ant-col-xl-24 {\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n float: left;\n }\n .ant-col-xl-24 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 100%;\n }\n .ant-col-xl-push-24 {\n left: 100%;\n }\n .ant-col-xl-pull-24 {\n right: 100%;\n }\n .ant-col-xl-offset-24 {\n margin-left: 100%;\n }\n .ant-col-xl-order-24 {\n -ms-flex-order: 24;\n order: 24;\n }\n .ant-col-xl-23 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 95.83333333%;\n }\n .ant-col-xl-push-23 {\n left: 95.83333333%;\n }\n .ant-col-xl-pull-23 {\n right: 95.83333333%;\n }\n .ant-col-xl-offset-23 {\n margin-left: 95.83333333%;\n }\n .ant-col-xl-order-23 {\n -ms-flex-order: 23;\n order: 23;\n }\n .ant-col-xl-22 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 91.66666667%;\n }\n .ant-col-xl-push-22 {\n left: 91.66666667%;\n }\n .ant-col-xl-pull-22 {\n right: 91.66666667%;\n }\n .ant-col-xl-offset-22 {\n margin-left: 91.66666667%;\n }\n .ant-col-xl-order-22 {\n -ms-flex-order: 22;\n order: 22;\n }\n .ant-col-xl-21 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 87.5%;\n }\n .ant-col-xl-push-21 {\n left: 87.5%;\n }\n .ant-col-xl-pull-21 {\n right: 87.5%;\n }\n .ant-col-xl-offset-21 {\n margin-left: 87.5%;\n }\n .ant-col-xl-order-21 {\n -ms-flex-order: 21;\n order: 21;\n }\n .ant-col-xl-20 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 83.33333333%;\n }\n .ant-col-xl-push-20 {\n left: 83.33333333%;\n }\n .ant-col-xl-pull-20 {\n right: 83.33333333%;\n }\n .ant-col-xl-offset-20 {\n margin-left: 83.33333333%;\n }\n .ant-col-xl-order-20 {\n -ms-flex-order: 20;\n order: 20;\n }\n .ant-col-xl-19 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 79.16666667%;\n }\n .ant-col-xl-push-19 {\n left: 79.16666667%;\n }\n .ant-col-xl-pull-19 {\n right: 79.16666667%;\n }\n .ant-col-xl-offset-19 {\n margin-left: 79.16666667%;\n }\n .ant-col-xl-order-19 {\n -ms-flex-order: 19;\n order: 19;\n }\n .ant-col-xl-18 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 75%;\n }\n .ant-col-xl-push-18 {\n left: 75%;\n }\n .ant-col-xl-pull-18 {\n right: 75%;\n }\n .ant-col-xl-offset-18 {\n margin-left: 75%;\n }\n .ant-col-xl-order-18 {\n -ms-flex-order: 18;\n order: 18;\n }\n .ant-col-xl-17 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 70.83333333%;\n }\n .ant-col-xl-push-17 {\n left: 70.83333333%;\n }\n .ant-col-xl-pull-17 {\n right: 70.83333333%;\n }\n .ant-col-xl-offset-17 {\n margin-left: 70.83333333%;\n }\n .ant-col-xl-order-17 {\n -ms-flex-order: 17;\n order: 17;\n }\n .ant-col-xl-16 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 66.66666667%;\n }\n .ant-col-xl-push-16 {\n left: 66.66666667%;\n }\n .ant-col-xl-pull-16 {\n right: 66.66666667%;\n }\n .ant-col-xl-offset-16 {\n margin-left: 66.66666667%;\n }\n .ant-col-xl-order-16 {\n -ms-flex-order: 16;\n order: 16;\n }\n .ant-col-xl-15 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 62.5%;\n }\n .ant-col-xl-push-15 {\n left: 62.5%;\n }\n .ant-col-xl-pull-15 {\n right: 62.5%;\n }\n .ant-col-xl-offset-15 {\n margin-left: 62.5%;\n }\n .ant-col-xl-order-15 {\n -ms-flex-order: 15;\n order: 15;\n }\n .ant-col-xl-14 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 58.33333333%;\n }\n .ant-col-xl-push-14 {\n left: 58.33333333%;\n }\n .ant-col-xl-pull-14 {\n right: 58.33333333%;\n }\n .ant-col-xl-offset-14 {\n margin-left: 58.33333333%;\n }\n .ant-col-xl-order-14 {\n -ms-flex-order: 14;\n order: 14;\n }\n .ant-col-xl-13 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 54.16666667%;\n }\n .ant-col-xl-push-13 {\n left: 54.16666667%;\n }\n .ant-col-xl-pull-13 {\n right: 54.16666667%;\n }\n .ant-col-xl-offset-13 {\n margin-left: 54.16666667%;\n }\n .ant-col-xl-order-13 {\n -ms-flex-order: 13;\n order: 13;\n }\n .ant-col-xl-12 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 50%;\n }\n .ant-col-xl-push-12 {\n left: 50%;\n }\n .ant-col-xl-pull-12 {\n right: 50%;\n }\n .ant-col-xl-offset-12 {\n margin-left: 50%;\n }\n .ant-col-xl-order-12 {\n -ms-flex-order: 12;\n order: 12;\n }\n .ant-col-xl-11 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 45.83333333%;\n }\n .ant-col-xl-push-11 {\n left: 45.83333333%;\n }\n .ant-col-xl-pull-11 {\n right: 45.83333333%;\n }\n .ant-col-xl-offset-11 {\n margin-left: 45.83333333%;\n }\n .ant-col-xl-order-11 {\n -ms-flex-order: 11;\n order: 11;\n }\n .ant-col-xl-10 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 41.66666667%;\n }\n .ant-col-xl-push-10 {\n left: 41.66666667%;\n }\n .ant-col-xl-pull-10 {\n right: 41.66666667%;\n }\n .ant-col-xl-offset-10 {\n margin-left: 41.66666667%;\n }\n .ant-col-xl-order-10 {\n -ms-flex-order: 10;\n order: 10;\n }\n .ant-col-xl-9 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 37.5%;\n }\n .ant-col-xl-push-9 {\n left: 37.5%;\n }\n .ant-col-xl-pull-9 {\n right: 37.5%;\n }\n .ant-col-xl-offset-9 {\n margin-left: 37.5%;\n }\n .ant-col-xl-order-9 {\n -ms-flex-order: 9;\n order: 9;\n }\n .ant-col-xl-8 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 33.33333333%;\n }\n .ant-col-xl-push-8 {\n left: 33.33333333%;\n }\n .ant-col-xl-pull-8 {\n right: 33.33333333%;\n }\n .ant-col-xl-offset-8 {\n margin-left: 33.33333333%;\n }\n .ant-col-xl-order-8 {\n -ms-flex-order: 8;\n order: 8;\n }\n .ant-col-xl-7 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 29.16666667%;\n }\n .ant-col-xl-push-7 {\n left: 29.16666667%;\n }\n .ant-col-xl-pull-7 {\n right: 29.16666667%;\n }\n .ant-col-xl-offset-7 {\n margin-left: 29.16666667%;\n }\n .ant-col-xl-order-7 {\n -ms-flex-order: 7;\n order: 7;\n }\n .ant-col-xl-6 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 25%;\n }\n .ant-col-xl-push-6 {\n left: 25%;\n }\n .ant-col-xl-pull-6 {\n right: 25%;\n }\n .ant-col-xl-offset-6 {\n margin-left: 25%;\n }\n .ant-col-xl-order-6 {\n -ms-flex-order: 6;\n order: 6;\n }\n .ant-col-xl-5 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 20.83333333%;\n }\n .ant-col-xl-push-5 {\n left: 20.83333333%;\n }\n .ant-col-xl-pull-5 {\n right: 20.83333333%;\n }\n .ant-col-xl-offset-5 {\n margin-left: 20.83333333%;\n }\n .ant-col-xl-order-5 {\n -ms-flex-order: 5;\n order: 5;\n }\n .ant-col-xl-4 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 16.66666667%;\n }\n .ant-col-xl-push-4 {\n left: 16.66666667%;\n }\n .ant-col-xl-pull-4 {\n right: 16.66666667%;\n }\n .ant-col-xl-offset-4 {\n margin-left: 16.66666667%;\n }\n .ant-col-xl-order-4 {\n -ms-flex-order: 4;\n order: 4;\n }\n .ant-col-xl-3 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 12.5%;\n }\n .ant-col-xl-push-3 {\n left: 12.5%;\n }\n .ant-col-xl-pull-3 {\n right: 12.5%;\n }\n .ant-col-xl-offset-3 {\n margin-left: 12.5%;\n }\n .ant-col-xl-order-3 {\n -ms-flex-order: 3;\n order: 3;\n }\n .ant-col-xl-2 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 8.33333333%;\n }\n .ant-col-xl-push-2 {\n left: 8.33333333%;\n }\n .ant-col-xl-pull-2 {\n right: 8.33333333%;\n }\n .ant-col-xl-offset-2 {\n margin-left: 8.33333333%;\n }\n .ant-col-xl-order-2 {\n -ms-flex-order: 2;\n order: 2;\n }\n .ant-col-xl-1 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 4.16666667%;\n }\n .ant-col-xl-push-1 {\n left: 4.16666667%;\n }\n .ant-col-xl-pull-1 {\n right: 4.16666667%;\n }\n .ant-col-xl-offset-1 {\n margin-left: 4.16666667%;\n }\n .ant-col-xl-order-1 {\n -ms-flex-order: 1;\n order: 1;\n }\n .ant-col-xl-0 {\n display: none;\n }\n .ant-col-push-0 {\n left: auto;\n }\n .ant-col-pull-0 {\n right: auto;\n }\n .ant-col-xl-push-0 {\n left: auto;\n }\n .ant-col-xl-pull-0 {\n right: auto;\n }\n .ant-col-xl-offset-0 {\n margin-left: 0;\n }\n .ant-col-xl-order-0 {\n -ms-flex-order: 0;\n order: 0;\n }\n}\n@media (min-width: 1600px) {\n .ant-col-xxl-1,\n .ant-col-xxl-2,\n .ant-col-xxl-3,\n .ant-col-xxl-4,\n .ant-col-xxl-5,\n .ant-col-xxl-6,\n .ant-col-xxl-7,\n .ant-col-xxl-8,\n .ant-col-xxl-9,\n .ant-col-xxl-10,\n .ant-col-xxl-11,\n .ant-col-xxl-12,\n .ant-col-xxl-13,\n .ant-col-xxl-14,\n .ant-col-xxl-15,\n .ant-col-xxl-16,\n .ant-col-xxl-17,\n .ant-col-xxl-18,\n .ant-col-xxl-19,\n .ant-col-xxl-20,\n .ant-col-xxl-21,\n .ant-col-xxl-22,\n .ant-col-xxl-23,\n .ant-col-xxl-24 {\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n float: left;\n }\n .ant-col-xxl-24 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 100%;\n }\n .ant-col-xxl-push-24 {\n left: 100%;\n }\n .ant-col-xxl-pull-24 {\n right: 100%;\n }\n .ant-col-xxl-offset-24 {\n margin-left: 100%;\n }\n .ant-col-xxl-order-24 {\n -ms-flex-order: 24;\n order: 24;\n }\n .ant-col-xxl-23 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 95.83333333%;\n }\n .ant-col-xxl-push-23 {\n left: 95.83333333%;\n }\n .ant-col-xxl-pull-23 {\n right: 95.83333333%;\n }\n .ant-col-xxl-offset-23 {\n margin-left: 95.83333333%;\n }\n .ant-col-xxl-order-23 {\n -ms-flex-order: 23;\n order: 23;\n }\n .ant-col-xxl-22 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 91.66666667%;\n }\n .ant-col-xxl-push-22 {\n left: 91.66666667%;\n }\n .ant-col-xxl-pull-22 {\n right: 91.66666667%;\n }\n .ant-col-xxl-offset-22 {\n margin-left: 91.66666667%;\n }\n .ant-col-xxl-order-22 {\n -ms-flex-order: 22;\n order: 22;\n }\n .ant-col-xxl-21 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 87.5%;\n }\n .ant-col-xxl-push-21 {\n left: 87.5%;\n }\n .ant-col-xxl-pull-21 {\n right: 87.5%;\n }\n .ant-col-xxl-offset-21 {\n margin-left: 87.5%;\n }\n .ant-col-xxl-order-21 {\n -ms-flex-order: 21;\n order: 21;\n }\n .ant-col-xxl-20 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 83.33333333%;\n }\n .ant-col-xxl-push-20 {\n left: 83.33333333%;\n }\n .ant-col-xxl-pull-20 {\n right: 83.33333333%;\n }\n .ant-col-xxl-offset-20 {\n margin-left: 83.33333333%;\n }\n .ant-col-xxl-order-20 {\n -ms-flex-order: 20;\n order: 20;\n }\n .ant-col-xxl-19 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 79.16666667%;\n }\n .ant-col-xxl-push-19 {\n left: 79.16666667%;\n }\n .ant-col-xxl-pull-19 {\n right: 79.16666667%;\n }\n .ant-col-xxl-offset-19 {\n margin-left: 79.16666667%;\n }\n .ant-col-xxl-order-19 {\n -ms-flex-order: 19;\n order: 19;\n }\n .ant-col-xxl-18 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 75%;\n }\n .ant-col-xxl-push-18 {\n left: 75%;\n }\n .ant-col-xxl-pull-18 {\n right: 75%;\n }\n .ant-col-xxl-offset-18 {\n margin-left: 75%;\n }\n .ant-col-xxl-order-18 {\n -ms-flex-order: 18;\n order: 18;\n }\n .ant-col-xxl-17 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 70.83333333%;\n }\n .ant-col-xxl-push-17 {\n left: 70.83333333%;\n }\n .ant-col-xxl-pull-17 {\n right: 70.83333333%;\n }\n .ant-col-xxl-offset-17 {\n margin-left: 70.83333333%;\n }\n .ant-col-xxl-order-17 {\n -ms-flex-order: 17;\n order: 17;\n }\n .ant-col-xxl-16 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 66.66666667%;\n }\n .ant-col-xxl-push-16 {\n left: 66.66666667%;\n }\n .ant-col-xxl-pull-16 {\n right: 66.66666667%;\n }\n .ant-col-xxl-offset-16 {\n margin-left: 66.66666667%;\n }\n .ant-col-xxl-order-16 {\n -ms-flex-order: 16;\n order: 16;\n }\n .ant-col-xxl-15 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 62.5%;\n }\n .ant-col-xxl-push-15 {\n left: 62.5%;\n }\n .ant-col-xxl-pull-15 {\n right: 62.5%;\n }\n .ant-col-xxl-offset-15 {\n margin-left: 62.5%;\n }\n .ant-col-xxl-order-15 {\n -ms-flex-order: 15;\n order: 15;\n }\n .ant-col-xxl-14 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 58.33333333%;\n }\n .ant-col-xxl-push-14 {\n left: 58.33333333%;\n }\n .ant-col-xxl-pull-14 {\n right: 58.33333333%;\n }\n .ant-col-xxl-offset-14 {\n margin-left: 58.33333333%;\n }\n .ant-col-xxl-order-14 {\n -ms-flex-order: 14;\n order: 14;\n }\n .ant-col-xxl-13 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 54.16666667%;\n }\n .ant-col-xxl-push-13 {\n left: 54.16666667%;\n }\n .ant-col-xxl-pull-13 {\n right: 54.16666667%;\n }\n .ant-col-xxl-offset-13 {\n margin-left: 54.16666667%;\n }\n .ant-col-xxl-order-13 {\n -ms-flex-order: 13;\n order: 13;\n }\n .ant-col-xxl-12 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 50%;\n }\n .ant-col-xxl-push-12 {\n left: 50%;\n }\n .ant-col-xxl-pull-12 {\n right: 50%;\n }\n .ant-col-xxl-offset-12 {\n margin-left: 50%;\n }\n .ant-col-xxl-order-12 {\n -ms-flex-order: 12;\n order: 12;\n }\n .ant-col-xxl-11 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 45.83333333%;\n }\n .ant-col-xxl-push-11 {\n left: 45.83333333%;\n }\n .ant-col-xxl-pull-11 {\n right: 45.83333333%;\n }\n .ant-col-xxl-offset-11 {\n margin-left: 45.83333333%;\n }\n .ant-col-xxl-order-11 {\n -ms-flex-order: 11;\n order: 11;\n }\n .ant-col-xxl-10 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 41.66666667%;\n }\n .ant-col-xxl-push-10 {\n left: 41.66666667%;\n }\n .ant-col-xxl-pull-10 {\n right: 41.66666667%;\n }\n .ant-col-xxl-offset-10 {\n margin-left: 41.66666667%;\n }\n .ant-col-xxl-order-10 {\n -ms-flex-order: 10;\n order: 10;\n }\n .ant-col-xxl-9 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 37.5%;\n }\n .ant-col-xxl-push-9 {\n left: 37.5%;\n }\n .ant-col-xxl-pull-9 {\n right: 37.5%;\n }\n .ant-col-xxl-offset-9 {\n margin-left: 37.5%;\n }\n .ant-col-xxl-order-9 {\n -ms-flex-order: 9;\n order: 9;\n }\n .ant-col-xxl-8 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 33.33333333%;\n }\n .ant-col-xxl-push-8 {\n left: 33.33333333%;\n }\n .ant-col-xxl-pull-8 {\n right: 33.33333333%;\n }\n .ant-col-xxl-offset-8 {\n margin-left: 33.33333333%;\n }\n .ant-col-xxl-order-8 {\n -ms-flex-order: 8;\n order: 8;\n }\n .ant-col-xxl-7 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 29.16666667%;\n }\n .ant-col-xxl-push-7 {\n left: 29.16666667%;\n }\n .ant-col-xxl-pull-7 {\n right: 29.16666667%;\n }\n .ant-col-xxl-offset-7 {\n margin-left: 29.16666667%;\n }\n .ant-col-xxl-order-7 {\n -ms-flex-order: 7;\n order: 7;\n }\n .ant-col-xxl-6 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 25%;\n }\n .ant-col-xxl-push-6 {\n left: 25%;\n }\n .ant-col-xxl-pull-6 {\n right: 25%;\n }\n .ant-col-xxl-offset-6 {\n margin-left: 25%;\n }\n .ant-col-xxl-order-6 {\n -ms-flex-order: 6;\n order: 6;\n }\n .ant-col-xxl-5 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 20.83333333%;\n }\n .ant-col-xxl-push-5 {\n left: 20.83333333%;\n }\n .ant-col-xxl-pull-5 {\n right: 20.83333333%;\n }\n .ant-col-xxl-offset-5 {\n margin-left: 20.83333333%;\n }\n .ant-col-xxl-order-5 {\n -ms-flex-order: 5;\n order: 5;\n }\n .ant-col-xxl-4 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 16.66666667%;\n }\n .ant-col-xxl-push-4 {\n left: 16.66666667%;\n }\n .ant-col-xxl-pull-4 {\n right: 16.66666667%;\n }\n .ant-col-xxl-offset-4 {\n margin-left: 16.66666667%;\n }\n .ant-col-xxl-order-4 {\n -ms-flex-order: 4;\n order: 4;\n }\n .ant-col-xxl-3 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 12.5%;\n }\n .ant-col-xxl-push-3 {\n left: 12.5%;\n }\n .ant-col-xxl-pull-3 {\n right: 12.5%;\n }\n .ant-col-xxl-offset-3 {\n margin-left: 12.5%;\n }\n .ant-col-xxl-order-3 {\n -ms-flex-order: 3;\n order: 3;\n }\n .ant-col-xxl-2 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 8.33333333%;\n }\n .ant-col-xxl-push-2 {\n left: 8.33333333%;\n }\n .ant-col-xxl-pull-2 {\n right: 8.33333333%;\n }\n .ant-col-xxl-offset-2 {\n margin-left: 8.33333333%;\n }\n .ant-col-xxl-order-2 {\n -ms-flex-order: 2;\n order: 2;\n }\n .ant-col-xxl-1 {\n display: block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 4.16666667%;\n }\n .ant-col-xxl-push-1 {\n left: 4.16666667%;\n }\n .ant-col-xxl-pull-1 {\n right: 4.16666667%;\n }\n .ant-col-xxl-offset-1 {\n margin-left: 4.16666667%;\n }\n .ant-col-xxl-order-1 {\n -ms-flex-order: 1;\n order: 1;\n }\n .ant-col-xxl-0 {\n display: none;\n }\n .ant-col-push-0 {\n left: auto;\n }\n .ant-col-pull-0 {\n right: auto;\n }\n .ant-col-xxl-push-0 {\n left: auto;\n }\n .ant-col-xxl-pull-0 {\n right: auto;\n }\n .ant-col-xxl-offset-0 {\n margin-left: 0;\n }\n .ant-col-xxl-order-0 {\n -ms-flex-order: 0;\n order: 0;\n }\n}\n"],"sourceRoot":""}]);
|
||
|
||
// exports
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1033:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = exports.responsiveMap = exports.responsiveArray = void 0;
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
||
// matchMedia polyfill for
|
||
// https://github.com/WickyNilliams/enquire.js/issues/82
|
||
var enquire; // TODO: Will be removed in antd 4.0 because we will no longer support ie9
|
||
|
||
if (typeof window !== 'undefined') {
|
||
var matchMediaPolyfill = function matchMediaPolyfill(mediaQuery) {
|
||
return {
|
||
media: mediaQuery,
|
||
matches: false,
|
||
addListener: function addListener() {},
|
||
removeListener: function removeListener() {}
|
||
};
|
||
}; // ref: https://github.com/ant-design/ant-design/issues/18774
|
||
|
||
|
||
if (!window.matchMedia) window.matchMedia = matchMediaPolyfill; // eslint-disable-next-line global-require
|
||
|
||
enquire = __webpack_require__(1021);
|
||
}
|
||
|
||
var responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
|
||
exports.responsiveArray = responsiveArray;
|
||
var responsiveMap = {
|
||
xs: '(max-width: 575px)',
|
||
sm: '(min-width: 576px)',
|
||
md: '(min-width: 768px)',
|
||
lg: '(min-width: 992px)',
|
||
xl: '(min-width: 1200px)',
|
||
xxl: '(min-width: 1600px)'
|
||
};
|
||
exports.responsiveMap = responsiveMap;
|
||
var subscribers = [];
|
||
var subUid = -1;
|
||
var screens = {};
|
||
var responsiveObserve = {
|
||
dispatch: function dispatch(pointMap) {
|
||
screens = pointMap;
|
||
|
||
if (subscribers.length < 1) {
|
||
return false;
|
||
}
|
||
|
||
subscribers.forEach(function (item) {
|
||
item.func(screens);
|
||
});
|
||
return true;
|
||
},
|
||
subscribe: function subscribe(func) {
|
||
if (subscribers.length === 0) {
|
||
this.register();
|
||
}
|
||
|
||
var token = (++subUid).toString();
|
||
subscribers.push({
|
||
token: token,
|
||
func: func
|
||
});
|
||
func(screens);
|
||
return token;
|
||
},
|
||
unsubscribe: function unsubscribe(token) {
|
||
subscribers = subscribers.filter(function (item) {
|
||
return item.token !== token;
|
||
});
|
||
|
||
if (subscribers.length === 0) {
|
||
this.unregister();
|
||
}
|
||
},
|
||
unregister: function unregister() {
|
||
Object.keys(responsiveMap).map(function (screen) {
|
||
return enquire.unregister(responsiveMap[screen]);
|
||
});
|
||
},
|
||
register: function register() {
|
||
var _this = this;
|
||
|
||
Object.keys(responsiveMap).map(function (screen) {
|
||
return enquire.register(responsiveMap[screen], {
|
||
match: function match() {
|
||
var pointMap = _extends(_extends({}, screens), _defineProperty({}, screen, true));
|
||
|
||
_this.dispatch(pointMap);
|
||
},
|
||
unmatch: function unmatch() {
|
||
var pointMap = _extends(_extends({}, screens), _defineProperty({}, screen, false));
|
||
|
||
_this.dispatch(pointMap);
|
||
},
|
||
// Keep a empty destory to avoid triggering unmatch when unregister
|
||
destroy: function destroy() {}
|
||
});
|
||
});
|
||
}
|
||
};
|
||
var _default = responsiveObserve;
|
||
exports["default"] = _default;
|
||
//# sourceMappingURL=responsiveObserve.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1034:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
if (true) {
|
||
module.exports = __webpack_require__(1040);
|
||
} else {
|
||
module.exports = require('./cjs/react-is.development.js');
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1035:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||
|
||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var enhancer = function enhancer(WrappedComponent) {
|
||
return (
|
||
/*#__PURE__*/
|
||
function (_WrappedComponent) {
|
||
_inherits(Progress, _WrappedComponent);
|
||
|
||
function Progress() {
|
||
_classCallCheck(this, Progress);
|
||
|
||
return _possibleConstructorReturn(this, _getPrototypeOf(Progress).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(Progress, [{
|
||
key: "componentDidUpdate",
|
||
value: function componentDidUpdate() {
|
||
var _this = this;
|
||
|
||
var now = Date.now();
|
||
var updated = false;
|
||
Object.keys(this.paths).forEach(function (key) {
|
||
var path = _this.paths[key];
|
||
|
||
if (!path) {
|
||
return;
|
||
}
|
||
|
||
updated = true;
|
||
var pathStyle = path.style;
|
||
pathStyle.transitionDuration = '.3s, .3s, .3s, .06s';
|
||
|
||
if (_this.prevTimeStamp && now - _this.prevTimeStamp < 100) {
|
||
pathStyle.transitionDuration = '0s, 0s';
|
||
}
|
||
});
|
||
|
||
if (updated) {
|
||
this.prevTimeStamp = Date.now();
|
||
}
|
||
}
|
||
}, {
|
||
key: "render",
|
||
value: function render() {
|
||
return _get(_getPrototypeOf(Progress.prototype), "render", this).call(this);
|
||
}
|
||
}]);
|
||
|
||
return Progress;
|
||
}(WrappedComponent)
|
||
);
|
||
};
|
||
|
||
/* harmony default export */ __webpack_exports__["a"] = (enhancer);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1036:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return defaultProps; });
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return propTypes; });
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(1);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
|
||
|
||
var defaultProps = {
|
||
className: '',
|
||
percent: 0,
|
||
prefixCls: 'rc-progress',
|
||
strokeColor: '#2db7f5',
|
||
strokeLinecap: 'round',
|
||
strokeWidth: 1,
|
||
style: {},
|
||
trailColor: '#D9D9D9',
|
||
trailWidth: 1
|
||
};
|
||
var mixedType = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string]);
|
||
var propTypes = {
|
||
className: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,
|
||
percent: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType([mixedType, __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(mixedType)]),
|
||
prefixCls: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,
|
||
strokeColor: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object])), __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object]),
|
||
strokeLinecap: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOf(['butt', 'round', 'square']),
|
||
strokeWidth: mixedType,
|
||
style: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object,
|
||
trailColor: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,
|
||
trailWidth: mixedType
|
||
};
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1037:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = { "default": __webpack_require__(337), __esModule: true };
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1038:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
exports.__esModule = true;
|
||
|
||
var _from = __webpack_require__(1037);
|
||
|
||
var _from2 = _interopRequireDefault(_from);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
exports.default = function (arr) {
|
||
if (Array.isArray(arr)) {
|
||
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
|
||
arr2[i] = arr[i];
|
||
}
|
||
|
||
return arr2;
|
||
} else {
|
||
return (0, _from2.default)(arr);
|
||
}
|
||
};
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1039:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
/**
|
||
* Copyright 2015, Yahoo! Inc.
|
||
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
||
*/
|
||
var ReactIs = __webpack_require__(1034);
|
||
var REACT_STATICS = {
|
||
childContextTypes: true,
|
||
contextType: true,
|
||
contextTypes: true,
|
||
defaultProps: true,
|
||
displayName: true,
|
||
getDefaultProps: true,
|
||
getDerivedStateFromError: true,
|
||
getDerivedStateFromProps: true,
|
||
mixins: true,
|
||
propTypes: true,
|
||
type: true
|
||
};
|
||
|
||
var KNOWN_STATICS = {
|
||
name: true,
|
||
length: true,
|
||
prototype: true,
|
||
caller: true,
|
||
callee: true,
|
||
arguments: true,
|
||
arity: true
|
||
};
|
||
|
||
var FORWARD_REF_STATICS = {
|
||
'$$typeof': true,
|
||
render: true,
|
||
defaultProps: true,
|
||
displayName: true,
|
||
propTypes: true
|
||
};
|
||
|
||
var MEMO_STATICS = {
|
||
'$$typeof': true,
|
||
compare: true,
|
||
defaultProps: true,
|
||
displayName: true,
|
||
propTypes: true,
|
||
type: true
|
||
};
|
||
|
||
var TYPE_STATICS = {};
|
||
TYPE_STATICS[ReactIs.ForwardRef] = FORWARD_REF_STATICS;
|
||
|
||
function getStatics(component) {
|
||
if (ReactIs.isMemo(component)) {
|
||
return MEMO_STATICS;
|
||
}
|
||
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
||
}
|
||
|
||
var defineProperty = Object.defineProperty;
|
||
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
||
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||
var getPrototypeOf = Object.getPrototypeOf;
|
||
var objectPrototype = Object.prototype;
|
||
|
||
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
||
if (typeof sourceComponent !== 'string') {
|
||
// don't hoist over string (html) components
|
||
|
||
if (objectPrototype) {
|
||
var inheritedComponent = getPrototypeOf(sourceComponent);
|
||
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
||
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
||
}
|
||
}
|
||
|
||
var keys = getOwnPropertyNames(sourceComponent);
|
||
|
||
if (getOwnPropertySymbols) {
|
||
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
||
}
|
||
|
||
var targetStatics = getStatics(targetComponent);
|
||
var sourceStatics = getStatics(sourceComponent);
|
||
|
||
for (var i = 0; i < keys.length; ++i) {
|
||
var key = keys[i];
|
||
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
||
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
||
try {
|
||
// Avoid failures from read-only properties
|
||
defineProperty(targetComponent, key, descriptor);
|
||
} catch (e) {}
|
||
}
|
||
}
|
||
|
||
return targetComponent;
|
||
}
|
||
|
||
return targetComponent;
|
||
}
|
||
|
||
module.exports = hoistNonReactStatics;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1040:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/** @license React v16.8.6
|
||
* react-is.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
Object.defineProperty(exports,"__esModule",{value:!0});
|
||
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.memo"):
|
||
60115,r=b?Symbol.for("react.lazy"):60116;function t(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;
|
||
exports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||"object"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k};
|
||
exports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f};
|
||
exports.isSuspense=function(a){return t(a)===p};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1043:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||
|
||
// load the styles
|
||
var content = __webpack_require__(1044);
|
||
if(typeof content === 'string') content = [[module.i, content, '']];
|
||
// Prepare cssTransformation
|
||
var transform;
|
||
|
||
var options = {"hmr":false}
|
||
options.transform = transform
|
||
// add the styles to the DOM
|
||
var update = __webpack_require__(317)(content, options);
|
||
if(content.locals) module.exports = content.locals;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1044:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
exports = module.exports = __webpack_require__(316)(true);
|
||
// imports
|
||
|
||
|
||
// module
|
||
exports.push([module.i, ".ant-form{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\"}.ant-form legend{display:block;width:100%;margin-bottom:20px;padding:0;color:rgba(0,0,0,.45);font-size:16px;line-height:inherit;border:0;border-bottom:1px solid #d9d9d9}.ant-form label{font-size:14px}.ant-form input[type=search]{-webkit-box-sizing:border-box;box-sizing:border-box}.ant-form input[type=checkbox],.ant-form input[type=radio]{line-height:normal}.ant-form input[type=file]{display:block}.ant-form input[type=range]{display:block;width:100%}.ant-form select[multiple],.ant-form select[size]{height:auto}.ant-form input[type=checkbox]:focus,.ant-form input[type=file]:focus,.ant-form input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.ant-form output{display:block;padding-top:15px;color:rgba(0,0,0,.65);font-size:14px;line-height:1.5}.ant-form-item-required:before{display:inline-block;margin-right:4px;color:#f5222d;font-size:14px;font-family:SimSun,sans-serif;line-height:1;content:\"*\"}.ant-form-hide-required-mark .ant-form-item-required:before{display:none}.ant-form-item-label>label{color:rgba(0,0,0,.85)}.ant-form-item-label>label:after{content:\":\";position:relative;top:-.5px;margin:0 8px 0 2px}.ant-form-item-label>label.ant-form-item-no-colon:after{content:\" \"}.ant-form-item{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";margin-bottom:24px;vertical-align:top}.ant-form-item label{position:relative}.ant-form-item label>.anticon{font-size:14px;vertical-align:top}.ant-form-item-control{position:relative;line-height:40px;zoom:1}.ant-form-item-control:after,.ant-form-item-control:before{display:table;content:\"\"}.ant-form-item-control:after{clear:both}.ant-form-item-children{position:relative}.ant-form-item-with-help{margin-bottom:5px}.ant-form-item-label{display:inline-block;overflow:hidden;line-height:39.9999px;white-space:nowrap;text-align:right;vertical-align:middle}.ant-form-item-label-left{text-align:left}.ant-form-item .ant-switch{margin:2px 0 4px}.ant-form-explain,.ant-form-extra{clear:both;min-height:22px;margin-top:-2px;color:rgba(0,0,0,.45);font-size:14px;line-height:1.5;-webkit-transition:color .3s cubic-bezier(.215,.61,.355,1);-o-transition:color .3s cubic-bezier(.215,.61,.355,1);transition:color .3s cubic-bezier(.215,.61,.355,1)}.ant-form-explain{margin-bottom:-1px}.ant-form-extra{padding-top:4px}.ant-form-text{display:inline-block;padding-right:8px}.ant-form-split{display:block;text-align:center}form .has-feedback .ant-input{padding-right:30px}form .has-feedback .ant-input-affix-wrapper .ant-input-suffix{padding-right:18px}form .has-feedback .ant-input-affix-wrapper .ant-input{padding-right:49px}form .has-feedback .ant-input-affix-wrapper.ant-input-affix-wrapper-input-with-clear-btn .ant-input{padding-right:68px}form .has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-arrow,form .has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-selection__clear,form .has-feedback>.ant-select .ant-select-arrow,form .has-feedback>.ant-select .ant-select-selection__clear{right:28px}form .has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-selection-selected-value,form .has-feedback>.ant-select .ant-select-selection-selected-value{padding-right:42px}form .has-feedback .ant-cascader-picker-arrow{margin-right:17px}form .has-feedback .ant-calendar-picker-clear,form .has-feedback .ant-calendar-picker-icon,form .has-feedback .ant-cascader-picker-clear,form .has-feedback .ant-input-search:not(.ant-input-search-enter-button) .ant-input-suffix,form .has-feedback .ant-time-picker-clear,form .has-feedback .ant-time-picker-icon{right:28px}form .ant-mentions,form textarea.ant-input{height:auto;margin-bottom:4px}form .ant-upload{background:transparent}form input[type=checkbox],form input[type=radio]{width:14px;height:14px}form .ant-checkbox-inline,form .ant-radio-inline{display:inline-block;margin-left:8px;font-weight:400;vertical-align:middle;cursor:pointer}form .ant-checkbox-inline:first-child,form .ant-radio-inline:first-child{margin-left:0}form .ant-checkbox-vertical,form .ant-radio-vertical{display:block}form .ant-checkbox-vertical+.ant-checkbox-vertical,form .ant-radio-vertical+.ant-radio-vertical{margin-left:0}form .ant-input-number+.ant-form-text{margin-left:8px}form .ant-input-number-handler-wrap{z-index:2}form .ant-cascader-picker,form .ant-select{width:100%}form .ant-input-group .ant-cascader-picker,form .ant-input-group .ant-select{width:auto}form .ant-input-group-wrapper,form :not(.ant-input-group-wrapper)>.ant-input-group{display:inline-block;vertical-align:middle}form:not(.ant-form-vertical) .ant-input-group-wrapper,form:not(.ant-form-vertical) :not(.ant-input-group-wrapper)>.ant-input-group{position:relative;top:-1px}.ant-col-24.ant-form-item-label,.ant-col-xl-24.ant-form-item-label,.ant-form-vertical .ant-form-item-label{display:block;margin:0;padding:0 0 8px;line-height:1.5;white-space:normal;text-align:left}.ant-col-24.ant-form-item-label label:after,.ant-col-xl-24.ant-form-item-label label:after,.ant-form-vertical .ant-form-item-label label:after{display:none}.ant-form-vertical .ant-form-item{padding-bottom:8px}.ant-form-vertical .ant-form-item-control{line-height:1.5}.ant-form-vertical .ant-form-explain{margin-top:2px;margin-bottom:-5px}.ant-form-vertical .ant-form-extra{margin-top:2px;margin-bottom:-4px}@media (max-width:575px){.ant-form-item-control-wrapper,.ant-form-item-label{display:block;width:100%}.ant-form-item-label{display:block;margin:0;padding:0 0 8px;line-height:1.5;white-space:normal;text-align:left}.ant-form-item-label label:after{display:none}.ant-col-xs-24.ant-form-item-label{display:block;margin:0;padding:0 0 8px;line-height:1.5;white-space:normal;text-align:left}.ant-col-xs-24.ant-form-item-label label:after{display:none}}@media (max-width:767px){.ant-col-sm-24.ant-form-item-label{display:block;margin:0;padding:0 0 8px;line-height:1.5;white-space:normal;text-align:left}.ant-col-sm-24.ant-form-item-label label:after{display:none}}@media (max-width:991px){.ant-col-md-24.ant-form-item-label{display:block;margin:0;padding:0 0 8px;line-height:1.5;white-space:normal;text-align:left}.ant-col-md-24.ant-form-item-label label:after{display:none}}@media (max-width:1199px){.ant-col-lg-24.ant-form-item-label{display:block;margin:0;padding:0 0 8px;line-height:1.5;white-space:normal;text-align:left}.ant-col-lg-24.ant-form-item-label label:after{display:none}}@media (max-width:1599px){.ant-col-xl-24.ant-form-item-label{display:block;margin:0;padding:0 0 8px;line-height:1.5;white-space:normal;text-align:left}.ant-col-xl-24.ant-form-item-label label:after{display:none}}.ant-form-inline .ant-form-item{display:inline-block;margin-right:16px;margin-bottom:0}.ant-form-inline .ant-form-item-with-help{margin-bottom:24px}.ant-form-inline .ant-form-item>.ant-form-item-control-wrapper,.ant-form-inline .ant-form-item>.ant-form-item-label{display:inline-block;vertical-align:top}.ant-form-inline .ant-form-text,.ant-form-inline .has-feedback{display:inline-block}.has-error.has-feedback .ant-form-item-children-icon,.has-success.has-feedback .ant-form-item-children-icon,.has-warning.has-feedback .ant-form-item-children-icon,.is-validating.has-feedback .ant-form-item-children-icon{position:absolute;top:50%;right:0;z-index:1;width:32px;height:20px;margin-top:-10px;font-size:14px;line-height:20px;text-align:center;visibility:visible;-webkit-animation:zoomIn .3s cubic-bezier(.12,.4,.29,1.46);animation:zoomIn .3s cubic-bezier(.12,.4,.29,1.46);pointer-events:none}.has-error.has-feedback .ant-form-item-children-icon svg,.has-success.has-feedback .ant-form-item-children-icon svg,.has-warning.has-feedback .ant-form-item-children-icon svg,.is-validating.has-feedback .ant-form-item-children-icon svg{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto}.has-success.has-feedback .ant-form-item-children-icon{color:#52c41a;-webkit-animation-name:diffZoomIn1!important;animation-name:diffZoomIn1!important}.has-warning .ant-form-explain,.has-warning .ant-form-split{color:#faad14}.has-warning .ant-input,.has-warning .ant-input:hover{background-color:#fff;border-color:#faad14}.has-warning .ant-input:focus{border-color:#ffc53d;border-right-width:1px!important;outline:0;-webkit-box-shadow:0 0 0 2px rgba(250,173,20,.2);box-shadow:0 0 0 2px rgba(250,173,20,.2)}.has-warning .ant-input:not([disabled]):hover{border-color:#faad14}.has-warning .ant-calendar-picker-open .ant-calendar-picker-input{border-color:#ffc53d;border-right-width:1px!important;outline:0;-webkit-box-shadow:0 0 0 2px rgba(250,173,20,.2);box-shadow:0 0 0 2px rgba(250,173,20,.2)}.has-warning .ant-input-affix-wrapper .ant-input,.has-warning .ant-input-affix-wrapper .ant-input:hover{background-color:#fff;border-color:#faad14}.has-warning .ant-input-affix-wrapper .ant-input:focus{border-color:#ffc53d;border-right-width:1px!important;outline:0;-webkit-box-shadow:0 0 0 2px rgba(250,173,20,.2);box-shadow:0 0 0 2px rgba(250,173,20,.2)}.has-warning .ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled){border-color:#faad14}.has-warning .ant-input-prefix{color:#faad14}.has-warning .ant-input-group-addon{color:#faad14;background-color:#fff;border-color:#faad14}.has-warning .has-feedback{color:#faad14}.has-warning.has-feedback .ant-form-item-children-icon{color:#faad14;-webkit-animation-name:diffZoomIn3!important;animation-name:diffZoomIn3!important}.has-warning .ant-select-selection,.has-warning .ant-select-selection:hover{border-color:#faad14}.has-warning .ant-select-focused .ant-select-selection,.has-warning .ant-select-open .ant-select-selection{border-color:#ffc53d;border-right-width:1px!important;outline:0;-webkit-box-shadow:0 0 0 2px rgba(250,173,20,.2);box-shadow:0 0 0 2px rgba(250,173,20,.2)}.has-warning .ant-calendar-picker-icon:after,.has-warning .ant-cascader-picker-arrow,.has-warning .ant-picker-icon:after,.has-warning .ant-select-arrow,.has-warning .ant-time-picker-icon:after{color:#faad14}.has-warning .ant-input-number,.has-warning .ant-time-picker-input{border-color:#faad14}.has-warning .ant-input-number-focused,.has-warning .ant-input-number:focus,.has-warning .ant-time-picker-input-focused,.has-warning .ant-time-picker-input:focus{border-color:#ffc53d;border-right-width:1px!important;outline:0;-webkit-box-shadow:0 0 0 2px rgba(250,173,20,.2);box-shadow:0 0 0 2px rgba(250,173,20,.2)}.has-warning .ant-input-number:not([disabled]):hover,.has-warning .ant-time-picker-input:not([disabled]):hover{border-color:#faad14}.has-warning .ant-cascader-picker:focus .ant-cascader-input{border-color:#ffc53d;border-right-width:1px!important;outline:0;-webkit-box-shadow:0 0 0 2px rgba(250,173,20,.2);box-shadow:0 0 0 2px rgba(250,173,20,.2)}.has-warning .ant-cascader-picker:hover .ant-cascader-input{border-color:#faad14}.has-error .ant-form-explain,.has-error .ant-form-split{color:#f5222d}.has-error .ant-input,.has-error .ant-input:hover{background-color:#fff;border-color:#f5222d}.has-error .ant-input:focus{border-color:#ff4d4f;border-right-width:1px!important;outline:0;-webkit-box-shadow:0 0 0 2px rgba(245,34,45,.2);box-shadow:0 0 0 2px rgba(245,34,45,.2)}.has-error .ant-input:not([disabled]):hover{border-color:#f5222d}.has-error .ant-calendar-picker-open .ant-calendar-picker-input{border-color:#ff4d4f;border-right-width:1px!important;outline:0;-webkit-box-shadow:0 0 0 2px rgba(245,34,45,.2);box-shadow:0 0 0 2px rgba(245,34,45,.2)}.has-error .ant-input-affix-wrapper .ant-input,.has-error .ant-input-affix-wrapper .ant-input:hover{background-color:#fff;border-color:#f5222d}.has-error .ant-input-affix-wrapper .ant-input:focus{border-color:#ff4d4f;border-right-width:1px!important;outline:0;-webkit-box-shadow:0 0 0 2px rgba(245,34,45,.2);box-shadow:0 0 0 2px rgba(245,34,45,.2)}.has-error .ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled){border-color:#f5222d}.has-error .ant-input-prefix{color:#f5222d}.has-error .ant-input-group-addon{color:#f5222d;background-color:#fff;border-color:#f5222d}.has-error .has-feedback{color:#f5222d}.has-error.has-feedback .ant-form-item-children-icon{color:#f5222d;-webkit-animation-name:diffZoomIn2!important;animation-name:diffZoomIn2!important}.has-error .ant-select-selection,.has-error .ant-select-selection:hover{border-color:#f5222d}.has-error .ant-select-focused .ant-select-selection,.has-error .ant-select-open .ant-select-selection{border-color:#ff4d4f;border-right-width:1px!important;outline:0;-webkit-box-shadow:0 0 0 2px rgba(245,34,45,.2);box-shadow:0 0 0 2px rgba(245,34,45,.2)}.has-error .ant-select.ant-select-auto-complete .ant-input:focus{border-color:#f5222d}.has-error .ant-input-group-addon .ant-select-selection{border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.has-error .ant-calendar-picker-icon:after,.has-error .ant-cascader-picker-arrow,.has-error .ant-picker-icon:after,.has-error .ant-select-arrow,.has-error .ant-time-picker-icon:after{color:#f5222d}.has-error .ant-input-number,.has-error .ant-time-picker-input{border-color:#f5222d}.has-error .ant-input-number-focused,.has-error .ant-input-number:focus,.has-error .ant-time-picker-input-focused,.has-error .ant-time-picker-input:focus{border-color:#ff4d4f;border-right-width:1px!important;outline:0;-webkit-box-shadow:0 0 0 2px rgba(245,34,45,.2);box-shadow:0 0 0 2px rgba(245,34,45,.2)}.has-error .ant-input-number:not([disabled]):hover,.has-error .ant-mention-wrapper .ant-mention-editor,.has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):hover,.has-error .ant-time-picker-input:not([disabled]):hover{border-color:#f5222d}.has-error .ant-cascader-picker:focus .ant-cascader-input,.has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor,.has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus{border-color:#ff4d4f;border-right-width:1px!important;outline:0;-webkit-box-shadow:0 0 0 2px rgba(245,34,45,.2);box-shadow:0 0 0 2px rgba(245,34,45,.2)}.has-error .ant-cascader-picker:hover .ant-cascader-input,.has-error .ant-transfer-list{border-color:#f5222d}.has-error .ant-transfer-list-search:not([disabled]){border-color:#d9d9d9}.has-error .ant-transfer-list-search:not([disabled]):hover{border-color:#40a9ff;border-right-width:1px!important}.has-error .ant-transfer-list-search:not([disabled]):focus{border-color:#40a9ff;border-right-width:1px!important;outline:0;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.is-validating.has-feedback .ant-form-item-children-icon{display:inline-block;color:#1890ff}.ant-advanced-search-form .ant-form-item{margin-bottom:24px}.ant-advanced-search-form .ant-form-item-with-help{margin-bottom:5px}.show-help-appear,.show-help-enter,.show-help-leave{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.show-help-appear.show-help-appear-active,.show-help-enter.show-help-enter-active{-webkit-animation-name:antShowHelpIn;animation-name:antShowHelpIn;-webkit-animation-play-state:running;animation-play-state:running}.show-help-leave.show-help-leave-active{-webkit-animation-name:antShowHelpOut;animation-name:antShowHelpOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.show-help-appear,.show-help-enter{opacity:0}.show-help-appear,.show-help-enter,.show-help-leave{-webkit-animation-timing-function:cubic-bezier(.645,.045,.355,1);animation-timing-function:cubic-bezier(.645,.045,.355,1)}@-webkit-keyframes antShowHelpIn{0%{-webkit-transform:translateY(-5px);transform:translateY(-5px);opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}@keyframes antShowHelpIn{0%{-webkit-transform:translateY(-5px);transform:translateY(-5px);opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}@-webkit-keyframes antShowHelpOut{to{-webkit-transform:translateY(-5px);transform:translateY(-5px);opacity:0}}@keyframes antShowHelpOut{to{-webkit-transform:translateY(-5px);transform:translateY(-5px);opacity:0}}@-webkit-keyframes diffZoomIn1{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes diffZoomIn1{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes diffZoomIn2{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes diffZoomIn2{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes diffZoomIn3{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes diffZoomIn3{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}", "", {"version":3,"sources":["/Users/hs/forgeplus-react/node_modules/antd/lib/form/style/index.css"],"names":[],"mappings":"AAIA,UACE,8BAA+B,AACvB,sBAAuB,AAC/B,SAAU,AACV,UAAW,AACX,sBAA2B,AAC3B,eAAgB,AAChB,0BAA2B,AAC3B,gBAAiB,AACjB,gBAAiB,AACjB,qCAAsC,AAC9B,4BAA8B,CACvC,AACD,iBACE,cAAe,AACf,WAAY,AACZ,mBAAoB,AACpB,UAAW,AACX,sBAA2B,AAC3B,eAAgB,AAChB,oBAAqB,AACrB,SAAU,AACV,+BAAiC,CAClC,AACD,gBACE,cAAgB,CACjB,AACD,6BACE,8BAA+B,AACvB,qBAAuB,CAChC,AACD,2DAEE,kBAAoB,CACrB,AACD,2BACE,aAAe,CAChB,AACD,4BACE,cAAe,AACf,UAAY,CACb,AACD,kDAEE,WAAa,CACd,AACD,wGAGE,oBAAqB,AACrB,0CAA2C,AAC3C,mBAAqB,CACtB,AACD,iBACE,cAAe,AACf,iBAAkB,AAClB,sBAA2B,AAC3B,eAAgB,AAChB,eAAiB,CAClB,AACD,+BACE,qBAAsB,AACtB,iBAAkB,AAClB,cAAe,AACf,eAAgB,AAChB,8BAAgC,AAChC,cAAe,AACf,WAAa,CACd,AACD,4DACE,YAAc,CACf,AACD,2BACE,qBAA2B,CAC5B,AACD,iCACE,YAAa,AACb,kBAAmB,AACnB,UAAY,AACZ,kBAAoB,CACrB,AACD,wDACE,WAAa,CACd,AACD,eACE,8BAA+B,AACvB,sBAAuB,AAC/B,SAAU,AACV,UAAW,AACX,sBAA2B,AAC3B,eAAgB,AAChB,0BAA2B,AAC3B,gBAAiB,AACjB,gBAAiB,AACjB,qCAAsC,AAC9B,6BAA8B,AACtC,mBAAoB,AACpB,kBAAoB,CACrB,AACD,qBACE,iBAAmB,CACpB,AACD,8BACE,eAAgB,AAChB,kBAAoB,CACrB,AACD,uBACE,kBAAmB,AACnB,iBAAkB,AAClB,MAAQ,CACT,AACD,2DAEE,cAAe,AACf,UAAY,CACb,AACD,6BACE,UAAY,CACb,AACD,wBACE,iBAAmB,CACpB,AACD,yBACE,iBAAmB,CACpB,AACD,qBACE,qBAAsB,AACtB,gBAAiB,AACjB,sBAAuB,AACvB,mBAAoB,AACpB,iBAAkB,AAClB,qBAAuB,CACxB,AACD,0BACE,eAAiB,CAClB,AACD,2BACE,gBAAkB,CACnB,AACD,kCAEE,WAAY,AACZ,gBAAiB,AACjB,gBAAiB,AACjB,sBAA2B,AAC3B,eAAgB,AAChB,gBAAiB,AACjB,2DAAmE,AACnE,sDAA8D,AAC9D,kDAA2D,CAC5D,AACD,kBACE,kBAAoB,CACrB,AACD,gBACE,eAAiB,CAClB,AACD,eACE,qBAAsB,AACtB,iBAAmB,CACpB,AACD,gBACE,cAAe,AACf,iBAAmB,CACpB,AACD,8BACE,kBAAoB,CACrB,AACD,8DACE,kBAAoB,CACrB,AACD,uDACE,kBAAoB,CACrB,AACD,oGACE,kBAAoB,CACrB,AACD,oRAIE,UAAY,CACb,AACD,qKAEE,kBAAoB,CACrB,AACD,8CACE,iBAAmB,CACpB,AAOD,uTAIE,UAAY,CACb,AACD,2CAEE,YAAa,AACb,iBAAmB,CACpB,AACD,iBACE,sBAAwB,CACzB,AACD,iDAEE,WAAY,AACZ,WAAa,CACd,AACD,iDAEE,qBAAsB,AACtB,gBAAiB,AACjB,gBAAoB,AACpB,sBAAuB,AACvB,cAAgB,CACjB,AACD,yEAEE,aAAe,CAChB,AACD,qDAEE,aAAe,CAChB,AACD,gGAEE,aAAe,CAChB,AACD,sCACE,eAAiB,CAClB,AACD,oCACE,SAAW,CACZ,AACD,2CAEE,UAAY,CACb,AACD,6EAEE,UAAY,CACb,AACD,mFAEE,qBAAsB,AACtB,qBAAuB,CACxB,AACD,mIAEE,kBAAmB,AACnB,QAAU,CACX,AACD,2GAGE,cAAe,AACf,SAAU,AACV,gBAAiB,AACjB,gBAAiB,AACjB,mBAAqB,AACrB,eAAiB,CAClB,AACD,+IAGE,YAAc,CACf,AACD,kCACE,kBAAoB,CACrB,AACD,0CACE,eAAiB,CAClB,AACD,qCACE,eAAgB,AAChB,kBAAoB,CACrB,AACD,mCACE,eAAgB,AAChB,kBAAoB,CACrB,AACD,yBACE,oDAEE,cAAe,AACf,UAAY,CACb,AACD,qBACE,cAAe,AACf,SAAU,AACV,gBAAiB,AACjB,gBAAiB,AACjB,mBAAqB,AACrB,eAAiB,CAClB,AACD,iCACE,YAAc,CACf,AACD,mCACE,cAAe,AACf,SAAU,AACV,gBAAiB,AACjB,gBAAiB,AACjB,mBAAqB,AACrB,eAAiB,CAClB,AACD,+CACE,YAAc,CACf,CACF,AACD,yBACE,mCACE,cAAe,AACf,SAAU,AACV,gBAAiB,AACjB,gBAAiB,AACjB,mBAAqB,AACrB,eAAiB,CAClB,AACD,+CACE,YAAc,CACf,CACF,AACD,yBACE,mCACE,cAAe,AACf,SAAU,AACV,gBAAiB,AACjB,gBAAiB,AACjB,mBAAqB,AACrB,eAAiB,CAClB,AACD,+CACE,YAAc,CACf,CACF,AACD,0BACE,mCACE,cAAe,AACf,SAAU,AACV,gBAAiB,AACjB,gBAAiB,AACjB,mBAAqB,AACrB,eAAiB,CAClB,AACD,+CACE,YAAc,CACf,CACF,AACD,0BACE,mCACE,cAAe,AACf,SAAU,AACV,gBAAiB,AACjB,gBAAiB,AACjB,mBAAqB,AACrB,eAAiB,CAClB,AACD,+CACE,YAAc,CACf,CACF,AACD,gCACE,qBAAsB,AACtB,kBAAmB,AACnB,eAAiB,CAClB,AACD,0CACE,kBAAoB,CACrB,AACD,oHAEE,qBAAsB,AACtB,kBAAoB,CACrB,AAID,+DACE,oBAAsB,CACvB,AACD,4NAIE,kBAAmB,AACnB,QAAS,AACT,QAAS,AACT,UAAW,AACX,WAAY,AACZ,YAAa,AACb,iBAAkB,AAClB,eAAgB,AAChB,iBAAkB,AAClB,kBAAmB,AACnB,mBAAoB,AACpB,2DAAmE,AAC3D,mDAA2D,AACnE,mBAAqB,CACtB,AACD,4OAIE,kBAAmB,AACnB,MAAO,AACP,QAAS,AACT,SAAU,AACV,OAAQ,AACR,WAAa,CACd,AACD,uDACE,cAAe,AACf,6CAA+C,AACvC,oCAAuC,CAChD,AACD,4DAEE,aAAe,CAChB,AACD,sDAEE,sBAAuB,AACvB,oBAAsB,CACvB,AACD,8BACE,qBAAsB,AACtB,iCAAmC,AACnC,UAAW,AACX,iDAAsD,AAC9C,wCAA8C,CACvD,AACD,8CACE,oBAAsB,CACvB,AACD,kEACE,qBAAsB,AACtB,iCAAmC,AACnC,UAAW,AACX,iDAAsD,AAC9C,wCAA8C,CACvD,AACD,wGAEE,sBAAuB,AACvB,oBAAsB,CACvB,AACD,uDACE,qBAAsB,AACtB,iCAAmC,AACnC,UAAW,AACX,iDAAsD,AAC9C,wCAA8C,CACvD,AACD,gFACE,oBAAsB,CACvB,AACD,+BACE,aAAe,CAChB,AACD,oCACE,cAAe,AACf,sBAAuB,AACvB,oBAAsB,CACvB,AACD,2BACE,aAAe,CAChB,AACD,uDACE,cAAe,AACf,6CAA+C,AACvC,oCAAuC,CAChD,AAID,4EACE,oBAAsB,CACvB,AACD,2GAEE,qBAAsB,AACtB,iCAAmC,AACnC,UAAW,AACX,iDAAsD,AAC9C,wCAA8C,CACvD,AACD,iMAKE,aAAe,CAChB,AACD,mEAEE,oBAAsB,CACvB,AACD,kKAIE,qBAAsB,AACtB,iCAAmC,AACnC,UAAW,AACX,iDAAsD,AAC9C,wCAA8C,CACvD,AACD,+GAEE,oBAAsB,CACvB,AACD,4DACE,qBAAsB,AACtB,iCAAmC,AACnC,UAAW,AACX,iDAAsD,AAC9C,wCAA8C,CACvD,AACD,4DACE,oBAAsB,CACvB,AACD,wDAEE,aAAe,CAChB,AACD,kDAEE,sBAAuB,AACvB,oBAAsB,CACvB,AACD,4BACE,qBAAsB,AACtB,iCAAmC,AACnC,UAAW,AACX,gDAAqD,AAC7C,uCAA6C,CACtD,AACD,4CACE,oBAAsB,CACvB,AACD,gEACE,qBAAsB,AACtB,iCAAmC,AACnC,UAAW,AACX,gDAAqD,AAC7C,uCAA6C,CACtD,AACD,oGAEE,sBAAuB,AACvB,oBAAsB,CACvB,AACD,qDACE,qBAAsB,AACtB,iCAAmC,AACnC,UAAW,AACX,gDAAqD,AAC7C,uCAA6C,CACtD,AACD,8EACE,oBAAsB,CACvB,AACD,6BACE,aAAe,CAChB,AACD,kCACE,cAAe,AACf,sBAAuB,AACvB,oBAAsB,CACvB,AACD,yBACE,aAAe,CAChB,AACD,qDACE,cAAe,AACf,6CAA+C,AACvC,oCAAuC,CAChD,AAID,wEACE,oBAAsB,CACvB,AACD,uGAEE,qBAAsB,AACtB,iCAAmC,AACnC,UAAW,AACX,gDAAqD,AAC7C,uCAA6C,CACtD,AACD,iEACE,oBAAsB,CACvB,AACD,wDACE,yBAA0B,AAC1B,wBAAyB,AACjB,eAAiB,CAC1B,AACD,uLAKE,aAAe,CAChB,AACD,+DAEE,oBAAsB,CACvB,AACD,0JAIE,qBAAsB,AACtB,iCAAmC,AACnC,UAAW,AACX,gDAAqD,AAC7C,uCAA6C,CACtD,AAKD,yOAEE,oBAAsB,CACvB,AASD,2NACE,qBAAsB,AACtB,iCAAmC,AACnC,UAAW,AACX,gDAAqD,AAC7C,uCAA6C,CACtD,AAID,wFACE,oBAAsB,CACvB,AACD,qDACE,oBAAsB,CACvB,AACD,2DACE,qBAAsB,AACtB,gCAAmC,CACpC,AACD,2DACE,qBAAsB,AACtB,iCAAmC,AACnC,UAAW,AACX,iDAAsD,AAC9C,wCAA8C,CACvD,AACD,yDACE,qBAAsB,AACtB,aAAe,CAChB,AACD,yCACE,kBAAoB,CACrB,AACD,mDACE,iBAAmB,CACpB,AAUD,oDACE,+BAAiC,AACzB,uBAAyB,AACjC,iCAAkC,AAC1B,yBAA0B,AAClC,oCAAqC,AAC7B,2BAA6B,CACtC,AACD,kFAEE,qCAAsC,AAC9B,6BAA8B,AACtC,qCAAsC,AAC9B,4BAA8B,CACvC,AACD,wCACE,sCAAuC,AAC/B,8BAA+B,AACvC,qCAAsC,AAC9B,6BAA8B,AACtC,mBAAqB,CACtB,AACD,mCAEE,SAAW,CAGZ,AACD,oDAHE,iEAAwE,AAChE,wDAAgE,CAKzE,AACD,iCACE,GACE,mCAAoC,AAC5B,2BAA4B,AACpC,SAAW,CACZ,AACD,GACE,gCAAiC,AACzB,wBAAyB,AACjC,SAAW,CACZ,CACF,AACD,yBACE,GACE,mCAAoC,AAC5B,2BAA4B,AACpC,SAAW,CACZ,AACD,GACE,gCAAiC,AACzB,wBAAyB,AACjC,SAAW,CACZ,CACF,AACD,kCACE,GACE,mCAAoC,AAC5B,2BAA4B,AACpC,SAAW,CACZ,CACF,AACD,0BACE,GACE,mCAAoC,AAC5B,2BAA4B,AACpC,SAAW,CACZ,CACF,AACD,+BACE,GACE,2BAA4B,AACpB,kBAAoB,CAC7B,AACD,GACE,2BAA4B,AACpB,kBAAoB,CAC7B,CACF,AACD,uBACE,GACE,2BAA4B,AACpB,kBAAoB,CAC7B,AACD,GACE,2BAA4B,AACpB,kBAAoB,CAC7B,CACF,AACD,+BACE,GACE,2BAA4B,AACpB,kBAAoB,CAC7B,AACD,GACE,2BAA4B,AACpB,kBAAoB,CAC7B,CACF,AACD,uBACE,GACE,2BAA4B,AACpB,kBAAoB,CAC7B,AACD,GACE,2BAA4B,AACpB,kBAAoB,CAC7B,CACF,AACD,+BACE,GACE,2BAA4B,AACpB,kBAAoB,CAC7B,AACD,GACE,2BAA4B,AACpB,kBAAoB,CAC7B,CACF,AACD,uBACE,GACE,2BAA4B,AACpB,kBAAoB,CAC7B,AACD,GACE,2BAA4B,AACpB,kBAAoB,CAC7B,CACF","file":"index.css","sourcesContent":["/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.ant-form {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.65);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5;\n list-style: none;\n -webkit-font-feature-settings: 'tnum';\n font-feature-settings: 'tnum';\n}\n.ant-form legend {\n display: block;\n width: 100%;\n margin-bottom: 20px;\n padding: 0;\n color: rgba(0, 0, 0, 0.45);\n font-size: 16px;\n line-height: inherit;\n border: 0;\n border-bottom: 1px solid #d9d9d9;\n}\n.ant-form label {\n font-size: 14px;\n}\n.ant-form input[type='search'] {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ant-form input[type='radio'],\n.ant-form input[type='checkbox'] {\n line-height: normal;\n}\n.ant-form input[type='file'] {\n display: block;\n}\n.ant-form input[type='range'] {\n display: block;\n width: 100%;\n}\n.ant-form select[multiple],\n.ant-form select[size] {\n height: auto;\n}\n.ant-form input[type='file']:focus,\n.ant-form input[type='radio']:focus,\n.ant-form input[type='checkbox']:focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n.ant-form output {\n display: block;\n padding-top: 15px;\n color: rgba(0, 0, 0, 0.65);\n font-size: 14px;\n line-height: 1.5;\n}\n.ant-form-item-required::before {\n display: inline-block;\n margin-right: 4px;\n color: #f5222d;\n font-size: 14px;\n font-family: SimSun, sans-serif;\n line-height: 1;\n content: '*';\n}\n.ant-form-hide-required-mark .ant-form-item-required::before {\n display: none;\n}\n.ant-form-item-label > label {\n color: rgba(0, 0, 0, 0.85);\n}\n.ant-form-item-label > label::after {\n content: ':';\n position: relative;\n top: -0.5px;\n margin: 0 8px 0 2px;\n}\n.ant-form-item-label > label.ant-form-item-no-colon::after {\n content: ' ';\n}\n.ant-form-item {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.65);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5;\n list-style: none;\n -webkit-font-feature-settings: 'tnum';\n font-feature-settings: 'tnum';\n margin-bottom: 24px;\n vertical-align: top;\n}\n.ant-form-item label {\n position: relative;\n}\n.ant-form-item label > .anticon {\n font-size: 14px;\n vertical-align: top;\n}\n.ant-form-item-control {\n position: relative;\n line-height: 40px;\n zoom: 1;\n}\n.ant-form-item-control::before,\n.ant-form-item-control::after {\n display: table;\n content: '';\n}\n.ant-form-item-control::after {\n clear: both;\n}\n.ant-form-item-children {\n position: relative;\n}\n.ant-form-item-with-help {\n margin-bottom: 5px;\n}\n.ant-form-item-label {\n display: inline-block;\n overflow: hidden;\n line-height: 39.9999px;\n white-space: nowrap;\n text-align: right;\n vertical-align: middle;\n}\n.ant-form-item-label-left {\n text-align: left;\n}\n.ant-form-item .ant-switch {\n margin: 2px 0 4px;\n}\n.ant-form-explain,\n.ant-form-extra {\n clear: both;\n min-height: 22px;\n margin-top: -2px;\n color: rgba(0, 0, 0, 0.45);\n font-size: 14px;\n line-height: 1.5;\n -webkit-transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);\n -o-transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);\n transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);\n}\n.ant-form-explain {\n margin-bottom: -1px;\n}\n.ant-form-extra {\n padding-top: 4px;\n}\n.ant-form-text {\n display: inline-block;\n padding-right: 8px;\n}\n.ant-form-split {\n display: block;\n text-align: center;\n}\nform .has-feedback .ant-input {\n padding-right: 30px;\n}\nform .has-feedback .ant-input-affix-wrapper .ant-input-suffix {\n padding-right: 18px;\n}\nform .has-feedback .ant-input-affix-wrapper .ant-input {\n padding-right: 49px;\n}\nform .has-feedback .ant-input-affix-wrapper.ant-input-affix-wrapper-input-with-clear-btn .ant-input {\n padding-right: 68px;\n}\nform .has-feedback > .ant-select .ant-select-arrow,\nform .has-feedback > .ant-select .ant-select-selection__clear,\nform .has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-arrow,\nform .has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-selection__clear {\n right: 28px;\n}\nform .has-feedback > .ant-select .ant-select-selection-selected-value,\nform .has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-selection-selected-value {\n padding-right: 42px;\n}\nform .has-feedback .ant-cascader-picker-arrow {\n margin-right: 17px;\n}\nform .has-feedback .ant-cascader-picker-clear {\n right: 28px;\n}\nform .has-feedback .ant-input-search:not(.ant-input-search-enter-button) .ant-input-suffix {\n right: 28px;\n}\nform .has-feedback .ant-calendar-picker-icon,\nform .has-feedback .ant-time-picker-icon,\nform .has-feedback .ant-calendar-picker-clear,\nform .has-feedback .ant-time-picker-clear {\n right: 28px;\n}\nform .ant-mentions,\nform textarea.ant-input {\n height: auto;\n margin-bottom: 4px;\n}\nform .ant-upload {\n background: transparent;\n}\nform input[type='radio'],\nform input[type='checkbox'] {\n width: 14px;\n height: 14px;\n}\nform .ant-radio-inline,\nform .ant-checkbox-inline {\n display: inline-block;\n margin-left: 8px;\n font-weight: normal;\n vertical-align: middle;\n cursor: pointer;\n}\nform .ant-radio-inline:first-child,\nform .ant-checkbox-inline:first-child {\n margin-left: 0;\n}\nform .ant-checkbox-vertical,\nform .ant-radio-vertical {\n display: block;\n}\nform .ant-checkbox-vertical + .ant-checkbox-vertical,\nform .ant-radio-vertical + .ant-radio-vertical {\n margin-left: 0;\n}\nform .ant-input-number + .ant-form-text {\n margin-left: 8px;\n}\nform .ant-input-number-handler-wrap {\n z-index: 2;\n}\nform .ant-select,\nform .ant-cascader-picker {\n width: 100%;\n}\nform .ant-input-group .ant-select,\nform .ant-input-group .ant-cascader-picker {\n width: auto;\n}\nform :not(.ant-input-group-wrapper) > .ant-input-group,\nform .ant-input-group-wrapper {\n display: inline-block;\n vertical-align: middle;\n}\nform:not(.ant-form-vertical) :not(.ant-input-group-wrapper) > .ant-input-group,\nform:not(.ant-form-vertical) .ant-input-group-wrapper {\n position: relative;\n top: -1px;\n}\n.ant-form-vertical .ant-form-item-label,\n.ant-col-24.ant-form-item-label,\n.ant-col-xl-24.ant-form-item-label {\n display: block;\n margin: 0;\n padding: 0 0 8px;\n line-height: 1.5;\n white-space: initial;\n text-align: left;\n}\n.ant-form-vertical .ant-form-item-label label::after,\n.ant-col-24.ant-form-item-label label::after,\n.ant-col-xl-24.ant-form-item-label label::after {\n display: none;\n}\n.ant-form-vertical .ant-form-item {\n padding-bottom: 8px;\n}\n.ant-form-vertical .ant-form-item-control {\n line-height: 1.5;\n}\n.ant-form-vertical .ant-form-explain {\n margin-top: 2px;\n margin-bottom: -5px;\n}\n.ant-form-vertical .ant-form-extra {\n margin-top: 2px;\n margin-bottom: -4px;\n}\n@media (max-width: 575px) {\n .ant-form-item-label,\n .ant-form-item-control-wrapper {\n display: block;\n width: 100%;\n }\n .ant-form-item-label {\n display: block;\n margin: 0;\n padding: 0 0 8px;\n line-height: 1.5;\n white-space: initial;\n text-align: left;\n }\n .ant-form-item-label label::after {\n display: none;\n }\n .ant-col-xs-24.ant-form-item-label {\n display: block;\n margin: 0;\n padding: 0 0 8px;\n line-height: 1.5;\n white-space: initial;\n text-align: left;\n }\n .ant-col-xs-24.ant-form-item-label label::after {\n display: none;\n }\n}\n@media (max-width: 767px) {\n .ant-col-sm-24.ant-form-item-label {\n display: block;\n margin: 0;\n padding: 0 0 8px;\n line-height: 1.5;\n white-space: initial;\n text-align: left;\n }\n .ant-col-sm-24.ant-form-item-label label::after {\n display: none;\n }\n}\n@media (max-width: 991px) {\n .ant-col-md-24.ant-form-item-label {\n display: block;\n margin: 0;\n padding: 0 0 8px;\n line-height: 1.5;\n white-space: initial;\n text-align: left;\n }\n .ant-col-md-24.ant-form-item-label label::after {\n display: none;\n }\n}\n@media (max-width: 1199px) {\n .ant-col-lg-24.ant-form-item-label {\n display: block;\n margin: 0;\n padding: 0 0 8px;\n line-height: 1.5;\n white-space: initial;\n text-align: left;\n }\n .ant-col-lg-24.ant-form-item-label label::after {\n display: none;\n }\n}\n@media (max-width: 1599px) {\n .ant-col-xl-24.ant-form-item-label {\n display: block;\n margin: 0;\n padding: 0 0 8px;\n line-height: 1.5;\n white-space: initial;\n text-align: left;\n }\n .ant-col-xl-24.ant-form-item-label label::after {\n display: none;\n }\n}\n.ant-form-inline .ant-form-item {\n display: inline-block;\n margin-right: 16px;\n margin-bottom: 0;\n}\n.ant-form-inline .ant-form-item-with-help {\n margin-bottom: 24px;\n}\n.ant-form-inline .ant-form-item > .ant-form-item-control-wrapper,\n.ant-form-inline .ant-form-item > .ant-form-item-label {\n display: inline-block;\n vertical-align: top;\n}\n.ant-form-inline .ant-form-text {\n display: inline-block;\n}\n.ant-form-inline .has-feedback {\n display: inline-block;\n}\n.has-success.has-feedback .ant-form-item-children-icon,\n.has-warning.has-feedback .ant-form-item-children-icon,\n.has-error.has-feedback .ant-form-item-children-icon,\n.is-validating.has-feedback .ant-form-item-children-icon {\n position: absolute;\n top: 50%;\n right: 0;\n z-index: 1;\n width: 32px;\n height: 20px;\n margin-top: -10px;\n font-size: 14px;\n line-height: 20px;\n text-align: center;\n visibility: visible;\n -webkit-animation: zoomIn 0.3s cubic-bezier(0.12, 0.4, 0.29, 1.46);\n animation: zoomIn 0.3s cubic-bezier(0.12, 0.4, 0.29, 1.46);\n pointer-events: none;\n}\n.has-success.has-feedback .ant-form-item-children-icon svg,\n.has-warning.has-feedback .ant-form-item-children-icon svg,\n.has-error.has-feedback .ant-form-item-children-icon svg,\n.is-validating.has-feedback .ant-form-item-children-icon svg {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n margin: auto;\n}\n.has-success.has-feedback .ant-form-item-children-icon {\n color: #52c41a;\n -webkit-animation-name: diffZoomIn1 !important;\n animation-name: diffZoomIn1 !important;\n}\n.has-warning .ant-form-explain,\n.has-warning .ant-form-split {\n color: #faad14;\n}\n.has-warning .ant-input,\n.has-warning .ant-input:hover {\n background-color: #fff;\n border-color: #faad14;\n}\n.has-warning .ant-input:focus {\n border-color: #ffc53d;\n border-right-width: 1px !important;\n outline: 0;\n -webkit-box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);\n box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);\n}\n.has-warning .ant-input:not([disabled]):hover {\n border-color: #faad14;\n}\n.has-warning .ant-calendar-picker-open .ant-calendar-picker-input {\n border-color: #ffc53d;\n border-right-width: 1px !important;\n outline: 0;\n -webkit-box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);\n box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);\n}\n.has-warning .ant-input-affix-wrapper .ant-input,\n.has-warning .ant-input-affix-wrapper .ant-input:hover {\n background-color: #fff;\n border-color: #faad14;\n}\n.has-warning .ant-input-affix-wrapper .ant-input:focus {\n border-color: #ffc53d;\n border-right-width: 1px !important;\n outline: 0;\n -webkit-box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);\n box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);\n}\n.has-warning .ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled) {\n border-color: #faad14;\n}\n.has-warning .ant-input-prefix {\n color: #faad14;\n}\n.has-warning .ant-input-group-addon {\n color: #faad14;\n background-color: #fff;\n border-color: #faad14;\n}\n.has-warning .has-feedback {\n color: #faad14;\n}\n.has-warning.has-feedback .ant-form-item-children-icon {\n color: #faad14;\n -webkit-animation-name: diffZoomIn3 !important;\n animation-name: diffZoomIn3 !important;\n}\n.has-warning .ant-select-selection {\n border-color: #faad14;\n}\n.has-warning .ant-select-selection:hover {\n border-color: #faad14;\n}\n.has-warning .ant-select-open .ant-select-selection,\n.has-warning .ant-select-focused .ant-select-selection {\n border-color: #ffc53d;\n border-right-width: 1px !important;\n outline: 0;\n -webkit-box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);\n box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);\n}\n.has-warning .ant-calendar-picker-icon::after,\n.has-warning .ant-time-picker-icon::after,\n.has-warning .ant-picker-icon::after,\n.has-warning .ant-select-arrow,\n.has-warning .ant-cascader-picker-arrow {\n color: #faad14;\n}\n.has-warning .ant-input-number,\n.has-warning .ant-time-picker-input {\n border-color: #faad14;\n}\n.has-warning .ant-input-number-focused,\n.has-warning .ant-time-picker-input-focused,\n.has-warning .ant-input-number:focus,\n.has-warning .ant-time-picker-input:focus {\n border-color: #ffc53d;\n border-right-width: 1px !important;\n outline: 0;\n -webkit-box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);\n box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);\n}\n.has-warning .ant-input-number:not([disabled]):hover,\n.has-warning .ant-time-picker-input:not([disabled]):hover {\n border-color: #faad14;\n}\n.has-warning .ant-cascader-picker:focus .ant-cascader-input {\n border-color: #ffc53d;\n border-right-width: 1px !important;\n outline: 0;\n -webkit-box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);\n box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);\n}\n.has-warning .ant-cascader-picker:hover .ant-cascader-input {\n border-color: #faad14;\n}\n.has-error .ant-form-explain,\n.has-error .ant-form-split {\n color: #f5222d;\n}\n.has-error .ant-input,\n.has-error .ant-input:hover {\n background-color: #fff;\n border-color: #f5222d;\n}\n.has-error .ant-input:focus {\n border-color: #ff4d4f;\n border-right-width: 1px !important;\n outline: 0;\n -webkit-box-shadow: 0 0 0 2px rgba(245, 34, 45, 0.2);\n box-shadow: 0 0 0 2px rgba(245, 34, 45, 0.2);\n}\n.has-error .ant-input:not([disabled]):hover {\n border-color: #f5222d;\n}\n.has-error .ant-calendar-picker-open .ant-calendar-picker-input {\n border-color: #ff4d4f;\n border-right-width: 1px !important;\n outline: 0;\n -webkit-box-shadow: 0 0 0 2px rgba(245, 34, 45, 0.2);\n box-shadow: 0 0 0 2px rgba(245, 34, 45, 0.2);\n}\n.has-error .ant-input-affix-wrapper .ant-input,\n.has-error .ant-input-affix-wrapper .ant-input:hover {\n background-color: #fff;\n border-color: #f5222d;\n}\n.has-error .ant-input-affix-wrapper .ant-input:focus {\n border-color: #ff4d4f;\n border-right-width: 1px !important;\n outline: 0;\n -webkit-box-shadow: 0 0 0 2px rgba(245, 34, 45, 0.2);\n box-shadow: 0 0 0 2px rgba(245, 34, 45, 0.2);\n}\n.has-error .ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled) {\n border-color: #f5222d;\n}\n.has-error .ant-input-prefix {\n color: #f5222d;\n}\n.has-error .ant-input-group-addon {\n color: #f5222d;\n background-color: #fff;\n border-color: #f5222d;\n}\n.has-error .has-feedback {\n color: #f5222d;\n}\n.has-error.has-feedback .ant-form-item-children-icon {\n color: #f5222d;\n -webkit-animation-name: diffZoomIn2 !important;\n animation-name: diffZoomIn2 !important;\n}\n.has-error .ant-select-selection {\n border-color: #f5222d;\n}\n.has-error .ant-select-selection:hover {\n border-color: #f5222d;\n}\n.has-error .ant-select-open .ant-select-selection,\n.has-error .ant-select-focused .ant-select-selection {\n border-color: #ff4d4f;\n border-right-width: 1px !important;\n outline: 0;\n -webkit-box-shadow: 0 0 0 2px rgba(245, 34, 45, 0.2);\n box-shadow: 0 0 0 2px rgba(245, 34, 45, 0.2);\n}\n.has-error .ant-select.ant-select-auto-complete .ant-input:focus {\n border-color: #f5222d;\n}\n.has-error .ant-input-group-addon .ant-select-selection {\n border-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.has-error .ant-calendar-picker-icon::after,\n.has-error .ant-time-picker-icon::after,\n.has-error .ant-picker-icon::after,\n.has-error .ant-select-arrow,\n.has-error .ant-cascader-picker-arrow {\n color: #f5222d;\n}\n.has-error .ant-input-number,\n.has-error .ant-time-picker-input {\n border-color: #f5222d;\n}\n.has-error .ant-input-number-focused,\n.has-error .ant-time-picker-input-focused,\n.has-error .ant-input-number:focus,\n.has-error .ant-time-picker-input:focus {\n border-color: #ff4d4f;\n border-right-width: 1px !important;\n outline: 0;\n -webkit-box-shadow: 0 0 0 2px rgba(245, 34, 45, 0.2);\n box-shadow: 0 0 0 2px rgba(245, 34, 45, 0.2);\n}\n.has-error .ant-input-number:not([disabled]):hover,\n.has-error .ant-time-picker-input:not([disabled]):hover {\n border-color: #f5222d;\n}\n.has-error .ant-mention-wrapper .ant-mention-editor,\n.has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):hover {\n border-color: #f5222d;\n}\n.has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor,\n.has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus {\n border-color: #ff4d4f;\n border-right-width: 1px !important;\n outline: 0;\n -webkit-box-shadow: 0 0 0 2px rgba(245, 34, 45, 0.2);\n box-shadow: 0 0 0 2px rgba(245, 34, 45, 0.2);\n}\n.has-error .ant-cascader-picker:focus .ant-cascader-input {\n border-color: #ff4d4f;\n border-right-width: 1px !important;\n outline: 0;\n -webkit-box-shadow: 0 0 0 2px rgba(245, 34, 45, 0.2);\n box-shadow: 0 0 0 2px rgba(245, 34, 45, 0.2);\n}\n.has-error .ant-cascader-picker:hover .ant-cascader-input {\n border-color: #f5222d;\n}\n.has-error .ant-transfer-list {\n border-color: #f5222d;\n}\n.has-error .ant-transfer-list-search:not([disabled]) {\n border-color: #d9d9d9;\n}\n.has-error .ant-transfer-list-search:not([disabled]):hover {\n border-color: #40a9ff;\n border-right-width: 1px !important;\n}\n.has-error .ant-transfer-list-search:not([disabled]):focus {\n border-color: #40a9ff;\n border-right-width: 1px !important;\n outline: 0;\n -webkit-box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);\n box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);\n}\n.is-validating.has-feedback .ant-form-item-children-icon {\n display: inline-block;\n color: #1890ff;\n}\n.ant-advanced-search-form .ant-form-item {\n margin-bottom: 24px;\n}\n.ant-advanced-search-form .ant-form-item-with-help {\n margin-bottom: 5px;\n}\n.show-help-enter,\n.show-help-appear {\n -webkit-animation-duration: 0.3s;\n animation-duration: 0.3s;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n -webkit-animation-play-state: paused;\n animation-play-state: paused;\n}\n.show-help-leave {\n -webkit-animation-duration: 0.3s;\n animation-duration: 0.3s;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n -webkit-animation-play-state: paused;\n animation-play-state: paused;\n}\n.show-help-enter.show-help-enter-active,\n.show-help-appear.show-help-appear-active {\n -webkit-animation-name: antShowHelpIn;\n animation-name: antShowHelpIn;\n -webkit-animation-play-state: running;\n animation-play-state: running;\n}\n.show-help-leave.show-help-leave-active {\n -webkit-animation-name: antShowHelpOut;\n animation-name: antShowHelpOut;\n -webkit-animation-play-state: running;\n animation-play-state: running;\n pointer-events: none;\n}\n.show-help-enter,\n.show-help-appear {\n opacity: 0;\n -webkit-animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n}\n.show-help-leave {\n -webkit-animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n}\n@-webkit-keyframes antShowHelpIn {\n 0% {\n -webkit-transform: translateY(-5px);\n transform: translateY(-5px);\n opacity: 0;\n }\n 100% {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n opacity: 1;\n }\n}\n@keyframes antShowHelpIn {\n 0% {\n -webkit-transform: translateY(-5px);\n transform: translateY(-5px);\n opacity: 0;\n }\n 100% {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n opacity: 1;\n }\n}\n@-webkit-keyframes antShowHelpOut {\n to {\n -webkit-transform: translateY(-5px);\n transform: translateY(-5px);\n opacity: 0;\n }\n}\n@keyframes antShowHelpOut {\n to {\n -webkit-transform: translateY(-5px);\n transform: translateY(-5px);\n opacity: 0;\n }\n}\n@-webkit-keyframes diffZoomIn1 {\n 0% {\n -webkit-transform: scale(0);\n transform: scale(0);\n }\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n@keyframes diffZoomIn1 {\n 0% {\n -webkit-transform: scale(0);\n transform: scale(0);\n }\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n@-webkit-keyframes diffZoomIn2 {\n 0% {\n -webkit-transform: scale(0);\n transform: scale(0);\n }\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n@keyframes diffZoomIn2 {\n 0% {\n -webkit-transform: scale(0);\n transform: scale(0);\n }\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n@-webkit-keyframes diffZoomIn3 {\n 0% {\n -webkit-transform: scale(0);\n transform: scale(0);\n }\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n@keyframes diffZoomIn3 {\n 0% {\n -webkit-transform: scale(0);\n transform: scale(0);\n }\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n"],"sourceRoot":""}]);
|
||
|
||
// exports
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1045:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var React = _interopRequireWildcard(__webpack_require__(0));
|
||
|
||
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
|
||
|
||
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
||
|
||
var _createDOMForm = _interopRequireDefault(__webpack_require__(1046));
|
||
|
||
var _createFormField = _interopRequireDefault(__webpack_require__(948));
|
||
|
||
var _omit = _interopRequireDefault(__webpack_require__(46));
|
||
|
||
var _configProvider = __webpack_require__(14);
|
||
|
||
var _type = __webpack_require__(71);
|
||
|
||
var _warning = _interopRequireDefault(__webpack_require__(43));
|
||
|
||
var _FormItem = _interopRequireDefault(__webpack_require__(1078));
|
||
|
||
var _constants = __webpack_require__(949);
|
||
|
||
var _context = _interopRequireDefault(__webpack_require__(950));
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||
|
||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var FormLayouts = (0, _type.tuple)('horizontal', 'inline', 'vertical');
|
||
|
||
var Form =
|
||
/*#__PURE__*/
|
||
function (_React$Component) {
|
||
_inherits(Form, _React$Component);
|
||
|
||
function Form(props) {
|
||
var _this;
|
||
|
||
_classCallCheck(this, Form);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Form).call(this, props));
|
||
|
||
_this.renderForm = function (_ref) {
|
||
var _classNames;
|
||
|
||
var getPrefixCls = _ref.getPrefixCls;
|
||
var _this$props = _this.props,
|
||
customizePrefixCls = _this$props.prefixCls,
|
||
hideRequiredMark = _this$props.hideRequiredMark,
|
||
_this$props$className = _this$props.className,
|
||
className = _this$props$className === void 0 ? '' : _this$props$className,
|
||
layout = _this$props.layout;
|
||
var prefixCls = getPrefixCls('form', customizePrefixCls);
|
||
var formClassName = (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-horizontal"), layout === 'horizontal'), _defineProperty(_classNames, "".concat(prefixCls, "-vertical"), layout === 'vertical'), _defineProperty(_classNames, "".concat(prefixCls, "-inline"), layout === 'inline'), _defineProperty(_classNames, "".concat(prefixCls, "-hide-required-mark"), hideRequiredMark), _classNames), className);
|
||
var formProps = (0, _omit["default"])(_this.props, ['prefixCls', 'className', 'layout', 'form', 'hideRequiredMark', 'wrapperCol', 'labelAlign', 'labelCol', 'colon']);
|
||
return React.createElement("form", _extends({}, formProps, {
|
||
className: formClassName
|
||
}));
|
||
};
|
||
|
||
(0, _warning["default"])(!props.form, 'Form', 'It is unnecessary to pass `form` to `Form` after antd@1.7.0.');
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Form, [{
|
||
key: "render",
|
||
value: function render() {
|
||
var _this$props2 = this.props,
|
||
wrapperCol = _this$props2.wrapperCol,
|
||
labelAlign = _this$props2.labelAlign,
|
||
labelCol = _this$props2.labelCol,
|
||
layout = _this$props2.layout,
|
||
colon = _this$props2.colon;
|
||
return React.createElement(_context["default"].Provider, {
|
||
value: {
|
||
wrapperCol: wrapperCol,
|
||
labelAlign: labelAlign,
|
||
labelCol: labelCol,
|
||
vertical: layout === 'vertical',
|
||
colon: colon
|
||
}
|
||
}, React.createElement(_configProvider.ConfigConsumer, null, this.renderForm));
|
||
}
|
||
}]);
|
||
|
||
return Form;
|
||
}(React.Component);
|
||
|
||
exports["default"] = Form;
|
||
Form.defaultProps = {
|
||
colon: true,
|
||
layout: 'horizontal',
|
||
hideRequiredMark: false,
|
||
onSubmit: function onSubmit(e) {
|
||
e.preventDefault();
|
||
}
|
||
};
|
||
Form.propTypes = {
|
||
prefixCls: PropTypes.string,
|
||
layout: PropTypes.oneOf(FormLayouts),
|
||
children: PropTypes.any,
|
||
onSubmit: PropTypes.func,
|
||
hideRequiredMark: PropTypes.bool,
|
||
colon: PropTypes.bool
|
||
};
|
||
Form.Item = _FormItem["default"];
|
||
Form.createFormField = _createFormField["default"];
|
||
|
||
Form.create = function create() {
|
||
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||
return (0, _createDOMForm["default"])(_extends(_extends({
|
||
fieldNameProp: 'id'
|
||
}, options), {
|
||
fieldMetaProp: _constants.FIELD_META_PROP,
|
||
fieldDataProp: _constants.FIELD_DATA_PROP
|
||
}));
|
||
};
|
||
//# sourceMappingURL=Form.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1046:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _extends2 = __webpack_require__(19);
|
||
|
||
var _extends3 = _interopRequireDefault(_extends2);
|
||
|
||
var _reactDom = __webpack_require__(4);
|
||
|
||
var _reactDom2 = _interopRequireDefault(_reactDom);
|
||
|
||
var _domScrollIntoView = __webpack_require__(188);
|
||
|
||
var _domScrollIntoView2 = _interopRequireDefault(_domScrollIntoView);
|
||
|
||
var _has = __webpack_require__(1047);
|
||
|
||
var _has2 = _interopRequireDefault(_has);
|
||
|
||
var _createBaseForm = __webpack_require__(945);
|
||
|
||
var _createBaseForm2 = _interopRequireDefault(_createBaseForm);
|
||
|
||
var _createForm = __webpack_require__(1077);
|
||
|
||
var _utils = __webpack_require__(927);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
function computedStyle(el, prop) {
|
||
var getComputedStyle = window.getComputedStyle;
|
||
var style =
|
||
// If we have getComputedStyle
|
||
getComputedStyle ?
|
||
// Query it
|
||
// TODO: From CSS-Query notes, we might need (node, null) for FF
|
||
getComputedStyle(el) :
|
||
|
||
// Otherwise, we are in IE and use currentStyle
|
||
el.currentStyle;
|
||
if (style) {
|
||
return style[
|
||
// Switch to camelCase for CSSOM
|
||
// DEV: Grabbed from jQuery
|
||
// https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
|
||
// https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
|
||
prop.replace(/-(\w)/gi, function (word, letter) {
|
||
return letter.toUpperCase();
|
||
})];
|
||
}
|
||
return undefined;
|
||
}
|
||
|
||
function getScrollableContainer(n) {
|
||
var node = n;
|
||
var nodeName = void 0;
|
||
/* eslint no-cond-assign:0 */
|
||
while ((nodeName = node.nodeName.toLowerCase()) !== 'body') {
|
||
var overflowY = computedStyle(node, 'overflowY');
|
||
// https://stackoverflow.com/a/36900407/3040605
|
||
if (node !== n && (overflowY === 'auto' || overflowY === 'scroll') && node.scrollHeight > node.clientHeight) {
|
||
return node;
|
||
}
|
||
node = node.parentNode;
|
||
}
|
||
return nodeName === 'body' ? node.ownerDocument : node;
|
||
}
|
||
|
||
var mixin = {
|
||
getForm: function getForm() {
|
||
return (0, _extends3['default'])({}, _createForm.mixin.getForm.call(this), {
|
||
validateFieldsAndScroll: this.validateFieldsAndScroll
|
||
});
|
||
},
|
||
validateFieldsAndScroll: function validateFieldsAndScroll(ns, opt, cb) {
|
||
var _this = this;
|
||
|
||
var _getParams = (0, _utils.getParams)(ns, opt, cb),
|
||
names = _getParams.names,
|
||
callback = _getParams.callback,
|
||
options = _getParams.options;
|
||
|
||
var newCb = function newCb(error, values) {
|
||
if (error) {
|
||
var validNames = _this.fieldsStore.getValidFieldsName();
|
||
var firstNode = void 0;
|
||
var firstTop = void 0;
|
||
|
||
validNames.forEach(function (name) {
|
||
if ((0, _has2['default'])(error, name)) {
|
||
var instance = _this.getFieldInstance(name);
|
||
if (instance) {
|
||
var node = _reactDom2['default'].findDOMNode(instance);
|
||
var top = node.getBoundingClientRect().top;
|
||
if (node.type !== 'hidden' && (firstTop === undefined || firstTop > top)) {
|
||
firstTop = top;
|
||
firstNode = node;
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
if (firstNode) {
|
||
var c = options.container || getScrollableContainer(firstNode);
|
||
(0, _domScrollIntoView2['default'])(firstNode, c, (0, _extends3['default'])({
|
||
onlyScrollIfNeeded: true
|
||
}, options.scroll));
|
||
}
|
||
}
|
||
|
||
if (typeof callback === 'function') {
|
||
callback(error, values);
|
||
}
|
||
};
|
||
|
||
return this.validateFields(names, options, newCb);
|
||
}
|
||
};
|
||
|
||
function createDOMForm(option) {
|
||
return (0, _createBaseForm2['default'])((0, _extends3['default'])({}, option), [mixin]);
|
||
}
|
||
|
||
exports['default'] = createDOMForm;
|
||
module.exports = exports['default'];
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1047:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseHas = __webpack_require__(1048),
|
||
hasPath = __webpack_require__(958);
|
||
|
||
/**
|
||
* Checks if `path` is a direct property of `object`.
|
||
*
|
||
* @static
|
||
* @since 0.1.0
|
||
* @memberOf _
|
||
* @category Object
|
||
* @param {Object} object The object to query.
|
||
* @param {Array|string} path The path to check.
|
||
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
||
* @example
|
||
*
|
||
* var object = { 'a': { 'b': 2 } };
|
||
* var other = _.create({ 'a': _.create({ 'b': 2 }) });
|
||
*
|
||
* _.has(object, 'a');
|
||
* // => true
|
||
*
|
||
* _.has(object, 'a.b');
|
||
* // => true
|
||
*
|
||
* _.has(object, ['a', 'b']);
|
||
* // => true
|
||
*
|
||
* _.has(other, 'a');
|
||
* // => false
|
||
*/
|
||
function has(object, path) {
|
||
return object != null && hasPath(object, path, baseHas);
|
||
}
|
||
|
||
module.exports = has;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1048:
|
||
/***/ (function(module, exports) {
|
||
|
||
/** Used for built-in method references. */
|
||
var objectProto = Object.prototype;
|
||
|
||
/** Used to check objects for own properties. */
|
||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||
|
||
/**
|
||
* The base implementation of `_.has` without support for deep paths.
|
||
*
|
||
* @private
|
||
* @param {Object} [object] The object to query.
|
||
* @param {Array|string} key The key to check.
|
||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||
*/
|
||
function baseHas(object, key) {
|
||
return object != null && hasOwnProperty.call(object, key);
|
||
}
|
||
|
||
module.exports = baseHas;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1049:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = void 0;
|
||
|
||
var _react = _interopRequireDefault(__webpack_require__(0));
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
var unsafeLifecyclesPolyfill = function unsafeLifecyclesPolyfill(Component) {
|
||
var prototype = Component.prototype;
|
||
|
||
if (!prototype || !prototype.isReactComponent) {
|
||
throw new Error('Can only polyfill class components');
|
||
} // only handle componentWillReceiveProps
|
||
|
||
|
||
if (typeof prototype.componentWillReceiveProps !== 'function') {
|
||
return Component;
|
||
} // In React 16.9, React.Profiler was introduced together with UNSAFE_componentWillReceiveProps
|
||
// https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#performance-measurements-with-reactprofiler
|
||
|
||
|
||
if (!_react.default.Profiler) {
|
||
return Component;
|
||
} // Here polyfill get started
|
||
|
||
|
||
prototype.UNSAFE_componentWillReceiveProps = prototype.componentWillReceiveProps;
|
||
delete prototype.componentWillReceiveProps;
|
||
return Component;
|
||
};
|
||
|
||
var _default = unsafeLifecyclesPolyfill;
|
||
exports.default = _default;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1050:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||
|
||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
var _validator = __webpack_require__(1051);
|
||
|
||
var _validator2 = _interopRequireDefault(_validator);
|
||
|
||
var _messages2 = __webpack_require__(1071);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
/**
|
||
* Encapsulates a validation schema.
|
||
*
|
||
* @param descriptor An object declaring validation rules
|
||
* for this schema.
|
||
*/
|
||
function Schema(descriptor) {
|
||
this.rules = null;
|
||
this._messages = _messages2.messages;
|
||
this.define(descriptor);
|
||
}
|
||
|
||
Schema.prototype = {
|
||
messages: function messages(_messages) {
|
||
if (_messages) {
|
||
this._messages = (0, _util.deepMerge)((0, _messages2.newMessages)(), _messages);
|
||
}
|
||
return this._messages;
|
||
},
|
||
define: function define(rules) {
|
||
if (!rules) {
|
||
throw new Error('Cannot configure a schema with no rules');
|
||
}
|
||
if ((typeof rules === 'undefined' ? 'undefined' : _typeof(rules)) !== 'object' || Array.isArray(rules)) {
|
||
throw new Error('Rules must be an object');
|
||
}
|
||
this.rules = {};
|
||
var z = void 0;
|
||
var item = void 0;
|
||
for (z in rules) {
|
||
if (rules.hasOwnProperty(z)) {
|
||
item = rules[z];
|
||
this.rules[z] = Array.isArray(item) ? item : [item];
|
||
}
|
||
}
|
||
},
|
||
validate: function validate(source_) {
|
||
var _this = this;
|
||
|
||
var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||
var oc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};
|
||
|
||
var source = source_;
|
||
var options = o;
|
||
var callback = oc;
|
||
if (typeof options === 'function') {
|
||
callback = options;
|
||
options = {};
|
||
}
|
||
if (!this.rules || Object.keys(this.rules).length === 0) {
|
||
if (callback) {
|
||
callback();
|
||
}
|
||
return Promise.resolve();
|
||
}
|
||
|
||
function complete(results) {
|
||
var i = void 0;
|
||
var errors = [];
|
||
var fields = {};
|
||
|
||
function add(e) {
|
||
if (Array.isArray(e)) {
|
||
var _errors;
|
||
|
||
errors = (_errors = errors).concat.apply(_errors, e);
|
||
} else {
|
||
errors.push(e);
|
||
}
|
||
}
|
||
|
||
for (i = 0; i < results.length; i++) {
|
||
add(results[i]);
|
||
}
|
||
if (!errors.length) {
|
||
errors = null;
|
||
fields = null;
|
||
} else {
|
||
fields = (0, _util.convertFieldsError)(errors);
|
||
}
|
||
callback(errors, fields);
|
||
}
|
||
|
||
if (options.messages) {
|
||
var messages = this.messages();
|
||
if (messages === _messages2.messages) {
|
||
messages = (0, _messages2.newMessages)();
|
||
}
|
||
(0, _util.deepMerge)(messages, options.messages);
|
||
options.messages = messages;
|
||
} else {
|
||
options.messages = this.messages();
|
||
}
|
||
var arr = void 0;
|
||
var value = void 0;
|
||
var series = {};
|
||
var keys = options.keys || Object.keys(this.rules);
|
||
keys.forEach(function (z) {
|
||
arr = _this.rules[z];
|
||
value = source[z];
|
||
arr.forEach(function (r) {
|
||
var rule = r;
|
||
if (typeof rule.transform === 'function') {
|
||
if (source === source_) {
|
||
source = _extends({}, source);
|
||
}
|
||
value = source[z] = rule.transform(value);
|
||
}
|
||
if (typeof rule === 'function') {
|
||
rule = {
|
||
validator: rule
|
||
};
|
||
} else {
|
||
rule = _extends({}, rule);
|
||
}
|
||
rule.validator = _this.getValidationMethod(rule);
|
||
rule.field = z;
|
||
rule.fullField = rule.fullField || z;
|
||
rule.type = _this.getType(rule);
|
||
if (!rule.validator) {
|
||
return;
|
||
}
|
||
series[z] = series[z] || [];
|
||
series[z].push({
|
||
rule: rule,
|
||
value: value,
|
||
source: source,
|
||
field: z
|
||
});
|
||
});
|
||
});
|
||
var errorFields = {};
|
||
return (0, _util.asyncMap)(series, options, function (data, doIt) {
|
||
var rule = data.rule;
|
||
var deep = (rule.type === 'object' || rule.type === 'array') && (_typeof(rule.fields) === 'object' || _typeof(rule.defaultField) === 'object');
|
||
deep = deep && (rule.required || !rule.required && data.value);
|
||
rule.field = data.field;
|
||
|
||
function addFullfield(key, schema) {
|
||
return _extends({}, schema, {
|
||
fullField: rule.fullField + '.' + key
|
||
});
|
||
}
|
||
|
||
function cb() {
|
||
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
||
|
||
var errors = e;
|
||
if (!Array.isArray(errors)) {
|
||
errors = [errors];
|
||
}
|
||
if (!options.suppressWarning && errors.length) {
|
||
Schema.warning('async-validator:', errors);
|
||
}
|
||
if (errors.length && rule.message) {
|
||
errors = [].concat(rule.message);
|
||
}
|
||
|
||
errors = errors.map((0, _util.complementError)(rule));
|
||
|
||
if (options.first && errors.length) {
|
||
errorFields[rule.field] = 1;
|
||
return doIt(errors);
|
||
}
|
||
if (!deep) {
|
||
doIt(errors);
|
||
} else {
|
||
// if rule is required but the target object
|
||
// does not exist fail at the rule level and don't
|
||
// go deeper
|
||
if (rule.required && !data.value) {
|
||
if (rule.message) {
|
||
errors = [].concat(rule.message).map((0, _util.complementError)(rule));
|
||
} else if (options.error) {
|
||
errors = [options.error(rule, (0, _util.format)(options.messages.required, rule.field))];
|
||
} else {
|
||
errors = [];
|
||
}
|
||
return doIt(errors);
|
||
}
|
||
|
||
var fieldsSchema = {};
|
||
if (rule.defaultField) {
|
||
for (var k in data.value) {
|
||
if (data.value.hasOwnProperty(k)) {
|
||
fieldsSchema[k] = rule.defaultField;
|
||
}
|
||
}
|
||
}
|
||
fieldsSchema = _extends({}, fieldsSchema, data.rule.fields);
|
||
for (var f in fieldsSchema) {
|
||
if (fieldsSchema.hasOwnProperty(f)) {
|
||
var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
|
||
fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
|
||
}
|
||
}
|
||
var schema = new Schema(fieldsSchema);
|
||
schema.messages(options.messages);
|
||
if (data.rule.options) {
|
||
data.rule.options.messages = options.messages;
|
||
data.rule.options.error = options.error;
|
||
}
|
||
schema.validate(data.value, data.rule.options || options, function (errs) {
|
||
var finalErrors = [];
|
||
if (errors && errors.length) {
|
||
finalErrors.push.apply(finalErrors, errors);
|
||
}
|
||
if (errs && errs.length) {
|
||
finalErrors.push.apply(finalErrors, errs);
|
||
}
|
||
doIt(finalErrors.length ? finalErrors : null);
|
||
});
|
||
}
|
||
}
|
||
|
||
var res = void 0;
|
||
if (rule.asyncValidator) {
|
||
res = rule.asyncValidator(rule, data.value, cb, data.source, options);
|
||
} else if (rule.validator) {
|
||
res = rule.validator(rule, data.value, cb, data.source, options);
|
||
if (res === true) {
|
||
cb();
|
||
} else if (res === false) {
|
||
cb(rule.message || rule.field + ' fails');
|
||
} else if (res instanceof Array) {
|
||
cb(res);
|
||
} else if (res instanceof Error) {
|
||
cb(res.message);
|
||
}
|
||
}
|
||
if (res && res.then) {
|
||
res.then(function () {
|
||
return cb();
|
||
}, function (e) {
|
||
return cb(e);
|
||
});
|
||
}
|
||
}, function (results) {
|
||
complete(results);
|
||
});
|
||
},
|
||
getType: function getType(rule) {
|
||
if (rule.type === undefined && rule.pattern instanceof RegExp) {
|
||
rule.type = 'pattern';
|
||
}
|
||
if (typeof rule.validator !== 'function' && rule.type && !_validator2['default'].hasOwnProperty(rule.type)) {
|
||
throw new Error((0, _util.format)('Unknown rule type %s', rule.type));
|
||
}
|
||
return rule.type || 'string';
|
||
},
|
||
getValidationMethod: function getValidationMethod(rule) {
|
||
if (typeof rule.validator === 'function') {
|
||
return rule.validator;
|
||
}
|
||
var keys = Object.keys(rule);
|
||
var messageIndex = keys.indexOf('message');
|
||
if (messageIndex !== -1) {
|
||
keys.splice(messageIndex, 1);
|
||
}
|
||
if (keys.length === 1 && keys[0] === 'required') {
|
||
return _validator2['default'].required;
|
||
}
|
||
return _validator2['default'][this.getType(rule)] || false;
|
||
}
|
||
};
|
||
|
||
Schema.register = function register(type, validator) {
|
||
if (typeof validator !== 'function') {
|
||
throw new Error('Cannot register a validator by type, validator is not a function');
|
||
}
|
||
_validator2['default'][type] = validator;
|
||
};
|
||
|
||
Schema.warning = _util.warning;
|
||
|
||
Schema.messages = _messages2.messages;
|
||
|
||
exports['default'] = Schema;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1051:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _string = __webpack_require__(1052);
|
||
|
||
var _string2 = _interopRequireDefault(_string);
|
||
|
||
var _method = __webpack_require__(1058);
|
||
|
||
var _method2 = _interopRequireDefault(_method);
|
||
|
||
var _number = __webpack_require__(1059);
|
||
|
||
var _number2 = _interopRequireDefault(_number);
|
||
|
||
var _boolean = __webpack_require__(1060);
|
||
|
||
var _boolean2 = _interopRequireDefault(_boolean);
|
||
|
||
var _regexp = __webpack_require__(1061);
|
||
|
||
var _regexp2 = _interopRequireDefault(_regexp);
|
||
|
||
var _integer = __webpack_require__(1062);
|
||
|
||
var _integer2 = _interopRequireDefault(_integer);
|
||
|
||
var _float = __webpack_require__(1063);
|
||
|
||
var _float2 = _interopRequireDefault(_float);
|
||
|
||
var _array = __webpack_require__(1064);
|
||
|
||
var _array2 = _interopRequireDefault(_array);
|
||
|
||
var _object = __webpack_require__(1065);
|
||
|
||
var _object2 = _interopRequireDefault(_object);
|
||
|
||
var _enum = __webpack_require__(1066);
|
||
|
||
var _enum2 = _interopRequireDefault(_enum);
|
||
|
||
var _pattern = __webpack_require__(1067);
|
||
|
||
var _pattern2 = _interopRequireDefault(_pattern);
|
||
|
||
var _date = __webpack_require__(1068);
|
||
|
||
var _date2 = _interopRequireDefault(_date);
|
||
|
||
var _required = __webpack_require__(1069);
|
||
|
||
var _required2 = _interopRequireDefault(_required);
|
||
|
||
var _type = __webpack_require__(1070);
|
||
|
||
var _type2 = _interopRequireDefault(_type);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
exports['default'] = {
|
||
string: _string2['default'],
|
||
method: _method2['default'],
|
||
number: _number2['default'],
|
||
boolean: _boolean2['default'],
|
||
regexp: _regexp2['default'],
|
||
integer: _integer2['default'],
|
||
float: _float2['default'],
|
||
array: _array2['default'],
|
||
object: _object2['default'],
|
||
'enum': _enum2['default'],
|
||
pattern: _pattern2['default'],
|
||
date: _date2['default'],
|
||
url: _type2['default'],
|
||
hex: _type2['default'],
|
||
email: _type2['default'],
|
||
required: _required2['default']
|
||
};
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1052:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _rule = __webpack_require__(914);
|
||
|
||
var _rule2 = _interopRequireDefault(_rule);
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
/**
|
||
* Performs validation for string types.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param callback The callback function.
|
||
* @param source The source object being validated.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function string(rule, value, callback, source, options) {
|
||
var errors = [];
|
||
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
||
if (validate) {
|
||
if ((0, _util.isEmptyValue)(value, 'string') && !rule.required) {
|
||
return callback();
|
||
}
|
||
_rule2['default'].required(rule, value, source, errors, options, 'string');
|
||
if (!(0, _util.isEmptyValue)(value, 'string')) {
|
||
_rule2['default'].type(rule, value, source, errors, options);
|
||
_rule2['default'].range(rule, value, source, errors, options);
|
||
_rule2['default'].pattern(rule, value, source, errors, options);
|
||
if (rule.whitespace === true) {
|
||
_rule2['default'].whitespace(rule, value, source, errors, options);
|
||
}
|
||
}
|
||
}
|
||
callback(errors);
|
||
}
|
||
|
||
exports['default'] = string;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1053:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
var util = _interopRequireWildcard(_util);
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
|
||
|
||
/**
|
||
* Rule for validating whitespace.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param source The source object being validated.
|
||
* @param errors An array of errors that this rule may add
|
||
* validation errors to.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function whitespace(rule, value, source, errors, options) {
|
||
if (/^\s+$/.test(value) || value === '') {
|
||
errors.push(util.format(options.messages.whitespace, rule.fullField));
|
||
}
|
||
}
|
||
|
||
exports['default'] = whitespace;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1054:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
var util = _interopRequireWildcard(_util);
|
||
|
||
var _required = __webpack_require__(946);
|
||
|
||
var _required2 = _interopRequireDefault(_required);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
|
||
|
||
/* eslint max-len:0 */
|
||
|
||
var pattern = {
|
||
// http://emailregex.com/
|
||
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
||
url: new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', 'i'),
|
||
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
||
};
|
||
|
||
var types = {
|
||
integer: function integer(value) {
|
||
return types.number(value) && parseInt(value, 10) === value;
|
||
},
|
||
float: function float(value) {
|
||
return types.number(value) && !types.integer(value);
|
||
},
|
||
array: function array(value) {
|
||
return Array.isArray(value);
|
||
},
|
||
regexp: function regexp(value) {
|
||
if (value instanceof RegExp) {
|
||
return true;
|
||
}
|
||
try {
|
||
return !!new RegExp(value);
|
||
} catch (e) {
|
||
return false;
|
||
}
|
||
},
|
||
date: function date(value) {
|
||
return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
|
||
},
|
||
number: function number(value) {
|
||
if (isNaN(value)) {
|
||
return false;
|
||
}
|
||
return typeof value === 'number';
|
||
},
|
||
object: function object(value) {
|
||
return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && !types.array(value);
|
||
},
|
||
method: function method(value) {
|
||
return typeof value === 'function';
|
||
},
|
||
email: function email(value) {
|
||
return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
|
||
},
|
||
url: function url(value) {
|
||
return typeof value === 'string' && !!value.match(pattern.url);
|
||
},
|
||
hex: function hex(value) {
|
||
return typeof value === 'string' && !!value.match(pattern.hex);
|
||
}
|
||
};
|
||
|
||
/**
|
||
* Rule for validating the type of a value.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param source The source object being validated.
|
||
* @param errors An array of errors that this rule may add
|
||
* validation errors to.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function type(rule, value, source, errors, options) {
|
||
if (rule.required && value === undefined) {
|
||
(0, _required2['default'])(rule, value, source, errors, options);
|
||
return;
|
||
}
|
||
var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
|
||
var ruleType = rule.type;
|
||
if (custom.indexOf(ruleType) > -1) {
|
||
if (!types[ruleType](value)) {
|
||
errors.push(util.format(options.messages.types[ruleType], rule.fullField, rule.type));
|
||
}
|
||
// straight typeof check
|
||
} else if (ruleType && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== rule.type) {
|
||
errors.push(util.format(options.messages.types[ruleType], rule.fullField, rule.type));
|
||
}
|
||
}
|
||
|
||
exports['default'] = type;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1055:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
var util = _interopRequireWildcard(_util);
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
|
||
|
||
/**
|
||
* Rule for validating minimum and maximum allowed values.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param source The source object being validated.
|
||
* @param errors An array of errors that this rule may add
|
||
* validation errors to.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function range(rule, value, source, errors, options) {
|
||
var len = typeof rule.len === 'number';
|
||
var min = typeof rule.min === 'number';
|
||
var max = typeof rule.max === 'number';
|
||
// 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
|
||
var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
||
var val = value;
|
||
var key = null;
|
||
var num = typeof value === 'number';
|
||
var str = typeof value === 'string';
|
||
var arr = Array.isArray(value);
|
||
if (num) {
|
||
key = 'number';
|
||
} else if (str) {
|
||
key = 'string';
|
||
} else if (arr) {
|
||
key = 'array';
|
||
}
|
||
// if the value is not of a supported type for range validation
|
||
// the validation rule rule should use the
|
||
// type property to also test for a particular type
|
||
if (!key) {
|
||
return false;
|
||
}
|
||
if (arr) {
|
||
val = value.length;
|
||
}
|
||
if (str) {
|
||
// 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3
|
||
val = value.replace(spRegexp, '_').length;
|
||
}
|
||
if (len) {
|
||
if (val !== rule.len) {
|
||
errors.push(util.format(options.messages[key].len, rule.fullField, rule.len));
|
||
}
|
||
} else if (min && !max && val < rule.min) {
|
||
errors.push(util.format(options.messages[key].min, rule.fullField, rule.min));
|
||
} else if (max && !min && val > rule.max) {
|
||
errors.push(util.format(options.messages[key].max, rule.fullField, rule.max));
|
||
} else if (min && max && (val < rule.min || val > rule.max)) {
|
||
errors.push(util.format(options.messages[key].range, rule.fullField, rule.min, rule.max));
|
||
}
|
||
}
|
||
|
||
exports['default'] = range;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1056:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
var util = _interopRequireWildcard(_util);
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
|
||
|
||
var ENUM = 'enum';
|
||
|
||
/**
|
||
* Rule for validating a value exists in an enumerable list.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param source The source object being validated.
|
||
* @param errors An array of errors that this rule may add
|
||
* validation errors to.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function enumerable(rule, value, source, errors, options) {
|
||
rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
|
||
if (rule[ENUM].indexOf(value) === -1) {
|
||
errors.push(util.format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
|
||
}
|
||
}
|
||
|
||
exports['default'] = enumerable;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1057:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
var util = _interopRequireWildcard(_util);
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
|
||
|
||
/**
|
||
* Rule for validating a regular expression pattern.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param source The source object being validated.
|
||
* @param errors An array of errors that this rule may add
|
||
* validation errors to.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function pattern(rule, value, source, errors, options) {
|
||
if (rule.pattern) {
|
||
if (rule.pattern instanceof RegExp) {
|
||
// if a RegExp instance is passed, reset `lastIndex` in case its `global`
|
||
// flag is accidentally set to `true`, which in a validation scenario
|
||
// is not necessary and the result might be misleading
|
||
rule.pattern.lastIndex = 0;
|
||
if (!rule.pattern.test(value)) {
|
||
errors.push(util.format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
|
||
}
|
||
} else if (typeof rule.pattern === 'string') {
|
||
var _pattern = new RegExp(rule.pattern);
|
||
if (!_pattern.test(value)) {
|
||
errors.push(util.format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
exports['default'] = pattern;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1058:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _rule = __webpack_require__(914);
|
||
|
||
var _rule2 = _interopRequireDefault(_rule);
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
/**
|
||
* Validates a function.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param callback The callback function.
|
||
* @param source The source object being validated.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function method(rule, value, callback, source, options) {
|
||
var errors = [];
|
||
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
||
if (validate) {
|
||
if ((0, _util.isEmptyValue)(value) && !rule.required) {
|
||
return callback();
|
||
}
|
||
_rule2['default'].required(rule, value, source, errors, options);
|
||
if (value !== undefined) {
|
||
_rule2['default'].type(rule, value, source, errors, options);
|
||
}
|
||
}
|
||
callback(errors);
|
||
}
|
||
|
||
exports['default'] = method;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1059:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _rule = __webpack_require__(914);
|
||
|
||
var _rule2 = _interopRequireDefault(_rule);
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
/**
|
||
* Validates a number.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param callback The callback function.
|
||
* @param source The source object being validated.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function number(rule, value, callback, source, options) {
|
||
var errors = [];
|
||
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
||
if (validate) {
|
||
if (value === '') {
|
||
value = undefined;
|
||
}
|
||
if ((0, _util.isEmptyValue)(value) && !rule.required) {
|
||
return callback();
|
||
}
|
||
_rule2['default'].required(rule, value, source, errors, options);
|
||
if (value !== undefined) {
|
||
_rule2['default'].type(rule, value, source, errors, options);
|
||
_rule2['default'].range(rule, value, source, errors, options);
|
||
}
|
||
}
|
||
callback(errors);
|
||
}
|
||
|
||
exports['default'] = number;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1060:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
var _rule = __webpack_require__(914);
|
||
|
||
var _rule2 = _interopRequireDefault(_rule);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
/**
|
||
* Validates a boolean.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param callback The callback function.
|
||
* @param source The source object being validated.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function boolean(rule, value, callback, source, options) {
|
||
var errors = [];
|
||
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
||
if (validate) {
|
||
if ((0, _util.isEmptyValue)(value) && !rule.required) {
|
||
return callback();
|
||
}
|
||
_rule2['default'].required(rule, value, source, errors, options);
|
||
if (value !== undefined) {
|
||
_rule2['default'].type(rule, value, source, errors, options);
|
||
}
|
||
}
|
||
callback(errors);
|
||
}
|
||
|
||
exports['default'] = boolean;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1061:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _rule = __webpack_require__(914);
|
||
|
||
var _rule2 = _interopRequireDefault(_rule);
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
/**
|
||
* Validates the regular expression type.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param callback The callback function.
|
||
* @param source The source object being validated.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function regexp(rule, value, callback, source, options) {
|
||
var errors = [];
|
||
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
||
if (validate) {
|
||
if ((0, _util.isEmptyValue)(value) && !rule.required) {
|
||
return callback();
|
||
}
|
||
_rule2['default'].required(rule, value, source, errors, options);
|
||
if (!(0, _util.isEmptyValue)(value)) {
|
||
_rule2['default'].type(rule, value, source, errors, options);
|
||
}
|
||
}
|
||
callback(errors);
|
||
}
|
||
|
||
exports['default'] = regexp;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1062:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _rule = __webpack_require__(914);
|
||
|
||
var _rule2 = _interopRequireDefault(_rule);
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
/**
|
||
* Validates a number is an integer.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param callback The callback function.
|
||
* @param source The source object being validated.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function integer(rule, value, callback, source, options) {
|
||
var errors = [];
|
||
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
||
if (validate) {
|
||
if ((0, _util.isEmptyValue)(value) && !rule.required) {
|
||
return callback();
|
||
}
|
||
_rule2['default'].required(rule, value, source, errors, options);
|
||
if (value !== undefined) {
|
||
_rule2['default'].type(rule, value, source, errors, options);
|
||
_rule2['default'].range(rule, value, source, errors, options);
|
||
}
|
||
}
|
||
callback(errors);
|
||
}
|
||
|
||
exports['default'] = integer;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1063:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _rule = __webpack_require__(914);
|
||
|
||
var _rule2 = _interopRequireDefault(_rule);
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
/**
|
||
* Validates a number is a floating point number.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param callback The callback function.
|
||
* @param source The source object being validated.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function floatFn(rule, value, callback, source, options) {
|
||
var errors = [];
|
||
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
||
if (validate) {
|
||
if ((0, _util.isEmptyValue)(value) && !rule.required) {
|
||
return callback();
|
||
}
|
||
_rule2['default'].required(rule, value, source, errors, options);
|
||
if (value !== undefined) {
|
||
_rule2['default'].type(rule, value, source, errors, options);
|
||
_rule2['default'].range(rule, value, source, errors, options);
|
||
}
|
||
}
|
||
callback(errors);
|
||
}
|
||
|
||
exports['default'] = floatFn;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1064:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _rule = __webpack_require__(914);
|
||
|
||
var _rule2 = _interopRequireDefault(_rule);
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
/**
|
||
* Validates an array.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param callback The callback function.
|
||
* @param source The source object being validated.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function array(rule, value, callback, source, options) {
|
||
var errors = [];
|
||
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
||
if (validate) {
|
||
if ((0, _util.isEmptyValue)(value, 'array') && !rule.required) {
|
||
return callback();
|
||
}
|
||
_rule2['default'].required(rule, value, source, errors, options, 'array');
|
||
if (!(0, _util.isEmptyValue)(value, 'array')) {
|
||
_rule2['default'].type(rule, value, source, errors, options);
|
||
_rule2['default'].range(rule, value, source, errors, options);
|
||
}
|
||
}
|
||
callback(errors);
|
||
}
|
||
|
||
exports['default'] = array;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1065:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _rule = __webpack_require__(914);
|
||
|
||
var _rule2 = _interopRequireDefault(_rule);
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
/**
|
||
* Validates an object.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param callback The callback function.
|
||
* @param source The source object being validated.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function object(rule, value, callback, source, options) {
|
||
var errors = [];
|
||
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
||
if (validate) {
|
||
if ((0, _util.isEmptyValue)(value) && !rule.required) {
|
||
return callback();
|
||
}
|
||
_rule2['default'].required(rule, value, source, errors, options);
|
||
if (value !== undefined) {
|
||
_rule2['default'].type(rule, value, source, errors, options);
|
||
}
|
||
}
|
||
callback(errors);
|
||
}
|
||
|
||
exports['default'] = object;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1066:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _rule = __webpack_require__(914);
|
||
|
||
var _rule2 = _interopRequireDefault(_rule);
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
var ENUM = 'enum';
|
||
|
||
/**
|
||
* Validates an enumerable list.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param callback The callback function.
|
||
* @param source The source object being validated.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function enumerable(rule, value, callback, source, options) {
|
||
var errors = [];
|
||
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
||
if (validate) {
|
||
if ((0, _util.isEmptyValue)(value) && !rule.required) {
|
||
return callback();
|
||
}
|
||
_rule2['default'].required(rule, value, source, errors, options);
|
||
if (value) {
|
||
_rule2['default'][ENUM](rule, value, source, errors, options);
|
||
}
|
||
}
|
||
callback(errors);
|
||
}
|
||
|
||
exports['default'] = enumerable;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1067:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _rule = __webpack_require__(914);
|
||
|
||
var _rule2 = _interopRequireDefault(_rule);
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
/**
|
||
* Validates a regular expression pattern.
|
||
*
|
||
* Performs validation when a rule only contains
|
||
* a pattern property but is not declared as a string type.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param callback The callback function.
|
||
* @param source The source object being validated.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function pattern(rule, value, callback, source, options) {
|
||
var errors = [];
|
||
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
||
if (validate) {
|
||
if ((0, _util.isEmptyValue)(value, 'string') && !rule.required) {
|
||
return callback();
|
||
}
|
||
_rule2['default'].required(rule, value, source, errors, options);
|
||
if (!(0, _util.isEmptyValue)(value, 'string')) {
|
||
_rule2['default'].pattern(rule, value, source, errors, options);
|
||
}
|
||
}
|
||
callback(errors);
|
||
}
|
||
|
||
exports['default'] = pattern;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1068:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _rule = __webpack_require__(914);
|
||
|
||
var _rule2 = _interopRequireDefault(_rule);
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
function date(rule, value, callback, source, options) {
|
||
// console.log('integer rule called %j', rule);
|
||
var errors = [];
|
||
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
||
// console.log('validate on %s value', value);
|
||
if (validate) {
|
||
if ((0, _util.isEmptyValue)(value) && !rule.required) {
|
||
return callback();
|
||
}
|
||
_rule2['default'].required(rule, value, source, errors, options);
|
||
if (!(0, _util.isEmptyValue)(value)) {
|
||
var dateObject = void 0;
|
||
|
||
if (typeof value === 'number') {
|
||
dateObject = new Date(value);
|
||
} else {
|
||
dateObject = value;
|
||
}
|
||
|
||
_rule2['default'].type(rule, dateObject, source, errors, options);
|
||
if (dateObject) {
|
||
_rule2['default'].range(rule, dateObject.getTime(), source, errors, options);
|
||
}
|
||
}
|
||
}
|
||
callback(errors);
|
||
}
|
||
|
||
exports['default'] = date;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1069:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||
|
||
var _rule = __webpack_require__(914);
|
||
|
||
var _rule2 = _interopRequireDefault(_rule);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
function required(rule, value, callback, source, options) {
|
||
var errors = [];
|
||
var type = Array.isArray(value) ? 'array' : typeof value === 'undefined' ? 'undefined' : _typeof(value);
|
||
_rule2['default'].required(rule, value, source, errors, options, type);
|
||
callback(errors);
|
||
}
|
||
|
||
exports['default'] = required;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1070:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _rule = __webpack_require__(914);
|
||
|
||
var _rule2 = _interopRequireDefault(_rule);
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
function type(rule, value, callback, source, options) {
|
||
var ruleType = rule.type;
|
||
var errors = [];
|
||
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
||
if (validate) {
|
||
if ((0, _util.isEmptyValue)(value, ruleType) && !rule.required) {
|
||
return callback();
|
||
}
|
||
_rule2['default'].required(rule, value, source, errors, options, ruleType);
|
||
if (!(0, _util.isEmptyValue)(value, ruleType)) {
|
||
_rule2['default'].type(rule, value, source, errors, options);
|
||
}
|
||
}
|
||
callback(errors);
|
||
}
|
||
|
||
exports['default'] = type;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1071:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.newMessages = newMessages;
|
||
function newMessages() {
|
||
return {
|
||
'default': 'Validation error on field %s',
|
||
required: '%s is required',
|
||
'enum': '%s must be one of %s',
|
||
whitespace: '%s cannot be empty',
|
||
date: {
|
||
format: '%s date %s is invalid for format %s',
|
||
parse: '%s date could not be parsed, %s is invalid ',
|
||
invalid: '%s date %s is invalid'
|
||
},
|
||
types: {
|
||
string: '%s is not a %s',
|
||
method: '%s is not a %s (function)',
|
||
array: '%s is not an %s',
|
||
object: '%s is not an %s',
|
||
number: '%s is not a %s',
|
||
date: '%s is not a %s',
|
||
boolean: '%s is not a %s',
|
||
integer: '%s is not an %s',
|
||
float: '%s is not a %s',
|
||
regexp: '%s is not a valid %s',
|
||
email: '%s is not a valid %s',
|
||
url: '%s is not a valid %s',
|
||
hex: '%s is not a valid %s'
|
||
},
|
||
string: {
|
||
len: '%s must be exactly %s characters',
|
||
min: '%s must be at least %s characters',
|
||
max: '%s cannot be longer than %s characters',
|
||
range: '%s must be between %s and %s characters'
|
||
},
|
||
number: {
|
||
len: '%s must equal %s',
|
||
min: '%s cannot be less than %s',
|
||
max: '%s cannot be greater than %s',
|
||
range: '%s must be between %s and %s'
|
||
},
|
||
array: {
|
||
len: '%s must be exactly %s in length',
|
||
min: '%s cannot be less than %s in length',
|
||
max: '%s cannot be greater than %s in length',
|
||
range: '%s must be between %s and %s in length'
|
||
},
|
||
pattern: {
|
||
mismatch: '%s value %s does not match pattern %s'
|
||
},
|
||
clone: function clone() {
|
||
var cloned = JSON.parse(JSON.stringify(this));
|
||
cloned.clone = this.clone;
|
||
return cloned;
|
||
}
|
||
};
|
||
}
|
||
|
||
var messages = exports.messages = newMessages();
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1072:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var assignValue = __webpack_require__(1073),
|
||
castPath = __webpack_require__(923),
|
||
isIndex = __webpack_require__(928),
|
||
isObject = __webpack_require__(175),
|
||
toKey = __webpack_require__(921);
|
||
|
||
/**
|
||
* The base implementation of `_.set`.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to modify.
|
||
* @param {Array|string} path The path of the property to set.
|
||
* @param {*} value The value to set.
|
||
* @param {Function} [customizer] The function to customize path creation.
|
||
* @returns {Object} Returns `object`.
|
||
*/
|
||
function baseSet(object, path, value, customizer) {
|
||
if (!isObject(object)) {
|
||
return object;
|
||
}
|
||
path = castPath(path, object);
|
||
|
||
var index = -1,
|
||
length = path.length,
|
||
lastIndex = length - 1,
|
||
nested = object;
|
||
|
||
while (nested != null && ++index < length) {
|
||
var key = toKey(path[index]),
|
||
newValue = value;
|
||
|
||
if (index != lastIndex) {
|
||
var objValue = nested[key];
|
||
newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
||
if (newValue === undefined) {
|
||
newValue = isObject(objValue)
|
||
? objValue
|
||
: (isIndex(path[index + 1]) ? [] : {});
|
||
}
|
||
}
|
||
assignValue(nested, key, newValue);
|
||
nested = nested[key];
|
||
}
|
||
return object;
|
||
}
|
||
|
||
module.exports = baseSet;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1073:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseAssignValue = __webpack_require__(1074),
|
||
eq = __webpack_require__(922);
|
||
|
||
/** Used for built-in method references. */
|
||
var objectProto = Object.prototype;
|
||
|
||
/** Used to check objects for own properties. */
|
||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||
|
||
/**
|
||
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
||
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||
* for equality comparisons.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to modify.
|
||
* @param {string} key The key of the property to assign.
|
||
* @param {*} value The value to assign.
|
||
*/
|
||
function assignValue(object, key, value) {
|
||
var objValue = object[key];
|
||
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
||
(value === undefined && !(key in object))) {
|
||
baseAssignValue(object, key, value);
|
||
}
|
||
}
|
||
|
||
module.exports = assignValue;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1074:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var defineProperty = __webpack_require__(1075);
|
||
|
||
/**
|
||
* The base implementation of `assignValue` and `assignMergeValue` without
|
||
* value checks.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to modify.
|
||
* @param {string} key The key of the property to assign.
|
||
* @param {*} value The value to assign.
|
||
*/
|
||
function baseAssignValue(object, key, value) {
|
||
if (key == '__proto__' && defineProperty) {
|
||
defineProperty(object, key, {
|
||
'configurable': true,
|
||
'enumerable': true,
|
||
'value': value,
|
||
'writable': true
|
||
});
|
||
} else {
|
||
object[key] = value;
|
||
}
|
||
}
|
||
|
||
module.exports = baseAssignValue;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1075:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var getNative = __webpack_require__(917);
|
||
|
||
var defineProperty = (function() {
|
||
try {
|
||
var func = getNative(Object, 'defineProperty');
|
||
func({}, '', {});
|
||
return func;
|
||
} catch (e) {}
|
||
}());
|
||
|
||
module.exports = defineProperty;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1076:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _defineProperty2 = __webpack_require__(59);
|
||
|
||
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
||
|
||
var _extends2 = __webpack_require__(19);
|
||
|
||
var _extends3 = _interopRequireDefault(_extends2);
|
||
|
||
var _classCallCheck2 = __webpack_require__(11);
|
||
|
||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||
|
||
var _createClass2 = __webpack_require__(34);
|
||
|
||
var _createClass3 = _interopRequireDefault(_createClass2);
|
||
|
||
exports['default'] = createFieldsStore;
|
||
|
||
var _set = __webpack_require__(947);
|
||
|
||
var _set2 = _interopRequireDefault(_set);
|
||
|
||
var _createFormField = __webpack_require__(948);
|
||
|
||
var _createFormField2 = _interopRequireDefault(_createFormField);
|
||
|
||
var _utils = __webpack_require__(927);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
function partOf(a, b) {
|
||
return b.indexOf(a) === 0 && ['.', '['].indexOf(b[a.length]) !== -1;
|
||
}
|
||
|
||
function internalFlattenFields(fields) {
|
||
return (0, _utils.flattenFields)(fields, function (_, node) {
|
||
return (0, _createFormField.isFormField)(node);
|
||
}, 'You must wrap field data with `createFormField`.');
|
||
}
|
||
|
||
var FieldsStore = function () {
|
||
function FieldsStore(fields) {
|
||
(0, _classCallCheck3['default'])(this, FieldsStore);
|
||
|
||
_initialiseProps.call(this);
|
||
|
||
this.fields = internalFlattenFields(fields);
|
||
this.fieldsMeta = {};
|
||
}
|
||
|
||
(0, _createClass3['default'])(FieldsStore, [{
|
||
key: 'updateFields',
|
||
value: function updateFields(fields) {
|
||
this.fields = internalFlattenFields(fields);
|
||
}
|
||
}, {
|
||
key: 'flattenRegisteredFields',
|
||
value: function flattenRegisteredFields(fields) {
|
||
var validFieldsName = this.getAllFieldsName();
|
||
return (0, _utils.flattenFields)(fields, function (path) {
|
||
return validFieldsName.indexOf(path) >= 0;
|
||
}, 'You cannot set a form field before rendering a field associated with the value.');
|
||
}
|
||
}, {
|
||
key: 'setFields',
|
||
value: function setFields(fields) {
|
||
var _this = this;
|
||
|
||
var fieldsMeta = this.fieldsMeta;
|
||
var nowFields = (0, _extends3['default'])({}, this.fields, fields);
|
||
var nowValues = {};
|
||
Object.keys(fieldsMeta).forEach(function (f) {
|
||
nowValues[f] = _this.getValueFromFields(f, nowFields);
|
||
});
|
||
Object.keys(nowValues).forEach(function (f) {
|
||
var value = nowValues[f];
|
||
var fieldMeta = _this.getFieldMeta(f);
|
||
if (fieldMeta && fieldMeta.normalize) {
|
||
var nowValue = fieldMeta.normalize(value, _this.getValueFromFields(f, _this.fields), nowValues);
|
||
if (nowValue !== value) {
|
||
nowFields[f] = (0, _extends3['default'])({}, nowFields[f], {
|
||
value: nowValue
|
||
});
|
||
}
|
||
}
|
||
});
|
||
this.fields = nowFields;
|
||
}
|
||
}, {
|
||
key: 'resetFields',
|
||
value: function resetFields(ns) {
|
||
var fields = this.fields;
|
||
|
||
var names = ns ? this.getValidFieldsFullName(ns) : this.getAllFieldsName();
|
||
return names.reduce(function (acc, name) {
|
||
var field = fields[name];
|
||
if (field && 'value' in field) {
|
||
acc[name] = {};
|
||
}
|
||
return acc;
|
||
}, {});
|
||
}
|
||
}, {
|
||
key: 'setFieldMeta',
|
||
value: function setFieldMeta(name, meta) {
|
||
this.fieldsMeta[name] = meta;
|
||
}
|
||
}, {
|
||
key: 'setFieldsAsDirty',
|
||
value: function setFieldsAsDirty() {
|
||
var _this2 = this;
|
||
|
||
Object.keys(this.fields).forEach(function (name) {
|
||
var field = _this2.fields[name];
|
||
var fieldMeta = _this2.fieldsMeta[name];
|
||
if (field && fieldMeta && (0, _utils.hasRules)(fieldMeta.validate)) {
|
||
_this2.fields[name] = (0, _extends3['default'])({}, field, {
|
||
dirty: true
|
||
});
|
||
}
|
||
});
|
||
}
|
||
}, {
|
||
key: 'getFieldMeta',
|
||
value: function getFieldMeta(name) {
|
||
this.fieldsMeta[name] = this.fieldsMeta[name] || {};
|
||
return this.fieldsMeta[name];
|
||
}
|
||
}, {
|
||
key: 'getValueFromFields',
|
||
value: function getValueFromFields(name, fields) {
|
||
var field = fields[name];
|
||
if (field && 'value' in field) {
|
||
return field.value;
|
||
}
|
||
var fieldMeta = this.getFieldMeta(name);
|
||
return fieldMeta && fieldMeta.initialValue;
|
||
}
|
||
}, {
|
||
key: 'getValidFieldsName',
|
||
value: function getValidFieldsName() {
|
||
var _this3 = this;
|
||
|
||
var fieldsMeta = this.fieldsMeta;
|
||
|
||
return fieldsMeta ? Object.keys(fieldsMeta).filter(function (name) {
|
||
return !_this3.getFieldMeta(name).hidden;
|
||
}) : [];
|
||
}
|
||
}, {
|
||
key: 'getAllFieldsName',
|
||
value: function getAllFieldsName() {
|
||
var fieldsMeta = this.fieldsMeta;
|
||
|
||
return fieldsMeta ? Object.keys(fieldsMeta) : [];
|
||
}
|
||
}, {
|
||
key: 'getValidFieldsFullName',
|
||
value: function getValidFieldsFullName(maybePartialName) {
|
||
var maybePartialNames = Array.isArray(maybePartialName) ? maybePartialName : [maybePartialName];
|
||
return this.getValidFieldsName().filter(function (fullName) {
|
||
return maybePartialNames.some(function (partialName) {
|
||
return fullName === partialName || (0, _utils.startsWith)(fullName, partialName) && ['.', '['].indexOf(fullName[partialName.length]) >= 0;
|
||
});
|
||
});
|
||
}
|
||
}, {
|
||
key: 'getFieldValuePropValue',
|
||
value: function getFieldValuePropValue(fieldMeta) {
|
||
var name = fieldMeta.name,
|
||
getValueProps = fieldMeta.getValueProps,
|
||
valuePropName = fieldMeta.valuePropName;
|
||
|
||
var field = this.getField(name);
|
||
var fieldValue = 'value' in field ? field.value : fieldMeta.initialValue;
|
||
if (getValueProps) {
|
||
return getValueProps(fieldValue);
|
||
}
|
||
return (0, _defineProperty3['default'])({}, valuePropName, fieldValue);
|
||
}
|
||
}, {
|
||
key: 'getField',
|
||
value: function getField(name) {
|
||
return (0, _extends3['default'])({}, this.fields[name], {
|
||
name: name
|
||
});
|
||
}
|
||
}, {
|
||
key: 'getNotCollectedFields',
|
||
value: function getNotCollectedFields() {
|
||
var _this4 = this;
|
||
|
||
var fieldsName = this.getValidFieldsName();
|
||
return fieldsName.filter(function (name) {
|
||
return !_this4.fields[name];
|
||
}).map(function (name) {
|
||
return {
|
||
name: name,
|
||
dirty: false,
|
||
value: _this4.getFieldMeta(name).initialValue
|
||
};
|
||
}).reduce(function (acc, field) {
|
||
return (0, _set2['default'])(acc, field.name, (0, _createFormField2['default'])(field));
|
||
}, {});
|
||
}
|
||
}, {
|
||
key: 'getNestedAllFields',
|
||
value: function getNestedAllFields() {
|
||
var _this5 = this;
|
||
|
||
return Object.keys(this.fields).reduce(function (acc, name) {
|
||
return (0, _set2['default'])(acc, name, (0, _createFormField2['default'])(_this5.fields[name]));
|
||
}, this.getNotCollectedFields());
|
||
}
|
||
}, {
|
||
key: 'getFieldMember',
|
||
value: function getFieldMember(name, member) {
|
||
return this.getField(name)[member];
|
||
}
|
||
}, {
|
||
key: 'getNestedFields',
|
||
value: function getNestedFields(names, getter) {
|
||
var fields = names || this.getValidFieldsName();
|
||
return fields.reduce(function (acc, f) {
|
||
return (0, _set2['default'])(acc, f, getter(f));
|
||
}, {});
|
||
}
|
||
}, {
|
||
key: 'getNestedField',
|
||
value: function getNestedField(name, getter) {
|
||
var fullNames = this.getValidFieldsFullName(name);
|
||
if (fullNames.length === 0 || // Not registered
|
||
fullNames.length === 1 && fullNames[0] === name // Name already is full name.
|
||
) {
|
||
return getter(name);
|
||
}
|
||
var isArrayValue = fullNames[0][name.length] === '[';
|
||
var suffixNameStartIndex = isArrayValue ? name.length : name.length + 1;
|
||
return fullNames.reduce(function (acc, fullName) {
|
||
return (0, _set2['default'])(acc, fullName.slice(suffixNameStartIndex), getter(fullName));
|
||
}, isArrayValue ? [] : {});
|
||
}
|
||
}, {
|
||
key: 'isValidNestedFieldName',
|
||
|
||
|
||
// @private
|
||
// BG: `a` and `a.b` cannot be use in the same form
|
||
value: function isValidNestedFieldName(name) {
|
||
var names = this.getAllFieldsName();
|
||
return names.every(function (n) {
|
||
return !partOf(n, name) && !partOf(name, n);
|
||
});
|
||
}
|
||
}, {
|
||
key: 'clearField',
|
||
value: function clearField(name) {
|
||
delete this.fields[name];
|
||
delete this.fieldsMeta[name];
|
||
}
|
||
}]);
|
||
return FieldsStore;
|
||
}();
|
||
|
||
var _initialiseProps = function _initialiseProps() {
|
||
var _this6 = this;
|
||
|
||
this.setFieldsInitialValue = function (initialValues) {
|
||
var flattenedInitialValues = _this6.flattenRegisteredFields(initialValues);
|
||
var fieldsMeta = _this6.fieldsMeta;
|
||
Object.keys(flattenedInitialValues).forEach(function (name) {
|
||
if (fieldsMeta[name]) {
|
||
_this6.setFieldMeta(name, (0, _extends3['default'])({}, _this6.getFieldMeta(name), {
|
||
initialValue: flattenedInitialValues[name]
|
||
}));
|
||
}
|
||
});
|
||
};
|
||
|
||
this.getAllValues = function () {
|
||
var fieldsMeta = _this6.fieldsMeta,
|
||
fields = _this6.fields;
|
||
|
||
return Object.keys(fieldsMeta).reduce(function (acc, name) {
|
||
return (0, _set2['default'])(acc, name, _this6.getValueFromFields(name, fields));
|
||
}, {});
|
||
};
|
||
|
||
this.getFieldsValue = function (names) {
|
||
return _this6.getNestedFields(names, _this6.getFieldValue);
|
||
};
|
||
|
||
this.getFieldValue = function (name) {
|
||
var fields = _this6.fields;
|
||
|
||
return _this6.getNestedField(name, function (fullName) {
|
||
return _this6.getValueFromFields(fullName, fields);
|
||
});
|
||
};
|
||
|
||
this.getFieldsError = function (names) {
|
||
return _this6.getNestedFields(names, _this6.getFieldError);
|
||
};
|
||
|
||
this.getFieldError = function (name) {
|
||
return _this6.getNestedField(name, function (fullName) {
|
||
return (0, _utils.getErrorStrs)(_this6.getFieldMember(fullName, 'errors'));
|
||
});
|
||
};
|
||
|
||
this.isFieldValidating = function (name) {
|
||
return _this6.getFieldMember(name, 'validating');
|
||
};
|
||
|
||
this.isFieldsValidating = function (ns) {
|
||
var names = ns || _this6.getValidFieldsName();
|
||
return names.some(function (n) {
|
||
return _this6.isFieldValidating(n);
|
||
});
|
||
};
|
||
|
||
this.isFieldTouched = function (name) {
|
||
return _this6.getFieldMember(name, 'touched');
|
||
};
|
||
|
||
this.isFieldsTouched = function (ns) {
|
||
var names = ns || _this6.getValidFieldsName();
|
||
return names.some(function (n) {
|
||
return _this6.isFieldTouched(n);
|
||
});
|
||
};
|
||
};
|
||
|
||
function createFieldsStore(fields) {
|
||
return new FieldsStore(fields);
|
||
}
|
||
module.exports = exports['default'];
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1077:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.mixin = undefined;
|
||
|
||
var _createBaseForm = __webpack_require__(945);
|
||
|
||
var _createBaseForm2 = _interopRequireDefault(_createBaseForm);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
var mixin = exports.mixin = {
|
||
getForm: function getForm() {
|
||
return {
|
||
getFieldsValue: this.fieldsStore.getFieldsValue,
|
||
getFieldValue: this.fieldsStore.getFieldValue,
|
||
getFieldInstance: this.getFieldInstance,
|
||
setFieldsValue: this.setFieldsValue,
|
||
setFields: this.setFields,
|
||
setFieldsInitialValue: this.fieldsStore.setFieldsInitialValue,
|
||
getFieldDecorator: this.getFieldDecorator,
|
||
getFieldProps: this.getFieldProps,
|
||
getFieldsError: this.fieldsStore.getFieldsError,
|
||
getFieldError: this.fieldsStore.getFieldError,
|
||
isFieldValidating: this.fieldsStore.isFieldValidating,
|
||
isFieldsValidating: this.fieldsStore.isFieldsValidating,
|
||
isFieldsTouched: this.fieldsStore.isFieldsTouched,
|
||
isFieldTouched: this.fieldsStore.isFieldTouched,
|
||
isSubmitting: this.isSubmitting,
|
||
submit: this.submit,
|
||
validateFields: this.validateFields,
|
||
resetFields: this.resetFields
|
||
};
|
||
}
|
||
};
|
||
|
||
function createForm(options) {
|
||
return (0, _createBaseForm2['default'])(options, [mixin]);
|
||
}
|
||
|
||
exports['default'] = createForm;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1078:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var React = _interopRequireWildcard(__webpack_require__(0));
|
||
|
||
var ReactDOM = _interopRequireWildcard(__webpack_require__(4));
|
||
|
||
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
|
||
|
||
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
||
|
||
var _rcAnimate = _interopRequireDefault(__webpack_require__(332));
|
||
|
||
var _omit = _interopRequireDefault(__webpack_require__(46));
|
||
|
||
var _row = _interopRequireDefault(__webpack_require__(1019));
|
||
|
||
var _col = _interopRequireDefault(__webpack_require__(1020));
|
||
|
||
var _icon = _interopRequireDefault(__webpack_require__(27));
|
||
|
||
var _configProvider = __webpack_require__(14);
|
||
|
||
var _warning = _interopRequireDefault(__webpack_require__(43));
|
||
|
||
var _type = __webpack_require__(71);
|
||
|
||
var _constants = __webpack_require__(949);
|
||
|
||
var _context = _interopRequireDefault(__webpack_require__(950));
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||
|
||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
||
|
||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
||
|
||
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
||
|
||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
||
|
||
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
||
var t = {};
|
||
|
||
for (var p in s) {
|
||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||
}
|
||
|
||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||
}
|
||
return t;
|
||
};
|
||
|
||
var ValidateStatuses = (0, _type.tuple)('success', 'warning', 'error', 'validating', '');
|
||
var FormLabelAligns = (0, _type.tuple)('left', 'right');
|
||
|
||
function intersperseSpace(list) {
|
||
return list.reduce(function (current, item) {
|
||
return [].concat(_toConsumableArray(current), [' ', item]);
|
||
}, []).slice(1);
|
||
}
|
||
|
||
var FormItem =
|
||
/*#__PURE__*/
|
||
function (_React$Component) {
|
||
_inherits(FormItem, _React$Component);
|
||
|
||
function FormItem() {
|
||
var _this;
|
||
|
||
_classCallCheck(this, FormItem);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(FormItem).apply(this, arguments));
|
||
_this.helpShow = false; // Resolve duplicated ids bug between different forms
|
||
// https://github.com/ant-design/ant-design/issues/7351
|
||
|
||
_this.onLabelClick = function () {
|
||
var id = _this.props.id || _this.getId();
|
||
|
||
if (!id) {
|
||
return;
|
||
}
|
||
|
||
var formItemNode = ReactDOM.findDOMNode(_assertThisInitialized(_this));
|
||
var control = formItemNode.querySelector("[id=\"".concat(id, "\"]"));
|
||
|
||
if (control && control.focus) {
|
||
control.focus();
|
||
}
|
||
};
|
||
|
||
_this.onHelpAnimEnd = function (_key, helpShow) {
|
||
_this.helpShow = helpShow;
|
||
|
||
if (!helpShow) {
|
||
_this.setState({});
|
||
}
|
||
};
|
||
|
||
_this.renderFormItem = function (_ref) {
|
||
var _itemClassName;
|
||
|
||
var getPrefixCls = _ref.getPrefixCls;
|
||
|
||
var _a = _this.props,
|
||
customizePrefixCls = _a.prefixCls,
|
||
style = _a.style,
|
||
className = _a.className,
|
||
restProps = __rest(_a, ["prefixCls", "style", "className"]);
|
||
|
||
var prefixCls = getPrefixCls('form', customizePrefixCls);
|
||
|
||
var children = _this.renderChildren(prefixCls);
|
||
|
||
var itemClassName = (_itemClassName = {}, _defineProperty(_itemClassName, "".concat(prefixCls, "-item"), true), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-with-help"), _this.helpShow), _defineProperty(_itemClassName, "".concat(className), !!className), _itemClassName);
|
||
return React.createElement(_row["default"], _extends({
|
||
className: (0, _classnames["default"])(itemClassName),
|
||
style: style
|
||
}, (0, _omit["default"])(restProps, ['id', 'htmlFor', 'label', 'labelAlign', 'labelCol', 'wrapperCol', 'help', 'extra', 'validateStatus', 'hasFeedback', 'required', 'colon']), {
|
||
key: "row"
|
||
}), children);
|
||
};
|
||
|
||
return _this;
|
||
}
|
||
|
||
_createClass(FormItem, [{
|
||
key: "componentDidMount",
|
||
value: function componentDidMount() {
|
||
var _this$props = this.props,
|
||
children = _this$props.children,
|
||
help = _this$props.help,
|
||
validateStatus = _this$props.validateStatus,
|
||
id = _this$props.id;
|
||
(0, _warning["default"])(this.getControls(children, true).length <= 1 || help !== undefined || validateStatus !== undefined, 'Form.Item', 'Cannot generate `validateStatus` and `help` automatically, ' + 'while there are more than one `getFieldDecorator` in it.');
|
||
(0, _warning["default"])(!id, 'Form.Item', '`id` is deprecated for its label `htmlFor`. Please use `htmlFor` directly.');
|
||
}
|
||
}, {
|
||
key: "getHelpMessage",
|
||
value: function getHelpMessage() {
|
||
var help = this.props.help;
|
||
|
||
if (help === undefined && this.getOnlyControl()) {
|
||
var _this$getField = this.getField(),
|
||
errors = _this$getField.errors;
|
||
|
||
if (errors) {
|
||
return intersperseSpace(errors.map(function (e, index) {
|
||
var node = null;
|
||
|
||
if (React.isValidElement(e)) {
|
||
node = e;
|
||
} else if (React.isValidElement(e.message)) {
|
||
node = e.message;
|
||
} // eslint-disable-next-line react/no-array-index-key
|
||
|
||
|
||
return node ? React.cloneElement(node, {
|
||
key: index
|
||
}) : e.message;
|
||
}));
|
||
}
|
||
|
||
return '';
|
||
}
|
||
|
||
return help;
|
||
}
|
||
}, {
|
||
key: "getControls",
|
||
value: function getControls(children, recursively) {
|
||
var controls = [];
|
||
var childrenArray = React.Children.toArray(children);
|
||
|
||
for (var i = 0; i < childrenArray.length; i++) {
|
||
if (!recursively && controls.length > 0) {
|
||
break;
|
||
}
|
||
|
||
var child = childrenArray[i];
|
||
|
||
if (child.type && (child.type === FormItem || child.type.displayName === 'FormItem')) {
|
||
continue;
|
||
}
|
||
|
||
if (!child.props) {
|
||
continue;
|
||
}
|
||
|
||
if (_constants.FIELD_META_PROP in child.props) {
|
||
// And means FIELD_DATA_PROP in child.props, too.
|
||
controls.push(child);
|
||
} else if (child.props.children) {
|
||
controls = controls.concat(this.getControls(child.props.children, recursively));
|
||
}
|
||
}
|
||
|
||
return controls;
|
||
}
|
||
}, {
|
||
key: "getOnlyControl",
|
||
value: function getOnlyControl() {
|
||
var child = this.getControls(this.props.children, false)[0];
|
||
return child !== undefined ? child : null;
|
||
}
|
||
}, {
|
||
key: "getChildProp",
|
||
value: function getChildProp(prop) {
|
||
var child = this.getOnlyControl();
|
||
return child && child.props && child.props[prop];
|
||
}
|
||
}, {
|
||
key: "getId",
|
||
value: function getId() {
|
||
return this.getChildProp('id');
|
||
}
|
||
}, {
|
||
key: "getMeta",
|
||
value: function getMeta() {
|
||
return this.getChildProp(_constants.FIELD_META_PROP);
|
||
}
|
||
}, {
|
||
key: "getField",
|
||
value: function getField() {
|
||
return this.getChildProp(_constants.FIELD_DATA_PROP);
|
||
}
|
||
}, {
|
||
key: "getValidateStatus",
|
||
value: function getValidateStatus() {
|
||
var onlyControl = this.getOnlyControl();
|
||
|
||
if (!onlyControl) {
|
||
return '';
|
||
}
|
||
|
||
var field = this.getField();
|
||
|
||
if (field.validating) {
|
||
return 'validating';
|
||
}
|
||
|
||
if (field.errors) {
|
||
return 'error';
|
||
}
|
||
|
||
var fieldValue = 'value' in field ? field.value : this.getMeta().initialValue;
|
||
|
||
if (fieldValue !== undefined && fieldValue !== null && fieldValue !== '') {
|
||
return 'success';
|
||
}
|
||
|
||
return '';
|
||
}
|
||
}, {
|
||
key: "isRequired",
|
||
value: function isRequired() {
|
||
var required = this.props.required;
|
||
|
||
if (required !== undefined) {
|
||
return required;
|
||
}
|
||
|
||
if (this.getOnlyControl()) {
|
||
var meta = this.getMeta() || {};
|
||
var validate = meta.validate || [];
|
||
return validate.filter(function (item) {
|
||
return !!item.rules;
|
||
}).some(function (item) {
|
||
return item.rules.some(function (rule) {
|
||
return rule.required;
|
||
});
|
||
});
|
||
}
|
||
|
||
return false;
|
||
}
|
||
}, {
|
||
key: "renderHelp",
|
||
value: function renderHelp(prefixCls) {
|
||
var help = this.getHelpMessage();
|
||
var children = help ? React.createElement("div", {
|
||
className: "".concat(prefixCls, "-explain"),
|
||
key: "help"
|
||
}, help) : null;
|
||
|
||
if (children) {
|
||
this.helpShow = !!children;
|
||
}
|
||
|
||
return React.createElement(_rcAnimate["default"], {
|
||
transitionName: "show-help",
|
||
component: "",
|
||
transitionAppear: true,
|
||
key: "help",
|
||
onEnd: this.onHelpAnimEnd
|
||
}, children);
|
||
}
|
||
}, {
|
||
key: "renderExtra",
|
||
value: function renderExtra(prefixCls) {
|
||
var extra = this.props.extra;
|
||
return extra ? React.createElement("div", {
|
||
className: "".concat(prefixCls, "-extra")
|
||
}, extra) : null;
|
||
}
|
||
}, {
|
||
key: "renderValidateWrapper",
|
||
value: function renderValidateWrapper(prefixCls, c1, c2, c3) {
|
||
var props = this.props;
|
||
var onlyControl = this.getOnlyControl;
|
||
var validateStatus = props.validateStatus === undefined && onlyControl ? this.getValidateStatus() : props.validateStatus;
|
||
var classes = "".concat(prefixCls, "-item-control");
|
||
|
||
if (validateStatus) {
|
||
classes = (0, _classnames["default"])("".concat(prefixCls, "-item-control"), {
|
||
'has-feedback': props.hasFeedback || validateStatus === 'validating',
|
||
'has-success': validateStatus === 'success',
|
||
'has-warning': validateStatus === 'warning',
|
||
'has-error': validateStatus === 'error',
|
||
'is-validating': validateStatus === 'validating'
|
||
});
|
||
}
|
||
|
||
var iconType = '';
|
||
|
||
switch (validateStatus) {
|
||
case 'success':
|
||
iconType = 'check-circle';
|
||
break;
|
||
|
||
case 'warning':
|
||
iconType = 'exclamation-circle';
|
||
break;
|
||
|
||
case 'error':
|
||
iconType = 'close-circle';
|
||
break;
|
||
|
||
case 'validating':
|
||
iconType = 'loading';
|
||
break;
|
||
|
||
default:
|
||
iconType = '';
|
||
break;
|
||
}
|
||
|
||
var icon = props.hasFeedback && iconType ? React.createElement("span", {
|
||
className: "".concat(prefixCls, "-item-children-icon")
|
||
}, React.createElement(_icon["default"], {
|
||
type: iconType,
|
||
theme: iconType === 'loading' ? 'outlined' : 'filled'
|
||
})) : null;
|
||
return React.createElement("div", {
|
||
className: classes
|
||
}, React.createElement("span", {
|
||
className: "".concat(prefixCls, "-item-children")
|
||
}, c1, icon), c2, c3);
|
||
}
|
||
}, {
|
||
key: "renderWrapper",
|
||
value: function renderWrapper(prefixCls, children) {
|
||
var _this2 = this;
|
||
|
||
return React.createElement(_context["default"].Consumer, {
|
||
key: "wrapper"
|
||
}, function (_ref2) {
|
||
var contextWrapperCol = _ref2.wrapperCol,
|
||
vertical = _ref2.vertical;
|
||
var wrapperCol = _this2.props.wrapperCol;
|
||
var mergedWrapperCol = ('wrapperCol' in _this2.props ? wrapperCol : contextWrapperCol) || {};
|
||
var className = (0, _classnames["default"])("".concat(prefixCls, "-item-control-wrapper"), mergedWrapperCol.className); // No pass FormContext since it's useless
|
||
|
||
return React.createElement(_context["default"].Provider, {
|
||
value: {
|
||
vertical: vertical
|
||
}
|
||
}, React.createElement(_col["default"], _extends({}, mergedWrapperCol, {
|
||
className: className
|
||
}), children));
|
||
});
|
||
}
|
||
}, {
|
||
key: "renderLabel",
|
||
value: function renderLabel(prefixCls) {
|
||
var _this3 = this;
|
||
|
||
return React.createElement(_context["default"].Consumer, {
|
||
key: "label"
|
||
}, function (_ref3) {
|
||
var _classNames;
|
||
|
||
var vertical = _ref3.vertical,
|
||
contextLabelAlign = _ref3.labelAlign,
|
||
contextLabelCol = _ref3.labelCol,
|
||
contextColon = _ref3.colon;
|
||
var _this3$props = _this3.props,
|
||
label = _this3$props.label,
|
||
labelCol = _this3$props.labelCol,
|
||
labelAlign = _this3$props.labelAlign,
|
||
colon = _this3$props.colon,
|
||
id = _this3$props.id,
|
||
htmlFor = _this3$props.htmlFor;
|
||
|
||
var required = _this3.isRequired();
|
||
|
||
var mergedLabelCol = ('labelCol' in _this3.props ? labelCol : contextLabelCol) || {};
|
||
var mergedLabelAlign = 'labelAlign' in _this3.props ? labelAlign : contextLabelAlign;
|
||
var labelClsBasic = "".concat(prefixCls, "-item-label");
|
||
var labelColClassName = (0, _classnames["default"])(labelClsBasic, mergedLabelAlign === 'left' && "".concat(labelClsBasic, "-left"), mergedLabelCol.className);
|
||
var labelChildren = label; // Keep label is original where there should have no colon
|
||
|
||
var computedColon = colon === true || contextColon !== false && colon !== false;
|
||
var haveColon = computedColon && !vertical; // Remove duplicated user input colon
|
||
|
||
if (haveColon && typeof label === 'string' && label.trim() !== '') {
|
||
labelChildren = label.replace(/[::]\s*$/, '');
|
||
}
|
||
|
||
var labelClassName = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-item-required"), required), _defineProperty(_classNames, "".concat(prefixCls, "-item-no-colon"), !computedColon), _classNames));
|
||
return label ? React.createElement(_col["default"], _extends({}, mergedLabelCol, {
|
||
className: labelColClassName
|
||
}), React.createElement("label", {
|
||
htmlFor: htmlFor || id || _this3.getId(),
|
||
className: labelClassName,
|
||
title: typeof label === 'string' ? label : '',
|
||
onClick: _this3.onLabelClick
|
||
}, labelChildren)) : null;
|
||
});
|
||
}
|
||
}, {
|
||
key: "renderChildren",
|
||
value: function renderChildren(prefixCls) {
|
||
var children = this.props.children;
|
||
return [this.renderLabel(prefixCls), this.renderWrapper(prefixCls, this.renderValidateWrapper(prefixCls, children, this.renderHelp(prefixCls), this.renderExtra(prefixCls)))];
|
||
}
|
||
}, {
|
||
key: "render",
|
||
value: function render() {
|
||
return React.createElement(_configProvider.ConfigConsumer, null, this.renderFormItem);
|
||
}
|
||
}]);
|
||
|
||
return FormItem;
|
||
}(React.Component);
|
||
|
||
exports["default"] = FormItem;
|
||
FormItem.defaultProps = {
|
||
hasFeedback: false
|
||
};
|
||
FormItem.propTypes = {
|
||
prefixCls: PropTypes.string,
|
||
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
||
labelCol: PropTypes.object,
|
||
help: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]),
|
||
validateStatus: PropTypes.oneOf(ValidateStatuses),
|
||
hasFeedback: PropTypes.bool,
|
||
wrapperCol: PropTypes.object,
|
||
className: PropTypes.string,
|
||
id: PropTypes.string,
|
||
children: PropTypes.node,
|
||
colon: PropTypes.bool
|
||
};
|
||
//# sourceMappingURL=FormItem.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1081:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var React = _interopRequireWildcard(__webpack_require__(0));
|
||
|
||
var _reactLifecyclesCompat = __webpack_require__(7);
|
||
|
||
var _rcUpload = _interopRequireDefault(__webpack_require__(1179));
|
||
|
||
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
||
|
||
var _uniqBy = _interopRequireDefault(__webpack_require__(1186));
|
||
|
||
var _findIndex = _interopRequireDefault(__webpack_require__(1238));
|
||
|
||
var _UploadList = _interopRequireDefault(__webpack_require__(1239));
|
||
|
||
var _utils = __webpack_require__(1096);
|
||
|
||
var _LocaleReceiver = _interopRequireDefault(__webpack_require__(72));
|
||
|
||
var _default2 = _interopRequireDefault(__webpack_require__(185));
|
||
|
||
var _configProvider = __webpack_require__(14);
|
||
|
||
var _warning = _interopRequireDefault(__webpack_require__(43));
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||
|
||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var Upload =
|
||
/*#__PURE__*/
|
||
function (_React$Component) {
|
||
_inherits(Upload, _React$Component);
|
||
|
||
function Upload(props) {
|
||
var _this;
|
||
|
||
_classCallCheck(this, Upload);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Upload).call(this, props));
|
||
|
||
_this.saveUpload = function (node) {
|
||
_this.upload = node;
|
||
};
|
||
|
||
_this.onStart = function (file) {
|
||
var fileList = _this.state.fileList;
|
||
var targetItem = (0, _utils.fileToObject)(file);
|
||
targetItem.status = 'uploading';
|
||
var nextFileList = fileList.concat();
|
||
var fileIndex = (0, _findIndex["default"])(nextFileList, function (_ref) {
|
||
var uid = _ref.uid;
|
||
return uid === targetItem.uid;
|
||
});
|
||
|
||
if (fileIndex === -1) {
|
||
nextFileList.push(targetItem);
|
||
} else {
|
||
nextFileList[fileIndex] = targetItem;
|
||
}
|
||
|
||
_this.onChange({
|
||
file: targetItem,
|
||
fileList: nextFileList
|
||
}); // fix ie progress
|
||
|
||
|
||
if (!window.File || Object({"NODE_ENV":"production","PUBLIC_URL":"/react/build/."}).TEST_IE) {
|
||
_this.autoUpdateProgress(0, targetItem);
|
||
}
|
||
};
|
||
|
||
_this.onSuccess = function (response, file, xhr) {
|
||
_this.clearProgressTimer();
|
||
|
||
try {
|
||
if (typeof response === 'string') {
|
||
response = JSON.parse(response);
|
||
}
|
||
} catch (e) {
|
||
/* do nothing */
|
||
}
|
||
|
||
var fileList = _this.state.fileList;
|
||
var targetItem = (0, _utils.getFileItem)(file, fileList); // removed
|
||
|
||
if (!targetItem) {
|
||
return;
|
||
}
|
||
|
||
targetItem.status = 'done';
|
||
targetItem.response = response;
|
||
targetItem.xhr = xhr;
|
||
|
||
_this.onChange({
|
||
file: _extends({}, targetItem),
|
||
fileList: fileList
|
||
});
|
||
};
|
||
|
||
_this.onProgress = function (e, file) {
|
||
var fileList = _this.state.fileList;
|
||
var targetItem = (0, _utils.getFileItem)(file, fileList); // removed
|
||
|
||
if (!targetItem) {
|
||
return;
|
||
}
|
||
|
||
targetItem.percent = e.percent;
|
||
|
||
_this.onChange({
|
||
event: e,
|
||
file: _extends({}, targetItem),
|
||
fileList: fileList
|
||
});
|
||
};
|
||
|
||
_this.onError = function (error, response, file) {
|
||
_this.clearProgressTimer();
|
||
|
||
var fileList = _this.state.fileList;
|
||
var targetItem = (0, _utils.getFileItem)(file, fileList); // removed
|
||
|
||
if (!targetItem) {
|
||
return;
|
||
}
|
||
|
||
targetItem.error = error;
|
||
targetItem.response = response;
|
||
targetItem.status = 'error';
|
||
|
||
_this.onChange({
|
||
file: _extends({}, targetItem),
|
||
fileList: fileList
|
||
});
|
||
};
|
||
|
||
_this.handleRemove = function (file) {
|
||
var onRemove = _this.props.onRemove;
|
||
var fileList = _this.state.fileList;
|
||
Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(function (ret) {
|
||
// Prevent removing file
|
||
if (ret === false) {
|
||
return;
|
||
}
|
||
|
||
var removedFileList = (0, _utils.removeFileItem)(file, fileList);
|
||
|
||
if (removedFileList) {
|
||
file.status = 'removed'; // eslint-disable-line
|
||
|
||
if (_this.upload) {
|
||
_this.upload.abort(file);
|
||
}
|
||
|
||
_this.onChange({
|
||
file: file,
|
||
fileList: removedFileList
|
||
});
|
||
}
|
||
});
|
||
};
|
||
|
||
_this.onChange = function (info) {
|
||
if (!('fileList' in _this.props)) {
|
||
_this.setState({
|
||
fileList: info.fileList
|
||
});
|
||
}
|
||
|
||
var onChange = _this.props.onChange;
|
||
|
||
if (onChange) {
|
||
onChange(info);
|
||
}
|
||
};
|
||
|
||
_this.onFileDrop = function (e) {
|
||
_this.setState({
|
||
dragState: e.type
|
||
});
|
||
};
|
||
|
||
_this.beforeUpload = function (file, fileList) {
|
||
var beforeUpload = _this.props.beforeUpload;
|
||
var stateFileList = _this.state.fileList;
|
||
|
||
if (!beforeUpload) {
|
||
return true;
|
||
}
|
||
|
||
var result = beforeUpload(file, fileList);
|
||
|
||
if (result === false) {
|
||
_this.onChange({
|
||
file: file,
|
||
fileList: (0, _uniqBy["default"])(stateFileList.concat(fileList.map(_utils.fileToObject)), function (item) {
|
||
return item.uid;
|
||
})
|
||
});
|
||
|
||
return false;
|
||
}
|
||
|
||
if (result && result.then) {
|
||
return result;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
_this.renderUploadList = function (locale) {
|
||
var _this$props = _this.props,
|
||
showUploadList = _this$props.showUploadList,
|
||
listType = _this$props.listType,
|
||
onPreview = _this$props.onPreview,
|
||
onDownload = _this$props.onDownload,
|
||
previewFile = _this$props.previewFile,
|
||
disabled = _this$props.disabled,
|
||
propLocale = _this$props.locale;
|
||
var showRemoveIcon = showUploadList.showRemoveIcon,
|
||
showPreviewIcon = showUploadList.showPreviewIcon,
|
||
showDownloadIcon = showUploadList.showDownloadIcon;
|
||
var fileList = _this.state.fileList;
|
||
return React.createElement(_UploadList["default"], {
|
||
listType: listType,
|
||
items: fileList,
|
||
previewFile: previewFile,
|
||
onPreview: onPreview,
|
||
onDownload: onDownload,
|
||
onRemove: _this.handleRemove,
|
||
showRemoveIcon: !disabled && showRemoveIcon,
|
||
showPreviewIcon: showPreviewIcon,
|
||
showDownloadIcon: showDownloadIcon,
|
||
locale: _extends(_extends({}, locale), propLocale)
|
||
});
|
||
};
|
||
|
||
_this.renderUpload = function (_ref2) {
|
||
var _classNames2;
|
||
|
||
var getPrefixCls = _ref2.getPrefixCls;
|
||
var _this$props2 = _this.props,
|
||
customizePrefixCls = _this$props2.prefixCls,
|
||
className = _this$props2.className,
|
||
showUploadList = _this$props2.showUploadList,
|
||
listType = _this$props2.listType,
|
||
type = _this$props2.type,
|
||
disabled = _this$props2.disabled,
|
||
children = _this$props2.children,
|
||
style = _this$props2.style;
|
||
var _this$state = _this.state,
|
||
fileList = _this$state.fileList,
|
||
dragState = _this$state.dragState;
|
||
var prefixCls = getPrefixCls('upload', customizePrefixCls);
|
||
|
||
var rcUploadProps = _extends(_extends({
|
||
onStart: _this.onStart,
|
||
onError: _this.onError,
|
||
onProgress: _this.onProgress,
|
||
onSuccess: _this.onSuccess
|
||
}, _this.props), {
|
||
prefixCls: prefixCls,
|
||
beforeUpload: _this.beforeUpload
|
||
});
|
||
|
||
delete rcUploadProps.className;
|
||
delete rcUploadProps.style;
|
||
var uploadList = showUploadList ? React.createElement(_LocaleReceiver["default"], {
|
||
componentName: "Upload",
|
||
defaultLocale: _default2["default"].Upload
|
||
}, _this.renderUploadList) : null;
|
||
|
||
if (type === 'drag') {
|
||
var _classNames;
|
||
|
||
var dragCls = (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-drag"), true), _defineProperty(_classNames, "".concat(prefixCls, "-drag-uploading"), fileList.some(function (file) {
|
||
return file.status === 'uploading';
|
||
})), _defineProperty(_classNames, "".concat(prefixCls, "-drag-hover"), dragState === 'dragover'), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames), className);
|
||
return React.createElement("span", null, React.createElement("div", {
|
||
className: dragCls,
|
||
onDrop: _this.onFileDrop,
|
||
onDragOver: _this.onFileDrop,
|
||
onDragLeave: _this.onFileDrop,
|
||
style: style
|
||
}, React.createElement(_rcUpload["default"], _extends({}, rcUploadProps, {
|
||
ref: _this.saveUpload,
|
||
className: "".concat(prefixCls, "-btn")
|
||
}), React.createElement("div", {
|
||
className: "".concat(prefixCls, "-drag-container")
|
||
}, children))), uploadList);
|
||
}
|
||
|
||
var uploadButtonCls = (0, _classnames["default"])(prefixCls, (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-select"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-select-").concat(listType), true), _defineProperty(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _classNames2)); // Remove id to avoid open by label when trigger is hidden
|
||
// https://github.com/ant-design/ant-design/issues/14298
|
||
// https://github.com/ant-design/ant-design/issues/16478
|
||
|
||
if (!children || disabled) {
|
||
delete rcUploadProps.id;
|
||
}
|
||
|
||
var uploadButton = React.createElement("div", {
|
||
className: uploadButtonCls,
|
||
style: children ? undefined : {
|
||
display: 'none'
|
||
}
|
||
}, React.createElement(_rcUpload["default"], _extends({}, rcUploadProps, {
|
||
ref: _this.saveUpload
|
||
})));
|
||
|
||
if (listType === 'picture-card') {
|
||
return React.createElement("span", {
|
||
className: (0, _classnames["default"])(className, "".concat(prefixCls, "-picture-card-wrapper"))
|
||
}, uploadList, uploadButton);
|
||
}
|
||
|
||
return React.createElement("span", {
|
||
className: className
|
||
}, uploadButton, uploadList);
|
||
};
|
||
|
||
_this.state = {
|
||
fileList: props.fileList || props.defaultFileList || [],
|
||
dragState: 'drop'
|
||
};
|
||
(0, _warning["default"])('fileList' in props || !('value' in props), 'Upload', '`value` is not validate prop, do you mean `fileList`?');
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Upload, [{
|
||
key: "componentWillUnmount",
|
||
value: function componentWillUnmount() {
|
||
this.clearProgressTimer();
|
||
}
|
||
}, {
|
||
key: "clearProgressTimer",
|
||
value: function clearProgressTimer() {
|
||
clearInterval(this.progressTimer);
|
||
}
|
||
}, {
|
||
key: "autoUpdateProgress",
|
||
value: function autoUpdateProgress(_, file) {
|
||
var _this2 = this;
|
||
|
||
var getPercent = (0, _utils.genPercentAdd)();
|
||
var curPercent = 0;
|
||
this.clearProgressTimer();
|
||
this.progressTimer = setInterval(function () {
|
||
curPercent = getPercent(curPercent);
|
||
|
||
_this2.onProgress({
|
||
percent: curPercent * 100
|
||
}, file);
|
||
}, 200);
|
||
}
|
||
}, {
|
||
key: "render",
|
||
value: function render() {
|
||
return React.createElement(_configProvider.ConfigConsumer, null, this.renderUpload);
|
||
}
|
||
}], [{
|
||
key: "getDerivedStateFromProps",
|
||
value: function getDerivedStateFromProps(nextProps) {
|
||
if ('fileList' in nextProps) {
|
||
return {
|
||
fileList: nextProps.fileList || []
|
||
};
|
||
}
|
||
|
||
return null;
|
||
}
|
||
}]);
|
||
|
||
return Upload;
|
||
}(React.Component);
|
||
|
||
Upload.defaultProps = {
|
||
type: 'select',
|
||
multiple: false,
|
||
action: '',
|
||
data: {},
|
||
accept: '',
|
||
beforeUpload: _utils.T,
|
||
showUploadList: true,
|
||
listType: 'text',
|
||
className: '',
|
||
disabled: false,
|
||
supportServerRender: true
|
||
};
|
||
(0, _reactLifecyclesCompat.polyfill)(Upload);
|
||
var _default = Upload;
|
||
exports["default"] = _default;
|
||
//# sourceMappingURL=Upload.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1082:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony export (immutable) */ __webpack_exports__["a"] = uid;
|
||
var now = +new Date();
|
||
var index = 0;
|
||
|
||
function uid() {
|
||
return "rc-upload-" + now + "-" + ++index;
|
||
}
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1083:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseMatches = __webpack_require__(1187),
|
||
baseMatchesProperty = __webpack_require__(1224),
|
||
identity = __webpack_require__(1227),
|
||
isArray = __webpack_require__(916),
|
||
property = __webpack_require__(1228);
|
||
|
||
/**
|
||
* The base implementation of `_.iteratee`.
|
||
*
|
||
* @private
|
||
* @param {*} [value=_.identity] The value to convert to an iteratee.
|
||
* @returns {Function} Returns the iteratee.
|
||
*/
|
||
function baseIteratee(value) {
|
||
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
|
||
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
|
||
if (typeof value == 'function') {
|
||
return value;
|
||
}
|
||
if (value == null) {
|
||
return identity;
|
||
}
|
||
if (typeof value == 'object') {
|
||
return isArray(value)
|
||
? baseMatchesProperty(value[0], value[1])
|
||
: baseMatches(value);
|
||
}
|
||
return property(value);
|
||
}
|
||
|
||
module.exports = baseIteratee;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1084:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var ListCache = __webpack_require__(925),
|
||
stackClear = __webpack_require__(1189),
|
||
stackDelete = __webpack_require__(1190),
|
||
stackGet = __webpack_require__(1191),
|
||
stackHas = __webpack_require__(1192),
|
||
stackSet = __webpack_require__(1193);
|
||
|
||
/**
|
||
* Creates a stack cache object to store key-value pairs.
|
||
*
|
||
* @private
|
||
* @constructor
|
||
* @param {Array} [entries] The key-value pairs to cache.
|
||
*/
|
||
function Stack(entries) {
|
||
var data = this.__data__ = new ListCache(entries);
|
||
this.size = data.size;
|
||
}
|
||
|
||
// Add methods to `Stack`.
|
||
Stack.prototype.clear = stackClear;
|
||
Stack.prototype['delete'] = stackDelete;
|
||
Stack.prototype.get = stackGet;
|
||
Stack.prototype.has = stackHas;
|
||
Stack.prototype.set = stackSet;
|
||
|
||
module.exports = Stack;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1085:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseIsEqualDeep = __webpack_require__(1194),
|
||
isObjectLike = __webpack_require__(324);
|
||
|
||
/**
|
||
* The base implementation of `_.isEqual` which supports partial comparisons
|
||
* and tracks traversed objects.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to compare.
|
||
* @param {*} other The other value to compare.
|
||
* @param {boolean} bitmask The bitmask flags.
|
||
* 1 - Unordered comparison
|
||
* 2 - Partial comparison
|
||
* @param {Function} [customizer] The function to customize comparisons.
|
||
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
|
||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||
*/
|
||
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
||
if (value === other) {
|
||
return true;
|
||
}
|
||
if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
|
||
return value !== value && other !== other;
|
||
}
|
||
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
||
}
|
||
|
||
module.exports = baseIsEqual;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1086:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var SetCache = __webpack_require__(1087),
|
||
arraySome = __webpack_require__(1197),
|
||
cacheHas = __webpack_require__(1088);
|
||
|
||
/** Used to compose bitmasks for value comparisons. */
|
||
var COMPARE_PARTIAL_FLAG = 1,
|
||
COMPARE_UNORDERED_FLAG = 2;
|
||
|
||
/**
|
||
* A specialized version of `baseIsEqualDeep` for arrays with support for
|
||
* partial deep comparisons.
|
||
*
|
||
* @private
|
||
* @param {Array} array The array to compare.
|
||
* @param {Array} other The other array to compare.
|
||
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
||
* @param {Function} customizer The function to customize comparisons.
|
||
* @param {Function} equalFunc The function to determine equivalents of values.
|
||
* @param {Object} stack Tracks traversed `array` and `other` objects.
|
||
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
|
||
*/
|
||
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
||
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
||
arrLength = array.length,
|
||
othLength = other.length;
|
||
|
||
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
||
return false;
|
||
}
|
||
// Assume cyclic values are equal.
|
||
var stacked = stack.get(array);
|
||
if (stacked && stack.get(other)) {
|
||
return stacked == other;
|
||
}
|
||
var index = -1,
|
||
result = true,
|
||
seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
|
||
|
||
stack.set(array, other);
|
||
stack.set(other, array);
|
||
|
||
// Ignore non-index properties.
|
||
while (++index < arrLength) {
|
||
var arrValue = array[index],
|
||
othValue = other[index];
|
||
|
||
if (customizer) {
|
||
var compared = isPartial
|
||
? customizer(othValue, arrValue, index, other, array, stack)
|
||
: customizer(arrValue, othValue, index, array, other, stack);
|
||
}
|
||
if (compared !== undefined) {
|
||
if (compared) {
|
||
continue;
|
||
}
|
||
result = false;
|
||
break;
|
||
}
|
||
// Recursively compare arrays (susceptible to call stack limits).
|
||
if (seen) {
|
||
if (!arraySome(other, function(othValue, othIndex) {
|
||
if (!cacheHas(seen, othIndex) &&
|
||
(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
||
return seen.push(othIndex);
|
||
}
|
||
})) {
|
||
result = false;
|
||
break;
|
||
}
|
||
} else if (!(
|
||
arrValue === othValue ||
|
||
equalFunc(arrValue, othValue, bitmask, customizer, stack)
|
||
)) {
|
||
result = false;
|
||
break;
|
||
}
|
||
}
|
||
stack['delete'](array);
|
||
stack['delete'](other);
|
||
return result;
|
||
}
|
||
|
||
module.exports = equalArrays;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1087:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var MapCache = __webpack_require__(933),
|
||
setCacheAdd = __webpack_require__(1195),
|
||
setCacheHas = __webpack_require__(1196);
|
||
|
||
/**
|
||
*
|
||
* Creates an array cache object to store unique values.
|
||
*
|
||
* @private
|
||
* @constructor
|
||
* @param {Array} [values] The values to cache.
|
||
*/
|
||
function SetCache(values) {
|
||
var index = -1,
|
||
length = values == null ? 0 : values.length;
|
||
|
||
this.__data__ = new MapCache;
|
||
while (++index < length) {
|
||
this.add(values[index]);
|
||
}
|
||
}
|
||
|
||
// Add methods to `SetCache`.
|
||
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
||
SetCache.prototype.has = setCacheHas;
|
||
|
||
module.exports = SetCache;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1088:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Checks if a `cache` value for `key` exists.
|
||
*
|
||
* @private
|
||
* @param {Object} cache The cache to query.
|
||
* @param {string} key The key of the entry to check.
|
||
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
||
*/
|
||
function cacheHas(cache, key) {
|
||
return cache.has(key);
|
||
}
|
||
|
||
module.exports = cacheHas;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1089:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var arrayLikeKeys = __webpack_require__(1208),
|
||
baseKeys = __webpack_require__(1214),
|
||
isArrayLike = __webpack_require__(1218);
|
||
|
||
/**
|
||
* Creates an array of the own enumerable property names of `object`.
|
||
*
|
||
* **Note:** Non-object values are coerced to objects. See the
|
||
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||
* for more details.
|
||
*
|
||
* @static
|
||
* @since 0.1.0
|
||
* @memberOf _
|
||
* @category Object
|
||
* @param {Object} object The object to query.
|
||
* @returns {Array} Returns the array of property names.
|
||
* @example
|
||
*
|
||
* function Foo() {
|
||
* this.a = 1;
|
||
* this.b = 2;
|
||
* }
|
||
*
|
||
* Foo.prototype.c = 3;
|
||
*
|
||
* _.keys(new Foo);
|
||
* // => ['a', 'b'] (iteration order is not guaranteed)
|
||
*
|
||
* _.keys('hi');
|
||
* // => ['0', '1']
|
||
*/
|
||
function keys(object) {
|
||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||
}
|
||
|
||
module.exports = keys;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1090:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(172),
|
||
stubFalse = __webpack_require__(1210);
|
||
|
||
/** Detect free variable `exports`. */
|
||
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
||
|
||
/** Detect free variable `module`. */
|
||
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
||
|
||
/** Detect the popular CommonJS extension `module.exports`. */
|
||
var moduleExports = freeModule && freeModule.exports === freeExports;
|
||
|
||
/** Built-in value references. */
|
||
var Buffer = moduleExports ? root.Buffer : undefined;
|
||
|
||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
||
|
||
/**
|
||
* Checks if `value` is a buffer.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 4.3.0
|
||
* @category Lang
|
||
* @param {*} value The value to check.
|
||
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
||
* @example
|
||
*
|
||
* _.isBuffer(new Buffer(2));
|
||
* // => true
|
||
*
|
||
* _.isBuffer(new Uint8Array(2));
|
||
* // => false
|
||
*/
|
||
var isBuffer = nativeIsBuffer || stubFalse;
|
||
|
||
module.exports = isBuffer;
|
||
|
||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(326)(module)))
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1091:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseIsTypedArray = __webpack_require__(1211),
|
||
baseUnary = __webpack_require__(1212),
|
||
nodeUtil = __webpack_require__(1213);
|
||
|
||
/* Node.js helper references. */
|
||
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
||
|
||
/**
|
||
* Checks if `value` is classified as a typed array.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 3.0.0
|
||
* @category Lang
|
||
* @param {*} value The value to check.
|
||
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
||
* @example
|
||
*
|
||
* _.isTypedArray(new Uint8Array);
|
||
* // => true
|
||
*
|
||
* _.isTypedArray([]);
|
||
* // => false
|
||
*/
|
||
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
||
|
||
module.exports = isTypedArray;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1092:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var getNative = __webpack_require__(917),
|
||
root = __webpack_require__(172);
|
||
|
||
/* Built-in method references that are verified to be native. */
|
||
var Set = getNative(root, 'Set');
|
||
|
||
module.exports = Set;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1093:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var isObject = __webpack_require__(175);
|
||
|
||
/**
|
||
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to check.
|
||
* @returns {boolean} Returns `true` if `value` if suitable for strict
|
||
* equality comparisons, else `false`.
|
||
*/
|
||
function isStrictComparable(value) {
|
||
return value === value && !isObject(value);
|
||
}
|
||
|
||
module.exports = isStrictComparable;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1094:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* A specialized version of `matchesProperty` for source values suitable
|
||
* for strict equality comparisons, i.e. `===`.
|
||
*
|
||
* @private
|
||
* @param {string} key The key of the property to get.
|
||
* @param {*} srcValue The value to match.
|
||
* @returns {Function} Returns the new spec function.
|
||
*/
|
||
function matchesStrictComparable(key, srcValue) {
|
||
return function(object) {
|
||
if (object == null) {
|
||
return false;
|
||
}
|
||
return object[key] === srcValue &&
|
||
(srcValue !== undefined || (key in Object(object)));
|
||
};
|
||
}
|
||
|
||
module.exports = matchesStrictComparable;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1095:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
||
* support for iteratee shorthands.
|
||
*
|
||
* @private
|
||
* @param {Array} array The array to inspect.
|
||
* @param {Function} predicate The function invoked per iteration.
|
||
* @param {number} fromIndex The index to search from.
|
||
* @param {boolean} [fromRight] Specify iterating from right to left.
|
||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||
*/
|
||
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
||
var length = array.length,
|
||
index = fromIndex + (fromRight ? 1 : -1);
|
||
|
||
while ((fromRight ? index-- : ++index < length)) {
|
||
if (predicate(array[index], index, array)) {
|
||
return index;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
|
||
module.exports = baseFindIndex;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1096:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.T = T;
|
||
exports.fileToObject = fileToObject;
|
||
exports.genPercentAdd = genPercentAdd;
|
||
exports.getFileItem = getFileItem;
|
||
exports.removeFileItem = removeFileItem;
|
||
exports.previewImage = previewImage;
|
||
exports.isImageUrl = void 0;
|
||
|
||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
||
function T() {
|
||
return true;
|
||
} // Fix IE file.status problem
|
||
// via coping a new Object
|
||
|
||
|
||
function fileToObject(file) {
|
||
return _extends(_extends({}, file), {
|
||
lastModified: file.lastModified,
|
||
lastModifiedDate: file.lastModifiedDate,
|
||
name: file.name,
|
||
size: file.size,
|
||
type: file.type,
|
||
uid: file.uid,
|
||
percent: 0,
|
||
originFileObj: file
|
||
});
|
||
}
|
||
/**
|
||
* 生成Progress percent: 0.1 -> 0.98
|
||
* - for ie
|
||
*/
|
||
|
||
|
||
function genPercentAdd() {
|
||
var k = 0.1;
|
||
var i = 0.01;
|
||
var end = 0.98;
|
||
return function (s) {
|
||
var start = s;
|
||
|
||
if (start >= end) {
|
||
return start;
|
||
}
|
||
|
||
start += k;
|
||
k -= i;
|
||
|
||
if (k < 0.001) {
|
||
k = 0.001;
|
||
}
|
||
|
||
return start;
|
||
};
|
||
}
|
||
|
||
function getFileItem(file, fileList) {
|
||
var matchKey = file.uid !== undefined ? 'uid' : 'name';
|
||
return fileList.filter(function (item) {
|
||
return item[matchKey] === file[matchKey];
|
||
})[0];
|
||
}
|
||
|
||
function removeFileItem(file, fileList) {
|
||
var matchKey = file.uid !== undefined ? 'uid' : 'name';
|
||
var removed = fileList.filter(function (item) {
|
||
return item[matchKey] !== file[matchKey];
|
||
});
|
||
|
||
if (removed.length === fileList.length) {
|
||
return null;
|
||
}
|
||
|
||
return removed;
|
||
} // ==================== Default Image Preview ====================
|
||
|
||
|
||
var extname = function extname() {
|
||
var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||
var temp = url.split('/');
|
||
var filename = temp[temp.length - 1];
|
||
var filenameWithoutSuffix = filename.split(/#|\?/)[0];
|
||
return (/\.[^./\\]*$/.exec(filenameWithoutSuffix) || [''])[0];
|
||
};
|
||
|
||
var isImageFileType = function isImageFileType(type) {
|
||
return !!type && type.indexOf('image/') === 0;
|
||
};
|
||
|
||
var isImageUrl = function isImageUrl(file) {
|
||
if (isImageFileType(file.type)) {
|
||
return true;
|
||
}
|
||
|
||
var url = file.thumbUrl || file.url;
|
||
var extension = extname(url);
|
||
|
||
if (/^data:image\//.test(url) || /(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(extension)) {
|
||
return true;
|
||
}
|
||
|
||
if (/^data:/.test(url)) {
|
||
// other file types of base64
|
||
return false;
|
||
}
|
||
|
||
if (extension) {
|
||
// other file types which have extension
|
||
return false;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
exports.isImageUrl = isImageUrl;
|
||
var MEASURE_SIZE = 200;
|
||
|
||
function previewImage(file) {
|
||
return new Promise(function (resolve) {
|
||
if (!isImageFileType(file.type)) {
|
||
resolve('');
|
||
return;
|
||
}
|
||
|
||
var canvas = document.createElement('canvas');
|
||
canvas.width = MEASURE_SIZE;
|
||
canvas.height = MEASURE_SIZE;
|
||
canvas.style.cssText = "position: fixed; left: 0; top: 0; width: ".concat(MEASURE_SIZE, "px; height: ").concat(MEASURE_SIZE, "px; z-index: 9999; display: none;");
|
||
document.body.appendChild(canvas);
|
||
var ctx = canvas.getContext('2d');
|
||
var img = new Image();
|
||
|
||
img.onload = function () {
|
||
var width = img.width,
|
||
height = img.height;
|
||
var drawWidth = MEASURE_SIZE;
|
||
var drawHeight = MEASURE_SIZE;
|
||
var offsetX = 0;
|
||
var offsetY = 0;
|
||
|
||
if (width < height) {
|
||
drawHeight = height * (MEASURE_SIZE / width);
|
||
offsetY = -(drawHeight - drawWidth) / 2;
|
||
} else {
|
||
drawWidth = width * (MEASURE_SIZE / height);
|
||
offsetX = -(drawWidth - drawHeight) / 2;
|
||
}
|
||
|
||
ctx.drawImage(img, offsetX, offsetY, drawWidth, drawHeight);
|
||
var dataURL = canvas.toDataURL();
|
||
document.body.removeChild(canvas);
|
||
resolve(dataURL);
|
||
};
|
||
|
||
img.src = window.URL.createObjectURL(file);
|
||
});
|
||
}
|
||
//# sourceMappingURL=utils.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1132:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
__webpack_require__(31);
|
||
|
||
__webpack_require__(1177);
|
||
|
||
__webpack_require__(1152);
|
||
|
||
__webpack_require__(174);
|
||
//# sourceMappingURL=css.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1133:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var _Upload = _interopRequireDefault(__webpack_require__(1081));
|
||
|
||
var _Dragger = _interopRequireDefault(__webpack_require__(1240));
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
_Upload["default"].Dragger = _Dragger["default"];
|
||
var _default = _Upload["default"];
|
||
exports["default"] = _default;
|
||
//# sourceMappingURL=index.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1152:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
__webpack_require__(31);
|
||
|
||
__webpack_require__(1154);
|
||
//# sourceMappingURL=css.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1153:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var _progress = _interopRequireDefault(__webpack_require__(1156));
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
var _default = _progress["default"];
|
||
exports["default"] = _default;
|
||
//# sourceMappingURL=index.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1154:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||
|
||
// load the styles
|
||
var content = __webpack_require__(1155);
|
||
if(typeof content === 'string') content = [[module.i, content, '']];
|
||
// Prepare cssTransformation
|
||
var transform;
|
||
|
||
var options = {"hmr":false}
|
||
options.transform = transform
|
||
// add the styles to the DOM
|
||
var update = __webpack_require__(317)(content, options);
|
||
if(content.locals) module.exports = content.locals;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1155:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
exports = module.exports = __webpack_require__(316)(true);
|
||
// imports
|
||
|
||
|
||
// module
|
||
exports.push([module.i, ".ant-progress{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";display:inline-block}.ant-progress-line{position:relative;width:100%;font-size:14px}.ant-progress-small.ant-progress-line,.ant-progress-small.ant-progress-line .ant-progress-text .anticon{font-size:12px}.ant-progress-outer{display:inline-block;width:100%;margin-right:0;padding-right:0}.ant-progress-show-info .ant-progress-outer{margin-right:calc(-2em - 8px);padding-right:calc(2em + 8px)}.ant-progress-inner{position:relative;display:inline-block;width:100%;overflow:hidden;vertical-align:middle;background-color:#f5f5f5;border-radius:100px}.ant-progress-circle-trail{stroke:#f5f5f5}.ant-progress-circle-path{-webkit-animation:ant-progress-appear .3s;animation:ant-progress-appear .3s}.ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path{stroke:#1890ff}.ant-progress-bg,.ant-progress-success-bg{position:relative;background-color:#1890ff;border-radius:100px;-webkit-transition:all .4s cubic-bezier(.08,.82,.17,1) 0s;-o-transition:all .4s cubic-bezier(.08,.82,.17,1) 0s;transition:all .4s cubic-bezier(.08,.82,.17,1) 0s}.ant-progress-success-bg{position:absolute;top:0;left:0;background-color:#52c41a}.ant-progress-text{display:inline-block;width:2em;margin-left:8px;color:rgba(0,0,0,.45);font-size:1em;line-height:1;white-space:nowrap;text-align:left;vertical-align:middle;word-break:normal}.ant-progress-text .anticon{font-size:14px}.ant-progress-status-active .ant-progress-bg:before{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;border-radius:10px;opacity:0;-webkit-animation:ant-progress-active 2.4s cubic-bezier(.23,1,.32,1) infinite;animation:ant-progress-active 2.4s cubic-bezier(.23,1,.32,1) infinite;content:\"\"}.ant-progress-status-exception .ant-progress-bg{background-color:#f5222d}.ant-progress-status-exception .ant-progress-text{color:#f5222d}.ant-progress-status-exception .ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path{stroke:#f5222d}.ant-progress-status-success .ant-progress-bg{background-color:#52c41a}.ant-progress-status-success .ant-progress-text{color:#52c41a}.ant-progress-status-success .ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path{stroke:#52c41a}.ant-progress-circle .ant-progress-inner{position:relative;line-height:1;background-color:transparent}.ant-progress-circle .ant-progress-text{position:absolute;top:50%;left:50%;width:100%;margin:0;padding:0;color:rgba(0,0,0,.65);line-height:1;white-space:normal;text-align:center;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ant-progress-circle .ant-progress-text .anticon{font-size:1.16666667em}.ant-progress-circle.ant-progress-status-exception .ant-progress-text{color:#f5222d}.ant-progress-circle.ant-progress-status-success .ant-progress-text{color:#52c41a}@-webkit-keyframes ant-progress-active{0%{width:0;opacity:.1}20%{width:0;opacity:.5}to{width:100%;opacity:0}}@keyframes ant-progress-active{0%{width:0;opacity:.1}20%{width:0;opacity:.5}to{width:100%;opacity:0}}", "", {"version":3,"sources":["/Users/hs/forgeplus-react/node_modules/antd/lib/progress/style/index.css"],"names":[],"mappings":"AAIA,cACE,8BAA+B,AACvB,sBAAuB,AAC/B,SAAU,AACV,UAAW,AACX,sBAA2B,AAC3B,eAAgB,AAChB,0BAA2B,AAC3B,gBAAiB,AACjB,gBAAiB,AACjB,qCAAsC,AAC9B,6BAA8B,AACtC,oBAAsB,CACvB,AACD,mBACE,kBAAmB,AACnB,WAAY,AACZ,cAAgB,CACjB,AACD,wGAEE,cAAgB,CACjB,AACD,oBACE,qBAAsB,AACtB,WAAY,AACZ,eAAgB,AAChB,eAAiB,CAClB,AACD,4CACE,8BAA+B,AAC/B,6BAA+B,CAChC,AACD,oBACE,kBAAmB,AACnB,qBAAsB,AACtB,WAAY,AACZ,gBAAiB,AACjB,sBAAuB,AACvB,yBAA0B,AAC1B,mBAAqB,CACtB,AACD,2BACE,cAAgB,CACjB,AACD,0BACE,0CAA4C,AACpC,iCAAoC,CAC7C,AACD,iFACE,cAAgB,CACjB,AACD,0CAEE,kBAAmB,AACnB,yBAA0B,AAC1B,oBAAqB,AACrB,0DAAkE,AAClE,qDAA6D,AAC7D,iDAA0D,CAC3D,AACD,yBACE,kBAAmB,AACnB,MAAO,AACP,OAAQ,AACR,wBAA0B,CAC3B,AACD,mBACE,qBAAsB,AACtB,UAAW,AACX,gBAAiB,AACjB,sBAA2B,AAC3B,cAAe,AACf,cAAe,AACf,mBAAoB,AACpB,gBAAiB,AACjB,sBAAuB,AACvB,iBAAmB,CACpB,AACD,4BACE,cAAgB,CACjB,AACD,oDACE,kBAAmB,AACnB,MAAO,AACP,QAAS,AACT,SAAU,AACV,OAAQ,AACR,gBAAiB,AACjB,mBAAoB,AACpB,UAAW,AACX,8EAAoF,AAC5E,sEAA4E,AACpF,UAAY,CACb,AACD,gDACE,wBAA0B,CAC3B,AACD,kDACE,aAAe,CAChB,AACD,gHACE,cAAgB,CACjB,AACD,8CACE,wBAA0B,CAC3B,AACD,gDACE,aAAe,CAChB,AACD,8GACE,cAAgB,CACjB,AACD,yCACE,kBAAmB,AACnB,cAAe,AACf,4BAA8B,CAC/B,AACD,wCACE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,WAAY,AACZ,SAAU,AACV,UAAW,AACX,sBAA2B,AAC3B,cAAe,AACf,mBAAoB,AACpB,kBAAmB,AACnB,uCAAyC,AACrC,mCAAqC,AACjC,8BAAiC,CAC1C,AACD,iDACE,sBAAwB,CACzB,AACD,sEACE,aAAe,CAChB,AACD,oEACE,aAAe,CAChB,AACD,uCACE,GACE,QAAS,AACT,UAAa,CACd,AACD,IACE,QAAS,AACT,UAAa,CACd,AACD,GACE,WAAY,AACZ,SAAW,CACZ,CACF,AACD,+BACE,GACE,QAAS,AACT,UAAa,CACd,AACD,IACE,QAAS,AACT,UAAa,CACd,AACD,GACE,WAAY,AACZ,SAAW,CACZ,CACF","file":"index.css","sourcesContent":["/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.ant-progress {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.65);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5;\n list-style: none;\n -webkit-font-feature-settings: 'tnum';\n font-feature-settings: 'tnum';\n display: inline-block;\n}\n.ant-progress-line {\n position: relative;\n width: 100%;\n font-size: 14px;\n}\n.ant-progress-small.ant-progress-line,\n.ant-progress-small.ant-progress-line .ant-progress-text .anticon {\n font-size: 12px;\n}\n.ant-progress-outer {\n display: inline-block;\n width: 100%;\n margin-right: 0;\n padding-right: 0;\n}\n.ant-progress-show-info .ant-progress-outer {\n margin-right: calc(-2em - 8px);\n padding-right: calc(2em + 8px);\n}\n.ant-progress-inner {\n position: relative;\n display: inline-block;\n width: 100%;\n overflow: hidden;\n vertical-align: middle;\n background-color: #f5f5f5;\n border-radius: 100px;\n}\n.ant-progress-circle-trail {\n stroke: #f5f5f5;\n}\n.ant-progress-circle-path {\n -webkit-animation: ant-progress-appear 0.3s;\n animation: ant-progress-appear 0.3s;\n}\n.ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path {\n stroke: #1890ff;\n}\n.ant-progress-success-bg,\n.ant-progress-bg {\n position: relative;\n background-color: #1890ff;\n border-radius: 100px;\n -webkit-transition: all 0.4s cubic-bezier(0.08, 0.82, 0.17, 1) 0s;\n -o-transition: all 0.4s cubic-bezier(0.08, 0.82, 0.17, 1) 0s;\n transition: all 0.4s cubic-bezier(0.08, 0.82, 0.17, 1) 0s;\n}\n.ant-progress-success-bg {\n position: absolute;\n top: 0;\n left: 0;\n background-color: #52c41a;\n}\n.ant-progress-text {\n display: inline-block;\n width: 2em;\n margin-left: 8px;\n color: rgba(0, 0, 0, 0.45);\n font-size: 1em;\n line-height: 1;\n white-space: nowrap;\n text-align: left;\n vertical-align: middle;\n word-break: normal;\n}\n.ant-progress-text .anticon {\n font-size: 14px;\n}\n.ant-progress-status-active .ant-progress-bg::before {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background: #fff;\n border-radius: 10px;\n opacity: 0;\n -webkit-animation: ant-progress-active 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite;\n animation: ant-progress-active 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite;\n content: '';\n}\n.ant-progress-status-exception .ant-progress-bg {\n background-color: #f5222d;\n}\n.ant-progress-status-exception .ant-progress-text {\n color: #f5222d;\n}\n.ant-progress-status-exception .ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path {\n stroke: #f5222d;\n}\n.ant-progress-status-success .ant-progress-bg {\n background-color: #52c41a;\n}\n.ant-progress-status-success .ant-progress-text {\n color: #52c41a;\n}\n.ant-progress-status-success .ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path {\n stroke: #52c41a;\n}\n.ant-progress-circle .ant-progress-inner {\n position: relative;\n line-height: 1;\n background-color: transparent;\n}\n.ant-progress-circle .ant-progress-text {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 100%;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.65);\n line-height: 1;\n white-space: normal;\n text-align: center;\n -webkit-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ant-progress-circle .ant-progress-text .anticon {\n font-size: 1.16666667em;\n}\n.ant-progress-circle.ant-progress-status-exception .ant-progress-text {\n color: #f5222d;\n}\n.ant-progress-circle.ant-progress-status-success .ant-progress-text {\n color: #52c41a;\n}\n@-webkit-keyframes ant-progress-active {\n 0% {\n width: 0;\n opacity: 0.1;\n }\n 20% {\n width: 0;\n opacity: 0.5;\n }\n 100% {\n width: 100%;\n opacity: 0;\n }\n}\n@keyframes ant-progress-active {\n 0% {\n width: 0;\n opacity: 0.1;\n }\n 20% {\n width: 0;\n opacity: 0.5;\n }\n 100% {\n width: 100%;\n opacity: 0;\n }\n}\n"],"sourceRoot":""}]);
|
||
|
||
// exports
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1156:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
|
||
|
||
var React = _interopRequireWildcard(__webpack_require__(0));
|
||
|
||
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
||
|
||
var _omit = _interopRequireDefault(__webpack_require__(46));
|
||
|
||
var _icon = _interopRequireDefault(__webpack_require__(27));
|
||
|
||
var _configProvider = __webpack_require__(14);
|
||
|
||
var _type = __webpack_require__(71);
|
||
|
||
var _Line = _interopRequireDefault(__webpack_require__(1157));
|
||
|
||
var _Circle = _interopRequireDefault(__webpack_require__(1158));
|
||
|
||
var _utils = __webpack_require__(959);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||
|
||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
||
var t = {};
|
||
|
||
for (var p in s) {
|
||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||
}
|
||
|
||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||
}
|
||
return t;
|
||
};
|
||
|
||
var ProgressTypes = (0, _type.tuple)('line', 'circle', 'dashboard');
|
||
var ProgressStatuses = (0, _type.tuple)('normal', 'exception', 'active', 'success');
|
||
|
||
var Progress =
|
||
/*#__PURE__*/
|
||
function (_React$Component) {
|
||
_inherits(Progress, _React$Component);
|
||
|
||
function Progress() {
|
||
var _this;
|
||
|
||
_classCallCheck(this, Progress);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Progress).apply(this, arguments));
|
||
|
||
_this.renderProgress = function (_ref) {
|
||
var _classNames;
|
||
|
||
var getPrefixCls = _ref.getPrefixCls;
|
||
|
||
var _assertThisInitialize = _assertThisInitialized(_this),
|
||
props = _assertThisInitialize.props;
|
||
|
||
var customizePrefixCls = props.prefixCls,
|
||
className = props.className,
|
||
size = props.size,
|
||
type = props.type,
|
||
showInfo = props.showInfo,
|
||
restProps = __rest(props, ["prefixCls", "className", "size", "type", "showInfo"]);
|
||
|
||
var prefixCls = getPrefixCls('progress', customizePrefixCls);
|
||
|
||
var progressStatus = _this.getProgressStatus();
|
||
|
||
var progressInfo = _this.renderProcessInfo(prefixCls, progressStatus);
|
||
|
||
var progress; // Render progress shape
|
||
|
||
if (type === 'line') {
|
||
progress = React.createElement(_Line["default"], _extends({}, _this.props, {
|
||
prefixCls: prefixCls
|
||
}), progressInfo);
|
||
} else if (type === 'circle' || type === 'dashboard') {
|
||
progress = React.createElement(_Circle["default"], _extends({}, _this.props, {
|
||
prefixCls: prefixCls,
|
||
progressStatus: progressStatus
|
||
}), progressInfo);
|
||
}
|
||
|
||
var classString = (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(type === 'dashboard' && 'circle' || type), true), _defineProperty(_classNames, "".concat(prefixCls, "-status-").concat(progressStatus), true), _defineProperty(_classNames, "".concat(prefixCls, "-show-info"), showInfo), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(size), size), _classNames), className);
|
||
return React.createElement("div", _extends({}, (0, _omit["default"])(restProps, ['status', 'format', 'trailColor', 'successPercent', 'strokeWidth', 'width', 'gapDegree', 'gapPosition', 'strokeColor', 'strokeLinecap', 'percent']), {
|
||
className: classString
|
||
}), progress);
|
||
};
|
||
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Progress, [{
|
||
key: "getPercentNumber",
|
||
value: function getPercentNumber() {
|
||
var _this$props = this.props,
|
||
successPercent = _this$props.successPercent,
|
||
_this$props$percent = _this$props.percent,
|
||
percent = _this$props$percent === void 0 ? 0 : _this$props$percent;
|
||
return parseInt(successPercent !== undefined ? successPercent.toString() : percent.toString(), 10);
|
||
}
|
||
}, {
|
||
key: "getProgressStatus",
|
||
value: function getProgressStatus() {
|
||
var status = this.props.status;
|
||
|
||
if (ProgressStatuses.indexOf(status) < 0 && this.getPercentNumber() >= 100) {
|
||
return 'success';
|
||
}
|
||
|
||
return status || 'normal';
|
||
}
|
||
}, {
|
||
key: "renderProcessInfo",
|
||
value: function renderProcessInfo(prefixCls, progressStatus) {
|
||
var _this$props2 = this.props,
|
||
showInfo = _this$props2.showInfo,
|
||
format = _this$props2.format,
|
||
type = _this$props2.type,
|
||
percent = _this$props2.percent,
|
||
successPercent = _this$props2.successPercent;
|
||
if (!showInfo) return null;
|
||
var text;
|
||
|
||
var textFormatter = format || function (percentNumber) {
|
||
return "".concat(percentNumber, "%");
|
||
};
|
||
|
||
var iconType = type === 'circle' || type === 'dashboard' ? '' : '-circle';
|
||
|
||
if (format || progressStatus !== 'exception' && progressStatus !== 'success') {
|
||
text = textFormatter((0, _utils.validProgress)(percent), (0, _utils.validProgress)(successPercent));
|
||
} else if (progressStatus === 'exception') {
|
||
text = React.createElement(_icon["default"], {
|
||
type: "close".concat(iconType),
|
||
theme: type === 'line' ? 'filled' : 'outlined'
|
||
});
|
||
} else if (progressStatus === 'success') {
|
||
text = React.createElement(_icon["default"], {
|
||
type: "check".concat(iconType),
|
||
theme: type === 'line' ? 'filled' : 'outlined'
|
||
});
|
||
}
|
||
|
||
return React.createElement("span", {
|
||
className: "".concat(prefixCls, "-text"),
|
||
title: typeof text === 'string' ? text : undefined
|
||
}, text);
|
||
}
|
||
}, {
|
||
key: "render",
|
||
value: function render() {
|
||
return React.createElement(_configProvider.ConfigConsumer, null, this.renderProgress);
|
||
}
|
||
}]);
|
||
|
||
return Progress;
|
||
}(React.Component);
|
||
|
||
exports["default"] = Progress;
|
||
Progress.defaultProps = {
|
||
type: 'line',
|
||
percent: 0,
|
||
showInfo: true,
|
||
trailColor: '#f3f3f3',
|
||
size: 'default',
|
||
gapDegree: 0,
|
||
strokeLinecap: 'round'
|
||
};
|
||
Progress.propTypes = {
|
||
status: PropTypes.oneOf(ProgressStatuses),
|
||
type: PropTypes.oneOf(ProgressTypes),
|
||
showInfo: PropTypes.bool,
|
||
percent: PropTypes.number,
|
||
width: PropTypes.number,
|
||
strokeWidth: PropTypes.number,
|
||
strokeLinecap: PropTypes.oneOf(['round', 'square']),
|
||
strokeColor: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
||
trailColor: PropTypes.string,
|
||
format: PropTypes.func,
|
||
gapDegree: PropTypes.number
|
||
};
|
||
//# sourceMappingURL=progress.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1157:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = exports.handleGradient = exports.sortGradient = void 0;
|
||
|
||
var React = _interopRequireWildcard(__webpack_require__(0));
|
||
|
||
var _utils = __webpack_require__(959);
|
||
|
||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||
|
||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
||
|
||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
||
|
||
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
||
|
||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
||
|
||
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
||
var t = {};
|
||
|
||
for (var p in s) {
|
||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||
}
|
||
|
||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||
}
|
||
return t;
|
||
};
|
||
|
||
/**
|
||
* {
|
||
* '0%': '#afc163',
|
||
* '75%': '#009900',
|
||
* '50%': 'green', ====> '#afc163 0%, #66FF00 25%, #00CC00 50%, #009900 75%, #ffffff 100%'
|
||
* '25%': '#66FF00',
|
||
* '100%': '#ffffff'
|
||
* }
|
||
*/
|
||
var sortGradient = function sortGradient(gradients) {
|
||
var tempArr = []; // eslint-disable-next-line no-restricted-syntax
|
||
|
||
for (var _i = 0, _Object$entries = Object.entries(gradients); _i < _Object$entries.length; _i++) {
|
||
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
||
key = _Object$entries$_i[0],
|
||
value = _Object$entries$_i[1];
|
||
|
||
var formatKey = parseFloat(key.replace(/%/g, ''));
|
||
|
||
if (isNaN(formatKey)) {
|
||
return {};
|
||
}
|
||
|
||
tempArr.push({
|
||
key: formatKey,
|
||
value: value
|
||
});
|
||
}
|
||
|
||
tempArr = tempArr.sort(function (a, b) {
|
||
return a.key - b.key;
|
||
});
|
||
return tempArr.map(function (_ref) {
|
||
var key = _ref.key,
|
||
value = _ref.value;
|
||
return "".concat(value, " ").concat(key, "%");
|
||
}).join(', ');
|
||
};
|
||
/**
|
||
* {
|
||
* '0%': '#afc163',
|
||
* '25%': '#66FF00',
|
||
* '50%': '#00CC00', ====> linear-gradient(to right, #afc163 0%, #66FF00 25%,
|
||
* '75%': '#009900', #00CC00 50%, #009900 75%, #ffffff 100%)
|
||
* '100%': '#ffffff'
|
||
* }
|
||
*
|
||
* Then this man came to realize the truth:
|
||
* Besides six pence, there is the moon.
|
||
* Besides bread and butter, there is the bug.
|
||
* And...
|
||
* Besides women, there is the code.
|
||
*/
|
||
|
||
|
||
exports.sortGradient = sortGradient;
|
||
|
||
var handleGradient = function handleGradient(strokeColor) {
|
||
var _strokeColor$from = strokeColor.from,
|
||
from = _strokeColor$from === void 0 ? '#1890ff' : _strokeColor$from,
|
||
_strokeColor$to = strokeColor.to,
|
||
to = _strokeColor$to === void 0 ? '#1890ff' : _strokeColor$to,
|
||
_strokeColor$directio = strokeColor.direction,
|
||
direction = _strokeColor$directio === void 0 ? 'to right' : _strokeColor$directio,
|
||
rest = __rest(strokeColor, ["from", "to", "direction"]);
|
||
|
||
if (Object.keys(rest).length !== 0) {
|
||
var sortedGradients = sortGradient(rest);
|
||
return {
|
||
backgroundImage: "linear-gradient(".concat(direction, ", ").concat(sortedGradients, ")")
|
||
};
|
||
}
|
||
|
||
return {
|
||
backgroundImage: "linear-gradient(".concat(direction, ", ").concat(from, ", ").concat(to, ")")
|
||
};
|
||
};
|
||
|
||
exports.handleGradient = handleGradient;
|
||
|
||
var Line = function Line(props) {
|
||
var prefixCls = props.prefixCls,
|
||
percent = props.percent,
|
||
successPercent = props.successPercent,
|
||
strokeWidth = props.strokeWidth,
|
||
size = props.size,
|
||
strokeColor = props.strokeColor,
|
||
strokeLinecap = props.strokeLinecap,
|
||
children = props.children;
|
||
var backgroundProps;
|
||
|
||
if (strokeColor && typeof strokeColor !== 'string') {
|
||
backgroundProps = handleGradient(strokeColor);
|
||
} else {
|
||
backgroundProps = {
|
||
background: strokeColor
|
||
};
|
||
}
|
||
|
||
var percentStyle = _extends({
|
||
width: "".concat((0, _utils.validProgress)(percent), "%"),
|
||
height: strokeWidth || (size === 'small' ? 6 : 8),
|
||
borderRadius: strokeLinecap === 'square' ? 0 : ''
|
||
}, backgroundProps);
|
||
|
||
var successPercentStyle = {
|
||
width: "".concat((0, _utils.validProgress)(successPercent), "%"),
|
||
height: strokeWidth || (size === 'small' ? 6 : 8),
|
||
borderRadius: strokeLinecap === 'square' ? 0 : ''
|
||
};
|
||
var successSegment = successPercent !== undefined ? React.createElement("div", {
|
||
className: "".concat(prefixCls, "-success-bg"),
|
||
style: successPercentStyle
|
||
}) : null;
|
||
return React.createElement("div", null, React.createElement("div", {
|
||
className: "".concat(prefixCls, "-outer")
|
||
}, React.createElement("div", {
|
||
className: "".concat(prefixCls, "-inner")
|
||
}, React.createElement("div", {
|
||
className: "".concat(prefixCls, "-bg"),
|
||
style: percentStyle
|
||
}), successSegment)), children);
|
||
};
|
||
|
||
var _default = Line;
|
||
exports["default"] = _default;
|
||
//# sourceMappingURL=Line.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1158:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var React = _interopRequireWildcard(__webpack_require__(0));
|
||
|
||
var _rcProgress = __webpack_require__(1159);
|
||
|
||
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
||
|
||
var _utils = __webpack_require__(959);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
var statusColorMap = {
|
||
normal: '#108ee9',
|
||
exception: '#ff5500',
|
||
success: '#87d068'
|
||
};
|
||
|
||
function getPercentage(_ref) {
|
||
var percent = _ref.percent,
|
||
successPercent = _ref.successPercent;
|
||
var ptg = (0, _utils.validProgress)(percent);
|
||
|
||
if (!successPercent) {
|
||
return ptg;
|
||
}
|
||
|
||
var successPtg = (0, _utils.validProgress)(successPercent);
|
||
return [successPercent, (0, _utils.validProgress)(ptg - successPtg)];
|
||
}
|
||
|
||
function getStrokeColor(_ref2) {
|
||
var progressStatus = _ref2.progressStatus,
|
||
successPercent = _ref2.successPercent,
|
||
strokeColor = _ref2.strokeColor;
|
||
var color = strokeColor || statusColorMap[progressStatus];
|
||
|
||
if (!successPercent) {
|
||
return color;
|
||
}
|
||
|
||
return [statusColorMap.success, color];
|
||
}
|
||
|
||
var Circle = function Circle(props) {
|
||
var prefixCls = props.prefixCls,
|
||
width = props.width,
|
||
strokeWidth = props.strokeWidth,
|
||
trailColor = props.trailColor,
|
||
strokeLinecap = props.strokeLinecap,
|
||
gapPosition = props.gapPosition,
|
||
gapDegree = props.gapDegree,
|
||
type = props.type,
|
||
children = props.children;
|
||
var circleSize = width || 120;
|
||
var circleStyle = {
|
||
width: circleSize,
|
||
height: circleSize,
|
||
fontSize: circleSize * 0.15 + 6
|
||
};
|
||
var circleWidth = strokeWidth || 6;
|
||
var gapPos = gapPosition || type === 'dashboard' && 'bottom' || 'top';
|
||
var gapDeg = gapDegree || (type === 'dashboard' ? 75 : undefined);
|
||
var strokeColor = getStrokeColor(props);
|
||
var isGradient = Object.prototype.toString.call(strokeColor) === '[object Object]';
|
||
var wrapperClassName = (0, _classnames["default"])("".concat(prefixCls, "-inner"), _defineProperty({}, "".concat(prefixCls, "-circle-gradient"), isGradient));
|
||
return React.createElement("div", {
|
||
className: wrapperClassName,
|
||
style: circleStyle
|
||
}, React.createElement(_rcProgress.Circle, {
|
||
percent: getPercentage(props),
|
||
strokeWidth: circleWidth,
|
||
trailWidth: circleWidth,
|
||
strokeColor: strokeColor,
|
||
strokeLinecap: strokeLinecap,
|
||
trailColor: trailColor,
|
||
prefixCls: prefixCls,
|
||
gapDegree: gapDeg,
|
||
gapPosition: gapPos
|
||
}), children);
|
||
};
|
||
|
||
var _default = Circle;
|
||
exports["default"] = _default;
|
||
//# sourceMappingURL=Circle.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1159:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Line__ = __webpack_require__(1160);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Circle__ = __webpack_require__(1161);
|
||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Line", function() { return __WEBPACK_IMPORTED_MODULE_0__Line__["a"]; });
|
||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Circle", function() { return __WEBPACK_IMPORTED_MODULE_1__Circle__["a"]; });
|
||
|
||
|
||
|
||
/* harmony default export */ __webpack_exports__["default"] = ({
|
||
Line: __WEBPACK_IMPORTED_MODULE_0__Line__["a" /* default */],
|
||
Circle: __WEBPACK_IMPORTED_MODULE_1__Circle__["a" /* default */]
|
||
});
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1160:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enhancer__ = __webpack_require__(1035);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__types__ = __webpack_require__(1036);
|
||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
||
|
||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
|
||
|
||
|
||
|
||
var Line =
|
||
/*#__PURE__*/
|
||
function (_Component) {
|
||
_inherits(Line, _Component);
|
||
|
||
function Line() {
|
||
var _getPrototypeOf2;
|
||
|
||
var _this;
|
||
|
||
_classCallCheck(this, Line);
|
||
|
||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Line)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
||
|
||
_defineProperty(_assertThisInitialized(_this), "paths", {});
|
||
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Line, [{
|
||
key: "render",
|
||
value: function render() {
|
||
var _this2 = this;
|
||
|
||
var _this$props = this.props,
|
||
className = _this$props.className,
|
||
percent = _this$props.percent,
|
||
prefixCls = _this$props.prefixCls,
|
||
strokeColor = _this$props.strokeColor,
|
||
strokeLinecap = _this$props.strokeLinecap,
|
||
strokeWidth = _this$props.strokeWidth,
|
||
style = _this$props.style,
|
||
trailColor = _this$props.trailColor,
|
||
trailWidth = _this$props.trailWidth,
|
||
transition = _this$props.transition,
|
||
restProps = _objectWithoutProperties(_this$props, ["className", "percent", "prefixCls", "strokeColor", "strokeLinecap", "strokeWidth", "style", "trailColor", "trailWidth", "transition"]);
|
||
|
||
delete restProps.gapPosition;
|
||
var percentList = Array.isArray(percent) ? percent : [percent];
|
||
var strokeColorList = Array.isArray(strokeColor) ? strokeColor : [strokeColor];
|
||
var center = strokeWidth / 2;
|
||
var right = 100 - strokeWidth / 2;
|
||
var pathString = "M ".concat(strokeLinecap === 'round' ? center : 0, ",").concat(center, "\n L ").concat(strokeLinecap === 'round' ? right : 100, ",").concat(center);
|
||
var viewBoxString = "0 0 100 ".concat(strokeWidth);
|
||
var stackPtg = 0;
|
||
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("svg", _extends({
|
||
className: "".concat(prefixCls, "-line ").concat(className),
|
||
viewBox: viewBoxString,
|
||
preserveAspectRatio: "none",
|
||
style: style
|
||
}, restProps), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", {
|
||
className: "".concat(prefixCls, "-line-trail"),
|
||
d: pathString,
|
||
strokeLinecap: strokeLinecap,
|
||
stroke: trailColor,
|
||
strokeWidth: trailWidth || strokeWidth,
|
||
fillOpacity: "0"
|
||
}), percentList.map(function (ptg, index) {
|
||
var pathStyle = {
|
||
strokeDasharray: "".concat(ptg, "px, 100px"),
|
||
strokeDashoffset: "-".concat(stackPtg, "px"),
|
||
transition: transition || 'stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear'
|
||
};
|
||
var color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1];
|
||
stackPtg += ptg;
|
||
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", {
|
||
key: index,
|
||
className: "".concat(prefixCls, "-line-path"),
|
||
d: pathString,
|
||
strokeLinecap: strokeLinecap,
|
||
stroke: color,
|
||
strokeWidth: strokeWidth,
|
||
fillOpacity: "0",
|
||
ref: function ref(path) {
|
||
_this2.paths[index] = path;
|
||
},
|
||
style: pathStyle
|
||
});
|
||
}));
|
||
}
|
||
}]);
|
||
|
||
return Line;
|
||
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
||
|
||
Line.propTypes = __WEBPACK_IMPORTED_MODULE_2__types__["b" /* propTypes */];
|
||
Line.defaultProps = __WEBPACK_IMPORTED_MODULE_2__types__["a" /* defaultProps */];
|
||
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__enhancer__["a" /* default */])(Line));
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1161:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enhancer__ = __webpack_require__(1035);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__types__ = __webpack_require__(1036);
|
||
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(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
||
|
||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
||
|
||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
/* eslint react/prop-types: 0 */
|
||
|
||
|
||
|
||
|
||
var gradientSeed = 0;
|
||
|
||
function stripPercentToNumber(percent) {
|
||
return +percent.replace('%', '');
|
||
}
|
||
|
||
function toArray(symArray) {
|
||
return Array.isArray(symArray) ? symArray : [symArray];
|
||
}
|
||
|
||
function getPathStyles(offset, percent, strokeColor, strokeWidth) {
|
||
var gapDegree = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
||
var gapPosition = arguments.length > 5 ? arguments[5] : undefined;
|
||
var radius = 50 - strokeWidth / 2;
|
||
var beginPositionX = 0;
|
||
var beginPositionY = -radius;
|
||
var endPositionX = 0;
|
||
var endPositionY = -2 * radius;
|
||
|
||
switch (gapPosition) {
|
||
case 'left':
|
||
beginPositionX = -radius;
|
||
beginPositionY = 0;
|
||
endPositionX = 2 * radius;
|
||
endPositionY = 0;
|
||
break;
|
||
|
||
case 'right':
|
||
beginPositionX = radius;
|
||
beginPositionY = 0;
|
||
endPositionX = -2 * radius;
|
||
endPositionY = 0;
|
||
break;
|
||
|
||
case 'bottom':
|
||
beginPositionY = radius;
|
||
endPositionY = 2 * radius;
|
||
break;
|
||
|
||
default:
|
||
}
|
||
|
||
var pathString = "M 50,50 m ".concat(beginPositionX, ",").concat(beginPositionY, "\n a ").concat(radius, ",").concat(radius, " 0 1 1 ").concat(endPositionX, ",").concat(-endPositionY, "\n a ").concat(radius, ",").concat(radius, " 0 1 1 ").concat(-endPositionX, ",").concat(endPositionY);
|
||
var len = Math.PI * 2 * radius;
|
||
var pathStyle = {
|
||
stroke: strokeColor,
|
||
strokeDasharray: "".concat(percent / 100 * (len - gapDegree), "px ").concat(len, "px"),
|
||
strokeDashoffset: "-".concat(gapDegree / 2 + offset / 100 * (len - gapDegree), "px"),
|
||
transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s' // eslint-disable-line
|
||
|
||
};
|
||
return {
|
||
pathString: pathString,
|
||
pathStyle: pathStyle
|
||
};
|
||
}
|
||
|
||
var Circle =
|
||
/*#__PURE__*/
|
||
function (_Component) {
|
||
_inherits(Circle, _Component);
|
||
|
||
function Circle() {
|
||
var _this;
|
||
|
||
_classCallCheck(this, Circle);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Circle).call(this));
|
||
|
||
_defineProperty(_assertThisInitialized(_this), "paths", {});
|
||
|
||
_defineProperty(_assertThisInitialized(_this), "gradientId", 0);
|
||
|
||
_this.gradientId = gradientSeed;
|
||
gradientSeed += 1;
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Circle, [{
|
||
key: "getStokeList",
|
||
value: function getStokeList() {
|
||
var _this2 = this;
|
||
|
||
var _this$props = this.props,
|
||
prefixCls = _this$props.prefixCls,
|
||
percent = _this$props.percent,
|
||
strokeColor = _this$props.strokeColor,
|
||
strokeWidth = _this$props.strokeWidth,
|
||
strokeLinecap = _this$props.strokeLinecap,
|
||
gapDegree = _this$props.gapDegree,
|
||
gapPosition = _this$props.gapPosition;
|
||
var percentList = toArray(percent);
|
||
var strokeColorList = toArray(strokeColor);
|
||
var stackPtg = 0;
|
||
return percentList.map(function (ptg, index) {
|
||
var color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1];
|
||
var stroke = Object.prototype.toString.call(color) === '[object Object]' ? "url(#".concat(prefixCls, "-gradient-").concat(_this2.gradientId, ")") : '';
|
||
|
||
var _getPathStyles = getPathStyles(stackPtg, ptg, color, strokeWidth, gapDegree, gapPosition),
|
||
pathString = _getPathStyles.pathString,
|
||
pathStyle = _getPathStyles.pathStyle;
|
||
|
||
stackPtg += ptg;
|
||
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", {
|
||
key: index,
|
||
className: "".concat(prefixCls, "-circle-path"),
|
||
d: pathString,
|
||
stroke: stroke,
|
||
strokeLinecap: strokeLinecap,
|
||
strokeWidth: ptg === 0 ? 0 : strokeWidth,
|
||
fillOpacity: "0",
|
||
style: pathStyle,
|
||
ref: function ref(path) {
|
||
_this2.paths[index] = path;
|
||
}
|
||
});
|
||
});
|
||
}
|
||
}, {
|
||
key: "render",
|
||
value: function render() {
|
||
var _this$props2 = this.props,
|
||
prefixCls = _this$props2.prefixCls,
|
||
strokeWidth = _this$props2.strokeWidth,
|
||
trailWidth = _this$props2.trailWidth,
|
||
gapDegree = _this$props2.gapDegree,
|
||
gapPosition = _this$props2.gapPosition,
|
||
trailColor = _this$props2.trailColor,
|
||
strokeLinecap = _this$props2.strokeLinecap,
|
||
style = _this$props2.style,
|
||
className = _this$props2.className,
|
||
strokeColor = _this$props2.strokeColor,
|
||
restProps = _objectWithoutProperties(_this$props2, ["prefixCls", "strokeWidth", "trailWidth", "gapDegree", "gapPosition", "trailColor", "strokeLinecap", "style", "className", "strokeColor"]);
|
||
|
||
var _getPathStyles2 = getPathStyles(0, 100, trailColor, strokeWidth, gapDegree, gapPosition),
|
||
pathString = _getPathStyles2.pathString,
|
||
pathStyle = _getPathStyles2.pathStyle;
|
||
|
||
delete restProps.percent;
|
||
var strokeColorList = toArray(strokeColor);
|
||
var gradient = strokeColorList.find(function (color) {
|
||
return Object.prototype.toString.call(color) === '[object Object]';
|
||
});
|
||
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("svg", _extends({
|
||
className: "".concat(prefixCls, "-circle ").concat(className),
|
||
viewBox: "0 0 100 100",
|
||
style: style
|
||
}, restProps), gradient && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("defs", null, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("linearGradient", {
|
||
id: "".concat(prefixCls, "-gradient-").concat(this.gradientId),
|
||
x1: "100%",
|
||
y1: "0%",
|
||
x2: "0%",
|
||
y2: "0%"
|
||
}, Object.keys(gradient).sort(function (a, b) {
|
||
return stripPercentToNumber(a) - stripPercentToNumber(b);
|
||
}).map(function (key, index) {
|
||
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("stop", {
|
||
key: index,
|
||
offset: key,
|
||
stopColor: gradient[key]
|
||
});
|
||
}))), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", {
|
||
className: "".concat(prefixCls, "-circle-trail"),
|
||
d: pathString,
|
||
stroke: trailColor,
|
||
strokeLinecap: strokeLinecap,
|
||
strokeWidth: trailWidth || strokeWidth,
|
||
fillOpacity: "0",
|
||
style: pathStyle
|
||
}), this.getStokeList().reverse());
|
||
}
|
||
}]);
|
||
|
||
return Circle;
|
||
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
||
|
||
Circle.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_3__types__["b" /* propTypes */], {
|
||
gapPosition: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['top', 'bottom', 'left', 'right'])
|
||
});
|
||
Circle.defaultProps = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_3__types__["a" /* defaultProps */], {
|
||
gapPosition: 'top'
|
||
});
|
||
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_2__enhancer__["a" /* default */])(Circle));
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1166:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var toFinite = __webpack_require__(1171);
|
||
|
||
/**
|
||
* Converts `value` to an integer.
|
||
*
|
||
* **Note:** This method is loosely based on
|
||
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 4.0.0
|
||
* @category Lang
|
||
* @param {*} value The value to convert.
|
||
* @returns {number} Returns the converted integer.
|
||
* @example
|
||
*
|
||
* _.toInteger(3.2);
|
||
* // => 3
|
||
*
|
||
* _.toInteger(Number.MIN_VALUE);
|
||
* // => 0
|
||
*
|
||
* _.toInteger(Infinity);
|
||
* // => 1.7976931348623157e+308
|
||
*
|
||
* _.toInteger('3.2');
|
||
* // => 3
|
||
*/
|
||
function toInteger(value) {
|
||
var result = toFinite(value),
|
||
remainder = result % 1;
|
||
|
||
return result === result ? (remainder ? result - remainder : result) : 0;
|
||
}
|
||
|
||
module.exports = toInteger;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1168:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* The base implementation of `_.property` without support for deep paths.
|
||
*
|
||
* @private
|
||
* @param {string} key The key of the property to get.
|
||
* @returns {Function} Returns the new accessor function.
|
||
*/
|
||
function baseProperty(key) {
|
||
return function(object) {
|
||
return object == null ? undefined : object[key];
|
||
};
|
||
}
|
||
|
||
module.exports = baseProperty;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1171:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var toNumber = __webpack_require__(342);
|
||
|
||
/** Used as references for various `Number` constants. */
|
||
var INFINITY = 1 / 0,
|
||
MAX_INTEGER = 1.7976931348623157e+308;
|
||
|
||
/**
|
||
* Converts `value` to a finite number.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 4.12.0
|
||
* @category Lang
|
||
* @param {*} value The value to convert.
|
||
* @returns {number} Returns the converted number.
|
||
* @example
|
||
*
|
||
* _.toFinite(3.2);
|
||
* // => 3.2
|
||
*
|
||
* _.toFinite(Number.MIN_VALUE);
|
||
* // => 5e-324
|
||
*
|
||
* _.toFinite(Infinity);
|
||
* // => 1.7976931348623157e+308
|
||
*
|
||
* _.toFinite('3.2');
|
||
* // => 3.2
|
||
*/
|
||
function toFinite(value) {
|
||
if (!value) {
|
||
return value === 0 ? value : 0;
|
||
}
|
||
value = toNumber(value);
|
||
if (value === INFINITY || value === -INFINITY) {
|
||
var sign = (value < 0 ? -1 : 1);
|
||
return sign * MAX_INTEGER;
|
||
}
|
||
return value === value ? value : 0;
|
||
}
|
||
|
||
module.exports = toFinite;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1177:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||
|
||
// load the styles
|
||
var content = __webpack_require__(1178);
|
||
if(typeof content === 'string') content = [[module.i, content, '']];
|
||
// Prepare cssTransformation
|
||
var transform;
|
||
|
||
var options = {"hmr":false}
|
||
options.transform = transform
|
||
// add the styles to the DOM
|
||
var update = __webpack_require__(317)(content, options);
|
||
if(content.locals) module.exports = content.locals;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1178:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
exports = module.exports = __webpack_require__(316)(true);
|
||
// imports
|
||
|
||
|
||
// module
|
||
exports.push([module.i, ".ant-upload{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";outline:0}.ant-upload p{margin:0}.ant-upload-btn{display:block;width:100%;outline:none}.ant-upload input[type=file]{cursor:pointer}.ant-upload.ant-upload-select{display:inline-block}.ant-upload.ant-upload-disabled{cursor:not-allowed}.ant-upload.ant-upload-select-picture-card{display:table;float:left;width:104px;height:104px;margin-right:8px;margin-bottom:8px;text-align:center;vertical-align:top;background-color:#fafafa;border:1px dashed #d9d9d9;border-radius:4px;cursor:pointer;-webkit-transition:border-color .3s ease;-o-transition:border-color .3s ease;transition:border-color .3s ease}.ant-upload.ant-upload-select-picture-card>.ant-upload{display:table-cell;width:100%;height:100%;padding:8px;text-align:center;vertical-align:middle}.ant-upload.ant-upload-select-picture-card:hover{border-color:#1890ff}.ant-upload.ant-upload-drag{position:relative;width:100%;height:100%;text-align:center;background:#fafafa;border:1px dashed #d9d9d9;border-radius:4px;cursor:pointer;-webkit-transition:border-color .3s;-o-transition:border-color .3s;transition:border-color .3s}.ant-upload.ant-upload-drag .ant-upload{padding:16px 0}.ant-upload.ant-upload-drag.ant-upload-drag-hover:not(.ant-upload-disabled){border-color:#096dd9}.ant-upload.ant-upload-drag.ant-upload-disabled{cursor:not-allowed}.ant-upload.ant-upload-drag .ant-upload-btn{display:table;height:100%}.ant-upload.ant-upload-drag .ant-upload-drag-container{display:table-cell;vertical-align:middle}.ant-upload.ant-upload-drag:not(.ant-upload-disabled):hover{border-color:#40a9ff}.ant-upload.ant-upload-drag p.ant-upload-drag-icon{margin-bottom:20px}.ant-upload.ant-upload-drag p.ant-upload-drag-icon .anticon{color:#40a9ff;font-size:48px}.ant-upload.ant-upload-drag p.ant-upload-text{margin:0 0 4px;color:rgba(0,0,0,.85);font-size:16px}.ant-upload.ant-upload-drag p.ant-upload-hint{color:rgba(0,0,0,.45);font-size:14px}.ant-upload.ant-upload-drag .anticon-plus{color:rgba(0,0,0,.25);font-size:30px;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-upload.ant-upload-drag .anticon-plus:hover,.ant-upload.ant-upload-drag:hover .anticon-plus{color:rgba(0,0,0,.45)}.ant-upload-picture-card-wrapper{zoom:1;display:inline-block;width:100%}.ant-upload-picture-card-wrapper:after,.ant-upload-picture-card-wrapper:before{display:table;content:\"\"}.ant-upload-picture-card-wrapper:after{clear:both}.ant-upload-list{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";zoom:1}.ant-upload-list:after,.ant-upload-list:before{display:table;content:\"\"}.ant-upload-list:after{clear:both}.ant-upload-list-item-list-type-text:hover .ant-upload-list-item-name-icon-count-1{padding-right:14px}.ant-upload-list-item-list-type-text:hover .ant-upload-list-item-name-icon-count-2{padding-right:28px}.ant-upload-list-item{position:relative;height:22px;margin-top:8px;font-size:14px}.ant-upload-list-item-name{display:inline-block;width:100%;padding-left:22px;overflow:hidden;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis}.ant-upload-list-item-name-icon-count-1{padding-right:14px}.ant-upload-list-item-card-actions{position:absolute;right:0;opacity:0}.ant-upload-list-item-card-actions.picture{top:25px;line-height:1;opacity:1}.ant-upload-list-item-card-actions .anticon{padding-right:5px;color:rgba(0,0,0,.45)}.ant-upload-list-item-info{height:100%;padding:0 12px 0 4px;-webkit-transition:background-color .3s;-o-transition:background-color .3s;transition:background-color .3s}.ant-upload-list-item-info>span{display:block;width:100%;height:100%}.ant-upload-list-item-info .anticon-loading,.ant-upload-list-item-info .anticon-paper-clip{position:absolute;top:5px;color:rgba(0,0,0,.45);font-size:14px}.ant-upload-list-item .anticon-close{display:inline-block;font-size:12px;font-size:10px\\9;-webkit-transform:scale(.83333333) rotate(0deg);-ms-transform:scale(.83333333) rotate(0deg);transform:scale(.83333333) rotate(0deg);position:absolute;top:6px;right:4px;color:rgba(0,0,0,.45);line-height:0;cursor:pointer;opacity:0;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}:root .ant-upload-list-item .anticon-close{font-size:12px}.ant-upload-list-item .anticon-close:hover{color:rgba(0,0,0,.65)}.ant-upload-list-item:hover .ant-upload-list-item-info{background-color:#e6f7ff}.ant-upload-list-item:hover .ant-upload-list-item-card-actions,.ant-upload-list-item:hover .anticon-close{opacity:1}.ant-upload-list-item-error,.ant-upload-list-item-error .ant-upload-list-item-name,.ant-upload-list-item-error .anticon-paper-clip{color:#f5222d}.ant-upload-list-item-error .ant-upload-list-item-card-actions{opacity:1}.ant-upload-list-item-error .ant-upload-list-item-card-actions .anticon{padding-right:5px;color:#f5222d}.ant-upload-list-item-progress{position:absolute;bottom:-12px;width:100%;padding-left:26px;font-size:14px;line-height:0}.ant-upload-list-picture-card .ant-upload-list-item,.ant-upload-list-picture .ant-upload-list-item{position:relative;height:66px;padding:8px;border:1px solid #d9d9d9;border-radius:4px}.ant-upload-list-picture-card .ant-upload-list-item:hover,.ant-upload-list-picture .ant-upload-list-item:hover{background:transparent}.ant-upload-list-picture-card .ant-upload-list-item-error,.ant-upload-list-picture .ant-upload-list-item-error{border-color:#f5222d}.ant-upload-list-picture-card .ant-upload-list-item-info,.ant-upload-list-picture .ant-upload-list-item-info{padding:0}.ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info,.ant-upload-list-picture .ant-upload-list-item:hover .ant-upload-list-item-info{background:transparent}.ant-upload-list-picture-card .ant-upload-list-item-uploading,.ant-upload-list-picture .ant-upload-list-item-uploading{border-style:dashed}.ant-upload-list-picture-card .ant-upload-list-item-thumbnail,.ant-upload-list-picture .ant-upload-list-item-thumbnail{position:absolute;top:8px;left:8px;width:48px;height:48px;font-size:26px;line-height:54px;text-align:center;opacity:.8}.ant-upload-list-picture-card .ant-upload-list-item-icon,.ant-upload-list-picture .ant-upload-list-item-icon{position:absolute;top:50%;left:50%;font-size:26px;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ant-upload-list-picture-card .ant-upload-list-item-image,.ant-upload-list-picture .ant-upload-list-item-image{max-width:100%}.ant-upload-list-picture-card .ant-upload-list-item-thumbnail img,.ant-upload-list-picture .ant-upload-list-item-thumbnail img{display:block;width:48px;height:48px;overflow:hidden}.ant-upload-list-picture-card .ant-upload-list-item-name,.ant-upload-list-picture .ant-upload-list-item-name{display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%;margin:0 0 0 8px;padding-right:8px;padding-left:48px;overflow:hidden;line-height:44px;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-upload-list-picture-card .ant-upload-list-item-name-icon-count-1,.ant-upload-list-picture .ant-upload-list-item-name-icon-count-1{padding-right:18px}.ant-upload-list-picture-card .ant-upload-list-item-name-icon-count-2,.ant-upload-list-picture .ant-upload-list-item-name-icon-count-2{padding-right:36px}.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-name,.ant-upload-list-picture .ant-upload-list-item-uploading .ant-upload-list-item-name{line-height:28px}.ant-upload-list-picture-card .ant-upload-list-item-progress,.ant-upload-list-picture .ant-upload-list-item-progress{bottom:14px;width:calc(100% - 24px);margin-top:0;padding-left:56px}.ant-upload-list-picture-card .anticon-close,.ant-upload-list-picture .anticon-close{position:absolute;top:8px;right:8px;line-height:1;opacity:1}.ant-upload-list-picture-card.ant-upload-list:after{display:none}.ant-upload-list-picture-card-container,.ant-upload-list-picture-card .ant-upload-list-item{float:left;width:104px;height:104px;margin:0 8px 8px 0}.ant-upload-list-picture-card .ant-upload-list-item-info{position:relative;height:100%;overflow:hidden}.ant-upload-list-picture-card .ant-upload-list-item-info:before{position:absolute;z-index:1;width:100%;height:100%;background-color:rgba(0,0,0,.5);opacity:0;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s;content:\" \"}.ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info:before{opacity:1}.ant-upload-list-picture-card .ant-upload-list-item-actions{position:absolute;top:50%;left:50%;z-index:10;white-space:nowrap;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:0;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete,.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download,.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye-o{z-index:10;width:16px;margin:0 4px;color:hsla(0,0%,100%,.85);font-size:16px;cursor:pointer;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete:hover,.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download:hover,.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye-o:hover{color:#fff}.ant-upload-list-picture-card .ant-upload-list-item-actions:hover,.ant-upload-list-picture-card .ant-upload-list-item-info:hover+.ant-upload-list-item-actions{opacity:1}.ant-upload-list-picture-card .ant-upload-list-item-thumbnail,.ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{position:static;display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.ant-upload-list-picture-card .ant-upload-list-item-name{display:none;margin:8px 0 0;padding:0;line-height:1.5;text-align:center}.ant-upload-list-picture-card .anticon-picture+.ant-upload-list-item-name{position:absolute;bottom:10px;display:block}.ant-upload-list-picture-card .ant-upload-list-item-uploading.ant-upload-list-item{background-color:#fafafa}.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info{height:auto}.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info .anticon-delete,.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info .anticon-eye-o,.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info:before{display:none}.ant-upload-list-picture-card .ant-upload-list-item-uploading-text{margin-top:18px;color:rgba(0,0,0,.45)}.ant-upload-list-picture-card .ant-upload-list-item-progress{bottom:32px;padding-left:0}.ant-upload-list .ant-upload-success-icon{color:#52c41a;font-weight:700}.ant-upload-list .ant-upload-animate-enter,.ant-upload-list .ant-upload-animate-inline-enter,.ant-upload-list .ant-upload-animate-inline-leave,.ant-upload-list .ant-upload-animate-leave{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:cubic-bezier(.78,.14,.15,.86);animation-fill-mode:cubic-bezier(.78,.14,.15,.86)}.ant-upload-list .ant-upload-animate-enter{-webkit-animation-name:uploadAnimateIn;animation-name:uploadAnimateIn}.ant-upload-list .ant-upload-animate-leave{-webkit-animation-name:uploadAnimateOut;animation-name:uploadAnimateOut}.ant-upload-list .ant-upload-animate-inline-enter{-webkit-animation-name:uploadAnimateInlineIn;animation-name:uploadAnimateInlineIn}.ant-upload-list .ant-upload-animate-inline-leave{-webkit-animation-name:uploadAnimateInlineOut;animation-name:uploadAnimateInlineOut}@-webkit-keyframes uploadAnimateIn{0%{height:0;margin:0;padding:0;opacity:0}}@keyframes uploadAnimateIn{0%{height:0;margin:0;padding:0;opacity:0}}@-webkit-keyframes uploadAnimateOut{to{height:0;margin:0;padding:0;opacity:0}}@keyframes uploadAnimateOut{to{height:0;margin:0;padding:0;opacity:0}}@-webkit-keyframes uploadAnimateInlineIn{0%{width:0;height:0;margin:0;padding:0;opacity:0}}@keyframes uploadAnimateInlineIn{0%{width:0;height:0;margin:0;padding:0;opacity:0}}@-webkit-keyframes uploadAnimateInlineOut{to{width:0;height:0;margin:0;padding:0;opacity:0}}@keyframes uploadAnimateInlineOut{to{width:0;height:0;margin:0;padding:0;opacity:0}}", "", {"version":3,"sources":["/Users/hs/forgeplus-react/node_modules/antd/lib/upload/style/index.css"],"names":[],"mappings":"AAIA,YACE,8BAA+B,AACvB,sBAAuB,AAC/B,SAAU,AACV,UAAW,AACX,sBAA2B,AAC3B,eAAgB,AAChB,0BAA2B,AAC3B,gBAAiB,AACjB,gBAAiB,AACjB,qCAAsC,AAC9B,6BAA8B,AACtC,SAAW,CACZ,AACD,cACE,QAAU,CACX,AACD,gBACE,cAAe,AACf,WAAY,AACZ,YAAc,CACf,AACD,6BACE,cAAgB,CACjB,AACD,8BACE,oBAAsB,CACvB,AACD,gCACE,kBAAoB,CACrB,AACD,2CACE,cAAe,AACf,WAAY,AACZ,YAAa,AACb,aAAc,AACd,iBAAkB,AAClB,kBAAmB,AACnB,kBAAmB,AACnB,mBAAoB,AACpB,yBAA0B,AAC1B,0BAA2B,AAC3B,kBAAmB,AACnB,eAAgB,AAChB,yCAA2C,AAC3C,oCAAsC,AACtC,gCAAmC,CACpC,AACD,uDACE,mBAAoB,AACpB,WAAY,AACZ,YAAa,AACb,YAAa,AACb,kBAAmB,AACnB,qBAAuB,CACxB,AACD,iDACE,oBAAsB,CACvB,AACD,4BACE,kBAAmB,AACnB,WAAY,AACZ,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,0BAA2B,AAC3B,kBAAmB,AACnB,eAAgB,AAChB,oCAAsC,AACtC,+BAAiC,AACjC,2BAA8B,CAC/B,AACD,wCACE,cAAgB,CACjB,AACD,4EACE,oBAAsB,CACvB,AACD,gDACE,kBAAoB,CACrB,AACD,4CACE,cAAe,AACf,WAAa,CACd,AACD,uDACE,mBAAoB,AACpB,qBAAuB,CACxB,AACD,4DACE,oBAAsB,CACvB,AACD,mDACE,kBAAoB,CACrB,AACD,4DACE,cAAe,AACf,cAAgB,CACjB,AACD,8CACE,eAAgB,AAChB,sBAA2B,AAC3B,cAAgB,CACjB,AACD,8CACE,sBAA2B,AAC3B,cAAgB,CACjB,AACD,0CACE,sBAA2B,AAC3B,eAAgB,AAChB,2BAA6B,AAC7B,sBAAwB,AACxB,kBAAqB,CACtB,AAID,gGACE,qBAA2B,CAC5B,AACD,iCACE,OAAQ,AACR,qBAAsB,AACtB,UAAY,CACb,AACD,+EAEE,cAAe,AACf,UAAY,CACb,AACD,uCACE,UAAY,CACb,AACD,iBACE,8BAA+B,AACvB,sBAAuB,AAC/B,SAAU,AACV,UAAW,AACX,sBAA2B,AAC3B,eAAgB,AAChB,0BAA2B,AAC3B,gBAAiB,AACjB,gBAAiB,AACjB,qCAAsC,AAC9B,6BAA8B,AACtC,MAAQ,CACT,AACD,+CAEE,cAAe,AACf,UAAY,CACb,AACD,uBACE,UAAY,CACb,AACD,mFACE,kBAAoB,CACrB,AACD,mFACE,kBAAoB,CACrB,AACD,sBACE,kBAAmB,AACnB,YAAa,AACb,eAAgB,AAChB,cAAgB,CACjB,AACD,2BACE,qBAAsB,AACtB,WAAY,AACZ,kBAAmB,AACnB,gBAAiB,AACjB,mBAAoB,AACpB,0BAA2B,AACxB,sBAAwB,CAC5B,AACD,wCACE,kBAAoB,CACrB,AACD,mCACE,kBAAmB,AACnB,QAAS,AACT,SAAW,CACZ,AACD,2CACE,SAAU,AACV,cAAe,AACf,SAAW,CACZ,AACD,4CACE,kBAAmB,AACnB,qBAA2B,CAC5B,AACD,2BACE,YAAa,AACb,qBAAsB,AACtB,wCAA0C,AAC1C,mCAAqC,AACrC,+BAAkC,CACnC,AACD,gCACE,cAAe,AACf,WAAY,AACZ,WAAa,CACd,AACD,2FAEE,kBAAmB,AACnB,QAAS,AACT,sBAA2B,AAC3B,cAAgB,CACjB,AACD,qCACE,qBAAsB,AACtB,eAAgB,AAChB,iBAAmB,AACnB,gDAAkD,AAC9C,4CAA8C,AAC1C,wCAA0C,AAClD,kBAAmB,AACnB,QAAS,AACT,UAAW,AACX,sBAA2B,AAC3B,cAAe,AACf,eAAgB,AAChB,UAAW,AACX,2BAA6B,AAC7B,sBAAwB,AACxB,kBAAqB,CACtB,AACD,2CACE,cAAgB,CACjB,AACD,2CACE,qBAA2B,CAC5B,AACD,uDACE,wBAA0B,CAC3B,AAID,0GACE,SAAW,CACZ,AACD,mIAGE,aAAe,CAChB,AACD,+DACE,SAAW,CACZ,AACD,wEACE,kBAAmB,AACnB,aAAe,CAChB,AACD,+BACE,kBAAmB,AACnB,aAAc,AACd,WAAY,AACZ,kBAAmB,AACnB,eAAgB,AAChB,aAAe,CAChB,AACD,mGAEE,kBAAmB,AACnB,YAAa,AACb,YAAa,AACb,yBAA0B,AAC1B,iBAAmB,CACpB,AACD,+GAEE,sBAAwB,CACzB,AACD,+GAEE,oBAAsB,CACvB,AACD,6GAEE,SAAW,CACZ,AACD,qKAEE,sBAAwB,CACzB,AACD,uHAEE,mBAAqB,CACtB,AACD,uHAEE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,WAAY,AACZ,YAAa,AACb,eAAgB,AAChB,iBAAkB,AAClB,kBAAmB,AACnB,UAAa,CACd,AACD,6GAEE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,eAAgB,AAChB,uCAAyC,AACrC,mCAAqC,AACjC,8BAAiC,CAC1C,AACD,+GAEE,cAAgB,CACjB,AACD,+HAEE,cAAe,AACf,WAAY,AACZ,YAAa,AACb,eAAiB,CAClB,AACD,6GAEE,qBAAsB,AACtB,8BAA+B,AACvB,sBAAuB,AAC/B,eAAgB,AAChB,iBAAkB,AAClB,kBAAmB,AACnB,kBAAmB,AACnB,gBAAiB,AACjB,iBAAkB,AAClB,mBAAoB,AACpB,0BAA2B,AACxB,uBAAwB,AAC3B,2BAA6B,AAC7B,sBAAwB,AACxB,kBAAqB,CACtB,AACD,uIAEE,kBAAoB,CACrB,AACD,uIAEE,kBAAoB,CACrB,AACD,6KAEE,gBAAkB,CACnB,AACD,qHAEE,YAAa,AACb,wBAAyB,AACzB,aAAc,AACd,iBAAmB,CACpB,AACD,qFAEE,kBAAmB,AACnB,QAAS,AACT,UAAW,AACX,cAAe,AACf,SAAW,CACZ,AACD,oDACE,YAAc,CACf,AAOD,4FACE,WAAY,AACZ,YAAa,AACb,aAAc,AACd,kBAAoB,CACrB,AACD,yDACE,kBAAmB,AACnB,YAAa,AACb,eAAiB,CAClB,AACD,gEACE,kBAAmB,AACnB,UAAW,AACX,WAAY,AACZ,YAAa,AACb,gCAAqC,AACrC,UAAW,AACX,2BAA6B,AAC7B,sBAAwB,AACxB,mBAAqB,AACrB,WAAa,CACd,AACD,4FACE,SAAW,CACZ,AACD,4DACE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,WAAY,AACZ,mBAAoB,AACpB,uCAAyC,AACrC,mCAAqC,AACjC,+BAAiC,AACzC,UAAW,AACX,2BAA6B,AAC7B,sBAAwB,AACxB,kBAAqB,CACtB,AACD,qOAGE,WAAY,AACZ,WAAY,AACZ,aAAc,AACd,0BAAiC,AACjC,eAAgB,AAChB,eAAgB,AAChB,2BAA6B,AAC7B,sBAAwB,AACxB,kBAAqB,CACtB,AACD,uPAGE,UAAY,CACb,AACD,+JAEE,SAAW,CACZ,AACD,gIAEE,gBAAiB,AACjB,cAAe,AACf,WAAY,AACZ,YAAa,AACb,oBAAqB,AAClB,gBAAkB,CACtB,AACD,yDACE,aAAc,AACd,eAAgB,AAChB,UAAW,AACX,gBAAiB,AACjB,iBAAmB,CACpB,AACD,0EACE,kBAAmB,AACnB,YAAa,AACb,aAAe,CAChB,AACD,mFACE,wBAA0B,CAC3B,AACD,yFACE,WAAa,CACd,AACD,iTAGE,YAAc,CACf,AACD,mEACE,gBAAiB,AACjB,qBAA2B,CAC5B,AACD,6DACE,YAAa,AACb,cAAgB,CACjB,AACD,0CACE,cAAe,AACf,eAAkB,CACnB,AACD,0LAIE,+BAAiC,AACzB,uBAAyB,AACjC,0DAAkE,AAC1D,iDAA0D,CACnE,AACD,2CACE,uCAAwC,AAChC,8BAAgC,CACzC,AACD,2CACE,wCAAyC,AACjC,+BAAiC,CAC1C,AACD,kDACE,6CAA8C,AACtC,oCAAsC,CAC/C,AACD,kDACE,8CAA+C,AACvC,qCAAuC,CAChD,AACD,mCACE,GACE,SAAU,AACV,SAAU,AACV,UAAW,AACX,SAAW,CACZ,CACF,AACD,2BACE,GACE,SAAU,AACV,SAAU,AACV,UAAW,AACX,SAAW,CACZ,CACF,AACD,oCACE,GACE,SAAU,AACV,SAAU,AACV,UAAW,AACX,SAAW,CACZ,CACF,AACD,4BACE,GACE,SAAU,AACV,SAAU,AACV,UAAW,AACX,SAAW,CACZ,CACF,AACD,yCACE,GACE,QAAS,AACT,SAAU,AACV,SAAU,AACV,UAAW,AACX,SAAW,CACZ,CACF,AACD,iCACE,GACE,QAAS,AACT,SAAU,AACV,SAAU,AACV,UAAW,AACX,SAAW,CACZ,CACF,AACD,0CACE,GACE,QAAS,AACT,SAAU,AACV,SAAU,AACV,UAAW,AACX,SAAW,CACZ,CACF,AACD,kCACE,GACE,QAAS,AACT,SAAU,AACV,SAAU,AACV,UAAW,AACX,SAAW,CACZ,CACF","file":"index.css","sourcesContent":["/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.ant-upload {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.65);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5;\n list-style: none;\n -webkit-font-feature-settings: 'tnum';\n font-feature-settings: 'tnum';\n outline: 0;\n}\n.ant-upload p {\n margin: 0;\n}\n.ant-upload-btn {\n display: block;\n width: 100%;\n outline: none;\n}\n.ant-upload input[type='file'] {\n cursor: pointer;\n}\n.ant-upload.ant-upload-select {\n display: inline-block;\n}\n.ant-upload.ant-upload-disabled {\n cursor: not-allowed;\n}\n.ant-upload.ant-upload-select-picture-card {\n display: table;\n float: left;\n width: 104px;\n height: 104px;\n margin-right: 8px;\n margin-bottom: 8px;\n text-align: center;\n vertical-align: top;\n background-color: #fafafa;\n border: 1px dashed #d9d9d9;\n border-radius: 4px;\n cursor: pointer;\n -webkit-transition: border-color 0.3s ease;\n -o-transition: border-color 0.3s ease;\n transition: border-color 0.3s ease;\n}\n.ant-upload.ant-upload-select-picture-card > .ant-upload {\n display: table-cell;\n width: 100%;\n height: 100%;\n padding: 8px;\n text-align: center;\n vertical-align: middle;\n}\n.ant-upload.ant-upload-select-picture-card:hover {\n border-color: #1890ff;\n}\n.ant-upload.ant-upload-drag {\n position: relative;\n width: 100%;\n height: 100%;\n text-align: center;\n background: #fafafa;\n border: 1px dashed #d9d9d9;\n border-radius: 4px;\n cursor: pointer;\n -webkit-transition: border-color 0.3s;\n -o-transition: border-color 0.3s;\n transition: border-color 0.3s;\n}\n.ant-upload.ant-upload-drag .ant-upload {\n padding: 16px 0;\n}\n.ant-upload.ant-upload-drag.ant-upload-drag-hover:not(.ant-upload-disabled) {\n border-color: #096dd9;\n}\n.ant-upload.ant-upload-drag.ant-upload-disabled {\n cursor: not-allowed;\n}\n.ant-upload.ant-upload-drag .ant-upload-btn {\n display: table;\n height: 100%;\n}\n.ant-upload.ant-upload-drag .ant-upload-drag-container {\n display: table-cell;\n vertical-align: middle;\n}\n.ant-upload.ant-upload-drag:not(.ant-upload-disabled):hover {\n border-color: #40a9ff;\n}\n.ant-upload.ant-upload-drag p.ant-upload-drag-icon {\n margin-bottom: 20px;\n}\n.ant-upload.ant-upload-drag p.ant-upload-drag-icon .anticon {\n color: #40a9ff;\n font-size: 48px;\n}\n.ant-upload.ant-upload-drag p.ant-upload-text {\n margin: 0 0 4px;\n color: rgba(0, 0, 0, 0.85);\n font-size: 16px;\n}\n.ant-upload.ant-upload-drag p.ant-upload-hint {\n color: rgba(0, 0, 0, 0.45);\n font-size: 14px;\n}\n.ant-upload.ant-upload-drag .anticon-plus {\n color: rgba(0, 0, 0, 0.25);\n font-size: 30px;\n -webkit-transition: all 0.3s;\n -o-transition: all 0.3s;\n transition: all 0.3s;\n}\n.ant-upload.ant-upload-drag .anticon-plus:hover {\n color: rgba(0, 0, 0, 0.45);\n}\n.ant-upload.ant-upload-drag:hover .anticon-plus {\n color: rgba(0, 0, 0, 0.45);\n}\n.ant-upload-picture-card-wrapper {\n zoom: 1;\n display: inline-block;\n width: 100%;\n}\n.ant-upload-picture-card-wrapper::before,\n.ant-upload-picture-card-wrapper::after {\n display: table;\n content: '';\n}\n.ant-upload-picture-card-wrapper::after {\n clear: both;\n}\n.ant-upload-list {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.65);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5;\n list-style: none;\n -webkit-font-feature-settings: 'tnum';\n font-feature-settings: 'tnum';\n zoom: 1;\n}\n.ant-upload-list::before,\n.ant-upload-list::after {\n display: table;\n content: '';\n}\n.ant-upload-list::after {\n clear: both;\n}\n.ant-upload-list-item-list-type-text:hover .ant-upload-list-item-name-icon-count-1 {\n padding-right: 14px;\n}\n.ant-upload-list-item-list-type-text:hover .ant-upload-list-item-name-icon-count-2 {\n padding-right: 28px;\n}\n.ant-upload-list-item {\n position: relative;\n height: 22px;\n margin-top: 8px;\n font-size: 14px;\n}\n.ant-upload-list-item-name {\n display: inline-block;\n width: 100%;\n padding-left: 22px;\n overflow: hidden;\n white-space: nowrap;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n}\n.ant-upload-list-item-name-icon-count-1 {\n padding-right: 14px;\n}\n.ant-upload-list-item-card-actions {\n position: absolute;\n right: 0;\n opacity: 0;\n}\n.ant-upload-list-item-card-actions.picture {\n top: 25px;\n line-height: 1;\n opacity: 1;\n}\n.ant-upload-list-item-card-actions .anticon {\n padding-right: 5px;\n color: rgba(0, 0, 0, 0.45);\n}\n.ant-upload-list-item-info {\n height: 100%;\n padding: 0 12px 0 4px;\n -webkit-transition: background-color 0.3s;\n -o-transition: background-color 0.3s;\n transition: background-color 0.3s;\n}\n.ant-upload-list-item-info > span {\n display: block;\n width: 100%;\n height: 100%;\n}\n.ant-upload-list-item-info .anticon-loading,\n.ant-upload-list-item-info .anticon-paper-clip {\n position: absolute;\n top: 5px;\n color: rgba(0, 0, 0, 0.45);\n font-size: 14px;\n}\n.ant-upload-list-item .anticon-close {\n display: inline-block;\n font-size: 12px;\n font-size: 10px \\9;\n -webkit-transform: scale(0.83333333) rotate(0deg);\n -ms-transform: scale(0.83333333) rotate(0deg);\n transform: scale(0.83333333) rotate(0deg);\n position: absolute;\n top: 6px;\n right: 4px;\n color: rgba(0, 0, 0, 0.45);\n line-height: 0;\n cursor: pointer;\n opacity: 0;\n -webkit-transition: all 0.3s;\n -o-transition: all 0.3s;\n transition: all 0.3s;\n}\n:root .ant-upload-list-item .anticon-close {\n font-size: 12px;\n}\n.ant-upload-list-item .anticon-close:hover {\n color: rgba(0, 0, 0, 0.65);\n}\n.ant-upload-list-item:hover .ant-upload-list-item-info {\n background-color: #e6f7ff;\n}\n.ant-upload-list-item:hover .anticon-close {\n opacity: 1;\n}\n.ant-upload-list-item:hover .ant-upload-list-item-card-actions {\n opacity: 1;\n}\n.ant-upload-list-item-error,\n.ant-upload-list-item-error .anticon-paper-clip,\n.ant-upload-list-item-error .ant-upload-list-item-name {\n color: #f5222d;\n}\n.ant-upload-list-item-error .ant-upload-list-item-card-actions {\n opacity: 1;\n}\n.ant-upload-list-item-error .ant-upload-list-item-card-actions .anticon {\n padding-right: 5px;\n color: #f5222d;\n}\n.ant-upload-list-item-progress {\n position: absolute;\n bottom: -12px;\n width: 100%;\n padding-left: 26px;\n font-size: 14px;\n line-height: 0;\n}\n.ant-upload-list-picture .ant-upload-list-item,\n.ant-upload-list-picture-card .ant-upload-list-item {\n position: relative;\n height: 66px;\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n}\n.ant-upload-list-picture .ant-upload-list-item:hover,\n.ant-upload-list-picture-card .ant-upload-list-item:hover {\n background: transparent;\n}\n.ant-upload-list-picture .ant-upload-list-item-error,\n.ant-upload-list-picture-card .ant-upload-list-item-error {\n border-color: #f5222d;\n}\n.ant-upload-list-picture .ant-upload-list-item-info,\n.ant-upload-list-picture-card .ant-upload-list-item-info {\n padding: 0;\n}\n.ant-upload-list-picture .ant-upload-list-item:hover .ant-upload-list-item-info,\n.ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info {\n background: transparent;\n}\n.ant-upload-list-picture .ant-upload-list-item-uploading,\n.ant-upload-list-picture-card .ant-upload-list-item-uploading {\n border-style: dashed;\n}\n.ant-upload-list-picture .ant-upload-list-item-thumbnail,\n.ant-upload-list-picture-card .ant-upload-list-item-thumbnail {\n position: absolute;\n top: 8px;\n left: 8px;\n width: 48px;\n height: 48px;\n font-size: 26px;\n line-height: 54px;\n text-align: center;\n opacity: 0.8;\n}\n.ant-upload-list-picture .ant-upload-list-item-icon,\n.ant-upload-list-picture-card .ant-upload-list-item-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 26px;\n -webkit-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ant-upload-list-picture .ant-upload-list-item-image,\n.ant-upload-list-picture-card .ant-upload-list-item-image {\n max-width: 100%;\n}\n.ant-upload-list-picture .ant-upload-list-item-thumbnail img,\n.ant-upload-list-picture-card .ant-upload-list-item-thumbnail img {\n display: block;\n width: 48px;\n height: 48px;\n overflow: hidden;\n}\n.ant-upload-list-picture .ant-upload-list-item-name,\n.ant-upload-list-picture-card .ant-upload-list-item-name {\n display: inline-block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n max-width: 100%;\n margin: 0 0 0 8px;\n padding-right: 8px;\n padding-left: 48px;\n overflow: hidden;\n line-height: 44px;\n white-space: nowrap;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n -webkit-transition: all 0.3s;\n -o-transition: all 0.3s;\n transition: all 0.3s;\n}\n.ant-upload-list-picture .ant-upload-list-item-name-icon-count-1,\n.ant-upload-list-picture-card .ant-upload-list-item-name-icon-count-1 {\n padding-right: 18px;\n}\n.ant-upload-list-picture .ant-upload-list-item-name-icon-count-2,\n.ant-upload-list-picture-card .ant-upload-list-item-name-icon-count-2 {\n padding-right: 36px;\n}\n.ant-upload-list-picture .ant-upload-list-item-uploading .ant-upload-list-item-name,\n.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-name {\n line-height: 28px;\n}\n.ant-upload-list-picture .ant-upload-list-item-progress,\n.ant-upload-list-picture-card .ant-upload-list-item-progress {\n bottom: 14px;\n width: calc(100% - 24px);\n margin-top: 0;\n padding-left: 56px;\n}\n.ant-upload-list-picture .anticon-close,\n.ant-upload-list-picture-card .anticon-close {\n position: absolute;\n top: 8px;\n right: 8px;\n line-height: 1;\n opacity: 1;\n}\n.ant-upload-list-picture-card.ant-upload-list::after {\n display: none;\n}\n.ant-upload-list-picture-card-container {\n float: left;\n width: 104px;\n height: 104px;\n margin: 0 8px 8px 0;\n}\n.ant-upload-list-picture-card .ant-upload-list-item {\n float: left;\n width: 104px;\n height: 104px;\n margin: 0 8px 8px 0;\n}\n.ant-upload-list-picture-card .ant-upload-list-item-info {\n position: relative;\n height: 100%;\n overflow: hidden;\n}\n.ant-upload-list-picture-card .ant-upload-list-item-info::before {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n -webkit-transition: all 0.3s;\n -o-transition: all 0.3s;\n transition: all 0.3s;\n content: ' ';\n}\n.ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info::before {\n opacity: 1;\n}\n.ant-upload-list-picture-card .ant-upload-list-item-actions {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 10;\n white-space: nowrap;\n -webkit-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n opacity: 0;\n -webkit-transition: all 0.3s;\n -o-transition: all 0.3s;\n transition: all 0.3s;\n}\n.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye-o,\n.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download,\n.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete {\n z-index: 10;\n width: 16px;\n margin: 0 4px;\n color: rgba(255, 255, 255, 0.85);\n font-size: 16px;\n cursor: pointer;\n -webkit-transition: all 0.3s;\n -o-transition: all 0.3s;\n transition: all 0.3s;\n}\n.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye-o:hover,\n.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download:hover,\n.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete:hover {\n color: #fff;\n}\n.ant-upload-list-picture-card .ant-upload-list-item-info:hover + .ant-upload-list-item-actions,\n.ant-upload-list-picture-card .ant-upload-list-item-actions:hover {\n opacity: 1;\n}\n.ant-upload-list-picture-card .ant-upload-list-item-thumbnail,\n.ant-upload-list-picture-card .ant-upload-list-item-thumbnail img {\n position: static;\n display: block;\n width: 100%;\n height: 100%;\n -o-object-fit: cover;\n object-fit: cover;\n}\n.ant-upload-list-picture-card .ant-upload-list-item-name {\n display: none;\n margin: 8px 0 0;\n padding: 0;\n line-height: 1.5;\n text-align: center;\n}\n.ant-upload-list-picture-card .anticon-picture + .ant-upload-list-item-name {\n position: absolute;\n bottom: 10px;\n display: block;\n}\n.ant-upload-list-picture-card .ant-upload-list-item-uploading.ant-upload-list-item {\n background-color: #fafafa;\n}\n.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info {\n height: auto;\n}\n.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info::before,\n.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info .anticon-eye-o,\n.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info .anticon-delete {\n display: none;\n}\n.ant-upload-list-picture-card .ant-upload-list-item-uploading-text {\n margin-top: 18px;\n color: rgba(0, 0, 0, 0.45);\n}\n.ant-upload-list-picture-card .ant-upload-list-item-progress {\n bottom: 32px;\n padding-left: 0;\n}\n.ant-upload-list .ant-upload-success-icon {\n color: #52c41a;\n font-weight: bold;\n}\n.ant-upload-list .ant-upload-animate-enter,\n.ant-upload-list .ant-upload-animate-leave,\n.ant-upload-list .ant-upload-animate-inline-enter,\n.ant-upload-list .ant-upload-animate-inline-leave {\n -webkit-animation-duration: 0.3s;\n animation-duration: 0.3s;\n -webkit-animation-fill-mode: cubic-bezier(0.78, 0.14, 0.15, 0.86);\n animation-fill-mode: cubic-bezier(0.78, 0.14, 0.15, 0.86);\n}\n.ant-upload-list .ant-upload-animate-enter {\n -webkit-animation-name: uploadAnimateIn;\n animation-name: uploadAnimateIn;\n}\n.ant-upload-list .ant-upload-animate-leave {\n -webkit-animation-name: uploadAnimateOut;\n animation-name: uploadAnimateOut;\n}\n.ant-upload-list .ant-upload-animate-inline-enter {\n -webkit-animation-name: uploadAnimateInlineIn;\n animation-name: uploadAnimateInlineIn;\n}\n.ant-upload-list .ant-upload-animate-inline-leave {\n -webkit-animation-name: uploadAnimateInlineOut;\n animation-name: uploadAnimateInlineOut;\n}\n@-webkit-keyframes uploadAnimateIn {\n from {\n height: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n }\n}\n@keyframes uploadAnimateIn {\n from {\n height: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n }\n}\n@-webkit-keyframes uploadAnimateOut {\n to {\n height: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n }\n}\n@keyframes uploadAnimateOut {\n to {\n height: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n }\n}\n@-webkit-keyframes uploadAnimateInlineIn {\n from {\n width: 0;\n height: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n }\n}\n@keyframes uploadAnimateInlineIn {\n from {\n width: 0;\n height: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n }\n}\n@-webkit-keyframes uploadAnimateInlineOut {\n to {\n width: 0;\n height: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n }\n}\n@keyframes uploadAnimateInlineOut {\n to {\n width: 0;\n height: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n }\n}\n"],"sourceRoot":""}]);
|
||
|
||
// exports
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1179:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Upload__ = __webpack_require__(1180);
|
||
// export this package's api
|
||
|
||
|
||
/* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__Upload__["a" /* default */]);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1180:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(19);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(11);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(34);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(12);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(13);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__AjaxUploader__ = __webpack_require__(1181);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__IframeUploader__ = __webpack_require__(1185);
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
function empty() {}
|
||
|
||
var Upload = function (_Component) {
|
||
__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Upload, _Component);
|
||
|
||
function Upload() {
|
||
var _ref;
|
||
|
||
var _temp, _this, _ret;
|
||
|
||
__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, Upload);
|
||
|
||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = Upload.__proto__ || Object.getPrototypeOf(Upload)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
|
||
Component: null
|
||
}, _this.saveUploader = function (node) {
|
||
_this.uploader = node;
|
||
}, _temp), __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
|
||
}
|
||
|
||
__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default()(Upload, [{
|
||
key: 'componentDidMount',
|
||
value: function componentDidMount() {
|
||
if (this.props.supportServerRender) {
|
||
/* eslint react/no-did-mount-set-state:0 */
|
||
this.setState({
|
||
Component: this.getComponent()
|
||
}, this.props.onReady);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'getComponent',
|
||
value: function getComponent() {
|
||
return typeof File !== 'undefined' ? __WEBPACK_IMPORTED_MODULE_7__AjaxUploader__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_8__IframeUploader__["a" /* default */];
|
||
}
|
||
}, {
|
||
key: 'abort',
|
||
value: function abort(file) {
|
||
this.uploader.abort(file);
|
||
}
|
||
}, {
|
||
key: 'render',
|
||
value: function render() {
|
||
if (this.props.supportServerRender) {
|
||
var _ComponentUploader = this.state.Component;
|
||
if (_ComponentUploader) {
|
||
return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(_ComponentUploader, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, this.props, { ref: this.saveUploader }));
|
||
}
|
||
return null;
|
||
}
|
||
var ComponentUploader = this.getComponent();
|
||
return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(ComponentUploader, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, this.props, { ref: this.saveUploader }));
|
||
}
|
||
}]);
|
||
|
||
return Upload;
|
||
}(__WEBPACK_IMPORTED_MODULE_5_react__["Component"]);
|
||
|
||
Upload.propTypes = {
|
||
component: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
|
||
style: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
|
||
prefixCls: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
|
||
action: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func]),
|
||
name: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
|
||
multipart: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
|
||
directory: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
|
||
onError: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
|
||
onSuccess: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
|
||
onProgress: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
|
||
onStart: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
|
||
data: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func]),
|
||
headers: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
|
||
accept: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
|
||
multiple: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
|
||
disabled: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
|
||
beforeUpload: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
|
||
customRequest: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
|
||
onReady: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
|
||
withCredentials: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
|
||
supportServerRender: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
|
||
openFileDialogOnClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool
|
||
};
|
||
Upload.defaultProps = {
|
||
component: 'span',
|
||
prefixCls: 'rc-upload',
|
||
data: {},
|
||
headers: {},
|
||
name: 'file',
|
||
multipart: false,
|
||
onReady: empty,
|
||
onStart: empty,
|
||
onError: empty,
|
||
onSuccess: empty,
|
||
supportServerRender: false,
|
||
multiple: false,
|
||
beforeUpload: null,
|
||
customRequest: null,
|
||
withCredentials: false,
|
||
openFileDialogOnClick: true
|
||
};
|
||
|
||
|
||
/* harmony default export */ __webpack_exports__["a"] = (Upload);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1181:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(19);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(59);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(11);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(34);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(12);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(13);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(1);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_classnames__ = __webpack_require__(3);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_classnames__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__request__ = __webpack_require__(1182);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__uid__ = __webpack_require__(1082);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__attr_accept__ = __webpack_require__(1183);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__traverseFileTree__ = __webpack_require__(1184);
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/* eslint react/no-is-mounted:0 react/sort-comp:0 */
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var AjaxUploader = function (_Component) {
|
||
__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(AjaxUploader, _Component);
|
||
|
||
function AjaxUploader() {
|
||
var _ref;
|
||
|
||
var _temp, _this, _ret;
|
||
|
||
__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, AjaxUploader);
|
||
|
||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = AjaxUploader.__proto__ || Object.getPrototypeOf(AjaxUploader)).call.apply(_ref, [this].concat(args))), _this), _this.state = { uid: Object(__WEBPACK_IMPORTED_MODULE_10__uid__["a" /* default */])() }, _this.reqs = {}, _this.onChange = function (e) {
|
||
var files = e.target.files;
|
||
_this.uploadFiles(files);
|
||
_this.reset();
|
||
}, _this.onClick = function () {
|
||
var el = _this.fileInput;
|
||
if (!el) {
|
||
return;
|
||
}
|
||
el.click();
|
||
}, _this.onKeyDown = function (e) {
|
||
if (e.key === 'Enter') {
|
||
_this.onClick();
|
||
}
|
||
}, _this.onFileDrop = function (e) {
|
||
var multiple = _this.props.multiple;
|
||
|
||
|
||
e.preventDefault();
|
||
|
||
if (e.type === 'dragover') {
|
||
return;
|
||
}
|
||
|
||
if (_this.props.directory) {
|
||
Object(__WEBPACK_IMPORTED_MODULE_12__traverseFileTree__["a" /* default */])(e.dataTransfer.items, _this.uploadFiles, function (_file) {
|
||
return Object(__WEBPACK_IMPORTED_MODULE_11__attr_accept__["a" /* default */])(_file, _this.props.accept);
|
||
});
|
||
} else {
|
||
var files = Array.prototype.slice.call(e.dataTransfer.files).filter(function (file) {
|
||
return Object(__WEBPACK_IMPORTED_MODULE_11__attr_accept__["a" /* default */])(file, _this.props.accept);
|
||
});
|
||
|
||
if (multiple === false) {
|
||
files = files.slice(0, 1);
|
||
}
|
||
|
||
_this.uploadFiles(files);
|
||
}
|
||
}, _this.uploadFiles = function (files) {
|
||
var postFiles = Array.prototype.slice.call(files);
|
||
postFiles.map(function (file) {
|
||
file.uid = Object(__WEBPACK_IMPORTED_MODULE_10__uid__["a" /* default */])();
|
||
return file;
|
||
}).forEach(function (file) {
|
||
_this.upload(file, postFiles);
|
||
});
|
||
}, _this.saveFileInput = function (node) {
|
||
_this.fileInput = node;
|
||
}, _temp), __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
|
||
}
|
||
|
||
__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(AjaxUploader, [{
|
||
key: 'componentDidMount',
|
||
value: function componentDidMount() {
|
||
this._isMounted = true;
|
||
}
|
||
}, {
|
||
key: 'componentWillUnmount',
|
||
value: function componentWillUnmount() {
|
||
this._isMounted = false;
|
||
this.abort();
|
||
}
|
||
}, {
|
||
key: 'upload',
|
||
value: function upload(file, fileList) {
|
||
var _this2 = this;
|
||
|
||
var props = this.props;
|
||
|
||
if (!props.beforeUpload) {
|
||
// always async in case use react state to keep fileList
|
||
return setTimeout(function () {
|
||
return _this2.post(file);
|
||
}, 0);
|
||
}
|
||
|
||
var before = props.beforeUpload(file, fileList);
|
||
if (before && before.then) {
|
||
before.then(function (processedFile) {
|
||
var processedFileType = Object.prototype.toString.call(processedFile);
|
||
if (processedFileType === '[object File]' || processedFileType === '[object Blob]') {
|
||
return _this2.post(processedFile);
|
||
}
|
||
return _this2.post(file);
|
||
})['catch'](function (e) {
|
||
console && console.log(e); // eslint-disable-line
|
||
});
|
||
} else if (before !== false) {
|
||
setTimeout(function () {
|
||
return _this2.post(file);
|
||
}, 0);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'post',
|
||
value: function post(file) {
|
||
var _this3 = this;
|
||
|
||
if (!this._isMounted) {
|
||
return;
|
||
}
|
||
var props = this.props;
|
||
var data = props.data;
|
||
var onStart = props.onStart,
|
||
onProgress = props.onProgress,
|
||
_props$transformFile = props.transformFile,
|
||
transformFile = _props$transformFile === undefined ? function (originFile) {
|
||
return originFile;
|
||
} : _props$transformFile;
|
||
|
||
|
||
new Promise(function (resolve) {
|
||
var action = props.action;
|
||
|
||
if (typeof action === 'function') {
|
||
return resolve(action(file));
|
||
}
|
||
resolve(action);
|
||
}).then(function (action) {
|
||
var uid = file.uid;
|
||
|
||
var request = props.customRequest || __WEBPACK_IMPORTED_MODULE_9__request__["a" /* default */];
|
||
var transform = Promise.resolve(transformFile(file))['catch'](function (e) {
|
||
console.error(e); // eslint-disable-line no-console
|
||
});
|
||
|
||
transform.then(function (transformedFile) {
|
||
if (typeof data === 'function') {
|
||
data = data(file);
|
||
}
|
||
|
||
var requestOption = {
|
||
action: action,
|
||
filename: props.name,
|
||
data: data,
|
||
file: transformedFile,
|
||
headers: props.headers,
|
||
withCredentials: props.withCredentials,
|
||
method: props.method || 'post',
|
||
onProgress: onProgress ? function (e) {
|
||
onProgress(e, file);
|
||
} : null,
|
||
onSuccess: function onSuccess(ret, xhr) {
|
||
delete _this3.reqs[uid];
|
||
props.onSuccess(ret, file, xhr);
|
||
},
|
||
onError: function onError(err, ret) {
|
||
delete _this3.reqs[uid];
|
||
props.onError(err, ret, file);
|
||
}
|
||
};
|
||
_this3.reqs[uid] = request(requestOption);
|
||
onStart(file);
|
||
});
|
||
});
|
||
}
|
||
}, {
|
||
key: 'reset',
|
||
value: function reset() {
|
||
this.setState({
|
||
uid: Object(__WEBPACK_IMPORTED_MODULE_10__uid__["a" /* default */])()
|
||
});
|
||
}
|
||
}, {
|
||
key: 'abort',
|
||
value: function abort(file) {
|
||
var reqs = this.reqs;
|
||
|
||
if (file) {
|
||
var uid = file;
|
||
if (file && file.uid) {
|
||
uid = file.uid;
|
||
}
|
||
if (reqs[uid] && reqs[uid].abort) {
|
||
reqs[uid].abort();
|
||
}
|
||
delete reqs[uid];
|
||
} else {
|
||
Object.keys(reqs).forEach(function (uid) {
|
||
if (reqs[uid] && reqs[uid].abort) {
|
||
reqs[uid].abort();
|
||
}
|
||
delete reqs[uid];
|
||
});
|
||
}
|
||
}
|
||
}, {
|
||
key: 'render',
|
||
value: function render() {
|
||
var _classNames;
|
||
|
||
var _props = this.props,
|
||
Tag = _props.component,
|
||
prefixCls = _props.prefixCls,
|
||
className = _props.className,
|
||
disabled = _props.disabled,
|
||
id = _props.id,
|
||
style = _props.style,
|
||
multiple = _props.multiple,
|
||
accept = _props.accept,
|
||
children = _props.children,
|
||
directory = _props.directory,
|
||
openFileDialogOnClick = _props.openFileDialogOnClick;
|
||
|
||
var cls = __WEBPACK_IMPORTED_MODULE_8_classnames___default()((_classNames = {}, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls, true), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls + '-disabled', disabled), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classNames, className, className), _classNames));
|
||
var events = disabled ? {} : {
|
||
onClick: openFileDialogOnClick ? this.onClick : function () {},
|
||
onKeyDown: openFileDialogOnClick ? this.onKeyDown : function () {},
|
||
onDrop: this.onFileDrop,
|
||
onDragOver: this.onFileDrop,
|
||
tabIndex: '0'
|
||
};
|
||
return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
||
Tag,
|
||
__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, events, {
|
||
className: cls,
|
||
role: 'button',
|
||
style: style
|
||
}),
|
||
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('input', {
|
||
id: id,
|
||
type: 'file',
|
||
ref: this.saveFileInput,
|
||
onClick: function onClick(e) {
|
||
return e.stopPropagation();
|
||
} // https://github.com/ant-design/ant-design/issues/19948
|
||
, key: this.state.uid,
|
||
style: { display: 'none' },
|
||
accept: accept,
|
||
directory: directory ? 'directory' : null,
|
||
webkitdirectory: directory ? 'webkitdirectory' : null,
|
||
multiple: multiple,
|
||
onChange: this.onChange
|
||
}),
|
||
children
|
||
);
|
||
}
|
||
}]);
|
||
|
||
return AjaxUploader;
|
||
}(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]);
|
||
|
||
AjaxUploader.propTypes = {
|
||
id: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
|
||
component: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
|
||
style: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object,
|
||
prefixCls: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
|
||
className: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
|
||
multiple: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
|
||
directory: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
|
||
disabled: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
|
||
accept: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
|
||
children: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any,
|
||
onStart: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
|
||
data: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func]),
|
||
action: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func]),
|
||
headers: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object,
|
||
beforeUpload: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
|
||
customRequest: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
|
||
onProgress: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
|
||
withCredentials: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
|
||
openFileDialogOnClick: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
|
||
transformFile: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func
|
||
};
|
||
|
||
|
||
/* harmony default export */ __webpack_exports__["a"] = (AjaxUploader);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1182:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony export (immutable) */ __webpack_exports__["a"] = upload;
|
||
function getError(option, xhr) {
|
||
var msg = 'cannot ' + option.method + ' ' + option.action + ' ' + xhr.status + '\'';
|
||
var err = new Error(msg);
|
||
err.status = xhr.status;
|
||
err.method = option.method;
|
||
err.url = option.action;
|
||
return err;
|
||
}
|
||
|
||
function getBody(xhr) {
|
||
var text = xhr.responseText || xhr.response;
|
||
if (!text) {
|
||
return text;
|
||
}
|
||
|
||
try {
|
||
return JSON.parse(text);
|
||
} catch (e) {
|
||
return text;
|
||
}
|
||
}
|
||
|
||
// option {
|
||
// onProgress: (event: { percent: number }): void,
|
||
// onError: (event: Error, body?: Object): void,
|
||
// onSuccess: (body: Object): void,
|
||
// data: Object,
|
||
// filename: String,
|
||
// file: File,
|
||
// withCredentials: Boolean,
|
||
// action: String,
|
||
// headers: Object,
|
||
// }
|
||
function upload(option) {
|
||
var xhr = new XMLHttpRequest();
|
||
|
||
if (option.onProgress && xhr.upload) {
|
||
xhr.upload.onprogress = function progress(e) {
|
||
if (e.total > 0) {
|
||
e.percent = e.loaded / e.total * 100;
|
||
}
|
||
option.onProgress(e);
|
||
};
|
||
}
|
||
|
||
var formData = new FormData();
|
||
|
||
if (option.data) {
|
||
Object.keys(option.data).forEach(function (key) {
|
||
var value = option.data[key];
|
||
// support key-value array data
|
||
if (Array.isArray(value)) {
|
||
value.forEach(function (item) {
|
||
// { list: [ 11, 22 ] }
|
||
// formData.append('list[]', 11);
|
||
formData.append(key + '[]', item);
|
||
});
|
||
return;
|
||
}
|
||
|
||
formData.append(key, option.data[key]);
|
||
});
|
||
}
|
||
|
||
formData.append(option.filename, option.file);
|
||
|
||
xhr.onerror = function error(e) {
|
||
option.onError(e);
|
||
};
|
||
|
||
xhr.onload = function onload() {
|
||
// allow success when 2xx status
|
||
// see https://github.com/react-component/upload/issues/34
|
||
if (xhr.status < 200 || xhr.status >= 300) {
|
||
return option.onError(getError(option, xhr), getBody(xhr));
|
||
}
|
||
|
||
option.onSuccess(getBody(xhr), xhr);
|
||
};
|
||
|
||
xhr.open(option.method, option.action, true);
|
||
|
||
// Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179
|
||
if (option.withCredentials && 'withCredentials' in xhr) {
|
||
xhr.withCredentials = true;
|
||
}
|
||
|
||
var headers = option.headers || {};
|
||
|
||
// when set headers['X-Requested-With'] = null , can close default XHR header
|
||
// see https://github.com/react-component/upload/issues/33
|
||
if (headers['X-Requested-With'] !== null) {
|
||
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
||
}
|
||
|
||
for (var h in headers) {
|
||
if (headers.hasOwnProperty(h) && headers[h] !== null) {
|
||
xhr.setRequestHeader(h, headers[h]);
|
||
}
|
||
}
|
||
xhr.send(formData);
|
||
|
||
return {
|
||
abort: function abort() {
|
||
xhr.abort();
|
||
}
|
||
};
|
||
}
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1183:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
function endsWith(str, suffix) {
|
||
return str.indexOf(suffix, str.length - suffix.length) !== -1;
|
||
}
|
||
|
||
/* harmony default export */ __webpack_exports__["a"] = (function (file, acceptedFiles) {
|
||
if (file && acceptedFiles) {
|
||
var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');
|
||
var fileName = file.name || '';
|
||
var mimeType = file.type || '';
|
||
var baseMimeType = mimeType.replace(/\/.*$/, '');
|
||
|
||
return acceptedFilesArray.some(function (type) {
|
||
var validType = type.trim();
|
||
if (validType.charAt(0) === '.') {
|
||
return endsWith(fileName.toLowerCase(), validType.toLowerCase());
|
||
} else if (/\/\*$/.test(validType)) {
|
||
// This is something like a image/* mime type
|
||
return baseMimeType === validType.replace(/\/.*$/, '');
|
||
}
|
||
return mimeType === validType;
|
||
});
|
||
}
|
||
return true;
|
||
});
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1184:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
function loopFiles(item, callback) {
|
||
var dirReader = item.createReader();
|
||
var fileList = [];
|
||
|
||
function sequence() {
|
||
dirReader.readEntries(function (entries) {
|
||
var entryList = Array.prototype.slice.apply(entries);
|
||
fileList = fileList.concat(entryList);
|
||
|
||
// Check if all the file has been viewed
|
||
var isFinished = !entryList.length;
|
||
|
||
if (isFinished) {
|
||
callback(fileList);
|
||
} else {
|
||
sequence();
|
||
}
|
||
});
|
||
}
|
||
|
||
sequence();
|
||
}
|
||
|
||
var traverseFileTree = function traverseFileTree(files, callback, isAccepted) {
|
||
var _traverseFileTree = function _traverseFileTree(item, path) {
|
||
path = path || '';
|
||
if (item.isFile) {
|
||
item.file(function (file) {
|
||
if (isAccepted(file)) {
|
||
// https://github.com/ant-design/ant-design/issues/16426
|
||
if (item.fullPath && !file.webkitRelativePath) {
|
||
Object.defineProperties(file, {
|
||
webkitRelativePath: {
|
||
writable: true
|
||
}
|
||
});
|
||
file.webkitRelativePath = item.fullPath.replace(/^\//, '');
|
||
Object.defineProperties(file, {
|
||
webkitRelativePath: {
|
||
writable: false
|
||
}
|
||
});
|
||
}
|
||
callback([file]);
|
||
}
|
||
});
|
||
} else if (item.isDirectory) {
|
||
loopFiles(item, function (entries) {
|
||
entries.forEach(function (entryItem) {
|
||
_traverseFileTree(entryItem, '' + path + item.name + '/');
|
||
});
|
||
});
|
||
}
|
||
};
|
||
var _iteratorNormalCompletion = true;
|
||
var _didIteratorError = false;
|
||
var _iteratorError = undefined;
|
||
|
||
try {
|
||
for (var _iterator = files[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
||
var file = _step.value;
|
||
|
||
_traverseFileTree(file.webkitGetAsEntry());
|
||
}
|
||
} catch (err) {
|
||
_didIteratorError = true;
|
||
_iteratorError = err;
|
||
} finally {
|
||
try {
|
||
if (!_iteratorNormalCompletion && _iterator['return']) {
|
||
_iterator['return']();
|
||
}
|
||
} finally {
|
||
if (_didIteratorError) {
|
||
throw _iteratorError;
|
||
}
|
||
}
|
||
}
|
||
};
|
||
|
||
/* harmony default export */ __webpack_exports__["a"] = (traverseFileTree);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1185:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(59);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(19);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(11);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(34);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(12);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(13);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(1);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_dom__ = __webpack_require__(4);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_dom__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames__ = __webpack_require__(3);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__uid__ = __webpack_require__(1082);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_warning__ = __webpack_require__(327);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_warning__);
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/* eslint react/sort-comp:0 */
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var IFRAME_STYLE = {
|
||
position: 'absolute',
|
||
top: 0,
|
||
opacity: 0,
|
||
filter: 'alpha(opacity=0)',
|
||
left: 0,
|
||
zIndex: 9999
|
||
};
|
||
|
||
// diferent from AjaxUpload, can only upload on at one time, serial seriously
|
||
|
||
var IframeUploader = function (_Component) {
|
||
__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(IframeUploader, _Component);
|
||
|
||
function IframeUploader() {
|
||
var _ref;
|
||
|
||
var _temp, _this, _ret;
|
||
|
||
__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, IframeUploader);
|
||
|
||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = IframeUploader.__proto__ || Object.getPrototypeOf(IframeUploader)).call.apply(_ref, [this].concat(args))), _this), _this.state = { uploading: false }, _this.file = {}, _this.onLoad = function () {
|
||
if (!_this.state.uploading) {
|
||
return;
|
||
}
|
||
var _this2 = _this,
|
||
props = _this2.props,
|
||
file = _this2.file;
|
||
|
||
var response = void 0;
|
||
try {
|
||
var doc = _this.getIframeDocument();
|
||
var script = doc.getElementsByTagName('script')[0];
|
||
if (script && script.parentNode === doc.body) {
|
||
doc.body.removeChild(script);
|
||
}
|
||
response = doc.body.innerHTML;
|
||
props.onSuccess(response, file);
|
||
} catch (err) {
|
||
__WEBPACK_IMPORTED_MODULE_11_warning___default()(false, 'cross domain error for Upload. Maybe server should return document.domain script. see Note from https://github.com/react-component/upload');
|
||
response = 'cross-domain';
|
||
props.onError(err, null, file);
|
||
}
|
||
_this.endUpload();
|
||
}, _this.onChange = function () {
|
||
var target = _this.getFormInputNode();
|
||
// ie8/9 don't support FileList Object
|
||
// http://stackoverflow.com/questions/12830058/ie8-input-type-file-get-files
|
||
var file = _this.file = {
|
||
uid: Object(__WEBPACK_IMPORTED_MODULE_10__uid__["a" /* default */])(),
|
||
name: target.value && target.value.substring(target.value.lastIndexOf('\\') + 1, target.value.length)
|
||
};
|
||
_this.startUpload();
|
||
var _this3 = _this,
|
||
props = _this3.props;
|
||
|
||
if (!props.beforeUpload) {
|
||
return _this.post(file);
|
||
}
|
||
var before = props.beforeUpload(file);
|
||
if (before && before.then) {
|
||
before.then(function () {
|
||
_this.post(file);
|
||
}, function () {
|
||
_this.endUpload();
|
||
});
|
||
} else if (before !== false) {
|
||
_this.post(file);
|
||
} else {
|
||
_this.endUpload();
|
||
}
|
||
}, _this.saveIframe = function (node) {
|
||
_this.iframe = node;
|
||
}, _temp), __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
|
||
}
|
||
|
||
__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(IframeUploader, [{
|
||
key: 'componentDidMount',
|
||
value: function componentDidMount() {
|
||
this.updateIframeWH();
|
||
this.initIframe();
|
||
}
|
||
}, {
|
||
key: 'componentDidUpdate',
|
||
value: function componentDidUpdate() {
|
||
this.updateIframeWH();
|
||
}
|
||
}, {
|
||
key: 'getIframeNode',
|
||
value: function getIframeNode() {
|
||
return this.iframe;
|
||
}
|
||
}, {
|
||
key: 'getIframeDocument',
|
||
value: function getIframeDocument() {
|
||
return this.getIframeNode().contentDocument;
|
||
}
|
||
}, {
|
||
key: 'getFormNode',
|
||
value: function getFormNode() {
|
||
return this.getIframeDocument().getElementById('form');
|
||
}
|
||
}, {
|
||
key: 'getFormInputNode',
|
||
value: function getFormInputNode() {
|
||
return this.getIframeDocument().getElementById('input');
|
||
}
|
||
}, {
|
||
key: 'getFormDataNode',
|
||
value: function getFormDataNode() {
|
||
return this.getIframeDocument().getElementById('data');
|
||
}
|
||
}, {
|
||
key: 'getFileForMultiple',
|
||
value: function getFileForMultiple(file) {
|
||
return this.props.multiple ? [file] : file;
|
||
}
|
||
}, {
|
||
key: 'getIframeHTML',
|
||
value: function getIframeHTML(domain) {
|
||
var domainScript = '';
|
||
var domainInput = '';
|
||
if (domain) {
|
||
var script = 'script';
|
||
domainScript = '<' + script + '>document.domain="' + domain + '";</' + script + '>';
|
||
domainInput = '<input name="_documentDomain" value="' + domain + '" />';
|
||
}
|
||
return '\n <!DOCTYPE html>\n <html>\n <head>\n <meta http-equiv="X-UA-Compatible" content="IE=edge" />\n <style>\n body,html {padding:0;margin:0;border:0;overflow:hidden;}\n </style>\n ' + domainScript + '\n </head>\n <body>\n <form method="post"\n encType="multipart/form-data"\n action="" id="form"\n style="display:block;height:9999px;position:relative;overflow:hidden;">\n <input id="input" type="file"\n name="' + this.props.name + '"\n style="position:absolute;top:0;right:0;height:9999px;font-size:9999px;cursor:pointer;"/>\n ' + domainInput + '\n <span id="data"></span>\n </form>\n </body>\n </html>\n ';
|
||
}
|
||
}, {
|
||
key: 'initIframeSrc',
|
||
value: function initIframeSrc() {
|
||
if (this.domain) {
|
||
this.getIframeNode().src = 'javascript:void((function(){\n var d = document;\n d.open();\n d.domain=\'' + this.domain + '\';\n d.write(\'\');\n d.close();\n })())';
|
||
}
|
||
}
|
||
}, {
|
||
key: 'initIframe',
|
||
value: function initIframe() {
|
||
var iframeNode = this.getIframeNode();
|
||
var win = iframeNode.contentWindow;
|
||
var doc = void 0;
|
||
this.domain = this.domain || '';
|
||
this.initIframeSrc();
|
||
try {
|
||
doc = win.document;
|
||
} catch (e) {
|
||
this.domain = document.domain;
|
||
this.initIframeSrc();
|
||
win = iframeNode.contentWindow;
|
||
doc = win.document;
|
||
}
|
||
doc.open('text/html', 'replace');
|
||
doc.write(this.getIframeHTML(this.domain));
|
||
doc.close();
|
||
this.getFormInputNode().onchange = this.onChange;
|
||
}
|
||
}, {
|
||
key: 'endUpload',
|
||
value: function endUpload() {
|
||
if (this.state.uploading) {
|
||
this.file = {};
|
||
// hack avoid batch
|
||
this.state.uploading = false;
|
||
this.setState({
|
||
uploading: false
|
||
});
|
||
this.initIframe();
|
||
}
|
||
}
|
||
}, {
|
||
key: 'startUpload',
|
||
value: function startUpload() {
|
||
if (!this.state.uploading) {
|
||
this.state.uploading = true;
|
||
this.setState({
|
||
uploading: true
|
||
});
|
||
}
|
||
}
|
||
}, {
|
||
key: 'updateIframeWH',
|
||
value: function updateIframeWH() {
|
||
var rootNode = __WEBPACK_IMPORTED_MODULE_8_react_dom___default.a.findDOMNode(this);
|
||
var iframeNode = this.getIframeNode();
|
||
iframeNode.style.height = rootNode.offsetHeight + 'px';
|
||
iframeNode.style.width = rootNode.offsetWidth + 'px';
|
||
}
|
||
}, {
|
||
key: 'abort',
|
||
value: function abort(file) {
|
||
if (file) {
|
||
var uid = file;
|
||
if (file && file.uid) {
|
||
uid = file.uid;
|
||
}
|
||
if (uid === this.file.uid) {
|
||
this.endUpload();
|
||
}
|
||
} else {
|
||
this.endUpload();
|
||
}
|
||
}
|
||
}, {
|
||
key: 'post',
|
||
value: function post(file) {
|
||
var _this4 = this;
|
||
|
||
var formNode = this.getFormNode();
|
||
var dataSpan = this.getFormDataNode();
|
||
var data = this.props.data;
|
||
var onStart = this.props.onStart;
|
||
|
||
if (typeof data === 'function') {
|
||
data = data(file);
|
||
}
|
||
var inputs = document.createDocumentFragment();
|
||
for (var key in data) {
|
||
if (data.hasOwnProperty(key)) {
|
||
var input = document.createElement('input');
|
||
input.setAttribute('name', key);
|
||
input.value = data[key];
|
||
inputs.appendChild(input);
|
||
}
|
||
}
|
||
dataSpan.appendChild(inputs);
|
||
new Promise(function (resolve) {
|
||
var action = _this4.props.action;
|
||
|
||
if (typeof action === 'function') {
|
||
return resolve(action(file));
|
||
}
|
||
resolve(action);
|
||
}).then(function (action) {
|
||
formNode.setAttribute('action', action);
|
||
formNode.submit();
|
||
dataSpan.innerHTML = '';
|
||
onStart(file);
|
||
});
|
||
}
|
||
}, {
|
||
key: 'render',
|
||
value: function render() {
|
||
var _classNames;
|
||
|
||
var _props = this.props,
|
||
Tag = _props.component,
|
||
disabled = _props.disabled,
|
||
className = _props.className,
|
||
prefixCls = _props.prefixCls,
|
||
children = _props.children,
|
||
style = _props.style;
|
||
|
||
var iframeStyle = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, IFRAME_STYLE, {
|
||
display: this.state.uploading || disabled ? 'none' : ''
|
||
});
|
||
var cls = __WEBPACK_IMPORTED_MODULE_9_classnames___default()((_classNames = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls, true), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls + '-disabled', disabled), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, className, className), _classNames));
|
||
return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
||
Tag,
|
||
{
|
||
className: cls,
|
||
style: __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({ position: 'relative', zIndex: 0 }, style)
|
||
},
|
||
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('iframe', {
|
||
ref: this.saveIframe,
|
||
onLoad: this.onLoad,
|
||
style: iframeStyle
|
||
}),
|
||
children
|
||
);
|
||
}
|
||
}]);
|
||
|
||
return IframeUploader;
|
||
}(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]);
|
||
|
||
IframeUploader.propTypes = {
|
||
component: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
|
||
style: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object,
|
||
disabled: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
|
||
prefixCls: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
|
||
className: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
|
||
accept: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
|
||
onStart: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
|
||
multiple: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
|
||
children: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any,
|
||
data: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func]),
|
||
action: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func]),
|
||
name: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string
|
||
};
|
||
|
||
|
||
/* harmony default export */ __webpack_exports__["a"] = (IframeUploader);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1186:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseIteratee = __webpack_require__(1083),
|
||
baseUniq = __webpack_require__(1230);
|
||
|
||
/**
|
||
* This method is like `_.uniq` except that it accepts `iteratee` which is
|
||
* invoked for each element in `array` to generate the criterion by which
|
||
* uniqueness is computed. The order of result values is determined by the
|
||
* order they occur in the array. The iteratee is invoked with one argument:
|
||
* (value).
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 4.0.0
|
||
* @category Array
|
||
* @param {Array} array The array to inspect.
|
||
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
||
* @returns {Array} Returns the new duplicate free array.
|
||
* @example
|
||
*
|
||
* _.uniqBy([2.1, 1.2, 2.3], Math.floor);
|
||
* // => [2.1, 1.2]
|
||
*
|
||
* // The `_.property` iteratee shorthand.
|
||
* _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
||
* // => [{ 'x': 1 }, { 'x': 2 }]
|
||
*/
|
||
function uniqBy(array, iteratee) {
|
||
return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];
|
||
}
|
||
|
||
module.exports = uniqBy;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1187:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseIsMatch = __webpack_require__(1188),
|
||
getMatchData = __webpack_require__(1223),
|
||
matchesStrictComparable = __webpack_require__(1094);
|
||
|
||
/**
|
||
* The base implementation of `_.matches` which doesn't clone `source`.
|
||
*
|
||
* @private
|
||
* @param {Object} source The object of property values to match.
|
||
* @returns {Function} Returns the new spec function.
|
||
*/
|
||
function baseMatches(source) {
|
||
var matchData = getMatchData(source);
|
||
if (matchData.length == 1 && matchData[0][2]) {
|
||
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
||
}
|
||
return function(object) {
|
||
return object === source || baseIsMatch(object, source, matchData);
|
||
};
|
||
}
|
||
|
||
module.exports = baseMatches;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1188:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var Stack = __webpack_require__(1084),
|
||
baseIsEqual = __webpack_require__(1085);
|
||
|
||
/** Used to compose bitmasks for value comparisons. */
|
||
var COMPARE_PARTIAL_FLAG = 1,
|
||
COMPARE_UNORDERED_FLAG = 2;
|
||
|
||
/**
|
||
* The base implementation of `_.isMatch` without support for iteratee shorthands.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to inspect.
|
||
* @param {Object} source The object of property values to match.
|
||
* @param {Array} matchData The property names, values, and compare flags to match.
|
||
* @param {Function} [customizer] The function to customize comparisons.
|
||
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
|
||
*/
|
||
function baseIsMatch(object, source, matchData, customizer) {
|
||
var index = matchData.length,
|
||
length = index,
|
||
noCustomizer = !customizer;
|
||
|
||
if (object == null) {
|
||
return !length;
|
||
}
|
||
object = Object(object);
|
||
while (index--) {
|
||
var data = matchData[index];
|
||
if ((noCustomizer && data[2])
|
||
? data[1] !== object[data[0]]
|
||
: !(data[0] in object)
|
||
) {
|
||
return false;
|
||
}
|
||
}
|
||
while (++index < length) {
|
||
data = matchData[index];
|
||
var key = data[0],
|
||
objValue = object[key],
|
||
srcValue = data[1];
|
||
|
||
if (noCustomizer && data[2]) {
|
||
if (objValue === undefined && !(key in object)) {
|
||
return false;
|
||
}
|
||
} else {
|
||
var stack = new Stack;
|
||
if (customizer) {
|
||
var result = customizer(objValue, srcValue, key, object, source, stack);
|
||
}
|
||
if (!(result === undefined
|
||
? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
|
||
: result
|
||
)) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
|
||
module.exports = baseIsMatch;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1189:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var ListCache = __webpack_require__(925);
|
||
|
||
/**
|
||
* Removes all key-value entries from the stack.
|
||
*
|
||
* @private
|
||
* @name clear
|
||
* @memberOf Stack
|
||
*/
|
||
function stackClear() {
|
||
this.__data__ = new ListCache;
|
||
this.size = 0;
|
||
}
|
||
|
||
module.exports = stackClear;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1190:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Removes `key` and its value from the stack.
|
||
*
|
||
* @private
|
||
* @name delete
|
||
* @memberOf Stack
|
||
* @param {string} key The key of the value to remove.
|
||
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
||
*/
|
||
function stackDelete(key) {
|
||
var data = this.__data__,
|
||
result = data['delete'](key);
|
||
|
||
this.size = data.size;
|
||
return result;
|
||
}
|
||
|
||
module.exports = stackDelete;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1191:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Gets the stack value for `key`.
|
||
*
|
||
* @private
|
||
* @name get
|
||
* @memberOf Stack
|
||
* @param {string} key The key of the value to get.
|
||
* @returns {*} Returns the entry value.
|
||
*/
|
||
function stackGet(key) {
|
||
return this.__data__.get(key);
|
||
}
|
||
|
||
module.exports = stackGet;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1192:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Checks if a stack value for `key` exists.
|
||
*
|
||
* @private
|
||
* @name has
|
||
* @memberOf Stack
|
||
* @param {string} key The key of the entry to check.
|
||
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
||
*/
|
||
function stackHas(key) {
|
||
return this.__data__.has(key);
|
||
}
|
||
|
||
module.exports = stackHas;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1193:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var ListCache = __webpack_require__(925),
|
||
Map = __webpack_require__(932),
|
||
MapCache = __webpack_require__(933);
|
||
|
||
/** Used as the size to enable large array optimizations. */
|
||
var LARGE_ARRAY_SIZE = 200;
|
||
|
||
/**
|
||
* Sets the stack `key` to `value`.
|
||
*
|
||
* @private
|
||
* @name set
|
||
* @memberOf Stack
|
||
* @param {string} key The key of the value to set.
|
||
* @param {*} value The value to set.
|
||
* @returns {Object} Returns the stack cache instance.
|
||
*/
|
||
function stackSet(key, value) {
|
||
var data = this.__data__;
|
||
if (data instanceof ListCache) {
|
||
var pairs = data.__data__;
|
||
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
||
pairs.push([key, value]);
|
||
this.size = ++data.size;
|
||
return this;
|
||
}
|
||
data = this.__data__ = new MapCache(pairs);
|
||
}
|
||
data.set(key, value);
|
||
this.size = data.size;
|
||
return this;
|
||
}
|
||
|
||
module.exports = stackSet;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1194:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var Stack = __webpack_require__(1084),
|
||
equalArrays = __webpack_require__(1086),
|
||
equalByTag = __webpack_require__(1198),
|
||
equalObjects = __webpack_require__(1201),
|
||
getTag = __webpack_require__(1219),
|
||
isArray = __webpack_require__(916),
|
||
isBuffer = __webpack_require__(1090),
|
||
isTypedArray = __webpack_require__(1091);
|
||
|
||
/** Used to compose bitmasks for value comparisons. */
|
||
var COMPARE_PARTIAL_FLAG = 1;
|
||
|
||
/** `Object#toString` result references. */
|
||
var argsTag = '[object Arguments]',
|
||
arrayTag = '[object Array]',
|
||
objectTag = '[object Object]';
|
||
|
||
/** Used for built-in method references. */
|
||
var objectProto = Object.prototype;
|
||
|
||
/** Used to check objects for own properties. */
|
||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||
|
||
/**
|
||
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
||
* deep comparisons and tracks traversed objects enabling objects with circular
|
||
* references to be compared.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to compare.
|
||
* @param {Object} other The other object to compare.
|
||
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
||
* @param {Function} customizer The function to customize comparisons.
|
||
* @param {Function} equalFunc The function to determine equivalents of values.
|
||
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
|
||
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
||
*/
|
||
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
||
var objIsArr = isArray(object),
|
||
othIsArr = isArray(other),
|
||
objTag = objIsArr ? arrayTag : getTag(object),
|
||
othTag = othIsArr ? arrayTag : getTag(other);
|
||
|
||
objTag = objTag == argsTag ? objectTag : objTag;
|
||
othTag = othTag == argsTag ? objectTag : othTag;
|
||
|
||
var objIsObj = objTag == objectTag,
|
||
othIsObj = othTag == objectTag,
|
||
isSameTag = objTag == othTag;
|
||
|
||
if (isSameTag && isBuffer(object)) {
|
||
if (!isBuffer(other)) {
|
||
return false;
|
||
}
|
||
objIsArr = true;
|
||
objIsObj = false;
|
||
}
|
||
if (isSameTag && !objIsObj) {
|
||
stack || (stack = new Stack);
|
||
return (objIsArr || isTypedArray(object))
|
||
? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
|
||
: equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
||
}
|
||
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
||
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
||
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
||
|
||
if (objIsWrapped || othIsWrapped) {
|
||
var objUnwrapped = objIsWrapped ? object.value() : object,
|
||
othUnwrapped = othIsWrapped ? other.value() : other;
|
||
|
||
stack || (stack = new Stack);
|
||
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
||
}
|
||
}
|
||
if (!isSameTag) {
|
||
return false;
|
||
}
|
||
stack || (stack = new Stack);
|
||
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
||
}
|
||
|
||
module.exports = baseIsEqualDeep;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1195:
|
||
/***/ (function(module, exports) {
|
||
|
||
/** Used to stand-in for `undefined` hash values. */
|
||
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
||
|
||
/**
|
||
* Adds `value` to the array cache.
|
||
*
|
||
* @private
|
||
* @name add
|
||
* @memberOf SetCache
|
||
* @alias push
|
||
* @param {*} value The value to cache.
|
||
* @returns {Object} Returns the cache instance.
|
||
*/
|
||
function setCacheAdd(value) {
|
||
this.__data__.set(value, HASH_UNDEFINED);
|
||
return this;
|
||
}
|
||
|
||
module.exports = setCacheAdd;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1196:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Checks if `value` is in the array cache.
|
||
*
|
||
* @private
|
||
* @name has
|
||
* @memberOf SetCache
|
||
* @param {*} value The value to search for.
|
||
* @returns {number} Returns `true` if `value` is found, else `false`.
|
||
*/
|
||
function setCacheHas(value) {
|
||
return this.__data__.has(value);
|
||
}
|
||
|
||
module.exports = setCacheHas;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1197:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* A specialized version of `_.some` for arrays without support for iteratee
|
||
* shorthands.
|
||
*
|
||
* @private
|
||
* @param {Array} [array] The array to iterate over.
|
||
* @param {Function} predicate The function invoked per iteration.
|
||
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
||
* else `false`.
|
||
*/
|
||
function arraySome(array, predicate) {
|
||
var index = -1,
|
||
length = array == null ? 0 : array.length;
|
||
|
||
while (++index < length) {
|
||
if (predicate(array[index], index, array)) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
|
||
module.exports = arraySome;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1198:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var Symbol = __webpack_require__(183),
|
||
Uint8Array = __webpack_require__(1199),
|
||
eq = __webpack_require__(922),
|
||
equalArrays = __webpack_require__(1086),
|
||
mapToArray = __webpack_require__(1200),
|
||
setToArray = __webpack_require__(976);
|
||
|
||
/** Used to compose bitmasks for value comparisons. */
|
||
var COMPARE_PARTIAL_FLAG = 1,
|
||
COMPARE_UNORDERED_FLAG = 2;
|
||
|
||
/** `Object#toString` result references. */
|
||
var boolTag = '[object Boolean]',
|
||
dateTag = '[object Date]',
|
||
errorTag = '[object Error]',
|
||
mapTag = '[object Map]',
|
||
numberTag = '[object Number]',
|
||
regexpTag = '[object RegExp]',
|
||
setTag = '[object Set]',
|
||
stringTag = '[object String]',
|
||
symbolTag = '[object Symbol]';
|
||
|
||
var arrayBufferTag = '[object ArrayBuffer]',
|
||
dataViewTag = '[object DataView]';
|
||
|
||
/** Used to convert symbols to primitives and strings. */
|
||
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
||
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
||
|
||
/**
|
||
* A specialized version of `baseIsEqualDeep` for comparing objects of
|
||
* the same `toStringTag`.
|
||
*
|
||
* **Note:** This function only supports comparing values with tags of
|
||
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to compare.
|
||
* @param {Object} other The other object to compare.
|
||
* @param {string} tag The `toStringTag` of the objects to compare.
|
||
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
||
* @param {Function} customizer The function to customize comparisons.
|
||
* @param {Function} equalFunc The function to determine equivalents of values.
|
||
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
||
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
||
*/
|
||
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
||
switch (tag) {
|
||
case dataViewTag:
|
||
if ((object.byteLength != other.byteLength) ||
|
||
(object.byteOffset != other.byteOffset)) {
|
||
return false;
|
||
}
|
||
object = object.buffer;
|
||
other = other.buffer;
|
||
|
||
case arrayBufferTag:
|
||
if ((object.byteLength != other.byteLength) ||
|
||
!equalFunc(new Uint8Array(object), new Uint8Array(other))) {
|
||
return false;
|
||
}
|
||
return true;
|
||
|
||
case boolTag:
|
||
case dateTag:
|
||
case numberTag:
|
||
// Coerce booleans to `1` or `0` and dates to milliseconds.
|
||
// Invalid dates are coerced to `NaN`.
|
||
return eq(+object, +other);
|
||
|
||
case errorTag:
|
||
return object.name == other.name && object.message == other.message;
|
||
|
||
case regexpTag:
|
||
case stringTag:
|
||
// Coerce regexes to strings and treat strings, primitives and objects,
|
||
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
||
// for more details.
|
||
return object == (other + '');
|
||
|
||
case mapTag:
|
||
var convert = mapToArray;
|
||
|
||
case setTag:
|
||
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
||
convert || (convert = setToArray);
|
||
|
||
if (object.size != other.size && !isPartial) {
|
||
return false;
|
||
}
|
||
// Assume cyclic values are equal.
|
||
var stacked = stack.get(object);
|
||
if (stacked) {
|
||
return stacked == other;
|
||
}
|
||
bitmask |= COMPARE_UNORDERED_FLAG;
|
||
|
||
// Recursively compare objects (susceptible to call stack limits).
|
||
stack.set(object, other);
|
||
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
||
stack['delete'](object);
|
||
return result;
|
||
|
||
case symbolTag:
|
||
if (symbolValueOf) {
|
||
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
|
||
module.exports = equalByTag;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1199:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var root = __webpack_require__(172);
|
||
|
||
/** Built-in value references. */
|
||
var Uint8Array = root.Uint8Array;
|
||
|
||
module.exports = Uint8Array;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1200:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Converts `map` to its key-value pairs.
|
||
*
|
||
* @private
|
||
* @param {Object} map The map to convert.
|
||
* @returns {Array} Returns the key-value pairs.
|
||
*/
|
||
function mapToArray(map) {
|
||
var index = -1,
|
||
result = Array(map.size);
|
||
|
||
map.forEach(function(value, key) {
|
||
result[++index] = [key, value];
|
||
});
|
||
return result;
|
||
}
|
||
|
||
module.exports = mapToArray;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1201:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var getAllKeys = __webpack_require__(1202);
|
||
|
||
/** Used to compose bitmasks for value comparisons. */
|
||
var COMPARE_PARTIAL_FLAG = 1;
|
||
|
||
/** Used for built-in method references. */
|
||
var objectProto = Object.prototype;
|
||
|
||
/** Used to check objects for own properties. */
|
||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||
|
||
/**
|
||
* A specialized version of `baseIsEqualDeep` for objects with support for
|
||
* partial deep comparisons.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to compare.
|
||
* @param {Object} other The other object to compare.
|
||
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
||
* @param {Function} customizer The function to customize comparisons.
|
||
* @param {Function} equalFunc The function to determine equivalents of values.
|
||
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
||
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
||
*/
|
||
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
||
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
||
objProps = getAllKeys(object),
|
||
objLength = objProps.length,
|
||
othProps = getAllKeys(other),
|
||
othLength = othProps.length;
|
||
|
||
if (objLength != othLength && !isPartial) {
|
||
return false;
|
||
}
|
||
var index = objLength;
|
||
while (index--) {
|
||
var key = objProps[index];
|
||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||
return false;
|
||
}
|
||
}
|
||
// Assume cyclic values are equal.
|
||
var stacked = stack.get(object);
|
||
if (stacked && stack.get(other)) {
|
||
return stacked == other;
|
||
}
|
||
var result = true;
|
||
stack.set(object, other);
|
||
stack.set(other, object);
|
||
|
||
var skipCtor = isPartial;
|
||
while (++index < objLength) {
|
||
key = objProps[index];
|
||
var objValue = object[key],
|
||
othValue = other[key];
|
||
|
||
if (customizer) {
|
||
var compared = isPartial
|
||
? customizer(othValue, objValue, key, other, object, stack)
|
||
: customizer(objValue, othValue, key, object, other, stack);
|
||
}
|
||
// Recursively compare objects (susceptible to call stack limits).
|
||
if (!(compared === undefined
|
||
? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
|
||
: compared
|
||
)) {
|
||
result = false;
|
||
break;
|
||
}
|
||
skipCtor || (skipCtor = key == 'constructor');
|
||
}
|
||
if (result && !skipCtor) {
|
||
var objCtor = object.constructor,
|
||
othCtor = other.constructor;
|
||
|
||
// Non `Object` object instances with different constructors are not equal.
|
||
if (objCtor != othCtor &&
|
||
('constructor' in object && 'constructor' in other) &&
|
||
!(typeof objCtor == 'function' && objCtor instanceof objCtor &&
|
||
typeof othCtor == 'function' && othCtor instanceof othCtor)) {
|
||
result = false;
|
||
}
|
||
}
|
||
stack['delete'](object);
|
||
stack['delete'](other);
|
||
return result;
|
||
}
|
||
|
||
module.exports = equalObjects;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1202:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseGetAllKeys = __webpack_require__(1203),
|
||
getSymbols = __webpack_require__(1205),
|
||
keys = __webpack_require__(1089);
|
||
|
||
/**
|
||
* Creates an array of own enumerable property names and symbols of `object`.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to query.
|
||
* @returns {Array} Returns the array of property names and symbols.
|
||
*/
|
||
function getAllKeys(object) {
|
||
return baseGetAllKeys(object, keys, getSymbols);
|
||
}
|
||
|
||
module.exports = getAllKeys;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1203:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var arrayPush = __webpack_require__(1204),
|
||
isArray = __webpack_require__(916);
|
||
|
||
/**
|
||
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
||
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
||
* symbols of `object`.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to query.
|
||
* @param {Function} keysFunc The function to get the keys of `object`.
|
||
* @param {Function} symbolsFunc The function to get the symbols of `object`.
|
||
* @returns {Array} Returns the array of property names and symbols.
|
||
*/
|
||
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
||
var result = keysFunc(object);
|
||
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
||
}
|
||
|
||
module.exports = baseGetAllKeys;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1204:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Appends the elements of `values` to `array`.
|
||
*
|
||
* @private
|
||
* @param {Array} array The array to modify.
|
||
* @param {Array} values The values to append.
|
||
* @returns {Array} Returns `array`.
|
||
*/
|
||
function arrayPush(array, values) {
|
||
var index = -1,
|
||
length = values.length,
|
||
offset = array.length;
|
||
|
||
while (++index < length) {
|
||
array[offset + index] = values[index];
|
||
}
|
||
return array;
|
||
}
|
||
|
||
module.exports = arrayPush;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1205:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var arrayFilter = __webpack_require__(1206),
|
||
stubArray = __webpack_require__(1207);
|
||
|
||
/** Used for built-in method references. */
|
||
var objectProto = Object.prototype;
|
||
|
||
/** Built-in value references. */
|
||
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
||
|
||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
||
|
||
/**
|
||
* Creates an array of the own enumerable symbols of `object`.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to query.
|
||
* @returns {Array} Returns the array of symbols.
|
||
*/
|
||
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
||
if (object == null) {
|
||
return [];
|
||
}
|
||
object = Object(object);
|
||
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
||
return propertyIsEnumerable.call(object, symbol);
|
||
});
|
||
};
|
||
|
||
module.exports = getSymbols;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1206:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* A specialized version of `_.filter` for arrays without support for
|
||
* iteratee shorthands.
|
||
*
|
||
* @private
|
||
* @param {Array} [array] The array to iterate over.
|
||
* @param {Function} predicate The function invoked per iteration.
|
||
* @returns {Array} Returns the new filtered array.
|
||
*/
|
||
function arrayFilter(array, predicate) {
|
||
var index = -1,
|
||
length = array == null ? 0 : array.length,
|
||
resIndex = 0,
|
||
result = [];
|
||
|
||
while (++index < length) {
|
||
var value = array[index];
|
||
if (predicate(value, index, array)) {
|
||
result[resIndex++] = value;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
|
||
module.exports = arrayFilter;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1207:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* This method returns a new empty array.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 4.13.0
|
||
* @category Util
|
||
* @returns {Array} Returns the new empty array.
|
||
* @example
|
||
*
|
||
* var arrays = _.times(2, _.stubArray);
|
||
*
|
||
* console.log(arrays);
|
||
* // => [[], []]
|
||
*
|
||
* console.log(arrays[0] === arrays[1]);
|
||
* // => false
|
||
*/
|
||
function stubArray() {
|
||
return [];
|
||
}
|
||
|
||
module.exports = stubArray;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1208:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseTimes = __webpack_require__(1209),
|
||
isArguments = __webpack_require__(953),
|
||
isArray = __webpack_require__(916),
|
||
isBuffer = __webpack_require__(1090),
|
||
isIndex = __webpack_require__(928),
|
||
isTypedArray = __webpack_require__(1091);
|
||
|
||
/** Used for built-in method references. */
|
||
var objectProto = Object.prototype;
|
||
|
||
/** Used to check objects for own properties. */
|
||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||
|
||
/**
|
||
* Creates an array of the enumerable property names of the array-like `value`.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to query.
|
||
* @param {boolean} inherited Specify returning inherited property names.
|
||
* @returns {Array} Returns the array of property names.
|
||
*/
|
||
function arrayLikeKeys(value, inherited) {
|
||
var isArr = isArray(value),
|
||
isArg = !isArr && isArguments(value),
|
||
isBuff = !isArr && !isArg && isBuffer(value),
|
||
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
|
||
skipIndexes = isArr || isArg || isBuff || isType,
|
||
result = skipIndexes ? baseTimes(value.length, String) : [],
|
||
length = result.length;
|
||
|
||
for (var key in value) {
|
||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||
!(skipIndexes && (
|
||
// Safari 9 has enumerable `arguments.length` in strict mode.
|
||
key == 'length' ||
|
||
// Node.js 0.10 has enumerable non-index properties on buffers.
|
||
(isBuff && (key == 'offset' || key == 'parent')) ||
|
||
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
||
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
||
// Skip index properties.
|
||
isIndex(key, length)
|
||
))) {
|
||
result.push(key);
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
|
||
module.exports = arrayLikeKeys;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1209:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* The base implementation of `_.times` without support for iteratee shorthands
|
||
* or max array length checks.
|
||
*
|
||
* @private
|
||
* @param {number} n The number of times to invoke `iteratee`.
|
||
* @param {Function} iteratee The function invoked per iteration.
|
||
* @returns {Array} Returns the array of results.
|
||
*/
|
||
function baseTimes(n, iteratee) {
|
||
var index = -1,
|
||
result = Array(n);
|
||
|
||
while (++index < n) {
|
||
result[index] = iteratee(index);
|
||
}
|
||
return result;
|
||
}
|
||
|
||
module.exports = baseTimes;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1210:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* This method returns `false`.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 4.13.0
|
||
* @category Util
|
||
* @returns {boolean} Returns `false`.
|
||
* @example
|
||
*
|
||
* _.times(2, _.stubFalse);
|
||
* // => [false, false]
|
||
*/
|
||
function stubFalse() {
|
||
return false;
|
||
}
|
||
|
||
module.exports = stubFalse;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1211:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseGetTag = __webpack_require__(323),
|
||
isLength = __webpack_require__(934),
|
||
isObjectLike = __webpack_require__(324);
|
||
|
||
/** `Object#toString` result references. */
|
||
var argsTag = '[object Arguments]',
|
||
arrayTag = '[object Array]',
|
||
boolTag = '[object Boolean]',
|
||
dateTag = '[object Date]',
|
||
errorTag = '[object Error]',
|
||
funcTag = '[object Function]',
|
||
mapTag = '[object Map]',
|
||
numberTag = '[object Number]',
|
||
objectTag = '[object Object]',
|
||
regexpTag = '[object RegExp]',
|
||
setTag = '[object Set]',
|
||
stringTag = '[object String]',
|
||
weakMapTag = '[object WeakMap]';
|
||
|
||
var arrayBufferTag = '[object ArrayBuffer]',
|
||
dataViewTag = '[object DataView]',
|
||
float32Tag = '[object Float32Array]',
|
||
float64Tag = '[object Float64Array]',
|
||
int8Tag = '[object Int8Array]',
|
||
int16Tag = '[object Int16Array]',
|
||
int32Tag = '[object Int32Array]',
|
||
uint8Tag = '[object Uint8Array]',
|
||
uint8ClampedTag = '[object Uint8ClampedArray]',
|
||
uint16Tag = '[object Uint16Array]',
|
||
uint32Tag = '[object Uint32Array]';
|
||
|
||
/** Used to identify `toStringTag` values of typed arrays. */
|
||
var typedArrayTags = {};
|
||
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
||
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
||
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
||
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
||
typedArrayTags[uint32Tag] = true;
|
||
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
|
||
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
||
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
|
||
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
||
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
|
||
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
|
||
typedArrayTags[setTag] = typedArrayTags[stringTag] =
|
||
typedArrayTags[weakMapTag] = false;
|
||
|
||
/**
|
||
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to check.
|
||
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
||
*/
|
||
function baseIsTypedArray(value) {
|
||
return isObjectLike(value) &&
|
||
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
||
}
|
||
|
||
module.exports = baseIsTypedArray;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1212:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* The base implementation of `_.unary` without support for storing metadata.
|
||
*
|
||
* @private
|
||
* @param {Function} func The function to cap arguments for.
|
||
* @returns {Function} Returns the new capped function.
|
||
*/
|
||
function baseUnary(func) {
|
||
return function(value) {
|
||
return func(value);
|
||
};
|
||
}
|
||
|
||
module.exports = baseUnary;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1213:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(343);
|
||
|
||
/** Detect free variable `exports`. */
|
||
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
||
|
||
/** Detect free variable `module`. */
|
||
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
||
|
||
/** Detect the popular CommonJS extension `module.exports`. */
|
||
var moduleExports = freeModule && freeModule.exports === freeExports;
|
||
|
||
/** Detect free variable `process` from Node.js. */
|
||
var freeProcess = moduleExports && freeGlobal.process;
|
||
|
||
/** Used to access faster Node.js helpers. */
|
||
var nodeUtil = (function() {
|
||
try {
|
||
// Use `util.types` for Node.js 10+.
|
||
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
||
|
||
if (types) {
|
||
return types;
|
||
}
|
||
|
||
// Legacy `process.binding('util')` for Node.js < 10.
|
||
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
||
} catch (e) {}
|
||
}());
|
||
|
||
module.exports = nodeUtil;
|
||
|
||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(326)(module)))
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1214:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var isPrototype = __webpack_require__(1215),
|
||
nativeKeys = __webpack_require__(1216);
|
||
|
||
/** Used for built-in method references. */
|
||
var objectProto = Object.prototype;
|
||
|
||
/** Used to check objects for own properties. */
|
||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||
|
||
/**
|
||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to query.
|
||
* @returns {Array} Returns the array of property names.
|
||
*/
|
||
function baseKeys(object) {
|
||
if (!isPrototype(object)) {
|
||
return nativeKeys(object);
|
||
}
|
||
var result = [];
|
||
for (var key in Object(object)) {
|
||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||
result.push(key);
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
|
||
module.exports = baseKeys;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1215:
|
||
/***/ (function(module, exports) {
|
||
|
||
/** Used for built-in method references. */
|
||
var objectProto = Object.prototype;
|
||
|
||
/**
|
||
* Checks if `value` is likely a prototype object.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to check.
|
||
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
||
*/
|
||
function isPrototype(value) {
|
||
var Ctor = value && value.constructor,
|
||
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
||
|
||
return value === proto;
|
||
}
|
||
|
||
module.exports = isPrototype;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1216:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var overArg = __webpack_require__(1217);
|
||
|
||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||
var nativeKeys = overArg(Object.keys, Object);
|
||
|
||
module.exports = nativeKeys;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1217:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Creates a unary function that invokes `func` with its argument transformed.
|
||
*
|
||
* @private
|
||
* @param {Function} func The function to wrap.
|
||
* @param {Function} transform The argument transform.
|
||
* @returns {Function} Returns the new function.
|
||
*/
|
||
function overArg(func, transform) {
|
||
return function(arg) {
|
||
return func(transform(arg));
|
||
};
|
||
}
|
||
|
||
module.exports = overArg;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1218:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var isFunction = __webpack_require__(951),
|
||
isLength = __webpack_require__(934);
|
||
|
||
/**
|
||
* Checks if `value` is array-like. A value is considered array-like if it's
|
||
* not a function and has a `value.length` that's an integer greater than or
|
||
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 4.0.0
|
||
* @category Lang
|
||
* @param {*} value The value to check.
|
||
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
||
* @example
|
||
*
|
||
* _.isArrayLike([1, 2, 3]);
|
||
* // => true
|
||
*
|
||
* _.isArrayLike(document.body.children);
|
||
* // => true
|
||
*
|
||
* _.isArrayLike('abc');
|
||
* // => true
|
||
*
|
||
* _.isArrayLike(_.noop);
|
||
* // => false
|
||
*/
|
||
function isArrayLike(value) {
|
||
return value != null && isLength(value.length) && !isFunction(value);
|
||
}
|
||
|
||
module.exports = isArrayLike;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1219:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var DataView = __webpack_require__(1220),
|
||
Map = __webpack_require__(932),
|
||
Promise = __webpack_require__(1221),
|
||
Set = __webpack_require__(1092),
|
||
WeakMap = __webpack_require__(1222),
|
||
baseGetTag = __webpack_require__(323),
|
||
toSource = __webpack_require__(952);
|
||
|
||
/** `Object#toString` result references. */
|
||
var mapTag = '[object Map]',
|
||
objectTag = '[object Object]',
|
||
promiseTag = '[object Promise]',
|
||
setTag = '[object Set]',
|
||
weakMapTag = '[object WeakMap]';
|
||
|
||
var dataViewTag = '[object DataView]';
|
||
|
||
/** Used to detect maps, sets, and weakmaps. */
|
||
var dataViewCtorString = toSource(DataView),
|
||
mapCtorString = toSource(Map),
|
||
promiseCtorString = toSource(Promise),
|
||
setCtorString = toSource(Set),
|
||
weakMapCtorString = toSource(WeakMap);
|
||
|
||
/**
|
||
* Gets the `toStringTag` of `value`.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to query.
|
||
* @returns {string} Returns the `toStringTag`.
|
||
*/
|
||
var getTag = baseGetTag;
|
||
|
||
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||
(Map && getTag(new Map) != mapTag) ||
|
||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
||
(Set && getTag(new Set) != setTag) ||
|
||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
||
getTag = function(value) {
|
||
var result = baseGetTag(value),
|
||
Ctor = result == objectTag ? value.constructor : undefined,
|
||
ctorString = Ctor ? toSource(Ctor) : '';
|
||
|
||
if (ctorString) {
|
||
switch (ctorString) {
|
||
case dataViewCtorString: return dataViewTag;
|
||
case mapCtorString: return mapTag;
|
||
case promiseCtorString: return promiseTag;
|
||
case setCtorString: return setTag;
|
||
case weakMapCtorString: return weakMapTag;
|
||
}
|
||
}
|
||
return result;
|
||
};
|
||
}
|
||
|
||
module.exports = getTag;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1220:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var getNative = __webpack_require__(917),
|
||
root = __webpack_require__(172);
|
||
|
||
/* Built-in method references that are verified to be native. */
|
||
var DataView = getNative(root, 'DataView');
|
||
|
||
module.exports = DataView;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1221:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var getNative = __webpack_require__(917),
|
||
root = __webpack_require__(172);
|
||
|
||
/* Built-in method references that are verified to be native. */
|
||
var Promise = getNative(root, 'Promise');
|
||
|
||
module.exports = Promise;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1222:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var getNative = __webpack_require__(917),
|
||
root = __webpack_require__(172);
|
||
|
||
/* Built-in method references that are verified to be native. */
|
||
var WeakMap = getNative(root, 'WeakMap');
|
||
|
||
module.exports = WeakMap;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1223:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var isStrictComparable = __webpack_require__(1093),
|
||
keys = __webpack_require__(1089);
|
||
|
||
/**
|
||
* Gets the property names, values, and compare flags of `object`.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to query.
|
||
* @returns {Array} Returns the match data of `object`.
|
||
*/
|
||
function getMatchData(object) {
|
||
var result = keys(object),
|
||
length = result.length;
|
||
|
||
while (length--) {
|
||
var key = result[length],
|
||
value = object[key];
|
||
|
||
result[length] = [key, value, isStrictComparable(value)];
|
||
}
|
||
return result;
|
||
}
|
||
|
||
module.exports = getMatchData;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1224:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseIsEqual = __webpack_require__(1085),
|
||
get = __webpack_require__(957),
|
||
hasIn = __webpack_require__(1225),
|
||
isKey = __webpack_require__(935),
|
||
isStrictComparable = __webpack_require__(1093),
|
||
matchesStrictComparable = __webpack_require__(1094),
|
||
toKey = __webpack_require__(921);
|
||
|
||
/** Used to compose bitmasks for value comparisons. */
|
||
var COMPARE_PARTIAL_FLAG = 1,
|
||
COMPARE_UNORDERED_FLAG = 2;
|
||
|
||
/**
|
||
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
|
||
*
|
||
* @private
|
||
* @param {string} path The path of the property to get.
|
||
* @param {*} srcValue The value to match.
|
||
* @returns {Function} Returns the new spec function.
|
||
*/
|
||
function baseMatchesProperty(path, srcValue) {
|
||
if (isKey(path) && isStrictComparable(srcValue)) {
|
||
return matchesStrictComparable(toKey(path), srcValue);
|
||
}
|
||
return function(object) {
|
||
var objValue = get(object, path);
|
||
return (objValue === undefined && objValue === srcValue)
|
||
? hasIn(object, path)
|
||
: baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
||
};
|
||
}
|
||
|
||
module.exports = baseMatchesProperty;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1225:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseHasIn = __webpack_require__(1226),
|
||
hasPath = __webpack_require__(958);
|
||
|
||
/**
|
||
* Checks if `path` is a direct or inherited property of `object`.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 4.0.0
|
||
* @category Object
|
||
* @param {Object} object The object to query.
|
||
* @param {Array|string} path The path to check.
|
||
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
||
* @example
|
||
*
|
||
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
|
||
*
|
||
* _.hasIn(object, 'a');
|
||
* // => true
|
||
*
|
||
* _.hasIn(object, 'a.b');
|
||
* // => true
|
||
*
|
||
* _.hasIn(object, ['a', 'b']);
|
||
* // => true
|
||
*
|
||
* _.hasIn(object, 'b');
|
||
* // => false
|
||
*/
|
||
function hasIn(object, path) {
|
||
return object != null && hasPath(object, path, baseHasIn);
|
||
}
|
||
|
||
module.exports = hasIn;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1226:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* The base implementation of `_.hasIn` without support for deep paths.
|
||
*
|
||
* @private
|
||
* @param {Object} [object] The object to query.
|
||
* @param {Array|string} key The key to check.
|
||
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
||
*/
|
||
function baseHasIn(object, key) {
|
||
return object != null && key in Object(object);
|
||
}
|
||
|
||
module.exports = baseHasIn;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1227:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* This method returns the first argument it receives.
|
||
*
|
||
* @static
|
||
* @since 0.1.0
|
||
* @memberOf _
|
||
* @category Util
|
||
* @param {*} value Any value.
|
||
* @returns {*} Returns `value`.
|
||
* @example
|
||
*
|
||
* var object = { 'a': 1 };
|
||
*
|
||
* console.log(_.identity(object) === object);
|
||
* // => true
|
||
*/
|
||
function identity(value) {
|
||
return value;
|
||
}
|
||
|
||
module.exports = identity;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1228:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseProperty = __webpack_require__(1168),
|
||
basePropertyDeep = __webpack_require__(1229),
|
||
isKey = __webpack_require__(935),
|
||
toKey = __webpack_require__(921);
|
||
|
||
/**
|
||
* Creates a function that returns the value at `path` of a given object.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 2.4.0
|
||
* @category Util
|
||
* @param {Array|string} path The path of the property to get.
|
||
* @returns {Function} Returns the new accessor function.
|
||
* @example
|
||
*
|
||
* var objects = [
|
||
* { 'a': { 'b': 2 } },
|
||
* { 'a': { 'b': 1 } }
|
||
* ];
|
||
*
|
||
* _.map(objects, _.property('a.b'));
|
||
* // => [2, 1]
|
||
*
|
||
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
|
||
* // => [1, 2]
|
||
*/
|
||
function property(path) {
|
||
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
||
}
|
||
|
||
module.exports = property;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1229:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseGet = __webpack_require__(954);
|
||
|
||
/**
|
||
* A specialized version of `baseProperty` which supports deep paths.
|
||
*
|
||
* @private
|
||
* @param {Array|string} path The path of the property to get.
|
||
* @returns {Function} Returns the new accessor function.
|
||
*/
|
||
function basePropertyDeep(path) {
|
||
return function(object) {
|
||
return baseGet(object, path);
|
||
};
|
||
}
|
||
|
||
module.exports = basePropertyDeep;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1230:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var SetCache = __webpack_require__(1087),
|
||
arrayIncludes = __webpack_require__(1231),
|
||
arrayIncludesWith = __webpack_require__(1235),
|
||
cacheHas = __webpack_require__(1088),
|
||
createSet = __webpack_require__(1236),
|
||
setToArray = __webpack_require__(976);
|
||
|
||
/** Used as the size to enable large array optimizations. */
|
||
var LARGE_ARRAY_SIZE = 200;
|
||
|
||
/**
|
||
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
|
||
*
|
||
* @private
|
||
* @param {Array} array The array to inspect.
|
||
* @param {Function} [iteratee] The iteratee invoked per element.
|
||
* @param {Function} [comparator] The comparator invoked per element.
|
||
* @returns {Array} Returns the new duplicate free array.
|
||
*/
|
||
function baseUniq(array, iteratee, comparator) {
|
||
var index = -1,
|
||
includes = arrayIncludes,
|
||
length = array.length,
|
||
isCommon = true,
|
||
result = [],
|
||
seen = result;
|
||
|
||
if (comparator) {
|
||
isCommon = false;
|
||
includes = arrayIncludesWith;
|
||
}
|
||
else if (length >= LARGE_ARRAY_SIZE) {
|
||
var set = iteratee ? null : createSet(array);
|
||
if (set) {
|
||
return setToArray(set);
|
||
}
|
||
isCommon = false;
|
||
includes = cacheHas;
|
||
seen = new SetCache;
|
||
}
|
||
else {
|
||
seen = iteratee ? [] : result;
|
||
}
|
||
outer:
|
||
while (++index < length) {
|
||
var value = array[index],
|
||
computed = iteratee ? iteratee(value) : value;
|
||
|
||
value = (comparator || value !== 0) ? value : 0;
|
||
if (isCommon && computed === computed) {
|
||
var seenIndex = seen.length;
|
||
while (seenIndex--) {
|
||
if (seen[seenIndex] === computed) {
|
||
continue outer;
|
||
}
|
||
}
|
||
if (iteratee) {
|
||
seen.push(computed);
|
||
}
|
||
result.push(value);
|
||
}
|
||
else if (!includes(seen, computed, comparator)) {
|
||
if (seen !== result) {
|
||
seen.push(computed);
|
||
}
|
||
result.push(value);
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
|
||
module.exports = baseUniq;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1231:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseIndexOf = __webpack_require__(1232);
|
||
|
||
/**
|
||
* A specialized version of `_.includes` for arrays without support for
|
||
* specifying an index to search from.
|
||
*
|
||
* @private
|
||
* @param {Array} [array] The array to inspect.
|
||
* @param {*} target The value to search for.
|
||
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
||
*/
|
||
function arrayIncludes(array, value) {
|
||
var length = array == null ? 0 : array.length;
|
||
return !!length && baseIndexOf(array, value, 0) > -1;
|
||
}
|
||
|
||
module.exports = arrayIncludes;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1232:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseFindIndex = __webpack_require__(1095),
|
||
baseIsNaN = __webpack_require__(1233),
|
||
strictIndexOf = __webpack_require__(1234);
|
||
|
||
/**
|
||
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
||
*
|
||
* @private
|
||
* @param {Array} array The array to inspect.
|
||
* @param {*} value The value to search for.
|
||
* @param {number} fromIndex The index to search from.
|
||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||
*/
|
||
function baseIndexOf(array, value, fromIndex) {
|
||
return value === value
|
||
? strictIndexOf(array, value, fromIndex)
|
||
: baseFindIndex(array, baseIsNaN, fromIndex);
|
||
}
|
||
|
||
module.exports = baseIndexOf;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1233:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* The base implementation of `_.isNaN` without support for number objects.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to check.
|
||
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
||
*/
|
||
function baseIsNaN(value) {
|
||
return value !== value;
|
||
}
|
||
|
||
module.exports = baseIsNaN;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1234:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* A specialized version of `_.indexOf` which performs strict equality
|
||
* comparisons of values, i.e. `===`.
|
||
*
|
||
* @private
|
||
* @param {Array} array The array to inspect.
|
||
* @param {*} value The value to search for.
|
||
* @param {number} fromIndex The index to search from.
|
||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||
*/
|
||
function strictIndexOf(array, value, fromIndex) {
|
||
var index = fromIndex - 1,
|
||
length = array.length;
|
||
|
||
while (++index < length) {
|
||
if (array[index] === value) {
|
||
return index;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
|
||
module.exports = strictIndexOf;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1235:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* This function is like `arrayIncludes` except that it accepts a comparator.
|
||
*
|
||
* @private
|
||
* @param {Array} [array] The array to inspect.
|
||
* @param {*} target The value to search for.
|
||
* @param {Function} comparator The comparator invoked per element.
|
||
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
||
*/
|
||
function arrayIncludesWith(array, value, comparator) {
|
||
var index = -1,
|
||
length = array == null ? 0 : array.length;
|
||
|
||
while (++index < length) {
|
||
if (comparator(value, array[index])) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
|
||
module.exports = arrayIncludesWith;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1236:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var Set = __webpack_require__(1092),
|
||
noop = __webpack_require__(1237),
|
||
setToArray = __webpack_require__(976);
|
||
|
||
/** Used as references for various `Number` constants. */
|
||
var INFINITY = 1 / 0;
|
||
|
||
/**
|
||
* Creates a set object of `values`.
|
||
*
|
||
* @private
|
||
* @param {Array} values The values to add to the set.
|
||
* @returns {Object} Returns the new set.
|
||
*/
|
||
var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
|
||
return new Set(values);
|
||
};
|
||
|
||
module.exports = createSet;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1237:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* This method returns `undefined`.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 2.3.0
|
||
* @category Util
|
||
* @example
|
||
*
|
||
* _.times(2, _.noop);
|
||
* // => [undefined, undefined]
|
||
*/
|
||
function noop() {
|
||
// No operation performed.
|
||
}
|
||
|
||
module.exports = noop;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1238:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseFindIndex = __webpack_require__(1095),
|
||
baseIteratee = __webpack_require__(1083),
|
||
toInteger = __webpack_require__(1166);
|
||
|
||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||
var nativeMax = Math.max;
|
||
|
||
/**
|
||
* This method is like `_.find` except that it returns the index of the first
|
||
* element `predicate` returns truthy for instead of the element itself.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 1.1.0
|
||
* @category Array
|
||
* @param {Array} array The array to inspect.
|
||
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
||
* @param {number} [fromIndex=0] The index to search from.
|
||
* @returns {number} Returns the index of the found element, else `-1`.
|
||
* @example
|
||
*
|
||
* var users = [
|
||
* { 'user': 'barney', 'active': false },
|
||
* { 'user': 'fred', 'active': false },
|
||
* { 'user': 'pebbles', 'active': true }
|
||
* ];
|
||
*
|
||
* _.findIndex(users, function(o) { return o.user == 'barney'; });
|
||
* // => 0
|
||
*
|
||
* // The `_.matches` iteratee shorthand.
|
||
* _.findIndex(users, { 'user': 'fred', 'active': false });
|
||
* // => 1
|
||
*
|
||
* // The `_.matchesProperty` iteratee shorthand.
|
||
* _.findIndex(users, ['active', false]);
|
||
* // => 0
|
||
*
|
||
* // The `_.property` iteratee shorthand.
|
||
* _.findIndex(users, 'active');
|
||
* // => 2
|
||
*/
|
||
function findIndex(array, predicate, fromIndex) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return -1;
|
||
}
|
||
var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
||
if (index < 0) {
|
||
index = nativeMax(length + index, 0);
|
||
}
|
||
return baseFindIndex(array, baseIteratee(predicate, 3), index);
|
||
}
|
||
|
||
module.exports = findIndex;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1239:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var React = _interopRequireWildcard(__webpack_require__(0));
|
||
|
||
var _rcAnimate = _interopRequireDefault(__webpack_require__(332));
|
||
|
||
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
||
|
||
var _utils = __webpack_require__(1096);
|
||
|
||
var _icon = _interopRequireDefault(__webpack_require__(27));
|
||
|
||
var _tooltip = _interopRequireDefault(__webpack_require__(173));
|
||
|
||
var _progress = _interopRequireDefault(__webpack_require__(1153));
|
||
|
||
var _configProvider = __webpack_require__(14);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||
|
||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var UploadList =
|
||
/*#__PURE__*/
|
||
function (_React$Component) {
|
||
_inherits(UploadList, _React$Component);
|
||
|
||
function UploadList() {
|
||
var _this;
|
||
|
||
_classCallCheck(this, UploadList);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(UploadList).apply(this, arguments));
|
||
|
||
_this.handlePreview = function (file, e) {
|
||
var onPreview = _this.props.onPreview;
|
||
|
||
if (!onPreview) {
|
||
return;
|
||
}
|
||
|
||
e.preventDefault();
|
||
return onPreview(file);
|
||
};
|
||
|
||
_this.handleDownload = function (file) {
|
||
var onDownload = _this.props.onDownload;
|
||
|
||
if (typeof onDownload === 'function') {
|
||
onDownload(file);
|
||
} else if (file.url) {
|
||
window.open(file.url);
|
||
}
|
||
};
|
||
|
||
_this.handleClose = function (file) {
|
||
var onRemove = _this.props.onRemove;
|
||
|
||
if (onRemove) {
|
||
onRemove(file);
|
||
}
|
||
};
|
||
|
||
_this.renderUploadList = function (_ref) {
|
||
var _classNames4;
|
||
|
||
var getPrefixCls = _ref.getPrefixCls;
|
||
var _this$props = _this.props,
|
||
customizePrefixCls = _this$props.prefixCls,
|
||
_this$props$items = _this$props.items,
|
||
items = _this$props$items === void 0 ? [] : _this$props$items,
|
||
listType = _this$props.listType,
|
||
showPreviewIcon = _this$props.showPreviewIcon,
|
||
showRemoveIcon = _this$props.showRemoveIcon,
|
||
showDownloadIcon = _this$props.showDownloadIcon,
|
||
locale = _this$props.locale,
|
||
progressAttr = _this$props.progressAttr;
|
||
var prefixCls = getPrefixCls('upload', customizePrefixCls);
|
||
var list = items.map(function (file) {
|
||
var _classNames, _classNames2;
|
||
|
||
var progress;
|
||
var icon = React.createElement(_icon["default"], {
|
||
type: file.status === 'uploading' ? 'loading' : 'paper-clip'
|
||
});
|
||
|
||
if (listType === 'picture' || listType === 'picture-card') {
|
||
if (listType === 'picture-card' && file.status === 'uploading') {
|
||
icon = React.createElement("div", {
|
||
className: "".concat(prefixCls, "-list-item-uploading-text")
|
||
}, locale.uploading);
|
||
} else if (!file.thumbUrl && !file.url) {
|
||
icon = React.createElement(_icon["default"], {
|
||
className: "".concat(prefixCls, "-list-item-thumbnail"),
|
||
type: "picture",
|
||
theme: "twoTone"
|
||
});
|
||
} else {
|
||
var thumbnail = (0, _utils.isImageUrl)(file) ? React.createElement("img", {
|
||
src: file.thumbUrl || file.url,
|
||
alt: file.name,
|
||
className: "".concat(prefixCls, "-list-item-image")
|
||
}) : React.createElement(_icon["default"], {
|
||
type: "file",
|
||
className: "".concat(prefixCls, "-list-item-icon"),
|
||
theme: "twoTone"
|
||
});
|
||
icon = React.createElement("a", {
|
||
className: "".concat(prefixCls, "-list-item-thumbnail"),
|
||
onClick: function onClick(e) {
|
||
return _this.handlePreview(file, e);
|
||
},
|
||
href: file.url || file.thumbUrl,
|
||
target: "_blank",
|
||
rel: "noopener noreferrer"
|
||
}, thumbnail);
|
||
}
|
||
}
|
||
|
||
if (file.status === 'uploading') {
|
||
// show loading icon if upload progress listener is disabled
|
||
var loadingProgress = 'percent' in file ? React.createElement(_progress["default"], _extends({
|
||
type: "line"
|
||
}, progressAttr, {
|
||
percent: file.percent
|
||
})) : null;
|
||
progress = React.createElement("div", {
|
||
className: "".concat(prefixCls, "-list-item-progress"),
|
||
key: "progress"
|
||
}, loadingProgress);
|
||
}
|
||
|
||
var infoUploadingClass = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-list-item"), true), _defineProperty(_classNames, "".concat(prefixCls, "-list-item-").concat(file.status), true), _defineProperty(_classNames, "".concat(prefixCls, "-list-item-list-type-").concat(listType), true), _classNames));
|
||
var linkProps = typeof file.linkProps === 'string' ? JSON.parse(file.linkProps) : file.linkProps;
|
||
var removeIcon = showRemoveIcon ? React.createElement(_icon["default"], {
|
||
type: "delete",
|
||
title: locale.removeFile,
|
||
onClick: function onClick() {
|
||
return _this.handleClose(file);
|
||
}
|
||
}) : null;
|
||
var downloadIcon = showDownloadIcon && file.status === 'done' ? React.createElement(_icon["default"], {
|
||
type: "download",
|
||
title: locale.downloadFile,
|
||
onClick: function onClick() {
|
||
return _this.handleDownload(file);
|
||
}
|
||
}) : null;
|
||
var downloadOrDelete = listType !== 'picture-card' && React.createElement("span", {
|
||
key: "download-delete",
|
||
className: "".concat(prefixCls, "-list-item-card-actions ").concat(listType === 'picture' ? 'picture' : '')
|
||
}, downloadIcon && React.createElement("a", {
|
||
title: locale.downloadFile
|
||
}, downloadIcon), removeIcon && React.createElement("a", {
|
||
title: locale.removeFile
|
||
}, removeIcon));
|
||
var listItemNameClass = (0, _classnames["default"])((_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-list-item-name"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-list-item-name-icon-count-").concat([downloadIcon, removeIcon].filter(function (x) {
|
||
return x;
|
||
}).length), true), _classNames2));
|
||
var preview = file.url ? [React.createElement("a", _extends({
|
||
key: "view",
|
||
target: "_blank",
|
||
rel: "noopener noreferrer",
|
||
className: listItemNameClass,
|
||
title: file.name
|
||
}, linkProps, {
|
||
href: file.url,
|
||
onClick: function onClick(e) {
|
||
return _this.handlePreview(file, e);
|
||
}
|
||
}), file.name), downloadOrDelete] : [React.createElement("span", {
|
||
key: "view",
|
||
className: listItemNameClass,
|
||
onClick: function onClick(e) {
|
||
return _this.handlePreview(file, e);
|
||
},
|
||
title: file.name
|
||
}, file.name), downloadOrDelete];
|
||
var style = {
|
||
pointerEvents: 'none',
|
||
opacity: 0.5
|
||
};
|
||
var previewIcon = showPreviewIcon ? React.createElement("a", {
|
||
href: file.url || file.thumbUrl,
|
||
target: "_blank",
|
||
rel: "noopener noreferrer",
|
||
style: file.url || file.thumbUrl ? undefined : style,
|
||
onClick: function onClick(e) {
|
||
return _this.handlePreview(file, e);
|
||
},
|
||
title: locale.previewFile
|
||
}, React.createElement(_icon["default"], {
|
||
type: "eye-o"
|
||
})) : null;
|
||
var actions = listType === 'picture-card' && file.status !== 'uploading' && React.createElement("span", {
|
||
className: "".concat(prefixCls, "-list-item-actions")
|
||
}, previewIcon, file.status === 'done' && downloadIcon, removeIcon);
|
||
var message;
|
||
|
||
if (file.response && typeof file.response === 'string') {
|
||
message = file.response;
|
||
} else {
|
||
message = file.error && file.error.statusText || locale.uploadError;
|
||
}
|
||
|
||
var iconAndPreview = React.createElement("span", null, icon, preview);
|
||
var dom = React.createElement("div", {
|
||
className: infoUploadingClass
|
||
}, React.createElement("div", {
|
||
className: "".concat(prefixCls, "-list-item-info")
|
||
}, iconAndPreview), actions, React.createElement(_rcAnimate["default"], {
|
||
transitionName: "fade",
|
||
component: ""
|
||
}, progress));
|
||
var listContainerNameClass = (0, _classnames["default"])(_defineProperty({}, "".concat(prefixCls, "-list-picture-card-container"), listType === 'picture-card'));
|
||
return React.createElement("div", {
|
||
key: file.uid,
|
||
className: listContainerNameClass
|
||
}, file.status === 'error' ? React.createElement(_tooltip["default"], {
|
||
title: message
|
||
}, dom) : React.createElement("span", null, dom));
|
||
});
|
||
var listClassNames = (0, _classnames["default"])((_classNames4 = {}, _defineProperty(_classNames4, "".concat(prefixCls, "-list"), true), _defineProperty(_classNames4, "".concat(prefixCls, "-list-").concat(listType), true), _classNames4));
|
||
var animationDirection = listType === 'picture-card' ? 'animate-inline' : 'animate';
|
||
return React.createElement(_rcAnimate["default"], {
|
||
transitionName: "".concat(prefixCls, "-").concat(animationDirection),
|
||
component: "div",
|
||
className: listClassNames
|
||
}, list);
|
||
};
|
||
|
||
return _this;
|
||
}
|
||
|
||
_createClass(UploadList, [{
|
||
key: "componentDidUpdate",
|
||
value: function componentDidUpdate() {
|
||
var _this2 = this;
|
||
|
||
var _this$props2 = this.props,
|
||
listType = _this$props2.listType,
|
||
items = _this$props2.items,
|
||
previewFile = _this$props2.previewFile;
|
||
|
||
if (listType !== 'picture' && listType !== 'picture-card') {
|
||
return;
|
||
}
|
||
|
||
(items || []).forEach(function (file) {
|
||
if (typeof document === 'undefined' || typeof window === 'undefined' || !window.FileReader || !window.File || !(file.originFileObj instanceof File || file.originFileObj instanceof Blob) || file.thumbUrl !== undefined) {
|
||
return;
|
||
}
|
||
|
||
file.thumbUrl = '';
|
||
|
||
if (previewFile) {
|
||
previewFile(file.originFileObj).then(function (previewDataUrl) {
|
||
// Need append '' to avoid dead loop
|
||
file.thumbUrl = previewDataUrl || '';
|
||
|
||
_this2.forceUpdate();
|
||
});
|
||
}
|
||
});
|
||
}
|
||
}, {
|
||
key: "render",
|
||
value: function render() {
|
||
return React.createElement(_configProvider.ConfigConsumer, null, this.renderUploadList);
|
||
}
|
||
}]);
|
||
|
||
return UploadList;
|
||
}(React.Component);
|
||
|
||
exports["default"] = UploadList;
|
||
UploadList.defaultProps = {
|
||
listType: 'text',
|
||
progressAttr: {
|
||
strokeWidth: 2,
|
||
showInfo: false
|
||
},
|
||
showRemoveIcon: true,
|
||
showDownloadIcon: true,
|
||
showPreviewIcon: true,
|
||
previewFile: _utils.previewImage
|
||
};
|
||
//# sourceMappingURL=UploadList.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1240:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var React = _interopRequireWildcard(__webpack_require__(0));
|
||
|
||
var _Upload = _interopRequireDefault(__webpack_require__(1081));
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||
|
||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
// stick class comoponent to avoid React ref warning inside Form
|
||
// https://github.com/ant-design/ant-design/issues/18707
|
||
// eslint-disable-next-line react/prefer-stateless-function
|
||
var Dragger =
|
||
/*#__PURE__*/
|
||
function (_React$Component) {
|
||
_inherits(Dragger, _React$Component);
|
||
|
||
function Dragger() {
|
||
_classCallCheck(this, Dragger);
|
||
|
||
return _possibleConstructorReturn(this, _getPrototypeOf(Dragger).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(Dragger, [{
|
||
key: "render",
|
||
value: function render() {
|
||
var props = this.props;
|
||
return React.createElement(_Upload["default"], _extends({}, props, {
|
||
type: "drag",
|
||
style: _extends(_extends({}, props.style), {
|
||
height: props.height
|
||
})
|
||
}));
|
||
}
|
||
}]);
|
||
|
||
return Dragger;
|
||
}(React.Component);
|
||
|
||
exports["default"] = Dragger;
|
||
//# sourceMappingURL=Dragger.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1347:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
/* WEBPACK VAR INJECTION */(function(Buffer) {/*!
|
||
* Quill Editor v1.3.7
|
||
* https://quilljs.com/
|
||
* Copyright (c) 2014, Jason Chen
|
||
* Copyright (c) 2013, salesforce.com
|
||
*/
|
||
(function webpackUniversalModuleDefinition(root, factory) {
|
||
if(true)
|
||
module.exports = factory();
|
||
else if(typeof define === 'function' && define.amd)
|
||
define([], factory);
|
||
else if(typeof exports === 'object')
|
||
exports["Quill"] = factory();
|
||
else
|
||
root["Quill"] = factory();
|
||
})(typeof self !== 'undefined' ? self : this, function() {
|
||
return /******/ (function(modules) { // webpackBootstrap
|
||
/******/ // The module cache
|
||
/******/ var installedModules = {};
|
||
/******/
|
||
/******/ // The require function
|
||
/******/ function __webpack_require__(moduleId) {
|
||
/******/
|
||
/******/ // Check if module is in cache
|
||
/******/ if(installedModules[moduleId]) {
|
||
/******/ return installedModules[moduleId].exports;
|
||
/******/ }
|
||
/******/ // Create a new module (and put it into the cache)
|
||
/******/ var module = installedModules[moduleId] = {
|
||
/******/ i: moduleId,
|
||
/******/ l: false,
|
||
/******/ exports: {}
|
||
/******/ };
|
||
/******/
|
||
/******/ // Execute the module function
|
||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||
/******/
|
||
/******/ // Flag the module as loaded
|
||
/******/ module.l = true;
|
||
/******/
|
||
/******/ // Return the exports of the module
|
||
/******/ return module.exports;
|
||
/******/ }
|
||
/******/
|
||
/******/
|
||
/******/ // expose the modules object (__webpack_modules__)
|
||
/******/ __webpack_require__.m = modules;
|
||
/******/
|
||
/******/ // expose the module cache
|
||
/******/ __webpack_require__.c = installedModules;
|
||
/******/
|
||
/******/ // define getter function for harmony exports
|
||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||
/******/ Object.defineProperty(exports, name, {
|
||
/******/ configurable: false,
|
||
/******/ enumerable: true,
|
||
/******/ get: getter
|
||
/******/ });
|
||
/******/ }
|
||
/******/ };
|
||
/******/
|
||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||
/******/ __webpack_require__.n = function(module) {
|
||
/******/ var getter = module && module.__esModule ?
|
||
/******/ function getDefault() { return module['default']; } :
|
||
/******/ function getModuleExports() { return module; };
|
||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||
/******/ return getter;
|
||
/******/ };
|
||
/******/
|
||
/******/ // Object.prototype.hasOwnProperty.call
|
||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||
/******/
|
||
/******/ // __webpack_public_path__
|
||
/******/ __webpack_require__.p = "";
|
||
/******/
|
||
/******/ // Load entry module and return exports
|
||
/******/ return __webpack_require__(__webpack_require__.s = 109);
|
||
/******/ })
|
||
/************************************************************************/
|
||
/******/ ([
|
||
/* 0 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var container_1 = __webpack_require__(17);
|
||
var format_1 = __webpack_require__(18);
|
||
var leaf_1 = __webpack_require__(19);
|
||
var scroll_1 = __webpack_require__(45);
|
||
var inline_1 = __webpack_require__(46);
|
||
var block_1 = __webpack_require__(47);
|
||
var embed_1 = __webpack_require__(48);
|
||
var text_1 = __webpack_require__(49);
|
||
var attributor_1 = __webpack_require__(12);
|
||
var class_1 = __webpack_require__(32);
|
||
var style_1 = __webpack_require__(33);
|
||
var store_1 = __webpack_require__(31);
|
||
var Registry = __webpack_require__(1);
|
||
var Parchment = {
|
||
Scope: Registry.Scope,
|
||
create: Registry.create,
|
||
find: Registry.find,
|
||
query: Registry.query,
|
||
register: Registry.register,
|
||
Container: container_1.default,
|
||
Format: format_1.default,
|
||
Leaf: leaf_1.default,
|
||
Embed: embed_1.default,
|
||
Scroll: scroll_1.default,
|
||
Block: block_1.default,
|
||
Inline: inline_1.default,
|
||
Text: text_1.default,
|
||
Attributor: {
|
||
Attribute: attributor_1.default,
|
||
Class: class_1.default,
|
||
Style: style_1.default,
|
||
Store: store_1.default,
|
||
},
|
||
};
|
||
exports.default = Parchment;
|
||
|
||
|
||
/***/ }),
|
||
/* 1 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
var __extends = (this && this.__extends) || (function () {
|
||
var extendStatics = Object.setPrototypeOf ||
|
||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||
return function (d, b) {
|
||
extendStatics(d, b);
|
||
function __() { this.constructor = d; }
|
||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
};
|
||
})();
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var ParchmentError = /** @class */ (function (_super) {
|
||
__extends(ParchmentError, _super);
|
||
function ParchmentError(message) {
|
||
var _this = this;
|
||
message = '[Parchment] ' + message;
|
||
_this = _super.call(this, message) || this;
|
||
_this.message = message;
|
||
_this.name = _this.constructor.name;
|
||
return _this;
|
||
}
|
||
return ParchmentError;
|
||
}(Error));
|
||
exports.ParchmentError = ParchmentError;
|
||
var attributes = {};
|
||
var classes = {};
|
||
var tags = {};
|
||
var types = {};
|
||
exports.DATA_KEY = '__blot';
|
||
var Scope;
|
||
(function (Scope) {
|
||
Scope[Scope["TYPE"] = 3] = "TYPE";
|
||
Scope[Scope["LEVEL"] = 12] = "LEVEL";
|
||
Scope[Scope["ATTRIBUTE"] = 13] = "ATTRIBUTE";
|
||
Scope[Scope["BLOT"] = 14] = "BLOT";
|
||
Scope[Scope["INLINE"] = 7] = "INLINE";
|
||
Scope[Scope["BLOCK"] = 11] = "BLOCK";
|
||
Scope[Scope["BLOCK_BLOT"] = 10] = "BLOCK_BLOT";
|
||
Scope[Scope["INLINE_BLOT"] = 6] = "INLINE_BLOT";
|
||
Scope[Scope["BLOCK_ATTRIBUTE"] = 9] = "BLOCK_ATTRIBUTE";
|
||
Scope[Scope["INLINE_ATTRIBUTE"] = 5] = "INLINE_ATTRIBUTE";
|
||
Scope[Scope["ANY"] = 15] = "ANY";
|
||
})(Scope = exports.Scope || (exports.Scope = {}));
|
||
function create(input, value) {
|
||
var match = query(input);
|
||
if (match == null) {
|
||
throw new ParchmentError("Unable to create " + input + " blot");
|
||
}
|
||
var BlotClass = match;
|
||
var node =
|
||
// @ts-ignore
|
||
input instanceof Node || input['nodeType'] === Node.TEXT_NODE ? input : BlotClass.create(value);
|
||
return new BlotClass(node, value);
|
||
}
|
||
exports.create = create;
|
||
function find(node, bubble) {
|
||
if (bubble === void 0) { bubble = false; }
|
||
if (node == null)
|
||
return null;
|
||
// @ts-ignore
|
||
if (node[exports.DATA_KEY] != null)
|
||
return node[exports.DATA_KEY].blot;
|
||
if (bubble)
|
||
return find(node.parentNode, bubble);
|
||
return null;
|
||
}
|
||
exports.find = find;
|
||
function query(query, scope) {
|
||
if (scope === void 0) { scope = Scope.ANY; }
|
||
var match;
|
||
if (typeof query === 'string') {
|
||
match = types[query] || attributes[query];
|
||
// @ts-ignore
|
||
}
|
||
else if (query instanceof Text || query['nodeType'] === Node.TEXT_NODE) {
|
||
match = types['text'];
|
||
}
|
||
else if (typeof query === 'number') {
|
||
if (query & Scope.LEVEL & Scope.BLOCK) {
|
||
match = types['block'];
|
||
}
|
||
else if (query & Scope.LEVEL & Scope.INLINE) {
|
||
match = types['inline'];
|
||
}
|
||
}
|
||
else if (query instanceof HTMLElement) {
|
||
var names = (query.getAttribute('class') || '').split(/\s+/);
|
||
for (var i in names) {
|
||
match = classes[names[i]];
|
||
if (match)
|
||
break;
|
||
}
|
||
match = match || tags[query.tagName];
|
||
}
|
||
if (match == null)
|
||
return null;
|
||
// @ts-ignore
|
||
if (scope & Scope.LEVEL & match.scope && scope & Scope.TYPE & match.scope)
|
||
return match;
|
||
return null;
|
||
}
|
||
exports.query = query;
|
||
function register() {
|
||
var Definitions = [];
|
||
for (var _i = 0; _i < arguments.length; _i++) {
|
||
Definitions[_i] = arguments[_i];
|
||
}
|
||
if (Definitions.length > 1) {
|
||
return Definitions.map(function (d) {
|
||
return register(d);
|
||
});
|
||
}
|
||
var Definition = Definitions[0];
|
||
if (typeof Definition.blotName !== 'string' && typeof Definition.attrName !== 'string') {
|
||
throw new ParchmentError('Invalid definition');
|
||
}
|
||
else if (Definition.blotName === 'abstract') {
|
||
throw new ParchmentError('Cannot register abstract class');
|
||
}
|
||
types[Definition.blotName || Definition.attrName] = Definition;
|
||
if (typeof Definition.keyName === 'string') {
|
||
attributes[Definition.keyName] = Definition;
|
||
}
|
||
else {
|
||
if (Definition.className != null) {
|
||
classes[Definition.className] = Definition;
|
||
}
|
||
if (Definition.tagName != null) {
|
||
if (Array.isArray(Definition.tagName)) {
|
||
Definition.tagName = Definition.tagName.map(function (tagName) {
|
||
return tagName.toUpperCase();
|
||
});
|
||
}
|
||
else {
|
||
Definition.tagName = Definition.tagName.toUpperCase();
|
||
}
|
||
var tagNames = Array.isArray(Definition.tagName) ? Definition.tagName : [Definition.tagName];
|
||
tagNames.forEach(function (tag) {
|
||
if (tags[tag] == null || Definition.className == null) {
|
||
tags[tag] = Definition;
|
||
}
|
||
});
|
||
}
|
||
}
|
||
return Definition;
|
||
}
|
||
exports.register = register;
|
||
|
||
|
||
/***/ }),
|
||
/* 2 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var diff = __webpack_require__(51);
|
||
var equal = __webpack_require__(11);
|
||
var extend = __webpack_require__(3);
|
||
var op = __webpack_require__(20);
|
||
|
||
|
||
var NULL_CHARACTER = String.fromCharCode(0); // Placeholder char for embed in diff()
|
||
|
||
|
||
var Delta = function (ops) {
|
||
// Assume we are given a well formed ops
|
||
if (Array.isArray(ops)) {
|
||
this.ops = ops;
|
||
} else if (ops != null && Array.isArray(ops.ops)) {
|
||
this.ops = ops.ops;
|
||
} else {
|
||
this.ops = [];
|
||
}
|
||
};
|
||
|
||
|
||
Delta.prototype.insert = function (text, attributes) {
|
||
var newOp = {};
|
||
if (text.length === 0) return this;
|
||
newOp.insert = text;
|
||
if (attributes != null && typeof attributes === 'object' && Object.keys(attributes).length > 0) {
|
||
newOp.attributes = attributes;
|
||
}
|
||
return this.push(newOp);
|
||
};
|
||
|
||
Delta.prototype['delete'] = function (length) {
|
||
if (length <= 0) return this;
|
||
return this.push({ 'delete': length });
|
||
};
|
||
|
||
Delta.prototype.retain = function (length, attributes) {
|
||
if (length <= 0) return this;
|
||
var newOp = { retain: length };
|
||
if (attributes != null && typeof attributes === 'object' && Object.keys(attributes).length > 0) {
|
||
newOp.attributes = attributes;
|
||
}
|
||
return this.push(newOp);
|
||
};
|
||
|
||
Delta.prototype.push = function (newOp) {
|
||
var index = this.ops.length;
|
||
var lastOp = this.ops[index - 1];
|
||
newOp = extend(true, {}, newOp);
|
||
if (typeof lastOp === 'object') {
|
||
if (typeof newOp['delete'] === 'number' && typeof lastOp['delete'] === 'number') {
|
||
this.ops[index - 1] = { 'delete': lastOp['delete'] + newOp['delete'] };
|
||
return this;
|
||
}
|
||
// Since it does not matter if we insert before or after deleting at the same index,
|
||
// always prefer to insert first
|
||
if (typeof lastOp['delete'] === 'number' && newOp.insert != null) {
|
||
index -= 1;
|
||
lastOp = this.ops[index - 1];
|
||
if (typeof lastOp !== 'object') {
|
||
this.ops.unshift(newOp);
|
||
return this;
|
||
}
|
||
}
|
||
if (equal(newOp.attributes, lastOp.attributes)) {
|
||
if (typeof newOp.insert === 'string' && typeof lastOp.insert === 'string') {
|
||
this.ops[index - 1] = { insert: lastOp.insert + newOp.insert };
|
||
if (typeof newOp.attributes === 'object') this.ops[index - 1].attributes = newOp.attributes
|
||
return this;
|
||
} else if (typeof newOp.retain === 'number' && typeof lastOp.retain === 'number') {
|
||
this.ops[index - 1] = { retain: lastOp.retain + newOp.retain };
|
||
if (typeof newOp.attributes === 'object') this.ops[index - 1].attributes = newOp.attributes
|
||
return this;
|
||
}
|
||
}
|
||
}
|
||
if (index === this.ops.length) {
|
||
this.ops.push(newOp);
|
||
} else {
|
||
this.ops.splice(index, 0, newOp);
|
||
}
|
||
return this;
|
||
};
|
||
|
||
Delta.prototype.chop = function () {
|
||
var lastOp = this.ops[this.ops.length - 1];
|
||
if (lastOp && lastOp.retain && !lastOp.attributes) {
|
||
this.ops.pop();
|
||
}
|
||
return this;
|
||
};
|
||
|
||
Delta.prototype.filter = function (predicate) {
|
||
return this.ops.filter(predicate);
|
||
};
|
||
|
||
Delta.prototype.forEach = function (predicate) {
|
||
this.ops.forEach(predicate);
|
||
};
|
||
|
||
Delta.prototype.map = function (predicate) {
|
||
return this.ops.map(predicate);
|
||
};
|
||
|
||
Delta.prototype.partition = function (predicate) {
|
||
var passed = [], failed = [];
|
||
this.forEach(function(op) {
|
||
var target = predicate(op) ? passed : failed;
|
||
target.push(op);
|
||
});
|
||
return [passed, failed];
|
||
};
|
||
|
||
Delta.prototype.reduce = function (predicate, initial) {
|
||
return this.ops.reduce(predicate, initial);
|
||
};
|
||
|
||
Delta.prototype.changeLength = function () {
|
||
return this.reduce(function (length, elem) {
|
||
if (elem.insert) {
|
||
return length + op.length(elem);
|
||
} else if (elem.delete) {
|
||
return length - elem.delete;
|
||
}
|
||
return length;
|
||
}, 0);
|
||
};
|
||
|
||
Delta.prototype.length = function () {
|
||
return this.reduce(function (length, elem) {
|
||
return length + op.length(elem);
|
||
}, 0);
|
||
};
|
||
|
||
Delta.prototype.slice = function (start, end) {
|
||
start = start || 0;
|
||
if (typeof end !== 'number') end = Infinity;
|
||
var ops = [];
|
||
var iter = op.iterator(this.ops);
|
||
var index = 0;
|
||
while (index < end && iter.hasNext()) {
|
||
var nextOp;
|
||
if (index < start) {
|
||
nextOp = iter.next(start - index);
|
||
} else {
|
||
nextOp = iter.next(end - index);
|
||
ops.push(nextOp);
|
||
}
|
||
index += op.length(nextOp);
|
||
}
|
||
return new Delta(ops);
|
||
};
|
||
|
||
|
||
Delta.prototype.compose = function (other) {
|
||
var thisIter = op.iterator(this.ops);
|
||
var otherIter = op.iterator(other.ops);
|
||
var ops = [];
|
||
var firstOther = otherIter.peek();
|
||
if (firstOther != null && typeof firstOther.retain === 'number' && firstOther.attributes == null) {
|
||
var firstLeft = firstOther.retain;
|
||
while (thisIter.peekType() === 'insert' && thisIter.peekLength() <= firstLeft) {
|
||
firstLeft -= thisIter.peekLength();
|
||
ops.push(thisIter.next());
|
||
}
|
||
if (firstOther.retain - firstLeft > 0) {
|
||
otherIter.next(firstOther.retain - firstLeft);
|
||
}
|
||
}
|
||
var delta = new Delta(ops);
|
||
while (thisIter.hasNext() || otherIter.hasNext()) {
|
||
if (otherIter.peekType() === 'insert') {
|
||
delta.push(otherIter.next());
|
||
} else if (thisIter.peekType() === 'delete') {
|
||
delta.push(thisIter.next());
|
||
} else {
|
||
var length = Math.min(thisIter.peekLength(), otherIter.peekLength());
|
||
var thisOp = thisIter.next(length);
|
||
var otherOp = otherIter.next(length);
|
||
if (typeof otherOp.retain === 'number') {
|
||
var newOp = {};
|
||
if (typeof thisOp.retain === 'number') {
|
||
newOp.retain = length;
|
||
} else {
|
||
newOp.insert = thisOp.insert;
|
||
}
|
||
// Preserve null when composing with a retain, otherwise remove it for inserts
|
||
var attributes = op.attributes.compose(thisOp.attributes, otherOp.attributes, typeof thisOp.retain === 'number');
|
||
if (attributes) newOp.attributes = attributes;
|
||
delta.push(newOp);
|
||
|
||
// Optimization if rest of other is just retain
|
||
if (!otherIter.hasNext() && equal(delta.ops[delta.ops.length - 1], newOp)) {
|
||
var rest = new Delta(thisIter.rest());
|
||
return delta.concat(rest).chop();
|
||
}
|
||
|
||
// Other op should be delete, we could be an insert or retain
|
||
// Insert + delete cancels out
|
||
} else if (typeof otherOp['delete'] === 'number' && typeof thisOp.retain === 'number') {
|
||
delta.push(otherOp);
|
||
}
|
||
}
|
||
}
|
||
return delta.chop();
|
||
};
|
||
|
||
Delta.prototype.concat = function (other) {
|
||
var delta = new Delta(this.ops.slice());
|
||
if (other.ops.length > 0) {
|
||
delta.push(other.ops[0]);
|
||
delta.ops = delta.ops.concat(other.ops.slice(1));
|
||
}
|
||
return delta;
|
||
};
|
||
|
||
Delta.prototype.diff = function (other, index) {
|
||
if (this.ops === other.ops) {
|
||
return new Delta();
|
||
}
|
||
var strings = [this, other].map(function (delta) {
|
||
return delta.map(function (op) {
|
||
if (op.insert != null) {
|
||
return typeof op.insert === 'string' ? op.insert : NULL_CHARACTER;
|
||
}
|
||
var prep = (delta === other) ? 'on' : 'with';
|
||
throw new Error('diff() called ' + prep + ' non-document');
|
||
}).join('');
|
||
});
|
||
var delta = new Delta();
|
||
var diffResult = diff(strings[0], strings[1], index);
|
||
var thisIter = op.iterator(this.ops);
|
||
var otherIter = op.iterator(other.ops);
|
||
diffResult.forEach(function (component) {
|
||
var length = component[1].length;
|
||
while (length > 0) {
|
||
var opLength = 0;
|
||
switch (component[0]) {
|
||
case diff.INSERT:
|
||
opLength = Math.min(otherIter.peekLength(), length);
|
||
delta.push(otherIter.next(opLength));
|
||
break;
|
||
case diff.DELETE:
|
||
opLength = Math.min(length, thisIter.peekLength());
|
||
thisIter.next(opLength);
|
||
delta['delete'](opLength);
|
||
break;
|
||
case diff.EQUAL:
|
||
opLength = Math.min(thisIter.peekLength(), otherIter.peekLength(), length);
|
||
var thisOp = thisIter.next(opLength);
|
||
var otherOp = otherIter.next(opLength);
|
||
if (equal(thisOp.insert, otherOp.insert)) {
|
||
delta.retain(opLength, op.attributes.diff(thisOp.attributes, otherOp.attributes));
|
||
} else {
|
||
delta.push(otherOp)['delete'](opLength);
|
||
}
|
||
break;
|
||
}
|
||
length -= opLength;
|
||
}
|
||
});
|
||
return delta.chop();
|
||
};
|
||
|
||
Delta.prototype.eachLine = function (predicate, newline) {
|
||
newline = newline || '\n';
|
||
var iter = op.iterator(this.ops);
|
||
var line = new Delta();
|
||
var i = 0;
|
||
while (iter.hasNext()) {
|
||
if (iter.peekType() !== 'insert') return;
|
||
var thisOp = iter.peek();
|
||
var start = op.length(thisOp) - iter.peekLength();
|
||
var index = typeof thisOp.insert === 'string' ?
|
||
thisOp.insert.indexOf(newline, start) - start : -1;
|
||
if (index < 0) {
|
||
line.push(iter.next());
|
||
} else if (index > 0) {
|
||
line.push(iter.next(index));
|
||
} else {
|
||
if (predicate(line, iter.next(1).attributes || {}, i) === false) {
|
||
return;
|
||
}
|
||
i += 1;
|
||
line = new Delta();
|
||
}
|
||
}
|
||
if (line.length() > 0) {
|
||
predicate(line, {}, i);
|
||
}
|
||
};
|
||
|
||
Delta.prototype.transform = function (other, priority) {
|
||
priority = !!priority;
|
||
if (typeof other === 'number') {
|
||
return this.transformPosition(other, priority);
|
||
}
|
||
var thisIter = op.iterator(this.ops);
|
||
var otherIter = op.iterator(other.ops);
|
||
var delta = new Delta();
|
||
while (thisIter.hasNext() || otherIter.hasNext()) {
|
||
if (thisIter.peekType() === 'insert' && (priority || otherIter.peekType() !== 'insert')) {
|
||
delta.retain(op.length(thisIter.next()));
|
||
} else if (otherIter.peekType() === 'insert') {
|
||
delta.push(otherIter.next());
|
||
} else {
|
||
var length = Math.min(thisIter.peekLength(), otherIter.peekLength());
|
||
var thisOp = thisIter.next(length);
|
||
var otherOp = otherIter.next(length);
|
||
if (thisOp['delete']) {
|
||
// Our delete either makes their delete redundant or removes their retain
|
||
continue;
|
||
} else if (otherOp['delete']) {
|
||
delta.push(otherOp);
|
||
} else {
|
||
// We retain either their retain or insert
|
||
delta.retain(length, op.attributes.transform(thisOp.attributes, otherOp.attributes, priority));
|
||
}
|
||
}
|
||
}
|
||
return delta.chop();
|
||
};
|
||
|
||
Delta.prototype.transformPosition = function (index, priority) {
|
||
priority = !!priority;
|
||
var thisIter = op.iterator(this.ops);
|
||
var offset = 0;
|
||
while (thisIter.hasNext() && offset <= index) {
|
||
var length = thisIter.peekLength();
|
||
var nextType = thisIter.peekType();
|
||
thisIter.next();
|
||
if (nextType === 'delete') {
|
||
index -= Math.min(length, index - offset);
|
||
continue;
|
||
} else if (nextType === 'insert' && (offset < index || !priority)) {
|
||
index += length;
|
||
}
|
||
offset += length;
|
||
}
|
||
return index;
|
||
};
|
||
|
||
|
||
module.exports = Delta;
|
||
|
||
|
||
/***/ }),
|
||
/* 3 */
|
||
/***/ (function(module, exports) {
|
||
|
||
'use strict';
|
||
|
||
var hasOwn = Object.prototype.hasOwnProperty;
|
||
var toStr = Object.prototype.toString;
|
||
var defineProperty = Object.defineProperty;
|
||
var gOPD = Object.getOwnPropertyDescriptor;
|
||
|
||
var isArray = function isArray(arr) {
|
||
if (typeof Array.isArray === 'function') {
|
||
return Array.isArray(arr);
|
||
}
|
||
|
||
return toStr.call(arr) === '[object Array]';
|
||
};
|
||
|
||
var isPlainObject = function isPlainObject(obj) {
|
||
if (!obj || toStr.call(obj) !== '[object Object]') {
|
||
return false;
|
||
}
|
||
|
||
var hasOwnConstructor = hasOwn.call(obj, 'constructor');
|
||
var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
|
||
// Not own constructor property must be Object
|
||
if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
|
||
return false;
|
||
}
|
||
|
||
// Own properties are enumerated firstly, so to speed up,
|
||
// if last one is own, then all properties are own.
|
||
var key;
|
||
for (key in obj) { /**/ }
|
||
|
||
return typeof key === 'undefined' || hasOwn.call(obj, key);
|
||
};
|
||
|
||
// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target
|
||
var setProperty = function setProperty(target, options) {
|
||
if (defineProperty && options.name === '__proto__') {
|
||
defineProperty(target, options.name, {
|
||
enumerable: true,
|
||
configurable: true,
|
||
value: options.newValue,
|
||
writable: true
|
||
});
|
||
} else {
|
||
target[options.name] = options.newValue;
|
||
}
|
||
};
|
||
|
||
// Return undefined instead of __proto__ if '__proto__' is not an own property
|
||
var getProperty = function getProperty(obj, name) {
|
||
if (name === '__proto__') {
|
||
if (!hasOwn.call(obj, name)) {
|
||
return void 0;
|
||
} else if (gOPD) {
|
||
// In early versions of node, obj['__proto__'] is buggy when obj has
|
||
// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.
|
||
return gOPD(obj, name).value;
|
||
}
|
||
}
|
||
|
||
return obj[name];
|
||
};
|
||
|
||
module.exports = function extend() {
|
||
var options, name, src, copy, copyIsArray, clone;
|
||
var target = arguments[0];
|
||
var i = 1;
|
||
var length = arguments.length;
|
||
var deep = false;
|
||
|
||
// Handle a deep copy situation
|
||
if (typeof target === 'boolean') {
|
||
deep = target;
|
||
target = arguments[1] || {};
|
||
// skip the boolean and the target
|
||
i = 2;
|
||
}
|
||
if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
|
||
target = {};
|
||
}
|
||
|
||
for (; i < length; ++i) {
|
||
options = arguments[i];
|
||
// Only deal with non-null/undefined values
|
||
if (options != null) {
|
||
// Extend the base object
|
||
for (name in options) {
|
||
src = getProperty(target, name);
|
||
copy = getProperty(options, name);
|
||
|
||
// Prevent never-ending loop
|
||
if (target !== copy) {
|
||
// Recurse if we're merging plain objects or arrays
|
||
if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
|
||
if (copyIsArray) {
|
||
copyIsArray = false;
|
||
clone = src && isArray(src) ? src : [];
|
||
} else {
|
||
clone = src && isPlainObject(src) ? src : {};
|
||
}
|
||
|
||
// Never move original objects, clone them
|
||
setProperty(target, { name: name, newValue: extend(deep, clone, copy) });
|
||
|
||
// Don't bring in undefined values
|
||
} else if (typeof copy !== 'undefined') {
|
||
setProperty(target, { name: name, newValue: copy });
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
// Return the modified object
|
||
return target;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
/* 4 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = exports.BlockEmbed = exports.bubbleFormats = undefined;
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _extend = __webpack_require__(3);
|
||
|
||
var _extend2 = _interopRequireDefault(_extend);
|
||
|
||
var _quillDelta = __webpack_require__(2);
|
||
|
||
var _quillDelta2 = _interopRequireDefault(_quillDelta);
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _break = __webpack_require__(16);
|
||
|
||
var _break2 = _interopRequireDefault(_break);
|
||
|
||
var _inline = __webpack_require__(6);
|
||
|
||
var _inline2 = _interopRequireDefault(_inline);
|
||
|
||
var _text = __webpack_require__(7);
|
||
|
||
var _text2 = _interopRequireDefault(_text);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var NEWLINE_LENGTH = 1;
|
||
|
||
var BlockEmbed = function (_Parchment$Embed) {
|
||
_inherits(BlockEmbed, _Parchment$Embed);
|
||
|
||
function BlockEmbed() {
|
||
_classCallCheck(this, BlockEmbed);
|
||
|
||
return _possibleConstructorReturn(this, (BlockEmbed.__proto__ || Object.getPrototypeOf(BlockEmbed)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(BlockEmbed, [{
|
||
key: 'attach',
|
||
value: function attach() {
|
||
_get(BlockEmbed.prototype.__proto__ || Object.getPrototypeOf(BlockEmbed.prototype), 'attach', this).call(this);
|
||
this.attributes = new _parchment2.default.Attributor.Store(this.domNode);
|
||
}
|
||
}, {
|
||
key: 'delta',
|
||
value: function delta() {
|
||
return new _quillDelta2.default().insert(this.value(), (0, _extend2.default)(this.formats(), this.attributes.values()));
|
||
}
|
||
}, {
|
||
key: 'format',
|
||
value: function format(name, value) {
|
||
var attribute = _parchment2.default.query(name, _parchment2.default.Scope.BLOCK_ATTRIBUTE);
|
||
if (attribute != null) {
|
||
this.attributes.attribute(attribute, value);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'formatAt',
|
||
value: function formatAt(index, length, name, value) {
|
||
this.format(name, value);
|
||
}
|
||
}, {
|
||
key: 'insertAt',
|
||
value: function insertAt(index, value, def) {
|
||
if (typeof value === 'string' && value.endsWith('\n')) {
|
||
var block = _parchment2.default.create(Block.blotName);
|
||
this.parent.insertBefore(block, index === 0 ? this : this.next);
|
||
block.insertAt(0, value.slice(0, -1));
|
||
} else {
|
||
_get(BlockEmbed.prototype.__proto__ || Object.getPrototypeOf(BlockEmbed.prototype), 'insertAt', this).call(this, index, value, def);
|
||
}
|
||
}
|
||
}]);
|
||
|
||
return BlockEmbed;
|
||
}(_parchment2.default.Embed);
|
||
|
||
BlockEmbed.scope = _parchment2.default.Scope.BLOCK_BLOT;
|
||
// It is important for cursor behavior BlockEmbeds use tags that are block level elements
|
||
|
||
|
||
var Block = function (_Parchment$Block) {
|
||
_inherits(Block, _Parchment$Block);
|
||
|
||
function Block(domNode) {
|
||
_classCallCheck(this, Block);
|
||
|
||
var _this2 = _possibleConstructorReturn(this, (Block.__proto__ || Object.getPrototypeOf(Block)).call(this, domNode));
|
||
|
||
_this2.cache = {};
|
||
return _this2;
|
||
}
|
||
|
||
_createClass(Block, [{
|
||
key: 'delta',
|
||
value: function delta() {
|
||
if (this.cache.delta == null) {
|
||
this.cache.delta = this.descendants(_parchment2.default.Leaf).reduce(function (delta, leaf) {
|
||
if (leaf.length() === 0) {
|
||
return delta;
|
||
} else {
|
||
return delta.insert(leaf.value(), bubbleFormats(leaf));
|
||
}
|
||
}, new _quillDelta2.default()).insert('\n', bubbleFormats(this));
|
||
}
|
||
return this.cache.delta;
|
||
}
|
||
}, {
|
||
key: 'deleteAt',
|
||
value: function deleteAt(index, length) {
|
||
_get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'deleteAt', this).call(this, index, length);
|
||
this.cache = {};
|
||
}
|
||
}, {
|
||
key: 'formatAt',
|
||
value: function formatAt(index, length, name, value) {
|
||
if (length <= 0) return;
|
||
if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK)) {
|
||
if (index + length === this.length()) {
|
||
this.format(name, value);
|
||
}
|
||
} else {
|
||
_get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'formatAt', this).call(this, index, Math.min(length, this.length() - index - 1), name, value);
|
||
}
|
||
this.cache = {};
|
||
}
|
||
}, {
|
||
key: 'insertAt',
|
||
value: function insertAt(index, value, def) {
|
||
if (def != null) return _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertAt', this).call(this, index, value, def);
|
||
if (value.length === 0) return;
|
||
var lines = value.split('\n');
|
||
var text = lines.shift();
|
||
if (text.length > 0) {
|
||
if (index < this.length() - 1 || this.children.tail == null) {
|
||
_get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertAt', this).call(this, Math.min(index, this.length() - 1), text);
|
||
} else {
|
||
this.children.tail.insertAt(this.children.tail.length(), text);
|
||
}
|
||
this.cache = {};
|
||
}
|
||
var block = this;
|
||
lines.reduce(function (index, line) {
|
||
block = block.split(index, true);
|
||
block.insertAt(0, line);
|
||
return line.length;
|
||
}, index + text.length);
|
||
}
|
||
}, {
|
||
key: 'insertBefore',
|
||
value: function insertBefore(blot, ref) {
|
||
var head = this.children.head;
|
||
_get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'insertBefore', this).call(this, blot, ref);
|
||
if (head instanceof _break2.default) {
|
||
head.remove();
|
||
}
|
||
this.cache = {};
|
||
}
|
||
}, {
|
||
key: 'length',
|
||
value: function length() {
|
||
if (this.cache.length == null) {
|
||
this.cache.length = _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'length', this).call(this) + NEWLINE_LENGTH;
|
||
}
|
||
return this.cache.length;
|
||
}
|
||
}, {
|
||
key: 'moveChildren',
|
||
value: function moveChildren(target, ref) {
|
||
_get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'moveChildren', this).call(this, target, ref);
|
||
this.cache = {};
|
||
}
|
||
}, {
|
||
key: 'optimize',
|
||
value: function optimize(context) {
|
||
_get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'optimize', this).call(this, context);
|
||
this.cache = {};
|
||
}
|
||
}, {
|
||
key: 'path',
|
||
value: function path(index) {
|
||
return _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'path', this).call(this, index, true);
|
||
}
|
||
}, {
|
||
key: 'removeChild',
|
||
value: function removeChild(child) {
|
||
_get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'removeChild', this).call(this, child);
|
||
this.cache = {};
|
||
}
|
||
}, {
|
||
key: 'split',
|
||
value: function split(index) {
|
||
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
||
|
||
if (force && (index === 0 || index >= this.length() - NEWLINE_LENGTH)) {
|
||
var clone = this.clone();
|
||
if (index === 0) {
|
||
this.parent.insertBefore(clone, this);
|
||
return this;
|
||
} else {
|
||
this.parent.insertBefore(clone, this.next);
|
||
return clone;
|
||
}
|
||
} else {
|
||
var next = _get(Block.prototype.__proto__ || Object.getPrototypeOf(Block.prototype), 'split', this).call(this, index, force);
|
||
this.cache = {};
|
||
return next;
|
||
}
|
||
}
|
||
}]);
|
||
|
||
return Block;
|
||
}(_parchment2.default.Block);
|
||
|
||
Block.blotName = 'block';
|
||
Block.tagName = 'P';
|
||
Block.defaultChild = 'break';
|
||
Block.allowedChildren = [_inline2.default, _parchment2.default.Embed, _text2.default];
|
||
|
||
function bubbleFormats(blot) {
|
||
var formats = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||
|
||
if (blot == null) return formats;
|
||
if (typeof blot.formats === 'function') {
|
||
formats = (0, _extend2.default)(formats, blot.formats());
|
||
}
|
||
if (blot.parent == null || blot.parent.blotName == 'scroll' || blot.parent.statics.scope !== blot.statics.scope) {
|
||
return formats;
|
||
}
|
||
return bubbleFormats(blot.parent, formats);
|
||
}
|
||
|
||
exports.bubbleFormats = bubbleFormats;
|
||
exports.BlockEmbed = BlockEmbed;
|
||
exports.default = Block;
|
||
|
||
/***/ }),
|
||
/* 5 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = exports.overload = exports.expandConfig = undefined;
|
||
|
||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||
|
||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
__webpack_require__(50);
|
||
|
||
var _quillDelta = __webpack_require__(2);
|
||
|
||
var _quillDelta2 = _interopRequireDefault(_quillDelta);
|
||
|
||
var _editor = __webpack_require__(14);
|
||
|
||
var _editor2 = _interopRequireDefault(_editor);
|
||
|
||
var _emitter3 = __webpack_require__(8);
|
||
|
||
var _emitter4 = _interopRequireDefault(_emitter3);
|
||
|
||
var _module = __webpack_require__(9);
|
||
|
||
var _module2 = _interopRequireDefault(_module);
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _selection = __webpack_require__(15);
|
||
|
||
var _selection2 = _interopRequireDefault(_selection);
|
||
|
||
var _extend = __webpack_require__(3);
|
||
|
||
var _extend2 = _interopRequireDefault(_extend);
|
||
|
||
var _logger = __webpack_require__(10);
|
||
|
||
var _logger2 = _interopRequireDefault(_logger);
|
||
|
||
var _theme = __webpack_require__(34);
|
||
|
||
var _theme2 = _interopRequireDefault(_theme);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
var debug = (0, _logger2.default)('quill');
|
||
|
||
var Quill = function () {
|
||
_createClass(Quill, null, [{
|
||
key: 'debug',
|
||
value: function debug(limit) {
|
||
if (limit === true) {
|
||
limit = 'log';
|
||
}
|
||
_logger2.default.level(limit);
|
||
}
|
||
}, {
|
||
key: 'find',
|
||
value: function find(node) {
|
||
return node.__quill || _parchment2.default.find(node);
|
||
}
|
||
}, {
|
||
key: 'import',
|
||
value: function _import(name) {
|
||
if (this.imports[name] == null) {
|
||
debug.error('Cannot import ' + name + '. Are you sure it was registered?');
|
||
}
|
||
return this.imports[name];
|
||
}
|
||
}, {
|
||
key: 'register',
|
||
value: function register(path, target) {
|
||
var _this = this;
|
||
|
||
var overwrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
||
|
||
if (typeof path !== 'string') {
|
||
var name = path.attrName || path.blotName;
|
||
if (typeof name === 'string') {
|
||
// register(Blot | Attributor, overwrite)
|
||
this.register('formats/' + name, path, target);
|
||
} else {
|
||
Object.keys(path).forEach(function (key) {
|
||
_this.register(key, path[key], target);
|
||
});
|
||
}
|
||
} else {
|
||
if (this.imports[path] != null && !overwrite) {
|
||
debug.warn('Overwriting ' + path + ' with', target);
|
||
}
|
||
this.imports[path] = target;
|
||
if ((path.startsWith('blots/') || path.startsWith('formats/')) && target.blotName !== 'abstract') {
|
||
_parchment2.default.register(target);
|
||
} else if (path.startsWith('modules') && typeof target.register === 'function') {
|
||
target.register();
|
||
}
|
||
}
|
||
}
|
||
}]);
|
||
|
||
function Quill(container) {
|
||
var _this2 = this;
|
||
|
||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||
|
||
_classCallCheck(this, Quill);
|
||
|
||
this.options = expandConfig(container, options);
|
||
this.container = this.options.container;
|
||
if (this.container == null) {
|
||
return debug.error('Invalid Quill container', container);
|
||
}
|
||
if (this.options.debug) {
|
||
Quill.debug(this.options.debug);
|
||
}
|
||
var html = this.container.innerHTML.trim();
|
||
this.container.classList.add('ql-container');
|
||
this.container.innerHTML = '';
|
||
this.container.__quill = this;
|
||
this.root = this.addContainer('ql-editor');
|
||
this.root.classList.add('ql-blank');
|
||
this.root.setAttribute('data-gramm', false);
|
||
this.scrollingContainer = this.options.scrollingContainer || this.root;
|
||
this.emitter = new _emitter4.default();
|
||
this.scroll = _parchment2.default.create(this.root, {
|
||
emitter: this.emitter,
|
||
whitelist: this.options.formats
|
||
});
|
||
this.editor = new _editor2.default(this.scroll);
|
||
this.selection = new _selection2.default(this.scroll, this.emitter);
|
||
this.theme = new this.options.theme(this, this.options);
|
||
this.keyboard = this.theme.addModule('keyboard');
|
||
this.clipboard = this.theme.addModule('clipboard');
|
||
this.history = this.theme.addModule('history');
|
||
this.theme.init();
|
||
this.emitter.on(_emitter4.default.events.EDITOR_CHANGE, function (type) {
|
||
if (type === _emitter4.default.events.TEXT_CHANGE) {
|
||
_this2.root.classList.toggle('ql-blank', _this2.editor.isBlank());
|
||
}
|
||
});
|
||
this.emitter.on(_emitter4.default.events.SCROLL_UPDATE, function (source, mutations) {
|
||
var range = _this2.selection.lastRange;
|
||
var index = range && range.length === 0 ? range.index : undefined;
|
||
modify.call(_this2, function () {
|
||
return _this2.editor.update(null, mutations, index);
|
||
}, source);
|
||
});
|
||
var contents = this.clipboard.convert('<div class=\'ql-editor\' style="white-space: normal;">' + html + '<p><br></p></div>');
|
||
this.setContents(contents);
|
||
this.history.clear();
|
||
if (this.options.placeholder) {
|
||
this.root.setAttribute('data-placeholder', this.options.placeholder);
|
||
}
|
||
if (this.options.readOnly) {
|
||
this.disable();
|
||
}
|
||
}
|
||
|
||
_createClass(Quill, [{
|
||
key: 'addContainer',
|
||
value: function addContainer(container) {
|
||
var refNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
||
|
||
if (typeof container === 'string') {
|
||
var className = container;
|
||
container = document.createElement('div');
|
||
container.classList.add(className);
|
||
}
|
||
this.container.insertBefore(container, refNode);
|
||
return container;
|
||
}
|
||
}, {
|
||
key: 'blur',
|
||
value: function blur() {
|
||
this.selection.setRange(null);
|
||
}
|
||
}, {
|
||
key: 'deleteText',
|
||
value: function deleteText(index, length, source) {
|
||
var _this3 = this;
|
||
|
||
var _overload = overload(index, length, source);
|
||
|
||
var _overload2 = _slicedToArray(_overload, 4);
|
||
|
||
index = _overload2[0];
|
||
length = _overload2[1];
|
||
source = _overload2[3];
|
||
|
||
return modify.call(this, function () {
|
||
return _this3.editor.deleteText(index, length);
|
||
}, source, index, -1 * length);
|
||
}
|
||
}, {
|
||
key: 'disable',
|
||
value: function disable() {
|
||
this.enable(false);
|
||
}
|
||
}, {
|
||
key: 'enable',
|
||
value: function enable() {
|
||
var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
||
|
||
this.scroll.enable(enabled);
|
||
this.container.classList.toggle('ql-disabled', !enabled);
|
||
}
|
||
}, {
|
||
key: 'focus',
|
||
value: function focus() {
|
||
var scrollTop = this.scrollingContainer.scrollTop;
|
||
this.selection.focus();
|
||
this.scrollingContainer.scrollTop = scrollTop;
|
||
this.scrollIntoView();
|
||
}
|
||
}, {
|
||
key: 'format',
|
||
value: function format(name, value) {
|
||
var _this4 = this;
|
||
|
||
var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emitter4.default.sources.API;
|
||
|
||
return modify.call(this, function () {
|
||
var range = _this4.getSelection(true);
|
||
var change = new _quillDelta2.default();
|
||
if (range == null) {
|
||
return change;
|
||
} else if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK)) {
|
||
change = _this4.editor.formatLine(range.index, range.length, _defineProperty({}, name, value));
|
||
} else if (range.length === 0) {
|
||
_this4.selection.format(name, value);
|
||
return change;
|
||
} else {
|
||
change = _this4.editor.formatText(range.index, range.length, _defineProperty({}, name, value));
|
||
}
|
||
_this4.setSelection(range, _emitter4.default.sources.SILENT);
|
||
return change;
|
||
}, source);
|
||
}
|
||
}, {
|
||
key: 'formatLine',
|
||
value: function formatLine(index, length, name, value, source) {
|
||
var _this5 = this;
|
||
|
||
var formats = void 0;
|
||
|
||
var _overload3 = overload(index, length, name, value, source);
|
||
|
||
var _overload4 = _slicedToArray(_overload3, 4);
|
||
|
||
index = _overload4[0];
|
||
length = _overload4[1];
|
||
formats = _overload4[2];
|
||
source = _overload4[3];
|
||
|
||
return modify.call(this, function () {
|
||
return _this5.editor.formatLine(index, length, formats);
|
||
}, source, index, 0);
|
||
}
|
||
}, {
|
||
key: 'formatText',
|
||
value: function formatText(index, length, name, value, source) {
|
||
var _this6 = this;
|
||
|
||
var formats = void 0;
|
||
|
||
var _overload5 = overload(index, length, name, value, source);
|
||
|
||
var _overload6 = _slicedToArray(_overload5, 4);
|
||
|
||
index = _overload6[0];
|
||
length = _overload6[1];
|
||
formats = _overload6[2];
|
||
source = _overload6[3];
|
||
|
||
return modify.call(this, function () {
|
||
return _this6.editor.formatText(index, length, formats);
|
||
}, source, index, 0);
|
||
}
|
||
}, {
|
||
key: 'getBounds',
|
||
value: function getBounds(index) {
|
||
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
||
|
||
var bounds = void 0;
|
||
if (typeof index === 'number') {
|
||
bounds = this.selection.getBounds(index, length);
|
||
} else {
|
||
bounds = this.selection.getBounds(index.index, index.length);
|
||
}
|
||
var containerBounds = this.container.getBoundingClientRect();
|
||
return {
|
||
bottom: bounds.bottom - containerBounds.top,
|
||
height: bounds.height,
|
||
left: bounds.left - containerBounds.left,
|
||
right: bounds.right - containerBounds.left,
|
||
top: bounds.top - containerBounds.top,
|
||
width: bounds.width
|
||
};
|
||
}
|
||
}, {
|
||
key: 'getContents',
|
||
value: function getContents() {
|
||
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
||
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;
|
||
|
||
var _overload7 = overload(index, length);
|
||
|
||
var _overload8 = _slicedToArray(_overload7, 2);
|
||
|
||
index = _overload8[0];
|
||
length = _overload8[1];
|
||
|
||
return this.editor.getContents(index, length);
|
||
}
|
||
}, {
|
||
key: 'getFormat',
|
||
value: function getFormat() {
|
||
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getSelection(true);
|
||
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
||
|
||
if (typeof index === 'number') {
|
||
return this.editor.getFormat(index, length);
|
||
} else {
|
||
return this.editor.getFormat(index.index, index.length);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'getIndex',
|
||
value: function getIndex(blot) {
|
||
return blot.offset(this.scroll);
|
||
}
|
||
}, {
|
||
key: 'getLength',
|
||
value: function getLength() {
|
||
return this.scroll.length();
|
||
}
|
||
}, {
|
||
key: 'getLeaf',
|
||
value: function getLeaf(index) {
|
||
return this.scroll.leaf(index);
|
||
}
|
||
}, {
|
||
key: 'getLine',
|
||
value: function getLine(index) {
|
||
return this.scroll.line(index);
|
||
}
|
||
}, {
|
||
key: 'getLines',
|
||
value: function getLines() {
|
||
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
||
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;
|
||
|
||
if (typeof index !== 'number') {
|
||
return this.scroll.lines(index.index, index.length);
|
||
} else {
|
||
return this.scroll.lines(index, length);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'getModule',
|
||
value: function getModule(name) {
|
||
return this.theme.modules[name];
|
||
}
|
||
}, {
|
||
key: 'getSelection',
|
||
value: function getSelection() {
|
||
var focus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||
|
||
if (focus) this.focus();
|
||
this.update(); // Make sure we access getRange with editor in consistent state
|
||
return this.selection.getRange()[0];
|
||
}
|
||
}, {
|
||
key: 'getText',
|
||
value: function getText() {
|
||
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
||
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;
|
||
|
||
var _overload9 = overload(index, length);
|
||
|
||
var _overload10 = _slicedToArray(_overload9, 2);
|
||
|
||
index = _overload10[0];
|
||
length = _overload10[1];
|
||
|
||
return this.editor.getText(index, length);
|
||
}
|
||
}, {
|
||
key: 'hasFocus',
|
||
value: function hasFocus() {
|
||
return this.selection.hasFocus();
|
||
}
|
||
}, {
|
||
key: 'insertEmbed',
|
||
value: function insertEmbed(index, embed, value) {
|
||
var _this7 = this;
|
||
|
||
var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Quill.sources.API;
|
||
|
||
return modify.call(this, function () {
|
||
return _this7.editor.insertEmbed(index, embed, value);
|
||
}, source, index);
|
||
}
|
||
}, {
|
||
key: 'insertText',
|
||
value: function insertText(index, text, name, value, source) {
|
||
var _this8 = this;
|
||
|
||
var formats = void 0;
|
||
|
||
var _overload11 = overload(index, 0, name, value, source);
|
||
|
||
var _overload12 = _slicedToArray(_overload11, 4);
|
||
|
||
index = _overload12[0];
|
||
formats = _overload12[2];
|
||
source = _overload12[3];
|
||
|
||
return modify.call(this, function () {
|
||
return _this8.editor.insertText(index, text, formats);
|
||
}, source, index, text.length);
|
||
}
|
||
}, {
|
||
key: 'isEnabled',
|
||
value: function isEnabled() {
|
||
return !this.container.classList.contains('ql-disabled');
|
||
}
|
||
}, {
|
||
key: 'off',
|
||
value: function off() {
|
||
return this.emitter.off.apply(this.emitter, arguments);
|
||
}
|
||
}, {
|
||
key: 'on',
|
||
value: function on() {
|
||
return this.emitter.on.apply(this.emitter, arguments);
|
||
}
|
||
}, {
|
||
key: 'once',
|
||
value: function once() {
|
||
return this.emitter.once.apply(this.emitter, arguments);
|
||
}
|
||
}, {
|
||
key: 'pasteHTML',
|
||
value: function pasteHTML(index, html, source) {
|
||
this.clipboard.dangerouslyPasteHTML(index, html, source);
|
||
}
|
||
}, {
|
||
key: 'removeFormat',
|
||
value: function removeFormat(index, length, source) {
|
||
var _this9 = this;
|
||
|
||
var _overload13 = overload(index, length, source);
|
||
|
||
var _overload14 = _slicedToArray(_overload13, 4);
|
||
|
||
index = _overload14[0];
|
||
length = _overload14[1];
|
||
source = _overload14[3];
|
||
|
||
return modify.call(this, function () {
|
||
return _this9.editor.removeFormat(index, length);
|
||
}, source, index);
|
||
}
|
||
}, {
|
||
key: 'scrollIntoView',
|
||
value: function scrollIntoView() {
|
||
this.selection.scrollIntoView(this.scrollingContainer);
|
||
}
|
||
}, {
|
||
key: 'setContents',
|
||
value: function setContents(delta) {
|
||
var _this10 = this;
|
||
|
||
var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;
|
||
|
||
return modify.call(this, function () {
|
||
delta = new _quillDelta2.default(delta);
|
||
var length = _this10.getLength();
|
||
var deleted = _this10.editor.deleteText(0, length);
|
||
var applied = _this10.editor.applyDelta(delta);
|
||
var lastOp = applied.ops[applied.ops.length - 1];
|
||
if (lastOp != null && typeof lastOp.insert === 'string' && lastOp.insert[lastOp.insert.length - 1] === '\n') {
|
||
_this10.editor.deleteText(_this10.getLength() - 1, 1);
|
||
applied.delete(1);
|
||
}
|
||
var ret = deleted.compose(applied);
|
||
return ret;
|
||
}, source);
|
||
}
|
||
}, {
|
||
key: 'setSelection',
|
||
value: function setSelection(index, length, source) {
|
||
if (index == null) {
|
||
this.selection.setRange(null, length || Quill.sources.API);
|
||
} else {
|
||
var _overload15 = overload(index, length, source);
|
||
|
||
var _overload16 = _slicedToArray(_overload15, 4);
|
||
|
||
index = _overload16[0];
|
||
length = _overload16[1];
|
||
source = _overload16[3];
|
||
|
||
this.selection.setRange(new _selection.Range(index, length), source);
|
||
if (source !== _emitter4.default.sources.SILENT) {
|
||
this.selection.scrollIntoView(this.scrollingContainer);
|
||
}
|
||
}
|
||
}
|
||
}, {
|
||
key: 'setText',
|
||
value: function setText(text) {
|
||
var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;
|
||
|
||
var delta = new _quillDelta2.default().insert(text);
|
||
return this.setContents(delta, source);
|
||
}
|
||
}, {
|
||
key: 'update',
|
||
value: function update() {
|
||
var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emitter4.default.sources.USER;
|
||
|
||
var change = this.scroll.update(source); // Will update selection before selection.update() does if text changes
|
||
this.selection.update(source);
|
||
return change;
|
||
}
|
||
}, {
|
||
key: 'updateContents',
|
||
value: function updateContents(delta) {
|
||
var _this11 = this;
|
||
|
||
var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter4.default.sources.API;
|
||
|
||
return modify.call(this, function () {
|
||
delta = new _quillDelta2.default(delta);
|
||
return _this11.editor.applyDelta(delta, source);
|
||
}, source, true);
|
||
}
|
||
}]);
|
||
|
||
return Quill;
|
||
}();
|
||
|
||
Quill.DEFAULTS = {
|
||
bounds: null,
|
||
formats: null,
|
||
modules: {},
|
||
placeholder: '',
|
||
readOnly: false,
|
||
scrollingContainer: null,
|
||
strict: true,
|
||
theme: 'default'
|
||
};
|
||
Quill.events = _emitter4.default.events;
|
||
Quill.sources = _emitter4.default.sources;
|
||
// eslint-disable-next-line no-undef
|
||
Quill.version = false ? 'dev' : "1.3.7";
|
||
|
||
Quill.imports = {
|
||
'delta': _quillDelta2.default,
|
||
'parchment': _parchment2.default,
|
||
'core/module': _module2.default,
|
||
'core/theme': _theme2.default
|
||
};
|
||
|
||
function expandConfig(container, userConfig) {
|
||
userConfig = (0, _extend2.default)(true, {
|
||
container: container,
|
||
modules: {
|
||
clipboard: true,
|
||
keyboard: true,
|
||
history: true
|
||
}
|
||
}, userConfig);
|
||
if (!userConfig.theme || userConfig.theme === Quill.DEFAULTS.theme) {
|
||
userConfig.theme = _theme2.default;
|
||
} else {
|
||
userConfig.theme = Quill.import('themes/' + userConfig.theme);
|
||
if (userConfig.theme == null) {
|
||
throw new Error('Invalid theme ' + userConfig.theme + '. Did you register it?');
|
||
}
|
||
}
|
||
var themeConfig = (0, _extend2.default)(true, {}, userConfig.theme.DEFAULTS);
|
||
[themeConfig, userConfig].forEach(function (config) {
|
||
config.modules = config.modules || {};
|
||
Object.keys(config.modules).forEach(function (module) {
|
||
if (config.modules[module] === true) {
|
||
config.modules[module] = {};
|
||
}
|
||
});
|
||
});
|
||
var moduleNames = Object.keys(themeConfig.modules).concat(Object.keys(userConfig.modules));
|
||
var moduleConfig = moduleNames.reduce(function (config, name) {
|
||
var moduleClass = Quill.import('modules/' + name);
|
||
if (moduleClass == null) {
|
||
debug.error('Cannot load ' + name + ' module. Are you sure you registered it?');
|
||
} else {
|
||
config[name] = moduleClass.DEFAULTS || {};
|
||
}
|
||
return config;
|
||
}, {});
|
||
// Special case toolbar shorthand
|
||
if (userConfig.modules != null && userConfig.modules.toolbar && userConfig.modules.toolbar.constructor !== Object) {
|
||
userConfig.modules.toolbar = {
|
||
container: userConfig.modules.toolbar
|
||
};
|
||
}
|
||
userConfig = (0, _extend2.default)(true, {}, Quill.DEFAULTS, { modules: moduleConfig }, themeConfig, userConfig);
|
||
['bounds', 'container', 'scrollingContainer'].forEach(function (key) {
|
||
if (typeof userConfig[key] === 'string') {
|
||
userConfig[key] = document.querySelector(userConfig[key]);
|
||
}
|
||
});
|
||
userConfig.modules = Object.keys(userConfig.modules).reduce(function (config, name) {
|
||
if (userConfig.modules[name]) {
|
||
config[name] = userConfig.modules[name];
|
||
}
|
||
return config;
|
||
}, {});
|
||
return userConfig;
|
||
}
|
||
|
||
// Handle selection preservation and TEXT_CHANGE emission
|
||
// common to modification APIs
|
||
function modify(modifier, source, index, shift) {
|
||
if (this.options.strict && !this.isEnabled() && source === _emitter4.default.sources.USER) {
|
||
return new _quillDelta2.default();
|
||
}
|
||
var range = index == null ? null : this.getSelection();
|
||
var oldDelta = this.editor.delta;
|
||
var change = modifier();
|
||
if (range != null) {
|
||
if (index === true) index = range.index;
|
||
if (shift == null) {
|
||
range = shiftRange(range, change, source);
|
||
} else if (shift !== 0) {
|
||
range = shiftRange(range, index, shift, source);
|
||
}
|
||
this.setSelection(range, _emitter4.default.sources.SILENT);
|
||
}
|
||
if (change.length() > 0) {
|
||
var _emitter;
|
||
|
||
var args = [_emitter4.default.events.TEXT_CHANGE, change, oldDelta, source];
|
||
(_emitter = this.emitter).emit.apply(_emitter, [_emitter4.default.events.EDITOR_CHANGE].concat(args));
|
||
if (source !== _emitter4.default.sources.SILENT) {
|
||
var _emitter2;
|
||
|
||
(_emitter2 = this.emitter).emit.apply(_emitter2, args);
|
||
}
|
||
}
|
||
return change;
|
||
}
|
||
|
||
function overload(index, length, name, value, source) {
|
||
var formats = {};
|
||
if (typeof index.index === 'number' && typeof index.length === 'number') {
|
||
// Allow for throwaway end (used by insertText/insertEmbed)
|
||
if (typeof length !== 'number') {
|
||
source = value, value = name, name = length, length = index.length, index = index.index;
|
||
} else {
|
||
length = index.length, index = index.index;
|
||
}
|
||
} else if (typeof length !== 'number') {
|
||
source = value, value = name, name = length, length = 0;
|
||
}
|
||
// Handle format being object, two format name/value strings or excluded
|
||
if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {
|
||
formats = name;
|
||
source = value;
|
||
} else if (typeof name === 'string') {
|
||
if (value != null) {
|
||
formats[name] = value;
|
||
} else {
|
||
source = name;
|
||
}
|
||
}
|
||
// Handle optional source
|
||
source = source || _emitter4.default.sources.API;
|
||
return [index, length, formats, source];
|
||
}
|
||
|
||
function shiftRange(range, index, length, source) {
|
||
if (range == null) return null;
|
||
var start = void 0,
|
||
end = void 0;
|
||
if (index instanceof _quillDelta2.default) {
|
||
var _map = [range.index, range.index + range.length].map(function (pos) {
|
||
return index.transformPosition(pos, source !== _emitter4.default.sources.USER);
|
||
});
|
||
|
||
var _map2 = _slicedToArray(_map, 2);
|
||
|
||
start = _map2[0];
|
||
end = _map2[1];
|
||
} else {
|
||
var _map3 = [range.index, range.index + range.length].map(function (pos) {
|
||
if (pos < index || pos === index && source === _emitter4.default.sources.USER) return pos;
|
||
if (length >= 0) {
|
||
return pos + length;
|
||
} else {
|
||
return Math.max(index, pos + length);
|
||
}
|
||
});
|
||
|
||
var _map4 = _slicedToArray(_map3, 2);
|
||
|
||
start = _map4[0];
|
||
end = _map4[1];
|
||
}
|
||
return new _selection.Range(start, end - start);
|
||
}
|
||
|
||
exports.expandConfig = expandConfig;
|
||
exports.overload = overload;
|
||
exports.default = Quill;
|
||
|
||
/***/ }),
|
||
/* 6 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _text = __webpack_require__(7);
|
||
|
||
var _text2 = _interopRequireDefault(_text);
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var Inline = function (_Parchment$Inline) {
|
||
_inherits(Inline, _Parchment$Inline);
|
||
|
||
function Inline() {
|
||
_classCallCheck(this, Inline);
|
||
|
||
return _possibleConstructorReturn(this, (Inline.__proto__ || Object.getPrototypeOf(Inline)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(Inline, [{
|
||
key: 'formatAt',
|
||
value: function formatAt(index, length, name, value) {
|
||
if (Inline.compare(this.statics.blotName, name) < 0 && _parchment2.default.query(name, _parchment2.default.Scope.BLOT)) {
|
||
var blot = this.isolate(index, length);
|
||
if (value) {
|
||
blot.wrap(name, value);
|
||
}
|
||
} else {
|
||
_get(Inline.prototype.__proto__ || Object.getPrototypeOf(Inline.prototype), 'formatAt', this).call(this, index, length, name, value);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'optimize',
|
||
value: function optimize(context) {
|
||
_get(Inline.prototype.__proto__ || Object.getPrototypeOf(Inline.prototype), 'optimize', this).call(this, context);
|
||
if (this.parent instanceof Inline && Inline.compare(this.statics.blotName, this.parent.statics.blotName) > 0) {
|
||
var parent = this.parent.isolate(this.offset(), this.length());
|
||
this.moveChildren(parent);
|
||
parent.wrap(this);
|
||
}
|
||
}
|
||
}], [{
|
||
key: 'compare',
|
||
value: function compare(self, other) {
|
||
var selfIndex = Inline.order.indexOf(self);
|
||
var otherIndex = Inline.order.indexOf(other);
|
||
if (selfIndex >= 0 || otherIndex >= 0) {
|
||
return selfIndex - otherIndex;
|
||
} else if (self === other) {
|
||
return 0;
|
||
} else if (self < other) {
|
||
return -1;
|
||
} else {
|
||
return 1;
|
||
}
|
||
}
|
||
}]);
|
||
|
||
return Inline;
|
||
}(_parchment2.default.Inline);
|
||
|
||
Inline.allowedChildren = [Inline, _parchment2.default.Embed, _text2.default];
|
||
// Lower index means deeper in the DOM tree, since not found (-1) is for embeds
|
||
Inline.order = ['cursor', 'inline', // Must be lower
|
||
'underline', 'strike', 'italic', 'bold', 'script', 'link', 'code' // Must be higher
|
||
];
|
||
|
||
exports.default = Inline;
|
||
|
||
/***/ }),
|
||
/* 7 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var TextBlot = function (_Parchment$Text) {
|
||
_inherits(TextBlot, _Parchment$Text);
|
||
|
||
function TextBlot() {
|
||
_classCallCheck(this, TextBlot);
|
||
|
||
return _possibleConstructorReturn(this, (TextBlot.__proto__ || Object.getPrototypeOf(TextBlot)).apply(this, arguments));
|
||
}
|
||
|
||
return TextBlot;
|
||
}(_parchment2.default.Text);
|
||
|
||
exports.default = TextBlot;
|
||
|
||
/***/ }),
|
||
/* 8 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _eventemitter = __webpack_require__(54);
|
||
|
||
var _eventemitter2 = _interopRequireDefault(_eventemitter);
|
||
|
||
var _logger = __webpack_require__(10);
|
||
|
||
var _logger2 = _interopRequireDefault(_logger);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var debug = (0, _logger2.default)('quill:events');
|
||
|
||
var EVENTS = ['selectionchange', 'mousedown', 'mouseup', 'click'];
|
||
|
||
EVENTS.forEach(function (eventName) {
|
||
document.addEventListener(eventName, function () {
|
||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
[].slice.call(document.querySelectorAll('.ql-container')).forEach(function (node) {
|
||
// TODO use WeakMap
|
||
if (node.__quill && node.__quill.emitter) {
|
||
var _node$__quill$emitter;
|
||
|
||
(_node$__quill$emitter = node.__quill.emitter).handleDOM.apply(_node$__quill$emitter, args);
|
||
}
|
||
});
|
||
});
|
||
});
|
||
|
||
var Emitter = function (_EventEmitter) {
|
||
_inherits(Emitter, _EventEmitter);
|
||
|
||
function Emitter() {
|
||
_classCallCheck(this, Emitter);
|
||
|
||
var _this = _possibleConstructorReturn(this, (Emitter.__proto__ || Object.getPrototypeOf(Emitter)).call(this));
|
||
|
||
_this.listeners = {};
|
||
_this.on('error', debug.error);
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Emitter, [{
|
||
key: 'emit',
|
||
value: function emit() {
|
||
debug.log.apply(debug, arguments);
|
||
_get(Emitter.prototype.__proto__ || Object.getPrototypeOf(Emitter.prototype), 'emit', this).apply(this, arguments);
|
||
}
|
||
}, {
|
||
key: 'handleDOM',
|
||
value: function handleDOM(event) {
|
||
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
||
args[_key2 - 1] = arguments[_key2];
|
||
}
|
||
|
||
(this.listeners[event.type] || []).forEach(function (_ref) {
|
||
var node = _ref.node,
|
||
handler = _ref.handler;
|
||
|
||
if (event.target === node || node.contains(event.target)) {
|
||
handler.apply(undefined, [event].concat(args));
|
||
}
|
||
});
|
||
}
|
||
}, {
|
||
key: 'listenDOM',
|
||
value: function listenDOM(eventName, node, handler) {
|
||
if (!this.listeners[eventName]) {
|
||
this.listeners[eventName] = [];
|
||
}
|
||
this.listeners[eventName].push({ node: node, handler: handler });
|
||
}
|
||
}]);
|
||
|
||
return Emitter;
|
||
}(_eventemitter2.default);
|
||
|
||
Emitter.events = {
|
||
EDITOR_CHANGE: 'editor-change',
|
||
SCROLL_BEFORE_UPDATE: 'scroll-before-update',
|
||
SCROLL_OPTIMIZE: 'scroll-optimize',
|
||
SCROLL_UPDATE: 'scroll-update',
|
||
SELECTION_CHANGE: 'selection-change',
|
||
TEXT_CHANGE: 'text-change'
|
||
};
|
||
Emitter.sources = {
|
||
API: 'api',
|
||
SILENT: 'silent',
|
||
USER: 'user'
|
||
};
|
||
|
||
exports.default = Emitter;
|
||
|
||
/***/ }),
|
||
/* 9 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
var Module = function Module(quill) {
|
||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||
|
||
_classCallCheck(this, Module);
|
||
|
||
this.quill = quill;
|
||
this.options = options;
|
||
};
|
||
|
||
Module.DEFAULTS = {};
|
||
|
||
exports.default = Module;
|
||
|
||
/***/ }),
|
||
/* 10 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
var levels = ['error', 'warn', 'log', 'info'];
|
||
var level = 'warn';
|
||
|
||
function debug(method) {
|
||
if (levels.indexOf(method) <= levels.indexOf(level)) {
|
||
var _console;
|
||
|
||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||
args[_key - 1] = arguments[_key];
|
||
}
|
||
|
||
(_console = console)[method].apply(_console, args); // eslint-disable-line no-console
|
||
}
|
||
}
|
||
|
||
function namespace(ns) {
|
||
return levels.reduce(function (logger, method) {
|
||
logger[method] = debug.bind(console, method, ns);
|
||
return logger;
|
||
}, {});
|
||
}
|
||
|
||
debug.level = namespace.level = function (newLevel) {
|
||
level = newLevel;
|
||
};
|
||
|
||
exports.default = namespace;
|
||
|
||
/***/ }),
|
||
/* 11 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var pSlice = Array.prototype.slice;
|
||
var objectKeys = __webpack_require__(52);
|
||
var isArguments = __webpack_require__(53);
|
||
|
||
var deepEqual = module.exports = function (actual, expected, opts) {
|
||
if (!opts) opts = {};
|
||
// 7.1. All identical values are equivalent, as determined by ===.
|
||
if (actual === expected) {
|
||
return true;
|
||
|
||
} else if (actual instanceof Date && expected instanceof Date) {
|
||
return actual.getTime() === expected.getTime();
|
||
|
||
// 7.3. Other pairs that do not both pass typeof value == 'object',
|
||
// equivalence is determined by ==.
|
||
} else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') {
|
||
return opts.strict ? actual === expected : actual == expected;
|
||
|
||
// 7.4. For all other Object pairs, including Array objects, equivalence is
|
||
// determined by having the same number of owned properties (as verified
|
||
// with Object.prototype.hasOwnProperty.call), the same set of keys
|
||
// (although not necessarily the same order), equivalent values for every
|
||
// corresponding key, and an identical 'prototype' property. Note: this
|
||
// accounts for both named and indexed properties on Arrays.
|
||
} else {
|
||
return objEquiv(actual, expected, opts);
|
||
}
|
||
}
|
||
|
||
function isUndefinedOrNull(value) {
|
||
return value === null || value === undefined;
|
||
}
|
||
|
||
function isBuffer (x) {
|
||
if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false;
|
||
if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
|
||
return false;
|
||
}
|
||
if (x.length > 0 && typeof x[0] !== 'number') return false;
|
||
return true;
|
||
}
|
||
|
||
function objEquiv(a, b, opts) {
|
||
var i, key;
|
||
if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
|
||
return false;
|
||
// an identical 'prototype' property.
|
||
if (a.prototype !== b.prototype) return false;
|
||
//~~~I've managed to break Object.keys through screwy arguments passing.
|
||
// Converting to array solves the problem.
|
||
if (isArguments(a)) {
|
||
if (!isArguments(b)) {
|
||
return false;
|
||
}
|
||
a = pSlice.call(a);
|
||
b = pSlice.call(b);
|
||
return deepEqual(a, b, opts);
|
||
}
|
||
if (isBuffer(a)) {
|
||
if (!isBuffer(b)) {
|
||
return false;
|
||
}
|
||
if (a.length !== b.length) return false;
|
||
for (i = 0; i < a.length; i++) {
|
||
if (a[i] !== b[i]) return false;
|
||
}
|
||
return true;
|
||
}
|
||
try {
|
||
var ka = objectKeys(a),
|
||
kb = objectKeys(b);
|
||
} catch (e) {//happens when one is a string literal and the other isn't
|
||
return false;
|
||
}
|
||
// having the same number of owned properties (keys incorporates
|
||
// hasOwnProperty)
|
||
if (ka.length != kb.length)
|
||
return false;
|
||
//the same set of keys (although not necessarily the same order),
|
||
ka.sort();
|
||
kb.sort();
|
||
//~~~cheap key test
|
||
for (i = ka.length - 1; i >= 0; i--) {
|
||
if (ka[i] != kb[i])
|
||
return false;
|
||
}
|
||
//equivalent values for every corresponding key, and
|
||
//~~~possibly expensive deep test
|
||
for (i = ka.length - 1; i >= 0; i--) {
|
||
key = ka[i];
|
||
if (!deepEqual(a[key], b[key], opts)) return false;
|
||
}
|
||
return typeof a === typeof b;
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
/* 12 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var Registry = __webpack_require__(1);
|
||
var Attributor = /** @class */ (function () {
|
||
function Attributor(attrName, keyName, options) {
|
||
if (options === void 0) { options = {}; }
|
||
this.attrName = attrName;
|
||
this.keyName = keyName;
|
||
var attributeBit = Registry.Scope.TYPE & Registry.Scope.ATTRIBUTE;
|
||
if (options.scope != null) {
|
||
// Ignore type bits, force attribute bit
|
||
this.scope = (options.scope & Registry.Scope.LEVEL) | attributeBit;
|
||
}
|
||
else {
|
||
this.scope = Registry.Scope.ATTRIBUTE;
|
||
}
|
||
if (options.whitelist != null)
|
||
this.whitelist = options.whitelist;
|
||
}
|
||
Attributor.keys = function (node) {
|
||
return [].map.call(node.attributes, function (item) {
|
||
return item.name;
|
||
});
|
||
};
|
||
Attributor.prototype.add = function (node, value) {
|
||
if (!this.canAdd(node, value))
|
||
return false;
|
||
node.setAttribute(this.keyName, value);
|
||
return true;
|
||
};
|
||
Attributor.prototype.canAdd = function (node, value) {
|
||
var match = Registry.query(node, Registry.Scope.BLOT & (this.scope | Registry.Scope.TYPE));
|
||
if (match == null)
|
||
return false;
|
||
if (this.whitelist == null)
|
||
return true;
|
||
if (typeof value === 'string') {
|
||
return this.whitelist.indexOf(value.replace(/["']/g, '')) > -1;
|
||
}
|
||
else {
|
||
return this.whitelist.indexOf(value) > -1;
|
||
}
|
||
};
|
||
Attributor.prototype.remove = function (node) {
|
||
node.removeAttribute(this.keyName);
|
||
};
|
||
Attributor.prototype.value = function (node) {
|
||
var value = node.getAttribute(this.keyName);
|
||
if (this.canAdd(node, value) && value) {
|
||
return value;
|
||
}
|
||
return '';
|
||
};
|
||
return Attributor;
|
||
}());
|
||
exports.default = Attributor;
|
||
|
||
|
||
/***/ }),
|
||
/* 13 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = exports.Code = undefined;
|
||
|
||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _quillDelta = __webpack_require__(2);
|
||
|
||
var _quillDelta2 = _interopRequireDefault(_quillDelta);
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _block = __webpack_require__(4);
|
||
|
||
var _block2 = _interopRequireDefault(_block);
|
||
|
||
var _inline = __webpack_require__(6);
|
||
|
||
var _inline2 = _interopRequireDefault(_inline);
|
||
|
||
var _text = __webpack_require__(7);
|
||
|
||
var _text2 = _interopRequireDefault(_text);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var Code = function (_Inline) {
|
||
_inherits(Code, _Inline);
|
||
|
||
function Code() {
|
||
_classCallCheck(this, Code);
|
||
|
||
return _possibleConstructorReturn(this, (Code.__proto__ || Object.getPrototypeOf(Code)).apply(this, arguments));
|
||
}
|
||
|
||
return Code;
|
||
}(_inline2.default);
|
||
|
||
Code.blotName = 'code';
|
||
Code.tagName = 'CODE';
|
||
|
||
var CodeBlock = function (_Block) {
|
||
_inherits(CodeBlock, _Block);
|
||
|
||
function CodeBlock() {
|
||
_classCallCheck(this, CodeBlock);
|
||
|
||
return _possibleConstructorReturn(this, (CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(CodeBlock, [{
|
||
key: 'delta',
|
||
value: function delta() {
|
||
var _this3 = this;
|
||
|
||
var text = this.domNode.textContent;
|
||
if (text.endsWith('\n')) {
|
||
// Should always be true
|
||
text = text.slice(0, -1);
|
||
}
|
||
return text.split('\n').reduce(function (delta, frag) {
|
||
return delta.insert(frag).insert('\n', _this3.formats());
|
||
}, new _quillDelta2.default());
|
||
}
|
||
}, {
|
||
key: 'format',
|
||
value: function format(name, value) {
|
||
if (name === this.statics.blotName && value) return;
|
||
|
||
var _descendant = this.descendant(_text2.default, this.length() - 1),
|
||
_descendant2 = _slicedToArray(_descendant, 1),
|
||
text = _descendant2[0];
|
||
|
||
if (text != null) {
|
||
text.deleteAt(text.length() - 1, 1);
|
||
}
|
||
_get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'format', this).call(this, name, value);
|
||
}
|
||
}, {
|
||
key: 'formatAt',
|
||
value: function formatAt(index, length, name, value) {
|
||
if (length === 0) return;
|
||
if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK) == null || name === this.statics.blotName && value === this.statics.formats(this.domNode)) {
|
||
return;
|
||
}
|
||
var nextNewline = this.newlineIndex(index);
|
||
if (nextNewline < 0 || nextNewline >= index + length) return;
|
||
var prevNewline = this.newlineIndex(index, true) + 1;
|
||
var isolateLength = nextNewline - prevNewline + 1;
|
||
var blot = this.isolate(prevNewline, isolateLength);
|
||
var next = blot.next;
|
||
blot.format(name, value);
|
||
if (next instanceof CodeBlock) {
|
||
next.formatAt(0, index - prevNewline + length - isolateLength, name, value);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'insertAt',
|
||
value: function insertAt(index, value, def) {
|
||
if (def != null) return;
|
||
|
||
var _descendant3 = this.descendant(_text2.default, index),
|
||
_descendant4 = _slicedToArray(_descendant3, 2),
|
||
text = _descendant4[0],
|
||
offset = _descendant4[1];
|
||
|
||
text.insertAt(offset, value);
|
||
}
|
||
}, {
|
||
key: 'length',
|
||
value: function length() {
|
||
var length = this.domNode.textContent.length;
|
||
if (!this.domNode.textContent.endsWith('\n')) {
|
||
return length + 1;
|
||
}
|
||
return length;
|
||
}
|
||
}, {
|
||
key: 'newlineIndex',
|
||
value: function newlineIndex(searchIndex) {
|
||
var reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
||
|
||
if (!reverse) {
|
||
var offset = this.domNode.textContent.slice(searchIndex).indexOf('\n');
|
||
return offset > -1 ? searchIndex + offset : -1;
|
||
} else {
|
||
return this.domNode.textContent.slice(0, searchIndex).lastIndexOf('\n');
|
||
}
|
||
}
|
||
}, {
|
||
key: 'optimize',
|
||
value: function optimize(context) {
|
||
if (!this.domNode.textContent.endsWith('\n')) {
|
||
this.appendChild(_parchment2.default.create('text', '\n'));
|
||
}
|
||
_get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'optimize', this).call(this, context);
|
||
var next = this.next;
|
||
if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && this.statics.formats(this.domNode) === next.statics.formats(next.domNode)) {
|
||
next.optimize(context);
|
||
next.moveChildren(this);
|
||
next.remove();
|
||
}
|
||
}
|
||
}, {
|
||
key: 'replace',
|
||
value: function replace(target) {
|
||
_get(CodeBlock.prototype.__proto__ || Object.getPrototypeOf(CodeBlock.prototype), 'replace', this).call(this, target);
|
||
[].slice.call(this.domNode.querySelectorAll('*')).forEach(function (node) {
|
||
var blot = _parchment2.default.find(node);
|
||
if (blot == null) {
|
||
node.parentNode.removeChild(node);
|
||
} else if (blot instanceof _parchment2.default.Embed) {
|
||
blot.remove();
|
||
} else {
|
||
blot.unwrap();
|
||
}
|
||
});
|
||
}
|
||
}], [{
|
||
key: 'create',
|
||
value: function create(value) {
|
||
var domNode = _get(CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock), 'create', this).call(this, value);
|
||
domNode.setAttribute('spellcheck', false);
|
||
return domNode;
|
||
}
|
||
}, {
|
||
key: 'formats',
|
||
value: function formats() {
|
||
return true;
|
||
}
|
||
}]);
|
||
|
||
return CodeBlock;
|
||
}(_block2.default);
|
||
|
||
CodeBlock.blotName = 'code-block';
|
||
CodeBlock.tagName = 'PRE';
|
||
CodeBlock.TAB = ' ';
|
||
|
||
exports.Code = Code;
|
||
exports.default = CodeBlock;
|
||
|
||
/***/ }),
|
||
/* 14 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||
|
||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _quillDelta = __webpack_require__(2);
|
||
|
||
var _quillDelta2 = _interopRequireDefault(_quillDelta);
|
||
|
||
var _op = __webpack_require__(20);
|
||
|
||
var _op2 = _interopRequireDefault(_op);
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _code = __webpack_require__(13);
|
||
|
||
var _code2 = _interopRequireDefault(_code);
|
||
|
||
var _cursor = __webpack_require__(24);
|
||
|
||
var _cursor2 = _interopRequireDefault(_cursor);
|
||
|
||
var _block = __webpack_require__(4);
|
||
|
||
var _block2 = _interopRequireDefault(_block);
|
||
|
||
var _break = __webpack_require__(16);
|
||
|
||
var _break2 = _interopRequireDefault(_break);
|
||
|
||
var _clone = __webpack_require__(21);
|
||
|
||
var _clone2 = _interopRequireDefault(_clone);
|
||
|
||
var _deepEqual = __webpack_require__(11);
|
||
|
||
var _deepEqual2 = _interopRequireDefault(_deepEqual);
|
||
|
||
var _extend = __webpack_require__(3);
|
||
|
||
var _extend2 = _interopRequireDefault(_extend);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
var ASCII = /^[ -~]*$/;
|
||
|
||
var Editor = function () {
|
||
function Editor(scroll) {
|
||
_classCallCheck(this, Editor);
|
||
|
||
this.scroll = scroll;
|
||
this.delta = this.getDelta();
|
||
}
|
||
|
||
_createClass(Editor, [{
|
||
key: 'applyDelta',
|
||
value: function applyDelta(delta) {
|
||
var _this = this;
|
||
|
||
var consumeNextNewline = false;
|
||
this.scroll.update();
|
||
var scrollLength = this.scroll.length();
|
||
this.scroll.batchStart();
|
||
delta = normalizeDelta(delta);
|
||
delta.reduce(function (index, op) {
|
||
var length = op.retain || op.delete || op.insert.length || 1;
|
||
var attributes = op.attributes || {};
|
||
if (op.insert != null) {
|
||
if (typeof op.insert === 'string') {
|
||
var text = op.insert;
|
||
if (text.endsWith('\n') && consumeNextNewline) {
|
||
consumeNextNewline = false;
|
||
text = text.slice(0, -1);
|
||
}
|
||
if (index >= scrollLength && !text.endsWith('\n')) {
|
||
consumeNextNewline = true;
|
||
}
|
||
_this.scroll.insertAt(index, text);
|
||
|
||
var _scroll$line = _this.scroll.line(index),
|
||
_scroll$line2 = _slicedToArray(_scroll$line, 2),
|
||
line = _scroll$line2[0],
|
||
offset = _scroll$line2[1];
|
||
|
||
var formats = (0, _extend2.default)({}, (0, _block.bubbleFormats)(line));
|
||
if (line instanceof _block2.default) {
|
||
var _line$descendant = line.descendant(_parchment2.default.Leaf, offset),
|
||
_line$descendant2 = _slicedToArray(_line$descendant, 1),
|
||
leaf = _line$descendant2[0];
|
||
|
||
formats = (0, _extend2.default)(formats, (0, _block.bubbleFormats)(leaf));
|
||
}
|
||
attributes = _op2.default.attributes.diff(formats, attributes) || {};
|
||
} else if (_typeof(op.insert) === 'object') {
|
||
var key = Object.keys(op.insert)[0]; // There should only be one key
|
||
if (key == null) return index;
|
||
_this.scroll.insertAt(index, key, op.insert[key]);
|
||
}
|
||
scrollLength += length;
|
||
}
|
||
Object.keys(attributes).forEach(function (name) {
|
||
_this.scroll.formatAt(index, length, name, attributes[name]);
|
||
});
|
||
return index + length;
|
||
}, 0);
|
||
delta.reduce(function (index, op) {
|
||
if (typeof op.delete === 'number') {
|
||
_this.scroll.deleteAt(index, op.delete);
|
||
return index;
|
||
}
|
||
return index + (op.retain || op.insert.length || 1);
|
||
}, 0);
|
||
this.scroll.batchEnd();
|
||
return this.update(delta);
|
||
}
|
||
}, {
|
||
key: 'deleteText',
|
||
value: function deleteText(index, length) {
|
||
this.scroll.deleteAt(index, length);
|
||
return this.update(new _quillDelta2.default().retain(index).delete(length));
|
||
}
|
||
}, {
|
||
key: 'formatLine',
|
||
value: function formatLine(index, length) {
|
||
var _this2 = this;
|
||
|
||
var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||
|
||
this.scroll.update();
|
||
Object.keys(formats).forEach(function (format) {
|
||
if (_this2.scroll.whitelist != null && !_this2.scroll.whitelist[format]) return;
|
||
var lines = _this2.scroll.lines(index, Math.max(length, 1));
|
||
var lengthRemaining = length;
|
||
lines.forEach(function (line) {
|
||
var lineLength = line.length();
|
||
if (!(line instanceof _code2.default)) {
|
||
line.format(format, formats[format]);
|
||
} else {
|
||
var codeIndex = index - line.offset(_this2.scroll);
|
||
var codeLength = line.newlineIndex(codeIndex + lengthRemaining) - codeIndex + 1;
|
||
line.formatAt(codeIndex, codeLength, format, formats[format]);
|
||
}
|
||
lengthRemaining -= lineLength;
|
||
});
|
||
});
|
||
this.scroll.optimize();
|
||
return this.update(new _quillDelta2.default().retain(index).retain(length, (0, _clone2.default)(formats)));
|
||
}
|
||
}, {
|
||
key: 'formatText',
|
||
value: function formatText(index, length) {
|
||
var _this3 = this;
|
||
|
||
var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||
|
||
Object.keys(formats).forEach(function (format) {
|
||
_this3.scroll.formatAt(index, length, format, formats[format]);
|
||
});
|
||
return this.update(new _quillDelta2.default().retain(index).retain(length, (0, _clone2.default)(formats)));
|
||
}
|
||
}, {
|
||
key: 'getContents',
|
||
value: function getContents(index, length) {
|
||
return this.delta.slice(index, index + length);
|
||
}
|
||
}, {
|
||
key: 'getDelta',
|
||
value: function getDelta() {
|
||
return this.scroll.lines().reduce(function (delta, line) {
|
||
return delta.concat(line.delta());
|
||
}, new _quillDelta2.default());
|
||
}
|
||
}, {
|
||
key: 'getFormat',
|
||
value: function getFormat(index) {
|
||
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
||
|
||
var lines = [],
|
||
leaves = [];
|
||
if (length === 0) {
|
||
this.scroll.path(index).forEach(function (path) {
|
||
var _path = _slicedToArray(path, 1),
|
||
blot = _path[0];
|
||
|
||
if (blot instanceof _block2.default) {
|
||
lines.push(blot);
|
||
} else if (blot instanceof _parchment2.default.Leaf) {
|
||
leaves.push(blot);
|
||
}
|
||
});
|
||
} else {
|
||
lines = this.scroll.lines(index, length);
|
||
leaves = this.scroll.descendants(_parchment2.default.Leaf, index, length);
|
||
}
|
||
var formatsArr = [lines, leaves].map(function (blots) {
|
||
if (blots.length === 0) return {};
|
||
var formats = (0, _block.bubbleFormats)(blots.shift());
|
||
while (Object.keys(formats).length > 0) {
|
||
var blot = blots.shift();
|
||
if (blot == null) return formats;
|
||
formats = combineFormats((0, _block.bubbleFormats)(blot), formats);
|
||
}
|
||
return formats;
|
||
});
|
||
return _extend2.default.apply(_extend2.default, formatsArr);
|
||
}
|
||
}, {
|
||
key: 'getText',
|
||
value: function getText(index, length) {
|
||
return this.getContents(index, length).filter(function (op) {
|
||
return typeof op.insert === 'string';
|
||
}).map(function (op) {
|
||
return op.insert;
|
||
}).join('');
|
||
}
|
||
}, {
|
||
key: 'insertEmbed',
|
||
value: function insertEmbed(index, embed, value) {
|
||
this.scroll.insertAt(index, embed, value);
|
||
return this.update(new _quillDelta2.default().retain(index).insert(_defineProperty({}, embed, value)));
|
||
}
|
||
}, {
|
||
key: 'insertText',
|
||
value: function insertText(index, text) {
|
||
var _this4 = this;
|
||
|
||
var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||
|
||
text = text.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
||
this.scroll.insertAt(index, text);
|
||
Object.keys(formats).forEach(function (format) {
|
||
_this4.scroll.formatAt(index, text.length, format, formats[format]);
|
||
});
|
||
return this.update(new _quillDelta2.default().retain(index).insert(text, (0, _clone2.default)(formats)));
|
||
}
|
||
}, {
|
||
key: 'isBlank',
|
||
value: function isBlank() {
|
||
if (this.scroll.children.length == 0) return true;
|
||
if (this.scroll.children.length > 1) return false;
|
||
var block = this.scroll.children.head;
|
||
if (block.statics.blotName !== _block2.default.blotName) return false;
|
||
if (block.children.length > 1) return false;
|
||
return block.children.head instanceof _break2.default;
|
||
}
|
||
}, {
|
||
key: 'removeFormat',
|
||
value: function removeFormat(index, length) {
|
||
var text = this.getText(index, length);
|
||
|
||
var _scroll$line3 = this.scroll.line(index + length),
|
||
_scroll$line4 = _slicedToArray(_scroll$line3, 2),
|
||
line = _scroll$line4[0],
|
||
offset = _scroll$line4[1];
|
||
|
||
var suffixLength = 0,
|
||
suffix = new _quillDelta2.default();
|
||
if (line != null) {
|
||
if (!(line instanceof _code2.default)) {
|
||
suffixLength = line.length() - offset;
|
||
} else {
|
||
suffixLength = line.newlineIndex(offset) - offset + 1;
|
||
}
|
||
suffix = line.delta().slice(offset, offset + suffixLength - 1).insert('\n');
|
||
}
|
||
var contents = this.getContents(index, length + suffixLength);
|
||
var diff = contents.diff(new _quillDelta2.default().insert(text).concat(suffix));
|
||
var delta = new _quillDelta2.default().retain(index).concat(diff);
|
||
return this.applyDelta(delta);
|
||
}
|
||
}, {
|
||
key: 'update',
|
||
value: function update(change) {
|
||
var mutations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
||
var cursorIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
||
|
||
var oldDelta = this.delta;
|
||
if (mutations.length === 1 && mutations[0].type === 'characterData' && mutations[0].target.data.match(ASCII) && _parchment2.default.find(mutations[0].target)) {
|
||
// Optimization for character changes
|
||
var textBlot = _parchment2.default.find(mutations[0].target);
|
||
var formats = (0, _block.bubbleFormats)(textBlot);
|
||
var index = textBlot.offset(this.scroll);
|
||
var oldValue = mutations[0].oldValue.replace(_cursor2.default.CONTENTS, '');
|
||
var oldText = new _quillDelta2.default().insert(oldValue);
|
||
var newText = new _quillDelta2.default().insert(textBlot.value());
|
||
var diffDelta = new _quillDelta2.default().retain(index).concat(oldText.diff(newText, cursorIndex));
|
||
change = diffDelta.reduce(function (delta, op) {
|
||
if (op.insert) {
|
||
return delta.insert(op.insert, formats);
|
||
} else {
|
||
return delta.push(op);
|
||
}
|
||
}, new _quillDelta2.default());
|
||
this.delta = oldDelta.compose(change);
|
||
} else {
|
||
this.delta = this.getDelta();
|
||
if (!change || !(0, _deepEqual2.default)(oldDelta.compose(change), this.delta)) {
|
||
change = oldDelta.diff(this.delta, cursorIndex);
|
||
}
|
||
}
|
||
return change;
|
||
}
|
||
}]);
|
||
|
||
return Editor;
|
||
}();
|
||
|
||
function combineFormats(formats, combined) {
|
||
return Object.keys(combined).reduce(function (merged, name) {
|
||
if (formats[name] == null) return merged;
|
||
if (combined[name] === formats[name]) {
|
||
merged[name] = combined[name];
|
||
} else if (Array.isArray(combined[name])) {
|
||
if (combined[name].indexOf(formats[name]) < 0) {
|
||
merged[name] = combined[name].concat([formats[name]]);
|
||
}
|
||
} else {
|
||
merged[name] = [combined[name], formats[name]];
|
||
}
|
||
return merged;
|
||
}, {});
|
||
}
|
||
|
||
function normalizeDelta(delta) {
|
||
return delta.reduce(function (delta, op) {
|
||
if (op.insert === 1) {
|
||
var attributes = (0, _clone2.default)(op.attributes);
|
||
delete attributes['image'];
|
||
return delta.insert({ image: op.attributes.image }, attributes);
|
||
}
|
||
if (op.attributes != null && (op.attributes.list === true || op.attributes.bullet === true)) {
|
||
op = (0, _clone2.default)(op);
|
||
if (op.attributes.list) {
|
||
op.attributes.list = 'ordered';
|
||
} else {
|
||
op.attributes.list = 'bullet';
|
||
delete op.attributes.bullet;
|
||
}
|
||
}
|
||
if (typeof op.insert === 'string') {
|
||
var text = op.insert.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
||
return delta.insert(text, op.attributes);
|
||
}
|
||
return delta.push(op);
|
||
}, new _quillDelta2.default());
|
||
}
|
||
|
||
exports.default = Editor;
|
||
|
||
/***/ }),
|
||
/* 15 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = exports.Range = undefined;
|
||
|
||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _clone = __webpack_require__(21);
|
||
|
||
var _clone2 = _interopRequireDefault(_clone);
|
||
|
||
var _deepEqual = __webpack_require__(11);
|
||
|
||
var _deepEqual2 = _interopRequireDefault(_deepEqual);
|
||
|
||
var _emitter3 = __webpack_require__(8);
|
||
|
||
var _emitter4 = _interopRequireDefault(_emitter3);
|
||
|
||
var _logger = __webpack_require__(10);
|
||
|
||
var _logger2 = _interopRequireDefault(_logger);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
var debug = (0, _logger2.default)('quill:selection');
|
||
|
||
var Range = function Range(index) {
|
||
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
||
|
||
_classCallCheck(this, Range);
|
||
|
||
this.index = index;
|
||
this.length = length;
|
||
};
|
||
|
||
var Selection = function () {
|
||
function Selection(scroll, emitter) {
|
||
var _this = this;
|
||
|
||
_classCallCheck(this, Selection);
|
||
|
||
this.emitter = emitter;
|
||
this.scroll = scroll;
|
||
this.composing = false;
|
||
this.mouseDown = false;
|
||
this.root = this.scroll.domNode;
|
||
this.cursor = _parchment2.default.create('cursor', this);
|
||
// savedRange is last non-null range
|
||
this.lastRange = this.savedRange = new Range(0, 0);
|
||
this.handleComposition();
|
||
this.handleDragging();
|
||
this.emitter.listenDOM('selectionchange', document, function () {
|
||
if (!_this.mouseDown) {
|
||
setTimeout(_this.update.bind(_this, _emitter4.default.sources.USER), 1);
|
||
}
|
||
});
|
||
this.emitter.on(_emitter4.default.events.EDITOR_CHANGE, function (type, delta) {
|
||
if (type === _emitter4.default.events.TEXT_CHANGE && delta.length() > 0) {
|
||
_this.update(_emitter4.default.sources.SILENT);
|
||
}
|
||
});
|
||
this.emitter.on(_emitter4.default.events.SCROLL_BEFORE_UPDATE, function () {
|
||
if (!_this.hasFocus()) return;
|
||
var native = _this.getNativeRange();
|
||
if (native == null) return;
|
||
if (native.start.node === _this.cursor.textNode) return; // cursor.restore() will handle
|
||
// TODO unclear if this has negative side effects
|
||
_this.emitter.once(_emitter4.default.events.SCROLL_UPDATE, function () {
|
||
try {
|
||
_this.setNativeRange(native.start.node, native.start.offset, native.end.node, native.end.offset);
|
||
} catch (ignored) {}
|
||
});
|
||
});
|
||
this.emitter.on(_emitter4.default.events.SCROLL_OPTIMIZE, function (mutations, context) {
|
||
if (context.range) {
|
||
var _context$range = context.range,
|
||
startNode = _context$range.startNode,
|
||
startOffset = _context$range.startOffset,
|
||
endNode = _context$range.endNode,
|
||
endOffset = _context$range.endOffset;
|
||
|
||
_this.setNativeRange(startNode, startOffset, endNode, endOffset);
|
||
}
|
||
});
|
||
this.update(_emitter4.default.sources.SILENT);
|
||
}
|
||
|
||
_createClass(Selection, [{
|
||
key: 'handleComposition',
|
||
value: function handleComposition() {
|
||
var _this2 = this;
|
||
|
||
this.root.addEventListener('compositionstart', function () {
|
||
_this2.composing = true;
|
||
});
|
||
this.root.addEventListener('compositionend', function () {
|
||
_this2.composing = false;
|
||
if (_this2.cursor.parent) {
|
||
var range = _this2.cursor.restore();
|
||
if (!range) return;
|
||
setTimeout(function () {
|
||
_this2.setNativeRange(range.startNode, range.startOffset, range.endNode, range.endOffset);
|
||
}, 1);
|
||
}
|
||
});
|
||
}
|
||
}, {
|
||
key: 'handleDragging',
|
||
value: function handleDragging() {
|
||
var _this3 = this;
|
||
|
||
this.emitter.listenDOM('mousedown', document.body, function () {
|
||
_this3.mouseDown = true;
|
||
});
|
||
this.emitter.listenDOM('mouseup', document.body, function () {
|
||
_this3.mouseDown = false;
|
||
_this3.update(_emitter4.default.sources.USER);
|
||
});
|
||
}
|
||
}, {
|
||
key: 'focus',
|
||
value: function focus() {
|
||
if (this.hasFocus()) return;
|
||
this.root.focus();
|
||
this.setRange(this.savedRange);
|
||
}
|
||
}, {
|
||
key: 'format',
|
||
value: function format(_format, value) {
|
||
if (this.scroll.whitelist != null && !this.scroll.whitelist[_format]) return;
|
||
this.scroll.update();
|
||
var nativeRange = this.getNativeRange();
|
||
if (nativeRange == null || !nativeRange.native.collapsed || _parchment2.default.query(_format, _parchment2.default.Scope.BLOCK)) return;
|
||
if (nativeRange.start.node !== this.cursor.textNode) {
|
||
var blot = _parchment2.default.find(nativeRange.start.node, false);
|
||
if (blot == null) return;
|
||
// TODO Give blot ability to not split
|
||
if (blot instanceof _parchment2.default.Leaf) {
|
||
var after = blot.split(nativeRange.start.offset);
|
||
blot.parent.insertBefore(this.cursor, after);
|
||
} else {
|
||
blot.insertBefore(this.cursor, nativeRange.start.node); // Should never happen
|
||
}
|
||
this.cursor.attach();
|
||
}
|
||
this.cursor.format(_format, value);
|
||
this.scroll.optimize();
|
||
this.setNativeRange(this.cursor.textNode, this.cursor.textNode.data.length);
|
||
this.update();
|
||
}
|
||
}, {
|
||
key: 'getBounds',
|
||
value: function getBounds(index) {
|
||
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
||
|
||
var scrollLength = this.scroll.length();
|
||
index = Math.min(index, scrollLength - 1);
|
||
length = Math.min(index + length, scrollLength - 1) - index;
|
||
var node = void 0,
|
||
_scroll$leaf = this.scroll.leaf(index),
|
||
_scroll$leaf2 = _slicedToArray(_scroll$leaf, 2),
|
||
leaf = _scroll$leaf2[0],
|
||
offset = _scroll$leaf2[1];
|
||
if (leaf == null) return null;
|
||
|
||
var _leaf$position = leaf.position(offset, true);
|
||
|
||
var _leaf$position2 = _slicedToArray(_leaf$position, 2);
|
||
|
||
node = _leaf$position2[0];
|
||
offset = _leaf$position2[1];
|
||
|
||
var range = document.createRange();
|
||
if (length > 0) {
|
||
range.setStart(node, offset);
|
||
|
||
var _scroll$leaf3 = this.scroll.leaf(index + length);
|
||
|
||
var _scroll$leaf4 = _slicedToArray(_scroll$leaf3, 2);
|
||
|
||
leaf = _scroll$leaf4[0];
|
||
offset = _scroll$leaf4[1];
|
||
|
||
if (leaf == null) return null;
|
||
|
||
var _leaf$position3 = leaf.position(offset, true);
|
||
|
||
var _leaf$position4 = _slicedToArray(_leaf$position3, 2);
|
||
|
||
node = _leaf$position4[0];
|
||
offset = _leaf$position4[1];
|
||
|
||
range.setEnd(node, offset);
|
||
return range.getBoundingClientRect();
|
||
} else {
|
||
var side = 'left';
|
||
var rect = void 0;
|
||
if (node instanceof Text) {
|
||
if (offset < node.data.length) {
|
||
range.setStart(node, offset);
|
||
range.setEnd(node, offset + 1);
|
||
} else {
|
||
range.setStart(node, offset - 1);
|
||
range.setEnd(node, offset);
|
||
side = 'right';
|
||
}
|
||
rect = range.getBoundingClientRect();
|
||
} else {
|
||
rect = leaf.domNode.getBoundingClientRect();
|
||
if (offset > 0) side = 'right';
|
||
}
|
||
return {
|
||
bottom: rect.top + rect.height,
|
||
height: rect.height,
|
||
left: rect[side],
|
||
right: rect[side],
|
||
top: rect.top,
|
||
width: 0
|
||
};
|
||
}
|
||
}
|
||
}, {
|
||
key: 'getNativeRange',
|
||
value: function getNativeRange() {
|
||
var selection = document.getSelection();
|
||
if (selection == null || selection.rangeCount <= 0) return null;
|
||
var nativeRange = selection.getRangeAt(0);
|
||
if (nativeRange == null) return null;
|
||
var range = this.normalizeNative(nativeRange);
|
||
debug.info('getNativeRange', range);
|
||
return range;
|
||
}
|
||
}, {
|
||
key: 'getRange',
|
||
value: function getRange() {
|
||
var normalized = this.getNativeRange();
|
||
if (normalized == null) return [null, null];
|
||
var range = this.normalizedToRange(normalized);
|
||
return [range, normalized];
|
||
}
|
||
}, {
|
||
key: 'hasFocus',
|
||
value: function hasFocus() {
|
||
return document.activeElement === this.root;
|
||
}
|
||
}, {
|
||
key: 'normalizedToRange',
|
||
value: function normalizedToRange(range) {
|
||
var _this4 = this;
|
||
|
||
var positions = [[range.start.node, range.start.offset]];
|
||
if (!range.native.collapsed) {
|
||
positions.push([range.end.node, range.end.offset]);
|
||
}
|
||
var indexes = positions.map(function (position) {
|
||
var _position = _slicedToArray(position, 2),
|
||
node = _position[0],
|
||
offset = _position[1];
|
||
|
||
var blot = _parchment2.default.find(node, true);
|
||
var index = blot.offset(_this4.scroll);
|
||
if (offset === 0) {
|
||
return index;
|
||
} else if (blot instanceof _parchment2.default.Container) {
|
||
return index + blot.length();
|
||
} else {
|
||
return index + blot.index(node, offset);
|
||
}
|
||
});
|
||
var end = Math.min(Math.max.apply(Math, _toConsumableArray(indexes)), this.scroll.length() - 1);
|
||
var start = Math.min.apply(Math, [end].concat(_toConsumableArray(indexes)));
|
||
return new Range(start, end - start);
|
||
}
|
||
}, {
|
||
key: 'normalizeNative',
|
||
value: function normalizeNative(nativeRange) {
|
||
if (!contains(this.root, nativeRange.startContainer) || !nativeRange.collapsed && !contains(this.root, nativeRange.endContainer)) {
|
||
return null;
|
||
}
|
||
var range = {
|
||
start: { node: nativeRange.startContainer, offset: nativeRange.startOffset },
|
||
end: { node: nativeRange.endContainer, offset: nativeRange.endOffset },
|
||
native: nativeRange
|
||
};
|
||
[range.start, range.end].forEach(function (position) {
|
||
var node = position.node,
|
||
offset = position.offset;
|
||
while (!(node instanceof Text) && node.childNodes.length > 0) {
|
||
if (node.childNodes.length > offset) {
|
||
node = node.childNodes[offset];
|
||
offset = 0;
|
||
} else if (node.childNodes.length === offset) {
|
||
node = node.lastChild;
|
||
offset = node instanceof Text ? node.data.length : node.childNodes.length + 1;
|
||
} else {
|
||
break;
|
||
}
|
||
}
|
||
position.node = node, position.offset = offset;
|
||
});
|
||
return range;
|
||
}
|
||
}, {
|
||
key: 'rangeToNative',
|
||
value: function rangeToNative(range) {
|
||
var _this5 = this;
|
||
|
||
var indexes = range.collapsed ? [range.index] : [range.index, range.index + range.length];
|
||
var args = [];
|
||
var scrollLength = this.scroll.length();
|
||
indexes.forEach(function (index, i) {
|
||
index = Math.min(scrollLength - 1, index);
|
||
var node = void 0,
|
||
_scroll$leaf5 = _this5.scroll.leaf(index),
|
||
_scroll$leaf6 = _slicedToArray(_scroll$leaf5, 2),
|
||
leaf = _scroll$leaf6[0],
|
||
offset = _scroll$leaf6[1];
|
||
var _leaf$position5 = leaf.position(offset, i !== 0);
|
||
|
||
var _leaf$position6 = _slicedToArray(_leaf$position5, 2);
|
||
|
||
node = _leaf$position6[0];
|
||
offset = _leaf$position6[1];
|
||
|
||
args.push(node, offset);
|
||
});
|
||
if (args.length < 2) {
|
||
args = args.concat(args);
|
||
}
|
||
return args;
|
||
}
|
||
}, {
|
||
key: 'scrollIntoView',
|
||
value: function scrollIntoView(scrollingContainer) {
|
||
var range = this.lastRange;
|
||
if (range == null) return;
|
||
var bounds = this.getBounds(range.index, range.length);
|
||
if (bounds == null) return;
|
||
var limit = this.scroll.length() - 1;
|
||
|
||
var _scroll$line = this.scroll.line(Math.min(range.index, limit)),
|
||
_scroll$line2 = _slicedToArray(_scroll$line, 1),
|
||
first = _scroll$line2[0];
|
||
|
||
var last = first;
|
||
if (range.length > 0) {
|
||
var _scroll$line3 = this.scroll.line(Math.min(range.index + range.length, limit));
|
||
|
||
var _scroll$line4 = _slicedToArray(_scroll$line3, 1);
|
||
|
||
last = _scroll$line4[0];
|
||
}
|
||
if (first == null || last == null) return;
|
||
var scrollBounds = scrollingContainer.getBoundingClientRect();
|
||
if (bounds.top < scrollBounds.top) {
|
||
scrollingContainer.scrollTop -= scrollBounds.top - bounds.top;
|
||
} else if (bounds.bottom > scrollBounds.bottom) {
|
||
scrollingContainer.scrollTop += bounds.bottom - scrollBounds.bottom;
|
||
}
|
||
}
|
||
}, {
|
||
key: 'setNativeRange',
|
||
value: function setNativeRange(startNode, startOffset) {
|
||
var endNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : startNode;
|
||
var endOffset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : startOffset;
|
||
var force = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
||
|
||
debug.info('setNativeRange', startNode, startOffset, endNode, endOffset);
|
||
if (startNode != null && (this.root.parentNode == null || startNode.parentNode == null || endNode.parentNode == null)) {
|
||
return;
|
||
}
|
||
var selection = document.getSelection();
|
||
if (selection == null) return;
|
||
if (startNode != null) {
|
||
if (!this.hasFocus()) this.root.focus();
|
||
var native = (this.getNativeRange() || {}).native;
|
||
if (native == null || force || startNode !== native.startContainer || startOffset !== native.startOffset || endNode !== native.endContainer || endOffset !== native.endOffset) {
|
||
|
||
if (startNode.tagName == "BR") {
|
||
startOffset = [].indexOf.call(startNode.parentNode.childNodes, startNode);
|
||
startNode = startNode.parentNode;
|
||
}
|
||
if (endNode.tagName == "BR") {
|
||
endOffset = [].indexOf.call(endNode.parentNode.childNodes, endNode);
|
||
endNode = endNode.parentNode;
|
||
}
|
||
var range = document.createRange();
|
||
range.setStart(startNode, startOffset);
|
||
range.setEnd(endNode, endOffset);
|
||
selection.removeAllRanges();
|
||
selection.addRange(range);
|
||
}
|
||
} else {
|
||
selection.removeAllRanges();
|
||
this.root.blur();
|
||
document.body.focus(); // root.blur() not enough on IE11+Travis+SauceLabs (but not local VMs)
|
||
}
|
||
}
|
||
}, {
|
||
key: 'setRange',
|
||
value: function setRange(range) {
|
||
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
||
var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emitter4.default.sources.API;
|
||
|
||
if (typeof force === 'string') {
|
||
source = force;
|
||
force = false;
|
||
}
|
||
debug.info('setRange', range);
|
||
if (range != null) {
|
||
var args = this.rangeToNative(range);
|
||
this.setNativeRange.apply(this, _toConsumableArray(args).concat([force]));
|
||
} else {
|
||
this.setNativeRange(null);
|
||
}
|
||
this.update(source);
|
||
}
|
||
}, {
|
||
key: 'update',
|
||
value: function update() {
|
||
var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emitter4.default.sources.USER;
|
||
|
||
var oldRange = this.lastRange;
|
||
|
||
var _getRange = this.getRange(),
|
||
_getRange2 = _slicedToArray(_getRange, 2),
|
||
lastRange = _getRange2[0],
|
||
nativeRange = _getRange2[1];
|
||
|
||
this.lastRange = lastRange;
|
||
if (this.lastRange != null) {
|
||
this.savedRange = this.lastRange;
|
||
}
|
||
if (!(0, _deepEqual2.default)(oldRange, this.lastRange)) {
|
||
var _emitter;
|
||
|
||
if (!this.composing && nativeRange != null && nativeRange.native.collapsed && nativeRange.start.node !== this.cursor.textNode) {
|
||
this.cursor.restore();
|
||
}
|
||
var args = [_emitter4.default.events.SELECTION_CHANGE, (0, _clone2.default)(this.lastRange), (0, _clone2.default)(oldRange), source];
|
||
(_emitter = this.emitter).emit.apply(_emitter, [_emitter4.default.events.EDITOR_CHANGE].concat(args));
|
||
if (source !== _emitter4.default.sources.SILENT) {
|
||
var _emitter2;
|
||
|
||
(_emitter2 = this.emitter).emit.apply(_emitter2, args);
|
||
}
|
||
}
|
||
}
|
||
}]);
|
||
|
||
return Selection;
|
||
}();
|
||
|
||
function contains(parent, descendant) {
|
||
try {
|
||
// Firefox inserts inaccessible nodes around video elements
|
||
descendant.parentNode;
|
||
} catch (e) {
|
||
return false;
|
||
}
|
||
// IE11 has bug with Text nodes
|
||
// https://connect.microsoft.com/IE/feedback/details/780874/node-contains-is-incorrect
|
||
if (descendant instanceof Text) {
|
||
descendant = descendant.parentNode;
|
||
}
|
||
return parent.contains(descendant);
|
||
}
|
||
|
||
exports.Range = Range;
|
||
exports.default = Selection;
|
||
|
||
/***/ }),
|
||
/* 16 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var Break = function (_Parchment$Embed) {
|
||
_inherits(Break, _Parchment$Embed);
|
||
|
||
function Break() {
|
||
_classCallCheck(this, Break);
|
||
|
||
return _possibleConstructorReturn(this, (Break.__proto__ || Object.getPrototypeOf(Break)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(Break, [{
|
||
key: 'insertInto',
|
||
value: function insertInto(parent, ref) {
|
||
if (parent.children.length === 0) {
|
||
_get(Break.prototype.__proto__ || Object.getPrototypeOf(Break.prototype), 'insertInto', this).call(this, parent, ref);
|
||
} else {
|
||
this.remove();
|
||
}
|
||
}
|
||
}, {
|
||
key: 'length',
|
||
value: function length() {
|
||
return 0;
|
||
}
|
||
}, {
|
||
key: 'value',
|
||
value: function value() {
|
||
return '';
|
||
}
|
||
}], [{
|
||
key: 'value',
|
||
value: function value() {
|
||
return undefined;
|
||
}
|
||
}]);
|
||
|
||
return Break;
|
||
}(_parchment2.default.Embed);
|
||
|
||
Break.blotName = 'break';
|
||
Break.tagName = 'BR';
|
||
|
||
exports.default = Break;
|
||
|
||
/***/ }),
|
||
/* 17 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
var __extends = (this && this.__extends) || (function () {
|
||
var extendStatics = Object.setPrototypeOf ||
|
||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||
return function (d, b) {
|
||
extendStatics(d, b);
|
||
function __() { this.constructor = d; }
|
||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
};
|
||
})();
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var linked_list_1 = __webpack_require__(44);
|
||
var shadow_1 = __webpack_require__(30);
|
||
var Registry = __webpack_require__(1);
|
||
var ContainerBlot = /** @class */ (function (_super) {
|
||
__extends(ContainerBlot, _super);
|
||
function ContainerBlot(domNode) {
|
||
var _this = _super.call(this, domNode) || this;
|
||
_this.build();
|
||
return _this;
|
||
}
|
||
ContainerBlot.prototype.appendChild = function (other) {
|
||
this.insertBefore(other);
|
||
};
|
||
ContainerBlot.prototype.attach = function () {
|
||
_super.prototype.attach.call(this);
|
||
this.children.forEach(function (child) {
|
||
child.attach();
|
||
});
|
||
};
|
||
ContainerBlot.prototype.build = function () {
|
||
var _this = this;
|
||
this.children = new linked_list_1.default();
|
||
// Need to be reversed for if DOM nodes already in order
|
||
[].slice
|
||
.call(this.domNode.childNodes)
|
||
.reverse()
|
||
.forEach(function (node) {
|
||
try {
|
||
var child = makeBlot(node);
|
||
_this.insertBefore(child, _this.children.head || undefined);
|
||
}
|
||
catch (err) {
|
||
if (err instanceof Registry.ParchmentError)
|
||
return;
|
||
else
|
||
throw err;
|
||
}
|
||
});
|
||
};
|
||
ContainerBlot.prototype.deleteAt = function (index, length) {
|
||
if (index === 0 && length === this.length()) {
|
||
return this.remove();
|
||
}
|
||
this.children.forEachAt(index, length, function (child, offset, length) {
|
||
child.deleteAt(offset, length);
|
||
});
|
||
};
|
||
ContainerBlot.prototype.descendant = function (criteria, index) {
|
||
var _a = this.children.find(index), child = _a[0], offset = _a[1];
|
||
if ((criteria.blotName == null && criteria(child)) ||
|
||
(criteria.blotName != null && child instanceof criteria)) {
|
||
return [child, offset];
|
||
}
|
||
else if (child instanceof ContainerBlot) {
|
||
return child.descendant(criteria, offset);
|
||
}
|
||
else {
|
||
return [null, -1];
|
||
}
|
||
};
|
||
ContainerBlot.prototype.descendants = function (criteria, index, length) {
|
||
if (index === void 0) { index = 0; }
|
||
if (length === void 0) { length = Number.MAX_VALUE; }
|
||
var descendants = [];
|
||
var lengthLeft = length;
|
||
this.children.forEachAt(index, length, function (child, index, length) {
|
||
if ((criteria.blotName == null && criteria(child)) ||
|
||
(criteria.blotName != null && child instanceof criteria)) {
|
||
descendants.push(child);
|
||
}
|
||
if (child instanceof ContainerBlot) {
|
||
descendants = descendants.concat(child.descendants(criteria, index, lengthLeft));
|
||
}
|
||
lengthLeft -= length;
|
||
});
|
||
return descendants;
|
||
};
|
||
ContainerBlot.prototype.detach = function () {
|
||
this.children.forEach(function (child) {
|
||
child.detach();
|
||
});
|
||
_super.prototype.detach.call(this);
|
||
};
|
||
ContainerBlot.prototype.formatAt = function (index, length, name, value) {
|
||
this.children.forEachAt(index, length, function (child, offset, length) {
|
||
child.formatAt(offset, length, name, value);
|
||
});
|
||
};
|
||
ContainerBlot.prototype.insertAt = function (index, value, def) {
|
||
var _a = this.children.find(index), child = _a[0], offset = _a[1];
|
||
if (child) {
|
||
child.insertAt(offset, value, def);
|
||
}
|
||
else {
|
||
var blot = def == null ? Registry.create('text', value) : Registry.create(value, def);
|
||
this.appendChild(blot);
|
||
}
|
||
};
|
||
ContainerBlot.prototype.insertBefore = function (childBlot, refBlot) {
|
||
if (this.statics.allowedChildren != null &&
|
||
!this.statics.allowedChildren.some(function (child) {
|
||
return childBlot instanceof child;
|
||
})) {
|
||
throw new Registry.ParchmentError("Cannot insert " + childBlot.statics.blotName + " into " + this.statics.blotName);
|
||
}
|
||
childBlot.insertInto(this, refBlot);
|
||
};
|
||
ContainerBlot.prototype.length = function () {
|
||
return this.children.reduce(function (memo, child) {
|
||
return memo + child.length();
|
||
}, 0);
|
||
};
|
||
ContainerBlot.prototype.moveChildren = function (targetParent, refNode) {
|
||
this.children.forEach(function (child) {
|
||
targetParent.insertBefore(child, refNode);
|
||
});
|
||
};
|
||
ContainerBlot.prototype.optimize = function (context) {
|
||
_super.prototype.optimize.call(this, context);
|
||
if (this.children.length === 0) {
|
||
if (this.statics.defaultChild != null) {
|
||
var child = Registry.create(this.statics.defaultChild);
|
||
this.appendChild(child);
|
||
child.optimize(context);
|
||
}
|
||
else {
|
||
this.remove();
|
||
}
|
||
}
|
||
};
|
||
ContainerBlot.prototype.path = function (index, inclusive) {
|
||
if (inclusive === void 0) { inclusive = false; }
|
||
var _a = this.children.find(index, inclusive), child = _a[0], offset = _a[1];
|
||
var position = [[this, index]];
|
||
if (child instanceof ContainerBlot) {
|
||
return position.concat(child.path(offset, inclusive));
|
||
}
|
||
else if (child != null) {
|
||
position.push([child, offset]);
|
||
}
|
||
return position;
|
||
};
|
||
ContainerBlot.prototype.removeChild = function (child) {
|
||
this.children.remove(child);
|
||
};
|
||
ContainerBlot.prototype.replace = function (target) {
|
||
if (target instanceof ContainerBlot) {
|
||
target.moveChildren(this);
|
||
}
|
||
_super.prototype.replace.call(this, target);
|
||
};
|
||
ContainerBlot.prototype.split = function (index, force) {
|
||
if (force === void 0) { force = false; }
|
||
if (!force) {
|
||
if (index === 0)
|
||
return this;
|
||
if (index === this.length())
|
||
return this.next;
|
||
}
|
||
var after = this.clone();
|
||
this.parent.insertBefore(after, this.next);
|
||
this.children.forEachAt(index, this.length(), function (child, offset, length) {
|
||
child = child.split(offset, force);
|
||
after.appendChild(child);
|
||
});
|
||
return after;
|
||
};
|
||
ContainerBlot.prototype.unwrap = function () {
|
||
this.moveChildren(this.parent, this.next);
|
||
this.remove();
|
||
};
|
||
ContainerBlot.prototype.update = function (mutations, context) {
|
||
var _this = this;
|
||
var addedNodes = [];
|
||
var removedNodes = [];
|
||
mutations.forEach(function (mutation) {
|
||
if (mutation.target === _this.domNode && mutation.type === 'childList') {
|
||
addedNodes.push.apply(addedNodes, mutation.addedNodes);
|
||
removedNodes.push.apply(removedNodes, mutation.removedNodes);
|
||
}
|
||
});
|
||
removedNodes.forEach(function (node) {
|
||
// Check node has actually been removed
|
||
// One exception is Chrome does not immediately remove IFRAMEs
|
||
// from DOM but MutationRecord is correct in its reported removal
|
||
if (node.parentNode != null &&
|
||
// @ts-ignore
|
||
node.tagName !== 'IFRAME' &&
|
||
document.body.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) {
|
||
return;
|
||
}
|
||
var blot = Registry.find(node);
|
||
if (blot == null)
|
||
return;
|
||
if (blot.domNode.parentNode == null || blot.domNode.parentNode === _this.domNode) {
|
||
blot.detach();
|
||
}
|
||
});
|
||
addedNodes
|
||
.filter(function (node) {
|
||
return node.parentNode == _this.domNode;
|
||
})
|
||
.sort(function (a, b) {
|
||
if (a === b)
|
||
return 0;
|
||
if (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING) {
|
||
return 1;
|
||
}
|
||
return -1;
|
||
})
|
||
.forEach(function (node) {
|
||
var refBlot = null;
|
||
if (node.nextSibling != null) {
|
||
refBlot = Registry.find(node.nextSibling);
|
||
}
|
||
var blot = makeBlot(node);
|
||
if (blot.next != refBlot || blot.next == null) {
|
||
if (blot.parent != null) {
|
||
blot.parent.removeChild(_this);
|
||
}
|
||
_this.insertBefore(blot, refBlot || undefined);
|
||
}
|
||
});
|
||
};
|
||
return ContainerBlot;
|
||
}(shadow_1.default));
|
||
function makeBlot(node) {
|
||
var blot = Registry.find(node);
|
||
if (blot == null) {
|
||
try {
|
||
blot = Registry.create(node);
|
||
}
|
||
catch (e) {
|
||
blot = Registry.create(Registry.Scope.INLINE);
|
||
[].slice.call(node.childNodes).forEach(function (child) {
|
||
// @ts-ignore
|
||
blot.domNode.appendChild(child);
|
||
});
|
||
if (node.parentNode) {
|
||
node.parentNode.replaceChild(blot.domNode, node);
|
||
}
|
||
blot.attach();
|
||
}
|
||
}
|
||
return blot;
|
||
}
|
||
exports.default = ContainerBlot;
|
||
|
||
|
||
/***/ }),
|
||
/* 18 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
var __extends = (this && this.__extends) || (function () {
|
||
var extendStatics = Object.setPrototypeOf ||
|
||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||
return function (d, b) {
|
||
extendStatics(d, b);
|
||
function __() { this.constructor = d; }
|
||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
};
|
||
})();
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var attributor_1 = __webpack_require__(12);
|
||
var store_1 = __webpack_require__(31);
|
||
var container_1 = __webpack_require__(17);
|
||
var Registry = __webpack_require__(1);
|
||
var FormatBlot = /** @class */ (function (_super) {
|
||
__extends(FormatBlot, _super);
|
||
function FormatBlot(domNode) {
|
||
var _this = _super.call(this, domNode) || this;
|
||
_this.attributes = new store_1.default(_this.domNode);
|
||
return _this;
|
||
}
|
||
FormatBlot.formats = function (domNode) {
|
||
if (typeof this.tagName === 'string') {
|
||
return true;
|
||
}
|
||
else if (Array.isArray(this.tagName)) {
|
||
return domNode.tagName.toLowerCase();
|
||
}
|
||
return undefined;
|
||
};
|
||
FormatBlot.prototype.format = function (name, value) {
|
||
var format = Registry.query(name);
|
||
if (format instanceof attributor_1.default) {
|
||
this.attributes.attribute(format, value);
|
||
}
|
||
else if (value) {
|
||
if (format != null && (name !== this.statics.blotName || this.formats()[name] !== value)) {
|
||
this.replaceWith(name, value);
|
||
}
|
||
}
|
||
};
|
||
FormatBlot.prototype.formats = function () {
|
||
var formats = this.attributes.values();
|
||
var format = this.statics.formats(this.domNode);
|
||
if (format != null) {
|
||
formats[this.statics.blotName] = format;
|
||
}
|
||
return formats;
|
||
};
|
||
FormatBlot.prototype.replaceWith = function (name, value) {
|
||
var replacement = _super.prototype.replaceWith.call(this, name, value);
|
||
this.attributes.copy(replacement);
|
||
return replacement;
|
||
};
|
||
FormatBlot.prototype.update = function (mutations, context) {
|
||
var _this = this;
|
||
_super.prototype.update.call(this, mutations, context);
|
||
if (mutations.some(function (mutation) {
|
||
return mutation.target === _this.domNode && mutation.type === 'attributes';
|
||
})) {
|
||
this.attributes.build();
|
||
}
|
||
};
|
||
FormatBlot.prototype.wrap = function (name, value) {
|
||
var wrapper = _super.prototype.wrap.call(this, name, value);
|
||
if (wrapper instanceof FormatBlot && wrapper.statics.scope === this.statics.scope) {
|
||
this.attributes.move(wrapper);
|
||
}
|
||
return wrapper;
|
||
};
|
||
return FormatBlot;
|
||
}(container_1.default));
|
||
exports.default = FormatBlot;
|
||
|
||
|
||
/***/ }),
|
||
/* 19 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
var __extends = (this && this.__extends) || (function () {
|
||
var extendStatics = Object.setPrototypeOf ||
|
||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||
return function (d, b) {
|
||
extendStatics(d, b);
|
||
function __() { this.constructor = d; }
|
||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
};
|
||
})();
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var shadow_1 = __webpack_require__(30);
|
||
var Registry = __webpack_require__(1);
|
||
var LeafBlot = /** @class */ (function (_super) {
|
||
__extends(LeafBlot, _super);
|
||
function LeafBlot() {
|
||
return _super !== null && _super.apply(this, arguments) || this;
|
||
}
|
||
LeafBlot.value = function (domNode) {
|
||
return true;
|
||
};
|
||
LeafBlot.prototype.index = function (node, offset) {
|
||
if (this.domNode === node ||
|
||
this.domNode.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) {
|
||
return Math.min(offset, 1);
|
||
}
|
||
return -1;
|
||
};
|
||
LeafBlot.prototype.position = function (index, inclusive) {
|
||
var offset = [].indexOf.call(this.parent.domNode.childNodes, this.domNode);
|
||
if (index > 0)
|
||
offset += 1;
|
||
return [this.parent.domNode, offset];
|
||
};
|
||
LeafBlot.prototype.value = function () {
|
||
var _a;
|
||
return _a = {}, _a[this.statics.blotName] = this.statics.value(this.domNode) || true, _a;
|
||
};
|
||
LeafBlot.scope = Registry.Scope.INLINE_BLOT;
|
||
return LeafBlot;
|
||
}(shadow_1.default));
|
||
exports.default = LeafBlot;
|
||
|
||
|
||
/***/ }),
|
||
/* 20 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var equal = __webpack_require__(11);
|
||
var extend = __webpack_require__(3);
|
||
|
||
|
||
var lib = {
|
||
attributes: {
|
||
compose: function (a, b, keepNull) {
|
||
if (typeof a !== 'object') a = {};
|
||
if (typeof b !== 'object') b = {};
|
||
var attributes = extend(true, {}, b);
|
||
if (!keepNull) {
|
||
attributes = Object.keys(attributes).reduce(function (copy, key) {
|
||
if (attributes[key] != null) {
|
||
copy[key] = attributes[key];
|
||
}
|
||
return copy;
|
||
}, {});
|
||
}
|
||
for (var key in a) {
|
||
if (a[key] !== undefined && b[key] === undefined) {
|
||
attributes[key] = a[key];
|
||
}
|
||
}
|
||
return Object.keys(attributes).length > 0 ? attributes : undefined;
|
||
},
|
||
|
||
diff: function(a, b) {
|
||
if (typeof a !== 'object') a = {};
|
||
if (typeof b !== 'object') b = {};
|
||
var attributes = Object.keys(a).concat(Object.keys(b)).reduce(function (attributes, key) {
|
||
if (!equal(a[key], b[key])) {
|
||
attributes[key] = b[key] === undefined ? null : b[key];
|
||
}
|
||
return attributes;
|
||
}, {});
|
||
return Object.keys(attributes).length > 0 ? attributes : undefined;
|
||
},
|
||
|
||
transform: function (a, b, priority) {
|
||
if (typeof a !== 'object') return b;
|
||
if (typeof b !== 'object') return undefined;
|
||
if (!priority) return b; // b simply overwrites us without priority
|
||
var attributes = Object.keys(b).reduce(function (attributes, key) {
|
||
if (a[key] === undefined) attributes[key] = b[key]; // null is a valid value
|
||
return attributes;
|
||
}, {});
|
||
return Object.keys(attributes).length > 0 ? attributes : undefined;
|
||
}
|
||
},
|
||
|
||
iterator: function (ops) {
|
||
return new Iterator(ops);
|
||
},
|
||
|
||
length: function (op) {
|
||
if (typeof op['delete'] === 'number') {
|
||
return op['delete'];
|
||
} else if (typeof op.retain === 'number') {
|
||
return op.retain;
|
||
} else {
|
||
return typeof op.insert === 'string' ? op.insert.length : 1;
|
||
}
|
||
}
|
||
};
|
||
|
||
|
||
function Iterator(ops) {
|
||
this.ops = ops;
|
||
this.index = 0;
|
||
this.offset = 0;
|
||
};
|
||
|
||
Iterator.prototype.hasNext = function () {
|
||
return this.peekLength() < Infinity;
|
||
};
|
||
|
||
Iterator.prototype.next = function (length) {
|
||
if (!length) length = Infinity;
|
||
var nextOp = this.ops[this.index];
|
||
if (nextOp) {
|
||
var offset = this.offset;
|
||
var opLength = lib.length(nextOp)
|
||
if (length >= opLength - offset) {
|
||
length = opLength - offset;
|
||
this.index += 1;
|
||
this.offset = 0;
|
||
} else {
|
||
this.offset += length;
|
||
}
|
||
if (typeof nextOp['delete'] === 'number') {
|
||
return { 'delete': length };
|
||
} else {
|
||
var retOp = {};
|
||
if (nextOp.attributes) {
|
||
retOp.attributes = nextOp.attributes;
|
||
}
|
||
if (typeof nextOp.retain === 'number') {
|
||
retOp.retain = length;
|
||
} else if (typeof nextOp.insert === 'string') {
|
||
retOp.insert = nextOp.insert.substr(offset, length);
|
||
} else {
|
||
// offset should === 0, length should === 1
|
||
retOp.insert = nextOp.insert;
|
||
}
|
||
return retOp;
|
||
}
|
||
} else {
|
||
return { retain: Infinity };
|
||
}
|
||
};
|
||
|
||
Iterator.prototype.peek = function () {
|
||
return this.ops[this.index];
|
||
};
|
||
|
||
Iterator.prototype.peekLength = function () {
|
||
if (this.ops[this.index]) {
|
||
// Should never return 0 if our index is being managed correctly
|
||
return lib.length(this.ops[this.index]) - this.offset;
|
||
} else {
|
||
return Infinity;
|
||
}
|
||
};
|
||
|
||
Iterator.prototype.peekType = function () {
|
||
if (this.ops[this.index]) {
|
||
if (typeof this.ops[this.index]['delete'] === 'number') {
|
||
return 'delete';
|
||
} else if (typeof this.ops[this.index].retain === 'number') {
|
||
return 'retain';
|
||
} else {
|
||
return 'insert';
|
||
}
|
||
}
|
||
return 'retain';
|
||
};
|
||
|
||
Iterator.prototype.rest = function () {
|
||
if (!this.hasNext()) {
|
||
return [];
|
||
} else if (this.offset === 0) {
|
||
return this.ops.slice(this.index);
|
||
} else {
|
||
var offset = this.offset;
|
||
var index = this.index;
|
||
var next = this.next();
|
||
var rest = this.ops.slice(this.index);
|
||
this.offset = offset;
|
||
this.index = index;
|
||
return [next].concat(rest);
|
||
}
|
||
};
|
||
|
||
|
||
module.exports = lib;
|
||
|
||
|
||
/***/ }),
|
||
/* 21 */
|
||
/***/ (function(module, exports) {
|
||
|
||
var clone = (function() {
|
||
'use strict';
|
||
|
||
function _instanceof(obj, type) {
|
||
return type != null && obj instanceof type;
|
||
}
|
||
|
||
var nativeMap;
|
||
try {
|
||
nativeMap = Map;
|
||
} catch(_) {
|
||
// maybe a reference error because no `Map`. Give it a dummy value that no
|
||
// value will ever be an instanceof.
|
||
nativeMap = function() {};
|
||
}
|
||
|
||
var nativeSet;
|
||
try {
|
||
nativeSet = Set;
|
||
} catch(_) {
|
||
nativeSet = function() {};
|
||
}
|
||
|
||
var nativePromise;
|
||
try {
|
||
nativePromise = Promise;
|
||
} catch(_) {
|
||
nativePromise = function() {};
|
||
}
|
||
|
||
/**
|
||
* Clones (copies) an Object using deep copying.
|
||
*
|
||
* This function supports circular references by default, but if you are certain
|
||
* there are no circular references in your object, you can save some CPU time
|
||
* by calling clone(obj, false).
|
||
*
|
||
* Caution: if `circular` is false and `parent` contains circular references,
|
||
* your program may enter an infinite loop and crash.
|
||
*
|
||
* @param `parent` - the object to be cloned
|
||
* @param `circular` - set to true if the object to be cloned may contain
|
||
* circular references. (optional - true by default)
|
||
* @param `depth` - set to a number if the object is only to be cloned to
|
||
* a particular depth. (optional - defaults to Infinity)
|
||
* @param `prototype` - sets the prototype to be used when cloning an object.
|
||
* (optional - defaults to parent prototype).
|
||
* @param `includeNonEnumerable` - set to true if the non-enumerable properties
|
||
* should be cloned as well. Non-enumerable properties on the prototype
|
||
* chain will be ignored. (optional - false by default)
|
||
*/
|
||
function clone(parent, circular, depth, prototype, includeNonEnumerable) {
|
||
if (typeof circular === 'object') {
|
||
depth = circular.depth;
|
||
prototype = circular.prototype;
|
||
includeNonEnumerable = circular.includeNonEnumerable;
|
||
circular = circular.circular;
|
||
}
|
||
// maintain two arrays for circular references, where corresponding parents
|
||
// and children have the same index
|
||
var allParents = [];
|
||
var allChildren = [];
|
||
|
||
var useBuffer = typeof Buffer != 'undefined';
|
||
|
||
if (typeof circular == 'undefined')
|
||
circular = true;
|
||
|
||
if (typeof depth == 'undefined')
|
||
depth = Infinity;
|
||
|
||
// recurse this function so we don't reset allParents and allChildren
|
||
function _clone(parent, depth) {
|
||
// cloning null always returns null
|
||
if (parent === null)
|
||
return null;
|
||
|
||
if (depth === 0)
|
||
return parent;
|
||
|
||
var child;
|
||
var proto;
|
||
if (typeof parent != 'object') {
|
||
return parent;
|
||
}
|
||
|
||
if (_instanceof(parent, nativeMap)) {
|
||
child = new nativeMap();
|
||
} else if (_instanceof(parent, nativeSet)) {
|
||
child = new nativeSet();
|
||
} else if (_instanceof(parent, nativePromise)) {
|
||
child = new nativePromise(function (resolve, reject) {
|
||
parent.then(function(value) {
|
||
resolve(_clone(value, depth - 1));
|
||
}, function(err) {
|
||
reject(_clone(err, depth - 1));
|
||
});
|
||
});
|
||
} else if (clone.__isArray(parent)) {
|
||
child = [];
|
||
} else if (clone.__isRegExp(parent)) {
|
||
child = new RegExp(parent.source, __getRegExpFlags(parent));
|
||
if (parent.lastIndex) child.lastIndex = parent.lastIndex;
|
||
} else if (clone.__isDate(parent)) {
|
||
child = new Date(parent.getTime());
|
||
} else if (useBuffer && Buffer.isBuffer(parent)) {
|
||
if (Buffer.allocUnsafe) {
|
||
// Node.js >= 4.5.0
|
||
child = Buffer.allocUnsafe(parent.length);
|
||
} else {
|
||
// Older Node.js versions
|
||
child = new Buffer(parent.length);
|
||
}
|
||
parent.copy(child);
|
||
return child;
|
||
} else if (_instanceof(parent, Error)) {
|
||
child = Object.create(parent);
|
||
} else {
|
||
if (typeof prototype == 'undefined') {
|
||
proto = Object.getPrototypeOf(parent);
|
||
child = Object.create(proto);
|
||
}
|
||
else {
|
||
child = Object.create(prototype);
|
||
proto = prototype;
|
||
}
|
||
}
|
||
|
||
if (circular) {
|
||
var index = allParents.indexOf(parent);
|
||
|
||
if (index != -1) {
|
||
return allChildren[index];
|
||
}
|
||
allParents.push(parent);
|
||
allChildren.push(child);
|
||
}
|
||
|
||
if (_instanceof(parent, nativeMap)) {
|
||
parent.forEach(function(value, key) {
|
||
var keyChild = _clone(key, depth - 1);
|
||
var valueChild = _clone(value, depth - 1);
|
||
child.set(keyChild, valueChild);
|
||
});
|
||
}
|
||
if (_instanceof(parent, nativeSet)) {
|
||
parent.forEach(function(value) {
|
||
var entryChild = _clone(value, depth - 1);
|
||
child.add(entryChild);
|
||
});
|
||
}
|
||
|
||
for (var i in parent) {
|
||
var attrs;
|
||
if (proto) {
|
||
attrs = Object.getOwnPropertyDescriptor(proto, i);
|
||
}
|
||
|
||
if (attrs && attrs.set == null) {
|
||
continue;
|
||
}
|
||
child[i] = _clone(parent[i], depth - 1);
|
||
}
|
||
|
||
if (Object.getOwnPropertySymbols) {
|
||
var symbols = Object.getOwnPropertySymbols(parent);
|
||
for (var i = 0; i < symbols.length; i++) {
|
||
// Don't need to worry about cloning a symbol because it is a primitive,
|
||
// like a number or string.
|
||
var symbol = symbols[i];
|
||
var descriptor = Object.getOwnPropertyDescriptor(parent, symbol);
|
||
if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
|
||
continue;
|
||
}
|
||
child[symbol] = _clone(parent[symbol], depth - 1);
|
||
if (!descriptor.enumerable) {
|
||
Object.defineProperty(child, symbol, {
|
||
enumerable: false
|
||
});
|
||
}
|
||
}
|
||
}
|
||
|
||
if (includeNonEnumerable) {
|
||
var allPropertyNames = Object.getOwnPropertyNames(parent);
|
||
for (var i = 0; i < allPropertyNames.length; i++) {
|
||
var propertyName = allPropertyNames[i];
|
||
var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName);
|
||
if (descriptor && descriptor.enumerable) {
|
||
continue;
|
||
}
|
||
child[propertyName] = _clone(parent[propertyName], depth - 1);
|
||
Object.defineProperty(child, propertyName, {
|
||
enumerable: false
|
||
});
|
||
}
|
||
}
|
||
|
||
return child;
|
||
}
|
||
|
||
return _clone(parent, depth);
|
||
}
|
||
|
||
/**
|
||
* Simple flat clone using prototype, accepts only objects, usefull for property
|
||
* override on FLAT configuration object (no nested props).
|
||
*
|
||
* USE WITH CAUTION! This may not behave as you wish if you do not know how this
|
||
* works.
|
||
*/
|
||
clone.clonePrototype = function clonePrototype(parent) {
|
||
if (parent === null)
|
||
return null;
|
||
|
||
var c = function () {};
|
||
c.prototype = parent;
|
||
return new c();
|
||
};
|
||
|
||
// private utility functions
|
||
|
||
function __objToStr(o) {
|
||
return Object.prototype.toString.call(o);
|
||
}
|
||
clone.__objToStr = __objToStr;
|
||
|
||
function __isDate(o) {
|
||
return typeof o === 'object' && __objToStr(o) === '[object Date]';
|
||
}
|
||
clone.__isDate = __isDate;
|
||
|
||
function __isArray(o) {
|
||
return typeof o === 'object' && __objToStr(o) === '[object Array]';
|
||
}
|
||
clone.__isArray = __isArray;
|
||
|
||
function __isRegExp(o) {
|
||
return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
|
||
}
|
||
clone.__isRegExp = __isRegExp;
|
||
|
||
function __getRegExpFlags(re) {
|
||
var flags = '';
|
||
if (re.global) flags += 'g';
|
||
if (re.ignoreCase) flags += 'i';
|
||
if (re.multiline) flags += 'm';
|
||
return flags;
|
||
}
|
||
clone.__getRegExpFlags = __getRegExpFlags;
|
||
|
||
return clone;
|
||
})();
|
||
|
||
if (typeof module === 'object' && module.exports) {
|
||
module.exports = clone;
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
/* 22 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _emitter = __webpack_require__(8);
|
||
|
||
var _emitter2 = _interopRequireDefault(_emitter);
|
||
|
||
var _block = __webpack_require__(4);
|
||
|
||
var _block2 = _interopRequireDefault(_block);
|
||
|
||
var _break = __webpack_require__(16);
|
||
|
||
var _break2 = _interopRequireDefault(_break);
|
||
|
||
var _code = __webpack_require__(13);
|
||
|
||
var _code2 = _interopRequireDefault(_code);
|
||
|
||
var _container = __webpack_require__(25);
|
||
|
||
var _container2 = _interopRequireDefault(_container);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
function isLine(blot) {
|
||
return blot instanceof _block2.default || blot instanceof _block.BlockEmbed;
|
||
}
|
||
|
||
var Scroll = function (_Parchment$Scroll) {
|
||
_inherits(Scroll, _Parchment$Scroll);
|
||
|
||
function Scroll(domNode, config) {
|
||
_classCallCheck(this, Scroll);
|
||
|
||
var _this = _possibleConstructorReturn(this, (Scroll.__proto__ || Object.getPrototypeOf(Scroll)).call(this, domNode));
|
||
|
||
_this.emitter = config.emitter;
|
||
if (Array.isArray(config.whitelist)) {
|
||
_this.whitelist = config.whitelist.reduce(function (whitelist, format) {
|
||
whitelist[format] = true;
|
||
return whitelist;
|
||
}, {});
|
||
}
|
||
// Some reason fixes composition issues with character languages in Windows/Chrome, Safari
|
||
_this.domNode.addEventListener('DOMNodeInserted', function () {});
|
||
_this.optimize();
|
||
_this.enable();
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Scroll, [{
|
||
key: 'batchStart',
|
||
value: function batchStart() {
|
||
this.batch = true;
|
||
}
|
||
}, {
|
||
key: 'batchEnd',
|
||
value: function batchEnd() {
|
||
this.batch = false;
|
||
this.optimize();
|
||
}
|
||
}, {
|
||
key: 'deleteAt',
|
||
value: function deleteAt(index, length) {
|
||
var _line = this.line(index),
|
||
_line2 = _slicedToArray(_line, 2),
|
||
first = _line2[0],
|
||
offset = _line2[1];
|
||
|
||
var _line3 = this.line(index + length),
|
||
_line4 = _slicedToArray(_line3, 1),
|
||
last = _line4[0];
|
||
|
||
_get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'deleteAt', this).call(this, index, length);
|
||
if (last != null && first !== last && offset > 0) {
|
||
if (first instanceof _block.BlockEmbed || last instanceof _block.BlockEmbed) {
|
||
this.optimize();
|
||
return;
|
||
}
|
||
if (first instanceof _code2.default) {
|
||
var newlineIndex = first.newlineIndex(first.length(), true);
|
||
if (newlineIndex > -1) {
|
||
first = first.split(newlineIndex + 1);
|
||
if (first === last) {
|
||
this.optimize();
|
||
return;
|
||
}
|
||
}
|
||
} else if (last instanceof _code2.default) {
|
||
var _newlineIndex = last.newlineIndex(0);
|
||
if (_newlineIndex > -1) {
|
||
last.split(_newlineIndex + 1);
|
||
}
|
||
}
|
||
var ref = last.children.head instanceof _break2.default ? null : last.children.head;
|
||
first.moveChildren(last, ref);
|
||
first.remove();
|
||
}
|
||
this.optimize();
|
||
}
|
||
}, {
|
||
key: 'enable',
|
||
value: function enable() {
|
||
var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
||
|
||
this.domNode.setAttribute('contenteditable', enabled);
|
||
}
|
||
}, {
|
||
key: 'formatAt',
|
||
value: function formatAt(index, length, format, value) {
|
||
if (this.whitelist != null && !this.whitelist[format]) return;
|
||
_get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'formatAt', this).call(this, index, length, format, value);
|
||
this.optimize();
|
||
}
|
||
}, {
|
||
key: 'insertAt',
|
||
value: function insertAt(index, value, def) {
|
||
if (def != null && this.whitelist != null && !this.whitelist[value]) return;
|
||
if (index >= this.length()) {
|
||
if (def == null || _parchment2.default.query(value, _parchment2.default.Scope.BLOCK) == null) {
|
||
var blot = _parchment2.default.create(this.statics.defaultChild);
|
||
this.appendChild(blot);
|
||
if (def == null && value.endsWith('\n')) {
|
||
value = value.slice(0, -1);
|
||
}
|
||
blot.insertAt(0, value, def);
|
||
} else {
|
||
var embed = _parchment2.default.create(value, def);
|
||
this.appendChild(embed);
|
||
}
|
||
} else {
|
||
_get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'insertAt', this).call(this, index, value, def);
|
||
}
|
||
this.optimize();
|
||
}
|
||
}, {
|
||
key: 'insertBefore',
|
||
value: function insertBefore(blot, ref) {
|
||
if (blot.statics.scope === _parchment2.default.Scope.INLINE_BLOT) {
|
||
var wrapper = _parchment2.default.create(this.statics.defaultChild);
|
||
wrapper.appendChild(blot);
|
||
blot = wrapper;
|
||
}
|
||
_get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'insertBefore', this).call(this, blot, ref);
|
||
}
|
||
}, {
|
||
key: 'leaf',
|
||
value: function leaf(index) {
|
||
return this.path(index).pop() || [null, -1];
|
||
}
|
||
}, {
|
||
key: 'line',
|
||
value: function line(index) {
|
||
if (index === this.length()) {
|
||
return this.line(index - 1);
|
||
}
|
||
return this.descendant(isLine, index);
|
||
}
|
||
}, {
|
||
key: 'lines',
|
||
value: function lines() {
|
||
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
||
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;
|
||
|
||
var getLines = function getLines(blot, index, length) {
|
||
var lines = [],
|
||
lengthLeft = length;
|
||
blot.children.forEachAt(index, length, function (child, index, length) {
|
||
if (isLine(child)) {
|
||
lines.push(child);
|
||
} else if (child instanceof _parchment2.default.Container) {
|
||
lines = lines.concat(getLines(child, index, lengthLeft));
|
||
}
|
||
lengthLeft -= length;
|
||
});
|
||
return lines;
|
||
};
|
||
return getLines(this, index, length);
|
||
}
|
||
}, {
|
||
key: 'optimize',
|
||
value: function optimize() {
|
||
var mutations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
||
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||
|
||
if (this.batch === true) return;
|
||
_get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'optimize', this).call(this, mutations, context);
|
||
if (mutations.length > 0) {
|
||
this.emitter.emit(_emitter2.default.events.SCROLL_OPTIMIZE, mutations, context);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'path',
|
||
value: function path(index) {
|
||
return _get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'path', this).call(this, index).slice(1); // Exclude self
|
||
}
|
||
}, {
|
||
key: 'update',
|
||
value: function update(mutations) {
|
||
if (this.batch === true) return;
|
||
var source = _emitter2.default.sources.USER;
|
||
if (typeof mutations === 'string') {
|
||
source = mutations;
|
||
}
|
||
if (!Array.isArray(mutations)) {
|
||
mutations = this.observer.takeRecords();
|
||
}
|
||
if (mutations.length > 0) {
|
||
this.emitter.emit(_emitter2.default.events.SCROLL_BEFORE_UPDATE, source, mutations);
|
||
}
|
||
_get(Scroll.prototype.__proto__ || Object.getPrototypeOf(Scroll.prototype), 'update', this).call(this, mutations.concat([])); // pass copy
|
||
if (mutations.length > 0) {
|
||
this.emitter.emit(_emitter2.default.events.SCROLL_UPDATE, source, mutations);
|
||
}
|
||
}
|
||
}]);
|
||
|
||
return Scroll;
|
||
}(_parchment2.default.Scroll);
|
||
|
||
Scroll.blotName = 'scroll';
|
||
Scroll.className = 'ql-editor';
|
||
Scroll.tagName = 'DIV';
|
||
Scroll.defaultChild = 'block';
|
||
Scroll.allowedChildren = [_block2.default, _block.BlockEmbed, _container2.default];
|
||
|
||
exports.default = Scroll;
|
||
|
||
/***/ }),
|
||
/* 23 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.SHORTKEY = exports.default = undefined;
|
||
|
||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||
|
||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _clone = __webpack_require__(21);
|
||
|
||
var _clone2 = _interopRequireDefault(_clone);
|
||
|
||
var _deepEqual = __webpack_require__(11);
|
||
|
||
var _deepEqual2 = _interopRequireDefault(_deepEqual);
|
||
|
||
var _extend = __webpack_require__(3);
|
||
|
||
var _extend2 = _interopRequireDefault(_extend);
|
||
|
||
var _quillDelta = __webpack_require__(2);
|
||
|
||
var _quillDelta2 = _interopRequireDefault(_quillDelta);
|
||
|
||
var _op = __webpack_require__(20);
|
||
|
||
var _op2 = _interopRequireDefault(_op);
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _quill = __webpack_require__(5);
|
||
|
||
var _quill2 = _interopRequireDefault(_quill);
|
||
|
||
var _logger = __webpack_require__(10);
|
||
|
||
var _logger2 = _interopRequireDefault(_logger);
|
||
|
||
var _module = __webpack_require__(9);
|
||
|
||
var _module2 = _interopRequireDefault(_module);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var debug = (0, _logger2.default)('quill:keyboard');
|
||
|
||
var SHORTKEY = /Mac/i.test(navigator.platform) ? 'metaKey' : 'ctrlKey';
|
||
|
||
var Keyboard = function (_Module) {
|
||
_inherits(Keyboard, _Module);
|
||
|
||
_createClass(Keyboard, null, [{
|
||
key: 'match',
|
||
value: function match(evt, binding) {
|
||
binding = normalize(binding);
|
||
if (['altKey', 'ctrlKey', 'metaKey', 'shiftKey'].some(function (key) {
|
||
return !!binding[key] !== evt[key] && binding[key] !== null;
|
||
})) {
|
||
return false;
|
||
}
|
||
return binding.key === (evt.which || evt.keyCode);
|
||
}
|
||
}]);
|
||
|
||
function Keyboard(quill, options) {
|
||
_classCallCheck(this, Keyboard);
|
||
|
||
var _this = _possibleConstructorReturn(this, (Keyboard.__proto__ || Object.getPrototypeOf(Keyboard)).call(this, quill, options));
|
||
|
||
_this.bindings = {};
|
||
Object.keys(_this.options.bindings).forEach(function (name) {
|
||
if (name === 'list autofill' && quill.scroll.whitelist != null && !quill.scroll.whitelist['list']) {
|
||
return;
|
||
}
|
||
if (_this.options.bindings[name]) {
|
||
_this.addBinding(_this.options.bindings[name]);
|
||
}
|
||
});
|
||
_this.addBinding({ key: Keyboard.keys.ENTER, shiftKey: null }, handleEnter);
|
||
_this.addBinding({ key: Keyboard.keys.ENTER, metaKey: null, ctrlKey: null, altKey: null }, function () {});
|
||
if (/Firefox/i.test(navigator.userAgent)) {
|
||
// Need to handle delete and backspace for Firefox in the general case #1171
|
||
_this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true }, handleBackspace);
|
||
_this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true }, handleDelete);
|
||
} else {
|
||
_this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true, prefix: /^.?$/ }, handleBackspace);
|
||
_this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true, suffix: /^.?$/ }, handleDelete);
|
||
}
|
||
_this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: false }, handleDeleteRange);
|
||
_this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: false }, handleDeleteRange);
|
||
_this.addBinding({ key: Keyboard.keys.BACKSPACE, altKey: null, ctrlKey: null, metaKey: null, shiftKey: null }, { collapsed: true, offset: 0 }, handleBackspace);
|
||
_this.listen();
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Keyboard, [{
|
||
key: 'addBinding',
|
||
value: function addBinding(key) {
|
||
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||
var handler = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||
|
||
var binding = normalize(key);
|
||
if (binding == null || binding.key == null) {
|
||
return debug.warn('Attempted to add invalid keyboard binding', binding);
|
||
}
|
||
if (typeof context === 'function') {
|
||
context = { handler: context };
|
||
}
|
||
if (typeof handler === 'function') {
|
||
handler = { handler: handler };
|
||
}
|
||
binding = (0, _extend2.default)(binding, context, handler);
|
||
this.bindings[binding.key] = this.bindings[binding.key] || [];
|
||
this.bindings[binding.key].push(binding);
|
||
}
|
||
}, {
|
||
key: 'listen',
|
||
value: function listen() {
|
||
var _this2 = this;
|
||
|
||
this.quill.root.addEventListener('keydown', function (evt) {
|
||
if (evt.defaultPrevented) return;
|
||
var which = evt.which || evt.keyCode;
|
||
var bindings = (_this2.bindings[which] || []).filter(function (binding) {
|
||
return Keyboard.match(evt, binding);
|
||
});
|
||
if (bindings.length === 0) return;
|
||
var range = _this2.quill.getSelection();
|
||
if (range == null || !_this2.quill.hasFocus()) return;
|
||
|
||
var _quill$getLine = _this2.quill.getLine(range.index),
|
||
_quill$getLine2 = _slicedToArray(_quill$getLine, 2),
|
||
line = _quill$getLine2[0],
|
||
offset = _quill$getLine2[1];
|
||
|
||
var _quill$getLeaf = _this2.quill.getLeaf(range.index),
|
||
_quill$getLeaf2 = _slicedToArray(_quill$getLeaf, 2),
|
||
leafStart = _quill$getLeaf2[0],
|
||
offsetStart = _quill$getLeaf2[1];
|
||
|
||
var _ref = range.length === 0 ? [leafStart, offsetStart] : _this2.quill.getLeaf(range.index + range.length),
|
||
_ref2 = _slicedToArray(_ref, 2),
|
||
leafEnd = _ref2[0],
|
||
offsetEnd = _ref2[1];
|
||
|
||
var prefixText = leafStart instanceof _parchment2.default.Text ? leafStart.value().slice(0, offsetStart) : '';
|
||
var suffixText = leafEnd instanceof _parchment2.default.Text ? leafEnd.value().slice(offsetEnd) : '';
|
||
var curContext = {
|
||
collapsed: range.length === 0,
|
||
empty: range.length === 0 && line.length() <= 1,
|
||
format: _this2.quill.getFormat(range),
|
||
offset: offset,
|
||
prefix: prefixText,
|
||
suffix: suffixText
|
||
};
|
||
var prevented = bindings.some(function (binding) {
|
||
if (binding.collapsed != null && binding.collapsed !== curContext.collapsed) return false;
|
||
if (binding.empty != null && binding.empty !== curContext.empty) return false;
|
||
if (binding.offset != null && binding.offset !== curContext.offset) return false;
|
||
if (Array.isArray(binding.format)) {
|
||
// any format is present
|
||
if (binding.format.every(function (name) {
|
||
return curContext.format[name] == null;
|
||
})) {
|
||
return false;
|
||
}
|
||
} else if (_typeof(binding.format) === 'object') {
|
||
// all formats must match
|
||
if (!Object.keys(binding.format).every(function (name) {
|
||
if (binding.format[name] === true) return curContext.format[name] != null;
|
||
if (binding.format[name] === false) return curContext.format[name] == null;
|
||
return (0, _deepEqual2.default)(binding.format[name], curContext.format[name]);
|
||
})) {
|
||
return false;
|
||
}
|
||
}
|
||
if (binding.prefix != null && !binding.prefix.test(curContext.prefix)) return false;
|
||
if (binding.suffix != null && !binding.suffix.test(curContext.suffix)) return false;
|
||
return binding.handler.call(_this2, range, curContext) !== true;
|
||
});
|
||
if (prevented) {
|
||
evt.preventDefault();
|
||
}
|
||
});
|
||
}
|
||
}]);
|
||
|
||
return Keyboard;
|
||
}(_module2.default);
|
||
|
||
Keyboard.keys = {
|
||
BACKSPACE: 8,
|
||
TAB: 9,
|
||
ENTER: 13,
|
||
ESCAPE: 27,
|
||
LEFT: 37,
|
||
UP: 38,
|
||
RIGHT: 39,
|
||
DOWN: 40,
|
||
DELETE: 46
|
||
};
|
||
|
||
Keyboard.DEFAULTS = {
|
||
bindings: {
|
||
'bold': makeFormatHandler('bold'),
|
||
'italic': makeFormatHandler('italic'),
|
||
'underline': makeFormatHandler('underline'),
|
||
'indent': {
|
||
// highlight tab or tab at beginning of list, indent or blockquote
|
||
key: Keyboard.keys.TAB,
|
||
format: ['blockquote', 'indent', 'list'],
|
||
handler: function handler(range, context) {
|
||
if (context.collapsed && context.offset !== 0) return true;
|
||
this.quill.format('indent', '+1', _quill2.default.sources.USER);
|
||
}
|
||
},
|
||
'outdent': {
|
||
key: Keyboard.keys.TAB,
|
||
shiftKey: true,
|
||
format: ['blockquote', 'indent', 'list'],
|
||
// highlight tab or tab at beginning of list, indent or blockquote
|
||
handler: function handler(range, context) {
|
||
if (context.collapsed && context.offset !== 0) return true;
|
||
this.quill.format('indent', '-1', _quill2.default.sources.USER);
|
||
}
|
||
},
|
||
'outdent backspace': {
|
||
key: Keyboard.keys.BACKSPACE,
|
||
collapsed: true,
|
||
shiftKey: null,
|
||
metaKey: null,
|
||
ctrlKey: null,
|
||
altKey: null,
|
||
format: ['indent', 'list'],
|
||
offset: 0,
|
||
handler: function handler(range, context) {
|
||
if (context.format.indent != null) {
|
||
this.quill.format('indent', '-1', _quill2.default.sources.USER);
|
||
} else if (context.format.list != null) {
|
||
this.quill.format('list', false, _quill2.default.sources.USER);
|
||
}
|
||
}
|
||
},
|
||
'indent code-block': makeCodeBlockHandler(true),
|
||
'outdent code-block': makeCodeBlockHandler(false),
|
||
'remove tab': {
|
||
key: Keyboard.keys.TAB,
|
||
shiftKey: true,
|
||
collapsed: true,
|
||
prefix: /\t$/,
|
||
handler: function handler(range) {
|
||
this.quill.deleteText(range.index - 1, 1, _quill2.default.sources.USER);
|
||
}
|
||
},
|
||
'tab': {
|
||
key: Keyboard.keys.TAB,
|
||
handler: function handler(range) {
|
||
this.quill.history.cutoff();
|
||
var delta = new _quillDelta2.default().retain(range.index).delete(range.length).insert('\t');
|
||
this.quill.updateContents(delta, _quill2.default.sources.USER);
|
||
this.quill.history.cutoff();
|
||
this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);
|
||
}
|
||
},
|
||
'list empty enter': {
|
||
key: Keyboard.keys.ENTER,
|
||
collapsed: true,
|
||
format: ['list'],
|
||
empty: true,
|
||
handler: function handler(range, context) {
|
||
this.quill.format('list', false, _quill2.default.sources.USER);
|
||
if (context.format.indent) {
|
||
this.quill.format('indent', false, _quill2.default.sources.USER);
|
||
}
|
||
}
|
||
},
|
||
'checklist enter': {
|
||
key: Keyboard.keys.ENTER,
|
||
collapsed: true,
|
||
format: { list: 'checked' },
|
||
handler: function handler(range) {
|
||
var _quill$getLine3 = this.quill.getLine(range.index),
|
||
_quill$getLine4 = _slicedToArray(_quill$getLine3, 2),
|
||
line = _quill$getLine4[0],
|
||
offset = _quill$getLine4[1];
|
||
|
||
var formats = (0, _extend2.default)({}, line.formats(), { list: 'checked' });
|
||
var delta = new _quillDelta2.default().retain(range.index).insert('\n', formats).retain(line.length() - offset - 1).retain(1, { list: 'unchecked' });
|
||
this.quill.updateContents(delta, _quill2.default.sources.USER);
|
||
this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);
|
||
this.quill.scrollIntoView();
|
||
}
|
||
},
|
||
'header enter': {
|
||
key: Keyboard.keys.ENTER,
|
||
collapsed: true,
|
||
format: ['header'],
|
||
suffix: /^$/,
|
||
handler: function handler(range, context) {
|
||
var _quill$getLine5 = this.quill.getLine(range.index),
|
||
_quill$getLine6 = _slicedToArray(_quill$getLine5, 2),
|
||
line = _quill$getLine6[0],
|
||
offset = _quill$getLine6[1];
|
||
|
||
var delta = new _quillDelta2.default().retain(range.index).insert('\n', context.format).retain(line.length() - offset - 1).retain(1, { header: null });
|
||
this.quill.updateContents(delta, _quill2.default.sources.USER);
|
||
this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);
|
||
this.quill.scrollIntoView();
|
||
}
|
||
},
|
||
'list autofill': {
|
||
key: ' ',
|
||
collapsed: true,
|
||
format: { list: false },
|
||
prefix: /^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,
|
||
handler: function handler(range, context) {
|
||
var length = context.prefix.length;
|
||
|
||
var _quill$getLine7 = this.quill.getLine(range.index),
|
||
_quill$getLine8 = _slicedToArray(_quill$getLine7, 2),
|
||
line = _quill$getLine8[0],
|
||
offset = _quill$getLine8[1];
|
||
|
||
if (offset > length) return true;
|
||
var value = void 0;
|
||
switch (context.prefix.trim()) {
|
||
case '[]':case '[ ]':
|
||
value = 'unchecked';
|
||
break;
|
||
case '[x]':
|
||
value = 'checked';
|
||
break;
|
||
case '-':case '*':
|
||
value = 'bullet';
|
||
break;
|
||
default:
|
||
value = 'ordered';
|
||
}
|
||
this.quill.insertText(range.index, ' ', _quill2.default.sources.USER);
|
||
this.quill.history.cutoff();
|
||
var delta = new _quillDelta2.default().retain(range.index - offset).delete(length + 1).retain(line.length() - 2 - offset).retain(1, { list: value });
|
||
this.quill.updateContents(delta, _quill2.default.sources.USER);
|
||
this.quill.history.cutoff();
|
||
this.quill.setSelection(range.index - length, _quill2.default.sources.SILENT);
|
||
}
|
||
},
|
||
'code exit': {
|
||
key: Keyboard.keys.ENTER,
|
||
collapsed: true,
|
||
format: ['code-block'],
|
||
prefix: /\n\n$/,
|
||
suffix: /^\s+$/,
|
||
handler: function handler(range) {
|
||
var _quill$getLine9 = this.quill.getLine(range.index),
|
||
_quill$getLine10 = _slicedToArray(_quill$getLine9, 2),
|
||
line = _quill$getLine10[0],
|
||
offset = _quill$getLine10[1];
|
||
|
||
var delta = new _quillDelta2.default().retain(range.index + line.length() - offset - 2).retain(1, { 'code-block': null }).delete(1);
|
||
this.quill.updateContents(delta, _quill2.default.sources.USER);
|
||
}
|
||
},
|
||
'embed left': makeEmbedArrowHandler(Keyboard.keys.LEFT, false),
|
||
'embed left shift': makeEmbedArrowHandler(Keyboard.keys.LEFT, true),
|
||
'embed right': makeEmbedArrowHandler(Keyboard.keys.RIGHT, false),
|
||
'embed right shift': makeEmbedArrowHandler(Keyboard.keys.RIGHT, true)
|
||
}
|
||
};
|
||
|
||
function makeEmbedArrowHandler(key, shiftKey) {
|
||
var _ref3;
|
||
|
||
var where = key === Keyboard.keys.LEFT ? 'prefix' : 'suffix';
|
||
return _ref3 = {
|
||
key: key,
|
||
shiftKey: shiftKey,
|
||
altKey: null
|
||
}, _defineProperty(_ref3, where, /^$/), _defineProperty(_ref3, 'handler', function handler(range) {
|
||
var index = range.index;
|
||
if (key === Keyboard.keys.RIGHT) {
|
||
index += range.length + 1;
|
||
}
|
||
|
||
var _quill$getLeaf3 = this.quill.getLeaf(index),
|
||
_quill$getLeaf4 = _slicedToArray(_quill$getLeaf3, 1),
|
||
leaf = _quill$getLeaf4[0];
|
||
|
||
if (!(leaf instanceof _parchment2.default.Embed)) return true;
|
||
if (key === Keyboard.keys.LEFT) {
|
||
if (shiftKey) {
|
||
this.quill.setSelection(range.index - 1, range.length + 1, _quill2.default.sources.USER);
|
||
} else {
|
||
this.quill.setSelection(range.index - 1, _quill2.default.sources.USER);
|
||
}
|
||
} else {
|
||
if (shiftKey) {
|
||
this.quill.setSelection(range.index, range.length + 1, _quill2.default.sources.USER);
|
||
} else {
|
||
this.quill.setSelection(range.index + range.length + 1, _quill2.default.sources.USER);
|
||
}
|
||
}
|
||
return false;
|
||
}), _ref3;
|
||
}
|
||
|
||
function handleBackspace(range, context) {
|
||
if (range.index === 0 || this.quill.getLength() <= 1) return;
|
||
|
||
var _quill$getLine11 = this.quill.getLine(range.index),
|
||
_quill$getLine12 = _slicedToArray(_quill$getLine11, 1),
|
||
line = _quill$getLine12[0];
|
||
|
||
var formats = {};
|
||
if (context.offset === 0) {
|
||
var _quill$getLine13 = this.quill.getLine(range.index - 1),
|
||
_quill$getLine14 = _slicedToArray(_quill$getLine13, 1),
|
||
prev = _quill$getLine14[0];
|
||
|
||
if (prev != null && prev.length() > 1) {
|
||
var curFormats = line.formats();
|
||
var prevFormats = this.quill.getFormat(range.index - 1, 1);
|
||
formats = _op2.default.attributes.diff(curFormats, prevFormats) || {};
|
||
}
|
||
}
|
||
// Check for astral symbols
|
||
var length = /[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(context.prefix) ? 2 : 1;
|
||
this.quill.deleteText(range.index - length, length, _quill2.default.sources.USER);
|
||
if (Object.keys(formats).length > 0) {
|
||
this.quill.formatLine(range.index - length, length, formats, _quill2.default.sources.USER);
|
||
}
|
||
this.quill.focus();
|
||
}
|
||
|
||
function handleDelete(range, context) {
|
||
// Check for astral symbols
|
||
var length = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(context.suffix) ? 2 : 1;
|
||
if (range.index >= this.quill.getLength() - length) return;
|
||
var formats = {},
|
||
nextLength = 0;
|
||
|
||
var _quill$getLine15 = this.quill.getLine(range.index),
|
||
_quill$getLine16 = _slicedToArray(_quill$getLine15, 1),
|
||
line = _quill$getLine16[0];
|
||
|
||
if (context.offset >= line.length() - 1) {
|
||
var _quill$getLine17 = this.quill.getLine(range.index + 1),
|
||
_quill$getLine18 = _slicedToArray(_quill$getLine17, 1),
|
||
next = _quill$getLine18[0];
|
||
|
||
if (next) {
|
||
var curFormats = line.formats();
|
||
var nextFormats = this.quill.getFormat(range.index, 1);
|
||
formats = _op2.default.attributes.diff(curFormats, nextFormats) || {};
|
||
nextLength = next.length();
|
||
}
|
||
}
|
||
this.quill.deleteText(range.index, length, _quill2.default.sources.USER);
|
||
if (Object.keys(formats).length > 0) {
|
||
this.quill.formatLine(range.index + nextLength - 1, length, formats, _quill2.default.sources.USER);
|
||
}
|
||
}
|
||
|
||
function handleDeleteRange(range) {
|
||
var lines = this.quill.getLines(range);
|
||
var formats = {};
|
||
if (lines.length > 1) {
|
||
var firstFormats = lines[0].formats();
|
||
var lastFormats = lines[lines.length - 1].formats();
|
||
formats = _op2.default.attributes.diff(lastFormats, firstFormats) || {};
|
||
}
|
||
this.quill.deleteText(range, _quill2.default.sources.USER);
|
||
if (Object.keys(formats).length > 0) {
|
||
this.quill.formatLine(range.index, 1, formats, _quill2.default.sources.USER);
|
||
}
|
||
this.quill.setSelection(range.index, _quill2.default.sources.SILENT);
|
||
this.quill.focus();
|
||
}
|
||
|
||
function handleEnter(range, context) {
|
||
var _this3 = this;
|
||
|
||
if (range.length > 0) {
|
||
this.quill.scroll.deleteAt(range.index, range.length); // So we do not trigger text-change
|
||
}
|
||
var lineFormats = Object.keys(context.format).reduce(function (lineFormats, format) {
|
||
if (_parchment2.default.query(format, _parchment2.default.Scope.BLOCK) && !Array.isArray(context.format[format])) {
|
||
lineFormats[format] = context.format[format];
|
||
}
|
||
return lineFormats;
|
||
}, {});
|
||
this.quill.insertText(range.index, '\n', lineFormats, _quill2.default.sources.USER);
|
||
// Earlier scroll.deleteAt might have messed up our selection,
|
||
// so insertText's built in selection preservation is not reliable
|
||
this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT);
|
||
this.quill.focus();
|
||
Object.keys(context.format).forEach(function (name) {
|
||
if (lineFormats[name] != null) return;
|
||
if (Array.isArray(context.format[name])) return;
|
||
if (name === 'link') return;
|
||
_this3.quill.format(name, context.format[name], _quill2.default.sources.USER);
|
||
});
|
||
}
|
||
|
||
function makeCodeBlockHandler(indent) {
|
||
return {
|
||
key: Keyboard.keys.TAB,
|
||
shiftKey: !indent,
|
||
format: { 'code-block': true },
|
||
handler: function handler(range) {
|
||
var CodeBlock = _parchment2.default.query('code-block');
|
||
var index = range.index,
|
||
length = range.length;
|
||
|
||
var _quill$scroll$descend = this.quill.scroll.descendant(CodeBlock, index),
|
||
_quill$scroll$descend2 = _slicedToArray(_quill$scroll$descend, 2),
|
||
block = _quill$scroll$descend2[0],
|
||
offset = _quill$scroll$descend2[1];
|
||
|
||
if (block == null) return;
|
||
var scrollIndex = this.quill.getIndex(block);
|
||
var start = block.newlineIndex(offset, true) + 1;
|
||
var end = block.newlineIndex(scrollIndex + offset + length);
|
||
var lines = block.domNode.textContent.slice(start, end).split('\n');
|
||
offset = 0;
|
||
lines.forEach(function (line, i) {
|
||
if (indent) {
|
||
block.insertAt(start + offset, CodeBlock.TAB);
|
||
offset += CodeBlock.TAB.length;
|
||
if (i === 0) {
|
||
index += CodeBlock.TAB.length;
|
||
} else {
|
||
length += CodeBlock.TAB.length;
|
||
}
|
||
} else if (line.startsWith(CodeBlock.TAB)) {
|
||
block.deleteAt(start + offset, CodeBlock.TAB.length);
|
||
offset -= CodeBlock.TAB.length;
|
||
if (i === 0) {
|
||
index -= CodeBlock.TAB.length;
|
||
} else {
|
||
length -= CodeBlock.TAB.length;
|
||
}
|
||
}
|
||
offset += line.length + 1;
|
||
});
|
||
this.quill.update(_quill2.default.sources.USER);
|
||
this.quill.setSelection(index, length, _quill2.default.sources.SILENT);
|
||
}
|
||
};
|
||
}
|
||
|
||
function makeFormatHandler(format) {
|
||
return {
|
||
key: format[0].toUpperCase(),
|
||
shortKey: true,
|
||
handler: function handler(range, context) {
|
||
this.quill.format(format, !context.format[format], _quill2.default.sources.USER);
|
||
}
|
||
};
|
||
}
|
||
|
||
function normalize(binding) {
|
||
if (typeof binding === 'string' || typeof binding === 'number') {
|
||
return normalize({ key: binding });
|
||
}
|
||
if ((typeof binding === 'undefined' ? 'undefined' : _typeof(binding)) === 'object') {
|
||
binding = (0, _clone2.default)(binding, false);
|
||
}
|
||
if (typeof binding.key === 'string') {
|
||
if (Keyboard.keys[binding.key.toUpperCase()] != null) {
|
||
binding.key = Keyboard.keys[binding.key.toUpperCase()];
|
||
} else if (binding.key.length === 1) {
|
||
binding.key = binding.key.toUpperCase().charCodeAt(0);
|
||
} else {
|
||
return null;
|
||
}
|
||
}
|
||
if (binding.shortKey) {
|
||
binding[SHORTKEY] = binding.shortKey;
|
||
delete binding.shortKey;
|
||
}
|
||
return binding;
|
||
}
|
||
|
||
exports.default = Keyboard;
|
||
exports.SHORTKEY = SHORTKEY;
|
||
|
||
/***/ }),
|
||
/* 24 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _text = __webpack_require__(7);
|
||
|
||
var _text2 = _interopRequireDefault(_text);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var Cursor = function (_Parchment$Embed) {
|
||
_inherits(Cursor, _Parchment$Embed);
|
||
|
||
_createClass(Cursor, null, [{
|
||
key: 'value',
|
||
value: function value() {
|
||
return undefined;
|
||
}
|
||
}]);
|
||
|
||
function Cursor(domNode, selection) {
|
||
_classCallCheck(this, Cursor);
|
||
|
||
var _this = _possibleConstructorReturn(this, (Cursor.__proto__ || Object.getPrototypeOf(Cursor)).call(this, domNode));
|
||
|
||
_this.selection = selection;
|
||
_this.textNode = document.createTextNode(Cursor.CONTENTS);
|
||
_this.domNode.appendChild(_this.textNode);
|
||
_this._length = 0;
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Cursor, [{
|
||
key: 'detach',
|
||
value: function detach() {
|
||
// super.detach() will also clear domNode.__blot
|
||
if (this.parent != null) this.parent.removeChild(this);
|
||
}
|
||
}, {
|
||
key: 'format',
|
||
value: function format(name, value) {
|
||
if (this._length !== 0) {
|
||
return _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'format', this).call(this, name, value);
|
||
}
|
||
var target = this,
|
||
index = 0;
|
||
while (target != null && target.statics.scope !== _parchment2.default.Scope.BLOCK_BLOT) {
|
||
index += target.offset(target.parent);
|
||
target = target.parent;
|
||
}
|
||
if (target != null) {
|
||
this._length = Cursor.CONTENTS.length;
|
||
target.optimize();
|
||
target.formatAt(index, Cursor.CONTENTS.length, name, value);
|
||
this._length = 0;
|
||
}
|
||
}
|
||
}, {
|
||
key: 'index',
|
||
value: function index(node, offset) {
|
||
if (node === this.textNode) return 0;
|
||
return _get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'index', this).call(this, node, offset);
|
||
}
|
||
}, {
|
||
key: 'length',
|
||
value: function length() {
|
||
return this._length;
|
||
}
|
||
}, {
|
||
key: 'position',
|
||
value: function position() {
|
||
return [this.textNode, this.textNode.data.length];
|
||
}
|
||
}, {
|
||
key: 'remove',
|
||
value: function remove() {
|
||
_get(Cursor.prototype.__proto__ || Object.getPrototypeOf(Cursor.prototype), 'remove', this).call(this);
|
||
this.parent = null;
|
||
}
|
||
}, {
|
||
key: 'restore',
|
||
value: function restore() {
|
||
if (this.selection.composing || this.parent == null) return;
|
||
var textNode = this.textNode;
|
||
var range = this.selection.getNativeRange();
|
||
var restoreText = void 0,
|
||
start = void 0,
|
||
end = void 0;
|
||
if (range != null && range.start.node === textNode && range.end.node === textNode) {
|
||
var _ref = [textNode, range.start.offset, range.end.offset];
|
||
restoreText = _ref[0];
|
||
start = _ref[1];
|
||
end = _ref[2];
|
||
}
|
||
// Link format will insert text outside of anchor tag
|
||
while (this.domNode.lastChild != null && this.domNode.lastChild !== this.textNode) {
|
||
this.domNode.parentNode.insertBefore(this.domNode.lastChild, this.domNode);
|
||
}
|
||
if (this.textNode.data !== Cursor.CONTENTS) {
|
||
var text = this.textNode.data.split(Cursor.CONTENTS).join('');
|
||
if (this.next instanceof _text2.default) {
|
||
restoreText = this.next.domNode;
|
||
this.next.insertAt(0, text);
|
||
this.textNode.data = Cursor.CONTENTS;
|
||
} else {
|
||
this.textNode.data = text;
|
||
this.parent.insertBefore(_parchment2.default.create(this.textNode), this);
|
||
this.textNode = document.createTextNode(Cursor.CONTENTS);
|
||
this.domNode.appendChild(this.textNode);
|
||
}
|
||
}
|
||
this.remove();
|
||
if (start != null) {
|
||
var _map = [start, end].map(function (offset) {
|
||
return Math.max(0, Math.min(restoreText.data.length, offset - 1));
|
||
});
|
||
|
||
var _map2 = _slicedToArray(_map, 2);
|
||
|
||
start = _map2[0];
|
||
end = _map2[1];
|
||
|
||
return {
|
||
startNode: restoreText,
|
||
startOffset: start,
|
||
endNode: restoreText,
|
||
endOffset: end
|
||
};
|
||
}
|
||
}
|
||
}, {
|
||
key: 'update',
|
||
value: function update(mutations, context) {
|
||
var _this2 = this;
|
||
|
||
if (mutations.some(function (mutation) {
|
||
return mutation.type === 'characterData' && mutation.target === _this2.textNode;
|
||
})) {
|
||
var range = this.restore();
|
||
if (range) context.range = range;
|
||
}
|
||
}
|
||
}, {
|
||
key: 'value',
|
||
value: function value() {
|
||
return '';
|
||
}
|
||
}]);
|
||
|
||
return Cursor;
|
||
}(_parchment2.default.Embed);
|
||
|
||
Cursor.blotName = 'cursor';
|
||
Cursor.className = 'ql-cursor';
|
||
Cursor.tagName = 'span';
|
||
Cursor.CONTENTS = '\uFEFF'; // Zero width no break space
|
||
|
||
|
||
exports.default = Cursor;
|
||
|
||
/***/ }),
|
||
/* 25 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _block = __webpack_require__(4);
|
||
|
||
var _block2 = _interopRequireDefault(_block);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var Container = function (_Parchment$Container) {
|
||
_inherits(Container, _Parchment$Container);
|
||
|
||
function Container() {
|
||
_classCallCheck(this, Container);
|
||
|
||
return _possibleConstructorReturn(this, (Container.__proto__ || Object.getPrototypeOf(Container)).apply(this, arguments));
|
||
}
|
||
|
||
return Container;
|
||
}(_parchment2.default.Container);
|
||
|
||
Container.allowedChildren = [_block2.default, _block.BlockEmbed, Container];
|
||
|
||
exports.default = Container;
|
||
|
||
/***/ }),
|
||
/* 26 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.ColorStyle = exports.ColorClass = exports.ColorAttributor = undefined;
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var ColorAttributor = function (_Parchment$Attributor) {
|
||
_inherits(ColorAttributor, _Parchment$Attributor);
|
||
|
||
function ColorAttributor() {
|
||
_classCallCheck(this, ColorAttributor);
|
||
|
||
return _possibleConstructorReturn(this, (ColorAttributor.__proto__ || Object.getPrototypeOf(ColorAttributor)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(ColorAttributor, [{
|
||
key: 'value',
|
||
value: function value(domNode) {
|
||
var value = _get(ColorAttributor.prototype.__proto__ || Object.getPrototypeOf(ColorAttributor.prototype), 'value', this).call(this, domNode);
|
||
if (!value.startsWith('rgb(')) return value;
|
||
value = value.replace(/^[^\d]+/, '').replace(/[^\d]+$/, '');
|
||
return '#' + value.split(',').map(function (component) {
|
||
return ('00' + parseInt(component).toString(16)).slice(-2);
|
||
}).join('');
|
||
}
|
||
}]);
|
||
|
||
return ColorAttributor;
|
||
}(_parchment2.default.Attributor.Style);
|
||
|
||
var ColorClass = new _parchment2.default.Attributor.Class('color', 'ql-color', {
|
||
scope: _parchment2.default.Scope.INLINE
|
||
});
|
||
var ColorStyle = new ColorAttributor('color', 'color', {
|
||
scope: _parchment2.default.Scope.INLINE
|
||
});
|
||
|
||
exports.ColorAttributor = ColorAttributor;
|
||
exports.ColorClass = ColorClass;
|
||
exports.ColorStyle = ColorStyle;
|
||
|
||
/***/ }),
|
||
/* 27 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.sanitize = exports.default = undefined;
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _inline = __webpack_require__(6);
|
||
|
||
var _inline2 = _interopRequireDefault(_inline);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var Link = function (_Inline) {
|
||
_inherits(Link, _Inline);
|
||
|
||
function Link() {
|
||
_classCallCheck(this, Link);
|
||
|
||
return _possibleConstructorReturn(this, (Link.__proto__ || Object.getPrototypeOf(Link)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(Link, [{
|
||
key: 'format',
|
||
value: function format(name, value) {
|
||
if (name !== this.statics.blotName || !value) return _get(Link.prototype.__proto__ || Object.getPrototypeOf(Link.prototype), 'format', this).call(this, name, value);
|
||
value = this.constructor.sanitize(value);
|
||
this.domNode.setAttribute('href', value);
|
||
}
|
||
}], [{
|
||
key: 'create',
|
||
value: function create(value) {
|
||
var node = _get(Link.__proto__ || Object.getPrototypeOf(Link), 'create', this).call(this, value);
|
||
value = this.sanitize(value);
|
||
node.setAttribute('href', value);
|
||
node.setAttribute('rel', 'noopener noreferrer');
|
||
node.setAttribute('target', '_blank');
|
||
return node;
|
||
}
|
||
}, {
|
||
key: 'formats',
|
||
value: function formats(domNode) {
|
||
return domNode.getAttribute('href');
|
||
}
|
||
}, {
|
||
key: 'sanitize',
|
||
value: function sanitize(url) {
|
||
return _sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL;
|
||
}
|
||
}]);
|
||
|
||
return Link;
|
||
}(_inline2.default);
|
||
|
||
Link.blotName = 'link';
|
||
Link.tagName = 'A';
|
||
Link.SANITIZED_URL = 'about:blank';
|
||
Link.PROTOCOL_WHITELIST = ['http', 'https', 'mailto', 'tel'];
|
||
|
||
function _sanitize(url, protocols) {
|
||
var anchor = document.createElement('a');
|
||
anchor.href = url;
|
||
var protocol = anchor.href.slice(0, anchor.href.indexOf(':'));
|
||
return protocols.indexOf(protocol) > -1;
|
||
}
|
||
|
||
exports.default = Link;
|
||
exports.sanitize = _sanitize;
|
||
|
||
/***/ }),
|
||
/* 28 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _keyboard = __webpack_require__(23);
|
||
|
||
var _keyboard2 = _interopRequireDefault(_keyboard);
|
||
|
||
var _dropdown = __webpack_require__(107);
|
||
|
||
var _dropdown2 = _interopRequireDefault(_dropdown);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
var optionsCounter = 0;
|
||
|
||
function toggleAriaAttribute(element, attribute) {
|
||
element.setAttribute(attribute, !(element.getAttribute(attribute) === 'true'));
|
||
}
|
||
|
||
var Picker = function () {
|
||
function Picker(select) {
|
||
var _this = this;
|
||
|
||
_classCallCheck(this, Picker);
|
||
|
||
this.select = select;
|
||
this.container = document.createElement('span');
|
||
this.buildPicker();
|
||
this.select.style.display = 'none';
|
||
this.select.parentNode.insertBefore(this.container, this.select);
|
||
|
||
this.label.addEventListener('mousedown', function () {
|
||
_this.togglePicker();
|
||
});
|
||
this.label.addEventListener('keydown', function (event) {
|
||
switch (event.keyCode) {
|
||
// Allows the "Enter" key to open the picker
|
||
case _keyboard2.default.keys.ENTER:
|
||
_this.togglePicker();
|
||
break;
|
||
|
||
// Allows the "Escape" key to close the picker
|
||
case _keyboard2.default.keys.ESCAPE:
|
||
_this.escape();
|
||
event.preventDefault();
|
||
break;
|
||
default:
|
||
}
|
||
});
|
||
this.select.addEventListener('change', this.update.bind(this));
|
||
}
|
||
|
||
_createClass(Picker, [{
|
||
key: 'togglePicker',
|
||
value: function togglePicker() {
|
||
this.container.classList.toggle('ql-expanded');
|
||
// Toggle aria-expanded and aria-hidden to make the picker accessible
|
||
toggleAriaAttribute(this.label, 'aria-expanded');
|
||
toggleAriaAttribute(this.options, 'aria-hidden');
|
||
}
|
||
}, {
|
||
key: 'buildItem',
|
||
value: function buildItem(option) {
|
||
var _this2 = this;
|
||
|
||
var item = document.createElement('span');
|
||
item.tabIndex = '0';
|
||
item.setAttribute('role', 'button');
|
||
|
||
item.classList.add('ql-picker-item');
|
||
if (option.hasAttribute('value')) {
|
||
item.setAttribute('data-value', option.getAttribute('value'));
|
||
}
|
||
if (option.textContent) {
|
||
item.setAttribute('data-label', option.textContent);
|
||
}
|
||
item.addEventListener('click', function () {
|
||
_this2.selectItem(item, true);
|
||
});
|
||
item.addEventListener('keydown', function (event) {
|
||
switch (event.keyCode) {
|
||
// Allows the "Enter" key to select an item
|
||
case _keyboard2.default.keys.ENTER:
|
||
_this2.selectItem(item, true);
|
||
event.preventDefault();
|
||
break;
|
||
|
||
// Allows the "Escape" key to close the picker
|
||
case _keyboard2.default.keys.ESCAPE:
|
||
_this2.escape();
|
||
event.preventDefault();
|
||
break;
|
||
default:
|
||
}
|
||
});
|
||
|
||
return item;
|
||
}
|
||
}, {
|
||
key: 'buildLabel',
|
||
value: function buildLabel() {
|
||
var label = document.createElement('span');
|
||
label.classList.add('ql-picker-label');
|
||
label.innerHTML = _dropdown2.default;
|
||
label.tabIndex = '0';
|
||
label.setAttribute('role', 'button');
|
||
label.setAttribute('aria-expanded', 'false');
|
||
this.container.appendChild(label);
|
||
return label;
|
||
}
|
||
}, {
|
||
key: 'buildOptions',
|
||
value: function buildOptions() {
|
||
var _this3 = this;
|
||
|
||
var options = document.createElement('span');
|
||
options.classList.add('ql-picker-options');
|
||
|
||
// Don't want screen readers to read this until options are visible
|
||
options.setAttribute('aria-hidden', 'true');
|
||
options.tabIndex = '-1';
|
||
|
||
// Need a unique id for aria-controls
|
||
options.id = 'ql-picker-options-' + optionsCounter;
|
||
optionsCounter += 1;
|
||
this.label.setAttribute('aria-controls', options.id);
|
||
|
||
this.options = options;
|
||
|
||
[].slice.call(this.select.options).forEach(function (option) {
|
||
var item = _this3.buildItem(option);
|
||
options.appendChild(item);
|
||
if (option.selected === true) {
|
||
_this3.selectItem(item);
|
||
}
|
||
});
|
||
this.container.appendChild(options);
|
||
}
|
||
}, {
|
||
key: 'buildPicker',
|
||
value: function buildPicker() {
|
||
var _this4 = this;
|
||
|
||
[].slice.call(this.select.attributes).forEach(function (item) {
|
||
_this4.container.setAttribute(item.name, item.value);
|
||
});
|
||
this.container.classList.add('ql-picker');
|
||
this.label = this.buildLabel();
|
||
this.buildOptions();
|
||
}
|
||
}, {
|
||
key: 'escape',
|
||
value: function escape() {
|
||
var _this5 = this;
|
||
|
||
// Close menu and return focus to trigger label
|
||
this.close();
|
||
// Need setTimeout for accessibility to ensure that the browser executes
|
||
// focus on the next process thread and after any DOM content changes
|
||
setTimeout(function () {
|
||
return _this5.label.focus();
|
||
}, 1);
|
||
}
|
||
}, {
|
||
key: 'close',
|
||
value: function close() {
|
||
this.container.classList.remove('ql-expanded');
|
||
this.label.setAttribute('aria-expanded', 'false');
|
||
this.options.setAttribute('aria-hidden', 'true');
|
||
}
|
||
}, {
|
||
key: 'selectItem',
|
||
value: function selectItem(item) {
|
||
var trigger = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
||
|
||
var selected = this.container.querySelector('.ql-selected');
|
||
if (item === selected) return;
|
||
if (selected != null) {
|
||
selected.classList.remove('ql-selected');
|
||
}
|
||
if (item == null) return;
|
||
item.classList.add('ql-selected');
|
||
this.select.selectedIndex = [].indexOf.call(item.parentNode.children, item);
|
||
if (item.hasAttribute('data-value')) {
|
||
this.label.setAttribute('data-value', item.getAttribute('data-value'));
|
||
} else {
|
||
this.label.removeAttribute('data-value');
|
||
}
|
||
if (item.hasAttribute('data-label')) {
|
||
this.label.setAttribute('data-label', item.getAttribute('data-label'));
|
||
} else {
|
||
this.label.removeAttribute('data-label');
|
||
}
|
||
if (trigger) {
|
||
if (typeof Event === 'function') {
|
||
this.select.dispatchEvent(new Event('change'));
|
||
} else if ((typeof Event === 'undefined' ? 'undefined' : _typeof(Event)) === 'object') {
|
||
// IE11
|
||
var event = document.createEvent('Event');
|
||
event.initEvent('change', true, true);
|
||
this.select.dispatchEvent(event);
|
||
}
|
||
this.close();
|
||
}
|
||
}
|
||
}, {
|
||
key: 'update',
|
||
value: function update() {
|
||
var option = void 0;
|
||
if (this.select.selectedIndex > -1) {
|
||
var item = this.container.querySelector('.ql-picker-options').children[this.select.selectedIndex];
|
||
option = this.select.options[this.select.selectedIndex];
|
||
this.selectItem(item);
|
||
} else {
|
||
this.selectItem(null);
|
||
}
|
||
var isActive = option != null && option !== this.select.querySelector('option[selected]');
|
||
this.label.classList.toggle('ql-active', isActive);
|
||
}
|
||
}]);
|
||
|
||
return Picker;
|
||
}();
|
||
|
||
exports.default = Picker;
|
||
|
||
/***/ }),
|
||
/* 29 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _quill = __webpack_require__(5);
|
||
|
||
var _quill2 = _interopRequireDefault(_quill);
|
||
|
||
var _block = __webpack_require__(4);
|
||
|
||
var _block2 = _interopRequireDefault(_block);
|
||
|
||
var _break = __webpack_require__(16);
|
||
|
||
var _break2 = _interopRequireDefault(_break);
|
||
|
||
var _container = __webpack_require__(25);
|
||
|
||
var _container2 = _interopRequireDefault(_container);
|
||
|
||
var _cursor = __webpack_require__(24);
|
||
|
||
var _cursor2 = _interopRequireDefault(_cursor);
|
||
|
||
var _embed = __webpack_require__(35);
|
||
|
||
var _embed2 = _interopRequireDefault(_embed);
|
||
|
||
var _inline = __webpack_require__(6);
|
||
|
||
var _inline2 = _interopRequireDefault(_inline);
|
||
|
||
var _scroll = __webpack_require__(22);
|
||
|
||
var _scroll2 = _interopRequireDefault(_scroll);
|
||
|
||
var _text = __webpack_require__(7);
|
||
|
||
var _text2 = _interopRequireDefault(_text);
|
||
|
||
var _clipboard = __webpack_require__(55);
|
||
|
||
var _clipboard2 = _interopRequireDefault(_clipboard);
|
||
|
||
var _history = __webpack_require__(42);
|
||
|
||
var _history2 = _interopRequireDefault(_history);
|
||
|
||
var _keyboard = __webpack_require__(23);
|
||
|
||
var _keyboard2 = _interopRequireDefault(_keyboard);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
_quill2.default.register({
|
||
'blots/block': _block2.default,
|
||
'blots/block/embed': _block.BlockEmbed,
|
||
'blots/break': _break2.default,
|
||
'blots/container': _container2.default,
|
||
'blots/cursor': _cursor2.default,
|
||
'blots/embed': _embed2.default,
|
||
'blots/inline': _inline2.default,
|
||
'blots/scroll': _scroll2.default,
|
||
'blots/text': _text2.default,
|
||
|
||
'modules/clipboard': _clipboard2.default,
|
||
'modules/history': _history2.default,
|
||
'modules/keyboard': _keyboard2.default
|
||
});
|
||
|
||
_parchment2.default.register(_block2.default, _break2.default, _cursor2.default, _inline2.default, _scroll2.default, _text2.default);
|
||
|
||
exports.default = _quill2.default;
|
||
|
||
/***/ }),
|
||
/* 30 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var Registry = __webpack_require__(1);
|
||
var ShadowBlot = /** @class */ (function () {
|
||
function ShadowBlot(domNode) {
|
||
this.domNode = domNode;
|
||
// @ts-ignore
|
||
this.domNode[Registry.DATA_KEY] = { blot: this };
|
||
}
|
||
Object.defineProperty(ShadowBlot.prototype, "statics", {
|
||
// Hack for accessing inherited static methods
|
||
get: function () {
|
||
return this.constructor;
|
||
},
|
||
enumerable: true,
|
||
configurable: true
|
||
});
|
||
ShadowBlot.create = function (value) {
|
||
if (this.tagName == null) {
|
||
throw new Registry.ParchmentError('Blot definition missing tagName');
|
||
}
|
||
var node;
|
||
if (Array.isArray(this.tagName)) {
|
||
if (typeof value === 'string') {
|
||
value = value.toUpperCase();
|
||
if (parseInt(value).toString() === value) {
|
||
value = parseInt(value);
|
||
}
|
||
}
|
||
if (typeof value === 'number') {
|
||
node = document.createElement(this.tagName[value - 1]);
|
||
}
|
||
else if (this.tagName.indexOf(value) > -1) {
|
||
node = document.createElement(value);
|
||
}
|
||
else {
|
||
node = document.createElement(this.tagName[0]);
|
||
}
|
||
}
|
||
else {
|
||
node = document.createElement(this.tagName);
|
||
}
|
||
if (this.className) {
|
||
node.classList.add(this.className);
|
||
}
|
||
return node;
|
||
};
|
||
ShadowBlot.prototype.attach = function () {
|
||
if (this.parent != null) {
|
||
this.scroll = this.parent.scroll;
|
||
}
|
||
};
|
||
ShadowBlot.prototype.clone = function () {
|
||
var domNode = this.domNode.cloneNode(false);
|
||
return Registry.create(domNode);
|
||
};
|
||
ShadowBlot.prototype.detach = function () {
|
||
if (this.parent != null)
|
||
this.parent.removeChild(this);
|
||
// @ts-ignore
|
||
delete this.domNode[Registry.DATA_KEY];
|
||
};
|
||
ShadowBlot.prototype.deleteAt = function (index, length) {
|
||
var blot = this.isolate(index, length);
|
||
blot.remove();
|
||
};
|
||
ShadowBlot.prototype.formatAt = function (index, length, name, value) {
|
||
var blot = this.isolate(index, length);
|
||
if (Registry.query(name, Registry.Scope.BLOT) != null && value) {
|
||
blot.wrap(name, value);
|
||
}
|
||
else if (Registry.query(name, Registry.Scope.ATTRIBUTE) != null) {
|
||
var parent = Registry.create(this.statics.scope);
|
||
blot.wrap(parent);
|
||
parent.format(name, value);
|
||
}
|
||
};
|
||
ShadowBlot.prototype.insertAt = function (index, value, def) {
|
||
var blot = def == null ? Registry.create('text', value) : Registry.create(value, def);
|
||
var ref = this.split(index);
|
||
this.parent.insertBefore(blot, ref);
|
||
};
|
||
ShadowBlot.prototype.insertInto = function (parentBlot, refBlot) {
|
||
if (refBlot === void 0) { refBlot = null; }
|
||
if (this.parent != null) {
|
||
this.parent.children.remove(this);
|
||
}
|
||
var refDomNode = null;
|
||
parentBlot.children.insertBefore(this, refBlot);
|
||
if (refBlot != null) {
|
||
refDomNode = refBlot.domNode;
|
||
}
|
||
if (this.domNode.parentNode != parentBlot.domNode ||
|
||
this.domNode.nextSibling != refDomNode) {
|
||
parentBlot.domNode.insertBefore(this.domNode, refDomNode);
|
||
}
|
||
this.parent = parentBlot;
|
||
this.attach();
|
||
};
|
||
ShadowBlot.prototype.isolate = function (index, length) {
|
||
var target = this.split(index);
|
||
target.split(length);
|
||
return target;
|
||
};
|
||
ShadowBlot.prototype.length = function () {
|
||
return 1;
|
||
};
|
||
ShadowBlot.prototype.offset = function (root) {
|
||
if (root === void 0) { root = this.parent; }
|
||
if (this.parent == null || this == root)
|
||
return 0;
|
||
return this.parent.children.offset(this) + this.parent.offset(root);
|
||
};
|
||
ShadowBlot.prototype.optimize = function (context) {
|
||
// TODO clean up once we use WeakMap
|
||
// @ts-ignore
|
||
if (this.domNode[Registry.DATA_KEY] != null) {
|
||
// @ts-ignore
|
||
delete this.domNode[Registry.DATA_KEY].mutations;
|
||
}
|
||
};
|
||
ShadowBlot.prototype.remove = function () {
|
||
if (this.domNode.parentNode != null) {
|
||
this.domNode.parentNode.removeChild(this.domNode);
|
||
}
|
||
this.detach();
|
||
};
|
||
ShadowBlot.prototype.replace = function (target) {
|
||
if (target.parent == null)
|
||
return;
|
||
target.parent.insertBefore(this, target.next);
|
||
target.remove();
|
||
};
|
||
ShadowBlot.prototype.replaceWith = function (name, value) {
|
||
var replacement = typeof name === 'string' ? Registry.create(name, value) : name;
|
||
replacement.replace(this);
|
||
return replacement;
|
||
};
|
||
ShadowBlot.prototype.split = function (index, force) {
|
||
return index === 0 ? this : this.next;
|
||
};
|
||
ShadowBlot.prototype.update = function (mutations, context) {
|
||
// Nothing to do by default
|
||
};
|
||
ShadowBlot.prototype.wrap = function (name, value) {
|
||
var wrapper = typeof name === 'string' ? Registry.create(name, value) : name;
|
||
if (this.parent != null) {
|
||
this.parent.insertBefore(wrapper, this.next);
|
||
}
|
||
wrapper.appendChild(this);
|
||
return wrapper;
|
||
};
|
||
ShadowBlot.blotName = 'abstract';
|
||
return ShadowBlot;
|
||
}());
|
||
exports.default = ShadowBlot;
|
||
|
||
|
||
/***/ }),
|
||
/* 31 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var attributor_1 = __webpack_require__(12);
|
||
var class_1 = __webpack_require__(32);
|
||
var style_1 = __webpack_require__(33);
|
||
var Registry = __webpack_require__(1);
|
||
var AttributorStore = /** @class */ (function () {
|
||
function AttributorStore(domNode) {
|
||
this.attributes = {};
|
||
this.domNode = domNode;
|
||
this.build();
|
||
}
|
||
AttributorStore.prototype.attribute = function (attribute, value) {
|
||
// verb
|
||
if (value) {
|
||
if (attribute.add(this.domNode, value)) {
|
||
if (attribute.value(this.domNode) != null) {
|
||
this.attributes[attribute.attrName] = attribute;
|
||
}
|
||
else {
|
||
delete this.attributes[attribute.attrName];
|
||
}
|
||
}
|
||
}
|
||
else {
|
||
attribute.remove(this.domNode);
|
||
delete this.attributes[attribute.attrName];
|
||
}
|
||
};
|
||
AttributorStore.prototype.build = function () {
|
||
var _this = this;
|
||
this.attributes = {};
|
||
var attributes = attributor_1.default.keys(this.domNode);
|
||
var classes = class_1.default.keys(this.domNode);
|
||
var styles = style_1.default.keys(this.domNode);
|
||
attributes
|
||
.concat(classes)
|
||
.concat(styles)
|
||
.forEach(function (name) {
|
||
var attr = Registry.query(name, Registry.Scope.ATTRIBUTE);
|
||
if (attr instanceof attributor_1.default) {
|
||
_this.attributes[attr.attrName] = attr;
|
||
}
|
||
});
|
||
};
|
||
AttributorStore.prototype.copy = function (target) {
|
||
var _this = this;
|
||
Object.keys(this.attributes).forEach(function (key) {
|
||
var value = _this.attributes[key].value(_this.domNode);
|
||
target.format(key, value);
|
||
});
|
||
};
|
||
AttributorStore.prototype.move = function (target) {
|
||
var _this = this;
|
||
this.copy(target);
|
||
Object.keys(this.attributes).forEach(function (key) {
|
||
_this.attributes[key].remove(_this.domNode);
|
||
});
|
||
this.attributes = {};
|
||
};
|
||
AttributorStore.prototype.values = function () {
|
||
var _this = this;
|
||
return Object.keys(this.attributes).reduce(function (attributes, name) {
|
||
attributes[name] = _this.attributes[name].value(_this.domNode);
|
||
return attributes;
|
||
}, {});
|
||
};
|
||
return AttributorStore;
|
||
}());
|
||
exports.default = AttributorStore;
|
||
|
||
|
||
/***/ }),
|
||
/* 32 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
var __extends = (this && this.__extends) || (function () {
|
||
var extendStatics = Object.setPrototypeOf ||
|
||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||
return function (d, b) {
|
||
extendStatics(d, b);
|
||
function __() { this.constructor = d; }
|
||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
};
|
||
})();
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var attributor_1 = __webpack_require__(12);
|
||
function match(node, prefix) {
|
||
var className = node.getAttribute('class') || '';
|
||
return className.split(/\s+/).filter(function (name) {
|
||
return name.indexOf(prefix + "-") === 0;
|
||
});
|
||
}
|
||
var ClassAttributor = /** @class */ (function (_super) {
|
||
__extends(ClassAttributor, _super);
|
||
function ClassAttributor() {
|
||
return _super !== null && _super.apply(this, arguments) || this;
|
||
}
|
||
ClassAttributor.keys = function (node) {
|
||
return (node.getAttribute('class') || '').split(/\s+/).map(function (name) {
|
||
return name
|
||
.split('-')
|
||
.slice(0, -1)
|
||
.join('-');
|
||
});
|
||
};
|
||
ClassAttributor.prototype.add = function (node, value) {
|
||
if (!this.canAdd(node, value))
|
||
return false;
|
||
this.remove(node);
|
||
node.classList.add(this.keyName + "-" + value);
|
||
return true;
|
||
};
|
||
ClassAttributor.prototype.remove = function (node) {
|
||
var matches = match(node, this.keyName);
|
||
matches.forEach(function (name) {
|
||
node.classList.remove(name);
|
||
});
|
||
if (node.classList.length === 0) {
|
||
node.removeAttribute('class');
|
||
}
|
||
};
|
||
ClassAttributor.prototype.value = function (node) {
|
||
var result = match(node, this.keyName)[0] || '';
|
||
var value = result.slice(this.keyName.length + 1); // +1 for hyphen
|
||
return this.canAdd(node, value) ? value : '';
|
||
};
|
||
return ClassAttributor;
|
||
}(attributor_1.default));
|
||
exports.default = ClassAttributor;
|
||
|
||
|
||
/***/ }),
|
||
/* 33 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
var __extends = (this && this.__extends) || (function () {
|
||
var extendStatics = Object.setPrototypeOf ||
|
||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||
return function (d, b) {
|
||
extendStatics(d, b);
|
||
function __() { this.constructor = d; }
|
||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
};
|
||
})();
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var attributor_1 = __webpack_require__(12);
|
||
function camelize(name) {
|
||
var parts = name.split('-');
|
||
var rest = parts
|
||
.slice(1)
|
||
.map(function (part) {
|
||
return part[0].toUpperCase() + part.slice(1);
|
||
})
|
||
.join('');
|
||
return parts[0] + rest;
|
||
}
|
||
var StyleAttributor = /** @class */ (function (_super) {
|
||
__extends(StyleAttributor, _super);
|
||
function StyleAttributor() {
|
||
return _super !== null && _super.apply(this, arguments) || this;
|
||
}
|
||
StyleAttributor.keys = function (node) {
|
||
return (node.getAttribute('style') || '').split(';').map(function (value) {
|
||
var arr = value.split(':');
|
||
return arr[0].trim();
|
||
});
|
||
};
|
||
StyleAttributor.prototype.add = function (node, value) {
|
||
if (!this.canAdd(node, value))
|
||
return false;
|
||
// @ts-ignore
|
||
node.style[camelize(this.keyName)] = value;
|
||
return true;
|
||
};
|
||
StyleAttributor.prototype.remove = function (node) {
|
||
// @ts-ignore
|
||
node.style[camelize(this.keyName)] = '';
|
||
if (!node.getAttribute('style')) {
|
||
node.removeAttribute('style');
|
||
}
|
||
};
|
||
StyleAttributor.prototype.value = function (node) {
|
||
// @ts-ignore
|
||
var value = node.style[camelize(this.keyName)];
|
||
return this.canAdd(node, value) ? value : '';
|
||
};
|
||
return StyleAttributor;
|
||
}(attributor_1.default));
|
||
exports.default = StyleAttributor;
|
||
|
||
|
||
/***/ }),
|
||
/* 34 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
var Theme = function () {
|
||
function Theme(quill, options) {
|
||
_classCallCheck(this, Theme);
|
||
|
||
this.quill = quill;
|
||
this.options = options;
|
||
this.modules = {};
|
||
}
|
||
|
||
_createClass(Theme, [{
|
||
key: 'init',
|
||
value: function init() {
|
||
var _this = this;
|
||
|
||
Object.keys(this.options.modules).forEach(function (name) {
|
||
if (_this.modules[name] == null) {
|
||
_this.addModule(name);
|
||
}
|
||
});
|
||
}
|
||
}, {
|
||
key: 'addModule',
|
||
value: function addModule(name) {
|
||
var moduleClass = this.quill.constructor.import('modules/' + name);
|
||
this.modules[name] = new moduleClass(this.quill, this.options.modules[name] || {});
|
||
return this.modules[name];
|
||
}
|
||
}]);
|
||
|
||
return Theme;
|
||
}();
|
||
|
||
Theme.DEFAULTS = {
|
||
modules: {}
|
||
};
|
||
Theme.themes = {
|
||
'default': Theme
|
||
};
|
||
|
||
exports.default = Theme;
|
||
|
||
/***/ }),
|
||
/* 35 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _text = __webpack_require__(7);
|
||
|
||
var _text2 = _interopRequireDefault(_text);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var GUARD_TEXT = '\uFEFF';
|
||
|
||
var Embed = function (_Parchment$Embed) {
|
||
_inherits(Embed, _Parchment$Embed);
|
||
|
||
function Embed(node) {
|
||
_classCallCheck(this, Embed);
|
||
|
||
var _this = _possibleConstructorReturn(this, (Embed.__proto__ || Object.getPrototypeOf(Embed)).call(this, node));
|
||
|
||
_this.contentNode = document.createElement('span');
|
||
_this.contentNode.setAttribute('contenteditable', false);
|
||
[].slice.call(_this.domNode.childNodes).forEach(function (childNode) {
|
||
_this.contentNode.appendChild(childNode);
|
||
});
|
||
_this.leftGuard = document.createTextNode(GUARD_TEXT);
|
||
_this.rightGuard = document.createTextNode(GUARD_TEXT);
|
||
_this.domNode.appendChild(_this.leftGuard);
|
||
_this.domNode.appendChild(_this.contentNode);
|
||
_this.domNode.appendChild(_this.rightGuard);
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Embed, [{
|
||
key: 'index',
|
||
value: function index(node, offset) {
|
||
if (node === this.leftGuard) return 0;
|
||
if (node === this.rightGuard) return 1;
|
||
return _get(Embed.prototype.__proto__ || Object.getPrototypeOf(Embed.prototype), 'index', this).call(this, node, offset);
|
||
}
|
||
}, {
|
||
key: 'restore',
|
||
value: function restore(node) {
|
||
var range = void 0,
|
||
textNode = void 0;
|
||
var text = node.data.split(GUARD_TEXT).join('');
|
||
if (node === this.leftGuard) {
|
||
if (this.prev instanceof _text2.default) {
|
||
var prevLength = this.prev.length();
|
||
this.prev.insertAt(prevLength, text);
|
||
range = {
|
||
startNode: this.prev.domNode,
|
||
startOffset: prevLength + text.length
|
||
};
|
||
} else {
|
||
textNode = document.createTextNode(text);
|
||
this.parent.insertBefore(_parchment2.default.create(textNode), this);
|
||
range = {
|
||
startNode: textNode,
|
||
startOffset: text.length
|
||
};
|
||
}
|
||
} else if (node === this.rightGuard) {
|
||
if (this.next instanceof _text2.default) {
|
||
this.next.insertAt(0, text);
|
||
range = {
|
||
startNode: this.next.domNode,
|
||
startOffset: text.length
|
||
};
|
||
} else {
|
||
textNode = document.createTextNode(text);
|
||
this.parent.insertBefore(_parchment2.default.create(textNode), this.next);
|
||
range = {
|
||
startNode: textNode,
|
||
startOffset: text.length
|
||
};
|
||
}
|
||
}
|
||
node.data = GUARD_TEXT;
|
||
return range;
|
||
}
|
||
}, {
|
||
key: 'update',
|
||
value: function update(mutations, context) {
|
||
var _this2 = this;
|
||
|
||
mutations.forEach(function (mutation) {
|
||
if (mutation.type === 'characterData' && (mutation.target === _this2.leftGuard || mutation.target === _this2.rightGuard)) {
|
||
var range = _this2.restore(mutation.target);
|
||
if (range) context.range = range;
|
||
}
|
||
});
|
||
}
|
||
}]);
|
||
|
||
return Embed;
|
||
}(_parchment2.default.Embed);
|
||
|
||
exports.default = Embed;
|
||
|
||
/***/ }),
|
||
/* 36 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.AlignStyle = exports.AlignClass = exports.AlignAttribute = undefined;
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
var config = {
|
||
scope: _parchment2.default.Scope.BLOCK,
|
||
whitelist: ['right', 'center', 'justify']
|
||
};
|
||
|
||
var AlignAttribute = new _parchment2.default.Attributor.Attribute('align', 'align', config);
|
||
var AlignClass = new _parchment2.default.Attributor.Class('align', 'ql-align', config);
|
||
var AlignStyle = new _parchment2.default.Attributor.Style('align', 'text-align', config);
|
||
|
||
exports.AlignAttribute = AlignAttribute;
|
||
exports.AlignClass = AlignClass;
|
||
exports.AlignStyle = AlignStyle;
|
||
|
||
/***/ }),
|
||
/* 37 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.BackgroundStyle = exports.BackgroundClass = undefined;
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _color = __webpack_require__(26);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
var BackgroundClass = new _parchment2.default.Attributor.Class('background', 'ql-bg', {
|
||
scope: _parchment2.default.Scope.INLINE
|
||
});
|
||
var BackgroundStyle = new _color.ColorAttributor('background', 'background-color', {
|
||
scope: _parchment2.default.Scope.INLINE
|
||
});
|
||
|
||
exports.BackgroundClass = BackgroundClass;
|
||
exports.BackgroundStyle = BackgroundStyle;
|
||
|
||
/***/ }),
|
||
/* 38 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.DirectionStyle = exports.DirectionClass = exports.DirectionAttribute = undefined;
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
var config = {
|
||
scope: _parchment2.default.Scope.BLOCK,
|
||
whitelist: ['rtl']
|
||
};
|
||
|
||
var DirectionAttribute = new _parchment2.default.Attributor.Attribute('direction', 'dir', config);
|
||
var DirectionClass = new _parchment2.default.Attributor.Class('direction', 'ql-direction', config);
|
||
var DirectionStyle = new _parchment2.default.Attributor.Style('direction', 'direction', config);
|
||
|
||
exports.DirectionAttribute = DirectionAttribute;
|
||
exports.DirectionClass = DirectionClass;
|
||
exports.DirectionStyle = DirectionStyle;
|
||
|
||
/***/ }),
|
||
/* 39 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.FontClass = exports.FontStyle = undefined;
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var config = {
|
||
scope: _parchment2.default.Scope.INLINE,
|
||
whitelist: ['serif', 'monospace']
|
||
};
|
||
|
||
var FontClass = new _parchment2.default.Attributor.Class('font', 'ql-font', config);
|
||
|
||
var FontStyleAttributor = function (_Parchment$Attributor) {
|
||
_inherits(FontStyleAttributor, _Parchment$Attributor);
|
||
|
||
function FontStyleAttributor() {
|
||
_classCallCheck(this, FontStyleAttributor);
|
||
|
||
return _possibleConstructorReturn(this, (FontStyleAttributor.__proto__ || Object.getPrototypeOf(FontStyleAttributor)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(FontStyleAttributor, [{
|
||
key: 'value',
|
||
value: function value(node) {
|
||
return _get(FontStyleAttributor.prototype.__proto__ || Object.getPrototypeOf(FontStyleAttributor.prototype), 'value', this).call(this, node).replace(/["']/g, '');
|
||
}
|
||
}]);
|
||
|
||
return FontStyleAttributor;
|
||
}(_parchment2.default.Attributor.Style);
|
||
|
||
var FontStyle = new FontStyleAttributor('font', 'font-family', config);
|
||
|
||
exports.FontStyle = FontStyle;
|
||
exports.FontClass = FontClass;
|
||
|
||
/***/ }),
|
||
/* 40 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.SizeStyle = exports.SizeClass = undefined;
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
var SizeClass = new _parchment2.default.Attributor.Class('size', 'ql-size', {
|
||
scope: _parchment2.default.Scope.INLINE,
|
||
whitelist: ['small', 'large', 'huge']
|
||
});
|
||
var SizeStyle = new _parchment2.default.Attributor.Style('size', 'font-size', {
|
||
scope: _parchment2.default.Scope.INLINE,
|
||
whitelist: ['10px', '18px', '32px']
|
||
});
|
||
|
||
exports.SizeClass = SizeClass;
|
||
exports.SizeStyle = SizeStyle;
|
||
|
||
/***/ }),
|
||
/* 41 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
module.exports = {
|
||
'align': {
|
||
'': __webpack_require__(76),
|
||
'center': __webpack_require__(77),
|
||
'right': __webpack_require__(78),
|
||
'justify': __webpack_require__(79)
|
||
},
|
||
'background': __webpack_require__(80),
|
||
'blockquote': __webpack_require__(81),
|
||
'bold': __webpack_require__(82),
|
||
'clean': __webpack_require__(83),
|
||
'code': __webpack_require__(58),
|
||
'code-block': __webpack_require__(58),
|
||
'color': __webpack_require__(84),
|
||
'direction': {
|
||
'': __webpack_require__(85),
|
||
'rtl': __webpack_require__(86)
|
||
},
|
||
'float': {
|
||
'center': __webpack_require__(87),
|
||
'full': __webpack_require__(88),
|
||
'left': __webpack_require__(89),
|
||
'right': __webpack_require__(90)
|
||
},
|
||
'formula': __webpack_require__(91),
|
||
'header': {
|
||
'1': __webpack_require__(92),
|
||
'2': __webpack_require__(93)
|
||
},
|
||
'italic': __webpack_require__(94),
|
||
'image': __webpack_require__(95),
|
||
'indent': {
|
||
'+1': __webpack_require__(96),
|
||
'-1': __webpack_require__(97)
|
||
},
|
||
'link': __webpack_require__(98),
|
||
'list': {
|
||
'ordered': __webpack_require__(99),
|
||
'bullet': __webpack_require__(100),
|
||
'check': __webpack_require__(101)
|
||
},
|
||
'script': {
|
||
'sub': __webpack_require__(102),
|
||
'super': __webpack_require__(103)
|
||
},
|
||
'strike': __webpack_require__(104),
|
||
'underline': __webpack_require__(105),
|
||
'video': __webpack_require__(106)
|
||
};
|
||
|
||
/***/ }),
|
||
/* 42 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.getLastChangeIndex = exports.default = undefined;
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _quill = __webpack_require__(5);
|
||
|
||
var _quill2 = _interopRequireDefault(_quill);
|
||
|
||
var _module = __webpack_require__(9);
|
||
|
||
var _module2 = _interopRequireDefault(_module);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var History = function (_Module) {
|
||
_inherits(History, _Module);
|
||
|
||
function History(quill, options) {
|
||
_classCallCheck(this, History);
|
||
|
||
var _this = _possibleConstructorReturn(this, (History.__proto__ || Object.getPrototypeOf(History)).call(this, quill, options));
|
||
|
||
_this.lastRecorded = 0;
|
||
_this.ignoreChange = false;
|
||
_this.clear();
|
||
_this.quill.on(_quill2.default.events.EDITOR_CHANGE, function (eventName, delta, oldDelta, source) {
|
||
if (eventName !== _quill2.default.events.TEXT_CHANGE || _this.ignoreChange) return;
|
||
if (!_this.options.userOnly || source === _quill2.default.sources.USER) {
|
||
_this.record(delta, oldDelta);
|
||
} else {
|
||
_this.transform(delta);
|
||
}
|
||
});
|
||
_this.quill.keyboard.addBinding({ key: 'Z', shortKey: true }, _this.undo.bind(_this));
|
||
_this.quill.keyboard.addBinding({ key: 'Z', shortKey: true, shiftKey: true }, _this.redo.bind(_this));
|
||
if (/Win/i.test(navigator.platform)) {
|
||
_this.quill.keyboard.addBinding({ key: 'Y', shortKey: true }, _this.redo.bind(_this));
|
||
}
|
||
return _this;
|
||
}
|
||
|
||
_createClass(History, [{
|
||
key: 'change',
|
||
value: function change(source, dest) {
|
||
if (this.stack[source].length === 0) return;
|
||
var delta = this.stack[source].pop();
|
||
this.stack[dest].push(delta);
|
||
this.lastRecorded = 0;
|
||
this.ignoreChange = true;
|
||
this.quill.updateContents(delta[source], _quill2.default.sources.USER);
|
||
this.ignoreChange = false;
|
||
var index = getLastChangeIndex(delta[source]);
|
||
this.quill.setSelection(index);
|
||
}
|
||
}, {
|
||
key: 'clear',
|
||
value: function clear() {
|
||
this.stack = { undo: [], redo: [] };
|
||
}
|
||
}, {
|
||
key: 'cutoff',
|
||
value: function cutoff() {
|
||
this.lastRecorded = 0;
|
||
}
|
||
}, {
|
||
key: 'record',
|
||
value: function record(changeDelta, oldDelta) {
|
||
if (changeDelta.ops.length === 0) return;
|
||
this.stack.redo = [];
|
||
var undoDelta = this.quill.getContents().diff(oldDelta);
|
||
var timestamp = Date.now();
|
||
if (this.lastRecorded + this.options.delay > timestamp && this.stack.undo.length > 0) {
|
||
var delta = this.stack.undo.pop();
|
||
undoDelta = undoDelta.compose(delta.undo);
|
||
changeDelta = delta.redo.compose(changeDelta);
|
||
} else {
|
||
this.lastRecorded = timestamp;
|
||
}
|
||
this.stack.undo.push({
|
||
redo: changeDelta,
|
||
undo: undoDelta
|
||
});
|
||
if (this.stack.undo.length > this.options.maxStack) {
|
||
this.stack.undo.shift();
|
||
}
|
||
}
|
||
}, {
|
||
key: 'redo',
|
||
value: function redo() {
|
||
this.change('redo', 'undo');
|
||
}
|
||
}, {
|
||
key: 'transform',
|
||
value: function transform(delta) {
|
||
this.stack.undo.forEach(function (change) {
|
||
change.undo = delta.transform(change.undo, true);
|
||
change.redo = delta.transform(change.redo, true);
|
||
});
|
||
this.stack.redo.forEach(function (change) {
|
||
change.undo = delta.transform(change.undo, true);
|
||
change.redo = delta.transform(change.redo, true);
|
||
});
|
||
}
|
||
}, {
|
||
key: 'undo',
|
||
value: function undo() {
|
||
this.change('undo', 'redo');
|
||
}
|
||
}]);
|
||
|
||
return History;
|
||
}(_module2.default);
|
||
|
||
History.DEFAULTS = {
|
||
delay: 1000,
|
||
maxStack: 100,
|
||
userOnly: false
|
||
};
|
||
|
||
function endsWithNewlineChange(delta) {
|
||
var lastOp = delta.ops[delta.ops.length - 1];
|
||
if (lastOp == null) return false;
|
||
if (lastOp.insert != null) {
|
||
return typeof lastOp.insert === 'string' && lastOp.insert.endsWith('\n');
|
||
}
|
||
if (lastOp.attributes != null) {
|
||
return Object.keys(lastOp.attributes).some(function (attr) {
|
||
return _parchment2.default.query(attr, _parchment2.default.Scope.BLOCK) != null;
|
||
});
|
||
}
|
||
return false;
|
||
}
|
||
|
||
function getLastChangeIndex(delta) {
|
||
var deleteLength = delta.reduce(function (length, op) {
|
||
length += op.delete || 0;
|
||
return length;
|
||
}, 0);
|
||
var changeIndex = delta.length() - deleteLength;
|
||
if (endsWithNewlineChange(delta)) {
|
||
changeIndex -= 1;
|
||
}
|
||
return changeIndex;
|
||
}
|
||
|
||
exports.default = History;
|
||
exports.getLastChangeIndex = getLastChangeIndex;
|
||
|
||
/***/ }),
|
||
/* 43 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = exports.BaseTooltip = undefined;
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _extend = __webpack_require__(3);
|
||
|
||
var _extend2 = _interopRequireDefault(_extend);
|
||
|
||
var _quillDelta = __webpack_require__(2);
|
||
|
||
var _quillDelta2 = _interopRequireDefault(_quillDelta);
|
||
|
||
var _emitter = __webpack_require__(8);
|
||
|
||
var _emitter2 = _interopRequireDefault(_emitter);
|
||
|
||
var _keyboard = __webpack_require__(23);
|
||
|
||
var _keyboard2 = _interopRequireDefault(_keyboard);
|
||
|
||
var _theme = __webpack_require__(34);
|
||
|
||
var _theme2 = _interopRequireDefault(_theme);
|
||
|
||
var _colorPicker = __webpack_require__(59);
|
||
|
||
var _colorPicker2 = _interopRequireDefault(_colorPicker);
|
||
|
||
var _iconPicker = __webpack_require__(60);
|
||
|
||
var _iconPicker2 = _interopRequireDefault(_iconPicker);
|
||
|
||
var _picker = __webpack_require__(28);
|
||
|
||
var _picker2 = _interopRequireDefault(_picker);
|
||
|
||
var _tooltip = __webpack_require__(61);
|
||
|
||
var _tooltip2 = _interopRequireDefault(_tooltip);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var ALIGNS = [false, 'center', 'right', 'justify'];
|
||
|
||
var COLORS = ["#000000", "#e60000", "#ff9900", "#ffff00", "#008a00", "#0066cc", "#9933ff", "#ffffff", "#facccc", "#ffebcc", "#ffffcc", "#cce8cc", "#cce0f5", "#ebd6ff", "#bbbbbb", "#f06666", "#ffc266", "#ffff66", "#66b966", "#66a3e0", "#c285ff", "#888888", "#a10000", "#b26b00", "#b2b200", "#006100", "#0047b2", "#6b24b2", "#444444", "#5c0000", "#663d00", "#666600", "#003700", "#002966", "#3d1466"];
|
||
|
||
var FONTS = [false, 'serif', 'monospace'];
|
||
|
||
var HEADERS = ['1', '2', '3', false];
|
||
|
||
var SIZES = ['small', false, 'large', 'huge'];
|
||
|
||
var BaseTheme = function (_Theme) {
|
||
_inherits(BaseTheme, _Theme);
|
||
|
||
function BaseTheme(quill, options) {
|
||
_classCallCheck(this, BaseTheme);
|
||
|
||
var _this = _possibleConstructorReturn(this, (BaseTheme.__proto__ || Object.getPrototypeOf(BaseTheme)).call(this, quill, options));
|
||
|
||
var listener = function listener(e) {
|
||
if (!document.body.contains(quill.root)) {
|
||
return document.body.removeEventListener('click', listener);
|
||
}
|
||
if (_this.tooltip != null && !_this.tooltip.root.contains(e.target) && document.activeElement !== _this.tooltip.textbox && !_this.quill.hasFocus()) {
|
||
_this.tooltip.hide();
|
||
}
|
||
if (_this.pickers != null) {
|
||
_this.pickers.forEach(function (picker) {
|
||
if (!picker.container.contains(e.target)) {
|
||
picker.close();
|
||
}
|
||
});
|
||
}
|
||
};
|
||
quill.emitter.listenDOM('click', document.body, listener);
|
||
return _this;
|
||
}
|
||
|
||
_createClass(BaseTheme, [{
|
||
key: 'addModule',
|
||
value: function addModule(name) {
|
||
var module = _get(BaseTheme.prototype.__proto__ || Object.getPrototypeOf(BaseTheme.prototype), 'addModule', this).call(this, name);
|
||
if (name === 'toolbar') {
|
||
this.extendToolbar(module);
|
||
}
|
||
return module;
|
||
}
|
||
}, {
|
||
key: 'buildButtons',
|
||
value: function buildButtons(buttons, icons) {
|
||
buttons.forEach(function (button) {
|
||
var className = button.getAttribute('class') || '';
|
||
className.split(/\s+/).forEach(function (name) {
|
||
if (!name.startsWith('ql-')) return;
|
||
name = name.slice('ql-'.length);
|
||
if (icons[name] == null) return;
|
||
if (name === 'direction') {
|
||
button.innerHTML = icons[name][''] + icons[name]['rtl'];
|
||
} else if (typeof icons[name] === 'string') {
|
||
button.innerHTML = icons[name];
|
||
} else {
|
||
var value = button.value || '';
|
||
if (value != null && icons[name][value]) {
|
||
button.innerHTML = icons[name][value];
|
||
}
|
||
}
|
||
});
|
||
});
|
||
}
|
||
}, {
|
||
key: 'buildPickers',
|
||
value: function buildPickers(selects, icons) {
|
||
var _this2 = this;
|
||
|
||
this.pickers = selects.map(function (select) {
|
||
if (select.classList.contains('ql-align')) {
|
||
if (select.querySelector('option') == null) {
|
||
fillSelect(select, ALIGNS);
|
||
}
|
||
return new _iconPicker2.default(select, icons.align);
|
||
} else if (select.classList.contains('ql-background') || select.classList.contains('ql-color')) {
|
||
var format = select.classList.contains('ql-background') ? 'background' : 'color';
|
||
if (select.querySelector('option') == null) {
|
||
fillSelect(select, COLORS, format === 'background' ? '#ffffff' : '#000000');
|
||
}
|
||
return new _colorPicker2.default(select, icons[format]);
|
||
} else {
|
||
if (select.querySelector('option') == null) {
|
||
if (select.classList.contains('ql-font')) {
|
||
fillSelect(select, FONTS);
|
||
} else if (select.classList.contains('ql-header')) {
|
||
fillSelect(select, HEADERS);
|
||
} else if (select.classList.contains('ql-size')) {
|
||
fillSelect(select, SIZES);
|
||
}
|
||
}
|
||
return new _picker2.default(select);
|
||
}
|
||
});
|
||
var update = function update() {
|
||
_this2.pickers.forEach(function (picker) {
|
||
picker.update();
|
||
});
|
||
};
|
||
this.quill.on(_emitter2.default.events.EDITOR_CHANGE, update);
|
||
}
|
||
}]);
|
||
|
||
return BaseTheme;
|
||
}(_theme2.default);
|
||
|
||
BaseTheme.DEFAULTS = (0, _extend2.default)(true, {}, _theme2.default.DEFAULTS, {
|
||
modules: {
|
||
toolbar: {
|
||
handlers: {
|
||
formula: function formula() {
|
||
this.quill.theme.tooltip.edit('formula');
|
||
},
|
||
image: function image() {
|
||
var _this3 = this;
|
||
|
||
var fileInput = this.container.querySelector('input.ql-image[type=file]');
|
||
if (fileInput == null) {
|
||
fileInput = document.createElement('input');
|
||
fileInput.setAttribute('type', 'file');
|
||
fileInput.setAttribute('accept', 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon');
|
||
fileInput.classList.add('ql-image');
|
||
fileInput.addEventListener('change', function () {
|
||
if (fileInput.files != null && fileInput.files[0] != null) {
|
||
var reader = new FileReader();
|
||
reader.onload = function (e) {
|
||
var range = _this3.quill.getSelection(true);
|
||
_this3.quill.updateContents(new _quillDelta2.default().retain(range.index).delete(range.length).insert({ image: e.target.result }), _emitter2.default.sources.USER);
|
||
_this3.quill.setSelection(range.index + 1, _emitter2.default.sources.SILENT);
|
||
fileInput.value = "";
|
||
};
|
||
reader.readAsDataURL(fileInput.files[0]);
|
||
}
|
||
});
|
||
this.container.appendChild(fileInput);
|
||
}
|
||
fileInput.click();
|
||
},
|
||
video: function video() {
|
||
this.quill.theme.tooltip.edit('video');
|
||
}
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
var BaseTooltip = function (_Tooltip) {
|
||
_inherits(BaseTooltip, _Tooltip);
|
||
|
||
function BaseTooltip(quill, boundsContainer) {
|
||
_classCallCheck(this, BaseTooltip);
|
||
|
||
var _this4 = _possibleConstructorReturn(this, (BaseTooltip.__proto__ || Object.getPrototypeOf(BaseTooltip)).call(this, quill, boundsContainer));
|
||
|
||
_this4.textbox = _this4.root.querySelector('input[type="text"]');
|
||
_this4.listen();
|
||
return _this4;
|
||
}
|
||
|
||
_createClass(BaseTooltip, [{
|
||
key: 'listen',
|
||
value: function listen() {
|
||
var _this5 = this;
|
||
|
||
this.textbox.addEventListener('keydown', function (event) {
|
||
if (_keyboard2.default.match(event, 'enter')) {
|
||
_this5.save();
|
||
event.preventDefault();
|
||
} else if (_keyboard2.default.match(event, 'escape')) {
|
||
_this5.cancel();
|
||
event.preventDefault();
|
||
}
|
||
});
|
||
}
|
||
}, {
|
||
key: 'cancel',
|
||
value: function cancel() {
|
||
this.hide();
|
||
}
|
||
}, {
|
||
key: 'edit',
|
||
value: function edit() {
|
||
var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'link';
|
||
var preview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
||
|
||
this.root.classList.remove('ql-hidden');
|
||
this.root.classList.add('ql-editing');
|
||
if (preview != null) {
|
||
this.textbox.value = preview;
|
||
} else if (mode !== this.root.getAttribute('data-mode')) {
|
||
this.textbox.value = '';
|
||
}
|
||
this.position(this.quill.getBounds(this.quill.selection.savedRange));
|
||
this.textbox.select();
|
||
this.textbox.setAttribute('placeholder', this.textbox.getAttribute('data-' + mode) || '');
|
||
this.root.setAttribute('data-mode', mode);
|
||
}
|
||
}, {
|
||
key: 'restoreFocus',
|
||
value: function restoreFocus() {
|
||
var scrollTop = this.quill.scrollingContainer.scrollTop;
|
||
this.quill.focus();
|
||
this.quill.scrollingContainer.scrollTop = scrollTop;
|
||
}
|
||
}, {
|
||
key: 'save',
|
||
value: function save() {
|
||
var value = this.textbox.value;
|
||
switch (this.root.getAttribute('data-mode')) {
|
||
case 'link':
|
||
{
|
||
var scrollTop = this.quill.root.scrollTop;
|
||
if (this.linkRange) {
|
||
this.quill.formatText(this.linkRange, 'link', value, _emitter2.default.sources.USER);
|
||
delete this.linkRange;
|
||
} else {
|
||
this.restoreFocus();
|
||
this.quill.format('link', value, _emitter2.default.sources.USER);
|
||
}
|
||
this.quill.root.scrollTop = scrollTop;
|
||
break;
|
||
}
|
||
case 'video':
|
||
{
|
||
value = extractVideoUrl(value);
|
||
} // eslint-disable-next-line no-fallthrough
|
||
case 'formula':
|
||
{
|
||
if (!value) break;
|
||
var range = this.quill.getSelection(true);
|
||
if (range != null) {
|
||
var index = range.index + range.length;
|
||
this.quill.insertEmbed(index, this.root.getAttribute('data-mode'), value, _emitter2.default.sources.USER);
|
||
if (this.root.getAttribute('data-mode') === 'formula') {
|
||
this.quill.insertText(index + 1, ' ', _emitter2.default.sources.USER);
|
||
}
|
||
this.quill.setSelection(index + 2, _emitter2.default.sources.USER);
|
||
}
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
this.textbox.value = '';
|
||
this.hide();
|
||
}
|
||
}]);
|
||
|
||
return BaseTooltip;
|
||
}(_tooltip2.default);
|
||
|
||
function extractVideoUrl(url) {
|
||
var match = url.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/) || url.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);
|
||
if (match) {
|
||
return (match[1] || 'https') + '://www.youtube.com/embed/' + match[2] + '?showinfo=0';
|
||
}
|
||
if (match = url.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/)) {
|
||
// eslint-disable-line no-cond-assign
|
||
return (match[1] || 'https') + '://player.vimeo.com/video/' + match[2] + '/';
|
||
}
|
||
return url;
|
||
}
|
||
|
||
function fillSelect(select, values) {
|
||
var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
||
|
||
values.forEach(function (value) {
|
||
var option = document.createElement('option');
|
||
if (value === defaultValue) {
|
||
option.setAttribute('selected', 'selected');
|
||
} else {
|
||
option.setAttribute('value', value);
|
||
}
|
||
select.appendChild(option);
|
||
});
|
||
}
|
||
|
||
exports.BaseTooltip = BaseTooltip;
|
||
exports.default = BaseTheme;
|
||
|
||
/***/ }),
|
||
/* 44 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var LinkedList = /** @class */ (function () {
|
||
function LinkedList() {
|
||
this.head = this.tail = null;
|
||
this.length = 0;
|
||
}
|
||
LinkedList.prototype.append = function () {
|
||
var nodes = [];
|
||
for (var _i = 0; _i < arguments.length; _i++) {
|
||
nodes[_i] = arguments[_i];
|
||
}
|
||
this.insertBefore(nodes[0], null);
|
||
if (nodes.length > 1) {
|
||
this.append.apply(this, nodes.slice(1));
|
||
}
|
||
};
|
||
LinkedList.prototype.contains = function (node) {
|
||
var cur, next = this.iterator();
|
||
while ((cur = next())) {
|
||
if (cur === node)
|
||
return true;
|
||
}
|
||
return false;
|
||
};
|
||
LinkedList.prototype.insertBefore = function (node, refNode) {
|
||
if (!node)
|
||
return;
|
||
node.next = refNode;
|
||
if (refNode != null) {
|
||
node.prev = refNode.prev;
|
||
if (refNode.prev != null) {
|
||
refNode.prev.next = node;
|
||
}
|
||
refNode.prev = node;
|
||
if (refNode === this.head) {
|
||
this.head = node;
|
||
}
|
||
}
|
||
else if (this.tail != null) {
|
||
this.tail.next = node;
|
||
node.prev = this.tail;
|
||
this.tail = node;
|
||
}
|
||
else {
|
||
node.prev = null;
|
||
this.head = this.tail = node;
|
||
}
|
||
this.length += 1;
|
||
};
|
||
LinkedList.prototype.offset = function (target) {
|
||
var index = 0, cur = this.head;
|
||
while (cur != null) {
|
||
if (cur === target)
|
||
return index;
|
||
index += cur.length();
|
||
cur = cur.next;
|
||
}
|
||
return -1;
|
||
};
|
||
LinkedList.prototype.remove = function (node) {
|
||
if (!this.contains(node))
|
||
return;
|
||
if (node.prev != null)
|
||
node.prev.next = node.next;
|
||
if (node.next != null)
|
||
node.next.prev = node.prev;
|
||
if (node === this.head)
|
||
this.head = node.next;
|
||
if (node === this.tail)
|
||
this.tail = node.prev;
|
||
this.length -= 1;
|
||
};
|
||
LinkedList.prototype.iterator = function (curNode) {
|
||
if (curNode === void 0) { curNode = this.head; }
|
||
// TODO use yield when we can
|
||
return function () {
|
||
var ret = curNode;
|
||
if (curNode != null)
|
||
curNode = curNode.next;
|
||
return ret;
|
||
};
|
||
};
|
||
LinkedList.prototype.find = function (index, inclusive) {
|
||
if (inclusive === void 0) { inclusive = false; }
|
||
var cur, next = this.iterator();
|
||
while ((cur = next())) {
|
||
var length = cur.length();
|
||
if (index < length ||
|
||
(inclusive && index === length && (cur.next == null || cur.next.length() !== 0))) {
|
||
return [cur, index];
|
||
}
|
||
index -= length;
|
||
}
|
||
return [null, 0];
|
||
};
|
||
LinkedList.prototype.forEach = function (callback) {
|
||
var cur, next = this.iterator();
|
||
while ((cur = next())) {
|
||
callback(cur);
|
||
}
|
||
};
|
||
LinkedList.prototype.forEachAt = function (index, length, callback) {
|
||
if (length <= 0)
|
||
return;
|
||
var _a = this.find(index), startNode = _a[0], offset = _a[1];
|
||
var cur, curIndex = index - offset, next = this.iterator(startNode);
|
||
while ((cur = next()) && curIndex < index + length) {
|
||
var curLength = cur.length();
|
||
if (index > curIndex) {
|
||
callback(cur, index - curIndex, Math.min(length, curIndex + curLength - index));
|
||
}
|
||
else {
|
||
callback(cur, 0, Math.min(curLength, index + length - curIndex));
|
||
}
|
||
curIndex += curLength;
|
||
}
|
||
};
|
||
LinkedList.prototype.map = function (callback) {
|
||
return this.reduce(function (memo, cur) {
|
||
memo.push(callback(cur));
|
||
return memo;
|
||
}, []);
|
||
};
|
||
LinkedList.prototype.reduce = function (callback, memo) {
|
||
var cur, next = this.iterator();
|
||
while ((cur = next())) {
|
||
memo = callback(memo, cur);
|
||
}
|
||
return memo;
|
||
};
|
||
return LinkedList;
|
||
}());
|
||
exports.default = LinkedList;
|
||
|
||
|
||
/***/ }),
|
||
/* 45 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
var __extends = (this && this.__extends) || (function () {
|
||
var extendStatics = Object.setPrototypeOf ||
|
||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||
return function (d, b) {
|
||
extendStatics(d, b);
|
||
function __() { this.constructor = d; }
|
||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
};
|
||
})();
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var container_1 = __webpack_require__(17);
|
||
var Registry = __webpack_require__(1);
|
||
var OBSERVER_CONFIG = {
|
||
attributes: true,
|
||
characterData: true,
|
||
characterDataOldValue: true,
|
||
childList: true,
|
||
subtree: true,
|
||
};
|
||
var MAX_OPTIMIZE_ITERATIONS = 100;
|
||
var ScrollBlot = /** @class */ (function (_super) {
|
||
__extends(ScrollBlot, _super);
|
||
function ScrollBlot(node) {
|
||
var _this = _super.call(this, node) || this;
|
||
_this.scroll = _this;
|
||
_this.observer = new MutationObserver(function (mutations) {
|
||
_this.update(mutations);
|
||
});
|
||
_this.observer.observe(_this.domNode, OBSERVER_CONFIG);
|
||
_this.attach();
|
||
return _this;
|
||
}
|
||
ScrollBlot.prototype.detach = function () {
|
||
_super.prototype.detach.call(this);
|
||
this.observer.disconnect();
|
||
};
|
||
ScrollBlot.prototype.deleteAt = function (index, length) {
|
||
this.update();
|
||
if (index === 0 && length === this.length()) {
|
||
this.children.forEach(function (child) {
|
||
child.remove();
|
||
});
|
||
}
|
||
else {
|
||
_super.prototype.deleteAt.call(this, index, length);
|
||
}
|
||
};
|
||
ScrollBlot.prototype.formatAt = function (index, length, name, value) {
|
||
this.update();
|
||
_super.prototype.formatAt.call(this, index, length, name, value);
|
||
};
|
||
ScrollBlot.prototype.insertAt = function (index, value, def) {
|
||
this.update();
|
||
_super.prototype.insertAt.call(this, index, value, def);
|
||
};
|
||
ScrollBlot.prototype.optimize = function (mutations, context) {
|
||
var _this = this;
|
||
if (mutations === void 0) { mutations = []; }
|
||
if (context === void 0) { context = {}; }
|
||
_super.prototype.optimize.call(this, context);
|
||
// We must modify mutations directly, cannot make copy and then modify
|
||
var records = [].slice.call(this.observer.takeRecords());
|
||
// Array.push currently seems to be implemented by a non-tail recursive function
|
||
// so we cannot just mutations.push.apply(mutations, this.observer.takeRecords());
|
||
while (records.length > 0)
|
||
mutations.push(records.pop());
|
||
// TODO use WeakMap
|
||
var mark = function (blot, markParent) {
|
||
if (markParent === void 0) { markParent = true; }
|
||
if (blot == null || blot === _this)
|
||
return;
|
||
if (blot.domNode.parentNode == null)
|
||
return;
|
||
// @ts-ignore
|
||
if (blot.domNode[Registry.DATA_KEY].mutations == null) {
|
||
// @ts-ignore
|
||
blot.domNode[Registry.DATA_KEY].mutations = [];
|
||
}
|
||
if (markParent)
|
||
mark(blot.parent);
|
||
};
|
||
var optimize = function (blot) {
|
||
// Post-order traversal
|
||
if (
|
||
// @ts-ignore
|
||
blot.domNode[Registry.DATA_KEY] == null ||
|
||
// @ts-ignore
|
||
blot.domNode[Registry.DATA_KEY].mutations == null) {
|
||
return;
|
||
}
|
||
if (blot instanceof container_1.default) {
|
||
blot.children.forEach(optimize);
|
||
}
|
||
blot.optimize(context);
|
||
};
|
||
var remaining = mutations;
|
||
for (var i = 0; remaining.length > 0; i += 1) {
|
||
if (i >= MAX_OPTIMIZE_ITERATIONS) {
|
||
throw new Error('[Parchment] Maximum optimize iterations reached');
|
||
}
|
||
remaining.forEach(function (mutation) {
|
||
var blot = Registry.find(mutation.target, true);
|
||
if (blot == null)
|
||
return;
|
||
if (blot.domNode === mutation.target) {
|
||
if (mutation.type === 'childList') {
|
||
mark(Registry.find(mutation.previousSibling, false));
|
||
[].forEach.call(mutation.addedNodes, function (node) {
|
||
var child = Registry.find(node, false);
|
||
mark(child, false);
|
||
if (child instanceof container_1.default) {
|
||
child.children.forEach(function (grandChild) {
|
||
mark(grandChild, false);
|
||
});
|
||
}
|
||
});
|
||
}
|
||
else if (mutation.type === 'attributes') {
|
||
mark(blot.prev);
|
||
}
|
||
}
|
||
mark(blot);
|
||
});
|
||
this.children.forEach(optimize);
|
||
remaining = [].slice.call(this.observer.takeRecords());
|
||
records = remaining.slice();
|
||
while (records.length > 0)
|
||
mutations.push(records.pop());
|
||
}
|
||
};
|
||
ScrollBlot.prototype.update = function (mutations, context) {
|
||
var _this = this;
|
||
if (context === void 0) { context = {}; }
|
||
mutations = mutations || this.observer.takeRecords();
|
||
// TODO use WeakMap
|
||
mutations
|
||
.map(function (mutation) {
|
||
var blot = Registry.find(mutation.target, true);
|
||
if (blot == null)
|
||
return null;
|
||
// @ts-ignore
|
||
if (blot.domNode[Registry.DATA_KEY].mutations == null) {
|
||
// @ts-ignore
|
||
blot.domNode[Registry.DATA_KEY].mutations = [mutation];
|
||
return blot;
|
||
}
|
||
else {
|
||
// @ts-ignore
|
||
blot.domNode[Registry.DATA_KEY].mutations.push(mutation);
|
||
return null;
|
||
}
|
||
})
|
||
.forEach(function (blot) {
|
||
if (blot == null ||
|
||
blot === _this ||
|
||
//@ts-ignore
|
||
blot.domNode[Registry.DATA_KEY] == null)
|
||
return;
|
||
// @ts-ignore
|
||
blot.update(blot.domNode[Registry.DATA_KEY].mutations || [], context);
|
||
});
|
||
// @ts-ignore
|
||
if (this.domNode[Registry.DATA_KEY].mutations != null) {
|
||
// @ts-ignore
|
||
_super.prototype.update.call(this, this.domNode[Registry.DATA_KEY].mutations, context);
|
||
}
|
||
this.optimize(mutations, context);
|
||
};
|
||
ScrollBlot.blotName = 'scroll';
|
||
ScrollBlot.defaultChild = 'block';
|
||
ScrollBlot.scope = Registry.Scope.BLOCK_BLOT;
|
||
ScrollBlot.tagName = 'DIV';
|
||
return ScrollBlot;
|
||
}(container_1.default));
|
||
exports.default = ScrollBlot;
|
||
|
||
|
||
/***/ }),
|
||
/* 46 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
var __extends = (this && this.__extends) || (function () {
|
||
var extendStatics = Object.setPrototypeOf ||
|
||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||
return function (d, b) {
|
||
extendStatics(d, b);
|
||
function __() { this.constructor = d; }
|
||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
};
|
||
})();
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var format_1 = __webpack_require__(18);
|
||
var Registry = __webpack_require__(1);
|
||
// Shallow object comparison
|
||
function isEqual(obj1, obj2) {
|
||
if (Object.keys(obj1).length !== Object.keys(obj2).length)
|
||
return false;
|
||
// @ts-ignore
|
||
for (var prop in obj1) {
|
||
// @ts-ignore
|
||
if (obj1[prop] !== obj2[prop])
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
var InlineBlot = /** @class */ (function (_super) {
|
||
__extends(InlineBlot, _super);
|
||
function InlineBlot() {
|
||
return _super !== null && _super.apply(this, arguments) || this;
|
||
}
|
||
InlineBlot.formats = function (domNode) {
|
||
if (domNode.tagName === InlineBlot.tagName)
|
||
return undefined;
|
||
return _super.formats.call(this, domNode);
|
||
};
|
||
InlineBlot.prototype.format = function (name, value) {
|
||
var _this = this;
|
||
if (name === this.statics.blotName && !value) {
|
||
this.children.forEach(function (child) {
|
||
if (!(child instanceof format_1.default)) {
|
||
child = child.wrap(InlineBlot.blotName, true);
|
||
}
|
||
_this.attributes.copy(child);
|
||
});
|
||
this.unwrap();
|
||
}
|
||
else {
|
||
_super.prototype.format.call(this, name, value);
|
||
}
|
||
};
|
||
InlineBlot.prototype.formatAt = function (index, length, name, value) {
|
||
if (this.formats()[name] != null || Registry.query(name, Registry.Scope.ATTRIBUTE)) {
|
||
var blot = this.isolate(index, length);
|
||
blot.format(name, value);
|
||
}
|
||
else {
|
||
_super.prototype.formatAt.call(this, index, length, name, value);
|
||
}
|
||
};
|
||
InlineBlot.prototype.optimize = function (context) {
|
||
_super.prototype.optimize.call(this, context);
|
||
var formats = this.formats();
|
||
if (Object.keys(formats).length === 0) {
|
||
return this.unwrap(); // unformatted span
|
||
}
|
||
var next = this.next;
|
||
if (next instanceof InlineBlot && next.prev === this && isEqual(formats, next.formats())) {
|
||
next.moveChildren(this);
|
||
next.remove();
|
||
}
|
||
};
|
||
InlineBlot.blotName = 'inline';
|
||
InlineBlot.scope = Registry.Scope.INLINE_BLOT;
|
||
InlineBlot.tagName = 'SPAN';
|
||
return InlineBlot;
|
||
}(format_1.default));
|
||
exports.default = InlineBlot;
|
||
|
||
|
||
/***/ }),
|
||
/* 47 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
var __extends = (this && this.__extends) || (function () {
|
||
var extendStatics = Object.setPrototypeOf ||
|
||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||
return function (d, b) {
|
||
extendStatics(d, b);
|
||
function __() { this.constructor = d; }
|
||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
};
|
||
})();
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var format_1 = __webpack_require__(18);
|
||
var Registry = __webpack_require__(1);
|
||
var BlockBlot = /** @class */ (function (_super) {
|
||
__extends(BlockBlot, _super);
|
||
function BlockBlot() {
|
||
return _super !== null && _super.apply(this, arguments) || this;
|
||
}
|
||
BlockBlot.formats = function (domNode) {
|
||
var tagName = Registry.query(BlockBlot.blotName).tagName;
|
||
if (domNode.tagName === tagName)
|
||
return undefined;
|
||
return _super.formats.call(this, domNode);
|
||
};
|
||
BlockBlot.prototype.format = function (name, value) {
|
||
if (Registry.query(name, Registry.Scope.BLOCK) == null) {
|
||
return;
|
||
}
|
||
else if (name === this.statics.blotName && !value) {
|
||
this.replaceWith(BlockBlot.blotName);
|
||
}
|
||
else {
|
||
_super.prototype.format.call(this, name, value);
|
||
}
|
||
};
|
||
BlockBlot.prototype.formatAt = function (index, length, name, value) {
|
||
if (Registry.query(name, Registry.Scope.BLOCK) != null) {
|
||
this.format(name, value);
|
||
}
|
||
else {
|
||
_super.prototype.formatAt.call(this, index, length, name, value);
|
||
}
|
||
};
|
||
BlockBlot.prototype.insertAt = function (index, value, def) {
|
||
if (def == null || Registry.query(value, Registry.Scope.INLINE) != null) {
|
||
// Insert text or inline
|
||
_super.prototype.insertAt.call(this, index, value, def);
|
||
}
|
||
else {
|
||
var after = this.split(index);
|
||
var blot = Registry.create(value, def);
|
||
after.parent.insertBefore(blot, after);
|
||
}
|
||
};
|
||
BlockBlot.prototype.update = function (mutations, context) {
|
||
if (navigator.userAgent.match(/Trident/)) {
|
||
this.build();
|
||
}
|
||
else {
|
||
_super.prototype.update.call(this, mutations, context);
|
||
}
|
||
};
|
||
BlockBlot.blotName = 'block';
|
||
BlockBlot.scope = Registry.Scope.BLOCK_BLOT;
|
||
BlockBlot.tagName = 'P';
|
||
return BlockBlot;
|
||
}(format_1.default));
|
||
exports.default = BlockBlot;
|
||
|
||
|
||
/***/ }),
|
||
/* 48 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
var __extends = (this && this.__extends) || (function () {
|
||
var extendStatics = Object.setPrototypeOf ||
|
||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||
return function (d, b) {
|
||
extendStatics(d, b);
|
||
function __() { this.constructor = d; }
|
||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
};
|
||
})();
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var leaf_1 = __webpack_require__(19);
|
||
var EmbedBlot = /** @class */ (function (_super) {
|
||
__extends(EmbedBlot, _super);
|
||
function EmbedBlot() {
|
||
return _super !== null && _super.apply(this, arguments) || this;
|
||
}
|
||
EmbedBlot.formats = function (domNode) {
|
||
return undefined;
|
||
};
|
||
EmbedBlot.prototype.format = function (name, value) {
|
||
// super.formatAt wraps, which is what we want in general,
|
||
// but this allows subclasses to overwrite for formats
|
||
// that just apply to particular embeds
|
||
_super.prototype.formatAt.call(this, 0, this.length(), name, value);
|
||
};
|
||
EmbedBlot.prototype.formatAt = function (index, length, name, value) {
|
||
if (index === 0 && length === this.length()) {
|
||
this.format(name, value);
|
||
}
|
||
else {
|
||
_super.prototype.formatAt.call(this, index, length, name, value);
|
||
}
|
||
};
|
||
EmbedBlot.prototype.formats = function () {
|
||
return this.statics.formats(this.domNode);
|
||
};
|
||
return EmbedBlot;
|
||
}(leaf_1.default));
|
||
exports.default = EmbedBlot;
|
||
|
||
|
||
/***/ }),
|
||
/* 49 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
var __extends = (this && this.__extends) || (function () {
|
||
var extendStatics = Object.setPrototypeOf ||
|
||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||
return function (d, b) {
|
||
extendStatics(d, b);
|
||
function __() { this.constructor = d; }
|
||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
};
|
||
})();
|
||
Object.defineProperty(exports, "__esModule", { value: true });
|
||
var leaf_1 = __webpack_require__(19);
|
||
var Registry = __webpack_require__(1);
|
||
var TextBlot = /** @class */ (function (_super) {
|
||
__extends(TextBlot, _super);
|
||
function TextBlot(node) {
|
||
var _this = _super.call(this, node) || this;
|
||
_this.text = _this.statics.value(_this.domNode);
|
||
return _this;
|
||
}
|
||
TextBlot.create = function (value) {
|
||
return document.createTextNode(value);
|
||
};
|
||
TextBlot.value = function (domNode) {
|
||
var text = domNode.data;
|
||
// @ts-ignore
|
||
if (text['normalize'])
|
||
text = text['normalize']();
|
||
return text;
|
||
};
|
||
TextBlot.prototype.deleteAt = function (index, length) {
|
||
this.domNode.data = this.text = this.text.slice(0, index) + this.text.slice(index + length);
|
||
};
|
||
TextBlot.prototype.index = function (node, offset) {
|
||
if (this.domNode === node) {
|
||
return offset;
|
||
}
|
||
return -1;
|
||
};
|
||
TextBlot.prototype.insertAt = function (index, value, def) {
|
||
if (def == null) {
|
||
this.text = this.text.slice(0, index) + value + this.text.slice(index);
|
||
this.domNode.data = this.text;
|
||
}
|
||
else {
|
||
_super.prototype.insertAt.call(this, index, value, def);
|
||
}
|
||
};
|
||
TextBlot.prototype.length = function () {
|
||
return this.text.length;
|
||
};
|
||
TextBlot.prototype.optimize = function (context) {
|
||
_super.prototype.optimize.call(this, context);
|
||
this.text = this.statics.value(this.domNode);
|
||
if (this.text.length === 0) {
|
||
this.remove();
|
||
}
|
||
else if (this.next instanceof TextBlot && this.next.prev === this) {
|
||
this.insertAt(this.length(), this.next.value());
|
||
this.next.remove();
|
||
}
|
||
};
|
||
TextBlot.prototype.position = function (index, inclusive) {
|
||
if (inclusive === void 0) { inclusive = false; }
|
||
return [this.domNode, index];
|
||
};
|
||
TextBlot.prototype.split = function (index, force) {
|
||
if (force === void 0) { force = false; }
|
||
if (!force) {
|
||
if (index === 0)
|
||
return this;
|
||
if (index === this.length())
|
||
return this.next;
|
||
}
|
||
var after = Registry.create(this.domNode.splitText(index));
|
||
this.parent.insertBefore(after, this.next);
|
||
this.text = this.statics.value(this.domNode);
|
||
return after;
|
||
};
|
||
TextBlot.prototype.update = function (mutations, context) {
|
||
var _this = this;
|
||
if (mutations.some(function (mutation) {
|
||
return mutation.type === 'characterData' && mutation.target === _this.domNode;
|
||
})) {
|
||
this.text = this.statics.value(this.domNode);
|
||
}
|
||
};
|
||
TextBlot.prototype.value = function () {
|
||
return this.text;
|
||
};
|
||
TextBlot.blotName = 'text';
|
||
TextBlot.scope = Registry.Scope.INLINE_BLOT;
|
||
return TextBlot;
|
||
}(leaf_1.default));
|
||
exports.default = TextBlot;
|
||
|
||
|
||
/***/ }),
|
||
/* 50 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
var elem = document.createElement('div');
|
||
elem.classList.toggle('test-class', false);
|
||
if (elem.classList.contains('test-class')) {
|
||
var _toggle = DOMTokenList.prototype.toggle;
|
||
DOMTokenList.prototype.toggle = function (token, force) {
|
||
if (arguments.length > 1 && !this.contains(token) === !force) {
|
||
return force;
|
||
} else {
|
||
return _toggle.call(this, token);
|
||
}
|
||
};
|
||
}
|
||
|
||
if (!String.prototype.startsWith) {
|
||
String.prototype.startsWith = function (searchString, position) {
|
||
position = position || 0;
|
||
return this.substr(position, searchString.length) === searchString;
|
||
};
|
||
}
|
||
|
||
if (!String.prototype.endsWith) {
|
||
String.prototype.endsWith = function (searchString, position) {
|
||
var subjectString = this.toString();
|
||
if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {
|
||
position = subjectString.length;
|
||
}
|
||
position -= searchString.length;
|
||
var lastIndex = subjectString.indexOf(searchString, position);
|
||
return lastIndex !== -1 && lastIndex === position;
|
||
};
|
||
}
|
||
|
||
if (!Array.prototype.find) {
|
||
Object.defineProperty(Array.prototype, "find", {
|
||
value: function value(predicate) {
|
||
if (this === null) {
|
||
throw new TypeError('Array.prototype.find called on null or undefined');
|
||
}
|
||
if (typeof predicate !== 'function') {
|
||
throw new TypeError('predicate must be a function');
|
||
}
|
||
var list = Object(this);
|
||
var length = list.length >>> 0;
|
||
var thisArg = arguments[1];
|
||
var value;
|
||
|
||
for (var i = 0; i < length; i++) {
|
||
value = list[i];
|
||
if (predicate.call(thisArg, value, i, list)) {
|
||
return value;
|
||
}
|
||
}
|
||
return undefined;
|
||
}
|
||
});
|
||
}
|
||
|
||
document.addEventListener("DOMContentLoaded", function () {
|
||
// Disable resizing in Firefox
|
||
document.execCommand("enableObjectResizing", false, false);
|
||
// Disable automatic linkifying in IE11
|
||
document.execCommand("autoUrlDetect", false, false);
|
||
});
|
||
|
||
/***/ }),
|
||
/* 51 */
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* This library modifies the diff-patch-match library by Neil Fraser
|
||
* by removing the patch and match functionality and certain advanced
|
||
* options in the diff function. The original license is as follows:
|
||
*
|
||
* ===
|
||
*
|
||
* Diff Match and Patch
|
||
*
|
||
* Copyright 2006 Google Inc.
|
||
* http://code.google.com/p/google-diff-match-patch/
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/
|
||
|
||
|
||
/**
|
||
* The data structure representing a diff is an array of tuples:
|
||
* [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]
|
||
* which means: delete 'Hello', add 'Goodbye' and keep ' world.'
|
||
*/
|
||
var DIFF_DELETE = -1;
|
||
var DIFF_INSERT = 1;
|
||
var DIFF_EQUAL = 0;
|
||
|
||
|
||
/**
|
||
* Find the differences between two texts. Simplifies the problem by stripping
|
||
* any common prefix or suffix off the texts before diffing.
|
||
* @param {string} text1 Old string to be diffed.
|
||
* @param {string} text2 New string to be diffed.
|
||
* @param {Int} cursor_pos Expected edit position in text1 (optional)
|
||
* @return {Array} Array of diff tuples.
|
||
*/
|
||
function diff_main(text1, text2, cursor_pos) {
|
||
// Check for equality (speedup).
|
||
if (text1 == text2) {
|
||
if (text1) {
|
||
return [[DIFF_EQUAL, text1]];
|
||
}
|
||
return [];
|
||
}
|
||
|
||
// Check cursor_pos within bounds
|
||
if (cursor_pos < 0 || text1.length < cursor_pos) {
|
||
cursor_pos = null;
|
||
}
|
||
|
||
// Trim off common prefix (speedup).
|
||
var commonlength = diff_commonPrefix(text1, text2);
|
||
var commonprefix = text1.substring(0, commonlength);
|
||
text1 = text1.substring(commonlength);
|
||
text2 = text2.substring(commonlength);
|
||
|
||
// Trim off common suffix (speedup).
|
||
commonlength = diff_commonSuffix(text1, text2);
|
||
var commonsuffix = text1.substring(text1.length - commonlength);
|
||
text1 = text1.substring(0, text1.length - commonlength);
|
||
text2 = text2.substring(0, text2.length - commonlength);
|
||
|
||
// Compute the diff on the middle block.
|
||
var diffs = diff_compute_(text1, text2);
|
||
|
||
// Restore the prefix and suffix.
|
||
if (commonprefix) {
|
||
diffs.unshift([DIFF_EQUAL, commonprefix]);
|
||
}
|
||
if (commonsuffix) {
|
||
diffs.push([DIFF_EQUAL, commonsuffix]);
|
||
}
|
||
diff_cleanupMerge(diffs);
|
||
if (cursor_pos != null) {
|
||
diffs = fix_cursor(diffs, cursor_pos);
|
||
}
|
||
diffs = fix_emoji(diffs);
|
||
return diffs;
|
||
};
|
||
|
||
|
||
/**
|
||
* Find the differences between two texts. Assumes that the texts do not
|
||
* have any common prefix or suffix.
|
||
* @param {string} text1 Old string to be diffed.
|
||
* @param {string} text2 New string to be diffed.
|
||
* @return {Array} Array of diff tuples.
|
||
*/
|
||
function diff_compute_(text1, text2) {
|
||
var diffs;
|
||
|
||
if (!text1) {
|
||
// Just add some text (speedup).
|
||
return [[DIFF_INSERT, text2]];
|
||
}
|
||
|
||
if (!text2) {
|
||
// Just delete some text (speedup).
|
||
return [[DIFF_DELETE, text1]];
|
||
}
|
||
|
||
var longtext = text1.length > text2.length ? text1 : text2;
|
||
var shorttext = text1.length > text2.length ? text2 : text1;
|
||
var i = longtext.indexOf(shorttext);
|
||
if (i != -1) {
|
||
// Shorter text is inside the longer text (speedup).
|
||
diffs = [[DIFF_INSERT, longtext.substring(0, i)],
|
||
[DIFF_EQUAL, shorttext],
|
||
[DIFF_INSERT, longtext.substring(i + shorttext.length)]];
|
||
// Swap insertions for deletions if diff is reversed.
|
||
if (text1.length > text2.length) {
|
||
diffs[0][0] = diffs[2][0] = DIFF_DELETE;
|
||
}
|
||
return diffs;
|
||
}
|
||
|
||
if (shorttext.length == 1) {
|
||
// Single character string.
|
||
// After the previous speedup, the character can't be an equality.
|
||
return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];
|
||
}
|
||
|
||
// Check to see if the problem can be split in two.
|
||
var hm = diff_halfMatch_(text1, text2);
|
||
if (hm) {
|
||
// A half-match was found, sort out the return data.
|
||
var text1_a = hm[0];
|
||
var text1_b = hm[1];
|
||
var text2_a = hm[2];
|
||
var text2_b = hm[3];
|
||
var mid_common = hm[4];
|
||
// Send both pairs off for separate processing.
|
||
var diffs_a = diff_main(text1_a, text2_a);
|
||
var diffs_b = diff_main(text1_b, text2_b);
|
||
// Merge the results.
|
||
return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);
|
||
}
|
||
|
||
return diff_bisect_(text1, text2);
|
||
};
|
||
|
||
|
||
/**
|
||
* Find the 'middle snake' of a diff, split the problem in two
|
||
* and return the recursively constructed diff.
|
||
* See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.
|
||
* @param {string} text1 Old string to be diffed.
|
||
* @param {string} text2 New string to be diffed.
|
||
* @return {Array} Array of diff tuples.
|
||
* @private
|
||
*/
|
||
function diff_bisect_(text1, text2) {
|
||
// Cache the text lengths to prevent multiple calls.
|
||
var text1_length = text1.length;
|
||
var text2_length = text2.length;
|
||
var max_d = Math.ceil((text1_length + text2_length) / 2);
|
||
var v_offset = max_d;
|
||
var v_length = 2 * max_d;
|
||
var v1 = new Array(v_length);
|
||
var v2 = new Array(v_length);
|
||
// Setting all elements to -1 is faster in Chrome & Firefox than mixing
|
||
// integers and undefined.
|
||
for (var x = 0; x < v_length; x++) {
|
||
v1[x] = -1;
|
||
v2[x] = -1;
|
||
}
|
||
v1[v_offset + 1] = 0;
|
||
v2[v_offset + 1] = 0;
|
||
var delta = text1_length - text2_length;
|
||
// If the total number of characters is odd, then the front path will collide
|
||
// with the reverse path.
|
||
var front = (delta % 2 != 0);
|
||
// Offsets for start and end of k loop.
|
||
// Prevents mapping of space beyond the grid.
|
||
var k1start = 0;
|
||
var k1end = 0;
|
||
var k2start = 0;
|
||
var k2end = 0;
|
||
for (var d = 0; d < max_d; d++) {
|
||
// Walk the front path one step.
|
||
for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {
|
||
var k1_offset = v_offset + k1;
|
||
var x1;
|
||
if (k1 == -d || (k1 != d && v1[k1_offset - 1] < v1[k1_offset + 1])) {
|
||
x1 = v1[k1_offset + 1];
|
||
} else {
|
||
x1 = v1[k1_offset - 1] + 1;
|
||
}
|
||
var y1 = x1 - k1;
|
||
while (x1 < text1_length && y1 < text2_length &&
|
||
text1.charAt(x1) == text2.charAt(y1)) {
|
||
x1++;
|
||
y1++;
|
||
}
|
||
v1[k1_offset] = x1;
|
||
if (x1 > text1_length) {
|
||
// Ran off the right of the graph.
|
||
k1end += 2;
|
||
} else if (y1 > text2_length) {
|
||
// Ran off the bottom of the graph.
|
||
k1start += 2;
|
||
} else if (front) {
|
||
var k2_offset = v_offset + delta - k1;
|
||
if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] != -1) {
|
||
// Mirror x2 onto top-left coordinate system.
|
||
var x2 = text1_length - v2[k2_offset];
|
||
if (x1 >= x2) {
|
||
// Overlap detected.
|
||
return diff_bisectSplit_(text1, text2, x1, y1);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
// Walk the reverse path one step.
|
||
for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {
|
||
var k2_offset = v_offset + k2;
|
||
var x2;
|
||
if (k2 == -d || (k2 != d && v2[k2_offset - 1] < v2[k2_offset + 1])) {
|
||
x2 = v2[k2_offset + 1];
|
||
} else {
|
||
x2 = v2[k2_offset - 1] + 1;
|
||
}
|
||
var y2 = x2 - k2;
|
||
while (x2 < text1_length && y2 < text2_length &&
|
||
text1.charAt(text1_length - x2 - 1) ==
|
||
text2.charAt(text2_length - y2 - 1)) {
|
||
x2++;
|
||
y2++;
|
||
}
|
||
v2[k2_offset] = x2;
|
||
if (x2 > text1_length) {
|
||
// Ran off the left of the graph.
|
||
k2end += 2;
|
||
} else if (y2 > text2_length) {
|
||
// Ran off the top of the graph.
|
||
k2start += 2;
|
||
} else if (!front) {
|
||
var k1_offset = v_offset + delta - k2;
|
||
if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] != -1) {
|
||
var x1 = v1[k1_offset];
|
||
var y1 = v_offset + x1 - k1_offset;
|
||
// Mirror x2 onto top-left coordinate system.
|
||
x2 = text1_length - x2;
|
||
if (x1 >= x2) {
|
||
// Overlap detected.
|
||
return diff_bisectSplit_(text1, text2, x1, y1);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
// Diff took too long and hit the deadline or
|
||
// number of diffs equals number of characters, no commonality at all.
|
||
return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];
|
||
};
|
||
|
||
|
||
/**
|
||
* Given the location of the 'middle snake', split the diff in two parts
|
||
* and recurse.
|
||
* @param {string} text1 Old string to be diffed.
|
||
* @param {string} text2 New string to be diffed.
|
||
* @param {number} x Index of split point in text1.
|
||
* @param {number} y Index of split point in text2.
|
||
* @return {Array} Array of diff tuples.
|
||
*/
|
||
function diff_bisectSplit_(text1, text2, x, y) {
|
||
var text1a = text1.substring(0, x);
|
||
var text2a = text2.substring(0, y);
|
||
var text1b = text1.substring(x);
|
||
var text2b = text2.substring(y);
|
||
|
||
// Compute both diffs serially.
|
||
var diffs = diff_main(text1a, text2a);
|
||
var diffsb = diff_main(text1b, text2b);
|
||
|
||
return diffs.concat(diffsb);
|
||
};
|
||
|
||
|
||
/**
|
||
* Determine the common prefix of two strings.
|
||
* @param {string} text1 First string.
|
||
* @param {string} text2 Second string.
|
||
* @return {number} The number of characters common to the start of each
|
||
* string.
|
||
*/
|
||
function diff_commonPrefix(text1, text2) {
|
||
// Quick check for common null cases.
|
||
if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {
|
||
return 0;
|
||
}
|
||
// Binary search.
|
||
// Performance analysis: http://neil.fraser.name/news/2007/10/09/
|
||
var pointermin = 0;
|
||
var pointermax = Math.min(text1.length, text2.length);
|
||
var pointermid = pointermax;
|
||
var pointerstart = 0;
|
||
while (pointermin < pointermid) {
|
||
if (text1.substring(pointerstart, pointermid) ==
|
||
text2.substring(pointerstart, pointermid)) {
|
||
pointermin = pointermid;
|
||
pointerstart = pointermin;
|
||
} else {
|
||
pointermax = pointermid;
|
||
}
|
||
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
|
||
}
|
||
return pointermid;
|
||
};
|
||
|
||
|
||
/**
|
||
* Determine the common suffix of two strings.
|
||
* @param {string} text1 First string.
|
||
* @param {string} text2 Second string.
|
||
* @return {number} The number of characters common to the end of each string.
|
||
*/
|
||
function diff_commonSuffix(text1, text2) {
|
||
// Quick check for common null cases.
|
||
if (!text1 || !text2 ||
|
||
text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)) {
|
||
return 0;
|
||
}
|
||
// Binary search.
|
||
// Performance analysis: http://neil.fraser.name/news/2007/10/09/
|
||
var pointermin = 0;
|
||
var pointermax = Math.min(text1.length, text2.length);
|
||
var pointermid = pointermax;
|
||
var pointerend = 0;
|
||
while (pointermin < pointermid) {
|
||
if (text1.substring(text1.length - pointermid, text1.length - pointerend) ==
|
||
text2.substring(text2.length - pointermid, text2.length - pointerend)) {
|
||
pointermin = pointermid;
|
||
pointerend = pointermin;
|
||
} else {
|
||
pointermax = pointermid;
|
||
}
|
||
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
|
||
}
|
||
return pointermid;
|
||
};
|
||
|
||
|
||
/**
|
||
* Do the two texts share a substring which is at least half the length of the
|
||
* longer text?
|
||
* This speedup can produce non-minimal diffs.
|
||
* @param {string} text1 First string.
|
||
* @param {string} text2 Second string.
|
||
* @return {Array.<string>} Five element Array, containing the prefix of
|
||
* text1, the suffix of text1, the prefix of text2, the suffix of
|
||
* text2 and the common middle. Or null if there was no match.
|
||
*/
|
||
function diff_halfMatch_(text1, text2) {
|
||
var longtext = text1.length > text2.length ? text1 : text2;
|
||
var shorttext = text1.length > text2.length ? text2 : text1;
|
||
if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {
|
||
return null; // Pointless.
|
||
}
|
||
|
||
/**
|
||
* Does a substring of shorttext exist within longtext such that the substring
|
||
* is at least half the length of longtext?
|
||
* Closure, but does not reference any external variables.
|
||
* @param {string} longtext Longer string.
|
||
* @param {string} shorttext Shorter string.
|
||
* @param {number} i Start index of quarter length substring within longtext.
|
||
* @return {Array.<string>} Five element Array, containing the prefix of
|
||
* longtext, the suffix of longtext, the prefix of shorttext, the suffix
|
||
* of shorttext and the common middle. Or null if there was no match.
|
||
* @private
|
||
*/
|
||
function diff_halfMatchI_(longtext, shorttext, i) {
|
||
// Start with a 1/4 length substring at position i as a seed.
|
||
var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));
|
||
var j = -1;
|
||
var best_common = '';
|
||
var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;
|
||
while ((j = shorttext.indexOf(seed, j + 1)) != -1) {
|
||
var prefixLength = diff_commonPrefix(longtext.substring(i),
|
||
shorttext.substring(j));
|
||
var suffixLength = diff_commonSuffix(longtext.substring(0, i),
|
||
shorttext.substring(0, j));
|
||
if (best_common.length < suffixLength + prefixLength) {
|
||
best_common = shorttext.substring(j - suffixLength, j) +
|
||
shorttext.substring(j, j + prefixLength);
|
||
best_longtext_a = longtext.substring(0, i - suffixLength);
|
||
best_longtext_b = longtext.substring(i + prefixLength);
|
||
best_shorttext_a = shorttext.substring(0, j - suffixLength);
|
||
best_shorttext_b = shorttext.substring(j + prefixLength);
|
||
}
|
||
}
|
||
if (best_common.length * 2 >= longtext.length) {
|
||
return [best_longtext_a, best_longtext_b,
|
||
best_shorttext_a, best_shorttext_b, best_common];
|
||
} else {
|
||
return null;
|
||
}
|
||
}
|
||
|
||
// First check if the second quarter is the seed for a half-match.
|
||
var hm1 = diff_halfMatchI_(longtext, shorttext,
|
||
Math.ceil(longtext.length / 4));
|
||
// Check again based on the third quarter.
|
||
var hm2 = diff_halfMatchI_(longtext, shorttext,
|
||
Math.ceil(longtext.length / 2));
|
||
var hm;
|
||
if (!hm1 && !hm2) {
|
||
return null;
|
||
} else if (!hm2) {
|
||
hm = hm1;
|
||
} else if (!hm1) {
|
||
hm = hm2;
|
||
} else {
|
||
// Both matched. Select the longest.
|
||
hm = hm1[4].length > hm2[4].length ? hm1 : hm2;
|
||
}
|
||
|
||
// A half-match was found, sort out the return data.
|
||
var text1_a, text1_b, text2_a, text2_b;
|
||
if (text1.length > text2.length) {
|
||
text1_a = hm[0];
|
||
text1_b = hm[1];
|
||
text2_a = hm[2];
|
||
text2_b = hm[3];
|
||
} else {
|
||
text2_a = hm[0];
|
||
text2_b = hm[1];
|
||
text1_a = hm[2];
|
||
text1_b = hm[3];
|
||
}
|
||
var mid_common = hm[4];
|
||
return [text1_a, text1_b, text2_a, text2_b, mid_common];
|
||
};
|
||
|
||
|
||
/**
|
||
* Reorder and merge like edit sections. Merge equalities.
|
||
* Any edit section can move as long as it doesn't cross an equality.
|
||
* @param {Array} diffs Array of diff tuples.
|
||
*/
|
||
function diff_cleanupMerge(diffs) {
|
||
diffs.push([DIFF_EQUAL, '']); // Add a dummy entry at the end.
|
||
var pointer = 0;
|
||
var count_delete = 0;
|
||
var count_insert = 0;
|
||
var text_delete = '';
|
||
var text_insert = '';
|
||
var commonlength;
|
||
while (pointer < diffs.length) {
|
||
switch (diffs[pointer][0]) {
|
||
case DIFF_INSERT:
|
||
count_insert++;
|
||
text_insert += diffs[pointer][1];
|
||
pointer++;
|
||
break;
|
||
case DIFF_DELETE:
|
||
count_delete++;
|
||
text_delete += diffs[pointer][1];
|
||
pointer++;
|
||
break;
|
||
case DIFF_EQUAL:
|
||
// Upon reaching an equality, check for prior redundancies.
|
||
if (count_delete + count_insert > 1) {
|
||
if (count_delete !== 0 && count_insert !== 0) {
|
||
// Factor out any common prefixies.
|
||
commonlength = diff_commonPrefix(text_insert, text_delete);
|
||
if (commonlength !== 0) {
|
||
if ((pointer - count_delete - count_insert) > 0 &&
|
||
diffs[pointer - count_delete - count_insert - 1][0] ==
|
||
DIFF_EQUAL) {
|
||
diffs[pointer - count_delete - count_insert - 1][1] +=
|
||
text_insert.substring(0, commonlength);
|
||
} else {
|
||
diffs.splice(0, 0, [DIFF_EQUAL,
|
||
text_insert.substring(0, commonlength)]);
|
||
pointer++;
|
||
}
|
||
text_insert = text_insert.substring(commonlength);
|
||
text_delete = text_delete.substring(commonlength);
|
||
}
|
||
// Factor out any common suffixies.
|
||
commonlength = diff_commonSuffix(text_insert, text_delete);
|
||
if (commonlength !== 0) {
|
||
diffs[pointer][1] = text_insert.substring(text_insert.length -
|
||
commonlength) + diffs[pointer][1];
|
||
text_insert = text_insert.substring(0, text_insert.length -
|
||
commonlength);
|
||
text_delete = text_delete.substring(0, text_delete.length -
|
||
commonlength);
|
||
}
|
||
}
|
||
// Delete the offending records and add the merged ones.
|
||
if (count_delete === 0) {
|
||
diffs.splice(pointer - count_insert,
|
||
count_delete + count_insert, [DIFF_INSERT, text_insert]);
|
||
} else if (count_insert === 0) {
|
||
diffs.splice(pointer - count_delete,
|
||
count_delete + count_insert, [DIFF_DELETE, text_delete]);
|
||
} else {
|
||
diffs.splice(pointer - count_delete - count_insert,
|
||
count_delete + count_insert, [DIFF_DELETE, text_delete],
|
||
[DIFF_INSERT, text_insert]);
|
||
}
|
||
pointer = pointer - count_delete - count_insert +
|
||
(count_delete ? 1 : 0) + (count_insert ? 1 : 0) + 1;
|
||
} else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) {
|
||
// Merge this equality with the previous one.
|
||
diffs[pointer - 1][1] += diffs[pointer][1];
|
||
diffs.splice(pointer, 1);
|
||
} else {
|
||
pointer++;
|
||
}
|
||
count_insert = 0;
|
||
count_delete = 0;
|
||
text_delete = '';
|
||
text_insert = '';
|
||
break;
|
||
}
|
||
}
|
||
if (diffs[diffs.length - 1][1] === '') {
|
||
diffs.pop(); // Remove the dummy entry at the end.
|
||
}
|
||
|
||
// Second pass: look for single edits surrounded on both sides by equalities
|
||
// which can be shifted sideways to eliminate an equality.
|
||
// e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC
|
||
var changes = false;
|
||
pointer = 1;
|
||
// Intentionally ignore the first and last element (don't need checking).
|
||
while (pointer < diffs.length - 1) {
|
||
if (diffs[pointer - 1][0] == DIFF_EQUAL &&
|
||
diffs[pointer + 1][0] == DIFF_EQUAL) {
|
||
// This is a single edit surrounded by equalities.
|
||
if (diffs[pointer][1].substring(diffs[pointer][1].length -
|
||
diffs[pointer - 1][1].length) == diffs[pointer - 1][1]) {
|
||
// Shift the edit over the previous equality.
|
||
diffs[pointer][1] = diffs[pointer - 1][1] +
|
||
diffs[pointer][1].substring(0, diffs[pointer][1].length -
|
||
diffs[pointer - 1][1].length);
|
||
diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];
|
||
diffs.splice(pointer - 1, 1);
|
||
changes = true;
|
||
} else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==
|
||
diffs[pointer + 1][1]) {
|
||
// Shift the edit over the next equality.
|
||
diffs[pointer - 1][1] += diffs[pointer + 1][1];
|
||
diffs[pointer][1] =
|
||
diffs[pointer][1].substring(diffs[pointer + 1][1].length) +
|
||
diffs[pointer + 1][1];
|
||
diffs.splice(pointer + 1, 1);
|
||
changes = true;
|
||
}
|
||
}
|
||
pointer++;
|
||
}
|
||
// If shifts were made, the diff needs reordering and another shift sweep.
|
||
if (changes) {
|
||
diff_cleanupMerge(diffs);
|
||
}
|
||
};
|
||
|
||
|
||
var diff = diff_main;
|
||
diff.INSERT = DIFF_INSERT;
|
||
diff.DELETE = DIFF_DELETE;
|
||
diff.EQUAL = DIFF_EQUAL;
|
||
|
||
module.exports = diff;
|
||
|
||
/*
|
||
* Modify a diff such that the cursor position points to the start of a change:
|
||
* E.g.
|
||
* cursor_normalize_diff([[DIFF_EQUAL, 'abc']], 1)
|
||
* => [1, [[DIFF_EQUAL, 'a'], [DIFF_EQUAL, 'bc']]]
|
||
* cursor_normalize_diff([[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xyz']], 2)
|
||
* => [2, [[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xy'], [DIFF_DELETE, 'z']]]
|
||
*
|
||
* @param {Array} diffs Array of diff tuples
|
||
* @param {Int} cursor_pos Suggested edit position. Must not be out of bounds!
|
||
* @return {Array} A tuple [cursor location in the modified diff, modified diff]
|
||
*/
|
||
function cursor_normalize_diff (diffs, cursor_pos) {
|
||
if (cursor_pos === 0) {
|
||
return [DIFF_EQUAL, diffs];
|
||
}
|
||
for (var current_pos = 0, i = 0; i < diffs.length; i++) {
|
||
var d = diffs[i];
|
||
if (d[0] === DIFF_DELETE || d[0] === DIFF_EQUAL) {
|
||
var next_pos = current_pos + d[1].length;
|
||
if (cursor_pos === next_pos) {
|
||
return [i + 1, diffs];
|
||
} else if (cursor_pos < next_pos) {
|
||
// copy to prevent side effects
|
||
diffs = diffs.slice();
|
||
// split d into two diff changes
|
||
var split_pos = cursor_pos - current_pos;
|
||
var d_left = [d[0], d[1].slice(0, split_pos)];
|
||
var d_right = [d[0], d[1].slice(split_pos)];
|
||
diffs.splice(i, 1, d_left, d_right);
|
||
return [i + 1, diffs];
|
||
} else {
|
||
current_pos = next_pos;
|
||
}
|
||
}
|
||
}
|
||
throw new Error('cursor_pos is out of bounds!')
|
||
}
|
||
|
||
/*
|
||
* Modify a diff such that the edit position is "shifted" to the proposed edit location (cursor_position).
|
||
*
|
||
* Case 1)
|
||
* Check if a naive shift is possible:
|
||
* [0, X], [ 1, Y] -> [ 1, Y], [0, X] (if X + Y === Y + X)
|
||
* [0, X], [-1, Y] -> [-1, Y], [0, X] (if X + Y === Y + X) - holds same result
|
||
* Case 2)
|
||
* Check if the following shifts are possible:
|
||
* [0, 'pre'], [ 1, 'prefix'] -> [ 1, 'pre'], [0, 'pre'], [ 1, 'fix']
|
||
* [0, 'pre'], [-1, 'prefix'] -> [-1, 'pre'], [0, 'pre'], [-1, 'fix']
|
||
* ^ ^
|
||
* d d_next
|
||
*
|
||
* @param {Array} diffs Array of diff tuples
|
||
* @param {Int} cursor_pos Suggested edit position. Must not be out of bounds!
|
||
* @return {Array} Array of diff tuples
|
||
*/
|
||
function fix_cursor (diffs, cursor_pos) {
|
||
var norm = cursor_normalize_diff(diffs, cursor_pos);
|
||
var ndiffs = norm[1];
|
||
var cursor_pointer = norm[0];
|
||
var d = ndiffs[cursor_pointer];
|
||
var d_next = ndiffs[cursor_pointer + 1];
|
||
|
||
if (d == null) {
|
||
// Text was deleted from end of original string,
|
||
// cursor is now out of bounds in new string
|
||
return diffs;
|
||
} else if (d[0] !== DIFF_EQUAL) {
|
||
// A modification happened at the cursor location.
|
||
// This is the expected outcome, so we can return the original diff.
|
||
return diffs;
|
||
} else {
|
||
if (d_next != null && d[1] + d_next[1] === d_next[1] + d[1]) {
|
||
// Case 1)
|
||
// It is possible to perform a naive shift
|
||
ndiffs.splice(cursor_pointer, 2, d_next, d)
|
||
return merge_tuples(ndiffs, cursor_pointer, 2)
|
||
} else if (d_next != null && d_next[1].indexOf(d[1]) === 0) {
|
||
// Case 2)
|
||
// d[1] is a prefix of d_next[1]
|
||
// We can assume that d_next[0] !== 0, since d[0] === 0
|
||
// Shift edit locations..
|
||
ndiffs.splice(cursor_pointer, 2, [d_next[0], d[1]], [0, d[1]]);
|
||
var suffix = d_next[1].slice(d[1].length);
|
||
if (suffix.length > 0) {
|
||
ndiffs.splice(cursor_pointer + 2, 0, [d_next[0], suffix]);
|
||
}
|
||
return merge_tuples(ndiffs, cursor_pointer, 3)
|
||
} else {
|
||
// Not possible to perform any modification
|
||
return diffs;
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Check diff did not split surrogate pairs.
|
||
* Ex. [0, '\uD83D'], [-1, '\uDC36'], [1, '\uDC2F'] -> [-1, '\uD83D\uDC36'], [1, '\uD83D\uDC2F']
|
||
* '\uD83D\uDC36' === '🐶', '\uD83D\uDC2F' === '🐯'
|
||
*
|
||
* @param {Array} diffs Array of diff tuples
|
||
* @return {Array} Array of diff tuples
|
||
*/
|
||
function fix_emoji (diffs) {
|
||
var compact = false;
|
||
var starts_with_pair_end = function(str) {
|
||
return str.charCodeAt(0) >= 0xDC00 && str.charCodeAt(0) <= 0xDFFF;
|
||
}
|
||
var ends_with_pair_start = function(str) {
|
||
return str.charCodeAt(str.length-1) >= 0xD800 && str.charCodeAt(str.length-1) <= 0xDBFF;
|
||
}
|
||
for (var i = 2; i < diffs.length; i += 1) {
|
||
if (diffs[i-2][0] === DIFF_EQUAL && ends_with_pair_start(diffs[i-2][1]) &&
|
||
diffs[i-1][0] === DIFF_DELETE && starts_with_pair_end(diffs[i-1][1]) &&
|
||
diffs[i][0] === DIFF_INSERT && starts_with_pair_end(diffs[i][1])) {
|
||
compact = true;
|
||
|
||
diffs[i-1][1] = diffs[i-2][1].slice(-1) + diffs[i-1][1];
|
||
diffs[i][1] = diffs[i-2][1].slice(-1) + diffs[i][1];
|
||
|
||
diffs[i-2][1] = diffs[i-2][1].slice(0, -1);
|
||
}
|
||
}
|
||
if (!compact) {
|
||
return diffs;
|
||
}
|
||
var fixed_diffs = [];
|
||
for (var i = 0; i < diffs.length; i += 1) {
|
||
if (diffs[i][1].length > 0) {
|
||
fixed_diffs.push(diffs[i]);
|
||
}
|
||
}
|
||
return fixed_diffs;
|
||
}
|
||
|
||
/*
|
||
* Try to merge tuples with their neigbors in a given range.
|
||
* E.g. [0, 'a'], [0, 'b'] -> [0, 'ab']
|
||
*
|
||
* @param {Array} diffs Array of diff tuples.
|
||
* @param {Int} start Position of the first element to merge (diffs[start] is also merged with diffs[start - 1]).
|
||
* @param {Int} length Number of consecutive elements to check.
|
||
* @return {Array} Array of merged diff tuples.
|
||
*/
|
||
function merge_tuples (diffs, start, length) {
|
||
// Check from (start-1) to (start+length).
|
||
for (var i = start + length - 1; i >= 0 && i >= start - 1; i--) {
|
||
if (i + 1 < diffs.length) {
|
||
var left_d = diffs[i];
|
||
var right_d = diffs[i+1];
|
||
if (left_d[0] === right_d[1]) {
|
||
diffs.splice(i, 2, [left_d[0], left_d[1] + right_d[1]]);
|
||
}
|
||
}
|
||
}
|
||
return diffs;
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
/* 52 */
|
||
/***/ (function(module, exports) {
|
||
|
||
exports = module.exports = typeof Object.keys === 'function'
|
||
? Object.keys : shim;
|
||
|
||
exports.shim = shim;
|
||
function shim (obj) {
|
||
var keys = [];
|
||
for (var key in obj) keys.push(key);
|
||
return keys;
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
/* 53 */
|
||
/***/ (function(module, exports) {
|
||
|
||
var supportsArgumentsClass = (function(){
|
||
return Object.prototype.toString.call(arguments)
|
||
})() == '[object Arguments]';
|
||
|
||
exports = module.exports = supportsArgumentsClass ? supported : unsupported;
|
||
|
||
exports.supported = supported;
|
||
function supported(object) {
|
||
return Object.prototype.toString.call(object) == '[object Arguments]';
|
||
};
|
||
|
||
exports.unsupported = unsupported;
|
||
function unsupported(object){
|
||
return object &&
|
||
typeof object == 'object' &&
|
||
typeof object.length == 'number' &&
|
||
Object.prototype.hasOwnProperty.call(object, 'callee') &&
|
||
!Object.prototype.propertyIsEnumerable.call(object, 'callee') ||
|
||
false;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
/* 54 */
|
||
/***/ (function(module, exports) {
|
||
|
||
'use strict';
|
||
|
||
var has = Object.prototype.hasOwnProperty
|
||
, prefix = '~';
|
||
|
||
/**
|
||
* Constructor to create a storage for our `EE` objects.
|
||
* An `Events` instance is a plain object whose properties are event names.
|
||
*
|
||
* @constructor
|
||
* @api private
|
||
*/
|
||
function Events() {}
|
||
|
||
//
|
||
// We try to not inherit from `Object.prototype`. In some engines creating an
|
||
// instance in this way is faster than calling `Object.create(null)` directly.
|
||
// If `Object.create(null)` is not supported we prefix the event names with a
|
||
// character to make sure that the built-in object properties are not
|
||
// overridden or used as an attack vector.
|
||
//
|
||
if (Object.create) {
|
||
Events.prototype = Object.create(null);
|
||
|
||
//
|
||
// This hack is needed because the `__proto__` property is still inherited in
|
||
// some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
|
||
//
|
||
if (!new Events().__proto__) prefix = false;
|
||
}
|
||
|
||
/**
|
||
* Representation of a single event listener.
|
||
*
|
||
* @param {Function} fn The listener function.
|
||
* @param {Mixed} context The context to invoke the listener with.
|
||
* @param {Boolean} [once=false] Specify if the listener is a one-time listener.
|
||
* @constructor
|
||
* @api private
|
||
*/
|
||
function EE(fn, context, once) {
|
||
this.fn = fn;
|
||
this.context = context;
|
||
this.once = once || false;
|
||
}
|
||
|
||
/**
|
||
* Minimal `EventEmitter` interface that is molded against the Node.js
|
||
* `EventEmitter` interface.
|
||
*
|
||
* @constructor
|
||
* @api public
|
||
*/
|
||
function EventEmitter() {
|
||
this._events = new Events();
|
||
this._eventsCount = 0;
|
||
}
|
||
|
||
/**
|
||
* Return an array listing the events for which the emitter has registered
|
||
* listeners.
|
||
*
|
||
* @returns {Array}
|
||
* @api public
|
||
*/
|
||
EventEmitter.prototype.eventNames = function eventNames() {
|
||
var names = []
|
||
, events
|
||
, name;
|
||
|
||
if (this._eventsCount === 0) return names;
|
||
|
||
for (name in (events = this._events)) {
|
||
if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
|
||
}
|
||
|
||
if (Object.getOwnPropertySymbols) {
|
||
return names.concat(Object.getOwnPropertySymbols(events));
|
||
}
|
||
|
||
return names;
|
||
};
|
||
|
||
/**
|
||
* Return the listeners registered for a given event.
|
||
*
|
||
* @param {String|Symbol} event The event name.
|
||
* @param {Boolean} exists Only check if there are listeners.
|
||
* @returns {Array|Boolean}
|
||
* @api public
|
||
*/
|
||
EventEmitter.prototype.listeners = function listeners(event, exists) {
|
||
var evt = prefix ? prefix + event : event
|
||
, available = this._events[evt];
|
||
|
||
if (exists) return !!available;
|
||
if (!available) return [];
|
||
if (available.fn) return [available.fn];
|
||
|
||
for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) {
|
||
ee[i] = available[i].fn;
|
||
}
|
||
|
||
return ee;
|
||
};
|
||
|
||
/**
|
||
* Calls each of the listeners registered for a given event.
|
||
*
|
||
* @param {String|Symbol} event The event name.
|
||
* @returns {Boolean} `true` if the event had listeners, else `false`.
|
||
* @api public
|
||
*/
|
||
EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
|
||
var evt = prefix ? prefix + event : event;
|
||
|
||
if (!this._events[evt]) return false;
|
||
|
||
var listeners = this._events[evt]
|
||
, len = arguments.length
|
||
, args
|
||
, i;
|
||
|
||
if (listeners.fn) {
|
||
if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
|
||
|
||
switch (len) {
|
||
case 1: return listeners.fn.call(listeners.context), true;
|
||
case 2: return listeners.fn.call(listeners.context, a1), true;
|
||
case 3: return listeners.fn.call(listeners.context, a1, a2), true;
|
||
case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
|
||
case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
|
||
case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
|
||
}
|
||
|
||
for (i = 1, args = new Array(len -1); i < len; i++) {
|
||
args[i - 1] = arguments[i];
|
||
}
|
||
|
||
listeners.fn.apply(listeners.context, args);
|
||
} else {
|
||
var length = listeners.length
|
||
, j;
|
||
|
||
for (i = 0; i < length; i++) {
|
||
if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
|
||
|
||
switch (len) {
|
||
case 1: listeners[i].fn.call(listeners[i].context); break;
|
||
case 2: listeners[i].fn.call(listeners[i].context, a1); break;
|
||
case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
|
||
case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
|
||
default:
|
||
if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
|
||
args[j - 1] = arguments[j];
|
||
}
|
||
|
||
listeners[i].fn.apply(listeners[i].context, args);
|
||
}
|
||
}
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
/**
|
||
* Add a listener for a given event.
|
||
*
|
||
* @param {String|Symbol} event The event name.
|
||
* @param {Function} fn The listener function.
|
||
* @param {Mixed} [context=this] The context to invoke the listener with.
|
||
* @returns {EventEmitter} `this`.
|
||
* @api public
|
||
*/
|
||
EventEmitter.prototype.on = function on(event, fn, context) {
|
||
var listener = new EE(fn, context || this)
|
||
, evt = prefix ? prefix + event : event;
|
||
|
||
if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;
|
||
else if (!this._events[evt].fn) this._events[evt].push(listener);
|
||
else this._events[evt] = [this._events[evt], listener];
|
||
|
||
return this;
|
||
};
|
||
|
||
/**
|
||
* Add a one-time listener for a given event.
|
||
*
|
||
* @param {String|Symbol} event The event name.
|
||
* @param {Function} fn The listener function.
|
||
* @param {Mixed} [context=this] The context to invoke the listener with.
|
||
* @returns {EventEmitter} `this`.
|
||
* @api public
|
||
*/
|
||
EventEmitter.prototype.once = function once(event, fn, context) {
|
||
var listener = new EE(fn, context || this, true)
|
||
, evt = prefix ? prefix + event : event;
|
||
|
||
if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++;
|
||
else if (!this._events[evt].fn) this._events[evt].push(listener);
|
||
else this._events[evt] = [this._events[evt], listener];
|
||
|
||
return this;
|
||
};
|
||
|
||
/**
|
||
* Remove the listeners of a given event.
|
||
*
|
||
* @param {String|Symbol} event The event name.
|
||
* @param {Function} fn Only remove the listeners that match this function.
|
||
* @param {Mixed} context Only remove the listeners that have this context.
|
||
* @param {Boolean} once Only remove one-time listeners.
|
||
* @returns {EventEmitter} `this`.
|
||
* @api public
|
||
*/
|
||
EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
|
||
var evt = prefix ? prefix + event : event;
|
||
|
||
if (!this._events[evt]) return this;
|
||
if (!fn) {
|
||
if (--this._eventsCount === 0) this._events = new Events();
|
||
else delete this._events[evt];
|
||
return this;
|
||
}
|
||
|
||
var listeners = this._events[evt];
|
||
|
||
if (listeners.fn) {
|
||
if (
|
||
listeners.fn === fn
|
||
&& (!once || listeners.once)
|
||
&& (!context || listeners.context === context)
|
||
) {
|
||
if (--this._eventsCount === 0) this._events = new Events();
|
||
else delete this._events[evt];
|
||
}
|
||
} else {
|
||
for (var i = 0, events = [], length = listeners.length; i < length; i++) {
|
||
if (
|
||
listeners[i].fn !== fn
|
||
|| (once && !listeners[i].once)
|
||
|| (context && listeners[i].context !== context)
|
||
) {
|
||
events.push(listeners[i]);
|
||
}
|
||
}
|
||
|
||
//
|
||
// Reset the array, or remove it completely if we have no more listeners.
|
||
//
|
||
if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
|
||
else if (--this._eventsCount === 0) this._events = new Events();
|
||
else delete this._events[evt];
|
||
}
|
||
|
||
return this;
|
||
};
|
||
|
||
/**
|
||
* Remove all listeners, or those of the specified event.
|
||
*
|
||
* @param {String|Symbol} [event] The event name.
|
||
* @returns {EventEmitter} `this`.
|
||
* @api public
|
||
*/
|
||
EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
|
||
var evt;
|
||
|
||
if (event) {
|
||
evt = prefix ? prefix + event : event;
|
||
if (this._events[evt]) {
|
||
if (--this._eventsCount === 0) this._events = new Events();
|
||
else delete this._events[evt];
|
||
}
|
||
} else {
|
||
this._events = new Events();
|
||
this._eventsCount = 0;
|
||
}
|
||
|
||
return this;
|
||
};
|
||
|
||
//
|
||
// Alias methods names because people roll like that.
|
||
//
|
||
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
||
EventEmitter.prototype.addListener = EventEmitter.prototype.on;
|
||
|
||
//
|
||
// This function doesn't apply anymore.
|
||
//
|
||
EventEmitter.prototype.setMaxListeners = function setMaxListeners() {
|
||
return this;
|
||
};
|
||
|
||
//
|
||
// Expose the prefix.
|
||
//
|
||
EventEmitter.prefixed = prefix;
|
||
|
||
//
|
||
// Allow `EventEmitter` to be imported as module namespace.
|
||
//
|
||
EventEmitter.EventEmitter = EventEmitter;
|
||
|
||
//
|
||
// Expose the module.
|
||
//
|
||
if ('undefined' !== typeof module) {
|
||
module.exports = EventEmitter;
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
/* 55 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.matchText = exports.matchSpacing = exports.matchNewline = exports.matchBlot = exports.matchAttributor = exports.default = undefined;
|
||
|
||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||
|
||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _extend2 = __webpack_require__(3);
|
||
|
||
var _extend3 = _interopRequireDefault(_extend2);
|
||
|
||
var _quillDelta = __webpack_require__(2);
|
||
|
||
var _quillDelta2 = _interopRequireDefault(_quillDelta);
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _quill = __webpack_require__(5);
|
||
|
||
var _quill2 = _interopRequireDefault(_quill);
|
||
|
||
var _logger = __webpack_require__(10);
|
||
|
||
var _logger2 = _interopRequireDefault(_logger);
|
||
|
||
var _module = __webpack_require__(9);
|
||
|
||
var _module2 = _interopRequireDefault(_module);
|
||
|
||
var _align = __webpack_require__(36);
|
||
|
||
var _background = __webpack_require__(37);
|
||
|
||
var _code = __webpack_require__(13);
|
||
|
||
var _code2 = _interopRequireDefault(_code);
|
||
|
||
var _color = __webpack_require__(26);
|
||
|
||
var _direction = __webpack_require__(38);
|
||
|
||
var _font = __webpack_require__(39);
|
||
|
||
var _size = __webpack_require__(40);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var debug = (0, _logger2.default)('quill:clipboard');
|
||
|
||
var DOM_KEY = '__ql-matcher';
|
||
|
||
var CLIPBOARD_CONFIG = [[Node.TEXT_NODE, matchText], [Node.TEXT_NODE, matchNewline], ['br', matchBreak], [Node.ELEMENT_NODE, matchNewline], [Node.ELEMENT_NODE, matchBlot], [Node.ELEMENT_NODE, matchSpacing], [Node.ELEMENT_NODE, matchAttributor], [Node.ELEMENT_NODE, matchStyles], ['li', matchIndent], ['b', matchAlias.bind(matchAlias, 'bold')], ['i', matchAlias.bind(matchAlias, 'italic')], ['style', matchIgnore]];
|
||
|
||
var ATTRIBUTE_ATTRIBUTORS = [_align.AlignAttribute, _direction.DirectionAttribute].reduce(function (memo, attr) {
|
||
memo[attr.keyName] = attr;
|
||
return memo;
|
||
}, {});
|
||
|
||
var STYLE_ATTRIBUTORS = [_align.AlignStyle, _background.BackgroundStyle, _color.ColorStyle, _direction.DirectionStyle, _font.FontStyle, _size.SizeStyle].reduce(function (memo, attr) {
|
||
memo[attr.keyName] = attr;
|
||
return memo;
|
||
}, {});
|
||
|
||
var Clipboard = function (_Module) {
|
||
_inherits(Clipboard, _Module);
|
||
|
||
function Clipboard(quill, options) {
|
||
_classCallCheck(this, Clipboard);
|
||
|
||
var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this, quill, options));
|
||
|
||
_this.quill.root.addEventListener('paste', _this.onPaste.bind(_this));
|
||
_this.container = _this.quill.addContainer('ql-clipboard');
|
||
_this.container.setAttribute('contenteditable', true);
|
||
_this.container.setAttribute('tabindex', -1);
|
||
_this.matchers = [];
|
||
CLIPBOARD_CONFIG.concat(_this.options.matchers).forEach(function (_ref) {
|
||
var _ref2 = _slicedToArray(_ref, 2),
|
||
selector = _ref2[0],
|
||
matcher = _ref2[1];
|
||
|
||
if (!options.matchVisual && matcher === matchSpacing) return;
|
||
_this.addMatcher(selector, matcher);
|
||
});
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Clipboard, [{
|
||
key: 'addMatcher',
|
||
value: function addMatcher(selector, matcher) {
|
||
this.matchers.push([selector, matcher]);
|
||
}
|
||
}, {
|
||
key: 'convert',
|
||
value: function convert(html) {
|
||
if (typeof html === 'string') {
|
||
this.container.innerHTML = html.replace(/\>\r?\n +\</g, '><'); // Remove spaces between tags
|
||
return this.convert();
|
||
}
|
||
var formats = this.quill.getFormat(this.quill.selection.savedRange.index);
|
||
if (formats[_code2.default.blotName]) {
|
||
var text = this.container.innerText;
|
||
this.container.innerHTML = '';
|
||
return new _quillDelta2.default().insert(text, _defineProperty({}, _code2.default.blotName, formats[_code2.default.blotName]));
|
||
}
|
||
|
||
var _prepareMatching = this.prepareMatching(),
|
||
_prepareMatching2 = _slicedToArray(_prepareMatching, 2),
|
||
elementMatchers = _prepareMatching2[0],
|
||
textMatchers = _prepareMatching2[1];
|
||
|
||
var delta = traverse(this.container, elementMatchers, textMatchers);
|
||
// Remove trailing newline
|
||
if (deltaEndsWith(delta, '\n') && delta.ops[delta.ops.length - 1].attributes == null) {
|
||
delta = delta.compose(new _quillDelta2.default().retain(delta.length() - 1).delete(1));
|
||
}
|
||
debug.log('convert', this.container.innerHTML, delta);
|
||
this.container.innerHTML = '';
|
||
return delta;
|
||
}
|
||
}, {
|
||
key: 'dangerouslyPasteHTML',
|
||
value: function dangerouslyPasteHTML(index, html) {
|
||
var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _quill2.default.sources.API;
|
||
|
||
if (typeof index === 'string') {
|
||
this.quill.setContents(this.convert(index), html);
|
||
this.quill.setSelection(0, _quill2.default.sources.SILENT);
|
||
} else {
|
||
var paste = this.convert(html);
|
||
this.quill.updateContents(new _quillDelta2.default().retain(index).concat(paste), source);
|
||
this.quill.setSelection(index + paste.length(), _quill2.default.sources.SILENT);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'onPaste',
|
||
value: function onPaste(e) {
|
||
var _this2 = this;
|
||
|
||
if (e.defaultPrevented || !this.quill.isEnabled()) return;
|
||
var range = this.quill.getSelection();
|
||
var delta = new _quillDelta2.default().retain(range.index);
|
||
var scrollTop = this.quill.scrollingContainer.scrollTop;
|
||
this.container.focus();
|
||
this.quill.selection.update(_quill2.default.sources.SILENT);
|
||
setTimeout(function () {
|
||
delta = delta.concat(_this2.convert()).delete(range.length);
|
||
_this2.quill.updateContents(delta, _quill2.default.sources.USER);
|
||
// range.length contributes to delta.length()
|
||
_this2.quill.setSelection(delta.length() - range.length, _quill2.default.sources.SILENT);
|
||
_this2.quill.scrollingContainer.scrollTop = scrollTop;
|
||
_this2.quill.focus();
|
||
}, 1);
|
||
}
|
||
}, {
|
||
key: 'prepareMatching',
|
||
value: function prepareMatching() {
|
||
var _this3 = this;
|
||
|
||
var elementMatchers = [],
|
||
textMatchers = [];
|
||
this.matchers.forEach(function (pair) {
|
||
var _pair = _slicedToArray(pair, 2),
|
||
selector = _pair[0],
|
||
matcher = _pair[1];
|
||
|
||
switch (selector) {
|
||
case Node.TEXT_NODE:
|
||
textMatchers.push(matcher);
|
||
break;
|
||
case Node.ELEMENT_NODE:
|
||
elementMatchers.push(matcher);
|
||
break;
|
||
default:
|
||
[].forEach.call(_this3.container.querySelectorAll(selector), function (node) {
|
||
// TODO use weakmap
|
||
node[DOM_KEY] = node[DOM_KEY] || [];
|
||
node[DOM_KEY].push(matcher);
|
||
});
|
||
break;
|
||
}
|
||
});
|
||
return [elementMatchers, textMatchers];
|
||
}
|
||
}]);
|
||
|
||
return Clipboard;
|
||
}(_module2.default);
|
||
|
||
Clipboard.DEFAULTS = {
|
||
matchers: [],
|
||
matchVisual: true
|
||
};
|
||
|
||
function applyFormat(delta, format, value) {
|
||
if ((typeof format === 'undefined' ? 'undefined' : _typeof(format)) === 'object') {
|
||
return Object.keys(format).reduce(function (delta, key) {
|
||
return applyFormat(delta, key, format[key]);
|
||
}, delta);
|
||
} else {
|
||
return delta.reduce(function (delta, op) {
|
||
if (op.attributes && op.attributes[format]) {
|
||
return delta.push(op);
|
||
} else {
|
||
return delta.insert(op.insert, (0, _extend3.default)({}, _defineProperty({}, format, value), op.attributes));
|
||
}
|
||
}, new _quillDelta2.default());
|
||
}
|
||
}
|
||
|
||
function computeStyle(node) {
|
||
if (node.nodeType !== Node.ELEMENT_NODE) return {};
|
||
var DOM_KEY = '__ql-computed-style';
|
||
return node[DOM_KEY] || (node[DOM_KEY] = window.getComputedStyle(node));
|
||
}
|
||
|
||
function deltaEndsWith(delta, text) {
|
||
var endText = "";
|
||
for (var i = delta.ops.length - 1; i >= 0 && endText.length < text.length; --i) {
|
||
var op = delta.ops[i];
|
||
if (typeof op.insert !== 'string') break;
|
||
endText = op.insert + endText;
|
||
}
|
||
return endText.slice(-1 * text.length) === text;
|
||
}
|
||
|
||
function isLine(node) {
|
||
if (node.childNodes.length === 0) return false; // Exclude embed blocks
|
||
var style = computeStyle(node);
|
||
return ['block', 'list-item'].indexOf(style.display) > -1;
|
||
}
|
||
|
||
function traverse(node, elementMatchers, textMatchers) {
|
||
// Post-order
|
||
if (node.nodeType === node.TEXT_NODE) {
|
||
return textMatchers.reduce(function (delta, matcher) {
|
||
return matcher(node, delta);
|
||
}, new _quillDelta2.default());
|
||
} else if (node.nodeType === node.ELEMENT_NODE) {
|
||
return [].reduce.call(node.childNodes || [], function (delta, childNode) {
|
||
var childrenDelta = traverse(childNode, elementMatchers, textMatchers);
|
||
if (childNode.nodeType === node.ELEMENT_NODE) {
|
||
childrenDelta = elementMatchers.reduce(function (childrenDelta, matcher) {
|
||
return matcher(childNode, childrenDelta);
|
||
}, childrenDelta);
|
||
childrenDelta = (childNode[DOM_KEY] || []).reduce(function (childrenDelta, matcher) {
|
||
return matcher(childNode, childrenDelta);
|
||
}, childrenDelta);
|
||
}
|
||
return delta.concat(childrenDelta);
|
||
}, new _quillDelta2.default());
|
||
} else {
|
||
return new _quillDelta2.default();
|
||
}
|
||
}
|
||
|
||
function matchAlias(format, node, delta) {
|
||
return applyFormat(delta, format, true);
|
||
}
|
||
|
||
function matchAttributor(node, delta) {
|
||
var attributes = _parchment2.default.Attributor.Attribute.keys(node);
|
||
var classes = _parchment2.default.Attributor.Class.keys(node);
|
||
var styles = _parchment2.default.Attributor.Style.keys(node);
|
||
var formats = {};
|
||
attributes.concat(classes).concat(styles).forEach(function (name) {
|
||
var attr = _parchment2.default.query(name, _parchment2.default.Scope.ATTRIBUTE);
|
||
if (attr != null) {
|
||
formats[attr.attrName] = attr.value(node);
|
||
if (formats[attr.attrName]) return;
|
||
}
|
||
attr = ATTRIBUTE_ATTRIBUTORS[name];
|
||
if (attr != null && (attr.attrName === name || attr.keyName === name)) {
|
||
formats[attr.attrName] = attr.value(node) || undefined;
|
||
}
|
||
attr = STYLE_ATTRIBUTORS[name];
|
||
if (attr != null && (attr.attrName === name || attr.keyName === name)) {
|
||
attr = STYLE_ATTRIBUTORS[name];
|
||
formats[attr.attrName] = attr.value(node) || undefined;
|
||
}
|
||
});
|
||
if (Object.keys(formats).length > 0) {
|
||
delta = applyFormat(delta, formats);
|
||
}
|
||
return delta;
|
||
}
|
||
|
||
function matchBlot(node, delta) {
|
||
var match = _parchment2.default.query(node);
|
||
if (match == null) return delta;
|
||
if (match.prototype instanceof _parchment2.default.Embed) {
|
||
var embed = {};
|
||
var value = match.value(node);
|
||
if (value != null) {
|
||
embed[match.blotName] = value;
|
||
delta = new _quillDelta2.default().insert(embed, match.formats(node));
|
||
}
|
||
} else if (typeof match.formats === 'function') {
|
||
delta = applyFormat(delta, match.blotName, match.formats(node));
|
||
}
|
||
return delta;
|
||
}
|
||
|
||
function matchBreak(node, delta) {
|
||
if (!deltaEndsWith(delta, '\n')) {
|
||
delta.insert('\n');
|
||
}
|
||
return delta;
|
||
}
|
||
|
||
function matchIgnore() {
|
||
return new _quillDelta2.default();
|
||
}
|
||
|
||
function matchIndent(node, delta) {
|
||
var match = _parchment2.default.query(node);
|
||
if (match == null || match.blotName !== 'list-item' || !deltaEndsWith(delta, '\n')) {
|
||
return delta;
|
||
}
|
||
var indent = -1,
|
||
parent = node.parentNode;
|
||
while (!parent.classList.contains('ql-clipboard')) {
|
||
if ((_parchment2.default.query(parent) || {}).blotName === 'list') {
|
||
indent += 1;
|
||
}
|
||
parent = parent.parentNode;
|
||
}
|
||
if (indent <= 0) return delta;
|
||
return delta.compose(new _quillDelta2.default().retain(delta.length() - 1).retain(1, { indent: indent }));
|
||
}
|
||
|
||
function matchNewline(node, delta) {
|
||
if (!deltaEndsWith(delta, '\n')) {
|
||
if (isLine(node) || delta.length() > 0 && node.nextSibling && isLine(node.nextSibling)) {
|
||
delta.insert('\n');
|
||
}
|
||
}
|
||
return delta;
|
||
}
|
||
|
||
function matchSpacing(node, delta) {
|
||
if (isLine(node) && node.nextElementSibling != null && !deltaEndsWith(delta, '\n\n')) {
|
||
var nodeHeight = node.offsetHeight + parseFloat(computeStyle(node).marginTop) + parseFloat(computeStyle(node).marginBottom);
|
||
if (node.nextElementSibling.offsetTop > node.offsetTop + nodeHeight * 1.5) {
|
||
delta.insert('\n');
|
||
}
|
||
}
|
||
return delta;
|
||
}
|
||
|
||
function matchStyles(node, delta) {
|
||
var formats = {};
|
||
var style = node.style || {};
|
||
if (style.fontStyle && computeStyle(node).fontStyle === 'italic') {
|
||
formats.italic = true;
|
||
}
|
||
if (style.fontWeight && (computeStyle(node).fontWeight.startsWith('bold') || parseInt(computeStyle(node).fontWeight) >= 700)) {
|
||
formats.bold = true;
|
||
}
|
||
if (Object.keys(formats).length > 0) {
|
||
delta = applyFormat(delta, formats);
|
||
}
|
||
if (parseFloat(style.textIndent || 0) > 0) {
|
||
// Could be 0.5in
|
||
delta = new _quillDelta2.default().insert('\t').concat(delta);
|
||
}
|
||
return delta;
|
||
}
|
||
|
||
function matchText(node, delta) {
|
||
var text = node.data;
|
||
// Word represents empty line with <o:p> </o:p>
|
||
if (node.parentNode.tagName === 'O:P') {
|
||
return delta.insert(text.trim());
|
||
}
|
||
if (text.trim().length === 0 && node.parentNode.classList.contains('ql-clipboard')) {
|
||
return delta;
|
||
}
|
||
if (!computeStyle(node.parentNode).whiteSpace.startsWith('pre')) {
|
||
// eslint-disable-next-line func-style
|
||
var replacer = function replacer(collapse, match) {
|
||
match = match.replace(/[^\u00a0]/g, ''); // \u00a0 is nbsp;
|
||
return match.length < 1 && collapse ? ' ' : match;
|
||
};
|
||
text = text.replace(/\r\n/g, ' ').replace(/\n/g, ' ');
|
||
text = text.replace(/\s\s+/g, replacer.bind(replacer, true)); // collapse whitespace
|
||
if (node.previousSibling == null && isLine(node.parentNode) || node.previousSibling != null && isLine(node.previousSibling)) {
|
||
text = text.replace(/^\s+/, replacer.bind(replacer, false));
|
||
}
|
||
if (node.nextSibling == null && isLine(node.parentNode) || node.nextSibling != null && isLine(node.nextSibling)) {
|
||
text = text.replace(/\s+$/, replacer.bind(replacer, false));
|
||
}
|
||
}
|
||
return delta.insert(text);
|
||
}
|
||
|
||
exports.default = Clipboard;
|
||
exports.matchAttributor = matchAttributor;
|
||
exports.matchBlot = matchBlot;
|
||
exports.matchNewline = matchNewline;
|
||
exports.matchSpacing = matchSpacing;
|
||
exports.matchText = matchText;
|
||
|
||
/***/ }),
|
||
/* 56 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _inline = __webpack_require__(6);
|
||
|
||
var _inline2 = _interopRequireDefault(_inline);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var Bold = function (_Inline) {
|
||
_inherits(Bold, _Inline);
|
||
|
||
function Bold() {
|
||
_classCallCheck(this, Bold);
|
||
|
||
return _possibleConstructorReturn(this, (Bold.__proto__ || Object.getPrototypeOf(Bold)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(Bold, [{
|
||
key: 'optimize',
|
||
value: function optimize(context) {
|
||
_get(Bold.prototype.__proto__ || Object.getPrototypeOf(Bold.prototype), 'optimize', this).call(this, context);
|
||
if (this.domNode.tagName !== this.statics.tagName[0]) {
|
||
this.replaceWith(this.statics.blotName);
|
||
}
|
||
}
|
||
}], [{
|
||
key: 'create',
|
||
value: function create() {
|
||
return _get(Bold.__proto__ || Object.getPrototypeOf(Bold), 'create', this).call(this);
|
||
}
|
||
}, {
|
||
key: 'formats',
|
||
value: function formats() {
|
||
return true;
|
||
}
|
||
}]);
|
||
|
||
return Bold;
|
||
}(_inline2.default);
|
||
|
||
Bold.blotName = 'bold';
|
||
Bold.tagName = ['STRONG', 'B'];
|
||
|
||
exports.default = Bold;
|
||
|
||
/***/ }),
|
||
/* 57 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.addControls = exports.default = undefined;
|
||
|
||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _quillDelta = __webpack_require__(2);
|
||
|
||
var _quillDelta2 = _interopRequireDefault(_quillDelta);
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _quill = __webpack_require__(5);
|
||
|
||
var _quill2 = _interopRequireDefault(_quill);
|
||
|
||
var _logger = __webpack_require__(10);
|
||
|
||
var _logger2 = _interopRequireDefault(_logger);
|
||
|
||
var _module = __webpack_require__(9);
|
||
|
||
var _module2 = _interopRequireDefault(_module);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var debug = (0, _logger2.default)('quill:toolbar');
|
||
|
||
var Toolbar = function (_Module) {
|
||
_inherits(Toolbar, _Module);
|
||
|
||
function Toolbar(quill, options) {
|
||
_classCallCheck(this, Toolbar);
|
||
|
||
var _this = _possibleConstructorReturn(this, (Toolbar.__proto__ || Object.getPrototypeOf(Toolbar)).call(this, quill, options));
|
||
|
||
if (Array.isArray(_this.options.container)) {
|
||
var container = document.createElement('div');
|
||
addControls(container, _this.options.container);
|
||
quill.container.parentNode.insertBefore(container, quill.container);
|
||
_this.container = container;
|
||
} else if (typeof _this.options.container === 'string') {
|
||
_this.container = document.querySelector(_this.options.container);
|
||
} else {
|
||
_this.container = _this.options.container;
|
||
}
|
||
if (!(_this.container instanceof HTMLElement)) {
|
||
var _ret;
|
||
|
||
return _ret = debug.error('Container required for toolbar', _this.options), _possibleConstructorReturn(_this, _ret);
|
||
}
|
||
_this.container.classList.add('ql-toolbar');
|
||
_this.controls = [];
|
||
_this.handlers = {};
|
||
Object.keys(_this.options.handlers).forEach(function (format) {
|
||
_this.addHandler(format, _this.options.handlers[format]);
|
||
});
|
||
[].forEach.call(_this.container.querySelectorAll('button, select'), function (input) {
|
||
_this.attach(input);
|
||
});
|
||
_this.quill.on(_quill2.default.events.EDITOR_CHANGE, function (type, range) {
|
||
if (type === _quill2.default.events.SELECTION_CHANGE) {
|
||
_this.update(range);
|
||
}
|
||
});
|
||
_this.quill.on(_quill2.default.events.SCROLL_OPTIMIZE, function () {
|
||
var _this$quill$selection = _this.quill.selection.getRange(),
|
||
_this$quill$selection2 = _slicedToArray(_this$quill$selection, 1),
|
||
range = _this$quill$selection2[0]; // quill.getSelection triggers update
|
||
|
||
|
||
_this.update(range);
|
||
});
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Toolbar, [{
|
||
key: 'addHandler',
|
||
value: function addHandler(format, handler) {
|
||
this.handlers[format] = handler;
|
||
}
|
||
}, {
|
||
key: 'attach',
|
||
value: function attach(input) {
|
||
var _this2 = this;
|
||
|
||
var format = [].find.call(input.classList, function (className) {
|
||
return className.indexOf('ql-') === 0;
|
||
});
|
||
if (!format) return;
|
||
format = format.slice('ql-'.length);
|
||
if (input.tagName === 'BUTTON') {
|
||
input.setAttribute('type', 'button');
|
||
}
|
||
if (this.handlers[format] == null) {
|
||
if (this.quill.scroll.whitelist != null && this.quill.scroll.whitelist[format] == null) {
|
||
debug.warn('ignoring attaching to disabled format', format, input);
|
||
return;
|
||
}
|
||
if (_parchment2.default.query(format) == null) {
|
||
debug.warn('ignoring attaching to nonexistent format', format, input);
|
||
return;
|
||
}
|
||
}
|
||
var eventName = input.tagName === 'SELECT' ? 'change' : 'click';
|
||
input.addEventListener(eventName, function (e) {
|
||
var value = void 0;
|
||
if (input.tagName === 'SELECT') {
|
||
if (input.selectedIndex < 0) return;
|
||
var selected = input.options[input.selectedIndex];
|
||
if (selected.hasAttribute('selected')) {
|
||
value = false;
|
||
} else {
|
||
value = selected.value || false;
|
||
}
|
||
} else {
|
||
if (input.classList.contains('ql-active')) {
|
||
value = false;
|
||
} else {
|
||
value = input.value || !input.hasAttribute('value');
|
||
}
|
||
e.preventDefault();
|
||
}
|
||
_this2.quill.focus();
|
||
|
||
var _quill$selection$getR = _this2.quill.selection.getRange(),
|
||
_quill$selection$getR2 = _slicedToArray(_quill$selection$getR, 1),
|
||
range = _quill$selection$getR2[0];
|
||
|
||
if (_this2.handlers[format] != null) {
|
||
_this2.handlers[format].call(_this2, value);
|
||
} else if (_parchment2.default.query(format).prototype instanceof _parchment2.default.Embed) {
|
||
value = prompt('Enter ' + format);
|
||
if (!value) return;
|
||
_this2.quill.updateContents(new _quillDelta2.default().retain(range.index).delete(range.length).insert(_defineProperty({}, format, value)), _quill2.default.sources.USER);
|
||
} else {
|
||
_this2.quill.format(format, value, _quill2.default.sources.USER);
|
||
}
|
||
_this2.update(range);
|
||
});
|
||
// TODO use weakmap
|
||
this.controls.push([format, input]);
|
||
}
|
||
}, {
|
||
key: 'update',
|
||
value: function update(range) {
|
||
var formats = range == null ? {} : this.quill.getFormat(range);
|
||
this.controls.forEach(function (pair) {
|
||
var _pair = _slicedToArray(pair, 2),
|
||
format = _pair[0],
|
||
input = _pair[1];
|
||
|
||
if (input.tagName === 'SELECT') {
|
||
var option = void 0;
|
||
if (range == null) {
|
||
option = null;
|
||
} else if (formats[format] == null) {
|
||
option = input.querySelector('option[selected]');
|
||
} else if (!Array.isArray(formats[format])) {
|
||
var value = formats[format];
|
||
if (typeof value === 'string') {
|
||
value = value.replace(/\"/g, '\\"');
|
||
}
|
||
option = input.querySelector('option[value="' + value + '"]');
|
||
}
|
||
if (option == null) {
|
||
input.value = ''; // TODO make configurable?
|
||
input.selectedIndex = -1;
|
||
} else {
|
||
option.selected = true;
|
||
}
|
||
} else {
|
||
if (range == null) {
|
||
input.classList.remove('ql-active');
|
||
} else if (input.hasAttribute('value')) {
|
||
// both being null should match (default values)
|
||
// '1' should match with 1 (headers)
|
||
var isActive = formats[format] === input.getAttribute('value') || formats[format] != null && formats[format].toString() === input.getAttribute('value') || formats[format] == null && !input.getAttribute('value');
|
||
input.classList.toggle('ql-active', isActive);
|
||
} else {
|
||
input.classList.toggle('ql-active', formats[format] != null);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
}]);
|
||
|
||
return Toolbar;
|
||
}(_module2.default);
|
||
|
||
Toolbar.DEFAULTS = {};
|
||
|
||
function addButton(container, format, value) {
|
||
var input = document.createElement('button');
|
||
input.setAttribute('type', 'button');
|
||
input.classList.add('ql-' + format);
|
||
if (value != null) {
|
||
input.value = value;
|
||
}
|
||
container.appendChild(input);
|
||
}
|
||
|
||
function addControls(container, groups) {
|
||
if (!Array.isArray(groups[0])) {
|
||
groups = [groups];
|
||
}
|
||
groups.forEach(function (controls) {
|
||
var group = document.createElement('span');
|
||
group.classList.add('ql-formats');
|
||
controls.forEach(function (control) {
|
||
if (typeof control === 'string') {
|
||
addButton(group, control);
|
||
} else {
|
||
var format = Object.keys(control)[0];
|
||
var value = control[format];
|
||
if (Array.isArray(value)) {
|
||
addSelect(group, format, value);
|
||
} else {
|
||
addButton(group, format, value);
|
||
}
|
||
}
|
||
});
|
||
container.appendChild(group);
|
||
});
|
||
}
|
||
|
||
function addSelect(container, format, values) {
|
||
var input = document.createElement('select');
|
||
input.classList.add('ql-' + format);
|
||
values.forEach(function (value) {
|
||
var option = document.createElement('option');
|
||
if (value !== false) {
|
||
option.setAttribute('value', value);
|
||
} else {
|
||
option.setAttribute('selected', 'selected');
|
||
}
|
||
input.appendChild(option);
|
||
});
|
||
container.appendChild(input);
|
||
}
|
||
|
||
Toolbar.DEFAULTS = {
|
||
container: null,
|
||
handlers: {
|
||
clean: function clean() {
|
||
var _this3 = this;
|
||
|
||
var range = this.quill.getSelection();
|
||
if (range == null) return;
|
||
if (range.length == 0) {
|
||
var formats = this.quill.getFormat();
|
||
Object.keys(formats).forEach(function (name) {
|
||
// Clean functionality in existing apps only clean inline formats
|
||
if (_parchment2.default.query(name, _parchment2.default.Scope.INLINE) != null) {
|
||
_this3.quill.format(name, false);
|
||
}
|
||
});
|
||
} else {
|
||
this.quill.removeFormat(range, _quill2.default.sources.USER);
|
||
}
|
||
},
|
||
direction: function direction(value) {
|
||
var align = this.quill.getFormat()['align'];
|
||
if (value === 'rtl' && align == null) {
|
||
this.quill.format('align', 'right', _quill2.default.sources.USER);
|
||
} else if (!value && align === 'right') {
|
||
this.quill.format('align', false, _quill2.default.sources.USER);
|
||
}
|
||
this.quill.format('direction', value, _quill2.default.sources.USER);
|
||
},
|
||
indent: function indent(value) {
|
||
var range = this.quill.getSelection();
|
||
var formats = this.quill.getFormat(range);
|
||
var indent = parseInt(formats.indent || 0);
|
||
if (value === '+1' || value === '-1') {
|
||
var modifier = value === '+1' ? 1 : -1;
|
||
if (formats.direction === 'rtl') modifier *= -1;
|
||
this.quill.format('indent', indent + modifier, _quill2.default.sources.USER);
|
||
}
|
||
},
|
||
link: function link(value) {
|
||
if (value === true) {
|
||
value = prompt('Enter link URL:');
|
||
}
|
||
this.quill.format('link', value, _quill2.default.sources.USER);
|
||
},
|
||
list: function list(value) {
|
||
var range = this.quill.getSelection();
|
||
var formats = this.quill.getFormat(range);
|
||
if (value === 'check') {
|
||
if (formats['list'] === 'checked' || formats['list'] === 'unchecked') {
|
||
this.quill.format('list', false, _quill2.default.sources.USER);
|
||
} else {
|
||
this.quill.format('list', 'unchecked', _quill2.default.sources.USER);
|
||
}
|
||
} else {
|
||
this.quill.format('list', value, _quill2.default.sources.USER);
|
||
}
|
||
}
|
||
}
|
||
};
|
||
|
||
exports.default = Toolbar;
|
||
exports.addControls = addControls;
|
||
|
||
/***/ }),
|
||
/* 58 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <polyline class=\"ql-even ql-stroke\" points=\"5 7 3 9 5 11\"></polyline> <polyline class=\"ql-even ql-stroke\" points=\"13 7 15 9 13 11\"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>";
|
||
|
||
/***/ }),
|
||
/* 59 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _picker = __webpack_require__(28);
|
||
|
||
var _picker2 = _interopRequireDefault(_picker);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var ColorPicker = function (_Picker) {
|
||
_inherits(ColorPicker, _Picker);
|
||
|
||
function ColorPicker(select, label) {
|
||
_classCallCheck(this, ColorPicker);
|
||
|
||
var _this = _possibleConstructorReturn(this, (ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call(this, select));
|
||
|
||
_this.label.innerHTML = label;
|
||
_this.container.classList.add('ql-color-picker');
|
||
[].slice.call(_this.container.querySelectorAll('.ql-picker-item'), 0, 7).forEach(function (item) {
|
||
item.classList.add('ql-primary');
|
||
});
|
||
return _this;
|
||
}
|
||
|
||
_createClass(ColorPicker, [{
|
||
key: 'buildItem',
|
||
value: function buildItem(option) {
|
||
var item = _get(ColorPicker.prototype.__proto__ || Object.getPrototypeOf(ColorPicker.prototype), 'buildItem', this).call(this, option);
|
||
item.style.backgroundColor = option.getAttribute('value') || '';
|
||
return item;
|
||
}
|
||
}, {
|
||
key: 'selectItem',
|
||
value: function selectItem(item, trigger) {
|
||
_get(ColorPicker.prototype.__proto__ || Object.getPrototypeOf(ColorPicker.prototype), 'selectItem', this).call(this, item, trigger);
|
||
var colorLabel = this.label.querySelector('.ql-color-label');
|
||
var value = item ? item.getAttribute('data-value') || '' : '';
|
||
if (colorLabel) {
|
||
if (colorLabel.tagName === 'line') {
|
||
colorLabel.style.stroke = value;
|
||
} else {
|
||
colorLabel.style.fill = value;
|
||
}
|
||
}
|
||
}
|
||
}]);
|
||
|
||
return ColorPicker;
|
||
}(_picker2.default);
|
||
|
||
exports.default = ColorPicker;
|
||
|
||
/***/ }),
|
||
/* 60 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _picker = __webpack_require__(28);
|
||
|
||
var _picker2 = _interopRequireDefault(_picker);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var IconPicker = function (_Picker) {
|
||
_inherits(IconPicker, _Picker);
|
||
|
||
function IconPicker(select, icons) {
|
||
_classCallCheck(this, IconPicker);
|
||
|
||
var _this = _possibleConstructorReturn(this, (IconPicker.__proto__ || Object.getPrototypeOf(IconPicker)).call(this, select));
|
||
|
||
_this.container.classList.add('ql-icon-picker');
|
||
[].forEach.call(_this.container.querySelectorAll('.ql-picker-item'), function (item) {
|
||
item.innerHTML = icons[item.getAttribute('data-value') || ''];
|
||
});
|
||
_this.defaultItem = _this.container.querySelector('.ql-selected');
|
||
_this.selectItem(_this.defaultItem);
|
||
return _this;
|
||
}
|
||
|
||
_createClass(IconPicker, [{
|
||
key: 'selectItem',
|
||
value: function selectItem(item, trigger) {
|
||
_get(IconPicker.prototype.__proto__ || Object.getPrototypeOf(IconPicker.prototype), 'selectItem', this).call(this, item, trigger);
|
||
item = item || this.defaultItem;
|
||
this.label.innerHTML = item.innerHTML;
|
||
}
|
||
}]);
|
||
|
||
return IconPicker;
|
||
}(_picker2.default);
|
||
|
||
exports.default = IconPicker;
|
||
|
||
/***/ }),
|
||
/* 61 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
var Tooltip = function () {
|
||
function Tooltip(quill, boundsContainer) {
|
||
var _this = this;
|
||
|
||
_classCallCheck(this, Tooltip);
|
||
|
||
this.quill = quill;
|
||
this.boundsContainer = boundsContainer || document.body;
|
||
this.root = quill.addContainer('ql-tooltip');
|
||
this.root.innerHTML = this.constructor.TEMPLATE;
|
||
if (this.quill.root === this.quill.scrollingContainer) {
|
||
this.quill.root.addEventListener('scroll', function () {
|
||
_this.root.style.marginTop = -1 * _this.quill.root.scrollTop + 'px';
|
||
});
|
||
}
|
||
this.hide();
|
||
}
|
||
|
||
_createClass(Tooltip, [{
|
||
key: 'hide',
|
||
value: function hide() {
|
||
this.root.classList.add('ql-hidden');
|
||
}
|
||
}, {
|
||
key: 'position',
|
||
value: function position(reference) {
|
||
var left = reference.left + reference.width / 2 - this.root.offsetWidth / 2;
|
||
// root.scrollTop should be 0 if scrollContainer !== root
|
||
var top = reference.bottom + this.quill.root.scrollTop;
|
||
this.root.style.left = left + 'px';
|
||
this.root.style.top = top + 'px';
|
||
this.root.classList.remove('ql-flip');
|
||
var containerBounds = this.boundsContainer.getBoundingClientRect();
|
||
var rootBounds = this.root.getBoundingClientRect();
|
||
var shift = 0;
|
||
if (rootBounds.right > containerBounds.right) {
|
||
shift = containerBounds.right - rootBounds.right;
|
||
this.root.style.left = left + shift + 'px';
|
||
}
|
||
if (rootBounds.left < containerBounds.left) {
|
||
shift = containerBounds.left - rootBounds.left;
|
||
this.root.style.left = left + shift + 'px';
|
||
}
|
||
if (rootBounds.bottom > containerBounds.bottom) {
|
||
var height = rootBounds.bottom - rootBounds.top;
|
||
var verticalShift = reference.bottom - reference.top + height;
|
||
this.root.style.top = top - verticalShift + 'px';
|
||
this.root.classList.add('ql-flip');
|
||
}
|
||
return shift;
|
||
}
|
||
}, {
|
||
key: 'show',
|
||
value: function show() {
|
||
this.root.classList.remove('ql-editing');
|
||
this.root.classList.remove('ql-hidden');
|
||
}
|
||
}]);
|
||
|
||
return Tooltip;
|
||
}();
|
||
|
||
exports.default = Tooltip;
|
||
|
||
/***/ }),
|
||
/* 62 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _extend = __webpack_require__(3);
|
||
|
||
var _extend2 = _interopRequireDefault(_extend);
|
||
|
||
var _emitter = __webpack_require__(8);
|
||
|
||
var _emitter2 = _interopRequireDefault(_emitter);
|
||
|
||
var _base = __webpack_require__(43);
|
||
|
||
var _base2 = _interopRequireDefault(_base);
|
||
|
||
var _link = __webpack_require__(27);
|
||
|
||
var _link2 = _interopRequireDefault(_link);
|
||
|
||
var _selection = __webpack_require__(15);
|
||
|
||
var _icons = __webpack_require__(41);
|
||
|
||
var _icons2 = _interopRequireDefault(_icons);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var TOOLBAR_CONFIG = [[{ header: ['1', '2', '3', false] }], ['bold', 'italic', 'underline', 'link'], [{ list: 'ordered' }, { list: 'bullet' }], ['clean']];
|
||
|
||
var SnowTheme = function (_BaseTheme) {
|
||
_inherits(SnowTheme, _BaseTheme);
|
||
|
||
function SnowTheme(quill, options) {
|
||
_classCallCheck(this, SnowTheme);
|
||
|
||
if (options.modules.toolbar != null && options.modules.toolbar.container == null) {
|
||
options.modules.toolbar.container = TOOLBAR_CONFIG;
|
||
}
|
||
|
||
var _this = _possibleConstructorReturn(this, (SnowTheme.__proto__ || Object.getPrototypeOf(SnowTheme)).call(this, quill, options));
|
||
|
||
_this.quill.container.classList.add('ql-snow');
|
||
return _this;
|
||
}
|
||
|
||
_createClass(SnowTheme, [{
|
||
key: 'extendToolbar',
|
||
value: function extendToolbar(toolbar) {
|
||
toolbar.container.classList.add('ql-snow');
|
||
this.buildButtons([].slice.call(toolbar.container.querySelectorAll('button')), _icons2.default);
|
||
this.buildPickers([].slice.call(toolbar.container.querySelectorAll('select')), _icons2.default);
|
||
this.tooltip = new SnowTooltip(this.quill, this.options.bounds);
|
||
if (toolbar.container.querySelector('.ql-link')) {
|
||
this.quill.keyboard.addBinding({ key: 'K', shortKey: true }, function (range, context) {
|
||
toolbar.handlers['link'].call(toolbar, !context.format.link);
|
||
});
|
||
}
|
||
}
|
||
}]);
|
||
|
||
return SnowTheme;
|
||
}(_base2.default);
|
||
|
||
SnowTheme.DEFAULTS = (0, _extend2.default)(true, {}, _base2.default.DEFAULTS, {
|
||
modules: {
|
||
toolbar: {
|
||
handlers: {
|
||
link: function link(value) {
|
||
if (value) {
|
||
var range = this.quill.getSelection();
|
||
if (range == null || range.length == 0) return;
|
||
var preview = this.quill.getText(range);
|
||
if (/^\S+@\S+\.\S+$/.test(preview) && preview.indexOf('mailto:') !== 0) {
|
||
preview = 'mailto:' + preview;
|
||
}
|
||
var tooltip = this.quill.theme.tooltip;
|
||
tooltip.edit('link', preview);
|
||
} else {
|
||
this.quill.format('link', false);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
var SnowTooltip = function (_BaseTooltip) {
|
||
_inherits(SnowTooltip, _BaseTooltip);
|
||
|
||
function SnowTooltip(quill, bounds) {
|
||
_classCallCheck(this, SnowTooltip);
|
||
|
||
var _this2 = _possibleConstructorReturn(this, (SnowTooltip.__proto__ || Object.getPrototypeOf(SnowTooltip)).call(this, quill, bounds));
|
||
|
||
_this2.preview = _this2.root.querySelector('a.ql-preview');
|
||
return _this2;
|
||
}
|
||
|
||
_createClass(SnowTooltip, [{
|
||
key: 'listen',
|
||
value: function listen() {
|
||
var _this3 = this;
|
||
|
||
_get(SnowTooltip.prototype.__proto__ || Object.getPrototypeOf(SnowTooltip.prototype), 'listen', this).call(this);
|
||
this.root.querySelector('a.ql-action').addEventListener('click', function (event) {
|
||
if (_this3.root.classList.contains('ql-editing')) {
|
||
_this3.save();
|
||
} else {
|
||
_this3.edit('link', _this3.preview.textContent);
|
||
}
|
||
event.preventDefault();
|
||
});
|
||
this.root.querySelector('a.ql-remove').addEventListener('click', function (event) {
|
||
if (_this3.linkRange != null) {
|
||
var range = _this3.linkRange;
|
||
_this3.restoreFocus();
|
||
_this3.quill.formatText(range, 'link', false, _emitter2.default.sources.USER);
|
||
delete _this3.linkRange;
|
||
}
|
||
event.preventDefault();
|
||
_this3.hide();
|
||
});
|
||
this.quill.on(_emitter2.default.events.SELECTION_CHANGE, function (range, oldRange, source) {
|
||
if (range == null) return;
|
||
if (range.length === 0 && source === _emitter2.default.sources.USER) {
|
||
var _quill$scroll$descend = _this3.quill.scroll.descendant(_link2.default, range.index),
|
||
_quill$scroll$descend2 = _slicedToArray(_quill$scroll$descend, 2),
|
||
link = _quill$scroll$descend2[0],
|
||
offset = _quill$scroll$descend2[1];
|
||
|
||
if (link != null) {
|
||
_this3.linkRange = new _selection.Range(range.index - offset, link.length());
|
||
var preview = _link2.default.formats(link.domNode);
|
||
_this3.preview.textContent = preview;
|
||
_this3.preview.setAttribute('href', preview);
|
||
_this3.show();
|
||
_this3.position(_this3.quill.getBounds(_this3.linkRange));
|
||
return;
|
||
}
|
||
} else {
|
||
delete _this3.linkRange;
|
||
}
|
||
_this3.hide();
|
||
});
|
||
}
|
||
}, {
|
||
key: 'show',
|
||
value: function show() {
|
||
_get(SnowTooltip.prototype.__proto__ || Object.getPrototypeOf(SnowTooltip.prototype), 'show', this).call(this);
|
||
this.root.removeAttribute('data-mode');
|
||
}
|
||
}]);
|
||
|
||
return SnowTooltip;
|
||
}(_base.BaseTooltip);
|
||
|
||
SnowTooltip.TEMPLATE = ['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-action"></a>', '<a class="ql-remove"></a>'].join('');
|
||
|
||
exports.default = SnowTheme;
|
||
|
||
/***/ }),
|
||
/* 63 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _core = __webpack_require__(29);
|
||
|
||
var _core2 = _interopRequireDefault(_core);
|
||
|
||
var _align = __webpack_require__(36);
|
||
|
||
var _direction = __webpack_require__(38);
|
||
|
||
var _indent = __webpack_require__(64);
|
||
|
||
var _blockquote = __webpack_require__(65);
|
||
|
||
var _blockquote2 = _interopRequireDefault(_blockquote);
|
||
|
||
var _header = __webpack_require__(66);
|
||
|
||
var _header2 = _interopRequireDefault(_header);
|
||
|
||
var _list = __webpack_require__(67);
|
||
|
||
var _list2 = _interopRequireDefault(_list);
|
||
|
||
var _background = __webpack_require__(37);
|
||
|
||
var _color = __webpack_require__(26);
|
||
|
||
var _font = __webpack_require__(39);
|
||
|
||
var _size = __webpack_require__(40);
|
||
|
||
var _bold = __webpack_require__(56);
|
||
|
||
var _bold2 = _interopRequireDefault(_bold);
|
||
|
||
var _italic = __webpack_require__(68);
|
||
|
||
var _italic2 = _interopRequireDefault(_italic);
|
||
|
||
var _link = __webpack_require__(27);
|
||
|
||
var _link2 = _interopRequireDefault(_link);
|
||
|
||
var _script = __webpack_require__(69);
|
||
|
||
var _script2 = _interopRequireDefault(_script);
|
||
|
||
var _strike = __webpack_require__(70);
|
||
|
||
var _strike2 = _interopRequireDefault(_strike);
|
||
|
||
var _underline = __webpack_require__(71);
|
||
|
||
var _underline2 = _interopRequireDefault(_underline);
|
||
|
||
var _image = __webpack_require__(72);
|
||
|
||
var _image2 = _interopRequireDefault(_image);
|
||
|
||
var _video = __webpack_require__(73);
|
||
|
||
var _video2 = _interopRequireDefault(_video);
|
||
|
||
var _code = __webpack_require__(13);
|
||
|
||
var _code2 = _interopRequireDefault(_code);
|
||
|
||
var _formula = __webpack_require__(74);
|
||
|
||
var _formula2 = _interopRequireDefault(_formula);
|
||
|
||
var _syntax = __webpack_require__(75);
|
||
|
||
var _syntax2 = _interopRequireDefault(_syntax);
|
||
|
||
var _toolbar = __webpack_require__(57);
|
||
|
||
var _toolbar2 = _interopRequireDefault(_toolbar);
|
||
|
||
var _icons = __webpack_require__(41);
|
||
|
||
var _icons2 = _interopRequireDefault(_icons);
|
||
|
||
var _picker = __webpack_require__(28);
|
||
|
||
var _picker2 = _interopRequireDefault(_picker);
|
||
|
||
var _colorPicker = __webpack_require__(59);
|
||
|
||
var _colorPicker2 = _interopRequireDefault(_colorPicker);
|
||
|
||
var _iconPicker = __webpack_require__(60);
|
||
|
||
var _iconPicker2 = _interopRequireDefault(_iconPicker);
|
||
|
||
var _tooltip = __webpack_require__(61);
|
||
|
||
var _tooltip2 = _interopRequireDefault(_tooltip);
|
||
|
||
var _bubble = __webpack_require__(108);
|
||
|
||
var _bubble2 = _interopRequireDefault(_bubble);
|
||
|
||
var _snow = __webpack_require__(62);
|
||
|
||
var _snow2 = _interopRequireDefault(_snow);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
_core2.default.register({
|
||
'attributors/attribute/direction': _direction.DirectionAttribute,
|
||
|
||
'attributors/class/align': _align.AlignClass,
|
||
'attributors/class/background': _background.BackgroundClass,
|
||
'attributors/class/color': _color.ColorClass,
|
||
'attributors/class/direction': _direction.DirectionClass,
|
||
'attributors/class/font': _font.FontClass,
|
||
'attributors/class/size': _size.SizeClass,
|
||
|
||
'attributors/style/align': _align.AlignStyle,
|
||
'attributors/style/background': _background.BackgroundStyle,
|
||
'attributors/style/color': _color.ColorStyle,
|
||
'attributors/style/direction': _direction.DirectionStyle,
|
||
'attributors/style/font': _font.FontStyle,
|
||
'attributors/style/size': _size.SizeStyle
|
||
}, true);
|
||
|
||
_core2.default.register({
|
||
'formats/align': _align.AlignClass,
|
||
'formats/direction': _direction.DirectionClass,
|
||
'formats/indent': _indent.IndentClass,
|
||
|
||
'formats/background': _background.BackgroundStyle,
|
||
'formats/color': _color.ColorStyle,
|
||
'formats/font': _font.FontClass,
|
||
'formats/size': _size.SizeClass,
|
||
|
||
'formats/blockquote': _blockquote2.default,
|
||
'formats/code-block': _code2.default,
|
||
'formats/header': _header2.default,
|
||
'formats/list': _list2.default,
|
||
|
||
'formats/bold': _bold2.default,
|
||
'formats/code': _code.Code,
|
||
'formats/italic': _italic2.default,
|
||
'formats/link': _link2.default,
|
||
'formats/script': _script2.default,
|
||
'formats/strike': _strike2.default,
|
||
'formats/underline': _underline2.default,
|
||
|
||
'formats/image': _image2.default,
|
||
'formats/video': _video2.default,
|
||
|
||
'formats/list/item': _list.ListItem,
|
||
|
||
'modules/formula': _formula2.default,
|
||
'modules/syntax': _syntax2.default,
|
||
'modules/toolbar': _toolbar2.default,
|
||
|
||
'themes/bubble': _bubble2.default,
|
||
'themes/snow': _snow2.default,
|
||
|
||
'ui/icons': _icons2.default,
|
||
'ui/picker': _picker2.default,
|
||
'ui/icon-picker': _iconPicker2.default,
|
||
'ui/color-picker': _colorPicker2.default,
|
||
'ui/tooltip': _tooltip2.default
|
||
}, true);
|
||
|
||
exports.default = _core2.default;
|
||
|
||
/***/ }),
|
||
/* 64 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.IndentClass = undefined;
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var IdentAttributor = function (_Parchment$Attributor) {
|
||
_inherits(IdentAttributor, _Parchment$Attributor);
|
||
|
||
function IdentAttributor() {
|
||
_classCallCheck(this, IdentAttributor);
|
||
|
||
return _possibleConstructorReturn(this, (IdentAttributor.__proto__ || Object.getPrototypeOf(IdentAttributor)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(IdentAttributor, [{
|
||
key: 'add',
|
||
value: function add(node, value) {
|
||
if (value === '+1' || value === '-1') {
|
||
var indent = this.value(node) || 0;
|
||
value = value === '+1' ? indent + 1 : indent - 1;
|
||
}
|
||
if (value === 0) {
|
||
this.remove(node);
|
||
return true;
|
||
} else {
|
||
return _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'add', this).call(this, node, value);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'canAdd',
|
||
value: function canAdd(node, value) {
|
||
return _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'canAdd', this).call(this, node, value) || _get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'canAdd', this).call(this, node, parseInt(value));
|
||
}
|
||
}, {
|
||
key: 'value',
|
||
value: function value(node) {
|
||
return parseInt(_get(IdentAttributor.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor.prototype), 'value', this).call(this, node)) || undefined; // Don't return NaN
|
||
}
|
||
}]);
|
||
|
||
return IdentAttributor;
|
||
}(_parchment2.default.Attributor.Class);
|
||
|
||
var IndentClass = new IdentAttributor('indent', 'ql-indent', {
|
||
scope: _parchment2.default.Scope.BLOCK,
|
||
whitelist: [1, 2, 3, 4, 5, 6, 7, 8]
|
||
});
|
||
|
||
exports.IndentClass = IndentClass;
|
||
|
||
/***/ }),
|
||
/* 65 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _block = __webpack_require__(4);
|
||
|
||
var _block2 = _interopRequireDefault(_block);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var Blockquote = function (_Block) {
|
||
_inherits(Blockquote, _Block);
|
||
|
||
function Blockquote() {
|
||
_classCallCheck(this, Blockquote);
|
||
|
||
return _possibleConstructorReturn(this, (Blockquote.__proto__ || Object.getPrototypeOf(Blockquote)).apply(this, arguments));
|
||
}
|
||
|
||
return Blockquote;
|
||
}(_block2.default);
|
||
|
||
Blockquote.blotName = 'blockquote';
|
||
Blockquote.tagName = 'blockquote';
|
||
|
||
exports.default = Blockquote;
|
||
|
||
/***/ }),
|
||
/* 66 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _block = __webpack_require__(4);
|
||
|
||
var _block2 = _interopRequireDefault(_block);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var Header = function (_Block) {
|
||
_inherits(Header, _Block);
|
||
|
||
function Header() {
|
||
_classCallCheck(this, Header);
|
||
|
||
return _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(Header, null, [{
|
||
key: 'formats',
|
||
value: function formats(domNode) {
|
||
return this.tagName.indexOf(domNode.tagName) + 1;
|
||
}
|
||
}]);
|
||
|
||
return Header;
|
||
}(_block2.default);
|
||
|
||
Header.blotName = 'header';
|
||
Header.tagName = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6'];
|
||
|
||
exports.default = Header;
|
||
|
||
/***/ }),
|
||
/* 67 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = exports.ListItem = undefined;
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _block = __webpack_require__(4);
|
||
|
||
var _block2 = _interopRequireDefault(_block);
|
||
|
||
var _container = __webpack_require__(25);
|
||
|
||
var _container2 = _interopRequireDefault(_container);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var ListItem = function (_Block) {
|
||
_inherits(ListItem, _Block);
|
||
|
||
function ListItem() {
|
||
_classCallCheck(this, ListItem);
|
||
|
||
return _possibleConstructorReturn(this, (ListItem.__proto__ || Object.getPrototypeOf(ListItem)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(ListItem, [{
|
||
key: 'format',
|
||
value: function format(name, value) {
|
||
if (name === List.blotName && !value) {
|
||
this.replaceWith(_parchment2.default.create(this.statics.scope));
|
||
} else {
|
||
_get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'format', this).call(this, name, value);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'remove',
|
||
value: function remove() {
|
||
if (this.prev == null && this.next == null) {
|
||
this.parent.remove();
|
||
} else {
|
||
_get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'remove', this).call(this);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'replaceWith',
|
||
value: function replaceWith(name, value) {
|
||
this.parent.isolate(this.offset(this.parent), this.length());
|
||
if (name === this.parent.statics.blotName) {
|
||
this.parent.replaceWith(name, value);
|
||
return this;
|
||
} else {
|
||
this.parent.unwrap();
|
||
return _get(ListItem.prototype.__proto__ || Object.getPrototypeOf(ListItem.prototype), 'replaceWith', this).call(this, name, value);
|
||
}
|
||
}
|
||
}], [{
|
||
key: 'formats',
|
||
value: function formats(domNode) {
|
||
return domNode.tagName === this.tagName ? undefined : _get(ListItem.__proto__ || Object.getPrototypeOf(ListItem), 'formats', this).call(this, domNode);
|
||
}
|
||
}]);
|
||
|
||
return ListItem;
|
||
}(_block2.default);
|
||
|
||
ListItem.blotName = 'list-item';
|
||
ListItem.tagName = 'LI';
|
||
|
||
var List = function (_Container) {
|
||
_inherits(List, _Container);
|
||
|
||
_createClass(List, null, [{
|
||
key: 'create',
|
||
value: function create(value) {
|
||
var tagName = value === 'ordered' ? 'OL' : 'UL';
|
||
var node = _get(List.__proto__ || Object.getPrototypeOf(List), 'create', this).call(this, tagName);
|
||
if (value === 'checked' || value === 'unchecked') {
|
||
node.setAttribute('data-checked', value === 'checked');
|
||
}
|
||
return node;
|
||
}
|
||
}, {
|
||
key: 'formats',
|
||
value: function formats(domNode) {
|
||
if (domNode.tagName === 'OL') return 'ordered';
|
||
if (domNode.tagName === 'UL') {
|
||
if (domNode.hasAttribute('data-checked')) {
|
||
return domNode.getAttribute('data-checked') === 'true' ? 'checked' : 'unchecked';
|
||
} else {
|
||
return 'bullet';
|
||
}
|
||
}
|
||
return undefined;
|
||
}
|
||
}]);
|
||
|
||
function List(domNode) {
|
||
_classCallCheck(this, List);
|
||
|
||
var _this2 = _possibleConstructorReturn(this, (List.__proto__ || Object.getPrototypeOf(List)).call(this, domNode));
|
||
|
||
var listEventHandler = function listEventHandler(e) {
|
||
if (e.target.parentNode !== domNode) return;
|
||
var format = _this2.statics.formats(domNode);
|
||
var blot = _parchment2.default.find(e.target);
|
||
if (format === 'checked') {
|
||
blot.format('list', 'unchecked');
|
||
} else if (format === 'unchecked') {
|
||
blot.format('list', 'checked');
|
||
}
|
||
};
|
||
|
||
domNode.addEventListener('touchstart', listEventHandler);
|
||
domNode.addEventListener('mousedown', listEventHandler);
|
||
return _this2;
|
||
}
|
||
|
||
_createClass(List, [{
|
||
key: 'format',
|
||
value: function format(name, value) {
|
||
if (this.children.length > 0) {
|
||
this.children.tail.format(name, value);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'formats',
|
||
value: function formats() {
|
||
// We don't inherit from FormatBlot
|
||
return _defineProperty({}, this.statics.blotName, this.statics.formats(this.domNode));
|
||
}
|
||
}, {
|
||
key: 'insertBefore',
|
||
value: function insertBefore(blot, ref) {
|
||
if (blot instanceof ListItem) {
|
||
_get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'insertBefore', this).call(this, blot, ref);
|
||
} else {
|
||
var index = ref == null ? this.length() : ref.offset(this);
|
||
var after = this.split(index);
|
||
after.parent.insertBefore(blot, after);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'optimize',
|
||
value: function optimize(context) {
|
||
_get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'optimize', this).call(this, context);
|
||
var next = this.next;
|
||
if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && next.domNode.tagName === this.domNode.tagName && next.domNode.getAttribute('data-checked') === this.domNode.getAttribute('data-checked')) {
|
||
next.moveChildren(this);
|
||
next.remove();
|
||
}
|
||
}
|
||
}, {
|
||
key: 'replace',
|
||
value: function replace(target) {
|
||
if (target.statics.blotName !== this.statics.blotName) {
|
||
var item = _parchment2.default.create(this.statics.defaultChild);
|
||
target.moveChildren(item);
|
||
this.appendChild(item);
|
||
}
|
||
_get(List.prototype.__proto__ || Object.getPrototypeOf(List.prototype), 'replace', this).call(this, target);
|
||
}
|
||
}]);
|
||
|
||
return List;
|
||
}(_container2.default);
|
||
|
||
List.blotName = 'list';
|
||
List.scope = _parchment2.default.Scope.BLOCK_BLOT;
|
||
List.tagName = ['OL', 'UL'];
|
||
List.defaultChild = 'list-item';
|
||
List.allowedChildren = [ListItem];
|
||
|
||
exports.ListItem = ListItem;
|
||
exports.default = List;
|
||
|
||
/***/ }),
|
||
/* 68 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _bold = __webpack_require__(56);
|
||
|
||
var _bold2 = _interopRequireDefault(_bold);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var Italic = function (_Bold) {
|
||
_inherits(Italic, _Bold);
|
||
|
||
function Italic() {
|
||
_classCallCheck(this, Italic);
|
||
|
||
return _possibleConstructorReturn(this, (Italic.__proto__ || Object.getPrototypeOf(Italic)).apply(this, arguments));
|
||
}
|
||
|
||
return Italic;
|
||
}(_bold2.default);
|
||
|
||
Italic.blotName = 'italic';
|
||
Italic.tagName = ['EM', 'I'];
|
||
|
||
exports.default = Italic;
|
||
|
||
/***/ }),
|
||
/* 69 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _inline = __webpack_require__(6);
|
||
|
||
var _inline2 = _interopRequireDefault(_inline);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var Script = function (_Inline) {
|
||
_inherits(Script, _Inline);
|
||
|
||
function Script() {
|
||
_classCallCheck(this, Script);
|
||
|
||
return _possibleConstructorReturn(this, (Script.__proto__ || Object.getPrototypeOf(Script)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(Script, null, [{
|
||
key: 'create',
|
||
value: function create(value) {
|
||
if (value === 'super') {
|
||
return document.createElement('sup');
|
||
} else if (value === 'sub') {
|
||
return document.createElement('sub');
|
||
} else {
|
||
return _get(Script.__proto__ || Object.getPrototypeOf(Script), 'create', this).call(this, value);
|
||
}
|
||
}
|
||
}, {
|
||
key: 'formats',
|
||
value: function formats(domNode) {
|
||
if (domNode.tagName === 'SUB') return 'sub';
|
||
if (domNode.tagName === 'SUP') return 'super';
|
||
return undefined;
|
||
}
|
||
}]);
|
||
|
||
return Script;
|
||
}(_inline2.default);
|
||
|
||
Script.blotName = 'script';
|
||
Script.tagName = ['SUB', 'SUP'];
|
||
|
||
exports.default = Script;
|
||
|
||
/***/ }),
|
||
/* 70 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _inline = __webpack_require__(6);
|
||
|
||
var _inline2 = _interopRequireDefault(_inline);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var Strike = function (_Inline) {
|
||
_inherits(Strike, _Inline);
|
||
|
||
function Strike() {
|
||
_classCallCheck(this, Strike);
|
||
|
||
return _possibleConstructorReturn(this, (Strike.__proto__ || Object.getPrototypeOf(Strike)).apply(this, arguments));
|
||
}
|
||
|
||
return Strike;
|
||
}(_inline2.default);
|
||
|
||
Strike.blotName = 'strike';
|
||
Strike.tagName = 'S';
|
||
|
||
exports.default = Strike;
|
||
|
||
/***/ }),
|
||
/* 71 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _inline = __webpack_require__(6);
|
||
|
||
var _inline2 = _interopRequireDefault(_inline);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var Underline = function (_Inline) {
|
||
_inherits(Underline, _Inline);
|
||
|
||
function Underline() {
|
||
_classCallCheck(this, Underline);
|
||
|
||
return _possibleConstructorReturn(this, (Underline.__proto__ || Object.getPrototypeOf(Underline)).apply(this, arguments));
|
||
}
|
||
|
||
return Underline;
|
||
}(_inline2.default);
|
||
|
||
Underline.blotName = 'underline';
|
||
Underline.tagName = 'U';
|
||
|
||
exports.default = Underline;
|
||
|
||
/***/ }),
|
||
/* 72 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _link = __webpack_require__(27);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var ATTRIBUTES = ['alt', 'height', 'width'];
|
||
|
||
var Image = function (_Parchment$Embed) {
|
||
_inherits(Image, _Parchment$Embed);
|
||
|
||
function Image() {
|
||
_classCallCheck(this, Image);
|
||
|
||
return _possibleConstructorReturn(this, (Image.__proto__ || Object.getPrototypeOf(Image)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(Image, [{
|
||
key: 'format',
|
||
value: function format(name, value) {
|
||
if (ATTRIBUTES.indexOf(name) > -1) {
|
||
if (value) {
|
||
this.domNode.setAttribute(name, value);
|
||
} else {
|
||
this.domNode.removeAttribute(name);
|
||
}
|
||
} else {
|
||
_get(Image.prototype.__proto__ || Object.getPrototypeOf(Image.prototype), 'format', this).call(this, name, value);
|
||
}
|
||
}
|
||
}], [{
|
||
key: 'create',
|
||
value: function create(value) {
|
||
var node = _get(Image.__proto__ || Object.getPrototypeOf(Image), 'create', this).call(this, value);
|
||
if (typeof value === 'string') {
|
||
node.setAttribute('src', this.sanitize(value));
|
||
}
|
||
return node;
|
||
}
|
||
}, {
|
||
key: 'formats',
|
||
value: function formats(domNode) {
|
||
return ATTRIBUTES.reduce(function (formats, attribute) {
|
||
if (domNode.hasAttribute(attribute)) {
|
||
formats[attribute] = domNode.getAttribute(attribute);
|
||
}
|
||
return formats;
|
||
}, {});
|
||
}
|
||
}, {
|
||
key: 'match',
|
||
value: function match(url) {
|
||
return (/\.(jpe?g|gif|png)$/.test(url) || /^data:image\/.+;base64/.test(url)
|
||
);
|
||
}
|
||
}, {
|
||
key: 'sanitize',
|
||
value: function sanitize(url) {
|
||
return (0, _link.sanitize)(url, ['http', 'https', 'data']) ? url : '//:0';
|
||
}
|
||
}, {
|
||
key: 'value',
|
||
value: function value(domNode) {
|
||
return domNode.getAttribute('src');
|
||
}
|
||
}]);
|
||
|
||
return Image;
|
||
}(_parchment2.default.Embed);
|
||
|
||
Image.blotName = 'image';
|
||
Image.tagName = 'IMG';
|
||
|
||
exports.default = Image;
|
||
|
||
/***/ }),
|
||
/* 73 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _block = __webpack_require__(4);
|
||
|
||
var _link = __webpack_require__(27);
|
||
|
||
var _link2 = _interopRequireDefault(_link);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var ATTRIBUTES = ['height', 'width'];
|
||
|
||
var Video = function (_BlockEmbed) {
|
||
_inherits(Video, _BlockEmbed);
|
||
|
||
function Video() {
|
||
_classCallCheck(this, Video);
|
||
|
||
return _possibleConstructorReturn(this, (Video.__proto__ || Object.getPrototypeOf(Video)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(Video, [{
|
||
key: 'format',
|
||
value: function format(name, value) {
|
||
if (ATTRIBUTES.indexOf(name) > -1) {
|
||
if (value) {
|
||
this.domNode.setAttribute(name, value);
|
||
} else {
|
||
this.domNode.removeAttribute(name);
|
||
}
|
||
} else {
|
||
_get(Video.prototype.__proto__ || Object.getPrototypeOf(Video.prototype), 'format', this).call(this, name, value);
|
||
}
|
||
}
|
||
}], [{
|
||
key: 'create',
|
||
value: function create(value) {
|
||
var node = _get(Video.__proto__ || Object.getPrototypeOf(Video), 'create', this).call(this, value);
|
||
node.setAttribute('frameborder', '0');
|
||
node.setAttribute('allowfullscreen', true);
|
||
node.setAttribute('src', this.sanitize(value));
|
||
return node;
|
||
}
|
||
}, {
|
||
key: 'formats',
|
||
value: function formats(domNode) {
|
||
return ATTRIBUTES.reduce(function (formats, attribute) {
|
||
if (domNode.hasAttribute(attribute)) {
|
||
formats[attribute] = domNode.getAttribute(attribute);
|
||
}
|
||
return formats;
|
||
}, {});
|
||
}
|
||
}, {
|
||
key: 'sanitize',
|
||
value: function sanitize(url) {
|
||
return _link2.default.sanitize(url);
|
||
}
|
||
}, {
|
||
key: 'value',
|
||
value: function value(domNode) {
|
||
return domNode.getAttribute('src');
|
||
}
|
||
}]);
|
||
|
||
return Video;
|
||
}(_block.BlockEmbed);
|
||
|
||
Video.blotName = 'video';
|
||
Video.className = 'ql-video';
|
||
Video.tagName = 'IFRAME';
|
||
|
||
exports.default = Video;
|
||
|
||
/***/ }),
|
||
/* 74 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = exports.FormulaBlot = undefined;
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _embed = __webpack_require__(35);
|
||
|
||
var _embed2 = _interopRequireDefault(_embed);
|
||
|
||
var _quill = __webpack_require__(5);
|
||
|
||
var _quill2 = _interopRequireDefault(_quill);
|
||
|
||
var _module = __webpack_require__(9);
|
||
|
||
var _module2 = _interopRequireDefault(_module);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var FormulaBlot = function (_Embed) {
|
||
_inherits(FormulaBlot, _Embed);
|
||
|
||
function FormulaBlot() {
|
||
_classCallCheck(this, FormulaBlot);
|
||
|
||
return _possibleConstructorReturn(this, (FormulaBlot.__proto__ || Object.getPrototypeOf(FormulaBlot)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(FormulaBlot, null, [{
|
||
key: 'create',
|
||
value: function create(value) {
|
||
var node = _get(FormulaBlot.__proto__ || Object.getPrototypeOf(FormulaBlot), 'create', this).call(this, value);
|
||
if (typeof value === 'string') {
|
||
window.katex.render(value, node, {
|
||
throwOnError: false,
|
||
errorColor: '#f00'
|
||
});
|
||
node.setAttribute('data-value', value);
|
||
}
|
||
return node;
|
||
}
|
||
}, {
|
||
key: 'value',
|
||
value: function value(domNode) {
|
||
return domNode.getAttribute('data-value');
|
||
}
|
||
}]);
|
||
|
||
return FormulaBlot;
|
||
}(_embed2.default);
|
||
|
||
FormulaBlot.blotName = 'formula';
|
||
FormulaBlot.className = 'ql-formula';
|
||
FormulaBlot.tagName = 'SPAN';
|
||
|
||
var Formula = function (_Module) {
|
||
_inherits(Formula, _Module);
|
||
|
||
_createClass(Formula, null, [{
|
||
key: 'register',
|
||
value: function register() {
|
||
_quill2.default.register(FormulaBlot, true);
|
||
}
|
||
}]);
|
||
|
||
function Formula() {
|
||
_classCallCheck(this, Formula);
|
||
|
||
var _this2 = _possibleConstructorReturn(this, (Formula.__proto__ || Object.getPrototypeOf(Formula)).call(this));
|
||
|
||
if (window.katex == null) {
|
||
throw new Error('Formula module requires KaTeX.');
|
||
}
|
||
return _this2;
|
||
}
|
||
|
||
return Formula;
|
||
}(_module2.default);
|
||
|
||
exports.FormulaBlot = FormulaBlot;
|
||
exports.default = Formula;
|
||
|
||
/***/ }),
|
||
/* 75 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = exports.CodeToken = exports.CodeBlock = undefined;
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _parchment = __webpack_require__(0);
|
||
|
||
var _parchment2 = _interopRequireDefault(_parchment);
|
||
|
||
var _quill = __webpack_require__(5);
|
||
|
||
var _quill2 = _interopRequireDefault(_quill);
|
||
|
||
var _module = __webpack_require__(9);
|
||
|
||
var _module2 = _interopRequireDefault(_module);
|
||
|
||
var _code = __webpack_require__(13);
|
||
|
||
var _code2 = _interopRequireDefault(_code);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var SyntaxCodeBlock = function (_CodeBlock) {
|
||
_inherits(SyntaxCodeBlock, _CodeBlock);
|
||
|
||
function SyntaxCodeBlock() {
|
||
_classCallCheck(this, SyntaxCodeBlock);
|
||
|
||
return _possibleConstructorReturn(this, (SyntaxCodeBlock.__proto__ || Object.getPrototypeOf(SyntaxCodeBlock)).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(SyntaxCodeBlock, [{
|
||
key: 'replaceWith',
|
||
value: function replaceWith(block) {
|
||
this.domNode.textContent = this.domNode.textContent;
|
||
this.attach();
|
||
_get(SyntaxCodeBlock.prototype.__proto__ || Object.getPrototypeOf(SyntaxCodeBlock.prototype), 'replaceWith', this).call(this, block);
|
||
}
|
||
}, {
|
||
key: 'highlight',
|
||
value: function highlight(_highlight) {
|
||
var text = this.domNode.textContent;
|
||
if (this.cachedText !== text) {
|
||
if (text.trim().length > 0 || this.cachedText == null) {
|
||
this.domNode.innerHTML = _highlight(text);
|
||
this.domNode.normalize();
|
||
this.attach();
|
||
}
|
||
this.cachedText = text;
|
||
}
|
||
}
|
||
}]);
|
||
|
||
return SyntaxCodeBlock;
|
||
}(_code2.default);
|
||
|
||
SyntaxCodeBlock.className = 'ql-syntax';
|
||
|
||
var CodeToken = new _parchment2.default.Attributor.Class('token', 'hljs', {
|
||
scope: _parchment2.default.Scope.INLINE
|
||
});
|
||
|
||
var Syntax = function (_Module) {
|
||
_inherits(Syntax, _Module);
|
||
|
||
_createClass(Syntax, null, [{
|
||
key: 'register',
|
||
value: function register() {
|
||
_quill2.default.register(CodeToken, true);
|
||
_quill2.default.register(SyntaxCodeBlock, true);
|
||
}
|
||
}]);
|
||
|
||
function Syntax(quill, options) {
|
||
_classCallCheck(this, Syntax);
|
||
|
||
var _this2 = _possibleConstructorReturn(this, (Syntax.__proto__ || Object.getPrototypeOf(Syntax)).call(this, quill, options));
|
||
|
||
if (typeof _this2.options.highlight !== 'function') {
|
||
throw new Error('Syntax module requires highlight.js. Please include the library on the page before Quill.');
|
||
}
|
||
var timer = null;
|
||
_this2.quill.on(_quill2.default.events.SCROLL_OPTIMIZE, function () {
|
||
clearTimeout(timer);
|
||
timer = setTimeout(function () {
|
||
_this2.highlight();
|
||
timer = null;
|
||
}, _this2.options.interval);
|
||
});
|
||
_this2.highlight();
|
||
return _this2;
|
||
}
|
||
|
||
_createClass(Syntax, [{
|
||
key: 'highlight',
|
||
value: function highlight() {
|
||
var _this3 = this;
|
||
|
||
if (this.quill.selection.composing) return;
|
||
this.quill.update(_quill2.default.sources.USER);
|
||
var range = this.quill.getSelection();
|
||
this.quill.scroll.descendants(SyntaxCodeBlock).forEach(function (code) {
|
||
code.highlight(_this3.options.highlight);
|
||
});
|
||
this.quill.update(_quill2.default.sources.SILENT);
|
||
if (range != null) {
|
||
this.quill.setSelection(range, _quill2.default.sources.SILENT);
|
||
}
|
||
}
|
||
}]);
|
||
|
||
return Syntax;
|
||
}(_module2.default);
|
||
|
||
Syntax.DEFAULTS = {
|
||
highlight: function () {
|
||
if (window.hljs == null) return null;
|
||
return function (text) {
|
||
var result = window.hljs.highlightAuto(text);
|
||
return result.value;
|
||
};
|
||
}(),
|
||
interval: 1000
|
||
};
|
||
|
||
exports.CodeBlock = SyntaxCodeBlock;
|
||
exports.CodeToken = CodeToken;
|
||
exports.default = Syntax;
|
||
|
||
/***/ }),
|
||
/* 76 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>";
|
||
|
||
/***/ }),
|
||
/* 77 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>";
|
||
|
||
/***/ }),
|
||
/* 78 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>";
|
||
|
||
/***/ }),
|
||
/* 79 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>";
|
||
|
||
/***/ }),
|
||
/* 80 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <g class=\"ql-fill ql-color-label\"> <polygon points=\"6 6.868 6 6 5 6 5 7 5.942 7 6 6.868\"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points=\"6.817 5 6 5 6 6 6.38 6 6.817 5\"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points=\"4 11.439 4 11 3 11 3 12 3.755 12 4 11.439\"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points=\"4.63 10 4 10 4 11 4.192 11 4.63 10\"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points=\"13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174\"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points=\"12 6.868 12 6 11.62 6 12 6.868\"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points=\"12.933 9 13 9 13 8 12.495 8 12.933 9\"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points=\"5.5 13 9 5 12.5 13\"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>";
|
||
|
||
/***/ }),
|
||
/* 81 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <rect class=\"ql-fill ql-stroke\" height=3 width=3 x=4 y=5></rect> <rect class=\"ql-fill ql-stroke\" height=3 width=3 x=11 y=5></rect> <path class=\"ql-even ql-fill ql-stroke\" d=M7,8c0,4.031-3,5-3,5></path> <path class=\"ql-even ql-fill ql-stroke\" d=M14,8c0,4.031-3,5-3,5></path> </svg>";
|
||
|
||
/***/ }),
|
||
/* 82 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>";
|
||
|
||
/***/ }),
|
||
/* 83 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg class=\"\" viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>";
|
||
|
||
/***/ }),
|
||
/* 84 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=\"ql-color-label ql-stroke ql-transparent\" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points=\"5.5 11 9 3 12.5 11\"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>";
|
||
|
||
/***/ }),
|
||
/* 85 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <polygon class=\"ql-stroke ql-fill\" points=\"3 11 5 9 3 7 3 11\"></polygon> <line class=\"ql-stroke ql-fill\" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>";
|
||
|
||
/***/ }),
|
||
/* 86 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <polygon class=\"ql-stroke ql-fill\" points=\"15 12 13 10 15 8 15 12\"></polygon> <line class=\"ql-stroke ql-fill\" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>";
|
||
|
||
/***/ }),
|
||
/* 87 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>";
|
||
|
||
/***/ }),
|
||
/* 88 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>";
|
||
|
||
/***/ }),
|
||
/* 89 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>";
|
||
|
||
/***/ }),
|
||
/* 90 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform=\"translate(24 18) rotate(-180)\"/> </svg>";
|
||
|
||
/***/ }),
|
||
/* 91 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>";
|
||
|
||
/***/ }),
|
||
/* 92 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewBox=\"0 0 18 18\"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>";
|
||
|
||
/***/ }),
|
||
/* 93 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewBox=\"0 0 18 18\"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>";
|
||
|
||
/***/ }),
|
||
/* 94 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>";
|
||
|
||
/***/ }),
|
||
/* 95 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class=\"ql-even ql-fill\" points=\"5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12\"></polyline> </svg>";
|
||
|
||
/***/ }),
|
||
/* 96 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=\"ql-fill ql-stroke\" points=\"3 7 3 11 5 9 3 7\"></polyline> </svg>";
|
||
|
||
/***/ }),
|
||
/* 97 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points=\"5 7 5 11 3 9 5 7\"></polyline> </svg>";
|
||
|
||
/***/ }),
|
||
/* 98 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class=\"ql-even ql-stroke\" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class=\"ql-even ql-stroke\" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>";
|
||
|
||
/***/ }),
|
||
/* 99 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class=\"ql-stroke ql-thin\" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class=\"ql-stroke ql-thin\" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class=\"ql-stroke ql-thin\" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>";
|
||
|
||
/***/ }),
|
||
/* 100 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>";
|
||
|
||
/***/ }),
|
||
/* 101 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg class=\"\" viewbox=\"0 0 18 18\"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points=\"3 4 4 5 6 3\"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points=\"3 14 4 15 6 13\"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points=\"3 9 4 10 6 8\"></polyline> </svg>";
|
||
|
||
/***/ }),
|
||
/* 102 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>";
|
||
|
||
/***/ }),
|
||
/* 103 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>";
|
||
|
||
/***/ }),
|
||
/* 104 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <line class=\"ql-stroke ql-thin\" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>";
|
||
|
||
/***/ }),
|
||
/* 105 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>";
|
||
|
||
/***/ }),
|
||
/* 106 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>";
|
||
|
||
/***/ }),
|
||
/* 107 */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = "<svg viewbox=\"0 0 18 18\"> <polygon class=ql-stroke points=\"7 11 9 13 11 11 7 11\"></polygon> <polygon class=ql-stroke points=\"7 7 9 5 11 7 7 7\"></polygon> </svg>";
|
||
|
||
/***/ }),
|
||
/* 108 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = exports.BubbleTooltip = undefined;
|
||
|
||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||
|
||
var _extend = __webpack_require__(3);
|
||
|
||
var _extend2 = _interopRequireDefault(_extend);
|
||
|
||
var _emitter = __webpack_require__(8);
|
||
|
||
var _emitter2 = _interopRequireDefault(_emitter);
|
||
|
||
var _base = __webpack_require__(43);
|
||
|
||
var _base2 = _interopRequireDefault(_base);
|
||
|
||
var _selection = __webpack_require__(15);
|
||
|
||
var _icons = __webpack_require__(41);
|
||
|
||
var _icons2 = _interopRequireDefault(_icons);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
var TOOLBAR_CONFIG = [['bold', 'italic', 'link'], [{ header: 1 }, { header: 2 }, 'blockquote']];
|
||
|
||
var BubbleTheme = function (_BaseTheme) {
|
||
_inherits(BubbleTheme, _BaseTheme);
|
||
|
||
function BubbleTheme(quill, options) {
|
||
_classCallCheck(this, BubbleTheme);
|
||
|
||
if (options.modules.toolbar != null && options.modules.toolbar.container == null) {
|
||
options.modules.toolbar.container = TOOLBAR_CONFIG;
|
||
}
|
||
|
||
var _this = _possibleConstructorReturn(this, (BubbleTheme.__proto__ || Object.getPrototypeOf(BubbleTheme)).call(this, quill, options));
|
||
|
||
_this.quill.container.classList.add('ql-bubble');
|
||
return _this;
|
||
}
|
||
|
||
_createClass(BubbleTheme, [{
|
||
key: 'extendToolbar',
|
||
value: function extendToolbar(toolbar) {
|
||
this.tooltip = new BubbleTooltip(this.quill, this.options.bounds);
|
||
this.tooltip.root.appendChild(toolbar.container);
|
||
this.buildButtons([].slice.call(toolbar.container.querySelectorAll('button')), _icons2.default);
|
||
this.buildPickers([].slice.call(toolbar.container.querySelectorAll('select')), _icons2.default);
|
||
}
|
||
}]);
|
||
|
||
return BubbleTheme;
|
||
}(_base2.default);
|
||
|
||
BubbleTheme.DEFAULTS = (0, _extend2.default)(true, {}, _base2.default.DEFAULTS, {
|
||
modules: {
|
||
toolbar: {
|
||
handlers: {
|
||
link: function link(value) {
|
||
if (!value) {
|
||
this.quill.format('link', false);
|
||
} else {
|
||
this.quill.theme.tooltip.edit();
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
var BubbleTooltip = function (_BaseTooltip) {
|
||
_inherits(BubbleTooltip, _BaseTooltip);
|
||
|
||
function BubbleTooltip(quill, bounds) {
|
||
_classCallCheck(this, BubbleTooltip);
|
||
|
||
var _this2 = _possibleConstructorReturn(this, (BubbleTooltip.__proto__ || Object.getPrototypeOf(BubbleTooltip)).call(this, quill, bounds));
|
||
|
||
_this2.quill.on(_emitter2.default.events.EDITOR_CHANGE, function (type, range, oldRange, source) {
|
||
if (type !== _emitter2.default.events.SELECTION_CHANGE) return;
|
||
if (range != null && range.length > 0 && source === _emitter2.default.sources.USER) {
|
||
_this2.show();
|
||
// Lock our width so we will expand beyond our offsetParent boundaries
|
||
_this2.root.style.left = '0px';
|
||
_this2.root.style.width = '';
|
||
_this2.root.style.width = _this2.root.offsetWidth + 'px';
|
||
var lines = _this2.quill.getLines(range.index, range.length);
|
||
if (lines.length === 1) {
|
||
_this2.position(_this2.quill.getBounds(range));
|
||
} else {
|
||
var lastLine = lines[lines.length - 1];
|
||
var index = _this2.quill.getIndex(lastLine);
|
||
var length = Math.min(lastLine.length() - 1, range.index + range.length - index);
|
||
var _bounds = _this2.quill.getBounds(new _selection.Range(index, length));
|
||
_this2.position(_bounds);
|
||
}
|
||
} else if (document.activeElement !== _this2.textbox && _this2.quill.hasFocus()) {
|
||
_this2.hide();
|
||
}
|
||
});
|
||
return _this2;
|
||
}
|
||
|
||
_createClass(BubbleTooltip, [{
|
||
key: 'listen',
|
||
value: function listen() {
|
||
var _this3 = this;
|
||
|
||
_get(BubbleTooltip.prototype.__proto__ || Object.getPrototypeOf(BubbleTooltip.prototype), 'listen', this).call(this);
|
||
this.root.querySelector('.ql-close').addEventListener('click', function () {
|
||
_this3.root.classList.remove('ql-editing');
|
||
});
|
||
this.quill.on(_emitter2.default.events.SCROLL_OPTIMIZE, function () {
|
||
// Let selection be restored by toolbar handlers before repositioning
|
||
setTimeout(function () {
|
||
if (_this3.root.classList.contains('ql-hidden')) return;
|
||
var range = _this3.quill.getSelection();
|
||
if (range != null) {
|
||
_this3.position(_this3.quill.getBounds(range));
|
||
}
|
||
}, 1);
|
||
});
|
||
}
|
||
}, {
|
||
key: 'cancel',
|
||
value: function cancel() {
|
||
this.show();
|
||
}
|
||
}, {
|
||
key: 'position',
|
||
value: function position(reference) {
|
||
var shift = _get(BubbleTooltip.prototype.__proto__ || Object.getPrototypeOf(BubbleTooltip.prototype), 'position', this).call(this, reference);
|
||
var arrow = this.root.querySelector('.ql-tooltip-arrow');
|
||
arrow.style.marginLeft = '';
|
||
if (shift === 0) return shift;
|
||
arrow.style.marginLeft = -1 * shift - arrow.offsetWidth / 2 + 'px';
|
||
}
|
||
}]);
|
||
|
||
return BubbleTooltip;
|
||
}(_base.BaseTooltip);
|
||
|
||
BubbleTooltip.TEMPLATE = ['<span class="ql-tooltip-arrow"></span>', '<div class="ql-tooltip-editor">', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-close"></a>', '</div>'].join('');
|
||
|
||
exports.BubbleTooltip = BubbleTooltip;
|
||
exports.default = BubbleTheme;
|
||
|
||
/***/ }),
|
||
/* 109 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__(63);
|
||
|
||
|
||
/***/ })
|
||
/******/ ])["default"];
|
||
});
|
||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1454).Buffer))
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1430:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
__webpack_require__(31);
|
||
|
||
__webpack_require__(1459);
|
||
//# sourceMappingURL=css.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1454:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* WEBPACK VAR INJECTION */(function(global) {/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||
* @license MIT
|
||
*/
|
||
/* eslint-disable no-proto */
|
||
|
||
|
||
|
||
var base64 = __webpack_require__(1534)
|
||
var ieee754 = __webpack_require__(1535)
|
||
var isArray = __webpack_require__(1528)
|
||
|
||
exports.Buffer = Buffer
|
||
exports.SlowBuffer = SlowBuffer
|
||
exports.INSPECT_MAX_BYTES = 50
|
||
|
||
/**
|
||
* If `Buffer.TYPED_ARRAY_SUPPORT`:
|
||
* === true Use Uint8Array implementation (fastest)
|
||
* === false Use Object implementation (most compatible, even IE6)
|
||
*
|
||
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
|
||
* Opera 11.6+, iOS 4.2+.
|
||
*
|
||
* Due to various browser bugs, sometimes the Object implementation will be used even
|
||
* when the browser supports typed arrays.
|
||
*
|
||
* Note:
|
||
*
|
||
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
|
||
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
|
||
*
|
||
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
|
||
*
|
||
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
|
||
* incorrect length in some situations.
|
||
|
||
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
|
||
* get the Object implementation, which is slower but behaves correctly.
|
||
*/
|
||
Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
|
||
? global.TYPED_ARRAY_SUPPORT
|
||
: typedArraySupport()
|
||
|
||
/*
|
||
* Export kMaxLength after typed array support is determined.
|
||
*/
|
||
exports.kMaxLength = kMaxLength()
|
||
|
||
function typedArraySupport () {
|
||
try {
|
||
var arr = new Uint8Array(1)
|
||
arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
|
||
return arr.foo() === 42 && // typed array instances can be augmented
|
||
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
|
||
arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
|
||
} catch (e) {
|
||
return false
|
||
}
|
||
}
|
||
|
||
function kMaxLength () {
|
||
return Buffer.TYPED_ARRAY_SUPPORT
|
||
? 0x7fffffff
|
||
: 0x3fffffff
|
||
}
|
||
|
||
function createBuffer (that, length) {
|
||
if (kMaxLength() < length) {
|
||
throw new RangeError('Invalid typed array length')
|
||
}
|
||
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
||
// Return an augmented `Uint8Array` instance, for best performance
|
||
that = new Uint8Array(length)
|
||
that.__proto__ = Buffer.prototype
|
||
} else {
|
||
// Fallback: Return an object instance of the Buffer class
|
||
if (that === null) {
|
||
that = new Buffer(length)
|
||
}
|
||
that.length = length
|
||
}
|
||
|
||
return that
|
||
}
|
||
|
||
/**
|
||
* The Buffer constructor returns instances of `Uint8Array` that have their
|
||
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
|
||
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
|
||
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
|
||
* returns a single octet.
|
||
*
|
||
* The `Uint8Array` prototype remains unmodified.
|
||
*/
|
||
|
||
function Buffer (arg, encodingOrOffset, length) {
|
||
if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
|
||
return new Buffer(arg, encodingOrOffset, length)
|
||
}
|
||
|
||
// Common case.
|
||
if (typeof arg === 'number') {
|
||
if (typeof encodingOrOffset === 'string') {
|
||
throw new Error(
|
||
'If encoding is specified then the first argument must be a string'
|
||
)
|
||
}
|
||
return allocUnsafe(this, arg)
|
||
}
|
||
return from(this, arg, encodingOrOffset, length)
|
||
}
|
||
|
||
Buffer.poolSize = 8192 // not used by this implementation
|
||
|
||
// TODO: Legacy, not needed anymore. Remove in next major version.
|
||
Buffer._augment = function (arr) {
|
||
arr.__proto__ = Buffer.prototype
|
||
return arr
|
||
}
|
||
|
||
function from (that, value, encodingOrOffset, length) {
|
||
if (typeof value === 'number') {
|
||
throw new TypeError('"value" argument must not be a number')
|
||
}
|
||
|
||
if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
|
||
return fromArrayBuffer(that, value, encodingOrOffset, length)
|
||
}
|
||
|
||
if (typeof value === 'string') {
|
||
return fromString(that, value, encodingOrOffset)
|
||
}
|
||
|
||
return fromObject(that, value)
|
||
}
|
||
|
||
/**
|
||
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
|
||
* if value is a number.
|
||
* Buffer.from(str[, encoding])
|
||
* Buffer.from(array)
|
||
* Buffer.from(buffer)
|
||
* Buffer.from(arrayBuffer[, byteOffset[, length]])
|
||
**/
|
||
Buffer.from = function (value, encodingOrOffset, length) {
|
||
return from(null, value, encodingOrOffset, length)
|
||
}
|
||
|
||
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
||
Buffer.prototype.__proto__ = Uint8Array.prototype
|
||
Buffer.__proto__ = Uint8Array
|
||
if (typeof Symbol !== 'undefined' && Symbol.species &&
|
||
Buffer[Symbol.species] === Buffer) {
|
||
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
|
||
Object.defineProperty(Buffer, Symbol.species, {
|
||
value: null,
|
||
configurable: true
|
||
})
|
||
}
|
||
}
|
||
|
||
function assertSize (size) {
|
||
if (typeof size !== 'number') {
|
||
throw new TypeError('"size" argument must be a number')
|
||
} else if (size < 0) {
|
||
throw new RangeError('"size" argument must not be negative')
|
||
}
|
||
}
|
||
|
||
function alloc (that, size, fill, encoding) {
|
||
assertSize(size)
|
||
if (size <= 0) {
|
||
return createBuffer(that, size)
|
||
}
|
||
if (fill !== undefined) {
|
||
// Only pay attention to encoding if it's a string. This
|
||
// prevents accidentally sending in a number that would
|
||
// be interpretted as a start offset.
|
||
return typeof encoding === 'string'
|
||
? createBuffer(that, size).fill(fill, encoding)
|
||
: createBuffer(that, size).fill(fill)
|
||
}
|
||
return createBuffer(that, size)
|
||
}
|
||
|
||
/**
|
||
* Creates a new filled Buffer instance.
|
||
* alloc(size[, fill[, encoding]])
|
||
**/
|
||
Buffer.alloc = function (size, fill, encoding) {
|
||
return alloc(null, size, fill, encoding)
|
||
}
|
||
|
||
function allocUnsafe (that, size) {
|
||
assertSize(size)
|
||
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
|
||
if (!Buffer.TYPED_ARRAY_SUPPORT) {
|
||
for (var i = 0; i < size; ++i) {
|
||
that[i] = 0
|
||
}
|
||
}
|
||
return that
|
||
}
|
||
|
||
/**
|
||
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
|
||
* */
|
||
Buffer.allocUnsafe = function (size) {
|
||
return allocUnsafe(null, size)
|
||
}
|
||
/**
|
||
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
|
||
*/
|
||
Buffer.allocUnsafeSlow = function (size) {
|
||
return allocUnsafe(null, size)
|
||
}
|
||
|
||
function fromString (that, string, encoding) {
|
||
if (typeof encoding !== 'string' || encoding === '') {
|
||
encoding = 'utf8'
|
||
}
|
||
|
||
if (!Buffer.isEncoding(encoding)) {
|
||
throw new TypeError('"encoding" must be a valid string encoding')
|
||
}
|
||
|
||
var length = byteLength(string, encoding) | 0
|
||
that = createBuffer(that, length)
|
||
|
||
var actual = that.write(string, encoding)
|
||
|
||
if (actual !== length) {
|
||
// Writing a hex string, for example, that contains invalid characters will
|
||
// cause everything after the first invalid character to be ignored. (e.g.
|
||
// 'abxxcd' will be treated as 'ab')
|
||
that = that.slice(0, actual)
|
||
}
|
||
|
||
return that
|
||
}
|
||
|
||
function fromArrayLike (that, array) {
|
||
var length = array.length < 0 ? 0 : checked(array.length) | 0
|
||
that = createBuffer(that, length)
|
||
for (var i = 0; i < length; i += 1) {
|
||
that[i] = array[i] & 255
|
||
}
|
||
return that
|
||
}
|
||
|
||
function fromArrayBuffer (that, array, byteOffset, length) {
|
||
array.byteLength // this throws if `array` is not a valid ArrayBuffer
|
||
|
||
if (byteOffset < 0 || array.byteLength < byteOffset) {
|
||
throw new RangeError('\'offset\' is out of bounds')
|
||
}
|
||
|
||
if (array.byteLength < byteOffset + (length || 0)) {
|
||
throw new RangeError('\'length\' is out of bounds')
|
||
}
|
||
|
||
if (byteOffset === undefined && length === undefined) {
|
||
array = new Uint8Array(array)
|
||
} else if (length === undefined) {
|
||
array = new Uint8Array(array, byteOffset)
|
||
} else {
|
||
array = new Uint8Array(array, byteOffset, length)
|
||
}
|
||
|
||
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
||
// Return an augmented `Uint8Array` instance, for best performance
|
||
that = array
|
||
that.__proto__ = Buffer.prototype
|
||
} else {
|
||
// Fallback: Return an object instance of the Buffer class
|
||
that = fromArrayLike(that, array)
|
||
}
|
||
return that
|
||
}
|
||
|
||
function fromObject (that, obj) {
|
||
if (Buffer.isBuffer(obj)) {
|
||
var len = checked(obj.length) | 0
|
||
that = createBuffer(that, len)
|
||
|
||
if (that.length === 0) {
|
||
return that
|
||
}
|
||
|
||
obj.copy(that, 0, 0, len)
|
||
return that
|
||
}
|
||
|
||
if (obj) {
|
||
if ((typeof ArrayBuffer !== 'undefined' &&
|
||
obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
|
||
if (typeof obj.length !== 'number' || isnan(obj.length)) {
|
||
return createBuffer(that, 0)
|
||
}
|
||
return fromArrayLike(that, obj)
|
||
}
|
||
|
||
if (obj.type === 'Buffer' && isArray(obj.data)) {
|
||
return fromArrayLike(that, obj.data)
|
||
}
|
||
}
|
||
|
||
throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
|
||
}
|
||
|
||
function checked (length) {
|
||
// Note: cannot use `length < kMaxLength()` here because that fails when
|
||
// length is NaN (which is otherwise coerced to zero.)
|
||
if (length >= kMaxLength()) {
|
||
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
|
||
'size: 0x' + kMaxLength().toString(16) + ' bytes')
|
||
}
|
||
return length | 0
|
||
}
|
||
|
||
function SlowBuffer (length) {
|
||
if (+length != length) { // eslint-disable-line eqeqeq
|
||
length = 0
|
||
}
|
||
return Buffer.alloc(+length)
|
||
}
|
||
|
||
Buffer.isBuffer = function isBuffer (b) {
|
||
return !!(b != null && b._isBuffer)
|
||
}
|
||
|
||
Buffer.compare = function compare (a, b) {
|
||
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
|
||
throw new TypeError('Arguments must be Buffers')
|
||
}
|
||
|
||
if (a === b) return 0
|
||
|
||
var x = a.length
|
||
var y = b.length
|
||
|
||
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
|
||
if (a[i] !== b[i]) {
|
||
x = a[i]
|
||
y = b[i]
|
||
break
|
||
}
|
||
}
|
||
|
||
if (x < y) return -1
|
||
if (y < x) return 1
|
||
return 0
|
||
}
|
||
|
||
Buffer.isEncoding = function isEncoding (encoding) {
|
||
switch (String(encoding).toLowerCase()) {
|
||
case 'hex':
|
||
case 'utf8':
|
||
case 'utf-8':
|
||
case 'ascii':
|
||
case 'latin1':
|
||
case 'binary':
|
||
case 'base64':
|
||
case 'ucs2':
|
||
case 'ucs-2':
|
||
case 'utf16le':
|
||
case 'utf-16le':
|
||
return true
|
||
default:
|
||
return false
|
||
}
|
||
}
|
||
|
||
Buffer.concat = function concat (list, length) {
|
||
if (!isArray(list)) {
|
||
throw new TypeError('"list" argument must be an Array of Buffers')
|
||
}
|
||
|
||
if (list.length === 0) {
|
||
return Buffer.alloc(0)
|
||
}
|
||
|
||
var i
|
||
if (length === undefined) {
|
||
length = 0
|
||
for (i = 0; i < list.length; ++i) {
|
||
length += list[i].length
|
||
}
|
||
}
|
||
|
||
var buffer = Buffer.allocUnsafe(length)
|
||
var pos = 0
|
||
for (i = 0; i < list.length; ++i) {
|
||
var buf = list[i]
|
||
if (!Buffer.isBuffer(buf)) {
|
||
throw new TypeError('"list" argument must be an Array of Buffers')
|
||
}
|
||
buf.copy(buffer, pos)
|
||
pos += buf.length
|
||
}
|
||
return buffer
|
||
}
|
||
|
||
function byteLength (string, encoding) {
|
||
if (Buffer.isBuffer(string)) {
|
||
return string.length
|
||
}
|
||
if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
|
||
(ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
|
||
return string.byteLength
|
||
}
|
||
if (typeof string !== 'string') {
|
||
string = '' + string
|
||
}
|
||
|
||
var len = string.length
|
||
if (len === 0) return 0
|
||
|
||
// Use a for loop to avoid recursion
|
||
var loweredCase = false
|
||
for (;;) {
|
||
switch (encoding) {
|
||
case 'ascii':
|
||
case 'latin1':
|
||
case 'binary':
|
||
return len
|
||
case 'utf8':
|
||
case 'utf-8':
|
||
case undefined:
|
||
return utf8ToBytes(string).length
|
||
case 'ucs2':
|
||
case 'ucs-2':
|
||
case 'utf16le':
|
||
case 'utf-16le':
|
||
return len * 2
|
||
case 'hex':
|
||
return len >>> 1
|
||
case 'base64':
|
||
return base64ToBytes(string).length
|
||
default:
|
||
if (loweredCase) return utf8ToBytes(string).length // assume utf8
|
||
encoding = ('' + encoding).toLowerCase()
|
||
loweredCase = true
|
||
}
|
||
}
|
||
}
|
||
Buffer.byteLength = byteLength
|
||
|
||
function slowToString (encoding, start, end) {
|
||
var loweredCase = false
|
||
|
||
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
|
||
// property of a typed array.
|
||
|
||
// This behaves neither like String nor Uint8Array in that we set start/end
|
||
// to their upper/lower bounds if the value passed is out of range.
|
||
// undefined is handled specially as per ECMA-262 6th Edition,
|
||
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
|
||
if (start === undefined || start < 0) {
|
||
start = 0
|
||
}
|
||
// Return early if start > this.length. Done here to prevent potential uint32
|
||
// coercion fail below.
|
||
if (start > this.length) {
|
||
return ''
|
||
}
|
||
|
||
if (end === undefined || end > this.length) {
|
||
end = this.length
|
||
}
|
||
|
||
if (end <= 0) {
|
||
return ''
|
||
}
|
||
|
||
// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
|
||
end >>>= 0
|
||
start >>>= 0
|
||
|
||
if (end <= start) {
|
||
return ''
|
||
}
|
||
|
||
if (!encoding) encoding = 'utf8'
|
||
|
||
while (true) {
|
||
switch (encoding) {
|
||
case 'hex':
|
||
return hexSlice(this, start, end)
|
||
|
||
case 'utf8':
|
||
case 'utf-8':
|
||
return utf8Slice(this, start, end)
|
||
|
||
case 'ascii':
|
||
return asciiSlice(this, start, end)
|
||
|
||
case 'latin1':
|
||
case 'binary':
|
||
return latin1Slice(this, start, end)
|
||
|
||
case 'base64':
|
||
return base64Slice(this, start, end)
|
||
|
||
case 'ucs2':
|
||
case 'ucs-2':
|
||
case 'utf16le':
|
||
case 'utf-16le':
|
||
return utf16leSlice(this, start, end)
|
||
|
||
default:
|
||
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
|
||
encoding = (encoding + '').toLowerCase()
|
||
loweredCase = true
|
||
}
|
||
}
|
||
}
|
||
|
||
// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
|
||
// Buffer instances.
|
||
Buffer.prototype._isBuffer = true
|
||
|
||
function swap (b, n, m) {
|
||
var i = b[n]
|
||
b[n] = b[m]
|
||
b[m] = i
|
||
}
|
||
|
||
Buffer.prototype.swap16 = function swap16 () {
|
||
var len = this.length
|
||
if (len % 2 !== 0) {
|
||
throw new RangeError('Buffer size must be a multiple of 16-bits')
|
||
}
|
||
for (var i = 0; i < len; i += 2) {
|
||
swap(this, i, i + 1)
|
||
}
|
||
return this
|
||
}
|
||
|
||
Buffer.prototype.swap32 = function swap32 () {
|
||
var len = this.length
|
||
if (len % 4 !== 0) {
|
||
throw new RangeError('Buffer size must be a multiple of 32-bits')
|
||
}
|
||
for (var i = 0; i < len; i += 4) {
|
||
swap(this, i, i + 3)
|
||
swap(this, i + 1, i + 2)
|
||
}
|
||
return this
|
||
}
|
||
|
||
Buffer.prototype.swap64 = function swap64 () {
|
||
var len = this.length
|
||
if (len % 8 !== 0) {
|
||
throw new RangeError('Buffer size must be a multiple of 64-bits')
|
||
}
|
||
for (var i = 0; i < len; i += 8) {
|
||
swap(this, i, i + 7)
|
||
swap(this, i + 1, i + 6)
|
||
swap(this, i + 2, i + 5)
|
||
swap(this, i + 3, i + 4)
|
||
}
|
||
return this
|
||
}
|
||
|
||
Buffer.prototype.toString = function toString () {
|
||
var length = this.length | 0
|
||
if (length === 0) return ''
|
||
if (arguments.length === 0) return utf8Slice(this, 0, length)
|
||
return slowToString.apply(this, arguments)
|
||
}
|
||
|
||
Buffer.prototype.equals = function equals (b) {
|
||
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
|
||
if (this === b) return true
|
||
return Buffer.compare(this, b) === 0
|
||
}
|
||
|
||
Buffer.prototype.inspect = function inspect () {
|
||
var str = ''
|
||
var max = exports.INSPECT_MAX_BYTES
|
||
if (this.length > 0) {
|
||
str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
|
||
if (this.length > max) str += ' ... '
|
||
}
|
||
return '<Buffer ' + str + '>'
|
||
}
|
||
|
||
Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
|
||
if (!Buffer.isBuffer(target)) {
|
||
throw new TypeError('Argument must be a Buffer')
|
||
}
|
||
|
||
if (start === undefined) {
|
||
start = 0
|
||
}
|
||
if (end === undefined) {
|
||
end = target ? target.length : 0
|
||
}
|
||
if (thisStart === undefined) {
|
||
thisStart = 0
|
||
}
|
||
if (thisEnd === undefined) {
|
||
thisEnd = this.length
|
||
}
|
||
|
||
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
|
||
throw new RangeError('out of range index')
|
||
}
|
||
|
||
if (thisStart >= thisEnd && start >= end) {
|
||
return 0
|
||
}
|
||
if (thisStart >= thisEnd) {
|
||
return -1
|
||
}
|
||
if (start >= end) {
|
||
return 1
|
||
}
|
||
|
||
start >>>= 0
|
||
end >>>= 0
|
||
thisStart >>>= 0
|
||
thisEnd >>>= 0
|
||
|
||
if (this === target) return 0
|
||
|
||
var x = thisEnd - thisStart
|
||
var y = end - start
|
||
var len = Math.min(x, y)
|
||
|
||
var thisCopy = this.slice(thisStart, thisEnd)
|
||
var targetCopy = target.slice(start, end)
|
||
|
||
for (var i = 0; i < len; ++i) {
|
||
if (thisCopy[i] !== targetCopy[i]) {
|
||
x = thisCopy[i]
|
||
y = targetCopy[i]
|
||
break
|
||
}
|
||
}
|
||
|
||
if (x < y) return -1
|
||
if (y < x) return 1
|
||
return 0
|
||
}
|
||
|
||
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
|
||
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
|
||
//
|
||
// Arguments:
|
||
// - buffer - a Buffer to search
|
||
// - val - a string, Buffer, or number
|
||
// - byteOffset - an index into `buffer`; will be clamped to an int32
|
||
// - encoding - an optional encoding, relevant is val is a string
|
||
// - dir - true for indexOf, false for lastIndexOf
|
||
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
|
||
// Empty buffer means no match
|
||
if (buffer.length === 0) return -1
|
||
|
||
// Normalize byteOffset
|
||
if (typeof byteOffset === 'string') {
|
||
encoding = byteOffset
|
||
byteOffset = 0
|
||
} else if (byteOffset > 0x7fffffff) {
|
||
byteOffset = 0x7fffffff
|
||
} else if (byteOffset < -0x80000000) {
|
||
byteOffset = -0x80000000
|
||
}
|
||
byteOffset = +byteOffset // Coerce to Number.
|
||
if (isNaN(byteOffset)) {
|
||
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
|
||
byteOffset = dir ? 0 : (buffer.length - 1)
|
||
}
|
||
|
||
// Normalize byteOffset: negative offsets start from the end of the buffer
|
||
if (byteOffset < 0) byteOffset = buffer.length + byteOffset
|
||
if (byteOffset >= buffer.length) {
|
||
if (dir) return -1
|
||
else byteOffset = buffer.length - 1
|
||
} else if (byteOffset < 0) {
|
||
if (dir) byteOffset = 0
|
||
else return -1
|
||
}
|
||
|
||
// Normalize val
|
||
if (typeof val === 'string') {
|
||
val = Buffer.from(val, encoding)
|
||
}
|
||
|
||
// Finally, search either indexOf (if dir is true) or lastIndexOf
|
||
if (Buffer.isBuffer(val)) {
|
||
// Special case: looking for empty string/buffer always fails
|
||
if (val.length === 0) {
|
||
return -1
|
||
}
|
||
return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
|
||
} else if (typeof val === 'number') {
|
||
val = val & 0xFF // Search for a byte value [0-255]
|
||
if (Buffer.TYPED_ARRAY_SUPPORT &&
|
||
typeof Uint8Array.prototype.indexOf === 'function') {
|
||
if (dir) {
|
||
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
|
||
} else {
|
||
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
|
||
}
|
||
}
|
||
return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
|
||
}
|
||
|
||
throw new TypeError('val must be string, number or Buffer')
|
||
}
|
||
|
||
function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
|
||
var indexSize = 1
|
||
var arrLength = arr.length
|
||
var valLength = val.length
|
||
|
||
if (encoding !== undefined) {
|
||
encoding = String(encoding).toLowerCase()
|
||
if (encoding === 'ucs2' || encoding === 'ucs-2' ||
|
||
encoding === 'utf16le' || encoding === 'utf-16le') {
|
||
if (arr.length < 2 || val.length < 2) {
|
||
return -1
|
||
}
|
||
indexSize = 2
|
||
arrLength /= 2
|
||
valLength /= 2
|
||
byteOffset /= 2
|
||
}
|
||
}
|
||
|
||
function read (buf, i) {
|
||
if (indexSize === 1) {
|
||
return buf[i]
|
||
} else {
|
||
return buf.readUInt16BE(i * indexSize)
|
||
}
|
||
}
|
||
|
||
var i
|
||
if (dir) {
|
||
var foundIndex = -1
|
||
for (i = byteOffset; i < arrLength; i++) {
|
||
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
|
||
if (foundIndex === -1) foundIndex = i
|
||
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
|
||
} else {
|
||
if (foundIndex !== -1) i -= i - foundIndex
|
||
foundIndex = -1
|
||
}
|
||
}
|
||
} else {
|
||
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
|
||
for (i = byteOffset; i >= 0; i--) {
|
||
var found = true
|
||
for (var j = 0; j < valLength; j++) {
|
||
if (read(arr, i + j) !== read(val, j)) {
|
||
found = false
|
||
break
|
||
}
|
||
}
|
||
if (found) return i
|
||
}
|
||
}
|
||
|
||
return -1
|
||
}
|
||
|
||
Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
|
||
return this.indexOf(val, byteOffset, encoding) !== -1
|
||
}
|
||
|
||
Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
|
||
return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
|
||
}
|
||
|
||
Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
|
||
return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
|
||
}
|
||
|
||
function hexWrite (buf, string, offset, length) {
|
||
offset = Number(offset) || 0
|
||
var remaining = buf.length - offset
|
||
if (!length) {
|
||
length = remaining
|
||
} else {
|
||
length = Number(length)
|
||
if (length > remaining) {
|
||
length = remaining
|
||
}
|
||
}
|
||
|
||
// must be an even number of digits
|
||
var strLen = string.length
|
||
if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
|
||
|
||
if (length > strLen / 2) {
|
||
length = strLen / 2
|
||
}
|
||
for (var i = 0; i < length; ++i) {
|
||
var parsed = parseInt(string.substr(i * 2, 2), 16)
|
||
if (isNaN(parsed)) return i
|
||
buf[offset + i] = parsed
|
||
}
|
||
return i
|
||
}
|
||
|
||
function utf8Write (buf, string, offset, length) {
|
||
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
|
||
}
|
||
|
||
function asciiWrite (buf, string, offset, length) {
|
||
return blitBuffer(asciiToBytes(string), buf, offset, length)
|
||
}
|
||
|
||
function latin1Write (buf, string, offset, length) {
|
||
return asciiWrite(buf, string, offset, length)
|
||
}
|
||
|
||
function base64Write (buf, string, offset, length) {
|
||
return blitBuffer(base64ToBytes(string), buf, offset, length)
|
||
}
|
||
|
||
function ucs2Write (buf, string, offset, length) {
|
||
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
|
||
}
|
||
|
||
Buffer.prototype.write = function write (string, offset, length, encoding) {
|
||
// Buffer#write(string)
|
||
if (offset === undefined) {
|
||
encoding = 'utf8'
|
||
length = this.length
|
||
offset = 0
|
||
// Buffer#write(string, encoding)
|
||
} else if (length === undefined && typeof offset === 'string') {
|
||
encoding = offset
|
||
length = this.length
|
||
offset = 0
|
||
// Buffer#write(string, offset[, length][, encoding])
|
||
} else if (isFinite(offset)) {
|
||
offset = offset | 0
|
||
if (isFinite(length)) {
|
||
length = length | 0
|
||
if (encoding === undefined) encoding = 'utf8'
|
||
} else {
|
||
encoding = length
|
||
length = undefined
|
||
}
|
||
// legacy write(string, encoding, offset, length) - remove in v0.13
|
||
} else {
|
||
throw new Error(
|
||
'Buffer.write(string, encoding, offset[, length]) is no longer supported'
|
||
)
|
||
}
|
||
|
||
var remaining = this.length - offset
|
||
if (length === undefined || length > remaining) length = remaining
|
||
|
||
if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
|
||
throw new RangeError('Attempt to write outside buffer bounds')
|
||
}
|
||
|
||
if (!encoding) encoding = 'utf8'
|
||
|
||
var loweredCase = false
|
||
for (;;) {
|
||
switch (encoding) {
|
||
case 'hex':
|
||
return hexWrite(this, string, offset, length)
|
||
|
||
case 'utf8':
|
||
case 'utf-8':
|
||
return utf8Write(this, string, offset, length)
|
||
|
||
case 'ascii':
|
||
return asciiWrite(this, string, offset, length)
|
||
|
||
case 'latin1':
|
||
case 'binary':
|
||
return latin1Write(this, string, offset, length)
|
||
|
||
case 'base64':
|
||
// Warning: maxLength not taken into account in base64Write
|
||
return base64Write(this, string, offset, length)
|
||
|
||
case 'ucs2':
|
||
case 'ucs-2':
|
||
case 'utf16le':
|
||
case 'utf-16le':
|
||
return ucs2Write(this, string, offset, length)
|
||
|
||
default:
|
||
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
|
||
encoding = ('' + encoding).toLowerCase()
|
||
loweredCase = true
|
||
}
|
||
}
|
||
}
|
||
|
||
Buffer.prototype.toJSON = function toJSON () {
|
||
return {
|
||
type: 'Buffer',
|
||
data: Array.prototype.slice.call(this._arr || this, 0)
|
||
}
|
||
}
|
||
|
||
function base64Slice (buf, start, end) {
|
||
if (start === 0 && end === buf.length) {
|
||
return base64.fromByteArray(buf)
|
||
} else {
|
||
return base64.fromByteArray(buf.slice(start, end))
|
||
}
|
||
}
|
||
|
||
function utf8Slice (buf, start, end) {
|
||
end = Math.min(buf.length, end)
|
||
var res = []
|
||
|
||
var i = start
|
||
while (i < end) {
|
||
var firstByte = buf[i]
|
||
var codePoint = null
|
||
var bytesPerSequence = (firstByte > 0xEF) ? 4
|
||
: (firstByte > 0xDF) ? 3
|
||
: (firstByte > 0xBF) ? 2
|
||
: 1
|
||
|
||
if (i + bytesPerSequence <= end) {
|
||
var secondByte, thirdByte, fourthByte, tempCodePoint
|
||
|
||
switch (bytesPerSequence) {
|
||
case 1:
|
||
if (firstByte < 0x80) {
|
||
codePoint = firstByte
|
||
}
|
||
break
|
||
case 2:
|
||
secondByte = buf[i + 1]
|
||
if ((secondByte & 0xC0) === 0x80) {
|
||
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
|
||
if (tempCodePoint > 0x7F) {
|
||
codePoint = tempCodePoint
|
||
}
|
||
}
|
||
break
|
||
case 3:
|
||
secondByte = buf[i + 1]
|
||
thirdByte = buf[i + 2]
|
||
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
|
||
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
|
||
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
|
||
codePoint = tempCodePoint
|
||
}
|
||
}
|
||
break
|
||
case 4:
|
||
secondByte = buf[i + 1]
|
||
thirdByte = buf[i + 2]
|
||
fourthByte = buf[i + 3]
|
||
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
|
||
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
|
||
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
|
||
codePoint = tempCodePoint
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
if (codePoint === null) {
|
||
// we did not generate a valid codePoint so insert a
|
||
// replacement char (U+FFFD) and advance only 1 byte
|
||
codePoint = 0xFFFD
|
||
bytesPerSequence = 1
|
||
} else if (codePoint > 0xFFFF) {
|
||
// encode to utf16 (surrogate pair dance)
|
||
codePoint -= 0x10000
|
||
res.push(codePoint >>> 10 & 0x3FF | 0xD800)
|
||
codePoint = 0xDC00 | codePoint & 0x3FF
|
||
}
|
||
|
||
res.push(codePoint)
|
||
i += bytesPerSequence
|
||
}
|
||
|
||
return decodeCodePointsArray(res)
|
||
}
|
||
|
||
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
|
||
// the lowest limit is Chrome, with 0x10000 args.
|
||
// We go 1 magnitude less, for safety
|
||
var MAX_ARGUMENTS_LENGTH = 0x1000
|
||
|
||
function decodeCodePointsArray (codePoints) {
|
||
var len = codePoints.length
|
||
if (len <= MAX_ARGUMENTS_LENGTH) {
|
||
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
|
||
}
|
||
|
||
// Decode in chunks to avoid "call stack size exceeded".
|
||
var res = ''
|
||
var i = 0
|
||
while (i < len) {
|
||
res += String.fromCharCode.apply(
|
||
String,
|
||
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
|
||
)
|
||
}
|
||
return res
|
||
}
|
||
|
||
function asciiSlice (buf, start, end) {
|
||
var ret = ''
|
||
end = Math.min(buf.length, end)
|
||
|
||
for (var i = start; i < end; ++i) {
|
||
ret += String.fromCharCode(buf[i] & 0x7F)
|
||
}
|
||
return ret
|
||
}
|
||
|
||
function latin1Slice (buf, start, end) {
|
||
var ret = ''
|
||
end = Math.min(buf.length, end)
|
||
|
||
for (var i = start; i < end; ++i) {
|
||
ret += String.fromCharCode(buf[i])
|
||
}
|
||
return ret
|
||
}
|
||
|
||
function hexSlice (buf, start, end) {
|
||
var len = buf.length
|
||
|
||
if (!start || start < 0) start = 0
|
||
if (!end || end < 0 || end > len) end = len
|
||
|
||
var out = ''
|
||
for (var i = start; i < end; ++i) {
|
||
out += toHex(buf[i])
|
||
}
|
||
return out
|
||
}
|
||
|
||
function utf16leSlice (buf, start, end) {
|
||
var bytes = buf.slice(start, end)
|
||
var res = ''
|
||
for (var i = 0; i < bytes.length; i += 2) {
|
||
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
|
||
}
|
||
return res
|
||
}
|
||
|
||
Buffer.prototype.slice = function slice (start, end) {
|
||
var len = this.length
|
||
start = ~~start
|
||
end = end === undefined ? len : ~~end
|
||
|
||
if (start < 0) {
|
||
start += len
|
||
if (start < 0) start = 0
|
||
} else if (start > len) {
|
||
start = len
|
||
}
|
||
|
||
if (end < 0) {
|
||
end += len
|
||
if (end < 0) end = 0
|
||
} else if (end > len) {
|
||
end = len
|
||
}
|
||
|
||
if (end < start) end = start
|
||
|
||
var newBuf
|
||
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
||
newBuf = this.subarray(start, end)
|
||
newBuf.__proto__ = Buffer.prototype
|
||
} else {
|
||
var sliceLen = end - start
|
||
newBuf = new Buffer(sliceLen, undefined)
|
||
for (var i = 0; i < sliceLen; ++i) {
|
||
newBuf[i] = this[i + start]
|
||
}
|
||
}
|
||
|
||
return newBuf
|
||
}
|
||
|
||
/*
|
||
* Need to make sure that buffer isn't trying to write out of bounds.
|
||
*/
|
||
function checkOffset (offset, ext, length) {
|
||
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
|
||
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
|
||
}
|
||
|
||
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
|
||
offset = offset | 0
|
||
byteLength = byteLength | 0
|
||
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
||
|
||
var val = this[offset]
|
||
var mul = 1
|
||
var i = 0
|
||
while (++i < byteLength && (mul *= 0x100)) {
|
||
val += this[offset + i] * mul
|
||
}
|
||
|
||
return val
|
||
}
|
||
|
||
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
|
||
offset = offset | 0
|
||
byteLength = byteLength | 0
|
||
if (!noAssert) {
|
||
checkOffset(offset, byteLength, this.length)
|
||
}
|
||
|
||
var val = this[offset + --byteLength]
|
||
var mul = 1
|
||
while (byteLength > 0 && (mul *= 0x100)) {
|
||
val += this[offset + --byteLength] * mul
|
||
}
|
||
|
||
return val
|
||
}
|
||
|
||
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
|
||
if (!noAssert) checkOffset(offset, 1, this.length)
|
||
return this[offset]
|
||
}
|
||
|
||
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
|
||
if (!noAssert) checkOffset(offset, 2, this.length)
|
||
return this[offset] | (this[offset + 1] << 8)
|
||
}
|
||
|
||
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
|
||
if (!noAssert) checkOffset(offset, 2, this.length)
|
||
return (this[offset] << 8) | this[offset + 1]
|
||
}
|
||
|
||
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
|
||
if (!noAssert) checkOffset(offset, 4, this.length)
|
||
|
||
return ((this[offset]) |
|
||
(this[offset + 1] << 8) |
|
||
(this[offset + 2] << 16)) +
|
||
(this[offset + 3] * 0x1000000)
|
||
}
|
||
|
||
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
|
||
if (!noAssert) checkOffset(offset, 4, this.length)
|
||
|
||
return (this[offset] * 0x1000000) +
|
||
((this[offset + 1] << 16) |
|
||
(this[offset + 2] << 8) |
|
||
this[offset + 3])
|
||
}
|
||
|
||
Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
|
||
offset = offset | 0
|
||
byteLength = byteLength | 0
|
||
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
||
|
||
var val = this[offset]
|
||
var mul = 1
|
||
var i = 0
|
||
while (++i < byteLength && (mul *= 0x100)) {
|
||
val += this[offset + i] * mul
|
||
}
|
||
mul *= 0x80
|
||
|
||
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
|
||
|
||
return val
|
||
}
|
||
|
||
Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
|
||
offset = offset | 0
|
||
byteLength = byteLength | 0
|
||
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
||
|
||
var i = byteLength
|
||
var mul = 1
|
||
var val = this[offset + --i]
|
||
while (i > 0 && (mul *= 0x100)) {
|
||
val += this[offset + --i] * mul
|
||
}
|
||
mul *= 0x80
|
||
|
||
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
|
||
|
||
return val
|
||
}
|
||
|
||
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
|
||
if (!noAssert) checkOffset(offset, 1, this.length)
|
||
if (!(this[offset] & 0x80)) return (this[offset])
|
||
return ((0xff - this[offset] + 1) * -1)
|
||
}
|
||
|
||
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
|
||
if (!noAssert) checkOffset(offset, 2, this.length)
|
||
var val = this[offset] | (this[offset + 1] << 8)
|
||
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
||
}
|
||
|
||
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
|
||
if (!noAssert) checkOffset(offset, 2, this.length)
|
||
var val = this[offset + 1] | (this[offset] << 8)
|
||
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
||
}
|
||
|
||
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
|
||
if (!noAssert) checkOffset(offset, 4, this.length)
|
||
|
||
return (this[offset]) |
|
||
(this[offset + 1] << 8) |
|
||
(this[offset + 2] << 16) |
|
||
(this[offset + 3] << 24)
|
||
}
|
||
|
||
Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
|
||
if (!noAssert) checkOffset(offset, 4, this.length)
|
||
|
||
return (this[offset] << 24) |
|
||
(this[offset + 1] << 16) |
|
||
(this[offset + 2] << 8) |
|
||
(this[offset + 3])
|
||
}
|
||
|
||
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
|
||
if (!noAssert) checkOffset(offset, 4, this.length)
|
||
return ieee754.read(this, offset, true, 23, 4)
|
||
}
|
||
|
||
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
|
||
if (!noAssert) checkOffset(offset, 4, this.length)
|
||
return ieee754.read(this, offset, false, 23, 4)
|
||
}
|
||
|
||
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
|
||
if (!noAssert) checkOffset(offset, 8, this.length)
|
||
return ieee754.read(this, offset, true, 52, 8)
|
||
}
|
||
|
||
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
|
||
if (!noAssert) checkOffset(offset, 8, this.length)
|
||
return ieee754.read(this, offset, false, 52, 8)
|
||
}
|
||
|
||
function checkInt (buf, value, offset, ext, max, min) {
|
||
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
|
||
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
|
||
if (offset + ext > buf.length) throw new RangeError('Index out of range')
|
||
}
|
||
|
||
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
|
||
value = +value
|
||
offset = offset | 0
|
||
byteLength = byteLength | 0
|
||
if (!noAssert) {
|
||
var maxBytes = Math.pow(2, 8 * byteLength) - 1
|
||
checkInt(this, value, offset, byteLength, maxBytes, 0)
|
||
}
|
||
|
||
var mul = 1
|
||
var i = 0
|
||
this[offset] = value & 0xFF
|
||
while (++i < byteLength && (mul *= 0x100)) {
|
||
this[offset + i] = (value / mul) & 0xFF
|
||
}
|
||
|
||
return offset + byteLength
|
||
}
|
||
|
||
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
|
||
value = +value
|
||
offset = offset | 0
|
||
byteLength = byteLength | 0
|
||
if (!noAssert) {
|
||
var maxBytes = Math.pow(2, 8 * byteLength) - 1
|
||
checkInt(this, value, offset, byteLength, maxBytes, 0)
|
||
}
|
||
|
||
var i = byteLength - 1
|
||
var mul = 1
|
||
this[offset + i] = value & 0xFF
|
||
while (--i >= 0 && (mul *= 0x100)) {
|
||
this[offset + i] = (value / mul) & 0xFF
|
||
}
|
||
|
||
return offset + byteLength
|
||
}
|
||
|
||
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
|
||
value = +value
|
||
offset = offset | 0
|
||
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
|
||
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
|
||
this[offset] = (value & 0xff)
|
||
return offset + 1
|
||
}
|
||
|
||
function objectWriteUInt16 (buf, value, offset, littleEndian) {
|
||
if (value < 0) value = 0xffff + value + 1
|
||
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
|
||
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
|
||
(littleEndian ? i : 1 - i) * 8
|
||
}
|
||
}
|
||
|
||
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
|
||
value = +value
|
||
offset = offset | 0
|
||
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
|
||
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
||
this[offset] = (value & 0xff)
|
||
this[offset + 1] = (value >>> 8)
|
||
} else {
|
||
objectWriteUInt16(this, value, offset, true)
|
||
}
|
||
return offset + 2
|
||
}
|
||
|
||
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
|
||
value = +value
|
||
offset = offset | 0
|
||
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
|
||
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
||
this[offset] = (value >>> 8)
|
||
this[offset + 1] = (value & 0xff)
|
||
} else {
|
||
objectWriteUInt16(this, value, offset, false)
|
||
}
|
||
return offset + 2
|
||
}
|
||
|
||
function objectWriteUInt32 (buf, value, offset, littleEndian) {
|
||
if (value < 0) value = 0xffffffff + value + 1
|
||
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
|
||
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
|
||
}
|
||
}
|
||
|
||
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
|
||
value = +value
|
||
offset = offset | 0
|
||
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
|
||
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
||
this[offset + 3] = (value >>> 24)
|
||
this[offset + 2] = (value >>> 16)
|
||
this[offset + 1] = (value >>> 8)
|
||
this[offset] = (value & 0xff)
|
||
} else {
|
||
objectWriteUInt32(this, value, offset, true)
|
||
}
|
||
return offset + 4
|
||
}
|
||
|
||
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
|
||
value = +value
|
||
offset = offset | 0
|
||
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
|
||
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
||
this[offset] = (value >>> 24)
|
||
this[offset + 1] = (value >>> 16)
|
||
this[offset + 2] = (value >>> 8)
|
||
this[offset + 3] = (value & 0xff)
|
||
} else {
|
||
objectWriteUInt32(this, value, offset, false)
|
||
}
|
||
return offset + 4
|
||
}
|
||
|
||
Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
|
||
value = +value
|
||
offset = offset | 0
|
||
if (!noAssert) {
|
||
var limit = Math.pow(2, 8 * byteLength - 1)
|
||
|
||
checkInt(this, value, offset, byteLength, limit - 1, -limit)
|
||
}
|
||
|
||
var i = 0
|
||
var mul = 1
|
||
var sub = 0
|
||
this[offset] = value & 0xFF
|
||
while (++i < byteLength && (mul *= 0x100)) {
|
||
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
|
||
sub = 1
|
||
}
|
||
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
|
||
}
|
||
|
||
return offset + byteLength
|
||
}
|
||
|
||
Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
|
||
value = +value
|
||
offset = offset | 0
|
||
if (!noAssert) {
|
||
var limit = Math.pow(2, 8 * byteLength - 1)
|
||
|
||
checkInt(this, value, offset, byteLength, limit - 1, -limit)
|
||
}
|
||
|
||
var i = byteLength - 1
|
||
var mul = 1
|
||
var sub = 0
|
||
this[offset + i] = value & 0xFF
|
||
while (--i >= 0 && (mul *= 0x100)) {
|
||
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
|
||
sub = 1
|
||
}
|
||
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
|
||
}
|
||
|
||
return offset + byteLength
|
||
}
|
||
|
||
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
|
||
value = +value
|
||
offset = offset | 0
|
||
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
|
||
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
|
||
if (value < 0) value = 0xff + value + 1
|
||
this[offset] = (value & 0xff)
|
||
return offset + 1
|
||
}
|
||
|
||
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
|
||
value = +value
|
||
offset = offset | 0
|
||
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
||
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
||
this[offset] = (value & 0xff)
|
||
this[offset + 1] = (value >>> 8)
|
||
} else {
|
||
objectWriteUInt16(this, value, offset, true)
|
||
}
|
||
return offset + 2
|
||
}
|
||
|
||
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
|
||
value = +value
|
||
offset = offset | 0
|
||
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
||
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
||
this[offset] = (value >>> 8)
|
||
this[offset + 1] = (value & 0xff)
|
||
} else {
|
||
objectWriteUInt16(this, value, offset, false)
|
||
}
|
||
return offset + 2
|
||
}
|
||
|
||
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
|
||
value = +value
|
||
offset = offset | 0
|
||
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
||
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
||
this[offset] = (value & 0xff)
|
||
this[offset + 1] = (value >>> 8)
|
||
this[offset + 2] = (value >>> 16)
|
||
this[offset + 3] = (value >>> 24)
|
||
} else {
|
||
objectWriteUInt32(this, value, offset, true)
|
||
}
|
||
return offset + 4
|
||
}
|
||
|
||
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
|
||
value = +value
|
||
offset = offset | 0
|
||
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
||
if (value < 0) value = 0xffffffff + value + 1
|
||
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
||
this[offset] = (value >>> 24)
|
||
this[offset + 1] = (value >>> 16)
|
||
this[offset + 2] = (value >>> 8)
|
||
this[offset + 3] = (value & 0xff)
|
||
} else {
|
||
objectWriteUInt32(this, value, offset, false)
|
||
}
|
||
return offset + 4
|
||
}
|
||
|
||
function checkIEEE754 (buf, value, offset, ext, max, min) {
|
||
if (offset + ext > buf.length) throw new RangeError('Index out of range')
|
||
if (offset < 0) throw new RangeError('Index out of range')
|
||
}
|
||
|
||
function writeFloat (buf, value, offset, littleEndian, noAssert) {
|
||
if (!noAssert) {
|
||
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
|
||
}
|
||
ieee754.write(buf, value, offset, littleEndian, 23, 4)
|
||
return offset + 4
|
||
}
|
||
|
||
Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
|
||
return writeFloat(this, value, offset, true, noAssert)
|
||
}
|
||
|
||
Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
|
||
return writeFloat(this, value, offset, false, noAssert)
|
||
}
|
||
|
||
function writeDouble (buf, value, offset, littleEndian, noAssert) {
|
||
if (!noAssert) {
|
||
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
|
||
}
|
||
ieee754.write(buf, value, offset, littleEndian, 52, 8)
|
||
return offset + 8
|
||
}
|
||
|
||
Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
|
||
return writeDouble(this, value, offset, true, noAssert)
|
||
}
|
||
|
||
Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
|
||
return writeDouble(this, value, offset, false, noAssert)
|
||
}
|
||
|
||
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
|
||
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
|
||
if (!start) start = 0
|
||
if (!end && end !== 0) end = this.length
|
||
if (targetStart >= target.length) targetStart = target.length
|
||
if (!targetStart) targetStart = 0
|
||
if (end > 0 && end < start) end = start
|
||
|
||
// Copy 0 bytes; we're done
|
||
if (end === start) return 0
|
||
if (target.length === 0 || this.length === 0) return 0
|
||
|
||
// Fatal error conditions
|
||
if (targetStart < 0) {
|
||
throw new RangeError('targetStart out of bounds')
|
||
}
|
||
if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
|
||
if (end < 0) throw new RangeError('sourceEnd out of bounds')
|
||
|
||
// Are we oob?
|
||
if (end > this.length) end = this.length
|
||
if (target.length - targetStart < end - start) {
|
||
end = target.length - targetStart + start
|
||
}
|
||
|
||
var len = end - start
|
||
var i
|
||
|
||
if (this === target && start < targetStart && targetStart < end) {
|
||
// descending copy from end
|
||
for (i = len - 1; i >= 0; --i) {
|
||
target[i + targetStart] = this[i + start]
|
||
}
|
||
} else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
|
||
// ascending copy from start
|
||
for (i = 0; i < len; ++i) {
|
||
target[i + targetStart] = this[i + start]
|
||
}
|
||
} else {
|
||
Uint8Array.prototype.set.call(
|
||
target,
|
||
this.subarray(start, start + len),
|
||
targetStart
|
||
)
|
||
}
|
||
|
||
return len
|
||
}
|
||
|
||
// Usage:
|
||
// buffer.fill(number[, offset[, end]])
|
||
// buffer.fill(buffer[, offset[, end]])
|
||
// buffer.fill(string[, offset[, end]][, encoding])
|
||
Buffer.prototype.fill = function fill (val, start, end, encoding) {
|
||
// Handle string cases:
|
||
if (typeof val === 'string') {
|
||
if (typeof start === 'string') {
|
||
encoding = start
|
||
start = 0
|
||
end = this.length
|
||
} else if (typeof end === 'string') {
|
||
encoding = end
|
||
end = this.length
|
||
}
|
||
if (val.length === 1) {
|
||
var code = val.charCodeAt(0)
|
||
if (code < 256) {
|
||
val = code
|
||
}
|
||
}
|
||
if (encoding !== undefined && typeof encoding !== 'string') {
|
||
throw new TypeError('encoding must be a string')
|
||
}
|
||
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
|
||
throw new TypeError('Unknown encoding: ' + encoding)
|
||
}
|
||
} else if (typeof val === 'number') {
|
||
val = val & 255
|
||
}
|
||
|
||
// Invalid ranges are not set to a default, so can range check early.
|
||
if (start < 0 || this.length < start || this.length < end) {
|
||
throw new RangeError('Out of range index')
|
||
}
|
||
|
||
if (end <= start) {
|
||
return this
|
||
}
|
||
|
||
start = start >>> 0
|
||
end = end === undefined ? this.length : end >>> 0
|
||
|
||
if (!val) val = 0
|
||
|
||
var i
|
||
if (typeof val === 'number') {
|
||
for (i = start; i < end; ++i) {
|
||
this[i] = val
|
||
}
|
||
} else {
|
||
var bytes = Buffer.isBuffer(val)
|
||
? val
|
||
: utf8ToBytes(new Buffer(val, encoding).toString())
|
||
var len = bytes.length
|
||
for (i = 0; i < end - start; ++i) {
|
||
this[i + start] = bytes[i % len]
|
||
}
|
||
}
|
||
|
||
return this
|
||
}
|
||
|
||
// HELPER FUNCTIONS
|
||
// ================
|
||
|
||
var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
|
||
|
||
function base64clean (str) {
|
||
// Node strips out invalid characters like \n and \t from the string, base64-js does not
|
||
str = stringtrim(str).replace(INVALID_BASE64_RE, '')
|
||
// Node converts strings with length < 2 to ''
|
||
if (str.length < 2) return ''
|
||
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
|
||
while (str.length % 4 !== 0) {
|
||
str = str + '='
|
||
}
|
||
return str
|
||
}
|
||
|
||
function stringtrim (str) {
|
||
if (str.trim) return str.trim()
|
||
return str.replace(/^\s+|\s+$/g, '')
|
||
}
|
||
|
||
function toHex (n) {
|
||
if (n < 16) return '0' + n.toString(16)
|
||
return n.toString(16)
|
||
}
|
||
|
||
function utf8ToBytes (string, units) {
|
||
units = units || Infinity
|
||
var codePoint
|
||
var length = string.length
|
||
var leadSurrogate = null
|
||
var bytes = []
|
||
|
||
for (var i = 0; i < length; ++i) {
|
||
codePoint = string.charCodeAt(i)
|
||
|
||
// is surrogate component
|
||
if (codePoint > 0xD7FF && codePoint < 0xE000) {
|
||
// last char was a lead
|
||
if (!leadSurrogate) {
|
||
// no lead yet
|
||
if (codePoint > 0xDBFF) {
|
||
// unexpected trail
|
||
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
||
continue
|
||
} else if (i + 1 === length) {
|
||
// unpaired lead
|
||
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
||
continue
|
||
}
|
||
|
||
// valid lead
|
||
leadSurrogate = codePoint
|
||
|
||
continue
|
||
}
|
||
|
||
// 2 leads in a row
|
||
if (codePoint < 0xDC00) {
|
||
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
||
leadSurrogate = codePoint
|
||
continue
|
||
}
|
||
|
||
// valid surrogate pair
|
||
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
|
||
} else if (leadSurrogate) {
|
||
// valid bmp char, but last char was a lead
|
||
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
||
}
|
||
|
||
leadSurrogate = null
|
||
|
||
// encode utf8
|
||
if (codePoint < 0x80) {
|
||
if ((units -= 1) < 0) break
|
||
bytes.push(codePoint)
|
||
} else if (codePoint < 0x800) {
|
||
if ((units -= 2) < 0) break
|
||
bytes.push(
|
||
codePoint >> 0x6 | 0xC0,
|
||
codePoint & 0x3F | 0x80
|
||
)
|
||
} else if (codePoint < 0x10000) {
|
||
if ((units -= 3) < 0) break
|
||
bytes.push(
|
||
codePoint >> 0xC | 0xE0,
|
||
codePoint >> 0x6 & 0x3F | 0x80,
|
||
codePoint & 0x3F | 0x80
|
||
)
|
||
} else if (codePoint < 0x110000) {
|
||
if ((units -= 4) < 0) break
|
||
bytes.push(
|
||
codePoint >> 0x12 | 0xF0,
|
||
codePoint >> 0xC & 0x3F | 0x80,
|
||
codePoint >> 0x6 & 0x3F | 0x80,
|
||
codePoint & 0x3F | 0x80
|
||
)
|
||
} else {
|
||
throw new Error('Invalid code point')
|
||
}
|
||
}
|
||
|
||
return bytes
|
||
}
|
||
|
||
function asciiToBytes (str) {
|
||
var byteArray = []
|
||
for (var i = 0; i < str.length; ++i) {
|
||
// Node's code seems to be doing this and not & 0x7F..
|
||
byteArray.push(str.charCodeAt(i) & 0xFF)
|
||
}
|
||
return byteArray
|
||
}
|
||
|
||
function utf16leToBytes (str, units) {
|
||
var c, hi, lo
|
||
var byteArray = []
|
||
for (var i = 0; i < str.length; ++i) {
|
||
if ((units -= 2) < 0) break
|
||
|
||
c = str.charCodeAt(i)
|
||
hi = c >> 8
|
||
lo = c % 256
|
||
byteArray.push(lo)
|
||
byteArray.push(hi)
|
||
}
|
||
|
||
return byteArray
|
||
}
|
||
|
||
function base64ToBytes (str) {
|
||
return base64.toByteArray(base64clean(str))
|
||
}
|
||
|
||
function blitBuffer (src, dst, offset, length) {
|
||
for (var i = 0; i < length; ++i) {
|
||
if ((i + offset >= dst.length) || (i >= src.length)) break
|
||
dst[i + offset] = src[i]
|
||
}
|
||
return i
|
||
}
|
||
|
||
function isnan (val) {
|
||
return val !== val // eslint-disable-line no-self-compare
|
||
}
|
||
|
||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(35)))
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1459:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||
|
||
// load the styles
|
||
var content = __webpack_require__(1460);
|
||
if(typeof content === 'string') content = [[module.i, content, '']];
|
||
// Prepare cssTransformation
|
||
var transform;
|
||
|
||
var options = {"hmr":false}
|
||
options.transform = transform
|
||
// add the styles to the DOM
|
||
var update = __webpack_require__(317)(content, options);
|
||
if(content.locals) module.exports = content.locals;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1460:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
exports = module.exports = __webpack_require__(316)(true);
|
||
// imports
|
||
|
||
|
||
// module
|
||
exports.push([module.i, ".ant-popover{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";position:absolute;top:0;left:0;z-index:1030;font-weight:400;white-space:normal;text-align:left;cursor:auto;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.ant-popover:after{position:absolute;background:hsla(0,0%,100%,.01);content:\"\"}.ant-popover-hidden{display:none}.ant-popover-placement-top,.ant-popover-placement-topLeft,.ant-popover-placement-topRight{padding-bottom:10px}.ant-popover-placement-right,.ant-popover-placement-rightBottom,.ant-popover-placement-rightTop{padding-left:10px}.ant-popover-placement-bottom,.ant-popover-placement-bottomLeft,.ant-popover-placement-bottomRight{padding-top:10px}.ant-popover-placement-left,.ant-popover-placement-leftBottom,.ant-popover-placement-leftTop{padding-right:10px}.ant-popover-inner{background-color:#fff;background-clip:padding-box;border-radius:4px;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15);-webkit-box-shadow:0 0 8px rgba(0,0,0,.15)\\9;box-shadow:0 0 8px rgba(0,0,0,.15)\\9}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.ant-popover-inner{-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15)}}.ant-popover-title{min-width:177px;min-height:32px;margin:0;padding:5px 16px 4px;color:rgba(0,0,0,.85);font-weight:500;border-bottom:1px solid #e8e8e8}.ant-popover-inner-content{padding:12px 16px;color:rgba(0,0,0,.65)}.ant-popover-message{position:relative;padding:4px 0 12px;color:rgba(0,0,0,.65);font-size:14px}.ant-popover-message>.anticon{position:absolute;top:8px;color:#faad14;font-size:14px}.ant-popover-message-title{padding-left:22px}.ant-popover-buttons{margin-bottom:4px;text-align:right}.ant-popover-buttons button{margin-left:8px}.ant-popover-arrow{position:absolute;display:block;width:8.48528137px;height:8.48528137px;background:transparent;border-style:solid;border-width:4.24264069px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.ant-popover-placement-top>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-topLeft>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-topRight>.ant-popover-content>.ant-popover-arrow{bottom:6.2px;border-top-color:transparent;border-right-color:#fff;border-bottom-color:#fff;border-left-color:transparent;-webkit-box-shadow:3px 3px 7px rgba(0,0,0,.07);box-shadow:3px 3px 7px rgba(0,0,0,.07)}.ant-popover-placement-top>.ant-popover-content>.ant-popover-arrow{left:50%;-webkit-transform:translateX(-50%) rotate(45deg);-ms-transform:translateX(-50%) rotate(45deg);transform:translateX(-50%) rotate(45deg)}.ant-popover-placement-topLeft>.ant-popover-content>.ant-popover-arrow{left:16px}.ant-popover-placement-topRight>.ant-popover-content>.ant-popover-arrow{right:16px}.ant-popover-placement-right>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-rightBottom>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-rightTop>.ant-popover-content>.ant-popover-arrow{left:6px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:#fff;border-left-color:#fff;-webkit-box-shadow:-3px 3px 7px rgba(0,0,0,.07);box-shadow:-3px 3px 7px rgba(0,0,0,.07)}.ant-popover-placement-right>.ant-popover-content>.ant-popover-arrow{top:50%;-webkit-transform:translateY(-50%) rotate(45deg);-ms-transform:translateY(-50%) rotate(45deg);transform:translateY(-50%) rotate(45deg)}.ant-popover-placement-rightTop>.ant-popover-content>.ant-popover-arrow{top:12px}.ant-popover-placement-rightBottom>.ant-popover-content>.ant-popover-arrow{bottom:12px}.ant-popover-placement-bottom>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-bottomLeft>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-bottomRight>.ant-popover-content>.ant-popover-arrow{top:6px;border-top-color:#fff;border-right-color:transparent;border-bottom-color:transparent;border-left-color:#fff;-webkit-box-shadow:-2px -2px 5px rgba(0,0,0,.06);box-shadow:-2px -2px 5px rgba(0,0,0,.06)}.ant-popover-placement-bottom>.ant-popover-content>.ant-popover-arrow{left:50%;-webkit-transform:translateX(-50%) rotate(45deg);-ms-transform:translateX(-50%) rotate(45deg);transform:translateX(-50%) rotate(45deg)}.ant-popover-placement-bottomLeft>.ant-popover-content>.ant-popover-arrow{left:16px}.ant-popover-placement-bottomRight>.ant-popover-content>.ant-popover-arrow{right:16px}.ant-popover-placement-left>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-leftBottom>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-leftTop>.ant-popover-content>.ant-popover-arrow{right:6px;border-top-color:#fff;border-right-color:#fff;border-bottom-color:transparent;border-left-color:transparent;-webkit-box-shadow:3px -3px 7px rgba(0,0,0,.07);box-shadow:3px -3px 7px rgba(0,0,0,.07)}.ant-popover-placement-left>.ant-popover-content>.ant-popover-arrow{top:50%;-webkit-transform:translateY(-50%) rotate(45deg);-ms-transform:translateY(-50%) rotate(45deg);transform:translateY(-50%) rotate(45deg)}.ant-popover-placement-leftTop>.ant-popover-content>.ant-popover-arrow{top:12px}.ant-popover-placement-leftBottom>.ant-popover-content>.ant-popover-arrow{bottom:12px}", "", {"version":3,"sources":["/Users/hs/forgeplus-react/node_modules/antd/lib/popover/style/index.css"],"names":[],"mappings":"AAIA,aACE,8BAA+B,AACvB,sBAAuB,AAC/B,SAAU,AACV,UAAW,AACX,sBAA2B,AAC3B,eAAgB,AAChB,0BAA2B,AAC3B,gBAAiB,AACjB,gBAAiB,AACjB,qCAAsC,AAC9B,6BAA8B,AACtC,kBAAmB,AACnB,MAAO,AACP,OAAQ,AACR,aAAc,AACd,gBAAoB,AACpB,mBAAoB,AACpB,gBAAiB,AACjB,YAAa,AACb,yBAA0B,AACvB,sBAAuB,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AACD,mBACE,kBAAmB,AACnB,+BAAsC,AACtC,UAAY,CACb,AACD,oBACE,YAAc,CACf,AACD,0FAGE,mBAAqB,CACtB,AACD,gGAGE,iBAAmB,CACpB,AACD,mGAGE,gBAAkB,CACnB,AACD,6FAGE,kBAAoB,CACrB,AACD,mBACE,sBAAuB,AACvB,4BAA6B,AAC7B,kBAAmB,AACnB,6CAAkD,AAC1C,qCAA0C,AAClD,6CAAmD,AAC3C,oCAA2C,CACpD,AACD,sEAIE,mBACE,6CAAkD,AAC1C,oCAA0C,CACnD,CACF,AACD,mBACE,gBAAiB,AACjB,gBAAiB,AACjB,SAAU,AACV,qBAAsB,AACtB,sBAA2B,AAC3B,gBAAiB,AACjB,+BAAiC,CAClC,AACD,2BACE,kBAAmB,AACnB,qBAA2B,CAC5B,AACD,qBACE,kBAAmB,AACnB,mBAAoB,AACpB,sBAA2B,AAC3B,cAAgB,CACjB,AACD,8BACE,kBAAmB,AACnB,QAAS,AACT,cAAe,AACf,cAAgB,CACjB,AACD,2BACE,iBAAmB,CACpB,AACD,qBACE,kBAAmB,AACnB,gBAAkB,CACnB,AACD,4BACE,eAAiB,CAClB,AACD,mBACE,kBAAmB,AACnB,cAAe,AACf,mBAAoB,AACpB,oBAAqB,AACrB,uBAAwB,AACxB,mBAAoB,AACpB,0BAA2B,AAC3B,gCAAiC,AAC7B,4BAA6B,AACzB,uBAAyB,CAClC,AACD,kNAGE,aAAc,AACd,6BAA8B,AAC9B,wBAAyB,AACzB,yBAA0B,AAC1B,8BAA+B,AAC/B,+CAAoD,AAC5C,sCAA4C,CACrD,AACD,mEACE,SAAU,AACV,iDAAkD,AAC9C,6CAA8C,AAC1C,wCAA0C,CACnD,AACD,uEACE,SAAW,CACZ,AACD,wEACE,UAAY,CACb,AACD,wNAGE,SAAU,AACV,6BAA8B,AAC9B,+BAAgC,AAChC,yBAA0B,AAC1B,uBAAwB,AACxB,gDAAqD,AAC7C,uCAA6C,CACtD,AACD,qEACE,QAAS,AACT,iDAAkD,AAC9C,6CAA8C,AAC1C,wCAA0C,CACnD,AACD,wEACE,QAAU,CACX,AACD,2EACE,WAAa,CACd,AACD,2NAGE,QAAS,AACT,sBAAuB,AACvB,+BAAgC,AAChC,gCAAiC,AACjC,uBAAwB,AACxB,iDAAsD,AAC9C,wCAA8C,CACvD,AACD,sEACE,SAAU,AACV,iDAAkD,AAC9C,6CAA8C,AAC1C,wCAA0C,CACnD,AACD,0EACE,SAAW,CACZ,AACD,2EACE,UAAY,CACb,AACD,qNAGE,UAAW,AACX,sBAAuB,AACvB,wBAAyB,AACzB,gCAAiC,AACjC,8BAA+B,AAC/B,gDAAqD,AAC7C,uCAA6C,CACtD,AACD,oEACE,QAAS,AACT,iDAAkD,AAC9C,6CAA8C,AAC1C,wCAA0C,CACnD,AACD,uEACE,QAAU,CACX,AACD,0EACE,WAAa,CACd","file":"index.css","sourcesContent":["/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.ant-popover {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.65);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5;\n list-style: none;\n -webkit-font-feature-settings: 'tnum';\n font-feature-settings: 'tnum';\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1030;\n font-weight: normal;\n white-space: normal;\n text-align: left;\n cursor: auto;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}\n.ant-popover::after {\n position: absolute;\n background: rgba(255, 255, 255, 0.01);\n content: '';\n}\n.ant-popover-hidden {\n display: none;\n}\n.ant-popover-placement-top,\n.ant-popover-placement-topLeft,\n.ant-popover-placement-topRight {\n padding-bottom: 10px;\n}\n.ant-popover-placement-right,\n.ant-popover-placement-rightTop,\n.ant-popover-placement-rightBottom {\n padding-left: 10px;\n}\n.ant-popover-placement-bottom,\n.ant-popover-placement-bottomLeft,\n.ant-popover-placement-bottomRight {\n padding-top: 10px;\n}\n.ant-popover-placement-left,\n.ant-popover-placement-leftTop,\n.ant-popover-placement-leftBottom {\n padding-right: 10px;\n}\n.ant-popover-inner {\n background-color: #fff;\n background-clip: padding-box;\n border-radius: 4px;\n -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15) \\9;\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.15) \\9;\n}\n@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {\n .ant-popover {\n /* IE10+ */\n }\n .ant-popover-inner {\n -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n }\n}\n.ant-popover-title {\n min-width: 177px;\n min-height: 32px;\n margin: 0;\n padding: 5px 16px 4px;\n color: rgba(0, 0, 0, 0.85);\n font-weight: 500;\n border-bottom: 1px solid #e8e8e8;\n}\n.ant-popover-inner-content {\n padding: 12px 16px;\n color: rgba(0, 0, 0, 0.65);\n}\n.ant-popover-message {\n position: relative;\n padding: 4px 0 12px;\n color: rgba(0, 0, 0, 0.65);\n font-size: 14px;\n}\n.ant-popover-message > .anticon {\n position: absolute;\n top: 8px;\n color: #faad14;\n font-size: 14px;\n}\n.ant-popover-message-title {\n padding-left: 22px;\n}\n.ant-popover-buttons {\n margin-bottom: 4px;\n text-align: right;\n}\n.ant-popover-buttons button {\n margin-left: 8px;\n}\n.ant-popover-arrow {\n position: absolute;\n display: block;\n width: 8.48528137px;\n height: 8.48528137px;\n background: transparent;\n border-style: solid;\n border-width: 4.24264069px;\n -webkit-transform: rotate(45deg);\n -ms-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n.ant-popover-placement-top > .ant-popover-content > .ant-popover-arrow,\n.ant-popover-placement-topLeft > .ant-popover-content > .ant-popover-arrow,\n.ant-popover-placement-topRight > .ant-popover-content > .ant-popover-arrow {\n bottom: 6.2px;\n border-top-color: transparent;\n border-right-color: #fff;\n border-bottom-color: #fff;\n border-left-color: transparent;\n -webkit-box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);\n box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);\n}\n.ant-popover-placement-top > .ant-popover-content > .ant-popover-arrow {\n left: 50%;\n -webkit-transform: translateX(-50%) rotate(45deg);\n -ms-transform: translateX(-50%) rotate(45deg);\n transform: translateX(-50%) rotate(45deg);\n}\n.ant-popover-placement-topLeft > .ant-popover-content > .ant-popover-arrow {\n left: 16px;\n}\n.ant-popover-placement-topRight > .ant-popover-content > .ant-popover-arrow {\n right: 16px;\n}\n.ant-popover-placement-right > .ant-popover-content > .ant-popover-arrow,\n.ant-popover-placement-rightTop > .ant-popover-content > .ant-popover-arrow,\n.ant-popover-placement-rightBottom > .ant-popover-content > .ant-popover-arrow {\n left: 6px;\n border-top-color: transparent;\n border-right-color: transparent;\n border-bottom-color: #fff;\n border-left-color: #fff;\n -webkit-box-shadow: -3px 3px 7px rgba(0, 0, 0, 0.07);\n box-shadow: -3px 3px 7px rgba(0, 0, 0, 0.07);\n}\n.ant-popover-placement-right > .ant-popover-content > .ant-popover-arrow {\n top: 50%;\n -webkit-transform: translateY(-50%) rotate(45deg);\n -ms-transform: translateY(-50%) rotate(45deg);\n transform: translateY(-50%) rotate(45deg);\n}\n.ant-popover-placement-rightTop > .ant-popover-content > .ant-popover-arrow {\n top: 12px;\n}\n.ant-popover-placement-rightBottom > .ant-popover-content > .ant-popover-arrow {\n bottom: 12px;\n}\n.ant-popover-placement-bottom > .ant-popover-content > .ant-popover-arrow,\n.ant-popover-placement-bottomLeft > .ant-popover-content > .ant-popover-arrow,\n.ant-popover-placement-bottomRight > .ant-popover-content > .ant-popover-arrow {\n top: 6px;\n border-top-color: #fff;\n border-right-color: transparent;\n border-bottom-color: transparent;\n border-left-color: #fff;\n -webkit-box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.06);\n box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.06);\n}\n.ant-popover-placement-bottom > .ant-popover-content > .ant-popover-arrow {\n left: 50%;\n -webkit-transform: translateX(-50%) rotate(45deg);\n -ms-transform: translateX(-50%) rotate(45deg);\n transform: translateX(-50%) rotate(45deg);\n}\n.ant-popover-placement-bottomLeft > .ant-popover-content > .ant-popover-arrow {\n left: 16px;\n}\n.ant-popover-placement-bottomRight > .ant-popover-content > .ant-popover-arrow {\n right: 16px;\n}\n.ant-popover-placement-left > .ant-popover-content > .ant-popover-arrow,\n.ant-popover-placement-leftTop > .ant-popover-content > .ant-popover-arrow,\n.ant-popover-placement-leftBottom > .ant-popover-content > .ant-popover-arrow {\n right: 6px;\n border-top-color: #fff;\n border-right-color: #fff;\n border-bottom-color: transparent;\n border-left-color: transparent;\n -webkit-box-shadow: 3px -3px 7px rgba(0, 0, 0, 0.07);\n box-shadow: 3px -3px 7px rgba(0, 0, 0, 0.07);\n}\n.ant-popover-placement-left > .ant-popover-content > .ant-popover-arrow {\n top: 50%;\n -webkit-transform: translateY(-50%) rotate(45deg);\n -ms-transform: translateY(-50%) rotate(45deg);\n transform: translateY(-50%) rotate(45deg);\n}\n.ant-popover-placement-leftTop > .ant-popover-content > .ant-popover-arrow {\n top: 12px;\n}\n.ant-popover-placement-leftBottom > .ant-popover-content > .ant-popover-arrow {\n bottom: 12px;\n}\n"],"sourceRoot":""}]);
|
||
|
||
// exports
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1476:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var React = _interopRequireWildcard(__webpack_require__(0));
|
||
|
||
var _reactLifecyclesCompat = __webpack_require__(7);
|
||
|
||
var _tooltip = _interopRequireDefault(__webpack_require__(173));
|
||
|
||
var _icon = _interopRequireDefault(__webpack_require__(27));
|
||
|
||
var _button = _interopRequireDefault(__webpack_require__(74));
|
||
|
||
var _LocaleReceiver = _interopRequireDefault(__webpack_require__(72));
|
||
|
||
var _default2 = _interopRequireDefault(__webpack_require__(185));
|
||
|
||
var _configProvider = __webpack_require__(14);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||
|
||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
||
var t = {};
|
||
|
||
for (var p in s) {
|
||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||
}
|
||
|
||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||
}
|
||
return t;
|
||
};
|
||
|
||
var Popconfirm =
|
||
/*#__PURE__*/
|
||
function (_React$Component) {
|
||
_inherits(Popconfirm, _React$Component);
|
||
|
||
function Popconfirm(props) {
|
||
var _this;
|
||
|
||
_classCallCheck(this, Popconfirm);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Popconfirm).call(this, props));
|
||
|
||
_this.onConfirm = function (e) {
|
||
_this.setVisible(false, e);
|
||
|
||
var onConfirm = _this.props.onConfirm;
|
||
|
||
if (onConfirm) {
|
||
onConfirm.call(_assertThisInitialized(_this), e);
|
||
}
|
||
};
|
||
|
||
_this.onCancel = function (e) {
|
||
_this.setVisible(false, e);
|
||
|
||
var onCancel = _this.props.onCancel;
|
||
|
||
if (onCancel) {
|
||
onCancel.call(_assertThisInitialized(_this), e);
|
||
}
|
||
};
|
||
|
||
_this.onVisibleChange = function (visible) {
|
||
var disabled = _this.props.disabled;
|
||
|
||
if (disabled) {
|
||
return;
|
||
}
|
||
|
||
_this.setVisible(visible);
|
||
};
|
||
|
||
_this.saveTooltip = function (node) {
|
||
_this.tooltip = node;
|
||
};
|
||
|
||
_this.renderOverlay = function (prefixCls, popconfirmLocale) {
|
||
var _this$props = _this.props,
|
||
okButtonProps = _this$props.okButtonProps,
|
||
cancelButtonProps = _this$props.cancelButtonProps,
|
||
title = _this$props.title,
|
||
cancelText = _this$props.cancelText,
|
||
okText = _this$props.okText,
|
||
okType = _this$props.okType,
|
||
icon = _this$props.icon;
|
||
return React.createElement("div", null, React.createElement("div", {
|
||
className: "".concat(prefixCls, "-inner-content")
|
||
}, React.createElement("div", {
|
||
className: "".concat(prefixCls, "-message")
|
||
}, icon, React.createElement("div", {
|
||
className: "".concat(prefixCls, "-message-title")
|
||
}, title)), React.createElement("div", {
|
||
className: "".concat(prefixCls, "-buttons")
|
||
}, React.createElement(_button["default"], _extends({
|
||
onClick: _this.onCancel,
|
||
size: "small"
|
||
}, cancelButtonProps), cancelText || popconfirmLocale.cancelText), React.createElement(_button["default"], _extends({
|
||
onClick: _this.onConfirm,
|
||
type: okType,
|
||
size: "small"
|
||
}, okButtonProps), okText || popconfirmLocale.okText))));
|
||
};
|
||
|
||
_this.renderConfirm = function (_ref) {
|
||
var getPrefixCls = _ref.getPrefixCls;
|
||
|
||
var _a = _this.props,
|
||
customizePrefixCls = _a.prefixCls,
|
||
placement = _a.placement,
|
||
restProps = __rest(_a, ["prefixCls", "placement"]);
|
||
|
||
var prefixCls = getPrefixCls('popover', customizePrefixCls);
|
||
var overlay = React.createElement(_LocaleReceiver["default"], {
|
||
componentName: "Popconfirm",
|
||
defaultLocale: _default2["default"].Popconfirm
|
||
}, function (popconfirmLocale) {
|
||
return _this.renderOverlay(prefixCls, popconfirmLocale);
|
||
});
|
||
return React.createElement(_tooltip["default"], _extends({}, restProps, {
|
||
prefixCls: prefixCls,
|
||
placement: placement,
|
||
onVisibleChange: _this.onVisibleChange,
|
||
visible: _this.state.visible,
|
||
overlay: overlay,
|
||
ref: _this.saveTooltip
|
||
}));
|
||
};
|
||
|
||
_this.state = {
|
||
visible: props.visible
|
||
};
|
||
return _this;
|
||
}
|
||
|
||
_createClass(Popconfirm, [{
|
||
key: "getPopupDomNode",
|
||
value: function getPopupDomNode() {
|
||
return this.tooltip.getPopupDomNode();
|
||
}
|
||
}, {
|
||
key: "setVisible",
|
||
value: function setVisible(visible, e) {
|
||
var props = this.props;
|
||
|
||
if (!('visible' in props)) {
|
||
this.setState({
|
||
visible: visible
|
||
});
|
||
}
|
||
|
||
var onVisibleChange = props.onVisibleChange;
|
||
|
||
if (onVisibleChange) {
|
||
onVisibleChange(visible, e);
|
||
}
|
||
}
|
||
}, {
|
||
key: "render",
|
||
value: function render() {
|
||
return React.createElement(_configProvider.ConfigConsumer, null, this.renderConfirm);
|
||
}
|
||
}], [{
|
||
key: "getDerivedStateFromProps",
|
||
value: function getDerivedStateFromProps(nextProps) {
|
||
if ('visible' in nextProps) {
|
||
return {
|
||
visible: nextProps.visible
|
||
};
|
||
}
|
||
|
||
if ('defaultVisible' in nextProps) {
|
||
return {
|
||
visible: nextProps.defaultVisible
|
||
};
|
||
}
|
||
|
||
return null;
|
||
}
|
||
}]);
|
||
|
||
return Popconfirm;
|
||
}(React.Component);
|
||
|
||
Popconfirm.defaultProps = {
|
||
transitionName: 'zoom-big',
|
||
placement: 'top',
|
||
trigger: 'click',
|
||
okType: 'primary',
|
||
icon: React.createElement(_icon["default"], {
|
||
type: "exclamation-circle",
|
||
theme: "filled"
|
||
}),
|
||
disabled: false
|
||
};
|
||
(0, _reactLifecyclesCompat.polyfill)(Popconfirm);
|
||
var _default = Popconfirm;
|
||
exports["default"] = _default;
|
||
//# sourceMappingURL=index.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1477:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
__webpack_require__(31);
|
||
|
||
__webpack_require__(1430);
|
||
|
||
__webpack_require__(88);
|
||
//# sourceMappingURL=css.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1526:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||
|
||
// load the styles
|
||
var content = __webpack_require__(1542);
|
||
if(typeof content === 'string') content = [[module.i, content, '']];
|
||
// Prepare cssTransformation
|
||
var transform;
|
||
|
||
var options = {"hmr":false}
|
||
options.transform = transform
|
||
// add the styles to the DOM
|
||
var update = __webpack_require__(317)(content, options);
|
||
if(content.locals) module.exports = content.locals;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1528:
|
||
/***/ (function(module, exports) {
|
||
|
||
var toString = {}.toString;
|
||
|
||
module.exports = Array.isArray || function (arr) {
|
||
return toString.call(arr) == '[object Array]';
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1534:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
exports.byteLength = byteLength
|
||
exports.toByteArray = toByteArray
|
||
exports.fromByteArray = fromByteArray
|
||
|
||
var lookup = []
|
||
var revLookup = []
|
||
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
|
||
|
||
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
|
||
for (var i = 0, len = code.length; i < len; ++i) {
|
||
lookup[i] = code[i]
|
||
revLookup[code.charCodeAt(i)] = i
|
||
}
|
||
|
||
// Support decoding URL-safe base64 strings, as Node.js does.
|
||
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
|
||
revLookup['-'.charCodeAt(0)] = 62
|
||
revLookup['_'.charCodeAt(0)] = 63
|
||
|
||
function getLens (b64) {
|
||
var len = b64.length
|
||
|
||
if (len % 4 > 0) {
|
||
throw new Error('Invalid string. Length must be a multiple of 4')
|
||
}
|
||
|
||
// Trim off extra bytes after placeholder bytes are found
|
||
// See: https://github.com/beatgammit/base64-js/issues/42
|
||
var validLen = b64.indexOf('=')
|
||
if (validLen === -1) validLen = len
|
||
|
||
var placeHoldersLen = validLen === len
|
||
? 0
|
||
: 4 - (validLen % 4)
|
||
|
||
return [validLen, placeHoldersLen]
|
||
}
|
||
|
||
// base64 is 4/3 + up to two characters of the original data
|
||
function byteLength (b64) {
|
||
var lens = getLens(b64)
|
||
var validLen = lens[0]
|
||
var placeHoldersLen = lens[1]
|
||
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
|
||
}
|
||
|
||
function _byteLength (b64, validLen, placeHoldersLen) {
|
||
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
|
||
}
|
||
|
||
function toByteArray (b64) {
|
||
var tmp
|
||
var lens = getLens(b64)
|
||
var validLen = lens[0]
|
||
var placeHoldersLen = lens[1]
|
||
|
||
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
|
||
|
||
var curByte = 0
|
||
|
||
// if there are placeholders, only get up to the last complete 4 chars
|
||
var len = placeHoldersLen > 0
|
||
? validLen - 4
|
||
: validLen
|
||
|
||
for (var i = 0; i < len; i += 4) {
|
||
tmp =
|
||
(revLookup[b64.charCodeAt(i)] << 18) |
|
||
(revLookup[b64.charCodeAt(i + 1)] << 12) |
|
||
(revLookup[b64.charCodeAt(i + 2)] << 6) |
|
||
revLookup[b64.charCodeAt(i + 3)]
|
||
arr[curByte++] = (tmp >> 16) & 0xFF
|
||
arr[curByte++] = (tmp >> 8) & 0xFF
|
||
arr[curByte++] = tmp & 0xFF
|
||
}
|
||
|
||
if (placeHoldersLen === 2) {
|
||
tmp =
|
||
(revLookup[b64.charCodeAt(i)] << 2) |
|
||
(revLookup[b64.charCodeAt(i + 1)] >> 4)
|
||
arr[curByte++] = tmp & 0xFF
|
||
}
|
||
|
||
if (placeHoldersLen === 1) {
|
||
tmp =
|
||
(revLookup[b64.charCodeAt(i)] << 10) |
|
||
(revLookup[b64.charCodeAt(i + 1)] << 4) |
|
||
(revLookup[b64.charCodeAt(i + 2)] >> 2)
|
||
arr[curByte++] = (tmp >> 8) & 0xFF
|
||
arr[curByte++] = tmp & 0xFF
|
||
}
|
||
|
||
return arr
|
||
}
|
||
|
||
function tripletToBase64 (num) {
|
||
return lookup[num >> 18 & 0x3F] +
|
||
lookup[num >> 12 & 0x3F] +
|
||
lookup[num >> 6 & 0x3F] +
|
||
lookup[num & 0x3F]
|
||
}
|
||
|
||
function encodeChunk (uint8, start, end) {
|
||
var tmp
|
||
var output = []
|
||
for (var i = start; i < end; i += 3) {
|
||
tmp =
|
||
((uint8[i] << 16) & 0xFF0000) +
|
||
((uint8[i + 1] << 8) & 0xFF00) +
|
||
(uint8[i + 2] & 0xFF)
|
||
output.push(tripletToBase64(tmp))
|
||
}
|
||
return output.join('')
|
||
}
|
||
|
||
function fromByteArray (uint8) {
|
||
var tmp
|
||
var len = uint8.length
|
||
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
|
||
var parts = []
|
||
var maxChunkLength = 16383 // must be multiple of 3
|
||
|
||
// go through the array every three bytes, we'll deal with trailing stuff later
|
||
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
|
||
parts.push(encodeChunk(
|
||
uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
|
||
))
|
||
}
|
||
|
||
// pad the end with zeros, but make sure to not forget the extra bytes
|
||
if (extraBytes === 1) {
|
||
tmp = uint8[len - 1]
|
||
parts.push(
|
||
lookup[tmp >> 2] +
|
||
lookup[(tmp << 4) & 0x3F] +
|
||
'=='
|
||
)
|
||
} else if (extraBytes === 2) {
|
||
tmp = (uint8[len - 2] << 8) + uint8[len - 1]
|
||
parts.push(
|
||
lookup[tmp >> 10] +
|
||
lookup[(tmp >> 4) & 0x3F] +
|
||
lookup[(tmp << 2) & 0x3F] +
|
||
'='
|
||
)
|
||
}
|
||
|
||
return parts.join('')
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1535:
|
||
/***/ (function(module, exports) {
|
||
|
||
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
|
||
var e, m
|
||
var eLen = (nBytes * 8) - mLen - 1
|
||
var eMax = (1 << eLen) - 1
|
||
var eBias = eMax >> 1
|
||
var nBits = -7
|
||
var i = isLE ? (nBytes - 1) : 0
|
||
var d = isLE ? -1 : 1
|
||
var s = buffer[offset + i]
|
||
|
||
i += d
|
||
|
||
e = s & ((1 << (-nBits)) - 1)
|
||
s >>= (-nBits)
|
||
nBits += eLen
|
||
for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
|
||
|
||
m = e & ((1 << (-nBits)) - 1)
|
||
e >>= (-nBits)
|
||
nBits += mLen
|
||
for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
|
||
|
||
if (e === 0) {
|
||
e = 1 - eBias
|
||
} else if (e === eMax) {
|
||
return m ? NaN : ((s ? -1 : 1) * Infinity)
|
||
} else {
|
||
m = m + Math.pow(2, mLen)
|
||
e = e - eBias
|
||
}
|
||
return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
|
||
}
|
||
|
||
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
||
var e, m, c
|
||
var eLen = (nBytes * 8) - mLen - 1
|
||
var eMax = (1 << eLen) - 1
|
||
var eBias = eMax >> 1
|
||
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
|
||
var i = isLE ? 0 : (nBytes - 1)
|
||
var d = isLE ? 1 : -1
|
||
var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
|
||
|
||
value = Math.abs(value)
|
||
|
||
if (isNaN(value) || value === Infinity) {
|
||
m = isNaN(value) ? 1 : 0
|
||
e = eMax
|
||
} else {
|
||
e = Math.floor(Math.log(value) / Math.LN2)
|
||
if (value * (c = Math.pow(2, -e)) < 1) {
|
||
e--
|
||
c *= 2
|
||
}
|
||
if (e + eBias >= 1) {
|
||
value += rt / c
|
||
} else {
|
||
value += rt * Math.pow(2, 1 - eBias)
|
||
}
|
||
if (value * c >= 2) {
|
||
e++
|
||
c /= 2
|
||
}
|
||
|
||
if (e + eBias >= eMax) {
|
||
m = 0
|
||
e = eMax
|
||
} else if (e + eBias >= 1) {
|
||
m = ((value * c) - 1) * Math.pow(2, mLen)
|
||
e = e + eBias
|
||
} else {
|
||
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
|
||
e = 0
|
||
}
|
||
}
|
||
|
||
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
|
||
|
||
e = (e << mLen) | m
|
||
eLen += mLen
|
||
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
|
||
|
||
buffer[offset + i - d] |= s * 128
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1542:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
exports = module.exports = __webpack_require__(316)(true);
|
||
// imports
|
||
|
||
|
||
// module
|
||
exports.push([module.i, ".topWrapper{padding:20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid #eee;-ms-flex-wrap:wrap;flex-wrap:wrap}.quillContent{position:relative;margin-bottom:4px}.quillFlag{position:absolute;bottom:0;left:6px;height:20px;line-height:18px;color:red}.topmilepost{display:-ms-flexbox;display:flex}.miledetail,.topmilepost{padding:20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}.miledetail{border-bottom:1px solid #eee}.detail_p,.topWrapper_nav{display:-ms-flexbox;display:flex}.detail_right{-ms-flex-positive:1;flex-grow:1;text-align:right}.commit_p{font-size:12px;padding-top:10px;padding-left:5px}.ul_width{width:100%}.a_btn{border-radius:4px;padding:0 12px;margin-right:15px;line-height:30px}.cancel_btn{border:1px solid #e6e6e6;color:#333!important}.delete_btn{border:1px solid red;color:red!important}.cancel_btn:hover{background:#e6e6e6}.Closeor_btn{border:1px solid red;color:red;height:32px;text-align:center;border-radius:4px;padding:0 12px;margin-right:15px;line-height:32px}.rectangle{width:8px;height:8px;border-radius:100%;margin-top:15px;margin-left:-4px;margin-bottom:10px;background:green}.order_line{display:-ms-flexbox;display:flex;height:32px;margin:auto;border-left:1px solid #eee}.comment_img{height:25px;width:25px;margin-top:5px;border-radius:100%}.topWrapper_nav a,.topWrapper_nav span{border:1px solid #f4f4f4;border-radius:5px 0 0 5px;height:34px;line-height:34px;text-align:center;padding:0 10px;display:block;cursor:pointer}.topWrapper_nav a:hover{background:#f4f4f4}.topWrapper_nav a:last-child,.topWrapper_nav span:last-child{border-left:none;border-radius:0 5px 5px 0}.topWrapper_btn{background:#21ba45;color:#fff!important;padding:0 12px;text-align:center;height:32px;line-height:32px;border-radius:4px}.topWrapper_type{border:1px solid #f4f4f4;border-radius:6px;display:-ms-flexbox;display:flex}.topWrapper_type li{height:30px;line-height:30px;border-left:1px solid #f4f4f4;padding:0 8px;cursor:pointer;color:#666}.topWrapper_type li.active{color:#4cacff}.topWrapper_type li:first-child{border-left:none}.topWrapper_select{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center}.topWrapper .ant-btn.ant-input-search-button{height:30px}.title_overflow{max-width:220px;display:-ms-inline-flexbox;display:inline-flex}.title_overflow,.topWrapper_select li{overflow:hidden;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis}.topWrapper_select li{cursor:pointer;color:#666;width:90px;text-align:center;display:inline-block}.topWrapper_select li:active{background:#f4f4f4;border-radius:4px}.ant-dropdown-menu .ant-dropdown-menu-item{text-align:center;padding:6px 30px;cursor:pointer}.issueItem{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-line-pack:center;align-content:center;border-bottom:1px dashed #cecdcd;padding:16px 0}.issueItem:first-child{border-top:1px dashed #cecdcd}.issueNo{padding:0 5px;border-radius:4px;background:#f4f4f4;display:block;margin-right:8px;color:#666;height:30px;line-height:30px}.issueOpen{background:#21ba45!important;color:#fff!important}.margin_detail{margin-left:15px;margin-right:15px}.user_img{height:49px;width:49px;border-radius:100%}.new_context{-ms-flex:1 1;flex:1 1;border:1px solid #f4f4f4;border-radius:4px;margin-left:15px;padding:15px;position:relative;background:#fff}.new_context:before{border:solid transparent;border-right-color:#f4f4f4;border-width:9px;top:12px}.new_context:after,.new_context:before{position:absolute;content:\"\";height:0;width:0;right:100%}.new_context:after{border:solid transparent;border-right-color:#fff;border-width:7px;top:14px}.list-l-panel{border:1px solid #f4f4f4;border-radius:4px;padding:10px 15px}.list-l-panel .ant-row{margin-bottom:0}.editingsheet{background:#fff;color:#21ba45!important;padding:0 12px;text-align:center;height:32px;line-height:32px}.opendetail{background:#21ba45}.closedetail,.opendetail{display:inline-block;color:#fff!important;padding:0 12px;text-align:center;height:32px;border-radius:4px;line-height:32px}.closedetail{background:#e60b0b}.commenttitle{color:#21ba45!important}.topWrapper_detali{display:-ms-flexbox;display:flex;background-color:#eee;-ms-flex-align:center;align-items:center}.towwrapper_img_detali{display:-ms-flexbox;display:flex;padding-left:80px;margin-left:80px;margin-right:20px;border:1px solid #4cacff}.div_line{width:100%;border:10px solid #4cacff}.list_img{height:145px;padding:15px;width:145px}.detail_context{-ms-flex:1 1;flex:1 1;border:1px solid #f4f4f4;margin-left:15px;padding:10px;position:relative;background:#fff;border-radius:4px}.detail_context:before{border:solid transparent;border-right-color:#f4f4f4;border-width:9px;top:12px}.detail_context:after,.detail_context:before{position:absolute;content:\"\";height:0;width:0;right:100%}.detail_context:after{border:solid transparent;border-right-color:#fff;border-width:7px;top:14px}.tagList>div{border-bottom:1px dashed #f4f4f4;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around;padding:15px 0}.divwidth{width:74%}.listTowItems{width:80%;padding-left:80px}.tagList>div:last-child{border-bottom:none}.mr10{margin-right:10px}.text-right{text-align:right}.tagColor{display:inline-block;width:20px;height:15px;border-radius:4px;margin-right:5px;vertical-align:middle}.milepostdiv,.milepostwidth{display:-ms-flexbox;display:flex}.milepostwidth{width:60%}.mileposwidth{background:#21ba45;border-radius:4px;width:40%}.milepostrighe{width:80%}.milepostleft,.milepostrighe{display:-ms-flexbox;display:flex}.milepostleft{text-align:right;-ms-flex-pack:right;justify-content:right;width:20%}.textwidth{display:-ms-flexbox;display:flex;width:100%}.newmilepostleft{padding:15px;margin-right:50px;width:60%}.newmilepostrighe{margin-left:50px;padding:15px;width:30%}.detailContent{padding:15px 0;border-bottom:1px solid #f4f4f4}.DetailRight{padding:10px 15px;border:1px solid #f4f4f4;border-radius:4px}.DetailRight>p{height:30px;line-height:30px}.inptwidth{width:20%}.inputcount{width:40%}.loginDiv{border:1px solid #f7c977;background:rgba(255,204,113,.3);text-align:center;padding:8px 0;border-radius:4px;width:100%;color:#999;margin-top:15px}.loginDiv a{text-decoration:underline;color:#4cacff;margin-right:3px}.tagdiv{padding:15px;height:75px;border:1px solid #eee}.dialogdiv,.tagdiv{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}.dialogdiv{padding:5px;height:45px}.issue-tag-show{padding:3px 8px;color:#fff;border-radius:6px}.journal-list-item{padding:12px 15px}.span_title{min-width:90px;margin-right:15px;text-align:right;color:rgba(0,0,0,.65)}.target-detail-search .ant-input-group-addon{border:none!important}.target-detail-search .ant-input-search-button{height:32px!important}a.issue-type-button.active{background:#4cacff;color:#fff}a.issue-type-button.active:hover{background:#f4f4f4;color:#4cacff}@media screen and (max-width:700px){.topWrapper_select li{width:auto}}.ml10{margin-left:10px}.lineH32{line-height:32px}.lineH40{line-height:40px}.item-list-right{width:74%;padding:0 15px 10px 0}.detail_edit_action{padding:10px;color:#999;cursor:pointer;line-height:40px}.attachmentsList{margin-left:4px}.paper-clip-color{color:#29bd8b!important}.attachment-list-delete{display:none}.attachment-list-div:hover{background-color:#e6f7ff}.attachment-list-div:hover .attachment-list-delete{display:block!important}.attachment-list-a{color:rgba(0,0,0,.65)!important}.btp1{border-top:1px solid #f4f4f4}.grid-item{display:grid;-ms-flex-align:center;align-items:center;grid-template-columns:-webkit-max-content 1fr;grid-template-columns:max-content 1fr}.fwb{font-weight:700}.ant-dropdown-menu{max-height:350px;overflow-y:auto}", "", {"version":3,"sources":["/Users/hs/forgeplus-react/src/forge/Order/order.css"],"names":[],"mappings":"AAAA,YACE,eAAgB,AAChB,8BAA+B,AACvB,sBAAuB,AAC/B,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,8BAA+B,AACnC,6BAAiC,AACjC,mBAAoB,AAChB,cAAgB,CACrB,AACD,cACE,kBAAmB,AACnB,iBAAmB,CACpB,AACD,WACE,kBAAmB,AACnB,SAAW,AACX,SAAS,AACT,YAAa,AACb,iBAAkB,AAClB,SAAW,CACZ,AAED,aAIE,oBAAqB,AACrB,YAAc,CAKf,AAED,yBAXE,eAAgB,AAChB,8BAA+B,AACvB,sBAAuB,AAG/B,sBAAuB,AACnB,8BAA+B,AACnC,mBAAoB,AAChB,cAAgB,CAYrB,AATD,YAME,4BAAiC,CAGlC,AAMD,0BACE,oBAAqB,AACrB,YAAc,CAKf,AAED,cAEE,oBAAqB,AACjB,YAAa,AACjB,gBAAkB,CAInB,AACD,UACE,eAAgB,AAChB,iBAAkB,AAClB,gBAAkB,CACnB,AAED,UACE,UAAY,CACb,AACD,OACE,kBAAkB,AAClB,eAAe,AACf,kBAAmB,AACnB,gBAAkB,CACnB,AACD,YACE,yBAAyB,AACzB,oBAAuB,CACxB,AACD,YACE,qBAAqB,AACrB,mBAAsB,CACvB,AACD,kBAAkB,kBAAmB,CAAC,AACtC,aACE,qBAAqB,AACrB,UAAW,AACX,YAAa,AACb,kBAAmB,AACnB,kBAAkB,AAClB,eAAiB,AACjB,kBAAmB,AACnB,gBAAkB,CAEnB,AACD,WACG,UAAW,AACX,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,iBAAkB,AAClB,mBAAoB,AACpB,gBAAkB,CACjB,AACF,YACE,oBAAqB,AACrB,aAAc,AACd,YAAa,AACb,YAAa,AACb,0BAA2B,CAC3B,AACD,aACC,YAAa,AACb,WAAY,AACZ,eAAgB,AAChB,kBAAoB,CACpB,AAEJ,uCACE,yBAAyB,AACzB,0BAA+B,AAC/B,YAAa,AACb,iBAAkB,AAClB,kBAAmB,AACnB,eAAiB,AACjB,cAAe,AACf,cAAgB,CACjB,AACD,wBACE,kBAAoB,CACrB,AACD,6DACE,iBAAkB,AAClB,yBAA+B,CAChC,AACD,gBACE,mBAAoB,AACpB,qBAAyB,AACzB,eAAiB,AACjB,kBAAmB,AACnB,YAAa,AACb,iBAAkB,AAClB,iBAAmB,CACpB,AACD,iBACE,yBAAyB,AACzB,kBAAmB,AACnB,oBAAqB,AACrB,YAAc,CACf,AACD,oBACE,YAAa,AACb,iBAAkB,AAClB,8BAA8B,AAC9B,cAAgB,AAChB,eAAgB,AAChB,UAAW,CACZ,AACD,2BACE,aAAe,CAChB,AACD,gCACE,gBAAkB,CACnB,AACD,mBACE,oBAAqB,AACrB,aAAc,AACd,mBAAoB,AAChB,eAAgB,AACpB,sBAAuB,AACnB,kBAAoB,CACzB,AACD,6CACE,WAAa,CACd,AACD,gBACE,gBAAiB,AAGjB,2BAA4B,AAC5B,mBAAqB,CAItB,AACD,sCAPE,gBAAiB,AAGjB,mBAAoB,AACpB,0BAA2B,AAC3B,sBAAwB,CAazB,AAXD,sBAEE,eAAgB,AAChB,WAAY,AACZ,WAAW,AACX,kBAAmB,AACnB,oBAAsB,CAKvB,AACD,6BACE,mBAAoB,AACpB,iBAAmB,CACpB,AACD,2CACE,kBAAmB,AACnB,iBAAiB,AACjB,cAAgB,CACjB,AACD,WACE,oBAAqB,AACrB,aAAc,AACd,mBAAoB,AAChB,eAAgB,AACpB,0BAA2B,AACvB,qBAAsB,AAC1B,iCAAiC,AACjC,cAAiB,CAClB,AACD,uBACE,6BAA8B,CAC/B,AACD,SACE,cAAgB,AAChB,kBAAmB,AACnB,mBAAoB,AACpB,cAAe,AACf,iBAAkB,AAClB,WAAW,AACX,YAAa,AACb,gBAAkB,CACnB,AACD,WACE,6BAA+B,AAC/B,oBAAuB,CACxB,AAED,eACE,iBAAkB,AAClB,iBAAmB,CACpB,AAGD,UACE,YAAa,AACb,WAAY,AACZ,kBAAoB,CACrB,AACD,aACE,aAAc,AACV,SAAU,AACd,yBAA0B,AAC1B,kBAAmB,AACnB,iBAAkB,AAClB,aAAc,AACd,kBAAmB,AACnB,eAAoB,CACrB,AACD,oBAKE,yBAA0B,AAC1B,2BAA4B,AAC5B,iBAAkB,AAClB,QAAU,CAEX,AACD,uCAVE,kBAAmB,AACnB,WAAY,AACZ,SAAU,AACV,QAAS,AAKT,UAAY,CAYb,AAVD,mBAKE,yBAA0B,AAC1B,wBAAyB,AACzB,iBAAkB,AAClB,QAAU,CAEX,AACD,cACE,yBAAyB,AACzB,kBAAmB,AACnB,iBAAkB,CACnB,AACD,uBACE,eAAmB,CACpB,AAGA,cACC,gBAAoB,AACpB,wBAAyB,AACzB,eAAiB,AACjB,kBAAmB,AACnB,YAAa,AACb,gBAAkB,CACnB,AAED,YAEE,kBAAoB,CAQrB,AACD,yBAVE,qBAAsB,AAEtB,qBAAyB,AACzB,eAAiB,AACjB,kBAAmB,AACnB,YAAa,AAEb,kBAAmB,AACnB,gBAAkB,CAYnB,AAVD,aAEE,kBAAoB,CAQrB,AAED,cACE,uBAAyB,CAC1B,AAED,mBACE,oBAAqB,AACrB,aAAc,AAEd,sBAAuB,AACvB,sBAAuB,AACnB,kBAAoB,CACzB,AACD,uBACE,oBAAqB,AACrB,aAAc,AACd,kBAAmB,AACnB,iBAAkB,AAClB,kBAAmB,AACnB,wBAA0B,CAC3B,AACD,UACE,WAAY,AACZ,yBAA2B,CAE5B,AACD,UACE,aAAc,AACd,aAAc,AACd,WAAa,CACd,AAED,gBACE,aAAc,AACV,SAAU,AACd,yBAA0B,AAC1B,iBAAkB,AAClB,aAAc,AAId,kBAAmB,AACnB,gBAAoB,AACpB,iBAAmB,CACpB,AACD,uBAKE,yBAA0B,AAC1B,2BAA4B,AAC5B,iBAAkB,AAClB,QAAU,CAEX,AACD,6CAVE,kBAAmB,AACnB,WAAY,AACZ,SAAU,AACV,QAAS,AAKT,UAAY,CAYb,AAVD,sBAKE,yBAA0B,AAC1B,wBAAyB,AACzB,iBAAkB,AAClB,QAAU,CAEX,AAED,aACE,iCAAkC,AAClC,oBAAqB,AACrB,aAAc,AACd,yBAA0B,AACtB,6BAA8B,AAClC,cAAiB,CAClB,AACD,UACE,SAAW,CACZ,AACD,cACE,UAAW,AACX,iBAAmB,CACpB,AAED,wBACE,kBAAoB,CACrB,AACD,MAAM,iBAAmB,CAAC,AAC1B,YAAY,gBAAkB,CAAC,AAO/B,UACE,qBAAsB,AACtB,WAAW,AACX,YAAa,AACb,kBAAmB,AACnB,iBAAkB,AAClB,qBAAuB,CACxB,AAOD,4BAHE,oBAAqB,AACrB,YAAc,CAMf,AAJD,eAGE,SAAW,CACZ,AACD,cACE,mBAAoB,AACpB,kBAAmB,AACnB,SAAW,CACZ,AACD,eAGE,SAAW,CACZ,AACD,6BAJE,oBAAqB,AACrB,YAAc,CAUf,AAPD,cACE,iBAAkB,AAGlB,oBAAqB,AACjB,sBAAuB,AAC3B,SAAW,CACZ,AACD,WACE,oBAAqB,AACrB,aAAc,AACd,UAAY,CACb,AACD,iBACE,aAAc,AACd,kBAAmB,AACnB,SAAW,CACZ,AACD,kBACE,iBAAkB,AAClB,aAAc,AACd,SAAW,CACZ,AAED,eACE,eAAiB,AACjB,+BAAiC,CAClC,AACD,aACE,kBAAmB,AACnB,yBAAyB,AACzB,iBAAmB,CACpB,AACD,eACE,YAAa,AACb,gBAAiB,CAClB,AACD,WACE,SAAW,CACZ,AACD,YACE,SAAW,CACZ,AACD,UACE,yBAA0B,AAC1B,gCAAmC,AACnC,kBAAmB,AACnB,cAAgB,AAChB,kBAAmB,AACnB,WAAY,AACZ,WAAY,AACZ,eAAiB,CAClB,AACD,YACE,0BAA2B,AAC3B,cAAe,AACf,gBAAkB,CACnB,AAED,QACE,aAAc,AACd,YAAa,AAOb,qBAA0B,CAG3B,AAED,mBAXE,8BAA+B,AACvB,sBAAuB,AAC/B,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,8BAA+B,AAEnC,mBAAoB,AAChB,cAAgB,CAcrB,AAXD,WACE,YAAa,AACb,WAAa,CASd,AACD,gBAAgB,gBAAiB,AAAC,WAAY,AAAC,iBAAmB,CAAC,AACnE,mBAAmB,iBAAkB,CAAC,AAOtC,YACE,eAAgB,AAChB,kBAAmB,AACnB,iBAAkB,AAClB,qBAA2B,CAC5B,AACD,6CAA6C,qBAAwB,CAAC,AACtE,+CAA+C,qBAAwB,CAAC,AACxE,2BAA2B,mBAAoB,AAAC,UAAY,CAAC,AAC7D,iCAAiC,mBAAoB,AAAC,aAAe,CAAC,AACtE,oCACE,sBACE,UAAW,CACZ,CACF,AACD,MAAM,gBAAkB,CAAC,AACzB,SAAS,gBAAkB,CAAC,AAC5B,SAAS,gBAAkB,CAAC,AAC5B,iBAAiB,UAAW,AAAC,qBAAwB,CAAC,AACtD,oBAAoB,aAAa,AAAC,WAAY,AAAC,eAAgB,AAAC,gBAAkB,CAAC,AACnF,iBACE,eAAgB,CACjB,AACD,kBAAkB,uBAAwB,CAAC,AAC3C,wBAAwB,YAAc,CAAC,AACvC,2BAA2B,wBAA0B,CAAC,AACtD,mDAAmD,uBAA0B,CAAC,AAC9E,mBAAmB,+BAAsC,CAAC,AAC1D,MAAM,4BAA8B,CAAC,AACrC,WAAW,aAAc,AAAC,sBAAuB,AAAC,mBAAoB,AAAC,8CAA+C,AAAC,qCAAuC,CAAC,AAC/J,KAAK,eAAkB,CAAC,AAGxB,mBACE,iBAAkB,AAClB,eAAgB,CACjB","file":"order.css","sourcesContent":[".topWrapper {\n padding: 20px 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: justify;\n justify-content: space-between;\n border-bottom: 1px solid #EEEEEE;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.quillContent{\n position: relative;\n margin-bottom: 4px;\n}\n.quillFlag{\n position: absolute;\n bottom:0px;\n left:6px;\n height: 20px;\n line-height: 18px;\n color: red;\n}\n\n.topmilepost{\n padding: 20px 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n\n.miledetail{\n padding: 20px 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -ms-flex-pack: justify;\n justify-content: space-between;\n border-bottom: 1px solid #EEEEEE;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.topWrapper_nav{\n display: -ms-flexbox;\n display: flex;\n\n}\n.detail_p{\n display: -ms-flexbox;\n display: flex;\n /*padding:10px;*/\n /*width: 80%;*/\n /*padding-left: 15px;*/\n /*margin: auto;*/\n}\n\n.detail_right{\n /*display: flex;*/\n -ms-flex-positive: 1;\n flex-grow: 1;\n text-align: right;\n /*width: 15%;*/\n /*padding-left: 15px;*/\n /*margin: auto; */\n}\n.commit_p{\n font-size: 12px;\n padding-top: 10px;\n padding-left: 5px;\n}\n\n.ul_width{\n width: 100%;\n}\n.a_btn{\n border-radius:4px;\n padding:0 12px;\n margin-right: 15px;\n line-height: 30px;\n}\n.cancel_btn{\n border:1px solid #e6e6e6;\n color: #333 !important;\n}\n.delete_btn{\n border:1px solid red;\n color: red !important;\n}\n.cancel_btn:hover{background: #e6e6e6}\n.Closeor_btn{\n border:1px solid red;\n color: red;\n height: 32px;\n text-align: center;\n border-radius:4px;\n padding:0px 12px;\n margin-right: 15px;\n line-height: 32px;\n\n}\n.rectangle {\n width: 8px;\n height: 8px;\n border-radius: 100%;\n margin-top: 15px;\n margin-left: -4px;\n margin-bottom: 10px;\n background: green;\n }\n .order_line{\n display: -ms-flexbox;\n display: flex;\n height: 32px;\n margin: auto;\n border-left:1px solid #eee;\n }\n .comment_img{\n height: 25px;\n width: 25px;\n margin-top: 5px;\n border-radius: 100%;\n }\n\n.topWrapper_nav a,.topWrapper_nav span{\n border:1px solid #f4f4f4;\n border-radius: 5px 0px 0px 5px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n padding:0px 10px;\n display: block;\n cursor: pointer;\n}\n.topWrapper_nav a:hover{\n background: #f4f4f4;\n}\n.topWrapper_nav a:last-child,.topWrapper_nav span:last-child{\n border-left: none;\n border-radius: 0px 5px 5px 0px;\n}\n.topWrapper_btn {\n background: #21ba45;\n color: #FFFFFF!important;\n padding:0px 12px;\n text-align: center;\n height: 32px;\n line-height: 32px;\n border-radius: 4px;\n}\n.topWrapper_type{\n border:1px solid #f4f4f4;\n border-radius: 6px;\n display: -ms-flexbox;\n display: flex;\n}\n.topWrapper_type li{\n height: 30px;\n line-height: 30px;\n border-left:1px solid #f4f4f4;\n padding:0px 8px;\n cursor: pointer;\n color: #666\n}\n.topWrapper_type li.active{\n color: #4CACFF;\n}\n.topWrapper_type li:first-child{\n border-left: none;\n}\n.topWrapper_select{\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -ms-flex-align: center;\n align-items: center;\n}\n.topWrapper .ant-btn.ant-input-search-button{\n height: 30px;\n}\n.title_overflow{\n max-width: 220px;\n white-space: nowrap;\n overflow: hidden;\n display: -ms-inline-flexbox;\n display: inline-flex;\n white-space: nowrap;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n}\n.topWrapper_select li{\n text-align: center;\n cursor: pointer;\n color: #666;\n width:90px;\n text-align: center;\n display: inline-block;\n overflow: hidden;\n white-space: nowrap;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n}\n.topWrapper_select li:active{\n background: #f4f4f4;\n border-radius: 4px;\n}\n.ant-dropdown-menu .ant-dropdown-menu-item{\n text-align: center;\n padding:6px 30px;\n cursor: pointer;\n}\n.issueItem{\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -ms-flex-line-pack: center;\n align-content: center;\n border-bottom:1px dashed #cecdcd;\n padding:16px 0px;\n}\n.issueItem:first-child{\n border-top:1px dashed #cecdcd;\n}\n.issueNo{\n padding:0px 5px;\n border-radius: 4px;\n background: #f4f4f4;\n display: block;\n margin-right: 8px;\n color:#666;\n height: 30px;\n line-height: 30px;\n}\n.issueOpen{\n background: #21ba45 !important;\n color: #fff !important;\n}\n\n.margin_detail{\n margin-left: 15px;\n margin-right: 15px;\n}\n\n/* 新建 */\n.user_img {\n height: 49px;\n width: 49px;\n border-radius: 100%;\n}\n.new_context {\n -ms-flex: 1 1;\n flex: 1 1;\n border: 1px solid #f4f4f4;\n border-radius: 4px;\n margin-left: 15px;\n padding: 15px;\n position: relative;\n background: #FFFFFF;\n}\n.new_context:before {\n position: absolute;\n content: \"\";\n height: 0;\n width: 0;\n border: solid transparent;\n border-right-color: #f4f4f4;\n border-width: 9px;\n top: 12px;\n right: 100%;\n}\n.new_context::after {\n position: absolute;\n content: \"\";\n height: 0;\n width: 0;\n border: solid transparent;\n border-right-color: #fff;\n border-width: 7px;\n top: 14px;\n right: 100%;\n}\n.list-l-panel{\n border:1px solid #f4f4f4;\n border-radius: 4px;\n padding:10px 15px;\n}\n.list-l-panel .ant-row{\n margin-bottom: 0px;\n}\n\n /*编辑任务*/\n .editingsheet{\n background: #ffffff;\n color: #21ba45!important;\n padding:0px 12px;\n text-align: center;\n height: 32px;\n line-height: 32px;\n}\n/*开启中 关闭中*/\n.opendetail{\n display: inline-block;\n background: #21ba45;\n color: #ffffff!important;\n padding:0px 12px;\n text-align: center;\n height: 32px;\n /*width: 110px;*/\n border-radius: 4px;\n line-height: 32px;\n}\n.closedetail{\n display: inline-block;\n background: #e60b0b;\n color: #ffffff!important;\n padding:0px 12px;\n text-align: center;\n height: 32px;\n /*width: 110px;*/\n border-radius: 4px;\n line-height: 32px;\n}\n\n.commenttitle{\n color: #21ba45!important;\n}\n\n.topWrapper_detali{\n display: -ms-flexbox;\n display: flex;\n /*height: 35px;*/\n background-color: #eee;\n -ms-flex-align: center;\n align-items: center;\n}\n.towwrapper_img_detali{\n display: -ms-flexbox;\n display: flex;\n padding-left: 80px;\n margin-left: 80px;\n margin-right: 20px;\n border: 1px solid #4CACFF;\n}\n.div_line{\n width: 100%;\n border: 10px solid #4CACFF;\n \n}\n.list_img{\n height: 145px;\n padding: 15px;\n width: 145px;\n}\n\n.detail_context {\n -ms-flex: 1 1;\n flex: 1 1;\n border: 1px solid #f4f4f4;\n margin-left: 15px;\n padding: 10px;\n /*padding-top: 0px;*/\n /*padding-left: 0px;*/\n /*margin-right: 15px;*/\n position: relative;\n background: #FFFFFF;\n border-radius: 4px;\n}\n.detail_context:before {\n position: absolute;\n content: \"\";\n height: 0;\n width: 0;\n border: solid transparent;\n border-right-color: #f4f4f4;\n border-width: 9px;\n top: 12px;\n right: 100%;\n}\n.detail_context::after {\n position: absolute;\n content: \"\";\n height: 0;\n width: 0;\n border: solid transparent;\n border-right-color: #fff;\n border-width: 7px;\n top: 14px;\n right: 100%;\n}\n/* 任务标签列表 */\n.tagList > div{\n border-bottom: 1px dashed #f4f4f4;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n padding:15px 0px;\n}\n.divwidth{\n width: 74%;\n}\n.listTowItems{\n width: 80%;\n padding-left: 80px;\n}\n\n.tagList > div:last-child{\n border-bottom: none;\n}\n.mr10{margin-right: 10px;}\n.text-right{text-align: right;}\n/*.tagList > div > span{*/\n /*display: block*/\n/*}*/\n/*.tagList > div > span:nth-child(2){*/\n /*width: 450px;*/\n/*}*/\n.tagColor{\n display: inline-block;\n width:20px;\n height: 15px;\n border-radius: 4px;\n margin-right: 5px;\n vertical-align: middle;\n}\n\n/*里程碑*/\n.milepostdiv{\n display: -ms-flexbox;\n display: flex;\n}\n.milepostwidth{\n display: -ms-flexbox;\n display: flex;\n width: 60%;\n}\n.mileposwidth{\n background: #21ba45;\n border-radius: 4px;\n width: 40%;\n}\n.milepostrighe{\n display: -ms-flexbox;\n display: flex;\n width: 80%;\n}\n.milepostleft{\n text-align: right;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: right;\n justify-content: right;\n width: 20%;\n}\n.textwidth{\n display: -ms-flexbox;\n display: flex;\n width: 100%;\n}\n.newmilepostleft{\n padding: 15px;\n margin-right: 50px;\n width: 60%;\n}\n.newmilepostrighe{\n margin-left: 50px;\n padding: 15px;\n width: 30%;\n}\n/* 任务详情 */\n.detailContent{\n padding:15px 0px;\n border-bottom: 1px solid #f4f4f4;\n}\n.DetailRight{\n padding: 10px 15px; \n border:1px solid #f4f4f4;\n border-radius: 4px;\n}\n.DetailRight > p{\n height: 30px;\n line-height:30px;\n}\n.inptwidth{\n width: 20%;\n}\n.inputcount{\n width: 40%;\n}\n.loginDiv{\n border: 1px solid #f7c977;\n background: rgb(255, 204, 113,0.3);\n text-align: center;\n padding:8px 0px;\n border-radius: 4px;\n width: 100%;\n color: #999;\n margin-top: 15px;\n}\n.loginDiv a{\n text-decoration: underline;\n color: #4CACFF;\n margin-right: 3px;\n}\n\n.tagdiv{\n padding: 15px;\n height: 75px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: justify;\n justify-content: space-between;\n border: 1px solid #EEEEEE;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n\n.dialogdiv{\n padding: 5px;\n height: 45px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.issue-tag-show{padding: 3px 8px; color: #fff; border-radius: 6px;}\n.journal-list-item{padding: 12px 15px}\n\n/*.DetailRight > p >span:nth-child(1){*/\n /*min-width: 90px;*/\n /*margin-right: 15px;*/\n /*text-align: right;*/\n/*}*/\n.span_title{\n min-width: 90px;\n margin-right: 15px;\n text-align: right;\n color: rgba(0, 0, 0, 0.65);\n}\n.target-detail-search .ant-input-group-addon{border: none !important;}\n.target-detail-search .ant-input-search-button{height: 32px !important;}\na.issue-type-button.active{background: #4CACFF; color: #fff;}\na.issue-type-button.active:hover{background: #f4f4f4; color: #4CACFF;}\n@media screen and (max-width: 700px){\n .topWrapper_select li{\n width:auto;\n }\n}\n.ml10{margin-left: 10px;}\n.lineH32{line-height: 32px;}\n.lineH40{line-height: 40px;}\n.item-list-right{width: 74%; padding: 0px 15px 10px 0}\n.detail_edit_action{padding:10px; color: #999; cursor: pointer; line-height: 40px;}\n.attachmentsList{\n margin-left:4px;\n}\n.paper-clip-color{color:#29bd8b !important}\n.attachment-list-delete{display: none;}\n.attachment-list-div:hover{background-color: #e6f7ff;}\n.attachment-list-div:hover .attachment-list-delete{display: block !important;}\n.attachment-list-a{color: rgba(0, 0, 0, 0.65) !important;}\n.btp1{border-top: 1px solid #f4f4f4;}\n.grid-item{display: grid; -ms-flex-align: center; align-items: center; grid-template-columns: -webkit-max-content 1fr; grid-template-columns: max-content 1fr;}\n.fwb{font-weight: bold;}\n\n/* 发布人、指派人数量过多时要出现滚动条 */\n.ant-dropdown-menu{\n max-height: 350px;\n overflow-y:auto;\n}"],"sourceRoot":""}]);
|
||
|
||
// exports
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1552:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||
|
||
// load the styles
|
||
var content = __webpack_require__(1558);
|
||
if(typeof content === 'string') content = [[module.i, content, '']];
|
||
// Prepare cssTransformation
|
||
var transform;
|
||
|
||
var options = {"hmr":false}
|
||
options.transform = transform
|
||
// add the styles to the DOM
|
||
var update = __webpack_require__(317)(content, options);
|
||
if(content.locals) module.exports = content.locals;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1553:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||
|
||
// load the styles
|
||
var content = __webpack_require__(1559);
|
||
if(typeof content === 'string') content = [[module.i, content, '']];
|
||
// Prepare cssTransformation
|
||
var transform;
|
||
|
||
var options = {"hmr":false}
|
||
options.transform = transform
|
||
// add the styles to the DOM
|
||
var update = __webpack_require__(317)(content, options);
|
||
if(content.locals) module.exports = content.locals;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1554:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||
|
||
// load the styles
|
||
var content = __webpack_require__(1560);
|
||
if(typeof content === 'string') content = [[module.i, content, '']];
|
||
// Prepare cssTransformation
|
||
var transform;
|
||
|
||
var options = {"hmr":false}
|
||
options.transform = transform
|
||
// add the styles to the DOM
|
||
var update = __webpack_require__(317)(content, options);
|
||
if(content.locals) module.exports = content.locals;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1555:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||
|
||
// load the styles
|
||
var content = __webpack_require__(1561);
|
||
if(typeof content === 'string') content = [[module.i, content, '']];
|
||
// Prepare cssTransformation
|
||
var transform;
|
||
|
||
var options = {"hmr":false}
|
||
options.transform = transform
|
||
// add the styles to the DOM
|
||
var update = __webpack_require__(317)(content, options);
|
||
if(content.locals) module.exports = content.locals;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1558:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
exports = module.exports = __webpack_require__(316)(true);
|
||
// imports
|
||
|
||
|
||
// module
|
||
exports.push([module.i, "/*!\n * Quill Editor v1.3.7\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */.ql-container{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;-o-tab-size:4;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6,.ql-editor ol,.ql-editor p,.ql-editor pre,.ql-editor ul{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:\"\\2022\"}.ql-editor ul[data-checked=false],.ql-editor ul[data-checked=true]{pointer-events:none}.ql-editor ul[data-checked=false]>li *,.ql-editor ul[data-checked=true]>li *{pointer-events:all}.ql-editor ul[data-checked=false]>li:before,.ql-editor ul[data-checked=true]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:\"\\2611\"}.ql-editor ul[data-checked=false]>li:before{content:\"\\2610\"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) \". \"}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) \". \"}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) \". \"}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) \". \"}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) \". \"}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) \". \"}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) \". \"}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) \". \"}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) \". \"}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) \". \"}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:rgba(0,0,0,.6);content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}", "", {"version":3,"sources":["/Users/hs/forgeplus-react/node_modules/quill/dist/quill.core.css"],"names":[],"mappings":"AAAA;;;;;GAKG,AACH,cACE,8BAA+B,AACvB,sBAAuB,AAC/B,uCAA0C,AAC1C,eAAgB,AAChB,YAAa,AACb,SAAY,AACZ,iBAAmB,CACpB,AACD,sCACE,iBAAmB,CACpB,AACD,gEACE,mBAAqB,CACtB,AACD,cACE,eAAgB,AAChB,WAAY,AACZ,kBAAmB,AACnB,kBAAmB,AACnB,OAAS,CACV,AACD,gBACE,SAAU,AACV,SAAW,CACZ,AACD,WACE,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAkB,AAClB,YAAa,AACb,aAAc,AACd,gBAAiB,AACjB,kBAAmB,AACnB,cAAe,AACZ,WAAY,AACf,gBAAiB,AACjB,gBAAiB,AACjB,qBAAsB,AACtB,oBAAsB,CACvB,AACD,aACE,WAAa,CACd,AACD,kKAWE,SAAU,AACV,UAAW,AACX,4EAA8E,CAC/E,AACD,4BAEE,kBAAoB,CACrB,AACD,kCAEE,oBAAsB,CACvB,AACD,wBACE,eAAiB,CAClB,AACD,mEAEE,mBAAqB,CACtB,AACD,6EAEE,kBAAoB,CACrB,AACD,uFAEE,WAAY,AACZ,eAAgB,AAChB,kBAAoB,CACrB,AACD,2CACE,eAAiB,CAClB,AACD,4CACE,eAAiB,CAClB,AACD,qBACE,qBAAsB,AACtB,mBAAoB,AACpB,WAAa,CACd,AACD,4CACE,mBAAoB,AACpB,kBAAoB,AACpB,gBAAkB,CACnB,AACD,sCACE,iBAAmB,AACnB,mBAAqB,CACtB,AACD,gFAEE,kBAAoB,CACrB,AACD,oEAEE,mBAAqB,CACtB,AACD,iBACE,6EAA8E,AAC9E,wBAA0B,CAC3B,AACD,wBACE,oCAAuC,CACxC,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,qEAAuE,CACxE,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,8DAAgE,CACjE,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,oCAAuC,CACxC,AACD,6BACE,uDAAyD,CAC1D,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,gDAAkD,CACnD,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,yCAA2C,CAC5C,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,oCAAuC,CACxC,AACD,6BACE,kCAAoC,CACrC,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,2BAA6B,CAC9B,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,oBAAsB,CACvB,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,oCAAuC,CACxC,AACD,+CACE,gBAAkB,CACnB,AACD,iDACE,kBAAoB,CACrB,AACD,wDACE,iBAAmB,CACpB,AACD,0DACE,mBAAqB,CACtB,AACD,+CACE,gBAAkB,CACnB,AACD,iDACE,kBAAoB,CACrB,AACD,wDACE,iBAAmB,CACpB,AACD,0DACE,mBAAqB,CACtB,AACD,+CACE,gBAAkB,CACnB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,iBAAmB,CACpB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,qBACE,cAAe,AACf,cAAgB,CACjB,AACD,qCACE,aAAe,CAChB,AACD,oCACE,iBAAmB,CACpB,AACD,wBACE,qBAAuB,CACxB,AACD,sBACE,wBAA0B,CAC3B,AACD,yBACE,qBAAuB,CACxB,AACD,yBACE,qBAAuB,CACxB,AACD,wBACE,wBAA0B,CAC3B,AACD,uBACE,qBAAuB,CACxB,AACD,yBACE,qBAAuB,CACxB,AACD,2BACE,UAAY,CACb,AACD,yBACE,aAAe,CAChB,AACD,4BACE,UAAY,CACb,AACD,4BACE,UAAY,CACb,AACD,2BACE,aAAe,CAChB,AACD,0BACE,UAAY,CACb,AACD,4BACE,UAAY,CACb,AACD,0BACE,yCAA6C,CAC9C,AACD,8BACE,wCAA4C,CAC7C,AACD,0BACE,eAAkB,CACnB,AACD,0BACE,eAAiB,CAClB,AACD,yBACE,eAAiB,CAClB,AACD,6BACE,cAAe,AACf,kBAAoB,CACrB,AACD,4BACE,iBAAmB,CACpB,AACD,6BACE,kBAAoB,CACrB,AACD,2BACE,gBAAkB,CACnB,AACD,2BACE,qBAAuB,AACvB,+BAAgC,AAChC,kBAAmB,AACnB,UAAW,AACX,oBAAqB,AACrB,kBAAmB,AACnB,UAAY,CACb","file":"quill.core.css","sourcesContent":["/*!\n * Quill Editor v1.3.7\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */\n.ql-container {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n font-family: Helvetica, Arial, sans-serif;\n font-size: 13px;\n height: 100%;\n margin: 0px;\n position: relative;\n}\n.ql-container.ql-disabled .ql-tooltip {\n visibility: hidden;\n}\n.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {\n pointer-events: none;\n}\n.ql-clipboard {\n left: -100000px;\n height: 1px;\n overflow-y: hidden;\n position: absolute;\n top: 50%;\n}\n.ql-clipboard p {\n margin: 0;\n padding: 0;\n}\n.ql-editor {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n line-height: 1.42;\n height: 100%;\n outline: none;\n overflow-y: auto;\n padding: 12px 15px;\n -o-tab-size: 4;\n tab-size: 4;\n -moz-tab-size: 4;\n text-align: left;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n.ql-editor > * {\n cursor: text;\n}\n.ql-editor p,\n.ql-editor ol,\n.ql-editor ul,\n.ql-editor pre,\n.ql-editor blockquote,\n.ql-editor h1,\n.ql-editor h2,\n.ql-editor h3,\n.ql-editor h4,\n.ql-editor h5,\n.ql-editor h6 {\n margin: 0;\n padding: 0;\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol,\n.ql-editor ul {\n padding-left: 1.5em;\n}\n.ql-editor ol > li,\n.ql-editor ul > li {\n list-style-type: none;\n}\n.ql-editor ul > li::before {\n content: '\\2022';\n}\n.ql-editor ul[data-checked=true],\n.ql-editor ul[data-checked=false] {\n pointer-events: none;\n}\n.ql-editor ul[data-checked=true] > li *,\n.ql-editor ul[data-checked=false] > li * {\n pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before,\n.ql-editor ul[data-checked=false] > li::before {\n color: #777;\n cursor: pointer;\n pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before {\n content: '\\2611';\n}\n.ql-editor ul[data-checked=false] > li::before {\n content: '\\2610';\n}\n.ql-editor li::before {\n display: inline-block;\n white-space: nowrap;\n width: 1.2em;\n}\n.ql-editor li:not(.ql-direction-rtl)::before {\n margin-left: -1.5em;\n margin-right: 0.3em;\n text-align: right;\n}\n.ql-editor li.ql-direction-rtl::before {\n margin-left: 0.3em;\n margin-right: -1.5em;\n}\n.ql-editor ol li:not(.ql-direction-rtl),\n.ql-editor ul li:not(.ql-direction-rtl) {\n padding-left: 1.5em;\n}\n.ql-editor ol li.ql-direction-rtl,\n.ql-editor ul li.ql-direction-rtl {\n padding-right: 1.5em;\n}\n.ql-editor ol li {\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n counter-increment: list-0;\n}\n.ql-editor ol li:before {\n content: counter(list-0, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n counter-increment: list-1;\n}\n.ql-editor ol li.ql-indent-1:before {\n content: counter(list-1, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-2 {\n counter-increment: list-2;\n}\n.ql-editor ol li.ql-indent-2:before {\n content: counter(list-2, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-2 {\n counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-3 {\n counter-increment: list-3;\n}\n.ql-editor ol li.ql-indent-3:before {\n content: counter(list-3, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-3 {\n counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-4 {\n counter-increment: list-4;\n}\n.ql-editor ol li.ql-indent-4:before {\n content: counter(list-4, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-4 {\n counter-reset: list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-5 {\n counter-increment: list-5;\n}\n.ql-editor ol li.ql-indent-5:before {\n content: counter(list-5, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-5 {\n counter-reset: list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-6 {\n counter-increment: list-6;\n}\n.ql-editor ol li.ql-indent-6:before {\n content: counter(list-6, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-6 {\n counter-reset: list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-7 {\n counter-increment: list-7;\n}\n.ql-editor ol li.ql-indent-7:before {\n content: counter(list-7, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-7 {\n counter-reset: list-8 list-9;\n}\n.ql-editor ol li.ql-indent-8 {\n counter-increment: list-8;\n}\n.ql-editor ol li.ql-indent-8:before {\n content: counter(list-8, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-8 {\n counter-reset: list-9;\n}\n.ql-editor ol li.ql-indent-9 {\n counter-increment: list-9;\n}\n.ql-editor ol li.ql-indent-9:before {\n content: counter(list-9, decimal) '. ';\n}\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 3em;\n}\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 4.5em;\n}\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 3em;\n}\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 4.5em;\n}\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 6em;\n}\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 7.5em;\n}\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 6em;\n}\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 7.5em;\n}\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 9em;\n}\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 10.5em;\n}\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 9em;\n}\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 10.5em;\n}\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 12em;\n}\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 13.5em;\n}\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 12em;\n}\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 13.5em;\n}\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 15em;\n}\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 16.5em;\n}\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 15em;\n}\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 16.5em;\n}\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 18em;\n}\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 19.5em;\n}\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 18em;\n}\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 19.5em;\n}\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 21em;\n}\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 22.5em;\n}\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 21em;\n}\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 22.5em;\n}\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 24em;\n}\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 25.5em;\n}\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 24em;\n}\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 25.5em;\n}\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 27em;\n}\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 28.5em;\n}\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 27em;\n}\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 28.5em;\n}\n.ql-editor .ql-video {\n display: block;\n max-width: 100%;\n}\n.ql-editor .ql-video.ql-align-center {\n margin: 0 auto;\n}\n.ql-editor .ql-video.ql-align-right {\n margin: 0 0 0 auto;\n}\n.ql-editor .ql-bg-black {\n background-color: #000;\n}\n.ql-editor .ql-bg-red {\n background-color: #e60000;\n}\n.ql-editor .ql-bg-orange {\n background-color: #f90;\n}\n.ql-editor .ql-bg-yellow {\n background-color: #ff0;\n}\n.ql-editor .ql-bg-green {\n background-color: #008a00;\n}\n.ql-editor .ql-bg-blue {\n background-color: #06c;\n}\n.ql-editor .ql-bg-purple {\n background-color: #93f;\n}\n.ql-editor .ql-color-white {\n color: #fff;\n}\n.ql-editor .ql-color-red {\n color: #e60000;\n}\n.ql-editor .ql-color-orange {\n color: #f90;\n}\n.ql-editor .ql-color-yellow {\n color: #ff0;\n}\n.ql-editor .ql-color-green {\n color: #008a00;\n}\n.ql-editor .ql-color-blue {\n color: #06c;\n}\n.ql-editor .ql-color-purple {\n color: #93f;\n}\n.ql-editor .ql-font-serif {\n font-family: Georgia, Times New Roman, serif;\n}\n.ql-editor .ql-font-monospace {\n font-family: Monaco, Courier New, monospace;\n}\n.ql-editor .ql-size-small {\n font-size: 0.75em;\n}\n.ql-editor .ql-size-large {\n font-size: 1.5em;\n}\n.ql-editor .ql-size-huge {\n font-size: 2.5em;\n}\n.ql-editor .ql-direction-rtl {\n direction: rtl;\n text-align: inherit;\n}\n.ql-editor .ql-align-center {\n text-align: center;\n}\n.ql-editor .ql-align-justify {\n text-align: justify;\n}\n.ql-editor .ql-align-right {\n text-align: right;\n}\n.ql-editor.ql-blank::before {\n color: rgba(0,0,0,0.6);\n content: attr(data-placeholder);\n font-style: italic;\n left: 15px;\n pointer-events: none;\n position: absolute;\n right: 15px;\n}\n"],"sourceRoot":""}]);
|
||
|
||
// exports
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1559:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
exports = module.exports = __webpack_require__(316)(true);
|
||
// imports
|
||
|
||
|
||
// module
|
||
exports.push([module.i, "/*!\n * Quill Editor v1.3.7\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */.ql-container{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;-o-tab-size:4;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6,.ql-editor ol,.ql-editor p,.ql-editor pre,.ql-editor ul{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:\"\\2022\"}.ql-editor ul[data-checked=false],.ql-editor ul[data-checked=true]{pointer-events:none}.ql-editor ul[data-checked=false]>li *,.ql-editor ul[data-checked=true]>li *{pointer-events:all}.ql-editor ul[data-checked=false]>li:before,.ql-editor ul[data-checked=true]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:\"\\2611\"}.ql-editor ul[data-checked=false]>li:before{content:\"\\2610\"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) \". \"}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) \". \"}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) \". \"}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) \". \"}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) \". \"}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) \". \"}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) \". \"}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) \". \"}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) \". \"}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) \". \"}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:rgba(0,0,0,.6);content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:\"\";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover{color:#06c}.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:focus .ql-fill,.ql-snow .ql-toolbar button:focus .ql-fill,.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill{fill:#06c}.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar button:focus .ql-stroke,.ql-snow .ql-toolbar button:focus .ql-stroke,.ql-snow.ql-toolbar button:focus .ql-stroke-miter,.ql-snow .ql-toolbar button:focus .ql-stroke-miter,.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke-miter{stroke:#06c}@media (pointer:coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#444}}.ql-snow,.ql-snow *{-webkit-box-sizing:border-box;box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;-webkit-transform:translateY(10px);-ms-transform:translateY(10px);transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{-webkit-transform:translateY(-10px);-ms-transform:translateY(-10px);transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:\"\";display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-stroke.ql-thin,.ql-snow .ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=\"\"]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-item:before,.ql-snow .ql-picker.ql-header .ql-picker-label:before{content:\"Normal\"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"1\"]:before{content:\"Heading 1\"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"2\"]:before{content:\"Heading 2\"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"3\"]:before{content:\"Heading 3\"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"4\"]:before{content:\"Heading 4\"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"5\"]:before{content:\"Heading 5\"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"6\"]:before{content:\"Heading 6\"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-item:before,.ql-snow .ql-picker.ql-font .ql-picker-label:before{content:\"Sans Serif\"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before{content:\"Serif\"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before{content:\"Monospace\"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-item:before,.ql-snow .ql-picker.ql-size .ql-picker-label:before{content:\"Normal\"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before{content:\"Small\"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before{content:\"Large\"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before{content:\"Huge\"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #ccc;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;-webkit-box-shadow:rgba(0,0,0,.2) 0 2px 8px;box-shadow:0 2px 8px rgba(0,0,0,.2)}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:0 0 5px #ddd;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip:before{content:\"Visit URL:\";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #ccc;content:\"Edit\";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:\"Remove\";margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0;content:\"Save\";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:\"Enter link:\"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:\"Enter formula:\"}.ql-snow .ql-tooltip[data-mode=video]:before{content:\"Enter video:\"}.ql-snow a{color:#06c}.ql-container.ql-snow{border:1px solid #ccc}", "", {"version":3,"sources":["/Users/hs/forgeplus-react/node_modules/quill/dist/quill.snow.css"],"names":[],"mappings":"AAAA;;;;;GAKG,AACH,cACE,8BAA+B,AACvB,sBAAuB,AAC/B,uCAA0C,AAC1C,eAAgB,AAChB,YAAa,AACb,SAAY,AACZ,iBAAmB,CACpB,AACD,sCACE,iBAAmB,CACpB,AACD,gEACE,mBAAqB,CACtB,AACD,cACE,eAAgB,AAChB,WAAY,AACZ,kBAAmB,AACnB,kBAAmB,AACnB,OAAS,CACV,AACD,gBACE,SAAU,AACV,SAAW,CACZ,AACD,WACE,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAkB,AAClB,YAAa,AACb,aAAc,AACd,gBAAiB,AACjB,kBAAmB,AACnB,cAAe,AACZ,WAAY,AACf,gBAAiB,AACjB,gBAAiB,AACjB,qBAAsB,AACtB,oBAAsB,CACvB,AACD,aACE,WAAa,CACd,AACD,kKAWE,SAAU,AACV,UAAW,AACX,4EAA8E,CAC/E,AACD,4BAEE,kBAAoB,CACrB,AACD,kCAEE,oBAAsB,CACvB,AACD,wBACE,eAAiB,CAClB,AACD,mEAEE,mBAAqB,CACtB,AACD,6EAEE,kBAAoB,CACrB,AACD,uFAEE,WAAY,AACZ,eAAgB,AAChB,kBAAoB,CACrB,AACD,2CACE,eAAiB,CAClB,AACD,4CACE,eAAiB,CAClB,AACD,qBACE,qBAAsB,AACtB,mBAAoB,AACpB,WAAa,CACd,AACD,4CACE,mBAAoB,AACpB,kBAAoB,AACpB,gBAAkB,CACnB,AACD,sCACE,iBAAmB,AACnB,mBAAqB,CACtB,AACD,gFAEE,kBAAoB,CACrB,AACD,oEAEE,mBAAqB,CACtB,AACD,iBACE,6EAA8E,AAC9E,wBAA0B,CAC3B,AACD,wBACE,oCAAuC,CACxC,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,qEAAuE,CACxE,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,8DAAgE,CACjE,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,oCAAuC,CACxC,AACD,6BACE,uDAAyD,CAC1D,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,gDAAkD,CACnD,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,yCAA2C,CAC5C,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,oCAAuC,CACxC,AACD,6BACE,kCAAoC,CACrC,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,2BAA6B,CAC9B,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,oBAAsB,CACvB,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,oCAAuC,CACxC,AACD,+CACE,gBAAkB,CACnB,AACD,iDACE,kBAAoB,CACrB,AACD,wDACE,iBAAmB,CACpB,AACD,0DACE,mBAAqB,CACtB,AACD,+CACE,gBAAkB,CACnB,AACD,iDACE,kBAAoB,CACrB,AACD,wDACE,iBAAmB,CACpB,AACD,0DACE,mBAAqB,CACtB,AACD,+CACE,gBAAkB,CACnB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,iBAAmB,CACpB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,qBACE,cAAe,AACf,cAAgB,CACjB,AACD,qCACE,aAAe,CAChB,AACD,oCACE,iBAAmB,CACpB,AACD,wBACE,qBAAuB,CACxB,AACD,sBACE,wBAA0B,CAC3B,AACD,yBACE,qBAAuB,CACxB,AACD,yBACE,qBAAuB,CACxB,AACD,wBACE,wBAA0B,CAC3B,AACD,uBACE,qBAAuB,CACxB,AACD,yBACE,qBAAuB,CACxB,AACD,2BACE,UAAY,CACb,AACD,yBACE,aAAe,CAChB,AACD,4BACE,UAAY,CACb,AACD,4BACE,UAAY,CACb,AACD,2BACE,aAAe,CAChB,AACD,0BACE,UAAY,CACb,AACD,4BACE,UAAY,CACb,AACD,0BACE,yCAA6C,CAC9C,AACD,8BACE,wCAA4C,CAC7C,AACD,0BACE,eAAkB,CACnB,AACD,0BACE,eAAiB,CAClB,AACD,yBACE,eAAiB,CAClB,AACD,6BACE,cAAe,AACf,kBAAoB,CACrB,AACD,4BACE,iBAAmB,CACpB,AACD,6BACE,kBAAoB,CACrB,AACD,2BACE,gBAAkB,CACnB,AACD,2BACE,qBAAuB,AACvB,+BAAgC,AAChC,kBAAmB,AACnB,UAAW,AACX,oBAAqB,AACrB,kBAAmB,AACnB,UAAY,CACb,AACD,qDAEE,WAAY,AACZ,WAAY,AACZ,aAAe,CAChB,AACD,uDAEE,gBAAiB,AACjB,YAAa,AACb,eAAgB,AAChB,qBAAsB,AACtB,WAAY,AACZ,YAAa,AACb,gBAAiB,AACjB,UAAY,CACb,AACD,+DAEE,WAAY,AACZ,WAAa,CACd,AACD,iFAEE,YAAc,CACf,AACD,6FAEE,YAAc,CACf,AACD,6jBAcE,UAAY,CACb,AACD,kgDA4BE,SAAW,CACZ,AACD,kgDA4BE,WAAa,CACd,AACD,wBACE,mGAEE,UAAY,CACb,AACD,8PAIE,SAAW,CACZ,AACD,8PAIE,WAAa,CACd,CACF,AAKD,oBACE,8BAA+B,AACvB,qBAAuB,CAChC,AACD,oBACE,YAAc,CACf,AACD,6CAEE,iBAAmB,CACpB,AACD,qBACE,kBAAmB,AACnB,mCAAoC,AAChC,+BAAgC,AAC5B,0BAA4B,CACrC,AACD,uBACE,eAAgB,AAChB,oBAAsB,CACvB,AACD,6BACE,oCAAqC,AACjC,gCAAiC,AAC7B,2BAA6B,CACtC,AACD,qBACE,qBAAsB,AACtB,qBAAuB,CACxB,AACD,2BACE,WAAY,AACZ,WAAY,AACZ,aAAe,CAChB,AACD,oBACE,UAAW,AACX,YAAa,AACb,qBAAsB,AACtB,sBAAuB,AACvB,cAAgB,CACjB,AACD,0BACE,UAAW,AACX,YAAa,AACb,qBAAsB,AACtB,cAAgB,CACjB,AACD,8CAEE,SAAW,CACZ,AACD,mBACE,SAAW,CACZ,AACD,kBACE,iBAAmB,CACpB,AACD,8CAEE,cAAgB,CACjB,AACD,yBACE,UAAa,CACd,AACD,sCACE,YAAc,CACf,AACD,gDACE,cAAgB,CACjB,AACD,iDACE,YAAc,CACf,AACD,uBACE,aAAe,CAChB,AACD,uBACE,eAAiB,CAClB,AACD,uBACE,gBAAkB,CACnB,AACD,uBACE,aAAe,CAChB,AACD,uBACE,eAAkB,CACnB,AACD,uBACE,eAAkB,CACnB,AACD,sBACE,yBAA2B,CAC5B,AACD,+BACE,2BAA4B,AAC5B,kBAAmB,AACnB,eAAgB,AAChB,iBAAmB,CACpB,AACD,iDAEE,yBAA0B,AAC1B,iBAAmB,CACpB,AACD,wBACE,qBAAsB,AACtB,kBAAmB,AACnB,eAAgB,AAChB,gBAAkB,CACnB,AACD,yBACE,cAAe,AACf,eAAiB,CAClB,AACD,kCACE,yBAA0B,AAC1B,cAAe,AACf,gBAAkB,CACnB,AACD,wBACE,cAAgB,CACjB,AACD,oBACE,WAAY,AACZ,qBAAsB,AACtB,WAAY,AACZ,eAAgB,AAChB,gBAAiB,AACjB,YAAa,AACb,kBAAmB,AACnB,qBAAuB,CACxB,AACD,0BACE,eAAgB,AAChB,qBAAsB,AACtB,YAAa,AACb,iBAAkB,AAClB,kBAAmB,AACnB,kBAAmB,AACnB,UAAY,CACb,AACD,iCACE,qBAAsB,AACtB,gBAAkB,CACnB,AACD,4BACE,sBAAuB,AACvB,aAAc,AACd,eAAgB,AAChB,gBAAiB,AACjB,kBAAmB,AACnB,kBAAoB,CACrB,AACD,4CACE,eAAgB,AAChB,cAAe,AACf,mBAAoB,AACpB,eAAiB,CAClB,AACD,iDACE,WAAY,AACZ,SAAW,CACZ,AACD,0DACE,SAAW,CACZ,AACD,4DACE,WAAa,CACd,AACD,mDACE,cAAe,AACf,gBAAiB,AACjB,SAAU,AACV,SAAW,CACZ,AACD,mDAEE,UAAY,CACb,AACD,qFAEE,eAAiB,CAClB,AACD,6FAEE,SAAW,CACZ,AACD,4CACE,aAAiB,CAClB,AACD,yCACE,YAAa,AACb,WAAY,AACZ,eAAiB,CAClB,AACD,6CACE,gBAAiB,AACjB,WAAa,CACd,AACD,0CACE,6BAA8B,AAC9B,WAAY,AACZ,YAAa,AACb,WAAY,AACZ,UAAa,AACb,UAAY,CACb,AACD,mEACE,kBAAmB,AACnB,gBAAiB,AACjB,QAAS,AACT,QAAS,AACT,UAAY,CACb,AACD,+fAME,wBAA0B,CAC3B,AACD,8BACE,UAAY,CACb,AACD,2GAEE,gBAAkB,CACnB,AACD,2IAEE,mBAAqB,CACtB,AACD,2IAEE,mBAAqB,CACtB,AACD,2IAEE,mBAAqB,CACtB,AACD,2IAEE,mBAAqB,CACtB,AACD,2IAEE,mBAAqB,CACtB,AACD,2IAEE,mBAAqB,CACtB,AACD,qEACE,aAAe,CAChB,AACD,qEACE,eAAiB,CAClB,AACD,qEACE,gBAAkB,CACnB,AACD,qEACE,aAAe,CAChB,AACD,qEACE,eAAkB,CACnB,AACD,qEACE,eAAkB,CACnB,AACD,4BACE,WAAa,CACd,AACD,uGAEE,oBAAsB,CACvB,AACD,2IAEE,eAAiB,CAClB,AACD,mJAEE,mBAAqB,CACtB,AACD,qEACE,yCAA6C,CAC9C,AACD,yEACE,wCAA4C,CAC7C,AACD,4BACE,UAAY,CACb,AACD,uGAEE,gBAAkB,CACnB,AACD,2IAEE,eAAiB,CAClB,AACD,2IAEE,eAAiB,CAClB,AACD,yIAEE,cAAgB,CACjB,AACD,qEACE,cAAgB,CACjB,AACD,qEACE,cAAgB,CACjB,AACD,oEACE,cAAgB,CACjB,AACD,wDACE,qBAAuB,CACxB,AACD,mDACE,qBAAuB,CACxB,AACD,oBACE,sBAAuB,AACvB,8BAA+B,AACvB,sBAAuB,AAC/B,sDAAgE,AAChE,WAAa,CACd,AACD,gCACE,iBAAmB,CACpB,AACD,qCACE,4BAA8B,CAC/B,AACD,uCACE,6BAA8B,AAC9B,4CAA8C,AACtC,mCAAsC,CAC/C,AAID,0HACE,iBAAmB,CACpB,AACD,4HAEE,iBAAmB,CACpB,AACD,0CACE,YAAgB,CACjB,AACD,qBACE,sBAAuB,AACvB,sBAAuB,AACvB,gCAAqC,AAC7B,wBAA6B,AACrC,WAAY,AACZ,iBAAkB,AAClB,kBAAoB,CACrB,AACD,4BACE,qBAAsB,AACtB,iBAAkB,AAClB,gBAAkB,CACnB,AACD,sCACE,aAAc,AACd,sBAAuB,AACvB,eAAgB,AAChB,YAAa,AACb,SAAY,AACZ,gBAAiB,AACjB,WAAa,CACd,AACD,kCACE,qBAAsB,AACtB,gBAAiB,AACjB,kBAAmB,AACnB,0BAA2B,AACxB,uBAAwB,AAC3B,kBAAoB,CACrB,AACD,uCACE,4BAA6B,AAC7B,eAAgB,AAChB,iBAAkB,AAClB,iBAAmB,CACpB,AACD,wCACE,iBAAkB,AAClB,eAAiB,CAClB,AACD,uBACE,gBAAkB,CACnB,AACD,yFAEE,YAAc,CACf,AACD,iDACE,oBAAsB,CACvB,AACD,kDACE,eAAkB,AAClB,eAAgB,AAChB,eAAmB,CACpB,AACD,4CACE,qBAAuB,CACxB,AACD,+CACE,wBAA0B,CAC3B,AACD,6CACE,sBAAwB,CACzB,AACD,WACE,UAAY,CACb,AACD,sBACE,qBAAuB,CACxB","file":"quill.snow.css","sourcesContent":["/*!\n * Quill Editor v1.3.7\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */\n.ql-container {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n font-family: Helvetica, Arial, sans-serif;\n font-size: 13px;\n height: 100%;\n margin: 0px;\n position: relative;\n}\n.ql-container.ql-disabled .ql-tooltip {\n visibility: hidden;\n}\n.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {\n pointer-events: none;\n}\n.ql-clipboard {\n left: -100000px;\n height: 1px;\n overflow-y: hidden;\n position: absolute;\n top: 50%;\n}\n.ql-clipboard p {\n margin: 0;\n padding: 0;\n}\n.ql-editor {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n line-height: 1.42;\n height: 100%;\n outline: none;\n overflow-y: auto;\n padding: 12px 15px;\n -o-tab-size: 4;\n tab-size: 4;\n -moz-tab-size: 4;\n text-align: left;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n.ql-editor > * {\n cursor: text;\n}\n.ql-editor p,\n.ql-editor ol,\n.ql-editor ul,\n.ql-editor pre,\n.ql-editor blockquote,\n.ql-editor h1,\n.ql-editor h2,\n.ql-editor h3,\n.ql-editor h4,\n.ql-editor h5,\n.ql-editor h6 {\n margin: 0;\n padding: 0;\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol,\n.ql-editor ul {\n padding-left: 1.5em;\n}\n.ql-editor ol > li,\n.ql-editor ul > li {\n list-style-type: none;\n}\n.ql-editor ul > li::before {\n content: '\\2022';\n}\n.ql-editor ul[data-checked=true],\n.ql-editor ul[data-checked=false] {\n pointer-events: none;\n}\n.ql-editor ul[data-checked=true] > li *,\n.ql-editor ul[data-checked=false] > li * {\n pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before,\n.ql-editor ul[data-checked=false] > li::before {\n color: #777;\n cursor: pointer;\n pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before {\n content: '\\2611';\n}\n.ql-editor ul[data-checked=false] > li::before {\n content: '\\2610';\n}\n.ql-editor li::before {\n display: inline-block;\n white-space: nowrap;\n width: 1.2em;\n}\n.ql-editor li:not(.ql-direction-rtl)::before {\n margin-left: -1.5em;\n margin-right: 0.3em;\n text-align: right;\n}\n.ql-editor li.ql-direction-rtl::before {\n margin-left: 0.3em;\n margin-right: -1.5em;\n}\n.ql-editor ol li:not(.ql-direction-rtl),\n.ql-editor ul li:not(.ql-direction-rtl) {\n padding-left: 1.5em;\n}\n.ql-editor ol li.ql-direction-rtl,\n.ql-editor ul li.ql-direction-rtl {\n padding-right: 1.5em;\n}\n.ql-editor ol li {\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n counter-increment: list-0;\n}\n.ql-editor ol li:before {\n content: counter(list-0, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n counter-increment: list-1;\n}\n.ql-editor ol li.ql-indent-1:before {\n content: counter(list-1, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-2 {\n counter-increment: list-2;\n}\n.ql-editor ol li.ql-indent-2:before {\n content: counter(list-2, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-2 {\n counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-3 {\n counter-increment: list-3;\n}\n.ql-editor ol li.ql-indent-3:before {\n content: counter(list-3, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-3 {\n counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-4 {\n counter-increment: list-4;\n}\n.ql-editor ol li.ql-indent-4:before {\n content: counter(list-4, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-4 {\n counter-reset: list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-5 {\n counter-increment: list-5;\n}\n.ql-editor ol li.ql-indent-5:before {\n content: counter(list-5, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-5 {\n counter-reset: list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-6 {\n counter-increment: list-6;\n}\n.ql-editor ol li.ql-indent-6:before {\n content: counter(list-6, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-6 {\n counter-reset: list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-7 {\n counter-increment: list-7;\n}\n.ql-editor ol li.ql-indent-7:before {\n content: counter(list-7, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-7 {\n counter-reset: list-8 list-9;\n}\n.ql-editor ol li.ql-indent-8 {\n counter-increment: list-8;\n}\n.ql-editor ol li.ql-indent-8:before {\n content: counter(list-8, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-8 {\n counter-reset: list-9;\n}\n.ql-editor ol li.ql-indent-9 {\n counter-increment: list-9;\n}\n.ql-editor ol li.ql-indent-9:before {\n content: counter(list-9, decimal) '. ';\n}\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 3em;\n}\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 4.5em;\n}\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 3em;\n}\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 4.5em;\n}\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 6em;\n}\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 7.5em;\n}\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 6em;\n}\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 7.5em;\n}\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 9em;\n}\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 10.5em;\n}\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 9em;\n}\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 10.5em;\n}\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 12em;\n}\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 13.5em;\n}\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 12em;\n}\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 13.5em;\n}\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 15em;\n}\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 16.5em;\n}\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 15em;\n}\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 16.5em;\n}\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 18em;\n}\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 19.5em;\n}\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 18em;\n}\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 19.5em;\n}\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 21em;\n}\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 22.5em;\n}\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 21em;\n}\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 22.5em;\n}\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 24em;\n}\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 25.5em;\n}\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 24em;\n}\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 25.5em;\n}\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 27em;\n}\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 28.5em;\n}\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 27em;\n}\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 28.5em;\n}\n.ql-editor .ql-video {\n display: block;\n max-width: 100%;\n}\n.ql-editor .ql-video.ql-align-center {\n margin: 0 auto;\n}\n.ql-editor .ql-video.ql-align-right {\n margin: 0 0 0 auto;\n}\n.ql-editor .ql-bg-black {\n background-color: #000;\n}\n.ql-editor .ql-bg-red {\n background-color: #e60000;\n}\n.ql-editor .ql-bg-orange {\n background-color: #f90;\n}\n.ql-editor .ql-bg-yellow {\n background-color: #ff0;\n}\n.ql-editor .ql-bg-green {\n background-color: #008a00;\n}\n.ql-editor .ql-bg-blue {\n background-color: #06c;\n}\n.ql-editor .ql-bg-purple {\n background-color: #93f;\n}\n.ql-editor .ql-color-white {\n color: #fff;\n}\n.ql-editor .ql-color-red {\n color: #e60000;\n}\n.ql-editor .ql-color-orange {\n color: #f90;\n}\n.ql-editor .ql-color-yellow {\n color: #ff0;\n}\n.ql-editor .ql-color-green {\n color: #008a00;\n}\n.ql-editor .ql-color-blue {\n color: #06c;\n}\n.ql-editor .ql-color-purple {\n color: #93f;\n}\n.ql-editor .ql-font-serif {\n font-family: Georgia, Times New Roman, serif;\n}\n.ql-editor .ql-font-monospace {\n font-family: Monaco, Courier New, monospace;\n}\n.ql-editor .ql-size-small {\n font-size: 0.75em;\n}\n.ql-editor .ql-size-large {\n font-size: 1.5em;\n}\n.ql-editor .ql-size-huge {\n font-size: 2.5em;\n}\n.ql-editor .ql-direction-rtl {\n direction: rtl;\n text-align: inherit;\n}\n.ql-editor .ql-align-center {\n text-align: center;\n}\n.ql-editor .ql-align-justify {\n text-align: justify;\n}\n.ql-editor .ql-align-right {\n text-align: right;\n}\n.ql-editor.ql-blank::before {\n color: rgba(0,0,0,0.6);\n content: attr(data-placeholder);\n font-style: italic;\n left: 15px;\n pointer-events: none;\n position: absolute;\n right: 15px;\n}\n.ql-snow.ql-toolbar:after,\n.ql-snow .ql-toolbar:after {\n clear: both;\n content: '';\n display: table;\n}\n.ql-snow.ql-toolbar button,\n.ql-snow .ql-toolbar button {\n background: none;\n border: none;\n cursor: pointer;\n display: inline-block;\n float: left;\n height: 24px;\n padding: 3px 5px;\n width: 28px;\n}\n.ql-snow.ql-toolbar button svg,\n.ql-snow .ql-toolbar button svg {\n float: left;\n height: 100%;\n}\n.ql-snow.ql-toolbar button:active:hover,\n.ql-snow .ql-toolbar button:active:hover {\n outline: none;\n}\n.ql-snow.ql-toolbar input.ql-image[type=file],\n.ql-snow .ql-toolbar input.ql-image[type=file] {\n display: none;\n}\n.ql-snow.ql-toolbar button:hover,\n.ql-snow .ql-toolbar button:hover,\n.ql-snow.ql-toolbar button:focus,\n.ql-snow .ql-toolbar button:focus,\n.ql-snow.ql-toolbar button.ql-active,\n.ql-snow .ql-toolbar button.ql-active,\n.ql-snow.ql-toolbar .ql-picker-label:hover,\n.ql-snow .ql-toolbar .ql-picker-label:hover,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active,\n.ql-snow.ql-toolbar .ql-picker-item:hover,\n.ql-snow .ql-toolbar .ql-picker-item:hover,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected {\n color: #06c;\n}\n.ql-snow.ql-toolbar button:hover .ql-fill,\n.ql-snow .ql-toolbar button:hover .ql-fill,\n.ql-snow.ql-toolbar button:focus .ql-fill,\n.ql-snow .ql-toolbar button:focus .ql-fill,\n.ql-snow.ql-toolbar button.ql-active .ql-fill,\n.ql-snow .ql-toolbar button.ql-active .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,\n.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {\n fill: #06c;\n}\n.ql-snow.ql-toolbar button:hover .ql-stroke,\n.ql-snow .ql-toolbar button:hover .ql-stroke,\n.ql-snow.ql-toolbar button:focus .ql-stroke,\n.ql-snow .ql-toolbar button:focus .ql-stroke,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\n.ql-snow.ql-toolbar button:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar button:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar button:focus .ql-stroke-miter,\n.ql-snow .ql-toolbar button:focus .ql-stroke-miter,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {\n stroke: #06c;\n}\n@media (pointer: coarse) {\n .ql-snow.ql-toolbar button:hover:not(.ql-active),\n .ql-snow .ql-toolbar button:hover:not(.ql-active) {\n color: #444;\n }\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {\n fill: #444;\n }\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {\n stroke: #444;\n }\n}\n.ql-snow {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ql-snow * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ql-snow .ql-hidden {\n display: none;\n}\n.ql-snow .ql-out-bottom,\n.ql-snow .ql-out-top {\n visibility: hidden;\n}\n.ql-snow .ql-tooltip {\n position: absolute;\n -webkit-transform: translateY(10px);\n -ms-transform: translateY(10px);\n transform: translateY(10px);\n}\n.ql-snow .ql-tooltip a {\n cursor: pointer;\n text-decoration: none;\n}\n.ql-snow .ql-tooltip.ql-flip {\n -webkit-transform: translateY(-10px);\n -ms-transform: translateY(-10px);\n transform: translateY(-10px);\n}\n.ql-snow .ql-formats {\n display: inline-block;\n vertical-align: middle;\n}\n.ql-snow .ql-formats:after {\n clear: both;\n content: '';\n display: table;\n}\n.ql-snow .ql-stroke {\n fill: none;\n stroke: #444;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 2;\n}\n.ql-snow .ql-stroke-miter {\n fill: none;\n stroke: #444;\n stroke-miterlimit: 10;\n stroke-width: 2;\n}\n.ql-snow .ql-fill,\n.ql-snow .ql-stroke.ql-fill {\n fill: #444;\n}\n.ql-snow .ql-empty {\n fill: none;\n}\n.ql-snow .ql-even {\n fill-rule: evenodd;\n}\n.ql-snow .ql-thin,\n.ql-snow .ql-stroke.ql-thin {\n stroke-width: 1;\n}\n.ql-snow .ql-transparent {\n opacity: 0.4;\n}\n.ql-snow .ql-direction svg:last-child {\n display: none;\n}\n.ql-snow .ql-direction.ql-active svg:last-child {\n display: inline;\n}\n.ql-snow .ql-direction.ql-active svg:first-child {\n display: none;\n}\n.ql-snow .ql-editor h1 {\n font-size: 2em;\n}\n.ql-snow .ql-editor h2 {\n font-size: 1.5em;\n}\n.ql-snow .ql-editor h3 {\n font-size: 1.17em;\n}\n.ql-snow .ql-editor h4 {\n font-size: 1em;\n}\n.ql-snow .ql-editor h5 {\n font-size: 0.83em;\n}\n.ql-snow .ql-editor h6 {\n font-size: 0.67em;\n}\n.ql-snow .ql-editor a {\n text-decoration: underline;\n}\n.ql-snow .ql-editor blockquote {\n border-left: 4px solid #ccc;\n margin-bottom: 5px;\n margin-top: 5px;\n padding-left: 16px;\n}\n.ql-snow .ql-editor code,\n.ql-snow .ql-editor pre {\n background-color: #f0f0f0;\n border-radius: 3px;\n}\n.ql-snow .ql-editor pre {\n white-space: pre-wrap;\n margin-bottom: 5px;\n margin-top: 5px;\n padding: 5px 10px;\n}\n.ql-snow .ql-editor code {\n font-size: 85%;\n padding: 2px 4px;\n}\n.ql-snow .ql-editor pre.ql-syntax {\n background-color: #23241f;\n color: #f8f8f2;\n overflow: visible;\n}\n.ql-snow .ql-editor img {\n max-width: 100%;\n}\n.ql-snow .ql-picker {\n color: #444;\n display: inline-block;\n float: left;\n font-size: 14px;\n font-weight: 500;\n height: 24px;\n position: relative;\n vertical-align: middle;\n}\n.ql-snow .ql-picker-label {\n cursor: pointer;\n display: inline-block;\n height: 100%;\n padding-left: 8px;\n padding-right: 2px;\n position: relative;\n width: 100%;\n}\n.ql-snow .ql-picker-label::before {\n display: inline-block;\n line-height: 22px;\n}\n.ql-snow .ql-picker-options {\n background-color: #fff;\n display: none;\n min-width: 100%;\n padding: 4px 8px;\n position: absolute;\n white-space: nowrap;\n}\n.ql-snow .ql-picker-options .ql-picker-item {\n cursor: pointer;\n display: block;\n padding-bottom: 5px;\n padding-top: 5px;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label {\n color: #ccc;\n z-index: 2;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill {\n fill: #ccc;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke {\n stroke: #ccc;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-options {\n display: block;\n margin-top: -1px;\n top: 100%;\n z-index: 1;\n}\n.ql-snow .ql-color-picker,\n.ql-snow .ql-icon-picker {\n width: 28px;\n}\n.ql-snow .ql-color-picker .ql-picker-label,\n.ql-snow .ql-icon-picker .ql-picker-label {\n padding: 2px 4px;\n}\n.ql-snow .ql-color-picker .ql-picker-label svg,\n.ql-snow .ql-icon-picker .ql-picker-label svg {\n right: 4px;\n}\n.ql-snow .ql-icon-picker .ql-picker-options {\n padding: 4px 0px;\n}\n.ql-snow .ql-icon-picker .ql-picker-item {\n height: 24px;\n width: 24px;\n padding: 2px 4px;\n}\n.ql-snow .ql-color-picker .ql-picker-options {\n padding: 3px 5px;\n width: 152px;\n}\n.ql-snow .ql-color-picker .ql-picker-item {\n border: 1px solid transparent;\n float: left;\n height: 16px;\n margin: 2px;\n padding: 0px;\n width: 16px;\n}\n.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {\n position: absolute;\n margin-top: -9px;\n right: 0;\n top: 50%;\n width: 18px;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {\n content: attr(data-label);\n}\n.ql-snow .ql-picker.ql-header {\n width: 98px;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item::before {\n content: 'Normal';\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"1\"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before {\n content: 'Heading 1';\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"2\"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before {\n content: 'Heading 2';\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"3\"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before {\n content: 'Heading 3';\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"4\"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before {\n content: 'Heading 4';\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"5\"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before {\n content: 'Heading 5';\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"6\"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before {\n content: 'Heading 6';\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before {\n font-size: 2em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before {\n font-size: 1.5em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before {\n font-size: 1.17em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before {\n font-size: 1em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before {\n font-size: 0.83em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before {\n font-size: 0.67em;\n}\n.ql-snow .ql-picker.ql-font {\n width: 108px;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item::before {\n content: 'Sans Serif';\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\n content: 'Serif';\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\n content: 'Monospace';\n}\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\n font-family: Georgia, Times New Roman, serif;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\n font-family: Monaco, Courier New, monospace;\n}\n.ql-snow .ql-picker.ql-size {\n width: 98px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item::before {\n content: 'Normal';\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\n content: 'Small';\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\n content: 'Large';\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\n content: 'Huge';\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\n font-size: 10px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\n font-size: 18px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\n font-size: 32px;\n}\n.ql-snow .ql-color-picker.ql-background .ql-picker-item {\n background-color: #fff;\n}\n.ql-snow .ql-color-picker.ql-color .ql-picker-item {\n background-color: #000;\n}\n.ql-toolbar.ql-snow {\n border: 1px solid #ccc;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;\n padding: 8px;\n}\n.ql-toolbar.ql-snow .ql-formats {\n margin-right: 15px;\n}\n.ql-toolbar.ql-snow .ql-picker-label {\n border: 1px solid transparent;\n}\n.ql-toolbar.ql-snow .ql-picker-options {\n border: 1px solid transparent;\n -webkit-box-shadow: rgba(0,0,0,0.2) 0 2px 8px;\n box-shadow: rgba(0,0,0,0.2) 0 2px 8px;\n}\n.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label {\n border-color: #ccc;\n}\n.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {\n border-color: #ccc;\n}\n.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,\n.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover {\n border-color: #000;\n}\n.ql-toolbar.ql-snow + .ql-container.ql-snow {\n border-top: 0px;\n}\n.ql-snow .ql-tooltip {\n background-color: #fff;\n border: 1px solid #ccc;\n -webkit-box-shadow: 0px 0px 5px #ddd;\n box-shadow: 0px 0px 5px #ddd;\n color: #444;\n padding: 5px 12px;\n white-space: nowrap;\n}\n.ql-snow .ql-tooltip::before {\n content: \"Visit URL:\";\n line-height: 26px;\n margin-right: 8px;\n}\n.ql-snow .ql-tooltip input[type=text] {\n display: none;\n border: 1px solid #ccc;\n font-size: 13px;\n height: 26px;\n margin: 0px;\n padding: 3px 5px;\n width: 170px;\n}\n.ql-snow .ql-tooltip a.ql-preview {\n display: inline-block;\n max-width: 200px;\n overflow-x: hidden;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n vertical-align: top;\n}\n.ql-snow .ql-tooltip a.ql-action::after {\n border-right: 1px solid #ccc;\n content: 'Edit';\n margin-left: 16px;\n padding-right: 8px;\n}\n.ql-snow .ql-tooltip a.ql-remove::before {\n content: 'Remove';\n margin-left: 8px;\n}\n.ql-snow .ql-tooltip a {\n line-height: 26px;\n}\n.ql-snow .ql-tooltip.ql-editing a.ql-preview,\n.ql-snow .ql-tooltip.ql-editing a.ql-remove {\n display: none;\n}\n.ql-snow .ql-tooltip.ql-editing input[type=text] {\n display: inline-block;\n}\n.ql-snow .ql-tooltip.ql-editing a.ql-action::after {\n border-right: 0px;\n content: 'Save';\n padding-right: 0px;\n}\n.ql-snow .ql-tooltip[data-mode=link]::before {\n content: \"Enter link:\";\n}\n.ql-snow .ql-tooltip[data-mode=formula]::before {\n content: \"Enter formula:\";\n}\n.ql-snow .ql-tooltip[data-mode=video]::before {\n content: \"Enter video:\";\n}\n.ql-snow a {\n color: #06c;\n}\n.ql-container.ql-snow {\n border: 1px solid #ccc;\n}\n"],"sourceRoot":""}]);
|
||
|
||
// exports
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1560:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
exports = module.exports = __webpack_require__(316)(true);
|
||
// imports
|
||
|
||
|
||
// module
|
||
exports.push([module.i, "/*!\n * Quill Editor v1.3.7\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */.ql-container{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;-o-tab-size:4;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6,.ql-editor ol,.ql-editor p,.ql-editor pre,.ql-editor ul{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:\"\\2022\"}.ql-editor ul[data-checked=false],.ql-editor ul[data-checked=true]{pointer-events:none}.ql-editor ul[data-checked=false]>li *,.ql-editor ul[data-checked=true]>li *{pointer-events:all}.ql-editor ul[data-checked=false]>li:before,.ql-editor ul[data-checked=true]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:\"\\2611\"}.ql-editor ul[data-checked=false]>li:before{content:\"\\2610\"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) \". \"}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) \". \"}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) \". \"}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) \". \"}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) \". \"}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) \". \"}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) \". \"}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) \". \"}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) \". \"}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) \". \"}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:rgba(0,0,0,.6);content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-bubble.ql-toolbar:after,.ql-bubble .ql-toolbar:after{clear:both;content:\"\";display:table}.ql-bubble.ql-toolbar button,.ql-bubble .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-bubble.ql-toolbar button svg,.ql-bubble .ql-toolbar button svg{float:left;height:100%}.ql-bubble.ql-toolbar button:active:hover,.ql-bubble .ql-toolbar button:active:hover{outline:none}.ql-bubble.ql-toolbar input.ql-image[type=file],.ql-bubble .ql-toolbar input.ql-image[type=file]{display:none}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected,.ql-bubble.ql-toolbar .ql-picker-item:hover,.ql-bubble .ql-toolbar .ql-picker-item:hover,.ql-bubble.ql-toolbar .ql-picker-label.ql-active,.ql-bubble .ql-toolbar .ql-picker-label.ql-active,.ql-bubble.ql-toolbar .ql-picker-label:hover,.ql-bubble .ql-toolbar .ql-picker-label:hover,.ql-bubble.ql-toolbar button.ql-active,.ql-bubble .ql-toolbar button.ql-active,.ql-bubble.ql-toolbar button:focus,.ql-bubble .ql-toolbar button:focus,.ql-bubble.ql-toolbar button:hover,.ql-bubble .ql-toolbar button:hover{color:#fff}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button.ql-active .ql-fill,.ql-bubble .ql-toolbar button.ql-active .ql-fill,.ql-bubble.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button:focus .ql-fill,.ql-bubble .ql-toolbar button:focus .ql-fill,.ql-bubble.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button:hover .ql-fill,.ql-bubble .ql-toolbar button:hover .ql-fill,.ql-bubble.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:hover .ql-stroke.ql-fill{fill:#fff}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-bubble.ql-toolbar button.ql-active .ql-stroke,.ql-bubble .ql-toolbar button.ql-active .ql-stroke,.ql-bubble.ql-toolbar button.ql-active .ql-stroke-miter,.ql-bubble .ql-toolbar button.ql-active .ql-stroke-miter,.ql-bubble.ql-toolbar button:focus .ql-stroke,.ql-bubble .ql-toolbar button:focus .ql-stroke,.ql-bubble.ql-toolbar button:focus .ql-stroke-miter,.ql-bubble .ql-toolbar button:focus .ql-stroke-miter,.ql-bubble.ql-toolbar button:hover .ql-stroke,.ql-bubble .ql-toolbar button:hover .ql-stroke,.ql-bubble.ql-toolbar button:hover .ql-stroke-miter,.ql-bubble .ql-toolbar button:hover .ql-stroke-miter{stroke:#fff}@media (pointer:coarse){.ql-bubble.ql-toolbar button:hover:not(.ql-active),.ql-bubble .ql-toolbar button:hover:not(.ql-active){color:#ccc}.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#ccc}.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#ccc}}.ql-bubble,.ql-bubble *{-webkit-box-sizing:border-box;box-sizing:border-box}.ql-bubble .ql-hidden{display:none}.ql-bubble .ql-out-bottom,.ql-bubble .ql-out-top{visibility:hidden}.ql-bubble .ql-tooltip{position:absolute;-webkit-transform:translateY(10px);-ms-transform:translateY(10px);transform:translateY(10px)}.ql-bubble .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-bubble .ql-tooltip.ql-flip{-webkit-transform:translateY(-10px);-ms-transform:translateY(-10px);transform:translateY(-10px)}.ql-bubble .ql-formats{display:inline-block;vertical-align:middle}.ql-bubble .ql-formats:after{clear:both;content:\"\";display:table}.ql-bubble .ql-stroke{fill:none;stroke:#ccc;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-bubble .ql-stroke-miter{fill:none;stroke:#ccc;stroke-miterlimit:10;stroke-width:2}.ql-bubble .ql-fill,.ql-bubble .ql-stroke.ql-fill{fill:#ccc}.ql-bubble .ql-empty{fill:none}.ql-bubble .ql-even{fill-rule:evenodd}.ql-bubble .ql-stroke.ql-thin,.ql-bubble .ql-thin{stroke-width:1}.ql-bubble .ql-transparent{opacity:.4}.ql-bubble .ql-direction svg:last-child{display:none}.ql-bubble .ql-direction.ql-active svg:last-child{display:inline}.ql-bubble .ql-direction.ql-active svg:first-child{display:none}.ql-bubble .ql-editor h1{font-size:2em}.ql-bubble .ql-editor h2{font-size:1.5em}.ql-bubble .ql-editor h3{font-size:1.17em}.ql-bubble .ql-editor h4{font-size:1em}.ql-bubble .ql-editor h5{font-size:.83em}.ql-bubble .ql-editor h6{font-size:.67em}.ql-bubble .ql-editor a{text-decoration:underline}.ql-bubble .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-bubble .ql-editor code,.ql-bubble .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-bubble .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-bubble .ql-editor code{font-size:85%;padding:2px 4px}.ql-bubble .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-bubble .ql-editor img{max-width:100%}.ql-bubble .ql-picker{color:#ccc;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-bubble .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-bubble .ql-picker-label:before{display:inline-block;line-height:22px}.ql-bubble .ql-picker-options{background-color:#444;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-bubble .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-bubble .ql-picker.ql-expanded .ql-picker-label{color:#777;z-index:2}.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#777}.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#777}.ql-bubble .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-bubble .ql-color-picker,.ql-bubble .ql-icon-picker{width:28px}.ql-bubble .ql-color-picker .ql-picker-label,.ql-bubble .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-bubble .ql-color-picker .ql-picker-label svg,.ql-bubble .ql-icon-picker .ql-picker-label svg{right:4px}.ql-bubble .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-bubble .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-bubble .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-bubble .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-bubble .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=\"\"]):before{content:attr(data-label)}.ql-bubble .ql-picker.ql-header{width:98px}.ql-bubble .ql-picker.ql-header .ql-picker-item:before,.ql-bubble .ql-picker.ql-header .ql-picker-label:before{content:\"Normal\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"1\"]:before{content:\"Heading 1\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"2\"]:before{content:\"Heading 2\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"3\"]:before{content:\"Heading 3\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"4\"]:before{content:\"Heading 4\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"5\"]:before{content:\"Heading 5\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"6\"]:before{content:\"Heading 6\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]:before{font-size:2em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]:before{font-size:1.5em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]:before{font-size:1.17em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]:before{font-size:1em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]:before{font-size:.83em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]:before{font-size:.67em}.ql-bubble .ql-picker.ql-font{width:108px}.ql-bubble .ql-picker.ql-font .ql-picker-item:before,.ql-bubble .ql-picker.ql-font .ql-picker-label:before{content:\"Sans Serif\"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]:before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=serif]:before{content:\"Serif\"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before{content:\"Monospace\"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-bubble .ql-picker.ql-size{width:98px}.ql-bubble .ql-picker.ql-size .ql-picker-item:before,.ql-bubble .ql-picker.ql-size .ql-picker-label:before{content:\"Normal\"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=small]:before{content:\"Small\"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=large]:before{content:\"Large\"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=huge]:before{content:\"Huge\"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-bubble .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-bubble .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-bubble .ql-toolbar .ql-formats{margin:8px 12px 8px 0}.ql-bubble .ql-toolbar .ql-formats:first-child{margin-left:12px}.ql-bubble .ql-color-picker svg{margin:1px}.ql-bubble .ql-color-picker .ql-picker-item.ql-selected,.ql-bubble .ql-color-picker .ql-picker-item:hover{border-color:#fff}.ql-bubble .ql-tooltip{background-color:#444;border-radius:25px;color:#fff}.ql-bubble .ql-tooltip-arrow{border-left:6px solid transparent;border-right:6px solid transparent;content:\" \";display:block;left:50%;margin-left:-6px;position:absolute}.ql-bubble .ql-tooltip:not(.ql-flip) .ql-tooltip-arrow{border-bottom:6px solid #444;top:-6px}.ql-bubble .ql-tooltip.ql-flip .ql-tooltip-arrow{border-top:6px solid #444;bottom:-6px}.ql-bubble .ql-tooltip.ql-editing .ql-tooltip-editor{display:block}.ql-bubble .ql-tooltip.ql-editing .ql-formats{visibility:hidden}.ql-bubble .ql-tooltip-editor{display:none}.ql-bubble .ql-tooltip-editor input[type=text]{background:transparent;border:none;color:#fff;font-size:13px;height:100%;outline:none;padding:10px 20px;position:absolute;width:100%}.ql-bubble .ql-tooltip-editor a{top:10px;position:absolute;right:20px}.ql-bubble .ql-tooltip-editor a:before{color:#ccc;content:\"\\D7\";font-size:16px;font-weight:700}.ql-container.ql-bubble:not(.ql-disabled) a{position:relative;white-space:nowrap}.ql-container.ql-bubble:not(.ql-disabled) a:before{background-color:#444;border-radius:15px;top:-5px;font-size:12px;color:#fff;content:attr(href);font-weight:400;overflow:hidden;padding:5px 15px;text-decoration:none;z-index:1}.ql-container.ql-bubble:not(.ql-disabled) a:after{border-top:6px solid #444;border-left:6px solid transparent;border-right:6px solid transparent;top:0;content:\" \";height:0;width:0}.ql-container.ql-bubble:not(.ql-disabled) a:after,.ql-container.ql-bubble:not(.ql-disabled) a:before{left:0;margin-left:50%;position:absolute;-webkit-transform:translate(-50%,-100%);-ms-transform:translate(-50%,-100%);transform:translate(-50%,-100%);-webkit-transition:visibility 0s ease .2s;-o-transition:visibility 0s ease .2s;transition:visibility 0s ease .2s;visibility:hidden}.ql-container.ql-bubble:not(.ql-disabled) a:hover:after,.ql-container.ql-bubble:not(.ql-disabled) a:hover:before{visibility:visible}", "", {"version":3,"sources":["/Users/hs/forgeplus-react/node_modules/quill/dist/quill.bubble.css"],"names":[],"mappings":"AAAA;;;;;GAKG,AACH,cACE,8BAA+B,AACvB,sBAAuB,AAC/B,uCAA0C,AAC1C,eAAgB,AAChB,YAAa,AACb,SAAY,AACZ,iBAAmB,CACpB,AACD,sCACE,iBAAmB,CACpB,AACD,gEACE,mBAAqB,CACtB,AACD,cACE,eAAgB,AAChB,WAAY,AACZ,kBAAmB,AACnB,kBAAmB,AACnB,OAAS,CACV,AACD,gBACE,SAAU,AACV,SAAW,CACZ,AACD,WACE,8BAA+B,AACvB,sBAAuB,AAC/B,iBAAkB,AAClB,YAAa,AACb,aAAc,AACd,gBAAiB,AACjB,kBAAmB,AACnB,cAAe,AACZ,WAAY,AACf,gBAAiB,AACjB,gBAAiB,AACjB,qBAAsB,AACtB,oBAAsB,CACvB,AACD,aACE,WAAa,CACd,AACD,kKAWE,SAAU,AACV,UAAW,AACX,4EAA8E,CAC/E,AACD,4BAEE,kBAAoB,CACrB,AACD,kCAEE,oBAAsB,CACvB,AACD,wBACE,eAAiB,CAClB,AACD,mEAEE,mBAAqB,CACtB,AACD,6EAEE,kBAAoB,CACrB,AACD,uFAEE,WAAY,AACZ,eAAgB,AAChB,kBAAoB,CACrB,AACD,2CACE,eAAiB,CAClB,AACD,4CACE,eAAiB,CAClB,AACD,qBACE,qBAAsB,AACtB,mBAAoB,AACpB,WAAa,CACd,AACD,4CACE,mBAAoB,AACpB,kBAAoB,AACpB,gBAAkB,CACnB,AACD,sCACE,iBAAmB,AACnB,mBAAqB,CACtB,AACD,gFAEE,kBAAoB,CACrB,AACD,oEAEE,mBAAqB,CACtB,AACD,iBACE,6EAA8E,AAC9E,wBAA0B,CAC3B,AACD,wBACE,oCAAuC,CACxC,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,qEAAuE,CACxE,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,8DAAgE,CACjE,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,oCAAuC,CACxC,AACD,6BACE,uDAAyD,CAC1D,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,gDAAkD,CACnD,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,yCAA2C,CAC5C,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,oCAAuC,CACxC,AACD,6BACE,kCAAoC,CACrC,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,2BAA6B,CAC9B,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,wCAA2C,CAC5C,AACD,6BACE,oBAAsB,CACvB,AACD,6BACE,wBAA0B,CAC3B,AACD,oCACE,oCAAuC,CACxC,AACD,+CACE,gBAAkB,CACnB,AACD,iDACE,kBAAoB,CACrB,AACD,wDACE,iBAAmB,CACpB,AACD,0DACE,mBAAqB,CACtB,AACD,+CACE,gBAAkB,CACnB,AACD,iDACE,kBAAoB,CACrB,AACD,wDACE,iBAAmB,CACpB,AACD,0DACE,mBAAqB,CACtB,AACD,+CACE,gBAAkB,CACnB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,iBAAmB,CACpB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,+CACE,iBAAmB,CACpB,AACD,iDACE,mBAAqB,CACtB,AACD,wDACE,kBAAoB,CACrB,AACD,0DACE,oBAAsB,CACvB,AACD,qBACE,cAAe,AACf,cAAgB,CACjB,AACD,qCACE,aAAe,CAChB,AACD,oCACE,iBAAmB,CACpB,AACD,wBACE,qBAAuB,CACxB,AACD,sBACE,wBAA0B,CAC3B,AACD,yBACE,qBAAuB,CACxB,AACD,yBACE,qBAAuB,CACxB,AACD,wBACE,wBAA0B,CAC3B,AACD,uBACE,qBAAuB,CACxB,AACD,yBACE,qBAAuB,CACxB,AACD,2BACE,UAAY,CACb,AACD,yBACE,aAAe,CAChB,AACD,4BACE,UAAY,CACb,AACD,4BACE,UAAY,CACb,AACD,2BACE,aAAe,CAChB,AACD,0BACE,UAAY,CACb,AACD,4BACE,UAAY,CACb,AACD,0BACE,yCAA6C,CAC9C,AACD,8BACE,wCAA4C,CAC7C,AACD,0BACE,eAAkB,CACnB,AACD,0BACE,eAAiB,CAClB,AACD,yBACE,eAAiB,CAClB,AACD,6BACE,cAAe,AACf,kBAAoB,CACrB,AACD,4BACE,iBAAmB,CACpB,AACD,6BACE,kBAAoB,CACrB,AACD,2BACE,gBAAkB,CACnB,AACD,2BACE,qBAAuB,AACvB,+BAAgC,AAChC,kBAAmB,AACnB,UAAW,AACX,oBAAqB,AACrB,kBAAmB,AACnB,UAAY,CACb,AACD,yDAEE,WAAY,AACZ,WAAY,AACZ,aAAe,CAChB,AACD,2DAEE,gBAAiB,AACjB,YAAa,AACb,eAAgB,AAChB,qBAAsB,AACtB,WAAY,AACZ,YAAa,AACb,gBAAiB,AACjB,UAAY,CACb,AACD,mEAEE,WAAY,AACZ,WAAa,CACd,AACD,qFAEE,YAAc,CACf,AACD,iGAEE,YAAc,CACf,AACD,ylBAcE,UAAY,CACb,AACD,0jDA4BE,SAAW,CACZ,AACD,0jDA4BE,WAAa,CACd,AACD,wBACE,uGAEE,UAAY,CACb,AACD,sQAIE,SAAW,CACZ,AACD,sQAIE,WAAa,CACd,CACF,AAKD,wBACE,8BAA+B,AACvB,qBAAuB,CAChC,AACD,sBACE,YAAc,CACf,AACD,iDAEE,iBAAmB,CACpB,AACD,uBACE,kBAAmB,AACnB,mCAAoC,AAChC,+BAAgC,AAC5B,0BAA4B,CACrC,AACD,yBACE,eAAgB,AAChB,oBAAsB,CACvB,AACD,+BACE,oCAAqC,AACjC,gCAAiC,AAC7B,2BAA6B,CACtC,AACD,uBACE,qBAAsB,AACtB,qBAAuB,CACxB,AACD,6BACE,WAAY,AACZ,WAAY,AACZ,aAAe,CAChB,AACD,sBACE,UAAW,AACX,YAAa,AACb,qBAAsB,AACtB,sBAAuB,AACvB,cAAgB,CACjB,AACD,4BACE,UAAW,AACX,YAAa,AACb,qBAAsB,AACtB,cAAgB,CACjB,AACD,kDAEE,SAAW,CACZ,AACD,qBACE,SAAW,CACZ,AACD,oBACE,iBAAmB,CACpB,AACD,kDAEE,cAAgB,CACjB,AACD,2BACE,UAAa,CACd,AACD,wCACE,YAAc,CACf,AACD,kDACE,cAAgB,CACjB,AACD,mDACE,YAAc,CACf,AACD,yBACE,aAAe,CAChB,AACD,yBACE,eAAiB,CAClB,AACD,yBACE,gBAAkB,CACnB,AACD,yBACE,aAAe,CAChB,AACD,yBACE,eAAkB,CACnB,AACD,yBACE,eAAkB,CACnB,AACD,wBACE,yBAA2B,CAC5B,AACD,iCACE,2BAA4B,AAC5B,kBAAmB,AACnB,eAAgB,AAChB,iBAAmB,CACpB,AACD,qDAEE,yBAA0B,AAC1B,iBAAmB,CACpB,AACD,0BACE,qBAAsB,AACtB,kBAAmB,AACnB,eAAgB,AAChB,gBAAkB,CACnB,AACD,2BACE,cAAe,AACf,eAAiB,CAClB,AACD,oCACE,yBAA0B,AAC1B,cAAe,AACf,gBAAkB,CACnB,AACD,0BACE,cAAgB,CACjB,AACD,sBACE,WAAY,AACZ,qBAAsB,AACtB,WAAY,AACZ,eAAgB,AAChB,gBAAiB,AACjB,YAAa,AACb,kBAAmB,AACnB,qBAAuB,CACxB,AACD,4BACE,eAAgB,AAChB,qBAAsB,AACtB,YAAa,AACb,iBAAkB,AAClB,kBAAmB,AACnB,kBAAmB,AACnB,UAAY,CACb,AACD,mCACE,qBAAsB,AACtB,gBAAkB,CACnB,AACD,8BACE,sBAAuB,AACvB,aAAc,AACd,eAAgB,AAChB,gBAAiB,AACjB,kBAAmB,AACnB,kBAAoB,CACrB,AACD,8CACE,eAAgB,AAChB,cAAe,AACf,mBAAoB,AACpB,eAAiB,CAClB,AACD,mDACE,WAAY,AACZ,SAAW,CACZ,AACD,4DACE,SAAW,CACZ,AACD,8DACE,WAAa,CACd,AACD,qDACE,cAAe,AACf,gBAAiB,AACjB,SAAU,AACV,SAAW,CACZ,AACD,uDAEE,UAAY,CACb,AACD,yFAEE,eAAiB,CAClB,AACD,iGAEE,SAAW,CACZ,AACD,8CACE,aAAiB,CAClB,AACD,2CACE,YAAa,AACb,WAAY,AACZ,eAAiB,CAClB,AACD,+CACE,gBAAiB,AACjB,WAAa,CACd,AACD,4CACE,6BAA8B,AAC9B,WAAY,AACZ,YAAa,AACb,WAAY,AACZ,UAAa,AACb,UAAY,CACb,AACD,qEACE,kBAAmB,AACnB,gBAAiB,AACjB,QAAS,AACT,QAAS,AACT,UAAY,CACb,AACD,2gBAME,wBAA0B,CAC3B,AACD,gCACE,UAAY,CACb,AACD,+GAEE,gBAAkB,CACnB,AACD,+IAEE,mBAAqB,CACtB,AACD,+IAEE,mBAAqB,CACtB,AACD,+IAEE,mBAAqB,CACtB,AACD,+IAEE,mBAAqB,CACtB,AACD,+IAEE,mBAAqB,CACtB,AACD,+IAEE,mBAAqB,CACtB,AACD,uEACE,aAAe,CAChB,AACD,uEACE,eAAiB,CAClB,AACD,uEACE,gBAAkB,CACnB,AACD,uEACE,aAAe,CAChB,AACD,uEACE,eAAkB,CACnB,AACD,uEACE,eAAkB,CACnB,AACD,8BACE,WAAa,CACd,AACD,2GAEE,oBAAsB,CACvB,AACD,+IAEE,eAAiB,CAClB,AACD,uJAEE,mBAAqB,CACtB,AACD,uEACE,yCAA6C,CAC9C,AACD,2EACE,wCAA4C,CAC7C,AACD,8BACE,UAAY,CACb,AACD,2GAEE,gBAAkB,CACnB,AACD,+IAEE,eAAiB,CAClB,AACD,+IAEE,eAAiB,CAClB,AACD,6IAEE,cAAgB,CACjB,AACD,uEACE,cAAgB,CACjB,AACD,uEACE,cAAgB,CACjB,AACD,sEACE,cAAgB,CACjB,AACD,0DACE,qBAAuB,CACxB,AACD,qDACE,qBAAuB,CACxB,AACD,mCACE,qBAAyB,CAC1B,AACD,+CACE,gBAAkB,CACnB,AACD,gCACE,UAAY,CACb,AACD,0GAEE,iBAAmB,CACpB,AACD,uBACE,sBAAuB,AACvB,mBAAoB,AACpB,UAAY,CACb,AACD,6BACE,kCAAmC,AACnC,mCAAoC,AACpC,YAAa,AACb,cAAe,AACf,SAAU,AACV,iBAAkB,AAClB,iBAAmB,CACpB,AACD,uDACE,6BAA8B,AAC9B,QAAU,CACX,AACD,iDACE,0BAA2B,AAC3B,WAAa,CACd,AACD,qDACE,aAAe,CAChB,AACD,8CACE,iBAAmB,CACpB,AACD,8BACE,YAAc,CACf,AACD,+CACE,uBAAwB,AACxB,YAAa,AACb,WAAY,AACZ,eAAgB,AAChB,YAAa,AACb,aAAc,AACd,kBAAmB,AACnB,kBAAmB,AACnB,UAAY,CACb,AACD,gCACE,SAAU,AACV,kBAAmB,AACnB,UAAY,CACb,AACD,uCACE,WAAY,AACZ,cAAe,AACf,eAAgB,AAChB,eAAkB,CACnB,AACD,4CACE,kBAAmB,AACnB,kBAAoB,CACrB,AACD,mDACE,sBAAuB,AACvB,mBAAoB,AACpB,SAAU,AACV,eAAgB,AAChB,WAAY,AACZ,mBAAoB,AACpB,gBAAoB,AACpB,gBAAiB,AACjB,iBAAkB,AAClB,qBAAsB,AACtB,SAAW,CACZ,AACD,kDACE,0BAA2B,AAC3B,kCAAmC,AACnC,mCAAoC,AACpC,MAAO,AACP,YAAa,AACb,SAAU,AACV,OAAS,CACV,AACD,qGAEE,OAAQ,AACR,gBAAiB,AACjB,kBAAmB,AACnB,wCAA0C,AACtC,oCAAsC,AAClC,gCAAkC,AAC1C,0CAA6C,AAC7C,qCAAwC,AACxC,kCAAqC,AACrC,iBAAmB,CACpB,AACD,iHAEE,kBAAoB,CACrB","file":"quill.bubble.css","sourcesContent":["/*!\n * Quill Editor v1.3.7\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */\n.ql-container {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n font-family: Helvetica, Arial, sans-serif;\n font-size: 13px;\n height: 100%;\n margin: 0px;\n position: relative;\n}\n.ql-container.ql-disabled .ql-tooltip {\n visibility: hidden;\n}\n.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {\n pointer-events: none;\n}\n.ql-clipboard {\n left: -100000px;\n height: 1px;\n overflow-y: hidden;\n position: absolute;\n top: 50%;\n}\n.ql-clipboard p {\n margin: 0;\n padding: 0;\n}\n.ql-editor {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n line-height: 1.42;\n height: 100%;\n outline: none;\n overflow-y: auto;\n padding: 12px 15px;\n -o-tab-size: 4;\n tab-size: 4;\n -moz-tab-size: 4;\n text-align: left;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n.ql-editor > * {\n cursor: text;\n}\n.ql-editor p,\n.ql-editor ol,\n.ql-editor ul,\n.ql-editor pre,\n.ql-editor blockquote,\n.ql-editor h1,\n.ql-editor h2,\n.ql-editor h3,\n.ql-editor h4,\n.ql-editor h5,\n.ql-editor h6 {\n margin: 0;\n padding: 0;\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol,\n.ql-editor ul {\n padding-left: 1.5em;\n}\n.ql-editor ol > li,\n.ql-editor ul > li {\n list-style-type: none;\n}\n.ql-editor ul > li::before {\n content: '\\2022';\n}\n.ql-editor ul[data-checked=true],\n.ql-editor ul[data-checked=false] {\n pointer-events: none;\n}\n.ql-editor ul[data-checked=true] > li *,\n.ql-editor ul[data-checked=false] > li * {\n pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before,\n.ql-editor ul[data-checked=false] > li::before {\n color: #777;\n cursor: pointer;\n pointer-events: all;\n}\n.ql-editor ul[data-checked=true] > li::before {\n content: '\\2611';\n}\n.ql-editor ul[data-checked=false] > li::before {\n content: '\\2610';\n}\n.ql-editor li::before {\n display: inline-block;\n white-space: nowrap;\n width: 1.2em;\n}\n.ql-editor li:not(.ql-direction-rtl)::before {\n margin-left: -1.5em;\n margin-right: 0.3em;\n text-align: right;\n}\n.ql-editor li.ql-direction-rtl::before {\n margin-left: 0.3em;\n margin-right: -1.5em;\n}\n.ql-editor ol li:not(.ql-direction-rtl),\n.ql-editor ul li:not(.ql-direction-rtl) {\n padding-left: 1.5em;\n}\n.ql-editor ol li.ql-direction-rtl,\n.ql-editor ul li.ql-direction-rtl {\n padding-right: 1.5em;\n}\n.ql-editor ol li {\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n counter-increment: list-0;\n}\n.ql-editor ol li:before {\n content: counter(list-0, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n counter-increment: list-1;\n}\n.ql-editor ol li.ql-indent-1:before {\n content: counter(list-1, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-1 {\n counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-2 {\n counter-increment: list-2;\n}\n.ql-editor ol li.ql-indent-2:before {\n content: counter(list-2, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-2 {\n counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-3 {\n counter-increment: list-3;\n}\n.ql-editor ol li.ql-indent-3:before {\n content: counter(list-3, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-3 {\n counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-4 {\n counter-increment: list-4;\n}\n.ql-editor ol li.ql-indent-4:before {\n content: counter(list-4, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-4 {\n counter-reset: list-5 list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-5 {\n counter-increment: list-5;\n}\n.ql-editor ol li.ql-indent-5:before {\n content: counter(list-5, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-5 {\n counter-reset: list-6 list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-6 {\n counter-increment: list-6;\n}\n.ql-editor ol li.ql-indent-6:before {\n content: counter(list-6, decimal) '. ';\n}\n.ql-editor ol li.ql-indent-6 {\n counter-reset: list-7 list-8 list-9;\n}\n.ql-editor ol li.ql-indent-7 {\n counter-increment: list-7;\n}\n.ql-editor ol li.ql-indent-7:before {\n content: counter(list-7, lower-alpha) '. ';\n}\n.ql-editor ol li.ql-indent-7 {\n counter-reset: list-8 list-9;\n}\n.ql-editor ol li.ql-indent-8 {\n counter-increment: list-8;\n}\n.ql-editor ol li.ql-indent-8:before {\n content: counter(list-8, lower-roman) '. ';\n}\n.ql-editor ol li.ql-indent-8 {\n counter-reset: list-9;\n}\n.ql-editor ol li.ql-indent-9 {\n counter-increment: list-9;\n}\n.ql-editor ol li.ql-indent-9:before {\n content: counter(list-9, decimal) '. ';\n}\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 3em;\n}\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 4.5em;\n}\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 3em;\n}\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 4.5em;\n}\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 6em;\n}\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 7.5em;\n}\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 6em;\n}\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 7.5em;\n}\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 9em;\n}\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 10.5em;\n}\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 9em;\n}\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 10.5em;\n}\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 12em;\n}\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 13.5em;\n}\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 12em;\n}\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 13.5em;\n}\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 15em;\n}\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 16.5em;\n}\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 15em;\n}\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 16.5em;\n}\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 18em;\n}\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 19.5em;\n}\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 18em;\n}\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 19.5em;\n}\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 21em;\n}\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 22.5em;\n}\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 21em;\n}\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 22.5em;\n}\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 24em;\n}\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 25.5em;\n}\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 24em;\n}\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 25.5em;\n}\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 27em;\n}\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 28.5em;\n}\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 27em;\n}\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 28.5em;\n}\n.ql-editor .ql-video {\n display: block;\n max-width: 100%;\n}\n.ql-editor .ql-video.ql-align-center {\n margin: 0 auto;\n}\n.ql-editor .ql-video.ql-align-right {\n margin: 0 0 0 auto;\n}\n.ql-editor .ql-bg-black {\n background-color: #000;\n}\n.ql-editor .ql-bg-red {\n background-color: #e60000;\n}\n.ql-editor .ql-bg-orange {\n background-color: #f90;\n}\n.ql-editor .ql-bg-yellow {\n background-color: #ff0;\n}\n.ql-editor .ql-bg-green {\n background-color: #008a00;\n}\n.ql-editor .ql-bg-blue {\n background-color: #06c;\n}\n.ql-editor .ql-bg-purple {\n background-color: #93f;\n}\n.ql-editor .ql-color-white {\n color: #fff;\n}\n.ql-editor .ql-color-red {\n color: #e60000;\n}\n.ql-editor .ql-color-orange {\n color: #f90;\n}\n.ql-editor .ql-color-yellow {\n color: #ff0;\n}\n.ql-editor .ql-color-green {\n color: #008a00;\n}\n.ql-editor .ql-color-blue {\n color: #06c;\n}\n.ql-editor .ql-color-purple {\n color: #93f;\n}\n.ql-editor .ql-font-serif {\n font-family: Georgia, Times New Roman, serif;\n}\n.ql-editor .ql-font-monospace {\n font-family: Monaco, Courier New, monospace;\n}\n.ql-editor .ql-size-small {\n font-size: 0.75em;\n}\n.ql-editor .ql-size-large {\n font-size: 1.5em;\n}\n.ql-editor .ql-size-huge {\n font-size: 2.5em;\n}\n.ql-editor .ql-direction-rtl {\n direction: rtl;\n text-align: inherit;\n}\n.ql-editor .ql-align-center {\n text-align: center;\n}\n.ql-editor .ql-align-justify {\n text-align: justify;\n}\n.ql-editor .ql-align-right {\n text-align: right;\n}\n.ql-editor.ql-blank::before {\n color: rgba(0,0,0,0.6);\n content: attr(data-placeholder);\n font-style: italic;\n left: 15px;\n pointer-events: none;\n position: absolute;\n right: 15px;\n}\n.ql-bubble.ql-toolbar:after,\n.ql-bubble .ql-toolbar:after {\n clear: both;\n content: '';\n display: table;\n}\n.ql-bubble.ql-toolbar button,\n.ql-bubble .ql-toolbar button {\n background: none;\n border: none;\n cursor: pointer;\n display: inline-block;\n float: left;\n height: 24px;\n padding: 3px 5px;\n width: 28px;\n}\n.ql-bubble.ql-toolbar button svg,\n.ql-bubble .ql-toolbar button svg {\n float: left;\n height: 100%;\n}\n.ql-bubble.ql-toolbar button:active:hover,\n.ql-bubble .ql-toolbar button:active:hover {\n outline: none;\n}\n.ql-bubble.ql-toolbar input.ql-image[type=file],\n.ql-bubble .ql-toolbar input.ql-image[type=file] {\n display: none;\n}\n.ql-bubble.ql-toolbar button:hover,\n.ql-bubble .ql-toolbar button:hover,\n.ql-bubble.ql-toolbar button:focus,\n.ql-bubble .ql-toolbar button:focus,\n.ql-bubble.ql-toolbar button.ql-active,\n.ql-bubble .ql-toolbar button.ql-active,\n.ql-bubble.ql-toolbar .ql-picker-label:hover,\n.ql-bubble .ql-toolbar .ql-picker-label:hover,\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active,\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active,\n.ql-bubble.ql-toolbar .ql-picker-item:hover,\n.ql-bubble .ql-toolbar .ql-picker-item:hover,\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected,\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected {\n color: #fff;\n}\n.ql-bubble.ql-toolbar button:hover .ql-fill,\n.ql-bubble .ql-toolbar button:hover .ql-fill,\n.ql-bubble.ql-toolbar button:focus .ql-fill,\n.ql-bubble .ql-toolbar button:focus .ql-fill,\n.ql-bubble.ql-toolbar button.ql-active .ql-fill,\n.ql-bubble .ql-toolbar button.ql-active .ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-fill,\n.ql-bubble.ql-toolbar button:hover .ql-stroke.ql-fill,\n.ql-bubble .ql-toolbar button:hover .ql-stroke.ql-fill,\n.ql-bubble.ql-toolbar button:focus .ql-stroke.ql-fill,\n.ql-bubble .ql-toolbar button:focus .ql-stroke.ql-fill,\n.ql-bubble.ql-toolbar button.ql-active .ql-stroke.ql-fill,\n.ql-bubble .ql-toolbar button.ql-active .ql-stroke.ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {\n fill: #fff;\n}\n.ql-bubble.ql-toolbar button:hover .ql-stroke,\n.ql-bubble .ql-toolbar button:hover .ql-stroke,\n.ql-bubble.ql-toolbar button:focus .ql-stroke,\n.ql-bubble .ql-toolbar button:focus .ql-stroke,\n.ql-bubble.ql-toolbar button.ql-active .ql-stroke,\n.ql-bubble .ql-toolbar button.ql-active .ql-stroke,\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke,\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke,\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke,\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke,\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke,\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke,\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\n.ql-bubble.ql-toolbar button:hover .ql-stroke-miter,\n.ql-bubble .ql-toolbar button:hover .ql-stroke-miter,\n.ql-bubble.ql-toolbar button:focus .ql-stroke-miter,\n.ql-bubble .ql-toolbar button:focus .ql-stroke-miter,\n.ql-bubble.ql-toolbar button.ql-active .ql-stroke-miter,\n.ql-bubble .ql-toolbar button.ql-active .ql-stroke-miter,\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {\n stroke: #fff;\n}\n@media (pointer: coarse) {\n .ql-bubble.ql-toolbar button:hover:not(.ql-active),\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) {\n color: #ccc;\n }\n .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-fill,\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-fill,\n .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {\n fill: #ccc;\n }\n .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke,\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke,\n .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {\n stroke: #ccc;\n }\n}\n.ql-bubble {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ql-bubble * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ql-bubble .ql-hidden {\n display: none;\n}\n.ql-bubble .ql-out-bottom,\n.ql-bubble .ql-out-top {\n visibility: hidden;\n}\n.ql-bubble .ql-tooltip {\n position: absolute;\n -webkit-transform: translateY(10px);\n -ms-transform: translateY(10px);\n transform: translateY(10px);\n}\n.ql-bubble .ql-tooltip a {\n cursor: pointer;\n text-decoration: none;\n}\n.ql-bubble .ql-tooltip.ql-flip {\n -webkit-transform: translateY(-10px);\n -ms-transform: translateY(-10px);\n transform: translateY(-10px);\n}\n.ql-bubble .ql-formats {\n display: inline-block;\n vertical-align: middle;\n}\n.ql-bubble .ql-formats:after {\n clear: both;\n content: '';\n display: table;\n}\n.ql-bubble .ql-stroke {\n fill: none;\n stroke: #ccc;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 2;\n}\n.ql-bubble .ql-stroke-miter {\n fill: none;\n stroke: #ccc;\n stroke-miterlimit: 10;\n stroke-width: 2;\n}\n.ql-bubble .ql-fill,\n.ql-bubble .ql-stroke.ql-fill {\n fill: #ccc;\n}\n.ql-bubble .ql-empty {\n fill: none;\n}\n.ql-bubble .ql-even {\n fill-rule: evenodd;\n}\n.ql-bubble .ql-thin,\n.ql-bubble .ql-stroke.ql-thin {\n stroke-width: 1;\n}\n.ql-bubble .ql-transparent {\n opacity: 0.4;\n}\n.ql-bubble .ql-direction svg:last-child {\n display: none;\n}\n.ql-bubble .ql-direction.ql-active svg:last-child {\n display: inline;\n}\n.ql-bubble .ql-direction.ql-active svg:first-child {\n display: none;\n}\n.ql-bubble .ql-editor h1 {\n font-size: 2em;\n}\n.ql-bubble .ql-editor h2 {\n font-size: 1.5em;\n}\n.ql-bubble .ql-editor h3 {\n font-size: 1.17em;\n}\n.ql-bubble .ql-editor h4 {\n font-size: 1em;\n}\n.ql-bubble .ql-editor h5 {\n font-size: 0.83em;\n}\n.ql-bubble .ql-editor h6 {\n font-size: 0.67em;\n}\n.ql-bubble .ql-editor a {\n text-decoration: underline;\n}\n.ql-bubble .ql-editor blockquote {\n border-left: 4px solid #ccc;\n margin-bottom: 5px;\n margin-top: 5px;\n padding-left: 16px;\n}\n.ql-bubble .ql-editor code,\n.ql-bubble .ql-editor pre {\n background-color: #f0f0f0;\n border-radius: 3px;\n}\n.ql-bubble .ql-editor pre {\n white-space: pre-wrap;\n margin-bottom: 5px;\n margin-top: 5px;\n padding: 5px 10px;\n}\n.ql-bubble .ql-editor code {\n font-size: 85%;\n padding: 2px 4px;\n}\n.ql-bubble .ql-editor pre.ql-syntax {\n background-color: #23241f;\n color: #f8f8f2;\n overflow: visible;\n}\n.ql-bubble .ql-editor img {\n max-width: 100%;\n}\n.ql-bubble .ql-picker {\n color: #ccc;\n display: inline-block;\n float: left;\n font-size: 14px;\n font-weight: 500;\n height: 24px;\n position: relative;\n vertical-align: middle;\n}\n.ql-bubble .ql-picker-label {\n cursor: pointer;\n display: inline-block;\n height: 100%;\n padding-left: 8px;\n padding-right: 2px;\n position: relative;\n width: 100%;\n}\n.ql-bubble .ql-picker-label::before {\n display: inline-block;\n line-height: 22px;\n}\n.ql-bubble .ql-picker-options {\n background-color: #444;\n display: none;\n min-width: 100%;\n padding: 4px 8px;\n position: absolute;\n white-space: nowrap;\n}\n.ql-bubble .ql-picker-options .ql-picker-item {\n cursor: pointer;\n display: block;\n padding-bottom: 5px;\n padding-top: 5px;\n}\n.ql-bubble .ql-picker.ql-expanded .ql-picker-label {\n color: #777;\n z-index: 2;\n}\n.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-fill {\n fill: #777;\n}\n.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-stroke {\n stroke: #777;\n}\n.ql-bubble .ql-picker.ql-expanded .ql-picker-options {\n display: block;\n margin-top: -1px;\n top: 100%;\n z-index: 1;\n}\n.ql-bubble .ql-color-picker,\n.ql-bubble .ql-icon-picker {\n width: 28px;\n}\n.ql-bubble .ql-color-picker .ql-picker-label,\n.ql-bubble .ql-icon-picker .ql-picker-label {\n padding: 2px 4px;\n}\n.ql-bubble .ql-color-picker .ql-picker-label svg,\n.ql-bubble .ql-icon-picker .ql-picker-label svg {\n right: 4px;\n}\n.ql-bubble .ql-icon-picker .ql-picker-options {\n padding: 4px 0px;\n}\n.ql-bubble .ql-icon-picker .ql-picker-item {\n height: 24px;\n width: 24px;\n padding: 2px 4px;\n}\n.ql-bubble .ql-color-picker .ql-picker-options {\n padding: 3px 5px;\n width: 152px;\n}\n.ql-bubble .ql-color-picker .ql-picker-item {\n border: 1px solid transparent;\n float: left;\n height: 16px;\n margin: 2px;\n padding: 0px;\n width: 16px;\n}\n.ql-bubble .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {\n position: absolute;\n margin-top: -9px;\n right: 0;\n top: 50%;\n width: 18px;\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,\n.ql-bubble .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {\n content: attr(data-label);\n}\n.ql-bubble .ql-picker.ql-header {\n width: 98px;\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item::before {\n content: 'Normal';\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"1\"]::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before {\n content: 'Heading 1';\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"2\"]::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before {\n content: 'Heading 2';\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"3\"]::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before {\n content: 'Heading 3';\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"4\"]::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before {\n content: 'Heading 4';\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"5\"]::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before {\n content: 'Heading 5';\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"6\"]::before,\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before {\n content: 'Heading 6';\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before {\n font-size: 2em;\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before {\n font-size: 1.5em;\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before {\n font-size: 1.17em;\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before {\n font-size: 1em;\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before {\n font-size: 0.83em;\n}\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before {\n font-size: 0.67em;\n}\n.ql-bubble .ql-picker.ql-font {\n width: 108px;\n}\n.ql-bubble .ql-picker.ql-font .ql-picker-label::before,\n.ql-bubble .ql-picker.ql-font .ql-picker-item::before {\n content: 'Sans Serif';\n}\n.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\n content: 'Serif';\n}\n.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\n content: 'Monospace';\n}\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\n font-family: Georgia, Times New Roman, serif;\n}\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\n font-family: Monaco, Courier New, monospace;\n}\n.ql-bubble .ql-picker.ql-size {\n width: 98px;\n}\n.ql-bubble .ql-picker.ql-size .ql-picker-label::before,\n.ql-bubble .ql-picker.ql-size .ql-picker-item::before {\n content: 'Normal';\n}\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=small]::before,\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\n content: 'Small';\n}\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=large]::before,\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\n content: 'Large';\n}\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\n content: 'Huge';\n}\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\n font-size: 10px;\n}\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\n font-size: 18px;\n}\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\n font-size: 32px;\n}\n.ql-bubble .ql-color-picker.ql-background .ql-picker-item {\n background-color: #fff;\n}\n.ql-bubble .ql-color-picker.ql-color .ql-picker-item {\n background-color: #000;\n}\n.ql-bubble .ql-toolbar .ql-formats {\n margin: 8px 12px 8px 0px;\n}\n.ql-bubble .ql-toolbar .ql-formats:first-child {\n margin-left: 12px;\n}\n.ql-bubble .ql-color-picker svg {\n margin: 1px;\n}\n.ql-bubble .ql-color-picker .ql-picker-item.ql-selected,\n.ql-bubble .ql-color-picker .ql-picker-item:hover {\n border-color: #fff;\n}\n.ql-bubble .ql-tooltip {\n background-color: #444;\n border-radius: 25px;\n color: #fff;\n}\n.ql-bubble .ql-tooltip-arrow {\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n content: \" \";\n display: block;\n left: 50%;\n margin-left: -6px;\n position: absolute;\n}\n.ql-bubble .ql-tooltip:not(.ql-flip) .ql-tooltip-arrow {\n border-bottom: 6px solid #444;\n top: -6px;\n}\n.ql-bubble .ql-tooltip.ql-flip .ql-tooltip-arrow {\n border-top: 6px solid #444;\n bottom: -6px;\n}\n.ql-bubble .ql-tooltip.ql-editing .ql-tooltip-editor {\n display: block;\n}\n.ql-bubble .ql-tooltip.ql-editing .ql-formats {\n visibility: hidden;\n}\n.ql-bubble .ql-tooltip-editor {\n display: none;\n}\n.ql-bubble .ql-tooltip-editor input[type=text] {\n background: transparent;\n border: none;\n color: #fff;\n font-size: 13px;\n height: 100%;\n outline: none;\n padding: 10px 20px;\n position: absolute;\n width: 100%;\n}\n.ql-bubble .ql-tooltip-editor a {\n top: 10px;\n position: absolute;\n right: 20px;\n}\n.ql-bubble .ql-tooltip-editor a:before {\n color: #ccc;\n content: \"\\D7\";\n font-size: 16px;\n font-weight: bold;\n}\n.ql-container.ql-bubble:not(.ql-disabled) a {\n position: relative;\n white-space: nowrap;\n}\n.ql-container.ql-bubble:not(.ql-disabled) a::before {\n background-color: #444;\n border-radius: 15px;\n top: -5px;\n font-size: 12px;\n color: #fff;\n content: attr(href);\n font-weight: normal;\n overflow: hidden;\n padding: 5px 15px;\n text-decoration: none;\n z-index: 1;\n}\n.ql-container.ql-bubble:not(.ql-disabled) a::after {\n border-top: 6px solid #444;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n top: 0;\n content: \" \";\n height: 0;\n width: 0;\n}\n.ql-container.ql-bubble:not(.ql-disabled) a::before,\n.ql-container.ql-bubble:not(.ql-disabled) a::after {\n left: 0;\n margin-left: 50%;\n position: absolute;\n -webkit-transform: translate(-50%, -100%);\n -ms-transform: translate(-50%, -100%);\n transform: translate(-50%, -100%);\n -webkit-transition: visibility 0s ease 200ms;\n -o-transition: visibility 0s ease 200ms;\n transition: visibility 0s ease 200ms;\n visibility: hidden;\n}\n.ql-container.ql-bubble:not(.ql-disabled) a:hover::before,\n.ql-container.ql-bubble:not(.ql-disabled) a:hover::after {\n visibility: visible;\n}\n"],"sourceRoot":""}]);
|
||
|
||
// exports
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1561:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
exports = module.exports = __webpack_require__(316)(true);
|
||
// imports
|
||
|
||
|
||
// module
|
||
exports.push([module.i, "@font-face{font-family:KaTeX_AMS;src:url(" + __webpack_require__(1562) + ") format(\"woff2\"),url(" + __webpack_require__(1563) + ") format(\"woff\"),url(" + __webpack_require__(1564) + ") format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Caligraphic;src:url(" + __webpack_require__(1565) + ") format(\"woff2\"),url(" + __webpack_require__(1566) + ") format(\"woff\"),url(" + __webpack_require__(1567) + ") format(\"truetype\");font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Caligraphic;src:url(" + __webpack_require__(1568) + ") format(\"woff2\"),url(" + __webpack_require__(1569) + ") format(\"woff\"),url(" + __webpack_require__(1570) + ") format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Fraktur;src:url(" + __webpack_require__(1571) + ") format(\"woff2\"),url(" + __webpack_require__(1572) + ") format(\"woff\"),url(" + __webpack_require__(1573) + ") format(\"truetype\");font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Fraktur;src:url(" + __webpack_require__(1574) + ") format(\"woff2\"),url(" + __webpack_require__(1575) + ") format(\"woff\"),url(" + __webpack_require__(1576) + ") format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Main;src:url(" + __webpack_require__(1577) + ") format(\"woff2\"),url(" + __webpack_require__(1578) + ") format(\"woff\"),url(" + __webpack_require__(1579) + ") format(\"truetype\");font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Main;src:url(" + __webpack_require__(1580) + ") format(\"woff2\"),url(" + __webpack_require__(1581) + ") format(\"woff\"),url(" + __webpack_require__(1582) + ") format(\"truetype\");font-weight:700;font-style:italic}@font-face{font-family:KaTeX_Main;src:url(" + __webpack_require__(1583) + ") format(\"woff2\"),url(" + __webpack_require__(1584) + ") format(\"woff\"),url(" + __webpack_require__(1585) + ") format(\"truetype\");font-weight:400;font-style:italic}@font-face{font-family:KaTeX_Main;src:url(" + __webpack_require__(1586) + ") format(\"woff2\"),url(" + __webpack_require__(1587) + ") format(\"woff\"),url(" + __webpack_require__(1588) + ") format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Math;src:url(" + __webpack_require__(1589) + ") format(\"woff2\"),url(" + __webpack_require__(1590) + ") format(\"woff\"),url(" + __webpack_require__(1591) + ") format(\"truetype\");font-weight:700;font-style:italic}@font-face{font-family:KaTeX_Math;src:url(" + __webpack_require__(1592) + ") format(\"woff2\"),url(" + __webpack_require__(1593) + ") format(\"woff\"),url(" + __webpack_require__(1594) + ") format(\"truetype\");font-weight:400;font-style:italic}@font-face{font-family:KaTeX_SansSerif;src:url(" + __webpack_require__(1595) + ") format(\"woff2\"),url(" + __webpack_require__(1596) + ") format(\"woff\"),url(" + __webpack_require__(1597) + ") format(\"truetype\");font-weight:700;font-style:normal}@font-face{font-family:KaTeX_SansSerif;src:url(" + __webpack_require__(1598) + ") format(\"woff2\"),url(" + __webpack_require__(1599) + ") format(\"woff\"),url(" + __webpack_require__(1600) + ") format(\"truetype\");font-weight:400;font-style:italic}@font-face{font-family:KaTeX_SansSerif;src:url(" + __webpack_require__(1601) + ") format(\"woff2\"),url(" + __webpack_require__(1602) + ") format(\"woff\"),url(" + __webpack_require__(1603) + ") format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Script;src:url(" + __webpack_require__(1604) + ") format(\"woff2\"),url(" + __webpack_require__(1605) + ") format(\"woff\"),url(" + __webpack_require__(1606) + ") format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size1;src:url(" + __webpack_require__(1607) + ") format(\"woff2\"),url(" + __webpack_require__(1608) + ") format(\"woff\"),url(" + __webpack_require__(1609) + ") format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size2;src:url(" + __webpack_require__(1610) + ") format(\"woff2\"),url(" + __webpack_require__(1611) + ") format(\"woff\"),url(" + __webpack_require__(1612) + ") format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size3;src:url(" + __webpack_require__(1613) + ") format(\"woff2\"),url(" + __webpack_require__(1614) + ") format(\"woff\"),url(" + __webpack_require__(1615) + ") format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size4;src:url(" + __webpack_require__(1616) + ") format(\"woff2\"),url(" + __webpack_require__(1617) + ") format(\"woff\"),url(" + __webpack_require__(1618) + ") format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Typewriter;src:url(" + __webpack_require__(1619) + ") format(\"woff2\"),url(" + __webpack_require__(1620) + ") format(\"woff\"),url(" + __webpack_require__(1621) + ") format(\"truetype\");font-weight:400;font-style:normal}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:\"0.11.1\"}.katex .katex-mathml{position:absolute;clip:rect(1px,1px,1px,1px);padding:0;border:0;height:1px;width:1px;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathdefault{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-weight:700;font-style:italic}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;vertical-align:bottom;position:relative}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;vertical-align:bottom;font-size:1px;width:2px;min-width:2px}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{display:inline-block;width:100%;border-bottom-style:solid}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{display:inline-block;border:0 solid;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{display:inline-block;width:100%;border-bottom-style:solid}.katex .hdashline{display:inline-block;width:100%;border-bottom-style:dashed}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{display:block;position:absolute;width:100%;height:inherit;fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex svg path{stroke:none}.katex img{border-style:none;min-width:0;min-height:0;max-width:none;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:\"\"}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{position:absolute;left:0;width:50.2%;overflow:hidden}.katex .halfarrow-right{position:absolute;right:0;width:50.2%;overflow:hidden}.katex .brace-left{position:absolute;left:0;width:25.1%;overflow:hidden}.katex .brace-center{position:absolute;left:25%;width:50%;overflow:hidden}.katex .brace-right{position:absolute;right:0;width:25.1%;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{-webkit-box-sizing:border-box;box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left}", "", {"version":3,"sources":["/Users/hs/forgeplus-react/node_modules/katex/dist/katex.min.css"],"names":[],"mappings":"AAAA,WAAW,sBAAsB,gJAA4J,gBAAgB,iBAAiB,CAAC,WAAW,8BAA8B,gJAA2K,gBAAgB,iBAAiB,CAAC,WAAW,8BAA8B,gJAAoL,gBAAgB,iBAAiB,CAAC,WAAW,0BAA0B,kJAA+J,gBAAgB,iBAAiB,CAAC,WAAW,0BAA0B,mJAAwK,gBAAgB,iBAAiB,CAAC,WAAW,uBAAuB,mJAAsJ,gBAAgB,iBAAiB,CAAC,WAAW,uBAAuB,mJAAwK,gBAAgB,iBAAiB,CAAC,WAAW,uBAAuB,mJAA4J,gBAAgB,iBAAiB,CAAC,WAAW,uBAAuB,mJAA+J,gBAAgB,iBAAiB,CAAC,WAAW,uBAAuB,mJAAwK,gBAAgB,iBAAiB,CAAC,WAAW,uBAAuB,mJAA4J,gBAAgB,iBAAiB,CAAC,WAAW,4BAA8B,mJAAqK,gBAAgB,iBAAiB,CAAC,WAAW,4BAA8B,mJAA2K,gBAAgB,iBAAiB,CAAC,WAAW,4BAA8B,mJAA8K,gBAAgB,iBAAiB,CAAC,WAAW,yBAAyB,mJAAqK,gBAAgB,iBAAiB,CAAC,WAAW,wBAAwB,mJAAkK,gBAAgB,iBAAiB,CAAC,WAAW,wBAAwB,mJAAkK,gBAAgB,iBAAiB,CAAC,WAAW,wBAAwB,mJAAkK,gBAAgB,iBAAiB,CAAC,WAAW,wBAAwB,mJAAkK,gBAAgB,iBAAiB,CAAC,WAAW,6BAA6B,mJAAiL,gBAAgB,iBAAiB,CAAC,OAAO,oDAAoD,gBAAgB,cAAc,mBAAmB,CAAC,SAAS,uCAAuC,CAAC,4BAA4B,gBAAgB,CAAC,qBAAqB,kBAAkB,2BAA2B,UAAU,SAAS,WAAW,UAAU,eAAe,CAAC,4BAA4B,aAAa,CAAC,aAAa,kBAAkB,mBAAmB,0BAA0B,uBAAuB,iBAAiB,CAAC,2BAA2B,oBAAoB,CAAC,eAAe,eAAe,CAAC,eAAe,iBAAiB,CAAC,eAAe,sBAAsB,CAAC,eAAe,2BAA2B,CAAC,eAAe,4BAA4B,CAAC,oBAAoB,uBAAuB,iBAAiB,CAAC,eAAe,uBAAuB,iBAAiB,CAAC,eAAe,iBAAiB,CAAC,eAAe,uBAAuB,eAAe,CAAC,mBAAmB,uBAAuB,gBAAgB,iBAAiB,CAAC,4CAA4C,qBAAqB,CAAC,gBAAgB,6BAA6B,CAAC,kCAAkC,yBAAyB,CAAC,eAAe,4BAA4B,CAAC,gCAAgC,wBAAwB,CAAC,8BAA8B,2BAA2B,CAAC,sCAAsC,4BAA4B,eAAe,CAAC,kCAAkC,4BAA4B,iBAAiB,CAAC,eAAe,uBAAuB,iBAAiB,CAAC,gBAAgB,qBAAqB,kBAAkB,CAAC,gBAAgB,iBAAiB,CAAC,cAAc,mBAAmB,sBAAsB,iBAAiB,CAAC,mBAAmB,cAAc,SAAS,iBAAiB,CAAC,wBAAwB,oBAAoB,CAAC,2BAA2B,gBAAgB,OAAO,CAAC,iBAAiB,iBAAiB,CAAC,gBAAgB,mBAAmB,sBAAsB,cAAc,UAAU,aAAa,CAAC,gBAAgB,eAAe,CAAC,wBAAwB,iBAAiB,CAAC,yBAAyB,qBAAqB,WAAW,yBAAyB,CAAC,wIAAwI,cAAc,CAAC,eAAe,oBAAoB,CAAC,uCAAuC,QAAQ,iBAAiB,CAAC,4DAA4D,iBAAiB,CAAC,sDAAsD,oBAAoB,CAAC,oBAAoB,OAAO,CAAC,wCAAwC,MAAM,CAAC,yBAAyB,iBAAiB,gBAAgB,CAAC,aAAa,qBAAqB,eAAe,iBAAiB,CAAC,gFAAgF,qBAAqB,WAAW,yBAAyB,CAAC,kBAAkB,qBAAqB,WAAW,0BAA0B,CAAC,mBAAmB,wBAAwB,yBAAyB,CAAC,4EAA4E,aAAa,CAAC,4EAA4E,eAAe,CAAC,4EAA4E,eAAe,CAAC,4EAA4E,eAAe,CAAC,4EAA4E,eAAe,CAAC,4EAA4E,aAAa,CAAC,4EAA4E,eAAe,CAAC,4EAA4E,gBAAgB,CAAC,4EAA4E,iBAAiB,CAAC,8EAA8E,iBAAiB,CAAC,8EAA8E,iBAAiB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,aAAa,CAAC,4EAA4E,sBAAsB,CAAC,4EAA4E,sBAAsB,CAAC,4EAA4E,eAAe,CAAC,4EAA4E,sBAAsB,CAAC,4EAA4E,aAAa,CAAC,4EAA4E,eAAe,CAAC,4EAA4E,gBAAgB,CAAC,8EAA8E,sBAAsB,CAAC,8EAA8E,sBAAsB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,aAAa,CAAC,4EAA4E,sBAAsB,CAAC,4EAA4E,sBAAsB,CAAC,4EAA4E,sBAAsB,CAAC,4EAA4E,sBAAsB,CAAC,4EAA4E,sBAAsB,CAAC,4EAA4E,sBAAsB,CAAC,8EAA8E,sBAAsB,CAAC,8EAA8E,sBAAsB,CAAC,4EAA4E,gBAAgB,CAAC,4EAA4E,eAAe,CAAC,4EAA4E,gBAAgB,CAAC,4EAA4E,aAAa,CAAC,4EAA4E,iBAAiB,CAAC,4EAA4E,gBAAgB,CAAC,4EAA4E,eAAe,CAAC,4EAA4E,eAAe,CAAC,4EAA4E,gBAAgB,CAAC,8EAA8E,kBAAkB,CAAC,8EAA8E,gBAAgB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,aAAa,CAAC,4EAA4E,sBAAsB,CAAC,4EAA4E,sBAAsB,CAAC,4EAA4E,eAAe,CAAC,4EAA4E,gBAAgB,CAAC,8EAA8E,sBAAsB,CAAC,8EAA8E,sBAAsB,CAAC,4EAA4E,cAAc,CAAC,4EAA4E,cAAc,CAAC,4EAA4E,cAAc,CAAC,4EAA4E,cAAc,CAAC,4EAA4E,cAAc,CAAC,4EAA4E,aAAa,CAAC,4EAA4E,eAAe,CAAC,4EAA4E,gBAAgB,CAAC,4EAA4E,iBAAiB,CAAC,8EAA8E,iBAAiB,CAAC,8EAA8E,iBAAiB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,cAAc,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,eAAe,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,aAAa,CAAC,4EAA4E,eAAe,CAAC,4EAA4E,gBAAgB,CAAC,8EAA8E,sBAAsB,CAAC,8EAA8E,sBAAsB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,gBAAgB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,aAAa,CAAC,4EAA4E,eAAe,CAAC,8EAA8E,sBAAsB,CAAC,8EAA8E,sBAAsB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,oBAAoB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,qBAAqB,CAAC,4EAA4E,aAAa,CAAC,8EAA8E,sBAAsB,CAAC,8EAA8E,sBAAsB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,gFAAgF,aAAa,CAAC,gFAAgF,sBAAsB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,8EAA8E,qBAAqB,CAAC,gFAAgF,qBAAqB,CAAC,gFAAgF,aAAa,CAAC,0BAA0B,uBAAuB,CAAC,0BAA0B,uBAAuB,CAAC,0BAA0B,uBAAuB,CAAC,0BAA0B,uBAAuB,CAAC,2CAA2C,uBAAuB,CAAC,2CAA2C,uBAAuB,CAAC,sBAAsB,qBAAqB,WAAW,CAAC,sCAAsC,iBAAiB,CAAC,2BAA2B,uBAAuB,CAAC,2BAA2B,uBAAuB,CAAC,AAA6C,mDAAwB,iBAAiB,CAAC,4BAA4B,iBAAiB,CAAC,8CAA8C,OAAO,CAAC,gBAAgB,aAAa,CAAC,mCAAmC,qBAAqB,aAAa,CAAC,4BAA4B,oBAAoB,CAAC,qCAAqC,iBAAiB,CAAC,qCAAqC,eAAe,CAAC,qCAAqC,gBAAgB,CAAC,kBAAkB,eAAe,CAAC,WAAW,cAAc,kBAAkB,WAAW,eAAe,kBAAkB,oBAAoB,kBAAkB,eAAe,eAAe,oBAAoB,sBAAsB,oBAAoB,sBAAsB,oBAAoB,gBAAgB,CAAC,gBAAgB,WAAW,CAAC,WAAW,kBAAkB,YAAY,aAAa,eAAe,eAAe,CAAC,iBAAiB,WAAW,cAAc,kBAAkB,eAAe,CAAC,+CAA+C,UAAU,CAAC,kBAAkB,WAAW,kBAAkB,eAAe,CAAC,uBAAuB,kBAAkB,OAAO,YAAY,eAAe,CAAC,wBAAwB,kBAAkB,QAAQ,YAAY,eAAe,CAAC,mBAAmB,kBAAkB,OAAO,YAAY,eAAe,CAAC,qBAAqB,kBAAkB,SAAS,UAAU,eAAe,CAAC,oBAAoB,kBAAkB,QAAQ,YAAY,eAAe,CAAC,oBAAoB,cAAc,CAAC,6CAA6C,iBAAiB,CAAC,eAAe,cAAc,CAAC,+BAA+B,8BAA8B,sBAAsB,kBAAkB,CAAC,mBAAmB,cAAc,CAAC,mBAAmB,kBAAkB,kBAAkB,CAAC,aAAa,0BAA0B,yBAAyB,CAAC,eAAe,cAAc,aAAa,iBAAiB,CAAC,sBAAsB,cAAc,kBAAkB,kBAAkB,CAAC,kCAAkC,cAAc,iBAAiB,CAAC,uCAAuC,kBAAkB,OAAO,CAAC,6CAA6C,OAAO,UAAU,CAAC,4BAA4B,eAAe,CAAC","file":"katex.min.css","sourcesContent":["@font-face{font-family:KaTeX_AMS;src:url(fonts/KaTeX_AMS-Regular.woff2) format(\"woff2\"),url(fonts/KaTeX_AMS-Regular.woff) format(\"woff\"),url(fonts/KaTeX_AMS-Regular.ttf) format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format(\"woff2\"),url(fonts/KaTeX_Caligraphic-Bold.woff) format(\"woff\"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format(\"truetype\");font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format(\"woff2\"),url(fonts/KaTeX_Caligraphic-Regular.woff) format(\"woff\"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format(\"woff2\"),url(fonts/KaTeX_Fraktur-Bold.woff) format(\"woff\"),url(fonts/KaTeX_Fraktur-Bold.ttf) format(\"truetype\");font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format(\"woff2\"),url(fonts/KaTeX_Fraktur-Regular.woff) format(\"woff\"),url(fonts/KaTeX_Fraktur-Regular.ttf) format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Bold.woff2) format(\"woff2\"),url(fonts/KaTeX_Main-Bold.woff) format(\"woff\"),url(fonts/KaTeX_Main-Bold.ttf) format(\"truetype\");font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format(\"woff2\"),url(fonts/KaTeX_Main-BoldItalic.woff) format(\"woff\"),url(fonts/KaTeX_Main-BoldItalic.ttf) format(\"truetype\");font-weight:700;font-style:italic}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Italic.woff2) format(\"woff2\"),url(fonts/KaTeX_Main-Italic.woff) format(\"woff\"),url(fonts/KaTeX_Main-Italic.ttf) format(\"truetype\");font-weight:400;font-style:italic}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Regular.woff2) format(\"woff2\"),url(fonts/KaTeX_Main-Regular.woff) format(\"woff\"),url(fonts/KaTeX_Main-Regular.ttf) format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format(\"woff2\"),url(fonts/KaTeX_Math-BoldItalic.woff) format(\"woff\"),url(fonts/KaTeX_Math-BoldItalic.ttf) format(\"truetype\");font-weight:700;font-style:italic}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-Italic.woff2) format(\"woff2\"),url(fonts/KaTeX_Math-Italic.woff) format(\"woff\"),url(fonts/KaTeX_Math-Italic.ttf) format(\"truetype\");font-weight:400;font-style:italic}@font-face{font-family:\"KaTeX_SansSerif\";src:url(fonts/KaTeX_SansSerif-Bold.woff2) format(\"woff2\"),url(fonts/KaTeX_SansSerif-Bold.woff) format(\"woff\"),url(fonts/KaTeX_SansSerif-Bold.ttf) format(\"truetype\");font-weight:700;font-style:normal}@font-face{font-family:\"KaTeX_SansSerif\";src:url(fonts/KaTeX_SansSerif-Italic.woff2) format(\"woff2\"),url(fonts/KaTeX_SansSerif-Italic.woff) format(\"woff\"),url(fonts/KaTeX_SansSerif-Italic.ttf) format(\"truetype\");font-weight:400;font-style:italic}@font-face{font-family:\"KaTeX_SansSerif\";src:url(fonts/KaTeX_SansSerif-Regular.woff2) format(\"woff2\"),url(fonts/KaTeX_SansSerif-Regular.woff) format(\"woff\"),url(fonts/KaTeX_SansSerif-Regular.ttf) format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Script;src:url(fonts/KaTeX_Script-Regular.woff2) format(\"woff2\"),url(fonts/KaTeX_Script-Regular.woff) format(\"woff\"),url(fonts/KaTeX_Script-Regular.ttf) format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size1;src:url(fonts/KaTeX_Size1-Regular.woff2) format(\"woff2\"),url(fonts/KaTeX_Size1-Regular.woff) format(\"woff\"),url(fonts/KaTeX_Size1-Regular.ttf) format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size2;src:url(fonts/KaTeX_Size2-Regular.woff2) format(\"woff2\"),url(fonts/KaTeX_Size2-Regular.woff) format(\"woff\"),url(fonts/KaTeX_Size2-Regular.ttf) format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size3;src:url(fonts/KaTeX_Size3-Regular.woff2) format(\"woff2\"),url(fonts/KaTeX_Size3-Regular.woff) format(\"woff\"),url(fonts/KaTeX_Size3-Regular.ttf) format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size4;src:url(fonts/KaTeX_Size4-Regular.woff2) format(\"woff2\"),url(fonts/KaTeX_Size4-Regular.woff) format(\"woff\"),url(fonts/KaTeX_Size4-Regular.ttf) format(\"truetype\");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Typewriter;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format(\"woff2\"),url(fonts/KaTeX_Typewriter-Regular.woff) format(\"woff\"),url(fonts/KaTeX_Typewriter-Regular.ttf) format(\"truetype\");font-weight:400;font-style:normal}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:\"0.11.1\"}.katex .katex-mathml{position:absolute;clip:rect(1px,1px,1px,1px);padding:0;border:0;height:1px;width:1px;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathdefault{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-weight:700;font-style:italic}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;vertical-align:bottom;position:relative}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;vertical-align:bottom;font-size:1px;width:2px;min-width:2px}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{display:inline-block;width:100%;border-bottom-style:solid}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{display:inline-block;border:0 solid;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{display:inline-block;width:100%;border-bottom-style:solid}.katex .hdashline{display:inline-block;width:100%;border-bottom-style:dashed}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .op-limits>.vlist-t{text-align:center}.katex .accent>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{display:block;position:absolute;width:100%;height:inherit;fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex svg path{stroke:none}.katex img{border-style:none;min-width:0;min-height:0;max-width:none;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:\"\"}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{position:absolute;left:0;width:50.2%;overflow:hidden}.katex .halfarrow-right{position:absolute;right:0;width:50.2%;overflow:hidden}.katex .brace-left{position:absolute;left:0;width:25.1%;overflow:hidden}.katex .brace-center{position:absolute;left:25%;width:50%;overflow:hidden}.katex .brace-right{position:absolute;right:0;width:25.1%;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{-webkit-box-sizing:border-box;box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left}\n"],"sourceRoot":""}]);
|
||
|
||
// exports
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1562:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_AMS-Regular.e78e28b4.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1563:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_AMS-Regular.7f06b4e3.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1564:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_AMS-Regular.aaf4eee9.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1565:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Caligraphic-Bold.4ec58bef.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1566:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Caligraphic-Bold.1e802ca9.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1567:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Caligraphic-Bold.021dd4dc.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1568:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Caligraphic-Regular.7edb53b6.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1569:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Caligraphic-Regular.d3b46c3a.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1570:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Caligraphic-Regular.d49f2d55.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1571:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Fraktur-Bold.d5b59ec9.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1572:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Fraktur-Bold.c4c8cab7.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1573:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Fraktur-Bold.a31e7cba.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1574:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Fraktur-Regular.32a5339e.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1575:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Fraktur-Regular.b7d9c46b.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1576:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Fraktur-Regular.a48dad4f.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1577:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Main-Bold.8e1e01c4.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1578:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Main-Bold.22086eb5.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1579:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Main-Bold.9ceff51b.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1580:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Main-BoldItalic.284a17fe.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1581:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Main-BoldItalic.4c57dbc4.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1582:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Main-BoldItalic.e8b44b99.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1583:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Main-Italic.e533d5a2.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1584:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Main-Italic.99be0e10.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1585:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Main-Italic.29c86397.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1586:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Main-Regular.5c734d78.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1587:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Main-Regular.b741441f.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1588:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Main-Regular.5c94aef4.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1589:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Math-BoldItalic.d747bd1e.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1590:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Math-BoldItalic.b13731ef.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1591:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Math-BoldItalic.9a2834a9.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1592:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Math-Italic.4ad08b82.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1593:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Math-Italic.f0303906.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1594:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Math-Italic.291e76b8.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1595:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_SansSerif-Bold.6e0830be.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1596:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_SansSerif-Bold.3fb41955.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1597:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_SansSerif-Bold.7dc027cb.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1598:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_SansSerif-Italic.fba01c9c.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1599:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_SansSerif-Italic.727a9b0d.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1600:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_SansSerif-Italic.4059868e.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1601:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_SansSerif-Regular.d929cd67.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1602:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_SansSerif-Regular.2555754a.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1603:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_SansSerif-Regular.5c58d168.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1604:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Script-Regular.755e2491.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1605:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Script-Regular.d524c9a5.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1606:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Script-Regular.d12ea9ef.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1607:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Size1-Regular.048c39cb.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1608:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Size1-Regular.08b5f00e.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1609:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Size1-Regular.7342d45b.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1610:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Size2-Regular.81d6b8d5.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1611:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Size2-Regular.af24b0e4.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1612:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Size2-Regular.eb130dcc.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1613:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Size3-Regular.b311ca09.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1614:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Size3-Regular.0d892640.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1615:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Size3-Regular.7e02a40c.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1616:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Size4-Regular.6a3255df.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1617:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Size4-Regular.68895bb8.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1618:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Size4-Regular.ad767252.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1619:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Typewriter-Regular.6cc31ea5.woff2";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1620:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Typewriter-Regular.3fe216d2.woff";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1621:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__.p + "static/media/KaTeX_Typewriter-Regular.25702356.ttf";
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1622:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
(function webpackUniversalModuleDefinition(root, factory) {
|
||
if(true)
|
||
module.exports = factory();
|
||
else if(typeof define === 'function' && define.amd)
|
||
define([], factory);
|
||
else if(typeof exports === 'object')
|
||
exports["katex"] = factory();
|
||
else
|
||
root["katex"] = factory();
|
||
})((typeof self !== 'undefined' ? self : this), function() {
|
||
return /******/ (function(modules) { // webpackBootstrap
|
||
/******/ // The module cache
|
||
/******/ var installedModules = {};
|
||
/******/
|
||
/******/ // The require function
|
||
/******/ function __webpack_require__(moduleId) {
|
||
/******/
|
||
/******/ // Check if module is in cache
|
||
/******/ if(installedModules[moduleId]) {
|
||
/******/ return installedModules[moduleId].exports;
|
||
/******/ }
|
||
/******/ // Create a new module (and put it into the cache)
|
||
/******/ var module = installedModules[moduleId] = {
|
||
/******/ i: moduleId,
|
||
/******/ l: false,
|
||
/******/ exports: {}
|
||
/******/ };
|
||
/******/
|
||
/******/ // Execute the module function
|
||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||
/******/
|
||
/******/ // Flag the module as loaded
|
||
/******/ module.l = true;
|
||
/******/
|
||
/******/ // Return the exports of the module
|
||
/******/ return module.exports;
|
||
/******/ }
|
||
/******/
|
||
/******/
|
||
/******/ // expose the modules object (__webpack_modules__)
|
||
/******/ __webpack_require__.m = modules;
|
||
/******/
|
||
/******/ // expose the module cache
|
||
/******/ __webpack_require__.c = installedModules;
|
||
/******/
|
||
/******/ // define getter function for harmony exports
|
||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||
/******/ }
|
||
/******/ };
|
||
/******/
|
||
/******/ // define __esModule on exports
|
||
/******/ __webpack_require__.r = function(exports) {
|
||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||
/******/ }
|
||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||
/******/ };
|
||
/******/
|
||
/******/ // create a fake namespace object
|
||
/******/ // mode & 1: value is a module id, require it
|
||
/******/ // mode & 2: merge all properties of value into the ns
|
||
/******/ // mode & 4: return value when already ns object
|
||
/******/ // mode & 8|1: behave like require
|
||
/******/ __webpack_require__.t = function(value, mode) {
|
||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||
/******/ if(mode & 8) return value;
|
||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||
/******/ var ns = Object.create(null);
|
||
/******/ __webpack_require__.r(ns);
|
||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||
/******/ return ns;
|
||
/******/ };
|
||
/******/
|
||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||
/******/ __webpack_require__.n = function(module) {
|
||
/******/ var getter = module && module.__esModule ?
|
||
/******/ function getDefault() { return module['default']; } :
|
||
/******/ function getModuleExports() { return module; };
|
||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||
/******/ return getter;
|
||
/******/ };
|
||
/******/
|
||
/******/ // Object.prototype.hasOwnProperty.call
|
||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||
/******/
|
||
/******/ // __webpack_public_path__
|
||
/******/ __webpack_require__.p = "";
|
||
/******/
|
||
/******/
|
||
/******/ // Load entry module and return exports
|
||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||
/******/ })
|
||
/************************************************************************/
|
||
/******/ ([
|
||
/* 0 */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// extracted by mini-css-extract-plugin
|
||
|
||
/***/ }),
|
||
/* 1 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
|
||
// EXTERNAL MODULE: ./src/katex.less
|
||
var katex = __webpack_require__(0);
|
||
|
||
// CONCATENATED MODULE: ./src/SourceLocation.js
|
||
/**
|
||
* Lexing or parsing positional information for error reporting.
|
||
* This object is immutable.
|
||
*/
|
||
var SourceLocation =
|
||
/*#__PURE__*/
|
||
function () {
|
||
// The + prefix indicates that these fields aren't writeable
|
||
// Lexer holding the input string.
|
||
// Start offset, zero-based inclusive.
|
||
// End offset, zero-based exclusive.
|
||
function SourceLocation(lexer, start, end) {
|
||
this.lexer = void 0;
|
||
this.start = void 0;
|
||
this.end = void 0;
|
||
this.lexer = lexer;
|
||
this.start = start;
|
||
this.end = end;
|
||
}
|
||
/**
|
||
* Merges two `SourceLocation`s from location providers, given they are
|
||
* provided in order of appearance.
|
||
* - Returns the first one's location if only the first is provided.
|
||
* - Returns a merged range of the first and the last if both are provided
|
||
* and their lexers match.
|
||
* - Otherwise, returns null.
|
||
*/
|
||
|
||
|
||
SourceLocation.range = function range(first, second) {
|
||
if (!second) {
|
||
return first && first.loc;
|
||
} else if (!first || !first.loc || !second.loc || first.loc.lexer !== second.loc.lexer) {
|
||
return null;
|
||
} else {
|
||
return new SourceLocation(first.loc.lexer, first.loc.start, second.loc.end);
|
||
}
|
||
};
|
||
|
||
return SourceLocation;
|
||
}();
|
||
|
||
|
||
// CONCATENATED MODULE: ./src/Token.js
|
||
|
||
/**
|
||
* Interface required to break circular dependency between Token, Lexer, and
|
||
* ParseError.
|
||
*/
|
||
|
||
/**
|
||
* The resulting token returned from `lex`.
|
||
*
|
||
* It consists of the token text plus some position information.
|
||
* The position information is essentially a range in an input string,
|
||
* but instead of referencing the bare input string, we refer to the lexer.
|
||
* That way it is possible to attach extra metadata to the input string,
|
||
* like for example a file name or similar.
|
||
*
|
||
* The position information is optional, so it is OK to construct synthetic
|
||
* tokens if appropriate. Not providing available position information may
|
||
* lead to degraded error reporting, though.
|
||
*/
|
||
var Token_Token =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function Token(text, // the text of this token
|
||
loc) {
|
||
this.text = void 0;
|
||
this.loc = void 0;
|
||
this.text = text;
|
||
this.loc = loc;
|
||
}
|
||
/**
|
||
* Given a pair of tokens (this and endToken), compute a `Token` encompassing
|
||
* the whole input range enclosed by these two.
|
||
*/
|
||
|
||
|
||
var _proto = Token.prototype;
|
||
|
||
_proto.range = function range(endToken, // last token of the range, inclusive
|
||
text) // the text of the newly constructed token
|
||
{
|
||
return new Token(text, SourceLocation.range(this, endToken));
|
||
};
|
||
|
||
return Token;
|
||
}();
|
||
// CONCATENATED MODULE: ./src/ParseError.js
|
||
|
||
|
||
/**
|
||
* This is the ParseError class, which is the main error thrown by KaTeX
|
||
* functions when something has gone wrong. This is used to distinguish internal
|
||
* errors from errors in the expression that the user provided.
|
||
*
|
||
* If possible, a caller should provide a Token or ParseNode with information
|
||
* about where in the source string the problem occurred.
|
||
*/
|
||
var ParseError = // Error position based on passed-in Token or ParseNode.
|
||
function ParseError(message, // The error message
|
||
token) // An object providing position information
|
||
{
|
||
this.position = void 0;
|
||
var error = "KaTeX parse error: " + message;
|
||
var start;
|
||
var loc = token && token.loc;
|
||
|
||
if (loc && loc.start <= loc.end) {
|
||
// If we have the input and a position, make the error a bit fancier
|
||
// Get the input
|
||
var input = loc.lexer.input; // Prepend some information
|
||
|
||
start = loc.start;
|
||
var end = loc.end;
|
||
|
||
if (start === input.length) {
|
||
error += " at end of input: ";
|
||
} else {
|
||
error += " at position " + (start + 1) + ": ";
|
||
} // Underline token in question using combining underscores
|
||
|
||
|
||
var underlined = input.slice(start, end).replace(/[^]/g, "$&\u0332"); // Extract some context from the input and add it to the error
|
||
|
||
var left;
|
||
|
||
if (start > 15) {
|
||
left = "…" + input.slice(start - 15, start);
|
||
} else {
|
||
left = input.slice(0, start);
|
||
}
|
||
|
||
var right;
|
||
|
||
if (end + 15 < input.length) {
|
||
right = input.slice(end, end + 15) + "…";
|
||
} else {
|
||
right = input.slice(end);
|
||
}
|
||
|
||
error += left + underlined + right;
|
||
} // Some hackery to make ParseError a prototype of Error
|
||
// See http://stackoverflow.com/a/8460753
|
||
|
||
|
||
var self = new Error(error);
|
||
self.name = "ParseError"; // $FlowFixMe
|
||
|
||
self.__proto__ = ParseError.prototype; // $FlowFixMe
|
||
|
||
self.position = start;
|
||
return self;
|
||
}; // $FlowFixMe More hackery
|
||
|
||
|
||
ParseError.prototype.__proto__ = Error.prototype;
|
||
/* harmony default export */ var src_ParseError = (ParseError);
|
||
// CONCATENATED MODULE: ./src/utils.js
|
||
/**
|
||
* This file contains a list of utility functions which are useful in other
|
||
* files.
|
||
*/
|
||
|
||
/**
|
||
* Return whether an element is contained in a list
|
||
*/
|
||
var contains = function contains(list, elem) {
|
||
return list.indexOf(elem) !== -1;
|
||
};
|
||
/**
|
||
* Provide a default value if a setting is undefined
|
||
* NOTE: Couldn't use `T` as the output type due to facebook/flow#5022.
|
||
*/
|
||
|
||
|
||
var deflt = function deflt(setting, defaultIfUndefined) {
|
||
return setting === undefined ? defaultIfUndefined : setting;
|
||
}; // hyphenate and escape adapted from Facebook's React under Apache 2 license
|
||
|
||
|
||
var uppercase = /([A-Z])/g;
|
||
|
||
var hyphenate = function hyphenate(str) {
|
||
return str.replace(uppercase, "-$1").toLowerCase();
|
||
};
|
||
|
||
var ESCAPE_LOOKUP = {
|
||
"&": "&",
|
||
">": ">",
|
||
"<": "<",
|
||
"\"": """,
|
||
"'": "'"
|
||
};
|
||
var ESCAPE_REGEX = /[&><"']/g;
|
||
/**
|
||
* Escapes text to prevent scripting attacks.
|
||
*/
|
||
|
||
function utils_escape(text) {
|
||
return String(text).replace(ESCAPE_REGEX, function (match) {
|
||
return ESCAPE_LOOKUP[match];
|
||
});
|
||
}
|
||
/**
|
||
* Sometimes we want to pull out the innermost element of a group. In most
|
||
* cases, this will just be the group itself, but when ordgroups and colors have
|
||
* a single element, we want to pull that out.
|
||
*/
|
||
|
||
|
||
var getBaseElem = function getBaseElem(group) {
|
||
if (group.type === "ordgroup") {
|
||
if (group.body.length === 1) {
|
||
return getBaseElem(group.body[0]);
|
||
} else {
|
||
return group;
|
||
}
|
||
} else if (group.type === "color") {
|
||
if (group.body.length === 1) {
|
||
return getBaseElem(group.body[0]);
|
||
} else {
|
||
return group;
|
||
}
|
||
} else if (group.type === "font") {
|
||
return getBaseElem(group.body);
|
||
} else {
|
||
return group;
|
||
}
|
||
};
|
||
/**
|
||
* TeXbook algorithms often reference "character boxes", which are simply groups
|
||
* with a single character in them. To decide if something is a character box,
|
||
* we find its innermost group, and see if it is a single character.
|
||
*/
|
||
|
||
|
||
var utils_isCharacterBox = function isCharacterBox(group) {
|
||
var baseElem = getBaseElem(group); // These are all they types of groups which hold single characters
|
||
|
||
return baseElem.type === "mathord" || baseElem.type === "textord" || baseElem.type === "atom";
|
||
};
|
||
|
||
var assert = function assert(value) {
|
||
if (!value) {
|
||
throw new Error('Expected non-null, but got ' + String(value));
|
||
}
|
||
|
||
return value;
|
||
};
|
||
/**
|
||
* Return the protocol of a URL, or "_relative" if the URL does not specify a
|
||
* protocol (and thus is relative).
|
||
*/
|
||
|
||
var protocolFromUrl = function protocolFromUrl(url) {
|
||
var protocol = /^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(url);
|
||
return protocol != null ? protocol[1] : "_relative";
|
||
};
|
||
/* harmony default export */ var utils = ({
|
||
contains: contains,
|
||
deflt: deflt,
|
||
escape: utils_escape,
|
||
hyphenate: hyphenate,
|
||
getBaseElem: getBaseElem,
|
||
isCharacterBox: utils_isCharacterBox,
|
||
protocolFromUrl: protocolFromUrl
|
||
});
|
||
// CONCATENATED MODULE: ./src/Settings.js
|
||
/* eslint no-console:0 */
|
||
|
||
/**
|
||
* This is a module for storing settings passed into KaTeX. It correctly handles
|
||
* default settings.
|
||
*/
|
||
|
||
|
||
|
||
|
||
/**
|
||
* The main Settings object
|
||
*
|
||
* The current options stored are:
|
||
* - displayMode: Whether the expression should be typeset as inline math
|
||
* (false, the default), meaning that the math starts in
|
||
* \textstyle and is placed in an inline-block); or as display
|
||
* math (true), meaning that the math starts in \displaystyle
|
||
* and is placed in a block with vertical margin.
|
||
*/
|
||
var Settings_Settings =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function Settings(options) {
|
||
this.displayMode = void 0;
|
||
this.output = void 0;
|
||
this.leqno = void 0;
|
||
this.fleqn = void 0;
|
||
this.throwOnError = void 0;
|
||
this.errorColor = void 0;
|
||
this.macros = void 0;
|
||
this.minRuleThickness = void 0;
|
||
this.colorIsTextColor = void 0;
|
||
this.strict = void 0;
|
||
this.trust = void 0;
|
||
this.maxSize = void 0;
|
||
this.maxExpand = void 0;
|
||
// allow null options
|
||
options = options || {};
|
||
this.displayMode = utils.deflt(options.displayMode, false);
|
||
this.output = utils.deflt(options.output, "htmlAndMathml");
|
||
this.leqno = utils.deflt(options.leqno, false);
|
||
this.fleqn = utils.deflt(options.fleqn, false);
|
||
this.throwOnError = utils.deflt(options.throwOnError, true);
|
||
this.errorColor = utils.deflt(options.errorColor, "#cc0000");
|
||
this.macros = options.macros || {};
|
||
this.minRuleThickness = Math.max(0, utils.deflt(options.minRuleThickness, 0));
|
||
this.colorIsTextColor = utils.deflt(options.colorIsTextColor, false);
|
||
this.strict = utils.deflt(options.strict, "warn");
|
||
this.trust = utils.deflt(options.trust, false);
|
||
this.maxSize = Math.max(0, utils.deflt(options.maxSize, Infinity));
|
||
this.maxExpand = Math.max(0, utils.deflt(options.maxExpand, 1000));
|
||
}
|
||
/**
|
||
* Report nonstrict (non-LaTeX-compatible) input.
|
||
* Can safely not be called if `this.strict` is false in JavaScript.
|
||
*/
|
||
|
||
|
||
var _proto = Settings.prototype;
|
||
|
||
_proto.reportNonstrict = function reportNonstrict(errorCode, errorMsg, token) {
|
||
var strict = this.strict;
|
||
|
||
if (typeof strict === "function") {
|
||
// Allow return value of strict function to be boolean or string
|
||
// (or null/undefined, meaning no further processing).
|
||
strict = strict(errorCode, errorMsg, token);
|
||
}
|
||
|
||
if (!strict || strict === "ignore") {
|
||
return;
|
||
} else if (strict === true || strict === "error") {
|
||
throw new src_ParseError("LaTeX-incompatible input and strict mode is set to 'error': " + (errorMsg + " [" + errorCode + "]"), token);
|
||
} else if (strict === "warn") {
|
||
typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (errorMsg + " [" + errorCode + "]"));
|
||
} else {
|
||
// won't happen in type-safe code
|
||
typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + strict + "': " + errorMsg + " [" + errorCode + "]"));
|
||
}
|
||
}
|
||
/**
|
||
* Check whether to apply strict (LaTeX-adhering) behavior for unusual
|
||
* input (like `\\`). Unlike `nonstrict`, will not throw an error;
|
||
* instead, "error" translates to a return value of `true`, while "ignore"
|
||
* translates to a return value of `false`. May still print a warning:
|
||
* "warn" prints a warning and returns `false`.
|
||
* This is for the second category of `errorCode`s listed in the README.
|
||
*/
|
||
;
|
||
|
||
_proto.useStrictBehavior = function useStrictBehavior(errorCode, errorMsg, token) {
|
||
var strict = this.strict;
|
||
|
||
if (typeof strict === "function") {
|
||
// Allow return value of strict function to be boolean or string
|
||
// (or null/undefined, meaning no further processing).
|
||
// But catch any exceptions thrown by function, treating them
|
||
// like "error".
|
||
try {
|
||
strict = strict(errorCode, errorMsg, token);
|
||
} catch (error) {
|
||
strict = "error";
|
||
}
|
||
}
|
||
|
||
if (!strict || strict === "ignore") {
|
||
return false;
|
||
} else if (strict === true || strict === "error") {
|
||
return true;
|
||
} else if (strict === "warn") {
|
||
typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (errorMsg + " [" + errorCode + "]"));
|
||
return false;
|
||
} else {
|
||
// won't happen in type-safe code
|
||
typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + strict + "': " + errorMsg + " [" + errorCode + "]"));
|
||
return false;
|
||
}
|
||
}
|
||
/**
|
||
* Check whether to test potentially dangerous input, and return
|
||
* `true` (trusted) or `false` (untrusted). The sole argument `context`
|
||
* should be an object with `command` field specifying the relevant LaTeX
|
||
* command (as a string starting with `\`), and any other arguments, etc.
|
||
* If `context` has a `url` field, a `protocol` field will automatically
|
||
* get added by this function (changing the specified object).
|
||
*/
|
||
;
|
||
|
||
_proto.isTrusted = function isTrusted(context) {
|
||
if (context.url && !context.protocol) {
|
||
context.protocol = utils.protocolFromUrl(context.url);
|
||
}
|
||
|
||
var trust = typeof this.trust === "function" ? this.trust(context) : this.trust;
|
||
return Boolean(trust);
|
||
};
|
||
|
||
return Settings;
|
||
}();
|
||
|
||
|
||
// CONCATENATED MODULE: ./src/Style.js
|
||
/**
|
||
* This file contains information and classes for the various kinds of styles
|
||
* used in TeX. It provides a generic `Style` class, which holds information
|
||
* about a specific style. It then provides instances of all the different kinds
|
||
* of styles possible, and provides functions to move between them and get
|
||
* information about them.
|
||
*/
|
||
|
||
/**
|
||
* The main style class. Contains a unique id for the style, a size (which is
|
||
* the same for cramped and uncramped version of a style), and a cramped flag.
|
||
*/
|
||
var Style =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function Style(id, size, cramped) {
|
||
this.id = void 0;
|
||
this.size = void 0;
|
||
this.cramped = void 0;
|
||
this.id = id;
|
||
this.size = size;
|
||
this.cramped = cramped;
|
||
}
|
||
/**
|
||
* Get the style of a superscript given a base in the current style.
|
||
*/
|
||
|
||
|
||
var _proto = Style.prototype;
|
||
|
||
_proto.sup = function sup() {
|
||
return Style_styles[_sup[this.id]];
|
||
}
|
||
/**
|
||
* Get the style of a subscript given a base in the current style.
|
||
*/
|
||
;
|
||
|
||
_proto.sub = function sub() {
|
||
return Style_styles[_sub[this.id]];
|
||
}
|
||
/**
|
||
* Get the style of a fraction numerator given the fraction in the current
|
||
* style.
|
||
*/
|
||
;
|
||
|
||
_proto.fracNum = function fracNum() {
|
||
return Style_styles[_fracNum[this.id]];
|
||
}
|
||
/**
|
||
* Get the style of a fraction denominator given the fraction in the current
|
||
* style.
|
||
*/
|
||
;
|
||
|
||
_proto.fracDen = function fracDen() {
|
||
return Style_styles[_fracDen[this.id]];
|
||
}
|
||
/**
|
||
* Get the cramped version of a style (in particular, cramping a cramped style
|
||
* doesn't change the style).
|
||
*/
|
||
;
|
||
|
||
_proto.cramp = function cramp() {
|
||
return Style_styles[_cramp[this.id]];
|
||
}
|
||
/**
|
||
* Get a text or display version of this style.
|
||
*/
|
||
;
|
||
|
||
_proto.text = function text() {
|
||
return Style_styles[_text[this.id]];
|
||
}
|
||
/**
|
||
* Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle)
|
||
*/
|
||
;
|
||
|
||
_proto.isTight = function isTight() {
|
||
return this.size >= 2;
|
||
};
|
||
|
||
return Style;
|
||
}(); // Export an interface for type checking, but don't expose the implementation.
|
||
// This way, no more styles can be generated.
|
||
|
||
|
||
// IDs of the different styles
|
||
var D = 0;
|
||
var Dc = 1;
|
||
var T = 2;
|
||
var Tc = 3;
|
||
var S = 4;
|
||
var Sc = 5;
|
||
var SS = 6;
|
||
var SSc = 7; // Instances of the different styles
|
||
|
||
var Style_styles = [new Style(D, 0, false), new Style(Dc, 0, true), new Style(T, 1, false), new Style(Tc, 1, true), new Style(S, 2, false), new Style(Sc, 2, true), new Style(SS, 3, false), new Style(SSc, 3, true)]; // Lookup tables for switching from one style to another
|
||
|
||
var _sup = [S, Sc, S, Sc, SS, SSc, SS, SSc];
|
||
var _sub = [Sc, Sc, Sc, Sc, SSc, SSc, SSc, SSc];
|
||
var _fracNum = [T, Tc, S, Sc, SS, SSc, SS, SSc];
|
||
var _fracDen = [Tc, Tc, Sc, Sc, SSc, SSc, SSc, SSc];
|
||
var _cramp = [Dc, Dc, Tc, Tc, Sc, Sc, SSc, SSc];
|
||
var _text = [D, Dc, T, Tc, T, Tc, T, Tc]; // We only export some of the styles.
|
||
|
||
/* harmony default export */ var src_Style = ({
|
||
DISPLAY: Style_styles[D],
|
||
TEXT: Style_styles[T],
|
||
SCRIPT: Style_styles[S],
|
||
SCRIPTSCRIPT: Style_styles[SS]
|
||
});
|
||
// CONCATENATED MODULE: ./src/unicodeScripts.js
|
||
/*
|
||
* This file defines the Unicode scripts and script families that we
|
||
* support. To add new scripts or families, just add a new entry to the
|
||
* scriptData array below. Adding scripts to the scriptData array allows
|
||
* characters from that script to appear in \text{} environments.
|
||
*/
|
||
|
||
/**
|
||
* Each script or script family has a name and an array of blocks.
|
||
* Each block is an array of two numbers which specify the start and
|
||
* end points (inclusive) of a block of Unicode codepoints.
|
||
*/
|
||
|
||
/**
|
||
* Unicode block data for the families of scripts we support in \text{}.
|
||
* Scripts only need to appear here if they do not have font metrics.
|
||
*/
|
||
var scriptData = [{
|
||
// Latin characters beyond the Latin-1 characters we have metrics for.
|
||
// Needed for Czech, Hungarian and Turkish text, for example.
|
||
name: 'latin',
|
||
blocks: [[0x0100, 0x024f], // Latin Extended-A and Latin Extended-B
|
||
[0x0300, 0x036f]]
|
||
}, {
|
||
// The Cyrillic script used by Russian and related languages.
|
||
// A Cyrillic subset used to be supported as explicitly defined
|
||
// symbols in symbols.js
|
||
name: 'cyrillic',
|
||
blocks: [[0x0400, 0x04ff]]
|
||
}, {
|
||
// The Brahmic scripts of South and Southeast Asia
|
||
// Devanagari (0900–097F)
|
||
// Bengali (0980–09FF)
|
||
// Gurmukhi (0A00–0A7F)
|
||
// Gujarati (0A80–0AFF)
|
||
// Oriya (0B00–0B7F)
|
||
// Tamil (0B80–0BFF)
|
||
// Telugu (0C00–0C7F)
|
||
// Kannada (0C80–0CFF)
|
||
// Malayalam (0D00–0D7F)
|
||
// Sinhala (0D80–0DFF)
|
||
// Thai (0E00–0E7F)
|
||
// Lao (0E80–0EFF)
|
||
// Tibetan (0F00–0FFF)
|
||
// Myanmar (1000–109F)
|
||
name: 'brahmic',
|
||
blocks: [[0x0900, 0x109F]]
|
||
}, {
|
||
name: 'georgian',
|
||
blocks: [[0x10A0, 0x10ff]]
|
||
}, {
|
||
// Chinese and Japanese.
|
||
// The "k" in cjk is for Korean, but we've separated Korean out
|
||
name: "cjk",
|
||
blocks: [[0x3000, 0x30FF], // CJK symbols and punctuation, Hiragana, Katakana
|
||
[0x4E00, 0x9FAF], // CJK ideograms
|
||
[0xFF00, 0xFF60]]
|
||
}, {
|
||
// Korean
|
||
name: 'hangul',
|
||
blocks: [[0xAC00, 0xD7AF]]
|
||
}];
|
||
/**
|
||
* Given a codepoint, return the name of the script or script family
|
||
* it is from, or null if it is not part of a known block
|
||
*/
|
||
|
||
function scriptFromCodepoint(codepoint) {
|
||
for (var i = 0; i < scriptData.length; i++) {
|
||
var script = scriptData[i];
|
||
|
||
for (var _i = 0; _i < script.blocks.length; _i++) {
|
||
var block = script.blocks[_i];
|
||
|
||
if (codepoint >= block[0] && codepoint <= block[1]) {
|
||
return script.name;
|
||
}
|
||
}
|
||
}
|
||
|
||
return null;
|
||
}
|
||
/**
|
||
* A flattened version of all the supported blocks in a single array.
|
||
* This is an optimization to make supportedCodepoint() fast.
|
||
*/
|
||
|
||
var allBlocks = [];
|
||
scriptData.forEach(function (s) {
|
||
return s.blocks.forEach(function (b) {
|
||
return allBlocks.push.apply(allBlocks, b);
|
||
});
|
||
});
|
||
/**
|
||
* Given a codepoint, return true if it falls within one of the
|
||
* scripts or script families defined above and false otherwise.
|
||
*
|
||
* Micro benchmarks shows that this is faster than
|
||
* /[\u3000-\u30FF\u4E00-\u9FAF\uFF00-\uFF60\uAC00-\uD7AF\u0900-\u109F]/.test()
|
||
* in Firefox, Chrome and Node.
|
||
*/
|
||
|
||
function supportedCodepoint(codepoint) {
|
||
for (var i = 0; i < allBlocks.length; i += 2) {
|
||
if (codepoint >= allBlocks[i] && codepoint <= allBlocks[i + 1]) {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
return false;
|
||
}
|
||
// CONCATENATED MODULE: ./src/svgGeometry.js
|
||
/**
|
||
* This file provides support to domTree.js and delimiter.js.
|
||
* It's a storehouse of path geometry for SVG images.
|
||
*/
|
||
// In all paths below, the viewBox-to-em scale is 1000:1.
|
||
var hLinePad = 80; // padding above a sqrt viniculum. Prevents image cropping.
|
||
// The viniculum of a \sqrt can be made thicker by a KaTeX rendering option.
|
||
// Think of variable extraViniculum as two detours in the SVG path.
|
||
// The detour begins at the lower left of the area labeled extraViniculum below.
|
||
// The detour proceeds one extraViniculum distance up and slightly to the right,
|
||
// displacing the radiused corner between surd and viniculum. The radius is
|
||
// traversed as usual, then the detour resumes. It goes right, to the end of
|
||
// the very long viniculumn, then down one extraViniculum distance,
|
||
// after which it resumes regular path geometry for the radical.
|
||
|
||
/* viniculum
|
||
/
|
||
/▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒←extraViniculum
|
||
/ █████████████████████←0.04em (40 unit) std viniculum thickness
|
||
/ /
|
||
/ /
|
||
/ /\
|
||
/ / surd
|
||
*/
|
||
|
||
var sqrtMain = function sqrtMain(extraViniculum, hLinePad) {
|
||
// sqrtMain path geometry is from glyph U221A in the font KaTeX Main
|
||
return "M95," + (622 + extraViniculum + hLinePad) + "\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl" + extraViniculum / 2.075 + " -" + extraViniculum + "\nc5.3,-9.3,12,-14,20,-14\nH400000v" + (40 + extraViniculum) + "H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM" + (834 + extraViniculum) + " " + hLinePad + "h400000v" + (40 + extraViniculum) + "h-400000z";
|
||
};
|
||
|
||
var sqrtSize1 = function sqrtSize1(extraViniculum, hLinePad) {
|
||
// size1 is from glyph U221A in the font KaTeX_Size1-Regular
|
||
return "M263," + (601 + extraViniculum + hLinePad) + "c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl" + extraViniculum / 2.084 + " -" + extraViniculum + "\nc4.7,-7.3,11,-11,19,-11\nH40000v" + (40 + extraViniculum) + "H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM" + (1001 + extraViniculum) + " " + hLinePad + "h400000v" + (40 + extraViniculum) + "h-400000z";
|
||
};
|
||
|
||
var sqrtSize2 = function sqrtSize2(extraViniculum, hLinePad) {
|
||
// size2 is from glyph U221A in the font KaTeX_Size2-Regular
|
||
return "M983 " + (10 + extraViniculum + hLinePad) + "\nl" + extraViniculum / 3.13 + " -" + extraViniculum + "\nc4,-6.7,10,-10,18,-10 H400000v" + (40 + extraViniculum) + "\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM" + (1001 + extraViniculum) + " " + hLinePad + "h400000v" + (40 + extraViniculum) + "h-400000z";
|
||
};
|
||
|
||
var sqrtSize3 = function sqrtSize3(extraViniculum, hLinePad) {
|
||
// size3 is from glyph U221A in the font KaTeX_Size3-Regular
|
||
return "M424," + (2398 + extraViniculum + hLinePad) + "\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl" + extraViniculum / 4.223 + " -" + extraViniculum + "c4,-6.7,10,-10,18,-10 H400000\nv" + (40 + extraViniculum) + "H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M" + (1001 + extraViniculum) + " " + hLinePad + "\nh400000v" + (40 + extraViniculum) + "h-400000z";
|
||
};
|
||
|
||
var sqrtSize4 = function sqrtSize4(extraViniculum, hLinePad) {
|
||
// size4 is from glyph U221A in the font KaTeX_Size4-Regular
|
||
return "M473," + (2713 + extraViniculum + hLinePad) + "\nc339.3,-1799.3,509.3,-2700,510,-2702 l" + extraViniculum / 5.298 + " -" + extraViniculum + "\nc3.3,-7.3,9.3,-11,18,-11 H400000v" + (40 + extraViniculum) + "H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM" + (1001 + extraViniculum) + " " + hLinePad + "h400000v" + (40 + extraViniculum) + "H1017.7z";
|
||
};
|
||
|
||
var sqrtTall = function sqrtTall(extraViniculum, hLinePad, viewBoxHeight) {
|
||
// sqrtTall is from glyph U23B7 in the font KaTeX_Size4-Regular
|
||
// One path edge has a variable length. It runs vertically from the viniculumn
|
||
// to a point near (14 units) the bottom of the surd. The viniculum
|
||
// is normally 40 units thick. So the length of the line in question is:
|
||
var vertSegment = viewBoxHeight - 54 - hLinePad - extraViniculum;
|
||
return "M702 " + (extraViniculum + hLinePad) + "H400000" + (40 + extraViniculum) + "\nH742v" + vertSegment + "l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 " + hLinePad + "H400000v" + (40 + extraViniculum) + "H742z";
|
||
};
|
||
|
||
var sqrtPath = function sqrtPath(size, extraViniculum, viewBoxHeight) {
|
||
extraViniculum = 1000 * extraViniculum; // Convert from document ems to viewBox.
|
||
|
||
var path = "";
|
||
|
||
switch (size) {
|
||
case "sqrtMain":
|
||
path = sqrtMain(extraViniculum, hLinePad);
|
||
break;
|
||
|
||
case "sqrtSize1":
|
||
path = sqrtSize1(extraViniculum, hLinePad);
|
||
break;
|
||
|
||
case "sqrtSize2":
|
||
path = sqrtSize2(extraViniculum, hLinePad);
|
||
break;
|
||
|
||
case "sqrtSize3":
|
||
path = sqrtSize3(extraViniculum, hLinePad);
|
||
break;
|
||
|
||
case "sqrtSize4":
|
||
path = sqrtSize4(extraViniculum, hLinePad);
|
||
break;
|
||
|
||
case "sqrtTall":
|
||
path = sqrtTall(extraViniculum, hLinePad, viewBoxHeight);
|
||
}
|
||
|
||
return path;
|
||
};
|
||
var svgGeometry_path = {
|
||
// The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main
|
||
doubleleftarrow: "M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",
|
||
// doublerightarrow is from glyph U+21D2 in font KaTeX Main
|
||
doublerightarrow: "M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",
|
||
// leftarrow is from glyph U+2190 in font KaTeX Main
|
||
leftarrow: "M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",
|
||
// overbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular
|
||
leftbrace: "M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",
|
||
leftbraceunder: "M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",
|
||
// overgroup is from the MnSymbol package (public domain)
|
||
leftgroup: "M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",
|
||
leftgroupunder: "M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",
|
||
// Harpoons are from glyph U+21BD in font KaTeX Main
|
||
leftharpoon: "M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",
|
||
leftharpoonplus: "M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",
|
||
leftharpoondown: "M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",
|
||
leftharpoondownplus: "M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",
|
||
// hook is from glyph U+21A9 in font KaTeX Main
|
||
lefthook: "M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",
|
||
leftlinesegment: "M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",
|
||
leftmapsto: "M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",
|
||
// tofrom is from glyph U+21C4 in font KaTeX AMS Regular
|
||
leftToFrom: "M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",
|
||
longequal: "M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",
|
||
midbrace: "M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",
|
||
midbraceunder: "M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",
|
||
oiintSize1: "M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",
|
||
oiintSize2: "M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",
|
||
oiiintSize1: "M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",
|
||
oiiintSize2: "M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",
|
||
rightarrow: "M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",
|
||
rightbrace: "M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",
|
||
rightbraceunder: "M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",
|
||
rightgroup: "M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",
|
||
rightgroupunder: "M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",
|
||
rightharpoon: "M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",
|
||
rightharpoonplus: "M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",
|
||
rightharpoondown: "M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",
|
||
rightharpoondownplus: "M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",
|
||
righthook: "M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",
|
||
rightlinesegment: "M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",
|
||
rightToFrom: "M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",
|
||
// twoheadleftarrow is from glyph U+219E in font KaTeX AMS Regular
|
||
twoheadleftarrow: "M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",
|
||
twoheadrightarrow: "M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",
|
||
// tilde1 is a modified version of a glyph from the MnSymbol package
|
||
tilde1: "M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",
|
||
// ditto tilde2, tilde3, & tilde4
|
||
tilde2: "M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",
|
||
tilde3: "M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",
|
||
tilde4: "M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",
|
||
// vec is from glyph U+20D7 in font KaTeX Main
|
||
vec: "M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",
|
||
// widehat1 is a modified version of a glyph from the MnSymbol package
|
||
widehat1: "M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",
|
||
// ditto widehat2, widehat3, & widehat4
|
||
widehat2: "M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",
|
||
widehat3: "M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",
|
||
widehat4: "M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",
|
||
// widecheck paths are all inverted versions of widehat
|
||
widecheck1: "M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",
|
||
widecheck2: "M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",
|
||
widecheck3: "M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",
|
||
widecheck4: "M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",
|
||
// The next ten paths support reaction arrows from the mhchem package.
|
||
// Arrows for \ce{<-->} are offset from xAxis by 0.22ex, per mhchem in LaTeX
|
||
// baraboveleftarrow is mostly from from glyph U+2190 in font KaTeX Main
|
||
baraboveleftarrow: "M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",
|
||
// rightarrowabovebar is mostly from glyph U+2192, KaTeX Main
|
||
rightarrowabovebar: "M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",
|
||
// The short left harpoon has 0.5em (i.e. 500 units) kern on the left end.
|
||
// Ref from mhchem.sty: \rlap{\raisebox{-.22ex}{$\kern0.5em
|
||
baraboveshortleftharpoon: "M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",
|
||
rightharpoonaboveshortbar: "M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",
|
||
shortbaraboveleftharpoon: "M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",
|
||
shortrightharpoonabovebar: "M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"
|
||
};
|
||
// CONCATENATED MODULE: ./src/tree.js
|
||
|
||
|
||
/**
|
||
* This node represents a document fragment, which contains elements, but when
|
||
* placed into the DOM doesn't have any representation itself. It only contains
|
||
* children and doesn't have any DOM node properties.
|
||
*/
|
||
var tree_DocumentFragment =
|
||
/*#__PURE__*/
|
||
function () {
|
||
// HtmlDomNode
|
||
// Never used; needed for satisfying interface.
|
||
function DocumentFragment(children) {
|
||
this.children = void 0;
|
||
this.classes = void 0;
|
||
this.height = void 0;
|
||
this.depth = void 0;
|
||
this.maxFontSize = void 0;
|
||
this.style = void 0;
|
||
this.children = children;
|
||
this.classes = [];
|
||
this.height = 0;
|
||
this.depth = 0;
|
||
this.maxFontSize = 0;
|
||
this.style = {};
|
||
}
|
||
|
||
var _proto = DocumentFragment.prototype;
|
||
|
||
_proto.hasClass = function hasClass(className) {
|
||
return utils.contains(this.classes, className);
|
||
}
|
||
/** Convert the fragment into a node. */
|
||
;
|
||
|
||
_proto.toNode = function toNode() {
|
||
var frag = document.createDocumentFragment();
|
||
|
||
for (var i = 0; i < this.children.length; i++) {
|
||
frag.appendChild(this.children[i].toNode());
|
||
}
|
||
|
||
return frag;
|
||
}
|
||
/** Convert the fragment into HTML markup. */
|
||
;
|
||
|
||
_proto.toMarkup = function toMarkup() {
|
||
var markup = ""; // Simply concatenate the markup for the children together.
|
||
|
||
for (var i = 0; i < this.children.length; i++) {
|
||
markup += this.children[i].toMarkup();
|
||
}
|
||
|
||
return markup;
|
||
}
|
||
/**
|
||
* Converts the math node into a string, similar to innerText. Applies to
|
||
* MathDomNode's only.
|
||
*/
|
||
;
|
||
|
||
_proto.toText = function toText() {
|
||
// To avoid this, we would subclass documentFragment separately for
|
||
// MathML, but polyfills for subclassing is expensive per PR 1469.
|
||
// $FlowFixMe: Only works for ChildType = MathDomNode.
|
||
var toText = function toText(child) {
|
||
return child.toText();
|
||
};
|
||
|
||
return this.children.map(toText).join("");
|
||
};
|
||
|
||
return DocumentFragment;
|
||
}();
|
||
// CONCATENATED MODULE: ./src/domTree.js
|
||
/**
|
||
* These objects store the data about the DOM nodes we create, as well as some
|
||
* extra data. They can then be transformed into real DOM nodes with the
|
||
* `toNode` function or HTML markup using `toMarkup`. They are useful for both
|
||
* storing extra properties on the nodes, as well as providing a way to easily
|
||
* work with the DOM.
|
||
*
|
||
* Similar functions for working with MathML nodes exist in mathMLTree.js.
|
||
*
|
||
* TODO: refactor `span` and `anchor` into common superclass when
|
||
* target environments support class inheritance
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* Create an HTML className based on a list of classes. In addition to joining
|
||
* with spaces, we also remove empty classes.
|
||
*/
|
||
var createClass = function createClass(classes) {
|
||
return classes.filter(function (cls) {
|
||
return cls;
|
||
}).join(" ");
|
||
};
|
||
|
||
var initNode = function initNode(classes, options, style) {
|
||
this.classes = classes || [];
|
||
this.attributes = {};
|
||
this.height = 0;
|
||
this.depth = 0;
|
||
this.maxFontSize = 0;
|
||
this.style = style || {};
|
||
|
||
if (options) {
|
||
if (options.style.isTight()) {
|
||
this.classes.push("mtight");
|
||
}
|
||
|
||
var color = options.getColor();
|
||
|
||
if (color) {
|
||
this.style.color = color;
|
||
}
|
||
}
|
||
};
|
||
/**
|
||
* Convert into an HTML node
|
||
*/
|
||
|
||
|
||
var _toNode = function toNode(tagName) {
|
||
var node = document.createElement(tagName); // Apply the class
|
||
|
||
node.className = createClass(this.classes); // Apply inline styles
|
||
|
||
for (var style in this.style) {
|
||
if (this.style.hasOwnProperty(style)) {
|
||
// $FlowFixMe Flow doesn't seem to understand span.style's type.
|
||
node.style[style] = this.style[style];
|
||
}
|
||
} // Apply attributes
|
||
|
||
|
||
for (var attr in this.attributes) {
|
||
if (this.attributes.hasOwnProperty(attr)) {
|
||
node.setAttribute(attr, this.attributes[attr]);
|
||
}
|
||
} // Append the children, also as HTML nodes
|
||
|
||
|
||
for (var i = 0; i < this.children.length; i++) {
|
||
node.appendChild(this.children[i].toNode());
|
||
}
|
||
|
||
return node;
|
||
};
|
||
/**
|
||
* Convert into an HTML markup string
|
||
*/
|
||
|
||
|
||
var _toMarkup = function toMarkup(tagName) {
|
||
var markup = "<" + tagName; // Add the class
|
||
|
||
if (this.classes.length) {
|
||
markup += " class=\"" + utils.escape(createClass(this.classes)) + "\"";
|
||
}
|
||
|
||
var styles = ""; // Add the styles, after hyphenation
|
||
|
||
for (var style in this.style) {
|
||
if (this.style.hasOwnProperty(style)) {
|
||
styles += utils.hyphenate(style) + ":" + this.style[style] + ";";
|
||
}
|
||
}
|
||
|
||
if (styles) {
|
||
markup += " style=\"" + utils.escape(styles) + "\"";
|
||
} // Add the attributes
|
||
|
||
|
||
for (var attr in this.attributes) {
|
||
if (this.attributes.hasOwnProperty(attr)) {
|
||
markup += " " + attr + "=\"" + utils.escape(this.attributes[attr]) + "\"";
|
||
}
|
||
}
|
||
|
||
markup += ">"; // Add the markup of the children, also as markup
|
||
|
||
for (var i = 0; i < this.children.length; i++) {
|
||
markup += this.children[i].toMarkup();
|
||
}
|
||
|
||
markup += "</" + tagName + ">";
|
||
return markup;
|
||
}; // Making the type below exact with all optional fields doesn't work due to
|
||
// - https://github.com/facebook/flow/issues/4582
|
||
// - https://github.com/facebook/flow/issues/5688
|
||
// However, since *all* fields are optional, $Shape<> works as suggested in 5688
|
||
// above.
|
||
// This type does not include all CSS properties. Additional properties should
|
||
// be added as needed.
|
||
|
||
|
||
/**
|
||
* This node represents a span node, with a className, a list of children, and
|
||
* an inline style. It also contains information about its height, depth, and
|
||
* maxFontSize.
|
||
*
|
||
* Represents two types with different uses: SvgSpan to wrap an SVG and DomSpan
|
||
* otherwise. This typesafety is important when HTML builders access a span's
|
||
* children.
|
||
*/
|
||
var domTree_Span =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function Span(classes, children, options, style) {
|
||
this.children = void 0;
|
||
this.attributes = void 0;
|
||
this.classes = void 0;
|
||
this.height = void 0;
|
||
this.depth = void 0;
|
||
this.width = void 0;
|
||
this.maxFontSize = void 0;
|
||
this.style = void 0;
|
||
initNode.call(this, classes, options, style);
|
||
this.children = children || [];
|
||
}
|
||
/**
|
||
* Sets an arbitrary attribute on the span. Warning: use this wisely. Not
|
||
* all browsers support attributes the same, and having too many custom
|
||
* attributes is probably bad.
|
||
*/
|
||
|
||
|
||
var _proto = Span.prototype;
|
||
|
||
_proto.setAttribute = function setAttribute(attribute, value) {
|
||
this.attributes[attribute] = value;
|
||
};
|
||
|
||
_proto.hasClass = function hasClass(className) {
|
||
return utils.contains(this.classes, className);
|
||
};
|
||
|
||
_proto.toNode = function toNode() {
|
||
return _toNode.call(this, "span");
|
||
};
|
||
|
||
_proto.toMarkup = function toMarkup() {
|
||
return _toMarkup.call(this, "span");
|
||
};
|
||
|
||
return Span;
|
||
}();
|
||
/**
|
||
* This node represents an anchor (<a>) element with a hyperlink. See `span`
|
||
* for further details.
|
||
*/
|
||
|
||
var domTree_Anchor =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function Anchor(href, classes, children, options) {
|
||
this.children = void 0;
|
||
this.attributes = void 0;
|
||
this.classes = void 0;
|
||
this.height = void 0;
|
||
this.depth = void 0;
|
||
this.maxFontSize = void 0;
|
||
this.style = void 0;
|
||
initNode.call(this, classes, options);
|
||
this.children = children || [];
|
||
this.setAttribute('href', href);
|
||
}
|
||
|
||
var _proto2 = Anchor.prototype;
|
||
|
||
_proto2.setAttribute = function setAttribute(attribute, value) {
|
||
this.attributes[attribute] = value;
|
||
};
|
||
|
||
_proto2.hasClass = function hasClass(className) {
|
||
return utils.contains(this.classes, className);
|
||
};
|
||
|
||
_proto2.toNode = function toNode() {
|
||
return _toNode.call(this, "a");
|
||
};
|
||
|
||
_proto2.toMarkup = function toMarkup() {
|
||
return _toMarkup.call(this, "a");
|
||
};
|
||
|
||
return Anchor;
|
||
}();
|
||
/**
|
||
* This node represents an image embed (<img>) element.
|
||
*/
|
||
|
||
var domTree_Img =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function Img(src, alt, style) {
|
||
this.src = void 0;
|
||
this.alt = void 0;
|
||
this.classes = void 0;
|
||
this.height = void 0;
|
||
this.depth = void 0;
|
||
this.maxFontSize = void 0;
|
||
this.style = void 0;
|
||
this.alt = alt;
|
||
this.src = src;
|
||
this.classes = ["mord"];
|
||
this.style = style;
|
||
}
|
||
|
||
var _proto3 = Img.prototype;
|
||
|
||
_proto3.hasClass = function hasClass(className) {
|
||
return utils.contains(this.classes, className);
|
||
};
|
||
|
||
_proto3.toNode = function toNode() {
|
||
var node = document.createElement("img");
|
||
node.src = this.src;
|
||
node.alt = this.alt;
|
||
node.className = "mord"; // Apply inline styles
|
||
|
||
for (var style in this.style) {
|
||
if (this.style.hasOwnProperty(style)) {
|
||
// $FlowFixMe
|
||
node.style[style] = this.style[style];
|
||
}
|
||
}
|
||
|
||
return node;
|
||
};
|
||
|
||
_proto3.toMarkup = function toMarkup() {
|
||
var markup = "<img src='" + this.src + " 'alt='" + this.alt + "' "; // Add the styles, after hyphenation
|
||
|
||
var styles = "";
|
||
|
||
for (var style in this.style) {
|
||
if (this.style.hasOwnProperty(style)) {
|
||
styles += utils.hyphenate(style) + ":" + this.style[style] + ";";
|
||
}
|
||
}
|
||
|
||
if (styles) {
|
||
markup += " style=\"" + utils.escape(styles) + "\"";
|
||
}
|
||
|
||
markup += "'/>";
|
||
return markup;
|
||
};
|
||
|
||
return Img;
|
||
}();
|
||
var iCombinations = {
|
||
'î': "\u0131\u0302",
|
||
'ï': "\u0131\u0308",
|
||
'í': "\u0131\u0301",
|
||
// 'ī': '\u0131\u0304', // enable when we add Extended Latin
|
||
'ì': "\u0131\u0300"
|
||
};
|
||
/**
|
||
* A symbol node contains information about a single symbol. It either renders
|
||
* to a single text node, or a span with a single text node in it, depending on
|
||
* whether it has CSS classes, styles, or needs italic correction.
|
||
*/
|
||
|
||
var domTree_SymbolNode =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function SymbolNode(text, height, depth, italic, skew, width, classes, style) {
|
||
this.text = void 0;
|
||
this.height = void 0;
|
||
this.depth = void 0;
|
||
this.italic = void 0;
|
||
this.skew = void 0;
|
||
this.width = void 0;
|
||
this.maxFontSize = void 0;
|
||
this.classes = void 0;
|
||
this.style = void 0;
|
||
this.text = text;
|
||
this.height = height || 0;
|
||
this.depth = depth || 0;
|
||
this.italic = italic || 0;
|
||
this.skew = skew || 0;
|
||
this.width = width || 0;
|
||
this.classes = classes || [];
|
||
this.style = style || {};
|
||
this.maxFontSize = 0; // Mark text from non-Latin scripts with specific classes so that we
|
||
// can specify which fonts to use. This allows us to render these
|
||
// characters with a serif font in situations where the browser would
|
||
// either default to a sans serif or render a placeholder character.
|
||
// We use CSS class names like cjk_fallback, hangul_fallback and
|
||
// brahmic_fallback. See ./unicodeScripts.js for the set of possible
|
||
// script names
|
||
|
||
var script = scriptFromCodepoint(this.text.charCodeAt(0));
|
||
|
||
if (script) {
|
||
this.classes.push(script + "_fallback");
|
||
}
|
||
|
||
if (/[îïíì]/.test(this.text)) {
|
||
// add ī when we add Extended Latin
|
||
this.text = iCombinations[this.text];
|
||
}
|
||
}
|
||
|
||
var _proto4 = SymbolNode.prototype;
|
||
|
||
_proto4.hasClass = function hasClass(className) {
|
||
return utils.contains(this.classes, className);
|
||
}
|
||
/**
|
||
* Creates a text node or span from a symbol node. Note that a span is only
|
||
* created if it is needed.
|
||
*/
|
||
;
|
||
|
||
_proto4.toNode = function toNode() {
|
||
var node = document.createTextNode(this.text);
|
||
var span = null;
|
||
|
||
if (this.italic > 0) {
|
||
span = document.createElement("span");
|
||
span.style.marginRight = this.italic + "em";
|
||
}
|
||
|
||
if (this.classes.length > 0) {
|
||
span = span || document.createElement("span");
|
||
span.className = createClass(this.classes);
|
||
}
|
||
|
||
for (var style in this.style) {
|
||
if (this.style.hasOwnProperty(style)) {
|
||
span = span || document.createElement("span"); // $FlowFixMe Flow doesn't seem to understand span.style's type.
|
||
|
||
span.style[style] = this.style[style];
|
||
}
|
||
}
|
||
|
||
if (span) {
|
||
span.appendChild(node);
|
||
return span;
|
||
} else {
|
||
return node;
|
||
}
|
||
}
|
||
/**
|
||
* Creates markup for a symbol node.
|
||
*/
|
||
;
|
||
|
||
_proto4.toMarkup = function toMarkup() {
|
||
// TODO(alpert): More duplication than I'd like from
|
||
// span.prototype.toMarkup and symbolNode.prototype.toNode...
|
||
var needsSpan = false;
|
||
var markup = "<span";
|
||
|
||
if (this.classes.length) {
|
||
needsSpan = true;
|
||
markup += " class=\"";
|
||
markup += utils.escape(createClass(this.classes));
|
||
markup += "\"";
|
||
}
|
||
|
||
var styles = "";
|
||
|
||
if (this.italic > 0) {
|
||
styles += "margin-right:" + this.italic + "em;";
|
||
}
|
||
|
||
for (var style in this.style) {
|
||
if (this.style.hasOwnProperty(style)) {
|
||
styles += utils.hyphenate(style) + ":" + this.style[style] + ";";
|
||
}
|
||
}
|
||
|
||
if (styles) {
|
||
needsSpan = true;
|
||
markup += " style=\"" + utils.escape(styles) + "\"";
|
||
}
|
||
|
||
var escaped = utils.escape(this.text);
|
||
|
||
if (needsSpan) {
|
||
markup += ">";
|
||
markup += escaped;
|
||
markup += "</span>";
|
||
return markup;
|
||
} else {
|
||
return escaped;
|
||
}
|
||
};
|
||
|
||
return SymbolNode;
|
||
}();
|
||
/**
|
||
* SVG nodes are used to render stretchy wide elements.
|
||
*/
|
||
|
||
var SvgNode =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function SvgNode(children, attributes) {
|
||
this.children = void 0;
|
||
this.attributes = void 0;
|
||
this.children = children || [];
|
||
this.attributes = attributes || {};
|
||
}
|
||
|
||
var _proto5 = SvgNode.prototype;
|
||
|
||
_proto5.toNode = function toNode() {
|
||
var svgNS = "http://www.w3.org/2000/svg";
|
||
var node = document.createElementNS(svgNS, "svg"); // Apply attributes
|
||
|
||
for (var attr in this.attributes) {
|
||
if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
|
||
node.setAttribute(attr, this.attributes[attr]);
|
||
}
|
||
}
|
||
|
||
for (var i = 0; i < this.children.length; i++) {
|
||
node.appendChild(this.children[i].toNode());
|
||
}
|
||
|
||
return node;
|
||
};
|
||
|
||
_proto5.toMarkup = function toMarkup() {
|
||
var markup = "<svg"; // Apply attributes
|
||
|
||
for (var attr in this.attributes) {
|
||
if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
|
||
markup += " " + attr + "='" + this.attributes[attr] + "'";
|
||
}
|
||
}
|
||
|
||
markup += ">";
|
||
|
||
for (var i = 0; i < this.children.length; i++) {
|
||
markup += this.children[i].toMarkup();
|
||
}
|
||
|
||
markup += "</svg>";
|
||
return markup;
|
||
};
|
||
|
||
return SvgNode;
|
||
}();
|
||
var domTree_PathNode =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function PathNode(pathName, alternate) {
|
||
this.pathName = void 0;
|
||
this.alternate = void 0;
|
||
this.pathName = pathName;
|
||
this.alternate = alternate; // Used only for \sqrt
|
||
}
|
||
|
||
var _proto6 = PathNode.prototype;
|
||
|
||
_proto6.toNode = function toNode() {
|
||
var svgNS = "http://www.w3.org/2000/svg";
|
||
var node = document.createElementNS(svgNS, "path");
|
||
|
||
if (this.alternate) {
|
||
node.setAttribute("d", this.alternate);
|
||
} else {
|
||
node.setAttribute("d", svgGeometry_path[this.pathName]);
|
||
}
|
||
|
||
return node;
|
||
};
|
||
|
||
_proto6.toMarkup = function toMarkup() {
|
||
if (this.alternate) {
|
||
return "<path d='" + this.alternate + "'/>";
|
||
} else {
|
||
return "<path d='" + svgGeometry_path[this.pathName] + "'/>";
|
||
}
|
||
};
|
||
|
||
return PathNode;
|
||
}();
|
||
var LineNode =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function LineNode(attributes) {
|
||
this.attributes = void 0;
|
||
this.attributes = attributes || {};
|
||
}
|
||
|
||
var _proto7 = LineNode.prototype;
|
||
|
||
_proto7.toNode = function toNode() {
|
||
var svgNS = "http://www.w3.org/2000/svg";
|
||
var node = document.createElementNS(svgNS, "line"); // Apply attributes
|
||
|
||
for (var attr in this.attributes) {
|
||
if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
|
||
node.setAttribute(attr, this.attributes[attr]);
|
||
}
|
||
}
|
||
|
||
return node;
|
||
};
|
||
|
||
_proto7.toMarkup = function toMarkup() {
|
||
var markup = "<line";
|
||
|
||
for (var attr in this.attributes) {
|
||
if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
|
||
markup += " " + attr + "='" + this.attributes[attr] + "'";
|
||
}
|
||
}
|
||
|
||
markup += "/>";
|
||
return markup;
|
||
};
|
||
|
||
return LineNode;
|
||
}();
|
||
function assertSymbolDomNode(group) {
|
||
if (group instanceof domTree_SymbolNode) {
|
||
return group;
|
||
} else {
|
||
throw new Error("Expected symbolNode but got " + String(group) + ".");
|
||
}
|
||
}
|
||
function assertSpan(group) {
|
||
if (group instanceof domTree_Span) {
|
||
return group;
|
||
} else {
|
||
throw new Error("Expected span<HtmlDomNode> but got " + String(group) + ".");
|
||
}
|
||
}
|
||
// CONCATENATED MODULE: ./submodules/katex-fonts/fontMetricsData.js
|
||
// This file is GENERATED by buildMetrics.sh. DO NOT MODIFY.
|
||
/* harmony default export */ var fontMetricsData = ({
|
||
"AMS-Regular": {
|
||
"65": [0, 0.68889, 0, 0, 0.72222],
|
||
"66": [0, 0.68889, 0, 0, 0.66667],
|
||
"67": [0, 0.68889, 0, 0, 0.72222],
|
||
"68": [0, 0.68889, 0, 0, 0.72222],
|
||
"69": [0, 0.68889, 0, 0, 0.66667],
|
||
"70": [0, 0.68889, 0, 0, 0.61111],
|
||
"71": [0, 0.68889, 0, 0, 0.77778],
|
||
"72": [0, 0.68889, 0, 0, 0.77778],
|
||
"73": [0, 0.68889, 0, 0, 0.38889],
|
||
"74": [0.16667, 0.68889, 0, 0, 0.5],
|
||
"75": [0, 0.68889, 0, 0, 0.77778],
|
||
"76": [0, 0.68889, 0, 0, 0.66667],
|
||
"77": [0, 0.68889, 0, 0, 0.94445],
|
||
"78": [0, 0.68889, 0, 0, 0.72222],
|
||
"79": [0.16667, 0.68889, 0, 0, 0.77778],
|
||
"80": [0, 0.68889, 0, 0, 0.61111],
|
||
"81": [0.16667, 0.68889, 0, 0, 0.77778],
|
||
"82": [0, 0.68889, 0, 0, 0.72222],
|
||
"83": [0, 0.68889, 0, 0, 0.55556],
|
||
"84": [0, 0.68889, 0, 0, 0.66667],
|
||
"85": [0, 0.68889, 0, 0, 0.72222],
|
||
"86": [0, 0.68889, 0, 0, 0.72222],
|
||
"87": [0, 0.68889, 0, 0, 1.0],
|
||
"88": [0, 0.68889, 0, 0, 0.72222],
|
||
"89": [0, 0.68889, 0, 0, 0.72222],
|
||
"90": [0, 0.68889, 0, 0, 0.66667],
|
||
"107": [0, 0.68889, 0, 0, 0.55556],
|
||
"165": [0, 0.675, 0.025, 0, 0.75],
|
||
"174": [0.15559, 0.69224, 0, 0, 0.94666],
|
||
"240": [0, 0.68889, 0, 0, 0.55556],
|
||
"295": [0, 0.68889, 0, 0, 0.54028],
|
||
"710": [0, 0.825, 0, 0, 2.33334],
|
||
"732": [0, 0.9, 0, 0, 2.33334],
|
||
"770": [0, 0.825, 0, 0, 2.33334],
|
||
"771": [0, 0.9, 0, 0, 2.33334],
|
||
"989": [0.08167, 0.58167, 0, 0, 0.77778],
|
||
"1008": [0, 0.43056, 0.04028, 0, 0.66667],
|
||
"8245": [0, 0.54986, 0, 0, 0.275],
|
||
"8463": [0, 0.68889, 0, 0, 0.54028],
|
||
"8487": [0, 0.68889, 0, 0, 0.72222],
|
||
"8498": [0, 0.68889, 0, 0, 0.55556],
|
||
"8502": [0, 0.68889, 0, 0, 0.66667],
|
||
"8503": [0, 0.68889, 0, 0, 0.44445],
|
||
"8504": [0, 0.68889, 0, 0, 0.66667],
|
||
"8513": [0, 0.68889, 0, 0, 0.63889],
|
||
"8592": [-0.03598, 0.46402, 0, 0, 0.5],
|
||
"8594": [-0.03598, 0.46402, 0, 0, 0.5],
|
||
"8602": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8603": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8606": [0.01354, 0.52239, 0, 0, 1.0],
|
||
"8608": [0.01354, 0.52239, 0, 0, 1.0],
|
||
"8610": [0.01354, 0.52239, 0, 0, 1.11111],
|
||
"8611": [0.01354, 0.52239, 0, 0, 1.11111],
|
||
"8619": [0, 0.54986, 0, 0, 1.0],
|
||
"8620": [0, 0.54986, 0, 0, 1.0],
|
||
"8621": [-0.13313, 0.37788, 0, 0, 1.38889],
|
||
"8622": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8624": [0, 0.69224, 0, 0, 0.5],
|
||
"8625": [0, 0.69224, 0, 0, 0.5],
|
||
"8630": [0, 0.43056, 0, 0, 1.0],
|
||
"8631": [0, 0.43056, 0, 0, 1.0],
|
||
"8634": [0.08198, 0.58198, 0, 0, 0.77778],
|
||
"8635": [0.08198, 0.58198, 0, 0, 0.77778],
|
||
"8638": [0.19444, 0.69224, 0, 0, 0.41667],
|
||
"8639": [0.19444, 0.69224, 0, 0, 0.41667],
|
||
"8642": [0.19444, 0.69224, 0, 0, 0.41667],
|
||
"8643": [0.19444, 0.69224, 0, 0, 0.41667],
|
||
"8644": [0.1808, 0.675, 0, 0, 1.0],
|
||
"8646": [0.1808, 0.675, 0, 0, 1.0],
|
||
"8647": [0.1808, 0.675, 0, 0, 1.0],
|
||
"8648": [0.19444, 0.69224, 0, 0, 0.83334],
|
||
"8649": [0.1808, 0.675, 0, 0, 1.0],
|
||
"8650": [0.19444, 0.69224, 0, 0, 0.83334],
|
||
"8651": [0.01354, 0.52239, 0, 0, 1.0],
|
||
"8652": [0.01354, 0.52239, 0, 0, 1.0],
|
||
"8653": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8654": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8655": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8666": [0.13667, 0.63667, 0, 0, 1.0],
|
||
"8667": [0.13667, 0.63667, 0, 0, 1.0],
|
||
"8669": [-0.13313, 0.37788, 0, 0, 1.0],
|
||
"8672": [-0.064, 0.437, 0, 0, 1.334],
|
||
"8674": [-0.064, 0.437, 0, 0, 1.334],
|
||
"8705": [0, 0.825, 0, 0, 0.5],
|
||
"8708": [0, 0.68889, 0, 0, 0.55556],
|
||
"8709": [0.08167, 0.58167, 0, 0, 0.77778],
|
||
"8717": [0, 0.43056, 0, 0, 0.42917],
|
||
"8722": [-0.03598, 0.46402, 0, 0, 0.5],
|
||
"8724": [0.08198, 0.69224, 0, 0, 0.77778],
|
||
"8726": [0.08167, 0.58167, 0, 0, 0.77778],
|
||
"8733": [0, 0.69224, 0, 0, 0.77778],
|
||
"8736": [0, 0.69224, 0, 0, 0.72222],
|
||
"8737": [0, 0.69224, 0, 0, 0.72222],
|
||
"8738": [0.03517, 0.52239, 0, 0, 0.72222],
|
||
"8739": [0.08167, 0.58167, 0, 0, 0.22222],
|
||
"8740": [0.25142, 0.74111, 0, 0, 0.27778],
|
||
"8741": [0.08167, 0.58167, 0, 0, 0.38889],
|
||
"8742": [0.25142, 0.74111, 0, 0, 0.5],
|
||
"8756": [0, 0.69224, 0, 0, 0.66667],
|
||
"8757": [0, 0.69224, 0, 0, 0.66667],
|
||
"8764": [-0.13313, 0.36687, 0, 0, 0.77778],
|
||
"8765": [-0.13313, 0.37788, 0, 0, 0.77778],
|
||
"8769": [-0.13313, 0.36687, 0, 0, 0.77778],
|
||
"8770": [-0.03625, 0.46375, 0, 0, 0.77778],
|
||
"8774": [0.30274, 0.79383, 0, 0, 0.77778],
|
||
"8776": [-0.01688, 0.48312, 0, 0, 0.77778],
|
||
"8778": [0.08167, 0.58167, 0, 0, 0.77778],
|
||
"8782": [0.06062, 0.54986, 0, 0, 0.77778],
|
||
"8783": [0.06062, 0.54986, 0, 0, 0.77778],
|
||
"8785": [0.08198, 0.58198, 0, 0, 0.77778],
|
||
"8786": [0.08198, 0.58198, 0, 0, 0.77778],
|
||
"8787": [0.08198, 0.58198, 0, 0, 0.77778],
|
||
"8790": [0, 0.69224, 0, 0, 0.77778],
|
||
"8791": [0.22958, 0.72958, 0, 0, 0.77778],
|
||
"8796": [0.08198, 0.91667, 0, 0, 0.77778],
|
||
"8806": [0.25583, 0.75583, 0, 0, 0.77778],
|
||
"8807": [0.25583, 0.75583, 0, 0, 0.77778],
|
||
"8808": [0.25142, 0.75726, 0, 0, 0.77778],
|
||
"8809": [0.25142, 0.75726, 0, 0, 0.77778],
|
||
"8812": [0.25583, 0.75583, 0, 0, 0.5],
|
||
"8814": [0.20576, 0.70576, 0, 0, 0.77778],
|
||
"8815": [0.20576, 0.70576, 0, 0, 0.77778],
|
||
"8816": [0.30274, 0.79383, 0, 0, 0.77778],
|
||
"8817": [0.30274, 0.79383, 0, 0, 0.77778],
|
||
"8818": [0.22958, 0.72958, 0, 0, 0.77778],
|
||
"8819": [0.22958, 0.72958, 0, 0, 0.77778],
|
||
"8822": [0.1808, 0.675, 0, 0, 0.77778],
|
||
"8823": [0.1808, 0.675, 0, 0, 0.77778],
|
||
"8828": [0.13667, 0.63667, 0, 0, 0.77778],
|
||
"8829": [0.13667, 0.63667, 0, 0, 0.77778],
|
||
"8830": [0.22958, 0.72958, 0, 0, 0.77778],
|
||
"8831": [0.22958, 0.72958, 0, 0, 0.77778],
|
||
"8832": [0.20576, 0.70576, 0, 0, 0.77778],
|
||
"8833": [0.20576, 0.70576, 0, 0, 0.77778],
|
||
"8840": [0.30274, 0.79383, 0, 0, 0.77778],
|
||
"8841": [0.30274, 0.79383, 0, 0, 0.77778],
|
||
"8842": [0.13597, 0.63597, 0, 0, 0.77778],
|
||
"8843": [0.13597, 0.63597, 0, 0, 0.77778],
|
||
"8847": [0.03517, 0.54986, 0, 0, 0.77778],
|
||
"8848": [0.03517, 0.54986, 0, 0, 0.77778],
|
||
"8858": [0.08198, 0.58198, 0, 0, 0.77778],
|
||
"8859": [0.08198, 0.58198, 0, 0, 0.77778],
|
||
"8861": [0.08198, 0.58198, 0, 0, 0.77778],
|
||
"8862": [0, 0.675, 0, 0, 0.77778],
|
||
"8863": [0, 0.675, 0, 0, 0.77778],
|
||
"8864": [0, 0.675, 0, 0, 0.77778],
|
||
"8865": [0, 0.675, 0, 0, 0.77778],
|
||
"8872": [0, 0.69224, 0, 0, 0.61111],
|
||
"8873": [0, 0.69224, 0, 0, 0.72222],
|
||
"8874": [0, 0.69224, 0, 0, 0.88889],
|
||
"8876": [0, 0.68889, 0, 0, 0.61111],
|
||
"8877": [0, 0.68889, 0, 0, 0.61111],
|
||
"8878": [0, 0.68889, 0, 0, 0.72222],
|
||
"8879": [0, 0.68889, 0, 0, 0.72222],
|
||
"8882": [0.03517, 0.54986, 0, 0, 0.77778],
|
||
"8883": [0.03517, 0.54986, 0, 0, 0.77778],
|
||
"8884": [0.13667, 0.63667, 0, 0, 0.77778],
|
||
"8885": [0.13667, 0.63667, 0, 0, 0.77778],
|
||
"8888": [0, 0.54986, 0, 0, 1.11111],
|
||
"8890": [0.19444, 0.43056, 0, 0, 0.55556],
|
||
"8891": [0.19444, 0.69224, 0, 0, 0.61111],
|
||
"8892": [0.19444, 0.69224, 0, 0, 0.61111],
|
||
"8901": [0, 0.54986, 0, 0, 0.27778],
|
||
"8903": [0.08167, 0.58167, 0, 0, 0.77778],
|
||
"8905": [0.08167, 0.58167, 0, 0, 0.77778],
|
||
"8906": [0.08167, 0.58167, 0, 0, 0.77778],
|
||
"8907": [0, 0.69224, 0, 0, 0.77778],
|
||
"8908": [0, 0.69224, 0, 0, 0.77778],
|
||
"8909": [-0.03598, 0.46402, 0, 0, 0.77778],
|
||
"8910": [0, 0.54986, 0, 0, 0.76042],
|
||
"8911": [0, 0.54986, 0, 0, 0.76042],
|
||
"8912": [0.03517, 0.54986, 0, 0, 0.77778],
|
||
"8913": [0.03517, 0.54986, 0, 0, 0.77778],
|
||
"8914": [0, 0.54986, 0, 0, 0.66667],
|
||
"8915": [0, 0.54986, 0, 0, 0.66667],
|
||
"8916": [0, 0.69224, 0, 0, 0.66667],
|
||
"8918": [0.0391, 0.5391, 0, 0, 0.77778],
|
||
"8919": [0.0391, 0.5391, 0, 0, 0.77778],
|
||
"8920": [0.03517, 0.54986, 0, 0, 1.33334],
|
||
"8921": [0.03517, 0.54986, 0, 0, 1.33334],
|
||
"8922": [0.38569, 0.88569, 0, 0, 0.77778],
|
||
"8923": [0.38569, 0.88569, 0, 0, 0.77778],
|
||
"8926": [0.13667, 0.63667, 0, 0, 0.77778],
|
||
"8927": [0.13667, 0.63667, 0, 0, 0.77778],
|
||
"8928": [0.30274, 0.79383, 0, 0, 0.77778],
|
||
"8929": [0.30274, 0.79383, 0, 0, 0.77778],
|
||
"8934": [0.23222, 0.74111, 0, 0, 0.77778],
|
||
"8935": [0.23222, 0.74111, 0, 0, 0.77778],
|
||
"8936": [0.23222, 0.74111, 0, 0, 0.77778],
|
||
"8937": [0.23222, 0.74111, 0, 0, 0.77778],
|
||
"8938": [0.20576, 0.70576, 0, 0, 0.77778],
|
||
"8939": [0.20576, 0.70576, 0, 0, 0.77778],
|
||
"8940": [0.30274, 0.79383, 0, 0, 0.77778],
|
||
"8941": [0.30274, 0.79383, 0, 0, 0.77778],
|
||
"8994": [0.19444, 0.69224, 0, 0, 0.77778],
|
||
"8995": [0.19444, 0.69224, 0, 0, 0.77778],
|
||
"9416": [0.15559, 0.69224, 0, 0, 0.90222],
|
||
"9484": [0, 0.69224, 0, 0, 0.5],
|
||
"9488": [0, 0.69224, 0, 0, 0.5],
|
||
"9492": [0, 0.37788, 0, 0, 0.5],
|
||
"9496": [0, 0.37788, 0, 0, 0.5],
|
||
"9585": [0.19444, 0.68889, 0, 0, 0.88889],
|
||
"9586": [0.19444, 0.74111, 0, 0, 0.88889],
|
||
"9632": [0, 0.675, 0, 0, 0.77778],
|
||
"9633": [0, 0.675, 0, 0, 0.77778],
|
||
"9650": [0, 0.54986, 0, 0, 0.72222],
|
||
"9651": [0, 0.54986, 0, 0, 0.72222],
|
||
"9654": [0.03517, 0.54986, 0, 0, 0.77778],
|
||
"9660": [0, 0.54986, 0, 0, 0.72222],
|
||
"9661": [0, 0.54986, 0, 0, 0.72222],
|
||
"9664": [0.03517, 0.54986, 0, 0, 0.77778],
|
||
"9674": [0.11111, 0.69224, 0, 0, 0.66667],
|
||
"9733": [0.19444, 0.69224, 0, 0, 0.94445],
|
||
"10003": [0, 0.69224, 0, 0, 0.83334],
|
||
"10016": [0, 0.69224, 0, 0, 0.83334],
|
||
"10731": [0.11111, 0.69224, 0, 0, 0.66667],
|
||
"10846": [0.19444, 0.75583, 0, 0, 0.61111],
|
||
"10877": [0.13667, 0.63667, 0, 0, 0.77778],
|
||
"10878": [0.13667, 0.63667, 0, 0, 0.77778],
|
||
"10885": [0.25583, 0.75583, 0, 0, 0.77778],
|
||
"10886": [0.25583, 0.75583, 0, 0, 0.77778],
|
||
"10887": [0.13597, 0.63597, 0, 0, 0.77778],
|
||
"10888": [0.13597, 0.63597, 0, 0, 0.77778],
|
||
"10889": [0.26167, 0.75726, 0, 0, 0.77778],
|
||
"10890": [0.26167, 0.75726, 0, 0, 0.77778],
|
||
"10891": [0.48256, 0.98256, 0, 0, 0.77778],
|
||
"10892": [0.48256, 0.98256, 0, 0, 0.77778],
|
||
"10901": [0.13667, 0.63667, 0, 0, 0.77778],
|
||
"10902": [0.13667, 0.63667, 0, 0, 0.77778],
|
||
"10933": [0.25142, 0.75726, 0, 0, 0.77778],
|
||
"10934": [0.25142, 0.75726, 0, 0, 0.77778],
|
||
"10935": [0.26167, 0.75726, 0, 0, 0.77778],
|
||
"10936": [0.26167, 0.75726, 0, 0, 0.77778],
|
||
"10937": [0.26167, 0.75726, 0, 0, 0.77778],
|
||
"10938": [0.26167, 0.75726, 0, 0, 0.77778],
|
||
"10949": [0.25583, 0.75583, 0, 0, 0.77778],
|
||
"10950": [0.25583, 0.75583, 0, 0, 0.77778],
|
||
"10955": [0.28481, 0.79383, 0, 0, 0.77778],
|
||
"10956": [0.28481, 0.79383, 0, 0, 0.77778],
|
||
"57350": [0.08167, 0.58167, 0, 0, 0.22222],
|
||
"57351": [0.08167, 0.58167, 0, 0, 0.38889],
|
||
"57352": [0.08167, 0.58167, 0, 0, 0.77778],
|
||
"57353": [0, 0.43056, 0.04028, 0, 0.66667],
|
||
"57356": [0.25142, 0.75726, 0, 0, 0.77778],
|
||
"57357": [0.25142, 0.75726, 0, 0, 0.77778],
|
||
"57358": [0.41951, 0.91951, 0, 0, 0.77778],
|
||
"57359": [0.30274, 0.79383, 0, 0, 0.77778],
|
||
"57360": [0.30274, 0.79383, 0, 0, 0.77778],
|
||
"57361": [0.41951, 0.91951, 0, 0, 0.77778],
|
||
"57366": [0.25142, 0.75726, 0, 0, 0.77778],
|
||
"57367": [0.25142, 0.75726, 0, 0, 0.77778],
|
||
"57368": [0.25142, 0.75726, 0, 0, 0.77778],
|
||
"57369": [0.25142, 0.75726, 0, 0, 0.77778],
|
||
"57370": [0.13597, 0.63597, 0, 0, 0.77778],
|
||
"57371": [0.13597, 0.63597, 0, 0, 0.77778]
|
||
},
|
||
"Caligraphic-Regular": {
|
||
"48": [0, 0.43056, 0, 0, 0.5],
|
||
"49": [0, 0.43056, 0, 0, 0.5],
|
||
"50": [0, 0.43056, 0, 0, 0.5],
|
||
"51": [0.19444, 0.43056, 0, 0, 0.5],
|
||
"52": [0.19444, 0.43056, 0, 0, 0.5],
|
||
"53": [0.19444, 0.43056, 0, 0, 0.5],
|
||
"54": [0, 0.64444, 0, 0, 0.5],
|
||
"55": [0.19444, 0.43056, 0, 0, 0.5],
|
||
"56": [0, 0.64444, 0, 0, 0.5],
|
||
"57": [0.19444, 0.43056, 0, 0, 0.5],
|
||
"65": [0, 0.68333, 0, 0.19445, 0.79847],
|
||
"66": [0, 0.68333, 0.03041, 0.13889, 0.65681],
|
||
"67": [0, 0.68333, 0.05834, 0.13889, 0.52653],
|
||
"68": [0, 0.68333, 0.02778, 0.08334, 0.77139],
|
||
"69": [0, 0.68333, 0.08944, 0.11111, 0.52778],
|
||
"70": [0, 0.68333, 0.09931, 0.11111, 0.71875],
|
||
"71": [0.09722, 0.68333, 0.0593, 0.11111, 0.59487],
|
||
"72": [0, 0.68333, 0.00965, 0.11111, 0.84452],
|
||
"73": [0, 0.68333, 0.07382, 0, 0.54452],
|
||
"74": [0.09722, 0.68333, 0.18472, 0.16667, 0.67778],
|
||
"75": [0, 0.68333, 0.01445, 0.05556, 0.76195],
|
||
"76": [0, 0.68333, 0, 0.13889, 0.68972],
|
||
"77": [0, 0.68333, 0, 0.13889, 1.2009],
|
||
"78": [0, 0.68333, 0.14736, 0.08334, 0.82049],
|
||
"79": [0, 0.68333, 0.02778, 0.11111, 0.79611],
|
||
"80": [0, 0.68333, 0.08222, 0.08334, 0.69556],
|
||
"81": [0.09722, 0.68333, 0, 0.11111, 0.81667],
|
||
"82": [0, 0.68333, 0, 0.08334, 0.8475],
|
||
"83": [0, 0.68333, 0.075, 0.13889, 0.60556],
|
||
"84": [0, 0.68333, 0.25417, 0, 0.54464],
|
||
"85": [0, 0.68333, 0.09931, 0.08334, 0.62583],
|
||
"86": [0, 0.68333, 0.08222, 0, 0.61278],
|
||
"87": [0, 0.68333, 0.08222, 0.08334, 0.98778],
|
||
"88": [0, 0.68333, 0.14643, 0.13889, 0.7133],
|
||
"89": [0.09722, 0.68333, 0.08222, 0.08334, 0.66834],
|
||
"90": [0, 0.68333, 0.07944, 0.13889, 0.72473]
|
||
},
|
||
"Fraktur-Regular": {
|
||
"33": [0, 0.69141, 0, 0, 0.29574],
|
||
"34": [0, 0.69141, 0, 0, 0.21471],
|
||
"38": [0, 0.69141, 0, 0, 0.73786],
|
||
"39": [0, 0.69141, 0, 0, 0.21201],
|
||
"40": [0.24982, 0.74947, 0, 0, 0.38865],
|
||
"41": [0.24982, 0.74947, 0, 0, 0.38865],
|
||
"42": [0, 0.62119, 0, 0, 0.27764],
|
||
"43": [0.08319, 0.58283, 0, 0, 0.75623],
|
||
"44": [0, 0.10803, 0, 0, 0.27764],
|
||
"45": [0.08319, 0.58283, 0, 0, 0.75623],
|
||
"46": [0, 0.10803, 0, 0, 0.27764],
|
||
"47": [0.24982, 0.74947, 0, 0, 0.50181],
|
||
"48": [0, 0.47534, 0, 0, 0.50181],
|
||
"49": [0, 0.47534, 0, 0, 0.50181],
|
||
"50": [0, 0.47534, 0, 0, 0.50181],
|
||
"51": [0.18906, 0.47534, 0, 0, 0.50181],
|
||
"52": [0.18906, 0.47534, 0, 0, 0.50181],
|
||
"53": [0.18906, 0.47534, 0, 0, 0.50181],
|
||
"54": [0, 0.69141, 0, 0, 0.50181],
|
||
"55": [0.18906, 0.47534, 0, 0, 0.50181],
|
||
"56": [0, 0.69141, 0, 0, 0.50181],
|
||
"57": [0.18906, 0.47534, 0, 0, 0.50181],
|
||
"58": [0, 0.47534, 0, 0, 0.21606],
|
||
"59": [0.12604, 0.47534, 0, 0, 0.21606],
|
||
"61": [-0.13099, 0.36866, 0, 0, 0.75623],
|
||
"63": [0, 0.69141, 0, 0, 0.36245],
|
||
"65": [0, 0.69141, 0, 0, 0.7176],
|
||
"66": [0, 0.69141, 0, 0, 0.88397],
|
||
"67": [0, 0.69141, 0, 0, 0.61254],
|
||
"68": [0, 0.69141, 0, 0, 0.83158],
|
||
"69": [0, 0.69141, 0, 0, 0.66278],
|
||
"70": [0.12604, 0.69141, 0, 0, 0.61119],
|
||
"71": [0, 0.69141, 0, 0, 0.78539],
|
||
"72": [0.06302, 0.69141, 0, 0, 0.7203],
|
||
"73": [0, 0.69141, 0, 0, 0.55448],
|
||
"74": [0.12604, 0.69141, 0, 0, 0.55231],
|
||
"75": [0, 0.69141, 0, 0, 0.66845],
|
||
"76": [0, 0.69141, 0, 0, 0.66602],
|
||
"77": [0, 0.69141, 0, 0, 1.04953],
|
||
"78": [0, 0.69141, 0, 0, 0.83212],
|
||
"79": [0, 0.69141, 0, 0, 0.82699],
|
||
"80": [0.18906, 0.69141, 0, 0, 0.82753],
|
||
"81": [0.03781, 0.69141, 0, 0, 0.82699],
|
||
"82": [0, 0.69141, 0, 0, 0.82807],
|
||
"83": [0, 0.69141, 0, 0, 0.82861],
|
||
"84": [0, 0.69141, 0, 0, 0.66899],
|
||
"85": [0, 0.69141, 0, 0, 0.64576],
|
||
"86": [0, 0.69141, 0, 0, 0.83131],
|
||
"87": [0, 0.69141, 0, 0, 1.04602],
|
||
"88": [0, 0.69141, 0, 0, 0.71922],
|
||
"89": [0.18906, 0.69141, 0, 0, 0.83293],
|
||
"90": [0.12604, 0.69141, 0, 0, 0.60201],
|
||
"91": [0.24982, 0.74947, 0, 0, 0.27764],
|
||
"93": [0.24982, 0.74947, 0, 0, 0.27764],
|
||
"94": [0, 0.69141, 0, 0, 0.49965],
|
||
"97": [0, 0.47534, 0, 0, 0.50046],
|
||
"98": [0, 0.69141, 0, 0, 0.51315],
|
||
"99": [0, 0.47534, 0, 0, 0.38946],
|
||
"100": [0, 0.62119, 0, 0, 0.49857],
|
||
"101": [0, 0.47534, 0, 0, 0.40053],
|
||
"102": [0.18906, 0.69141, 0, 0, 0.32626],
|
||
"103": [0.18906, 0.47534, 0, 0, 0.5037],
|
||
"104": [0.18906, 0.69141, 0, 0, 0.52126],
|
||
"105": [0, 0.69141, 0, 0, 0.27899],
|
||
"106": [0, 0.69141, 0, 0, 0.28088],
|
||
"107": [0, 0.69141, 0, 0, 0.38946],
|
||
"108": [0, 0.69141, 0, 0, 0.27953],
|
||
"109": [0, 0.47534, 0, 0, 0.76676],
|
||
"110": [0, 0.47534, 0, 0, 0.52666],
|
||
"111": [0, 0.47534, 0, 0, 0.48885],
|
||
"112": [0.18906, 0.52396, 0, 0, 0.50046],
|
||
"113": [0.18906, 0.47534, 0, 0, 0.48912],
|
||
"114": [0, 0.47534, 0, 0, 0.38919],
|
||
"115": [0, 0.47534, 0, 0, 0.44266],
|
||
"116": [0, 0.62119, 0, 0, 0.33301],
|
||
"117": [0, 0.47534, 0, 0, 0.5172],
|
||
"118": [0, 0.52396, 0, 0, 0.5118],
|
||
"119": [0, 0.52396, 0, 0, 0.77351],
|
||
"120": [0.18906, 0.47534, 0, 0, 0.38865],
|
||
"121": [0.18906, 0.47534, 0, 0, 0.49884],
|
||
"122": [0.18906, 0.47534, 0, 0, 0.39054],
|
||
"8216": [0, 0.69141, 0, 0, 0.21471],
|
||
"8217": [0, 0.69141, 0, 0, 0.21471],
|
||
"58112": [0, 0.62119, 0, 0, 0.49749],
|
||
"58113": [0, 0.62119, 0, 0, 0.4983],
|
||
"58114": [0.18906, 0.69141, 0, 0, 0.33328],
|
||
"58115": [0.18906, 0.69141, 0, 0, 0.32923],
|
||
"58116": [0.18906, 0.47534, 0, 0, 0.50343],
|
||
"58117": [0, 0.69141, 0, 0, 0.33301],
|
||
"58118": [0, 0.62119, 0, 0, 0.33409],
|
||
"58119": [0, 0.47534, 0, 0, 0.50073]
|
||
},
|
||
"Main-Bold": {
|
||
"33": [0, 0.69444, 0, 0, 0.35],
|
||
"34": [0, 0.69444, 0, 0, 0.60278],
|
||
"35": [0.19444, 0.69444, 0, 0, 0.95833],
|
||
"36": [0.05556, 0.75, 0, 0, 0.575],
|
||
"37": [0.05556, 0.75, 0, 0, 0.95833],
|
||
"38": [0, 0.69444, 0, 0, 0.89444],
|
||
"39": [0, 0.69444, 0, 0, 0.31944],
|
||
"40": [0.25, 0.75, 0, 0, 0.44722],
|
||
"41": [0.25, 0.75, 0, 0, 0.44722],
|
||
"42": [0, 0.75, 0, 0, 0.575],
|
||
"43": [0.13333, 0.63333, 0, 0, 0.89444],
|
||
"44": [0.19444, 0.15556, 0, 0, 0.31944],
|
||
"45": [0, 0.44444, 0, 0, 0.38333],
|
||
"46": [0, 0.15556, 0, 0, 0.31944],
|
||
"47": [0.25, 0.75, 0, 0, 0.575],
|
||
"48": [0, 0.64444, 0, 0, 0.575],
|
||
"49": [0, 0.64444, 0, 0, 0.575],
|
||
"50": [0, 0.64444, 0, 0, 0.575],
|
||
"51": [0, 0.64444, 0, 0, 0.575],
|
||
"52": [0, 0.64444, 0, 0, 0.575],
|
||
"53": [0, 0.64444, 0, 0, 0.575],
|
||
"54": [0, 0.64444, 0, 0, 0.575],
|
||
"55": [0, 0.64444, 0, 0, 0.575],
|
||
"56": [0, 0.64444, 0, 0, 0.575],
|
||
"57": [0, 0.64444, 0, 0, 0.575],
|
||
"58": [0, 0.44444, 0, 0, 0.31944],
|
||
"59": [0.19444, 0.44444, 0, 0, 0.31944],
|
||
"60": [0.08556, 0.58556, 0, 0, 0.89444],
|
||
"61": [-0.10889, 0.39111, 0, 0, 0.89444],
|
||
"62": [0.08556, 0.58556, 0, 0, 0.89444],
|
||
"63": [0, 0.69444, 0, 0, 0.54305],
|
||
"64": [0, 0.69444, 0, 0, 0.89444],
|
||
"65": [0, 0.68611, 0, 0, 0.86944],
|
||
"66": [0, 0.68611, 0, 0, 0.81805],
|
||
"67": [0, 0.68611, 0, 0, 0.83055],
|
||
"68": [0, 0.68611, 0, 0, 0.88194],
|
||
"69": [0, 0.68611, 0, 0, 0.75555],
|
||
"70": [0, 0.68611, 0, 0, 0.72361],
|
||
"71": [0, 0.68611, 0, 0, 0.90416],
|
||
"72": [0, 0.68611, 0, 0, 0.9],
|
||
"73": [0, 0.68611, 0, 0, 0.43611],
|
||
"74": [0, 0.68611, 0, 0, 0.59444],
|
||
"75": [0, 0.68611, 0, 0, 0.90138],
|
||
"76": [0, 0.68611, 0, 0, 0.69166],
|
||
"77": [0, 0.68611, 0, 0, 1.09166],
|
||
"78": [0, 0.68611, 0, 0, 0.9],
|
||
"79": [0, 0.68611, 0, 0, 0.86388],
|
||
"80": [0, 0.68611, 0, 0, 0.78611],
|
||
"81": [0.19444, 0.68611, 0, 0, 0.86388],
|
||
"82": [0, 0.68611, 0, 0, 0.8625],
|
||
"83": [0, 0.68611, 0, 0, 0.63889],
|
||
"84": [0, 0.68611, 0, 0, 0.8],
|
||
"85": [0, 0.68611, 0, 0, 0.88472],
|
||
"86": [0, 0.68611, 0.01597, 0, 0.86944],
|
||
"87": [0, 0.68611, 0.01597, 0, 1.18888],
|
||
"88": [0, 0.68611, 0, 0, 0.86944],
|
||
"89": [0, 0.68611, 0.02875, 0, 0.86944],
|
||
"90": [0, 0.68611, 0, 0, 0.70277],
|
||
"91": [0.25, 0.75, 0, 0, 0.31944],
|
||
"92": [0.25, 0.75, 0, 0, 0.575],
|
||
"93": [0.25, 0.75, 0, 0, 0.31944],
|
||
"94": [0, 0.69444, 0, 0, 0.575],
|
||
"95": [0.31, 0.13444, 0.03194, 0, 0.575],
|
||
"97": [0, 0.44444, 0, 0, 0.55902],
|
||
"98": [0, 0.69444, 0, 0, 0.63889],
|
||
"99": [0, 0.44444, 0, 0, 0.51111],
|
||
"100": [0, 0.69444, 0, 0, 0.63889],
|
||
"101": [0, 0.44444, 0, 0, 0.52708],
|
||
"102": [0, 0.69444, 0.10903, 0, 0.35139],
|
||
"103": [0.19444, 0.44444, 0.01597, 0, 0.575],
|
||
"104": [0, 0.69444, 0, 0, 0.63889],
|
||
"105": [0, 0.69444, 0, 0, 0.31944],
|
||
"106": [0.19444, 0.69444, 0, 0, 0.35139],
|
||
"107": [0, 0.69444, 0, 0, 0.60694],
|
||
"108": [0, 0.69444, 0, 0, 0.31944],
|
||
"109": [0, 0.44444, 0, 0, 0.95833],
|
||
"110": [0, 0.44444, 0, 0, 0.63889],
|
||
"111": [0, 0.44444, 0, 0, 0.575],
|
||
"112": [0.19444, 0.44444, 0, 0, 0.63889],
|
||
"113": [0.19444, 0.44444, 0, 0, 0.60694],
|
||
"114": [0, 0.44444, 0, 0, 0.47361],
|
||
"115": [0, 0.44444, 0, 0, 0.45361],
|
||
"116": [0, 0.63492, 0, 0, 0.44722],
|
||
"117": [0, 0.44444, 0, 0, 0.63889],
|
||
"118": [0, 0.44444, 0.01597, 0, 0.60694],
|
||
"119": [0, 0.44444, 0.01597, 0, 0.83055],
|
||
"120": [0, 0.44444, 0, 0, 0.60694],
|
||
"121": [0.19444, 0.44444, 0.01597, 0, 0.60694],
|
||
"122": [0, 0.44444, 0, 0, 0.51111],
|
||
"123": [0.25, 0.75, 0, 0, 0.575],
|
||
"124": [0.25, 0.75, 0, 0, 0.31944],
|
||
"125": [0.25, 0.75, 0, 0, 0.575],
|
||
"126": [0.35, 0.34444, 0, 0, 0.575],
|
||
"168": [0, 0.69444, 0, 0, 0.575],
|
||
"172": [0, 0.44444, 0, 0, 0.76666],
|
||
"176": [0, 0.69444, 0, 0, 0.86944],
|
||
"177": [0.13333, 0.63333, 0, 0, 0.89444],
|
||
"184": [0.17014, 0, 0, 0, 0.51111],
|
||
"198": [0, 0.68611, 0, 0, 1.04166],
|
||
"215": [0.13333, 0.63333, 0, 0, 0.89444],
|
||
"216": [0.04861, 0.73472, 0, 0, 0.89444],
|
||
"223": [0, 0.69444, 0, 0, 0.59722],
|
||
"230": [0, 0.44444, 0, 0, 0.83055],
|
||
"247": [0.13333, 0.63333, 0, 0, 0.89444],
|
||
"248": [0.09722, 0.54167, 0, 0, 0.575],
|
||
"305": [0, 0.44444, 0, 0, 0.31944],
|
||
"338": [0, 0.68611, 0, 0, 1.16944],
|
||
"339": [0, 0.44444, 0, 0, 0.89444],
|
||
"567": [0.19444, 0.44444, 0, 0, 0.35139],
|
||
"710": [0, 0.69444, 0, 0, 0.575],
|
||
"711": [0, 0.63194, 0, 0, 0.575],
|
||
"713": [0, 0.59611, 0, 0, 0.575],
|
||
"714": [0, 0.69444, 0, 0, 0.575],
|
||
"715": [0, 0.69444, 0, 0, 0.575],
|
||
"728": [0, 0.69444, 0, 0, 0.575],
|
||
"729": [0, 0.69444, 0, 0, 0.31944],
|
||
"730": [0, 0.69444, 0, 0, 0.86944],
|
||
"732": [0, 0.69444, 0, 0, 0.575],
|
||
"733": [0, 0.69444, 0, 0, 0.575],
|
||
"915": [0, 0.68611, 0, 0, 0.69166],
|
||
"916": [0, 0.68611, 0, 0, 0.95833],
|
||
"920": [0, 0.68611, 0, 0, 0.89444],
|
||
"923": [0, 0.68611, 0, 0, 0.80555],
|
||
"926": [0, 0.68611, 0, 0, 0.76666],
|
||
"928": [0, 0.68611, 0, 0, 0.9],
|
||
"931": [0, 0.68611, 0, 0, 0.83055],
|
||
"933": [0, 0.68611, 0, 0, 0.89444],
|
||
"934": [0, 0.68611, 0, 0, 0.83055],
|
||
"936": [0, 0.68611, 0, 0, 0.89444],
|
||
"937": [0, 0.68611, 0, 0, 0.83055],
|
||
"8211": [0, 0.44444, 0.03194, 0, 0.575],
|
||
"8212": [0, 0.44444, 0.03194, 0, 1.14999],
|
||
"8216": [0, 0.69444, 0, 0, 0.31944],
|
||
"8217": [0, 0.69444, 0, 0, 0.31944],
|
||
"8220": [0, 0.69444, 0, 0, 0.60278],
|
||
"8221": [0, 0.69444, 0, 0, 0.60278],
|
||
"8224": [0.19444, 0.69444, 0, 0, 0.51111],
|
||
"8225": [0.19444, 0.69444, 0, 0, 0.51111],
|
||
"8242": [0, 0.55556, 0, 0, 0.34444],
|
||
"8407": [0, 0.72444, 0.15486, 0, 0.575],
|
||
"8463": [0, 0.69444, 0, 0, 0.66759],
|
||
"8465": [0, 0.69444, 0, 0, 0.83055],
|
||
"8467": [0, 0.69444, 0, 0, 0.47361],
|
||
"8472": [0.19444, 0.44444, 0, 0, 0.74027],
|
||
"8476": [0, 0.69444, 0, 0, 0.83055],
|
||
"8501": [0, 0.69444, 0, 0, 0.70277],
|
||
"8592": [-0.10889, 0.39111, 0, 0, 1.14999],
|
||
"8593": [0.19444, 0.69444, 0, 0, 0.575],
|
||
"8594": [-0.10889, 0.39111, 0, 0, 1.14999],
|
||
"8595": [0.19444, 0.69444, 0, 0, 0.575],
|
||
"8596": [-0.10889, 0.39111, 0, 0, 1.14999],
|
||
"8597": [0.25, 0.75, 0, 0, 0.575],
|
||
"8598": [0.19444, 0.69444, 0, 0, 1.14999],
|
||
"8599": [0.19444, 0.69444, 0, 0, 1.14999],
|
||
"8600": [0.19444, 0.69444, 0, 0, 1.14999],
|
||
"8601": [0.19444, 0.69444, 0, 0, 1.14999],
|
||
"8636": [-0.10889, 0.39111, 0, 0, 1.14999],
|
||
"8637": [-0.10889, 0.39111, 0, 0, 1.14999],
|
||
"8640": [-0.10889, 0.39111, 0, 0, 1.14999],
|
||
"8641": [-0.10889, 0.39111, 0, 0, 1.14999],
|
||
"8656": [-0.10889, 0.39111, 0, 0, 1.14999],
|
||
"8657": [0.19444, 0.69444, 0, 0, 0.70277],
|
||
"8658": [-0.10889, 0.39111, 0, 0, 1.14999],
|
||
"8659": [0.19444, 0.69444, 0, 0, 0.70277],
|
||
"8660": [-0.10889, 0.39111, 0, 0, 1.14999],
|
||
"8661": [0.25, 0.75, 0, 0, 0.70277],
|
||
"8704": [0, 0.69444, 0, 0, 0.63889],
|
||
"8706": [0, 0.69444, 0.06389, 0, 0.62847],
|
||
"8707": [0, 0.69444, 0, 0, 0.63889],
|
||
"8709": [0.05556, 0.75, 0, 0, 0.575],
|
||
"8711": [0, 0.68611, 0, 0, 0.95833],
|
||
"8712": [0.08556, 0.58556, 0, 0, 0.76666],
|
||
"8715": [0.08556, 0.58556, 0, 0, 0.76666],
|
||
"8722": [0.13333, 0.63333, 0, 0, 0.89444],
|
||
"8723": [0.13333, 0.63333, 0, 0, 0.89444],
|
||
"8725": [0.25, 0.75, 0, 0, 0.575],
|
||
"8726": [0.25, 0.75, 0, 0, 0.575],
|
||
"8727": [-0.02778, 0.47222, 0, 0, 0.575],
|
||
"8728": [-0.02639, 0.47361, 0, 0, 0.575],
|
||
"8729": [-0.02639, 0.47361, 0, 0, 0.575],
|
||
"8730": [0.18, 0.82, 0, 0, 0.95833],
|
||
"8733": [0, 0.44444, 0, 0, 0.89444],
|
||
"8734": [0, 0.44444, 0, 0, 1.14999],
|
||
"8736": [0, 0.69224, 0, 0, 0.72222],
|
||
"8739": [0.25, 0.75, 0, 0, 0.31944],
|
||
"8741": [0.25, 0.75, 0, 0, 0.575],
|
||
"8743": [0, 0.55556, 0, 0, 0.76666],
|
||
"8744": [0, 0.55556, 0, 0, 0.76666],
|
||
"8745": [0, 0.55556, 0, 0, 0.76666],
|
||
"8746": [0, 0.55556, 0, 0, 0.76666],
|
||
"8747": [0.19444, 0.69444, 0.12778, 0, 0.56875],
|
||
"8764": [-0.10889, 0.39111, 0, 0, 0.89444],
|
||
"8768": [0.19444, 0.69444, 0, 0, 0.31944],
|
||
"8771": [0.00222, 0.50222, 0, 0, 0.89444],
|
||
"8776": [0.02444, 0.52444, 0, 0, 0.89444],
|
||
"8781": [0.00222, 0.50222, 0, 0, 0.89444],
|
||
"8801": [0.00222, 0.50222, 0, 0, 0.89444],
|
||
"8804": [0.19667, 0.69667, 0, 0, 0.89444],
|
||
"8805": [0.19667, 0.69667, 0, 0, 0.89444],
|
||
"8810": [0.08556, 0.58556, 0, 0, 1.14999],
|
||
"8811": [0.08556, 0.58556, 0, 0, 1.14999],
|
||
"8826": [0.08556, 0.58556, 0, 0, 0.89444],
|
||
"8827": [0.08556, 0.58556, 0, 0, 0.89444],
|
||
"8834": [0.08556, 0.58556, 0, 0, 0.89444],
|
||
"8835": [0.08556, 0.58556, 0, 0, 0.89444],
|
||
"8838": [0.19667, 0.69667, 0, 0, 0.89444],
|
||
"8839": [0.19667, 0.69667, 0, 0, 0.89444],
|
||
"8846": [0, 0.55556, 0, 0, 0.76666],
|
||
"8849": [0.19667, 0.69667, 0, 0, 0.89444],
|
||
"8850": [0.19667, 0.69667, 0, 0, 0.89444],
|
||
"8851": [0, 0.55556, 0, 0, 0.76666],
|
||
"8852": [0, 0.55556, 0, 0, 0.76666],
|
||
"8853": [0.13333, 0.63333, 0, 0, 0.89444],
|
||
"8854": [0.13333, 0.63333, 0, 0, 0.89444],
|
||
"8855": [0.13333, 0.63333, 0, 0, 0.89444],
|
||
"8856": [0.13333, 0.63333, 0, 0, 0.89444],
|
||
"8857": [0.13333, 0.63333, 0, 0, 0.89444],
|
||
"8866": [0, 0.69444, 0, 0, 0.70277],
|
||
"8867": [0, 0.69444, 0, 0, 0.70277],
|
||
"8868": [0, 0.69444, 0, 0, 0.89444],
|
||
"8869": [0, 0.69444, 0, 0, 0.89444],
|
||
"8900": [-0.02639, 0.47361, 0, 0, 0.575],
|
||
"8901": [-0.02639, 0.47361, 0, 0, 0.31944],
|
||
"8902": [-0.02778, 0.47222, 0, 0, 0.575],
|
||
"8968": [0.25, 0.75, 0, 0, 0.51111],
|
||
"8969": [0.25, 0.75, 0, 0, 0.51111],
|
||
"8970": [0.25, 0.75, 0, 0, 0.51111],
|
||
"8971": [0.25, 0.75, 0, 0, 0.51111],
|
||
"8994": [-0.13889, 0.36111, 0, 0, 1.14999],
|
||
"8995": [-0.13889, 0.36111, 0, 0, 1.14999],
|
||
"9651": [0.19444, 0.69444, 0, 0, 1.02222],
|
||
"9657": [-0.02778, 0.47222, 0, 0, 0.575],
|
||
"9661": [0.19444, 0.69444, 0, 0, 1.02222],
|
||
"9667": [-0.02778, 0.47222, 0, 0, 0.575],
|
||
"9711": [0.19444, 0.69444, 0, 0, 1.14999],
|
||
"9824": [0.12963, 0.69444, 0, 0, 0.89444],
|
||
"9825": [0.12963, 0.69444, 0, 0, 0.89444],
|
||
"9826": [0.12963, 0.69444, 0, 0, 0.89444],
|
||
"9827": [0.12963, 0.69444, 0, 0, 0.89444],
|
||
"9837": [0, 0.75, 0, 0, 0.44722],
|
||
"9838": [0.19444, 0.69444, 0, 0, 0.44722],
|
||
"9839": [0.19444, 0.69444, 0, 0, 0.44722],
|
||
"10216": [0.25, 0.75, 0, 0, 0.44722],
|
||
"10217": [0.25, 0.75, 0, 0, 0.44722],
|
||
"10815": [0, 0.68611, 0, 0, 0.9],
|
||
"10927": [0.19667, 0.69667, 0, 0, 0.89444],
|
||
"10928": [0.19667, 0.69667, 0, 0, 0.89444],
|
||
"57376": [0.19444, 0.69444, 0, 0, 0]
|
||
},
|
||
"Main-BoldItalic": {
|
||
"33": [0, 0.69444, 0.11417, 0, 0.38611],
|
||
"34": [0, 0.69444, 0.07939, 0, 0.62055],
|
||
"35": [0.19444, 0.69444, 0.06833, 0, 0.94444],
|
||
"37": [0.05556, 0.75, 0.12861, 0, 0.94444],
|
||
"38": [0, 0.69444, 0.08528, 0, 0.88555],
|
||
"39": [0, 0.69444, 0.12945, 0, 0.35555],
|
||
"40": [0.25, 0.75, 0.15806, 0, 0.47333],
|
||
"41": [0.25, 0.75, 0.03306, 0, 0.47333],
|
||
"42": [0, 0.75, 0.14333, 0, 0.59111],
|
||
"43": [0.10333, 0.60333, 0.03306, 0, 0.88555],
|
||
"44": [0.19444, 0.14722, 0, 0, 0.35555],
|
||
"45": [0, 0.44444, 0.02611, 0, 0.41444],
|
||
"46": [0, 0.14722, 0, 0, 0.35555],
|
||
"47": [0.25, 0.75, 0.15806, 0, 0.59111],
|
||
"48": [0, 0.64444, 0.13167, 0, 0.59111],
|
||
"49": [0, 0.64444, 0.13167, 0, 0.59111],
|
||
"50": [0, 0.64444, 0.13167, 0, 0.59111],
|
||
"51": [0, 0.64444, 0.13167, 0, 0.59111],
|
||
"52": [0.19444, 0.64444, 0.13167, 0, 0.59111],
|
||
"53": [0, 0.64444, 0.13167, 0, 0.59111],
|
||
"54": [0, 0.64444, 0.13167, 0, 0.59111],
|
||
"55": [0.19444, 0.64444, 0.13167, 0, 0.59111],
|
||
"56": [0, 0.64444, 0.13167, 0, 0.59111],
|
||
"57": [0, 0.64444, 0.13167, 0, 0.59111],
|
||
"58": [0, 0.44444, 0.06695, 0, 0.35555],
|
||
"59": [0.19444, 0.44444, 0.06695, 0, 0.35555],
|
||
"61": [-0.10889, 0.39111, 0.06833, 0, 0.88555],
|
||
"63": [0, 0.69444, 0.11472, 0, 0.59111],
|
||
"64": [0, 0.69444, 0.09208, 0, 0.88555],
|
||
"65": [0, 0.68611, 0, 0, 0.86555],
|
||
"66": [0, 0.68611, 0.0992, 0, 0.81666],
|
||
"67": [0, 0.68611, 0.14208, 0, 0.82666],
|
||
"68": [0, 0.68611, 0.09062, 0, 0.87555],
|
||
"69": [0, 0.68611, 0.11431, 0, 0.75666],
|
||
"70": [0, 0.68611, 0.12903, 0, 0.72722],
|
||
"71": [0, 0.68611, 0.07347, 0, 0.89527],
|
||
"72": [0, 0.68611, 0.17208, 0, 0.8961],
|
||
"73": [0, 0.68611, 0.15681, 0, 0.47166],
|
||
"74": [0, 0.68611, 0.145, 0, 0.61055],
|
||
"75": [0, 0.68611, 0.14208, 0, 0.89499],
|
||
"76": [0, 0.68611, 0, 0, 0.69777],
|
||
"77": [0, 0.68611, 0.17208, 0, 1.07277],
|
||
"78": [0, 0.68611, 0.17208, 0, 0.8961],
|
||
"79": [0, 0.68611, 0.09062, 0, 0.85499],
|
||
"80": [0, 0.68611, 0.0992, 0, 0.78721],
|
||
"81": [0.19444, 0.68611, 0.09062, 0, 0.85499],
|
||
"82": [0, 0.68611, 0.02559, 0, 0.85944],
|
||
"83": [0, 0.68611, 0.11264, 0, 0.64999],
|
||
"84": [0, 0.68611, 0.12903, 0, 0.7961],
|
||
"85": [0, 0.68611, 0.17208, 0, 0.88083],
|
||
"86": [0, 0.68611, 0.18625, 0, 0.86555],
|
||
"87": [0, 0.68611, 0.18625, 0, 1.15999],
|
||
"88": [0, 0.68611, 0.15681, 0, 0.86555],
|
||
"89": [0, 0.68611, 0.19803, 0, 0.86555],
|
||
"90": [0, 0.68611, 0.14208, 0, 0.70888],
|
||
"91": [0.25, 0.75, 0.1875, 0, 0.35611],
|
||
"93": [0.25, 0.75, 0.09972, 0, 0.35611],
|
||
"94": [0, 0.69444, 0.06709, 0, 0.59111],
|
||
"95": [0.31, 0.13444, 0.09811, 0, 0.59111],
|
||
"97": [0, 0.44444, 0.09426, 0, 0.59111],
|
||
"98": [0, 0.69444, 0.07861, 0, 0.53222],
|
||
"99": [0, 0.44444, 0.05222, 0, 0.53222],
|
||
"100": [0, 0.69444, 0.10861, 0, 0.59111],
|
||
"101": [0, 0.44444, 0.085, 0, 0.53222],
|
||
"102": [0.19444, 0.69444, 0.21778, 0, 0.4],
|
||
"103": [0.19444, 0.44444, 0.105, 0, 0.53222],
|
||
"104": [0, 0.69444, 0.09426, 0, 0.59111],
|
||
"105": [0, 0.69326, 0.11387, 0, 0.35555],
|
||
"106": [0.19444, 0.69326, 0.1672, 0, 0.35555],
|
||
"107": [0, 0.69444, 0.11111, 0, 0.53222],
|
||
"108": [0, 0.69444, 0.10861, 0, 0.29666],
|
||
"109": [0, 0.44444, 0.09426, 0, 0.94444],
|
||
"110": [0, 0.44444, 0.09426, 0, 0.64999],
|
||
"111": [0, 0.44444, 0.07861, 0, 0.59111],
|
||
"112": [0.19444, 0.44444, 0.07861, 0, 0.59111],
|
||
"113": [0.19444, 0.44444, 0.105, 0, 0.53222],
|
||
"114": [0, 0.44444, 0.11111, 0, 0.50167],
|
||
"115": [0, 0.44444, 0.08167, 0, 0.48694],
|
||
"116": [0, 0.63492, 0.09639, 0, 0.385],
|
||
"117": [0, 0.44444, 0.09426, 0, 0.62055],
|
||
"118": [0, 0.44444, 0.11111, 0, 0.53222],
|
||
"119": [0, 0.44444, 0.11111, 0, 0.76777],
|
||
"120": [0, 0.44444, 0.12583, 0, 0.56055],
|
||
"121": [0.19444, 0.44444, 0.105, 0, 0.56166],
|
||
"122": [0, 0.44444, 0.13889, 0, 0.49055],
|
||
"126": [0.35, 0.34444, 0.11472, 0, 0.59111],
|
||
"163": [0, 0.69444, 0, 0, 0.86853],
|
||
"168": [0, 0.69444, 0.11473, 0, 0.59111],
|
||
"176": [0, 0.69444, 0, 0, 0.94888],
|
||
"184": [0.17014, 0, 0, 0, 0.53222],
|
||
"198": [0, 0.68611, 0.11431, 0, 1.02277],
|
||
"216": [0.04861, 0.73472, 0.09062, 0, 0.88555],
|
||
"223": [0.19444, 0.69444, 0.09736, 0, 0.665],
|
||
"230": [0, 0.44444, 0.085, 0, 0.82666],
|
||
"248": [0.09722, 0.54167, 0.09458, 0, 0.59111],
|
||
"305": [0, 0.44444, 0.09426, 0, 0.35555],
|
||
"338": [0, 0.68611, 0.11431, 0, 1.14054],
|
||
"339": [0, 0.44444, 0.085, 0, 0.82666],
|
||
"567": [0.19444, 0.44444, 0.04611, 0, 0.385],
|
||
"710": [0, 0.69444, 0.06709, 0, 0.59111],
|
||
"711": [0, 0.63194, 0.08271, 0, 0.59111],
|
||
"713": [0, 0.59444, 0.10444, 0, 0.59111],
|
||
"714": [0, 0.69444, 0.08528, 0, 0.59111],
|
||
"715": [0, 0.69444, 0, 0, 0.59111],
|
||
"728": [0, 0.69444, 0.10333, 0, 0.59111],
|
||
"729": [0, 0.69444, 0.12945, 0, 0.35555],
|
||
"730": [0, 0.69444, 0, 0, 0.94888],
|
||
"732": [0, 0.69444, 0.11472, 0, 0.59111],
|
||
"733": [0, 0.69444, 0.11472, 0, 0.59111],
|
||
"915": [0, 0.68611, 0.12903, 0, 0.69777],
|
||
"916": [0, 0.68611, 0, 0, 0.94444],
|
||
"920": [0, 0.68611, 0.09062, 0, 0.88555],
|
||
"923": [0, 0.68611, 0, 0, 0.80666],
|
||
"926": [0, 0.68611, 0.15092, 0, 0.76777],
|
||
"928": [0, 0.68611, 0.17208, 0, 0.8961],
|
||
"931": [0, 0.68611, 0.11431, 0, 0.82666],
|
||
"933": [0, 0.68611, 0.10778, 0, 0.88555],
|
||
"934": [0, 0.68611, 0.05632, 0, 0.82666],
|
||
"936": [0, 0.68611, 0.10778, 0, 0.88555],
|
||
"937": [0, 0.68611, 0.0992, 0, 0.82666],
|
||
"8211": [0, 0.44444, 0.09811, 0, 0.59111],
|
||
"8212": [0, 0.44444, 0.09811, 0, 1.18221],
|
||
"8216": [0, 0.69444, 0.12945, 0, 0.35555],
|
||
"8217": [0, 0.69444, 0.12945, 0, 0.35555],
|
||
"8220": [0, 0.69444, 0.16772, 0, 0.62055],
|
||
"8221": [0, 0.69444, 0.07939, 0, 0.62055]
|
||
},
|
||
"Main-Italic": {
|
||
"33": [0, 0.69444, 0.12417, 0, 0.30667],
|
||
"34": [0, 0.69444, 0.06961, 0, 0.51444],
|
||
"35": [0.19444, 0.69444, 0.06616, 0, 0.81777],
|
||
"37": [0.05556, 0.75, 0.13639, 0, 0.81777],
|
||
"38": [0, 0.69444, 0.09694, 0, 0.76666],
|
||
"39": [0, 0.69444, 0.12417, 0, 0.30667],
|
||
"40": [0.25, 0.75, 0.16194, 0, 0.40889],
|
||
"41": [0.25, 0.75, 0.03694, 0, 0.40889],
|
||
"42": [0, 0.75, 0.14917, 0, 0.51111],
|
||
"43": [0.05667, 0.56167, 0.03694, 0, 0.76666],
|
||
"44": [0.19444, 0.10556, 0, 0, 0.30667],
|
||
"45": [0, 0.43056, 0.02826, 0, 0.35778],
|
||
"46": [0, 0.10556, 0, 0, 0.30667],
|
||
"47": [0.25, 0.75, 0.16194, 0, 0.51111],
|
||
"48": [0, 0.64444, 0.13556, 0, 0.51111],
|
||
"49": [0, 0.64444, 0.13556, 0, 0.51111],
|
||
"50": [0, 0.64444, 0.13556, 0, 0.51111],
|
||
"51": [0, 0.64444, 0.13556, 0, 0.51111],
|
||
"52": [0.19444, 0.64444, 0.13556, 0, 0.51111],
|
||
"53": [0, 0.64444, 0.13556, 0, 0.51111],
|
||
"54": [0, 0.64444, 0.13556, 0, 0.51111],
|
||
"55": [0.19444, 0.64444, 0.13556, 0, 0.51111],
|
||
"56": [0, 0.64444, 0.13556, 0, 0.51111],
|
||
"57": [0, 0.64444, 0.13556, 0, 0.51111],
|
||
"58": [0, 0.43056, 0.0582, 0, 0.30667],
|
||
"59": [0.19444, 0.43056, 0.0582, 0, 0.30667],
|
||
"61": [-0.13313, 0.36687, 0.06616, 0, 0.76666],
|
||
"63": [0, 0.69444, 0.1225, 0, 0.51111],
|
||
"64": [0, 0.69444, 0.09597, 0, 0.76666],
|
||
"65": [0, 0.68333, 0, 0, 0.74333],
|
||
"66": [0, 0.68333, 0.10257, 0, 0.70389],
|
||
"67": [0, 0.68333, 0.14528, 0, 0.71555],
|
||
"68": [0, 0.68333, 0.09403, 0, 0.755],
|
||
"69": [0, 0.68333, 0.12028, 0, 0.67833],
|
||
"70": [0, 0.68333, 0.13305, 0, 0.65277],
|
||
"71": [0, 0.68333, 0.08722, 0, 0.77361],
|
||
"72": [0, 0.68333, 0.16389, 0, 0.74333],
|
||
"73": [0, 0.68333, 0.15806, 0, 0.38555],
|
||
"74": [0, 0.68333, 0.14028, 0, 0.525],
|
||
"75": [0, 0.68333, 0.14528, 0, 0.76888],
|
||
"76": [0, 0.68333, 0, 0, 0.62722],
|
||
"77": [0, 0.68333, 0.16389, 0, 0.89666],
|
||
"78": [0, 0.68333, 0.16389, 0, 0.74333],
|
||
"79": [0, 0.68333, 0.09403, 0, 0.76666],
|
||
"80": [0, 0.68333, 0.10257, 0, 0.67833],
|
||
"81": [0.19444, 0.68333, 0.09403, 0, 0.76666],
|
||
"82": [0, 0.68333, 0.03868, 0, 0.72944],
|
||
"83": [0, 0.68333, 0.11972, 0, 0.56222],
|
||
"84": [0, 0.68333, 0.13305, 0, 0.71555],
|
||
"85": [0, 0.68333, 0.16389, 0, 0.74333],
|
||
"86": [0, 0.68333, 0.18361, 0, 0.74333],
|
||
"87": [0, 0.68333, 0.18361, 0, 0.99888],
|
||
"88": [0, 0.68333, 0.15806, 0, 0.74333],
|
||
"89": [0, 0.68333, 0.19383, 0, 0.74333],
|
||
"90": [0, 0.68333, 0.14528, 0, 0.61333],
|
||
"91": [0.25, 0.75, 0.1875, 0, 0.30667],
|
||
"93": [0.25, 0.75, 0.10528, 0, 0.30667],
|
||
"94": [0, 0.69444, 0.06646, 0, 0.51111],
|
||
"95": [0.31, 0.12056, 0.09208, 0, 0.51111],
|
||
"97": [0, 0.43056, 0.07671, 0, 0.51111],
|
||
"98": [0, 0.69444, 0.06312, 0, 0.46],
|
||
"99": [0, 0.43056, 0.05653, 0, 0.46],
|
||
"100": [0, 0.69444, 0.10333, 0, 0.51111],
|
||
"101": [0, 0.43056, 0.07514, 0, 0.46],
|
||
"102": [0.19444, 0.69444, 0.21194, 0, 0.30667],
|
||
"103": [0.19444, 0.43056, 0.08847, 0, 0.46],
|
||
"104": [0, 0.69444, 0.07671, 0, 0.51111],
|
||
"105": [0, 0.65536, 0.1019, 0, 0.30667],
|
||
"106": [0.19444, 0.65536, 0.14467, 0, 0.30667],
|
||
"107": [0, 0.69444, 0.10764, 0, 0.46],
|
||
"108": [0, 0.69444, 0.10333, 0, 0.25555],
|
||
"109": [0, 0.43056, 0.07671, 0, 0.81777],
|
||
"110": [0, 0.43056, 0.07671, 0, 0.56222],
|
||
"111": [0, 0.43056, 0.06312, 0, 0.51111],
|
||
"112": [0.19444, 0.43056, 0.06312, 0, 0.51111],
|
||
"113": [0.19444, 0.43056, 0.08847, 0, 0.46],
|
||
"114": [0, 0.43056, 0.10764, 0, 0.42166],
|
||
"115": [0, 0.43056, 0.08208, 0, 0.40889],
|
||
"116": [0, 0.61508, 0.09486, 0, 0.33222],
|
||
"117": [0, 0.43056, 0.07671, 0, 0.53666],
|
||
"118": [0, 0.43056, 0.10764, 0, 0.46],
|
||
"119": [0, 0.43056, 0.10764, 0, 0.66444],
|
||
"120": [0, 0.43056, 0.12042, 0, 0.46389],
|
||
"121": [0.19444, 0.43056, 0.08847, 0, 0.48555],
|
||
"122": [0, 0.43056, 0.12292, 0, 0.40889],
|
||
"126": [0.35, 0.31786, 0.11585, 0, 0.51111],
|
||
"163": [0, 0.69444, 0, 0, 0.76909],
|
||
"168": [0, 0.66786, 0.10474, 0, 0.51111],
|
||
"176": [0, 0.69444, 0, 0, 0.83129],
|
||
"184": [0.17014, 0, 0, 0, 0.46],
|
||
"198": [0, 0.68333, 0.12028, 0, 0.88277],
|
||
"216": [0.04861, 0.73194, 0.09403, 0, 0.76666],
|
||
"223": [0.19444, 0.69444, 0.10514, 0, 0.53666],
|
||
"230": [0, 0.43056, 0.07514, 0, 0.71555],
|
||
"248": [0.09722, 0.52778, 0.09194, 0, 0.51111],
|
||
"305": [0, 0.43056, 0, 0.02778, 0.32246],
|
||
"338": [0, 0.68333, 0.12028, 0, 0.98499],
|
||
"339": [0, 0.43056, 0.07514, 0, 0.71555],
|
||
"567": [0.19444, 0.43056, 0, 0.08334, 0.38403],
|
||
"710": [0, 0.69444, 0.06646, 0, 0.51111],
|
||
"711": [0, 0.62847, 0.08295, 0, 0.51111],
|
||
"713": [0, 0.56167, 0.10333, 0, 0.51111],
|
||
"714": [0, 0.69444, 0.09694, 0, 0.51111],
|
||
"715": [0, 0.69444, 0, 0, 0.51111],
|
||
"728": [0, 0.69444, 0.10806, 0, 0.51111],
|
||
"729": [0, 0.66786, 0.11752, 0, 0.30667],
|
||
"730": [0, 0.69444, 0, 0, 0.83129],
|
||
"732": [0, 0.66786, 0.11585, 0, 0.51111],
|
||
"733": [0, 0.69444, 0.1225, 0, 0.51111],
|
||
"915": [0, 0.68333, 0.13305, 0, 0.62722],
|
||
"916": [0, 0.68333, 0, 0, 0.81777],
|
||
"920": [0, 0.68333, 0.09403, 0, 0.76666],
|
||
"923": [0, 0.68333, 0, 0, 0.69222],
|
||
"926": [0, 0.68333, 0.15294, 0, 0.66444],
|
||
"928": [0, 0.68333, 0.16389, 0, 0.74333],
|
||
"931": [0, 0.68333, 0.12028, 0, 0.71555],
|
||
"933": [0, 0.68333, 0.11111, 0, 0.76666],
|
||
"934": [0, 0.68333, 0.05986, 0, 0.71555],
|
||
"936": [0, 0.68333, 0.11111, 0, 0.76666],
|
||
"937": [0, 0.68333, 0.10257, 0, 0.71555],
|
||
"8211": [0, 0.43056, 0.09208, 0, 0.51111],
|
||
"8212": [0, 0.43056, 0.09208, 0, 1.02222],
|
||
"8216": [0, 0.69444, 0.12417, 0, 0.30667],
|
||
"8217": [0, 0.69444, 0.12417, 0, 0.30667],
|
||
"8220": [0, 0.69444, 0.1685, 0, 0.51444],
|
||
"8221": [0, 0.69444, 0.06961, 0, 0.51444],
|
||
"8463": [0, 0.68889, 0, 0, 0.54028]
|
||
},
|
||
"Main-Regular": {
|
||
"32": [0, 0, 0, 0, 0.25],
|
||
"33": [0, 0.69444, 0, 0, 0.27778],
|
||
"34": [0, 0.69444, 0, 0, 0.5],
|
||
"35": [0.19444, 0.69444, 0, 0, 0.83334],
|
||
"36": [0.05556, 0.75, 0, 0, 0.5],
|
||
"37": [0.05556, 0.75, 0, 0, 0.83334],
|
||
"38": [0, 0.69444, 0, 0, 0.77778],
|
||
"39": [0, 0.69444, 0, 0, 0.27778],
|
||
"40": [0.25, 0.75, 0, 0, 0.38889],
|
||
"41": [0.25, 0.75, 0, 0, 0.38889],
|
||
"42": [0, 0.75, 0, 0, 0.5],
|
||
"43": [0.08333, 0.58333, 0, 0, 0.77778],
|
||
"44": [0.19444, 0.10556, 0, 0, 0.27778],
|
||
"45": [0, 0.43056, 0, 0, 0.33333],
|
||
"46": [0, 0.10556, 0, 0, 0.27778],
|
||
"47": [0.25, 0.75, 0, 0, 0.5],
|
||
"48": [0, 0.64444, 0, 0, 0.5],
|
||
"49": [0, 0.64444, 0, 0, 0.5],
|
||
"50": [0, 0.64444, 0, 0, 0.5],
|
||
"51": [0, 0.64444, 0, 0, 0.5],
|
||
"52": [0, 0.64444, 0, 0, 0.5],
|
||
"53": [0, 0.64444, 0, 0, 0.5],
|
||
"54": [0, 0.64444, 0, 0, 0.5],
|
||
"55": [0, 0.64444, 0, 0, 0.5],
|
||
"56": [0, 0.64444, 0, 0, 0.5],
|
||
"57": [0, 0.64444, 0, 0, 0.5],
|
||
"58": [0, 0.43056, 0, 0, 0.27778],
|
||
"59": [0.19444, 0.43056, 0, 0, 0.27778],
|
||
"60": [0.0391, 0.5391, 0, 0, 0.77778],
|
||
"61": [-0.13313, 0.36687, 0, 0, 0.77778],
|
||
"62": [0.0391, 0.5391, 0, 0, 0.77778],
|
||
"63": [0, 0.69444, 0, 0, 0.47222],
|
||
"64": [0, 0.69444, 0, 0, 0.77778],
|
||
"65": [0, 0.68333, 0, 0, 0.75],
|
||
"66": [0, 0.68333, 0, 0, 0.70834],
|
||
"67": [0, 0.68333, 0, 0, 0.72222],
|
||
"68": [0, 0.68333, 0, 0, 0.76389],
|
||
"69": [0, 0.68333, 0, 0, 0.68056],
|
||
"70": [0, 0.68333, 0, 0, 0.65278],
|
||
"71": [0, 0.68333, 0, 0, 0.78472],
|
||
"72": [0, 0.68333, 0, 0, 0.75],
|
||
"73": [0, 0.68333, 0, 0, 0.36111],
|
||
"74": [0, 0.68333, 0, 0, 0.51389],
|
||
"75": [0, 0.68333, 0, 0, 0.77778],
|
||
"76": [0, 0.68333, 0, 0, 0.625],
|
||
"77": [0, 0.68333, 0, 0, 0.91667],
|
||
"78": [0, 0.68333, 0, 0, 0.75],
|
||
"79": [0, 0.68333, 0, 0, 0.77778],
|
||
"80": [0, 0.68333, 0, 0, 0.68056],
|
||
"81": [0.19444, 0.68333, 0, 0, 0.77778],
|
||
"82": [0, 0.68333, 0, 0, 0.73611],
|
||
"83": [0, 0.68333, 0, 0, 0.55556],
|
||
"84": [0, 0.68333, 0, 0, 0.72222],
|
||
"85": [0, 0.68333, 0, 0, 0.75],
|
||
"86": [0, 0.68333, 0.01389, 0, 0.75],
|
||
"87": [0, 0.68333, 0.01389, 0, 1.02778],
|
||
"88": [0, 0.68333, 0, 0, 0.75],
|
||
"89": [0, 0.68333, 0.025, 0, 0.75],
|
||
"90": [0, 0.68333, 0, 0, 0.61111],
|
||
"91": [0.25, 0.75, 0, 0, 0.27778],
|
||
"92": [0.25, 0.75, 0, 0, 0.5],
|
||
"93": [0.25, 0.75, 0, 0, 0.27778],
|
||
"94": [0, 0.69444, 0, 0, 0.5],
|
||
"95": [0.31, 0.12056, 0.02778, 0, 0.5],
|
||
"97": [0, 0.43056, 0, 0, 0.5],
|
||
"98": [0, 0.69444, 0, 0, 0.55556],
|
||
"99": [0, 0.43056, 0, 0, 0.44445],
|
||
"100": [0, 0.69444, 0, 0, 0.55556],
|
||
"101": [0, 0.43056, 0, 0, 0.44445],
|
||
"102": [0, 0.69444, 0.07778, 0, 0.30556],
|
||
"103": [0.19444, 0.43056, 0.01389, 0, 0.5],
|
||
"104": [0, 0.69444, 0, 0, 0.55556],
|
||
"105": [0, 0.66786, 0, 0, 0.27778],
|
||
"106": [0.19444, 0.66786, 0, 0, 0.30556],
|
||
"107": [0, 0.69444, 0, 0, 0.52778],
|
||
"108": [0, 0.69444, 0, 0, 0.27778],
|
||
"109": [0, 0.43056, 0, 0, 0.83334],
|
||
"110": [0, 0.43056, 0, 0, 0.55556],
|
||
"111": [0, 0.43056, 0, 0, 0.5],
|
||
"112": [0.19444, 0.43056, 0, 0, 0.55556],
|
||
"113": [0.19444, 0.43056, 0, 0, 0.52778],
|
||
"114": [0, 0.43056, 0, 0, 0.39167],
|
||
"115": [0, 0.43056, 0, 0, 0.39445],
|
||
"116": [0, 0.61508, 0, 0, 0.38889],
|
||
"117": [0, 0.43056, 0, 0, 0.55556],
|
||
"118": [0, 0.43056, 0.01389, 0, 0.52778],
|
||
"119": [0, 0.43056, 0.01389, 0, 0.72222],
|
||
"120": [0, 0.43056, 0, 0, 0.52778],
|
||
"121": [0.19444, 0.43056, 0.01389, 0, 0.52778],
|
||
"122": [0, 0.43056, 0, 0, 0.44445],
|
||
"123": [0.25, 0.75, 0, 0, 0.5],
|
||
"124": [0.25, 0.75, 0, 0, 0.27778],
|
||
"125": [0.25, 0.75, 0, 0, 0.5],
|
||
"126": [0.35, 0.31786, 0, 0, 0.5],
|
||
"160": [0, 0, 0, 0, 0.25],
|
||
"167": [0.19444, 0.69444, 0, 0, 0.44445],
|
||
"168": [0, 0.66786, 0, 0, 0.5],
|
||
"172": [0, 0.43056, 0, 0, 0.66667],
|
||
"176": [0, 0.69444, 0, 0, 0.75],
|
||
"177": [0.08333, 0.58333, 0, 0, 0.77778],
|
||
"182": [0.19444, 0.69444, 0, 0, 0.61111],
|
||
"184": [0.17014, 0, 0, 0, 0.44445],
|
||
"198": [0, 0.68333, 0, 0, 0.90278],
|
||
"215": [0.08333, 0.58333, 0, 0, 0.77778],
|
||
"216": [0.04861, 0.73194, 0, 0, 0.77778],
|
||
"223": [0, 0.69444, 0, 0, 0.5],
|
||
"230": [0, 0.43056, 0, 0, 0.72222],
|
||
"247": [0.08333, 0.58333, 0, 0, 0.77778],
|
||
"248": [0.09722, 0.52778, 0, 0, 0.5],
|
||
"305": [0, 0.43056, 0, 0, 0.27778],
|
||
"338": [0, 0.68333, 0, 0, 1.01389],
|
||
"339": [0, 0.43056, 0, 0, 0.77778],
|
||
"567": [0.19444, 0.43056, 0, 0, 0.30556],
|
||
"710": [0, 0.69444, 0, 0, 0.5],
|
||
"711": [0, 0.62847, 0, 0, 0.5],
|
||
"713": [0, 0.56778, 0, 0, 0.5],
|
||
"714": [0, 0.69444, 0, 0, 0.5],
|
||
"715": [0, 0.69444, 0, 0, 0.5],
|
||
"728": [0, 0.69444, 0, 0, 0.5],
|
||
"729": [0, 0.66786, 0, 0, 0.27778],
|
||
"730": [0, 0.69444, 0, 0, 0.75],
|
||
"732": [0, 0.66786, 0, 0, 0.5],
|
||
"733": [0, 0.69444, 0, 0, 0.5],
|
||
"915": [0, 0.68333, 0, 0, 0.625],
|
||
"916": [0, 0.68333, 0, 0, 0.83334],
|
||
"920": [0, 0.68333, 0, 0, 0.77778],
|
||
"923": [0, 0.68333, 0, 0, 0.69445],
|
||
"926": [0, 0.68333, 0, 0, 0.66667],
|
||
"928": [0, 0.68333, 0, 0, 0.75],
|
||
"931": [0, 0.68333, 0, 0, 0.72222],
|
||
"933": [0, 0.68333, 0, 0, 0.77778],
|
||
"934": [0, 0.68333, 0, 0, 0.72222],
|
||
"936": [0, 0.68333, 0, 0, 0.77778],
|
||
"937": [0, 0.68333, 0, 0, 0.72222],
|
||
"8211": [0, 0.43056, 0.02778, 0, 0.5],
|
||
"8212": [0, 0.43056, 0.02778, 0, 1.0],
|
||
"8216": [0, 0.69444, 0, 0, 0.27778],
|
||
"8217": [0, 0.69444, 0, 0, 0.27778],
|
||
"8220": [0, 0.69444, 0, 0, 0.5],
|
||
"8221": [0, 0.69444, 0, 0, 0.5],
|
||
"8224": [0.19444, 0.69444, 0, 0, 0.44445],
|
||
"8225": [0.19444, 0.69444, 0, 0, 0.44445],
|
||
"8230": [0, 0.12, 0, 0, 1.172],
|
||
"8242": [0, 0.55556, 0, 0, 0.275],
|
||
"8407": [0, 0.71444, 0.15382, 0, 0.5],
|
||
"8463": [0, 0.68889, 0, 0, 0.54028],
|
||
"8465": [0, 0.69444, 0, 0, 0.72222],
|
||
"8467": [0, 0.69444, 0, 0.11111, 0.41667],
|
||
"8472": [0.19444, 0.43056, 0, 0.11111, 0.63646],
|
||
"8476": [0, 0.69444, 0, 0, 0.72222],
|
||
"8501": [0, 0.69444, 0, 0, 0.61111],
|
||
"8592": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8593": [0.19444, 0.69444, 0, 0, 0.5],
|
||
"8594": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8595": [0.19444, 0.69444, 0, 0, 0.5],
|
||
"8596": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8597": [0.25, 0.75, 0, 0, 0.5],
|
||
"8598": [0.19444, 0.69444, 0, 0, 1.0],
|
||
"8599": [0.19444, 0.69444, 0, 0, 1.0],
|
||
"8600": [0.19444, 0.69444, 0, 0, 1.0],
|
||
"8601": [0.19444, 0.69444, 0, 0, 1.0],
|
||
"8614": [0.011, 0.511, 0, 0, 1.0],
|
||
"8617": [0.011, 0.511, 0, 0, 1.126],
|
||
"8618": [0.011, 0.511, 0, 0, 1.126],
|
||
"8636": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8637": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8640": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8641": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8652": [0.011, 0.671, 0, 0, 1.0],
|
||
"8656": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8657": [0.19444, 0.69444, 0, 0, 0.61111],
|
||
"8658": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8659": [0.19444, 0.69444, 0, 0, 0.61111],
|
||
"8660": [-0.13313, 0.36687, 0, 0, 1.0],
|
||
"8661": [0.25, 0.75, 0, 0, 0.61111],
|
||
"8704": [0, 0.69444, 0, 0, 0.55556],
|
||
"8706": [0, 0.69444, 0.05556, 0.08334, 0.5309],
|
||
"8707": [0, 0.69444, 0, 0, 0.55556],
|
||
"8709": [0.05556, 0.75, 0, 0, 0.5],
|
||
"8711": [0, 0.68333, 0, 0, 0.83334],
|
||
"8712": [0.0391, 0.5391, 0, 0, 0.66667],
|
||
"8715": [0.0391, 0.5391, 0, 0, 0.66667],
|
||
"8722": [0.08333, 0.58333, 0, 0, 0.77778],
|
||
"8723": [0.08333, 0.58333, 0, 0, 0.77778],
|
||
"8725": [0.25, 0.75, 0, 0, 0.5],
|
||
"8726": [0.25, 0.75, 0, 0, 0.5],
|
||
"8727": [-0.03472, 0.46528, 0, 0, 0.5],
|
||
"8728": [-0.05555, 0.44445, 0, 0, 0.5],
|
||
"8729": [-0.05555, 0.44445, 0, 0, 0.5],
|
||
"8730": [0.2, 0.8, 0, 0, 0.83334],
|
||
"8733": [0, 0.43056, 0, 0, 0.77778],
|
||
"8734": [0, 0.43056, 0, 0, 1.0],
|
||
"8736": [0, 0.69224, 0, 0, 0.72222],
|
||
"8739": [0.25, 0.75, 0, 0, 0.27778],
|
||
"8741": [0.25, 0.75, 0, 0, 0.5],
|
||
"8743": [0, 0.55556, 0, 0, 0.66667],
|
||
"8744": [0, 0.55556, 0, 0, 0.66667],
|
||
"8745": [0, 0.55556, 0, 0, 0.66667],
|
||
"8746": [0, 0.55556, 0, 0, 0.66667],
|
||
"8747": [0.19444, 0.69444, 0.11111, 0, 0.41667],
|
||
"8764": [-0.13313, 0.36687, 0, 0, 0.77778],
|
||
"8768": [0.19444, 0.69444, 0, 0, 0.27778],
|
||
"8771": [-0.03625, 0.46375, 0, 0, 0.77778],
|
||
"8773": [-0.022, 0.589, 0, 0, 1.0],
|
||
"8776": [-0.01688, 0.48312, 0, 0, 0.77778],
|
||
"8781": [-0.03625, 0.46375, 0, 0, 0.77778],
|
||
"8784": [-0.133, 0.67, 0, 0, 0.778],
|
||
"8801": [-0.03625, 0.46375, 0, 0, 0.77778],
|
||
"8804": [0.13597, 0.63597, 0, 0, 0.77778],
|
||
"8805": [0.13597, 0.63597, 0, 0, 0.77778],
|
||
"8810": [0.0391, 0.5391, 0, 0, 1.0],
|
||
"8811": [0.0391, 0.5391, 0, 0, 1.0],
|
||
"8826": [0.0391, 0.5391, 0, 0, 0.77778],
|
||
"8827": [0.0391, 0.5391, 0, 0, 0.77778],
|
||
"8834": [0.0391, 0.5391, 0, 0, 0.77778],
|
||
"8835": [0.0391, 0.5391, 0, 0, 0.77778],
|
||
"8838": [0.13597, 0.63597, 0, 0, 0.77778],
|
||
"8839": [0.13597, 0.63597, 0, 0, 0.77778],
|
||
"8846": [0, 0.55556, 0, 0, 0.66667],
|
||
"8849": [0.13597, 0.63597, 0, 0, 0.77778],
|
||
"8850": [0.13597, 0.63597, 0, 0, 0.77778],
|
||
"8851": [0, 0.55556, 0, 0, 0.66667],
|
||
"8852": [0, 0.55556, 0, 0, 0.66667],
|
||
"8853": [0.08333, 0.58333, 0, 0, 0.77778],
|
||
"8854": [0.08333, 0.58333, 0, 0, 0.77778],
|
||
"8855": [0.08333, 0.58333, 0, 0, 0.77778],
|
||
"8856": [0.08333, 0.58333, 0, 0, 0.77778],
|
||
"8857": [0.08333, 0.58333, 0, 0, 0.77778],
|
||
"8866": [0, 0.69444, 0, 0, 0.61111],
|
||
"8867": [0, 0.69444, 0, 0, 0.61111],
|
||
"8868": [0, 0.69444, 0, 0, 0.77778],
|
||
"8869": [0, 0.69444, 0, 0, 0.77778],
|
||
"8872": [0.249, 0.75, 0, 0, 0.867],
|
||
"8900": [-0.05555, 0.44445, 0, 0, 0.5],
|
||
"8901": [-0.05555, 0.44445, 0, 0, 0.27778],
|
||
"8902": [-0.03472, 0.46528, 0, 0, 0.5],
|
||
"8904": [0.005, 0.505, 0, 0, 0.9],
|
||
"8942": [0.03, 0.9, 0, 0, 0.278],
|
||
"8943": [-0.19, 0.31, 0, 0, 1.172],
|
||
"8945": [-0.1, 0.82, 0, 0, 1.282],
|
||
"8968": [0.25, 0.75, 0, 0, 0.44445],
|
||
"8969": [0.25, 0.75, 0, 0, 0.44445],
|
||
"8970": [0.25, 0.75, 0, 0, 0.44445],
|
||
"8971": [0.25, 0.75, 0, 0, 0.44445],
|
||
"8994": [-0.14236, 0.35764, 0, 0, 1.0],
|
||
"8995": [-0.14236, 0.35764, 0, 0, 1.0],
|
||
"9136": [0.244, 0.744, 0, 0, 0.412],
|
||
"9137": [0.244, 0.744, 0, 0, 0.412],
|
||
"9651": [0.19444, 0.69444, 0, 0, 0.88889],
|
||
"9657": [-0.03472, 0.46528, 0, 0, 0.5],
|
||
"9661": [0.19444, 0.69444, 0, 0, 0.88889],
|
||
"9667": [-0.03472, 0.46528, 0, 0, 0.5],
|
||
"9711": [0.19444, 0.69444, 0, 0, 1.0],
|
||
"9824": [0.12963, 0.69444, 0, 0, 0.77778],
|
||
"9825": [0.12963, 0.69444, 0, 0, 0.77778],
|
||
"9826": [0.12963, 0.69444, 0, 0, 0.77778],
|
||
"9827": [0.12963, 0.69444, 0, 0, 0.77778],
|
||
"9837": [0, 0.75, 0, 0, 0.38889],
|
||
"9838": [0.19444, 0.69444, 0, 0, 0.38889],
|
||
"9839": [0.19444, 0.69444, 0, 0, 0.38889],
|
||
"10216": [0.25, 0.75, 0, 0, 0.38889],
|
||
"10217": [0.25, 0.75, 0, 0, 0.38889],
|
||
"10222": [0.244, 0.744, 0, 0, 0.412],
|
||
"10223": [0.244, 0.744, 0, 0, 0.412],
|
||
"10229": [0.011, 0.511, 0, 0, 1.609],
|
||
"10230": [0.011, 0.511, 0, 0, 1.638],
|
||
"10231": [0.011, 0.511, 0, 0, 1.859],
|
||
"10232": [0.024, 0.525, 0, 0, 1.609],
|
||
"10233": [0.024, 0.525, 0, 0, 1.638],
|
||
"10234": [0.024, 0.525, 0, 0, 1.858],
|
||
"10236": [0.011, 0.511, 0, 0, 1.638],
|
||
"10815": [0, 0.68333, 0, 0, 0.75],
|
||
"10927": [0.13597, 0.63597, 0, 0, 0.77778],
|
||
"10928": [0.13597, 0.63597, 0, 0, 0.77778],
|
||
"57376": [0.19444, 0.69444, 0, 0, 0]
|
||
},
|
||
"Math-BoldItalic": {
|
||
"65": [0, 0.68611, 0, 0, 0.86944],
|
||
"66": [0, 0.68611, 0.04835, 0, 0.8664],
|
||
"67": [0, 0.68611, 0.06979, 0, 0.81694],
|
||
"68": [0, 0.68611, 0.03194, 0, 0.93812],
|
||
"69": [0, 0.68611, 0.05451, 0, 0.81007],
|
||
"70": [0, 0.68611, 0.15972, 0, 0.68889],
|
||
"71": [0, 0.68611, 0, 0, 0.88673],
|
||
"72": [0, 0.68611, 0.08229, 0, 0.98229],
|
||
"73": [0, 0.68611, 0.07778, 0, 0.51111],
|
||
"74": [0, 0.68611, 0.10069, 0, 0.63125],
|
||
"75": [0, 0.68611, 0.06979, 0, 0.97118],
|
||
"76": [0, 0.68611, 0, 0, 0.75555],
|
||
"77": [0, 0.68611, 0.11424, 0, 1.14201],
|
||
"78": [0, 0.68611, 0.11424, 0, 0.95034],
|
||
"79": [0, 0.68611, 0.03194, 0, 0.83666],
|
||
"80": [0, 0.68611, 0.15972, 0, 0.72309],
|
||
"81": [0.19444, 0.68611, 0, 0, 0.86861],
|
||
"82": [0, 0.68611, 0.00421, 0, 0.87235],
|
||
"83": [0, 0.68611, 0.05382, 0, 0.69271],
|
||
"84": [0, 0.68611, 0.15972, 0, 0.63663],
|
||
"85": [0, 0.68611, 0.11424, 0, 0.80027],
|
||
"86": [0, 0.68611, 0.25555, 0, 0.67778],
|
||
"87": [0, 0.68611, 0.15972, 0, 1.09305],
|
||
"88": [0, 0.68611, 0.07778, 0, 0.94722],
|
||
"89": [0, 0.68611, 0.25555, 0, 0.67458],
|
||
"90": [0, 0.68611, 0.06979, 0, 0.77257],
|
||
"97": [0, 0.44444, 0, 0, 0.63287],
|
||
"98": [0, 0.69444, 0, 0, 0.52083],
|
||
"99": [0, 0.44444, 0, 0, 0.51342],
|
||
"100": [0, 0.69444, 0, 0, 0.60972],
|
||
"101": [0, 0.44444, 0, 0, 0.55361],
|
||
"102": [0.19444, 0.69444, 0.11042, 0, 0.56806],
|
||
"103": [0.19444, 0.44444, 0.03704, 0, 0.5449],
|
||
"104": [0, 0.69444, 0, 0, 0.66759],
|
||
"105": [0, 0.69326, 0, 0, 0.4048],
|
||
"106": [0.19444, 0.69326, 0.0622, 0, 0.47083],
|
||
"107": [0, 0.69444, 0.01852, 0, 0.6037],
|
||
"108": [0, 0.69444, 0.0088, 0, 0.34815],
|
||
"109": [0, 0.44444, 0, 0, 1.0324],
|
||
"110": [0, 0.44444, 0, 0, 0.71296],
|
||
"111": [0, 0.44444, 0, 0, 0.58472],
|
||
"112": [0.19444, 0.44444, 0, 0, 0.60092],
|
||
"113": [0.19444, 0.44444, 0.03704, 0, 0.54213],
|
||
"114": [0, 0.44444, 0.03194, 0, 0.5287],
|
||
"115": [0, 0.44444, 0, 0, 0.53125],
|
||
"116": [0, 0.63492, 0, 0, 0.41528],
|
||
"117": [0, 0.44444, 0, 0, 0.68102],
|
||
"118": [0, 0.44444, 0.03704, 0, 0.56666],
|
||
"119": [0, 0.44444, 0.02778, 0, 0.83148],
|
||
"120": [0, 0.44444, 0, 0, 0.65903],
|
||
"121": [0.19444, 0.44444, 0.03704, 0, 0.59028],
|
||
"122": [0, 0.44444, 0.04213, 0, 0.55509],
|
||
"915": [0, 0.68611, 0.15972, 0, 0.65694],
|
||
"916": [0, 0.68611, 0, 0, 0.95833],
|
||
"920": [0, 0.68611, 0.03194, 0, 0.86722],
|
||
"923": [0, 0.68611, 0, 0, 0.80555],
|
||
"926": [0, 0.68611, 0.07458, 0, 0.84125],
|
||
"928": [0, 0.68611, 0.08229, 0, 0.98229],
|
||
"931": [0, 0.68611, 0.05451, 0, 0.88507],
|
||
"933": [0, 0.68611, 0.15972, 0, 0.67083],
|
||
"934": [0, 0.68611, 0, 0, 0.76666],
|
||
"936": [0, 0.68611, 0.11653, 0, 0.71402],
|
||
"937": [0, 0.68611, 0.04835, 0, 0.8789],
|
||
"945": [0, 0.44444, 0, 0, 0.76064],
|
||
"946": [0.19444, 0.69444, 0.03403, 0, 0.65972],
|
||
"947": [0.19444, 0.44444, 0.06389, 0, 0.59003],
|
||
"948": [0, 0.69444, 0.03819, 0, 0.52222],
|
||
"949": [0, 0.44444, 0, 0, 0.52882],
|
||
"950": [0.19444, 0.69444, 0.06215, 0, 0.50833],
|
||
"951": [0.19444, 0.44444, 0.03704, 0, 0.6],
|
||
"952": [0, 0.69444, 0.03194, 0, 0.5618],
|
||
"953": [0, 0.44444, 0, 0, 0.41204],
|
||
"954": [0, 0.44444, 0, 0, 0.66759],
|
||
"955": [0, 0.69444, 0, 0, 0.67083],
|
||
"956": [0.19444, 0.44444, 0, 0, 0.70787],
|
||
"957": [0, 0.44444, 0.06898, 0, 0.57685],
|
||
"958": [0.19444, 0.69444, 0.03021, 0, 0.50833],
|
||
"959": [0, 0.44444, 0, 0, 0.58472],
|
||
"960": [0, 0.44444, 0.03704, 0, 0.68241],
|
||
"961": [0.19444, 0.44444, 0, 0, 0.6118],
|
||
"962": [0.09722, 0.44444, 0.07917, 0, 0.42361],
|
||
"963": [0, 0.44444, 0.03704, 0, 0.68588],
|
||
"964": [0, 0.44444, 0.13472, 0, 0.52083],
|
||
"965": [0, 0.44444, 0.03704, 0, 0.63055],
|
||
"966": [0.19444, 0.44444, 0, 0, 0.74722],
|
||
"967": [0.19444, 0.44444, 0, 0, 0.71805],
|
||
"968": [0.19444, 0.69444, 0.03704, 0, 0.75833],
|
||
"969": [0, 0.44444, 0.03704, 0, 0.71782],
|
||
"977": [0, 0.69444, 0, 0, 0.69155],
|
||
"981": [0.19444, 0.69444, 0, 0, 0.7125],
|
||
"982": [0, 0.44444, 0.03194, 0, 0.975],
|
||
"1009": [0.19444, 0.44444, 0, 0, 0.6118],
|
||
"1013": [0, 0.44444, 0, 0, 0.48333]
|
||
},
|
||
"Math-Italic": {
|
||
"65": [0, 0.68333, 0, 0.13889, 0.75],
|
||
"66": [0, 0.68333, 0.05017, 0.08334, 0.75851],
|
||
"67": [0, 0.68333, 0.07153, 0.08334, 0.71472],
|
||
"68": [0, 0.68333, 0.02778, 0.05556, 0.82792],
|
||
"69": [0, 0.68333, 0.05764, 0.08334, 0.7382],
|
||
"70": [0, 0.68333, 0.13889, 0.08334, 0.64306],
|
||
"71": [0, 0.68333, 0, 0.08334, 0.78625],
|
||
"72": [0, 0.68333, 0.08125, 0.05556, 0.83125],
|
||
"73": [0, 0.68333, 0.07847, 0.11111, 0.43958],
|
||
"74": [0, 0.68333, 0.09618, 0.16667, 0.55451],
|
||
"75": [0, 0.68333, 0.07153, 0.05556, 0.84931],
|
||
"76": [0, 0.68333, 0, 0.02778, 0.68056],
|
||
"77": [0, 0.68333, 0.10903, 0.08334, 0.97014],
|
||
"78": [0, 0.68333, 0.10903, 0.08334, 0.80347],
|
||
"79": [0, 0.68333, 0.02778, 0.08334, 0.76278],
|
||
"80": [0, 0.68333, 0.13889, 0.08334, 0.64201],
|
||
"81": [0.19444, 0.68333, 0, 0.08334, 0.79056],
|
||
"82": [0, 0.68333, 0.00773, 0.08334, 0.75929],
|
||
"83": [0, 0.68333, 0.05764, 0.08334, 0.6132],
|
||
"84": [0, 0.68333, 0.13889, 0.08334, 0.58438],
|
||
"85": [0, 0.68333, 0.10903, 0.02778, 0.68278],
|
||
"86": [0, 0.68333, 0.22222, 0, 0.58333],
|
||
"87": [0, 0.68333, 0.13889, 0, 0.94445],
|
||
"88": [0, 0.68333, 0.07847, 0.08334, 0.82847],
|
||
"89": [0, 0.68333, 0.22222, 0, 0.58056],
|
||
"90": [0, 0.68333, 0.07153, 0.08334, 0.68264],
|
||
"97": [0, 0.43056, 0, 0, 0.52859],
|
||
"98": [0, 0.69444, 0, 0, 0.42917],
|
||
"99": [0, 0.43056, 0, 0.05556, 0.43276],
|
||
"100": [0, 0.69444, 0, 0.16667, 0.52049],
|
||
"101": [0, 0.43056, 0, 0.05556, 0.46563],
|
||
"102": [0.19444, 0.69444, 0.10764, 0.16667, 0.48959],
|
||
"103": [0.19444, 0.43056, 0.03588, 0.02778, 0.47697],
|
||
"104": [0, 0.69444, 0, 0, 0.57616],
|
||
"105": [0, 0.65952, 0, 0, 0.34451],
|
||
"106": [0.19444, 0.65952, 0.05724, 0, 0.41181],
|
||
"107": [0, 0.69444, 0.03148, 0, 0.5206],
|
||
"108": [0, 0.69444, 0.01968, 0.08334, 0.29838],
|
||
"109": [0, 0.43056, 0, 0, 0.87801],
|
||
"110": [0, 0.43056, 0, 0, 0.60023],
|
||
"111": [0, 0.43056, 0, 0.05556, 0.48472],
|
||
"112": [0.19444, 0.43056, 0, 0.08334, 0.50313],
|
||
"113": [0.19444, 0.43056, 0.03588, 0.08334, 0.44641],
|
||
"114": [0, 0.43056, 0.02778, 0.05556, 0.45116],
|
||
"115": [0, 0.43056, 0, 0.05556, 0.46875],
|
||
"116": [0, 0.61508, 0, 0.08334, 0.36111],
|
||
"117": [0, 0.43056, 0, 0.02778, 0.57246],
|
||
"118": [0, 0.43056, 0.03588, 0.02778, 0.48472],
|
||
"119": [0, 0.43056, 0.02691, 0.08334, 0.71592],
|
||
"120": [0, 0.43056, 0, 0.02778, 0.57153],
|
||
"121": [0.19444, 0.43056, 0.03588, 0.05556, 0.49028],
|
||
"122": [0, 0.43056, 0.04398, 0.05556, 0.46505],
|
||
"915": [0, 0.68333, 0.13889, 0.08334, 0.61528],
|
||
"916": [0, 0.68333, 0, 0.16667, 0.83334],
|
||
"920": [0, 0.68333, 0.02778, 0.08334, 0.76278],
|
||
"923": [0, 0.68333, 0, 0.16667, 0.69445],
|
||
"926": [0, 0.68333, 0.07569, 0.08334, 0.74236],
|
||
"928": [0, 0.68333, 0.08125, 0.05556, 0.83125],
|
||
"931": [0, 0.68333, 0.05764, 0.08334, 0.77986],
|
||
"933": [0, 0.68333, 0.13889, 0.05556, 0.58333],
|
||
"934": [0, 0.68333, 0, 0.08334, 0.66667],
|
||
"936": [0, 0.68333, 0.11, 0.05556, 0.61222],
|
||
"937": [0, 0.68333, 0.05017, 0.08334, 0.7724],
|
||
"945": [0, 0.43056, 0.0037, 0.02778, 0.6397],
|
||
"946": [0.19444, 0.69444, 0.05278, 0.08334, 0.56563],
|
||
"947": [0.19444, 0.43056, 0.05556, 0, 0.51773],
|
||
"948": [0, 0.69444, 0.03785, 0.05556, 0.44444],
|
||
"949": [0, 0.43056, 0, 0.08334, 0.46632],
|
||
"950": [0.19444, 0.69444, 0.07378, 0.08334, 0.4375],
|
||
"951": [0.19444, 0.43056, 0.03588, 0.05556, 0.49653],
|
||
"952": [0, 0.69444, 0.02778, 0.08334, 0.46944],
|
||
"953": [0, 0.43056, 0, 0.05556, 0.35394],
|
||
"954": [0, 0.43056, 0, 0, 0.57616],
|
||
"955": [0, 0.69444, 0, 0, 0.58334],
|
||
"956": [0.19444, 0.43056, 0, 0.02778, 0.60255],
|
||
"957": [0, 0.43056, 0.06366, 0.02778, 0.49398],
|
||
"958": [0.19444, 0.69444, 0.04601, 0.11111, 0.4375],
|
||
"959": [0, 0.43056, 0, 0.05556, 0.48472],
|
||
"960": [0, 0.43056, 0.03588, 0, 0.57003],
|
||
"961": [0.19444, 0.43056, 0, 0.08334, 0.51702],
|
||
"962": [0.09722, 0.43056, 0.07986, 0.08334, 0.36285],
|
||
"963": [0, 0.43056, 0.03588, 0, 0.57141],
|
||
"964": [0, 0.43056, 0.1132, 0.02778, 0.43715],
|
||
"965": [0, 0.43056, 0.03588, 0.02778, 0.54028],
|
||
"966": [0.19444, 0.43056, 0, 0.08334, 0.65417],
|
||
"967": [0.19444, 0.43056, 0, 0.05556, 0.62569],
|
||
"968": [0.19444, 0.69444, 0.03588, 0.11111, 0.65139],
|
||
"969": [0, 0.43056, 0.03588, 0, 0.62245],
|
||
"977": [0, 0.69444, 0, 0.08334, 0.59144],
|
||
"981": [0.19444, 0.69444, 0, 0.08334, 0.59583],
|
||
"982": [0, 0.43056, 0.02778, 0, 0.82813],
|
||
"1009": [0.19444, 0.43056, 0, 0.08334, 0.51702],
|
||
"1013": [0, 0.43056, 0, 0.05556, 0.4059]
|
||
},
|
||
"Math-Regular": {
|
||
"65": [0, 0.68333, 0, 0.13889, 0.75],
|
||
"66": [0, 0.68333, 0.05017, 0.08334, 0.75851],
|
||
"67": [0, 0.68333, 0.07153, 0.08334, 0.71472],
|
||
"68": [0, 0.68333, 0.02778, 0.05556, 0.82792],
|
||
"69": [0, 0.68333, 0.05764, 0.08334, 0.7382],
|
||
"70": [0, 0.68333, 0.13889, 0.08334, 0.64306],
|
||
"71": [0, 0.68333, 0, 0.08334, 0.78625],
|
||
"72": [0, 0.68333, 0.08125, 0.05556, 0.83125],
|
||
"73": [0, 0.68333, 0.07847, 0.11111, 0.43958],
|
||
"74": [0, 0.68333, 0.09618, 0.16667, 0.55451],
|
||
"75": [0, 0.68333, 0.07153, 0.05556, 0.84931],
|
||
"76": [0, 0.68333, 0, 0.02778, 0.68056],
|
||
"77": [0, 0.68333, 0.10903, 0.08334, 0.97014],
|
||
"78": [0, 0.68333, 0.10903, 0.08334, 0.80347],
|
||
"79": [0, 0.68333, 0.02778, 0.08334, 0.76278],
|
||
"80": [0, 0.68333, 0.13889, 0.08334, 0.64201],
|
||
"81": [0.19444, 0.68333, 0, 0.08334, 0.79056],
|
||
"82": [0, 0.68333, 0.00773, 0.08334, 0.75929],
|
||
"83": [0, 0.68333, 0.05764, 0.08334, 0.6132],
|
||
"84": [0, 0.68333, 0.13889, 0.08334, 0.58438],
|
||
"85": [0, 0.68333, 0.10903, 0.02778, 0.68278],
|
||
"86": [0, 0.68333, 0.22222, 0, 0.58333],
|
||
"87": [0, 0.68333, 0.13889, 0, 0.94445],
|
||
"88": [0, 0.68333, 0.07847, 0.08334, 0.82847],
|
||
"89": [0, 0.68333, 0.22222, 0, 0.58056],
|
||
"90": [0, 0.68333, 0.07153, 0.08334, 0.68264],
|
||
"97": [0, 0.43056, 0, 0, 0.52859],
|
||
"98": [0, 0.69444, 0, 0, 0.42917],
|
||
"99": [0, 0.43056, 0, 0.05556, 0.43276],
|
||
"100": [0, 0.69444, 0, 0.16667, 0.52049],
|
||
"101": [0, 0.43056, 0, 0.05556, 0.46563],
|
||
"102": [0.19444, 0.69444, 0.10764, 0.16667, 0.48959],
|
||
"103": [0.19444, 0.43056, 0.03588, 0.02778, 0.47697],
|
||
"104": [0, 0.69444, 0, 0, 0.57616],
|
||
"105": [0, 0.65952, 0, 0, 0.34451],
|
||
"106": [0.19444, 0.65952, 0.05724, 0, 0.41181],
|
||
"107": [0, 0.69444, 0.03148, 0, 0.5206],
|
||
"108": [0, 0.69444, 0.01968, 0.08334, 0.29838],
|
||
"109": [0, 0.43056, 0, 0, 0.87801],
|
||
"110": [0, 0.43056, 0, 0, 0.60023],
|
||
"111": [0, 0.43056, 0, 0.05556, 0.48472],
|
||
"112": [0.19444, 0.43056, 0, 0.08334, 0.50313],
|
||
"113": [0.19444, 0.43056, 0.03588, 0.08334, 0.44641],
|
||
"114": [0, 0.43056, 0.02778, 0.05556, 0.45116],
|
||
"115": [0, 0.43056, 0, 0.05556, 0.46875],
|
||
"116": [0, 0.61508, 0, 0.08334, 0.36111],
|
||
"117": [0, 0.43056, 0, 0.02778, 0.57246],
|
||
"118": [0, 0.43056, 0.03588, 0.02778, 0.48472],
|
||
"119": [0, 0.43056, 0.02691, 0.08334, 0.71592],
|
||
"120": [0, 0.43056, 0, 0.02778, 0.57153],
|
||
"121": [0.19444, 0.43056, 0.03588, 0.05556, 0.49028],
|
||
"122": [0, 0.43056, 0.04398, 0.05556, 0.46505],
|
||
"915": [0, 0.68333, 0.13889, 0.08334, 0.61528],
|
||
"916": [0, 0.68333, 0, 0.16667, 0.83334],
|
||
"920": [0, 0.68333, 0.02778, 0.08334, 0.76278],
|
||
"923": [0, 0.68333, 0, 0.16667, 0.69445],
|
||
"926": [0, 0.68333, 0.07569, 0.08334, 0.74236],
|
||
"928": [0, 0.68333, 0.08125, 0.05556, 0.83125],
|
||
"931": [0, 0.68333, 0.05764, 0.08334, 0.77986],
|
||
"933": [0, 0.68333, 0.13889, 0.05556, 0.58333],
|
||
"934": [0, 0.68333, 0, 0.08334, 0.66667],
|
||
"936": [0, 0.68333, 0.11, 0.05556, 0.61222],
|
||
"937": [0, 0.68333, 0.05017, 0.08334, 0.7724],
|
||
"945": [0, 0.43056, 0.0037, 0.02778, 0.6397],
|
||
"946": [0.19444, 0.69444, 0.05278, 0.08334, 0.56563],
|
||
"947": [0.19444, 0.43056, 0.05556, 0, 0.51773],
|
||
"948": [0, 0.69444, 0.03785, 0.05556, 0.44444],
|
||
"949": [0, 0.43056, 0, 0.08334, 0.46632],
|
||
"950": [0.19444, 0.69444, 0.07378, 0.08334, 0.4375],
|
||
"951": [0.19444, 0.43056, 0.03588, 0.05556, 0.49653],
|
||
"952": [0, 0.69444, 0.02778, 0.08334, 0.46944],
|
||
"953": [0, 0.43056, 0, 0.05556, 0.35394],
|
||
"954": [0, 0.43056, 0, 0, 0.57616],
|
||
"955": [0, 0.69444, 0, 0, 0.58334],
|
||
"956": [0.19444, 0.43056, 0, 0.02778, 0.60255],
|
||
"957": [0, 0.43056, 0.06366, 0.02778, 0.49398],
|
||
"958": [0.19444, 0.69444, 0.04601, 0.11111, 0.4375],
|
||
"959": [0, 0.43056, 0, 0.05556, 0.48472],
|
||
"960": [0, 0.43056, 0.03588, 0, 0.57003],
|
||
"961": [0.19444, 0.43056, 0, 0.08334, 0.51702],
|
||
"962": [0.09722, 0.43056, 0.07986, 0.08334, 0.36285],
|
||
"963": [0, 0.43056, 0.03588, 0, 0.57141],
|
||
"964": [0, 0.43056, 0.1132, 0.02778, 0.43715],
|
||
"965": [0, 0.43056, 0.03588, 0.02778, 0.54028],
|
||
"966": [0.19444, 0.43056, 0, 0.08334, 0.65417],
|
||
"967": [0.19444, 0.43056, 0, 0.05556, 0.62569],
|
||
"968": [0.19444, 0.69444, 0.03588, 0.11111, 0.65139],
|
||
"969": [0, 0.43056, 0.03588, 0, 0.62245],
|
||
"977": [0, 0.69444, 0, 0.08334, 0.59144],
|
||
"981": [0.19444, 0.69444, 0, 0.08334, 0.59583],
|
||
"982": [0, 0.43056, 0.02778, 0, 0.82813],
|
||
"1009": [0.19444, 0.43056, 0, 0.08334, 0.51702],
|
||
"1013": [0, 0.43056, 0, 0.05556, 0.4059]
|
||
},
|
||
"SansSerif-Bold": {
|
||
"33": [0, 0.69444, 0, 0, 0.36667],
|
||
"34": [0, 0.69444, 0, 0, 0.55834],
|
||
"35": [0.19444, 0.69444, 0, 0, 0.91667],
|
||
"36": [0.05556, 0.75, 0, 0, 0.55],
|
||
"37": [0.05556, 0.75, 0, 0, 1.02912],
|
||
"38": [0, 0.69444, 0, 0, 0.83056],
|
||
"39": [0, 0.69444, 0, 0, 0.30556],
|
||
"40": [0.25, 0.75, 0, 0, 0.42778],
|
||
"41": [0.25, 0.75, 0, 0, 0.42778],
|
||
"42": [0, 0.75, 0, 0, 0.55],
|
||
"43": [0.11667, 0.61667, 0, 0, 0.85556],
|
||
"44": [0.10556, 0.13056, 0, 0, 0.30556],
|
||
"45": [0, 0.45833, 0, 0, 0.36667],
|
||
"46": [0, 0.13056, 0, 0, 0.30556],
|
||
"47": [0.25, 0.75, 0, 0, 0.55],
|
||
"48": [0, 0.69444, 0, 0, 0.55],
|
||
"49": [0, 0.69444, 0, 0, 0.55],
|
||
"50": [0, 0.69444, 0, 0, 0.55],
|
||
"51": [0, 0.69444, 0, 0, 0.55],
|
||
"52": [0, 0.69444, 0, 0, 0.55],
|
||
"53": [0, 0.69444, 0, 0, 0.55],
|
||
"54": [0, 0.69444, 0, 0, 0.55],
|
||
"55": [0, 0.69444, 0, 0, 0.55],
|
||
"56": [0, 0.69444, 0, 0, 0.55],
|
||
"57": [0, 0.69444, 0, 0, 0.55],
|
||
"58": [0, 0.45833, 0, 0, 0.30556],
|
||
"59": [0.10556, 0.45833, 0, 0, 0.30556],
|
||
"61": [-0.09375, 0.40625, 0, 0, 0.85556],
|
||
"63": [0, 0.69444, 0, 0, 0.51945],
|
||
"64": [0, 0.69444, 0, 0, 0.73334],
|
||
"65": [0, 0.69444, 0, 0, 0.73334],
|
||
"66": [0, 0.69444, 0, 0, 0.73334],
|
||
"67": [0, 0.69444, 0, 0, 0.70278],
|
||
"68": [0, 0.69444, 0, 0, 0.79445],
|
||
"69": [0, 0.69444, 0, 0, 0.64167],
|
||
"70": [0, 0.69444, 0, 0, 0.61111],
|
||
"71": [0, 0.69444, 0, 0, 0.73334],
|
||
"72": [0, 0.69444, 0, 0, 0.79445],
|
||
"73": [0, 0.69444, 0, 0, 0.33056],
|
||
"74": [0, 0.69444, 0, 0, 0.51945],
|
||
"75": [0, 0.69444, 0, 0, 0.76389],
|
||
"76": [0, 0.69444, 0, 0, 0.58056],
|
||
"77": [0, 0.69444, 0, 0, 0.97778],
|
||
"78": [0, 0.69444, 0, 0, 0.79445],
|
||
"79": [0, 0.69444, 0, 0, 0.79445],
|
||
"80": [0, 0.69444, 0, 0, 0.70278],
|
||
"81": [0.10556, 0.69444, 0, 0, 0.79445],
|
||
"82": [0, 0.69444, 0, 0, 0.70278],
|
||
"83": [0, 0.69444, 0, 0, 0.61111],
|
||
"84": [0, 0.69444, 0, 0, 0.73334],
|
||
"85": [0, 0.69444, 0, 0, 0.76389],
|
||
"86": [0, 0.69444, 0.01528, 0, 0.73334],
|
||
"87": [0, 0.69444, 0.01528, 0, 1.03889],
|
||
"88": [0, 0.69444, 0, 0, 0.73334],
|
||
"89": [0, 0.69444, 0.0275, 0, 0.73334],
|
||
"90": [0, 0.69444, 0, 0, 0.67223],
|
||
"91": [0.25, 0.75, 0, 0, 0.34306],
|
||
"93": [0.25, 0.75, 0, 0, 0.34306],
|
||
"94": [0, 0.69444, 0, 0, 0.55],
|
||
"95": [0.35, 0.10833, 0.03056, 0, 0.55],
|
||
"97": [0, 0.45833, 0, 0, 0.525],
|
||
"98": [0, 0.69444, 0, 0, 0.56111],
|
||
"99": [0, 0.45833, 0, 0, 0.48889],
|
||
"100": [0, 0.69444, 0, 0, 0.56111],
|
||
"101": [0, 0.45833, 0, 0, 0.51111],
|
||
"102": [0, 0.69444, 0.07639, 0, 0.33611],
|
||
"103": [0.19444, 0.45833, 0.01528, 0, 0.55],
|
||
"104": [0, 0.69444, 0, 0, 0.56111],
|
||
"105": [0, 0.69444, 0, 0, 0.25556],
|
||
"106": [0.19444, 0.69444, 0, 0, 0.28611],
|
||
"107": [0, 0.69444, 0, 0, 0.53056],
|
||
"108": [0, 0.69444, 0, 0, 0.25556],
|
||
"109": [0, 0.45833, 0, 0, 0.86667],
|
||
"110": [0, 0.45833, 0, 0, 0.56111],
|
||
"111": [0, 0.45833, 0, 0, 0.55],
|
||
"112": [0.19444, 0.45833, 0, 0, 0.56111],
|
||
"113": [0.19444, 0.45833, 0, 0, 0.56111],
|
||
"114": [0, 0.45833, 0.01528, 0, 0.37222],
|
||
"115": [0, 0.45833, 0, 0, 0.42167],
|
||
"116": [0, 0.58929, 0, 0, 0.40417],
|
||
"117": [0, 0.45833, 0, 0, 0.56111],
|
||
"118": [0, 0.45833, 0.01528, 0, 0.5],
|
||
"119": [0, 0.45833, 0.01528, 0, 0.74445],
|
||
"120": [0, 0.45833, 0, 0, 0.5],
|
||
"121": [0.19444, 0.45833, 0.01528, 0, 0.5],
|
||
"122": [0, 0.45833, 0, 0, 0.47639],
|
||
"126": [0.35, 0.34444, 0, 0, 0.55],
|
||
"168": [0, 0.69444, 0, 0, 0.55],
|
||
"176": [0, 0.69444, 0, 0, 0.73334],
|
||
"180": [0, 0.69444, 0, 0, 0.55],
|
||
"184": [0.17014, 0, 0, 0, 0.48889],
|
||
"305": [0, 0.45833, 0, 0, 0.25556],
|
||
"567": [0.19444, 0.45833, 0, 0, 0.28611],
|
||
"710": [0, 0.69444, 0, 0, 0.55],
|
||
"711": [0, 0.63542, 0, 0, 0.55],
|
||
"713": [0, 0.63778, 0, 0, 0.55],
|
||
"728": [0, 0.69444, 0, 0, 0.55],
|
||
"729": [0, 0.69444, 0, 0, 0.30556],
|
||
"730": [0, 0.69444, 0, 0, 0.73334],
|
||
"732": [0, 0.69444, 0, 0, 0.55],
|
||
"733": [0, 0.69444, 0, 0, 0.55],
|
||
"915": [0, 0.69444, 0, 0, 0.58056],
|
||
"916": [0, 0.69444, 0, 0, 0.91667],
|
||
"920": [0, 0.69444, 0, 0, 0.85556],
|
||
"923": [0, 0.69444, 0, 0, 0.67223],
|
||
"926": [0, 0.69444, 0, 0, 0.73334],
|
||
"928": [0, 0.69444, 0, 0, 0.79445],
|
||
"931": [0, 0.69444, 0, 0, 0.79445],
|
||
"933": [0, 0.69444, 0, 0, 0.85556],
|
||
"934": [0, 0.69444, 0, 0, 0.79445],
|
||
"936": [0, 0.69444, 0, 0, 0.85556],
|
||
"937": [0, 0.69444, 0, 0, 0.79445],
|
||
"8211": [0, 0.45833, 0.03056, 0, 0.55],
|
||
"8212": [0, 0.45833, 0.03056, 0, 1.10001],
|
||
"8216": [0, 0.69444, 0, 0, 0.30556],
|
||
"8217": [0, 0.69444, 0, 0, 0.30556],
|
||
"8220": [0, 0.69444, 0, 0, 0.55834],
|
||
"8221": [0, 0.69444, 0, 0, 0.55834]
|
||
},
|
||
"SansSerif-Italic": {
|
||
"33": [0, 0.69444, 0.05733, 0, 0.31945],
|
||
"34": [0, 0.69444, 0.00316, 0, 0.5],
|
||
"35": [0.19444, 0.69444, 0.05087, 0, 0.83334],
|
||
"36": [0.05556, 0.75, 0.11156, 0, 0.5],
|
||
"37": [0.05556, 0.75, 0.03126, 0, 0.83334],
|
||
"38": [0, 0.69444, 0.03058, 0, 0.75834],
|
||
"39": [0, 0.69444, 0.07816, 0, 0.27778],
|
||
"40": [0.25, 0.75, 0.13164, 0, 0.38889],
|
||
"41": [0.25, 0.75, 0.02536, 0, 0.38889],
|
||
"42": [0, 0.75, 0.11775, 0, 0.5],
|
||
"43": [0.08333, 0.58333, 0.02536, 0, 0.77778],
|
||
"44": [0.125, 0.08333, 0, 0, 0.27778],
|
||
"45": [0, 0.44444, 0.01946, 0, 0.33333],
|
||
"46": [0, 0.08333, 0, 0, 0.27778],
|
||
"47": [0.25, 0.75, 0.13164, 0, 0.5],
|
||
"48": [0, 0.65556, 0.11156, 0, 0.5],
|
||
"49": [0, 0.65556, 0.11156, 0, 0.5],
|
||
"50": [0, 0.65556, 0.11156, 0, 0.5],
|
||
"51": [0, 0.65556, 0.11156, 0, 0.5],
|
||
"52": [0, 0.65556, 0.11156, 0, 0.5],
|
||
"53": [0, 0.65556, 0.11156, 0, 0.5],
|
||
"54": [0, 0.65556, 0.11156, 0, 0.5],
|
||
"55": [0, 0.65556, 0.11156, 0, 0.5],
|
||
"56": [0, 0.65556, 0.11156, 0, 0.5],
|
||
"57": [0, 0.65556, 0.11156, 0, 0.5],
|
||
"58": [0, 0.44444, 0.02502, 0, 0.27778],
|
||
"59": [0.125, 0.44444, 0.02502, 0, 0.27778],
|
||
"61": [-0.13, 0.37, 0.05087, 0, 0.77778],
|
||
"63": [0, 0.69444, 0.11809, 0, 0.47222],
|
||
"64": [0, 0.69444, 0.07555, 0, 0.66667],
|
||
"65": [0, 0.69444, 0, 0, 0.66667],
|
||
"66": [0, 0.69444, 0.08293, 0, 0.66667],
|
||
"67": [0, 0.69444, 0.11983, 0, 0.63889],
|
||
"68": [0, 0.69444, 0.07555, 0, 0.72223],
|
||
"69": [0, 0.69444, 0.11983, 0, 0.59722],
|
||
"70": [0, 0.69444, 0.13372, 0, 0.56945],
|
||
"71": [0, 0.69444, 0.11983, 0, 0.66667],
|
||
"72": [0, 0.69444, 0.08094, 0, 0.70834],
|
||
"73": [0, 0.69444, 0.13372, 0, 0.27778],
|
||
"74": [0, 0.69444, 0.08094, 0, 0.47222],
|
||
"75": [0, 0.69444, 0.11983, 0, 0.69445],
|
||
"76": [0, 0.69444, 0, 0, 0.54167],
|
||
"77": [0, 0.69444, 0.08094, 0, 0.875],
|
||
"78": [0, 0.69444, 0.08094, 0, 0.70834],
|
||
"79": [0, 0.69444, 0.07555, 0, 0.73611],
|
||
"80": [0, 0.69444, 0.08293, 0, 0.63889],
|
||
"81": [0.125, 0.69444, 0.07555, 0, 0.73611],
|
||
"82": [0, 0.69444, 0.08293, 0, 0.64584],
|
||
"83": [0, 0.69444, 0.09205, 0, 0.55556],
|
||
"84": [0, 0.69444, 0.13372, 0, 0.68056],
|
||
"85": [0, 0.69444, 0.08094, 0, 0.6875],
|
||
"86": [0, 0.69444, 0.1615, 0, 0.66667],
|
||
"87": [0, 0.69444, 0.1615, 0, 0.94445],
|
||
"88": [0, 0.69444, 0.13372, 0, 0.66667],
|
||
"89": [0, 0.69444, 0.17261, 0, 0.66667],
|
||
"90": [0, 0.69444, 0.11983, 0, 0.61111],
|
||
"91": [0.25, 0.75, 0.15942, 0, 0.28889],
|
||
"93": [0.25, 0.75, 0.08719, 0, 0.28889],
|
||
"94": [0, 0.69444, 0.0799, 0, 0.5],
|
||
"95": [0.35, 0.09444, 0.08616, 0, 0.5],
|
||
"97": [0, 0.44444, 0.00981, 0, 0.48056],
|
||
"98": [0, 0.69444, 0.03057, 0, 0.51667],
|
||
"99": [0, 0.44444, 0.08336, 0, 0.44445],
|
||
"100": [0, 0.69444, 0.09483, 0, 0.51667],
|
||
"101": [0, 0.44444, 0.06778, 0, 0.44445],
|
||
"102": [0, 0.69444, 0.21705, 0, 0.30556],
|
||
"103": [0.19444, 0.44444, 0.10836, 0, 0.5],
|
||
"104": [0, 0.69444, 0.01778, 0, 0.51667],
|
||
"105": [0, 0.67937, 0.09718, 0, 0.23889],
|
||
"106": [0.19444, 0.67937, 0.09162, 0, 0.26667],
|
||
"107": [0, 0.69444, 0.08336, 0, 0.48889],
|
||
"108": [0, 0.69444, 0.09483, 0, 0.23889],
|
||
"109": [0, 0.44444, 0.01778, 0, 0.79445],
|
||
"110": [0, 0.44444, 0.01778, 0, 0.51667],
|
||
"111": [0, 0.44444, 0.06613, 0, 0.5],
|
||
"112": [0.19444, 0.44444, 0.0389, 0, 0.51667],
|
||
"113": [0.19444, 0.44444, 0.04169, 0, 0.51667],
|
||
"114": [0, 0.44444, 0.10836, 0, 0.34167],
|
||
"115": [0, 0.44444, 0.0778, 0, 0.38333],
|
||
"116": [0, 0.57143, 0.07225, 0, 0.36111],
|
||
"117": [0, 0.44444, 0.04169, 0, 0.51667],
|
||
"118": [0, 0.44444, 0.10836, 0, 0.46111],
|
||
"119": [0, 0.44444, 0.10836, 0, 0.68334],
|
||
"120": [0, 0.44444, 0.09169, 0, 0.46111],
|
||
"121": [0.19444, 0.44444, 0.10836, 0, 0.46111],
|
||
"122": [0, 0.44444, 0.08752, 0, 0.43472],
|
||
"126": [0.35, 0.32659, 0.08826, 0, 0.5],
|
||
"168": [0, 0.67937, 0.06385, 0, 0.5],
|
||
"176": [0, 0.69444, 0, 0, 0.73752],
|
||
"184": [0.17014, 0, 0, 0, 0.44445],
|
||
"305": [0, 0.44444, 0.04169, 0, 0.23889],
|
||
"567": [0.19444, 0.44444, 0.04169, 0, 0.26667],
|
||
"710": [0, 0.69444, 0.0799, 0, 0.5],
|
||
"711": [0, 0.63194, 0.08432, 0, 0.5],
|
||
"713": [0, 0.60889, 0.08776, 0, 0.5],
|
||
"714": [0, 0.69444, 0.09205, 0, 0.5],
|
||
"715": [0, 0.69444, 0, 0, 0.5],
|
||
"728": [0, 0.69444, 0.09483, 0, 0.5],
|
||
"729": [0, 0.67937, 0.07774, 0, 0.27778],
|
||
"730": [0, 0.69444, 0, 0, 0.73752],
|
||
"732": [0, 0.67659, 0.08826, 0, 0.5],
|
||
"733": [0, 0.69444, 0.09205, 0, 0.5],
|
||
"915": [0, 0.69444, 0.13372, 0, 0.54167],
|
||
"916": [0, 0.69444, 0, 0, 0.83334],
|
||
"920": [0, 0.69444, 0.07555, 0, 0.77778],
|
||
"923": [0, 0.69444, 0, 0, 0.61111],
|
||
"926": [0, 0.69444, 0.12816, 0, 0.66667],
|
||
"928": [0, 0.69444, 0.08094, 0, 0.70834],
|
||
"931": [0, 0.69444, 0.11983, 0, 0.72222],
|
||
"933": [0, 0.69444, 0.09031, 0, 0.77778],
|
||
"934": [0, 0.69444, 0.04603, 0, 0.72222],
|
||
"936": [0, 0.69444, 0.09031, 0, 0.77778],
|
||
"937": [0, 0.69444, 0.08293, 0, 0.72222],
|
||
"8211": [0, 0.44444, 0.08616, 0, 0.5],
|
||
"8212": [0, 0.44444, 0.08616, 0, 1.0],
|
||
"8216": [0, 0.69444, 0.07816, 0, 0.27778],
|
||
"8217": [0, 0.69444, 0.07816, 0, 0.27778],
|
||
"8220": [0, 0.69444, 0.14205, 0, 0.5],
|
||
"8221": [0, 0.69444, 0.00316, 0, 0.5]
|
||
},
|
||
"SansSerif-Regular": {
|
||
"33": [0, 0.69444, 0, 0, 0.31945],
|
||
"34": [0, 0.69444, 0, 0, 0.5],
|
||
"35": [0.19444, 0.69444, 0, 0, 0.83334],
|
||
"36": [0.05556, 0.75, 0, 0, 0.5],
|
||
"37": [0.05556, 0.75, 0, 0, 0.83334],
|
||
"38": [0, 0.69444, 0, 0, 0.75834],
|
||
"39": [0, 0.69444, 0, 0, 0.27778],
|
||
"40": [0.25, 0.75, 0, 0, 0.38889],
|
||
"41": [0.25, 0.75, 0, 0, 0.38889],
|
||
"42": [0, 0.75, 0, 0, 0.5],
|
||
"43": [0.08333, 0.58333, 0, 0, 0.77778],
|
||
"44": [0.125, 0.08333, 0, 0, 0.27778],
|
||
"45": [0, 0.44444, 0, 0, 0.33333],
|
||
"46": [0, 0.08333, 0, 0, 0.27778],
|
||
"47": [0.25, 0.75, 0, 0, 0.5],
|
||
"48": [0, 0.65556, 0, 0, 0.5],
|
||
"49": [0, 0.65556, 0, 0, 0.5],
|
||
"50": [0, 0.65556, 0, 0, 0.5],
|
||
"51": [0, 0.65556, 0, 0, 0.5],
|
||
"52": [0, 0.65556, 0, 0, 0.5],
|
||
"53": [0, 0.65556, 0, 0, 0.5],
|
||
"54": [0, 0.65556, 0, 0, 0.5],
|
||
"55": [0, 0.65556, 0, 0, 0.5],
|
||
"56": [0, 0.65556, 0, 0, 0.5],
|
||
"57": [0, 0.65556, 0, 0, 0.5],
|
||
"58": [0, 0.44444, 0, 0, 0.27778],
|
||
"59": [0.125, 0.44444, 0, 0, 0.27778],
|
||
"61": [-0.13, 0.37, 0, 0, 0.77778],
|
||
"63": [0, 0.69444, 0, 0, 0.47222],
|
||
"64": [0, 0.69444, 0, 0, 0.66667],
|
||
"65": [0, 0.69444, 0, 0, 0.66667],
|
||
"66": [0, 0.69444, 0, 0, 0.66667],
|
||
"67": [0, 0.69444, 0, 0, 0.63889],
|
||
"68": [0, 0.69444, 0, 0, 0.72223],
|
||
"69": [0, 0.69444, 0, 0, 0.59722],
|
||
"70": [0, 0.69444, 0, 0, 0.56945],
|
||
"71": [0, 0.69444, 0, 0, 0.66667],
|
||
"72": [0, 0.69444, 0, 0, 0.70834],
|
||
"73": [0, 0.69444, 0, 0, 0.27778],
|
||
"74": [0, 0.69444, 0, 0, 0.47222],
|
||
"75": [0, 0.69444, 0, 0, 0.69445],
|
||
"76": [0, 0.69444, 0, 0, 0.54167],
|
||
"77": [0, 0.69444, 0, 0, 0.875],
|
||
"78": [0, 0.69444, 0, 0, 0.70834],
|
||
"79": [0, 0.69444, 0, 0, 0.73611],
|
||
"80": [0, 0.69444, 0, 0, 0.63889],
|
||
"81": [0.125, 0.69444, 0, 0, 0.73611],
|
||
"82": [0, 0.69444, 0, 0, 0.64584],
|
||
"83": [0, 0.69444, 0, 0, 0.55556],
|
||
"84": [0, 0.69444, 0, 0, 0.68056],
|
||
"85": [0, 0.69444, 0, 0, 0.6875],
|
||
"86": [0, 0.69444, 0.01389, 0, 0.66667],
|
||
"87": [0, 0.69444, 0.01389, 0, 0.94445],
|
||
"88": [0, 0.69444, 0, 0, 0.66667],
|
||
"89": [0, 0.69444, 0.025, 0, 0.66667],
|
||
"90": [0, 0.69444, 0, 0, 0.61111],
|
||
"91": [0.25, 0.75, 0, 0, 0.28889],
|
||
"93": [0.25, 0.75, 0, 0, 0.28889],
|
||
"94": [0, 0.69444, 0, 0, 0.5],
|
||
"95": [0.35, 0.09444, 0.02778, 0, 0.5],
|
||
"97": [0, 0.44444, 0, 0, 0.48056],
|
||
"98": [0, 0.69444, 0, 0, 0.51667],
|
||
"99": [0, 0.44444, 0, 0, 0.44445],
|
||
"100": [0, 0.69444, 0, 0, 0.51667],
|
||
"101": [0, 0.44444, 0, 0, 0.44445],
|
||
"102": [0, 0.69444, 0.06944, 0, 0.30556],
|
||
"103": [0.19444, 0.44444, 0.01389, 0, 0.5],
|
||
"104": [0, 0.69444, 0, 0, 0.51667],
|
||
"105": [0, 0.67937, 0, 0, 0.23889],
|
||
"106": [0.19444, 0.67937, 0, 0, 0.26667],
|
||
"107": [0, 0.69444, 0, 0, 0.48889],
|
||
"108": [0, 0.69444, 0, 0, 0.23889],
|
||
"109": [0, 0.44444, 0, 0, 0.79445],
|
||
"110": [0, 0.44444, 0, 0, 0.51667],
|
||
"111": [0, 0.44444, 0, 0, 0.5],
|
||
"112": [0.19444, 0.44444, 0, 0, 0.51667],
|
||
"113": [0.19444, 0.44444, 0, 0, 0.51667],
|
||
"114": [0, 0.44444, 0.01389, 0, 0.34167],
|
||
"115": [0, 0.44444, 0, 0, 0.38333],
|
||
"116": [0, 0.57143, 0, 0, 0.36111],
|
||
"117": [0, 0.44444, 0, 0, 0.51667],
|
||
"118": [0, 0.44444, 0.01389, 0, 0.46111],
|
||
"119": [0, 0.44444, 0.01389, 0, 0.68334],
|
||
"120": [0, 0.44444, 0, 0, 0.46111],
|
||
"121": [0.19444, 0.44444, 0.01389, 0, 0.46111],
|
||
"122": [0, 0.44444, 0, 0, 0.43472],
|
||
"126": [0.35, 0.32659, 0, 0, 0.5],
|
||
"168": [0, 0.67937, 0, 0, 0.5],
|
||
"176": [0, 0.69444, 0, 0, 0.66667],
|
||
"184": [0.17014, 0, 0, 0, 0.44445],
|
||
"305": [0, 0.44444, 0, 0, 0.23889],
|
||
"567": [0.19444, 0.44444, 0, 0, 0.26667],
|
||
"710": [0, 0.69444, 0, 0, 0.5],
|
||
"711": [0, 0.63194, 0, 0, 0.5],
|
||
"713": [0, 0.60889, 0, 0, 0.5],
|
||
"714": [0, 0.69444, 0, 0, 0.5],
|
||
"715": [0, 0.69444, 0, 0, 0.5],
|
||
"728": [0, 0.69444, 0, 0, 0.5],
|
||
"729": [0, 0.67937, 0, 0, 0.27778],
|
||
"730": [0, 0.69444, 0, 0, 0.66667],
|
||
"732": [0, 0.67659, 0, 0, 0.5],
|
||
"733": [0, 0.69444, 0, 0, 0.5],
|
||
"915": [0, 0.69444, 0, 0, 0.54167],
|
||
"916": [0, 0.69444, 0, 0, 0.83334],
|
||
"920": [0, 0.69444, 0, 0, 0.77778],
|
||
"923": [0, 0.69444, 0, 0, 0.61111],
|
||
"926": [0, 0.69444, 0, 0, 0.66667],
|
||
"928": [0, 0.69444, 0, 0, 0.70834],
|
||
"931": [0, 0.69444, 0, 0, 0.72222],
|
||
"933": [0, 0.69444, 0, 0, 0.77778],
|
||
"934": [0, 0.69444, 0, 0, 0.72222],
|
||
"936": [0, 0.69444, 0, 0, 0.77778],
|
||
"937": [0, 0.69444, 0, 0, 0.72222],
|
||
"8211": [0, 0.44444, 0.02778, 0, 0.5],
|
||
"8212": [0, 0.44444, 0.02778, 0, 1.0],
|
||
"8216": [0, 0.69444, 0, 0, 0.27778],
|
||
"8217": [0, 0.69444, 0, 0, 0.27778],
|
||
"8220": [0, 0.69444, 0, 0, 0.5],
|
||
"8221": [0, 0.69444, 0, 0, 0.5]
|
||
},
|
||
"Script-Regular": {
|
||
"65": [0, 0.7, 0.22925, 0, 0.80253],
|
||
"66": [0, 0.7, 0.04087, 0, 0.90757],
|
||
"67": [0, 0.7, 0.1689, 0, 0.66619],
|
||
"68": [0, 0.7, 0.09371, 0, 0.77443],
|
||
"69": [0, 0.7, 0.18583, 0, 0.56162],
|
||
"70": [0, 0.7, 0.13634, 0, 0.89544],
|
||
"71": [0, 0.7, 0.17322, 0, 0.60961],
|
||
"72": [0, 0.7, 0.29694, 0, 0.96919],
|
||
"73": [0, 0.7, 0.19189, 0, 0.80907],
|
||
"74": [0.27778, 0.7, 0.19189, 0, 1.05159],
|
||
"75": [0, 0.7, 0.31259, 0, 0.91364],
|
||
"76": [0, 0.7, 0.19189, 0, 0.87373],
|
||
"77": [0, 0.7, 0.15981, 0, 1.08031],
|
||
"78": [0, 0.7, 0.3525, 0, 0.9015],
|
||
"79": [0, 0.7, 0.08078, 0, 0.73787],
|
||
"80": [0, 0.7, 0.08078, 0, 1.01262],
|
||
"81": [0, 0.7, 0.03305, 0, 0.88282],
|
||
"82": [0, 0.7, 0.06259, 0, 0.85],
|
||
"83": [0, 0.7, 0.19189, 0, 0.86767],
|
||
"84": [0, 0.7, 0.29087, 0, 0.74697],
|
||
"85": [0, 0.7, 0.25815, 0, 0.79996],
|
||
"86": [0, 0.7, 0.27523, 0, 0.62204],
|
||
"87": [0, 0.7, 0.27523, 0, 0.80532],
|
||
"88": [0, 0.7, 0.26006, 0, 0.94445],
|
||
"89": [0, 0.7, 0.2939, 0, 0.70961],
|
||
"90": [0, 0.7, 0.24037, 0, 0.8212]
|
||
},
|
||
"Size1-Regular": {
|
||
"40": [0.35001, 0.85, 0, 0, 0.45834],
|
||
"41": [0.35001, 0.85, 0, 0, 0.45834],
|
||
"47": [0.35001, 0.85, 0, 0, 0.57778],
|
||
"91": [0.35001, 0.85, 0, 0, 0.41667],
|
||
"92": [0.35001, 0.85, 0, 0, 0.57778],
|
||
"93": [0.35001, 0.85, 0, 0, 0.41667],
|
||
"123": [0.35001, 0.85, 0, 0, 0.58334],
|
||
"125": [0.35001, 0.85, 0, 0, 0.58334],
|
||
"710": [0, 0.72222, 0, 0, 0.55556],
|
||
"732": [0, 0.72222, 0, 0, 0.55556],
|
||
"770": [0, 0.72222, 0, 0, 0.55556],
|
||
"771": [0, 0.72222, 0, 0, 0.55556],
|
||
"8214": [-0.00099, 0.601, 0, 0, 0.77778],
|
||
"8593": [1e-05, 0.6, 0, 0, 0.66667],
|
||
"8595": [1e-05, 0.6, 0, 0, 0.66667],
|
||
"8657": [1e-05, 0.6, 0, 0, 0.77778],
|
||
"8659": [1e-05, 0.6, 0, 0, 0.77778],
|
||
"8719": [0.25001, 0.75, 0, 0, 0.94445],
|
||
"8720": [0.25001, 0.75, 0, 0, 0.94445],
|
||
"8721": [0.25001, 0.75, 0, 0, 1.05556],
|
||
"8730": [0.35001, 0.85, 0, 0, 1.0],
|
||
"8739": [-0.00599, 0.606, 0, 0, 0.33333],
|
||
"8741": [-0.00599, 0.606, 0, 0, 0.55556],
|
||
"8747": [0.30612, 0.805, 0.19445, 0, 0.47222],
|
||
"8748": [0.306, 0.805, 0.19445, 0, 0.47222],
|
||
"8749": [0.306, 0.805, 0.19445, 0, 0.47222],
|
||
"8750": [0.30612, 0.805, 0.19445, 0, 0.47222],
|
||
"8896": [0.25001, 0.75, 0, 0, 0.83334],
|
||
"8897": [0.25001, 0.75, 0, 0, 0.83334],
|
||
"8898": [0.25001, 0.75, 0, 0, 0.83334],
|
||
"8899": [0.25001, 0.75, 0, 0, 0.83334],
|
||
"8968": [0.35001, 0.85, 0, 0, 0.47222],
|
||
"8969": [0.35001, 0.85, 0, 0, 0.47222],
|
||
"8970": [0.35001, 0.85, 0, 0, 0.47222],
|
||
"8971": [0.35001, 0.85, 0, 0, 0.47222],
|
||
"9168": [-0.00099, 0.601, 0, 0, 0.66667],
|
||
"10216": [0.35001, 0.85, 0, 0, 0.47222],
|
||
"10217": [0.35001, 0.85, 0, 0, 0.47222],
|
||
"10752": [0.25001, 0.75, 0, 0, 1.11111],
|
||
"10753": [0.25001, 0.75, 0, 0, 1.11111],
|
||
"10754": [0.25001, 0.75, 0, 0, 1.11111],
|
||
"10756": [0.25001, 0.75, 0, 0, 0.83334],
|
||
"10758": [0.25001, 0.75, 0, 0, 0.83334]
|
||
},
|
||
"Size2-Regular": {
|
||
"40": [0.65002, 1.15, 0, 0, 0.59722],
|
||
"41": [0.65002, 1.15, 0, 0, 0.59722],
|
||
"47": [0.65002, 1.15, 0, 0, 0.81111],
|
||
"91": [0.65002, 1.15, 0, 0, 0.47222],
|
||
"92": [0.65002, 1.15, 0, 0, 0.81111],
|
||
"93": [0.65002, 1.15, 0, 0, 0.47222],
|
||
"123": [0.65002, 1.15, 0, 0, 0.66667],
|
||
"125": [0.65002, 1.15, 0, 0, 0.66667],
|
||
"710": [0, 0.75, 0, 0, 1.0],
|
||
"732": [0, 0.75, 0, 0, 1.0],
|
||
"770": [0, 0.75, 0, 0, 1.0],
|
||
"771": [0, 0.75, 0, 0, 1.0],
|
||
"8719": [0.55001, 1.05, 0, 0, 1.27778],
|
||
"8720": [0.55001, 1.05, 0, 0, 1.27778],
|
||
"8721": [0.55001, 1.05, 0, 0, 1.44445],
|
||
"8730": [0.65002, 1.15, 0, 0, 1.0],
|
||
"8747": [0.86225, 1.36, 0.44445, 0, 0.55556],
|
||
"8748": [0.862, 1.36, 0.44445, 0, 0.55556],
|
||
"8749": [0.862, 1.36, 0.44445, 0, 0.55556],
|
||
"8750": [0.86225, 1.36, 0.44445, 0, 0.55556],
|
||
"8896": [0.55001, 1.05, 0, 0, 1.11111],
|
||
"8897": [0.55001, 1.05, 0, 0, 1.11111],
|
||
"8898": [0.55001, 1.05, 0, 0, 1.11111],
|
||
"8899": [0.55001, 1.05, 0, 0, 1.11111],
|
||
"8968": [0.65002, 1.15, 0, 0, 0.52778],
|
||
"8969": [0.65002, 1.15, 0, 0, 0.52778],
|
||
"8970": [0.65002, 1.15, 0, 0, 0.52778],
|
||
"8971": [0.65002, 1.15, 0, 0, 0.52778],
|
||
"10216": [0.65002, 1.15, 0, 0, 0.61111],
|
||
"10217": [0.65002, 1.15, 0, 0, 0.61111],
|
||
"10752": [0.55001, 1.05, 0, 0, 1.51112],
|
||
"10753": [0.55001, 1.05, 0, 0, 1.51112],
|
||
"10754": [0.55001, 1.05, 0, 0, 1.51112],
|
||
"10756": [0.55001, 1.05, 0, 0, 1.11111],
|
||
"10758": [0.55001, 1.05, 0, 0, 1.11111]
|
||
},
|
||
"Size3-Regular": {
|
||
"40": [0.95003, 1.45, 0, 0, 0.73611],
|
||
"41": [0.95003, 1.45, 0, 0, 0.73611],
|
||
"47": [0.95003, 1.45, 0, 0, 1.04445],
|
||
"91": [0.95003, 1.45, 0, 0, 0.52778],
|
||
"92": [0.95003, 1.45, 0, 0, 1.04445],
|
||
"93": [0.95003, 1.45, 0, 0, 0.52778],
|
||
"123": [0.95003, 1.45, 0, 0, 0.75],
|
||
"125": [0.95003, 1.45, 0, 0, 0.75],
|
||
"710": [0, 0.75, 0, 0, 1.44445],
|
||
"732": [0, 0.75, 0, 0, 1.44445],
|
||
"770": [0, 0.75, 0, 0, 1.44445],
|
||
"771": [0, 0.75, 0, 0, 1.44445],
|
||
"8730": [0.95003, 1.45, 0, 0, 1.0],
|
||
"8968": [0.95003, 1.45, 0, 0, 0.58334],
|
||
"8969": [0.95003, 1.45, 0, 0, 0.58334],
|
||
"8970": [0.95003, 1.45, 0, 0, 0.58334],
|
||
"8971": [0.95003, 1.45, 0, 0, 0.58334],
|
||
"10216": [0.95003, 1.45, 0, 0, 0.75],
|
||
"10217": [0.95003, 1.45, 0, 0, 0.75]
|
||
},
|
||
"Size4-Regular": {
|
||
"40": [1.25003, 1.75, 0, 0, 0.79167],
|
||
"41": [1.25003, 1.75, 0, 0, 0.79167],
|
||
"47": [1.25003, 1.75, 0, 0, 1.27778],
|
||
"91": [1.25003, 1.75, 0, 0, 0.58334],
|
||
"92": [1.25003, 1.75, 0, 0, 1.27778],
|
||
"93": [1.25003, 1.75, 0, 0, 0.58334],
|
||
"123": [1.25003, 1.75, 0, 0, 0.80556],
|
||
"125": [1.25003, 1.75, 0, 0, 0.80556],
|
||
"710": [0, 0.825, 0, 0, 1.8889],
|
||
"732": [0, 0.825, 0, 0, 1.8889],
|
||
"770": [0, 0.825, 0, 0, 1.8889],
|
||
"771": [0, 0.825, 0, 0, 1.8889],
|
||
"8730": [1.25003, 1.75, 0, 0, 1.0],
|
||
"8968": [1.25003, 1.75, 0, 0, 0.63889],
|
||
"8969": [1.25003, 1.75, 0, 0, 0.63889],
|
||
"8970": [1.25003, 1.75, 0, 0, 0.63889],
|
||
"8971": [1.25003, 1.75, 0, 0, 0.63889],
|
||
"9115": [0.64502, 1.155, 0, 0, 0.875],
|
||
"9116": [1e-05, 0.6, 0, 0, 0.875],
|
||
"9117": [0.64502, 1.155, 0, 0, 0.875],
|
||
"9118": [0.64502, 1.155, 0, 0, 0.875],
|
||
"9119": [1e-05, 0.6, 0, 0, 0.875],
|
||
"9120": [0.64502, 1.155, 0, 0, 0.875],
|
||
"9121": [0.64502, 1.155, 0, 0, 0.66667],
|
||
"9122": [-0.00099, 0.601, 0, 0, 0.66667],
|
||
"9123": [0.64502, 1.155, 0, 0, 0.66667],
|
||
"9124": [0.64502, 1.155, 0, 0, 0.66667],
|
||
"9125": [-0.00099, 0.601, 0, 0, 0.66667],
|
||
"9126": [0.64502, 1.155, 0, 0, 0.66667],
|
||
"9127": [1e-05, 0.9, 0, 0, 0.88889],
|
||
"9128": [0.65002, 1.15, 0, 0, 0.88889],
|
||
"9129": [0.90001, 0, 0, 0, 0.88889],
|
||
"9130": [0, 0.3, 0, 0, 0.88889],
|
||
"9131": [1e-05, 0.9, 0, 0, 0.88889],
|
||
"9132": [0.65002, 1.15, 0, 0, 0.88889],
|
||
"9133": [0.90001, 0, 0, 0, 0.88889],
|
||
"9143": [0.88502, 0.915, 0, 0, 1.05556],
|
||
"10216": [1.25003, 1.75, 0, 0, 0.80556],
|
||
"10217": [1.25003, 1.75, 0, 0, 0.80556],
|
||
"57344": [-0.00499, 0.605, 0, 0, 1.05556],
|
||
"57345": [-0.00499, 0.605, 0, 0, 1.05556],
|
||
"57680": [0, 0.12, 0, 0, 0.45],
|
||
"57681": [0, 0.12, 0, 0, 0.45],
|
||
"57682": [0, 0.12, 0, 0, 0.45],
|
||
"57683": [0, 0.12, 0, 0, 0.45]
|
||
},
|
||
"Typewriter-Regular": {
|
||
"32": [0, 0, 0, 0, 0.525],
|
||
"33": [0, 0.61111, 0, 0, 0.525],
|
||
"34": [0, 0.61111, 0, 0, 0.525],
|
||
"35": [0, 0.61111, 0, 0, 0.525],
|
||
"36": [0.08333, 0.69444, 0, 0, 0.525],
|
||
"37": [0.08333, 0.69444, 0, 0, 0.525],
|
||
"38": [0, 0.61111, 0, 0, 0.525],
|
||
"39": [0, 0.61111, 0, 0, 0.525],
|
||
"40": [0.08333, 0.69444, 0, 0, 0.525],
|
||
"41": [0.08333, 0.69444, 0, 0, 0.525],
|
||
"42": [0, 0.52083, 0, 0, 0.525],
|
||
"43": [-0.08056, 0.53055, 0, 0, 0.525],
|
||
"44": [0.13889, 0.125, 0, 0, 0.525],
|
||
"45": [-0.08056, 0.53055, 0, 0, 0.525],
|
||
"46": [0, 0.125, 0, 0, 0.525],
|
||
"47": [0.08333, 0.69444, 0, 0, 0.525],
|
||
"48": [0, 0.61111, 0, 0, 0.525],
|
||
"49": [0, 0.61111, 0, 0, 0.525],
|
||
"50": [0, 0.61111, 0, 0, 0.525],
|
||
"51": [0, 0.61111, 0, 0, 0.525],
|
||
"52": [0, 0.61111, 0, 0, 0.525],
|
||
"53": [0, 0.61111, 0, 0, 0.525],
|
||
"54": [0, 0.61111, 0, 0, 0.525],
|
||
"55": [0, 0.61111, 0, 0, 0.525],
|
||
"56": [0, 0.61111, 0, 0, 0.525],
|
||
"57": [0, 0.61111, 0, 0, 0.525],
|
||
"58": [0, 0.43056, 0, 0, 0.525],
|
||
"59": [0.13889, 0.43056, 0, 0, 0.525],
|
||
"60": [-0.05556, 0.55556, 0, 0, 0.525],
|
||
"61": [-0.19549, 0.41562, 0, 0, 0.525],
|
||
"62": [-0.05556, 0.55556, 0, 0, 0.525],
|
||
"63": [0, 0.61111, 0, 0, 0.525],
|
||
"64": [0, 0.61111, 0, 0, 0.525],
|
||
"65": [0, 0.61111, 0, 0, 0.525],
|
||
"66": [0, 0.61111, 0, 0, 0.525],
|
||
"67": [0, 0.61111, 0, 0, 0.525],
|
||
"68": [0, 0.61111, 0, 0, 0.525],
|
||
"69": [0, 0.61111, 0, 0, 0.525],
|
||
"70": [0, 0.61111, 0, 0, 0.525],
|
||
"71": [0, 0.61111, 0, 0, 0.525],
|
||
"72": [0, 0.61111, 0, 0, 0.525],
|
||
"73": [0, 0.61111, 0, 0, 0.525],
|
||
"74": [0, 0.61111, 0, 0, 0.525],
|
||
"75": [0, 0.61111, 0, 0, 0.525],
|
||
"76": [0, 0.61111, 0, 0, 0.525],
|
||
"77": [0, 0.61111, 0, 0, 0.525],
|
||
"78": [0, 0.61111, 0, 0, 0.525],
|
||
"79": [0, 0.61111, 0, 0, 0.525],
|
||
"80": [0, 0.61111, 0, 0, 0.525],
|
||
"81": [0.13889, 0.61111, 0, 0, 0.525],
|
||
"82": [0, 0.61111, 0, 0, 0.525],
|
||
"83": [0, 0.61111, 0, 0, 0.525],
|
||
"84": [0, 0.61111, 0, 0, 0.525],
|
||
"85": [0, 0.61111, 0, 0, 0.525],
|
||
"86": [0, 0.61111, 0, 0, 0.525],
|
||
"87": [0, 0.61111, 0, 0, 0.525],
|
||
"88": [0, 0.61111, 0, 0, 0.525],
|
||
"89": [0, 0.61111, 0, 0, 0.525],
|
||
"90": [0, 0.61111, 0, 0, 0.525],
|
||
"91": [0.08333, 0.69444, 0, 0, 0.525],
|
||
"92": [0.08333, 0.69444, 0, 0, 0.525],
|
||
"93": [0.08333, 0.69444, 0, 0, 0.525],
|
||
"94": [0, 0.61111, 0, 0, 0.525],
|
||
"95": [0.09514, 0, 0, 0, 0.525],
|
||
"96": [0, 0.61111, 0, 0, 0.525],
|
||
"97": [0, 0.43056, 0, 0, 0.525],
|
||
"98": [0, 0.61111, 0, 0, 0.525],
|
||
"99": [0, 0.43056, 0, 0, 0.525],
|
||
"100": [0, 0.61111, 0, 0, 0.525],
|
||
"101": [0, 0.43056, 0, 0, 0.525],
|
||
"102": [0, 0.61111, 0, 0, 0.525],
|
||
"103": [0.22222, 0.43056, 0, 0, 0.525],
|
||
"104": [0, 0.61111, 0, 0, 0.525],
|
||
"105": [0, 0.61111, 0, 0, 0.525],
|
||
"106": [0.22222, 0.61111, 0, 0, 0.525],
|
||
"107": [0, 0.61111, 0, 0, 0.525],
|
||
"108": [0, 0.61111, 0, 0, 0.525],
|
||
"109": [0, 0.43056, 0, 0, 0.525],
|
||
"110": [0, 0.43056, 0, 0, 0.525],
|
||
"111": [0, 0.43056, 0, 0, 0.525],
|
||
"112": [0.22222, 0.43056, 0, 0, 0.525],
|
||
"113": [0.22222, 0.43056, 0, 0, 0.525],
|
||
"114": [0, 0.43056, 0, 0, 0.525],
|
||
"115": [0, 0.43056, 0, 0, 0.525],
|
||
"116": [0, 0.55358, 0, 0, 0.525],
|
||
"117": [0, 0.43056, 0, 0, 0.525],
|
||
"118": [0, 0.43056, 0, 0, 0.525],
|
||
"119": [0, 0.43056, 0, 0, 0.525],
|
||
"120": [0, 0.43056, 0, 0, 0.525],
|
||
"121": [0.22222, 0.43056, 0, 0, 0.525],
|
||
"122": [0, 0.43056, 0, 0, 0.525],
|
||
"123": [0.08333, 0.69444, 0, 0, 0.525],
|
||
"124": [0.08333, 0.69444, 0, 0, 0.525],
|
||
"125": [0.08333, 0.69444, 0, 0, 0.525],
|
||
"126": [0, 0.61111, 0, 0, 0.525],
|
||
"127": [0, 0.61111, 0, 0, 0.525],
|
||
"160": [0, 0, 0, 0, 0.525],
|
||
"176": [0, 0.61111, 0, 0, 0.525],
|
||
"184": [0.19445, 0, 0, 0, 0.525],
|
||
"305": [0, 0.43056, 0, 0, 0.525],
|
||
"567": [0.22222, 0.43056, 0, 0, 0.525],
|
||
"711": [0, 0.56597, 0, 0, 0.525],
|
||
"713": [0, 0.56555, 0, 0, 0.525],
|
||
"714": [0, 0.61111, 0, 0, 0.525],
|
||
"715": [0, 0.61111, 0, 0, 0.525],
|
||
"728": [0, 0.61111, 0, 0, 0.525],
|
||
"730": [0, 0.61111, 0, 0, 0.525],
|
||
"770": [0, 0.61111, 0, 0, 0.525],
|
||
"771": [0, 0.61111, 0, 0, 0.525],
|
||
"776": [0, 0.61111, 0, 0, 0.525],
|
||
"915": [0, 0.61111, 0, 0, 0.525],
|
||
"916": [0, 0.61111, 0, 0, 0.525],
|
||
"920": [0, 0.61111, 0, 0, 0.525],
|
||
"923": [0, 0.61111, 0, 0, 0.525],
|
||
"926": [0, 0.61111, 0, 0, 0.525],
|
||
"928": [0, 0.61111, 0, 0, 0.525],
|
||
"931": [0, 0.61111, 0, 0, 0.525],
|
||
"933": [0, 0.61111, 0, 0, 0.525],
|
||
"934": [0, 0.61111, 0, 0, 0.525],
|
||
"936": [0, 0.61111, 0, 0, 0.525],
|
||
"937": [0, 0.61111, 0, 0, 0.525],
|
||
"8216": [0, 0.61111, 0, 0, 0.525],
|
||
"8217": [0, 0.61111, 0, 0, 0.525],
|
||
"8242": [0, 0.61111, 0, 0, 0.525],
|
||
"9251": [0.11111, 0.21944, 0, 0, 0.525]
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/fontMetrics.js
|
||
|
||
|
||
/**
|
||
* This file contains metrics regarding fonts and individual symbols. The sigma
|
||
* and xi variables, as well as the metricMap map contain data extracted from
|
||
* TeX, TeX font metrics, and the TTF files. These data are then exposed via the
|
||
* `metrics` variable and the getCharacterMetrics function.
|
||
*/
|
||
// In TeX, there are actually three sets of dimensions, one for each of
|
||
// textstyle (size index 5 and higher: >=9pt), scriptstyle (size index 3 and 4:
|
||
// 7-8pt), and scriptscriptstyle (size index 1 and 2: 5-6pt). These are
|
||
// provided in the the arrays below, in that order.
|
||
//
|
||
// The font metrics are stored in fonts cmsy10, cmsy7, and cmsy5 respsectively.
|
||
// This was determined by running the following script:
|
||
//
|
||
// latex -interaction=nonstopmode \
|
||
// '\documentclass{article}\usepackage{amsmath}\begin{document}' \
|
||
// '$a$ \expandafter\show\the\textfont2' \
|
||
// '\expandafter\show\the\scriptfont2' \
|
||
// '\expandafter\show\the\scriptscriptfont2' \
|
||
// '\stop'
|
||
//
|
||
// The metrics themselves were retreived using the following commands:
|
||
//
|
||
// tftopl cmsy10
|
||
// tftopl cmsy7
|
||
// tftopl cmsy5
|
||
//
|
||
// The output of each of these commands is quite lengthy. The only part we
|
||
// care about is the FONTDIMEN section. Each value is measured in EMs.
|
||
var sigmasAndXis = {
|
||
slant: [0.250, 0.250, 0.250],
|
||
// sigma1
|
||
space: [0.000, 0.000, 0.000],
|
||
// sigma2
|
||
stretch: [0.000, 0.000, 0.000],
|
||
// sigma3
|
||
shrink: [0.000, 0.000, 0.000],
|
||
// sigma4
|
||
xHeight: [0.431, 0.431, 0.431],
|
||
// sigma5
|
||
quad: [1.000, 1.171, 1.472],
|
||
// sigma6
|
||
extraSpace: [0.000, 0.000, 0.000],
|
||
// sigma7
|
||
num1: [0.677, 0.732, 0.925],
|
||
// sigma8
|
||
num2: [0.394, 0.384, 0.387],
|
||
// sigma9
|
||
num3: [0.444, 0.471, 0.504],
|
||
// sigma10
|
||
denom1: [0.686, 0.752, 1.025],
|
||
// sigma11
|
||
denom2: [0.345, 0.344, 0.532],
|
||
// sigma12
|
||
sup1: [0.413, 0.503, 0.504],
|
||
// sigma13
|
||
sup2: [0.363, 0.431, 0.404],
|
||
// sigma14
|
||
sup3: [0.289, 0.286, 0.294],
|
||
// sigma15
|
||
sub1: [0.150, 0.143, 0.200],
|
||
// sigma16
|
||
sub2: [0.247, 0.286, 0.400],
|
||
// sigma17
|
||
supDrop: [0.386, 0.353, 0.494],
|
||
// sigma18
|
||
subDrop: [0.050, 0.071, 0.100],
|
||
// sigma19
|
||
delim1: [2.390, 1.700, 1.980],
|
||
// sigma20
|
||
delim2: [1.010, 1.157, 1.420],
|
||
// sigma21
|
||
axisHeight: [0.250, 0.250, 0.250],
|
||
// sigma22
|
||
// These font metrics are extracted from TeX by using tftopl on cmex10.tfm;
|
||
// they correspond to the font parameters of the extension fonts (family 3).
|
||
// See the TeXbook, page 441. In AMSTeX, the extension fonts scale; to
|
||
// match cmex7, we'd use cmex7.tfm values for script and scriptscript
|
||
// values.
|
||
defaultRuleThickness: [0.04, 0.049, 0.049],
|
||
// xi8; cmex7: 0.049
|
||
bigOpSpacing1: [0.111, 0.111, 0.111],
|
||
// xi9
|
||
bigOpSpacing2: [0.166, 0.166, 0.166],
|
||
// xi10
|
||
bigOpSpacing3: [0.2, 0.2, 0.2],
|
||
// xi11
|
||
bigOpSpacing4: [0.6, 0.611, 0.611],
|
||
// xi12; cmex7: 0.611
|
||
bigOpSpacing5: [0.1, 0.143, 0.143],
|
||
// xi13; cmex7: 0.143
|
||
// The \sqrt rule width is taken from the height of the surd character.
|
||
// Since we use the same font at all sizes, this thickness doesn't scale.
|
||
sqrtRuleThickness: [0.04, 0.04, 0.04],
|
||
// This value determines how large a pt is, for metrics which are defined
|
||
// in terms of pts.
|
||
// This value is also used in katex.less; if you change it make sure the
|
||
// values match.
|
||
ptPerEm: [10.0, 10.0, 10.0],
|
||
// The space between adjacent `|` columns in an array definition. From
|
||
// `\showthe\doublerulesep` in LaTeX. Equals 2.0 / ptPerEm.
|
||
doubleRuleSep: [0.2, 0.2, 0.2],
|
||
// The width of separator lines in {array} environments. From
|
||
// `\showthe\arrayrulewidth` in LaTeX. Equals 0.4 / ptPerEm.
|
||
arrayRuleWidth: [0.04, 0.04, 0.04],
|
||
// Two values from LaTeX source2e:
|
||
fboxsep: [0.3, 0.3, 0.3],
|
||
// 3 pt / ptPerEm
|
||
fboxrule: [0.04, 0.04, 0.04] // 0.4 pt / ptPerEm
|
||
|
||
}; // This map contains a mapping from font name and character code to character
|
||
// metrics, including height, depth, italic correction, and skew (kern from the
|
||
// character to the corresponding \skewchar)
|
||
// This map is generated via `make metrics`. It should not be changed manually.
|
||
|
||
// These are very rough approximations. We default to Times New Roman which
|
||
// should have Latin-1 and Cyrillic characters, but may not depending on the
|
||
// operating system. The metrics do not account for extra height from the
|
||
// accents. In the case of Cyrillic characters which have both ascenders and
|
||
// descenders we prefer approximations with ascenders, primarily to prevent
|
||
// the fraction bar or root line from intersecting the glyph.
|
||
// TODO(kevinb) allow union of multiple glyph metrics for better accuracy.
|
||
|
||
var extraCharacterMap = {
|
||
// Latin-1
|
||
'Å': 'A',
|
||
'Ç': 'C',
|
||
'Ð': 'D',
|
||
'Þ': 'o',
|
||
'å': 'a',
|
||
'ç': 'c',
|
||
'ð': 'd',
|
||
'þ': 'o',
|
||
// Cyrillic
|
||
'А': 'A',
|
||
'Б': 'B',
|
||
'В': 'B',
|
||
'Г': 'F',
|
||
'Д': 'A',
|
||
'Е': 'E',
|
||
'Ж': 'K',
|
||
'З': '3',
|
||
'И': 'N',
|
||
'Й': 'N',
|
||
'К': 'K',
|
||
'Л': 'N',
|
||
'М': 'M',
|
||
'Н': 'H',
|
||
'О': 'O',
|
||
'П': 'N',
|
||
'Р': 'P',
|
||
'С': 'C',
|
||
'Т': 'T',
|
||
'У': 'y',
|
||
'Ф': 'O',
|
||
'Х': 'X',
|
||
'Ц': 'U',
|
||
'Ч': 'h',
|
||
'Ш': 'W',
|
||
'Щ': 'W',
|
||
'Ъ': 'B',
|
||
'Ы': 'X',
|
||
'Ь': 'B',
|
||
'Э': '3',
|
||
'Ю': 'X',
|
||
'Я': 'R',
|
||
'а': 'a',
|
||
'б': 'b',
|
||
'в': 'a',
|
||
'г': 'r',
|
||
'д': 'y',
|
||
'е': 'e',
|
||
'ж': 'm',
|
||
'з': 'e',
|
||
'и': 'n',
|
||
'й': 'n',
|
||
'к': 'n',
|
||
'л': 'n',
|
||
'м': 'm',
|
||
'н': 'n',
|
||
'о': 'o',
|
||
'п': 'n',
|
||
'р': 'p',
|
||
'с': 'c',
|
||
'т': 'o',
|
||
'у': 'y',
|
||
'ф': 'b',
|
||
'х': 'x',
|
||
'ц': 'n',
|
||
'ч': 'n',
|
||
'ш': 'w',
|
||
'щ': 'w',
|
||
'ъ': 'a',
|
||
'ы': 'm',
|
||
'ь': 'a',
|
||
'э': 'e',
|
||
'ю': 'm',
|
||
'я': 'r'
|
||
};
|
||
|
||
/**
|
||
* This function adds new font metrics to default metricMap
|
||
* It can also override existing metrics
|
||
*/
|
||
function setFontMetrics(fontName, metrics) {
|
||
fontMetricsData[fontName] = metrics;
|
||
}
|
||
/**
|
||
* This function is a convenience function for looking up information in the
|
||
* metricMap table. It takes a character as a string, and a font.
|
||
*
|
||
* Note: the `width` property may be undefined if fontMetricsData.js wasn't
|
||
* built using `Make extended_metrics`.
|
||
*/
|
||
|
||
function getCharacterMetrics(character, font, mode) {
|
||
if (!fontMetricsData[font]) {
|
||
throw new Error("Font metrics not found for font: " + font + ".");
|
||
}
|
||
|
||
var ch = character.charCodeAt(0);
|
||
var metrics = fontMetricsData[font][ch];
|
||
|
||
if (!metrics && character[0] in extraCharacterMap) {
|
||
ch = extraCharacterMap[character[0]].charCodeAt(0);
|
||
metrics = fontMetricsData[font][ch];
|
||
}
|
||
|
||
if (!metrics && mode === 'text') {
|
||
// We don't typically have font metrics for Asian scripts.
|
||
// But since we support them in text mode, we need to return
|
||
// some sort of metrics.
|
||
// So if the character is in a script we support but we
|
||
// don't have metrics for it, just use the metrics for
|
||
// the Latin capital letter M. This is close enough because
|
||
// we (currently) only care about the height of the glpyh
|
||
// not its width.
|
||
if (supportedCodepoint(ch)) {
|
||
metrics = fontMetricsData[font][77]; // 77 is the charcode for 'M'
|
||
}
|
||
}
|
||
|
||
if (metrics) {
|
||
return {
|
||
depth: metrics[0],
|
||
height: metrics[1],
|
||
italic: metrics[2],
|
||
skew: metrics[3],
|
||
width: metrics[4]
|
||
};
|
||
}
|
||
}
|
||
var fontMetricsBySizeIndex = {};
|
||
/**
|
||
* Get the font metrics for a given size.
|
||
*/
|
||
|
||
function getGlobalMetrics(size) {
|
||
var sizeIndex;
|
||
|
||
if (size >= 5) {
|
||
sizeIndex = 0;
|
||
} else if (size >= 3) {
|
||
sizeIndex = 1;
|
||
} else {
|
||
sizeIndex = 2;
|
||
}
|
||
|
||
if (!fontMetricsBySizeIndex[sizeIndex]) {
|
||
var metrics = fontMetricsBySizeIndex[sizeIndex] = {
|
||
cssEmPerMu: sigmasAndXis.quad[sizeIndex] / 18
|
||
};
|
||
|
||
for (var key in sigmasAndXis) {
|
||
if (sigmasAndXis.hasOwnProperty(key)) {
|
||
metrics[key] = sigmasAndXis[key][sizeIndex];
|
||
}
|
||
}
|
||
}
|
||
|
||
return fontMetricsBySizeIndex[sizeIndex];
|
||
}
|
||
// CONCATENATED MODULE: ./src/symbols.js
|
||
/**
|
||
* This file holds a list of all no-argument functions and single-character
|
||
* symbols (like 'a' or ';').
|
||
*
|
||
* For each of the symbols, there are three properties they can have:
|
||
* - font (required): the font to be used for this symbol. Either "main" (the
|
||
normal font), or "ams" (the ams fonts).
|
||
* - group (required): the ParseNode group type the symbol should have (i.e.
|
||
"textord", "mathord", etc).
|
||
See https://github.com/KaTeX/KaTeX/wiki/Examining-TeX#group-types
|
||
* - replace: the character that this symbol or function should be
|
||
* replaced with (i.e. "\phi" has a replace value of "\u03d5", the phi
|
||
* character in the main font).
|
||
*
|
||
* The outermost map in the table indicates what mode the symbols should be
|
||
* accepted in (e.g. "math" or "text").
|
||
*/
|
||
// Some of these have a "-token" suffix since these are also used as `ParseNode`
|
||
// types for raw text tokens, and we want to avoid conflicts with higher-level
|
||
// `ParseNode` types. These `ParseNode`s are constructed within `Parser` by
|
||
// looking up the `symbols` map.
|
||
var ATOMS = {
|
||
"bin": 1,
|
||
"close": 1,
|
||
"inner": 1,
|
||
"open": 1,
|
||
"punct": 1,
|
||
"rel": 1
|
||
};
|
||
var NON_ATOMS = {
|
||
"accent-token": 1,
|
||
"mathord": 1,
|
||
"op-token": 1,
|
||
"spacing": 1,
|
||
"textord": 1
|
||
};
|
||
var symbols = {
|
||
"math": {},
|
||
"text": {}
|
||
};
|
||
/* harmony default export */ var src_symbols = (symbols);
|
||
/** `acceptUnicodeChar = true` is only applicable if `replace` is set. */
|
||
|
||
function defineSymbol(mode, font, group, replace, name, acceptUnicodeChar) {
|
||
symbols[mode][name] = {
|
||
font: font,
|
||
group: group,
|
||
replace: replace
|
||
};
|
||
|
||
if (acceptUnicodeChar && replace) {
|
||
symbols[mode][replace] = symbols[mode][name];
|
||
}
|
||
} // Some abbreviations for commonly used strings.
|
||
// This helps minify the code, and also spotting typos using jshint.
|
||
// modes:
|
||
|
||
var symbols_math = "math";
|
||
var symbols_text = "text"; // fonts:
|
||
|
||
var main = "main";
|
||
var ams = "ams"; // groups:
|
||
|
||
var symbols_accent = "accent-token";
|
||
var bin = "bin";
|
||
var symbols_close = "close";
|
||
var symbols_inner = "inner";
|
||
var mathord = "mathord";
|
||
var op = "op-token";
|
||
var symbols_open = "open";
|
||
var punct = "punct";
|
||
var rel = "rel";
|
||
var symbols_spacing = "spacing";
|
||
var symbols_textord = "textord"; // Now comes the symbol table
|
||
// Relation Symbols
|
||
|
||
defineSymbol(symbols_math, main, rel, "\u2261", "\\equiv", true);
|
||
defineSymbol(symbols_math, main, rel, "\u227A", "\\prec", true);
|
||
defineSymbol(symbols_math, main, rel, "\u227B", "\\succ", true);
|
||
defineSymbol(symbols_math, main, rel, "\u223C", "\\sim", true);
|
||
defineSymbol(symbols_math, main, rel, "\u22A5", "\\perp");
|
||
defineSymbol(symbols_math, main, rel, "\u2AAF", "\\preceq", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2AB0", "\\succeq", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2243", "\\simeq", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2223", "\\mid", true);
|
||
defineSymbol(symbols_math, main, rel, "\u226A", "\\ll", true);
|
||
defineSymbol(symbols_math, main, rel, "\u226B", "\\gg", true);
|
||
defineSymbol(symbols_math, main, rel, "\u224D", "\\asymp", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2225", "\\parallel");
|
||
defineSymbol(symbols_math, main, rel, "\u22C8", "\\bowtie", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2323", "\\smile", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2291", "\\sqsubseteq", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2292", "\\sqsupseteq", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2250", "\\doteq", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2322", "\\frown", true);
|
||
defineSymbol(symbols_math, main, rel, "\u220B", "\\ni", true);
|
||
defineSymbol(symbols_math, main, rel, "\u221D", "\\propto", true);
|
||
defineSymbol(symbols_math, main, rel, "\u22A2", "\\vdash", true);
|
||
defineSymbol(symbols_math, main, rel, "\u22A3", "\\dashv", true);
|
||
defineSymbol(symbols_math, main, rel, "\u220B", "\\owns"); // Punctuation
|
||
|
||
defineSymbol(symbols_math, main, punct, ".", "\\ldotp");
|
||
defineSymbol(symbols_math, main, punct, "\u22C5", "\\cdotp"); // Misc Symbols
|
||
|
||
defineSymbol(symbols_math, main, symbols_textord, "#", "\\#");
|
||
defineSymbol(symbols_text, main, symbols_textord, "#", "\\#");
|
||
defineSymbol(symbols_math, main, symbols_textord, "&", "\\&");
|
||
defineSymbol(symbols_text, main, symbols_textord, "&", "\\&");
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2135", "\\aleph", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2200", "\\forall", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u210F", "\\hbar", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2203", "\\exists", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2207", "\\nabla", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u266D", "\\flat", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2113", "\\ell", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u266E", "\\natural", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2663", "\\clubsuit", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2118", "\\wp", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u266F", "\\sharp", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2662", "\\diamondsuit", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u211C", "\\Re", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2661", "\\heartsuit", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2111", "\\Im", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2660", "\\spadesuit", true);
|
||
defineSymbol(symbols_text, main, symbols_textord, "\xA7", "\\S", true);
|
||
defineSymbol(symbols_text, main, symbols_textord, "\xB6", "\\P", true); // Math and Text
|
||
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2020", "\\dag");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2020", "\\dag");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2020", "\\textdagger");
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2021", "\\ddag");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2021", "\\ddag");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2021", "\\textdaggerdbl"); // Large Delimiters
|
||
|
||
defineSymbol(symbols_math, main, symbols_close, "\u23B1", "\\rmoustache", true);
|
||
defineSymbol(symbols_math, main, symbols_open, "\u23B0", "\\lmoustache", true);
|
||
defineSymbol(symbols_math, main, symbols_close, "\u27EF", "\\rgroup", true);
|
||
defineSymbol(symbols_math, main, symbols_open, "\u27EE", "\\lgroup", true); // Binary Operators
|
||
|
||
defineSymbol(symbols_math, main, bin, "\u2213", "\\mp", true);
|
||
defineSymbol(symbols_math, main, bin, "\u2296", "\\ominus", true);
|
||
defineSymbol(symbols_math, main, bin, "\u228E", "\\uplus", true);
|
||
defineSymbol(symbols_math, main, bin, "\u2293", "\\sqcap", true);
|
||
defineSymbol(symbols_math, main, bin, "\u2217", "\\ast");
|
||
defineSymbol(symbols_math, main, bin, "\u2294", "\\sqcup", true);
|
||
defineSymbol(symbols_math, main, bin, "\u25EF", "\\bigcirc");
|
||
defineSymbol(symbols_math, main, bin, "\u2219", "\\bullet");
|
||
defineSymbol(symbols_math, main, bin, "\u2021", "\\ddagger");
|
||
defineSymbol(symbols_math, main, bin, "\u2240", "\\wr", true);
|
||
defineSymbol(symbols_math, main, bin, "\u2A3F", "\\amalg");
|
||
defineSymbol(symbols_math, main, bin, "&", "\\And"); // from amsmath
|
||
// Arrow Symbols
|
||
|
||
defineSymbol(symbols_math, main, rel, "\u27F5", "\\longleftarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u21D0", "\\Leftarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u27F8", "\\Longleftarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u27F6", "\\longrightarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u21D2", "\\Rightarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u27F9", "\\Longrightarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2194", "\\leftrightarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u27F7", "\\longleftrightarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u21D4", "\\Leftrightarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u27FA", "\\Longleftrightarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u21A6", "\\mapsto", true);
|
||
defineSymbol(symbols_math, main, rel, "\u27FC", "\\longmapsto", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2197", "\\nearrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u21A9", "\\hookleftarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u21AA", "\\hookrightarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2198", "\\searrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u21BC", "\\leftharpoonup", true);
|
||
defineSymbol(symbols_math, main, rel, "\u21C0", "\\rightharpoonup", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2199", "\\swarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u21BD", "\\leftharpoondown", true);
|
||
defineSymbol(symbols_math, main, rel, "\u21C1", "\\rightharpoondown", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2196", "\\nwarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u21CC", "\\rightleftharpoons", true); // AMS Negated Binary Relations
|
||
|
||
defineSymbol(symbols_math, ams, rel, "\u226E", "\\nless", true); // Symbol names preceeded by "@" each have a corresponding macro.
|
||
|
||
defineSymbol(symbols_math, ams, rel, "\uE010", "\\@nleqslant");
|
||
defineSymbol(symbols_math, ams, rel, "\uE011", "\\@nleqq");
|
||
defineSymbol(symbols_math, ams, rel, "\u2A87", "\\lneq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2268", "\\lneqq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\uE00C", "\\@lvertneqq");
|
||
defineSymbol(symbols_math, ams, rel, "\u22E6", "\\lnsim", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2A89", "\\lnapprox", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2280", "\\nprec", true); // unicode-math maps \u22e0 to \npreccurlyeq. We'll use the AMS synonym.
|
||
|
||
defineSymbol(symbols_math, ams, rel, "\u22E0", "\\npreceq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22E8", "\\precnsim", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2AB9", "\\precnapprox", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2241", "\\nsim", true);
|
||
defineSymbol(symbols_math, ams, rel, "\uE006", "\\@nshortmid");
|
||
defineSymbol(symbols_math, ams, rel, "\u2224", "\\nmid", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22AC", "\\nvdash", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22AD", "\\nvDash", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22EA", "\\ntriangleleft");
|
||
defineSymbol(symbols_math, ams, rel, "\u22EC", "\\ntrianglelefteq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u228A", "\\subsetneq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\uE01A", "\\@varsubsetneq");
|
||
defineSymbol(symbols_math, ams, rel, "\u2ACB", "\\subsetneqq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\uE017", "\\@varsubsetneqq");
|
||
defineSymbol(symbols_math, ams, rel, "\u226F", "\\ngtr", true);
|
||
defineSymbol(symbols_math, ams, rel, "\uE00F", "\\@ngeqslant");
|
||
defineSymbol(symbols_math, ams, rel, "\uE00E", "\\@ngeqq");
|
||
defineSymbol(symbols_math, ams, rel, "\u2A88", "\\gneq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2269", "\\gneqq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\uE00D", "\\@gvertneqq");
|
||
defineSymbol(symbols_math, ams, rel, "\u22E7", "\\gnsim", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2A8A", "\\gnapprox", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2281", "\\nsucc", true); // unicode-math maps \u22e1 to \nsucccurlyeq. We'll use the AMS synonym.
|
||
|
||
defineSymbol(symbols_math, ams, rel, "\u22E1", "\\nsucceq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22E9", "\\succnsim", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2ABA", "\\succnapprox", true); // unicode-math maps \u2246 to \simneqq. We'll use the AMS synonym.
|
||
|
||
defineSymbol(symbols_math, ams, rel, "\u2246", "\\ncong", true);
|
||
defineSymbol(symbols_math, ams, rel, "\uE007", "\\@nshortparallel");
|
||
defineSymbol(symbols_math, ams, rel, "\u2226", "\\nparallel", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22AF", "\\nVDash", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22EB", "\\ntriangleright");
|
||
defineSymbol(symbols_math, ams, rel, "\u22ED", "\\ntrianglerighteq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\uE018", "\\@nsupseteqq");
|
||
defineSymbol(symbols_math, ams, rel, "\u228B", "\\supsetneq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\uE01B", "\\@varsupsetneq");
|
||
defineSymbol(symbols_math, ams, rel, "\u2ACC", "\\supsetneqq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\uE019", "\\@varsupsetneqq");
|
||
defineSymbol(symbols_math, ams, rel, "\u22AE", "\\nVdash", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2AB5", "\\precneqq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2AB6", "\\succneqq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\uE016", "\\@nsubseteqq");
|
||
defineSymbol(symbols_math, ams, bin, "\u22B4", "\\unlhd");
|
||
defineSymbol(symbols_math, ams, bin, "\u22B5", "\\unrhd"); // AMS Negated Arrows
|
||
|
||
defineSymbol(symbols_math, ams, rel, "\u219A", "\\nleftarrow", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u219B", "\\nrightarrow", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21CD", "\\nLeftarrow", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21CF", "\\nRightarrow", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21AE", "\\nleftrightarrow", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21CE", "\\nLeftrightarrow", true); // AMS Misc
|
||
|
||
defineSymbol(symbols_math, ams, rel, "\u25B3", "\\vartriangle");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u210F", "\\hslash");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u25BD", "\\triangledown");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u25CA", "\\lozenge");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u24C8", "\\circledS");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\xAE", "\\circledR");
|
||
defineSymbol(symbols_text, ams, symbols_textord, "\xAE", "\\circledR");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2221", "\\measuredangle", true);
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2204", "\\nexists");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2127", "\\mho");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2132", "\\Finv", true);
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2141", "\\Game", true);
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2035", "\\backprime");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u25B2", "\\blacktriangle");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u25BC", "\\blacktriangledown");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u25A0", "\\blacksquare");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u29EB", "\\blacklozenge");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2605", "\\bigstar");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2222", "\\sphericalangle", true);
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2201", "\\complement", true); // unicode-math maps U+F0 (ð) to \matheth. We map to AMS function \eth
|
||
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\xF0", "\\eth", true);
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2571", "\\diagup");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2572", "\\diagdown");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u25A1", "\\square");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u25A1", "\\Box");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u25CA", "\\Diamond"); // unicode-math maps U+A5 to \mathyen. We map to AMS function \yen
|
||
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\xA5", "\\yen", true);
|
||
defineSymbol(symbols_text, ams, symbols_textord, "\xA5", "\\yen", true);
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2713", "\\checkmark", true);
|
||
defineSymbol(symbols_text, ams, symbols_textord, "\u2713", "\\checkmark"); // AMS Hebrew
|
||
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2136", "\\beth", true);
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2138", "\\daleth", true);
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2137", "\\gimel", true); // AMS Greek
|
||
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u03DD", "\\digamma", true);
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u03F0", "\\varkappa"); // AMS Delimiters
|
||
|
||
defineSymbol(symbols_math, ams, symbols_open, "\u250C", "\\ulcorner", true);
|
||
defineSymbol(symbols_math, ams, symbols_close, "\u2510", "\\urcorner", true);
|
||
defineSymbol(symbols_math, ams, symbols_open, "\u2514", "\\llcorner", true);
|
||
defineSymbol(symbols_math, ams, symbols_close, "\u2518", "\\lrcorner", true); // AMS Binary Relations
|
||
|
||
defineSymbol(symbols_math, ams, rel, "\u2266", "\\leqq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2A7D", "\\leqslant", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2A95", "\\eqslantless", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2272", "\\lesssim", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2A85", "\\lessapprox", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u224A", "\\approxeq", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u22D6", "\\lessdot");
|
||
defineSymbol(symbols_math, ams, rel, "\u22D8", "\\lll", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2276", "\\lessgtr", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22DA", "\\lesseqgtr", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2A8B", "\\lesseqqgtr", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2251", "\\doteqdot");
|
||
defineSymbol(symbols_math, ams, rel, "\u2253", "\\risingdotseq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2252", "\\fallingdotseq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u223D", "\\backsim", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22CD", "\\backsimeq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2AC5", "\\subseteqq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22D0", "\\Subset", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u228F", "\\sqsubset", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u227C", "\\preccurlyeq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22DE", "\\curlyeqprec", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u227E", "\\precsim", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2AB7", "\\precapprox", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22B2", "\\vartriangleleft");
|
||
defineSymbol(symbols_math, ams, rel, "\u22B4", "\\trianglelefteq");
|
||
defineSymbol(symbols_math, ams, rel, "\u22A8", "\\vDash", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22AA", "\\Vvdash", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2323", "\\smallsmile");
|
||
defineSymbol(symbols_math, ams, rel, "\u2322", "\\smallfrown");
|
||
defineSymbol(symbols_math, ams, rel, "\u224F", "\\bumpeq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u224E", "\\Bumpeq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2267", "\\geqq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2A7E", "\\geqslant", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2A96", "\\eqslantgtr", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2273", "\\gtrsim", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2A86", "\\gtrapprox", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u22D7", "\\gtrdot");
|
||
defineSymbol(symbols_math, ams, rel, "\u22D9", "\\ggg", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2277", "\\gtrless", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22DB", "\\gtreqless", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2A8C", "\\gtreqqless", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2256", "\\eqcirc", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2257", "\\circeq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u225C", "\\triangleq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u223C", "\\thicksim");
|
||
defineSymbol(symbols_math, ams, rel, "\u2248", "\\thickapprox");
|
||
defineSymbol(symbols_math, ams, rel, "\u2AC6", "\\supseteqq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22D1", "\\Supset", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2290", "\\sqsupset", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u227D", "\\succcurlyeq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22DF", "\\curlyeqsucc", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u227F", "\\succsim", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2AB8", "\\succapprox", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22B3", "\\vartriangleright");
|
||
defineSymbol(symbols_math, ams, rel, "\u22B5", "\\trianglerighteq");
|
||
defineSymbol(symbols_math, ams, rel, "\u22A9", "\\Vdash", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2223", "\\shortmid");
|
||
defineSymbol(symbols_math, ams, rel, "\u2225", "\\shortparallel");
|
||
defineSymbol(symbols_math, ams, rel, "\u226C", "\\between", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22D4", "\\pitchfork", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u221D", "\\varpropto");
|
||
defineSymbol(symbols_math, ams, rel, "\u25C0", "\\blacktriangleleft"); // unicode-math says that \therefore is a mathord atom.
|
||
// We kept the amssymb atom type, which is rel.
|
||
|
||
defineSymbol(symbols_math, ams, rel, "\u2234", "\\therefore", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u220D", "\\backepsilon");
|
||
defineSymbol(symbols_math, ams, rel, "\u25B6", "\\blacktriangleright"); // unicode-math says that \because is a mathord atom.
|
||
// We kept the amssymb atom type, which is rel.
|
||
|
||
defineSymbol(symbols_math, ams, rel, "\u2235", "\\because", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22D8", "\\llless");
|
||
defineSymbol(symbols_math, ams, rel, "\u22D9", "\\gggtr");
|
||
defineSymbol(symbols_math, ams, bin, "\u22B2", "\\lhd");
|
||
defineSymbol(symbols_math, ams, bin, "\u22B3", "\\rhd");
|
||
defineSymbol(symbols_math, ams, rel, "\u2242", "\\eqsim", true);
|
||
defineSymbol(symbols_math, main, rel, "\u22C8", "\\Join");
|
||
defineSymbol(symbols_math, ams, rel, "\u2251", "\\Doteq", true); // AMS Binary Operators
|
||
|
||
defineSymbol(symbols_math, ams, bin, "\u2214", "\\dotplus", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u2216", "\\smallsetminus");
|
||
defineSymbol(symbols_math, ams, bin, "\u22D2", "\\Cap", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u22D3", "\\Cup", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u2A5E", "\\doublebarwedge", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u229F", "\\boxminus", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u229E", "\\boxplus", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u22C7", "\\divideontimes", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u22C9", "\\ltimes", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u22CA", "\\rtimes", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u22CB", "\\leftthreetimes", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u22CC", "\\rightthreetimes", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u22CF", "\\curlywedge", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u22CE", "\\curlyvee", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u229D", "\\circleddash", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u229B", "\\circledast", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u22C5", "\\centerdot");
|
||
defineSymbol(symbols_math, ams, bin, "\u22BA", "\\intercal", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u22D2", "\\doublecap");
|
||
defineSymbol(symbols_math, ams, bin, "\u22D3", "\\doublecup");
|
||
defineSymbol(symbols_math, ams, bin, "\u22A0", "\\boxtimes", true); // AMS Arrows
|
||
// Note: unicode-math maps \u21e2 to their own function \rightdasharrow.
|
||
// We'll map it to AMS function \dashrightarrow. It produces the same atom.
|
||
|
||
defineSymbol(symbols_math, ams, rel, "\u21E2", "\\dashrightarrow", true); // unicode-math maps \u21e0 to \leftdasharrow. We'll use the AMS synonym.
|
||
|
||
defineSymbol(symbols_math, ams, rel, "\u21E0", "\\dashleftarrow", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21C7", "\\leftleftarrows", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21C6", "\\leftrightarrows", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21DA", "\\Lleftarrow", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u219E", "\\twoheadleftarrow", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21A2", "\\leftarrowtail", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21AB", "\\looparrowleft", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21CB", "\\leftrightharpoons", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21B6", "\\curvearrowleft", true); // unicode-math maps \u21ba to \acwopencirclearrow. We'll use the AMS synonym.
|
||
|
||
defineSymbol(symbols_math, ams, rel, "\u21BA", "\\circlearrowleft", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21B0", "\\Lsh", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21C8", "\\upuparrows", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21BF", "\\upharpoonleft", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21C3", "\\downharpoonleft", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u22B8", "\\multimap", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21AD", "\\leftrightsquigarrow", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21C9", "\\rightrightarrows", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21C4", "\\rightleftarrows", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21A0", "\\twoheadrightarrow", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21A3", "\\rightarrowtail", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21AC", "\\looparrowright", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21B7", "\\curvearrowright", true); // unicode-math maps \u21bb to \cwopencirclearrow. We'll use the AMS synonym.
|
||
|
||
defineSymbol(symbols_math, ams, rel, "\u21BB", "\\circlearrowright", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21B1", "\\Rsh", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21CA", "\\downdownarrows", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21BE", "\\upharpoonright", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21C2", "\\downharpoonright", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21DD", "\\rightsquigarrow", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21DD", "\\leadsto");
|
||
defineSymbol(symbols_math, ams, rel, "\u21DB", "\\Rrightarrow", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u21BE", "\\restriction");
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2018", "`");
|
||
defineSymbol(symbols_math, main, symbols_textord, "$", "\\$");
|
||
defineSymbol(symbols_text, main, symbols_textord, "$", "\\$");
|
||
defineSymbol(symbols_text, main, symbols_textord, "$", "\\textdollar");
|
||
defineSymbol(symbols_math, main, symbols_textord, "%", "\\%");
|
||
defineSymbol(symbols_text, main, symbols_textord, "%", "\\%");
|
||
defineSymbol(symbols_math, main, symbols_textord, "_", "\\_");
|
||
defineSymbol(symbols_text, main, symbols_textord, "_", "\\_");
|
||
defineSymbol(symbols_text, main, symbols_textord, "_", "\\textunderscore");
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2220", "\\angle", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u221E", "\\infty", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2032", "\\prime");
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u25B3", "\\triangle");
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u0393", "\\Gamma", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u0394", "\\Delta", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u0398", "\\Theta", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u039B", "\\Lambda", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u039E", "\\Xi", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u03A0", "\\Pi", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u03A3", "\\Sigma", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u03A5", "\\Upsilon", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u03A6", "\\Phi", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u03A8", "\\Psi", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u03A9", "\\Omega", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "A", "\u0391");
|
||
defineSymbol(symbols_math, main, symbols_textord, "B", "\u0392");
|
||
defineSymbol(symbols_math, main, symbols_textord, "E", "\u0395");
|
||
defineSymbol(symbols_math, main, symbols_textord, "Z", "\u0396");
|
||
defineSymbol(symbols_math, main, symbols_textord, "H", "\u0397");
|
||
defineSymbol(symbols_math, main, symbols_textord, "I", "\u0399");
|
||
defineSymbol(symbols_math, main, symbols_textord, "K", "\u039A");
|
||
defineSymbol(symbols_math, main, symbols_textord, "M", "\u039C");
|
||
defineSymbol(symbols_math, main, symbols_textord, "N", "\u039D");
|
||
defineSymbol(symbols_math, main, symbols_textord, "O", "\u039F");
|
||
defineSymbol(symbols_math, main, symbols_textord, "P", "\u03A1");
|
||
defineSymbol(symbols_math, main, symbols_textord, "T", "\u03A4");
|
||
defineSymbol(symbols_math, main, symbols_textord, "X", "\u03A7");
|
||
defineSymbol(symbols_math, main, symbols_textord, "\xAC", "\\neg", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\xAC", "\\lnot");
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u22A4", "\\top");
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u22A5", "\\bot");
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2205", "\\emptyset");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2205", "\\varnothing");
|
||
defineSymbol(symbols_math, main, mathord, "\u03B1", "\\alpha", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03B2", "\\beta", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03B3", "\\gamma", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03B4", "\\delta", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03F5", "\\epsilon", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03B6", "\\zeta", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03B7", "\\eta", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03B8", "\\theta", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03B9", "\\iota", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03BA", "\\kappa", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03BB", "\\lambda", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03BC", "\\mu", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03BD", "\\nu", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03BE", "\\xi", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03BF", "\\omicron", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03C0", "\\pi", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03C1", "\\rho", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03C3", "\\sigma", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03C4", "\\tau", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03C5", "\\upsilon", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03D5", "\\phi", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03C7", "\\chi", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03C8", "\\psi", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03C9", "\\omega", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03B5", "\\varepsilon", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03D1", "\\vartheta", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03D6", "\\varpi", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03F1", "\\varrho", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03C2", "\\varsigma", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u03C6", "\\varphi", true);
|
||
defineSymbol(symbols_math, main, bin, "\u2217", "*");
|
||
defineSymbol(symbols_math, main, bin, "+", "+");
|
||
defineSymbol(symbols_math, main, bin, "\u2212", "-");
|
||
defineSymbol(symbols_math, main, bin, "\u22C5", "\\cdot", true);
|
||
defineSymbol(symbols_math, main, bin, "\u2218", "\\circ");
|
||
defineSymbol(symbols_math, main, bin, "\xF7", "\\div", true);
|
||
defineSymbol(symbols_math, main, bin, "\xB1", "\\pm", true);
|
||
defineSymbol(symbols_math, main, bin, "\xD7", "\\times", true);
|
||
defineSymbol(symbols_math, main, bin, "\u2229", "\\cap", true);
|
||
defineSymbol(symbols_math, main, bin, "\u222A", "\\cup", true);
|
||
defineSymbol(symbols_math, main, bin, "\u2216", "\\setminus");
|
||
defineSymbol(symbols_math, main, bin, "\u2227", "\\land");
|
||
defineSymbol(symbols_math, main, bin, "\u2228", "\\lor");
|
||
defineSymbol(symbols_math, main, bin, "\u2227", "\\wedge", true);
|
||
defineSymbol(symbols_math, main, bin, "\u2228", "\\vee", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u221A", "\\surd");
|
||
defineSymbol(symbols_math, main, symbols_open, "(", "(");
|
||
defineSymbol(symbols_math, main, symbols_open, "[", "[");
|
||
defineSymbol(symbols_math, main, symbols_open, "\u27E8", "\\langle", true);
|
||
defineSymbol(symbols_math, main, symbols_open, "\u2223", "\\lvert");
|
||
defineSymbol(symbols_math, main, symbols_open, "\u2225", "\\lVert");
|
||
defineSymbol(symbols_math, main, symbols_close, ")", ")");
|
||
defineSymbol(symbols_math, main, symbols_close, "]", "]");
|
||
defineSymbol(symbols_math, main, symbols_close, "?", "?");
|
||
defineSymbol(symbols_math, main, symbols_close, "!", "!");
|
||
defineSymbol(symbols_math, main, symbols_close, "\u27E9", "\\rangle", true);
|
||
defineSymbol(symbols_math, main, symbols_close, "\u2223", "\\rvert");
|
||
defineSymbol(symbols_math, main, symbols_close, "\u2225", "\\rVert");
|
||
defineSymbol(symbols_math, main, rel, "=", "=");
|
||
defineSymbol(symbols_math, main, rel, "<", "<");
|
||
defineSymbol(symbols_math, main, rel, ">", ">");
|
||
defineSymbol(symbols_math, main, rel, ":", ":");
|
||
defineSymbol(symbols_math, main, rel, "\u2248", "\\approx", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2245", "\\cong", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2265", "\\ge");
|
||
defineSymbol(symbols_math, main, rel, "\u2265", "\\geq", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2190", "\\gets");
|
||
defineSymbol(symbols_math, main, rel, ">", "\\gt");
|
||
defineSymbol(symbols_math, main, rel, "\u2208", "\\in", true);
|
||
defineSymbol(symbols_math, main, rel, "\uE020", "\\@not");
|
||
defineSymbol(symbols_math, main, rel, "\u2282", "\\subset", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2283", "\\supset", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2286", "\\subseteq", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2287", "\\supseteq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2288", "\\nsubseteq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2289", "\\nsupseteq", true);
|
||
defineSymbol(symbols_math, main, rel, "\u22A8", "\\models");
|
||
defineSymbol(symbols_math, main, rel, "\u2190", "\\leftarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2264", "\\le");
|
||
defineSymbol(symbols_math, main, rel, "\u2264", "\\leq", true);
|
||
defineSymbol(symbols_math, main, rel, "<", "\\lt");
|
||
defineSymbol(symbols_math, main, rel, "\u2192", "\\rightarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2192", "\\to");
|
||
defineSymbol(symbols_math, ams, rel, "\u2271", "\\ngeq", true);
|
||
defineSymbol(symbols_math, ams, rel, "\u2270", "\\nleq", true);
|
||
defineSymbol(symbols_math, main, symbols_spacing, "\xA0", "\\ ");
|
||
defineSymbol(symbols_math, main, symbols_spacing, "\xA0", "~");
|
||
defineSymbol(symbols_math, main, symbols_spacing, "\xA0", "\\space"); // Ref: LaTeX Source 2e: \DeclareRobustCommand{\nobreakspace}{%
|
||
|
||
defineSymbol(symbols_math, main, symbols_spacing, "\xA0", "\\nobreakspace");
|
||
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "\\ ");
|
||
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "~");
|
||
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "\\space");
|
||
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "\\nobreakspace");
|
||
defineSymbol(symbols_math, main, symbols_spacing, null, "\\nobreak");
|
||
defineSymbol(symbols_math, main, symbols_spacing, null, "\\allowbreak");
|
||
defineSymbol(symbols_math, main, punct, ",", ",");
|
||
defineSymbol(symbols_math, main, punct, ";", ";");
|
||
defineSymbol(symbols_math, ams, bin, "\u22BC", "\\barwedge", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u22BB", "\\veebar", true);
|
||
defineSymbol(symbols_math, main, bin, "\u2299", "\\odot", true);
|
||
defineSymbol(symbols_math, main, bin, "\u2295", "\\oplus", true);
|
||
defineSymbol(symbols_math, main, bin, "\u2297", "\\otimes", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2202", "\\partial", true);
|
||
defineSymbol(symbols_math, main, bin, "\u2298", "\\oslash", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u229A", "\\circledcirc", true);
|
||
defineSymbol(symbols_math, ams, bin, "\u22A1", "\\boxdot", true);
|
||
defineSymbol(symbols_math, main, bin, "\u25B3", "\\bigtriangleup");
|
||
defineSymbol(symbols_math, main, bin, "\u25BD", "\\bigtriangledown");
|
||
defineSymbol(symbols_math, main, bin, "\u2020", "\\dagger");
|
||
defineSymbol(symbols_math, main, bin, "\u22C4", "\\diamond");
|
||
defineSymbol(symbols_math, main, bin, "\u22C6", "\\star");
|
||
defineSymbol(symbols_math, main, bin, "\u25C3", "\\triangleleft");
|
||
defineSymbol(symbols_math, main, bin, "\u25B9", "\\triangleright");
|
||
defineSymbol(symbols_math, main, symbols_open, "{", "\\{");
|
||
defineSymbol(symbols_text, main, symbols_textord, "{", "\\{");
|
||
defineSymbol(symbols_text, main, symbols_textord, "{", "\\textbraceleft");
|
||
defineSymbol(symbols_math, main, symbols_close, "}", "\\}");
|
||
defineSymbol(symbols_text, main, symbols_textord, "}", "\\}");
|
||
defineSymbol(symbols_text, main, symbols_textord, "}", "\\textbraceright");
|
||
defineSymbol(symbols_math, main, symbols_open, "{", "\\lbrace");
|
||
defineSymbol(symbols_math, main, symbols_close, "}", "\\rbrace");
|
||
defineSymbol(symbols_math, main, symbols_open, "[", "\\lbrack");
|
||
defineSymbol(symbols_text, main, symbols_textord, "[", "\\lbrack");
|
||
defineSymbol(symbols_math, main, symbols_close, "]", "\\rbrack");
|
||
defineSymbol(symbols_text, main, symbols_textord, "]", "\\rbrack");
|
||
defineSymbol(symbols_math, main, symbols_open, "(", "\\lparen");
|
||
defineSymbol(symbols_math, main, symbols_close, ")", "\\rparen");
|
||
defineSymbol(symbols_text, main, symbols_textord, "<", "\\textless"); // in T1 fontenc
|
||
|
||
defineSymbol(symbols_text, main, symbols_textord, ">", "\\textgreater"); // in T1 fontenc
|
||
|
||
defineSymbol(symbols_math, main, symbols_open, "\u230A", "\\lfloor", true);
|
||
defineSymbol(symbols_math, main, symbols_close, "\u230B", "\\rfloor", true);
|
||
defineSymbol(symbols_math, main, symbols_open, "\u2308", "\\lceil", true);
|
||
defineSymbol(symbols_math, main, symbols_close, "\u2309", "\\rceil", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\\", "\\backslash");
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2223", "|");
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2223", "\\vert");
|
||
defineSymbol(symbols_text, main, symbols_textord, "|", "\\textbar"); // in T1 fontenc
|
||
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2225", "\\|");
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u2225", "\\Vert");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2225", "\\textbardbl");
|
||
defineSymbol(symbols_text, main, symbols_textord, "~", "\\textasciitilde");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\\", "\\textbackslash");
|
||
defineSymbol(symbols_text, main, symbols_textord, "^", "\\textasciicircum");
|
||
defineSymbol(symbols_math, main, rel, "\u2191", "\\uparrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u21D1", "\\Uparrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2193", "\\downarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u21D3", "\\Downarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u2195", "\\updownarrow", true);
|
||
defineSymbol(symbols_math, main, rel, "\u21D5", "\\Updownarrow", true);
|
||
defineSymbol(symbols_math, main, op, "\u2210", "\\coprod");
|
||
defineSymbol(symbols_math, main, op, "\u22C1", "\\bigvee");
|
||
defineSymbol(symbols_math, main, op, "\u22C0", "\\bigwedge");
|
||
defineSymbol(symbols_math, main, op, "\u2A04", "\\biguplus");
|
||
defineSymbol(symbols_math, main, op, "\u22C2", "\\bigcap");
|
||
defineSymbol(symbols_math, main, op, "\u22C3", "\\bigcup");
|
||
defineSymbol(symbols_math, main, op, "\u222B", "\\int");
|
||
defineSymbol(symbols_math, main, op, "\u222B", "\\intop");
|
||
defineSymbol(symbols_math, main, op, "\u222C", "\\iint");
|
||
defineSymbol(symbols_math, main, op, "\u222D", "\\iiint");
|
||
defineSymbol(symbols_math, main, op, "\u220F", "\\prod");
|
||
defineSymbol(symbols_math, main, op, "\u2211", "\\sum");
|
||
defineSymbol(symbols_math, main, op, "\u2A02", "\\bigotimes");
|
||
defineSymbol(symbols_math, main, op, "\u2A01", "\\bigoplus");
|
||
defineSymbol(symbols_math, main, op, "\u2A00", "\\bigodot");
|
||
defineSymbol(symbols_math, main, op, "\u222E", "\\oint");
|
||
defineSymbol(symbols_math, main, op, "\u222F", "\\oiint");
|
||
defineSymbol(symbols_math, main, op, "\u2230", "\\oiiint");
|
||
defineSymbol(symbols_math, main, op, "\u2A06", "\\bigsqcup");
|
||
defineSymbol(symbols_math, main, op, "\u222B", "\\smallint");
|
||
defineSymbol(symbols_text, main, symbols_inner, "\u2026", "\\textellipsis");
|
||
defineSymbol(symbols_math, main, symbols_inner, "\u2026", "\\mathellipsis");
|
||
defineSymbol(symbols_text, main, symbols_inner, "\u2026", "\\ldots", true);
|
||
defineSymbol(symbols_math, main, symbols_inner, "\u2026", "\\ldots", true);
|
||
defineSymbol(symbols_math, main, symbols_inner, "\u22EF", "\\@cdots", true);
|
||
defineSymbol(symbols_math, main, symbols_inner, "\u22F1", "\\ddots", true);
|
||
defineSymbol(symbols_math, main, symbols_textord, "\u22EE", "\\varvdots"); // \vdots is a macro
|
||
|
||
defineSymbol(symbols_math, main, symbols_accent, "\u02CA", "\\acute");
|
||
defineSymbol(symbols_math, main, symbols_accent, "\u02CB", "\\grave");
|
||
defineSymbol(symbols_math, main, symbols_accent, "\xA8", "\\ddot");
|
||
defineSymbol(symbols_math, main, symbols_accent, "~", "\\tilde");
|
||
defineSymbol(symbols_math, main, symbols_accent, "\u02C9", "\\bar");
|
||
defineSymbol(symbols_math, main, symbols_accent, "\u02D8", "\\breve");
|
||
defineSymbol(symbols_math, main, symbols_accent, "\u02C7", "\\check");
|
||
defineSymbol(symbols_math, main, symbols_accent, "^", "\\hat");
|
||
defineSymbol(symbols_math, main, symbols_accent, "\u20D7", "\\vec");
|
||
defineSymbol(symbols_math, main, symbols_accent, "\u02D9", "\\dot");
|
||
defineSymbol(symbols_math, main, symbols_accent, "\u02DA", "\\mathring");
|
||
defineSymbol(symbols_math, main, mathord, "\u0131", "\\imath", true);
|
||
defineSymbol(symbols_math, main, mathord, "\u0237", "\\jmath", true);
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u0131", "\\i", true);
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u0237", "\\j", true);
|
||
defineSymbol(symbols_text, main, symbols_textord, "\xDF", "\\ss", true);
|
||
defineSymbol(symbols_text, main, symbols_textord, "\xE6", "\\ae", true);
|
||
defineSymbol(symbols_text, main, symbols_textord, "\xE6", "\\ae", true);
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u0153", "\\oe", true);
|
||
defineSymbol(symbols_text, main, symbols_textord, "\xF8", "\\o", true);
|
||
defineSymbol(symbols_text, main, symbols_textord, "\xC6", "\\AE", true);
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u0152", "\\OE", true);
|
||
defineSymbol(symbols_text, main, symbols_textord, "\xD8", "\\O", true);
|
||
defineSymbol(symbols_text, main, symbols_accent, "\u02CA", "\\'"); // acute
|
||
|
||
defineSymbol(symbols_text, main, symbols_accent, "\u02CB", "\\`"); // grave
|
||
|
||
defineSymbol(symbols_text, main, symbols_accent, "\u02C6", "\\^"); // circumflex
|
||
|
||
defineSymbol(symbols_text, main, symbols_accent, "\u02DC", "\\~"); // tilde
|
||
|
||
defineSymbol(symbols_text, main, symbols_accent, "\u02C9", "\\="); // macron
|
||
|
||
defineSymbol(symbols_text, main, symbols_accent, "\u02D8", "\\u"); // breve
|
||
|
||
defineSymbol(symbols_text, main, symbols_accent, "\u02D9", "\\."); // dot above
|
||
|
||
defineSymbol(symbols_text, main, symbols_accent, "\u02DA", "\\r"); // ring above
|
||
|
||
defineSymbol(symbols_text, main, symbols_accent, "\u02C7", "\\v"); // caron
|
||
|
||
defineSymbol(symbols_text, main, symbols_accent, "\xA8", '\\"'); // diaresis
|
||
|
||
defineSymbol(symbols_text, main, symbols_accent, "\u02DD", "\\H"); // double acute
|
||
|
||
defineSymbol(symbols_text, main, symbols_accent, "\u25EF", "\\textcircled"); // \bigcirc glyph
|
||
// These ligatures are detected and created in Parser.js's `formLigatures`.
|
||
|
||
var ligatures = {
|
||
"--": true,
|
||
"---": true,
|
||
"``": true,
|
||
"''": true
|
||
};
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2013", "--");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2013", "\\textendash");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2014", "---");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2014", "\\textemdash");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2018", "`");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2018", "\\textquoteleft");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2019", "'");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2019", "\\textquoteright");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u201C", "``");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u201C", "\\textquotedblleft");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u201D", "''");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u201D", "\\textquotedblright"); // \degree from gensymb package
|
||
|
||
defineSymbol(symbols_math, main, symbols_textord, "\xB0", "\\degree", true);
|
||
defineSymbol(symbols_text, main, symbols_textord, "\xB0", "\\degree"); // \textdegree from inputenc package
|
||
|
||
defineSymbol(symbols_text, main, symbols_textord, "\xB0", "\\textdegree", true); // TODO: In LaTeX, \pounds can generate a different character in text and math
|
||
// mode, but among our fonts, only Main-Italic defines this character "163".
|
||
|
||
defineSymbol(symbols_math, main, mathord, "\xA3", "\\pounds");
|
||
defineSymbol(symbols_math, main, mathord, "\xA3", "\\mathsterling", true);
|
||
defineSymbol(symbols_text, main, mathord, "\xA3", "\\pounds");
|
||
defineSymbol(symbols_text, main, mathord, "\xA3", "\\textsterling", true);
|
||
defineSymbol(symbols_math, ams, symbols_textord, "\u2720", "\\maltese");
|
||
defineSymbol(symbols_text, ams, symbols_textord, "\u2720", "\\maltese");
|
||
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "\\ ");
|
||
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", " ");
|
||
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "~"); // There are lots of symbols which are the same, so we add them in afterwards.
|
||
// All of these are textords in math mode
|
||
|
||
var mathTextSymbols = "0123456789/@.\"";
|
||
|
||
for (var symbols_i = 0; symbols_i < mathTextSymbols.length; symbols_i++) {
|
||
var symbols_ch = mathTextSymbols.charAt(symbols_i);
|
||
defineSymbol(symbols_math, main, symbols_textord, symbols_ch, symbols_ch);
|
||
} // All of these are textords in text mode
|
||
|
||
|
||
var textSymbols = "0123456789!@*()-=+[]<>|\";:?/.,";
|
||
|
||
for (var src_symbols_i = 0; src_symbols_i < textSymbols.length; src_symbols_i++) {
|
||
var _ch = textSymbols.charAt(src_symbols_i);
|
||
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch, _ch);
|
||
} // All of these are textords in text mode, and mathords in math mode
|
||
|
||
|
||
var letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||
|
||
for (var symbols_i2 = 0; symbols_i2 < letters.length; symbols_i2++) {
|
||
var _ch2 = letters.charAt(symbols_i2);
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch2, _ch2);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch2, _ch2);
|
||
} // Blackboard bold and script letters in Unicode range
|
||
|
||
|
||
defineSymbol(symbols_math, ams, symbols_textord, "C", "\u2102"); // blackboard bold
|
||
|
||
defineSymbol(symbols_text, ams, symbols_textord, "C", "\u2102");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "H", "\u210D");
|
||
defineSymbol(symbols_text, ams, symbols_textord, "H", "\u210D");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "N", "\u2115");
|
||
defineSymbol(symbols_text, ams, symbols_textord, "N", "\u2115");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "P", "\u2119");
|
||
defineSymbol(symbols_text, ams, symbols_textord, "P", "\u2119");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "Q", "\u211A");
|
||
defineSymbol(symbols_text, ams, symbols_textord, "Q", "\u211A");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "R", "\u211D");
|
||
defineSymbol(symbols_text, ams, symbols_textord, "R", "\u211D");
|
||
defineSymbol(symbols_math, ams, symbols_textord, "Z", "\u2124");
|
||
defineSymbol(symbols_text, ams, symbols_textord, "Z", "\u2124");
|
||
defineSymbol(symbols_math, main, mathord, "h", "\u210E"); // italic h, Planck constant
|
||
|
||
defineSymbol(symbols_text, main, mathord, "h", "\u210E"); // The next loop loads wide (surrogate pair) characters.
|
||
// We support some letters in the Unicode range U+1D400 to U+1D7FF,
|
||
// Mathematical Alphanumeric Symbols.
|
||
// Some editors do not deal well with wide characters. So don't write the
|
||
// string into this file. Instead, create the string from the surrogate pair.
|
||
|
||
var symbols_wideChar = "";
|
||
|
||
for (var symbols_i3 = 0; symbols_i3 < letters.length; symbols_i3++) {
|
||
var _ch3 = letters.charAt(symbols_i3); // The hex numbers in the next line are a surrogate pair.
|
||
// 0xD835 is the high surrogate for all letters in the range we support.
|
||
// 0xDC00 is the low surrogate for bold A.
|
||
|
||
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDC00 + symbols_i3); // A-Z a-z bold
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDC34 + symbols_i3); // A-Z a-z italic
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDC68 + symbols_i3); // A-Z a-z bold italic
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDD04 + symbols_i3); // A-Z a-z Fractur
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDDA0 + symbols_i3); // A-Z a-z sans-serif
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDDD4 + symbols_i3); // A-Z a-z sans bold
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDE08 + symbols_i3); // A-Z a-z sans italic
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDE70 + symbols_i3); // A-Z a-z monospace
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
|
||
|
||
if (symbols_i3 < 26) {
|
||
// KaTeX fonts have only capital letters for blackboard bold and script.
|
||
// See exception for k below.
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDD38 + symbols_i3); // A-Z double struck
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDC9C + symbols_i3); // A-Z script
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch3, symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch3, symbols_wideChar);
|
||
} // TODO: Add bold script when it is supported by a KaTeX font.
|
||
|
||
} // "k" is the only double struck lower case letter in the KaTeX fonts.
|
||
|
||
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDD5C); // k double struck
|
||
|
||
defineSymbol(symbols_math, main, mathord, "k", symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, "k", symbols_wideChar); // Next, some wide character numerals
|
||
|
||
for (var symbols_i4 = 0; symbols_i4 < 10; symbols_i4++) {
|
||
var _ch4 = symbols_i4.toString();
|
||
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDFCE + symbols_i4); // 0-9 bold
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch4, symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch4, symbols_wideChar);
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDFE2 + symbols_i4); // 0-9 sans serif
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch4, symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch4, symbols_wideChar);
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDFEC + symbols_i4); // 0-9 bold sans
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch4, symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch4, symbols_wideChar);
|
||
symbols_wideChar = String.fromCharCode(0xD835, 0xDFF6 + symbols_i4); // 0-9 monospace
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch4, symbols_wideChar);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch4, symbols_wideChar);
|
||
} // We add these Latin-1 letters as symbols for backwards-compatibility,
|
||
// but they are not actually in the font, nor are they supported by the
|
||
// Unicode accent mechanism, so they fall back to Times font and look ugly.
|
||
// TODO(edemaine): Fix this.
|
||
|
||
|
||
var extraLatin = "ÇÐÞçþ";
|
||
|
||
for (var _i5 = 0; _i5 < extraLatin.length; _i5++) {
|
||
var _ch5 = extraLatin.charAt(_i5);
|
||
|
||
defineSymbol(symbols_math, main, mathord, _ch5, _ch5);
|
||
defineSymbol(symbols_text, main, symbols_textord, _ch5, _ch5);
|
||
}
|
||
|
||
defineSymbol(symbols_text, main, symbols_textord, "ð", "ð"); // Unicode versions of existing characters
|
||
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2013", "–");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2014", "—");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2018", "‘");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u2019", "’");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u201C", "“");
|
||
defineSymbol(symbols_text, main, symbols_textord, "\u201D", "”");
|
||
// CONCATENATED MODULE: ./src/wide-character.js
|
||
/**
|
||
* This file provides support for Unicode range U+1D400 to U+1D7FF,
|
||
* Mathematical Alphanumeric Symbols.
|
||
*
|
||
* Function wideCharacterFont takes a wide character as input and returns
|
||
* the font information necessary to render it properly.
|
||
*/
|
||
|
||
/**
|
||
* Data below is from https://www.unicode.org/charts/PDF/U1D400.pdf
|
||
* That document sorts characters into groups by font type, say bold or italic.
|
||
*
|
||
* In the arrays below, each subarray consists three elements:
|
||
* * The CSS class of that group when in math mode.
|
||
* * The CSS class of that group when in text mode.
|
||
* * The font name, so that KaTeX can get font metrics.
|
||
*/
|
||
|
||
var wideLatinLetterData = [["mathbf", "textbf", "Main-Bold"], // A-Z bold upright
|
||
["mathbf", "textbf", "Main-Bold"], // a-z bold upright
|
||
["mathdefault", "textit", "Math-Italic"], // A-Z italic
|
||
["mathdefault", "textit", "Math-Italic"], // a-z italic
|
||
["boldsymbol", "boldsymbol", "Main-BoldItalic"], // A-Z bold italic
|
||
["boldsymbol", "boldsymbol", "Main-BoldItalic"], // a-z bold italic
|
||
// Map fancy A-Z letters to script, not calligraphic.
|
||
// This aligns with unicode-math and math fonts (except Cambria Math).
|
||
["mathscr", "textscr", "Script-Regular"], // A-Z script
|
||
["", "", ""], // a-z script. No font
|
||
["", "", ""], // A-Z bold script. No font
|
||
["", "", ""], // a-z bold script. No font
|
||
["mathfrak", "textfrak", "Fraktur-Regular"], // A-Z Fraktur
|
||
["mathfrak", "textfrak", "Fraktur-Regular"], // a-z Fraktur
|
||
["mathbb", "textbb", "AMS-Regular"], // A-Z double-struck
|
||
["mathbb", "textbb", "AMS-Regular"], // k double-struck
|
||
["", "", ""], // A-Z bold Fraktur No font metrics
|
||
["", "", ""], // a-z bold Fraktur. No font.
|
||
["mathsf", "textsf", "SansSerif-Regular"], // A-Z sans-serif
|
||
["mathsf", "textsf", "SansSerif-Regular"], // a-z sans-serif
|
||
["mathboldsf", "textboldsf", "SansSerif-Bold"], // A-Z bold sans-serif
|
||
["mathboldsf", "textboldsf", "SansSerif-Bold"], // a-z bold sans-serif
|
||
["mathitsf", "textitsf", "SansSerif-Italic"], // A-Z italic sans-serif
|
||
["mathitsf", "textitsf", "SansSerif-Italic"], // a-z italic sans-serif
|
||
["", "", ""], // A-Z bold italic sans. No font
|
||
["", "", ""], // a-z bold italic sans. No font
|
||
["mathtt", "texttt", "Typewriter-Regular"], // A-Z monospace
|
||
["mathtt", "texttt", "Typewriter-Regular"]];
|
||
var wideNumeralData = [["mathbf", "textbf", "Main-Bold"], // 0-9 bold
|
||
["", "", ""], // 0-9 double-struck. No KaTeX font.
|
||
["mathsf", "textsf", "SansSerif-Regular"], // 0-9 sans-serif
|
||
["mathboldsf", "textboldsf", "SansSerif-Bold"], // 0-9 bold sans-serif
|
||
["mathtt", "texttt", "Typewriter-Regular"]];
|
||
var wide_character_wideCharacterFont = function wideCharacterFont(wideChar, mode) {
|
||
// IE doesn't support codePointAt(). So work with the surrogate pair.
|
||
var H = wideChar.charCodeAt(0); // high surrogate
|
||
|
||
var L = wideChar.charCodeAt(1); // low surrogate
|
||
|
||
var codePoint = (H - 0xD800) * 0x400 + (L - 0xDC00) + 0x10000;
|
||
var j = mode === "math" ? 0 : 1; // column index for CSS class.
|
||
|
||
if (0x1D400 <= codePoint && codePoint < 0x1D6A4) {
|
||
// wideLatinLetterData contains exactly 26 chars on each row.
|
||
// So we can calculate the relevant row. No traverse necessary.
|
||
var i = Math.floor((codePoint - 0x1D400) / 26);
|
||
return [wideLatinLetterData[i][2], wideLatinLetterData[i][j]];
|
||
} else if (0x1D7CE <= codePoint && codePoint <= 0x1D7FF) {
|
||
// Numerals, ten per row.
|
||
var _i = Math.floor((codePoint - 0x1D7CE) / 10);
|
||
|
||
return [wideNumeralData[_i][2], wideNumeralData[_i][j]];
|
||
} else if (codePoint === 0x1D6A5 || codePoint === 0x1D6A6) {
|
||
// dotless i or j
|
||
return [wideLatinLetterData[0][2], wideLatinLetterData[0][j]];
|
||
} else if (0x1D6A6 < codePoint && codePoint < 0x1D7CE) {
|
||
// Greek letters. Not supported, yet.
|
||
return ["", ""];
|
||
} else {
|
||
// We don't support any wide characters outside 1D400–1D7FF.
|
||
throw new src_ParseError("Unsupported character: " + wideChar);
|
||
}
|
||
};
|
||
// CONCATENATED MODULE: ./src/Options.js
|
||
/**
|
||
* This file contains information about the options that the Parser carries
|
||
* around with it while parsing. Data is held in an `Options` object, and when
|
||
* recursing, a new `Options` object can be created with the `.with*` and
|
||
* `.reset` functions.
|
||
*/
|
||
|
||
var sizeStyleMap = [// Each element contains [textsize, scriptsize, scriptscriptsize].
|
||
// The size mappings are taken from TeX with \normalsize=10pt.
|
||
[1, 1, 1], // size1: [5, 5, 5] \tiny
|
||
[2, 1, 1], // size2: [6, 5, 5]
|
||
[3, 1, 1], // size3: [7, 5, 5] \scriptsize
|
||
[4, 2, 1], // size4: [8, 6, 5] \footnotesize
|
||
[5, 2, 1], // size5: [9, 6, 5] \small
|
||
[6, 3, 1], // size6: [10, 7, 5] \normalsize
|
||
[7, 4, 2], // size7: [12, 8, 6] \large
|
||
[8, 6, 3], // size8: [14.4, 10, 7] \Large
|
||
[9, 7, 6], // size9: [17.28, 12, 10] \LARGE
|
||
[10, 8, 7], // size10: [20.74, 14.4, 12] \huge
|
||
[11, 10, 9]];
|
||
var sizeMultipliers = [// fontMetrics.js:getGlobalMetrics also uses size indexes, so if
|
||
// you change size indexes, change that function.
|
||
0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.2, 1.44, 1.728, 2.074, 2.488];
|
||
|
||
var sizeAtStyle = function sizeAtStyle(size, style) {
|
||
return style.size < 2 ? size : sizeStyleMap[size - 1][style.size - 1];
|
||
}; // In these types, "" (empty string) means "no change".
|
||
|
||
|
||
/**
|
||
* This is the main options class. It contains the current style, size, color,
|
||
* and font.
|
||
*
|
||
* Options objects should not be modified. To create a new Options with
|
||
* different properties, call a `.having*` method.
|
||
*/
|
||
var Options_Options =
|
||
/*#__PURE__*/
|
||
function () {
|
||
// A font family applies to a group of fonts (i.e. SansSerif), while a font
|
||
// represents a specific font (i.e. SansSerif Bold).
|
||
// See: https://tex.stackexchange.com/questions/22350/difference-between-textrm-and-mathrm
|
||
|
||
/**
|
||
* The base size index.
|
||
*/
|
||
function Options(data) {
|
||
this.style = void 0;
|
||
this.color = void 0;
|
||
this.size = void 0;
|
||
this.textSize = void 0;
|
||
this.phantom = void 0;
|
||
this.font = void 0;
|
||
this.fontFamily = void 0;
|
||
this.fontWeight = void 0;
|
||
this.fontShape = void 0;
|
||
this.sizeMultiplier = void 0;
|
||
this.maxSize = void 0;
|
||
this.minRuleThickness = void 0;
|
||
this._fontMetrics = void 0;
|
||
this.style = data.style;
|
||
this.color = data.color;
|
||
this.size = data.size || Options.BASESIZE;
|
||
this.textSize = data.textSize || this.size;
|
||
this.phantom = !!data.phantom;
|
||
this.font = data.font || "";
|
||
this.fontFamily = data.fontFamily || "";
|
||
this.fontWeight = data.fontWeight || '';
|
||
this.fontShape = data.fontShape || '';
|
||
this.sizeMultiplier = sizeMultipliers[this.size - 1];
|
||
this.maxSize = data.maxSize;
|
||
this.minRuleThickness = data.minRuleThickness;
|
||
this._fontMetrics = undefined;
|
||
}
|
||
/**
|
||
* Returns a new options object with the same properties as "this". Properties
|
||
* from "extension" will be copied to the new options object.
|
||
*/
|
||
|
||
|
||
var _proto = Options.prototype;
|
||
|
||
_proto.extend = function extend(extension) {
|
||
var data = {
|
||
style: this.style,
|
||
size: this.size,
|
||
textSize: this.textSize,
|
||
color: this.color,
|
||
phantom: this.phantom,
|
||
font: this.font,
|
||
fontFamily: this.fontFamily,
|
||
fontWeight: this.fontWeight,
|
||
fontShape: this.fontShape,
|
||
maxSize: this.maxSize,
|
||
minRuleThickness: this.minRuleThickness
|
||
};
|
||
|
||
for (var key in extension) {
|
||
if (extension.hasOwnProperty(key)) {
|
||
data[key] = extension[key];
|
||
}
|
||
}
|
||
|
||
return new Options(data);
|
||
}
|
||
/**
|
||
* Return an options object with the given style. If `this.style === style`,
|
||
* returns `this`.
|
||
*/
|
||
;
|
||
|
||
_proto.havingStyle = function havingStyle(style) {
|
||
if (this.style === style) {
|
||
return this;
|
||
} else {
|
||
return this.extend({
|
||
style: style,
|
||
size: sizeAtStyle(this.textSize, style)
|
||
});
|
||
}
|
||
}
|
||
/**
|
||
* Return an options object with a cramped version of the current style. If
|
||
* the current style is cramped, returns `this`.
|
||
*/
|
||
;
|
||
|
||
_proto.havingCrampedStyle = function havingCrampedStyle() {
|
||
return this.havingStyle(this.style.cramp());
|
||
}
|
||
/**
|
||
* Return an options object with the given size and in at least `\textstyle`.
|
||
* Returns `this` if appropriate.
|
||
*/
|
||
;
|
||
|
||
_proto.havingSize = function havingSize(size) {
|
||
if (this.size === size && this.textSize === size) {
|
||
return this;
|
||
} else {
|
||
return this.extend({
|
||
style: this.style.text(),
|
||
size: size,
|
||
textSize: size,
|
||
sizeMultiplier: sizeMultipliers[size - 1]
|
||
});
|
||
}
|
||
}
|
||
/**
|
||
* Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted,
|
||
* changes to at least `\textstyle`.
|
||
*/
|
||
;
|
||
|
||
_proto.havingBaseStyle = function havingBaseStyle(style) {
|
||
style = style || this.style.text();
|
||
var wantSize = sizeAtStyle(Options.BASESIZE, style);
|
||
|
||
if (this.size === wantSize && this.textSize === Options.BASESIZE && this.style === style) {
|
||
return this;
|
||
} else {
|
||
return this.extend({
|
||
style: style,
|
||
size: wantSize
|
||
});
|
||
}
|
||
}
|
||
/**
|
||
* Remove the effect of sizing changes such as \Huge.
|
||
* Keep the effect of the current style, such as \scriptstyle.
|
||
*/
|
||
;
|
||
|
||
_proto.havingBaseSizing = function havingBaseSizing() {
|
||
var size;
|
||
|
||
switch (this.style.id) {
|
||
case 4:
|
||
case 5:
|
||
size = 3; // normalsize in scriptstyle
|
||
|
||
break;
|
||
|
||
case 6:
|
||
case 7:
|
||
size = 1; // normalsize in scriptscriptstyle
|
||
|
||
break;
|
||
|
||
default:
|
||
size = 6;
|
||
// normalsize in textstyle or displaystyle
|
||
}
|
||
|
||
return this.extend({
|
||
style: this.style.text(),
|
||
size: size
|
||
});
|
||
}
|
||
/**
|
||
* Create a new options object with the given color.
|
||
*/
|
||
;
|
||
|
||
_proto.withColor = function withColor(color) {
|
||
return this.extend({
|
||
color: color
|
||
});
|
||
}
|
||
/**
|
||
* Create a new options object with "phantom" set to true.
|
||
*/
|
||
;
|
||
|
||
_proto.withPhantom = function withPhantom() {
|
||
return this.extend({
|
||
phantom: true
|
||
});
|
||
}
|
||
/**
|
||
* Creates a new options object with the given math font or old text font.
|
||
* @type {[type]}
|
||
*/
|
||
;
|
||
|
||
_proto.withFont = function withFont(font) {
|
||
return this.extend({
|
||
font: font
|
||
});
|
||
}
|
||
/**
|
||
* Create a new options objects with the given fontFamily.
|
||
*/
|
||
;
|
||
|
||
_proto.withTextFontFamily = function withTextFontFamily(fontFamily) {
|
||
return this.extend({
|
||
fontFamily: fontFamily,
|
||
font: ""
|
||
});
|
||
}
|
||
/**
|
||
* Creates a new options object with the given font weight
|
||
*/
|
||
;
|
||
|
||
_proto.withTextFontWeight = function withTextFontWeight(fontWeight) {
|
||
return this.extend({
|
||
fontWeight: fontWeight,
|
||
font: ""
|
||
});
|
||
}
|
||
/**
|
||
* Creates a new options object with the given font weight
|
||
*/
|
||
;
|
||
|
||
_proto.withTextFontShape = function withTextFontShape(fontShape) {
|
||
return this.extend({
|
||
fontShape: fontShape,
|
||
font: ""
|
||
});
|
||
}
|
||
/**
|
||
* Return the CSS sizing classes required to switch from enclosing options
|
||
* `oldOptions` to `this`. Returns an array of classes.
|
||
*/
|
||
;
|
||
|
||
_proto.sizingClasses = function sizingClasses(oldOptions) {
|
||
if (oldOptions.size !== this.size) {
|
||
return ["sizing", "reset-size" + oldOptions.size, "size" + this.size];
|
||
} else {
|
||
return [];
|
||
}
|
||
}
|
||
/**
|
||
* Return the CSS sizing classes required to switch to the base size. Like
|
||
* `this.havingSize(BASESIZE).sizingClasses(this)`.
|
||
*/
|
||
;
|
||
|
||
_proto.baseSizingClasses = function baseSizingClasses() {
|
||
if (this.size !== Options.BASESIZE) {
|
||
return ["sizing", "reset-size" + this.size, "size" + Options.BASESIZE];
|
||
} else {
|
||
return [];
|
||
}
|
||
}
|
||
/**
|
||
* Return the font metrics for this size.
|
||
*/
|
||
;
|
||
|
||
_proto.fontMetrics = function fontMetrics() {
|
||
if (!this._fontMetrics) {
|
||
this._fontMetrics = getGlobalMetrics(this.size);
|
||
}
|
||
|
||
return this._fontMetrics;
|
||
}
|
||
/**
|
||
* Gets the CSS color of the current options object
|
||
*/
|
||
;
|
||
|
||
_proto.getColor = function getColor() {
|
||
if (this.phantom) {
|
||
return "transparent";
|
||
} else {
|
||
return this.color;
|
||
}
|
||
};
|
||
|
||
return Options;
|
||
}();
|
||
|
||
Options_Options.BASESIZE = 6;
|
||
/* harmony default export */ var src_Options = (Options_Options);
|
||
// CONCATENATED MODULE: ./src/units.js
|
||
/**
|
||
* This file does conversion between units. In particular, it provides
|
||
* calculateSize to convert other units into ems.
|
||
*/
|
||
|
||
// This table gives the number of TeX pts in one of each *absolute* TeX unit.
|
||
// Thus, multiplying a length by this number converts the length from units
|
||
// into pts. Dividing the result by ptPerEm gives the number of ems
|
||
// *assuming* a font size of ptPerEm (normal size, normal style).
|
||
|
||
var ptPerUnit = {
|
||
// https://en.wikibooks.org/wiki/LaTeX/Lengths and
|
||
// https://tex.stackexchange.com/a/8263
|
||
"pt": 1,
|
||
// TeX point
|
||
"mm": 7227 / 2540,
|
||
// millimeter
|
||
"cm": 7227 / 254,
|
||
// centimeter
|
||
"in": 72.27,
|
||
// inch
|
||
"bp": 803 / 800,
|
||
// big (PostScript) points
|
||
"pc": 12,
|
||
// pica
|
||
"dd": 1238 / 1157,
|
||
// didot
|
||
"cc": 14856 / 1157,
|
||
// cicero (12 didot)
|
||
"nd": 685 / 642,
|
||
// new didot
|
||
"nc": 1370 / 107,
|
||
// new cicero (12 new didot)
|
||
"sp": 1 / 65536,
|
||
// scaled point (TeX's internal smallest unit)
|
||
// https://tex.stackexchange.com/a/41371
|
||
"px": 803 / 800 // \pdfpxdimen defaults to 1 bp in pdfTeX and LuaTeX
|
||
|
||
}; // Dictionary of relative units, for fast validity testing.
|
||
|
||
var relativeUnit = {
|
||
"ex": true,
|
||
"em": true,
|
||
"mu": true
|
||
};
|
||
|
||
/**
|
||
* Determine whether the specified unit (either a string defining the unit
|
||
* or a "size" parse node containing a unit field) is valid.
|
||
*/
|
||
var validUnit = function validUnit(unit) {
|
||
if (typeof unit !== "string") {
|
||
unit = unit.unit;
|
||
}
|
||
|
||
return unit in ptPerUnit || unit in relativeUnit || unit === "ex";
|
||
};
|
||
/*
|
||
* Convert a "size" parse node (with numeric "number" and string "unit" fields,
|
||
* as parsed by functions.js argType "size") into a CSS em value for the
|
||
* current style/scale. `options` gives the current options.
|
||
*/
|
||
|
||
var units_calculateSize = function calculateSize(sizeValue, options) {
|
||
var scale;
|
||
|
||
if (sizeValue.unit in ptPerUnit) {
|
||
// Absolute units
|
||
scale = ptPerUnit[sizeValue.unit] // Convert unit to pt
|
||
/ options.fontMetrics().ptPerEm // Convert pt to CSS em
|
||
/ options.sizeMultiplier; // Unscale to make absolute units
|
||
} else if (sizeValue.unit === "mu") {
|
||
// `mu` units scale with scriptstyle/scriptscriptstyle.
|
||
scale = options.fontMetrics().cssEmPerMu;
|
||
} else {
|
||
// Other relative units always refer to the *textstyle* font
|
||
// in the current size.
|
||
var unitOptions;
|
||
|
||
if (options.style.isTight()) {
|
||
// isTight() means current style is script/scriptscript.
|
||
unitOptions = options.havingStyle(options.style.text());
|
||
} else {
|
||
unitOptions = options;
|
||
} // TODO: In TeX these units are relative to the quad of the current
|
||
// *text* font, e.g. cmr10. KaTeX instead uses values from the
|
||
// comparably-sized *Computer Modern symbol* font. At 10pt, these
|
||
// match. At 7pt and 5pt, they differ: cmr7=1.138894, cmsy7=1.170641;
|
||
// cmr5=1.361133, cmsy5=1.472241. Consider $\scriptsize a\kern1emb$.
|
||
// TeX \showlists shows a kern of 1.13889 * fontsize;
|
||
// KaTeX shows a kern of 1.171 * fontsize.
|
||
|
||
|
||
if (sizeValue.unit === "ex") {
|
||
scale = unitOptions.fontMetrics().xHeight;
|
||
} else if (sizeValue.unit === "em") {
|
||
scale = unitOptions.fontMetrics().quad;
|
||
} else {
|
||
throw new src_ParseError("Invalid unit: '" + sizeValue.unit + "'");
|
||
}
|
||
|
||
if (unitOptions !== options) {
|
||
scale *= unitOptions.sizeMultiplier / options.sizeMultiplier;
|
||
}
|
||
}
|
||
|
||
return Math.min(sizeValue.number * scale, options.maxSize);
|
||
};
|
||
// CONCATENATED MODULE: ./src/buildCommon.js
|
||
/* eslint no-console:0 */
|
||
|
||
/**
|
||
* This module contains general functions that can be used for building
|
||
* different kinds of domTree nodes in a consistent manner.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// The following have to be loaded from Main-Italic font, using class mathit
|
||
var mathitLetters = ["\\imath", "ı", // dotless i
|
||
"\\jmath", "ȷ", // dotless j
|
||
"\\pounds", "\\mathsterling", "\\textsterling", "£"];
|
||
/**
|
||
* Looks up the given symbol in fontMetrics, after applying any symbol
|
||
* replacements defined in symbol.js
|
||
*/
|
||
|
||
var buildCommon_lookupSymbol = function lookupSymbol(value, // TODO(#963): Use a union type for this.
|
||
fontName, mode) {
|
||
// Replace the value with its replaced value from symbol.js
|
||
if (src_symbols[mode][value] && src_symbols[mode][value].replace) {
|
||
value = src_symbols[mode][value].replace;
|
||
}
|
||
|
||
return {
|
||
value: value,
|
||
metrics: getCharacterMetrics(value, fontName, mode)
|
||
};
|
||
};
|
||
/**
|
||
* Makes a symbolNode after translation via the list of symbols in symbols.js.
|
||
* Correctly pulls out metrics for the character, and optionally takes a list of
|
||
* classes to be attached to the node.
|
||
*
|
||
* TODO: make argument order closer to makeSpan
|
||
* TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which
|
||
* should if present come first in `classes`.
|
||
* TODO(#953): Make `options` mandatory and always pass it in.
|
||
*/
|
||
|
||
|
||
var buildCommon_makeSymbol = function makeSymbol(value, fontName, mode, options, classes) {
|
||
var lookup = buildCommon_lookupSymbol(value, fontName, mode);
|
||
var metrics = lookup.metrics;
|
||
value = lookup.value;
|
||
var symbolNode;
|
||
|
||
if (metrics) {
|
||
var italic = metrics.italic;
|
||
|
||
if (mode === "text" || options && options.font === "mathit") {
|
||
italic = 0;
|
||
}
|
||
|
||
symbolNode = new domTree_SymbolNode(value, metrics.height, metrics.depth, italic, metrics.skew, metrics.width, classes);
|
||
} else {
|
||
// TODO(emily): Figure out a good way to only print this in development
|
||
typeof console !== "undefined" && console.warn("No character metrics " + ("for '" + value + "' in style '" + fontName + "' and mode '" + mode + "'"));
|
||
symbolNode = new domTree_SymbolNode(value, 0, 0, 0, 0, 0, classes);
|
||
}
|
||
|
||
if (options) {
|
||
symbolNode.maxFontSize = options.sizeMultiplier;
|
||
|
||
if (options.style.isTight()) {
|
||
symbolNode.classes.push("mtight");
|
||
}
|
||
|
||
var color = options.getColor();
|
||
|
||
if (color) {
|
||
symbolNode.style.color = color;
|
||
}
|
||
}
|
||
|
||
return symbolNode;
|
||
};
|
||
/**
|
||
* Makes a symbol in Main-Regular or AMS-Regular.
|
||
* Used for rel, bin, open, close, inner, and punct.
|
||
*/
|
||
|
||
|
||
var buildCommon_mathsym = function mathsym(value, mode, options, classes) {
|
||
if (classes === void 0) {
|
||
classes = [];
|
||
}
|
||
|
||
// Decide what font to render the symbol in by its entry in the symbols
|
||
// table.
|
||
// Have a special case for when the value = \ because the \ is used as a
|
||
// textord in unsupported command errors but cannot be parsed as a regular
|
||
// text ordinal and is therefore not present as a symbol in the symbols
|
||
// table for text, as well as a special case for boldsymbol because it
|
||
// can be used for bold + and -
|
||
if (options.font === "boldsymbol" && buildCommon_lookupSymbol(value, "Main-Bold", mode).metrics) {
|
||
return buildCommon_makeSymbol(value, "Main-Bold", mode, options, classes.concat(["mathbf"]));
|
||
} else if (value === "\\" || src_symbols[mode][value].font === "main") {
|
||
return buildCommon_makeSymbol(value, "Main-Regular", mode, options, classes);
|
||
} else {
|
||
return buildCommon_makeSymbol(value, "AMS-Regular", mode, options, classes.concat(["amsrm"]));
|
||
}
|
||
};
|
||
/**
|
||
* Determines which of the two font names (Main-Italic and Math-Italic) and
|
||
* corresponding style tags (maindefault or mathit) to use for default math font,
|
||
* depending on the symbol.
|
||
*/
|
||
|
||
|
||
var buildCommon_mathdefault = function mathdefault(value, mode, options, classes) {
|
||
if (/[0-9]/.test(value.charAt(0)) || // glyphs for \imath and \jmath do not exist in Math-Italic so we
|
||
// need to use Main-Italic instead
|
||
utils.contains(mathitLetters, value)) {
|
||
return {
|
||
fontName: "Main-Italic",
|
||
fontClass: "mathit"
|
||
};
|
||
} else {
|
||
return {
|
||
fontName: "Math-Italic",
|
||
fontClass: "mathdefault"
|
||
};
|
||
}
|
||
};
|
||
/**
|
||
* Determines which of the font names (Main-Italic, Math-Italic, and Caligraphic)
|
||
* and corresponding style tags (mathit, mathdefault, or mathcal) to use for font
|
||
* "mathnormal", depending on the symbol. Use this function instead of fontMap for
|
||
* font "mathnormal".
|
||
*/
|
||
|
||
|
||
var buildCommon_mathnormal = function mathnormal(value, mode, options, classes) {
|
||
if (utils.contains(mathitLetters, value)) {
|
||
return {
|
||
fontName: "Main-Italic",
|
||
fontClass: "mathit"
|
||
};
|
||
} else if (/[0-9]/.test(value.charAt(0))) {
|
||
return {
|
||
fontName: "Caligraphic-Regular",
|
||
fontClass: "mathcal"
|
||
};
|
||
} else {
|
||
return {
|
||
fontName: "Math-Italic",
|
||
fontClass: "mathdefault"
|
||
};
|
||
}
|
||
};
|
||
/**
|
||
* Determines which of the two font names (Main-Bold and Math-BoldItalic) and
|
||
* corresponding style tags (mathbf or boldsymbol) to use for font "boldsymbol",
|
||
* depending on the symbol. Use this function instead of fontMap for font
|
||
* "boldsymbol".
|
||
*/
|
||
|
||
|
||
var boldsymbol = function boldsymbol(value, mode, options, classes) {
|
||
if (buildCommon_lookupSymbol(value, "Math-BoldItalic", mode).metrics) {
|
||
return {
|
||
fontName: "Math-BoldItalic",
|
||
fontClass: "boldsymbol"
|
||
};
|
||
} else {
|
||
// Some glyphs do not exist in Math-BoldItalic so we need to use
|
||
// Main-Bold instead.
|
||
return {
|
||
fontName: "Main-Bold",
|
||
fontClass: "mathbf"
|
||
};
|
||
}
|
||
};
|
||
/**
|
||
* Makes either a mathord or textord in the correct font and color.
|
||
*/
|
||
|
||
|
||
var buildCommon_makeOrd = function makeOrd(group, options, type) {
|
||
var mode = group.mode;
|
||
var text = group.text;
|
||
var classes = ["mord"]; // Math mode or Old font (i.e. \rm)
|
||
|
||
var isFont = mode === "math" || mode === "text" && options.font;
|
||
var fontOrFamily = isFont ? options.font : options.fontFamily;
|
||
|
||
if (text.charCodeAt(0) === 0xD835) {
|
||
// surrogate pairs get special treatment
|
||
var _wideCharacterFont = wide_character_wideCharacterFont(text, mode),
|
||
wideFontName = _wideCharacterFont[0],
|
||
wideFontClass = _wideCharacterFont[1];
|
||
|
||
return buildCommon_makeSymbol(text, wideFontName, mode, options, classes.concat(wideFontClass));
|
||
} else if (fontOrFamily) {
|
||
var fontName;
|
||
var fontClasses;
|
||
|
||
if (fontOrFamily === "boldsymbol" || fontOrFamily === "mathnormal") {
|
||
var fontData = fontOrFamily === "boldsymbol" ? boldsymbol(text, mode, options, classes) : buildCommon_mathnormal(text, mode, options, classes);
|
||
fontName = fontData.fontName;
|
||
fontClasses = [fontData.fontClass];
|
||
} else if (utils.contains(mathitLetters, text)) {
|
||
fontName = "Main-Italic";
|
||
fontClasses = ["mathit"];
|
||
} else if (isFont) {
|
||
fontName = fontMap[fontOrFamily].fontName;
|
||
fontClasses = [fontOrFamily];
|
||
} else {
|
||
fontName = retrieveTextFontName(fontOrFamily, options.fontWeight, options.fontShape);
|
||
fontClasses = [fontOrFamily, options.fontWeight, options.fontShape];
|
||
}
|
||
|
||
if (buildCommon_lookupSymbol(text, fontName, mode).metrics) {
|
||
return buildCommon_makeSymbol(text, fontName, mode, options, classes.concat(fontClasses));
|
||
} else if (ligatures.hasOwnProperty(text) && fontName.substr(0, 10) === "Typewriter") {
|
||
// Deconstruct ligatures in monospace fonts (\texttt, \tt).
|
||
var parts = [];
|
||
|
||
for (var i = 0; i < text.length; i++) {
|
||
parts.push(buildCommon_makeSymbol(text[i], fontName, mode, options, classes.concat(fontClasses)));
|
||
}
|
||
|
||
return buildCommon_makeFragment(parts);
|
||
}
|
||
} // Makes a symbol in the default font for mathords and textords.
|
||
|
||
|
||
if (type === "mathord") {
|
||
var fontLookup = buildCommon_mathdefault(text, mode, options, classes);
|
||
return buildCommon_makeSymbol(text, fontLookup.fontName, mode, options, classes.concat([fontLookup.fontClass]));
|
||
} else if (type === "textord") {
|
||
var font = src_symbols[mode][text] && src_symbols[mode][text].font;
|
||
|
||
if (font === "ams") {
|
||
var _fontName = retrieveTextFontName("amsrm", options.fontWeight, options.fontShape);
|
||
|
||
return buildCommon_makeSymbol(text, _fontName, mode, options, classes.concat("amsrm", options.fontWeight, options.fontShape));
|
||
} else if (font === "main" || !font) {
|
||
var _fontName2 = retrieveTextFontName("textrm", options.fontWeight, options.fontShape);
|
||
|
||
return buildCommon_makeSymbol(text, _fontName2, mode, options, classes.concat(options.fontWeight, options.fontShape));
|
||
} else {
|
||
// fonts added by plugins
|
||
var _fontName3 = retrieveTextFontName(font, options.fontWeight, options.fontShape); // We add font name as a css class
|
||
|
||
|
||
return buildCommon_makeSymbol(text, _fontName3, mode, options, classes.concat(_fontName3, options.fontWeight, options.fontShape));
|
||
}
|
||
} else {
|
||
throw new Error("unexpected type: " + type + " in makeOrd");
|
||
}
|
||
};
|
||
/**
|
||
* Returns true if subsequent symbolNodes have the same classes, skew, maxFont,
|
||
* and styles.
|
||
*/
|
||
|
||
|
||
var buildCommon_canCombine = function canCombine(prev, next) {
|
||
if (createClass(prev.classes) !== createClass(next.classes) || prev.skew !== next.skew || prev.maxFontSize !== next.maxFontSize) {
|
||
return false;
|
||
}
|
||
|
||
for (var style in prev.style) {
|
||
if (prev.style.hasOwnProperty(style) && prev.style[style] !== next.style[style]) {
|
||
return false;
|
||
}
|
||
}
|
||
|
||
for (var _style in next.style) {
|
||
if (next.style.hasOwnProperty(_style) && prev.style[_style] !== next.style[_style]) {
|
||
return false;
|
||
}
|
||
}
|
||
|
||
return true;
|
||
};
|
||
/**
|
||
* Combine consequetive domTree.symbolNodes into a single symbolNode.
|
||
* Note: this function mutates the argument.
|
||
*/
|
||
|
||
|
||
var buildCommon_tryCombineChars = function tryCombineChars(chars) {
|
||
for (var i = 0; i < chars.length - 1; i++) {
|
||
var prev = chars[i];
|
||
var next = chars[i + 1];
|
||
|
||
if (prev instanceof domTree_SymbolNode && next instanceof domTree_SymbolNode && buildCommon_canCombine(prev, next)) {
|
||
prev.text += next.text;
|
||
prev.height = Math.max(prev.height, next.height);
|
||
prev.depth = Math.max(prev.depth, next.depth); // Use the last character's italic correction since we use
|
||
// it to add padding to the right of the span created from
|
||
// the combined characters.
|
||
|
||
prev.italic = next.italic;
|
||
chars.splice(i + 1, 1);
|
||
i--;
|
||
}
|
||
}
|
||
|
||
return chars;
|
||
};
|
||
/**
|
||
* Calculate the height, depth, and maxFontSize of an element based on its
|
||
* children.
|
||
*/
|
||
|
||
|
||
var sizeElementFromChildren = function sizeElementFromChildren(elem) {
|
||
var height = 0;
|
||
var depth = 0;
|
||
var maxFontSize = 0;
|
||
|
||
for (var i = 0; i < elem.children.length; i++) {
|
||
var child = elem.children[i];
|
||
|
||
if (child.height > height) {
|
||
height = child.height;
|
||
}
|
||
|
||
if (child.depth > depth) {
|
||
depth = child.depth;
|
||
}
|
||
|
||
if (child.maxFontSize > maxFontSize) {
|
||
maxFontSize = child.maxFontSize;
|
||
}
|
||
}
|
||
|
||
elem.height = height;
|
||
elem.depth = depth;
|
||
elem.maxFontSize = maxFontSize;
|
||
};
|
||
/**
|
||
* Makes a span with the given list of classes, list of children, and options.
|
||
*
|
||
* TODO(#953): Ensure that `options` is always provided (currently some call
|
||
* sites don't pass it) and make the type below mandatory.
|
||
* TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which
|
||
* should if present come first in `classes`.
|
||
*/
|
||
|
||
|
||
var buildCommon_makeSpan = function makeSpan(classes, children, options, style) {
|
||
var span = new domTree_Span(classes, children, options, style);
|
||
sizeElementFromChildren(span);
|
||
return span;
|
||
}; // SVG one is simpler -- doesn't require height, depth, max-font setting.
|
||
// This is also a separate method for typesafety.
|
||
|
||
|
||
var buildCommon_makeSvgSpan = function makeSvgSpan(classes, children, options, style) {
|
||
return new domTree_Span(classes, children, options, style);
|
||
};
|
||
|
||
var makeLineSpan = function makeLineSpan(className, options, thickness) {
|
||
var line = buildCommon_makeSpan([className], [], options);
|
||
line.height = Math.max(thickness || options.fontMetrics().defaultRuleThickness, options.minRuleThickness);
|
||
line.style.borderBottomWidth = line.height + "em";
|
||
line.maxFontSize = 1.0;
|
||
return line;
|
||
};
|
||
/**
|
||
* Makes an anchor with the given href, list of classes, list of children,
|
||
* and options.
|
||
*/
|
||
|
||
|
||
var buildCommon_makeAnchor = function makeAnchor(href, classes, children, options) {
|
||
var anchor = new domTree_Anchor(href, classes, children, options);
|
||
sizeElementFromChildren(anchor);
|
||
return anchor;
|
||
};
|
||
/**
|
||
* Makes a document fragment with the given list of children.
|
||
*/
|
||
|
||
|
||
var buildCommon_makeFragment = function makeFragment(children) {
|
||
var fragment = new tree_DocumentFragment(children);
|
||
sizeElementFromChildren(fragment);
|
||
return fragment;
|
||
};
|
||
/**
|
||
* Wraps group in a span if it's a document fragment, allowing to apply classes
|
||
* and styles
|
||
*/
|
||
|
||
|
||
var buildCommon_wrapFragment = function wrapFragment(group, options) {
|
||
if (group instanceof tree_DocumentFragment) {
|
||
return buildCommon_makeSpan([], [group], options);
|
||
}
|
||
|
||
return group;
|
||
}; // These are exact object types to catch typos in the names of the optional fields.
|
||
|
||
|
||
// Computes the updated `children` list and the overall depth.
|
||
//
|
||
// This helper function for makeVList makes it easier to enforce type safety by
|
||
// allowing early exits (returns) in the logic.
|
||
var getVListChildrenAndDepth = function getVListChildrenAndDepth(params) {
|
||
if (params.positionType === "individualShift") {
|
||
var oldChildren = params.children;
|
||
var children = [oldChildren[0]]; // Add in kerns to the list of params.children to get each element to be
|
||
// shifted to the correct specified shift
|
||
|
||
var _depth = -oldChildren[0].shift - oldChildren[0].elem.depth;
|
||
|
||
var currPos = _depth;
|
||
|
||
for (var i = 1; i < oldChildren.length; i++) {
|
||
var diff = -oldChildren[i].shift - currPos - oldChildren[i].elem.depth;
|
||
var size = diff - (oldChildren[i - 1].elem.height + oldChildren[i - 1].elem.depth);
|
||
currPos = currPos + diff;
|
||
children.push({
|
||
type: "kern",
|
||
size: size
|
||
});
|
||
children.push(oldChildren[i]);
|
||
}
|
||
|
||
return {
|
||
children: children,
|
||
depth: _depth
|
||
};
|
||
}
|
||
|
||
var depth;
|
||
|
||
if (params.positionType === "top") {
|
||
// We always start at the bottom, so calculate the bottom by adding up
|
||
// all the sizes
|
||
var bottom = params.positionData;
|
||
|
||
for (var _i = 0; _i < params.children.length; _i++) {
|
||
var child = params.children[_i];
|
||
bottom -= child.type === "kern" ? child.size : child.elem.height + child.elem.depth;
|
||
}
|
||
|
||
depth = bottom;
|
||
} else if (params.positionType === "bottom") {
|
||
depth = -params.positionData;
|
||
} else {
|
||
var firstChild = params.children[0];
|
||
|
||
if (firstChild.type !== "elem") {
|
||
throw new Error('First child must have type "elem".');
|
||
}
|
||
|
||
if (params.positionType === "shift") {
|
||
depth = -firstChild.elem.depth - params.positionData;
|
||
} else if (params.positionType === "firstBaseline") {
|
||
depth = -firstChild.elem.depth;
|
||
} else {
|
||
throw new Error("Invalid positionType " + params.positionType + ".");
|
||
}
|
||
}
|
||
|
||
return {
|
||
children: params.children,
|
||
depth: depth
|
||
};
|
||
};
|
||
/**
|
||
* Makes a vertical list by stacking elements and kerns on top of each other.
|
||
* Allows for many different ways of specifying the positioning method.
|
||
*
|
||
* See VListParam documentation above.
|
||
*/
|
||
|
||
|
||
var buildCommon_makeVList = function makeVList(params, options) {
|
||
var _getVListChildrenAndD = getVListChildrenAndDepth(params),
|
||
children = _getVListChildrenAndD.children,
|
||
depth = _getVListChildrenAndD.depth; // Create a strut that is taller than any list item. The strut is added to
|
||
// each item, where it will determine the item's baseline. Since it has
|
||
// `overflow:hidden`, the strut's top edge will sit on the item's line box's
|
||
// top edge and the strut's bottom edge will sit on the item's baseline,
|
||
// with no additional line-height spacing. This allows the item baseline to
|
||
// be positioned precisely without worrying about font ascent and
|
||
// line-height.
|
||
|
||
|
||
var pstrutSize = 0;
|
||
|
||
for (var i = 0; i < children.length; i++) {
|
||
var child = children[i];
|
||
|
||
if (child.type === "elem") {
|
||
var elem = child.elem;
|
||
pstrutSize = Math.max(pstrutSize, elem.maxFontSize, elem.height);
|
||
}
|
||
}
|
||
|
||
pstrutSize += 2;
|
||
var pstrut = buildCommon_makeSpan(["pstrut"], []);
|
||
pstrut.style.height = pstrutSize + "em"; // Create a new list of actual children at the correct offsets
|
||
|
||
var realChildren = [];
|
||
var minPos = depth;
|
||
var maxPos = depth;
|
||
var currPos = depth;
|
||
|
||
for (var _i2 = 0; _i2 < children.length; _i2++) {
|
||
var _child = children[_i2];
|
||
|
||
if (_child.type === "kern") {
|
||
currPos += _child.size;
|
||
} else {
|
||
var _elem = _child.elem;
|
||
var classes = _child.wrapperClasses || [];
|
||
var style = _child.wrapperStyle || {};
|
||
var childWrap = buildCommon_makeSpan(classes, [pstrut, _elem], undefined, style);
|
||
childWrap.style.top = -pstrutSize - currPos - _elem.depth + "em";
|
||
|
||
if (_child.marginLeft) {
|
||
childWrap.style.marginLeft = _child.marginLeft;
|
||
}
|
||
|
||
if (_child.marginRight) {
|
||
childWrap.style.marginRight = _child.marginRight;
|
||
}
|
||
|
||
realChildren.push(childWrap);
|
||
currPos += _elem.height + _elem.depth;
|
||
}
|
||
|
||
minPos = Math.min(minPos, currPos);
|
||
maxPos = Math.max(maxPos, currPos);
|
||
} // The vlist contents go in a table-cell with `vertical-align:bottom`.
|
||
// This cell's bottom edge will determine the containing table's baseline
|
||
// without overly expanding the containing line-box.
|
||
|
||
|
||
var vlist = buildCommon_makeSpan(["vlist"], realChildren);
|
||
vlist.style.height = maxPos + "em"; // A second row is used if necessary to represent the vlist's depth.
|
||
|
||
var rows;
|
||
|
||
if (minPos < 0) {
|
||
// We will define depth in an empty span with display: table-cell.
|
||
// It should render with the height that we define. But Chrome, in
|
||
// contenteditable mode only, treats that span as if it contains some
|
||
// text content. And that min-height over-rides our desired height.
|
||
// So we put another empty span inside the depth strut span.
|
||
var emptySpan = buildCommon_makeSpan([], []);
|
||
var depthStrut = buildCommon_makeSpan(["vlist"], [emptySpan]);
|
||
depthStrut.style.height = -minPos + "em"; // Safari wants the first row to have inline content; otherwise it
|
||
// puts the bottom of the *second* row on the baseline.
|
||
|
||
var topStrut = buildCommon_makeSpan(["vlist-s"], [new domTree_SymbolNode("\u200B")]);
|
||
rows = [buildCommon_makeSpan(["vlist-r"], [vlist, topStrut]), buildCommon_makeSpan(["vlist-r"], [depthStrut])];
|
||
} else {
|
||
rows = [buildCommon_makeSpan(["vlist-r"], [vlist])];
|
||
}
|
||
|
||
var vtable = buildCommon_makeSpan(["vlist-t"], rows);
|
||
|
||
if (rows.length === 2) {
|
||
vtable.classes.push("vlist-t2");
|
||
}
|
||
|
||
vtable.height = maxPos;
|
||
vtable.depth = -minPos;
|
||
return vtable;
|
||
}; // Glue is a concept from TeX which is a flexible space between elements in
|
||
// either a vertical or horizontal list. In KaTeX, at least for now, it's
|
||
// static space between elements in a horizontal layout.
|
||
|
||
|
||
var buildCommon_makeGlue = function makeGlue(measurement, options) {
|
||
// Make an empty span for the space
|
||
var rule = buildCommon_makeSpan(["mspace"], [], options);
|
||
var size = units_calculateSize(measurement, options);
|
||
rule.style.marginRight = size + "em";
|
||
return rule;
|
||
}; // Takes font options, and returns the appropriate fontLookup name
|
||
|
||
|
||
var retrieveTextFontName = function retrieveTextFontName(fontFamily, fontWeight, fontShape) {
|
||
var baseFontName = "";
|
||
|
||
switch (fontFamily) {
|
||
case "amsrm":
|
||
baseFontName = "AMS";
|
||
break;
|
||
|
||
case "textrm":
|
||
baseFontName = "Main";
|
||
break;
|
||
|
||
case "textsf":
|
||
baseFontName = "SansSerif";
|
||
break;
|
||
|
||
case "texttt":
|
||
baseFontName = "Typewriter";
|
||
break;
|
||
|
||
default:
|
||
baseFontName = fontFamily;
|
||
// use fonts added by a plugin
|
||
}
|
||
|
||
var fontStylesName;
|
||
|
||
if (fontWeight === "textbf" && fontShape === "textit") {
|
||
fontStylesName = "BoldItalic";
|
||
} else if (fontWeight === "textbf") {
|
||
fontStylesName = "Bold";
|
||
} else if (fontWeight === "textit") {
|
||
fontStylesName = "Italic";
|
||
} else {
|
||
fontStylesName = "Regular";
|
||
}
|
||
|
||
return baseFontName + "-" + fontStylesName;
|
||
};
|
||
/**
|
||
* Maps TeX font commands to objects containing:
|
||
* - variant: string used for "mathvariant" attribute in buildMathML.js
|
||
* - fontName: the "style" parameter to fontMetrics.getCharacterMetrics
|
||
*/
|
||
// A map between tex font commands an MathML mathvariant attribute values
|
||
|
||
|
||
var fontMap = {
|
||
// styles
|
||
"mathbf": {
|
||
variant: "bold",
|
||
fontName: "Main-Bold"
|
||
},
|
||
"mathrm": {
|
||
variant: "normal",
|
||
fontName: "Main-Regular"
|
||
},
|
||
"textit": {
|
||
variant: "italic",
|
||
fontName: "Main-Italic"
|
||
},
|
||
"mathit": {
|
||
variant: "italic",
|
||
fontName: "Main-Italic"
|
||
},
|
||
// Default math font, "mathnormal" and "boldsymbol" are missing because they
|
||
// require the use of several fonts: Main-Italic and Math-Italic for default
|
||
// math font, Main-Italic, Math-Italic, Caligraphic for "mathnormal", and
|
||
// Math-BoldItalic and Main-Bold for "boldsymbol". This is handled by a
|
||
// special case in makeOrd which ends up calling mathdefault, mathnormal,
|
||
// and boldsymbol.
|
||
// families
|
||
"mathbb": {
|
||
variant: "double-struck",
|
||
fontName: "AMS-Regular"
|
||
},
|
||
"mathcal": {
|
||
variant: "script",
|
||
fontName: "Caligraphic-Regular"
|
||
},
|
||
"mathfrak": {
|
||
variant: "fraktur",
|
||
fontName: "Fraktur-Regular"
|
||
},
|
||
"mathscr": {
|
||
variant: "script",
|
||
fontName: "Script-Regular"
|
||
},
|
||
"mathsf": {
|
||
variant: "sans-serif",
|
||
fontName: "SansSerif-Regular"
|
||
},
|
||
"mathtt": {
|
||
variant: "monospace",
|
||
fontName: "Typewriter-Regular"
|
||
}
|
||
};
|
||
var svgData = {
|
||
// path, width, height
|
||
vec: ["vec", 0.471, 0.714],
|
||
// values from the font glyph
|
||
oiintSize1: ["oiintSize1", 0.957, 0.499],
|
||
// oval to overlay the integrand
|
||
oiintSize2: ["oiintSize2", 1.472, 0.659],
|
||
oiiintSize1: ["oiiintSize1", 1.304, 0.499],
|
||
oiiintSize2: ["oiiintSize2", 1.98, 0.659]
|
||
};
|
||
|
||
var buildCommon_staticSvg = function staticSvg(value, options) {
|
||
// Create a span with inline SVG for the element.
|
||
var _svgData$value = svgData[value],
|
||
pathName = _svgData$value[0],
|
||
width = _svgData$value[1],
|
||
height = _svgData$value[2];
|
||
var path = new domTree_PathNode(pathName);
|
||
var svgNode = new SvgNode([path], {
|
||
"width": width + "em",
|
||
"height": height + "em",
|
||
// Override CSS rule `.katex svg { width: 100% }`
|
||
"style": "width:" + width + "em",
|
||
"viewBox": "0 0 " + 1000 * width + " " + 1000 * height,
|
||
"preserveAspectRatio": "xMinYMin"
|
||
});
|
||
var span = buildCommon_makeSvgSpan(["overlay"], [svgNode], options);
|
||
span.height = height;
|
||
span.style.height = height + "em";
|
||
span.style.width = width + "em";
|
||
return span;
|
||
};
|
||
|
||
/* harmony default export */ var buildCommon = ({
|
||
fontMap: fontMap,
|
||
makeSymbol: buildCommon_makeSymbol,
|
||
mathsym: buildCommon_mathsym,
|
||
makeSpan: buildCommon_makeSpan,
|
||
makeSvgSpan: buildCommon_makeSvgSpan,
|
||
makeLineSpan: makeLineSpan,
|
||
makeAnchor: buildCommon_makeAnchor,
|
||
makeFragment: buildCommon_makeFragment,
|
||
wrapFragment: buildCommon_wrapFragment,
|
||
makeVList: buildCommon_makeVList,
|
||
makeOrd: buildCommon_makeOrd,
|
||
makeGlue: buildCommon_makeGlue,
|
||
staticSvg: buildCommon_staticSvg,
|
||
svgData: svgData,
|
||
tryCombineChars: buildCommon_tryCombineChars
|
||
});
|
||
// CONCATENATED MODULE: ./src/parseNode.js
|
||
|
||
|
||
/**
|
||
* Asserts that the node is of the given type and returns it with stricter
|
||
* typing. Throws if the node's type does not match.
|
||
*/
|
||
function assertNodeType(node, type) {
|
||
var typedNode = checkNodeType(node, type);
|
||
|
||
if (!typedNode) {
|
||
throw new Error("Expected node of type " + type + ", but got " + (node ? "node of type " + node.type : String(node)));
|
||
} // $FlowFixMe: Unsure why.
|
||
|
||
|
||
return typedNode;
|
||
}
|
||
/**
|
||
* Returns the node more strictly typed iff it is of the given type. Otherwise,
|
||
* returns null.
|
||
*/
|
||
|
||
function checkNodeType(node, type) {
|
||
if (node && node.type === type) {
|
||
// The definition of ParseNode<TYPE> doesn't communicate to flow that
|
||
// `type: TYPE` (as that's not explicitly mentioned anywhere), though that
|
||
// happens to be true for all our value types.
|
||
// $FlowFixMe
|
||
return node;
|
||
}
|
||
|
||
return null;
|
||
}
|
||
/**
|
||
* Asserts that the node is of the given type and returns it with stricter
|
||
* typing. Throws if the node's type does not match.
|
||
*/
|
||
|
||
function assertAtomFamily(node, family) {
|
||
var typedNode = checkAtomFamily(node, family);
|
||
|
||
if (!typedNode) {
|
||
throw new Error("Expected node of type \"atom\" and family \"" + family + "\", but got " + (node ? node.type === "atom" ? "atom of family " + node.family : "node of type " + node.type : String(node)));
|
||
}
|
||
|
||
return typedNode;
|
||
}
|
||
/**
|
||
* Returns the node more strictly typed iff it is of the given type. Otherwise,
|
||
* returns null.
|
||
*/
|
||
|
||
function checkAtomFamily(node, family) {
|
||
return node && node.type === "atom" && node.family === family ? node : null;
|
||
}
|
||
/**
|
||
* Returns the node more strictly typed iff it is of the given type. Otherwise,
|
||
* returns null.
|
||
*/
|
||
|
||
function assertSymbolNodeType(node) {
|
||
var typedNode = checkSymbolNodeType(node);
|
||
|
||
if (!typedNode) {
|
||
throw new Error("Expected node of symbol group type, but got " + (node ? "node of type " + node.type : String(node)));
|
||
}
|
||
|
||
return typedNode;
|
||
}
|
||
/**
|
||
* Returns the node more strictly typed iff it is of the given type. Otherwise,
|
||
* returns null.
|
||
*/
|
||
|
||
function checkSymbolNodeType(node) {
|
||
if (node && (node.type === "atom" || NON_ATOMS.hasOwnProperty(node.type))) {
|
||
// $FlowFixMe
|
||
return node;
|
||
}
|
||
|
||
return null;
|
||
}
|
||
// CONCATENATED MODULE: ./src/spacingData.js
|
||
/**
|
||
* Describes spaces between different classes of atoms.
|
||
*/
|
||
var thinspace = {
|
||
number: 3,
|
||
unit: "mu"
|
||
};
|
||
var mediumspace = {
|
||
number: 4,
|
||
unit: "mu"
|
||
};
|
||
var thickspace = {
|
||
number: 5,
|
||
unit: "mu"
|
||
}; // Making the type below exact with all optional fields doesn't work due to
|
||
// - https://github.com/facebook/flow/issues/4582
|
||
// - https://github.com/facebook/flow/issues/5688
|
||
// However, since *all* fields are optional, $Shape<> works as suggested in 5688
|
||
// above.
|
||
|
||
// Spacing relationships for display and text styles
|
||
var spacings = {
|
||
mord: {
|
||
mop: thinspace,
|
||
mbin: mediumspace,
|
||
mrel: thickspace,
|
||
minner: thinspace
|
||
},
|
||
mop: {
|
||
mord: thinspace,
|
||
mop: thinspace,
|
||
mrel: thickspace,
|
||
minner: thinspace
|
||
},
|
||
mbin: {
|
||
mord: mediumspace,
|
||
mop: mediumspace,
|
||
mopen: mediumspace,
|
||
minner: mediumspace
|
||
},
|
||
mrel: {
|
||
mord: thickspace,
|
||
mop: thickspace,
|
||
mopen: thickspace,
|
||
minner: thickspace
|
||
},
|
||
mopen: {},
|
||
mclose: {
|
||
mop: thinspace,
|
||
mbin: mediumspace,
|
||
mrel: thickspace,
|
||
minner: thinspace
|
||
},
|
||
mpunct: {
|
||
mord: thinspace,
|
||
mop: thinspace,
|
||
mrel: thickspace,
|
||
mopen: thinspace,
|
||
mclose: thinspace,
|
||
mpunct: thinspace,
|
||
minner: thinspace
|
||
},
|
||
minner: {
|
||
mord: thinspace,
|
||
mop: thinspace,
|
||
mbin: mediumspace,
|
||
mrel: thickspace,
|
||
mopen: thinspace,
|
||
mpunct: thinspace,
|
||
minner: thinspace
|
||
}
|
||
}; // Spacing relationships for script and scriptscript styles
|
||
|
||
var tightSpacings = {
|
||
mord: {
|
||
mop: thinspace
|
||
},
|
||
mop: {
|
||
mord: thinspace,
|
||
mop: thinspace
|
||
},
|
||
mbin: {},
|
||
mrel: {},
|
||
mopen: {},
|
||
mclose: {
|
||
mop: thinspace
|
||
},
|
||
mpunct: {},
|
||
minner: {
|
||
mop: thinspace
|
||
}
|
||
};
|
||
// CONCATENATED MODULE: ./src/defineFunction.js
|
||
|
||
|
||
/**
|
||
* All registered functions.
|
||
* `functions.js` just exports this same dictionary again and makes it public.
|
||
* `Parser.js` requires this dictionary.
|
||
*/
|
||
var _functions = {};
|
||
/**
|
||
* All HTML builders. Should be only used in the `define*` and the `build*ML`
|
||
* functions.
|
||
*/
|
||
|
||
var _htmlGroupBuilders = {};
|
||
/**
|
||
* All MathML builders. Should be only used in the `define*` and the `build*ML`
|
||
* functions.
|
||
*/
|
||
|
||
var _mathmlGroupBuilders = {};
|
||
function defineFunction(_ref) {
|
||
var type = _ref.type,
|
||
names = _ref.names,
|
||
props = _ref.props,
|
||
handler = _ref.handler,
|
||
htmlBuilder = _ref.htmlBuilder,
|
||
mathmlBuilder = _ref.mathmlBuilder;
|
||
// Set default values of functions
|
||
var data = {
|
||
type: type,
|
||
numArgs: props.numArgs,
|
||
argTypes: props.argTypes,
|
||
greediness: props.greediness === undefined ? 1 : props.greediness,
|
||
allowedInText: !!props.allowedInText,
|
||
allowedInMath: props.allowedInMath === undefined ? true : props.allowedInMath,
|
||
numOptionalArgs: props.numOptionalArgs || 0,
|
||
infix: !!props.infix,
|
||
handler: handler
|
||
};
|
||
|
||
for (var i = 0; i < names.length; ++i) {
|
||
_functions[names[i]] = data;
|
||
}
|
||
|
||
if (type) {
|
||
if (htmlBuilder) {
|
||
_htmlGroupBuilders[type] = htmlBuilder;
|
||
}
|
||
|
||
if (mathmlBuilder) {
|
||
_mathmlGroupBuilders[type] = mathmlBuilder;
|
||
}
|
||
}
|
||
}
|
||
/**
|
||
* Use this to register only the HTML and MathML builders for a function (e.g.
|
||
* if the function's ParseNode is generated in Parser.js rather than via a
|
||
* stand-alone handler provided to `defineFunction`).
|
||
*/
|
||
|
||
function defineFunctionBuilders(_ref2) {
|
||
var type = _ref2.type,
|
||
htmlBuilder = _ref2.htmlBuilder,
|
||
mathmlBuilder = _ref2.mathmlBuilder;
|
||
defineFunction({
|
||
type: type,
|
||
names: [],
|
||
props: {
|
||
numArgs: 0
|
||
},
|
||
handler: function handler() {
|
||
throw new Error('Should never be called.');
|
||
},
|
||
htmlBuilder: htmlBuilder,
|
||
mathmlBuilder: mathmlBuilder
|
||
});
|
||
} // Since the corresponding buildHTML/buildMathML function expects a
|
||
// list of elements, we normalize for different kinds of arguments
|
||
|
||
var defineFunction_ordargument = function ordargument(arg) {
|
||
var node = checkNodeType(arg, "ordgroup");
|
||
return node ? node.body : [arg];
|
||
};
|
||
// CONCATENATED MODULE: ./src/buildHTML.js
|
||
/**
|
||
* This file does the main work of building a domTree structure from a parse
|
||
* tree. The entry point is the `buildHTML` function, which takes a parse tree.
|
||
* Then, the buildExpression, buildGroup, and various groupBuilders functions
|
||
* are called, to produce a final HTML tree.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var buildHTML_makeSpan = buildCommon.makeSpan; // Binary atoms (first class `mbin`) change into ordinary atoms (`mord`)
|
||
// depending on their surroundings. See TeXbook pg. 442-446, Rules 5 and 6,
|
||
// and the text before Rule 19.
|
||
|
||
var binLeftCanceller = ["leftmost", "mbin", "mopen", "mrel", "mop", "mpunct"];
|
||
var binRightCanceller = ["rightmost", "mrel", "mclose", "mpunct"];
|
||
var styleMap = {
|
||
"display": src_Style.DISPLAY,
|
||
"text": src_Style.TEXT,
|
||
"script": src_Style.SCRIPT,
|
||
"scriptscript": src_Style.SCRIPTSCRIPT
|
||
};
|
||
var DomEnum = {
|
||
mord: "mord",
|
||
mop: "mop",
|
||
mbin: "mbin",
|
||
mrel: "mrel",
|
||
mopen: "mopen",
|
||
mclose: "mclose",
|
||
mpunct: "mpunct",
|
||
minner: "minner"
|
||
};
|
||
|
||
/**
|
||
* Take a list of nodes, build them in order, and return a list of the built
|
||
* nodes. documentFragments are flattened into their contents, so the
|
||
* returned list contains no fragments. `isRealGroup` is true if `expression`
|
||
* is a real group (no atoms will be added on either side), as opposed to
|
||
* a partial group (e.g. one created by \color). `surrounding` is an array
|
||
* consisting type of nodes that will be added to the left and right.
|
||
*/
|
||
var buildHTML_buildExpression = function buildExpression(expression, options, isRealGroup, surrounding) {
|
||
if (surrounding === void 0) {
|
||
surrounding = [null, null];
|
||
}
|
||
|
||
// Parse expressions into `groups`.
|
||
var groups = [];
|
||
|
||
for (var i = 0; i < expression.length; i++) {
|
||
var output = buildHTML_buildGroup(expression[i], options);
|
||
|
||
if (output instanceof tree_DocumentFragment) {
|
||
var children = output.children;
|
||
groups.push.apply(groups, children);
|
||
} else {
|
||
groups.push(output);
|
||
}
|
||
} // If `expression` is a partial group, let the parent handle spacings
|
||
// to avoid processing groups multiple times.
|
||
|
||
|
||
if (!isRealGroup) {
|
||
return groups;
|
||
}
|
||
|
||
var glueOptions = options;
|
||
|
||
if (expression.length === 1) {
|
||
var node = checkNodeType(expression[0], "sizing") || checkNodeType(expression[0], "styling");
|
||
|
||
if (!node) {// No match.
|
||
} else if (node.type === "sizing") {
|
||
glueOptions = options.havingSize(node.size);
|
||
} else if (node.type === "styling") {
|
||
glueOptions = options.havingStyle(styleMap[node.style]);
|
||
}
|
||
} // Dummy spans for determining spacings between surrounding atoms.
|
||
// If `expression` has no atoms on the left or right, class "leftmost"
|
||
// or "rightmost", respectively, is used to indicate it.
|
||
|
||
|
||
var dummyPrev = buildHTML_makeSpan([surrounding[0] || "leftmost"], [], options);
|
||
var dummyNext = buildHTML_makeSpan([surrounding[1] || "rightmost"], [], options); // TODO: These code assumes that a node's math class is the first element
|
||
// of its `classes` array. A later cleanup should ensure this, for
|
||
// instance by changing the signature of `makeSpan`.
|
||
// Before determining what spaces to insert, perform bin cancellation.
|
||
// Binary operators change to ordinary symbols in some contexts.
|
||
|
||
traverseNonSpaceNodes(groups, function (node, prev) {
|
||
var prevType = prev.classes[0];
|
||
var type = node.classes[0];
|
||
|
||
if (prevType === "mbin" && utils.contains(binRightCanceller, type)) {
|
||
prev.classes[0] = "mord";
|
||
} else if (type === "mbin" && utils.contains(binLeftCanceller, prevType)) {
|
||
node.classes[0] = "mord";
|
||
}
|
||
}, {
|
||
node: dummyPrev
|
||
}, dummyNext);
|
||
traverseNonSpaceNodes(groups, function (node, prev) {
|
||
var prevType = getTypeOfDomTree(prev);
|
||
var type = getTypeOfDomTree(node); // 'mtight' indicates that the node is script or scriptscript style.
|
||
|
||
var space = prevType && type ? node.hasClass("mtight") ? tightSpacings[prevType][type] : spacings[prevType][type] : null;
|
||
|
||
if (space) {
|
||
// Insert glue (spacing) after the `prev`.
|
||
return buildCommon.makeGlue(space, glueOptions);
|
||
}
|
||
}, {
|
||
node: dummyPrev
|
||
}, dummyNext);
|
||
return groups;
|
||
}; // Depth-first traverse non-space `nodes`, calling `callback` with the current and
|
||
// previous node as arguments, optionally returning a node to insert after the
|
||
// previous node. `prev` is an object with the previous node and `insertAfter`
|
||
// function to insert after it. `next` is a node that will be added to the right.
|
||
// Used for bin cancellation and inserting spacings.
|
||
|
||
var traverseNonSpaceNodes = function traverseNonSpaceNodes(nodes, callback, prev, next) {
|
||
if (next) {
|
||
// temporarily append the right node, if exists
|
||
nodes.push(next);
|
||
}
|
||
|
||
var i = 0;
|
||
|
||
for (; i < nodes.length; i++) {
|
||
var node = nodes[i];
|
||
var partialGroup = buildHTML_checkPartialGroup(node);
|
||
|
||
if (partialGroup) {
|
||
// Recursive DFS
|
||
// $FlowFixMe: make nodes a $ReadOnlyArray by returning a new array
|
||
traverseNonSpaceNodes(partialGroup.children, callback, prev);
|
||
continue;
|
||
} // Ignore explicit spaces (e.g., \;, \,) when determining what implicit
|
||
// spacing should go between atoms of different classes
|
||
|
||
|
||
if (node.classes[0] === "mspace") {
|
||
continue;
|
||
}
|
||
|
||
var result = callback(node, prev.node);
|
||
|
||
if (result) {
|
||
if (prev.insertAfter) {
|
||
prev.insertAfter(result);
|
||
} else {
|
||
// insert at front
|
||
nodes.unshift(result);
|
||
i++;
|
||
}
|
||
}
|
||
|
||
prev.node = node;
|
||
|
||
prev.insertAfter = function (index) {
|
||
return function (n) {
|
||
nodes.splice(index + 1, 0, n);
|
||
i++;
|
||
};
|
||
}(i);
|
||
}
|
||
|
||
if (next) {
|
||
nodes.pop();
|
||
}
|
||
}; // Check if given node is a partial group, i.e., does not affect spacing around.
|
||
|
||
|
||
var buildHTML_checkPartialGroup = function checkPartialGroup(node) {
|
||
if (node instanceof tree_DocumentFragment || node instanceof domTree_Anchor) {
|
||
return node;
|
||
}
|
||
|
||
return null;
|
||
}; // Return the outermost node of a domTree.
|
||
|
||
|
||
var getOutermostNode = function getOutermostNode(node, side) {
|
||
var partialGroup = buildHTML_checkPartialGroup(node);
|
||
|
||
if (partialGroup) {
|
||
var children = partialGroup.children;
|
||
|
||
if (children.length) {
|
||
if (side === "right") {
|
||
return getOutermostNode(children[children.length - 1], "right");
|
||
} else if (side === "left") {
|
||
return getOutermostNode(children[0], "left");
|
||
}
|
||
}
|
||
}
|
||
|
||
return node;
|
||
}; // Return math atom class (mclass) of a domTree.
|
||
// If `side` is given, it will get the type of the outermost node at given side.
|
||
|
||
|
||
var getTypeOfDomTree = function getTypeOfDomTree(node, side) {
|
||
if (!node) {
|
||
return null;
|
||
}
|
||
|
||
if (side) {
|
||
node = getOutermostNode(node, side);
|
||
} // This makes a lot of assumptions as to where the type of atom
|
||
// appears. We should do a better job of enforcing this.
|
||
|
||
|
||
return DomEnum[node.classes[0]] || null;
|
||
};
|
||
var makeNullDelimiter = function makeNullDelimiter(options, classes) {
|
||
var moreClasses = ["nulldelimiter"].concat(options.baseSizingClasses());
|
||
return buildHTML_makeSpan(classes.concat(moreClasses));
|
||
};
|
||
/**
|
||
* buildGroup is the function that takes a group and calls the correct groupType
|
||
* function for it. It also handles the interaction of size and style changes
|
||
* between parents and children.
|
||
*/
|
||
|
||
var buildHTML_buildGroup = function buildGroup(group, options, baseOptions) {
|
||
if (!group) {
|
||
return buildHTML_makeSpan();
|
||
}
|
||
|
||
if (_htmlGroupBuilders[group.type]) {
|
||
// Call the groupBuilders function
|
||
var groupNode = _htmlGroupBuilders[group.type](group, options); // If the size changed between the parent and the current group, account
|
||
// for that size difference.
|
||
|
||
if (baseOptions && options.size !== baseOptions.size) {
|
||
groupNode = buildHTML_makeSpan(options.sizingClasses(baseOptions), [groupNode], options);
|
||
var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier;
|
||
groupNode.height *= multiplier;
|
||
groupNode.depth *= multiplier;
|
||
}
|
||
|
||
return groupNode;
|
||
} else {
|
||
throw new src_ParseError("Got group of unknown type: '" + group.type + "'");
|
||
}
|
||
};
|
||
/**
|
||
* Combine an array of HTML DOM nodes (e.g., the output of `buildExpression`)
|
||
* into an unbreakable HTML node of class .base, with proper struts to
|
||
* guarantee correct vertical extent. `buildHTML` calls this repeatedly to
|
||
* make up the entire expression as a sequence of unbreakable units.
|
||
*/
|
||
|
||
function buildHTMLUnbreakable(children, options) {
|
||
// Compute height and depth of this chunk.
|
||
var body = buildHTML_makeSpan(["base"], children, options); // Add strut, which ensures that the top of the HTML element falls at
|
||
// the height of the expression, and the bottom of the HTML element
|
||
// falls at the depth of the expression.
|
||
// We used to have separate top and bottom struts, where the bottom strut
|
||
// would like to use `vertical-align: top`, but in IE 9 this lowers the
|
||
// baseline of the box to the bottom of this strut (instead of staying in
|
||
// the normal place) so we use an absolute value for vertical-align instead.
|
||
|
||
var strut = buildHTML_makeSpan(["strut"]);
|
||
strut.style.height = body.height + body.depth + "em";
|
||
strut.style.verticalAlign = -body.depth + "em";
|
||
body.children.unshift(strut);
|
||
return body;
|
||
}
|
||
/**
|
||
* Take an entire parse tree, and build it into an appropriate set of HTML
|
||
* nodes.
|
||
*/
|
||
|
||
|
||
function buildHTML(tree, options) {
|
||
// Strip off outer tag wrapper for processing below.
|
||
var tag = null;
|
||
|
||
if (tree.length === 1 && tree[0].type === "tag") {
|
||
tag = tree[0].tag;
|
||
tree = tree[0].body;
|
||
} // Build the expression contained in the tree
|
||
|
||
|
||
var expression = buildHTML_buildExpression(tree, options, true);
|
||
var children = []; // Create one base node for each chunk between potential line breaks.
|
||
// The TeXBook [p.173] says "A formula will be broken only after a
|
||
// relation symbol like $=$ or $<$ or $\rightarrow$, or after a binary
|
||
// operation symbol like $+$ or $-$ or $\times$, where the relation or
|
||
// binary operation is on the ``outer level'' of the formula (i.e., not
|
||
// enclosed in {...} and not part of an \over construction)."
|
||
|
||
var parts = [];
|
||
|
||
for (var i = 0; i < expression.length; i++) {
|
||
parts.push(expression[i]);
|
||
|
||
if (expression[i].hasClass("mbin") || expression[i].hasClass("mrel") || expression[i].hasClass("allowbreak")) {
|
||
// Put any post-operator glue on same line as operator.
|
||
// Watch for \nobreak along the way, and stop at \newline.
|
||
var nobreak = false;
|
||
|
||
while (i < expression.length - 1 && expression[i + 1].hasClass("mspace") && !expression[i + 1].hasClass("newline")) {
|
||
i++;
|
||
parts.push(expression[i]);
|
||
|
||
if (expression[i].hasClass("nobreak")) {
|
||
nobreak = true;
|
||
}
|
||
} // Don't allow break if \nobreak among the post-operator glue.
|
||
|
||
|
||
if (!nobreak) {
|
||
children.push(buildHTMLUnbreakable(parts, options));
|
||
parts = [];
|
||
}
|
||
} else if (expression[i].hasClass("newline")) {
|
||
// Write the line except the newline
|
||
parts.pop();
|
||
|
||
if (parts.length > 0) {
|
||
children.push(buildHTMLUnbreakable(parts, options));
|
||
parts = [];
|
||
} // Put the newline at the top level
|
||
|
||
|
||
children.push(expression[i]);
|
||
}
|
||
}
|
||
|
||
if (parts.length > 0) {
|
||
children.push(buildHTMLUnbreakable(parts, options));
|
||
} // Now, if there was a tag, build it too and append it as a final child.
|
||
|
||
|
||
var tagChild;
|
||
|
||
if (tag) {
|
||
tagChild = buildHTMLUnbreakable(buildHTML_buildExpression(tag, options, true));
|
||
tagChild.classes = ["tag"];
|
||
children.push(tagChild);
|
||
}
|
||
|
||
var htmlNode = buildHTML_makeSpan(["katex-html"], children);
|
||
htmlNode.setAttribute("aria-hidden", "true"); // Adjust the strut of the tag to be the maximum height of all children
|
||
// (the height of the enclosing htmlNode) for proper vertical alignment.
|
||
|
||
if (tagChild) {
|
||
var strut = tagChild.children[0];
|
||
strut.style.height = htmlNode.height + htmlNode.depth + "em";
|
||
strut.style.verticalAlign = -htmlNode.depth + "em";
|
||
}
|
||
|
||
return htmlNode;
|
||
}
|
||
// CONCATENATED MODULE: ./src/mathMLTree.js
|
||
/**
|
||
* These objects store data about MathML nodes. This is the MathML equivalent
|
||
* of the types in domTree.js. Since MathML handles its own rendering, and
|
||
* since we're mainly using MathML to improve accessibility, we don't manage
|
||
* any of the styling state that the plain DOM nodes do.
|
||
*
|
||
* The `toNode` and `toMarkup` functions work simlarly to how they do in
|
||
* domTree.js, creating namespaced DOM nodes and HTML text markup respectively.
|
||
*/
|
||
|
||
|
||
function newDocumentFragment(children) {
|
||
return new tree_DocumentFragment(children);
|
||
}
|
||
/**
|
||
* This node represents a general purpose MathML node of any type. The
|
||
* constructor requires the type of node to create (for example, `"mo"` or
|
||
* `"mspace"`, corresponding to `<mo>` and `<mspace>` tags).
|
||
*/
|
||
|
||
var mathMLTree_MathNode =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function MathNode(type, children) {
|
||
this.type = void 0;
|
||
this.attributes = void 0;
|
||
this.children = void 0;
|
||
this.type = type;
|
||
this.attributes = {};
|
||
this.children = children || [];
|
||
}
|
||
/**
|
||
* Sets an attribute on a MathML node. MathML depends on attributes to convey a
|
||
* semantic content, so this is used heavily.
|
||
*/
|
||
|
||
|
||
var _proto = MathNode.prototype;
|
||
|
||
_proto.setAttribute = function setAttribute(name, value) {
|
||
this.attributes[name] = value;
|
||
}
|
||
/**
|
||
* Gets an attribute on a MathML node.
|
||
*/
|
||
;
|
||
|
||
_proto.getAttribute = function getAttribute(name) {
|
||
return this.attributes[name];
|
||
}
|
||
/**
|
||
* Converts the math node into a MathML-namespaced DOM element.
|
||
*/
|
||
;
|
||
|
||
_proto.toNode = function toNode() {
|
||
var node = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type);
|
||
|
||
for (var attr in this.attributes) {
|
||
if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
|
||
node.setAttribute(attr, this.attributes[attr]);
|
||
}
|
||
}
|
||
|
||
for (var i = 0; i < this.children.length; i++) {
|
||
node.appendChild(this.children[i].toNode());
|
||
}
|
||
|
||
return node;
|
||
}
|
||
/**
|
||
* Converts the math node into an HTML markup string.
|
||
*/
|
||
;
|
||
|
||
_proto.toMarkup = function toMarkup() {
|
||
var markup = "<" + this.type; // Add the attributes
|
||
|
||
for (var attr in this.attributes) {
|
||
if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
|
||
markup += " " + attr + "=\"";
|
||
markup += utils.escape(this.attributes[attr]);
|
||
markup += "\"";
|
||
}
|
||
}
|
||
|
||
markup += ">";
|
||
|
||
for (var i = 0; i < this.children.length; i++) {
|
||
markup += this.children[i].toMarkup();
|
||
}
|
||
|
||
markup += "</" + this.type + ">";
|
||
return markup;
|
||
}
|
||
/**
|
||
* Converts the math node into a string, similar to innerText, but escaped.
|
||
*/
|
||
;
|
||
|
||
_proto.toText = function toText() {
|
||
return this.children.map(function (child) {
|
||
return child.toText();
|
||
}).join("");
|
||
};
|
||
|
||
return MathNode;
|
||
}();
|
||
/**
|
||
* This node represents a piece of text.
|
||
*/
|
||
|
||
var mathMLTree_TextNode =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function TextNode(text) {
|
||
this.text = void 0;
|
||
this.text = text;
|
||
}
|
||
/**
|
||
* Converts the text node into a DOM text node.
|
||
*/
|
||
|
||
|
||
var _proto2 = TextNode.prototype;
|
||
|
||
_proto2.toNode = function toNode() {
|
||
return document.createTextNode(this.text);
|
||
}
|
||
/**
|
||
* Converts the text node into escaped HTML markup
|
||
* (representing the text itself).
|
||
*/
|
||
;
|
||
|
||
_proto2.toMarkup = function toMarkup() {
|
||
return utils.escape(this.toText());
|
||
}
|
||
/**
|
||
* Converts the text node into a string
|
||
* (representing the text iteself).
|
||
*/
|
||
;
|
||
|
||
_proto2.toText = function toText() {
|
||
return this.text;
|
||
};
|
||
|
||
return TextNode;
|
||
}();
|
||
/**
|
||
* This node represents a space, but may render as <mspace.../> or as text,
|
||
* depending on the width.
|
||
*/
|
||
|
||
var SpaceNode =
|
||
/*#__PURE__*/
|
||
function () {
|
||
/**
|
||
* Create a Space node with width given in CSS ems.
|
||
*/
|
||
function SpaceNode(width) {
|
||
this.width = void 0;
|
||
this.character = void 0;
|
||
this.width = width; // See https://www.w3.org/TR/2000/WD-MathML2-20000328/chapter6.html
|
||
// for a table of space-like characters. We use Unicode
|
||
// representations instead of &LongNames; as it's not clear how to
|
||
// make the latter via document.createTextNode.
|
||
|
||
if (width >= 0.05555 && width <= 0.05556) {
|
||
this.character = "\u200A"; //  
|
||
} else if (width >= 0.1666 && width <= 0.1667) {
|
||
this.character = "\u2009"; //  
|
||
} else if (width >= 0.2222 && width <= 0.2223) {
|
||
this.character = "\u2005"; //  
|
||
} else if (width >= 0.2777 && width <= 0.2778) {
|
||
this.character = "\u2005\u200A"; //   
|
||
} else if (width >= -0.05556 && width <= -0.05555) {
|
||
this.character = "\u200A\u2063"; // ​
|
||
} else if (width >= -0.1667 && width <= -0.1666) {
|
||
this.character = "\u2009\u2063"; // ​
|
||
} else if (width >= -0.2223 && width <= -0.2222) {
|
||
this.character = "\u205F\u2063"; // ​
|
||
} else if (width >= -0.2778 && width <= -0.2777) {
|
||
this.character = "\u2005\u2063"; // ​
|
||
} else {
|
||
this.character = null;
|
||
}
|
||
}
|
||
/**
|
||
* Converts the math node into a MathML-namespaced DOM element.
|
||
*/
|
||
|
||
|
||
var _proto3 = SpaceNode.prototype;
|
||
|
||
_proto3.toNode = function toNode() {
|
||
if (this.character) {
|
||
return document.createTextNode(this.character);
|
||
} else {
|
||
var node = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mspace");
|
||
node.setAttribute("width", this.width + "em");
|
||
return node;
|
||
}
|
||
}
|
||
/**
|
||
* Converts the math node into an HTML markup string.
|
||
*/
|
||
;
|
||
|
||
_proto3.toMarkup = function toMarkup() {
|
||
if (this.character) {
|
||
return "<mtext>" + this.character + "</mtext>";
|
||
} else {
|
||
return "<mspace width=\"" + this.width + "em\"/>";
|
||
}
|
||
}
|
||
/**
|
||
* Converts the math node into a string, similar to innerText.
|
||
*/
|
||
;
|
||
|
||
_proto3.toText = function toText() {
|
||
if (this.character) {
|
||
return this.character;
|
||
} else {
|
||
return " ";
|
||
}
|
||
};
|
||
|
||
return SpaceNode;
|
||
}();
|
||
|
||
/* harmony default export */ var mathMLTree = ({
|
||
MathNode: mathMLTree_MathNode,
|
||
TextNode: mathMLTree_TextNode,
|
||
SpaceNode: SpaceNode,
|
||
newDocumentFragment: newDocumentFragment
|
||
});
|
||
// CONCATENATED MODULE: ./src/buildMathML.js
|
||
/**
|
||
* This file converts a parse tree into a cooresponding MathML tree. The main
|
||
* entry point is the `buildMathML` function, which takes a parse tree from the
|
||
* parser.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* Takes a symbol and converts it into a MathML text node after performing
|
||
* optional replacement from symbols.js.
|
||
*/
|
||
var buildMathML_makeText = function makeText(text, mode, options) {
|
||
if (src_symbols[mode][text] && src_symbols[mode][text].replace && text.charCodeAt(0) !== 0xD835 && !(ligatures.hasOwnProperty(text) && options && (options.fontFamily && options.fontFamily.substr(4, 2) === "tt" || options.font && options.font.substr(4, 2) === "tt"))) {
|
||
text = src_symbols[mode][text].replace;
|
||
}
|
||
|
||
return new mathMLTree.TextNode(text);
|
||
};
|
||
/**
|
||
* Wrap the given array of nodes in an <mrow> node if needed, i.e.,
|
||
* unless the array has length 1. Always returns a single node.
|
||
*/
|
||
|
||
var buildMathML_makeRow = function makeRow(body) {
|
||
if (body.length === 1) {
|
||
return body[0];
|
||
} else {
|
||
return new mathMLTree.MathNode("mrow", body);
|
||
}
|
||
};
|
||
/**
|
||
* Returns the math variant as a string or null if none is required.
|
||
*/
|
||
|
||
var buildMathML_getVariant = function getVariant(group, options) {
|
||
// Handle \text... font specifiers as best we can.
|
||
// MathML has a limited list of allowable mathvariant specifiers; see
|
||
// https://www.w3.org/TR/MathML3/chapter3.html#presm.commatt
|
||
if (options.fontFamily === "texttt") {
|
||
return "monospace";
|
||
} else if (options.fontFamily === "textsf") {
|
||
if (options.fontShape === "textit" && options.fontWeight === "textbf") {
|
||
return "sans-serif-bold-italic";
|
||
} else if (options.fontShape === "textit") {
|
||
return "sans-serif-italic";
|
||
} else if (options.fontWeight === "textbf") {
|
||
return "bold-sans-serif";
|
||
} else {
|
||
return "sans-serif";
|
||
}
|
||
} else if (options.fontShape === "textit" && options.fontWeight === "textbf") {
|
||
return "bold-italic";
|
||
} else if (options.fontShape === "textit") {
|
||
return "italic";
|
||
} else if (options.fontWeight === "textbf") {
|
||
return "bold";
|
||
}
|
||
|
||
var font = options.font;
|
||
|
||
if (!font || font === "mathnormal") {
|
||
return null;
|
||
}
|
||
|
||
var mode = group.mode;
|
||
|
||
if (font === "mathit") {
|
||
return "italic";
|
||
} else if (font === "boldsymbol") {
|
||
return "bold-italic";
|
||
} else if (font === "mathbf") {
|
||
return "bold";
|
||
} else if (font === "mathbb") {
|
||
return "double-struck";
|
||
} else if (font === "mathfrak") {
|
||
return "fraktur";
|
||
} else if (font === "mathscr" || font === "mathcal") {
|
||
// MathML makes no distinction between script and caligrahpic
|
||
return "script";
|
||
} else if (font === "mathsf") {
|
||
return "sans-serif";
|
||
} else if (font === "mathtt") {
|
||
return "monospace";
|
||
}
|
||
|
||
var text = group.text;
|
||
|
||
if (utils.contains(["\\imath", "\\jmath"], text)) {
|
||
return null;
|
||
}
|
||
|
||
if (src_symbols[mode][text] && src_symbols[mode][text].replace) {
|
||
text = src_symbols[mode][text].replace;
|
||
}
|
||
|
||
var fontName = buildCommon.fontMap[font].fontName;
|
||
|
||
if (getCharacterMetrics(text, fontName, mode)) {
|
||
return buildCommon.fontMap[font].variant;
|
||
}
|
||
|
||
return null;
|
||
};
|
||
/**
|
||
* Takes a list of nodes, builds them, and returns a list of the generated
|
||
* MathML nodes. Also combine consecutive <mtext> outputs into a single
|
||
* <mtext> tag.
|
||
*/
|
||
|
||
var buildMathML_buildExpression = function buildExpression(expression, options, isOrdgroup) {
|
||
if (expression.length === 1) {
|
||
var group = buildMathML_buildGroup(expression[0], options);
|
||
|
||
if (isOrdgroup && group instanceof mathMLTree_MathNode && group.type === "mo") {
|
||
// When TeX writers want to suppress spacing on an operator,
|
||
// they often put the operator by itself inside braces.
|
||
group.setAttribute("lspace", "0em");
|
||
group.setAttribute("rspace", "0em");
|
||
}
|
||
|
||
return [group];
|
||
}
|
||
|
||
var groups = [];
|
||
var lastGroup;
|
||
|
||
for (var i = 0; i < expression.length; i++) {
|
||
var _group = buildMathML_buildGroup(expression[i], options);
|
||
|
||
if (_group instanceof mathMLTree_MathNode && lastGroup instanceof mathMLTree_MathNode) {
|
||
// Concatenate adjacent <mtext>s
|
||
if (_group.type === 'mtext' && lastGroup.type === 'mtext' && _group.getAttribute('mathvariant') === lastGroup.getAttribute('mathvariant')) {
|
||
var _lastGroup$children;
|
||
|
||
(_lastGroup$children = lastGroup.children).push.apply(_lastGroup$children, _group.children);
|
||
|
||
continue; // Concatenate adjacent <mn>s
|
||
} else if (_group.type === 'mn' && lastGroup.type === 'mn') {
|
||
var _lastGroup$children2;
|
||
|
||
(_lastGroup$children2 = lastGroup.children).push.apply(_lastGroup$children2, _group.children);
|
||
|
||
continue; // Concatenate <mn>...</mn> followed by <mi>.</mi>
|
||
} else if (_group.type === 'mi' && _group.children.length === 1 && lastGroup.type === 'mn') {
|
||
var child = _group.children[0];
|
||
|
||
if (child instanceof mathMLTree_TextNode && child.text === '.') {
|
||
var _lastGroup$children3;
|
||
|
||
(_lastGroup$children3 = lastGroup.children).push.apply(_lastGroup$children3, _group.children);
|
||
|
||
continue;
|
||
}
|
||
} else if (lastGroup.type === 'mi' && lastGroup.children.length === 1) {
|
||
var lastChild = lastGroup.children[0];
|
||
|
||
if (lastChild instanceof mathMLTree_TextNode && lastChild.text === "\u0338" && (_group.type === 'mo' || _group.type === 'mi' || _group.type === 'mn')) {
|
||
var _child = _group.children[0];
|
||
|
||
if (_child instanceof mathMLTree_TextNode && _child.text.length > 0) {
|
||
// Overlay with combining character long solidus
|
||
_child.text = _child.text.slice(0, 1) + "\u0338" + _child.text.slice(1);
|
||
groups.pop();
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
groups.push(_group);
|
||
lastGroup = _group;
|
||
}
|
||
|
||
return groups;
|
||
};
|
||
/**
|
||
* Equivalent to buildExpression, but wraps the elements in an <mrow>
|
||
* if there's more than one. Returns a single node instead of an array.
|
||
*/
|
||
|
||
var buildExpressionRow = function buildExpressionRow(expression, options, isOrdgroup) {
|
||
return buildMathML_makeRow(buildMathML_buildExpression(expression, options, isOrdgroup));
|
||
};
|
||
/**
|
||
* Takes a group from the parser and calls the appropriate groupBuilders function
|
||
* on it to produce a MathML node.
|
||
*/
|
||
|
||
var buildMathML_buildGroup = function buildGroup(group, options) {
|
||
if (!group) {
|
||
return new mathMLTree.MathNode("mrow");
|
||
}
|
||
|
||
if (_mathmlGroupBuilders[group.type]) {
|
||
// Call the groupBuilders function
|
||
var result = _mathmlGroupBuilders[group.type](group, options);
|
||
return result;
|
||
} else {
|
||
throw new src_ParseError("Got group of unknown type: '" + group.type + "'");
|
||
}
|
||
};
|
||
/**
|
||
* Takes a full parse tree and settings and builds a MathML representation of
|
||
* it. In particular, we put the elements from building the parse tree into a
|
||
* <semantics> tag so we can also include that TeX source as an annotation.
|
||
*
|
||
* Note that we actually return a domTree element with a `<math>` inside it so
|
||
* we can do appropriate styling.
|
||
*/
|
||
|
||
function buildMathML(tree, texExpression, options, forMathmlOnly) {
|
||
var expression = buildMathML_buildExpression(tree, options); // Wrap up the expression in an mrow so it is presented in the semantics
|
||
// tag correctly, unless it's a single <mrow> or <mtable>.
|
||
|
||
var wrapper;
|
||
|
||
if (expression.length === 1 && expression[0] instanceof mathMLTree_MathNode && utils.contains(["mrow", "mtable"], expression[0].type)) {
|
||
wrapper = expression[0];
|
||
} else {
|
||
wrapper = new mathMLTree.MathNode("mrow", expression);
|
||
} // Build a TeX annotation of the source
|
||
|
||
|
||
var annotation = new mathMLTree.MathNode("annotation", [new mathMLTree.TextNode(texExpression)]);
|
||
annotation.setAttribute("encoding", "application/x-tex");
|
||
var semantics = new mathMLTree.MathNode("semantics", [wrapper, annotation]);
|
||
var math = new mathMLTree.MathNode("math", [semantics]);
|
||
math.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML"); // You can't style <math> nodes, so we wrap the node in a span.
|
||
// NOTE: The span class is not typed to have <math> nodes as children, and
|
||
// we don't want to make the children type more generic since the children
|
||
// of span are expected to have more fields in `buildHtml` contexts.
|
||
|
||
var wrapperClass = forMathmlOnly ? "katex" : "katex-mathml"; // $FlowFixMe
|
||
|
||
return buildCommon.makeSpan([wrapperClass], [math]);
|
||
}
|
||
// CONCATENATED MODULE: ./src/buildTree.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var buildTree_optionsFromSettings = function optionsFromSettings(settings) {
|
||
return new src_Options({
|
||
style: settings.displayMode ? src_Style.DISPLAY : src_Style.TEXT,
|
||
maxSize: settings.maxSize,
|
||
minRuleThickness: settings.minRuleThickness
|
||
});
|
||
};
|
||
|
||
var buildTree_displayWrap = function displayWrap(node, settings) {
|
||
if (settings.displayMode) {
|
||
var classes = ["katex-display"];
|
||
|
||
if (settings.leqno) {
|
||
classes.push("leqno");
|
||
}
|
||
|
||
if (settings.fleqn) {
|
||
classes.push("fleqn");
|
||
}
|
||
|
||
node = buildCommon.makeSpan(classes, [node]);
|
||
}
|
||
|
||
return node;
|
||
};
|
||
|
||
var buildTree_buildTree = function buildTree(tree, expression, settings) {
|
||
var options = buildTree_optionsFromSettings(settings);
|
||
var katexNode;
|
||
|
||
if (settings.output === "mathml") {
|
||
return buildMathML(tree, expression, options, true);
|
||
} else if (settings.output === "html") {
|
||
var htmlNode = buildHTML(tree, options);
|
||
katexNode = buildCommon.makeSpan(["katex"], [htmlNode]);
|
||
} else {
|
||
var mathMLNode = buildMathML(tree, expression, options, false);
|
||
|
||
var _htmlNode = buildHTML(tree, options);
|
||
|
||
katexNode = buildCommon.makeSpan(["katex"], [mathMLNode, _htmlNode]);
|
||
}
|
||
|
||
return buildTree_displayWrap(katexNode, settings);
|
||
};
|
||
var buildTree_buildHTMLTree = function buildHTMLTree(tree, expression, settings) {
|
||
var options = buildTree_optionsFromSettings(settings);
|
||
var htmlNode = buildHTML(tree, options);
|
||
var katexNode = buildCommon.makeSpan(["katex"], [htmlNode]);
|
||
return buildTree_displayWrap(katexNode, settings);
|
||
};
|
||
/* harmony default export */ var src_buildTree = (buildTree_buildTree);
|
||
// CONCATENATED MODULE: ./src/stretchy.js
|
||
/**
|
||
* This file provides support to buildMathML.js and buildHTML.js
|
||
* for stretchy wide elements rendered from SVG files
|
||
* and other CSS trickery.
|
||
*/
|
||
|
||
|
||
|
||
|
||
var stretchyCodePoint = {
|
||
widehat: "^",
|
||
widecheck: "ˇ",
|
||
widetilde: "~",
|
||
utilde: "~",
|
||
overleftarrow: "\u2190",
|
||
underleftarrow: "\u2190",
|
||
xleftarrow: "\u2190",
|
||
overrightarrow: "\u2192",
|
||
underrightarrow: "\u2192",
|
||
xrightarrow: "\u2192",
|
||
underbrace: "\u23DF",
|
||
overbrace: "\u23DE",
|
||
overgroup: "\u23E0",
|
||
undergroup: "\u23E1",
|
||
overleftrightarrow: "\u2194",
|
||
underleftrightarrow: "\u2194",
|
||
xleftrightarrow: "\u2194",
|
||
Overrightarrow: "\u21D2",
|
||
xRightarrow: "\u21D2",
|
||
overleftharpoon: "\u21BC",
|
||
xleftharpoonup: "\u21BC",
|
||
overrightharpoon: "\u21C0",
|
||
xrightharpoonup: "\u21C0",
|
||
xLeftarrow: "\u21D0",
|
||
xLeftrightarrow: "\u21D4",
|
||
xhookleftarrow: "\u21A9",
|
||
xhookrightarrow: "\u21AA",
|
||
xmapsto: "\u21A6",
|
||
xrightharpoondown: "\u21C1",
|
||
xleftharpoondown: "\u21BD",
|
||
xrightleftharpoons: "\u21CC",
|
||
xleftrightharpoons: "\u21CB",
|
||
xtwoheadleftarrow: "\u219E",
|
||
xtwoheadrightarrow: "\u21A0",
|
||
xlongequal: "=",
|
||
xtofrom: "\u21C4",
|
||
xrightleftarrows: "\u21C4",
|
||
xrightequilibrium: "\u21CC",
|
||
// Not a perfect match.
|
||
xleftequilibrium: "\u21CB" // None better available.
|
||
|
||
};
|
||
|
||
var stretchy_mathMLnode = function mathMLnode(label) {
|
||
var node = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(stretchyCodePoint[label.substr(1)])]);
|
||
node.setAttribute("stretchy", "true");
|
||
return node;
|
||
}; // Many of the KaTeX SVG images have been adapted from glyphs in KaTeX fonts.
|
||
// Copyright (c) 2009-2010, Design Science, Inc. (<www.mathjax.org>)
|
||
// Copyright (c) 2014-2017 Khan Academy (<www.khanacademy.org>)
|
||
// Licensed under the SIL Open Font License, Version 1.1.
|
||
// See \nhttp://scripts.sil.org/OFL
|
||
// Very Long SVGs
|
||
// Many of the KaTeX stretchy wide elements use a long SVG image and an
|
||
// overflow: hidden tactic to achieve a stretchy image while avoiding
|
||
// distortion of arrowheads or brace corners.
|
||
// The SVG typically contains a very long (400 em) arrow.
|
||
// The SVG is in a container span that has overflow: hidden, so the span
|
||
// acts like a window that exposes only part of the SVG.
|
||
// The SVG always has a longer, thinner aspect ratio than the container span.
|
||
// After the SVG fills 100% of the height of the container span,
|
||
// there is a long arrow shaft left over. That left-over shaft is not shown.
|
||
// Instead, it is sliced off because the span's CSS has overflow: hidden.
|
||
// Thus, the reader sees an arrow that matches the subject matter width
|
||
// without distortion.
|
||
// Some functions, such as \cancel, need to vary their aspect ratio. These
|
||
// functions do not get the overflow SVG treatment.
|
||
// Second Brush Stroke
|
||
// Low resolution monitors struggle to display images in fine detail.
|
||
// So browsers apply anti-aliasing. A long straight arrow shaft therefore
|
||
// will sometimes appear as if it has a blurred edge.
|
||
// To mitigate this, these SVG files contain a second "brush-stroke" on the
|
||
// arrow shafts. That is, a second long thin rectangular SVG path has been
|
||
// written directly on top of each arrow shaft. This reinforcement causes
|
||
// some of the screen pixels to display as black instead of the anti-aliased
|
||
// gray pixel that a single path would generate. So we get arrow shafts
|
||
// whose edges appear to be sharper.
|
||
// In the katexImagesData object just below, the dimensions all
|
||
// correspond to path geometry inside the relevant SVG.
|
||
// For example, \overrightarrow uses the same arrowhead as glyph U+2192
|
||
// from the KaTeX Main font. The scaling factor is 1000.
|
||
// That is, inside the font, that arrowhead is 522 units tall, which
|
||
// corresponds to 0.522 em inside the document.
|
||
|
||
|
||
var katexImagesData = {
|
||
// path(s), minWidth, height, align
|
||
overrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"],
|
||
overleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"],
|
||
underrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"],
|
||
underleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"],
|
||
xrightarrow: [["rightarrow"], 1.469, 522, "xMaxYMin"],
|
||
xleftarrow: [["leftarrow"], 1.469, 522, "xMinYMin"],
|
||
Overrightarrow: [["doublerightarrow"], 0.888, 560, "xMaxYMin"],
|
||
xRightarrow: [["doublerightarrow"], 1.526, 560, "xMaxYMin"],
|
||
xLeftarrow: [["doubleleftarrow"], 1.526, 560, "xMinYMin"],
|
||
overleftharpoon: [["leftharpoon"], 0.888, 522, "xMinYMin"],
|
||
xleftharpoonup: [["leftharpoon"], 0.888, 522, "xMinYMin"],
|
||
xleftharpoondown: [["leftharpoondown"], 0.888, 522, "xMinYMin"],
|
||
overrightharpoon: [["rightharpoon"], 0.888, 522, "xMaxYMin"],
|
||
xrightharpoonup: [["rightharpoon"], 0.888, 522, "xMaxYMin"],
|
||
xrightharpoondown: [["rightharpoondown"], 0.888, 522, "xMaxYMin"],
|
||
xlongequal: [["longequal"], 0.888, 334, "xMinYMin"],
|
||
xtwoheadleftarrow: [["twoheadleftarrow"], 0.888, 334, "xMinYMin"],
|
||
xtwoheadrightarrow: [["twoheadrightarrow"], 0.888, 334, "xMaxYMin"],
|
||
overleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522],
|
||
overbrace: [["leftbrace", "midbrace", "rightbrace"], 1.6, 548],
|
||
underbrace: [["leftbraceunder", "midbraceunder", "rightbraceunder"], 1.6, 548],
|
||
underleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522],
|
||
xleftrightarrow: [["leftarrow", "rightarrow"], 1.75, 522],
|
||
xLeftrightarrow: [["doubleleftarrow", "doublerightarrow"], 1.75, 560],
|
||
xrightleftharpoons: [["leftharpoondownplus", "rightharpoonplus"], 1.75, 716],
|
||
xleftrightharpoons: [["leftharpoonplus", "rightharpoondownplus"], 1.75, 716],
|
||
xhookleftarrow: [["leftarrow", "righthook"], 1.08, 522],
|
||
xhookrightarrow: [["lefthook", "rightarrow"], 1.08, 522],
|
||
overlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522],
|
||
underlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522],
|
||
overgroup: [["leftgroup", "rightgroup"], 0.888, 342],
|
||
undergroup: [["leftgroupunder", "rightgroupunder"], 0.888, 342],
|
||
xmapsto: [["leftmapsto", "rightarrow"], 1.5, 522],
|
||
xtofrom: [["leftToFrom", "rightToFrom"], 1.75, 528],
|
||
// The next three arrows are from the mhchem package.
|
||
// In mhchem.sty, min-length is 2.0em. But these arrows might appear in the
|
||
// document as \xrightarrow or \xrightleftharpoons. Those have
|
||
// min-length = 1.75em, so we set min-length on these next three to match.
|
||
xrightleftarrows: [["baraboveleftarrow", "rightarrowabovebar"], 1.75, 901],
|
||
xrightequilibrium: [["baraboveshortleftharpoon", "rightharpoonaboveshortbar"], 1.75, 716],
|
||
xleftequilibrium: [["shortbaraboveleftharpoon", "shortrightharpoonabovebar"], 1.75, 716]
|
||
};
|
||
|
||
var groupLength = function groupLength(arg) {
|
||
if (arg.type === "ordgroup") {
|
||
return arg.body.length;
|
||
} else {
|
||
return 1;
|
||
}
|
||
};
|
||
|
||
var stretchy_svgSpan = function svgSpan(group, options) {
|
||
// Create a span with inline SVG for the element.
|
||
function buildSvgSpan_() {
|
||
var viewBoxWidth = 400000; // default
|
||
|
||
var label = group.label.substr(1);
|
||
|
||
if (utils.contains(["widehat", "widecheck", "widetilde", "utilde"], label)) {
|
||
// Each type in the `if` statement corresponds to one of the ParseNode
|
||
// types below. This narrowing is required to access `grp.base`.
|
||
var grp = group; // There are four SVG images available for each function.
|
||
// Choose a taller image when there are more characters.
|
||
|
||
var numChars = groupLength(grp.base);
|
||
var viewBoxHeight;
|
||
var pathName;
|
||
|
||
var _height;
|
||
|
||
if (numChars > 5) {
|
||
if (label === "widehat" || label === "widecheck") {
|
||
viewBoxHeight = 420;
|
||
viewBoxWidth = 2364;
|
||
_height = 0.42;
|
||
pathName = label + "4";
|
||
} else {
|
||
viewBoxHeight = 312;
|
||
viewBoxWidth = 2340;
|
||
_height = 0.34;
|
||
pathName = "tilde4";
|
||
}
|
||
} else {
|
||
var imgIndex = [1, 1, 2, 2, 3, 3][numChars];
|
||
|
||
if (label === "widehat" || label === "widecheck") {
|
||
viewBoxWidth = [0, 1062, 2364, 2364, 2364][imgIndex];
|
||
viewBoxHeight = [0, 239, 300, 360, 420][imgIndex];
|
||
_height = [0, 0.24, 0.3, 0.3, 0.36, 0.42][imgIndex];
|
||
pathName = label + imgIndex;
|
||
} else {
|
||
viewBoxWidth = [0, 600, 1033, 2339, 2340][imgIndex];
|
||
viewBoxHeight = [0, 260, 286, 306, 312][imgIndex];
|
||
_height = [0, 0.26, 0.286, 0.3, 0.306, 0.34][imgIndex];
|
||
pathName = "tilde" + imgIndex;
|
||
}
|
||
}
|
||
|
||
var path = new domTree_PathNode(pathName);
|
||
var svgNode = new SvgNode([path], {
|
||
"width": "100%",
|
||
"height": _height + "em",
|
||
"viewBox": "0 0 " + viewBoxWidth + " " + viewBoxHeight,
|
||
"preserveAspectRatio": "none"
|
||
});
|
||
return {
|
||
span: buildCommon.makeSvgSpan([], [svgNode], options),
|
||
minWidth: 0,
|
||
height: _height
|
||
};
|
||
} else {
|
||
var spans = [];
|
||
var data = katexImagesData[label];
|
||
var paths = data[0],
|
||
_minWidth = data[1],
|
||
_viewBoxHeight = data[2];
|
||
|
||
var _height2 = _viewBoxHeight / 1000;
|
||
|
||
var numSvgChildren = paths.length;
|
||
var widthClasses;
|
||
var aligns;
|
||
|
||
if (numSvgChildren === 1) {
|
||
// $FlowFixMe: All these cases must be of the 4-tuple type.
|
||
var align1 = data[3];
|
||
widthClasses = ["hide-tail"];
|
||
aligns = [align1];
|
||
} else if (numSvgChildren === 2) {
|
||
widthClasses = ["halfarrow-left", "halfarrow-right"];
|
||
aligns = ["xMinYMin", "xMaxYMin"];
|
||
} else if (numSvgChildren === 3) {
|
||
widthClasses = ["brace-left", "brace-center", "brace-right"];
|
||
aligns = ["xMinYMin", "xMidYMin", "xMaxYMin"];
|
||
} else {
|
||
throw new Error("Correct katexImagesData or update code here to support\n " + numSvgChildren + " children.");
|
||
}
|
||
|
||
for (var i = 0; i < numSvgChildren; i++) {
|
||
var _path = new domTree_PathNode(paths[i]);
|
||
|
||
var _svgNode = new SvgNode([_path], {
|
||
"width": "400em",
|
||
"height": _height2 + "em",
|
||
"viewBox": "0 0 " + viewBoxWidth + " " + _viewBoxHeight,
|
||
"preserveAspectRatio": aligns[i] + " slice"
|
||
});
|
||
|
||
var _span = buildCommon.makeSvgSpan([widthClasses[i]], [_svgNode], options);
|
||
|
||
if (numSvgChildren === 1) {
|
||
return {
|
||
span: _span,
|
||
minWidth: _minWidth,
|
||
height: _height2
|
||
};
|
||
} else {
|
||
_span.style.height = _height2 + "em";
|
||
spans.push(_span);
|
||
}
|
||
}
|
||
|
||
return {
|
||
span: buildCommon.makeSpan(["stretchy"], spans, options),
|
||
minWidth: _minWidth,
|
||
height: _height2
|
||
};
|
||
}
|
||
} // buildSvgSpan_()
|
||
|
||
|
||
var _buildSvgSpan_ = buildSvgSpan_(),
|
||
span = _buildSvgSpan_.span,
|
||
minWidth = _buildSvgSpan_.minWidth,
|
||
height = _buildSvgSpan_.height; // Note that we are returning span.depth = 0.
|
||
// Any adjustments relative to the baseline must be done in buildHTML.
|
||
|
||
|
||
span.height = height;
|
||
span.style.height = height + "em";
|
||
|
||
if (minWidth > 0) {
|
||
span.style.minWidth = minWidth + "em";
|
||
}
|
||
|
||
return span;
|
||
};
|
||
|
||
var stretchy_encloseSpan = function encloseSpan(inner, label, pad, options) {
|
||
// Return an image span for \cancel, \bcancel, \xcancel, or \fbox
|
||
var img;
|
||
var totalHeight = inner.height + inner.depth + 2 * pad;
|
||
|
||
if (/fbox|color/.test(label)) {
|
||
img = buildCommon.makeSpan(["stretchy", label], [], options);
|
||
|
||
if (label === "fbox") {
|
||
var color = options.color && options.getColor();
|
||
|
||
if (color) {
|
||
img.style.borderColor = color;
|
||
}
|
||
}
|
||
} else {
|
||
// \cancel, \bcancel, or \xcancel
|
||
// Since \cancel's SVG is inline and it omits the viewBox attribute,
|
||
// its stroke-width will not vary with span area.
|
||
var lines = [];
|
||
|
||
if (/^[bx]cancel$/.test(label)) {
|
||
lines.push(new LineNode({
|
||
"x1": "0",
|
||
"y1": "0",
|
||
"x2": "100%",
|
||
"y2": "100%",
|
||
"stroke-width": "0.046em"
|
||
}));
|
||
}
|
||
|
||
if (/^x?cancel$/.test(label)) {
|
||
lines.push(new LineNode({
|
||
"x1": "0",
|
||
"y1": "100%",
|
||
"x2": "100%",
|
||
"y2": "0",
|
||
"stroke-width": "0.046em"
|
||
}));
|
||
}
|
||
|
||
var svgNode = new SvgNode(lines, {
|
||
"width": "100%",
|
||
"height": totalHeight + "em"
|
||
});
|
||
img = buildCommon.makeSvgSpan([], [svgNode], options);
|
||
}
|
||
|
||
img.height = totalHeight;
|
||
img.style.height = totalHeight + "em";
|
||
return img;
|
||
};
|
||
|
||
/* harmony default export */ var stretchy = ({
|
||
encloseSpan: stretchy_encloseSpan,
|
||
mathMLnode: stretchy_mathMLnode,
|
||
svgSpan: stretchy_svgSpan
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/accent.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// NOTE: Unlike most `htmlBuilder`s, this one handles not only "accent", but
|
||
var accent_htmlBuilder = function htmlBuilder(grp, options) {
|
||
// Accents are handled in the TeXbook pg. 443, rule 12.
|
||
var base;
|
||
var group;
|
||
var supSub = checkNodeType(grp, "supsub");
|
||
var supSubGroup;
|
||
|
||
if (supSub) {
|
||
// If our base is a character box, and we have superscripts and
|
||
// subscripts, the supsub will defer to us. In particular, we want
|
||
// to attach the superscripts and subscripts to the inner body (so
|
||
// that the position of the superscripts and subscripts won't be
|
||
// affected by the height of the accent). We accomplish this by
|
||
// sticking the base of the accent into the base of the supsub, and
|
||
// rendering that, while keeping track of where the accent is.
|
||
// The real accent group is the base of the supsub group
|
||
group = assertNodeType(supSub.base, "accent"); // The character box is the base of the accent group
|
||
|
||
base = group.base; // Stick the character box into the base of the supsub group
|
||
|
||
supSub.base = base; // Rerender the supsub group with its new base, and store that
|
||
// result.
|
||
|
||
supSubGroup = assertSpan(buildHTML_buildGroup(supSub, options)); // reset original base
|
||
|
||
supSub.base = group;
|
||
} else {
|
||
group = assertNodeType(grp, "accent");
|
||
base = group.base;
|
||
} // Build the base group
|
||
|
||
|
||
var body = buildHTML_buildGroup(base, options.havingCrampedStyle()); // Does the accent need to shift for the skew of a character?
|
||
|
||
var mustShift = group.isShifty && utils.isCharacterBox(base); // Calculate the skew of the accent. This is based on the line "If the
|
||
// nucleus is not a single character, let s = 0; otherwise set s to the
|
||
// kern amount for the nucleus followed by the \skewchar of its font."
|
||
// Note that our skew metrics are just the kern between each character
|
||
// and the skewchar.
|
||
|
||
var skew = 0;
|
||
|
||
if (mustShift) {
|
||
// If the base is a character box, then we want the skew of the
|
||
// innermost character. To do that, we find the innermost character:
|
||
var baseChar = utils.getBaseElem(base); // Then, we render its group to get the symbol inside it
|
||
|
||
var baseGroup = buildHTML_buildGroup(baseChar, options.havingCrampedStyle()); // Finally, we pull the skew off of the symbol.
|
||
|
||
skew = assertSymbolDomNode(baseGroup).skew; // Note that we now throw away baseGroup, because the layers we
|
||
// removed with getBaseElem might contain things like \color which
|
||
// we can't get rid of.
|
||
// TODO(emily): Find a better way to get the skew
|
||
} // calculate the amount of space between the body and the accent
|
||
|
||
|
||
var clearance = Math.min(body.height, options.fontMetrics().xHeight); // Build the accent
|
||
|
||
var accentBody;
|
||
|
||
if (!group.isStretchy) {
|
||
var accent;
|
||
var width;
|
||
|
||
if (group.label === "\\vec") {
|
||
// Before version 0.9, \vec used the combining font glyph U+20D7.
|
||
// But browsers, especially Safari, are not consistent in how they
|
||
// render combining characters when not preceded by a character.
|
||
// So now we use an SVG.
|
||
// If Safari reforms, we should consider reverting to the glyph.
|
||
accent = buildCommon.staticSvg("vec", options);
|
||
width = buildCommon.svgData.vec[1];
|
||
} else {
|
||
accent = buildCommon.makeOrd({
|
||
mode: group.mode,
|
||
text: group.label
|
||
}, options, "textord");
|
||
accent = assertSymbolDomNode(accent); // Remove the italic correction of the accent, because it only serves to
|
||
// shift the accent over to a place we don't want.
|
||
|
||
accent.italic = 0;
|
||
width = accent.width;
|
||
}
|
||
|
||
accentBody = buildCommon.makeSpan(["accent-body"], [accent]); // "Full" accents expand the width of the resulting symbol to be
|
||
// at least the width of the accent, and overlap directly onto the
|
||
// character without any vertical offset.
|
||
|
||
var accentFull = group.label === "\\textcircled";
|
||
|
||
if (accentFull) {
|
||
accentBody.classes.push('accent-full');
|
||
clearance = body.height;
|
||
} // Shift the accent over by the skew.
|
||
|
||
|
||
var left = skew; // CSS defines `.katex .accent .accent-body:not(.accent-full) { width: 0 }`
|
||
// so that the accent doesn't contribute to the bounding box.
|
||
// We need to shift the character by its width (effectively half
|
||
// its width) to compensate.
|
||
|
||
if (!accentFull) {
|
||
left -= width / 2;
|
||
}
|
||
|
||
accentBody.style.left = left + "em"; // \textcircled uses the \bigcirc glyph, so it needs some
|
||
// vertical adjustment to match LaTeX.
|
||
|
||
if (group.label === "\\textcircled") {
|
||
accentBody.style.top = ".2em";
|
||
}
|
||
|
||
accentBody = buildCommon.makeVList({
|
||
positionType: "firstBaseline",
|
||
children: [{
|
||
type: "elem",
|
||
elem: body
|
||
}, {
|
||
type: "kern",
|
||
size: -clearance
|
||
}, {
|
||
type: "elem",
|
||
elem: accentBody
|
||
}]
|
||
}, options);
|
||
} else {
|
||
accentBody = stretchy.svgSpan(group, options);
|
||
accentBody = buildCommon.makeVList({
|
||
positionType: "firstBaseline",
|
||
children: [{
|
||
type: "elem",
|
||
elem: body
|
||
}, {
|
||
type: "elem",
|
||
elem: accentBody,
|
||
wrapperClasses: ["svg-align"],
|
||
wrapperStyle: skew > 0 ? {
|
||
width: "calc(100% - " + 2 * skew + "em)",
|
||
marginLeft: 2 * skew + "em"
|
||
} : undefined
|
||
}]
|
||
}, options);
|
||
}
|
||
|
||
var accentWrap = buildCommon.makeSpan(["mord", "accent"], [accentBody], options);
|
||
|
||
if (supSubGroup) {
|
||
// Here, we replace the "base" child of the supsub with our newly
|
||
// generated accent.
|
||
supSubGroup.children[0] = accentWrap; // Since we don't rerun the height calculation after replacing the
|
||
// accent, we manually recalculate height.
|
||
|
||
supSubGroup.height = Math.max(accentWrap.height, supSubGroup.height); // Accents should always be ords, even when their innards are not.
|
||
|
||
supSubGroup.classes[0] = "mord";
|
||
return supSubGroup;
|
||
} else {
|
||
return accentWrap;
|
||
}
|
||
};
|
||
|
||
var accent_mathmlBuilder = function mathmlBuilder(group, options) {
|
||
var accentNode = group.isStretchy ? stretchy.mathMLnode(group.label) : new mathMLTree.MathNode("mo", [buildMathML_makeText(group.label, group.mode)]);
|
||
var node = new mathMLTree.MathNode("mover", [buildMathML_buildGroup(group.base, options), accentNode]);
|
||
node.setAttribute("accent", "true");
|
||
return node;
|
||
};
|
||
|
||
var NON_STRETCHY_ACCENT_REGEX = new RegExp(["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring"].map(function (accent) {
|
||
return "\\" + accent;
|
||
}).join("|")); // Accents
|
||
|
||
defineFunction({
|
||
type: "accent",
|
||
names: ["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring", "\\widecheck", "\\widehat", "\\widetilde", "\\overrightarrow", "\\overleftarrow", "\\Overrightarrow", "\\overleftrightarrow", "\\overgroup", "\\overlinesegment", "\\overleftharpoon", "\\overrightharpoon"],
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: function handler(context, args) {
|
||
var base = args[0];
|
||
var isStretchy = !NON_STRETCHY_ACCENT_REGEX.test(context.funcName);
|
||
var isShifty = !isStretchy || context.funcName === "\\widehat" || context.funcName === "\\widetilde" || context.funcName === "\\widecheck";
|
||
return {
|
||
type: "accent",
|
||
mode: context.parser.mode,
|
||
label: context.funcName,
|
||
isStretchy: isStretchy,
|
||
isShifty: isShifty,
|
||
base: base
|
||
};
|
||
},
|
||
htmlBuilder: accent_htmlBuilder,
|
||
mathmlBuilder: accent_mathmlBuilder
|
||
}); // Text-mode accents
|
||
|
||
defineFunction({
|
||
type: "accent",
|
||
names: ["\\'", "\\`", "\\^", "\\~", "\\=", "\\u", "\\.", '\\"', "\\r", "\\H", "\\v", "\\textcircled"],
|
||
props: {
|
||
numArgs: 1,
|
||
allowedInText: true,
|
||
allowedInMath: false
|
||
},
|
||
handler: function handler(context, args) {
|
||
var base = args[0];
|
||
return {
|
||
type: "accent",
|
||
mode: context.parser.mode,
|
||
label: context.funcName,
|
||
isStretchy: false,
|
||
isShifty: true,
|
||
base: base
|
||
};
|
||
},
|
||
htmlBuilder: accent_htmlBuilder,
|
||
mathmlBuilder: accent_mathmlBuilder
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/accentunder.js
|
||
// Horizontal overlap functions
|
||
|
||
|
||
|
||
|
||
|
||
|
||
defineFunction({
|
||
type: "accentUnder",
|
||
names: ["\\underleftarrow", "\\underrightarrow", "\\underleftrightarrow", "\\undergroup", "\\underlinesegment", "\\utilde"],
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser,
|
||
funcName = _ref.funcName;
|
||
var base = args[0];
|
||
return {
|
||
type: "accentUnder",
|
||
mode: parser.mode,
|
||
label: funcName,
|
||
base: base
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
// Treat under accents much like underlines.
|
||
var innerGroup = buildHTML_buildGroup(group.base, options);
|
||
var accentBody = stretchy.svgSpan(group, options);
|
||
var kern = group.label === "\\utilde" ? 0.12 : 0; // Generate the vlist, with the appropriate kerns
|
||
|
||
var vlist = buildCommon.makeVList({
|
||
positionType: "bottom",
|
||
positionData: accentBody.height + kern,
|
||
children: [{
|
||
type: "elem",
|
||
elem: accentBody,
|
||
wrapperClasses: ["svg-align"]
|
||
}, {
|
||
type: "kern",
|
||
size: kern
|
||
}, {
|
||
type: "elem",
|
||
elem: innerGroup
|
||
}]
|
||
}, options);
|
||
return buildCommon.makeSpan(["mord", "accentunder"], [vlist], options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var accentNode = stretchy.mathMLnode(group.label);
|
||
var node = new mathMLTree.MathNode("munder", [buildMathML_buildGroup(group.base, options), accentNode]);
|
||
node.setAttribute("accentunder", "true");
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/arrow.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// Helper function
|
||
var arrow_paddedNode = function paddedNode(group) {
|
||
var node = new mathMLTree.MathNode("mpadded", group ? [group] : []);
|
||
node.setAttribute("width", "+0.6em");
|
||
node.setAttribute("lspace", "0.3em");
|
||
return node;
|
||
}; // Stretchy arrows with an optional argument
|
||
|
||
|
||
defineFunction({
|
||
type: "xArrow",
|
||
names: ["\\xleftarrow", "\\xrightarrow", "\\xLeftarrow", "\\xRightarrow", "\\xleftrightarrow", "\\xLeftrightarrow", "\\xhookleftarrow", "\\xhookrightarrow", "\\xmapsto", "\\xrightharpoondown", "\\xrightharpoonup", "\\xleftharpoondown", "\\xleftharpoonup", "\\xrightleftharpoons", "\\xleftrightharpoons", "\\xlongequal", "\\xtwoheadrightarrow", "\\xtwoheadleftarrow", "\\xtofrom", // The next 3 functions are here to support the mhchem extension.
|
||
// Direct use of these functions is discouraged and may break someday.
|
||
"\\xrightleftarrows", "\\xrightequilibrium", "\\xleftequilibrium"],
|
||
props: {
|
||
numArgs: 1,
|
||
numOptionalArgs: 1
|
||
},
|
||
handler: function handler(_ref, args, optArgs) {
|
||
var parser = _ref.parser,
|
||
funcName = _ref.funcName;
|
||
return {
|
||
type: "xArrow",
|
||
mode: parser.mode,
|
||
label: funcName,
|
||
body: args[0],
|
||
below: optArgs[0]
|
||
};
|
||
},
|
||
// Flow is unable to correctly infer the type of `group`, even though it's
|
||
// unamibiguously determined from the passed-in `type` above.
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
var style = options.style; // Build the argument groups in the appropriate style.
|
||
// Ref: amsmath.dtx: \hbox{$\scriptstyle\mkern#3mu{#6}\mkern#4mu$}%
|
||
// Some groups can return document fragments. Handle those by wrapping
|
||
// them in a span.
|
||
|
||
var newOptions = options.havingStyle(style.sup());
|
||
var upperGroup = buildCommon.wrapFragment(buildHTML_buildGroup(group.body, newOptions, options), options);
|
||
upperGroup.classes.push("x-arrow-pad");
|
||
var lowerGroup;
|
||
|
||
if (group.below) {
|
||
// Build the lower group
|
||
newOptions = options.havingStyle(style.sub());
|
||
lowerGroup = buildCommon.wrapFragment(buildHTML_buildGroup(group.below, newOptions, options), options);
|
||
lowerGroup.classes.push("x-arrow-pad");
|
||
}
|
||
|
||
var arrowBody = stretchy.svgSpan(group, options); // Re shift: Note that stretchy.svgSpan returned arrowBody.depth = 0.
|
||
// The point we want on the math axis is at 0.5 * arrowBody.height.
|
||
|
||
var arrowShift = -options.fontMetrics().axisHeight + 0.5 * arrowBody.height; // 2 mu kern. Ref: amsmath.dtx: #7\if0#2\else\mkern#2mu\fi
|
||
|
||
var upperShift = -options.fontMetrics().axisHeight - 0.5 * arrowBody.height - 0.111; // 0.111 em = 2 mu
|
||
|
||
if (upperGroup.depth > 0.25 || group.label === "\\xleftequilibrium") {
|
||
upperShift -= upperGroup.depth; // shift up if depth encroaches
|
||
} // Generate the vlist
|
||
|
||
|
||
var vlist;
|
||
|
||
if (lowerGroup) {
|
||
var lowerShift = -options.fontMetrics().axisHeight + lowerGroup.height + 0.5 * arrowBody.height + 0.111;
|
||
vlist = buildCommon.makeVList({
|
||
positionType: "individualShift",
|
||
children: [{
|
||
type: "elem",
|
||
elem: upperGroup,
|
||
shift: upperShift
|
||
}, {
|
||
type: "elem",
|
||
elem: arrowBody,
|
||
shift: arrowShift
|
||
}, {
|
||
type: "elem",
|
||
elem: lowerGroup,
|
||
shift: lowerShift
|
||
}]
|
||
}, options);
|
||
} else {
|
||
vlist = buildCommon.makeVList({
|
||
positionType: "individualShift",
|
||
children: [{
|
||
type: "elem",
|
||
elem: upperGroup,
|
||
shift: upperShift
|
||
}, {
|
||
type: "elem",
|
||
elem: arrowBody,
|
||
shift: arrowShift
|
||
}]
|
||
}, options);
|
||
} // $FlowFixMe: Replace this with passing "svg-align" into makeVList.
|
||
|
||
|
||
vlist.children[0].children[0].children[1].classes.push("svg-align");
|
||
return buildCommon.makeSpan(["mrel", "x-arrow"], [vlist], options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var arrowNode = stretchy.mathMLnode(group.label);
|
||
var node;
|
||
|
||
if (group.body) {
|
||
var upperNode = arrow_paddedNode(buildMathML_buildGroup(group.body, options));
|
||
|
||
if (group.below) {
|
||
var lowerNode = arrow_paddedNode(buildMathML_buildGroup(group.below, options));
|
||
node = new mathMLTree.MathNode("munderover", [arrowNode, lowerNode, upperNode]);
|
||
} else {
|
||
node = new mathMLTree.MathNode("mover", [arrowNode, upperNode]);
|
||
}
|
||
} else if (group.below) {
|
||
var _lowerNode = arrow_paddedNode(buildMathML_buildGroup(group.below, options));
|
||
|
||
node = new mathMLTree.MathNode("munder", [arrowNode, _lowerNode]);
|
||
} else {
|
||
// This should never happen.
|
||
// Parser.js throws an error if there is no argument.
|
||
node = arrow_paddedNode();
|
||
node = new mathMLTree.MathNode("mover", [arrowNode, node]);
|
||
}
|
||
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/char.js
|
||
|
||
|
||
// \@char is an internal function that takes a grouped decimal argument like
|
||
// {123} and converts into symbol with code 123. It is used by the *macro*
|
||
// \char defined in macros.js.
|
||
|
||
defineFunction({
|
||
type: "textord",
|
||
names: ["\\@char"],
|
||
props: {
|
||
numArgs: 1,
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser;
|
||
var arg = assertNodeType(args[0], "ordgroup");
|
||
var group = arg.body;
|
||
var number = "";
|
||
|
||
for (var i = 0; i < group.length; i++) {
|
||
var node = assertNodeType(group[i], "textord");
|
||
number += node.text;
|
||
}
|
||
|
||
var code = parseInt(number);
|
||
|
||
if (isNaN(code)) {
|
||
throw new src_ParseError("\\@char has non-numeric argument " + number);
|
||
}
|
||
|
||
return {
|
||
type: "textord",
|
||
mode: parser.mode,
|
||
text: String.fromCharCode(code)
|
||
};
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/color.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var color_htmlBuilder = function htmlBuilder(group, options) {
|
||
var elements = buildHTML_buildExpression(group.body, options.withColor(group.color), false); // \color isn't supposed to affect the type of the elements it contains.
|
||
// To accomplish this, we wrap the results in a fragment, so the inner
|
||
// elements will be able to directly interact with their neighbors. For
|
||
// example, `\color{red}{2 +} 3` has the same spacing as `2 + 3`
|
||
|
||
return buildCommon.makeFragment(elements);
|
||
};
|
||
|
||
var color_mathmlBuilder = function mathmlBuilder(group, options) {
|
||
var inner = buildMathML_buildExpression(group.body, options.withColor(group.color));
|
||
var node = new mathMLTree.MathNode("mstyle", inner);
|
||
node.setAttribute("mathcolor", group.color);
|
||
return node;
|
||
};
|
||
|
||
defineFunction({
|
||
type: "color",
|
||
names: ["\\textcolor"],
|
||
props: {
|
||
numArgs: 2,
|
||
allowedInText: true,
|
||
greediness: 3,
|
||
argTypes: ["color", "original"]
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser;
|
||
var color = assertNodeType(args[0], "color-token").color;
|
||
var body = args[1];
|
||
return {
|
||
type: "color",
|
||
mode: parser.mode,
|
||
color: color,
|
||
body: defineFunction_ordargument(body)
|
||
};
|
||
},
|
||
htmlBuilder: color_htmlBuilder,
|
||
mathmlBuilder: color_mathmlBuilder
|
||
});
|
||
defineFunction({
|
||
type: "color",
|
||
names: ["\\color"],
|
||
props: {
|
||
numArgs: 1,
|
||
allowedInText: true,
|
||
greediness: 3,
|
||
argTypes: ["color"]
|
||
},
|
||
handler: function handler(_ref2, args) {
|
||
var parser = _ref2.parser,
|
||
breakOnTokenText = _ref2.breakOnTokenText;
|
||
var color = assertNodeType(args[0], "color-token").color; // Set macro \current@color in current namespace to store the current
|
||
// color, mimicking the behavior of color.sty.
|
||
// This is currently used just to correctly color a \right
|
||
// that follows a \color command.
|
||
|
||
parser.gullet.macros.set("\\current@color", color); // Parse out the implicit body that should be colored.
|
||
|
||
var body = parser.parseExpression(true, breakOnTokenText);
|
||
return {
|
||
type: "color",
|
||
mode: parser.mode,
|
||
color: color,
|
||
body: body
|
||
};
|
||
},
|
||
htmlBuilder: color_htmlBuilder,
|
||
mathmlBuilder: color_mathmlBuilder
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/cr.js
|
||
// Row breaks within tabular environments, and line breaks at top level
|
||
|
||
|
||
|
||
|
||
|
||
// \\ is a macro mapping to either \cr or \newline. Because they have the
|
||
// same signature, we implement them as one megafunction, with newRow
|
||
// indicating whether we're in the \cr case, and newLine indicating whether
|
||
// to break the line in the \newline case.
|
||
|
||
defineFunction({
|
||
type: "cr",
|
||
names: ["\\cr", "\\newline"],
|
||
props: {
|
||
numArgs: 0,
|
||
numOptionalArgs: 1,
|
||
argTypes: ["size"],
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref, args, optArgs) {
|
||
var parser = _ref.parser,
|
||
funcName = _ref.funcName;
|
||
var size = optArgs[0];
|
||
var newRow = funcName === "\\cr";
|
||
var newLine = false;
|
||
|
||
if (!newRow) {
|
||
if (parser.settings.displayMode && parser.settings.useStrictBehavior("newLineInDisplayMode", "In LaTeX, \\\\ or \\newline " + "does nothing in display mode")) {
|
||
newLine = false;
|
||
} else {
|
||
newLine = true;
|
||
}
|
||
}
|
||
|
||
return {
|
||
type: "cr",
|
||
mode: parser.mode,
|
||
newLine: newLine,
|
||
newRow: newRow,
|
||
size: size && assertNodeType(size, "size").value
|
||
};
|
||
},
|
||
// The following builders are called only at the top level,
|
||
// not within tabular/array environments.
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
if (group.newRow) {
|
||
throw new src_ParseError("\\cr valid only within a tabular/array environment");
|
||
}
|
||
|
||
var span = buildCommon.makeSpan(["mspace"], [], options);
|
||
|
||
if (group.newLine) {
|
||
span.classes.push("newline");
|
||
|
||
if (group.size) {
|
||
span.style.marginTop = units_calculateSize(group.size, options) + "em";
|
||
}
|
||
}
|
||
|
||
return span;
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var node = new mathMLTree.MathNode("mspace");
|
||
|
||
if (group.newLine) {
|
||
node.setAttribute("linebreak", "newline");
|
||
|
||
if (group.size) {
|
||
node.setAttribute("height", units_calculateSize(group.size, options) + "em");
|
||
}
|
||
}
|
||
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/delimiter.js
|
||
/**
|
||
* This file deals with creating delimiters of various sizes. The TeXbook
|
||
* discusses these routines on page 441-442, in the "Another subroutine sets box
|
||
* x to a specified variable delimiter" paragraph.
|
||
*
|
||
* There are three main routines here. `makeSmallDelim` makes a delimiter in the
|
||
* normal font, but in either text, script, or scriptscript style.
|
||
* `makeLargeDelim` makes a delimiter in textstyle, but in one of the Size1,
|
||
* Size2, Size3, or Size4 fonts. `makeStackedDelim` makes a delimiter out of
|
||
* smaller pieces that are stacked on top of one another.
|
||
*
|
||
* The functions take a parameter `center`, which determines if the delimiter
|
||
* should be centered around the axis.
|
||
*
|
||
* Then, there are three exposed functions. `sizedDelim` makes a delimiter in
|
||
* one of the given sizes. This is used for things like `\bigl`.
|
||
* `customSizedDelim` makes a delimiter with a given total height+depth. It is
|
||
* called in places like `\sqrt`. `leftRightDelim` makes an appropriate
|
||
* delimiter which surrounds an expression of a given height an depth. It is
|
||
* used in `\left` and `\right`.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* Get the metrics for a given symbol and font, after transformation (i.e.
|
||
* after following replacement from symbols.js)
|
||
*/
|
||
var delimiter_getMetrics = function getMetrics(symbol, font, mode) {
|
||
var replace = src_symbols.math[symbol] && src_symbols.math[symbol].replace;
|
||
var metrics = getCharacterMetrics(replace || symbol, font, mode);
|
||
|
||
if (!metrics) {
|
||
throw new Error("Unsupported symbol " + symbol + " and font size " + font + ".");
|
||
}
|
||
|
||
return metrics;
|
||
};
|
||
/**
|
||
* Puts a delimiter span in a given style, and adds appropriate height, depth,
|
||
* and maxFontSizes.
|
||
*/
|
||
|
||
|
||
var delimiter_styleWrap = function styleWrap(delim, toStyle, options, classes) {
|
||
var newOptions = options.havingBaseStyle(toStyle);
|
||
var span = buildCommon.makeSpan(classes.concat(newOptions.sizingClasses(options)), [delim], options);
|
||
var delimSizeMultiplier = newOptions.sizeMultiplier / options.sizeMultiplier;
|
||
span.height *= delimSizeMultiplier;
|
||
span.depth *= delimSizeMultiplier;
|
||
span.maxFontSize = newOptions.sizeMultiplier;
|
||
return span;
|
||
};
|
||
|
||
var centerSpan = function centerSpan(span, options, style) {
|
||
var newOptions = options.havingBaseStyle(style);
|
||
var shift = (1 - options.sizeMultiplier / newOptions.sizeMultiplier) * options.fontMetrics().axisHeight;
|
||
span.classes.push("delimcenter");
|
||
span.style.top = shift + "em";
|
||
span.height -= shift;
|
||
span.depth += shift;
|
||
};
|
||
/**
|
||
* Makes a small delimiter. This is a delimiter that comes in the Main-Regular
|
||
* font, but is restyled to either be in textstyle, scriptstyle, or
|
||
* scriptscriptstyle.
|
||
*/
|
||
|
||
|
||
var delimiter_makeSmallDelim = function makeSmallDelim(delim, style, center, options, mode, classes) {
|
||
var text = buildCommon.makeSymbol(delim, "Main-Regular", mode, options);
|
||
var span = delimiter_styleWrap(text, style, options, classes);
|
||
|
||
if (center) {
|
||
centerSpan(span, options, style);
|
||
}
|
||
|
||
return span;
|
||
};
|
||
/**
|
||
* Builds a symbol in the given font size (note size is an integer)
|
||
*/
|
||
|
||
|
||
var delimiter_mathrmSize = function mathrmSize(value, size, mode, options) {
|
||
return buildCommon.makeSymbol(value, "Size" + size + "-Regular", mode, options);
|
||
};
|
||
/**
|
||
* Makes a large delimiter. This is a delimiter that comes in the Size1, Size2,
|
||
* Size3, or Size4 fonts. It is always rendered in textstyle.
|
||
*/
|
||
|
||
|
||
var delimiter_makeLargeDelim = function makeLargeDelim(delim, size, center, options, mode, classes) {
|
||
var inner = delimiter_mathrmSize(delim, size, mode, options);
|
||
var span = delimiter_styleWrap(buildCommon.makeSpan(["delimsizing", "size" + size], [inner], options), src_Style.TEXT, options, classes);
|
||
|
||
if (center) {
|
||
centerSpan(span, options, src_Style.TEXT);
|
||
}
|
||
|
||
return span;
|
||
};
|
||
/**
|
||
* Make an inner span with the given offset and in the given font. This is used
|
||
* in `makeStackedDelim` to make the stacking pieces for the delimiter.
|
||
*/
|
||
|
||
|
||
var delimiter_makeInner = function makeInner(symbol, font, mode) {
|
||
var sizeClass; // Apply the correct CSS class to choose the right font.
|
||
|
||
if (font === "Size1-Regular") {
|
||
sizeClass = "delim-size1";
|
||
} else
|
||
/* if (font === "Size4-Regular") */
|
||
{
|
||
sizeClass = "delim-size4";
|
||
}
|
||
|
||
var inner = buildCommon.makeSpan(["delimsizinginner", sizeClass], [buildCommon.makeSpan([], [buildCommon.makeSymbol(symbol, font, mode)])]); // Since this will be passed into `makeVList` in the end, wrap the element
|
||
// in the appropriate tag that VList uses.
|
||
|
||
return {
|
||
type: "elem",
|
||
elem: inner
|
||
};
|
||
}; // Helper for makeStackedDelim
|
||
|
||
|
||
var lap = {
|
||
type: "kern",
|
||
size: -0.005
|
||
};
|
||
/**
|
||
* Make a stacked delimiter out of a given delimiter, with the total height at
|
||
* least `heightTotal`. This routine is mentioned on page 442 of the TeXbook.
|
||
*/
|
||
|
||
var delimiter_makeStackedDelim = function makeStackedDelim(delim, heightTotal, center, options, mode, classes) {
|
||
// There are four parts, the top, an optional middle, a repeated part, and a
|
||
// bottom.
|
||
var top;
|
||
var middle;
|
||
var repeat;
|
||
var bottom;
|
||
top = repeat = bottom = delim;
|
||
middle = null; // Also keep track of what font the delimiters are in
|
||
|
||
var font = "Size1-Regular"; // We set the parts and font based on the symbol. Note that we use
|
||
// '\u23d0' instead of '|' and '\u2016' instead of '\\|' for the
|
||
// repeats of the arrows
|
||
|
||
if (delim === "\\uparrow") {
|
||
repeat = bottom = "\u23D0";
|
||
} else if (delim === "\\Uparrow") {
|
||
repeat = bottom = "\u2016";
|
||
} else if (delim === "\\downarrow") {
|
||
top = repeat = "\u23D0";
|
||
} else if (delim === "\\Downarrow") {
|
||
top = repeat = "\u2016";
|
||
} else if (delim === "\\updownarrow") {
|
||
top = "\\uparrow";
|
||
repeat = "\u23D0";
|
||
bottom = "\\downarrow";
|
||
} else if (delim === "\\Updownarrow") {
|
||
top = "\\Uparrow";
|
||
repeat = "\u2016";
|
||
bottom = "\\Downarrow";
|
||
} else if (delim === "[" || delim === "\\lbrack") {
|
||
top = "\u23A1";
|
||
repeat = "\u23A2";
|
||
bottom = "\u23A3";
|
||
font = "Size4-Regular";
|
||
} else if (delim === "]" || delim === "\\rbrack") {
|
||
top = "\u23A4";
|
||
repeat = "\u23A5";
|
||
bottom = "\u23A6";
|
||
font = "Size4-Regular";
|
||
} else if (delim === "\\lfloor" || delim === "\u230A") {
|
||
repeat = top = "\u23A2";
|
||
bottom = "\u23A3";
|
||
font = "Size4-Regular";
|
||
} else if (delim === "\\lceil" || delim === "\u2308") {
|
||
top = "\u23A1";
|
||
repeat = bottom = "\u23A2";
|
||
font = "Size4-Regular";
|
||
} else if (delim === "\\rfloor" || delim === "\u230B") {
|
||
repeat = top = "\u23A5";
|
||
bottom = "\u23A6";
|
||
font = "Size4-Regular";
|
||
} else if (delim === "\\rceil" || delim === "\u2309") {
|
||
top = "\u23A4";
|
||
repeat = bottom = "\u23A5";
|
||
font = "Size4-Regular";
|
||
} else if (delim === "(" || delim === "\\lparen") {
|
||
top = "\u239B";
|
||
repeat = "\u239C";
|
||
bottom = "\u239D";
|
||
font = "Size4-Regular";
|
||
} else if (delim === ")" || delim === "\\rparen") {
|
||
top = "\u239E";
|
||
repeat = "\u239F";
|
||
bottom = "\u23A0";
|
||
font = "Size4-Regular";
|
||
} else if (delim === "\\{" || delim === "\\lbrace") {
|
||
top = "\u23A7";
|
||
middle = "\u23A8";
|
||
bottom = "\u23A9";
|
||
repeat = "\u23AA";
|
||
font = "Size4-Regular";
|
||
} else if (delim === "\\}" || delim === "\\rbrace") {
|
||
top = "\u23AB";
|
||
middle = "\u23AC";
|
||
bottom = "\u23AD";
|
||
repeat = "\u23AA";
|
||
font = "Size4-Regular";
|
||
} else if (delim === "\\lgroup" || delim === "\u27EE") {
|
||
top = "\u23A7";
|
||
bottom = "\u23A9";
|
||
repeat = "\u23AA";
|
||
font = "Size4-Regular";
|
||
} else if (delim === "\\rgroup" || delim === "\u27EF") {
|
||
top = "\u23AB";
|
||
bottom = "\u23AD";
|
||
repeat = "\u23AA";
|
||
font = "Size4-Regular";
|
||
} else if (delim === "\\lmoustache" || delim === "\u23B0") {
|
||
top = "\u23A7";
|
||
bottom = "\u23AD";
|
||
repeat = "\u23AA";
|
||
font = "Size4-Regular";
|
||
} else if (delim === "\\rmoustache" || delim === "\u23B1") {
|
||
top = "\u23AB";
|
||
bottom = "\u23A9";
|
||
repeat = "\u23AA";
|
||
font = "Size4-Regular";
|
||
} // Get the metrics of the four sections
|
||
|
||
|
||
var topMetrics = delimiter_getMetrics(top, font, mode);
|
||
var topHeightTotal = topMetrics.height + topMetrics.depth;
|
||
var repeatMetrics = delimiter_getMetrics(repeat, font, mode);
|
||
var repeatHeightTotal = repeatMetrics.height + repeatMetrics.depth;
|
||
var bottomMetrics = delimiter_getMetrics(bottom, font, mode);
|
||
var bottomHeightTotal = bottomMetrics.height + bottomMetrics.depth;
|
||
var middleHeightTotal = 0;
|
||
var middleFactor = 1;
|
||
|
||
if (middle !== null) {
|
||
var middleMetrics = delimiter_getMetrics(middle, font, mode);
|
||
middleHeightTotal = middleMetrics.height + middleMetrics.depth;
|
||
middleFactor = 2; // repeat symmetrically above and below middle
|
||
} // Calcuate the minimal height that the delimiter can have.
|
||
// It is at least the size of the top, bottom, and optional middle combined.
|
||
|
||
|
||
var minHeight = topHeightTotal + bottomHeightTotal + middleHeightTotal; // Compute the number of copies of the repeat symbol we will need
|
||
|
||
var repeatCount = Math.max(0, Math.ceil((heightTotal - minHeight) / (middleFactor * repeatHeightTotal))); // Compute the total height of the delimiter including all the symbols
|
||
|
||
var realHeightTotal = minHeight + repeatCount * middleFactor * repeatHeightTotal; // The center of the delimiter is placed at the center of the axis. Note
|
||
// that in this context, "center" means that the delimiter should be
|
||
// centered around the axis in the current style, while normally it is
|
||
// centered around the axis in textstyle.
|
||
|
||
var axisHeight = options.fontMetrics().axisHeight;
|
||
|
||
if (center) {
|
||
axisHeight *= options.sizeMultiplier;
|
||
} // Calculate the depth
|
||
|
||
|
||
var depth = realHeightTotal / 2 - axisHeight; // This function differs from the TeX procedure in one way.
|
||
// We shift each repeat element downwards by 0.005em, to prevent a gap
|
||
// due to browser floating point rounding error.
|
||
// Then, at the last element-to element joint, we add one extra repeat
|
||
// element to cover the gap created by the shifts.
|
||
// Find the shift needed to align the upper end of the extra element at a point
|
||
// 0.005em above the lower end of the top element.
|
||
|
||
var shiftOfExtraElement = (repeatCount + 1) * 0.005 - repeatHeightTotal; // Now, we start building the pieces that will go into the vlist
|
||
// Keep a list of the inner pieces
|
||
|
||
var inners = []; // Add the bottom symbol
|
||
|
||
inners.push(delimiter_makeInner(bottom, font, mode));
|
||
|
||
if (middle === null) {
|
||
// Add that many symbols
|
||
for (var i = 0; i < repeatCount; i++) {
|
||
inners.push(lap); // overlap
|
||
|
||
inners.push(delimiter_makeInner(repeat, font, mode));
|
||
}
|
||
} else {
|
||
// When there is a middle bit, we need the middle part and two repeated
|
||
// sections
|
||
for (var _i = 0; _i < repeatCount; _i++) {
|
||
inners.push(lap);
|
||
inners.push(delimiter_makeInner(repeat, font, mode));
|
||
} // Insert one extra repeat element.
|
||
|
||
|
||
inners.push({
|
||
type: "kern",
|
||
size: shiftOfExtraElement
|
||
});
|
||
inners.push(delimiter_makeInner(repeat, font, mode));
|
||
inners.push(lap); // Now insert the middle of the brace.
|
||
|
||
inners.push(delimiter_makeInner(middle, font, mode));
|
||
|
||
for (var _i2 = 0; _i2 < repeatCount; _i2++) {
|
||
inners.push(lap);
|
||
inners.push(delimiter_makeInner(repeat, font, mode));
|
||
}
|
||
} // To cover the gap create by the overlaps, insert one more repeat element,
|
||
// at a position that juts 0.005 above the bottom of the top element.
|
||
|
||
|
||
inners.push({
|
||
type: "kern",
|
||
size: shiftOfExtraElement
|
||
});
|
||
inners.push(delimiter_makeInner(repeat, font, mode));
|
||
inners.push(lap); // Add the top symbol
|
||
|
||
inners.push(delimiter_makeInner(top, font, mode)); // Finally, build the vlist
|
||
|
||
var newOptions = options.havingBaseStyle(src_Style.TEXT);
|
||
var inner = buildCommon.makeVList({
|
||
positionType: "bottom",
|
||
positionData: depth,
|
||
children: inners
|
||
}, newOptions);
|
||
return delimiter_styleWrap(buildCommon.makeSpan(["delimsizing", "mult"], [inner], newOptions), src_Style.TEXT, options, classes);
|
||
}; // All surds have 0.08em padding above the viniculum inside the SVG.
|
||
// That keeps browser span height rounding error from pinching the line.
|
||
|
||
|
||
var vbPad = 80; // padding above the surd, measured inside the viewBox.
|
||
|
||
var emPad = 0.08; // padding, in ems, measured in the document.
|
||
|
||
var delimiter_sqrtSvg = function sqrtSvg(sqrtName, height, viewBoxHeight, extraViniculum, options) {
|
||
var path = sqrtPath(sqrtName, extraViniculum, viewBoxHeight);
|
||
var pathNode = new domTree_PathNode(sqrtName, path);
|
||
var svg = new SvgNode([pathNode], {
|
||
// Note: 1000:1 ratio of viewBox to document em width.
|
||
"width": "400em",
|
||
"height": height + "em",
|
||
"viewBox": "0 0 400000 " + viewBoxHeight,
|
||
"preserveAspectRatio": "xMinYMin slice"
|
||
});
|
||
return buildCommon.makeSvgSpan(["hide-tail"], [svg], options);
|
||
};
|
||
/**
|
||
* Make a sqrt image of the given height,
|
||
*/
|
||
|
||
|
||
var makeSqrtImage = function makeSqrtImage(height, options) {
|
||
// Define a newOptions that removes the effect of size changes such as \Huge.
|
||
// We don't pick different a height surd for \Huge. For it, we scale up.
|
||
var newOptions = options.havingBaseSizing(); // Pick the desired surd glyph from a sequence of surds.
|
||
|
||
var delim = traverseSequence("\\surd", height * newOptions.sizeMultiplier, stackLargeDelimiterSequence, newOptions);
|
||
var sizeMultiplier = newOptions.sizeMultiplier; // default
|
||
// The standard sqrt SVGs each have a 0.04em thick viniculum.
|
||
// If Settings.minRuleThickness is larger than that, we add extraViniculum.
|
||
|
||
var extraViniculum = Math.max(0, options.minRuleThickness - options.fontMetrics().sqrtRuleThickness); // Create a span containing an SVG image of a sqrt symbol.
|
||
|
||
var span;
|
||
var spanHeight = 0;
|
||
var texHeight = 0;
|
||
var viewBoxHeight = 0;
|
||
var advanceWidth; // We create viewBoxes with 80 units of "padding" above each surd.
|
||
// Then browser rounding error on the parent span height will not
|
||
// encroach on the ink of the viniculum. But that padding is not
|
||
// included in the TeX-like `height` used for calculation of
|
||
// vertical alignment. So texHeight = span.height < span.style.height.
|
||
|
||
if (delim.type === "small") {
|
||
// Get an SVG that is derived from glyph U+221A in font KaTeX-Main.
|
||
// 1000 unit normal glyph height.
|
||
viewBoxHeight = 1000 + 1000 * extraViniculum + vbPad;
|
||
|
||
if (height < 1.0) {
|
||
sizeMultiplier = 1.0; // mimic a \textfont radical
|
||
} else if (height < 1.4) {
|
||
sizeMultiplier = 0.7; // mimic a \scriptfont radical
|
||
}
|
||
|
||
spanHeight = (1.0 + extraViniculum + emPad) / sizeMultiplier;
|
||
texHeight = (1.00 + extraViniculum) / sizeMultiplier;
|
||
span = delimiter_sqrtSvg("sqrtMain", spanHeight, viewBoxHeight, extraViniculum, options);
|
||
span.style.minWidth = "0.853em";
|
||
advanceWidth = 0.833 / sizeMultiplier; // from the font.
|
||
} else if (delim.type === "large") {
|
||
// These SVGs come from fonts: KaTeX_Size1, _Size2, etc.
|
||
viewBoxHeight = (1000 + vbPad) * sizeToMaxHeight[delim.size];
|
||
texHeight = (sizeToMaxHeight[delim.size] + extraViniculum) / sizeMultiplier;
|
||
spanHeight = (sizeToMaxHeight[delim.size] + extraViniculum + emPad) / sizeMultiplier;
|
||
span = delimiter_sqrtSvg("sqrtSize" + delim.size, spanHeight, viewBoxHeight, extraViniculum, options);
|
||
span.style.minWidth = "1.02em";
|
||
advanceWidth = 1.0 / sizeMultiplier; // 1.0 from the font.
|
||
} else {
|
||
// Tall sqrt. In TeX, this would be stacked using multiple glyphs.
|
||
// We'll use a single SVG to accomplish the same thing.
|
||
spanHeight = height + extraViniculum + emPad;
|
||
texHeight = height + extraViniculum;
|
||
viewBoxHeight = Math.floor(1000 * height + extraViniculum) + vbPad;
|
||
span = delimiter_sqrtSvg("sqrtTall", spanHeight, viewBoxHeight, extraViniculum, options);
|
||
span.style.minWidth = "0.742em";
|
||
advanceWidth = 1.056;
|
||
}
|
||
|
||
span.height = texHeight;
|
||
span.style.height = spanHeight + "em";
|
||
return {
|
||
span: span,
|
||
advanceWidth: advanceWidth,
|
||
// Calculate the actual line width.
|
||
// This actually should depend on the chosen font -- e.g. \boldmath
|
||
// should use the thicker surd symbols from e.g. KaTeX_Main-Bold, and
|
||
// have thicker rules.
|
||
ruleWidth: (options.fontMetrics().sqrtRuleThickness + extraViniculum) * sizeMultiplier
|
||
};
|
||
}; // There are three kinds of delimiters, delimiters that stack when they become
|
||
// too large
|
||
|
||
|
||
var stackLargeDelimiters = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "\u230A", "\u230B", "\\lceil", "\\rceil", "\u2308", "\u2309", "\\surd"]; // delimiters that always stack
|
||
|
||
var stackAlwaysDelimiters = ["\\uparrow", "\\downarrow", "\\updownarrow", "\\Uparrow", "\\Downarrow", "\\Updownarrow", "|", "\\|", "\\vert", "\\Vert", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "\u27EE", "\u27EF", "\\lmoustache", "\\rmoustache", "\u23B0", "\u23B1"]; // and delimiters that never stack
|
||
|
||
var stackNeverDelimiters = ["<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"]; // Metrics of the different sizes. Found by looking at TeX's output of
|
||
// $\bigl| // \Bigl| \biggl| \Biggl| \showlists$
|
||
// Used to create stacked delimiters of appropriate sizes in makeSizedDelim.
|
||
|
||
var sizeToMaxHeight = [0, 1.2, 1.8, 2.4, 3.0];
|
||
/**
|
||
* Used to create a delimiter of a specific size, where `size` is 1, 2, 3, or 4.
|
||
*/
|
||
|
||
var delimiter_makeSizedDelim = function makeSizedDelim(delim, size, options, mode, classes) {
|
||
// < and > turn into \langle and \rangle in delimiters
|
||
if (delim === "<" || delim === "\\lt" || delim === "\u27E8") {
|
||
delim = "\\langle";
|
||
} else if (delim === ">" || delim === "\\gt" || delim === "\u27E9") {
|
||
delim = "\\rangle";
|
||
} // Sized delimiters are never centered.
|
||
|
||
|
||
if (utils.contains(stackLargeDelimiters, delim) || utils.contains(stackNeverDelimiters, delim)) {
|
||
return delimiter_makeLargeDelim(delim, size, false, options, mode, classes);
|
||
} else if (utils.contains(stackAlwaysDelimiters, delim)) {
|
||
return delimiter_makeStackedDelim(delim, sizeToMaxHeight[size], false, options, mode, classes);
|
||
} else {
|
||
throw new src_ParseError("Illegal delimiter: '" + delim + "'");
|
||
}
|
||
};
|
||
/**
|
||
* There are three different sequences of delimiter sizes that the delimiters
|
||
* follow depending on the kind of delimiter. This is used when creating custom
|
||
* sized delimiters to decide whether to create a small, large, or stacked
|
||
* delimiter.
|
||
*
|
||
* In real TeX, these sequences aren't explicitly defined, but are instead
|
||
* defined inside the font metrics. Since there are only three sequences that
|
||
* are possible for the delimiters that TeX defines, it is easier to just encode
|
||
* them explicitly here.
|
||
*/
|
||
|
||
|
||
// Delimiters that never stack try small delimiters and large delimiters only
|
||
var stackNeverDelimiterSequence = [{
|
||
type: "small",
|
||
style: src_Style.SCRIPTSCRIPT
|
||
}, {
|
||
type: "small",
|
||
style: src_Style.SCRIPT
|
||
}, {
|
||
type: "small",
|
||
style: src_Style.TEXT
|
||
}, {
|
||
type: "large",
|
||
size: 1
|
||
}, {
|
||
type: "large",
|
||
size: 2
|
||
}, {
|
||
type: "large",
|
||
size: 3
|
||
}, {
|
||
type: "large",
|
||
size: 4
|
||
}]; // Delimiters that always stack try the small delimiters first, then stack
|
||
|
||
var stackAlwaysDelimiterSequence = [{
|
||
type: "small",
|
||
style: src_Style.SCRIPTSCRIPT
|
||
}, {
|
||
type: "small",
|
||
style: src_Style.SCRIPT
|
||
}, {
|
||
type: "small",
|
||
style: src_Style.TEXT
|
||
}, {
|
||
type: "stack"
|
||
}]; // Delimiters that stack when large try the small and then large delimiters, and
|
||
// stack afterwards
|
||
|
||
var stackLargeDelimiterSequence = [{
|
||
type: "small",
|
||
style: src_Style.SCRIPTSCRIPT
|
||
}, {
|
||
type: "small",
|
||
style: src_Style.SCRIPT
|
||
}, {
|
||
type: "small",
|
||
style: src_Style.TEXT
|
||
}, {
|
||
type: "large",
|
||
size: 1
|
||
}, {
|
||
type: "large",
|
||
size: 2
|
||
}, {
|
||
type: "large",
|
||
size: 3
|
||
}, {
|
||
type: "large",
|
||
size: 4
|
||
}, {
|
||
type: "stack"
|
||
}];
|
||
/**
|
||
* Get the font used in a delimiter based on what kind of delimiter it is.
|
||
* TODO(#963) Use more specific font family return type once that is introduced.
|
||
*/
|
||
|
||
var delimTypeToFont = function delimTypeToFont(type) {
|
||
if (type.type === "small") {
|
||
return "Main-Regular";
|
||
} else if (type.type === "large") {
|
||
return "Size" + type.size + "-Regular";
|
||
} else if (type.type === "stack") {
|
||
return "Size4-Regular";
|
||
} else {
|
||
throw new Error("Add support for delim type '" + type.type + "' here.");
|
||
}
|
||
};
|
||
/**
|
||
* Traverse a sequence of types of delimiters to decide what kind of delimiter
|
||
* should be used to create a delimiter of the given height+depth.
|
||
*/
|
||
|
||
|
||
var traverseSequence = function traverseSequence(delim, height, sequence, options) {
|
||
// Here, we choose the index we should start at in the sequences. In smaller
|
||
// sizes (which correspond to larger numbers in style.size) we start earlier
|
||
// in the sequence. Thus, scriptscript starts at index 3-3=0, script starts
|
||
// at index 3-2=1, text starts at 3-1=2, and display starts at min(2,3-0)=2
|
||
var start = Math.min(2, 3 - options.style.size);
|
||
|
||
for (var i = start; i < sequence.length; i++) {
|
||
if (sequence[i].type === "stack") {
|
||
// This is always the last delimiter, so we just break the loop now.
|
||
break;
|
||
}
|
||
|
||
var metrics = delimiter_getMetrics(delim, delimTypeToFont(sequence[i]), "math");
|
||
var heightDepth = metrics.height + metrics.depth; // Small delimiters are scaled down versions of the same font, so we
|
||
// account for the style change size.
|
||
|
||
if (sequence[i].type === "small") {
|
||
var newOptions = options.havingBaseStyle(sequence[i].style);
|
||
heightDepth *= newOptions.sizeMultiplier;
|
||
} // Check if the delimiter at this size works for the given height.
|
||
|
||
|
||
if (heightDepth > height) {
|
||
return sequence[i];
|
||
}
|
||
} // If we reached the end of the sequence, return the last sequence element.
|
||
|
||
|
||
return sequence[sequence.length - 1];
|
||
};
|
||
/**
|
||
* Make a delimiter of a given height+depth, with optional centering. Here, we
|
||
* traverse the sequences, and create a delimiter that the sequence tells us to.
|
||
*/
|
||
|
||
|
||
var delimiter_makeCustomSizedDelim = function makeCustomSizedDelim(delim, height, center, options, mode, classes) {
|
||
if (delim === "<" || delim === "\\lt" || delim === "\u27E8") {
|
||
delim = "\\langle";
|
||
} else if (delim === ">" || delim === "\\gt" || delim === "\u27E9") {
|
||
delim = "\\rangle";
|
||
} // Decide what sequence to use
|
||
|
||
|
||
var sequence;
|
||
|
||
if (utils.contains(stackNeverDelimiters, delim)) {
|
||
sequence = stackNeverDelimiterSequence;
|
||
} else if (utils.contains(stackLargeDelimiters, delim)) {
|
||
sequence = stackLargeDelimiterSequence;
|
||
} else {
|
||
sequence = stackAlwaysDelimiterSequence;
|
||
} // Look through the sequence
|
||
|
||
|
||
var delimType = traverseSequence(delim, height, sequence, options); // Get the delimiter from font glyphs.
|
||
// Depending on the sequence element we decided on, call the
|
||
// appropriate function.
|
||
|
||
if (delimType.type === "small") {
|
||
return delimiter_makeSmallDelim(delim, delimType.style, center, options, mode, classes);
|
||
} else if (delimType.type === "large") {
|
||
return delimiter_makeLargeDelim(delim, delimType.size, center, options, mode, classes);
|
||
} else
|
||
/* if (delimType.type === "stack") */
|
||
{
|
||
return delimiter_makeStackedDelim(delim, height, center, options, mode, classes);
|
||
}
|
||
};
|
||
/**
|
||
* Make a delimiter for use with `\left` and `\right`, given a height and depth
|
||
* of an expression that the delimiters surround.
|
||
*/
|
||
|
||
|
||
var makeLeftRightDelim = function makeLeftRightDelim(delim, height, depth, options, mode, classes) {
|
||
// We always center \left/\right delimiters, so the axis is always shifted
|
||
var axisHeight = options.fontMetrics().axisHeight * options.sizeMultiplier; // Taken from TeX source, tex.web, function make_left_right
|
||
|
||
var delimiterFactor = 901;
|
||
var delimiterExtend = 5.0 / options.fontMetrics().ptPerEm;
|
||
var maxDistFromAxis = Math.max(height - axisHeight, depth + axisHeight);
|
||
var totalHeight = Math.max( // In real TeX, calculations are done using integral values which are
|
||
// 65536 per pt, or 655360 per em. So, the division here truncates in
|
||
// TeX but doesn't here, producing different results. If we wanted to
|
||
// exactly match TeX's calculation, we could do
|
||
// Math.floor(655360 * maxDistFromAxis / 500) *
|
||
// delimiterFactor / 655360
|
||
// (To see the difference, compare
|
||
// x^{x^{\left(\rule{0.1em}{0.68em}\right)}}
|
||
// in TeX and KaTeX)
|
||
maxDistFromAxis / 500 * delimiterFactor, 2 * maxDistFromAxis - delimiterExtend); // Finally, we defer to `makeCustomSizedDelim` with our calculated total
|
||
// height
|
||
|
||
return delimiter_makeCustomSizedDelim(delim, totalHeight, true, options, mode, classes);
|
||
};
|
||
|
||
/* harmony default export */ var delimiter = ({
|
||
sqrtImage: makeSqrtImage,
|
||
sizedDelim: delimiter_makeSizedDelim,
|
||
customSizedDelim: delimiter_makeCustomSizedDelim,
|
||
leftRightDelim: makeLeftRightDelim
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/delimsizing.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// Extra data needed for the delimiter handler down below
|
||
var delimiterSizes = {
|
||
"\\bigl": {
|
||
mclass: "mopen",
|
||
size: 1
|
||
},
|
||
"\\Bigl": {
|
||
mclass: "mopen",
|
||
size: 2
|
||
},
|
||
"\\biggl": {
|
||
mclass: "mopen",
|
||
size: 3
|
||
},
|
||
"\\Biggl": {
|
||
mclass: "mopen",
|
||
size: 4
|
||
},
|
||
"\\bigr": {
|
||
mclass: "mclose",
|
||
size: 1
|
||
},
|
||
"\\Bigr": {
|
||
mclass: "mclose",
|
||
size: 2
|
||
},
|
||
"\\biggr": {
|
||
mclass: "mclose",
|
||
size: 3
|
||
},
|
||
"\\Biggr": {
|
||
mclass: "mclose",
|
||
size: 4
|
||
},
|
||
"\\bigm": {
|
||
mclass: "mrel",
|
||
size: 1
|
||
},
|
||
"\\Bigm": {
|
||
mclass: "mrel",
|
||
size: 2
|
||
},
|
||
"\\biggm": {
|
||
mclass: "mrel",
|
||
size: 3
|
||
},
|
||
"\\Biggm": {
|
||
mclass: "mrel",
|
||
size: 4
|
||
},
|
||
"\\big": {
|
||
mclass: "mord",
|
||
size: 1
|
||
},
|
||
"\\Big": {
|
||
mclass: "mord",
|
||
size: 2
|
||
},
|
||
"\\bigg": {
|
||
mclass: "mord",
|
||
size: 3
|
||
},
|
||
"\\Bigg": {
|
||
mclass: "mord",
|
||
size: 4
|
||
}
|
||
};
|
||
var delimiters = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "\u230A", "\u230B", "\\lceil", "\\rceil", "\u2308", "\u2309", "<", ">", "\\langle", "\u27E8", "\\rangle", "\u27E9", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "\u27EE", "\u27EF", "\\lmoustache", "\\rmoustache", "\u23B0", "\u23B1", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."];
|
||
|
||
// Delimiter functions
|
||
function checkDelimiter(delim, context) {
|
||
var symDelim = checkSymbolNodeType(delim);
|
||
|
||
if (symDelim && utils.contains(delimiters, symDelim.text)) {
|
||
return symDelim;
|
||
} else {
|
||
throw new src_ParseError("Invalid delimiter: '" + (symDelim ? symDelim.text : JSON.stringify(delim)) + "' after '" + context.funcName + "'", delim);
|
||
}
|
||
}
|
||
|
||
defineFunction({
|
||
type: "delimsizing",
|
||
names: ["\\bigl", "\\Bigl", "\\biggl", "\\Biggl", "\\bigr", "\\Bigr", "\\biggr", "\\Biggr", "\\bigm", "\\Bigm", "\\biggm", "\\Biggm", "\\big", "\\Big", "\\bigg", "\\Bigg"],
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: function handler(context, args) {
|
||
var delim = checkDelimiter(args[0], context);
|
||
return {
|
||
type: "delimsizing",
|
||
mode: context.parser.mode,
|
||
size: delimiterSizes[context.funcName].size,
|
||
mclass: delimiterSizes[context.funcName].mclass,
|
||
delim: delim.text
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
if (group.delim === ".") {
|
||
// Empty delimiters still count as elements, even though they don't
|
||
// show anything.
|
||
return buildCommon.makeSpan([group.mclass]);
|
||
} // Use delimiter.sizedDelim to generate the delimiter.
|
||
|
||
|
||
return delimiter.sizedDelim(group.delim, group.size, options, group.mode, [group.mclass]);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group) {
|
||
var children = [];
|
||
|
||
if (group.delim !== ".") {
|
||
children.push(buildMathML_makeText(group.delim, group.mode));
|
||
}
|
||
|
||
var node = new mathMLTree.MathNode("mo", children);
|
||
|
||
if (group.mclass === "mopen" || group.mclass === "mclose") {
|
||
// Only some of the delimsizing functions act as fences, and they
|
||
// return "mopen" or "mclose" mclass.
|
||
node.setAttribute("fence", "true");
|
||
} else {
|
||
// Explicitly disable fencing if it's not a fence, to override the
|
||
// defaults.
|
||
node.setAttribute("fence", "false");
|
||
}
|
||
|
||
return node;
|
||
}
|
||
});
|
||
|
||
function assertParsed(group) {
|
||
if (!group.body) {
|
||
throw new Error("Bug: The leftright ParseNode wasn't fully parsed.");
|
||
}
|
||
}
|
||
|
||
defineFunction({
|
||
type: "leftright-right",
|
||
names: ["\\right"],
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: function handler(context, args) {
|
||
// \left case below triggers parsing of \right in
|
||
// `const right = parser.parseFunction();`
|
||
// uses this return value.
|
||
var color = context.parser.gullet.macros.get("\\current@color");
|
||
|
||
if (color && typeof color !== "string") {
|
||
throw new src_ParseError("\\current@color set to non-string in \\right");
|
||
}
|
||
|
||
return {
|
||
type: "leftright-right",
|
||
mode: context.parser.mode,
|
||
delim: checkDelimiter(args[0], context).text,
|
||
color: color // undefined if not set via \color
|
||
|
||
};
|
||
}
|
||
});
|
||
defineFunction({
|
||
type: "leftright",
|
||
names: ["\\left"],
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: function handler(context, args) {
|
||
var delim = checkDelimiter(args[0], context);
|
||
var parser = context.parser; // Parse out the implicit body
|
||
|
||
++parser.leftrightDepth; // parseExpression stops before '\\right'
|
||
|
||
var body = parser.parseExpression(false);
|
||
--parser.leftrightDepth; // Check the next token
|
||
|
||
parser.expect("\\right", false);
|
||
var right = assertNodeType(parser.parseFunction(), "leftright-right");
|
||
return {
|
||
type: "leftright",
|
||
mode: parser.mode,
|
||
body: body,
|
||
left: delim.text,
|
||
right: right.delim,
|
||
rightColor: right.color
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
assertParsed(group); // Build the inner expression
|
||
|
||
var inner = buildHTML_buildExpression(group.body, options, true, ["mopen", "mclose"]);
|
||
var innerHeight = 0;
|
||
var innerDepth = 0;
|
||
var hadMiddle = false; // Calculate its height and depth
|
||
|
||
for (var i = 0; i < inner.length; i++) {
|
||
// Property `isMiddle` not defined on `span`. See comment in
|
||
// "middle"'s htmlBuilder.
|
||
// $FlowFixMe
|
||
if (inner[i].isMiddle) {
|
||
hadMiddle = true;
|
||
} else {
|
||
innerHeight = Math.max(inner[i].height, innerHeight);
|
||
innerDepth = Math.max(inner[i].depth, innerDepth);
|
||
}
|
||
} // The size of delimiters is the same, regardless of what style we are
|
||
// in. Thus, to correctly calculate the size of delimiter we need around
|
||
// a group, we scale down the inner size based on the size.
|
||
|
||
|
||
innerHeight *= options.sizeMultiplier;
|
||
innerDepth *= options.sizeMultiplier;
|
||
var leftDelim;
|
||
|
||
if (group.left === ".") {
|
||
// Empty delimiters in \left and \right make null delimiter spaces.
|
||
leftDelim = makeNullDelimiter(options, ["mopen"]);
|
||
} else {
|
||
// Otherwise, use leftRightDelim to generate the correct sized
|
||
// delimiter.
|
||
leftDelim = delimiter.leftRightDelim(group.left, innerHeight, innerDepth, options, group.mode, ["mopen"]);
|
||
} // Add it to the beginning of the expression
|
||
|
||
|
||
inner.unshift(leftDelim); // Handle middle delimiters
|
||
|
||
if (hadMiddle) {
|
||
for (var _i = 1; _i < inner.length; _i++) {
|
||
var middleDelim = inner[_i]; // Property `isMiddle` not defined on `span`. See comment in
|
||
// "middle"'s htmlBuilder.
|
||
// $FlowFixMe
|
||
|
||
var isMiddle = middleDelim.isMiddle;
|
||
|
||
if (isMiddle) {
|
||
// Apply the options that were active when \middle was called
|
||
inner[_i] = delimiter.leftRightDelim(isMiddle.delim, innerHeight, innerDepth, isMiddle.options, group.mode, []);
|
||
}
|
||
}
|
||
}
|
||
|
||
var rightDelim; // Same for the right delimiter, but using color specified by \color
|
||
|
||
if (group.right === ".") {
|
||
rightDelim = makeNullDelimiter(options, ["mclose"]);
|
||
} else {
|
||
var colorOptions = group.rightColor ? options.withColor(group.rightColor) : options;
|
||
rightDelim = delimiter.leftRightDelim(group.right, innerHeight, innerDepth, colorOptions, group.mode, ["mclose"]);
|
||
} // Add it to the end of the expression.
|
||
|
||
|
||
inner.push(rightDelim);
|
||
return buildCommon.makeSpan(["minner"], inner, options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
assertParsed(group);
|
||
var inner = buildMathML_buildExpression(group.body, options);
|
||
|
||
if (group.left !== ".") {
|
||
var leftNode = new mathMLTree.MathNode("mo", [buildMathML_makeText(group.left, group.mode)]);
|
||
leftNode.setAttribute("fence", "true");
|
||
inner.unshift(leftNode);
|
||
}
|
||
|
||
if (group.right !== ".") {
|
||
var rightNode = new mathMLTree.MathNode("mo", [buildMathML_makeText(group.right, group.mode)]);
|
||
rightNode.setAttribute("fence", "true");
|
||
|
||
if (group.rightColor) {
|
||
rightNode.setAttribute("mathcolor", group.rightColor);
|
||
}
|
||
|
||
inner.push(rightNode);
|
||
}
|
||
|
||
return buildMathML_makeRow(inner);
|
||
}
|
||
});
|
||
defineFunction({
|
||
type: "middle",
|
||
names: ["\\middle"],
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: function handler(context, args) {
|
||
var delim = checkDelimiter(args[0], context);
|
||
|
||
if (!context.parser.leftrightDepth) {
|
||
throw new src_ParseError("\\middle without preceding \\left", delim);
|
||
}
|
||
|
||
return {
|
||
type: "middle",
|
||
mode: context.parser.mode,
|
||
delim: delim.text
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
var middleDelim;
|
||
|
||
if (group.delim === ".") {
|
||
middleDelim = makeNullDelimiter(options, []);
|
||
} else {
|
||
middleDelim = delimiter.sizedDelim(group.delim, 1, options, group.mode, []);
|
||
var isMiddle = {
|
||
delim: group.delim,
|
||
options: options
|
||
}; // Property `isMiddle` not defined on `span`. It is only used in
|
||
// this file above.
|
||
// TODO: Fix this violation of the `span` type and possibly rename
|
||
// things since `isMiddle` sounds like a boolean, but is a struct.
|
||
// $FlowFixMe
|
||
|
||
middleDelim.isMiddle = isMiddle;
|
||
}
|
||
|
||
return middleDelim;
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
// A Firefox \middle will strech a character vertically only if it
|
||
// is in the fence part of the operator dictionary at:
|
||
// https://www.w3.org/TR/MathML3/appendixc.html.
|
||
// So we need to avoid U+2223 and use plain "|" instead.
|
||
var textNode = group.delim === "\\vert" || group.delim === "|" ? buildMathML_makeText("|", "text") : buildMathML_makeText(group.delim, group.mode);
|
||
var middleNode = new mathMLTree.MathNode("mo", [textNode]);
|
||
middleNode.setAttribute("fence", "true"); // MathML gives 5/18em spacing to each <mo> element.
|
||
// \middle should get delimiter spacing instead.
|
||
|
||
middleNode.setAttribute("lspace", "0.05em");
|
||
middleNode.setAttribute("rspace", "0.05em");
|
||
return middleNode;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/enclose.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var enclose_htmlBuilder = function htmlBuilder(group, options) {
|
||
// \cancel, \bcancel, \xcancel, \sout, \fbox, \colorbox, \fcolorbox
|
||
// Some groups can return document fragments. Handle those by wrapping
|
||
// them in a span.
|
||
var inner = buildCommon.wrapFragment(buildHTML_buildGroup(group.body, options), options);
|
||
var label = group.label.substr(1);
|
||
var scale = options.sizeMultiplier;
|
||
var img;
|
||
var imgShift = 0; // In the LaTeX cancel package, line geometry is slightly different
|
||
// depending on whether the subject is wider than it is tall, or vice versa.
|
||
// We don't know the width of a group, so as a proxy, we test if
|
||
// the subject is a single character. This captures most of the
|
||
// subjects that should get the "tall" treatment.
|
||
|
||
var isSingleChar = utils.isCharacterBox(group.body);
|
||
|
||
if (label === "sout") {
|
||
img = buildCommon.makeSpan(["stretchy", "sout"]);
|
||
img.height = options.fontMetrics().defaultRuleThickness / scale;
|
||
imgShift = -0.5 * options.fontMetrics().xHeight;
|
||
} else {
|
||
// Add horizontal padding
|
||
if (/cancel/.test(label)) {
|
||
if (!isSingleChar) {
|
||
inner.classes.push("cancel-pad");
|
||
}
|
||
} else {
|
||
inner.classes.push("boxpad");
|
||
} // Add vertical padding
|
||
|
||
|
||
var vertPad = 0;
|
||
var ruleThickness = 0; // ref: cancel package: \advance\totalheight2\p@ % "+2"
|
||
|
||
if (/box/.test(label)) {
|
||
ruleThickness = Math.max(options.fontMetrics().fboxrule, // default
|
||
options.minRuleThickness // User override.
|
||
);
|
||
vertPad = options.fontMetrics().fboxsep + (label === "colorbox" ? 0 : ruleThickness);
|
||
} else {
|
||
vertPad = isSingleChar ? 0.2 : 0;
|
||
}
|
||
|
||
img = stretchy.encloseSpan(inner, label, vertPad, options);
|
||
|
||
if (/fbox|boxed|fcolorbox/.test(label)) {
|
||
img.style.borderStyle = "solid";
|
||
img.style.borderWidth = ruleThickness + "em";
|
||
}
|
||
|
||
imgShift = inner.depth + vertPad;
|
||
|
||
if (group.backgroundColor) {
|
||
img.style.backgroundColor = group.backgroundColor;
|
||
|
||
if (group.borderColor) {
|
||
img.style.borderColor = group.borderColor;
|
||
}
|
||
}
|
||
}
|
||
|
||
var vlist;
|
||
|
||
if (group.backgroundColor) {
|
||
vlist = buildCommon.makeVList({
|
||
positionType: "individualShift",
|
||
children: [// Put the color background behind inner;
|
||
{
|
||
type: "elem",
|
||
elem: img,
|
||
shift: imgShift
|
||
}, {
|
||
type: "elem",
|
||
elem: inner,
|
||
shift: 0
|
||
}]
|
||
}, options);
|
||
} else {
|
||
vlist = buildCommon.makeVList({
|
||
positionType: "individualShift",
|
||
children: [// Write the \cancel stroke on top of inner.
|
||
{
|
||
type: "elem",
|
||
elem: inner,
|
||
shift: 0
|
||
}, {
|
||
type: "elem",
|
||
elem: img,
|
||
shift: imgShift,
|
||
wrapperClasses: /cancel/.test(label) ? ["svg-align"] : []
|
||
}]
|
||
}, options);
|
||
}
|
||
|
||
if (/cancel/.test(label)) {
|
||
// The cancel package documentation says that cancel lines add their height
|
||
// to the expression, but tests show that isn't how it actually works.
|
||
vlist.height = inner.height;
|
||
vlist.depth = inner.depth;
|
||
}
|
||
|
||
if (/cancel/.test(label) && !isSingleChar) {
|
||
// cancel does not create horiz space for its line extension.
|
||
return buildCommon.makeSpan(["mord", "cancel-lap"], [vlist], options);
|
||
} else {
|
||
return buildCommon.makeSpan(["mord"], [vlist], options);
|
||
}
|
||
};
|
||
|
||
var enclose_mathmlBuilder = function mathmlBuilder(group, options) {
|
||
var fboxsep = 0;
|
||
var node = new mathMLTree.MathNode(group.label.indexOf("colorbox") > -1 ? "mpadded" : "menclose", [buildMathML_buildGroup(group.body, options)]);
|
||
|
||
switch (group.label) {
|
||
case "\\cancel":
|
||
node.setAttribute("notation", "updiagonalstrike");
|
||
break;
|
||
|
||
case "\\bcancel":
|
||
node.setAttribute("notation", "downdiagonalstrike");
|
||
break;
|
||
|
||
case "\\sout":
|
||
node.setAttribute("notation", "horizontalstrike");
|
||
break;
|
||
|
||
case "\\fbox":
|
||
node.setAttribute("notation", "box");
|
||
break;
|
||
|
||
case "\\fcolorbox":
|
||
case "\\colorbox":
|
||
// <menclose> doesn't have a good notation option. So use <mpadded>
|
||
// instead. Set some attributes that come included with <menclose>.
|
||
fboxsep = options.fontMetrics().fboxsep * options.fontMetrics().ptPerEm;
|
||
node.setAttribute("width", "+" + 2 * fboxsep + "pt");
|
||
node.setAttribute("height", "+" + 2 * fboxsep + "pt");
|
||
node.setAttribute("lspace", fboxsep + "pt"); //
|
||
|
||
node.setAttribute("voffset", fboxsep + "pt");
|
||
|
||
if (group.label === "\\fcolorbox") {
|
||
var thk = Math.max(options.fontMetrics().fboxrule, // default
|
||
options.minRuleThickness // user override
|
||
);
|
||
node.setAttribute("style", "border: " + thk + "em solid " + String(group.borderColor));
|
||
}
|
||
|
||
break;
|
||
|
||
case "\\xcancel":
|
||
node.setAttribute("notation", "updiagonalstrike downdiagonalstrike");
|
||
break;
|
||
}
|
||
|
||
if (group.backgroundColor) {
|
||
node.setAttribute("mathbackground", group.backgroundColor);
|
||
}
|
||
|
||
return node;
|
||
};
|
||
|
||
defineFunction({
|
||
type: "enclose",
|
||
names: ["\\colorbox"],
|
||
props: {
|
||
numArgs: 2,
|
||
allowedInText: true,
|
||
greediness: 3,
|
||
argTypes: ["color", "text"]
|
||
},
|
||
handler: function handler(_ref, args, optArgs) {
|
||
var parser = _ref.parser,
|
||
funcName = _ref.funcName;
|
||
var color = assertNodeType(args[0], "color-token").color;
|
||
var body = args[1];
|
||
return {
|
||
type: "enclose",
|
||
mode: parser.mode,
|
||
label: funcName,
|
||
backgroundColor: color,
|
||
body: body
|
||
};
|
||
},
|
||
htmlBuilder: enclose_htmlBuilder,
|
||
mathmlBuilder: enclose_mathmlBuilder
|
||
});
|
||
defineFunction({
|
||
type: "enclose",
|
||
names: ["\\fcolorbox"],
|
||
props: {
|
||
numArgs: 3,
|
||
allowedInText: true,
|
||
greediness: 3,
|
||
argTypes: ["color", "color", "text"]
|
||
},
|
||
handler: function handler(_ref2, args, optArgs) {
|
||
var parser = _ref2.parser,
|
||
funcName = _ref2.funcName;
|
||
var borderColor = assertNodeType(args[0], "color-token").color;
|
||
var backgroundColor = assertNodeType(args[1], "color-token").color;
|
||
var body = args[2];
|
||
return {
|
||
type: "enclose",
|
||
mode: parser.mode,
|
||
label: funcName,
|
||
backgroundColor: backgroundColor,
|
||
borderColor: borderColor,
|
||
body: body
|
||
};
|
||
},
|
||
htmlBuilder: enclose_htmlBuilder,
|
||
mathmlBuilder: enclose_mathmlBuilder
|
||
});
|
||
defineFunction({
|
||
type: "enclose",
|
||
names: ["\\fbox"],
|
||
props: {
|
||
numArgs: 1,
|
||
argTypes: ["hbox"],
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref3, args) {
|
||
var parser = _ref3.parser;
|
||
return {
|
||
type: "enclose",
|
||
mode: parser.mode,
|
||
label: "\\fbox",
|
||
body: args[0]
|
||
};
|
||
}
|
||
});
|
||
defineFunction({
|
||
type: "enclose",
|
||
names: ["\\cancel", "\\bcancel", "\\xcancel", "\\sout"],
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: function handler(_ref4, args, optArgs) {
|
||
var parser = _ref4.parser,
|
||
funcName = _ref4.funcName;
|
||
var body = args[0];
|
||
return {
|
||
type: "enclose",
|
||
mode: parser.mode,
|
||
label: funcName,
|
||
body: body
|
||
};
|
||
},
|
||
htmlBuilder: enclose_htmlBuilder,
|
||
mathmlBuilder: enclose_mathmlBuilder
|
||
});
|
||
// CONCATENATED MODULE: ./src/defineEnvironment.js
|
||
|
||
|
||
/**
|
||
* All registered environments.
|
||
* `environments.js` exports this same dictionary again and makes it public.
|
||
* `Parser.js` requires this dictionary via `environments.js`.
|
||
*/
|
||
var _environments = {};
|
||
function defineEnvironment(_ref) {
|
||
var type = _ref.type,
|
||
names = _ref.names,
|
||
props = _ref.props,
|
||
handler = _ref.handler,
|
||
htmlBuilder = _ref.htmlBuilder,
|
||
mathmlBuilder = _ref.mathmlBuilder;
|
||
// Set default values of environments.
|
||
var data = {
|
||
type: type,
|
||
numArgs: props.numArgs || 0,
|
||
greediness: 1,
|
||
allowedInText: false,
|
||
numOptionalArgs: 0,
|
||
handler: handler
|
||
};
|
||
|
||
for (var i = 0; i < names.length; ++i) {
|
||
// TODO: The value type of _environments should be a type union of all
|
||
// possible `EnvSpec<>` possibilities instead of `EnvSpec<*>`, which is
|
||
// an existential type.
|
||
// $FlowFixMe
|
||
_environments[names[i]] = data;
|
||
}
|
||
|
||
if (htmlBuilder) {
|
||
_htmlGroupBuilders[type] = htmlBuilder;
|
||
}
|
||
|
||
if (mathmlBuilder) {
|
||
_mathmlGroupBuilders[type] = mathmlBuilder;
|
||
}
|
||
}
|
||
// CONCATENATED MODULE: ./src/environments/array.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
function getHLines(parser) {
|
||
// Return an array. The array length = number of hlines.
|
||
// Each element in the array tells if the line is dashed.
|
||
var hlineInfo = [];
|
||
parser.consumeSpaces();
|
||
var nxt = parser.fetch().text;
|
||
|
||
while (nxt === "\\hline" || nxt === "\\hdashline") {
|
||
parser.consume();
|
||
hlineInfo.push(nxt === "\\hdashline");
|
||
parser.consumeSpaces();
|
||
nxt = parser.fetch().text;
|
||
}
|
||
|
||
return hlineInfo;
|
||
}
|
||
/**
|
||
* Parse the body of the environment, with rows delimited by \\ and
|
||
* columns delimited by &, and create a nested list in row-major order
|
||
* with one group per cell. If given an optional argument style
|
||
* ("text", "display", etc.), then each cell is cast into that style.
|
||
*/
|
||
|
||
|
||
function parseArray(parser, _ref, style) {
|
||
var hskipBeforeAndAfter = _ref.hskipBeforeAndAfter,
|
||
addJot = _ref.addJot,
|
||
cols = _ref.cols,
|
||
arraystretch = _ref.arraystretch,
|
||
colSeparationType = _ref.colSeparationType;
|
||
// Parse body of array with \\ temporarily mapped to \cr
|
||
parser.gullet.beginGroup();
|
||
parser.gullet.macros.set("\\\\", "\\cr"); // Get current arraystretch if it's not set by the environment
|
||
|
||
if (!arraystretch) {
|
||
var stretch = parser.gullet.expandMacroAsText("\\arraystretch");
|
||
|
||
if (stretch == null) {
|
||
// Default \arraystretch from lttab.dtx
|
||
arraystretch = 1;
|
||
} else {
|
||
arraystretch = parseFloat(stretch);
|
||
|
||
if (!arraystretch || arraystretch < 0) {
|
||
throw new src_ParseError("Invalid \\arraystretch: " + stretch);
|
||
}
|
||
}
|
||
} // Start group for first cell
|
||
|
||
|
||
parser.gullet.beginGroup();
|
||
var row = [];
|
||
var body = [row];
|
||
var rowGaps = [];
|
||
var hLinesBeforeRow = []; // Test for \hline at the top of the array.
|
||
|
||
hLinesBeforeRow.push(getHLines(parser));
|
||
|
||
while (true) {
|
||
// eslint-disable-line no-constant-condition
|
||
// Parse each cell in its own group (namespace)
|
||
var cell = parser.parseExpression(false, "\\cr");
|
||
parser.gullet.endGroup();
|
||
parser.gullet.beginGroup();
|
||
cell = {
|
||
type: "ordgroup",
|
||
mode: parser.mode,
|
||
body: cell
|
||
};
|
||
|
||
if (style) {
|
||
cell = {
|
||
type: "styling",
|
||
mode: parser.mode,
|
||
style: style,
|
||
body: [cell]
|
||
};
|
||
}
|
||
|
||
row.push(cell);
|
||
var next = parser.fetch().text;
|
||
|
||
if (next === "&") {
|
||
parser.consume();
|
||
} else if (next === "\\end") {
|
||
// Arrays terminate newlines with `\crcr` which consumes a `\cr` if
|
||
// the last line is empty.
|
||
// NOTE: Currently, `cell` is the last item added into `row`.
|
||
if (row.length === 1 && cell.type === "styling" && cell.body[0].body.length === 0) {
|
||
body.pop();
|
||
}
|
||
|
||
if (hLinesBeforeRow.length < body.length + 1) {
|
||
hLinesBeforeRow.push([]);
|
||
}
|
||
|
||
break;
|
||
} else if (next === "\\cr") {
|
||
var cr = assertNodeType(parser.parseFunction(), "cr");
|
||
rowGaps.push(cr.size); // check for \hline(s) following the row separator
|
||
|
||
hLinesBeforeRow.push(getHLines(parser));
|
||
row = [];
|
||
body.push(row);
|
||
} else {
|
||
throw new src_ParseError("Expected & or \\\\ or \\cr or \\end", parser.nextToken);
|
||
}
|
||
} // End cell group
|
||
|
||
|
||
parser.gullet.endGroup(); // End array group defining \\
|
||
|
||
parser.gullet.endGroup();
|
||
return {
|
||
type: "array",
|
||
mode: parser.mode,
|
||
addJot: addJot,
|
||
arraystretch: arraystretch,
|
||
body: body,
|
||
cols: cols,
|
||
rowGaps: rowGaps,
|
||
hskipBeforeAndAfter: hskipBeforeAndAfter,
|
||
hLinesBeforeRow: hLinesBeforeRow,
|
||
colSeparationType: colSeparationType
|
||
};
|
||
} // Decides on a style for cells in an array according to whether the given
|
||
// environment name starts with the letter 'd'.
|
||
|
||
|
||
function dCellStyle(envName) {
|
||
if (envName.substr(0, 1) === "d") {
|
||
return "display";
|
||
} else {
|
||
return "text";
|
||
}
|
||
}
|
||
|
||
var array_htmlBuilder = function htmlBuilder(group, options) {
|
||
var r;
|
||
var c;
|
||
var nr = group.body.length;
|
||
var hLinesBeforeRow = group.hLinesBeforeRow;
|
||
var nc = 0;
|
||
var body = new Array(nr);
|
||
var hlines = [];
|
||
var ruleThickness = Math.max( // From LaTeX \showthe\arrayrulewidth. Equals 0.04 em.
|
||
options.fontMetrics().arrayRuleWidth, options.minRuleThickness // User override.
|
||
); // Horizontal spacing
|
||
|
||
var pt = 1 / options.fontMetrics().ptPerEm;
|
||
var arraycolsep = 5 * pt; // default value, i.e. \arraycolsep in article.cls
|
||
|
||
if (group.colSeparationType && group.colSeparationType === "small") {
|
||
// We're in a {smallmatrix}. Default column space is \thickspace,
|
||
// i.e. 5/18em = 0.2778em, per amsmath.dtx for {smallmatrix}.
|
||
// But that needs adjustment because LaTeX applies \scriptstyle to the
|
||
// entire array, including the colspace, but this function applies
|
||
// \scriptstyle only inside each element.
|
||
var localMultiplier = options.havingStyle(src_Style.SCRIPT).sizeMultiplier;
|
||
arraycolsep = 0.2778 * (localMultiplier / options.sizeMultiplier);
|
||
} // Vertical spacing
|
||
|
||
|
||
var baselineskip = 12 * pt; // see size10.clo
|
||
// Default \jot from ltmath.dtx
|
||
// TODO(edemaine): allow overriding \jot via \setlength (#687)
|
||
|
||
var jot = 3 * pt;
|
||
var arrayskip = group.arraystretch * baselineskip;
|
||
var arstrutHeight = 0.7 * arrayskip; // \strutbox in ltfsstrc.dtx and
|
||
|
||
var arstrutDepth = 0.3 * arrayskip; // \@arstrutbox in lttab.dtx
|
||
|
||
var totalHeight = 0; // Set a position for \hline(s) at the top of the array, if any.
|
||
|
||
function setHLinePos(hlinesInGap) {
|
||
for (var i = 0; i < hlinesInGap.length; ++i) {
|
||
if (i > 0) {
|
||
totalHeight += 0.25;
|
||
}
|
||
|
||
hlines.push({
|
||
pos: totalHeight,
|
||
isDashed: hlinesInGap[i]
|
||
});
|
||
}
|
||
}
|
||
|
||
setHLinePos(hLinesBeforeRow[0]);
|
||
|
||
for (r = 0; r < group.body.length; ++r) {
|
||
var inrow = group.body[r];
|
||
var height = arstrutHeight; // \@array adds an \@arstrut
|
||
|
||
var depth = arstrutDepth; // to each tow (via the template)
|
||
|
||
if (nc < inrow.length) {
|
||
nc = inrow.length;
|
||
}
|
||
|
||
var outrow = new Array(inrow.length);
|
||
|
||
for (c = 0; c < inrow.length; ++c) {
|
||
var elt = buildHTML_buildGroup(inrow[c], options);
|
||
|
||
if (depth < elt.depth) {
|
||
depth = elt.depth;
|
||
}
|
||
|
||
if (height < elt.height) {
|
||
height = elt.height;
|
||
}
|
||
|
||
outrow[c] = elt;
|
||
}
|
||
|
||
var rowGap = group.rowGaps[r];
|
||
var gap = 0;
|
||
|
||
if (rowGap) {
|
||
gap = units_calculateSize(rowGap, options);
|
||
|
||
if (gap > 0) {
|
||
// \@argarraycr
|
||
gap += arstrutDepth;
|
||
|
||
if (depth < gap) {
|
||
depth = gap; // \@xargarraycr
|
||
}
|
||
|
||
gap = 0;
|
||
}
|
||
} // In AMS multiline environments such as aligned and gathered, rows
|
||
// correspond to lines that have additional \jot added to the
|
||
// \baselineskip via \openup.
|
||
|
||
|
||
if (group.addJot) {
|
||
depth += jot;
|
||
}
|
||
|
||
outrow.height = height;
|
||
outrow.depth = depth;
|
||
totalHeight += height;
|
||
outrow.pos = totalHeight;
|
||
totalHeight += depth + gap; // \@yargarraycr
|
||
|
||
body[r] = outrow; // Set a position for \hline(s), if any.
|
||
|
||
setHLinePos(hLinesBeforeRow[r + 1]);
|
||
}
|
||
|
||
var offset = totalHeight / 2 + options.fontMetrics().axisHeight;
|
||
var colDescriptions = group.cols || [];
|
||
var cols = [];
|
||
var colSep;
|
||
var colDescrNum;
|
||
|
||
for (c = 0, colDescrNum = 0; // Continue while either there are more columns or more column
|
||
// descriptions, so trailing separators don't get lost.
|
||
c < nc || colDescrNum < colDescriptions.length; ++c, ++colDescrNum) {
|
||
var colDescr = colDescriptions[colDescrNum] || {};
|
||
var firstSeparator = true;
|
||
|
||
while (colDescr.type === "separator") {
|
||
// If there is more than one separator in a row, add a space
|
||
// between them.
|
||
if (!firstSeparator) {
|
||
colSep = buildCommon.makeSpan(["arraycolsep"], []);
|
||
colSep.style.width = options.fontMetrics().doubleRuleSep + "em";
|
||
cols.push(colSep);
|
||
}
|
||
|
||
if (colDescr.separator === "|" || colDescr.separator === ":") {
|
||
var lineType = colDescr.separator === "|" ? "solid" : "dashed";
|
||
var separator = buildCommon.makeSpan(["vertical-separator"], [], options);
|
||
separator.style.height = totalHeight + "em";
|
||
separator.style.borderRightWidth = ruleThickness + "em";
|
||
separator.style.borderRightStyle = lineType;
|
||
separator.style.margin = "0 -" + ruleThickness / 2 + "em";
|
||
separator.style.verticalAlign = -(totalHeight - offset) + "em";
|
||
cols.push(separator);
|
||
} else {
|
||
throw new src_ParseError("Invalid separator type: " + colDescr.separator);
|
||
}
|
||
|
||
colDescrNum++;
|
||
colDescr = colDescriptions[colDescrNum] || {};
|
||
firstSeparator = false;
|
||
}
|
||
|
||
if (c >= nc) {
|
||
continue;
|
||
}
|
||
|
||
var sepwidth = void 0;
|
||
|
||
if (c > 0 || group.hskipBeforeAndAfter) {
|
||
sepwidth = utils.deflt(colDescr.pregap, arraycolsep);
|
||
|
||
if (sepwidth !== 0) {
|
||
colSep = buildCommon.makeSpan(["arraycolsep"], []);
|
||
colSep.style.width = sepwidth + "em";
|
||
cols.push(colSep);
|
||
}
|
||
}
|
||
|
||
var col = [];
|
||
|
||
for (r = 0; r < nr; ++r) {
|
||
var row = body[r];
|
||
var elem = row[c];
|
||
|
||
if (!elem) {
|
||
continue;
|
||
}
|
||
|
||
var shift = row.pos - offset;
|
||
elem.depth = row.depth;
|
||
elem.height = row.height;
|
||
col.push({
|
||
type: "elem",
|
||
elem: elem,
|
||
shift: shift
|
||
});
|
||
}
|
||
|
||
col = buildCommon.makeVList({
|
||
positionType: "individualShift",
|
||
children: col
|
||
}, options);
|
||
col = buildCommon.makeSpan(["col-align-" + (colDescr.align || "c")], [col]);
|
||
cols.push(col);
|
||
|
||
if (c < nc - 1 || group.hskipBeforeAndAfter) {
|
||
sepwidth = utils.deflt(colDescr.postgap, arraycolsep);
|
||
|
||
if (sepwidth !== 0) {
|
||
colSep = buildCommon.makeSpan(["arraycolsep"], []);
|
||
colSep.style.width = sepwidth + "em";
|
||
cols.push(colSep);
|
||
}
|
||
}
|
||
}
|
||
|
||
body = buildCommon.makeSpan(["mtable"], cols); // Add \hline(s), if any.
|
||
|
||
if (hlines.length > 0) {
|
||
var line = buildCommon.makeLineSpan("hline", options, ruleThickness);
|
||
var dashes = buildCommon.makeLineSpan("hdashline", options, ruleThickness);
|
||
var vListElems = [{
|
||
type: "elem",
|
||
elem: body,
|
||
shift: 0
|
||
}];
|
||
|
||
while (hlines.length > 0) {
|
||
var hline = hlines.pop();
|
||
var lineShift = hline.pos - offset;
|
||
|
||
if (hline.isDashed) {
|
||
vListElems.push({
|
||
type: "elem",
|
||
elem: dashes,
|
||
shift: lineShift
|
||
});
|
||
} else {
|
||
vListElems.push({
|
||
type: "elem",
|
||
elem: line,
|
||
shift: lineShift
|
||
});
|
||
}
|
||
}
|
||
|
||
body = buildCommon.makeVList({
|
||
positionType: "individualShift",
|
||
children: vListElems
|
||
}, options);
|
||
}
|
||
|
||
return buildCommon.makeSpan(["mord"], [body], options);
|
||
};
|
||
|
||
var alignMap = {
|
||
c: "center ",
|
||
l: "left ",
|
||
r: "right "
|
||
};
|
||
|
||
var array_mathmlBuilder = function mathmlBuilder(group, options) {
|
||
var table = new mathMLTree.MathNode("mtable", group.body.map(function (row) {
|
||
return new mathMLTree.MathNode("mtr", row.map(function (cell) {
|
||
return new mathMLTree.MathNode("mtd", [buildMathML_buildGroup(cell, options)]);
|
||
}));
|
||
})); // Set column alignment, row spacing, column spacing, and
|
||
// array lines by setting attributes on the table element.
|
||
// Set the row spacing. In MathML, we specify a gap distance.
|
||
// We do not use rowGap[] because MathML automatically increases
|
||
// cell height with the height/depth of the element content.
|
||
// LaTeX \arraystretch multiplies the row baseline-to-baseline distance.
|
||
// We simulate this by adding (arraystretch - 1)em to the gap. This
|
||
// does a reasonable job of adjusting arrays containing 1 em tall content.
|
||
// The 0.16 and 0.09 values are found emprically. They produce an array
|
||
// similar to LaTeX and in which content does not interfere with \hines.
|
||
|
||
var gap = group.arraystretch === 0.5 ? 0.1 // {smallmatrix}, {subarray}
|
||
: 0.16 + group.arraystretch - 1 + (group.addJot ? 0.09 : 0);
|
||
table.setAttribute("rowspacing", gap + "em"); // MathML table lines go only between cells.
|
||
// To place a line on an edge we'll use <menclose>, if necessary.
|
||
|
||
var menclose = "";
|
||
var align = "";
|
||
|
||
if (group.cols) {
|
||
// Find column alignment, column spacing, and vertical lines.
|
||
var cols = group.cols;
|
||
var columnLines = "";
|
||
var prevTypeWasAlign = false;
|
||
var iStart = 0;
|
||
var iEnd = cols.length;
|
||
|
||
if (cols[0].type === "separator") {
|
||
menclose += "top ";
|
||
iStart = 1;
|
||
}
|
||
|
||
if (cols[cols.length - 1].type === "separator") {
|
||
menclose += "bottom ";
|
||
iEnd -= 1;
|
||
}
|
||
|
||
for (var i = iStart; i < iEnd; i++) {
|
||
if (cols[i].type === "align") {
|
||
align += alignMap[cols[i].align];
|
||
|
||
if (prevTypeWasAlign) {
|
||
columnLines += "none ";
|
||
}
|
||
|
||
prevTypeWasAlign = true;
|
||
} else if (cols[i].type === "separator") {
|
||
// MathML accepts only single lines between cells.
|
||
// So we read only the first of consecutive separators.
|
||
if (prevTypeWasAlign) {
|
||
columnLines += cols[i].separator === "|" ? "solid " : "dashed ";
|
||
prevTypeWasAlign = false;
|
||
}
|
||
}
|
||
}
|
||
|
||
table.setAttribute("columnalign", align.trim());
|
||
|
||
if (/[sd]/.test(columnLines)) {
|
||
table.setAttribute("columnlines", columnLines.trim());
|
||
}
|
||
} // Set column spacing.
|
||
|
||
|
||
if (group.colSeparationType === "align") {
|
||
var _cols = group.cols || [];
|
||
|
||
var spacing = "";
|
||
|
||
for (var _i = 1; _i < _cols.length; _i++) {
|
||
spacing += _i % 2 ? "0em " : "1em ";
|
||
}
|
||
|
||
table.setAttribute("columnspacing", spacing.trim());
|
||
} else if (group.colSeparationType === "alignat") {
|
||
table.setAttribute("columnspacing", "0em");
|
||
} else if (group.colSeparationType === "small") {
|
||
table.setAttribute("columnspacing", "0.2778em");
|
||
} else {
|
||
table.setAttribute("columnspacing", "1em");
|
||
} // Address \hline and \hdashline
|
||
|
||
|
||
var rowLines = "";
|
||
var hlines = group.hLinesBeforeRow;
|
||
menclose += hlines[0].length > 0 ? "left " : "";
|
||
menclose += hlines[hlines.length - 1].length > 0 ? "right " : "";
|
||
|
||
for (var _i2 = 1; _i2 < hlines.length - 1; _i2++) {
|
||
rowLines += hlines[_i2].length === 0 ? "none " // MathML accepts only a single line between rows. Read one element.
|
||
: hlines[_i2][0] ? "dashed " : "solid ";
|
||
}
|
||
|
||
if (/[sd]/.test(rowLines)) {
|
||
table.setAttribute("rowlines", rowLines.trim());
|
||
}
|
||
|
||
if (menclose !== "") {
|
||
table = new mathMLTree.MathNode("menclose", [table]);
|
||
table.setAttribute("notation", menclose.trim());
|
||
}
|
||
|
||
if (group.arraystretch && group.arraystretch < 1) {
|
||
// A small array. Wrap in scriptstyle so row gap is not too large.
|
||
table = new mathMLTree.MathNode("mstyle", [table]);
|
||
table.setAttribute("scriptlevel", "1");
|
||
}
|
||
|
||
return table;
|
||
}; // Convenience function for aligned and alignedat environments.
|
||
|
||
|
||
var array_alignedHandler = function alignedHandler(context, args) {
|
||
var cols = [];
|
||
var res = parseArray(context.parser, {
|
||
cols: cols,
|
||
addJot: true
|
||
}, "display"); // Determining number of columns.
|
||
// 1. If the first argument is given, we use it as a number of columns,
|
||
// and makes sure that each row doesn't exceed that number.
|
||
// 2. Otherwise, just count number of columns = maximum number
|
||
// of cells in each row ("aligned" mode -- isAligned will be true).
|
||
//
|
||
// At the same time, prepend empty group {} at beginning of every second
|
||
// cell in each row (starting with second cell) so that operators become
|
||
// binary. This behavior is implemented in amsmath's \start@aligned.
|
||
|
||
var numMaths;
|
||
var numCols = 0;
|
||
var emptyGroup = {
|
||
type: "ordgroup",
|
||
mode: context.mode,
|
||
body: []
|
||
};
|
||
var ordgroup = checkNodeType(args[0], "ordgroup");
|
||
|
||
if (ordgroup) {
|
||
var arg0 = "";
|
||
|
||
for (var i = 0; i < ordgroup.body.length; i++) {
|
||
var textord = assertNodeType(ordgroup.body[i], "textord");
|
||
arg0 += textord.text;
|
||
}
|
||
|
||
numMaths = Number(arg0);
|
||
numCols = numMaths * 2;
|
||
}
|
||
|
||
var isAligned = !numCols;
|
||
res.body.forEach(function (row) {
|
||
for (var _i3 = 1; _i3 < row.length; _i3 += 2) {
|
||
// Modify ordgroup node within styling node
|
||
var styling = assertNodeType(row[_i3], "styling");
|
||
|
||
var _ordgroup = assertNodeType(styling.body[0], "ordgroup");
|
||
|
||
_ordgroup.body.unshift(emptyGroup);
|
||
}
|
||
|
||
if (!isAligned) {
|
||
// Case 1
|
||
var curMaths = row.length / 2;
|
||
|
||
if (numMaths < curMaths) {
|
||
throw new src_ParseError("Too many math in a row: " + ("expected " + numMaths + ", but got " + curMaths), row[0]);
|
||
}
|
||
} else if (numCols < row.length) {
|
||
// Case 2
|
||
numCols = row.length;
|
||
}
|
||
}); // Adjusting alignment.
|
||
// In aligned mode, we add one \qquad between columns;
|
||
// otherwise we add nothing.
|
||
|
||
for (var _i4 = 0; _i4 < numCols; ++_i4) {
|
||
var align = "r";
|
||
var pregap = 0;
|
||
|
||
if (_i4 % 2 === 1) {
|
||
align = "l";
|
||
} else if (_i4 > 0 && isAligned) {
|
||
// "aligned" mode.
|
||
pregap = 1; // add one \quad
|
||
}
|
||
|
||
cols[_i4] = {
|
||
type: "align",
|
||
align: align,
|
||
pregap: pregap,
|
||
postgap: 0
|
||
};
|
||
}
|
||
|
||
res.colSeparationType = isAligned ? "align" : "alignat";
|
||
return res;
|
||
}; // Arrays are part of LaTeX, defined in lttab.dtx so its documentation
|
||
// is part of the source2e.pdf file of LaTeX2e source documentation.
|
||
// {darray} is an {array} environment where cells are set in \displaystyle,
|
||
// as defined in nccmath.sty.
|
||
|
||
|
||
defineEnvironment({
|
||
type: "array",
|
||
names: ["array", "darray"],
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: function handler(context, args) {
|
||
// Since no types are specified above, the two possibilities are
|
||
// - The argument is wrapped in {} or [], in which case Parser's
|
||
// parseGroup() returns an "ordgroup" wrapping some symbol node.
|
||
// - The argument is a bare symbol node.
|
||
var symNode = checkSymbolNodeType(args[0]);
|
||
var colalign = symNode ? [args[0]] : assertNodeType(args[0], "ordgroup").body;
|
||
var cols = colalign.map(function (nde) {
|
||
var node = assertSymbolNodeType(nde);
|
||
var ca = node.text;
|
||
|
||
if ("lcr".indexOf(ca) !== -1) {
|
||
return {
|
||
type: "align",
|
||
align: ca
|
||
};
|
||
} else if (ca === "|") {
|
||
return {
|
||
type: "separator",
|
||
separator: "|"
|
||
};
|
||
} else if (ca === ":") {
|
||
return {
|
||
type: "separator",
|
||
separator: ":"
|
||
};
|
||
}
|
||
|
||
throw new src_ParseError("Unknown column alignment: " + ca, nde);
|
||
});
|
||
var res = {
|
||
cols: cols,
|
||
hskipBeforeAndAfter: true // \@preamble in lttab.dtx
|
||
|
||
};
|
||
return parseArray(context.parser, res, dCellStyle(context.envName));
|
||
},
|
||
htmlBuilder: array_htmlBuilder,
|
||
mathmlBuilder: array_mathmlBuilder
|
||
}); // The matrix environments of amsmath builds on the array environment
|
||
// of LaTeX, which is discussed above.
|
||
|
||
defineEnvironment({
|
||
type: "array",
|
||
names: ["matrix", "pmatrix", "bmatrix", "Bmatrix", "vmatrix", "Vmatrix"],
|
||
props: {
|
||
numArgs: 0
|
||
},
|
||
handler: function handler(context) {
|
||
var delimiters = {
|
||
"matrix": null,
|
||
"pmatrix": ["(", ")"],
|
||
"bmatrix": ["[", "]"],
|
||
"Bmatrix": ["\\{", "\\}"],
|
||
"vmatrix": ["|", "|"],
|
||
"Vmatrix": ["\\Vert", "\\Vert"]
|
||
}[context.envName]; // \hskip -\arraycolsep in amsmath
|
||
|
||
var payload = {
|
||
hskipBeforeAndAfter: false
|
||
};
|
||
var res = parseArray(context.parser, payload, dCellStyle(context.envName));
|
||
return delimiters ? {
|
||
type: "leftright",
|
||
mode: context.mode,
|
||
body: [res],
|
||
left: delimiters[0],
|
||
right: delimiters[1],
|
||
rightColor: undefined // \right uninfluenced by \color in array
|
||
|
||
} : res;
|
||
},
|
||
htmlBuilder: array_htmlBuilder,
|
||
mathmlBuilder: array_mathmlBuilder
|
||
});
|
||
defineEnvironment({
|
||
type: "array",
|
||
names: ["smallmatrix"],
|
||
props: {
|
||
numArgs: 0
|
||
},
|
||
handler: function handler(context) {
|
||
var payload = {
|
||
arraystretch: 0.5
|
||
};
|
||
var res = parseArray(context.parser, payload, "script");
|
||
res.colSeparationType = "small";
|
||
return res;
|
||
},
|
||
htmlBuilder: array_htmlBuilder,
|
||
mathmlBuilder: array_mathmlBuilder
|
||
});
|
||
defineEnvironment({
|
||
type: "array",
|
||
names: ["subarray"],
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: function handler(context, args) {
|
||
// Parsing of {subarray} is similar to {array}
|
||
var symNode = checkSymbolNodeType(args[0]);
|
||
var colalign = symNode ? [args[0]] : assertNodeType(args[0], "ordgroup").body;
|
||
var cols = colalign.map(function (nde) {
|
||
var node = assertSymbolNodeType(nde);
|
||
var ca = node.text; // {subarray} only recognizes "l" & "c"
|
||
|
||
if ("lc".indexOf(ca) !== -1) {
|
||
return {
|
||
type: "align",
|
||
align: ca
|
||
};
|
||
}
|
||
|
||
throw new src_ParseError("Unknown column alignment: " + ca, nde);
|
||
});
|
||
|
||
if (cols.length > 1) {
|
||
throw new src_ParseError("{subarray} can contain only one column");
|
||
}
|
||
|
||
var res = {
|
||
cols: cols,
|
||
hskipBeforeAndAfter: false,
|
||
arraystretch: 0.5
|
||
};
|
||
res = parseArray(context.parser, res, "script");
|
||
|
||
if (res.body[0].length > 1) {
|
||
throw new src_ParseError("{subarray} can contain only one column");
|
||
}
|
||
|
||
return res;
|
||
},
|
||
htmlBuilder: array_htmlBuilder,
|
||
mathmlBuilder: array_mathmlBuilder
|
||
}); // A cases environment (in amsmath.sty) is almost equivalent to
|
||
// \def\arraystretch{1.2}%
|
||
// \left\{\begin{array}{@{}l@{\quad}l@{}} … \end{array}\right.
|
||
// {dcases} is a {cases} environment where cells are set in \displaystyle,
|
||
// as defined in mathtools.sty.
|
||
|
||
defineEnvironment({
|
||
type: "array",
|
||
names: ["cases", "dcases"],
|
||
props: {
|
||
numArgs: 0
|
||
},
|
||
handler: function handler(context) {
|
||
var payload = {
|
||
arraystretch: 1.2,
|
||
cols: [{
|
||
type: "align",
|
||
align: "l",
|
||
pregap: 0,
|
||
// TODO(kevinb) get the current style.
|
||
// For now we use the metrics for TEXT style which is what we were
|
||
// doing before. Before attempting to get the current style we
|
||
// should look at TeX's behavior especially for \over and matrices.
|
||
postgap: 1.0
|
||
/* 1em quad */
|
||
|
||
}, {
|
||
type: "align",
|
||
align: "l",
|
||
pregap: 0,
|
||
postgap: 0
|
||
}]
|
||
};
|
||
var res = parseArray(context.parser, payload, dCellStyle(context.envName));
|
||
return {
|
||
type: "leftright",
|
||
mode: context.mode,
|
||
body: [res],
|
||
left: "\\{",
|
||
right: ".",
|
||
rightColor: undefined
|
||
};
|
||
},
|
||
htmlBuilder: array_htmlBuilder,
|
||
mathmlBuilder: array_mathmlBuilder
|
||
}); // An aligned environment is like the align* environment
|
||
// except it operates within math mode.
|
||
// Note that we assume \nomallineskiplimit to be zero,
|
||
// so that \strut@ is the same as \strut.
|
||
|
||
defineEnvironment({
|
||
type: "array",
|
||
names: ["aligned"],
|
||
props: {
|
||
numArgs: 0
|
||
},
|
||
handler: array_alignedHandler,
|
||
htmlBuilder: array_htmlBuilder,
|
||
mathmlBuilder: array_mathmlBuilder
|
||
}); // A gathered environment is like an array environment with one centered
|
||
// column, but where rows are considered lines so get \jot line spacing
|
||
// and contents are set in \displaystyle.
|
||
|
||
defineEnvironment({
|
||
type: "array",
|
||
names: ["gathered"],
|
||
props: {
|
||
numArgs: 0
|
||
},
|
||
handler: function handler(context) {
|
||
var res = {
|
||
cols: [{
|
||
type: "align",
|
||
align: "c"
|
||
}],
|
||
addJot: true
|
||
};
|
||
return parseArray(context.parser, res, "display");
|
||
},
|
||
htmlBuilder: array_htmlBuilder,
|
||
mathmlBuilder: array_mathmlBuilder
|
||
}); // alignat environment is like an align environment, but one must explicitly
|
||
// specify maximum number of columns in each row, and can adjust spacing between
|
||
// each columns.
|
||
|
||
defineEnvironment({
|
||
type: "array",
|
||
names: ["alignedat"],
|
||
// One for numbered and for unnumbered;
|
||
// but, KaTeX doesn't supports math numbering yet,
|
||
// they make no difference for now.
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: array_alignedHandler,
|
||
htmlBuilder: array_htmlBuilder,
|
||
mathmlBuilder: array_mathmlBuilder
|
||
}); // Catch \hline outside array environment
|
||
|
||
defineFunction({
|
||
type: "text",
|
||
// Doesn't matter what this is.
|
||
names: ["\\hline", "\\hdashline"],
|
||
props: {
|
||
numArgs: 0,
|
||
allowedInText: true,
|
||
allowedInMath: true
|
||
},
|
||
handler: function handler(context, args) {
|
||
throw new src_ParseError(context.funcName + " valid only within array environment");
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/environments.js
|
||
|
||
var environments = _environments;
|
||
/* harmony default export */ var src_environments = (environments); // All environment definitions should be imported below
|
||
|
||
|
||
// CONCATENATED MODULE: ./src/functions/environment.js
|
||
|
||
|
||
|
||
// Environment delimiters. HTML/MathML rendering is defined in the corresponding
|
||
// defineEnvironment definitions.
|
||
// $FlowFixMe, "environment" handler returns an environment ParseNode
|
||
|
||
defineFunction({
|
||
type: "environment",
|
||
names: ["\\begin", "\\end"],
|
||
props: {
|
||
numArgs: 1,
|
||
argTypes: ["text"]
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser,
|
||
funcName = _ref.funcName;
|
||
var nameGroup = args[0];
|
||
|
||
if (nameGroup.type !== "ordgroup") {
|
||
throw new src_ParseError("Invalid environment name", nameGroup);
|
||
}
|
||
|
||
var envName = "";
|
||
|
||
for (var i = 0; i < nameGroup.body.length; ++i) {
|
||
envName += assertNodeType(nameGroup.body[i], "textord").text;
|
||
}
|
||
|
||
if (funcName === "\\begin") {
|
||
// begin...end is similar to left...right
|
||
if (!src_environments.hasOwnProperty(envName)) {
|
||
throw new src_ParseError("No such environment: " + envName, nameGroup);
|
||
} // Build the environment object. Arguments and other information will
|
||
// be made available to the begin and end methods using properties.
|
||
|
||
|
||
var env = src_environments[envName];
|
||
|
||
var _parser$parseArgument = parser.parseArguments("\\begin{" + envName + "}", env),
|
||
_args = _parser$parseArgument.args,
|
||
optArgs = _parser$parseArgument.optArgs;
|
||
|
||
var context = {
|
||
mode: parser.mode,
|
||
envName: envName,
|
||
parser: parser
|
||
};
|
||
var result = env.handler(context, _args, optArgs);
|
||
parser.expect("\\end", false);
|
||
var endNameToken = parser.nextToken;
|
||
var end = assertNodeType(parser.parseFunction(), "environment");
|
||
|
||
if (end.name !== envName) {
|
||
throw new src_ParseError("Mismatch: \\begin{" + envName + "} matched by \\end{" + end.name + "}", endNameToken);
|
||
}
|
||
|
||
return result;
|
||
}
|
||
|
||
return {
|
||
type: "environment",
|
||
mode: parser.mode,
|
||
name: envName,
|
||
nameGroup: nameGroup
|
||
};
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/mclass.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var mclass_makeSpan = buildCommon.makeSpan;
|
||
|
||
function mclass_htmlBuilder(group, options) {
|
||
var elements = buildHTML_buildExpression(group.body, options, true);
|
||
return mclass_makeSpan([group.mclass], elements, options);
|
||
}
|
||
|
||
function mclass_mathmlBuilder(group, options) {
|
||
var node;
|
||
var inner = buildMathML_buildExpression(group.body, options);
|
||
|
||
if (group.mclass === "minner") {
|
||
return mathMLTree.newDocumentFragment(inner);
|
||
} else if (group.mclass === "mord") {
|
||
if (group.isCharacterBox) {
|
||
node = inner[0];
|
||
node.type = "mi";
|
||
} else {
|
||
node = new mathMLTree.MathNode("mi", inner);
|
||
}
|
||
} else {
|
||
if (group.isCharacterBox) {
|
||
node = inner[0];
|
||
node.type = "mo";
|
||
} else {
|
||
node = new mathMLTree.MathNode("mo", inner);
|
||
} // Set spacing based on what is the most likely adjacent atom type.
|
||
// See TeXbook p170.
|
||
|
||
|
||
if (group.mclass === "mbin") {
|
||
node.attributes.lspace = "0.22em"; // medium space
|
||
|
||
node.attributes.rspace = "0.22em";
|
||
} else if (group.mclass === "mpunct") {
|
||
node.attributes.lspace = "0em";
|
||
node.attributes.rspace = "0.17em"; // thinspace
|
||
} else if (group.mclass === "mopen" || group.mclass === "mclose") {
|
||
node.attributes.lspace = "0em";
|
||
node.attributes.rspace = "0em";
|
||
} // MathML <mo> default space is 5/18 em, so <mrel> needs no action.
|
||
// Ref: https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mo
|
||
|
||
}
|
||
|
||
return node;
|
||
} // Math class commands except \mathop
|
||
|
||
|
||
defineFunction({
|
||
type: "mclass",
|
||
names: ["\\mathord", "\\mathbin", "\\mathrel", "\\mathopen", "\\mathclose", "\\mathpunct", "\\mathinner"],
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser,
|
||
funcName = _ref.funcName;
|
||
var body = args[0];
|
||
return {
|
||
type: "mclass",
|
||
mode: parser.mode,
|
||
mclass: "m" + funcName.substr(5),
|
||
// TODO(kevinb): don't prefix with 'm'
|
||
body: defineFunction_ordargument(body),
|
||
isCharacterBox: utils.isCharacterBox(body)
|
||
};
|
||
},
|
||
htmlBuilder: mclass_htmlBuilder,
|
||
mathmlBuilder: mclass_mathmlBuilder
|
||
});
|
||
var binrelClass = function binrelClass(arg) {
|
||
// \binrel@ spacing varies with (bin|rel|ord) of the atom in the argument.
|
||
// (by rendering separately and with {}s before and after, and measuring
|
||
// the change in spacing). We'll do roughly the same by detecting the
|
||
// atom type directly.
|
||
var atom = arg.type === "ordgroup" && arg.body.length ? arg.body[0] : arg;
|
||
|
||
if (atom.type === "atom" && (atom.family === "bin" || atom.family === "rel")) {
|
||
return "m" + atom.family;
|
||
} else {
|
||
return "mord";
|
||
}
|
||
}; // \@binrel{x}{y} renders like y but as mbin/mrel/mord if x is mbin/mrel/mord.
|
||
// This is equivalent to \binrel@{x}\binrel@@{y} in AMSTeX.
|
||
|
||
defineFunction({
|
||
type: "mclass",
|
||
names: ["\\@binrel"],
|
||
props: {
|
||
numArgs: 2
|
||
},
|
||
handler: function handler(_ref2, args) {
|
||
var parser = _ref2.parser;
|
||
return {
|
||
type: "mclass",
|
||
mode: parser.mode,
|
||
mclass: binrelClass(args[0]),
|
||
body: [args[1]],
|
||
isCharacterBox: utils.isCharacterBox(args[1])
|
||
};
|
||
}
|
||
}); // Build a relation or stacked op by placing one symbol on top of another
|
||
|
||
defineFunction({
|
||
type: "mclass",
|
||
names: ["\\stackrel", "\\overset", "\\underset"],
|
||
props: {
|
||
numArgs: 2
|
||
},
|
||
handler: function handler(_ref3, args) {
|
||
var parser = _ref3.parser,
|
||
funcName = _ref3.funcName;
|
||
var baseArg = args[1];
|
||
var shiftedArg = args[0];
|
||
var mclass;
|
||
|
||
if (funcName !== "\\stackrel") {
|
||
// LaTeX applies \binrel spacing to \overset and \underset.
|
||
mclass = binrelClass(baseArg);
|
||
} else {
|
||
mclass = "mrel"; // for \stackrel
|
||
}
|
||
|
||
var baseOp = {
|
||
type: "op",
|
||
mode: baseArg.mode,
|
||
limits: true,
|
||
alwaysHandleSupSub: true,
|
||
parentIsSupSub: false,
|
||
symbol: false,
|
||
suppressBaseShift: funcName !== "\\stackrel",
|
||
body: defineFunction_ordargument(baseArg)
|
||
};
|
||
var supsub = {
|
||
type: "supsub",
|
||
mode: shiftedArg.mode,
|
||
base: baseOp,
|
||
sup: funcName === "\\underset" ? null : shiftedArg,
|
||
sub: funcName === "\\underset" ? shiftedArg : null
|
||
};
|
||
return {
|
||
type: "mclass",
|
||
mode: parser.mode,
|
||
mclass: mclass,
|
||
body: [supsub],
|
||
isCharacterBox: utils.isCharacterBox(supsub)
|
||
};
|
||
},
|
||
htmlBuilder: mclass_htmlBuilder,
|
||
mathmlBuilder: mclass_mathmlBuilder
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/font.js
|
||
// TODO(kevinb): implement \\sl and \\sc
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var font_htmlBuilder = function htmlBuilder(group, options) {
|
||
var font = group.font;
|
||
var newOptions = options.withFont(font);
|
||
return buildHTML_buildGroup(group.body, newOptions);
|
||
};
|
||
|
||
var font_mathmlBuilder = function mathmlBuilder(group, options) {
|
||
var font = group.font;
|
||
var newOptions = options.withFont(font);
|
||
return buildMathML_buildGroup(group.body, newOptions);
|
||
};
|
||
|
||
var fontAliases = {
|
||
"\\Bbb": "\\mathbb",
|
||
"\\bold": "\\mathbf",
|
||
"\\frak": "\\mathfrak",
|
||
"\\bm": "\\boldsymbol"
|
||
};
|
||
defineFunction({
|
||
type: "font",
|
||
names: [// styles, except \boldsymbol defined below
|
||
"\\mathrm", "\\mathit", "\\mathbf", "\\mathnormal", // families
|
||
"\\mathbb", "\\mathcal", "\\mathfrak", "\\mathscr", "\\mathsf", "\\mathtt", // aliases, except \bm defined below
|
||
"\\Bbb", "\\bold", "\\frak"],
|
||
props: {
|
||
numArgs: 1,
|
||
greediness: 2
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser,
|
||
funcName = _ref.funcName;
|
||
var body = args[0];
|
||
var func = funcName;
|
||
|
||
if (func in fontAliases) {
|
||
func = fontAliases[func];
|
||
}
|
||
|
||
return {
|
||
type: "font",
|
||
mode: parser.mode,
|
||
font: func.slice(1),
|
||
body: body
|
||
};
|
||
},
|
||
htmlBuilder: font_htmlBuilder,
|
||
mathmlBuilder: font_mathmlBuilder
|
||
});
|
||
defineFunction({
|
||
type: "mclass",
|
||
names: ["\\boldsymbol", "\\bm"],
|
||
props: {
|
||
numArgs: 1,
|
||
greediness: 2
|
||
},
|
||
handler: function handler(_ref2, args) {
|
||
var parser = _ref2.parser;
|
||
var body = args[0];
|
||
var isCharacterBox = utils.isCharacterBox(body); // amsbsy.sty's \boldsymbol uses \binrel spacing to inherit the
|
||
// argument's bin|rel|ord status
|
||
|
||
return {
|
||
type: "mclass",
|
||
mode: parser.mode,
|
||
mclass: binrelClass(body),
|
||
body: [{
|
||
type: "font",
|
||
mode: parser.mode,
|
||
font: "boldsymbol",
|
||
body: body
|
||
}],
|
||
isCharacterBox: isCharacterBox
|
||
};
|
||
}
|
||
}); // Old font changing functions
|
||
|
||
defineFunction({
|
||
type: "font",
|
||
names: ["\\rm", "\\sf", "\\tt", "\\bf", "\\it"],
|
||
props: {
|
||
numArgs: 0,
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref3, args) {
|
||
var parser = _ref3.parser,
|
||
funcName = _ref3.funcName,
|
||
breakOnTokenText = _ref3.breakOnTokenText;
|
||
var mode = parser.mode;
|
||
var body = parser.parseExpression(true, breakOnTokenText);
|
||
var style = "math" + funcName.slice(1);
|
||
return {
|
||
type: "font",
|
||
mode: mode,
|
||
font: style,
|
||
body: {
|
||
type: "ordgroup",
|
||
mode: parser.mode,
|
||
body: body
|
||
}
|
||
};
|
||
},
|
||
htmlBuilder: font_htmlBuilder,
|
||
mathmlBuilder: font_mathmlBuilder
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/genfrac.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var genfrac_adjustStyle = function adjustStyle(size, originalStyle) {
|
||
// Figure out what style this fraction should be in based on the
|
||
// function used
|
||
var style = originalStyle;
|
||
|
||
if (size === "display") {
|
||
// Get display style as a default.
|
||
// If incoming style is sub/sup, use style.text() to get correct size.
|
||
style = style.id >= src_Style.SCRIPT.id ? style.text() : src_Style.DISPLAY;
|
||
} else if (size === "text" && style.size === src_Style.DISPLAY.size) {
|
||
// We're in a \tfrac but incoming style is displaystyle, so:
|
||
style = src_Style.TEXT;
|
||
} else if (size === "script") {
|
||
style = src_Style.SCRIPT;
|
||
} else if (size === "scriptscript") {
|
||
style = src_Style.SCRIPTSCRIPT;
|
||
}
|
||
|
||
return style;
|
||
};
|
||
|
||
var genfrac_htmlBuilder = function htmlBuilder(group, options) {
|
||
// Fractions are handled in the TeXbook on pages 444-445, rules 15(a-e).
|
||
var style = genfrac_adjustStyle(group.size, options.style);
|
||
var nstyle = style.fracNum();
|
||
var dstyle = style.fracDen();
|
||
var newOptions;
|
||
newOptions = options.havingStyle(nstyle);
|
||
var numerm = buildHTML_buildGroup(group.numer, newOptions, options);
|
||
|
||
if (group.continued) {
|
||
// \cfrac inserts a \strut into the numerator.
|
||
// Get \strut dimensions from TeXbook page 353.
|
||
var hStrut = 8.5 / options.fontMetrics().ptPerEm;
|
||
var dStrut = 3.5 / options.fontMetrics().ptPerEm;
|
||
numerm.height = numerm.height < hStrut ? hStrut : numerm.height;
|
||
numerm.depth = numerm.depth < dStrut ? dStrut : numerm.depth;
|
||
}
|
||
|
||
newOptions = options.havingStyle(dstyle);
|
||
var denomm = buildHTML_buildGroup(group.denom, newOptions, options);
|
||
var rule;
|
||
var ruleWidth;
|
||
var ruleSpacing;
|
||
|
||
if (group.hasBarLine) {
|
||
if (group.barSize) {
|
||
ruleWidth = units_calculateSize(group.barSize, options);
|
||
rule = buildCommon.makeLineSpan("frac-line", options, ruleWidth);
|
||
} else {
|
||
rule = buildCommon.makeLineSpan("frac-line", options);
|
||
}
|
||
|
||
ruleWidth = rule.height;
|
||
ruleSpacing = rule.height;
|
||
} else {
|
||
rule = null;
|
||
ruleWidth = 0;
|
||
ruleSpacing = options.fontMetrics().defaultRuleThickness;
|
||
} // Rule 15b
|
||
|
||
|
||
var numShift;
|
||
var clearance;
|
||
var denomShift;
|
||
|
||
if (style.size === src_Style.DISPLAY.size || group.size === "display") {
|
||
numShift = options.fontMetrics().num1;
|
||
|
||
if (ruleWidth > 0) {
|
||
clearance = 3 * ruleSpacing;
|
||
} else {
|
||
clearance = 7 * ruleSpacing;
|
||
}
|
||
|
||
denomShift = options.fontMetrics().denom1;
|
||
} else {
|
||
if (ruleWidth > 0) {
|
||
numShift = options.fontMetrics().num2;
|
||
clearance = ruleSpacing;
|
||
} else {
|
||
numShift = options.fontMetrics().num3;
|
||
clearance = 3 * ruleSpacing;
|
||
}
|
||
|
||
denomShift = options.fontMetrics().denom2;
|
||
}
|
||
|
||
var frac;
|
||
|
||
if (!rule) {
|
||
// Rule 15c
|
||
var candidateClearance = numShift - numerm.depth - (denomm.height - denomShift);
|
||
|
||
if (candidateClearance < clearance) {
|
||
numShift += 0.5 * (clearance - candidateClearance);
|
||
denomShift += 0.5 * (clearance - candidateClearance);
|
||
}
|
||
|
||
frac = buildCommon.makeVList({
|
||
positionType: "individualShift",
|
||
children: [{
|
||
type: "elem",
|
||
elem: denomm,
|
||
shift: denomShift
|
||
}, {
|
||
type: "elem",
|
||
elem: numerm,
|
||
shift: -numShift
|
||
}]
|
||
}, options);
|
||
} else {
|
||
// Rule 15d
|
||
var axisHeight = options.fontMetrics().axisHeight;
|
||
|
||
if (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth) < clearance) {
|
||
numShift += clearance - (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth));
|
||
}
|
||
|
||
if (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift) < clearance) {
|
||
denomShift += clearance - (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift));
|
||
}
|
||
|
||
var midShift = -(axisHeight - 0.5 * ruleWidth);
|
||
frac = buildCommon.makeVList({
|
||
positionType: "individualShift",
|
||
children: [{
|
||
type: "elem",
|
||
elem: denomm,
|
||
shift: denomShift
|
||
}, {
|
||
type: "elem",
|
||
elem: rule,
|
||
shift: midShift
|
||
}, {
|
||
type: "elem",
|
||
elem: numerm,
|
||
shift: -numShift
|
||
}]
|
||
}, options);
|
||
} // Since we manually change the style sometimes (with \dfrac or \tfrac),
|
||
// account for the possible size change here.
|
||
|
||
|
||
newOptions = options.havingStyle(style);
|
||
frac.height *= newOptions.sizeMultiplier / options.sizeMultiplier;
|
||
frac.depth *= newOptions.sizeMultiplier / options.sizeMultiplier; // Rule 15e
|
||
|
||
var delimSize;
|
||
|
||
if (style.size === src_Style.DISPLAY.size) {
|
||
delimSize = options.fontMetrics().delim1;
|
||
} else {
|
||
delimSize = options.fontMetrics().delim2;
|
||
}
|
||
|
||
var leftDelim;
|
||
var rightDelim;
|
||
|
||
if (group.leftDelim == null) {
|
||
leftDelim = makeNullDelimiter(options, ["mopen"]);
|
||
} else {
|
||
leftDelim = delimiter.customSizedDelim(group.leftDelim, delimSize, true, options.havingStyle(style), group.mode, ["mopen"]);
|
||
}
|
||
|
||
if (group.continued) {
|
||
rightDelim = buildCommon.makeSpan([]); // zero width for \cfrac
|
||
} else if (group.rightDelim == null) {
|
||
rightDelim = makeNullDelimiter(options, ["mclose"]);
|
||
} else {
|
||
rightDelim = delimiter.customSizedDelim(group.rightDelim, delimSize, true, options.havingStyle(style), group.mode, ["mclose"]);
|
||
}
|
||
|
||
return buildCommon.makeSpan(["mord"].concat(newOptions.sizingClasses(options)), [leftDelim, buildCommon.makeSpan(["mfrac"], [frac]), rightDelim], options);
|
||
};
|
||
|
||
var genfrac_mathmlBuilder = function mathmlBuilder(group, options) {
|
||
var node = new mathMLTree.MathNode("mfrac", [buildMathML_buildGroup(group.numer, options), buildMathML_buildGroup(group.denom, options)]);
|
||
|
||
if (!group.hasBarLine) {
|
||
node.setAttribute("linethickness", "0px");
|
||
} else if (group.barSize) {
|
||
var ruleWidth = units_calculateSize(group.barSize, options);
|
||
node.setAttribute("linethickness", ruleWidth + "em");
|
||
}
|
||
|
||
var style = genfrac_adjustStyle(group.size, options.style);
|
||
|
||
if (style.size !== options.style.size) {
|
||
node = new mathMLTree.MathNode("mstyle", [node]);
|
||
var isDisplay = style.size === src_Style.DISPLAY.size ? "true" : "false";
|
||
node.setAttribute("displaystyle", isDisplay);
|
||
node.setAttribute("scriptlevel", "0");
|
||
}
|
||
|
||
if (group.leftDelim != null || group.rightDelim != null) {
|
||
var withDelims = [];
|
||
|
||
if (group.leftDelim != null) {
|
||
var leftOp = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(group.leftDelim.replace("\\", ""))]);
|
||
leftOp.setAttribute("fence", "true");
|
||
withDelims.push(leftOp);
|
||
}
|
||
|
||
withDelims.push(node);
|
||
|
||
if (group.rightDelim != null) {
|
||
var rightOp = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(group.rightDelim.replace("\\", ""))]);
|
||
rightOp.setAttribute("fence", "true");
|
||
withDelims.push(rightOp);
|
||
}
|
||
|
||
return buildMathML_makeRow(withDelims);
|
||
}
|
||
|
||
return node;
|
||
};
|
||
|
||
defineFunction({
|
||
type: "genfrac",
|
||
names: ["\\cfrac", "\\dfrac", "\\frac", "\\tfrac", "\\dbinom", "\\binom", "\\tbinom", "\\\\atopfrac", // can’t be entered directly
|
||
"\\\\bracefrac", "\\\\brackfrac"],
|
||
props: {
|
||
numArgs: 2,
|
||
greediness: 2
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser,
|
||
funcName = _ref.funcName;
|
||
var numer = args[0];
|
||
var denom = args[1];
|
||
var hasBarLine;
|
||
var leftDelim = null;
|
||
var rightDelim = null;
|
||
var size = "auto";
|
||
|
||
switch (funcName) {
|
||
case "\\cfrac":
|
||
case "\\dfrac":
|
||
case "\\frac":
|
||
case "\\tfrac":
|
||
hasBarLine = true;
|
||
break;
|
||
|
||
case "\\\\atopfrac":
|
||
hasBarLine = false;
|
||
break;
|
||
|
||
case "\\dbinom":
|
||
case "\\binom":
|
||
case "\\tbinom":
|
||
hasBarLine = false;
|
||
leftDelim = "(";
|
||
rightDelim = ")";
|
||
break;
|
||
|
||
case "\\\\bracefrac":
|
||
hasBarLine = false;
|
||
leftDelim = "\\{";
|
||
rightDelim = "\\}";
|
||
break;
|
||
|
||
case "\\\\brackfrac":
|
||
hasBarLine = false;
|
||
leftDelim = "[";
|
||
rightDelim = "]";
|
||
break;
|
||
|
||
default:
|
||
throw new Error("Unrecognized genfrac command");
|
||
}
|
||
|
||
switch (funcName) {
|
||
case "\\cfrac":
|
||
case "\\dfrac":
|
||
case "\\dbinom":
|
||
size = "display";
|
||
break;
|
||
|
||
case "\\tfrac":
|
||
case "\\tbinom":
|
||
size = "text";
|
||
break;
|
||
}
|
||
|
||
return {
|
||
type: "genfrac",
|
||
mode: parser.mode,
|
||
continued: funcName === "\\cfrac",
|
||
numer: numer,
|
||
denom: denom,
|
||
hasBarLine: hasBarLine,
|
||
leftDelim: leftDelim,
|
||
rightDelim: rightDelim,
|
||
size: size,
|
||
barSize: null
|
||
};
|
||
},
|
||
htmlBuilder: genfrac_htmlBuilder,
|
||
mathmlBuilder: genfrac_mathmlBuilder
|
||
}); // Infix generalized fractions -- these are not rendered directly, but replaced
|
||
// immediately by one of the variants above.
|
||
|
||
defineFunction({
|
||
type: "infix",
|
||
names: ["\\over", "\\choose", "\\atop", "\\brace", "\\brack"],
|
||
props: {
|
||
numArgs: 0,
|
||
infix: true
|
||
},
|
||
handler: function handler(_ref2) {
|
||
var parser = _ref2.parser,
|
||
funcName = _ref2.funcName,
|
||
token = _ref2.token;
|
||
var replaceWith;
|
||
|
||
switch (funcName) {
|
||
case "\\over":
|
||
replaceWith = "\\frac";
|
||
break;
|
||
|
||
case "\\choose":
|
||
replaceWith = "\\binom";
|
||
break;
|
||
|
||
case "\\atop":
|
||
replaceWith = "\\\\atopfrac";
|
||
break;
|
||
|
||
case "\\brace":
|
||
replaceWith = "\\\\bracefrac";
|
||
break;
|
||
|
||
case "\\brack":
|
||
replaceWith = "\\\\brackfrac";
|
||
break;
|
||
|
||
default:
|
||
throw new Error("Unrecognized infix genfrac command");
|
||
}
|
||
|
||
return {
|
||
type: "infix",
|
||
mode: parser.mode,
|
||
replaceWith: replaceWith,
|
||
token: token
|
||
};
|
||
}
|
||
});
|
||
var stylArray = ["display", "text", "script", "scriptscript"];
|
||
|
||
var delimFromValue = function delimFromValue(delimString) {
|
||
var delim = null;
|
||
|
||
if (delimString.length > 0) {
|
||
delim = delimString;
|
||
delim = delim === "." ? null : delim;
|
||
}
|
||
|
||
return delim;
|
||
};
|
||
|
||
defineFunction({
|
||
type: "genfrac",
|
||
names: ["\\genfrac"],
|
||
props: {
|
||
numArgs: 6,
|
||
greediness: 6,
|
||
argTypes: ["math", "math", "size", "text", "math", "math"]
|
||
},
|
||
handler: function handler(_ref3, args) {
|
||
var parser = _ref3.parser;
|
||
var numer = args[4];
|
||
var denom = args[5]; // Look into the parse nodes to get the desired delimiters.
|
||
|
||
var leftNode = checkNodeType(args[0], "atom");
|
||
|
||
if (leftNode) {
|
||
leftNode = assertAtomFamily(args[0], "open");
|
||
}
|
||
|
||
var leftDelim = leftNode ? delimFromValue(leftNode.text) : null;
|
||
var rightNode = checkNodeType(args[1], "atom");
|
||
|
||
if (rightNode) {
|
||
rightNode = assertAtomFamily(args[1], "close");
|
||
}
|
||
|
||
var rightDelim = rightNode ? delimFromValue(rightNode.text) : null;
|
||
var barNode = assertNodeType(args[2], "size");
|
||
var hasBarLine;
|
||
var barSize = null;
|
||
|
||
if (barNode.isBlank) {
|
||
// \genfrac acts differently than \above.
|
||
// \genfrac treats an empty size group as a signal to use a
|
||
// standard bar size. \above would see size = 0 and omit the bar.
|
||
hasBarLine = true;
|
||
} else {
|
||
barSize = barNode.value;
|
||
hasBarLine = barSize.number > 0;
|
||
} // Find out if we want displaystyle, textstyle, etc.
|
||
|
||
|
||
var size = "auto";
|
||
var styl = checkNodeType(args[3], "ordgroup");
|
||
|
||
if (styl) {
|
||
if (styl.body.length > 0) {
|
||
var textOrd = assertNodeType(styl.body[0], "textord");
|
||
size = stylArray[Number(textOrd.text)];
|
||
}
|
||
} else {
|
||
styl = assertNodeType(args[3], "textord");
|
||
size = stylArray[Number(styl.text)];
|
||
}
|
||
|
||
return {
|
||
type: "genfrac",
|
||
mode: parser.mode,
|
||
numer: numer,
|
||
denom: denom,
|
||
continued: false,
|
||
hasBarLine: hasBarLine,
|
||
barSize: barSize,
|
||
leftDelim: leftDelim,
|
||
rightDelim: rightDelim,
|
||
size: size
|
||
};
|
||
},
|
||
htmlBuilder: genfrac_htmlBuilder,
|
||
mathmlBuilder: genfrac_mathmlBuilder
|
||
}); // \above is an infix fraction that also defines a fraction bar size.
|
||
|
||
defineFunction({
|
||
type: "infix",
|
||
names: ["\\above"],
|
||
props: {
|
||
numArgs: 1,
|
||
argTypes: ["size"],
|
||
infix: true
|
||
},
|
||
handler: function handler(_ref4, args) {
|
||
var parser = _ref4.parser,
|
||
funcName = _ref4.funcName,
|
||
token = _ref4.token;
|
||
return {
|
||
type: "infix",
|
||
mode: parser.mode,
|
||
replaceWith: "\\\\abovefrac",
|
||
size: assertNodeType(args[0], "size").value,
|
||
token: token
|
||
};
|
||
}
|
||
});
|
||
defineFunction({
|
||
type: "genfrac",
|
||
names: ["\\\\abovefrac"],
|
||
props: {
|
||
numArgs: 3,
|
||
argTypes: ["math", "size", "math"]
|
||
},
|
||
handler: function handler(_ref5, args) {
|
||
var parser = _ref5.parser,
|
||
funcName = _ref5.funcName;
|
||
var numer = args[0];
|
||
var barSize = assert(assertNodeType(args[1], "infix").size);
|
||
var denom = args[2];
|
||
var hasBarLine = barSize.number > 0;
|
||
return {
|
||
type: "genfrac",
|
||
mode: parser.mode,
|
||
numer: numer,
|
||
denom: denom,
|
||
continued: false,
|
||
hasBarLine: hasBarLine,
|
||
barSize: barSize,
|
||
leftDelim: null,
|
||
rightDelim: null,
|
||
size: "auto"
|
||
};
|
||
},
|
||
htmlBuilder: genfrac_htmlBuilder,
|
||
mathmlBuilder: genfrac_mathmlBuilder
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/horizBrace.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// NOTE: Unlike most `htmlBuilder`s, this one handles not only "horizBrace", but
|
||
var horizBrace_htmlBuilder = function htmlBuilder(grp, options) {
|
||
var style = options.style; // Pull out the `ParseNode<"horizBrace">` if `grp` is a "supsub" node.
|
||
|
||
var supSubGroup;
|
||
var group;
|
||
var supSub = checkNodeType(grp, "supsub");
|
||
|
||
if (supSub) {
|
||
// Ref: LaTeX source2e: }}}}\limits}
|
||
// i.e. LaTeX treats the brace similar to an op and passes it
|
||
// with \limits, so we need to assign supsub style.
|
||
supSubGroup = supSub.sup ? buildHTML_buildGroup(supSub.sup, options.havingStyle(style.sup()), options) : buildHTML_buildGroup(supSub.sub, options.havingStyle(style.sub()), options);
|
||
group = assertNodeType(supSub.base, "horizBrace");
|
||
} else {
|
||
group = assertNodeType(grp, "horizBrace");
|
||
} // Build the base group
|
||
|
||
|
||
var body = buildHTML_buildGroup(group.base, options.havingBaseStyle(src_Style.DISPLAY)); // Create the stretchy element
|
||
|
||
var braceBody = stretchy.svgSpan(group, options); // Generate the vlist, with the appropriate kerns ┏━━━━━━━━┓
|
||
// This first vlist contains the content and the brace: equation
|
||
|
||
var vlist;
|
||
|
||
if (group.isOver) {
|
||
vlist = buildCommon.makeVList({
|
||
positionType: "firstBaseline",
|
||
children: [{
|
||
type: "elem",
|
||
elem: body
|
||
}, {
|
||
type: "kern",
|
||
size: 0.1
|
||
}, {
|
||
type: "elem",
|
||
elem: braceBody
|
||
}]
|
||
}, options); // $FlowFixMe: Replace this with passing "svg-align" into makeVList.
|
||
|
||
vlist.children[0].children[0].children[1].classes.push("svg-align");
|
||
} else {
|
||
vlist = buildCommon.makeVList({
|
||
positionType: "bottom",
|
||
positionData: body.depth + 0.1 + braceBody.height,
|
||
children: [{
|
||
type: "elem",
|
||
elem: braceBody
|
||
}, {
|
||
type: "kern",
|
||
size: 0.1
|
||
}, {
|
||
type: "elem",
|
||
elem: body
|
||
}]
|
||
}, options); // $FlowFixMe: Replace this with passing "svg-align" into makeVList.
|
||
|
||
vlist.children[0].children[0].children[0].classes.push("svg-align");
|
||
}
|
||
|
||
if (supSubGroup) {
|
||
// To write the supsub, wrap the first vlist in another vlist:
|
||
// They can't all go in the same vlist, because the note might be
|
||
// wider than the equation. We want the equation to control the
|
||
// brace width.
|
||
// note long note long note
|
||
// ┏━━━━━━━━┓ or ┏━━━┓ not ┏━━━━━━━━━┓
|
||
// equation eqn eqn
|
||
var vSpan = buildCommon.makeSpan(["mord", group.isOver ? "mover" : "munder"], [vlist], options);
|
||
|
||
if (group.isOver) {
|
||
vlist = buildCommon.makeVList({
|
||
positionType: "firstBaseline",
|
||
children: [{
|
||
type: "elem",
|
||
elem: vSpan
|
||
}, {
|
||
type: "kern",
|
||
size: 0.2
|
||
}, {
|
||
type: "elem",
|
||
elem: supSubGroup
|
||
}]
|
||
}, options);
|
||
} else {
|
||
vlist = buildCommon.makeVList({
|
||
positionType: "bottom",
|
||
positionData: vSpan.depth + 0.2 + supSubGroup.height + supSubGroup.depth,
|
||
children: [{
|
||
type: "elem",
|
||
elem: supSubGroup
|
||
}, {
|
||
type: "kern",
|
||
size: 0.2
|
||
}, {
|
||
type: "elem",
|
||
elem: vSpan
|
||
}]
|
||
}, options);
|
||
}
|
||
}
|
||
|
||
return buildCommon.makeSpan(["mord", group.isOver ? "mover" : "munder"], [vlist], options);
|
||
};
|
||
|
||
var horizBrace_mathmlBuilder = function mathmlBuilder(group, options) {
|
||
var accentNode = stretchy.mathMLnode(group.label);
|
||
return new mathMLTree.MathNode(group.isOver ? "mover" : "munder", [buildMathML_buildGroup(group.base, options), accentNode]);
|
||
}; // Horizontal stretchy braces
|
||
|
||
|
||
defineFunction({
|
||
type: "horizBrace",
|
||
names: ["\\overbrace", "\\underbrace"],
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser,
|
||
funcName = _ref.funcName;
|
||
return {
|
||
type: "horizBrace",
|
||
mode: parser.mode,
|
||
label: funcName,
|
||
isOver: /^\\over/.test(funcName),
|
||
base: args[0]
|
||
};
|
||
},
|
||
htmlBuilder: horizBrace_htmlBuilder,
|
||
mathmlBuilder: horizBrace_mathmlBuilder
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/href.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
defineFunction({
|
||
type: "href",
|
||
names: ["\\href"],
|
||
props: {
|
||
numArgs: 2,
|
||
argTypes: ["url", "original"],
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser;
|
||
var body = args[1];
|
||
var href = assertNodeType(args[0], "url").url;
|
||
|
||
if (!parser.settings.isTrusted({
|
||
command: "\\href",
|
||
url: href
|
||
})) {
|
||
return parser.formatUnsupportedCmd("\\href");
|
||
}
|
||
|
||
return {
|
||
type: "href",
|
||
mode: parser.mode,
|
||
href: href,
|
||
body: defineFunction_ordargument(body)
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
var elements = buildHTML_buildExpression(group.body, options, false);
|
||
return buildCommon.makeAnchor(group.href, [], elements, options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var math = buildExpressionRow(group.body, options);
|
||
|
||
if (!(math instanceof mathMLTree_MathNode)) {
|
||
math = new mathMLTree_MathNode("mrow", [math]);
|
||
}
|
||
|
||
math.setAttribute("href", group.href);
|
||
return math;
|
||
}
|
||
});
|
||
defineFunction({
|
||
type: "href",
|
||
names: ["\\url"],
|
||
props: {
|
||
numArgs: 1,
|
||
argTypes: ["url"],
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref2, args) {
|
||
var parser = _ref2.parser;
|
||
var href = assertNodeType(args[0], "url").url;
|
||
|
||
if (!parser.settings.isTrusted({
|
||
command: "\\url",
|
||
url: href
|
||
})) {
|
||
return parser.formatUnsupportedCmd("\\url");
|
||
}
|
||
|
||
var chars = [];
|
||
|
||
for (var i = 0; i < href.length; i++) {
|
||
var c = href[i];
|
||
|
||
if (c === "~") {
|
||
c = "\\textasciitilde";
|
||
}
|
||
|
||
chars.push({
|
||
type: "textord",
|
||
mode: "text",
|
||
text: c
|
||
});
|
||
}
|
||
|
||
var body = {
|
||
type: "text",
|
||
mode: parser.mode,
|
||
font: "\\texttt",
|
||
body: chars
|
||
};
|
||
return {
|
||
type: "href",
|
||
mode: parser.mode,
|
||
href: href,
|
||
body: defineFunction_ordargument(body)
|
||
};
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/htmlmathml.js
|
||
|
||
|
||
|
||
|
||
defineFunction({
|
||
type: "htmlmathml",
|
||
names: ["\\html@mathml"],
|
||
props: {
|
||
numArgs: 2,
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser;
|
||
return {
|
||
type: "htmlmathml",
|
||
mode: parser.mode,
|
||
html: defineFunction_ordargument(args[0]),
|
||
mathml: defineFunction_ordargument(args[1])
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
var elements = buildHTML_buildExpression(group.html, options, false);
|
||
return buildCommon.makeFragment(elements);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
return buildExpressionRow(group.mathml, options);
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/includegraphics.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var includegraphics_sizeData = function sizeData(str) {
|
||
if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(str)) {
|
||
// str is a number with no unit specified.
|
||
// default unit is bp, per graphix package.
|
||
return {
|
||
number: +str,
|
||
unit: "bp"
|
||
};
|
||
} else {
|
||
var match = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(str);
|
||
|
||
if (!match) {
|
||
throw new src_ParseError("Invalid size: '" + str + "' in \\includegraphics");
|
||
}
|
||
|
||
var data = {
|
||
number: +(match[1] + match[2]),
|
||
// sign + magnitude, cast to number
|
||
unit: match[3]
|
||
};
|
||
|
||
if (!validUnit(data)) {
|
||
throw new src_ParseError("Invalid unit: '" + data.unit + "' in \\includegraphics.");
|
||
}
|
||
|
||
return data;
|
||
}
|
||
};
|
||
|
||
defineFunction({
|
||
type: "includegraphics",
|
||
names: ["\\includegraphics"],
|
||
props: {
|
||
numArgs: 1,
|
||
numOptionalArgs: 1,
|
||
argTypes: ["raw", "url"],
|
||
allowedInText: false
|
||
},
|
||
handler: function handler(_ref, args, optArgs) {
|
||
var parser = _ref.parser;
|
||
var width = {
|
||
number: 0,
|
||
unit: "em"
|
||
};
|
||
var height = {
|
||
number: 0.9,
|
||
unit: "em"
|
||
}; // sorta character sized.
|
||
|
||
var totalheight = {
|
||
number: 0,
|
||
unit: "em"
|
||
};
|
||
var alt = "";
|
||
|
||
if (optArgs[0]) {
|
||
var attributeStr = assertNodeType(optArgs[0], "raw").string; // Parser.js does not parse key/value pairs. We get a string.
|
||
|
||
var attributes = attributeStr.split(",");
|
||
|
||
for (var i = 0; i < attributes.length; i++) {
|
||
var keyVal = attributes[i].split("=");
|
||
|
||
if (keyVal.length === 2) {
|
||
var str = keyVal[1].trim();
|
||
|
||
switch (keyVal[0].trim()) {
|
||
case "alt":
|
||
alt = str;
|
||
break;
|
||
|
||
case "width":
|
||
width = includegraphics_sizeData(str);
|
||
break;
|
||
|
||
case "height":
|
||
height = includegraphics_sizeData(str);
|
||
break;
|
||
|
||
case "totalheight":
|
||
totalheight = includegraphics_sizeData(str);
|
||
break;
|
||
|
||
default:
|
||
throw new src_ParseError("Invalid key: '" + keyVal[0] + "' in \\includegraphics.");
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
var src = assertNodeType(args[0], "url").url;
|
||
|
||
if (alt === "") {
|
||
// No alt given. Use the file name. Strip away the path.
|
||
alt = src;
|
||
alt = alt.replace(/^.*[\\/]/, '');
|
||
alt = alt.substring(0, alt.lastIndexOf('.'));
|
||
}
|
||
|
||
if (!parser.settings.isTrusted({
|
||
command: "\\includegraphics",
|
||
url: src
|
||
})) {
|
||
return parser.formatUnsupportedCmd("\\includegraphics");
|
||
}
|
||
|
||
return {
|
||
type: "includegraphics",
|
||
mode: parser.mode,
|
||
alt: alt,
|
||
width: width,
|
||
height: height,
|
||
totalheight: totalheight,
|
||
src: src
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
var height = units_calculateSize(group.height, options);
|
||
var depth = 0;
|
||
|
||
if (group.totalheight.number > 0) {
|
||
depth = units_calculateSize(group.totalheight, options) - height;
|
||
depth = Number(depth.toFixed(2));
|
||
}
|
||
|
||
var width = 0;
|
||
|
||
if (group.width.number > 0) {
|
||
width = units_calculateSize(group.width, options);
|
||
}
|
||
|
||
var style = {
|
||
height: height + depth + "em"
|
||
};
|
||
|
||
if (width > 0) {
|
||
style.width = width + "em";
|
||
}
|
||
|
||
if (depth > 0) {
|
||
style.verticalAlign = -depth + "em";
|
||
}
|
||
|
||
var node = new domTree_Img(group.src, group.alt, style);
|
||
node.height = height;
|
||
node.depth = depth;
|
||
return node;
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var node = new mathMLTree.MathNode("mglyph", []);
|
||
node.setAttribute("alt", group.alt);
|
||
var height = units_calculateSize(group.height, options);
|
||
var depth = 0;
|
||
|
||
if (group.totalheight.number > 0) {
|
||
depth = units_calculateSize(group.totalheight, options) - height;
|
||
depth = depth.toFixed(2);
|
||
node.setAttribute("valign", "-" + depth + "em");
|
||
}
|
||
|
||
node.setAttribute("height", height + depth + "em");
|
||
|
||
if (group.width.number > 0) {
|
||
var width = units_calculateSize(group.width, options);
|
||
node.setAttribute("width", width + "em");
|
||
}
|
||
|
||
node.setAttribute("src", group.src);
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/kern.js
|
||
// Horizontal spacing commands
|
||
|
||
|
||
|
||
|
||
// TODO: \hskip and \mskip should support plus and minus in lengths
|
||
|
||
defineFunction({
|
||
type: "kern",
|
||
names: ["\\kern", "\\mkern", "\\hskip", "\\mskip"],
|
||
props: {
|
||
numArgs: 1,
|
||
argTypes: ["size"],
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser,
|
||
funcName = _ref.funcName;
|
||
var size = assertNodeType(args[0], "size");
|
||
|
||
if (parser.settings.strict) {
|
||
var mathFunction = funcName[1] === 'm'; // \mkern, \mskip
|
||
|
||
var muUnit = size.value.unit === 'mu';
|
||
|
||
if (mathFunction) {
|
||
if (!muUnit) {
|
||
parser.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + funcName + " supports only mu units, " + ("not " + size.value.unit + " units"));
|
||
}
|
||
|
||
if (parser.mode !== "math") {
|
||
parser.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + funcName + " works only in math mode");
|
||
}
|
||
} else {
|
||
// !mathFunction
|
||
if (muUnit) {
|
||
parser.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + funcName + " doesn't support mu units");
|
||
}
|
||
}
|
||
}
|
||
|
||
return {
|
||
type: "kern",
|
||
mode: parser.mode,
|
||
dimension: size.value
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
return buildCommon.makeGlue(group.dimension, options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var dimension = units_calculateSize(group.dimension, options);
|
||
return new mathMLTree.SpaceNode(dimension);
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/lap.js
|
||
// Horizontal overlap functions
|
||
|
||
|
||
|
||
|
||
|
||
defineFunction({
|
||
type: "lap",
|
||
names: ["\\mathllap", "\\mathrlap", "\\mathclap"],
|
||
props: {
|
||
numArgs: 1,
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser,
|
||
funcName = _ref.funcName;
|
||
var body = args[0];
|
||
return {
|
||
type: "lap",
|
||
mode: parser.mode,
|
||
alignment: funcName.slice(5),
|
||
body: body
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
// mathllap, mathrlap, mathclap
|
||
var inner;
|
||
|
||
if (group.alignment === "clap") {
|
||
// ref: https://www.math.lsu.edu/~aperlis/publications/mathclap/
|
||
inner = buildCommon.makeSpan([], [buildHTML_buildGroup(group.body, options)]); // wrap, since CSS will center a .clap > .inner > span
|
||
|
||
inner = buildCommon.makeSpan(["inner"], [inner], options);
|
||
} else {
|
||
inner = buildCommon.makeSpan(["inner"], [buildHTML_buildGroup(group.body, options)]);
|
||
}
|
||
|
||
var fix = buildCommon.makeSpan(["fix"], []);
|
||
var node = buildCommon.makeSpan([group.alignment], [inner, fix], options); // At this point, we have correctly set horizontal alignment of the
|
||
// two items involved in the lap.
|
||
// Next, use a strut to set the height of the HTML bounding box.
|
||
// Otherwise, a tall argument may be misplaced.
|
||
|
||
var strut = buildCommon.makeSpan(["strut"]);
|
||
strut.style.height = node.height + node.depth + "em";
|
||
strut.style.verticalAlign = -node.depth + "em";
|
||
node.children.unshift(strut); // Next, prevent vertical misplacement when next to something tall.
|
||
|
||
node = buildCommon.makeVList({
|
||
positionType: "firstBaseline",
|
||
children: [{
|
||
type: "elem",
|
||
elem: node
|
||
}]
|
||
}, options); // Get the horizontal spacing correct relative to adjacent items.
|
||
|
||
return buildCommon.makeSpan(["mord"], [node], options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
// mathllap, mathrlap, mathclap
|
||
var node = new mathMLTree.MathNode("mpadded", [buildMathML_buildGroup(group.body, options)]);
|
||
|
||
if (group.alignment !== "rlap") {
|
||
var offset = group.alignment === "llap" ? "-1" : "-0.5";
|
||
node.setAttribute("lspace", offset + "width");
|
||
}
|
||
|
||
node.setAttribute("width", "0px");
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/math.js
|
||
|
||
// Switching from text mode back to math mode
|
||
|
||
defineFunction({
|
||
type: "styling",
|
||
names: ["\\(", "$"],
|
||
props: {
|
||
numArgs: 0,
|
||
allowedInText: true,
|
||
allowedInMath: false
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var funcName = _ref.funcName,
|
||
parser = _ref.parser;
|
||
var outerMode = parser.mode;
|
||
parser.switchMode("math");
|
||
var close = funcName === "\\(" ? "\\)" : "$";
|
||
var body = parser.parseExpression(false, close);
|
||
parser.expect(close);
|
||
parser.switchMode(outerMode);
|
||
return {
|
||
type: "styling",
|
||
mode: parser.mode,
|
||
style: "text",
|
||
body: body
|
||
};
|
||
}
|
||
}); // Check for extra closing math delimiters
|
||
|
||
defineFunction({
|
||
type: "text",
|
||
// Doesn't matter what this is.
|
||
names: ["\\)", "\\]"],
|
||
props: {
|
||
numArgs: 0,
|
||
allowedInText: true,
|
||
allowedInMath: false
|
||
},
|
||
handler: function handler(context, args) {
|
||
throw new src_ParseError("Mismatched " + context.funcName);
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/mathchoice.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var mathchoice_chooseMathStyle = function chooseMathStyle(group, options) {
|
||
switch (options.style.size) {
|
||
case src_Style.DISPLAY.size:
|
||
return group.display;
|
||
|
||
case src_Style.TEXT.size:
|
||
return group.text;
|
||
|
||
case src_Style.SCRIPT.size:
|
||
return group.script;
|
||
|
||
case src_Style.SCRIPTSCRIPT.size:
|
||
return group.scriptscript;
|
||
|
||
default:
|
||
return group.text;
|
||
}
|
||
};
|
||
|
||
defineFunction({
|
||
type: "mathchoice",
|
||
names: ["\\mathchoice"],
|
||
props: {
|
||
numArgs: 4
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser;
|
||
return {
|
||
type: "mathchoice",
|
||
mode: parser.mode,
|
||
display: defineFunction_ordargument(args[0]),
|
||
text: defineFunction_ordargument(args[1]),
|
||
script: defineFunction_ordargument(args[2]),
|
||
scriptscript: defineFunction_ordargument(args[3])
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
var body = mathchoice_chooseMathStyle(group, options);
|
||
var elements = buildHTML_buildExpression(body, options, false);
|
||
return buildCommon.makeFragment(elements);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var body = mathchoice_chooseMathStyle(group, options);
|
||
return buildExpressionRow(body, options);
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/utils/assembleSupSub.js
|
||
|
||
|
||
// For an operator with limits, assemble the base, sup, and sub into a span.
|
||
var assembleSupSub_assembleSupSub = function assembleSupSub(base, supGroup, subGroup, options, style, slant, baseShift) {
|
||
// IE 8 clips \int if it is in a display: inline-block. We wrap it
|
||
// in a new span so it is an inline, and works.
|
||
base = buildCommon.makeSpan([], [base]);
|
||
var sub;
|
||
var sup; // We manually have to handle the superscripts and subscripts. This,
|
||
// aside from the kern calculations, is copied from supsub.
|
||
|
||
if (supGroup) {
|
||
var elem = buildHTML_buildGroup(supGroup, options.havingStyle(style.sup()), options);
|
||
sup = {
|
||
elem: elem,
|
||
kern: Math.max(options.fontMetrics().bigOpSpacing1, options.fontMetrics().bigOpSpacing3 - elem.depth)
|
||
};
|
||
}
|
||
|
||
if (subGroup) {
|
||
var _elem = buildHTML_buildGroup(subGroup, options.havingStyle(style.sub()), options);
|
||
|
||
sub = {
|
||
elem: _elem,
|
||
kern: Math.max(options.fontMetrics().bigOpSpacing2, options.fontMetrics().bigOpSpacing4 - _elem.height)
|
||
};
|
||
} // Build the final group as a vlist of the possible subscript, base,
|
||
// and possible superscript.
|
||
|
||
|
||
var finalGroup;
|
||
|
||
if (sup && sub) {
|
||
var bottom = options.fontMetrics().bigOpSpacing5 + sub.elem.height + sub.elem.depth + sub.kern + base.depth + baseShift;
|
||
finalGroup = buildCommon.makeVList({
|
||
positionType: "bottom",
|
||
positionData: bottom,
|
||
children: [{
|
||
type: "kern",
|
||
size: options.fontMetrics().bigOpSpacing5
|
||
}, {
|
||
type: "elem",
|
||
elem: sub.elem,
|
||
marginLeft: -slant + "em"
|
||
}, {
|
||
type: "kern",
|
||
size: sub.kern
|
||
}, {
|
||
type: "elem",
|
||
elem: base
|
||
}, {
|
||
type: "kern",
|
||
size: sup.kern
|
||
}, {
|
||
type: "elem",
|
||
elem: sup.elem,
|
||
marginLeft: slant + "em"
|
||
}, {
|
||
type: "kern",
|
||
size: options.fontMetrics().bigOpSpacing5
|
||
}]
|
||
}, options);
|
||
} else if (sub) {
|
||
var top = base.height - baseShift; // Shift the limits by the slant of the symbol. Note
|
||
// that we are supposed to shift the limits by 1/2 of the slant,
|
||
// but since we are centering the limits adding a full slant of
|
||
// margin will shift by 1/2 that.
|
||
|
||
finalGroup = buildCommon.makeVList({
|
||
positionType: "top",
|
||
positionData: top,
|
||
children: [{
|
||
type: "kern",
|
||
size: options.fontMetrics().bigOpSpacing5
|
||
}, {
|
||
type: "elem",
|
||
elem: sub.elem,
|
||
marginLeft: -slant + "em"
|
||
}, {
|
||
type: "kern",
|
||
size: sub.kern
|
||
}, {
|
||
type: "elem",
|
||
elem: base
|
||
}]
|
||
}, options);
|
||
} else if (sup) {
|
||
var _bottom = base.depth + baseShift;
|
||
|
||
finalGroup = buildCommon.makeVList({
|
||
positionType: "bottom",
|
||
positionData: _bottom,
|
||
children: [{
|
||
type: "elem",
|
||
elem: base
|
||
}, {
|
||
type: "kern",
|
||
size: sup.kern
|
||
}, {
|
||
type: "elem",
|
||
elem: sup.elem,
|
||
marginLeft: slant + "em"
|
||
}, {
|
||
type: "kern",
|
||
size: options.fontMetrics().bigOpSpacing5
|
||
}]
|
||
}, options);
|
||
} else {
|
||
// This case probably shouldn't occur (this would mean the
|
||
// supsub was sending us a group with no superscript or
|
||
// subscript) but be safe.
|
||
return base;
|
||
}
|
||
|
||
return buildCommon.makeSpan(["mop", "op-limits"], [finalGroup], options);
|
||
};
|
||
// CONCATENATED MODULE: ./src/functions/op.js
|
||
// Limits, symbols
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// Most operators have a large successor symbol, but these don't.
|
||
var noSuccessor = ["\\smallint"]; // NOTE: Unlike most `htmlBuilder`s, this one handles not only "op", but also
|
||
// "supsub" since some of them (like \int) can affect super/subscripting.
|
||
|
||
var op_htmlBuilder = function htmlBuilder(grp, options) {
|
||
// Operators are handled in the TeXbook pg. 443-444, rule 13(a).
|
||
var supGroup;
|
||
var subGroup;
|
||
var hasLimits = false;
|
||
var group;
|
||
var supSub = checkNodeType(grp, "supsub");
|
||
|
||
if (supSub) {
|
||
// If we have limits, supsub will pass us its group to handle. Pull
|
||
// out the superscript and subscript and set the group to the op in
|
||
// its base.
|
||
supGroup = supSub.sup;
|
||
subGroup = supSub.sub;
|
||
group = assertNodeType(supSub.base, "op");
|
||
hasLimits = true;
|
||
} else {
|
||
group = assertNodeType(grp, "op");
|
||
}
|
||
|
||
var style = options.style;
|
||
var large = false;
|
||
|
||
if (style.size === src_Style.DISPLAY.size && group.symbol && !utils.contains(noSuccessor, group.name)) {
|
||
// Most symbol operators get larger in displaystyle (rule 13)
|
||
large = true;
|
||
}
|
||
|
||
var base;
|
||
|
||
if (group.symbol) {
|
||
// If this is a symbol, create the symbol.
|
||
var fontName = large ? "Size2-Regular" : "Size1-Regular";
|
||
var stash = "";
|
||
|
||
if (group.name === "\\oiint" || group.name === "\\oiiint") {
|
||
// No font glyphs yet, so use a glyph w/o the oval.
|
||
// TODO: When font glyphs are available, delete this code.
|
||
stash = group.name.substr(1); // $FlowFixMe
|
||
|
||
group.name = stash === "oiint" ? "\\iint" : "\\iiint";
|
||
}
|
||
|
||
base = buildCommon.makeSymbol(group.name, fontName, "math", options, ["mop", "op-symbol", large ? "large-op" : "small-op"]);
|
||
|
||
if (stash.length > 0) {
|
||
// We're in \oiint or \oiiint. Overlay the oval.
|
||
// TODO: When font glyphs are available, delete this code.
|
||
var italic = base.italic;
|
||
var oval = buildCommon.staticSvg(stash + "Size" + (large ? "2" : "1"), options);
|
||
base = buildCommon.makeVList({
|
||
positionType: "individualShift",
|
||
children: [{
|
||
type: "elem",
|
||
elem: base,
|
||
shift: 0
|
||
}, {
|
||
type: "elem",
|
||
elem: oval,
|
||
shift: large ? 0.08 : 0
|
||
}]
|
||
}, options); // $FlowFixMe
|
||
|
||
group.name = "\\" + stash;
|
||
base.classes.unshift("mop"); // $FlowFixMe
|
||
|
||
base.italic = italic;
|
||
}
|
||
} else if (group.body) {
|
||
// If this is a list, compose that list.
|
||
var inner = buildHTML_buildExpression(group.body, options, true);
|
||
|
||
if (inner.length === 1 && inner[0] instanceof domTree_SymbolNode) {
|
||
base = inner[0];
|
||
base.classes[0] = "mop"; // replace old mclass
|
||
} else {
|
||
base = buildCommon.makeSpan(["mop"], buildCommon.tryCombineChars(inner), options);
|
||
}
|
||
} else {
|
||
// Otherwise, this is a text operator. Build the text from the
|
||
// operator's name.
|
||
// TODO(emily): Add a space in the middle of some of these
|
||
// operators, like \limsup
|
||
var output = [];
|
||
|
||
for (var i = 1; i < group.name.length; i++) {
|
||
output.push(buildCommon.mathsym(group.name[i], group.mode, options));
|
||
}
|
||
|
||
base = buildCommon.makeSpan(["mop"], output, options);
|
||
} // If content of op is a single symbol, shift it vertically.
|
||
|
||
|
||
var baseShift = 0;
|
||
var slant = 0;
|
||
|
||
if ((base instanceof domTree_SymbolNode || group.name === "\\oiint" || group.name === "\\oiiint") && !group.suppressBaseShift) {
|
||
// We suppress the shift of the base of \overset and \underset. Otherwise,
|
||
// shift the symbol so its center lies on the axis (rule 13). It
|
||
// appears that our fonts have the centers of the symbols already
|
||
// almost on the axis, so these numbers are very small. Note we
|
||
// don't actually apply this here, but instead it is used either in
|
||
// the vlist creation or separately when there are no limits.
|
||
baseShift = (base.height - base.depth) / 2 - options.fontMetrics().axisHeight; // The slant of the symbol is just its italic correction.
|
||
// $FlowFixMe
|
||
|
||
slant = base.italic;
|
||
}
|
||
|
||
if (hasLimits) {
|
||
return assembleSupSub_assembleSupSub(base, supGroup, subGroup, options, style, slant, baseShift);
|
||
} else {
|
||
if (baseShift) {
|
||
base.style.position = "relative";
|
||
base.style.top = baseShift + "em";
|
||
}
|
||
|
||
return base;
|
||
}
|
||
};
|
||
|
||
var op_mathmlBuilder = function mathmlBuilder(group, options) {
|
||
var node;
|
||
|
||
if (group.symbol) {
|
||
// This is a symbol. Just add the symbol.
|
||
node = new mathMLTree_MathNode("mo", [buildMathML_makeText(group.name, group.mode)]);
|
||
|
||
if (utils.contains(noSuccessor, group.name)) {
|
||
node.setAttribute("largeop", "false");
|
||
}
|
||
} else if (group.body) {
|
||
// This is an operator with children. Add them.
|
||
node = new mathMLTree_MathNode("mo", buildMathML_buildExpression(group.body, options));
|
||
} else {
|
||
// This is a text operator. Add all of the characters from the
|
||
// operator's name.
|
||
node = new mathMLTree_MathNode("mi", [new mathMLTree_TextNode(group.name.slice(1))]); // Append an <mo>⁡</mo>.
|
||
// ref: https://www.w3.org/TR/REC-MathML/chap3_2.html#sec3.2.4
|
||
|
||
var operator = new mathMLTree_MathNode("mo", [buildMathML_makeText("\u2061", "text")]);
|
||
|
||
if (group.parentIsSupSub) {
|
||
node = new mathMLTree_MathNode("mo", [node, operator]);
|
||
} else {
|
||
node = newDocumentFragment([node, operator]);
|
||
}
|
||
}
|
||
|
||
return node;
|
||
};
|
||
|
||
var singleCharBigOps = {
|
||
"\u220F": "\\prod",
|
||
"\u2210": "\\coprod",
|
||
"\u2211": "\\sum",
|
||
"\u22C0": "\\bigwedge",
|
||
"\u22C1": "\\bigvee",
|
||
"\u22C2": "\\bigcap",
|
||
"\u22C3": "\\bigcup",
|
||
"\u2A00": "\\bigodot",
|
||
"\u2A01": "\\bigoplus",
|
||
"\u2A02": "\\bigotimes",
|
||
"\u2A04": "\\biguplus",
|
||
"\u2A06": "\\bigsqcup"
|
||
};
|
||
defineFunction({
|
||
type: "op",
|
||
names: ["\\coprod", "\\bigvee", "\\bigwedge", "\\biguplus", "\\bigcap", "\\bigcup", "\\intop", "\\prod", "\\sum", "\\bigotimes", "\\bigoplus", "\\bigodot", "\\bigsqcup", "\\smallint", "\u220F", "\u2210", "\u2211", "\u22C0", "\u22C1", "\u22C2", "\u22C3", "\u2A00", "\u2A01", "\u2A02", "\u2A04", "\u2A06"],
|
||
props: {
|
||
numArgs: 0
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser,
|
||
funcName = _ref.funcName;
|
||
var fName = funcName;
|
||
|
||
if (fName.length === 1) {
|
||
fName = singleCharBigOps[fName];
|
||
}
|
||
|
||
return {
|
||
type: "op",
|
||
mode: parser.mode,
|
||
limits: true,
|
||
parentIsSupSub: false,
|
||
symbol: true,
|
||
name: fName
|
||
};
|
||
},
|
||
htmlBuilder: op_htmlBuilder,
|
||
mathmlBuilder: op_mathmlBuilder
|
||
}); // Note: calling defineFunction with a type that's already been defined only
|
||
// works because the same htmlBuilder and mathmlBuilder are being used.
|
||
|
||
defineFunction({
|
||
type: "op",
|
||
names: ["\\mathop"],
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: function handler(_ref2, args) {
|
||
var parser = _ref2.parser;
|
||
var body = args[0];
|
||
return {
|
||
type: "op",
|
||
mode: parser.mode,
|
||
limits: false,
|
||
parentIsSupSub: false,
|
||
symbol: false,
|
||
body: defineFunction_ordargument(body)
|
||
};
|
||
},
|
||
htmlBuilder: op_htmlBuilder,
|
||
mathmlBuilder: op_mathmlBuilder
|
||
}); // There are 2 flags for operators; whether they produce limits in
|
||
// displaystyle, and whether they are symbols and should grow in
|
||
// displaystyle. These four groups cover the four possible choices.
|
||
|
||
var singleCharIntegrals = {
|
||
"\u222B": "\\int",
|
||
"\u222C": "\\iint",
|
||
"\u222D": "\\iiint",
|
||
"\u222E": "\\oint",
|
||
"\u222F": "\\oiint",
|
||
"\u2230": "\\oiiint"
|
||
}; // No limits, not symbols
|
||
|
||
defineFunction({
|
||
type: "op",
|
||
names: ["\\arcsin", "\\arccos", "\\arctan", "\\arctg", "\\arcctg", "\\arg", "\\ch", "\\cos", "\\cosec", "\\cosh", "\\cot", "\\cotg", "\\coth", "\\csc", "\\ctg", "\\cth", "\\deg", "\\dim", "\\exp", "\\hom", "\\ker", "\\lg", "\\ln", "\\log", "\\sec", "\\sin", "\\sinh", "\\sh", "\\tan", "\\tanh", "\\tg", "\\th"],
|
||
props: {
|
||
numArgs: 0
|
||
},
|
||
handler: function handler(_ref3) {
|
||
var parser = _ref3.parser,
|
||
funcName = _ref3.funcName;
|
||
return {
|
||
type: "op",
|
||
mode: parser.mode,
|
||
limits: false,
|
||
parentIsSupSub: false,
|
||
symbol: false,
|
||
name: funcName
|
||
};
|
||
},
|
||
htmlBuilder: op_htmlBuilder,
|
||
mathmlBuilder: op_mathmlBuilder
|
||
}); // Limits, not symbols
|
||
|
||
defineFunction({
|
||
type: "op",
|
||
names: ["\\det", "\\gcd", "\\inf", "\\lim", "\\max", "\\min", "\\Pr", "\\sup"],
|
||
props: {
|
||
numArgs: 0
|
||
},
|
||
handler: function handler(_ref4) {
|
||
var parser = _ref4.parser,
|
||
funcName = _ref4.funcName;
|
||
return {
|
||
type: "op",
|
||
mode: parser.mode,
|
||
limits: true,
|
||
parentIsSupSub: false,
|
||
symbol: false,
|
||
name: funcName
|
||
};
|
||
},
|
||
htmlBuilder: op_htmlBuilder,
|
||
mathmlBuilder: op_mathmlBuilder
|
||
}); // No limits, symbols
|
||
|
||
defineFunction({
|
||
type: "op",
|
||
names: ["\\int", "\\iint", "\\iiint", "\\oint", "\\oiint", "\\oiiint", "\u222B", "\u222C", "\u222D", "\u222E", "\u222F", "\u2230"],
|
||
props: {
|
||
numArgs: 0
|
||
},
|
||
handler: function handler(_ref5) {
|
||
var parser = _ref5.parser,
|
||
funcName = _ref5.funcName;
|
||
var fName = funcName;
|
||
|
||
if (fName.length === 1) {
|
||
fName = singleCharIntegrals[fName];
|
||
}
|
||
|
||
return {
|
||
type: "op",
|
||
mode: parser.mode,
|
||
limits: false,
|
||
parentIsSupSub: false,
|
||
symbol: true,
|
||
name: fName
|
||
};
|
||
},
|
||
htmlBuilder: op_htmlBuilder,
|
||
mathmlBuilder: op_mathmlBuilder
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/operatorname.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// NOTE: Unlike most `htmlBuilder`s, this one handles not only
|
||
// "operatorname", but also "supsub" since \operatorname* can
|
||
var operatorname_htmlBuilder = function htmlBuilder(grp, options) {
|
||
// Operators are handled in the TeXbook pg. 443-444, rule 13(a).
|
||
var supGroup;
|
||
var subGroup;
|
||
var hasLimits = false;
|
||
var group;
|
||
var supSub = checkNodeType(grp, "supsub");
|
||
|
||
if (supSub) {
|
||
// If we have limits, supsub will pass us its group to handle. Pull
|
||
// out the superscript and subscript and set the group to the op in
|
||
// its base.
|
||
supGroup = supSub.sup;
|
||
subGroup = supSub.sub;
|
||
group = assertNodeType(supSub.base, "operatorname");
|
||
hasLimits = true;
|
||
} else {
|
||
group = assertNodeType(grp, "operatorname");
|
||
}
|
||
|
||
var base;
|
||
|
||
if (group.body.length > 0) {
|
||
var body = group.body.map(function (child) {
|
||
// $FlowFixMe: Check if the node has a string `text` property.
|
||
var childText = child.text;
|
||
|
||
if (typeof childText === "string") {
|
||
return {
|
||
type: "textord",
|
||
mode: child.mode,
|
||
text: childText
|
||
};
|
||
} else {
|
||
return child;
|
||
}
|
||
}); // Consolidate function names into symbol characters.
|
||
|
||
var expression = buildHTML_buildExpression(body, options.withFont("mathrm"), true);
|
||
|
||
for (var i = 0; i < expression.length; i++) {
|
||
var child = expression[i];
|
||
|
||
if (child instanceof domTree_SymbolNode) {
|
||
// Per amsopn package,
|
||
// change minus to hyphen and \ast to asterisk
|
||
child.text = child.text.replace(/\u2212/, "-").replace(/\u2217/, "*");
|
||
}
|
||
}
|
||
|
||
base = buildCommon.makeSpan(["mop"], expression, options);
|
||
} else {
|
||
base = buildCommon.makeSpan(["mop"], [], options);
|
||
}
|
||
|
||
if (hasLimits) {
|
||
return assembleSupSub_assembleSupSub(base, supGroup, subGroup, options, options.style, 0, 0);
|
||
} else {
|
||
return base;
|
||
}
|
||
};
|
||
|
||
var operatorname_mathmlBuilder = function mathmlBuilder(group, options) {
|
||
// The steps taken here are similar to the html version.
|
||
var expression = buildMathML_buildExpression(group.body, options.withFont("mathrm")); // Is expression a string or has it something like a fraction?
|
||
|
||
var isAllString = true; // default
|
||
|
||
for (var i = 0; i < expression.length; i++) {
|
||
var node = expression[i];
|
||
|
||
if (node instanceof mathMLTree.SpaceNode) {// Do nothing
|
||
} else if (node instanceof mathMLTree.MathNode) {
|
||
switch (node.type) {
|
||
case "mi":
|
||
case "mn":
|
||
case "ms":
|
||
case "mspace":
|
||
case "mtext":
|
||
break;
|
||
// Do nothing yet.
|
||
|
||
case "mo":
|
||
{
|
||
var child = node.children[0];
|
||
|
||
if (node.children.length === 1 && child instanceof mathMLTree.TextNode) {
|
||
child.text = child.text.replace(/\u2212/, "-").replace(/\u2217/, "*");
|
||
} else {
|
||
isAllString = false;
|
||
}
|
||
|
||
break;
|
||
}
|
||
|
||
default:
|
||
isAllString = false;
|
||
}
|
||
} else {
|
||
isAllString = false;
|
||
}
|
||
}
|
||
|
||
if (isAllString) {
|
||
// Write a single TextNode instead of multiple nested tags.
|
||
var word = expression.map(function (node) {
|
||
return node.toText();
|
||
}).join("");
|
||
expression = [new mathMLTree.TextNode(word)];
|
||
}
|
||
|
||
var identifier = new mathMLTree.MathNode("mi", expression);
|
||
identifier.setAttribute("mathvariant", "normal"); // \u2061 is the same as ⁡
|
||
// ref: https://www.w3schools.com/charsets/ref_html_entities_a.asp
|
||
|
||
var operator = new mathMLTree.MathNode("mo", [buildMathML_makeText("\u2061", "text")]);
|
||
|
||
if (group.parentIsSupSub) {
|
||
return new mathMLTree.MathNode("mo", [identifier, operator]);
|
||
} else {
|
||
return mathMLTree.newDocumentFragment([identifier, operator]);
|
||
}
|
||
}; // \operatorname
|
||
// amsopn.dtx: \mathop{#1\kern\z@\operator@font#3}\newmcodes@
|
||
|
||
|
||
defineFunction({
|
||
type: "operatorname",
|
||
names: ["\\operatorname", "\\operatorname*"],
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser,
|
||
funcName = _ref.funcName;
|
||
var body = args[0];
|
||
return {
|
||
type: "operatorname",
|
||
mode: parser.mode,
|
||
body: defineFunction_ordargument(body),
|
||
alwaysHandleSupSub: funcName === "\\operatorname*",
|
||
limits: false,
|
||
parentIsSupSub: false
|
||
};
|
||
},
|
||
htmlBuilder: operatorname_htmlBuilder,
|
||
mathmlBuilder: operatorname_mathmlBuilder
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/ordgroup.js
|
||
|
||
|
||
|
||
|
||
defineFunctionBuilders({
|
||
type: "ordgroup",
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
if (group.semisimple) {
|
||
return buildCommon.makeFragment(buildHTML_buildExpression(group.body, options, false));
|
||
}
|
||
|
||
return buildCommon.makeSpan(["mord"], buildHTML_buildExpression(group.body, options, true), options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
return buildExpressionRow(group.body, options, true);
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/overline.js
|
||
|
||
|
||
|
||
|
||
|
||
defineFunction({
|
||
type: "overline",
|
||
names: ["\\overline"],
|
||
props: {
|
||
numArgs: 1
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser;
|
||
var body = args[0];
|
||
return {
|
||
type: "overline",
|
||
mode: parser.mode,
|
||
body: body
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
// Overlines are handled in the TeXbook pg 443, Rule 9.
|
||
// Build the inner group in the cramped style.
|
||
var innerGroup = buildHTML_buildGroup(group.body, options.havingCrampedStyle()); // Create the line above the body
|
||
|
||
var line = buildCommon.makeLineSpan("overline-line", options); // Generate the vlist, with the appropriate kerns
|
||
|
||
var defaultRuleThickness = options.fontMetrics().defaultRuleThickness;
|
||
var vlist = buildCommon.makeVList({
|
||
positionType: "firstBaseline",
|
||
children: [{
|
||
type: "elem",
|
||
elem: innerGroup
|
||
}, {
|
||
type: "kern",
|
||
size: 3 * defaultRuleThickness
|
||
}, {
|
||
type: "elem",
|
||
elem: line
|
||
}, {
|
||
type: "kern",
|
||
size: defaultRuleThickness
|
||
}]
|
||
}, options);
|
||
return buildCommon.makeSpan(["mord", "overline"], [vlist], options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var operator = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode("\u203E")]);
|
||
operator.setAttribute("stretchy", "true");
|
||
var node = new mathMLTree.MathNode("mover", [buildMathML_buildGroup(group.body, options), operator]);
|
||
node.setAttribute("accent", "true");
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/phantom.js
|
||
|
||
|
||
|
||
|
||
|
||
defineFunction({
|
||
type: "phantom",
|
||
names: ["\\phantom"],
|
||
props: {
|
||
numArgs: 1,
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser;
|
||
var body = args[0];
|
||
return {
|
||
type: "phantom",
|
||
mode: parser.mode,
|
||
body: defineFunction_ordargument(body)
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
var elements = buildHTML_buildExpression(group.body, options.withPhantom(), false); // \phantom isn't supposed to affect the elements it contains.
|
||
// See "color" for more details.
|
||
|
||
return buildCommon.makeFragment(elements);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var inner = buildMathML_buildExpression(group.body, options);
|
||
return new mathMLTree.MathNode("mphantom", inner);
|
||
}
|
||
});
|
||
defineFunction({
|
||
type: "hphantom",
|
||
names: ["\\hphantom"],
|
||
props: {
|
||
numArgs: 1,
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref2, args) {
|
||
var parser = _ref2.parser;
|
||
var body = args[0];
|
||
return {
|
||
type: "hphantom",
|
||
mode: parser.mode,
|
||
body: body
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
var node = buildCommon.makeSpan([], [buildHTML_buildGroup(group.body, options.withPhantom())]);
|
||
node.height = 0;
|
||
node.depth = 0;
|
||
|
||
if (node.children) {
|
||
for (var i = 0; i < node.children.length; i++) {
|
||
node.children[i].height = 0;
|
||
node.children[i].depth = 0;
|
||
}
|
||
} // See smash for comment re: use of makeVList
|
||
|
||
|
||
node = buildCommon.makeVList({
|
||
positionType: "firstBaseline",
|
||
children: [{
|
||
type: "elem",
|
||
elem: node
|
||
}]
|
||
}, options); // For spacing, TeX treats \smash as a math group (same spacing as ord).
|
||
|
||
return buildCommon.makeSpan(["mord"], [node], options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var inner = buildMathML_buildExpression(defineFunction_ordargument(group.body), options);
|
||
var phantom = new mathMLTree.MathNode("mphantom", inner);
|
||
var node = new mathMLTree.MathNode("mpadded", [phantom]);
|
||
node.setAttribute("height", "0px");
|
||
node.setAttribute("depth", "0px");
|
||
return node;
|
||
}
|
||
});
|
||
defineFunction({
|
||
type: "vphantom",
|
||
names: ["\\vphantom"],
|
||
props: {
|
||
numArgs: 1,
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref3, args) {
|
||
var parser = _ref3.parser;
|
||
var body = args[0];
|
||
return {
|
||
type: "vphantom",
|
||
mode: parser.mode,
|
||
body: body
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
var inner = buildCommon.makeSpan(["inner"], [buildHTML_buildGroup(group.body, options.withPhantom())]);
|
||
var fix = buildCommon.makeSpan(["fix"], []);
|
||
return buildCommon.makeSpan(["mord", "rlap"], [inner, fix], options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var inner = buildMathML_buildExpression(defineFunction_ordargument(group.body), options);
|
||
var phantom = new mathMLTree.MathNode("mphantom", inner);
|
||
var node = new mathMLTree.MathNode("mpadded", [phantom]);
|
||
node.setAttribute("width", "0px");
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/raisebox.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// Box manipulation
|
||
|
||
defineFunction({
|
||
type: "raisebox",
|
||
names: ["\\raisebox"],
|
||
props: {
|
||
numArgs: 2,
|
||
argTypes: ["size", "hbox"],
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser;
|
||
var amount = assertNodeType(args[0], "size").value;
|
||
var body = args[1];
|
||
return {
|
||
type: "raisebox",
|
||
mode: parser.mode,
|
||
dy: amount,
|
||
body: body
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
var body = buildHTML_buildGroup(group.body, options);
|
||
var dy = units_calculateSize(group.dy, options);
|
||
return buildCommon.makeVList({
|
||
positionType: "shift",
|
||
positionData: -dy,
|
||
children: [{
|
||
type: "elem",
|
||
elem: body
|
||
}]
|
||
}, options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var node = new mathMLTree.MathNode("mpadded", [buildMathML_buildGroup(group.body, options)]);
|
||
var dy = group.dy.number + group.dy.unit;
|
||
node.setAttribute("voffset", dy);
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/rule.js
|
||
|
||
|
||
|
||
|
||
|
||
defineFunction({
|
||
type: "rule",
|
||
names: ["\\rule"],
|
||
props: {
|
||
numArgs: 2,
|
||
numOptionalArgs: 1,
|
||
argTypes: ["size", "size", "size"]
|
||
},
|
||
handler: function handler(_ref, args, optArgs) {
|
||
var parser = _ref.parser;
|
||
var shift = optArgs[0];
|
||
var width = assertNodeType(args[0], "size");
|
||
var height = assertNodeType(args[1], "size");
|
||
return {
|
||
type: "rule",
|
||
mode: parser.mode,
|
||
shift: shift && assertNodeType(shift, "size").value,
|
||
width: width.value,
|
||
height: height.value
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
// Make an empty span for the rule
|
||
var rule = buildCommon.makeSpan(["mord", "rule"], [], options); // Calculate the shift, width, and height of the rule, and account for units
|
||
|
||
var width = units_calculateSize(group.width, options);
|
||
var height = units_calculateSize(group.height, options);
|
||
var shift = group.shift ? units_calculateSize(group.shift, options) : 0; // Style the rule to the right size
|
||
|
||
rule.style.borderRightWidth = width + "em";
|
||
rule.style.borderTopWidth = height + "em";
|
||
rule.style.bottom = shift + "em"; // Record the height and width
|
||
|
||
rule.width = width;
|
||
rule.height = height + shift;
|
||
rule.depth = -shift; // Font size is the number large enough that the browser will
|
||
// reserve at least `absHeight` space above the baseline.
|
||
// The 1.125 factor was empirically determined
|
||
|
||
rule.maxFontSize = height * 1.125 * options.sizeMultiplier;
|
||
return rule;
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var width = units_calculateSize(group.width, options);
|
||
var height = units_calculateSize(group.height, options);
|
||
var shift = group.shift ? units_calculateSize(group.shift, options) : 0;
|
||
var color = options.color && options.getColor() || "black";
|
||
var rule = new mathMLTree.MathNode("mspace");
|
||
rule.setAttribute("mathbackground", color);
|
||
rule.setAttribute("width", width + "em");
|
||
rule.setAttribute("height", height + "em");
|
||
var wrapper = new mathMLTree.MathNode("mpadded", [rule]);
|
||
|
||
if (shift >= 0) {
|
||
wrapper.setAttribute("height", "+" + shift + "em");
|
||
} else {
|
||
wrapper.setAttribute("height", shift + "em");
|
||
wrapper.setAttribute("depth", "+" + -shift + "em");
|
||
}
|
||
|
||
wrapper.setAttribute("voffset", shift + "em");
|
||
return wrapper;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/sizing.js
|
||
|
||
|
||
|
||
|
||
|
||
function sizingGroup(value, options, baseOptions) {
|
||
var inner = buildHTML_buildExpression(value, options, false);
|
||
var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier; // Add size-resetting classes to the inner list and set maxFontSize
|
||
// manually. Handle nested size changes.
|
||
|
||
for (var i = 0; i < inner.length; i++) {
|
||
var pos = inner[i].classes.indexOf("sizing");
|
||
|
||
if (pos < 0) {
|
||
Array.prototype.push.apply(inner[i].classes, options.sizingClasses(baseOptions));
|
||
} else if (inner[i].classes[pos + 1] === "reset-size" + options.size) {
|
||
// This is a nested size change: e.g., inner[i] is the "b" in
|
||
// `\Huge a \small b`. Override the old size (the `reset-` class)
|
||
// but not the new size.
|
||
inner[i].classes[pos + 1] = "reset-size" + baseOptions.size;
|
||
}
|
||
|
||
inner[i].height *= multiplier;
|
||
inner[i].depth *= multiplier;
|
||
}
|
||
|
||
return buildCommon.makeFragment(inner);
|
||
}
|
||
var sizeFuncs = ["\\tiny", "\\sixptsize", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"];
|
||
var sizing_htmlBuilder = function htmlBuilder(group, options) {
|
||
// Handle sizing operators like \Huge. Real TeX doesn't actually allow
|
||
// these functions inside of math expressions, so we do some special
|
||
// handling.
|
||
var newOptions = options.havingSize(group.size);
|
||
return sizingGroup(group.body, newOptions, options);
|
||
};
|
||
defineFunction({
|
||
type: "sizing",
|
||
names: sizeFuncs,
|
||
props: {
|
||
numArgs: 0,
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var breakOnTokenText = _ref.breakOnTokenText,
|
||
funcName = _ref.funcName,
|
||
parser = _ref.parser;
|
||
var body = parser.parseExpression(false, breakOnTokenText);
|
||
return {
|
||
type: "sizing",
|
||
mode: parser.mode,
|
||
// Figure out what size to use based on the list of functions above
|
||
size: sizeFuncs.indexOf(funcName) + 1,
|
||
body: body
|
||
};
|
||
},
|
||
htmlBuilder: sizing_htmlBuilder,
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var newOptions = options.havingSize(group.size);
|
||
var inner = buildMathML_buildExpression(group.body, newOptions);
|
||
var node = new mathMLTree.MathNode("mstyle", inner); // TODO(emily): This doesn't produce the correct size for nested size
|
||
// changes, because we don't keep state of what style we're currently
|
||
// in, so we can't reset the size to normal before changing it. Now
|
||
// that we're passing an options parameter we should be able to fix
|
||
// this.
|
||
|
||
node.setAttribute("mathsize", newOptions.sizeMultiplier + "em");
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/smash.js
|
||
// smash, with optional [tb], as in AMS
|
||
|
||
|
||
|
||
|
||
|
||
|
||
defineFunction({
|
||
type: "smash",
|
||
names: ["\\smash"],
|
||
props: {
|
||
numArgs: 1,
|
||
numOptionalArgs: 1,
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref, args, optArgs) {
|
||
var parser = _ref.parser;
|
||
var smashHeight = false;
|
||
var smashDepth = false;
|
||
var tbArg = optArgs[0] && assertNodeType(optArgs[0], "ordgroup");
|
||
|
||
if (tbArg) {
|
||
// Optional [tb] argument is engaged.
|
||
// ref: amsmath: \renewcommand{\smash}[1][tb]{%
|
||
// def\mb@t{\ht}\def\mb@b{\dp}\def\mb@tb{\ht\z@\z@\dp}%
|
||
var letter = "";
|
||
|
||
for (var i = 0; i < tbArg.body.length; ++i) {
|
||
var node = tbArg.body[i]; // $FlowFixMe: Not every node type has a `text` property.
|
||
|
||
letter = node.text;
|
||
|
||
if (letter === "t") {
|
||
smashHeight = true;
|
||
} else if (letter === "b") {
|
||
smashDepth = true;
|
||
} else {
|
||
smashHeight = false;
|
||
smashDepth = false;
|
||
break;
|
||
}
|
||
}
|
||
} else {
|
||
smashHeight = true;
|
||
smashDepth = true;
|
||
}
|
||
|
||
var body = args[0];
|
||
return {
|
||
type: "smash",
|
||
mode: parser.mode,
|
||
body: body,
|
||
smashHeight: smashHeight,
|
||
smashDepth: smashDepth
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
var node = buildCommon.makeSpan([], [buildHTML_buildGroup(group.body, options)]);
|
||
|
||
if (!group.smashHeight && !group.smashDepth) {
|
||
return node;
|
||
}
|
||
|
||
if (group.smashHeight) {
|
||
node.height = 0; // In order to influence makeVList, we have to reset the children.
|
||
|
||
if (node.children) {
|
||
for (var i = 0; i < node.children.length; i++) {
|
||
node.children[i].height = 0;
|
||
}
|
||
}
|
||
}
|
||
|
||
if (group.smashDepth) {
|
||
node.depth = 0;
|
||
|
||
if (node.children) {
|
||
for (var _i = 0; _i < node.children.length; _i++) {
|
||
node.children[_i].depth = 0;
|
||
}
|
||
}
|
||
} // At this point, we've reset the TeX-like height and depth values.
|
||
// But the span still has an HTML line height.
|
||
// makeVList applies "display: table-cell", which prevents the browser
|
||
// from acting on that line height. So we'll call makeVList now.
|
||
|
||
|
||
var smashedNode = buildCommon.makeVList({
|
||
positionType: "firstBaseline",
|
||
children: [{
|
||
type: "elem",
|
||
elem: node
|
||
}]
|
||
}, options); // For spacing, TeX treats \hphantom as a math group (same spacing as ord).
|
||
|
||
return buildCommon.makeSpan(["mord"], [smashedNode], options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var node = new mathMLTree.MathNode("mpadded", [buildMathML_buildGroup(group.body, options)]);
|
||
|
||
if (group.smashHeight) {
|
||
node.setAttribute("height", "0px");
|
||
}
|
||
|
||
if (group.smashDepth) {
|
||
node.setAttribute("depth", "0px");
|
||
}
|
||
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/sqrt.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
defineFunction({
|
||
type: "sqrt",
|
||
names: ["\\sqrt"],
|
||
props: {
|
||
numArgs: 1,
|
||
numOptionalArgs: 1
|
||
},
|
||
handler: function handler(_ref, args, optArgs) {
|
||
var parser = _ref.parser;
|
||
var index = optArgs[0];
|
||
var body = args[0];
|
||
return {
|
||
type: "sqrt",
|
||
mode: parser.mode,
|
||
body: body,
|
||
index: index
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
// Square roots are handled in the TeXbook pg. 443, Rule 11.
|
||
// First, we do the same steps as in overline to build the inner group
|
||
// and line
|
||
var inner = buildHTML_buildGroup(group.body, options.havingCrampedStyle());
|
||
|
||
if (inner.height === 0) {
|
||
// Render a small surd.
|
||
inner.height = options.fontMetrics().xHeight;
|
||
} // Some groups can return document fragments. Handle those by wrapping
|
||
// them in a span.
|
||
|
||
|
||
inner = buildCommon.wrapFragment(inner, options); // Calculate the minimum size for the \surd delimiter
|
||
|
||
var metrics = options.fontMetrics();
|
||
var theta = metrics.defaultRuleThickness;
|
||
var phi = theta;
|
||
|
||
if (options.style.id < src_Style.TEXT.id) {
|
||
phi = options.fontMetrics().xHeight;
|
||
} // Calculate the clearance between the body and line
|
||
|
||
|
||
var lineClearance = theta + phi / 4;
|
||
var minDelimiterHeight = inner.height + inner.depth + lineClearance + theta; // Create a sqrt SVG of the required minimum size
|
||
|
||
var _delimiter$sqrtImage = delimiter.sqrtImage(minDelimiterHeight, options),
|
||
img = _delimiter$sqrtImage.span,
|
||
ruleWidth = _delimiter$sqrtImage.ruleWidth,
|
||
advanceWidth = _delimiter$sqrtImage.advanceWidth;
|
||
|
||
var delimDepth = img.height - ruleWidth; // Adjust the clearance based on the delimiter size
|
||
|
||
if (delimDepth > inner.height + inner.depth + lineClearance) {
|
||
lineClearance = (lineClearance + delimDepth - inner.height - inner.depth) / 2;
|
||
} // Shift the sqrt image
|
||
|
||
|
||
var imgShift = img.height - inner.height - lineClearance - ruleWidth;
|
||
inner.style.paddingLeft = advanceWidth + "em"; // Overlay the image and the argument.
|
||
|
||
var body = buildCommon.makeVList({
|
||
positionType: "firstBaseline",
|
||
children: [{
|
||
type: "elem",
|
||
elem: inner,
|
||
wrapperClasses: ["svg-align"]
|
||
}, {
|
||
type: "kern",
|
||
size: -(inner.height + imgShift)
|
||
}, {
|
||
type: "elem",
|
||
elem: img
|
||
}, {
|
||
type: "kern",
|
||
size: ruleWidth
|
||
}]
|
||
}, options);
|
||
|
||
if (!group.index) {
|
||
return buildCommon.makeSpan(["mord", "sqrt"], [body], options);
|
||
} else {
|
||
// Handle the optional root index
|
||
// The index is always in scriptscript style
|
||
var newOptions = options.havingStyle(src_Style.SCRIPTSCRIPT);
|
||
var rootm = buildHTML_buildGroup(group.index, newOptions, options); // The amount the index is shifted by. This is taken from the TeX
|
||
// source, in the definition of `\r@@t`.
|
||
|
||
var toShift = 0.6 * (body.height - body.depth); // Build a VList with the superscript shifted up correctly
|
||
|
||
var rootVList = buildCommon.makeVList({
|
||
positionType: "shift",
|
||
positionData: -toShift,
|
||
children: [{
|
||
type: "elem",
|
||
elem: rootm
|
||
}]
|
||
}, options); // Add a class surrounding it so we can add on the appropriate
|
||
// kerning
|
||
|
||
var rootVListWrap = buildCommon.makeSpan(["root"], [rootVList]);
|
||
return buildCommon.makeSpan(["mord", "sqrt"], [rootVListWrap, body], options);
|
||
}
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var body = group.body,
|
||
index = group.index;
|
||
return index ? new mathMLTree.MathNode("mroot", [buildMathML_buildGroup(body, options), buildMathML_buildGroup(index, options)]) : new mathMLTree.MathNode("msqrt", [buildMathML_buildGroup(body, options)]);
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/styling.js
|
||
|
||
|
||
|
||
|
||
|
||
var styling_styleMap = {
|
||
"display": src_Style.DISPLAY,
|
||
"text": src_Style.TEXT,
|
||
"script": src_Style.SCRIPT,
|
||
"scriptscript": src_Style.SCRIPTSCRIPT
|
||
};
|
||
defineFunction({
|
||
type: "styling",
|
||
names: ["\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle"],
|
||
props: {
|
||
numArgs: 0,
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var breakOnTokenText = _ref.breakOnTokenText,
|
||
funcName = _ref.funcName,
|
||
parser = _ref.parser;
|
||
// parse out the implicit body
|
||
var body = parser.parseExpression(true, breakOnTokenText); // TODO: Refactor to avoid duplicating styleMap in multiple places (e.g.
|
||
// here and in buildHTML and de-dupe the enumeration of all the styles).
|
||
// $FlowFixMe: The names above exactly match the styles.
|
||
|
||
var style = funcName.slice(1, funcName.length - 5);
|
||
return {
|
||
type: "styling",
|
||
mode: parser.mode,
|
||
// Figure out what style to use by pulling out the style from
|
||
// the function name
|
||
style: style,
|
||
body: body
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
// Style changes are handled in the TeXbook on pg. 442, Rule 3.
|
||
var newStyle = styling_styleMap[group.style];
|
||
var newOptions = options.havingStyle(newStyle).withFont('');
|
||
return sizingGroup(group.body, newOptions, options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
// Figure out what style we're changing to.
|
||
var newStyle = styling_styleMap[group.style];
|
||
var newOptions = options.havingStyle(newStyle);
|
||
var inner = buildMathML_buildExpression(group.body, newOptions);
|
||
var node = new mathMLTree.MathNode("mstyle", inner);
|
||
var styleAttributes = {
|
||
"display": ["0", "true"],
|
||
"text": ["0", "false"],
|
||
"script": ["1", "false"],
|
||
"scriptscript": ["2", "false"]
|
||
};
|
||
var attr = styleAttributes[group.style];
|
||
node.setAttribute("scriptlevel", attr[0]);
|
||
node.setAttribute("displaystyle", attr[1]);
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/supsub.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* Sometimes, groups perform special rules when they have superscripts or
|
||
* subscripts attached to them. This function lets the `supsub` group know that
|
||
* Sometimes, groups perform special rules when they have superscripts or
|
||
* its inner element should handle the superscripts and subscripts instead of
|
||
* handling them itself.
|
||
*/
|
||
var supsub_htmlBuilderDelegate = function htmlBuilderDelegate(group, options) {
|
||
var base = group.base;
|
||
|
||
if (!base) {
|
||
return null;
|
||
} else if (base.type === "op") {
|
||
// Operators handle supsubs differently when they have limits
|
||
// (e.g. `\displaystyle\sum_2^3`)
|
||
var delegate = base.limits && (options.style.size === src_Style.DISPLAY.size || base.alwaysHandleSupSub);
|
||
return delegate ? op_htmlBuilder : null;
|
||
} else if (base.type === "operatorname") {
|
||
var _delegate = base.alwaysHandleSupSub && (options.style.size === src_Style.DISPLAY.size || base.limits);
|
||
|
||
return _delegate ? operatorname_htmlBuilder : null;
|
||
} else if (base.type === "accent") {
|
||
return utils.isCharacterBox(base.base) ? accent_htmlBuilder : null;
|
||
} else if (base.type === "horizBrace") {
|
||
var isSup = !group.sub;
|
||
return isSup === base.isOver ? horizBrace_htmlBuilder : null;
|
||
} else {
|
||
return null;
|
||
}
|
||
}; // Super scripts and subscripts, whose precise placement can depend on other
|
||
// functions that precede them.
|
||
|
||
|
||
defineFunctionBuilders({
|
||
type: "supsub",
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
// Superscript and subscripts are handled in the TeXbook on page
|
||
// 445-446, rules 18(a-f).
|
||
// Here is where we defer to the inner group if it should handle
|
||
// superscripts and subscripts itself.
|
||
var builderDelegate = supsub_htmlBuilderDelegate(group, options);
|
||
|
||
if (builderDelegate) {
|
||
return builderDelegate(group, options);
|
||
}
|
||
|
||
var valueBase = group.base,
|
||
valueSup = group.sup,
|
||
valueSub = group.sub;
|
||
var base = buildHTML_buildGroup(valueBase, options);
|
||
var supm;
|
||
var subm;
|
||
var metrics = options.fontMetrics(); // Rule 18a
|
||
|
||
var supShift = 0;
|
||
var subShift = 0;
|
||
var isCharacterBox = valueBase && utils.isCharacterBox(valueBase);
|
||
|
||
if (valueSup) {
|
||
var newOptions = options.havingStyle(options.style.sup());
|
||
supm = buildHTML_buildGroup(valueSup, newOptions, options);
|
||
|
||
if (!isCharacterBox) {
|
||
supShift = base.height - newOptions.fontMetrics().supDrop * newOptions.sizeMultiplier / options.sizeMultiplier;
|
||
}
|
||
}
|
||
|
||
if (valueSub) {
|
||
var _newOptions = options.havingStyle(options.style.sub());
|
||
|
||
subm = buildHTML_buildGroup(valueSub, _newOptions, options);
|
||
|
||
if (!isCharacterBox) {
|
||
subShift = base.depth + _newOptions.fontMetrics().subDrop * _newOptions.sizeMultiplier / options.sizeMultiplier;
|
||
}
|
||
} // Rule 18c
|
||
|
||
|
||
var minSupShift;
|
||
|
||
if (options.style === src_Style.DISPLAY) {
|
||
minSupShift = metrics.sup1;
|
||
} else if (options.style.cramped) {
|
||
minSupShift = metrics.sup3;
|
||
} else {
|
||
minSupShift = metrics.sup2;
|
||
} // scriptspace is a font-size-independent size, so scale it
|
||
// appropriately for use as the marginRight.
|
||
|
||
|
||
var multiplier = options.sizeMultiplier;
|
||
var marginRight = 0.5 / metrics.ptPerEm / multiplier + "em";
|
||
var marginLeft = null;
|
||
|
||
if (subm) {
|
||
// Subscripts shouldn't be shifted by the base's italic correction.
|
||
// Account for that by shifting the subscript back the appropriate
|
||
// amount. Note we only do this when the base is a single symbol.
|
||
var isOiint = group.base && group.base.type === "op" && group.base.name && (group.base.name === "\\oiint" || group.base.name === "\\oiiint");
|
||
|
||
if (base instanceof domTree_SymbolNode || isOiint) {
|
||
// $FlowFixMe
|
||
marginLeft = -base.italic + "em";
|
||
}
|
||
}
|
||
|
||
var supsub;
|
||
|
||
if (supm && subm) {
|
||
supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight);
|
||
subShift = Math.max(subShift, metrics.sub2);
|
||
var ruleWidth = metrics.defaultRuleThickness; // Rule 18e
|
||
|
||
var maxWidth = 4 * ruleWidth;
|
||
|
||
if (supShift - supm.depth - (subm.height - subShift) < maxWidth) {
|
||
subShift = maxWidth - (supShift - supm.depth) + subm.height;
|
||
var psi = 0.8 * metrics.xHeight - (supShift - supm.depth);
|
||
|
||
if (psi > 0) {
|
||
supShift += psi;
|
||
subShift -= psi;
|
||
}
|
||
}
|
||
|
||
var vlistElem = [{
|
||
type: "elem",
|
||
elem: subm,
|
||
shift: subShift,
|
||
marginRight: marginRight,
|
||
marginLeft: marginLeft
|
||
}, {
|
||
type: "elem",
|
||
elem: supm,
|
||
shift: -supShift,
|
||
marginRight: marginRight
|
||
}];
|
||
supsub = buildCommon.makeVList({
|
||
positionType: "individualShift",
|
||
children: vlistElem
|
||
}, options);
|
||
} else if (subm) {
|
||
// Rule 18b
|
||
subShift = Math.max(subShift, metrics.sub1, subm.height - 0.8 * metrics.xHeight);
|
||
var _vlistElem = [{
|
||
type: "elem",
|
||
elem: subm,
|
||
marginLeft: marginLeft,
|
||
marginRight: marginRight
|
||
}];
|
||
supsub = buildCommon.makeVList({
|
||
positionType: "shift",
|
||
positionData: subShift,
|
||
children: _vlistElem
|
||
}, options);
|
||
} else if (supm) {
|
||
// Rule 18c, d
|
||
supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight);
|
||
supsub = buildCommon.makeVList({
|
||
positionType: "shift",
|
||
positionData: -supShift,
|
||
children: [{
|
||
type: "elem",
|
||
elem: supm,
|
||
marginRight: marginRight
|
||
}]
|
||
}, options);
|
||
} else {
|
||
throw new Error("supsub must have either sup or sub.");
|
||
} // Wrap the supsub vlist in a span.msupsub to reset text-align.
|
||
|
||
|
||
var mclass = getTypeOfDomTree(base, "right") || "mord";
|
||
return buildCommon.makeSpan([mclass], [base, buildCommon.makeSpan(["msupsub"], [supsub])], options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
// Is the inner group a relevant horizonal brace?
|
||
var isBrace = false;
|
||
var isOver;
|
||
var isSup;
|
||
var horizBrace = checkNodeType(group.base, "horizBrace");
|
||
|
||
if (horizBrace) {
|
||
isSup = !!group.sup;
|
||
|
||
if (isSup === horizBrace.isOver) {
|
||
isBrace = true;
|
||
isOver = horizBrace.isOver;
|
||
}
|
||
}
|
||
|
||
if (group.base && (group.base.type === "op" || group.base.type === "operatorname")) {
|
||
group.base.parentIsSupSub = true;
|
||
}
|
||
|
||
var children = [buildMathML_buildGroup(group.base, options)];
|
||
|
||
if (group.sub) {
|
||
children.push(buildMathML_buildGroup(group.sub, options));
|
||
}
|
||
|
||
if (group.sup) {
|
||
children.push(buildMathML_buildGroup(group.sup, options));
|
||
}
|
||
|
||
var nodeType;
|
||
|
||
if (isBrace) {
|
||
nodeType = isOver ? "mover" : "munder";
|
||
} else if (!group.sub) {
|
||
var base = group.base;
|
||
|
||
if (base && base.type === "op" && base.limits && (options.style === src_Style.DISPLAY || base.alwaysHandleSupSub)) {
|
||
nodeType = "mover";
|
||
} else if (base && base.type === "operatorname" && base.alwaysHandleSupSub && (base.limits || options.style === src_Style.DISPLAY)) {
|
||
nodeType = "mover";
|
||
} else {
|
||
nodeType = "msup";
|
||
}
|
||
} else if (!group.sup) {
|
||
var _base = group.base;
|
||
|
||
if (_base && _base.type === "op" && _base.limits && (options.style === src_Style.DISPLAY || _base.alwaysHandleSupSub)) {
|
||
nodeType = "munder";
|
||
} else if (_base && _base.type === "operatorname" && _base.alwaysHandleSupSub && (_base.limits || options.style === src_Style.DISPLAY)) {
|
||
nodeType = "munder";
|
||
} else {
|
||
nodeType = "msub";
|
||
}
|
||
} else {
|
||
var _base2 = group.base;
|
||
|
||
if (_base2 && _base2.type === "op" && _base2.limits && options.style === src_Style.DISPLAY) {
|
||
nodeType = "munderover";
|
||
} else if (_base2 && _base2.type === "operatorname" && _base2.alwaysHandleSupSub && (options.style === src_Style.DISPLAY || _base2.limits)) {
|
||
nodeType = "munderover";
|
||
} else {
|
||
nodeType = "msubsup";
|
||
}
|
||
}
|
||
|
||
var node = new mathMLTree.MathNode(nodeType, children);
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/symbolsOp.js
|
||
|
||
|
||
|
||
// Operator ParseNodes created in Parser.js from symbol Groups in src/symbols.js.
|
||
|
||
defineFunctionBuilders({
|
||
type: "atom",
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
return buildCommon.mathsym(group.text, group.mode, options, ["m" + group.family]);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var node = new mathMLTree.MathNode("mo", [buildMathML_makeText(group.text, group.mode)]);
|
||
|
||
if (group.family === "bin") {
|
||
var variant = buildMathML_getVariant(group, options);
|
||
|
||
if (variant === "bold-italic") {
|
||
node.setAttribute("mathvariant", variant);
|
||
}
|
||
} else if (group.family === "punct") {
|
||
node.setAttribute("separator", "true");
|
||
} else if (group.family === "open" || group.family === "close") {
|
||
// Delims built here should not stretch vertically.
|
||
// See delimsizing.js for stretchy delims.
|
||
node.setAttribute("stretchy", "false");
|
||
}
|
||
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/symbolsOrd.js
|
||
|
||
|
||
|
||
|
||
// "mathord" and "textord" ParseNodes created in Parser.js from symbol Groups in
|
||
var defaultVariant = {
|
||
"mi": "italic",
|
||
"mn": "normal",
|
||
"mtext": "normal"
|
||
};
|
||
defineFunctionBuilders({
|
||
type: "mathord",
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
return buildCommon.makeOrd(group, options, "mathord");
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var node = new mathMLTree.MathNode("mi", [buildMathML_makeText(group.text, group.mode, options)]);
|
||
var variant = buildMathML_getVariant(group, options) || "italic";
|
||
|
||
if (variant !== defaultVariant[node.type]) {
|
||
node.setAttribute("mathvariant", variant);
|
||
}
|
||
|
||
return node;
|
||
}
|
||
});
|
||
defineFunctionBuilders({
|
||
type: "textord",
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
return buildCommon.makeOrd(group, options, "textord");
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var text = buildMathML_makeText(group.text, group.mode, options);
|
||
var variant = buildMathML_getVariant(group, options) || "normal";
|
||
var node;
|
||
|
||
if (group.mode === 'text') {
|
||
node = new mathMLTree.MathNode("mtext", [text]);
|
||
} else if (/[0-9]/.test(group.text)) {
|
||
// TODO(kevinb) merge adjacent <mn> nodes
|
||
// do it as a post processing step
|
||
node = new mathMLTree.MathNode("mn", [text]);
|
||
} else if (group.text === "\\prime") {
|
||
node = new mathMLTree.MathNode("mo", [text]);
|
||
} else {
|
||
node = new mathMLTree.MathNode("mi", [text]);
|
||
}
|
||
|
||
if (variant !== defaultVariant[node.type]) {
|
||
node.setAttribute("mathvariant", variant);
|
||
}
|
||
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/symbolsSpacing.js
|
||
|
||
|
||
|
||
// A map of CSS-based spacing functions to their CSS class.
|
||
|
||
var cssSpace = {
|
||
"\\nobreak": "nobreak",
|
||
"\\allowbreak": "allowbreak"
|
||
}; // A lookup table to determine whether a spacing function/symbol should be
|
||
// treated like a regular space character. If a symbol or command is a key
|
||
// in this table, then it should be a regular space character. Furthermore,
|
||
// the associated value may have a `className` specifying an extra CSS class
|
||
// to add to the created `span`.
|
||
|
||
var regularSpace = {
|
||
" ": {},
|
||
"\\ ": {},
|
||
"~": {
|
||
className: "nobreak"
|
||
},
|
||
"\\space": {},
|
||
"\\nobreakspace": {
|
||
className: "nobreak"
|
||
}
|
||
}; // ParseNode<"spacing"> created in Parser.js from the "spacing" symbol Groups in
|
||
// src/symbols.js.
|
||
|
||
defineFunctionBuilders({
|
||
type: "spacing",
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
if (regularSpace.hasOwnProperty(group.text)) {
|
||
var className = regularSpace[group.text].className || ""; // Spaces are generated by adding an actual space. Each of these
|
||
// things has an entry in the symbols table, so these will be turned
|
||
// into appropriate outputs.
|
||
|
||
if (group.mode === "text") {
|
||
var ord = buildCommon.makeOrd(group, options, "textord");
|
||
ord.classes.push(className);
|
||
return ord;
|
||
} else {
|
||
return buildCommon.makeSpan(["mspace", className], [buildCommon.mathsym(group.text, group.mode, options)], options);
|
||
}
|
||
} else if (cssSpace.hasOwnProperty(group.text)) {
|
||
// Spaces based on just a CSS class.
|
||
return buildCommon.makeSpan(["mspace", cssSpace[group.text]], [], options);
|
||
} else {
|
||
throw new src_ParseError("Unknown type of space \"" + group.text + "\"");
|
||
}
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var node;
|
||
|
||
if (regularSpace.hasOwnProperty(group.text)) {
|
||
node = new mathMLTree.MathNode("mtext", [new mathMLTree.TextNode("\xA0")]);
|
||
} else if (cssSpace.hasOwnProperty(group.text)) {
|
||
// CSS-based MathML spaces (\nobreak, \allowbreak) are ignored
|
||
return new mathMLTree.MathNode("mspace");
|
||
} else {
|
||
throw new src_ParseError("Unknown type of space \"" + group.text + "\"");
|
||
}
|
||
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/tag.js
|
||
|
||
|
||
|
||
|
||
var tag_pad = function pad() {
|
||
var padNode = new mathMLTree.MathNode("mtd", []);
|
||
padNode.setAttribute("width", "50%");
|
||
return padNode;
|
||
};
|
||
|
||
defineFunctionBuilders({
|
||
type: "tag",
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var table = new mathMLTree.MathNode("mtable", [new mathMLTree.MathNode("mtr", [tag_pad(), new mathMLTree.MathNode("mtd", [buildExpressionRow(group.body, options)]), tag_pad(), new mathMLTree.MathNode("mtd", [buildExpressionRow(group.tag, options)])])]);
|
||
table.setAttribute("width", "100%");
|
||
return table; // TODO: Left-aligned tags.
|
||
// Currently, the group and options passed here do not contain
|
||
// enough info to set tag alignment. `leqno` is in Settings but it is
|
||
// not passed to Options. On the HTML side, leqno is
|
||
// set by a CSS class applied in buildTree.js. That would have worked
|
||
// in MathML if browsers supported <mlabeledtr>. Since they don't, we
|
||
// need to rewrite the way this function is called.
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/text.js
|
||
|
||
|
||
|
||
// Non-mathy text, possibly in a font
|
||
|
||
var textFontFamilies = {
|
||
"\\text": undefined,
|
||
"\\textrm": "textrm",
|
||
"\\textsf": "textsf",
|
||
"\\texttt": "texttt",
|
||
"\\textnormal": "textrm"
|
||
};
|
||
var textFontWeights = {
|
||
"\\textbf": "textbf",
|
||
"\\textmd": "textmd"
|
||
};
|
||
var textFontShapes = {
|
||
"\\textit": "textit",
|
||
"\\textup": "textup"
|
||
};
|
||
|
||
var optionsWithFont = function optionsWithFont(group, options) {
|
||
var font = group.font; // Checks if the argument is a font family or a font style.
|
||
|
||
if (!font) {
|
||
return options;
|
||
} else if (textFontFamilies[font]) {
|
||
return options.withTextFontFamily(textFontFamilies[font]);
|
||
} else if (textFontWeights[font]) {
|
||
return options.withTextFontWeight(textFontWeights[font]);
|
||
} else {
|
||
return options.withTextFontShape(textFontShapes[font]);
|
||
}
|
||
};
|
||
|
||
defineFunction({
|
||
type: "text",
|
||
names: [// Font families
|
||
"\\text", "\\textrm", "\\textsf", "\\texttt", "\\textnormal", // Font weights
|
||
"\\textbf", "\\textmd", // Font Shapes
|
||
"\\textit", "\\textup"],
|
||
props: {
|
||
numArgs: 1,
|
||
argTypes: ["text"],
|
||
greediness: 2,
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser,
|
||
funcName = _ref.funcName;
|
||
var body = args[0];
|
||
return {
|
||
type: "text",
|
||
mode: parser.mode,
|
||
body: defineFunction_ordargument(body),
|
||
font: funcName
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
var newOptions = optionsWithFont(group, options);
|
||
var inner = buildHTML_buildExpression(group.body, newOptions, true);
|
||
return buildCommon.makeSpan(["mord", "text"], buildCommon.tryCombineChars(inner), newOptions);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var newOptions = optionsWithFont(group, options);
|
||
return buildExpressionRow(group.body, newOptions);
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/underline.js
|
||
|
||
|
||
|
||
|
||
|
||
defineFunction({
|
||
type: "underline",
|
||
names: ["\\underline"],
|
||
props: {
|
||
numArgs: 1,
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(_ref, args) {
|
||
var parser = _ref.parser;
|
||
return {
|
||
type: "underline",
|
||
mode: parser.mode,
|
||
body: args[0]
|
||
};
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
// Underlines are handled in the TeXbook pg 443, Rule 10.
|
||
// Build the inner group.
|
||
var innerGroup = buildHTML_buildGroup(group.body, options); // Create the line to go below the body
|
||
|
||
var line = buildCommon.makeLineSpan("underline-line", options); // Generate the vlist, with the appropriate kerns
|
||
|
||
var defaultRuleThickness = options.fontMetrics().defaultRuleThickness;
|
||
var vlist = buildCommon.makeVList({
|
||
positionType: "top",
|
||
positionData: innerGroup.height,
|
||
children: [{
|
||
type: "kern",
|
||
size: defaultRuleThickness
|
||
}, {
|
||
type: "elem",
|
||
elem: line
|
||
}, {
|
||
type: "kern",
|
||
size: 3 * defaultRuleThickness
|
||
}, {
|
||
type: "elem",
|
||
elem: innerGroup
|
||
}]
|
||
}, options);
|
||
return buildCommon.makeSpan(["mord", "underline"], [vlist], options);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var operator = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode("\u203E")]);
|
||
operator.setAttribute("stretchy", "true");
|
||
var node = new mathMLTree.MathNode("munder", [buildMathML_buildGroup(group.body, options), operator]);
|
||
node.setAttribute("accentunder", "true");
|
||
return node;
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/functions/verb.js
|
||
|
||
|
||
|
||
|
||
defineFunction({
|
||
type: "verb",
|
||
names: ["\\verb"],
|
||
props: {
|
||
numArgs: 0,
|
||
allowedInText: true
|
||
},
|
||
handler: function handler(context, args, optArgs) {
|
||
// \verb and \verb* are dealt with directly in Parser.js.
|
||
// If we end up here, it's because of a failure to match the two delimiters
|
||
// in the regex in Lexer.js. LaTeX raises the following error when \verb is
|
||
// terminated by end of line (or file).
|
||
throw new src_ParseError("\\verb ended by end of line instead of matching delimiter");
|
||
},
|
||
htmlBuilder: function htmlBuilder(group, options) {
|
||
var text = makeVerb(group);
|
||
var body = []; // \verb enters text mode and therefore is sized like \textstyle
|
||
|
||
var newOptions = options.havingStyle(options.style.text());
|
||
|
||
for (var i = 0; i < text.length; i++) {
|
||
var c = text[i];
|
||
|
||
if (c === '~') {
|
||
c = '\\textasciitilde';
|
||
}
|
||
|
||
body.push(buildCommon.makeSymbol(c, "Typewriter-Regular", group.mode, newOptions, ["mord", "texttt"]));
|
||
}
|
||
|
||
return buildCommon.makeSpan(["mord", "text"].concat(newOptions.sizingClasses(options)), buildCommon.tryCombineChars(body), newOptions);
|
||
},
|
||
mathmlBuilder: function mathmlBuilder(group, options) {
|
||
var text = new mathMLTree.TextNode(makeVerb(group));
|
||
var node = new mathMLTree.MathNode("mtext", [text]);
|
||
node.setAttribute("mathvariant", "monospace");
|
||
return node;
|
||
}
|
||
});
|
||
/**
|
||
* Converts verb group into body string.
|
||
*
|
||
* \verb* replaces each space with an open box \u2423
|
||
* \verb replaces each space with a no-break space \xA0
|
||
*/
|
||
|
||
var makeVerb = function makeVerb(group) {
|
||
return group.body.replace(/ /g, group.star ? "\u2423" : '\xA0');
|
||
};
|
||
// CONCATENATED MODULE: ./src/functions.js
|
||
/** Include this to ensure that all functions are defined. */
|
||
|
||
var functions = _functions;
|
||
/* harmony default export */ var src_functions = (functions); // TODO(kevinb): have functions return an object and call defineFunction with
|
||
// that object in this file instead of relying on side-effects.
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// CONCATENATED MODULE: ./src/Lexer.js
|
||
/**
|
||
* The Lexer class handles tokenizing the input in various ways. Since our
|
||
* parser expects us to be able to backtrack, the lexer allows lexing from any
|
||
* given starting point.
|
||
*
|
||
* Its main exposed function is the `lex` function, which takes a position to
|
||
* lex from and a type of token to lex. It defers to the appropriate `_innerLex`
|
||
* function.
|
||
*
|
||
* The various `_innerLex` functions perform the actual lexing of different
|
||
* kinds.
|
||
*/
|
||
|
||
|
||
|
||
|
||
/* The following tokenRegex
|
||
* - matches typical whitespace (but not NBSP etc.) using its first group
|
||
* - does not match any control character \x00-\x1f except whitespace
|
||
* - does not match a bare backslash
|
||
* - matches any ASCII character except those just mentioned
|
||
* - does not match the BMP private use area \uE000-\uF8FF
|
||
* - does not match bare surrogate code units
|
||
* - matches any BMP character except for those just described
|
||
* - matches any valid Unicode surrogate pair
|
||
* - matches a backslash followed by one or more letters
|
||
* - matches a backslash followed by any BMP character, including newline
|
||
* Just because the Lexer matches something doesn't mean it's valid input:
|
||
* If there is no matching function or symbol definition, the Parser will
|
||
* still reject the input.
|
||
*/
|
||
var spaceRegexString = "[ \r\n\t]";
|
||
var controlWordRegexString = "\\\\[a-zA-Z@]+";
|
||
var controlSymbolRegexString = "\\\\[^\uD800-\uDFFF]";
|
||
var controlWordWhitespaceRegexString = "" + controlWordRegexString + spaceRegexString + "*";
|
||
var controlWordWhitespaceRegex = new RegExp("^(" + controlWordRegexString + ")" + spaceRegexString + "*$");
|
||
var combiningDiacriticalMarkString = "[\u0300-\u036F]";
|
||
var combiningDiacriticalMarksEndRegex = new RegExp(combiningDiacriticalMarkString + "+$");
|
||
var tokenRegexString = "(" + spaceRegexString + "+)|" + // whitespace
|
||
"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]" + ( // single codepoint
|
||
combiningDiacriticalMarkString + "*") + // ...plus accents
|
||
"|[\uD800-\uDBFF][\uDC00-\uDFFF]" + ( // surrogate pair
|
||
combiningDiacriticalMarkString + "*") + // ...plus accents
|
||
"|\\\\verb\\*([^]).*?\\3" + // \verb*
|
||
"|\\\\verb([^*a-zA-Z]).*?\\4" + // \verb unstarred
|
||
"|\\\\operatorname\\*" + ( // \operatorname*
|
||
"|" + controlWordWhitespaceRegexString) + ( // \macroName + spaces
|
||
"|" + controlSymbolRegexString + ")"); // \\, \', etc.
|
||
|
||
/** Main Lexer class */
|
||
|
||
var Lexer_Lexer =
|
||
/*#__PURE__*/
|
||
function () {
|
||
// category codes, only supports comment characters (14) for now
|
||
function Lexer(input, settings) {
|
||
this.input = void 0;
|
||
this.settings = void 0;
|
||
this.tokenRegex = void 0;
|
||
this.catcodes = void 0;
|
||
// Separate accents from characters
|
||
this.input = input;
|
||
this.settings = settings;
|
||
this.tokenRegex = new RegExp(tokenRegexString, 'g');
|
||
this.catcodes = {
|
||
"%": 14 // comment character
|
||
|
||
};
|
||
}
|
||
|
||
var _proto = Lexer.prototype;
|
||
|
||
_proto.setCatcode = function setCatcode(char, code) {
|
||
this.catcodes[char] = code;
|
||
}
|
||
/**
|
||
* This function lexes a single token.
|
||
*/
|
||
;
|
||
|
||
_proto.lex = function lex() {
|
||
var input = this.input;
|
||
var pos = this.tokenRegex.lastIndex;
|
||
|
||
if (pos === input.length) {
|
||
return new Token_Token("EOF", new SourceLocation(this, pos, pos));
|
||
}
|
||
|
||
var match = this.tokenRegex.exec(input);
|
||
|
||
if (match === null || match.index !== pos) {
|
||
throw new src_ParseError("Unexpected character: '" + input[pos] + "'", new Token_Token(input[pos], new SourceLocation(this, pos, pos + 1)));
|
||
}
|
||
|
||
var text = match[2] || " ";
|
||
|
||
if (this.catcodes[text] === 14) {
|
||
// comment character
|
||
var nlIndex = input.indexOf('\n', this.tokenRegex.lastIndex);
|
||
|
||
if (nlIndex === -1) {
|
||
this.tokenRegex.lastIndex = input.length; // EOF
|
||
|
||
this.settings.reportNonstrict("commentAtEnd", "% comment has no terminating newline; LaTeX would " + "fail because of commenting the end of math mode (e.g. $)");
|
||
} else {
|
||
this.tokenRegex.lastIndex = nlIndex + 1;
|
||
}
|
||
|
||
return this.lex();
|
||
} // Trim any trailing whitespace from control word match
|
||
|
||
|
||
var controlMatch = text.match(controlWordWhitespaceRegex);
|
||
|
||
if (controlMatch) {
|
||
text = controlMatch[1];
|
||
}
|
||
|
||
return new Token_Token(text, new SourceLocation(this, pos, this.tokenRegex.lastIndex));
|
||
};
|
||
|
||
return Lexer;
|
||
}();
|
||
|
||
|
||
// CONCATENATED MODULE: ./src/Namespace.js
|
||
/**
|
||
* A `Namespace` refers to a space of nameable things like macros or lengths,
|
||
* which can be `set` either globally or local to a nested group, using an
|
||
* undo stack similar to how TeX implements this functionality.
|
||
* Performance-wise, `get` and local `set` take constant time, while global
|
||
* `set` takes time proportional to the depth of group nesting.
|
||
*/
|
||
|
||
|
||
var Namespace_Namespace =
|
||
/*#__PURE__*/
|
||
function () {
|
||
/**
|
||
* Both arguments are optional. The first argument is an object of
|
||
* built-in mappings which never change. The second argument is an object
|
||
* of initial (global-level) mappings, which will constantly change
|
||
* according to any global/top-level `set`s done.
|
||
*/
|
||
function Namespace(builtins, globalMacros) {
|
||
if (builtins === void 0) {
|
||
builtins = {};
|
||
}
|
||
|
||
if (globalMacros === void 0) {
|
||
globalMacros = {};
|
||
}
|
||
|
||
this.current = void 0;
|
||
this.builtins = void 0;
|
||
this.undefStack = void 0;
|
||
this.current = globalMacros;
|
||
this.builtins = builtins;
|
||
this.undefStack = [];
|
||
}
|
||
/**
|
||
* Start a new nested group, affecting future local `set`s.
|
||
*/
|
||
|
||
|
||
var _proto = Namespace.prototype;
|
||
|
||
_proto.beginGroup = function beginGroup() {
|
||
this.undefStack.push({});
|
||
}
|
||
/**
|
||
* End current nested group, restoring values before the group began.
|
||
*/
|
||
;
|
||
|
||
_proto.endGroup = function endGroup() {
|
||
if (this.undefStack.length === 0) {
|
||
throw new src_ParseError("Unbalanced namespace destruction: attempt " + "to pop global namespace; please report this as a bug");
|
||
}
|
||
|
||
var undefs = this.undefStack.pop();
|
||
|
||
for (var undef in undefs) {
|
||
if (undefs.hasOwnProperty(undef)) {
|
||
if (undefs[undef] === undefined) {
|
||
delete this.current[undef];
|
||
} else {
|
||
this.current[undef] = undefs[undef];
|
||
}
|
||
}
|
||
}
|
||
}
|
||
/**
|
||
* Detect whether `name` has a definition. Equivalent to
|
||
* `get(name) != null`.
|
||
*/
|
||
;
|
||
|
||
_proto.has = function has(name) {
|
||
return this.current.hasOwnProperty(name) || this.builtins.hasOwnProperty(name);
|
||
}
|
||
/**
|
||
* Get the current value of a name, or `undefined` if there is no value.
|
||
*
|
||
* Note: Do not use `if (namespace.get(...))` to detect whether a macro
|
||
* is defined, as the definition may be the empty string which evaluates
|
||
* to `false` in JavaScript. Use `if (namespace.get(...) != null)` or
|
||
* `if (namespace.has(...))`.
|
||
*/
|
||
;
|
||
|
||
_proto.get = function get(name) {
|
||
if (this.current.hasOwnProperty(name)) {
|
||
return this.current[name];
|
||
} else {
|
||
return this.builtins[name];
|
||
}
|
||
}
|
||
/**
|
||
* Set the current value of a name, and optionally set it globally too.
|
||
* Local set() sets the current value and (when appropriate) adds an undo
|
||
* operation to the undo stack. Global set() may change the undo
|
||
* operation at every level, so takes time linear in their number.
|
||
*/
|
||
;
|
||
|
||
_proto.set = function set(name, value, global) {
|
||
if (global === void 0) {
|
||
global = false;
|
||
}
|
||
|
||
if (global) {
|
||
// Global set is equivalent to setting in all groups. Simulate this
|
||
// by destroying any undos currently scheduled for this name,
|
||
// and adding an undo with the *new* value (in case it later gets
|
||
// locally reset within this environment).
|
||
for (var i = 0; i < this.undefStack.length; i++) {
|
||
delete this.undefStack[i][name];
|
||
}
|
||
|
||
if (this.undefStack.length > 0) {
|
||
this.undefStack[this.undefStack.length - 1][name] = value;
|
||
}
|
||
} else {
|
||
// Undo this set at end of this group (possibly to `undefined`),
|
||
// unless an undo is already in place, in which case that older
|
||
// value is the correct one.
|
||
var top = this.undefStack[this.undefStack.length - 1];
|
||
|
||
if (top && !top.hasOwnProperty(name)) {
|
||
top[name] = this.current[name];
|
||
}
|
||
}
|
||
|
||
this.current[name] = value;
|
||
};
|
||
|
||
return Namespace;
|
||
}();
|
||
|
||
|
||
// CONCATENATED MODULE: ./src/macros.js
|
||
/**
|
||
* Predefined macros for KaTeX.
|
||
* This can be used to define some commands in terms of others.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
var builtinMacros = {};
|
||
/* harmony default export */ var macros = (builtinMacros); // This function might one day accept an additional argument and do more things.
|
||
|
||
function defineMacro(name, body) {
|
||
builtinMacros[name] = body;
|
||
} //////////////////////////////////////////////////////////////////////
|
||
// macro tools
|
||
// LaTeX's \@firstoftwo{#1}{#2} expands to #1, skipping #2
|
||
// TeX source: \long\def\@firstoftwo#1#2{#1}
|
||
|
||
defineMacro("\\@firstoftwo", function (context) {
|
||
var args = context.consumeArgs(2);
|
||
return {
|
||
tokens: args[0],
|
||
numArgs: 0
|
||
};
|
||
}); // LaTeX's \@secondoftwo{#1}{#2} expands to #2, skipping #1
|
||
// TeX source: \long\def\@secondoftwo#1#2{#2}
|
||
|
||
defineMacro("\\@secondoftwo", function (context) {
|
||
var args = context.consumeArgs(2);
|
||
return {
|
||
tokens: args[1],
|
||
numArgs: 0
|
||
};
|
||
}); // LaTeX's \@ifnextchar{#1}{#2}{#3} looks ahead to the next (unexpanded)
|
||
// symbol. If it matches #1, then the macro expands to #2; otherwise, #3.
|
||
// Note, however, that it does not consume the next symbol in either case.
|
||
|
||
defineMacro("\\@ifnextchar", function (context) {
|
||
var args = context.consumeArgs(3); // symbol, if, else
|
||
|
||
var nextToken = context.future();
|
||
|
||
if (args[0].length === 1 && args[0][0].text === nextToken.text) {
|
||
return {
|
||
tokens: args[1],
|
||
numArgs: 0
|
||
};
|
||
} else {
|
||
return {
|
||
tokens: args[2],
|
||
numArgs: 0
|
||
};
|
||
}
|
||
}); // LaTeX's \@ifstar{#1}{#2} looks ahead to the next (unexpanded) symbol.
|
||
// If it is `*`, then it consumes the symbol, and the macro expands to #1;
|
||
// otherwise, the macro expands to #2 (without consuming the symbol).
|
||
// TeX source: \def\@ifstar#1{\@ifnextchar *{\@firstoftwo{#1}}}
|
||
|
||
defineMacro("\\@ifstar", "\\@ifnextchar *{\\@firstoftwo{#1}}"); // LaTeX's \TextOrMath{#1}{#2} expands to #1 in text mode, #2 in math mode
|
||
|
||
defineMacro("\\TextOrMath", function (context) {
|
||
var args = context.consumeArgs(2);
|
||
|
||
if (context.mode === 'text') {
|
||
return {
|
||
tokens: args[0],
|
||
numArgs: 0
|
||
};
|
||
} else {
|
||
return {
|
||
tokens: args[1],
|
||
numArgs: 0
|
||
};
|
||
}
|
||
}); // Lookup table for parsing numbers in base 8 through 16
|
||
|
||
var digitToNumber = {
|
||
"0": 0,
|
||
"1": 1,
|
||
"2": 2,
|
||
"3": 3,
|
||
"4": 4,
|
||
"5": 5,
|
||
"6": 6,
|
||
"7": 7,
|
||
"8": 8,
|
||
"9": 9,
|
||
"a": 10,
|
||
"A": 10,
|
||
"b": 11,
|
||
"B": 11,
|
||
"c": 12,
|
||
"C": 12,
|
||
"d": 13,
|
||
"D": 13,
|
||
"e": 14,
|
||
"E": 14,
|
||
"f": 15,
|
||
"F": 15
|
||
}; // TeX \char makes a literal character (catcode 12) using the following forms:
|
||
// (see The TeXBook, p. 43)
|
||
// \char123 -- decimal
|
||
// \char'123 -- octal
|
||
// \char"123 -- hex
|
||
// \char`x -- character that can be written (i.e. isn't active)
|
||
// \char`\x -- character that cannot be written (e.g. %)
|
||
// These all refer to characters from the font, so we turn them into special
|
||
// calls to a function \@char dealt with in the Parser.
|
||
|
||
defineMacro("\\char", function (context) {
|
||
var token = context.popToken();
|
||
var base;
|
||
var number = '';
|
||
|
||
if (token.text === "'") {
|
||
base = 8;
|
||
token = context.popToken();
|
||
} else if (token.text === '"') {
|
||
base = 16;
|
||
token = context.popToken();
|
||
} else if (token.text === "`") {
|
||
token = context.popToken();
|
||
|
||
if (token.text[0] === "\\") {
|
||
number = token.text.charCodeAt(1);
|
||
} else if (token.text === "EOF") {
|
||
throw new src_ParseError("\\char` missing argument");
|
||
} else {
|
||
number = token.text.charCodeAt(0);
|
||
}
|
||
} else {
|
||
base = 10;
|
||
}
|
||
|
||
if (base) {
|
||
// Parse a number in the given base, starting with first `token`.
|
||
number = digitToNumber[token.text];
|
||
|
||
if (number == null || number >= base) {
|
||
throw new src_ParseError("Invalid base-" + base + " digit " + token.text);
|
||
}
|
||
|
||
var digit;
|
||
|
||
while ((digit = digitToNumber[context.future().text]) != null && digit < base) {
|
||
number *= base;
|
||
number += digit;
|
||
context.popToken();
|
||
}
|
||
}
|
||
|
||
return "\\@char{" + number + "}";
|
||
}); // Basic support for macro definitions:
|
||
// \def\macro{expansion}
|
||
// \def\macro#1{expansion}
|
||
// \def\macro#1#2{expansion}
|
||
// \def\macro#1#2#3#4#5#6#7#8#9{expansion}
|
||
// Also the \gdef and \global\def equivalents
|
||
|
||
var macros_def = function def(context, global) {
|
||
var arg = context.consumeArgs(1)[0];
|
||
|
||
if (arg.length !== 1) {
|
||
throw new src_ParseError("\\gdef's first argument must be a macro name");
|
||
}
|
||
|
||
var name = arg[0].text; // Count argument specifiers, and check they are in the order #1 #2 ...
|
||
|
||
var numArgs = 0;
|
||
arg = context.consumeArgs(1)[0];
|
||
|
||
while (arg.length === 1 && arg[0].text === "#") {
|
||
arg = context.consumeArgs(1)[0];
|
||
|
||
if (arg.length !== 1) {
|
||
throw new src_ParseError("Invalid argument number length \"" + arg.length + "\"");
|
||
}
|
||
|
||
if (!/^[1-9]$/.test(arg[0].text)) {
|
||
throw new src_ParseError("Invalid argument number \"" + arg[0].text + "\"");
|
||
}
|
||
|
||
numArgs++;
|
||
|
||
if (parseInt(arg[0].text) !== numArgs) {
|
||
throw new src_ParseError("Argument number \"" + arg[0].text + "\" out of order");
|
||
}
|
||
|
||
arg = context.consumeArgs(1)[0];
|
||
} // Final arg is the expansion of the macro
|
||
|
||
|
||
context.macros.set(name, {
|
||
tokens: arg,
|
||
numArgs: numArgs
|
||
}, global);
|
||
return '';
|
||
};
|
||
|
||
defineMacro("\\gdef", function (context) {
|
||
return macros_def(context, true);
|
||
});
|
||
defineMacro("\\def", function (context) {
|
||
return macros_def(context, false);
|
||
});
|
||
defineMacro("\\global", function (context) {
|
||
var next = context.consumeArgs(1)[0];
|
||
|
||
if (next.length !== 1) {
|
||
throw new src_ParseError("Invalid command after \\global");
|
||
}
|
||
|
||
var command = next[0].text; // TODO: Should expand command
|
||
|
||
if (command === "\\def") {
|
||
// \global\def is equivalent to \gdef
|
||
return macros_def(context, true);
|
||
} else {
|
||
throw new src_ParseError("Invalid command '" + command + "' after \\global");
|
||
}
|
||
}); // \newcommand{\macro}[args]{definition}
|
||
// \renewcommand{\macro}[args]{definition}
|
||
// TODO: Optional arguments: \newcommand{\macro}[args][default]{definition}
|
||
|
||
var macros_newcommand = function newcommand(context, existsOK, nonexistsOK) {
|
||
var arg = context.consumeArgs(1)[0];
|
||
|
||
if (arg.length !== 1) {
|
||
throw new src_ParseError("\\newcommand's first argument must be a macro name");
|
||
}
|
||
|
||
var name = arg[0].text;
|
||
var exists = context.isDefined(name);
|
||
|
||
if (exists && !existsOK) {
|
||
throw new src_ParseError("\\newcommand{" + name + "} attempting to redefine " + (name + "; use \\renewcommand"));
|
||
}
|
||
|
||
if (!exists && !nonexistsOK) {
|
||
throw new src_ParseError("\\renewcommand{" + name + "} when command " + name + " " + "does not yet exist; use \\newcommand");
|
||
}
|
||
|
||
var numArgs = 0;
|
||
arg = context.consumeArgs(1)[0];
|
||
|
||
if (arg.length === 1 && arg[0].text === "[") {
|
||
var argText = '';
|
||
var token = context.expandNextToken();
|
||
|
||
while (token.text !== "]" && token.text !== "EOF") {
|
||
// TODO: Should properly expand arg, e.g., ignore {}s
|
||
argText += token.text;
|
||
token = context.expandNextToken();
|
||
}
|
||
|
||
if (!argText.match(/^\s*[0-9]+\s*$/)) {
|
||
throw new src_ParseError("Invalid number of arguments: " + argText);
|
||
}
|
||
|
||
numArgs = parseInt(argText);
|
||
arg = context.consumeArgs(1)[0];
|
||
} // Final arg is the expansion of the macro
|
||
|
||
|
||
context.macros.set(name, {
|
||
tokens: arg,
|
||
numArgs: numArgs
|
||
});
|
||
return '';
|
||
};
|
||
|
||
defineMacro("\\newcommand", function (context) {
|
||
return macros_newcommand(context, false, true);
|
||
});
|
||
defineMacro("\\renewcommand", function (context) {
|
||
return macros_newcommand(context, true, false);
|
||
});
|
||
defineMacro("\\providecommand", function (context) {
|
||
return macros_newcommand(context, true, true);
|
||
}); //////////////////////////////////////////////////////////////////////
|
||
// Grouping
|
||
// \let\bgroup={ \let\egroup=}
|
||
|
||
defineMacro("\\bgroup", "{");
|
||
defineMacro("\\egroup", "}"); // Symbols from latex.ltx:
|
||
// \def\lq{`}
|
||
// \def\rq{'}
|
||
// \def \aa {\r a}
|
||
// \def \AA {\r A}
|
||
|
||
defineMacro("\\lq", "`");
|
||
defineMacro("\\rq", "'");
|
||
defineMacro("\\aa", "\\r a");
|
||
defineMacro("\\AA", "\\r A"); // Copyright (C) and registered (R) symbols. Use raw symbol in MathML.
|
||
// \DeclareTextCommandDefault{\textcopyright}{\textcircled{c}}
|
||
// \DeclareTextCommandDefault{\textregistered}{\textcircled{%
|
||
// \check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont R}}
|
||
// \DeclareRobustCommand{\copyright}{%
|
||
// \ifmmode{\nfss@text{\textcopyright}}\else\textcopyright\fi}
|
||
|
||
defineMacro("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}");
|
||
defineMacro("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");
|
||
defineMacro("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"); // Characters omitted from Unicode range 1D400–1D7FF
|
||
|
||
defineMacro("\u212C", "\\mathscr{B}"); // script
|
||
|
||
defineMacro("\u2130", "\\mathscr{E}");
|
||
defineMacro("\u2131", "\\mathscr{F}");
|
||
defineMacro("\u210B", "\\mathscr{H}");
|
||
defineMacro("\u2110", "\\mathscr{I}");
|
||
defineMacro("\u2112", "\\mathscr{L}");
|
||
defineMacro("\u2133", "\\mathscr{M}");
|
||
defineMacro("\u211B", "\\mathscr{R}");
|
||
defineMacro("\u212D", "\\mathfrak{C}"); // Fraktur
|
||
|
||
defineMacro("\u210C", "\\mathfrak{H}");
|
||
defineMacro("\u2128", "\\mathfrak{Z}"); // Define \Bbbk with a macro that works in both HTML and MathML.
|
||
|
||
defineMacro("\\Bbbk", "\\Bbb{k}"); // Unicode middle dot
|
||
// The KaTeX fonts do not contain U+00B7. Instead, \cdotp displays
|
||
// the dot at U+22C5 and gives it punct spacing.
|
||
|
||
defineMacro("\xB7", "\\cdotp"); // \llap and \rlap render their contents in text mode
|
||
|
||
defineMacro("\\llap", "\\mathllap{\\textrm{#1}}");
|
||
defineMacro("\\rlap", "\\mathrlap{\\textrm{#1}}");
|
||
defineMacro("\\clap", "\\mathclap{\\textrm{#1}}"); // \not is defined by base/fontmath.ltx via
|
||
// \DeclareMathSymbol{\not}{\mathrel}{symbols}{"36}
|
||
// It's thus treated like a \mathrel, but defined by a symbol that has zero
|
||
// width but extends to the right. We use \rlap to get that spacing.
|
||
// For MathML we write U+0338 here. buildMathML.js will then do the overlay.
|
||
|
||
defineMacro("\\not", '\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'); // Negated symbols from base/fontmath.ltx:
|
||
// \def\neq{\not=} \let\ne=\neq
|
||
// \DeclareRobustCommand
|
||
// \notin{\mathrel{\m@th\mathpalette\c@ncel\in}}
|
||
// \def\c@ncel#1#2{\m@th\ooalign{$\hfil#1\mkern1mu/\hfil$\crcr$#1#2$}}
|
||
|
||
defineMacro("\\neq", "\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");
|
||
defineMacro("\\ne", "\\neq");
|
||
defineMacro("\u2260", "\\neq");
|
||
defineMacro("\\notin", "\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}" + "{\\mathrel{\\char`∉}}");
|
||
defineMacro("\u2209", "\\notin"); // Unicode stacked relations
|
||
|
||
defineMacro("\u2258", "\\html@mathml{" + "\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}" + "}{\\mathrel{\\char`\u2258}}");
|
||
defineMacro("\u2259", "\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");
|
||
defineMacro("\u225A", "\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");
|
||
defineMacro("\u225B", "\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}" + "{\\mathrel{\\char`\u225B}}");
|
||
defineMacro("\u225D", "\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}" + "{\\mathrel{\\char`\u225D}}");
|
||
defineMacro("\u225E", "\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}" + "{\\mathrel{\\char`\u225E}}");
|
||
defineMacro("\u225F", "\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"); // Misc Unicode
|
||
|
||
defineMacro("\u27C2", "\\perp");
|
||
defineMacro("\u203C", "\\mathclose{!\\mkern-0.8mu!}");
|
||
defineMacro("\u220C", "\\notni");
|
||
defineMacro("\u231C", "\\ulcorner");
|
||
defineMacro("\u231D", "\\urcorner");
|
||
defineMacro("\u231E", "\\llcorner");
|
||
defineMacro("\u231F", "\\lrcorner");
|
||
defineMacro("\xA9", "\\copyright");
|
||
defineMacro("\xAE", "\\textregistered");
|
||
defineMacro("\uFE0F", "\\textregistered"); //////////////////////////////////////////////////////////////////////
|
||
// LaTeX_2ε
|
||
// \vdots{\vbox{\baselineskip4\p@ \lineskiplimit\z@
|
||
// \kern6\p@\hbox{.}\hbox{.}\hbox{.}}}
|
||
// We'll call \varvdots, which gets a glyph from symbols.js.
|
||
// The zero-width rule gets us an equivalent to the vertical 6pt kern.
|
||
|
||
defineMacro("\\vdots", "\\mathord{\\varvdots\\rule{0pt}{15pt}}");
|
||
defineMacro("\u22EE", "\\vdots"); //////////////////////////////////////////////////////////////////////
|
||
// amsmath.sty
|
||
// http://mirrors.concertpass.com/tex-archive/macros/latex/required/amsmath/amsmath.pdf
|
||
// Italic Greek capital letters. AMS defines these with \DeclareMathSymbol,
|
||
// but they are equivalent to \mathit{\Letter}.
|
||
|
||
defineMacro("\\varGamma", "\\mathit{\\Gamma}");
|
||
defineMacro("\\varDelta", "\\mathit{\\Delta}");
|
||
defineMacro("\\varTheta", "\\mathit{\\Theta}");
|
||
defineMacro("\\varLambda", "\\mathit{\\Lambda}");
|
||
defineMacro("\\varXi", "\\mathit{\\Xi}");
|
||
defineMacro("\\varPi", "\\mathit{\\Pi}");
|
||
defineMacro("\\varSigma", "\\mathit{\\Sigma}");
|
||
defineMacro("\\varUpsilon", "\\mathit{\\Upsilon}");
|
||
defineMacro("\\varPhi", "\\mathit{\\Phi}");
|
||
defineMacro("\\varPsi", "\\mathit{\\Psi}");
|
||
defineMacro("\\varOmega", "\\mathit{\\Omega}"); //\newcommand{\substack}[1]{\subarray{c}#1\endsubarray}
|
||
|
||
defineMacro("\\substack", "\\begin{subarray}{c}#1\\end{subarray}"); // \renewcommand{\colon}{\nobreak\mskip2mu\mathpunct{}\nonscript
|
||
// \mkern-\thinmuskip{:}\mskip6muplus1mu\relax}
|
||
|
||
defineMacro("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}" + "\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"); // \newcommand{\boxed}[1]{\fbox{\m@th$\displaystyle#1$}}
|
||
|
||
defineMacro("\\boxed", "\\fbox{$\\displaystyle{#1}$}"); // \def\iff{\DOTSB\;\Longleftrightarrow\;}
|
||
// \def\implies{\DOTSB\;\Longrightarrow\;}
|
||
// \def\impliedby{\DOTSB\;\Longleftarrow\;}
|
||
|
||
defineMacro("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;");
|
||
defineMacro("\\implies", "\\DOTSB\\;\\Longrightarrow\\;");
|
||
defineMacro("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;"); // AMSMath's automatic \dots, based on \mdots@@ macro.
|
||
|
||
var dotsByToken = {
|
||
',': '\\dotsc',
|
||
'\\not': '\\dotsb',
|
||
// \keybin@ checks for the following:
|
||
'+': '\\dotsb',
|
||
'=': '\\dotsb',
|
||
'<': '\\dotsb',
|
||
'>': '\\dotsb',
|
||
'-': '\\dotsb',
|
||
'*': '\\dotsb',
|
||
':': '\\dotsb',
|
||
// Symbols whose definition starts with \DOTSB:
|
||
'\\DOTSB': '\\dotsb',
|
||
'\\coprod': '\\dotsb',
|
||
'\\bigvee': '\\dotsb',
|
||
'\\bigwedge': '\\dotsb',
|
||
'\\biguplus': '\\dotsb',
|
||
'\\bigcap': '\\dotsb',
|
||
'\\bigcup': '\\dotsb',
|
||
'\\prod': '\\dotsb',
|
||
'\\sum': '\\dotsb',
|
||
'\\bigotimes': '\\dotsb',
|
||
'\\bigoplus': '\\dotsb',
|
||
'\\bigodot': '\\dotsb',
|
||
'\\bigsqcup': '\\dotsb',
|
||
'\\And': '\\dotsb',
|
||
'\\longrightarrow': '\\dotsb',
|
||
'\\Longrightarrow': '\\dotsb',
|
||
'\\longleftarrow': '\\dotsb',
|
||
'\\Longleftarrow': '\\dotsb',
|
||
'\\longleftrightarrow': '\\dotsb',
|
||
'\\Longleftrightarrow': '\\dotsb',
|
||
'\\mapsto': '\\dotsb',
|
||
'\\longmapsto': '\\dotsb',
|
||
'\\hookrightarrow': '\\dotsb',
|
||
'\\doteq': '\\dotsb',
|
||
// Symbols whose definition starts with \mathbin:
|
||
'\\mathbin': '\\dotsb',
|
||
// Symbols whose definition starts with \mathrel:
|
||
'\\mathrel': '\\dotsb',
|
||
'\\relbar': '\\dotsb',
|
||
'\\Relbar': '\\dotsb',
|
||
'\\xrightarrow': '\\dotsb',
|
||
'\\xleftarrow': '\\dotsb',
|
||
// Symbols whose definition starts with \DOTSI:
|
||
'\\DOTSI': '\\dotsi',
|
||
'\\int': '\\dotsi',
|
||
'\\oint': '\\dotsi',
|
||
'\\iint': '\\dotsi',
|
||
'\\iiint': '\\dotsi',
|
||
'\\iiiint': '\\dotsi',
|
||
'\\idotsint': '\\dotsi',
|
||
// Symbols whose definition starts with \DOTSX:
|
||
'\\DOTSX': '\\dotsx'
|
||
};
|
||
defineMacro("\\dots", function (context) {
|
||
// TODO: If used in text mode, should expand to \textellipsis.
|
||
// However, in KaTeX, \textellipsis and \ldots behave the same
|
||
// (in text mode), and it's unlikely we'd see any of the math commands
|
||
// that affect the behavior of \dots when in text mode. So fine for now
|
||
// (until we support \ifmmode ... \else ... \fi).
|
||
var thedots = '\\dotso';
|
||
var next = context.expandAfterFuture().text;
|
||
|
||
if (next in dotsByToken) {
|
||
thedots = dotsByToken[next];
|
||
} else if (next.substr(0, 4) === '\\not') {
|
||
thedots = '\\dotsb';
|
||
} else if (next in src_symbols.math) {
|
||
if (utils.contains(['bin', 'rel'], src_symbols.math[next].group)) {
|
||
thedots = '\\dotsb';
|
||
}
|
||
}
|
||
|
||
return thedots;
|
||
});
|
||
var spaceAfterDots = {
|
||
// \rightdelim@ checks for the following:
|
||
')': true,
|
||
']': true,
|
||
'\\rbrack': true,
|
||
'\\}': true,
|
||
'\\rbrace': true,
|
||
'\\rangle': true,
|
||
'\\rceil': true,
|
||
'\\rfloor': true,
|
||
'\\rgroup': true,
|
||
'\\rmoustache': true,
|
||
'\\right': true,
|
||
'\\bigr': true,
|
||
'\\biggr': true,
|
||
'\\Bigr': true,
|
||
'\\Biggr': true,
|
||
// \extra@ also tests for the following:
|
||
'$': true,
|
||
// \extrap@ checks for the following:
|
||
';': true,
|
||
'.': true,
|
||
',': true
|
||
};
|
||
defineMacro("\\dotso", function (context) {
|
||
var next = context.future().text;
|
||
|
||
if (next in spaceAfterDots) {
|
||
return "\\ldots\\,";
|
||
} else {
|
||
return "\\ldots";
|
||
}
|
||
});
|
||
defineMacro("\\dotsc", function (context) {
|
||
var next = context.future().text; // \dotsc uses \extra@ but not \extrap@, instead specially checking for
|
||
// ';' and '.', but doesn't check for ','.
|
||
|
||
if (next in spaceAfterDots && next !== ',') {
|
||
return "\\ldots\\,";
|
||
} else {
|
||
return "\\ldots";
|
||
}
|
||
});
|
||
defineMacro("\\cdots", function (context) {
|
||
var next = context.future().text;
|
||
|
||
if (next in spaceAfterDots) {
|
||
return "\\@cdots\\,";
|
||
} else {
|
||
return "\\@cdots";
|
||
}
|
||
});
|
||
defineMacro("\\dotsb", "\\cdots");
|
||
defineMacro("\\dotsm", "\\cdots");
|
||
defineMacro("\\dotsi", "\\!\\cdots"); // amsmath doesn't actually define \dotsx, but \dots followed by a macro
|
||
// starting with \DOTSX implies \dotso, and then \extra@ detects this case
|
||
// and forces the added `\,`.
|
||
|
||
defineMacro("\\dotsx", "\\ldots\\,"); // \let\DOTSI\relax
|
||
// \let\DOTSB\relax
|
||
// \let\DOTSX\relax
|
||
|
||
defineMacro("\\DOTSI", "\\relax");
|
||
defineMacro("\\DOTSB", "\\relax");
|
||
defineMacro("\\DOTSX", "\\relax"); // Spacing, based on amsmath.sty's override of LaTeX defaults
|
||
// \DeclareRobustCommand{\tmspace}[3]{%
|
||
// \ifmmode\mskip#1#2\else\kern#1#3\fi\relax}
|
||
|
||
defineMacro("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"); // \renewcommand{\,}{\tmspace+\thinmuskip{.1667em}}
|
||
// TODO: math mode should use \thinmuskip
|
||
|
||
defineMacro("\\,", "\\tmspace+{3mu}{.1667em}"); // \let\thinspace\,
|
||
|
||
defineMacro("\\thinspace", "\\,"); // \def\>{\mskip\medmuskip}
|
||
// \renewcommand{\:}{\tmspace+\medmuskip{.2222em}}
|
||
// TODO: \> and math mode of \: should use \medmuskip = 4mu plus 2mu minus 4mu
|
||
|
||
defineMacro("\\>", "\\mskip{4mu}");
|
||
defineMacro("\\:", "\\tmspace+{4mu}{.2222em}"); // \let\medspace\:
|
||
|
||
defineMacro("\\medspace", "\\:"); // \renewcommand{\;}{\tmspace+\thickmuskip{.2777em}}
|
||
// TODO: math mode should use \thickmuskip = 5mu plus 5mu
|
||
|
||
defineMacro("\\;", "\\tmspace+{5mu}{.2777em}"); // \let\thickspace\;
|
||
|
||
defineMacro("\\thickspace", "\\;"); // \renewcommand{\!}{\tmspace-\thinmuskip{.1667em}}
|
||
// TODO: math mode should use \thinmuskip
|
||
|
||
defineMacro("\\!", "\\tmspace-{3mu}{.1667em}"); // \let\negthinspace\!
|
||
|
||
defineMacro("\\negthinspace", "\\!"); // \newcommand{\negmedspace}{\tmspace-\medmuskip{.2222em}}
|
||
// TODO: math mode should use \medmuskip
|
||
|
||
defineMacro("\\negmedspace", "\\tmspace-{4mu}{.2222em}"); // \newcommand{\negthickspace}{\tmspace-\thickmuskip{.2777em}}
|
||
// TODO: math mode should use \thickmuskip
|
||
|
||
defineMacro("\\negthickspace", "\\tmspace-{5mu}{.277em}"); // \def\enspace{\kern.5em }
|
||
|
||
defineMacro("\\enspace", "\\kern.5em "); // \def\enskip{\hskip.5em\relax}
|
||
|
||
defineMacro("\\enskip", "\\hskip.5em\\relax"); // \def\quad{\hskip1em\relax}
|
||
|
||
defineMacro("\\quad", "\\hskip1em\\relax"); // \def\qquad{\hskip2em\relax}
|
||
|
||
defineMacro("\\qquad", "\\hskip2em\\relax"); // \tag@in@display form of \tag
|
||
|
||
defineMacro("\\tag", "\\@ifstar\\tag@literal\\tag@paren");
|
||
defineMacro("\\tag@paren", "\\tag@literal{({#1})}");
|
||
defineMacro("\\tag@literal", function (context) {
|
||
if (context.macros.get("\\df@tag")) {
|
||
throw new src_ParseError("Multiple \\tag");
|
||
}
|
||
|
||
return "\\gdef\\df@tag{\\text{#1}}";
|
||
}); // \renewcommand{\bmod}{\nonscript\mskip-\medmuskip\mkern5mu\mathbin
|
||
// {\operator@font mod}\penalty900
|
||
// \mkern5mu\nonscript\mskip-\medmuskip}
|
||
// \newcommand{\pod}[1]{\allowbreak
|
||
// \if@display\mkern18mu\else\mkern8mu\fi(#1)}
|
||
// \renewcommand{\pmod}[1]{\pod{{\operator@font mod}\mkern6mu#1}}
|
||
// \newcommand{\mod}[1]{\allowbreak\if@display\mkern18mu
|
||
// \else\mkern12mu\fi{\operator@font mod}\,\,#1}
|
||
// TODO: math mode should use \medmuskip = 4mu plus 2mu minus 4mu
|
||
|
||
defineMacro("\\bmod", "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}" + "\\mathbin{\\rm mod}" + "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");
|
||
defineMacro("\\pod", "\\allowbreak" + "\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");
|
||
defineMacro("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}");
|
||
defineMacro("\\mod", "\\allowbreak" + "\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}" + "{\\rm mod}\\,\\,#1"); // \pmb -- A simulation of bold.
|
||
// The version in ambsy.sty works by typesetting three copies of the argument
|
||
// with small offsets. We use two copies. We omit the vertical offset because
|
||
// of rendering problems that makeVList encounters in Safari.
|
||
|
||
defineMacro("\\pmb", "\\html@mathml{" + "\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}" + "{\\mathbf{#1}}"); //////////////////////////////////////////////////////////////////////
|
||
// LaTeX source2e
|
||
// \\ defaults to \newline, but changes to \cr within array environment
|
||
|
||
defineMacro("\\\\", "\\newline"); // \def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\@}
|
||
// TODO: Doesn't normally work in math mode because \@ fails. KaTeX doesn't
|
||
// support \@ yet, so that's omitted, and we add \text so that the result
|
||
// doesn't look funny in math mode.
|
||
|
||
defineMacro("\\TeX", "\\textrm{\\html@mathml{" + "T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX" + "}{TeX}}"); // \DeclareRobustCommand{\LaTeX}{L\kern-.36em%
|
||
// {\sbox\z@ T%
|
||
// \vbox to\ht\z@{\hbox{\check@mathfonts
|
||
// \fontsize\sf@size\z@
|
||
// \math@fontsfalse\selectfont
|
||
// A}%
|
||
// \vss}%
|
||
// }%
|
||
// \kern-.15em%
|
||
// \TeX}
|
||
// This code aligns the top of the A with the T (from the perspective of TeX's
|
||
// boxes, though visually the A appears to extend above slightly).
|
||
// We compute the corresponding \raisebox when A is rendered in \normalsize
|
||
// \scriptstyle, which has a scale factor of 0.7 (see Options.js).
|
||
|
||
var latexRaiseA = fontMetricsData['Main-Regular']["T".charCodeAt(0)][1] - 0.7 * fontMetricsData['Main-Regular']["A".charCodeAt(0)][1] + "em";
|
||
defineMacro("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + latexRaiseA + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}"); // New KaTeX logo based on tweaking LaTeX logo
|
||
|
||
defineMacro("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + latexRaiseA + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}"); // \DeclareRobustCommand\hspace{\@ifstar\@hspacer\@hspace}
|
||
// \def\@hspace#1{\hskip #1\relax}
|
||
// \def\@hspacer#1{\vrule \@width\z@\nobreak
|
||
// \hskip #1\hskip \z@skip}
|
||
|
||
defineMacro("\\hspace", "\\@ifstar\\@hspacer\\@hspace");
|
||
defineMacro("\\@hspace", "\\hskip #1\\relax");
|
||
defineMacro("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax"); //////////////////////////////////////////////////////////////////////
|
||
// mathtools.sty
|
||
//\providecommand\ordinarycolon{:}
|
||
|
||
defineMacro("\\ordinarycolon", ":"); //\def\vcentcolon{\mathrel{\mathop\ordinarycolon}}
|
||
//TODO(edemaine): Not yet centered. Fix via \raisebox or #726
|
||
|
||
defineMacro("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}"); // \providecommand*\dblcolon{\vcentcolon\mathrel{\mkern-.9mu}\vcentcolon}
|
||
|
||
defineMacro("\\dblcolon", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}" + "{\\mathop{\\char\"2237}}"); // \providecommand*\coloneqq{\vcentcolon\mathrel{\mkern-1.2mu}=}
|
||
|
||
defineMacro("\\coloneqq", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}" + "{\\mathop{\\char\"2254}}"); // ≔
|
||
// \providecommand*\Coloneqq{\dblcolon\mathrel{\mkern-1.2mu}=}
|
||
|
||
defineMacro("\\Coloneqq", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}" + "{\\mathop{\\char\"2237\\char\"3d}}"); // \providecommand*\coloneq{\vcentcolon\mathrel{\mkern-1.2mu}\mathrel{-}}
|
||
|
||
defineMacro("\\coloneq", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}" + "{\\mathop{\\char\"3a\\char\"2212}}"); // \providecommand*\Coloneq{\dblcolon\mathrel{\mkern-1.2mu}\mathrel{-}}
|
||
|
||
defineMacro("\\Coloneq", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}" + "{\\mathop{\\char\"2237\\char\"2212}}"); // \providecommand*\eqqcolon{=\mathrel{\mkern-1.2mu}\vcentcolon}
|
||
|
||
defineMacro("\\eqqcolon", "\\html@mathml{" + "\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}" + "{\\mathop{\\char\"2255}}"); // ≕
|
||
// \providecommand*\Eqqcolon{=\mathrel{\mkern-1.2mu}\dblcolon}
|
||
|
||
defineMacro("\\Eqqcolon", "\\html@mathml{" + "\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}" + "{\\mathop{\\char\"3d\\char\"2237}}"); // \providecommand*\eqcolon{\mathrel{-}\mathrel{\mkern-1.2mu}\vcentcolon}
|
||
|
||
defineMacro("\\eqcolon", "\\html@mathml{" + "\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}" + "{\\mathop{\\char\"2239}}"); // \providecommand*\Eqcolon{\mathrel{-}\mathrel{\mkern-1.2mu}\dblcolon}
|
||
|
||
defineMacro("\\Eqcolon", "\\html@mathml{" + "\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}" + "{\\mathop{\\char\"2212\\char\"2237}}"); // \providecommand*\colonapprox{\vcentcolon\mathrel{\mkern-1.2mu}\approx}
|
||
|
||
defineMacro("\\colonapprox", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}" + "{\\mathop{\\char\"3a\\char\"2248}}"); // \providecommand*\Colonapprox{\dblcolon\mathrel{\mkern-1.2mu}\approx}
|
||
|
||
defineMacro("\\Colonapprox", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}" + "{\\mathop{\\char\"2237\\char\"2248}}"); // \providecommand*\colonsim{\vcentcolon\mathrel{\mkern-1.2mu}\sim}
|
||
|
||
defineMacro("\\colonsim", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}" + "{\\mathop{\\char\"3a\\char\"223c}}"); // \providecommand*\Colonsim{\dblcolon\mathrel{\mkern-1.2mu}\sim}
|
||
|
||
defineMacro("\\Colonsim", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}" + "{\\mathop{\\char\"2237\\char\"223c}}"); // Some Unicode characters are implemented with macros to mathtools functions.
|
||
|
||
defineMacro("\u2237", "\\dblcolon"); // ::
|
||
|
||
defineMacro("\u2239", "\\eqcolon"); // -:
|
||
|
||
defineMacro("\u2254", "\\coloneqq"); // :=
|
||
|
||
defineMacro("\u2255", "\\eqqcolon"); // =:
|
||
|
||
defineMacro("\u2A74", "\\Coloneqq"); // ::=
|
||
//////////////////////////////////////////////////////////////////////
|
||
// colonequals.sty
|
||
// Alternate names for mathtools's macros:
|
||
|
||
defineMacro("\\ratio", "\\vcentcolon");
|
||
defineMacro("\\coloncolon", "\\dblcolon");
|
||
defineMacro("\\colonequals", "\\coloneqq");
|
||
defineMacro("\\coloncolonequals", "\\Coloneqq");
|
||
defineMacro("\\equalscolon", "\\eqqcolon");
|
||
defineMacro("\\equalscoloncolon", "\\Eqqcolon");
|
||
defineMacro("\\colonminus", "\\coloneq");
|
||
defineMacro("\\coloncolonminus", "\\Coloneq");
|
||
defineMacro("\\minuscolon", "\\eqcolon");
|
||
defineMacro("\\minuscoloncolon", "\\Eqcolon"); // \colonapprox name is same in mathtools and colonequals.
|
||
|
||
defineMacro("\\coloncolonapprox", "\\Colonapprox"); // \colonsim name is same in mathtools and colonequals.
|
||
|
||
defineMacro("\\coloncolonsim", "\\Colonsim"); // Additional macros, implemented by analogy with mathtools definitions:
|
||
|
||
defineMacro("\\simcolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");
|
||
defineMacro("\\simcoloncolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");
|
||
defineMacro("\\approxcolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");
|
||
defineMacro("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"); // Present in newtxmath, pxfonts and txfonts
|
||
|
||
defineMacro("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");
|
||
defineMacro("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}");
|
||
defineMacro("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}"); //////////////////////////////////////////////////////////////////////
|
||
// MathML alternates for KaTeX glyphs in the Unicode private area
|
||
|
||
defineMacro("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{\u2269}");
|
||
defineMacro("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{\u2268}");
|
||
defineMacro("\\ngeqq", "\\html@mathml{\\@ngeqq}{\u2271}");
|
||
defineMacro("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{\u2271}");
|
||
defineMacro("\\nleqq", "\\html@mathml{\\@nleqq}{\u2270}");
|
||
defineMacro("\\nleqslant", "\\html@mathml{\\@nleqslant}{\u2270}");
|
||
defineMacro("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}");
|
||
defineMacro("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}");
|
||
defineMacro("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{\u2288}");
|
||
defineMacro("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{\u2289}");
|
||
defineMacro("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}");
|
||
defineMacro("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}");
|
||
defineMacro("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}");
|
||
defineMacro("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}"); //////////////////////////////////////////////////////////////////////
|
||
// stmaryrd and semantic
|
||
// The stmaryrd and semantic packages render the next four items by calling a
|
||
// glyph. Those glyphs do not exist in the KaTeX fonts. Hence the macros.
|
||
|
||
defineMacro("\\llbracket", "\\html@mathml{" + "\\mathopen{[\\mkern-3.2mu[}}" + "{\\mathopen{\\char`\u27E6}}");
|
||
defineMacro("\\rrbracket", "\\html@mathml{" + "\\mathclose{]\\mkern-3.2mu]}}" + "{\\mathclose{\\char`\u27E7}}");
|
||
defineMacro("\u27E6", "\\llbracket"); // blackboard bold [
|
||
|
||
defineMacro("\u27E7", "\\rrbracket"); // blackboard bold ]
|
||
|
||
defineMacro("\\lBrace", "\\html@mathml{" + "\\mathopen{\\{\\mkern-3.2mu[}}" + "{\\mathopen{\\char`\u2983}}");
|
||
defineMacro("\\rBrace", "\\html@mathml{" + "\\mathclose{]\\mkern-3.2mu\\}}}" + "{\\mathclose{\\char`\u2984}}");
|
||
defineMacro("\u2983", "\\lBrace"); // blackboard bold {
|
||
|
||
defineMacro("\u2984", "\\rBrace"); // blackboard bold }
|
||
// TODO: Create variable sized versions of the last two items. I believe that
|
||
// will require new font glyphs.
|
||
//////////////////////////////////////////////////////////////////////
|
||
// texvc.sty
|
||
// The texvc package contains macros available in mediawiki pages.
|
||
// We omit the functions deprecated at
|
||
// https://en.wikipedia.org/wiki/Help:Displaying_a_formula#Deprecated_syntax
|
||
// We also omit texvc's \O, which conflicts with \text{\O}
|
||
|
||
defineMacro("\\darr", "\\downarrow");
|
||
defineMacro("\\dArr", "\\Downarrow");
|
||
defineMacro("\\Darr", "\\Downarrow");
|
||
defineMacro("\\lang", "\\langle");
|
||
defineMacro("\\rang", "\\rangle");
|
||
defineMacro("\\uarr", "\\uparrow");
|
||
defineMacro("\\uArr", "\\Uparrow");
|
||
defineMacro("\\Uarr", "\\Uparrow");
|
||
defineMacro("\\N", "\\mathbb{N}");
|
||
defineMacro("\\R", "\\mathbb{R}");
|
||
defineMacro("\\Z", "\\mathbb{Z}");
|
||
defineMacro("\\alef", "\\aleph");
|
||
defineMacro("\\alefsym", "\\aleph");
|
||
defineMacro("\\Alpha", "\\mathrm{A}");
|
||
defineMacro("\\Beta", "\\mathrm{B}");
|
||
defineMacro("\\bull", "\\bullet");
|
||
defineMacro("\\Chi", "\\mathrm{X}");
|
||
defineMacro("\\clubs", "\\clubsuit");
|
||
defineMacro("\\cnums", "\\mathbb{C}");
|
||
defineMacro("\\Complex", "\\mathbb{C}");
|
||
defineMacro("\\Dagger", "\\ddagger");
|
||
defineMacro("\\diamonds", "\\diamondsuit");
|
||
defineMacro("\\empty", "\\emptyset");
|
||
defineMacro("\\Epsilon", "\\mathrm{E}");
|
||
defineMacro("\\Eta", "\\mathrm{H}");
|
||
defineMacro("\\exist", "\\exists");
|
||
defineMacro("\\harr", "\\leftrightarrow");
|
||
defineMacro("\\hArr", "\\Leftrightarrow");
|
||
defineMacro("\\Harr", "\\Leftrightarrow");
|
||
defineMacro("\\hearts", "\\heartsuit");
|
||
defineMacro("\\image", "\\Im");
|
||
defineMacro("\\infin", "\\infty");
|
||
defineMacro("\\Iota", "\\mathrm{I}");
|
||
defineMacro("\\isin", "\\in");
|
||
defineMacro("\\Kappa", "\\mathrm{K}");
|
||
defineMacro("\\larr", "\\leftarrow");
|
||
defineMacro("\\lArr", "\\Leftarrow");
|
||
defineMacro("\\Larr", "\\Leftarrow");
|
||
defineMacro("\\lrarr", "\\leftrightarrow");
|
||
defineMacro("\\lrArr", "\\Leftrightarrow");
|
||
defineMacro("\\Lrarr", "\\Leftrightarrow");
|
||
defineMacro("\\Mu", "\\mathrm{M}");
|
||
defineMacro("\\natnums", "\\mathbb{N}");
|
||
defineMacro("\\Nu", "\\mathrm{N}");
|
||
defineMacro("\\Omicron", "\\mathrm{O}");
|
||
defineMacro("\\plusmn", "\\pm");
|
||
defineMacro("\\rarr", "\\rightarrow");
|
||
defineMacro("\\rArr", "\\Rightarrow");
|
||
defineMacro("\\Rarr", "\\Rightarrow");
|
||
defineMacro("\\real", "\\Re");
|
||
defineMacro("\\reals", "\\mathbb{R}");
|
||
defineMacro("\\Reals", "\\mathbb{R}");
|
||
defineMacro("\\Rho", "\\mathrm{P}");
|
||
defineMacro("\\sdot", "\\cdot");
|
||
defineMacro("\\sect", "\\S");
|
||
defineMacro("\\spades", "\\spadesuit");
|
||
defineMacro("\\sub", "\\subset");
|
||
defineMacro("\\sube", "\\subseteq");
|
||
defineMacro("\\supe", "\\supseteq");
|
||
defineMacro("\\Tau", "\\mathrm{T}");
|
||
defineMacro("\\thetasym", "\\vartheta"); // TODO: defineMacro("\\varcoppa", "\\\mbox{\\coppa}");
|
||
|
||
defineMacro("\\weierp", "\\wp");
|
||
defineMacro("\\Zeta", "\\mathrm{Z}"); //////////////////////////////////////////////////////////////////////
|
||
// statmath.sty
|
||
// https://ctan.math.illinois.edu/macros/latex/contrib/statmath/statmath.pdf
|
||
|
||
defineMacro("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}");
|
||
defineMacro("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}");
|
||
defineMacro("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits"); // Custom Khan Academy colors, should be moved to an optional package
|
||
|
||
defineMacro("\\blue", "\\textcolor{##6495ed}{#1}");
|
||
defineMacro("\\orange", "\\textcolor{##ffa500}{#1}");
|
||
defineMacro("\\pink", "\\textcolor{##ff00af}{#1}");
|
||
defineMacro("\\red", "\\textcolor{##df0030}{#1}");
|
||
defineMacro("\\green", "\\textcolor{##28ae7b}{#1}");
|
||
defineMacro("\\gray", "\\textcolor{gray}{#1}");
|
||
defineMacro("\\purple", "\\textcolor{##9d38bd}{#1}");
|
||
defineMacro("\\blueA", "\\textcolor{##ccfaff}{#1}");
|
||
defineMacro("\\blueB", "\\textcolor{##80f6ff}{#1}");
|
||
defineMacro("\\blueC", "\\textcolor{##63d9ea}{#1}");
|
||
defineMacro("\\blueD", "\\textcolor{##11accd}{#1}");
|
||
defineMacro("\\blueE", "\\textcolor{##0c7f99}{#1}");
|
||
defineMacro("\\tealA", "\\textcolor{##94fff5}{#1}");
|
||
defineMacro("\\tealB", "\\textcolor{##26edd5}{#1}");
|
||
defineMacro("\\tealC", "\\textcolor{##01d1c1}{#1}");
|
||
defineMacro("\\tealD", "\\textcolor{##01a995}{#1}");
|
||
defineMacro("\\tealE", "\\textcolor{##208170}{#1}");
|
||
defineMacro("\\greenA", "\\textcolor{##b6ffb0}{#1}");
|
||
defineMacro("\\greenB", "\\textcolor{##8af281}{#1}");
|
||
defineMacro("\\greenC", "\\textcolor{##74cf70}{#1}");
|
||
defineMacro("\\greenD", "\\textcolor{##1fab54}{#1}");
|
||
defineMacro("\\greenE", "\\textcolor{##0d923f}{#1}");
|
||
defineMacro("\\goldA", "\\textcolor{##ffd0a9}{#1}");
|
||
defineMacro("\\goldB", "\\textcolor{##ffbb71}{#1}");
|
||
defineMacro("\\goldC", "\\textcolor{##ff9c39}{#1}");
|
||
defineMacro("\\goldD", "\\textcolor{##e07d10}{#1}");
|
||
defineMacro("\\goldE", "\\textcolor{##a75a05}{#1}");
|
||
defineMacro("\\redA", "\\textcolor{##fca9a9}{#1}");
|
||
defineMacro("\\redB", "\\textcolor{##ff8482}{#1}");
|
||
defineMacro("\\redC", "\\textcolor{##f9685d}{#1}");
|
||
defineMacro("\\redD", "\\textcolor{##e84d39}{#1}");
|
||
defineMacro("\\redE", "\\textcolor{##bc2612}{#1}");
|
||
defineMacro("\\maroonA", "\\textcolor{##ffbde0}{#1}");
|
||
defineMacro("\\maroonB", "\\textcolor{##ff92c6}{#1}");
|
||
defineMacro("\\maroonC", "\\textcolor{##ed5fa6}{#1}");
|
||
defineMacro("\\maroonD", "\\textcolor{##ca337c}{#1}");
|
||
defineMacro("\\maroonE", "\\textcolor{##9e034e}{#1}");
|
||
defineMacro("\\purpleA", "\\textcolor{##ddd7ff}{#1}");
|
||
defineMacro("\\purpleB", "\\textcolor{##c6b9fc}{#1}");
|
||
defineMacro("\\purpleC", "\\textcolor{##aa87ff}{#1}");
|
||
defineMacro("\\purpleD", "\\textcolor{##7854ab}{#1}");
|
||
defineMacro("\\purpleE", "\\textcolor{##543b78}{#1}");
|
||
defineMacro("\\mintA", "\\textcolor{##f5f9e8}{#1}");
|
||
defineMacro("\\mintB", "\\textcolor{##edf2df}{#1}");
|
||
defineMacro("\\mintC", "\\textcolor{##e0e5cc}{#1}");
|
||
defineMacro("\\grayA", "\\textcolor{##f6f7f7}{#1}");
|
||
defineMacro("\\grayB", "\\textcolor{##f0f1f2}{#1}");
|
||
defineMacro("\\grayC", "\\textcolor{##e3e5e6}{#1}");
|
||
defineMacro("\\grayD", "\\textcolor{##d6d8da}{#1}");
|
||
defineMacro("\\grayE", "\\textcolor{##babec2}{#1}");
|
||
defineMacro("\\grayF", "\\textcolor{##888d93}{#1}");
|
||
defineMacro("\\grayG", "\\textcolor{##626569}{#1}");
|
||
defineMacro("\\grayH", "\\textcolor{##3b3e40}{#1}");
|
||
defineMacro("\\grayI", "\\textcolor{##21242c}{#1}");
|
||
defineMacro("\\kaBlue", "\\textcolor{##314453}{#1}");
|
||
defineMacro("\\kaGreen", "\\textcolor{##71B307}{#1}");
|
||
// CONCATENATED MODULE: ./src/MacroExpander.js
|
||
/**
|
||
* This file contains the “gullet” where macros are expanded
|
||
* until only non-macro tokens remain.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// List of commands that act like macros but aren't defined as a macro,
|
||
// function, or symbol. Used in `isDefined`.
|
||
var implicitCommands = {
|
||
"\\relax": true,
|
||
// MacroExpander.js
|
||
"^": true,
|
||
// Parser.js
|
||
"_": true,
|
||
// Parser.js
|
||
"\\limits": true,
|
||
// Parser.js
|
||
"\\nolimits": true // Parser.js
|
||
|
||
};
|
||
|
||
var MacroExpander_MacroExpander =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function MacroExpander(input, settings, mode) {
|
||
this.settings = void 0;
|
||
this.expansionCount = void 0;
|
||
this.lexer = void 0;
|
||
this.macros = void 0;
|
||
this.stack = void 0;
|
||
this.mode = void 0;
|
||
this.settings = settings;
|
||
this.expansionCount = 0;
|
||
this.feed(input); // Make new global namespace
|
||
|
||
this.macros = new Namespace_Namespace(macros, settings.macros);
|
||
this.mode = mode;
|
||
this.stack = []; // contains tokens in REVERSE order
|
||
}
|
||
/**
|
||
* Feed a new input string to the same MacroExpander
|
||
* (with existing macros etc.).
|
||
*/
|
||
|
||
|
||
var _proto = MacroExpander.prototype;
|
||
|
||
_proto.feed = function feed(input) {
|
||
this.lexer = new Lexer_Lexer(input, this.settings);
|
||
}
|
||
/**
|
||
* Switches between "text" and "math" modes.
|
||
*/
|
||
;
|
||
|
||
_proto.switchMode = function switchMode(newMode) {
|
||
this.mode = newMode;
|
||
}
|
||
/**
|
||
* Start a new group nesting within all namespaces.
|
||
*/
|
||
;
|
||
|
||
_proto.beginGroup = function beginGroup() {
|
||
this.macros.beginGroup();
|
||
}
|
||
/**
|
||
* End current group nesting within all namespaces.
|
||
*/
|
||
;
|
||
|
||
_proto.endGroup = function endGroup() {
|
||
this.macros.endGroup();
|
||
}
|
||
/**
|
||
* Returns the topmost token on the stack, without expanding it.
|
||
* Similar in behavior to TeX's `\futurelet`.
|
||
*/
|
||
;
|
||
|
||
_proto.future = function future() {
|
||
if (this.stack.length === 0) {
|
||
this.pushToken(this.lexer.lex());
|
||
}
|
||
|
||
return this.stack[this.stack.length - 1];
|
||
}
|
||
/**
|
||
* Remove and return the next unexpanded token.
|
||
*/
|
||
;
|
||
|
||
_proto.popToken = function popToken() {
|
||
this.future(); // ensure non-empty stack
|
||
|
||
return this.stack.pop();
|
||
}
|
||
/**
|
||
* Add a given token to the token stack. In particular, this get be used
|
||
* to put back a token returned from one of the other methods.
|
||
*/
|
||
;
|
||
|
||
_proto.pushToken = function pushToken(token) {
|
||
this.stack.push(token);
|
||
}
|
||
/**
|
||
* Append an array of tokens to the token stack.
|
||
*/
|
||
;
|
||
|
||
_proto.pushTokens = function pushTokens(tokens) {
|
||
var _this$stack;
|
||
|
||
(_this$stack = this.stack).push.apply(_this$stack, tokens);
|
||
}
|
||
/**
|
||
* Consume all following space tokens, without expansion.
|
||
*/
|
||
;
|
||
|
||
_proto.consumeSpaces = function consumeSpaces() {
|
||
for (;;) {
|
||
var token = this.future();
|
||
|
||
if (token.text === " ") {
|
||
this.stack.pop();
|
||
} else {
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
/**
|
||
* Consume the specified number of arguments from the token stream,
|
||
* and return the resulting array of arguments.
|
||
*/
|
||
;
|
||
|
||
_proto.consumeArgs = function consumeArgs(numArgs) {
|
||
var args = []; // obtain arguments, either single token or balanced {…} group
|
||
|
||
for (var i = 0; i < numArgs; ++i) {
|
||
this.consumeSpaces(); // ignore spaces before each argument
|
||
|
||
var startOfArg = this.popToken();
|
||
|
||
if (startOfArg.text === "{") {
|
||
var arg = [];
|
||
var depth = 1;
|
||
|
||
while (depth !== 0) {
|
||
var tok = this.popToken();
|
||
arg.push(tok);
|
||
|
||
if (tok.text === "{") {
|
||
++depth;
|
||
} else if (tok.text === "}") {
|
||
--depth;
|
||
} else if (tok.text === "EOF") {
|
||
throw new src_ParseError("End of input in macro argument", startOfArg);
|
||
}
|
||
}
|
||
|
||
arg.pop(); // remove last }
|
||
|
||
arg.reverse(); // like above, to fit in with stack order
|
||
|
||
args[i] = arg;
|
||
} else if (startOfArg.text === "EOF") {
|
||
throw new src_ParseError("End of input expecting macro argument");
|
||
} else {
|
||
args[i] = [startOfArg];
|
||
}
|
||
}
|
||
|
||
return args;
|
||
}
|
||
/**
|
||
* Expand the next token only once if possible.
|
||
*
|
||
* If the token is expanded, the resulting tokens will be pushed onto
|
||
* the stack in reverse order and will be returned as an array,
|
||
* also in reverse order.
|
||
*
|
||
* If not, the next token will be returned without removing it
|
||
* from the stack. This case can be detected by a `Token` return value
|
||
* instead of an `Array` return value.
|
||
*
|
||
* In either case, the next token will be on the top of the stack,
|
||
* or the stack will be empty.
|
||
*
|
||
* Used to implement `expandAfterFuture` and `expandNextToken`.
|
||
*
|
||
* At the moment, macro expansion doesn't handle delimited macros,
|
||
* i.e. things like those defined by \def\foo#1\end{…}.
|
||
* See the TeX book page 202ff. for details on how those should behave.
|
||
*/
|
||
;
|
||
|
||
_proto.expandOnce = function expandOnce() {
|
||
var topToken = this.popToken();
|
||
var name = topToken.text;
|
||
|
||
var expansion = this._getExpansion(name);
|
||
|
||
if (expansion == null) {
|
||
// mainly checking for undefined here
|
||
// Fully expanded
|
||
this.pushToken(topToken);
|
||
return topToken;
|
||
}
|
||
|
||
this.expansionCount++;
|
||
|
||
if (this.expansionCount > this.settings.maxExpand) {
|
||
throw new src_ParseError("Too many expansions: infinite loop or " + "need to increase maxExpand setting");
|
||
}
|
||
|
||
var tokens = expansion.tokens;
|
||
|
||
if (expansion.numArgs) {
|
||
var args = this.consumeArgs(expansion.numArgs); // paste arguments in place of the placeholders
|
||
|
||
tokens = tokens.slice(); // make a shallow copy
|
||
|
||
for (var i = tokens.length - 1; i >= 0; --i) {
|
||
var tok = tokens[i];
|
||
|
||
if (tok.text === "#") {
|
||
if (i === 0) {
|
||
throw new src_ParseError("Incomplete placeholder at end of macro body", tok);
|
||
}
|
||
|
||
tok = tokens[--i]; // next token on stack
|
||
|
||
if (tok.text === "#") {
|
||
// ## → #
|
||
tokens.splice(i + 1, 1); // drop first #
|
||
} else if (/^[1-9]$/.test(tok.text)) {
|
||
var _tokens;
|
||
|
||
// replace the placeholder with the indicated argument
|
||
(_tokens = tokens).splice.apply(_tokens, [i, 2].concat(args[+tok.text - 1]));
|
||
} else {
|
||
throw new src_ParseError("Not a valid argument number", tok);
|
||
}
|
||
}
|
||
}
|
||
} // Concatenate expansion onto top of stack.
|
||
|
||
|
||
this.pushTokens(tokens);
|
||
return tokens;
|
||
}
|
||
/**
|
||
* Expand the next token only once (if possible), and return the resulting
|
||
* top token on the stack (without removing anything from the stack).
|
||
* Similar in behavior to TeX's `\expandafter\futurelet`.
|
||
* Equivalent to expandOnce() followed by future().
|
||
*/
|
||
;
|
||
|
||
_proto.expandAfterFuture = function expandAfterFuture() {
|
||
this.expandOnce();
|
||
return this.future();
|
||
}
|
||
/**
|
||
* Recursively expand first token, then return first non-expandable token.
|
||
*/
|
||
;
|
||
|
||
_proto.expandNextToken = function expandNextToken() {
|
||
for (;;) {
|
||
var expanded = this.expandOnce(); // expandOnce returns Token if and only if it's fully expanded.
|
||
|
||
if (expanded instanceof Token_Token) {
|
||
// \relax stops the expansion, but shouldn't get returned (a
|
||
// null return value couldn't get implemented as a function).
|
||
if (expanded.text === "\\relax") {
|
||
this.stack.pop();
|
||
} else {
|
||
return this.stack.pop(); // === expanded
|
||
}
|
||
}
|
||
} // Flow unable to figure out that this pathway is impossible.
|
||
// https://github.com/facebook/flow/issues/4808
|
||
|
||
|
||
throw new Error(); // eslint-disable-line no-unreachable
|
||
}
|
||
/**
|
||
* Fully expand the given macro name and return the resulting list of
|
||
* tokens, or return `undefined` if no such macro is defined.
|
||
*/
|
||
;
|
||
|
||
_proto.expandMacro = function expandMacro(name) {
|
||
if (!this.macros.get(name)) {
|
||
return undefined;
|
||
}
|
||
|
||
var output = [];
|
||
var oldStackLength = this.stack.length;
|
||
this.pushToken(new Token_Token(name));
|
||
|
||
while (this.stack.length > oldStackLength) {
|
||
var expanded = this.expandOnce(); // expandOnce returns Token if and only if it's fully expanded.
|
||
|
||
if (expanded instanceof Token_Token) {
|
||
output.push(this.stack.pop());
|
||
}
|
||
}
|
||
|
||
return output;
|
||
}
|
||
/**
|
||
* Fully expand the given macro name and return the result as a string,
|
||
* or return `undefined` if no such macro is defined.
|
||
*/
|
||
;
|
||
|
||
_proto.expandMacroAsText = function expandMacroAsText(name) {
|
||
var tokens = this.expandMacro(name);
|
||
|
||
if (tokens) {
|
||
return tokens.map(function (token) {
|
||
return token.text;
|
||
}).join("");
|
||
} else {
|
||
return tokens;
|
||
}
|
||
}
|
||
/**
|
||
* Returns the expanded macro as a reversed array of tokens and a macro
|
||
* argument count. Or returns `null` if no such macro.
|
||
*/
|
||
;
|
||
|
||
_proto._getExpansion = function _getExpansion(name) {
|
||
var definition = this.macros.get(name);
|
||
|
||
if (definition == null) {
|
||
// mainly checking for undefined here
|
||
return definition;
|
||
}
|
||
|
||
var expansion = typeof definition === "function" ? definition(this) : definition;
|
||
|
||
if (typeof expansion === "string") {
|
||
var numArgs = 0;
|
||
|
||
if (expansion.indexOf("#") !== -1) {
|
||
var stripped = expansion.replace(/##/g, "");
|
||
|
||
while (stripped.indexOf("#" + (numArgs + 1)) !== -1) {
|
||
++numArgs;
|
||
}
|
||
}
|
||
|
||
var bodyLexer = new Lexer_Lexer(expansion, this.settings);
|
||
var tokens = [];
|
||
var tok = bodyLexer.lex();
|
||
|
||
while (tok.text !== "EOF") {
|
||
tokens.push(tok);
|
||
tok = bodyLexer.lex();
|
||
}
|
||
|
||
tokens.reverse(); // to fit in with stack using push and pop
|
||
|
||
var expanded = {
|
||
tokens: tokens,
|
||
numArgs: numArgs
|
||
};
|
||
return expanded;
|
||
}
|
||
|
||
return expansion;
|
||
}
|
||
/**
|
||
* Determine whether a command is currently "defined" (has some
|
||
* functionality), meaning that it's a macro (in the current group),
|
||
* a function, a symbol, or one of the special commands listed in
|
||
* `implicitCommands`.
|
||
*/
|
||
;
|
||
|
||
_proto.isDefined = function isDefined(name) {
|
||
return this.macros.has(name) || src_functions.hasOwnProperty(name) || src_symbols.math.hasOwnProperty(name) || src_symbols.text.hasOwnProperty(name) || implicitCommands.hasOwnProperty(name);
|
||
};
|
||
|
||
return MacroExpander;
|
||
}();
|
||
|
||
|
||
// CONCATENATED MODULE: ./src/unicodeAccents.js
|
||
// Mapping of Unicode accent characters to their LaTeX equivalent in text and
|
||
// math mode (when they exist).
|
||
/* harmony default export */ var unicodeAccents = ({
|
||
"\u0301": {
|
||
text: "\\'",
|
||
math: '\\acute'
|
||
},
|
||
"\u0300": {
|
||
text: '\\`',
|
||
math: '\\grave'
|
||
},
|
||
"\u0308": {
|
||
text: '\\"',
|
||
math: '\\ddot'
|
||
},
|
||
"\u0303": {
|
||
text: '\\~',
|
||
math: '\\tilde'
|
||
},
|
||
"\u0304": {
|
||
text: '\\=',
|
||
math: '\\bar'
|
||
},
|
||
"\u0306": {
|
||
text: "\\u",
|
||
math: '\\breve'
|
||
},
|
||
"\u030C": {
|
||
text: '\\v',
|
||
math: '\\check'
|
||
},
|
||
"\u0302": {
|
||
text: '\\^',
|
||
math: '\\hat'
|
||
},
|
||
"\u0307": {
|
||
text: '\\.',
|
||
math: '\\dot'
|
||
},
|
||
"\u030A": {
|
||
text: '\\r',
|
||
math: '\\mathring'
|
||
},
|
||
"\u030B": {
|
||
text: '\\H'
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/unicodeSymbols.js
|
||
// This file is GENERATED by unicodeMake.js. DO NOT MODIFY.
|
||
/* harmony default export */ var unicodeSymbols = ({
|
||
"\xE1": "a\u0301",
|
||
// á = \'{a}
|
||
"\xE0": "a\u0300",
|
||
// à = \`{a}
|
||
"\xE4": "a\u0308",
|
||
// ä = \"{a}
|
||
"\u01DF": "a\u0308\u0304",
|
||
// ǟ = \"\={a}
|
||
"\xE3": "a\u0303",
|
||
// ã = \~{a}
|
||
"\u0101": "a\u0304",
|
||
// ā = \={a}
|
||
"\u0103": "a\u0306",
|
||
// ă = \u{a}
|
||
"\u1EAF": "a\u0306\u0301",
|
||
// ắ = \u\'{a}
|
||
"\u1EB1": "a\u0306\u0300",
|
||
// ằ = \u\`{a}
|
||
"\u1EB5": "a\u0306\u0303",
|
||
// ẵ = \u\~{a}
|
||
"\u01CE": "a\u030C",
|
||
// ǎ = \v{a}
|
||
"\xE2": "a\u0302",
|
||
// â = \^{a}
|
||
"\u1EA5": "a\u0302\u0301",
|
||
// ấ = \^\'{a}
|
||
"\u1EA7": "a\u0302\u0300",
|
||
// ầ = \^\`{a}
|
||
"\u1EAB": "a\u0302\u0303",
|
||
// ẫ = \^\~{a}
|
||
"\u0227": "a\u0307",
|
||
// ȧ = \.{a}
|
||
"\u01E1": "a\u0307\u0304",
|
||
// ǡ = \.\={a}
|
||
"\xE5": "a\u030A",
|
||
// å = \r{a}
|
||
"\u01FB": "a\u030A\u0301",
|
||
// ǻ = \r\'{a}
|
||
"\u1E03": "b\u0307",
|
||
// ḃ = \.{b}
|
||
"\u0107": "c\u0301",
|
||
// ć = \'{c}
|
||
"\u010D": "c\u030C",
|
||
// č = \v{c}
|
||
"\u0109": "c\u0302",
|
||
// ĉ = \^{c}
|
||
"\u010B": "c\u0307",
|
||
// ċ = \.{c}
|
||
"\u010F": "d\u030C",
|
||
// ď = \v{d}
|
||
"\u1E0B": "d\u0307",
|
||
// ḋ = \.{d}
|
||
"\xE9": "e\u0301",
|
||
// é = \'{e}
|
||
"\xE8": "e\u0300",
|
||
// è = \`{e}
|
||
"\xEB": "e\u0308",
|
||
// ë = \"{e}
|
||
"\u1EBD": "e\u0303",
|
||
// ẽ = \~{e}
|
||
"\u0113": "e\u0304",
|
||
// ē = \={e}
|
||
"\u1E17": "e\u0304\u0301",
|
||
// ḗ = \=\'{e}
|
||
"\u1E15": "e\u0304\u0300",
|
||
// ḕ = \=\`{e}
|
||
"\u0115": "e\u0306",
|
||
// ĕ = \u{e}
|
||
"\u011B": "e\u030C",
|
||
// ě = \v{e}
|
||
"\xEA": "e\u0302",
|
||
// ê = \^{e}
|
||
"\u1EBF": "e\u0302\u0301",
|
||
// ế = \^\'{e}
|
||
"\u1EC1": "e\u0302\u0300",
|
||
// ề = \^\`{e}
|
||
"\u1EC5": "e\u0302\u0303",
|
||
// ễ = \^\~{e}
|
||
"\u0117": "e\u0307",
|
||
// ė = \.{e}
|
||
"\u1E1F": "f\u0307",
|
||
// ḟ = \.{f}
|
||
"\u01F5": "g\u0301",
|
||
// ǵ = \'{g}
|
||
"\u1E21": "g\u0304",
|
||
// ḡ = \={g}
|
||
"\u011F": "g\u0306",
|
||
// ğ = \u{g}
|
||
"\u01E7": "g\u030C",
|
||
// ǧ = \v{g}
|
||
"\u011D": "g\u0302",
|
||
// ĝ = \^{g}
|
||
"\u0121": "g\u0307",
|
||
// ġ = \.{g}
|
||
"\u1E27": "h\u0308",
|
||
// ḧ = \"{h}
|
||
"\u021F": "h\u030C",
|
||
// ȟ = \v{h}
|
||
"\u0125": "h\u0302",
|
||
// ĥ = \^{h}
|
||
"\u1E23": "h\u0307",
|
||
// ḣ = \.{h}
|
||
"\xED": "i\u0301",
|
||
// í = \'{i}
|
||
"\xEC": "i\u0300",
|
||
// ì = \`{i}
|
||
"\xEF": "i\u0308",
|
||
// ï = \"{i}
|
||
"\u1E2F": "i\u0308\u0301",
|
||
// ḯ = \"\'{i}
|
||
"\u0129": "i\u0303",
|
||
// ĩ = \~{i}
|
||
"\u012B": "i\u0304",
|
||
// ī = \={i}
|
||
"\u012D": "i\u0306",
|
||
// ĭ = \u{i}
|
||
"\u01D0": "i\u030C",
|
||
// ǐ = \v{i}
|
||
"\xEE": "i\u0302",
|
||
// î = \^{i}
|
||
"\u01F0": "j\u030C",
|
||
// ǰ = \v{j}
|
||
"\u0135": "j\u0302",
|
||
// ĵ = \^{j}
|
||
"\u1E31": "k\u0301",
|
||
// ḱ = \'{k}
|
||
"\u01E9": "k\u030C",
|
||
// ǩ = \v{k}
|
||
"\u013A": "l\u0301",
|
||
// ĺ = \'{l}
|
||
"\u013E": "l\u030C",
|
||
// ľ = \v{l}
|
||
"\u1E3F": "m\u0301",
|
||
// ḿ = \'{m}
|
||
"\u1E41": "m\u0307",
|
||
// ṁ = \.{m}
|
||
"\u0144": "n\u0301",
|
||
// ń = \'{n}
|
||
"\u01F9": "n\u0300",
|
||
// ǹ = \`{n}
|
||
"\xF1": "n\u0303",
|
||
// ñ = \~{n}
|
||
"\u0148": "n\u030C",
|
||
// ň = \v{n}
|
||
"\u1E45": "n\u0307",
|
||
// ṅ = \.{n}
|
||
"\xF3": "o\u0301",
|
||
// ó = \'{o}
|
||
"\xF2": "o\u0300",
|
||
// ò = \`{o}
|
||
"\xF6": "o\u0308",
|
||
// ö = \"{o}
|
||
"\u022B": "o\u0308\u0304",
|
||
// ȫ = \"\={o}
|
||
"\xF5": "o\u0303",
|
||
// õ = \~{o}
|
||
"\u1E4D": "o\u0303\u0301",
|
||
// ṍ = \~\'{o}
|
||
"\u1E4F": "o\u0303\u0308",
|
||
// ṏ = \~\"{o}
|
||
"\u022D": "o\u0303\u0304",
|
||
// ȭ = \~\={o}
|
||
"\u014D": "o\u0304",
|
||
// ō = \={o}
|
||
"\u1E53": "o\u0304\u0301",
|
||
// ṓ = \=\'{o}
|
||
"\u1E51": "o\u0304\u0300",
|
||
// ṑ = \=\`{o}
|
||
"\u014F": "o\u0306",
|
||
// ŏ = \u{o}
|
||
"\u01D2": "o\u030C",
|
||
// ǒ = \v{o}
|
||
"\xF4": "o\u0302",
|
||
// ô = \^{o}
|
||
"\u1ED1": "o\u0302\u0301",
|
||
// ố = \^\'{o}
|
||
"\u1ED3": "o\u0302\u0300",
|
||
// ồ = \^\`{o}
|
||
"\u1ED7": "o\u0302\u0303",
|
||
// ỗ = \^\~{o}
|
||
"\u022F": "o\u0307",
|
||
// ȯ = \.{o}
|
||
"\u0231": "o\u0307\u0304",
|
||
// ȱ = \.\={o}
|
||
"\u0151": "o\u030B",
|
||
// ő = \H{o}
|
||
"\u1E55": "p\u0301",
|
||
// ṕ = \'{p}
|
||
"\u1E57": "p\u0307",
|
||
// ṗ = \.{p}
|
||
"\u0155": "r\u0301",
|
||
// ŕ = \'{r}
|
||
"\u0159": "r\u030C",
|
||
// ř = \v{r}
|
||
"\u1E59": "r\u0307",
|
||
// ṙ = \.{r}
|
||
"\u015B": "s\u0301",
|
||
// ś = \'{s}
|
||
"\u1E65": "s\u0301\u0307",
|
||
// ṥ = \'\.{s}
|
||
"\u0161": "s\u030C",
|
||
// š = \v{s}
|
||
"\u1E67": "s\u030C\u0307",
|
||
// ṧ = \v\.{s}
|
||
"\u015D": "s\u0302",
|
||
// ŝ = \^{s}
|
||
"\u1E61": "s\u0307",
|
||
// ṡ = \.{s}
|
||
"\u1E97": "t\u0308",
|
||
// ẗ = \"{t}
|
||
"\u0165": "t\u030C",
|
||
// ť = \v{t}
|
||
"\u1E6B": "t\u0307",
|
||
// ṫ = \.{t}
|
||
"\xFA": "u\u0301",
|
||
// ú = \'{u}
|
||
"\xF9": "u\u0300",
|
||
// ù = \`{u}
|
||
"\xFC": "u\u0308",
|
||
// ü = \"{u}
|
||
"\u01D8": "u\u0308\u0301",
|
||
// ǘ = \"\'{u}
|
||
"\u01DC": "u\u0308\u0300",
|
||
// ǜ = \"\`{u}
|
||
"\u01D6": "u\u0308\u0304",
|
||
// ǖ = \"\={u}
|
||
"\u01DA": "u\u0308\u030C",
|
||
// ǚ = \"\v{u}
|
||
"\u0169": "u\u0303",
|
||
// ũ = \~{u}
|
||
"\u1E79": "u\u0303\u0301",
|
||
// ṹ = \~\'{u}
|
||
"\u016B": "u\u0304",
|
||
// ū = \={u}
|
||
"\u1E7B": "u\u0304\u0308",
|
||
// ṻ = \=\"{u}
|
||
"\u016D": "u\u0306",
|
||
// ŭ = \u{u}
|
||
"\u01D4": "u\u030C",
|
||
// ǔ = \v{u}
|
||
"\xFB": "u\u0302",
|
||
// û = \^{u}
|
||
"\u016F": "u\u030A",
|
||
// ů = \r{u}
|
||
"\u0171": "u\u030B",
|
||
// ű = \H{u}
|
||
"\u1E7D": "v\u0303",
|
||
// ṽ = \~{v}
|
||
"\u1E83": "w\u0301",
|
||
// ẃ = \'{w}
|
||
"\u1E81": "w\u0300",
|
||
// ẁ = \`{w}
|
||
"\u1E85": "w\u0308",
|
||
// ẅ = \"{w}
|
||
"\u0175": "w\u0302",
|
||
// ŵ = \^{w}
|
||
"\u1E87": "w\u0307",
|
||
// ẇ = \.{w}
|
||
"\u1E98": "w\u030A",
|
||
// ẘ = \r{w}
|
||
"\u1E8D": "x\u0308",
|
||
// ẍ = \"{x}
|
||
"\u1E8B": "x\u0307",
|
||
// ẋ = \.{x}
|
||
"\xFD": "y\u0301",
|
||
// ý = \'{y}
|
||
"\u1EF3": "y\u0300",
|
||
// ỳ = \`{y}
|
||
"\xFF": "y\u0308",
|
||
// ÿ = \"{y}
|
||
"\u1EF9": "y\u0303",
|
||
// ỹ = \~{y}
|
||
"\u0233": "y\u0304",
|
||
// ȳ = \={y}
|
||
"\u0177": "y\u0302",
|
||
// ŷ = \^{y}
|
||
"\u1E8F": "y\u0307",
|
||
// ẏ = \.{y}
|
||
"\u1E99": "y\u030A",
|
||
// ẙ = \r{y}
|
||
"\u017A": "z\u0301",
|
||
// ź = \'{z}
|
||
"\u017E": "z\u030C",
|
||
// ž = \v{z}
|
||
"\u1E91": "z\u0302",
|
||
// ẑ = \^{z}
|
||
"\u017C": "z\u0307",
|
||
// ż = \.{z}
|
||
"\xC1": "A\u0301",
|
||
// Á = \'{A}
|
||
"\xC0": "A\u0300",
|
||
// À = \`{A}
|
||
"\xC4": "A\u0308",
|
||
// Ä = \"{A}
|
||
"\u01DE": "A\u0308\u0304",
|
||
// Ǟ = \"\={A}
|
||
"\xC3": "A\u0303",
|
||
// Ã = \~{A}
|
||
"\u0100": "A\u0304",
|
||
// Ā = \={A}
|
||
"\u0102": "A\u0306",
|
||
// Ă = \u{A}
|
||
"\u1EAE": "A\u0306\u0301",
|
||
// Ắ = \u\'{A}
|
||
"\u1EB0": "A\u0306\u0300",
|
||
// Ằ = \u\`{A}
|
||
"\u1EB4": "A\u0306\u0303",
|
||
// Ẵ = \u\~{A}
|
||
"\u01CD": "A\u030C",
|
||
// Ǎ = \v{A}
|
||
"\xC2": "A\u0302",
|
||
// Â = \^{A}
|
||
"\u1EA4": "A\u0302\u0301",
|
||
// Ấ = \^\'{A}
|
||
"\u1EA6": "A\u0302\u0300",
|
||
// Ầ = \^\`{A}
|
||
"\u1EAA": "A\u0302\u0303",
|
||
// Ẫ = \^\~{A}
|
||
"\u0226": "A\u0307",
|
||
// Ȧ = \.{A}
|
||
"\u01E0": "A\u0307\u0304",
|
||
// Ǡ = \.\={A}
|
||
"\xC5": "A\u030A",
|
||
// Å = \r{A}
|
||
"\u01FA": "A\u030A\u0301",
|
||
// Ǻ = \r\'{A}
|
||
"\u1E02": "B\u0307",
|
||
// Ḃ = \.{B}
|
||
"\u0106": "C\u0301",
|
||
// Ć = \'{C}
|
||
"\u010C": "C\u030C",
|
||
// Č = \v{C}
|
||
"\u0108": "C\u0302",
|
||
// Ĉ = \^{C}
|
||
"\u010A": "C\u0307",
|
||
// Ċ = \.{C}
|
||
"\u010E": "D\u030C",
|
||
// Ď = \v{D}
|
||
"\u1E0A": "D\u0307",
|
||
// Ḋ = \.{D}
|
||
"\xC9": "E\u0301",
|
||
// É = \'{E}
|
||
"\xC8": "E\u0300",
|
||
// È = \`{E}
|
||
"\xCB": "E\u0308",
|
||
// Ë = \"{E}
|
||
"\u1EBC": "E\u0303",
|
||
// Ẽ = \~{E}
|
||
"\u0112": "E\u0304",
|
||
// Ē = \={E}
|
||
"\u1E16": "E\u0304\u0301",
|
||
// Ḗ = \=\'{E}
|
||
"\u1E14": "E\u0304\u0300",
|
||
// Ḕ = \=\`{E}
|
||
"\u0114": "E\u0306",
|
||
// Ĕ = \u{E}
|
||
"\u011A": "E\u030C",
|
||
// Ě = \v{E}
|
||
"\xCA": "E\u0302",
|
||
// Ê = \^{E}
|
||
"\u1EBE": "E\u0302\u0301",
|
||
// Ế = \^\'{E}
|
||
"\u1EC0": "E\u0302\u0300",
|
||
// Ề = \^\`{E}
|
||
"\u1EC4": "E\u0302\u0303",
|
||
// Ễ = \^\~{E}
|
||
"\u0116": "E\u0307",
|
||
// Ė = \.{E}
|
||
"\u1E1E": "F\u0307",
|
||
// Ḟ = \.{F}
|
||
"\u01F4": "G\u0301",
|
||
// Ǵ = \'{G}
|
||
"\u1E20": "G\u0304",
|
||
// Ḡ = \={G}
|
||
"\u011E": "G\u0306",
|
||
// Ğ = \u{G}
|
||
"\u01E6": "G\u030C",
|
||
// Ǧ = \v{G}
|
||
"\u011C": "G\u0302",
|
||
// Ĝ = \^{G}
|
||
"\u0120": "G\u0307",
|
||
// Ġ = \.{G}
|
||
"\u1E26": "H\u0308",
|
||
// Ḧ = \"{H}
|
||
"\u021E": "H\u030C",
|
||
// Ȟ = \v{H}
|
||
"\u0124": "H\u0302",
|
||
// Ĥ = \^{H}
|
||
"\u1E22": "H\u0307",
|
||
// Ḣ = \.{H}
|
||
"\xCD": "I\u0301",
|
||
// Í = \'{I}
|
||
"\xCC": "I\u0300",
|
||
// Ì = \`{I}
|
||
"\xCF": "I\u0308",
|
||
// Ï = \"{I}
|
||
"\u1E2E": "I\u0308\u0301",
|
||
// Ḯ = \"\'{I}
|
||
"\u0128": "I\u0303",
|
||
// Ĩ = \~{I}
|
||
"\u012A": "I\u0304",
|
||
// Ī = \={I}
|
||
"\u012C": "I\u0306",
|
||
// Ĭ = \u{I}
|
||
"\u01CF": "I\u030C",
|
||
// Ǐ = \v{I}
|
||
"\xCE": "I\u0302",
|
||
// Î = \^{I}
|
||
"\u0130": "I\u0307",
|
||
// İ = \.{I}
|
||
"\u0134": "J\u0302",
|
||
// Ĵ = \^{J}
|
||
"\u1E30": "K\u0301",
|
||
// Ḱ = \'{K}
|
||
"\u01E8": "K\u030C",
|
||
// Ǩ = \v{K}
|
||
"\u0139": "L\u0301",
|
||
// Ĺ = \'{L}
|
||
"\u013D": "L\u030C",
|
||
// Ľ = \v{L}
|
||
"\u1E3E": "M\u0301",
|
||
// Ḿ = \'{M}
|
||
"\u1E40": "M\u0307",
|
||
// Ṁ = \.{M}
|
||
"\u0143": "N\u0301",
|
||
// Ń = \'{N}
|
||
"\u01F8": "N\u0300",
|
||
// Ǹ = \`{N}
|
||
"\xD1": "N\u0303",
|
||
// Ñ = \~{N}
|
||
"\u0147": "N\u030C",
|
||
// Ň = \v{N}
|
||
"\u1E44": "N\u0307",
|
||
// Ṅ = \.{N}
|
||
"\xD3": "O\u0301",
|
||
// Ó = \'{O}
|
||
"\xD2": "O\u0300",
|
||
// Ò = \`{O}
|
||
"\xD6": "O\u0308",
|
||
// Ö = \"{O}
|
||
"\u022A": "O\u0308\u0304",
|
||
// Ȫ = \"\={O}
|
||
"\xD5": "O\u0303",
|
||
// Õ = \~{O}
|
||
"\u1E4C": "O\u0303\u0301",
|
||
// Ṍ = \~\'{O}
|
||
"\u1E4E": "O\u0303\u0308",
|
||
// Ṏ = \~\"{O}
|
||
"\u022C": "O\u0303\u0304",
|
||
// Ȭ = \~\={O}
|
||
"\u014C": "O\u0304",
|
||
// Ō = \={O}
|
||
"\u1E52": "O\u0304\u0301",
|
||
// Ṓ = \=\'{O}
|
||
"\u1E50": "O\u0304\u0300",
|
||
// Ṑ = \=\`{O}
|
||
"\u014E": "O\u0306",
|
||
// Ŏ = \u{O}
|
||
"\u01D1": "O\u030C",
|
||
// Ǒ = \v{O}
|
||
"\xD4": "O\u0302",
|
||
// Ô = \^{O}
|
||
"\u1ED0": "O\u0302\u0301",
|
||
// Ố = \^\'{O}
|
||
"\u1ED2": "O\u0302\u0300",
|
||
// Ồ = \^\`{O}
|
||
"\u1ED6": "O\u0302\u0303",
|
||
// Ỗ = \^\~{O}
|
||
"\u022E": "O\u0307",
|
||
// Ȯ = \.{O}
|
||
"\u0230": "O\u0307\u0304",
|
||
// Ȱ = \.\={O}
|
||
"\u0150": "O\u030B",
|
||
// Ő = \H{O}
|
||
"\u1E54": "P\u0301",
|
||
// Ṕ = \'{P}
|
||
"\u1E56": "P\u0307",
|
||
// Ṗ = \.{P}
|
||
"\u0154": "R\u0301",
|
||
// Ŕ = \'{R}
|
||
"\u0158": "R\u030C",
|
||
// Ř = \v{R}
|
||
"\u1E58": "R\u0307",
|
||
// Ṙ = \.{R}
|
||
"\u015A": "S\u0301",
|
||
// Ś = \'{S}
|
||
"\u1E64": "S\u0301\u0307",
|
||
// Ṥ = \'\.{S}
|
||
"\u0160": "S\u030C",
|
||
// Š = \v{S}
|
||
"\u1E66": "S\u030C\u0307",
|
||
// Ṧ = \v\.{S}
|
||
"\u015C": "S\u0302",
|
||
// Ŝ = \^{S}
|
||
"\u1E60": "S\u0307",
|
||
// Ṡ = \.{S}
|
||
"\u0164": "T\u030C",
|
||
// Ť = \v{T}
|
||
"\u1E6A": "T\u0307",
|
||
// Ṫ = \.{T}
|
||
"\xDA": "U\u0301",
|
||
// Ú = \'{U}
|
||
"\xD9": "U\u0300",
|
||
// Ù = \`{U}
|
||
"\xDC": "U\u0308",
|
||
// Ü = \"{U}
|
||
"\u01D7": "U\u0308\u0301",
|
||
// Ǘ = \"\'{U}
|
||
"\u01DB": "U\u0308\u0300",
|
||
// Ǜ = \"\`{U}
|
||
"\u01D5": "U\u0308\u0304",
|
||
// Ǖ = \"\={U}
|
||
"\u01D9": "U\u0308\u030C",
|
||
// Ǚ = \"\v{U}
|
||
"\u0168": "U\u0303",
|
||
// Ũ = \~{U}
|
||
"\u1E78": "U\u0303\u0301",
|
||
// Ṹ = \~\'{U}
|
||
"\u016A": "U\u0304",
|
||
// Ū = \={U}
|
||
"\u1E7A": "U\u0304\u0308",
|
||
// Ṻ = \=\"{U}
|
||
"\u016C": "U\u0306",
|
||
// Ŭ = \u{U}
|
||
"\u01D3": "U\u030C",
|
||
// Ǔ = \v{U}
|
||
"\xDB": "U\u0302",
|
||
// Û = \^{U}
|
||
"\u016E": "U\u030A",
|
||
// Ů = \r{U}
|
||
"\u0170": "U\u030B",
|
||
// Ű = \H{U}
|
||
"\u1E7C": "V\u0303",
|
||
// Ṽ = \~{V}
|
||
"\u1E82": "W\u0301",
|
||
// Ẃ = \'{W}
|
||
"\u1E80": "W\u0300",
|
||
// Ẁ = \`{W}
|
||
"\u1E84": "W\u0308",
|
||
// Ẅ = \"{W}
|
||
"\u0174": "W\u0302",
|
||
// Ŵ = \^{W}
|
||
"\u1E86": "W\u0307",
|
||
// Ẇ = \.{W}
|
||
"\u1E8C": "X\u0308",
|
||
// Ẍ = \"{X}
|
||
"\u1E8A": "X\u0307",
|
||
// Ẋ = \.{X}
|
||
"\xDD": "Y\u0301",
|
||
// Ý = \'{Y}
|
||
"\u1EF2": "Y\u0300",
|
||
// Ỳ = \`{Y}
|
||
"\u0178": "Y\u0308",
|
||
// Ÿ = \"{Y}
|
||
"\u1EF8": "Y\u0303",
|
||
// Ỹ = \~{Y}
|
||
"\u0232": "Y\u0304",
|
||
// Ȳ = \={Y}
|
||
"\u0176": "Y\u0302",
|
||
// Ŷ = \^{Y}
|
||
"\u1E8E": "Y\u0307",
|
||
// Ẏ = \.{Y}
|
||
"\u0179": "Z\u0301",
|
||
// Ź = \'{Z}
|
||
"\u017D": "Z\u030C",
|
||
// Ž = \v{Z}
|
||
"\u1E90": "Z\u0302",
|
||
// Ẑ = \^{Z}
|
||
"\u017B": "Z\u0307",
|
||
// Ż = \.{Z}
|
||
"\u03AC": "\u03B1\u0301",
|
||
// ά = \'{α}
|
||
"\u1F70": "\u03B1\u0300",
|
||
// ὰ = \`{α}
|
||
"\u1FB1": "\u03B1\u0304",
|
||
// ᾱ = \={α}
|
||
"\u1FB0": "\u03B1\u0306",
|
||
// ᾰ = \u{α}
|
||
"\u03AD": "\u03B5\u0301",
|
||
// έ = \'{ε}
|
||
"\u1F72": "\u03B5\u0300",
|
||
// ὲ = \`{ε}
|
||
"\u03AE": "\u03B7\u0301",
|
||
// ή = \'{η}
|
||
"\u1F74": "\u03B7\u0300",
|
||
// ὴ = \`{η}
|
||
"\u03AF": "\u03B9\u0301",
|
||
// ί = \'{ι}
|
||
"\u1F76": "\u03B9\u0300",
|
||
// ὶ = \`{ι}
|
||
"\u03CA": "\u03B9\u0308",
|
||
// ϊ = \"{ι}
|
||
"\u0390": "\u03B9\u0308\u0301",
|
||
// ΐ = \"\'{ι}
|
||
"\u1FD2": "\u03B9\u0308\u0300",
|
||
// ῒ = \"\`{ι}
|
||
"\u1FD1": "\u03B9\u0304",
|
||
// ῑ = \={ι}
|
||
"\u1FD0": "\u03B9\u0306",
|
||
// ῐ = \u{ι}
|
||
"\u03CC": "\u03BF\u0301",
|
||
// ό = \'{ο}
|
||
"\u1F78": "\u03BF\u0300",
|
||
// ὸ = \`{ο}
|
||
"\u03CD": "\u03C5\u0301",
|
||
// ύ = \'{υ}
|
||
"\u1F7A": "\u03C5\u0300",
|
||
// ὺ = \`{υ}
|
||
"\u03CB": "\u03C5\u0308",
|
||
// ϋ = \"{υ}
|
||
"\u03B0": "\u03C5\u0308\u0301",
|
||
// ΰ = \"\'{υ}
|
||
"\u1FE2": "\u03C5\u0308\u0300",
|
||
// ῢ = \"\`{υ}
|
||
"\u1FE1": "\u03C5\u0304",
|
||
// ῡ = \={υ}
|
||
"\u1FE0": "\u03C5\u0306",
|
||
// ῠ = \u{υ}
|
||
"\u03CE": "\u03C9\u0301",
|
||
// ώ = \'{ω}
|
||
"\u1F7C": "\u03C9\u0300",
|
||
// ὼ = \`{ω}
|
||
"\u038E": "\u03A5\u0301",
|
||
// Ύ = \'{Υ}
|
||
"\u1FEA": "\u03A5\u0300",
|
||
// Ὺ = \`{Υ}
|
||
"\u03AB": "\u03A5\u0308",
|
||
// Ϋ = \"{Υ}
|
||
"\u1FE9": "\u03A5\u0304",
|
||
// Ῡ = \={Υ}
|
||
"\u1FE8": "\u03A5\u0306",
|
||
// Ῠ = \u{Υ}
|
||
"\u038F": "\u03A9\u0301",
|
||
// Ώ = \'{Ω}
|
||
"\u1FFA": "\u03A9\u0300" // Ὼ = \`{Ω}
|
||
|
||
});
|
||
// CONCATENATED MODULE: ./src/Parser.js
|
||
/* eslint no-constant-condition:0 */
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* This file contains the parser used to parse out a TeX expression from the
|
||
* input. Since TeX isn't context-free, standard parsers don't work particularly
|
||
* well.
|
||
*
|
||
* The strategy of this parser is as such:
|
||
*
|
||
* The main functions (the `.parse...` ones) take a position in the current
|
||
* parse string to parse tokens from. The lexer (found in Lexer.js, stored at
|
||
* this.gullet.lexer) also supports pulling out tokens at arbitrary places. When
|
||
* individual tokens are needed at a position, the lexer is called to pull out a
|
||
* token, which is then used.
|
||
*
|
||
* The parser has a property called "mode" indicating the mode that
|
||
* the parser is currently in. Currently it has to be one of "math" or
|
||
* "text", which denotes whether the current environment is a math-y
|
||
* one or a text-y one (e.g. inside \text). Currently, this serves to
|
||
* limit the functions which can be used in text mode.
|
||
*
|
||
* The main functions then return an object which contains the useful data that
|
||
* was parsed at its given point, and a new position at the end of the parsed
|
||
* data. The main functions can call each other and continue the parsing by
|
||
* using the returned position as a new starting point.
|
||
*
|
||
* There are also extra `.handle...` functions, which pull out some reused
|
||
* functionality into self-contained functions.
|
||
*
|
||
* The functions return ParseNodes.
|
||
*/
|
||
var Parser_Parser =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function Parser(input, settings) {
|
||
this.mode = void 0;
|
||
this.gullet = void 0;
|
||
this.settings = void 0;
|
||
this.leftrightDepth = void 0;
|
||
this.nextToken = void 0;
|
||
// Start in math mode
|
||
this.mode = "math"; // Create a new macro expander (gullet) and (indirectly via that) also a
|
||
// new lexer (mouth) for this parser (stomach, in the language of TeX)
|
||
|
||
this.gullet = new MacroExpander_MacroExpander(input, settings, this.mode); // Store the settings for use in parsing
|
||
|
||
this.settings = settings; // Count leftright depth (for \middle errors)
|
||
|
||
this.leftrightDepth = 0;
|
||
}
|
||
/**
|
||
* Checks a result to make sure it has the right type, and throws an
|
||
* appropriate error otherwise.
|
||
*/
|
||
|
||
|
||
var _proto = Parser.prototype;
|
||
|
||
_proto.expect = function expect(text, consume) {
|
||
if (consume === void 0) {
|
||
consume = true;
|
||
}
|
||
|
||
if (this.fetch().text !== text) {
|
||
throw new src_ParseError("Expected '" + text + "', got '" + this.fetch().text + "'", this.fetch());
|
||
}
|
||
|
||
if (consume) {
|
||
this.consume();
|
||
}
|
||
}
|
||
/**
|
||
* Discards the current lookahead token, considering it consumed.
|
||
*/
|
||
;
|
||
|
||
_proto.consume = function consume() {
|
||
this.nextToken = null;
|
||
}
|
||
/**
|
||
* Return the current lookahead token, or if there isn't one (at the
|
||
* beginning, or if the previous lookahead token was consume()d),
|
||
* fetch the next token as the new lookahead token and return it.
|
||
*/
|
||
;
|
||
|
||
_proto.fetch = function fetch() {
|
||
if (this.nextToken == null) {
|
||
this.nextToken = this.gullet.expandNextToken();
|
||
}
|
||
|
||
return this.nextToken;
|
||
}
|
||
/**
|
||
* Switches between "text" and "math" modes.
|
||
*/
|
||
;
|
||
|
||
_proto.switchMode = function switchMode(newMode) {
|
||
this.mode = newMode;
|
||
this.gullet.switchMode(newMode);
|
||
}
|
||
/**
|
||
* Main parsing function, which parses an entire input.
|
||
*/
|
||
;
|
||
|
||
_proto.parse = function parse() {
|
||
// Create a group namespace for the math expression.
|
||
// (LaTeX creates a new group for every $...$, $$...$$, \[...\].)
|
||
this.gullet.beginGroup(); // Use old \color behavior (same as LaTeX's \textcolor) if requested.
|
||
// We do this within the group for the math expression, so it doesn't
|
||
// pollute settings.macros.
|
||
|
||
if (this.settings.colorIsTextColor) {
|
||
this.gullet.macros.set("\\color", "\\textcolor");
|
||
} // Try to parse the input
|
||
|
||
|
||
var parse = this.parseExpression(false); // If we succeeded, make sure there's an EOF at the end
|
||
|
||
this.expect("EOF"); // End the group namespace for the expression
|
||
|
||
this.gullet.endGroup();
|
||
return parse;
|
||
};
|
||
|
||
_proto.parseExpression = function parseExpression(breakOnInfix, breakOnTokenText) {
|
||
var body = []; // Keep adding atoms to the body until we can't parse any more atoms (either
|
||
// we reached the end, a }, or a \right)
|
||
|
||
while (true) {
|
||
// Ignore spaces in math mode
|
||
if (this.mode === "math") {
|
||
this.consumeSpaces();
|
||
}
|
||
|
||
var lex = this.fetch();
|
||
|
||
if (Parser.endOfExpression.indexOf(lex.text) !== -1) {
|
||
break;
|
||
}
|
||
|
||
if (breakOnTokenText && lex.text === breakOnTokenText) {
|
||
break;
|
||
}
|
||
|
||
if (breakOnInfix && src_functions[lex.text] && src_functions[lex.text].infix) {
|
||
break;
|
||
}
|
||
|
||
var atom = this.parseAtom(breakOnTokenText);
|
||
|
||
if (!atom) {
|
||
break;
|
||
}
|
||
|
||
body.push(atom);
|
||
}
|
||
|
||
if (this.mode === "text") {
|
||
this.formLigatures(body);
|
||
}
|
||
|
||
return this.handleInfixNodes(body);
|
||
}
|
||
/**
|
||
* Rewrites infix operators such as \over with corresponding commands such
|
||
* as \frac.
|
||
*
|
||
* There can only be one infix operator per group. If there's more than one
|
||
* then the expression is ambiguous. This can be resolved by adding {}.
|
||
*/
|
||
;
|
||
|
||
_proto.handleInfixNodes = function handleInfixNodes(body) {
|
||
var overIndex = -1;
|
||
var funcName;
|
||
|
||
for (var i = 0; i < body.length; i++) {
|
||
var node = checkNodeType(body[i], "infix");
|
||
|
||
if (node) {
|
||
if (overIndex !== -1) {
|
||
throw new src_ParseError("only one infix operator per group", node.token);
|
||
}
|
||
|
||
overIndex = i;
|
||
funcName = node.replaceWith;
|
||
}
|
||
}
|
||
|
||
if (overIndex !== -1 && funcName) {
|
||
var numerNode;
|
||
var denomNode;
|
||
var numerBody = body.slice(0, overIndex);
|
||
var denomBody = body.slice(overIndex + 1);
|
||
|
||
if (numerBody.length === 1 && numerBody[0].type === "ordgroup") {
|
||
numerNode = numerBody[0];
|
||
} else {
|
||
numerNode = {
|
||
type: "ordgroup",
|
||
mode: this.mode,
|
||
body: numerBody
|
||
};
|
||
}
|
||
|
||
if (denomBody.length === 1 && denomBody[0].type === "ordgroup") {
|
||
denomNode = denomBody[0];
|
||
} else {
|
||
denomNode = {
|
||
type: "ordgroup",
|
||
mode: this.mode,
|
||
body: denomBody
|
||
};
|
||
}
|
||
|
||
var _node;
|
||
|
||
if (funcName === "\\\\abovefrac") {
|
||
_node = this.callFunction(funcName, [numerNode, body[overIndex], denomNode], []);
|
||
} else {
|
||
_node = this.callFunction(funcName, [numerNode, denomNode], []);
|
||
}
|
||
|
||
return [_node];
|
||
} else {
|
||
return body;
|
||
}
|
||
} // The greediness of a superscript or subscript
|
||
;
|
||
|
||
/**
|
||
* Handle a subscript or superscript with nice errors.
|
||
*/
|
||
_proto.handleSupSubscript = function handleSupSubscript(name) {
|
||
var symbolToken = this.fetch();
|
||
var symbol = symbolToken.text;
|
||
this.consume();
|
||
var group = this.parseGroup(name, false, Parser.SUPSUB_GREEDINESS, undefined, undefined, true); // ignore spaces before sup/subscript argument
|
||
|
||
if (!group) {
|
||
throw new src_ParseError("Expected group after '" + symbol + "'", symbolToken);
|
||
}
|
||
|
||
return group;
|
||
}
|
||
/**
|
||
* Converts the textual input of an unsupported command into a text node
|
||
* contained within a color node whose color is determined by errorColor
|
||
*/
|
||
;
|
||
|
||
_proto.formatUnsupportedCmd = function formatUnsupportedCmd(text) {
|
||
var textordArray = [];
|
||
|
||
for (var i = 0; i < text.length; i++) {
|
||
textordArray.push({
|
||
type: "textord",
|
||
mode: "text",
|
||
text: text[i]
|
||
});
|
||
}
|
||
|
||
var textNode = {
|
||
type: "text",
|
||
mode: this.mode,
|
||
body: textordArray
|
||
};
|
||
var colorNode = {
|
||
type: "color",
|
||
mode: this.mode,
|
||
color: this.settings.errorColor,
|
||
body: [textNode]
|
||
};
|
||
return colorNode;
|
||
}
|
||
/**
|
||
* Parses a group with optional super/subscripts.
|
||
*/
|
||
;
|
||
|
||
_proto.parseAtom = function parseAtom(breakOnTokenText) {
|
||
// The body of an atom is an implicit group, so that things like
|
||
// \left(x\right)^2 work correctly.
|
||
var base = this.parseGroup("atom", false, null, breakOnTokenText); // In text mode, we don't have superscripts or subscripts
|
||
|
||
if (this.mode === "text") {
|
||
return base;
|
||
} // Note that base may be empty (i.e. null) at this point.
|
||
|
||
|
||
var superscript;
|
||
var subscript;
|
||
|
||
while (true) {
|
||
// Guaranteed in math mode, so eat any spaces first.
|
||
this.consumeSpaces(); // Lex the first token
|
||
|
||
var lex = this.fetch();
|
||
|
||
if (lex.text === "\\limits" || lex.text === "\\nolimits") {
|
||
// We got a limit control
|
||
var opNode = checkNodeType(base, "op");
|
||
|
||
if (opNode) {
|
||
var limits = lex.text === "\\limits";
|
||
opNode.limits = limits;
|
||
opNode.alwaysHandleSupSub = true;
|
||
} else {
|
||
opNode = checkNodeType(base, "operatorname");
|
||
|
||
if (opNode && opNode.alwaysHandleSupSub) {
|
||
var _limits = lex.text === "\\limits";
|
||
|
||
opNode.limits = _limits;
|
||
} else {
|
||
throw new src_ParseError("Limit controls must follow a math operator", lex);
|
||
}
|
||
}
|
||
|
||
this.consume();
|
||
} else if (lex.text === "^") {
|
||
// We got a superscript start
|
||
if (superscript) {
|
||
throw new src_ParseError("Double superscript", lex);
|
||
}
|
||
|
||
superscript = this.handleSupSubscript("superscript");
|
||
} else if (lex.text === "_") {
|
||
// We got a subscript start
|
||
if (subscript) {
|
||
throw new src_ParseError("Double subscript", lex);
|
||
}
|
||
|
||
subscript = this.handleSupSubscript("subscript");
|
||
} else if (lex.text === "'") {
|
||
// We got a prime
|
||
if (superscript) {
|
||
throw new src_ParseError("Double superscript", lex);
|
||
}
|
||
|
||
var prime = {
|
||
type: "textord",
|
||
mode: this.mode,
|
||
text: "\\prime"
|
||
}; // Many primes can be grouped together, so we handle this here
|
||
|
||
var primes = [prime];
|
||
this.consume(); // Keep lexing tokens until we get something that's not a prime
|
||
|
||
while (this.fetch().text === "'") {
|
||
// For each one, add another prime to the list
|
||
primes.push(prime);
|
||
this.consume();
|
||
} // If there's a superscript following the primes, combine that
|
||
// superscript in with the primes.
|
||
|
||
|
||
if (this.fetch().text === "^") {
|
||
primes.push(this.handleSupSubscript("superscript"));
|
||
} // Put everything into an ordgroup as the superscript
|
||
|
||
|
||
superscript = {
|
||
type: "ordgroup",
|
||
mode: this.mode,
|
||
body: primes
|
||
};
|
||
} else {
|
||
// If it wasn't ^, _, or ', stop parsing super/subscripts
|
||
break;
|
||
}
|
||
} // Base must be set if superscript or subscript are set per logic above,
|
||
// but need to check here for type check to pass.
|
||
|
||
|
||
if (superscript || subscript) {
|
||
// If we got either a superscript or subscript, create a supsub
|
||
return {
|
||
type: "supsub",
|
||
mode: this.mode,
|
||
base: base,
|
||
sup: superscript,
|
||
sub: subscript
|
||
};
|
||
} else {
|
||
// Otherwise return the original body
|
||
return base;
|
||
}
|
||
}
|
||
/**
|
||
* Parses an entire function, including its base and all of its arguments.
|
||
*/
|
||
;
|
||
|
||
_proto.parseFunction = function parseFunction(breakOnTokenText, name, // For error reporting.
|
||
greediness) {
|
||
var token = this.fetch();
|
||
var func = token.text;
|
||
var funcData = src_functions[func];
|
||
|
||
if (!funcData) {
|
||
return null;
|
||
}
|
||
|
||
this.consume(); // consume command token
|
||
|
||
if (greediness != null && funcData.greediness <= greediness) {
|
||
throw new src_ParseError("Got function '" + func + "' with no arguments" + (name ? " as " + name : ""), token);
|
||
} else if (this.mode === "text" && !funcData.allowedInText) {
|
||
throw new src_ParseError("Can't use function '" + func + "' in text mode", token);
|
||
} else if (this.mode === "math" && funcData.allowedInMath === false) {
|
||
throw new src_ParseError("Can't use function '" + func + "' in math mode", token);
|
||
}
|
||
|
||
var _this$parseArguments = this.parseArguments(func, funcData),
|
||
args = _this$parseArguments.args,
|
||
optArgs = _this$parseArguments.optArgs;
|
||
|
||
return this.callFunction(func, args, optArgs, token, breakOnTokenText);
|
||
}
|
||
/**
|
||
* Call a function handler with a suitable context and arguments.
|
||
*/
|
||
;
|
||
|
||
_proto.callFunction = function callFunction(name, args, optArgs, token, breakOnTokenText) {
|
||
var context = {
|
||
funcName: name,
|
||
parser: this,
|
||
token: token,
|
||
breakOnTokenText: breakOnTokenText
|
||
};
|
||
var func = src_functions[name];
|
||
|
||
if (func && func.handler) {
|
||
return func.handler(context, args, optArgs);
|
||
} else {
|
||
throw new src_ParseError("No function handler for " + name);
|
||
}
|
||
}
|
||
/**
|
||
* Parses the arguments of a function or environment
|
||
*/
|
||
;
|
||
|
||
_proto.parseArguments = function parseArguments(func, // Should look like "\name" or "\begin{name}".
|
||
funcData) {
|
||
var totalArgs = funcData.numArgs + funcData.numOptionalArgs;
|
||
|
||
if (totalArgs === 0) {
|
||
return {
|
||
args: [],
|
||
optArgs: []
|
||
};
|
||
}
|
||
|
||
var baseGreediness = funcData.greediness;
|
||
var args = [];
|
||
var optArgs = [];
|
||
|
||
for (var i = 0; i < totalArgs; i++) {
|
||
var argType = funcData.argTypes && funcData.argTypes[i];
|
||
var isOptional = i < funcData.numOptionalArgs; // Ignore spaces between arguments. As the TeXbook says:
|
||
// "After you have said ‘\def\row#1#2{...}’, you are allowed to
|
||
// put spaces between the arguments (e.g., ‘\row x n’), because
|
||
// TeX doesn’t use single spaces as undelimited arguments."
|
||
|
||
var consumeSpaces = i > 0 && !isOptional || // Also consume leading spaces in math mode, as parseSymbol
|
||
// won't know what to do with them. This can only happen with
|
||
// macros, e.g. \frac\foo\foo where \foo expands to a space symbol.
|
||
// In LaTeX, the \foo's get treated as (blank) arguments.
|
||
// In KaTeX, for now, both spaces will get consumed.
|
||
// TODO(edemaine)
|
||
i === 0 && !isOptional && this.mode === "math";
|
||
var arg = this.parseGroupOfType("argument to '" + func + "'", argType, isOptional, baseGreediness, consumeSpaces);
|
||
|
||
if (!arg) {
|
||
if (isOptional) {
|
||
optArgs.push(null);
|
||
continue;
|
||
}
|
||
|
||
throw new src_ParseError("Expected group after '" + func + "'", this.fetch());
|
||
}
|
||
|
||
(isOptional ? optArgs : args).push(arg);
|
||
}
|
||
|
||
return {
|
||
args: args,
|
||
optArgs: optArgs
|
||
};
|
||
}
|
||
/**
|
||
* Parses a group when the mode is changing.
|
||
*/
|
||
;
|
||
|
||
_proto.parseGroupOfType = function parseGroupOfType(name, type, optional, greediness, consumeSpaces) {
|
||
switch (type) {
|
||
case "color":
|
||
if (consumeSpaces) {
|
||
this.consumeSpaces();
|
||
}
|
||
|
||
return this.parseColorGroup(optional);
|
||
|
||
case "size":
|
||
if (consumeSpaces) {
|
||
this.consumeSpaces();
|
||
}
|
||
|
||
return this.parseSizeGroup(optional);
|
||
|
||
case "url":
|
||
return this.parseUrlGroup(optional, consumeSpaces);
|
||
|
||
case "math":
|
||
case "text":
|
||
return this.parseGroup(name, optional, greediness, undefined, type, consumeSpaces);
|
||
|
||
case "hbox":
|
||
{
|
||
// hbox argument type wraps the argument in the equivalent of
|
||
// \hbox, which is like \text but switching to \textstyle size.
|
||
var group = this.parseGroup(name, optional, greediness, undefined, "text", consumeSpaces);
|
||
|
||
if (!group) {
|
||
return group;
|
||
}
|
||
|
||
var styledGroup = {
|
||
type: "styling",
|
||
mode: group.mode,
|
||
body: [group],
|
||
style: "text" // simulate \textstyle
|
||
|
||
};
|
||
return styledGroup;
|
||
}
|
||
|
||
case "raw":
|
||
{
|
||
if (consumeSpaces) {
|
||
this.consumeSpaces();
|
||
}
|
||
|
||
if (optional && this.fetch().text === "{") {
|
||
return null;
|
||
}
|
||
|
||
var token = this.parseStringGroup("raw", optional, true);
|
||
|
||
if (token) {
|
||
return {
|
||
type: "raw",
|
||
mode: "text",
|
||
string: token.text
|
||
};
|
||
} else {
|
||
throw new src_ParseError("Expected raw group", this.fetch());
|
||
}
|
||
}
|
||
|
||
case "original":
|
||
case null:
|
||
case undefined:
|
||
return this.parseGroup(name, optional, greediness, undefined, undefined, consumeSpaces);
|
||
|
||
default:
|
||
throw new src_ParseError("Unknown group type as " + name, this.fetch());
|
||
}
|
||
}
|
||
/**
|
||
* Discard any space tokens, fetching the next non-space token.
|
||
*/
|
||
;
|
||
|
||
_proto.consumeSpaces = function consumeSpaces() {
|
||
while (this.fetch().text === " ") {
|
||
this.consume();
|
||
}
|
||
}
|
||
/**
|
||
* Parses a group, essentially returning the string formed by the
|
||
* brace-enclosed tokens plus some position information.
|
||
*/
|
||
;
|
||
|
||
_proto.parseStringGroup = function parseStringGroup(modeName, // Used to describe the mode in error messages.
|
||
optional, raw) {
|
||
var groupBegin = optional ? "[" : "{";
|
||
var groupEnd = optional ? "]" : "}";
|
||
var beginToken = this.fetch();
|
||
|
||
if (beginToken.text !== groupBegin) {
|
||
if (optional) {
|
||
return null;
|
||
} else if (raw && beginToken.text !== "EOF" && /[^{}[\]]/.test(beginToken.text)) {
|
||
this.consume();
|
||
return beginToken;
|
||
}
|
||
}
|
||
|
||
var outerMode = this.mode;
|
||
this.mode = "text";
|
||
this.expect(groupBegin);
|
||
var str = "";
|
||
var firstToken = this.fetch();
|
||
var nested = 0; // allow nested braces in raw string group
|
||
|
||
var lastToken = firstToken;
|
||
var nextToken;
|
||
|
||
while ((nextToken = this.fetch()).text !== groupEnd || raw && nested > 0) {
|
||
switch (nextToken.text) {
|
||
case "EOF":
|
||
throw new src_ParseError("Unexpected end of input in " + modeName, firstToken.range(lastToken, str));
|
||
|
||
case groupBegin:
|
||
nested++;
|
||
break;
|
||
|
||
case groupEnd:
|
||
nested--;
|
||
break;
|
||
}
|
||
|
||
lastToken = nextToken;
|
||
str += lastToken.text;
|
||
this.consume();
|
||
}
|
||
|
||
this.expect(groupEnd);
|
||
this.mode = outerMode;
|
||
return firstToken.range(lastToken, str);
|
||
}
|
||
/**
|
||
* Parses a regex-delimited group: the largest sequence of tokens
|
||
* whose concatenated strings match `regex`. Returns the string
|
||
* formed by the tokens plus some position information.
|
||
*/
|
||
;
|
||
|
||
_proto.parseRegexGroup = function parseRegexGroup(regex, modeName) {
|
||
var outerMode = this.mode;
|
||
this.mode = "text";
|
||
var firstToken = this.fetch();
|
||
var lastToken = firstToken;
|
||
var str = "";
|
||
var nextToken;
|
||
|
||
while ((nextToken = this.fetch()).text !== "EOF" && regex.test(str + nextToken.text)) {
|
||
lastToken = nextToken;
|
||
str += lastToken.text;
|
||
this.consume();
|
||
}
|
||
|
||
if (str === "") {
|
||
throw new src_ParseError("Invalid " + modeName + ": '" + firstToken.text + "'", firstToken);
|
||
}
|
||
|
||
this.mode = outerMode;
|
||
return firstToken.range(lastToken, str);
|
||
}
|
||
/**
|
||
* Parses a color description.
|
||
*/
|
||
;
|
||
|
||
_proto.parseColorGroup = function parseColorGroup(optional) {
|
||
var res = this.parseStringGroup("color", optional);
|
||
|
||
if (!res) {
|
||
return null;
|
||
}
|
||
|
||
var match = /^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(res.text);
|
||
|
||
if (!match) {
|
||
throw new src_ParseError("Invalid color: '" + res.text + "'", res);
|
||
}
|
||
|
||
var color = match[0];
|
||
|
||
if (/^[0-9a-f]{6}$/i.test(color)) {
|
||
// We allow a 6-digit HTML color spec without a leading "#".
|
||
// This follows the xcolor package's HTML color model.
|
||
// Predefined color names are all missed by this RegEx pattern.
|
||
color = "#" + color;
|
||
}
|
||
|
||
return {
|
||
type: "color-token",
|
||
mode: this.mode,
|
||
color: color
|
||
};
|
||
}
|
||
/**
|
||
* Parses a size specification, consisting of magnitude and unit.
|
||
*/
|
||
;
|
||
|
||
_proto.parseSizeGroup = function parseSizeGroup(optional) {
|
||
var res;
|
||
var isBlank = false;
|
||
|
||
if (!optional && this.fetch().text !== "{") {
|
||
res = this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size");
|
||
} else {
|
||
res = this.parseStringGroup("size", optional);
|
||
}
|
||
|
||
if (!res) {
|
||
return null;
|
||
}
|
||
|
||
if (!optional && res.text.length === 0) {
|
||
// Because we've tested for what is !optional, this block won't
|
||
// affect \kern, \hspace, etc. It will capture the mandatory arguments
|
||
// to \genfrac and \above.
|
||
res.text = "0pt"; // Enable \above{}
|
||
|
||
isBlank = true; // This is here specifically for \genfrac
|
||
}
|
||
|
||
var match = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(res.text);
|
||
|
||
if (!match) {
|
||
throw new src_ParseError("Invalid size: '" + res.text + "'", res);
|
||
}
|
||
|
||
var data = {
|
||
number: +(match[1] + match[2]),
|
||
// sign + magnitude, cast to number
|
||
unit: match[3]
|
||
};
|
||
|
||
if (!validUnit(data)) {
|
||
throw new src_ParseError("Invalid unit: '" + data.unit + "'", res);
|
||
}
|
||
|
||
return {
|
||
type: "size",
|
||
mode: this.mode,
|
||
value: data,
|
||
isBlank: isBlank
|
||
};
|
||
}
|
||
/**
|
||
* Parses an URL, checking escaped letters and allowed protocols,
|
||
* and setting the catcode of % as an active character (as in \hyperref).
|
||
*/
|
||
;
|
||
|
||
_proto.parseUrlGroup = function parseUrlGroup(optional, consumeSpaces) {
|
||
this.gullet.lexer.setCatcode("%", 13); // active character
|
||
|
||
var res = this.parseStringGroup("url", optional, true); // get raw string
|
||
|
||
this.gullet.lexer.setCatcode("%", 14); // comment character
|
||
|
||
if (!res) {
|
||
return null;
|
||
} // hyperref package allows backslashes alone in href, but doesn't
|
||
// generate valid links in such cases; we interpret this as
|
||
// "undefined" behaviour, and keep them as-is. Some browser will
|
||
// replace backslashes with forward slashes.
|
||
|
||
|
||
var url = res.text.replace(/\\([#$%&~_^{}])/g, '$1');
|
||
return {
|
||
type: "url",
|
||
mode: this.mode,
|
||
url: url
|
||
};
|
||
}
|
||
/**
|
||
* If `optional` is false or absent, this parses an ordinary group,
|
||
* which is either a single nucleus (like "x") or an expression
|
||
* in braces (like "{x+y}") or an implicit group, a group that starts
|
||
* at the current position, and ends right before a higher explicit
|
||
* group ends, or at EOF.
|
||
* If `optional` is true, it parses either a bracket-delimited expression
|
||
* (like "[x+y]") or returns null to indicate the absence of a
|
||
* bracket-enclosed group.
|
||
* If `mode` is present, switches to that mode while parsing the group,
|
||
* and switches back after.
|
||
*/
|
||
;
|
||
|
||
_proto.parseGroup = function parseGroup(name, // For error reporting.
|
||
optional, greediness, breakOnTokenText, mode, consumeSpaces) {
|
||
// Switch to specified mode
|
||
var outerMode = this.mode;
|
||
|
||
if (mode) {
|
||
this.switchMode(mode);
|
||
} // Consume spaces if requested, crucially *after* we switch modes,
|
||
// so that the next non-space token is parsed in the correct mode.
|
||
|
||
|
||
if (consumeSpaces) {
|
||
this.consumeSpaces();
|
||
} // Get first token
|
||
|
||
|
||
var firstToken = this.fetch();
|
||
var text = firstToken.text;
|
||
var result; // Try to parse an open brace or \begingroup
|
||
|
||
if (optional ? text === "[" : text === "{" || text === "\\begingroup") {
|
||
this.consume();
|
||
var groupEnd = Parser.endOfGroup[text]; // Start a new group namespace
|
||
|
||
this.gullet.beginGroup(); // If we get a brace, parse an expression
|
||
|
||
var expression = this.parseExpression(false, groupEnd);
|
||
var lastToken = this.fetch(); // Check that we got a matching closing brace
|
||
|
||
this.expect(groupEnd); // End group namespace
|
||
|
||
this.gullet.endGroup();
|
||
result = {
|
||
type: "ordgroup",
|
||
mode: this.mode,
|
||
loc: SourceLocation.range(firstToken, lastToken),
|
||
body: expression,
|
||
// A group formed by \begingroup...\endgroup is a semi-simple group
|
||
// which doesn't affect spacing in math mode, i.e., is transparent.
|
||
// https://tex.stackexchange.com/questions/1930/when-should-one-
|
||
// use-begingroup-instead-of-bgroup
|
||
semisimple: text === "\\begingroup" || undefined
|
||
};
|
||
} else if (optional) {
|
||
// Return nothing for an optional group
|
||
result = null;
|
||
} else {
|
||
// If there exists a function with this name, parse the function.
|
||
// Otherwise, just return a nucleus
|
||
result = this.parseFunction(breakOnTokenText, name, greediness) || this.parseSymbol();
|
||
|
||
if (result == null && text[0] === "\\" && !implicitCommands.hasOwnProperty(text)) {
|
||
if (this.settings.throwOnError) {
|
||
throw new src_ParseError("Undefined control sequence: " + text, firstToken);
|
||
}
|
||
|
||
result = this.formatUnsupportedCmd(text);
|
||
this.consume();
|
||
}
|
||
} // Switch mode back
|
||
|
||
|
||
if (mode) {
|
||
this.switchMode(outerMode);
|
||
}
|
||
|
||
return result;
|
||
}
|
||
/**
|
||
* Form ligature-like combinations of characters for text mode.
|
||
* This includes inputs like "--", "---", "``" and "''".
|
||
* The result will simply replace multiple textord nodes with a single
|
||
* character in each value by a single textord node having multiple
|
||
* characters in its value. The representation is still ASCII source.
|
||
* The group will be modified in place.
|
||
*/
|
||
;
|
||
|
||
_proto.formLigatures = function formLigatures(group) {
|
||
var n = group.length - 1;
|
||
|
||
for (var i = 0; i < n; ++i) {
|
||
var a = group[i]; // $FlowFixMe: Not every node type has a `text` property.
|
||
|
||
var v = a.text;
|
||
|
||
if (v === "-" && group[i + 1].text === "-") {
|
||
if (i + 1 < n && group[i + 2].text === "-") {
|
||
group.splice(i, 3, {
|
||
type: "textord",
|
||
mode: "text",
|
||
loc: SourceLocation.range(a, group[i + 2]),
|
||
text: "---"
|
||
});
|
||
n -= 2;
|
||
} else {
|
||
group.splice(i, 2, {
|
||
type: "textord",
|
||
mode: "text",
|
||
loc: SourceLocation.range(a, group[i + 1]),
|
||
text: "--"
|
||
});
|
||
n -= 1;
|
||
}
|
||
}
|
||
|
||
if ((v === "'" || v === "`") && group[i + 1].text === v) {
|
||
group.splice(i, 2, {
|
||
type: "textord",
|
||
mode: "text",
|
||
loc: SourceLocation.range(a, group[i + 1]),
|
||
text: v + v
|
||
});
|
||
n -= 1;
|
||
}
|
||
}
|
||
}
|
||
/**
|
||
* Parse a single symbol out of the string. Here, we handle single character
|
||
* symbols and special functions like \verb.
|
||
*/
|
||
;
|
||
|
||
_proto.parseSymbol = function parseSymbol() {
|
||
var nucleus = this.fetch();
|
||
var text = nucleus.text;
|
||
|
||
if (/^\\verb[^a-zA-Z]/.test(text)) {
|
||
this.consume();
|
||
var arg = text.slice(5);
|
||
var star = arg.charAt(0) === "*";
|
||
|
||
if (star) {
|
||
arg = arg.slice(1);
|
||
} // Lexer's tokenRegex is constructed to always have matching
|
||
// first/last characters.
|
||
|
||
|
||
if (arg.length < 2 || arg.charAt(0) !== arg.slice(-1)) {
|
||
throw new src_ParseError("\\verb assertion failed --\n please report what input caused this bug");
|
||
}
|
||
|
||
arg = arg.slice(1, -1); // remove first and last char
|
||
|
||
return {
|
||
type: "verb",
|
||
mode: "text",
|
||
body: arg,
|
||
star: star
|
||
};
|
||
} // At this point, we should have a symbol, possibly with accents.
|
||
// First expand any accented base symbol according to unicodeSymbols.
|
||
|
||
|
||
if (unicodeSymbols.hasOwnProperty(text[0]) && !src_symbols[this.mode][text[0]]) {
|
||
// This behavior is not strict (XeTeX-compatible) in math mode.
|
||
if (this.settings.strict && this.mode === "math") {
|
||
this.settings.reportNonstrict("unicodeTextInMathMode", "Accented Unicode text character \"" + text[0] + "\" used in " + "math mode", nucleus);
|
||
}
|
||
|
||
text = unicodeSymbols[text[0]] + text.substr(1);
|
||
} // Strip off any combining characters
|
||
|
||
|
||
var match = combiningDiacriticalMarksEndRegex.exec(text);
|
||
|
||
if (match) {
|
||
text = text.substring(0, match.index);
|
||
|
||
if (text === 'i') {
|
||
text = "\u0131"; // dotless i, in math and text mode
|
||
} else if (text === 'j') {
|
||
text = "\u0237"; // dotless j, in math and text mode
|
||
}
|
||
} // Recognize base symbol
|
||
|
||
|
||
var symbol;
|
||
|
||
if (src_symbols[this.mode][text]) {
|
||
if (this.settings.strict && this.mode === 'math' && extraLatin.indexOf(text) >= 0) {
|
||
this.settings.reportNonstrict("unicodeTextInMathMode", "Latin-1/Unicode text character \"" + text[0] + "\" used in " + "math mode", nucleus);
|
||
}
|
||
|
||
var group = src_symbols[this.mode][text].group;
|
||
var loc = SourceLocation.range(nucleus);
|
||
var s;
|
||
|
||
if (ATOMS.hasOwnProperty(group)) {
|
||
// $FlowFixMe
|
||
var family = group;
|
||
s = {
|
||
type: "atom",
|
||
mode: this.mode,
|
||
family: family,
|
||
loc: loc,
|
||
text: text
|
||
};
|
||
} else {
|
||
// $FlowFixMe
|
||
s = {
|
||
type: group,
|
||
mode: this.mode,
|
||
loc: loc,
|
||
text: text
|
||
};
|
||
}
|
||
|
||
symbol = s;
|
||
} else if (text.charCodeAt(0) >= 0x80) {
|
||
// no symbol for e.g. ^
|
||
if (this.settings.strict) {
|
||
if (!supportedCodepoint(text.charCodeAt(0))) {
|
||
this.settings.reportNonstrict("unknownSymbol", "Unrecognized Unicode character \"" + text[0] + "\"" + (" (" + text.charCodeAt(0) + ")"), nucleus);
|
||
} else if (this.mode === "math") {
|
||
this.settings.reportNonstrict("unicodeTextInMathMode", "Unicode text character \"" + text[0] + "\" used in math mode", nucleus);
|
||
}
|
||
} // All nonmathematical Unicode characters are rendered as if they
|
||
// are in text mode (wrapped in \text) because that's what it
|
||
// takes to render them in LaTeX. Setting `mode: this.mode` is
|
||
// another natural choice (the user requested math mode), but
|
||
// this makes it more difficult for getCharacterMetrics() to
|
||
// distinguish Unicode characters without metrics and those for
|
||
// which we want to simulate the letter M.
|
||
|
||
|
||
symbol = {
|
||
type: "textord",
|
||
mode: "text",
|
||
loc: SourceLocation.range(nucleus),
|
||
text: text
|
||
};
|
||
} else {
|
||
return null; // EOF, ^, _, {, }, etc.
|
||
}
|
||
|
||
this.consume(); // Transform combining characters into accents
|
||
|
||
if (match) {
|
||
for (var i = 0; i < match[0].length; i++) {
|
||
var accent = match[0][i];
|
||
|
||
if (!unicodeAccents[accent]) {
|
||
throw new src_ParseError("Unknown accent ' " + accent + "'", nucleus);
|
||
}
|
||
|
||
var command = unicodeAccents[accent][this.mode];
|
||
|
||
if (!command) {
|
||
throw new src_ParseError("Accent " + accent + " unsupported in " + this.mode + " mode", nucleus);
|
||
}
|
||
|
||
symbol = {
|
||
type: "accent",
|
||
mode: this.mode,
|
||
loc: SourceLocation.range(nucleus),
|
||
label: command,
|
||
isStretchy: false,
|
||
isShifty: true,
|
||
base: symbol
|
||
};
|
||
}
|
||
}
|
||
|
||
return symbol;
|
||
};
|
||
|
||
return Parser;
|
||
}();
|
||
|
||
Parser_Parser.endOfExpression = ["}", "\\endgroup", "\\end", "\\right", "&"];
|
||
Parser_Parser.endOfGroup = {
|
||
"[": "]",
|
||
"{": "}",
|
||
"\\begingroup": "\\endgroup"
|
||
/**
|
||
* Parses an "expression", which is a list of atoms.
|
||
*
|
||
* `breakOnInfix`: Should the parsing stop when we hit infix nodes? This
|
||
* happens when functions have higher precendence han infix
|
||
* nodes in implicit parses.
|
||
*
|
||
* `breakOnTokenText`: The text of the token that the expression should end
|
||
* with, or `null` if something else should end the
|
||
* expression.
|
||
*/
|
||
|
||
};
|
||
Parser_Parser.SUPSUB_GREEDINESS = 1;
|
||
|
||
// CONCATENATED MODULE: ./src/parseTree.js
|
||
/**
|
||
* Provides a single function for parsing an expression using a Parser
|
||
* TODO(emily): Remove this
|
||
*/
|
||
|
||
|
||
|
||
/**
|
||
* Parses an expression using a Parser, then returns the parsed result.
|
||
*/
|
||
var parseTree_parseTree = function parseTree(toParse, settings) {
|
||
if (!(typeof toParse === 'string' || toParse instanceof String)) {
|
||
throw new TypeError('KaTeX can only parse string typed expression');
|
||
}
|
||
|
||
var parser = new Parser_Parser(toParse, settings); // Blank out any \df@tag to avoid spurious "Duplicate \tag" errors
|
||
|
||
delete parser.gullet.macros.current["\\df@tag"];
|
||
var tree = parser.parse(); // If the input used \tag, it will set the \df@tag macro to the tag.
|
||
// In this case, we separately parse the tag and wrap the tree.
|
||
|
||
if (parser.gullet.macros.get("\\df@tag")) {
|
||
if (!settings.displayMode) {
|
||
throw new src_ParseError("\\tag works only in display equations");
|
||
}
|
||
|
||
parser.gullet.feed("\\df@tag");
|
||
tree = [{
|
||
type: "tag",
|
||
mode: "text",
|
||
body: tree,
|
||
tag: parser.parse()
|
||
}];
|
||
}
|
||
|
||
return tree;
|
||
};
|
||
|
||
/* harmony default export */ var src_parseTree = (parseTree_parseTree);
|
||
// CONCATENATED MODULE: ./katex.js
|
||
/* eslint no-console:0 */
|
||
|
||
/**
|
||
* This is the main entry point for KaTeX. Here, we expose functions for
|
||
* rendering expressions either to DOM nodes or to markup strings.
|
||
*
|
||
* We also expose the ParseError class to check if errors thrown from KaTeX are
|
||
* errors in the expression, or errors in javascript handling.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* Parse and build an expression, and place that expression in the DOM node
|
||
* given.
|
||
*/
|
||
var katex_render = function render(expression, baseNode, options) {
|
||
baseNode.textContent = "";
|
||
var node = katex_renderToDomTree(expression, options).toNode();
|
||
baseNode.appendChild(node);
|
||
}; // KaTeX's styles don't work properly in quirks mode. Print out an error, and
|
||
// disable rendering.
|
||
|
||
|
||
if (typeof document !== "undefined") {
|
||
if (document.compatMode !== "CSS1Compat") {
|
||
typeof console !== "undefined" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your " + "website has a suitable doctype.");
|
||
|
||
katex_render = function render() {
|
||
throw new src_ParseError("KaTeX doesn't work in quirks mode.");
|
||
};
|
||
}
|
||
}
|
||
/**
|
||
* Parse and build an expression, and return the markup for that.
|
||
*/
|
||
|
||
|
||
var renderToString = function renderToString(expression, options) {
|
||
var markup = katex_renderToDomTree(expression, options).toMarkup();
|
||
return markup;
|
||
};
|
||
/**
|
||
* Parse an expression and return the parse tree.
|
||
*/
|
||
|
||
|
||
var katex_generateParseTree = function generateParseTree(expression, options) {
|
||
var settings = new Settings_Settings(options);
|
||
return src_parseTree(expression, settings);
|
||
};
|
||
/**
|
||
* If the given error is a KaTeX ParseError and options.throwOnError is false,
|
||
* renders the invalid LaTeX as a span with hover title giving the KaTeX
|
||
* error message. Otherwise, simply throws the error.
|
||
*/
|
||
|
||
|
||
var katex_renderError = function renderError(error, expression, options) {
|
||
if (options.throwOnError || !(error instanceof src_ParseError)) {
|
||
throw error;
|
||
}
|
||
|
||
var node = buildCommon.makeSpan(["katex-error"], [new domTree_SymbolNode(expression)]);
|
||
node.setAttribute("title", error.toString());
|
||
node.setAttribute("style", "color:" + options.errorColor);
|
||
return node;
|
||
};
|
||
/**
|
||
* Generates and returns the katex build tree. This is used for advanced
|
||
* use cases (like rendering to custom output).
|
||
*/
|
||
|
||
|
||
var katex_renderToDomTree = function renderToDomTree(expression, options) {
|
||
var settings = new Settings_Settings(options);
|
||
|
||
try {
|
||
var tree = src_parseTree(expression, settings);
|
||
return buildTree_buildTree(tree, expression, settings);
|
||
} catch (error) {
|
||
return katex_renderError(error, expression, settings);
|
||
}
|
||
};
|
||
/**
|
||
* Generates and returns the katex build tree, with just HTML (no MathML).
|
||
* This is used for advanced use cases (like rendering to custom output).
|
||
*/
|
||
|
||
|
||
var katex_renderToHTMLTree = function renderToHTMLTree(expression, options) {
|
||
var settings = new Settings_Settings(options);
|
||
|
||
try {
|
||
var tree = src_parseTree(expression, settings);
|
||
return buildTree_buildHTMLTree(tree, expression, settings);
|
||
} catch (error) {
|
||
return katex_renderError(error, expression, settings);
|
||
}
|
||
};
|
||
|
||
/* harmony default export */ var katex_0 = ({
|
||
/**
|
||
* Current KaTeX version
|
||
*/
|
||
version: "0.11.1",
|
||
|
||
/**
|
||
* Renders the given LaTeX into an HTML+MathML combination, and adds
|
||
* it as a child to the specified DOM node.
|
||
*/
|
||
render: katex_render,
|
||
|
||
/**
|
||
* Renders the given LaTeX into an HTML+MathML combination string,
|
||
* for sending to the client.
|
||
*/
|
||
renderToString: renderToString,
|
||
|
||
/**
|
||
* KaTeX error, usually during parsing.
|
||
*/
|
||
ParseError: src_ParseError,
|
||
|
||
/**
|
||
* Parses the given LaTeX into KaTeX's internal parse tree structure,
|
||
* without rendering to HTML or MathML.
|
||
*
|
||
* NOTE: This method is not currently recommended for public use.
|
||
* The internal tree representation is unstable and is very likely
|
||
* to change. Use at your own risk.
|
||
*/
|
||
__parse: katex_generateParseTree,
|
||
|
||
/**
|
||
* Renders the given LaTeX into an HTML+MathML internal DOM tree
|
||
* representation, without flattening that representation to a string.
|
||
*
|
||
* NOTE: This method is not currently recommended for public use.
|
||
* The internal tree representation is unstable and is very likely
|
||
* to change. Use at your own risk.
|
||
*/
|
||
__renderToDomTree: katex_renderToDomTree,
|
||
|
||
/**
|
||
* Renders the given LaTeX into an HTML internal DOM tree representation,
|
||
* without MathML and without flattening that representation to a string.
|
||
*
|
||
* NOTE: This method is not currently recommended for public use.
|
||
* The internal tree representation is unstable and is very likely
|
||
* to change. Use at your own risk.
|
||
*/
|
||
__renderToHTMLTree: katex_renderToHTMLTree,
|
||
|
||
/**
|
||
* extends internal font metrics object with a new object
|
||
* each key in the new object represents a font name
|
||
*/
|
||
__setFontMetrics: setFontMetrics,
|
||
|
||
/**
|
||
* adds a new symbol to builtin symbols table
|
||
*/
|
||
__defineSymbol: defineSymbol,
|
||
|
||
/**
|
||
* adds a new macro to builtin macro list
|
||
*/
|
||
__defineMacro: defineMacro,
|
||
|
||
/**
|
||
* Expose the dom tree node types, which can be useful for type checking nodes.
|
||
*
|
||
* NOTE: This method is not currently recommended for public use.
|
||
* The internal tree representation is unstable and is very likely
|
||
* to change. Use at your own risk.
|
||
*/
|
||
__domTree: {
|
||
Span: domTree_Span,
|
||
Anchor: domTree_Anchor,
|
||
SymbolNode: domTree_SymbolNode,
|
||
SvgNode: SvgNode,
|
||
PathNode: domTree_PathNode,
|
||
LineNode: LineNode
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./katex.webpack.js
|
||
/**
|
||
* This is the webpack entry point for KaTeX. As ECMAScript, flow[1] and jest[2]
|
||
* doesn't support CSS modules natively, a separate entry point is used and
|
||
* it is not flowtyped.
|
||
*
|
||
* [1] https://gist.github.com/lambdahands/d19e0da96285b749f0ef
|
||
* [2] https://facebook.github.io/jest/docs/en/webpack.html
|
||
*/
|
||
|
||
|
||
/* harmony default export */ var katex_webpack = __webpack_exports__["default"] = (katex_0);
|
||
|
||
/***/ })
|
||
/******/ ])["default"];
|
||
});
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1722:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router_dom__ = __webpack_require__(51);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__order_css__ = __webpack_require__(1526);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__order_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__order_css__);
|
||
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}var Nav=function(_Component){_inherits(Nav,_Component);function Nav(props){_classCallCheck(this,Nav);var _this=_possibleConstructorReturn(this,(Nav.__proto__||Object.getPrototypeOf(Nav)).call(this,props));_this.state={projectTag:undefined};return _this;}_createClass(Nav,[{key:'render',value:function render(){var projectsId=this.props.match.params.projectsId;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'topWrapper_nav'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_router_dom__["c" /* NavLink */],{activeClassName:'active',className:'issue-type-button',to:'/projects/'+projectsId+'/orders/tags'},'\u6807\u7B7E'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_router_dom__["c" /* NavLink */],{activeClassName:'active',className:'issue-type-button',to:'/projects/'+projectsId+'/orders/Milepost'},'\u91CC\u7A0B\u7891'));}}]);return Nav;}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (Nav);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1849:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_icon_style_css__ = __webpack_require__(182);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_icon_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_icon_style_css__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_icon__ = __webpack_require__(27);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_icon__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_upload_style_css__ = __webpack_require__(1132);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_upload_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_upload_style_css__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_upload__ = __webpack_require__(1133);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_upload___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_upload__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_educoder__ = __webpack_require__(5);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_axios__ = __webpack_require__(8);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_axios__);
|
||
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}var Dragger=__WEBPACK_IMPORTED_MODULE_3_antd_lib_upload___default.a.Dragger;var Index=function(_Component){_inherits(Index,_Component);function Index(props){_classCallCheck(this,Index);var _this=_possibleConstructorReturn(this,(Index.__proto__||Object.getPrototypeOf(Index)).call(this,props));_this.onAttachmentRemove=function(file){if(!file.percent||file.percent===100){// this.props.confirm({
|
||
// content: '是否确认删除?',
|
||
// onOk: () => {
|
||
// this.deleteAttachment(file)
|
||
// },
|
||
// onCancel() {
|
||
// console.log('Cancel');
|
||
// },
|
||
// });
|
||
_this.deleteAttachment(file);return false;}};_this.deleteAttachment=function(file){var url='/attachments/'+(file.response?file.response.id:file.uid)+'.json';__WEBPACK_IMPORTED_MODULE_6_axios___default.a.delete(url,{}).then(function(response){if(response.data){if(response.data.status===0){_this.setState(function(state){var index=state.fileList.indexOf(file);var newFileList=state.fileList.slice();newFileList.splice(index,1);return{fileList:newFileList};});_this.fileIdList(_this.state.fileList);}else{_this.props.showNotification(response.data.message);}}}).catch(function(error){console.log(error);});};_this.handleChange=function(info){var changeIsComplete=_this.props.changeIsComplete;changeIsComplete&&changeIsComplete(true);if(info.file.status==='uploading'||info.file.status==='done'||info.file.status==='removed'){var fileList=info.fileList;_this.setState({fileList:Object(__WEBPACK_IMPORTED_MODULE_5_educoder__["C" /* appendFileSizeToUploadFileAll */])(fileList)});_this.fileIdList(fileList);}};_this.fileIdList=function(fileList){var array=[];fileList&&fileList.length>0&&fileList.map(function(item){return array.push(item.response&&item.response.id);});array&&_this.props.load&&_this.props.load(array);};_this.state={fileList:undefined};return _this;}_createClass(Index,[{key:'render',value:function render(){//判断是否已经提交,如已提交评论则上一条评论数据清除
|
||
var isComplete=this.props.isComplete;var fileList=this.state.fileList;var list=isComplete===true?fileList:undefined;var upload={name:'file',fileList:list,action:''+Object(__WEBPACK_IMPORTED_MODULE_5_educoder__["R" /* getUploadActionUrl */])(),onChange:this.handleChange,onRemove:this.onAttachmentRemove};return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Dragger,upload,__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_icon___default.a,{type:'inbox'}),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('p',{className:'ant-upload-text'},'\u62D6\u52A8\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20')));}}]);return Index;}(__WEBPACK_IMPORTED_MODULE_4_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (Index);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1922:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__ = __webpack_require__(79);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_scss__ = __webpack_require__(1923);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_scss__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_quill_dist_quill_core_css__ = __webpack_require__(1552);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_quill_dist_quill_core_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_quill_dist_quill_core_css__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_quill_dist_quill_snow_css__ = __webpack_require__(1553);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_quill_dist_quill_snow_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_quill_dist_quill_snow_css__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_quill_dist_quill_bubble_css__ = __webpack_require__(1554);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_quill_dist_quill_bubble_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_quill_dist_quill_bubble_css__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_katex_dist_katex_min_css__ = __webpack_require__(1555);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_katex_dist_katex_min_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_katex_dist_katex_min_css__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__font_css__ = __webpack_require__(1925);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__font_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__font_css__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(0);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_quill__ = __webpack_require__(1347);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_quill___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_quill__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_katex__ = __webpack_require__(1622);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_katex___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_katex__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__deepEqual_js__ = __webpack_require__(1927);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__services_ojService_js__ = __webpack_require__(94);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__ImageBlot__ = __webpack_require__(1928);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__FillBlot__ = __webpack_require__(1929);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__link_blot__ = __webpack_require__(1930);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_educoder__ = __webpack_require__(5);
|
||
var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"])_i["return"]();}finally{if(_d)throw _e;}}return _arr;}return function(arr,i){if(Array.isArray(arr)){return arr;}else if(Symbol.iterator in Object(arr)){return sliceIterator(arr,i);}else{throw new TypeError("Invalid attempt to destructure non-iterable instance");}};}();function _asyncToGenerator(fn){return function(){var gen=fn.apply(this,arguments);return new Promise(function(resolve,reject){function step(key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{return Promise.resolve(value).then(function(value){step("next",value);},function(err){step("throw",err);});}}return step("next");});};}/*
|
||
* @Description: quill 编辑器
|
||
* @Author: tangjiang
|
||
* @Github:
|
||
* @Date: 2019-12-18 08:49:30
|
||
* @LastEditors : tangjiang
|
||
* @LastEditTime : 2020-02-05 11:23:03
|
||
*/// 核心样式
|
||
// 有工具栏
|
||
// 无工具栏
|
||
// katex 表达式样式
|
||
var Size=__WEBPACK_IMPORTED_MODULE_8_quill___default.a.import('attributors/style/size');Size.whitelist=['14px','16px','18px','20px',false];var fonts=['Microsoft-YaHei','SimSun','SimHei','KaiTi','FangSong'];var Font=__WEBPACK_IMPORTED_MODULE_8_quill___default.a.import('formats/font');Font.whitelist=fonts;//将字体加入到白名单
|
||
window.Quill=__WEBPACK_IMPORTED_MODULE_8_quill___default.a;window.katex=__WEBPACK_IMPORTED_MODULE_9_katex___default.a;__WEBPACK_IMPORTED_MODULE_8_quill___default.a.register(__WEBPACK_IMPORTED_MODULE_12__ImageBlot__["a" /* default */]);__WEBPACK_IMPORTED_MODULE_8_quill___default.a.register(Size);__WEBPACK_IMPORTED_MODULE_8_quill___default.a.register(__WEBPACK_IMPORTED_MODULE_14__link_blot__["a" /* default */]);__WEBPACK_IMPORTED_MODULE_8_quill___default.a.register(Font,true);// Quill.register({'modules/toolbar': Toolbar});
|
||
__WEBPACK_IMPORTED_MODULE_8_quill___default.a.register({'formats/fill':__WEBPACK_IMPORTED_MODULE_13__FillBlot__["a" /* default */]});// Quill.register(Color);
|
||
function QuillForEditor(_ref){var _this=this;var placeholder=_ref.placeholder,readOnly=_ref.readOnly,_ref$autoFocus=_ref.autoFocus,autoFocus=_ref$autoFocus===undefined?false:_ref$autoFocus,options=_ref.options,value=_ref.value,_ref$imgAttrs=_ref.imgAttrs,imgAttrs=_ref$imgAttrs===undefined?{}:_ref$imgAttrs,_ref$style=_ref.style,style=_ref$style===undefined?{}:_ref$style,_ref$wrapStyle=_ref.wrapStyle,wrapStyle=_ref$wrapStyle===undefined?{}:_ref$wrapStyle,showUploadImage=_ref.showUploadImage,onContentChange=_ref.onContentChange,addFill=_ref.addFill,deleteFill=_ref.deleteFill;// toolbar 默认值
|
||
var defaultConfig=['bold','italic','underline',{size:['14px','16px','18px','20px']},{align:[]},{list:'ordered'},{list:'bullet'},// 列表
|
||
{script:'sub'},{script:'super'},{'color':[]},{'background':[]},{'font':[]},{header:[1,2,3,4,5,false]},'blockquote','code-block','link','image','video','formula','clean'];var editorRef=Object(__WEBPACK_IMPORTED_MODULE_7_react__["useRef"])(null);// quill 实例
|
||
var _useState=Object(__WEBPACK_IMPORTED_MODULE_7_react__["useState"])(null),_useState2=_slicedToArray(_useState,2),quill=_useState2[0],setQuill=_useState2[1];var _useState3=Object(__WEBPACK_IMPORTED_MODULE_7_react__["useState"])(null),_useState4=_slicedToArray(_useState3,2),selection=_useState4[0],setSelection=_useState4[1];var _useState5=Object(__WEBPACK_IMPORTED_MODULE_7_react__["useState"])(0),_useState6=_slicedToArray(_useState5,2),fillCount=_useState6[0],setFillCount=_useState6[1];var _useState7=Object(__WEBPACK_IMPORTED_MODULE_7_react__["useState"])({}),_useState8=_slicedToArray(_useState7,2),quillCtx=_useState8[0],setQuillCtx=_useState8[1];// 文本内容变化时
|
||
var handleOnChange=function handleOnChange(content){onContentChange&&onContentChange(content,quill);};var renderOptions=options||defaultConfig;var bindings={tab:{key:9,handler:function handler(){}},backspace:{key:'Backspace',/**
|
||
* @param {*} range
|
||
* { index, // 删除元素的位置
|
||
* length // 删除元素的个数, 当删除一个时, length=0, 其它等于删除的元素的个数
|
||
* }
|
||
* @param {*} context 上下文
|
||
*/handler:function handler(range,context){/**
|
||
* index: 删除元素的位置
|
||
* length: 删除元素的个数
|
||
*/var index=range.index,length=range.length;var _start=length===0?index-1:index;var _length=length||1;var delCtx=this.quill.getText(_start,_length);// 删除的元素
|
||
var reg=/▁/g;var delArrs=delCtx.match(reg);if(delArrs){var r=window.confirm('确定要删除吗?');if(r){var leaveCtx=void 0;// 获取删除元素之前的内容
|
||
if(length===0){leaveCtx=this.quill.getText(0,index-1);}else{leaveCtx=this.quill.getText(0,index);}var leaveArrs=leaveCtx.match(reg);var leaveLen=(leaveArrs||[]).length;var delIndexs=[];// 获取删除元素的下标
|
||
delArrs.forEach(function(item,i){leaveLen===0?delIndexs.push(i):delIndexs.push(leaveLen+i);});deleteFill&&deleteFill(delIndexs);// 调用删除回调, 返回删除的元素下标[]
|
||
return true;}else{return false;}}return true;}}};// quill 配置信息
|
||
var quillOption={modules:{toolbar:renderOptions,keyboard:{bindings:bindings// toolbar: {
|
||
// container: renderOptions
|
||
// }
|
||
}},readOnly:readOnly,placeholder:placeholder,theme:readOnly?'bubble':'snow'};Object(__WEBPACK_IMPORTED_MODULE_7_react__["useEffect"])(function(){var quillNode=document.createElement('div');editorRef.current.appendChild(quillNode);var _quill=new __WEBPACK_IMPORTED_MODULE_8_quill___default.a(editorRef.current,quillOption);setQuill(_quill);// 处理图片上传功能
|
||
_quill.getModule('toolbar').addHandler('image',function(e){var input=document.createElement('input');input.setAttribute('type','file');input.setAttribute('accept','image/*');input.click();input.onchange=function(){var _ref2=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee(e){var file,formData,range,fileUrl,result,width,height;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:file=input.files[0];// 获取文件信息
|
||
formData=new FormData();formData.append('file',file);range=_quill.getSelection(true);fileUrl='';// 保存上传成功后图片的url
|
||
// 上传文件
|
||
_context.next=7;return Object(__WEBPACK_IMPORTED_MODULE_11__services_ojService_js__["n" /* fetchUploadImage */])(formData);case 7:result=_context.sent;// 获取上传图片的url
|
||
if(result.data&&result.data.id){fileUrl=Object(__WEBPACK_IMPORTED_MODULE_15_educoder__["M" /* getImageUrl */])('api/attachments/'+result.data.id);}// 根据id获取文件路径
|
||
width=imgAttrs.width,height=imgAttrs.height;// console.log('上传图片的url:', fileUrl);
|
||
if(fileUrl){_quill.insertEmbed(range.index,'image',{url:fileUrl,alt:'图片信息',onClick:showUploadImage,width:width,height:height});}case 11:case'end':return _context.stop();}}},_callee,_this);}));return function(_x){return _ref2.apply(this,arguments);};}();});// 处理填空
|
||
_quill.getModule('toolbar').addHandler('fill',function(e){// alert(1111);
|
||
setFillCount(fillCount+1);var range=_quill.getSelection(true);_quill.insertText(range.index,'▁');addFill&&addFill();// 调用添加回调
|
||
});},[]);// 设置值
|
||
Object(__WEBPACK_IMPORTED_MODULE_7_react__["useEffect"])(function(){if(!quill)return;var previous=quill.getContents();if(value&&value.hasOwnProperty('ops')){var ops=value.ops||[];ops.forEach(function(item,i){if(item.insert['image']){item.insert['image']=Object.assign({},item.insert['image'],{style:{cursor:'pointer'},onclick:function onclick(url){return showUploadImage(url);}});}});}var current=value;if(!Object(__WEBPACK_IMPORTED_MODULE_10__deepEqual_js__["a" /* default */])(previous,current)){setSelection(quill.getSelection());if(typeof value==='string'&&value){// debugger
|
||
quill.clipboard.dangerouslyPasteHTML(value,'api');if(autoFocus){quill.focus();}else{quill.blur();}}else{quill.setContents(value);if(autoFocus)quill.focus();}}},[quill,value,setQuill,autoFocus]);// 清除选择区域
|
||
Object(__WEBPACK_IMPORTED_MODULE_7_react__["useEffect"])(function(){if(quill&&selection){quill.setSelection(selection);setSelection(null);}},[quill,selection,setSelection]);// 设置placeholder值
|
||
Object(__WEBPACK_IMPORTED_MODULE_7_react__["useEffect"])(function(){if(!quill||!quill.root)return;quill.root.dataset.placeholder=placeholder;},[quill,placeholder]);// 处理内容变化
|
||
Object(__WEBPACK_IMPORTED_MODULE_7_react__["useEffect"])(function(){if(!quill)return;if(typeof handleOnChange!=='function')return;var handler=void 0;quill.on('text-change',handler=function handler(delta,oldDelta,source){var _ctx=quill.getContents();setQuillCtx(_ctx);handleOnChange(quill.getContents());// getContents: 检索编辑器内容
|
||
});return function(){quill.off('text-change',handler);};},[quill,handleOnChange]);// 返回结果
|
||
return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement('div',{className:'quill_editor_for_react_area',style:wrapStyle},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement('div',{ref:editorRef,style:style}));}/* harmony default export */ __webpack_exports__["a"] = (QuillForEditor);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1923:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||
|
||
// load the styles
|
||
var content = __webpack_require__(1924);
|
||
if(typeof content === 'string') content = [[module.i, content, '']];
|
||
// Prepare cssTransformation
|
||
var transform;
|
||
|
||
var options = {"hmr":true}
|
||
options.transform = transform
|
||
// add the styles to the DOM
|
||
var update = __webpack_require__(317)(content, options);
|
||
if(content.locals) module.exports = content.locals;
|
||
// Hot Module Replacement
|
||
if(false) {
|
||
// When the styles change, update the <style> tags
|
||
if(!content.locals) {
|
||
module.hot.accept("!!../../../node_modules/css-loader/index.js??ref--1-oneOf-3-1!../../../node_modules/sass-loader/dist/cjs.js!./index.scss", function() {
|
||
var newContent = require("!!../../../node_modules/css-loader/index.js??ref--1-oneOf-3-1!../../../node_modules/sass-loader/dist/cjs.js!./index.scss");
|
||
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
|
||
update(newContent);
|
||
});
|
||
}
|
||
// When the module is disposed, remove the <style> tags
|
||
module.hot.dispose(function() { update(); });
|
||
}
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1924:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
exports = module.exports = __webpack_require__(316)(true);
|
||
// imports
|
||
|
||
|
||
// module
|
||
exports.push([module.i, ".quill_editor_for_react_area .ql-editing{left:0!important}.quill_editor_for_react_area .ql-editor img{cursor:pointer}.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"12px\"]:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"12px\"]:before{content:\"12px\";font-size:12px}.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"14px\"]:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"14px\"]:before{content:\"14px\";font-size:14px}.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"16px\"]:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"16px\"]:before{content:\"16px\";font-size:16px}.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"18px\"]:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"18px\"]:before{content:\"18px\";font-size:18px}.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"20px\"]:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"20px\"]:before{content:\"20px\";font-size:20px}.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-item:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-label:before{content:\"14px\";font-size:14px}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]:before{content:\"\\5B8B\\4F53\";font-family:SimSun}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]:before{content:\"\\9ED1\\4F53\";font-family:SimHei}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]:before{content:\"\\5FAE\\8F6F\\96C5\\9ED1\";font-family:Microsoft YaHei}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]:before{content:\"\\6977\\4F53\";font-family:KaiTi}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]:before{content:\"\\4EFF\\5B8B\";font-family:FangSong}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]:before{content:\"Arial\";font-family:Arial}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]:before{content:\"Times New Roman\";font-family:Times New Roman}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]:before{content:\"sans-serif\";font-family:\"sans-serif\"}.quill_editor_for_react_area .ql-font-SimSun{font-family:SimSun}.quill_editor_for_react_area .ql-font-SimHei{font-family:SimHei}.quill_editor_for_react_area .ql-font-Microsoft-YaHei{font-family:Microsoft YaHei}.quill_editor_for_react_area .ql-font-KaiTi{font-family:KaiTi}.quill_editor_for_react_area .ql-font-FangSong{font-family:FangSong}.quill_editor_for_react_area .ql-font-Arial{font-family:Arial}.quill_editor_for_react_area .ql-font-Times-New-Roman{font-family:Times New Roman}.quill_editor_for_react_area .ql-font-sans-serif{font-family:\"sans-serif\"}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item:before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label:before{content:\"\\5FAE\\8F6F\\96C5\\9ED1\";font-family:Microsoft YaHei}.quill_editor_for_react_area .ql-snow .ql-fill{display:inline-block;position:relative;color:#05101a;vertical-align:top}.quill_editor_for_react_area .ql-snow .ql-fill:before{position:absolute;left:50%;top:-1px;content:\"\\E709\";font-family:iconfont;margin-left:-7px}", "", {"version":3,"sources":["/Users/hs/forgeplus-react/src/forge/quillForEditor/index.scss"],"names":[],"mappings":"AAAA,yCAAyC,gBAAiB,CAAC,4CAA4C,cAAc,CAAC,uMAAyM,eAAe,cAAc,CAAC,uMAAyM,eAAe,cAAc,CAAC,uMAAyM,eAAe,cAAc,CAAC,uMAAyM,eAAe,cAAc,CAAC,uMAAyM,eAAe,cAAc,CAAC,iKAAmK,eAAe,cAAc,CAAC,uMAAyM,qBAAa,kBAAoB,CAAC,uMAAyM,qBAAa,kBAAoB,CAAC,yNAA2N,+BAAe,2BAA6B,CAAC,qMAAuM,qBAAa,iBAAmB,CAAC,2MAA6M,qBAAa,oBAAsB,CAAC,qMAAuM,gBAAgB,iBAAmB,CAAC,yNAA2N,0BAA0B,2BAA6B,CAAC,+MAAiN,qBAAqB,wBAAwB,CAAC,6CAA6C,kBAAoB,CAAC,6CAA6C,kBAAoB,CAAC,sDAAsD,2BAA6B,CAAC,4CAA4C,iBAAmB,CAAC,+CAA+C,oBAAsB,CAAC,4CAA4C,iBAAmB,CAAC,sDAAsD,2BAA6B,CAAC,iDAAiD,wBAAwB,CAAC,iKAAmK,+BAAe,2BAA6B,CAAC,+CAA+C,qBAAqB,kBAAkB,cAAc,kBAAkB,CAAC,sDAAuD,kBAAkB,SAAS,SAAS,gBAAgB,qBAAuB,gBAAgB,CAAC","file":"index.scss","sourcesContent":[".quill_editor_for_react_area .ql-editing{left:0 !important}.quill_editor_for_react_area .ql-editor img{cursor:pointer}.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"12px\"]::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"12px\"]::before{content:'12px';font-size:12px}.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"14px\"]::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"14px\"]::before{content:'14px';font-size:14px}.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"16px\"]::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"16px\"]::before{content:'16px';font-size:16px}.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"18px\"]::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"18px\"]::before{content:'18px';font-size:18px}.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=\"20px\"]::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=\"20px\"]::before{content:'20px';font-size:20px}.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-label::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-size .ql-picker-item::before{content:'14px';font-size:14px}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before{content:\"宋体\";font-family:\"SimSun\"}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before{content:\"黑体\";font-family:\"SimHei\"}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before{content:\"微软雅黑\";font-family:\"Microsoft YaHei\"}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before{content:\"楷体\";font-family:\"KaiTi\"}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before{content:\"仿宋\";font-family:\"FangSong\"}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before{content:\"Arial\";font-family:\"Arial\"}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before{content:\"Times New Roman\";font-family:\"Times New Roman\"}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before{content:\"sans-serif\";font-family:\"sans-serif\"}.quill_editor_for_react_area .ql-font-SimSun{font-family:\"SimSun\"}.quill_editor_for_react_area .ql-font-SimHei{font-family:\"SimHei\"}.quill_editor_for_react_area .ql-font-Microsoft-YaHei{font-family:\"Microsoft YaHei\"}.quill_editor_for_react_area .ql-font-KaiTi{font-family:\"KaiTi\"}.quill_editor_for_react_area .ql-font-FangSong{font-family:\"FangSong\"}.quill_editor_for_react_area .ql-font-Arial{font-family:\"Arial\"}.quill_editor_for_react_area .ql-font-Times-New-Roman{font-family:\"Times New Roman\"}.quill_editor_for_react_area .ql-font-sans-serif{font-family:\"sans-serif\"}.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-label::before,.quill_editor_for_react_area .ql-snow .ql-picker.ql-font .ql-picker-item::before{content:\"微软雅黑\";font-family:\"Microsoft YaHei\"}.quill_editor_for_react_area .ql-snow .ql-fill{display:inline-block;position:relative;color:#05101A;vertical-align:top}.quill_editor_for_react_area .ql-snow .ql-fill::before{position:absolute;left:50%;top:-1px;content:'\\e709';font-family:'iconfont';margin-left:-7px}\n"],"sourceRoot":""}]);
|
||
|
||
// exports
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1925:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||
|
||
// load the styles
|
||
var content = __webpack_require__(1926);
|
||
if(typeof content === 'string') content = [[module.i, content, '']];
|
||
// Prepare cssTransformation
|
||
var transform;
|
||
|
||
var options = {"hmr":false}
|
||
options.transform = transform
|
||
// add the styles to the DOM
|
||
var update = __webpack_require__(317)(content, options);
|
||
if(content.locals) module.exports = content.locals;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1926:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
exports = module.exports = __webpack_require__(316)(true);
|
||
// imports
|
||
|
||
|
||
// module
|
||
exports.push([module.i, ".ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]:before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]:before{content:\"\\5B8B\\4F53\";font-family:SimSun!important}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]:before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]:before{content:\"\\9ED1\\4F53\";font-family:SimHei!important}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]:before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]:before{content:\"\\5FAE\\8F6F\\96C5\\9ED1\";font-family:Microsoft YaHei!important}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]:before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]:before{content:\"\\6977\\4F53\";font-family:KaiTi!important}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]:before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]:before{content:\"\\4EFF\\5B8B\";font-family:FangSong!important}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]:before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]:before{content:\"Arial\";font-family:Arial!important}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]:before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]:before{content:\"Times New Roman\";font-family:Times New Roman!important}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]:before{content:\"sans-serif\";font-family:sans-serif!important}.ql-font-SimSun{font-family:SimSun!important}.ql-font-SimHei{font-family:SimHei!important}.ql-font-Microsoft-YaHei{font-family:Microsoft YaHei!important}.ql-font-KaiTi{font-family:KaiTi!important}.ql-font-FangSong{font-family:FangSong!important}.ql-font-Arial{font-family:Arial!important}.ql-font-Times-New-Roman{font-family:Times New Roman!important}.ql-font-sans-serif{font-family:sans-serif!important}", "", {"version":3,"sources":["/Users/hs/forgeplus-react/src/forge/quillForEditor/font.css"],"names":[],"mappings":"AACA,6IAEI,qBAAc,AACd,4BAA8B,CACjC,AACD,6IAEI,qBAAc,AACd,4BAA8B,CACjC,AACD,+JAEI,+BAAgB,AAChB,qCAAuC,CAC1C,AACD,2IAEI,qBAAc,AACd,2BAA6B,CAChC,AACD,iJAEI,qBAAc,AACd,8BAAgC,CACnC,AACD,2IAEI,gBAAiB,AACjB,2BAA6B,CAChC,AACD,+JAEI,0BAA2B,AAC3B,qCAAuC,CAC1C,AACD,qJAEI,qBAAsB,AACtB,gCAAkC,CACrC,AAED,gBACI,4BAA8B,CACjC,AACD,gBACI,4BAA8B,CACjC,AACD,yBACI,qCAAuC,CAC1C,AACD,eACI,2BAA6B,CAChC,AACD,kBACI,8BAAgC,CACnC,AACD,eACI,2BAA6B,CAChC,AACD,yBACI,qCAAyC,CAC5C,AACD,oBACI,gCAAmC,CACtC","file":"font.css","sourcesContent":["@charset \"utf-8\";\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before {\n content: \"宋体\";\n font-family:SimSun !important;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before {\n content: \"黑体\";\n font-family:SimHei !important;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before {\n content: \"微软雅黑\";\n font-family:Microsoft YaHei !important;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before {\n content: \"楷体\";\n font-family:KaiTi !important;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before {\n content: \"仿宋\";\n font-family:FangSong !important;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before {\n content: \"Arial\";\n font-family:Arial !important;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before {\n content: \"Times New Roman\";\n font-family:Times New Roman !important;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before {\n content: \"sans-serif\";\n font-family:sans-serif !important;\n}\n\n.ql-font-SimSun {\n font-family:SimSun !important;\n}\n.ql-font-SimHei {\n font-family:SimHei !important;\n}\n.ql-font-Microsoft-YaHei {\n font-family:Microsoft YaHei !important;\n}\n.ql-font-KaiTi {\n font-family:KaiTi !important;\n}\n.ql-font-FangSong {\n font-family:FangSong !important;\n}\n.ql-font-Arial {\n font-family:Arial !important;\n}\n.ql-font-Times-New-Roman {\n font-family:Times New Roman !important;\n}\n.ql-font-sans-serif {\n font-family:sans-serif !important;\n}\n"],"sourceRoot":""}]);
|
||
|
||
// exports
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1927:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};function deepEqual(prev,current){if(prev===current){// 基本类型比较,值,类型都相同 或者同为 null or undefined
|
||
return true;}if(!prev&¤t||prev&&!current||!prev&&!current){return false;}if(Array.isArray(prev)){if(!Array.isArray(current))return false;if(prev.length!==current.length)return false;for(var i=0;i<prev.length;i++){if(!deepEqual(current[i],prev[i])){return false;}}return true;}if((typeof current==='undefined'?'undefined':_typeof(current))==='object'){if((typeof prev==='undefined'?'undefined':_typeof(prev))!=='object')return false;var prevKeys=Object.keys(prev);var curKeys=Object.keys(current);if(prevKeys.length!==curKeys.length)return false;prevKeys.sort();curKeys.sort();for(var _i=0;_i<prevKeys.length;_i++){if(prevKeys[_i]!==curKeys[_i])return false;var key=prevKeys[_i];if(!deepEqual(prev[key],current[key]))return false;}return true;}return false;}/* harmony default export */ __webpack_exports__["a"] = (deepEqual);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1928:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_quill__ = __webpack_require__(1347);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_quill___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_quill__);
|
||
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _get=function get(object,property,receiver){if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined;}else{return get(parent,property,receiver);}}else if("value"in desc){return desc.value;}else{var getter=desc.get;if(getter===undefined){return undefined;}return getter.call(receiver);}};function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/*
|
||
* @Description: 重写图片
|
||
* @Author: tangjiang
|
||
* @Github:
|
||
* @Date: 2019-12-16 15:50:45
|
||
* @LastEditors : tangjiang
|
||
* @LastEditTime : 2019-12-31 13:59:02
|
||
*/var BlockEmbed=__WEBPACK_IMPORTED_MODULE_0_quill___default.a.import('blots/block/embed');var ImageBlot=function(_BlockEmbed){_inherits(ImageBlot,_BlockEmbed);function ImageBlot(){_classCallCheck(this,ImageBlot);return _possibleConstructorReturn(this,(ImageBlot.__proto__||Object.getPrototypeOf(ImageBlot)).apply(this,arguments));}_createClass(ImageBlot,null,[{key:'create',value:function create(value){var node=_get(ImageBlot.__proto__||Object.getPrototypeOf(ImageBlot),'create',this).call(this);node.setAttribute('alt',value.alt);node.setAttribute('src',value.url);console.log('~~~~~~~~~~~',node,value);node.addEventListener('click',function(){try{value.onclick(value.url);}catch(e){}},false);if(value.width){node.setAttribute('width',value.width);}if(value.height){node.setAttribute('height',value.height);}if(value.id){node.setAttribute('id',value.id);}// 宽度和高度都不存在时,
|
||
if(!value.width&&!value.height){node.setAttribute('width','100%');}// node.setAttribute('style', { cursor: 'pointer' });
|
||
// if (node.onclick) {
|
||
// console.log('image 有图片点击事件======》》》》》》');
|
||
// // node.setAttribute('onclick', node.onCLick);
|
||
// }
|
||
// 给图片添加点击事件
|
||
// node.onclick = () => {
|
||
// value.onClick && value.onClick(value.url);
|
||
// }
|
||
return node;}// 获取节点值
|
||
},{key:'value',value:function value(node){return{alt:node.getAttribute('alt'),url:node.getAttribute('src'),onclick:node.onclick,width:node.width,height:node.height,display:node.getAttribute('display'),id:node.id};}}]);return ImageBlot;}(BlockEmbed);/* harmony default export */ __webpack_exports__["a"] = (ImageBlot);ImageBlot.blotName='image';ImageBlot.tagName='img';
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1929:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_quill__ = __webpack_require__(1347);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_quill___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_quill__);
|
||
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _get=function get(object,property,receiver){if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined;}else{return get(parent,property,receiver);}}else if("value"in desc){return desc.value;}else{var getter=desc.get;if(getter===undefined){return undefined;}return getter.call(receiver);}};function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/*
|
||
* @Description: 填空
|
||
* @Author: tangjiang
|
||
* @Github:
|
||
* @Date: 2020-01-06 09:02:29
|
||
* @LastEditors : tangjiang
|
||
* @LastEditTime : 2020-02-05 10:44:01
|
||
*/var Inline=__WEBPACK_IMPORTED_MODULE_0_quill___default.a.import('blots/inline');var FillBlot=function(_Inline){_inherits(FillBlot,_Inline);function FillBlot(){_classCallCheck(this,FillBlot);return _possibleConstructorReturn(this,(FillBlot.__proto__||Object.getPrototypeOf(FillBlot)).apply(this,arguments));}_createClass(FillBlot,null,[{key:'create',value:function create(value){var node=_get(FillBlot.__proto__||Object.getPrototypeOf(FillBlot),'cerate',this).call(this,value);node.setAttribute('data_index',value.data_index);node.nodeValue=value.text;return node;}},{key:'value',value:function value(node){return{// dataSet: node.getAttribute('data-fill'),
|
||
data_index:node.getAttribute('data_index')};}}]);return FillBlot;}(Inline);FillBlot.blotName="fill";FillBlot.tagName="span";/* harmony default export */ __webpack_exports__["a"] = (FillBlot);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 1930:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_quill__ = __webpack_require__(1347);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_quill___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_quill__);
|
||
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _get=function get(object,property,receiver){if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined;}else{return get(parent,property,receiver);}}else if("value"in desc){return desc.value;}else{var getter=desc.get;if(getter===undefined){return undefined;}return getter.call(receiver);}};function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}var Inline=__WEBPACK_IMPORTED_MODULE_0_quill___default.a.import('blots/inline');var LinkBlot=function(_Inline){_inherits(LinkBlot,_Inline);function LinkBlot(){_classCallCheck(this,LinkBlot);return _possibleConstructorReturn(this,(LinkBlot.__proto__||Object.getPrototypeOf(LinkBlot)).apply(this,arguments));}_createClass(LinkBlot,null,[{key:'create',value:function create(value){var node=_get(LinkBlot.__proto__||Object.getPrototypeOf(LinkBlot),'create',this).call(this);var rs=value;if(rs.indexOf('http://')<0){rs='http://'+rs;}node.setAttribute('href',rs);node.setAttribute('target','_blank');return node;}},{key:'formats',value:function formats(node){return node.getAttribute('href');}}]);return LinkBlot;}(Inline);/* harmony default export */ __webpack_exports__["a"] = (LinkBlot);LinkBlot.blotName='link';LinkBlot.tagName='a';
|
||
|
||
/***/ }),
|
||
|
||
/***/ 2124:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_popconfirm_style_css__ = __webpack_require__(1477);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_popconfirm_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_popconfirm_style_css__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_popconfirm__ = __webpack_require__(1476);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_popconfirm___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_popconfirm__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_router_dom__ = __webpack_require__(51);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_axios__ = __webpack_require__(8);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_axios__);
|
||
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}var Attachment=function(_Component){_inherits(Attachment,_Component);function Attachment(props){_classCallCheck(this,Attachment);var _this=_possibleConstructorReturn(this,(Attachment.__proto__||Object.getPrototypeOf(Attachment)).call(this,props));_this.componentDidMount=function(){_this.getDetail();};_this.getDetail=function(){_this.setState({canDelete:_this.props.canDelete});};_this.deleteAttachment=function(id){var url='/attachments/'+id+'.json';__WEBPACK_IMPORTED_MODULE_4_axios___default.a.delete(url,{}).then(function(response){if(response.data){if(response.data.status===0){_this.setState({Deleted:_this.state.Deleted.concat(id)});_this.props.showNotification("附件删除成功");}else{_this.props.showNotification(response.data.message);}}}).catch(function(error){console.log(error);});};_this.state={canDelete:false,Deleted:[]};return _this;}_createClass(Attachment,[{key:'render',value:function render(){var _this2=this;var _state=this.state,Deleted=_state.Deleted,canDelete=_state.canDelete;var attachments=this.props.attachments;return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',null,attachments?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{className:'attachmentsList'},attachments.map(function(item,key){return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{key:key,style:{display:Deleted.length>0&&Deleted.indexOf(item.id)!==-1?"none":"block"},className:'mt10 attachment-list-div'},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_react_router_dom__["b" /* Link */],{to:''+item.url,target:'_blank',className:'attachment-list-a'},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('i',{className:'iconfont icon-fujian mr8 paper-clip-color font-12'}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',null,item.title),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:'ml20'},item.filesize)),canDelete?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_popconfirm___default.a,{placement:'bottom',title:'您确定要删除附件吗',okText:'\u662F',cancelText:'\u5426',onConfirm:function onConfirm(){return _this2.deleteAttachment(item.id);}},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:'attachment-list-delete fr'},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('i',{className:'iconfont icon-lajitong mr10 color-grey-9 font-14'}))):"");})):"");}}]);return Attachment;}(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (Attachment);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 4992:
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__ = __webpack_require__(28);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__ = __webpack_require__(29);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_form_style_css__ = __webpack_require__(974);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_form_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_form_style_css__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_form__ = __webpack_require__(975);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css__ = __webpack_require__(60);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_input__ = __webpack_require__(61);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_input__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_select_style_css__ = __webpack_require__(321);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_select_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_antd_lib_select_style_css__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_select__ = __webpack_require__(319);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_antd_lib_select__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react__ = __webpack_require__(0);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_router_dom__ = __webpack_require__(51);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_axios__ = __webpack_require__(8);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_axios__);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__Nav__ = __webpack_require__(1722);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__Upload_Index__ = __webpack_require__(1849);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_educoder__ = __webpack_require__(5);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__Upload_attachment__ = __webpack_require__(2124);
|
||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__quillForEditor__ = __webpack_require__(1922);
|
||
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}var Option=__WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default.a.Option;var options=[['bold','italic','underline'],[{header:[1,2,3,false]}],['blockquote','code-block'],['link','image'],['formula']];var UpdateDetail=function(_Component){_inherits(UpdateDetail,_Component);function UpdateDetail(props){_classCallCheck(this,UpdateDetail);var _this=_possibleConstructorReturn(this,(UpdateDetail.__proto__||Object.getPrototypeOf(UpdateDetail)).call(this,props));_this.componentDidMount=function(){_this.InitData();_this.getDetail();//this.getSelectList();
|
||
};_this.InitData=function(){// this.props.form.setFieldsValue({
|
||
// ...this.state
|
||
// });
|
||
};_this.getDetail=function(){var _this$props$match$par=_this.props.match.params,projectsId=_this$props$match$par.projectsId,orderId=_this$props$match$par.orderId;var url='/projects/'+projectsId+'/issues/'+orderId+'/edit.json';__WEBPACK_IMPORTED_MODULE_10_axios___default.a.get(url).then(function(result){if(result){_this.setState({data:result.data,subject:result.data.subject,issue_chosen:result.data.issue_chosen,branches:result.data.branches,tracker_id:result.data.tracker_id,issue_type:result.data.issue_type,status_id:result.data.status_id,priority_id:result.data.priority_id,done_ratio:result.data.done_ratio,textcount:result.data.description,branch_name:result.data.branch_name,get_attachments:result.data.attachments,fileList:undefined,issue_tag_ids:result.data.issue_tags&&result.data.issue_tags[0].id,fixed_version_id:result.data.fixed_version_id,assigned_to_id:result.data.assigned_to_id});// this.getjournalslist();
|
||
}}).catch(function(error){console.log(error);});};_this.handleok=function(){_this.setState({isShow:false});};_this.handleCancel=function(){_this.setState({isShow:false});};_this.imgshow=function(){_this.setState({isShow:true});};_this.onContentChange=function(value){_this.setState({textcount:JSON.stringify(value)});};_this.changmodelname=function(e){_this.setState({subject:e.target.value});};_this.changmodelcount=function(e){_this.setState({textcount:e.target.value});};_this.renderSelect=function(list){if(list&&list.length>0){return list.map(function(item,key){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(Option,{key:key+1,value:item.id},item.name);});}};_this.changeRatio=function(e){if(e===0){_this.props.form.setFieldsValue({status_id:1});_this.setState({status_id:1});}else if(e===100){_this.props.form.setFieldsValue({status_id:3});_this.setState({status_id:3});}else{_this.props.form.setFieldsValue({status_id:2});_this.setState({status_id:2});}};_this.changeStatus=function(e){// console.log(e);
|
||
if(e===1){_this.props.form.setFieldsValue({done_ratio:0});_this.setState({done_ratio:0});}else if(e===3){_this.props.form.setFieldsValue({done_ratio:100});_this.setState({done_ratio:100});}};_this.stringJson=function(value){var _value=null;try{_value=JSON.parse(value);}catch(e){_value=value;}return _value;};_this.UploadFunc=function(fileList){_this.setState({fileList:fileList});};_this.handleSubmit=function(){var fileList=_this.state.fileList;_this.props.form.validateFieldsAndScroll(function(err,values){if(!err){var _this$props$match$par2=_this.props.match.params,projectsId=_this$props$match$par2.projectsId,orderId=_this$props$match$par2.orderId;var subject=_this.state.subject;var url='/projects/'+projectsId+'/issues/'+orderId+'.json';if(values.issue_tag_ids===0){values.issue_tag_ids="";}else{values.issue_tag_ids=[values.issue_tag_ids];}if(values.assigned_to_id===0){values.assigned_to_id="";}var textcount=_this.state.textcount;__WEBPACK_IMPORTED_MODULE_10_axios___default.a.put(url,Object.assign({project_id:projectsId,subject:subject,id:orderId,description:textcount,attachment_ids:fileList},values)).then(function(result){if(result){_this.props.history.push('/projects/'+projectsId+'/orders/'+orderId+'/detail');}}).catch(function(error){console.log(error);});}});};_this.state={data:undefined,isShow:false,imgsrc:'',journalsdata:undefined,//图片区域是否显示 none 隐藏 block 显示
|
||
display:'none',titledisplay:'none',subject:'',branch_name:"",issue_tag_ids:"",fixed_version_id:"",tracker_id:0,issue_type:0,status_id:0,assigned_to_id:"",priority_id:0,done_ratio:0,textcount:"",fileList:undefined,get_attachments:undefined};return _this;}// 切换完成度
|
||
// 切换状态
|
||
// 获取上传后的文件id数组
|
||
_createClass(UpdateDetail,[{key:'render',value:function render(){var _props$match$params=this.props.match.params,projectsId=_props$match$params.projectsId,orderId=_props$match$params.orderId;var getFieldDecorator=this.props.form.getFieldDecorator;var current_user=this.props.current_user;var _state=this.state,issue_tag_ids=_state.issue_tag_ids,fixed_version_id=_state.fixed_version_id,branch_name=_state.branch_name,status_id=_state.status_id,tracker_id=_state.tracker_id,issue_type=_state.issue_type,assigned_to_id=_state.assigned_to_id,priority_id=_state.priority_id,done_ratio=_state.done_ratio,issue_chosen=_state.issue_chosen,branches=_state.branches,subject=_state.subject,textcount=_state.textcount,get_attachments=_state.get_attachments;return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('div',{className:'main'},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a,null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('div',{className:'f-wrap-between mt20',style:{alignItems:"flex-start"}},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('div',{className:'list-right df'},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_react_router_dom__["b" /* Link */],{to:'/users/'+(current_user&¤t_user.login)+'/projects',className:'show-user-link'},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('img',{className:'user_img',src:Object(__WEBPACK_IMPORTED_MODULE_13_educoder__["M" /* getImageUrl */])('images/'+(current_user&¤t_user.image_url)),alt:''})),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('div',{className:'new_context'},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.Item,null,getFieldDecorator('subject',{rules:[{required:true,message:'请填写任务标题'}],initialValue:subject})(__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_input___default.a,{placeholder:'\u6807\u9898',onChange:this.changmodelname}))),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('div',{className:'quillContent',style:{marginBottom:"20px"}},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__quillForEditor__["a" /* default */],{value:this.stringJson(textcount),wrapStyle:{height:'220px',opacity:1}// autoFocus={true}
|
||
,style:{height:'170px'},placeholder:'\u8BF7\u8F93\u5165\u4EFB\u52A1\u7684\u63CF\u8FF0...',options:options,onContentChange:this.onContentChange})),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__Upload_Index__["a" /* default */],{load:this.UploadFunc,showNotification:this.props.showNotification,isComplete:true}),get_attachments?__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14__Upload_attachment__["a" /* default */],{attachments:get_attachments,showNotification:this.props.showNotification,canDelete:true}):"",__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('p',{className:'clearfix mt15 text-right'},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('a',{className:'topWrapper_btn fr',type:'submit',style:{marginLeft:5},onClick:this.handleSubmit},'\u4FDD\u5B58'),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_react_router_dom__["b" /* Link */],{to:'/projects/'+projectsId+'/orders/'+orderId+'/detail',className:'a_btn cancel_btn fr'},'\u53D6\u6D88')))),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('div',{className:'list-left mt10',style:{paddingRight:"0px",paddingLeft:"0px",width:"25%",backgroundColor:"#fff"}},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('div',{className:'list-l-panel'},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.Item,{label:'\u5206\u652F'},getFieldDecorator('branch_name',{initialValue:branch_name,rules:[]})(__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default.a,null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(Option,{value:''},'\u5206\u652F\u672A\u6307\u5B9A'),branches&&branches.length>0&&branches.map(function(item,key){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(Option,{value:item},item);})))),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.Item,{label:'\u6807\u7B7E'},getFieldDecorator('issue_tag_ids',{initialValue:issue_tag_ids?[issue_tag_ids]:'',rules:[]})(__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default.a,null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(Option,{value:''},issue_chosen&&issue_chosen.issue_tag.length>0?'未选择标签':'请在仓库设置里添加标签'),this.renderSelect(issue_chosen&&issue_chosen.issue_tag)))),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.Item,{label:'\u91CC\u7A0B\u7891'},getFieldDecorator('fixed_version_id',{initialValue:fixed_version_id?fixed_version_id:"",rules:[]})(__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default.a,null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(Option,{value:''},issue_chosen&&issue_chosen.issue_version.length>0?'未选择里程碑':'请添加里程碑'),this.renderSelect(issue_chosen&&issue_chosen.issue_version)))),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.Item,{label:'\u72B6\u6001'},getFieldDecorator('status_id',{initialValue:status_id,rules:[{required:true,message:'请选择完成状态'}]})(__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default.a,{onChange:this.changeStatus},this.renderSelect(issue_chosen&&issue_chosen.issue_status)))),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.Item,{label:'\u5206\u7C7B'},getFieldDecorator('tracker_id',{initialValue:tracker_id,rules:[{required:true,message:'请选择分类'}]})(__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default.a,null,this.renderSelect(issue_chosen&&issue_chosen.tracker)))),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.Item,{label:'\u6307\u6D3E\u6210\u5458'},getFieldDecorator('assigned_to_id',{initialValue:assigned_to_id?assigned_to_id:""})(__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default.a,null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(Option,{value:''},'\u672A\u6307\u6D3E\u6210\u5458'),this.renderSelect(issue_chosen&&issue_chosen.assign_user)))),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.Item,{label:'\u4F18\u5148\u5EA6'},getFieldDecorator('priority_id',{initialValue:priority_id,rules:[{required:true,message:'请选择优先度'}]})(__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default.a,null,this.renderSelect(issue_chosen&&issue_chosen.priority)))),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.Item,{label:'\u5B8C\u6210\u5EA6'},getFieldDecorator('done_ratio',{initialValue:done_ratio,rules:[{required:true,message:'请选择完成度'}]})(__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default.a,{value:done_ratio,onChange:this.changeRatio},this.renderSelect(issue_chosen&&issue_chosen.done_ratio))))))))),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default.a,{onCancel:this.handleCancel,visible:this.state.isShow,width:'400px',footer:[],bodyStyle:{textAlign:'center'}},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('img',{'class':'list_img',src:'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1608431072,669449145&fm=27&gp=0.jpg',alt:''})));}}]);return UpdateDetail;}(__WEBPACK_IMPORTED_MODULE_8_react__["Component"]);var UpdateDetailForm=__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.create({name:'UpdateDetailForm'})(UpdateDetail);/* harmony default export */ __webpack_exports__["default"] = (UpdateDetailForm);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 913:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||
|
||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||
|
||
exports.convertFieldsError = convertFieldsError;
|
||
exports.format = format;
|
||
exports.isEmptyValue = isEmptyValue;
|
||
exports.isEmptyObject = isEmptyObject;
|
||
exports.asyncMap = asyncMap;
|
||
exports.complementError = complementError;
|
||
exports.deepMerge = deepMerge;
|
||
/* eslint no-console:0 */
|
||
|
||
var formatRegExp = /%[sdj%]/g;
|
||
|
||
var warning = exports.warning = function warning() {};
|
||
|
||
// don't print warning message when in production env or node runtime
|
||
if (false) {
|
||
exports.warning = warning = function warning(type, errors) {
|
||
if (typeof console !== 'undefined' && console.warn) {
|
||
if (errors.every(function (e) {
|
||
return typeof e === 'string';
|
||
})) {
|
||
console.warn(type, errors);
|
||
}
|
||
}
|
||
};
|
||
}
|
||
|
||
function convertFieldsError(errors) {
|
||
if (!errors || !errors.length) return null;
|
||
var fields = {};
|
||
errors.forEach(function (error) {
|
||
var field = error.field;
|
||
fields[field] = fields[field] || [];
|
||
fields[field].push(error);
|
||
});
|
||
return fields;
|
||
}
|
||
|
||
function format() {
|
||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
var i = 1;
|
||
var f = args[0];
|
||
var len = args.length;
|
||
if (typeof f === 'function') {
|
||
return f.apply(null, args.slice(1));
|
||
}
|
||
if (typeof f === 'string') {
|
||
var str = String(f).replace(formatRegExp, function (x) {
|
||
if (x === '%%') {
|
||
return '%';
|
||
}
|
||
if (i >= len) {
|
||
return x;
|
||
}
|
||
switch (x) {
|
||
case '%s':
|
||
return String(args[i++]);
|
||
case '%d':
|
||
return Number(args[i++]);
|
||
case '%j':
|
||
try {
|
||
return JSON.stringify(args[i++]);
|
||
} catch (_) {
|
||
return '[Circular]';
|
||
}
|
||
break;
|
||
default:
|
||
return x;
|
||
}
|
||
});
|
||
for (var arg = args[i]; i < len; arg = args[++i]) {
|
||
str += ' ' + arg;
|
||
}
|
||
return str;
|
||
}
|
||
return f;
|
||
}
|
||
|
||
function isNativeStringType(type) {
|
||
return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
|
||
}
|
||
|
||
function isEmptyValue(value, type) {
|
||
if (value === undefined || value === null) {
|
||
return true;
|
||
}
|
||
if (type === 'array' && Array.isArray(value) && !value.length) {
|
||
return true;
|
||
}
|
||
if (isNativeStringType(type) && typeof value === 'string' && !value) {
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
function isEmptyObject(obj) {
|
||
return Object.keys(obj).length === 0;
|
||
}
|
||
|
||
function asyncParallelArray(arr, func, callback) {
|
||
var results = [];
|
||
var total = 0;
|
||
var arrLength = arr.length;
|
||
|
||
function count(errors) {
|
||
results.push.apply(results, errors);
|
||
total++;
|
||
if (total === arrLength) {
|
||
callback(results);
|
||
}
|
||
}
|
||
|
||
arr.forEach(function (a) {
|
||
func(a, count);
|
||
});
|
||
}
|
||
|
||
function asyncSerialArray(arr, func, callback) {
|
||
var index = 0;
|
||
var arrLength = arr.length;
|
||
|
||
function next(errors) {
|
||
if (errors && errors.length) {
|
||
callback(errors);
|
||
return;
|
||
}
|
||
var original = index;
|
||
index = index + 1;
|
||
if (original < arrLength) {
|
||
func(arr[original], next);
|
||
} else {
|
||
callback([]);
|
||
}
|
||
}
|
||
|
||
next([]);
|
||
}
|
||
|
||
function flattenObjArr(objArr) {
|
||
var ret = [];
|
||
Object.keys(objArr).forEach(function (k) {
|
||
ret.push.apply(ret, objArr[k]);
|
||
});
|
||
return ret;
|
||
}
|
||
|
||
function asyncMap(objArr, option, func, callback) {
|
||
if (option.first) {
|
||
var flattenArr = flattenObjArr(objArr);
|
||
return asyncSerialArray(flattenArr, func, callback);
|
||
}
|
||
var firstFields = option.firstFields || [];
|
||
if (firstFields === true) {
|
||
firstFields = Object.keys(objArr);
|
||
}
|
||
var objArrKeys = Object.keys(objArr);
|
||
var objArrLength = objArrKeys.length;
|
||
var total = 0;
|
||
var results = [];
|
||
var pending = new Promise(function (resolve, reject) {
|
||
var next = function next(errors) {
|
||
results.push.apply(results, errors);
|
||
total++;
|
||
if (total === objArrLength) {
|
||
callback(results);
|
||
return results.length ? reject({ errors: results, fields: convertFieldsError(results) }) : resolve();
|
||
}
|
||
};
|
||
objArrKeys.forEach(function (key) {
|
||
var arr = objArr[key];
|
||
if (firstFields.indexOf(key) !== -1) {
|
||
asyncSerialArray(arr, func, next);
|
||
} else {
|
||
asyncParallelArray(arr, func, next);
|
||
}
|
||
});
|
||
});
|
||
pending['catch'](function (e) {
|
||
return e;
|
||
});
|
||
return pending;
|
||
}
|
||
|
||
function complementError(rule) {
|
||
return function (oe) {
|
||
if (oe && oe.message) {
|
||
oe.field = oe.field || rule.fullField;
|
||
return oe;
|
||
}
|
||
return {
|
||
message: typeof oe === 'function' ? oe() : oe,
|
||
field: oe.field || rule.fullField
|
||
};
|
||
};
|
||
}
|
||
|
||
function deepMerge(target, source) {
|
||
if (source) {
|
||
for (var s in source) {
|
||
if (source.hasOwnProperty(s)) {
|
||
var value = source[s];
|
||
if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && _typeof(target[s]) === 'object') {
|
||
target[s] = _extends({}, target[s], value);
|
||
} else {
|
||
target[s] = value;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return target;
|
||
}
|
||
|
||
/***/ }),
|
||
|
||
/***/ 914:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _required = __webpack_require__(946);
|
||
|
||
var _required2 = _interopRequireDefault(_required);
|
||
|
||
var _whitespace = __webpack_require__(1053);
|
||
|
||
var _whitespace2 = _interopRequireDefault(_whitespace);
|
||
|
||
var _type = __webpack_require__(1054);
|
||
|
||
var _type2 = _interopRequireDefault(_type);
|
||
|
||
var _range = __webpack_require__(1055);
|
||
|
||
var _range2 = _interopRequireDefault(_range);
|
||
|
||
var _enum = __webpack_require__(1056);
|
||
|
||
var _enum2 = _interopRequireDefault(_enum);
|
||
|
||
var _pattern = __webpack_require__(1057);
|
||
|
||
var _pattern2 = _interopRequireDefault(_pattern);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
exports['default'] = {
|
||
required: _required2['default'],
|
||
whitespace: _whitespace2['default'],
|
||
type: _type2['default'],
|
||
range: _range2['default'],
|
||
'enum': _enum2['default'],
|
||
pattern: _pattern2['default']
|
||
};
|
||
|
||
/***/ }),
|
||
|
||
/***/ 916:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Checks if `value` is classified as an `Array` object.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 0.1.0
|
||
* @category Lang
|
||
* @param {*} value The value to check.
|
||
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
||
* @example
|
||
*
|
||
* _.isArray([1, 2, 3]);
|
||
* // => true
|
||
*
|
||
* _.isArray(document.body.children);
|
||
* // => false
|
||
*
|
||
* _.isArray('abc');
|
||
* // => false
|
||
*
|
||
* _.isArray(_.noop);
|
||
* // => false
|
||
*/
|
||
var isArray = Array.isArray;
|
||
|
||
module.exports = isArray;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 917:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseIsNative = __webpack_require__(991),
|
||
getValue = __webpack_require__(994);
|
||
|
||
/**
|
||
* Gets the native function at `key` of `object`.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to query.
|
||
* @param {string} key The key of the method to get.
|
||
* @returns {*} Returns the function if it's native, else `undefined`.
|
||
*/
|
||
function getNative(object, key) {
|
||
var value = getValue(object, key);
|
||
return baseIsNative(value) ? value : undefined;
|
||
}
|
||
|
||
module.exports = getNative;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 918:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var eq = __webpack_require__(922);
|
||
|
||
/**
|
||
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
||
*
|
||
* @private
|
||
* @param {Array} array The array to inspect.
|
||
* @param {*} key The key to search for.
|
||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||
*/
|
||
function assocIndexOf(array, key) {
|
||
var length = array.length;
|
||
while (length--) {
|
||
if (eq(array[length][0], key)) {
|
||
return length;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
|
||
module.exports = assocIndexOf;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 919:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var getNative = __webpack_require__(917);
|
||
|
||
/* Built-in method references that are verified to be native. */
|
||
var nativeCreate = getNative(Object, 'create');
|
||
|
||
module.exports = nativeCreate;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 920:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var isKeyable = __webpack_require__(1003);
|
||
|
||
/**
|
||
* Gets the data for `map`.
|
||
*
|
||
* @private
|
||
* @param {Object} map The map to query.
|
||
* @param {string} key The reference key.
|
||
* @returns {*} Returns the map data.
|
||
*/
|
||
function getMapData(map, key) {
|
||
var data = map.__data__;
|
||
return isKeyable(key)
|
||
? data[typeof key == 'string' ? 'string' : 'hash']
|
||
: data.map;
|
||
}
|
||
|
||
module.exports = getMapData;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 921:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var isSymbol = __webpack_require__(325);
|
||
|
||
/** Used as references for various `Number` constants. */
|
||
var INFINITY = 1 / 0;
|
||
|
||
/**
|
||
* Converts `value` to a string key if it's not a string or symbol.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to inspect.
|
||
* @returns {string|symbol} Returns the key.
|
||
*/
|
||
function toKey(value) {
|
||
if (typeof value == 'string' || isSymbol(value)) {
|
||
return value;
|
||
}
|
||
var result = (value + '');
|
||
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
||
}
|
||
|
||
module.exports = toKey;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 922:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Performs a
|
||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||
* comparison between two values to determine if they are equivalent.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 4.0.0
|
||
* @category Lang
|
||
* @param {*} value The value to compare.
|
||
* @param {*} other The other value to compare.
|
||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||
* @example
|
||
*
|
||
* var object = { 'a': 1 };
|
||
* var other = { 'a': 1 };
|
||
*
|
||
* _.eq(object, object);
|
||
* // => true
|
||
*
|
||
* _.eq(object, other);
|
||
* // => false
|
||
*
|
||
* _.eq('a', 'a');
|
||
* // => true
|
||
*
|
||
* _.eq('a', Object('a'));
|
||
* // => false
|
||
*
|
||
* _.eq(NaN, NaN);
|
||
* // => true
|
||
*/
|
||
function eq(value, other) {
|
||
return value === other || (value !== value && other !== other);
|
||
}
|
||
|
||
module.exports = eq;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 923:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var isArray = __webpack_require__(916),
|
||
isKey = __webpack_require__(935),
|
||
stringToPath = __webpack_require__(1008),
|
||
toString = __webpack_require__(977);
|
||
|
||
/**
|
||
* Casts `value` to a path array if it's not one.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to inspect.
|
||
* @param {Object} [object] The object to query keys on.
|
||
* @returns {Array} Returns the cast property path array.
|
||
*/
|
||
function castPath(value, object) {
|
||
if (isArray(value)) {
|
||
return value;
|
||
}
|
||
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
||
}
|
||
|
||
module.exports = castPath;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 925:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var listCacheClear = __webpack_require__(986),
|
||
listCacheDelete = __webpack_require__(987),
|
||
listCacheGet = __webpack_require__(988),
|
||
listCacheHas = __webpack_require__(989),
|
||
listCacheSet = __webpack_require__(990);
|
||
|
||
/**
|
||
* Creates an list cache object.
|
||
*
|
||
* @private
|
||
* @constructor
|
||
* @param {Array} [entries] The key-value pairs to cache.
|
||
*/
|
||
function ListCache(entries) {
|
||
var index = -1,
|
||
length = entries == null ? 0 : entries.length;
|
||
|
||
this.clear();
|
||
while (++index < length) {
|
||
var entry = entries[index];
|
||
this.set(entry[0], entry[1]);
|
||
}
|
||
}
|
||
|
||
// Add methods to `ListCache`.
|
||
ListCache.prototype.clear = listCacheClear;
|
||
ListCache.prototype['delete'] = listCacheDelete;
|
||
ListCache.prototype.get = listCacheGet;
|
||
ListCache.prototype.has = listCacheHas;
|
||
ListCache.prototype.set = listCacheSet;
|
||
|
||
module.exports = ListCache;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 927:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _extends2 = __webpack_require__(19);
|
||
|
||
var _extends3 = _interopRequireDefault(_extends2);
|
||
|
||
exports.argumentContainer = argumentContainer;
|
||
exports.identity = identity;
|
||
exports.flattenArray = flattenArray;
|
||
exports.treeTraverse = treeTraverse;
|
||
exports.flattenFields = flattenFields;
|
||
exports.normalizeValidateRules = normalizeValidateRules;
|
||
exports.getValidateTriggers = getValidateTriggers;
|
||
exports.getValueFromEvent = getValueFromEvent;
|
||
exports.getErrorStrs = getErrorStrs;
|
||
exports.getParams = getParams;
|
||
exports.isEmptyObject = isEmptyObject;
|
||
exports.hasRules = hasRules;
|
||
exports.startsWith = startsWith;
|
||
|
||
var _hoistNonReactStatics = __webpack_require__(1039);
|
||
|
||
var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
|
||
|
||
var _warning = __webpack_require__(327);
|
||
|
||
var _warning2 = _interopRequireDefault(_warning);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
function getDisplayName(WrappedComponent) {
|
||
return WrappedComponent.displayName || WrappedComponent.name || 'WrappedComponent';
|
||
}
|
||
|
||
function argumentContainer(Container, WrappedComponent) {
|
||
/* eslint no-param-reassign:0 */
|
||
Container.displayName = 'Form(' + getDisplayName(WrappedComponent) + ')';
|
||
Container.WrappedComponent = WrappedComponent;
|
||
return (0, _hoistNonReactStatics2['default'])(Container, WrappedComponent);
|
||
}
|
||
|
||
function identity(obj) {
|
||
return obj;
|
||
}
|
||
|
||
function flattenArray(arr) {
|
||
return Array.prototype.concat.apply([], arr);
|
||
}
|
||
|
||
function treeTraverse() {
|
||
var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||
var tree = arguments[1];
|
||
var isLeafNode = arguments[2];
|
||
var errorMessage = arguments[3];
|
||
var callback = arguments[4];
|
||
|
||
if (isLeafNode(path, tree)) {
|
||
callback(path, tree);
|
||
} else if (tree === undefined || tree === null) {
|
||
// Do nothing
|
||
} else if (Array.isArray(tree)) {
|
||
tree.forEach(function (subTree, index) {
|
||
return treeTraverse(path + '[' + index + ']', subTree, isLeafNode, errorMessage, callback);
|
||
});
|
||
} else {
|
||
// It's object and not a leaf node
|
||
if (typeof tree !== 'object') {
|
||
(0, _warning2['default'])(false, errorMessage);
|
||
return;
|
||
}
|
||
Object.keys(tree).forEach(function (subTreeKey) {
|
||
var subTree = tree[subTreeKey];
|
||
treeTraverse('' + path + (path ? '.' : '') + subTreeKey, subTree, isLeafNode, errorMessage, callback);
|
||
});
|
||
}
|
||
}
|
||
|
||
function flattenFields(maybeNestedFields, isLeafNode, errorMessage) {
|
||
var fields = {};
|
||
treeTraverse(undefined, maybeNestedFields, isLeafNode, errorMessage, function (path, node) {
|
||
fields[path] = node;
|
||
});
|
||
return fields;
|
||
}
|
||
|
||
function normalizeValidateRules(validate, rules, validateTrigger) {
|
||
var validateRules = validate.map(function (item) {
|
||
var newItem = (0, _extends3['default'])({}, item, {
|
||
trigger: item.trigger || []
|
||
});
|
||
if (typeof newItem.trigger === 'string') {
|
||
newItem.trigger = [newItem.trigger];
|
||
}
|
||
return newItem;
|
||
});
|
||
if (rules) {
|
||
validateRules.push({
|
||
trigger: validateTrigger ? [].concat(validateTrigger) : [],
|
||
rules: rules
|
||
});
|
||
}
|
||
return validateRules;
|
||
}
|
||
|
||
function getValidateTriggers(validateRules) {
|
||
return validateRules.filter(function (item) {
|
||
return !!item.rules && item.rules.length;
|
||
}).map(function (item) {
|
||
return item.trigger;
|
||
}).reduce(function (pre, curr) {
|
||
return pre.concat(curr);
|
||
}, []);
|
||
}
|
||
|
||
function getValueFromEvent(e) {
|
||
// To support custom element
|
||
if (!e || !e.target) {
|
||
return e;
|
||
}
|
||
var target = e.target;
|
||
|
||
return target.type === 'checkbox' ? target.checked : target.value;
|
||
}
|
||
|
||
function getErrorStrs(errors) {
|
||
if (errors) {
|
||
return errors.map(function (e) {
|
||
if (e && e.message) {
|
||
return e.message;
|
||
}
|
||
return e;
|
||
});
|
||
}
|
||
return errors;
|
||
}
|
||
|
||
function getParams(ns, opt, cb) {
|
||
var names = ns;
|
||
var options = opt;
|
||
var callback = cb;
|
||
if (cb === undefined) {
|
||
if (typeof names === 'function') {
|
||
callback = names;
|
||
options = {};
|
||
names = undefined;
|
||
} else if (Array.isArray(names)) {
|
||
if (typeof options === 'function') {
|
||
callback = options;
|
||
options = {};
|
||
} else {
|
||
options = options || {};
|
||
}
|
||
} else {
|
||
callback = options;
|
||
options = names || {};
|
||
names = undefined;
|
||
}
|
||
}
|
||
return {
|
||
names: names,
|
||
options: options,
|
||
callback: callback
|
||
};
|
||
}
|
||
|
||
function isEmptyObject(obj) {
|
||
return Object.keys(obj).length === 0;
|
||
}
|
||
|
||
function hasRules(validate) {
|
||
if (validate) {
|
||
return validate.some(function (item) {
|
||
return item.rules && item.rules.length;
|
||
});
|
||
}
|
||
return false;
|
||
}
|
||
|
||
function startsWith(str, prefix) {
|
||
return str.lastIndexOf(prefix, 0) === 0;
|
||
}
|
||
|
||
/***/ }),
|
||
|
||
/***/ 928:
|
||
/***/ (function(module, exports) {
|
||
|
||
/** Used as references for various `Number` constants. */
|
||
var MAX_SAFE_INTEGER = 9007199254740991;
|
||
|
||
/** Used to detect unsigned integer values. */
|
||
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
||
|
||
/**
|
||
* Checks if `value` is a valid array-like index.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to check.
|
||
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||
*/
|
||
function isIndex(value, length) {
|
||
var type = typeof value;
|
||
length = length == null ? MAX_SAFE_INTEGER : length;
|
||
|
||
return !!length &&
|
||
(type == 'number' ||
|
||
(type != 'symbol' && reIsUint.test(value))) &&
|
||
(value > -1 && value % 1 == 0 && value < length);
|
||
}
|
||
|
||
module.exports = isIndex;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 932:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var getNative = __webpack_require__(917),
|
||
root = __webpack_require__(172);
|
||
|
||
/* Built-in method references that are verified to be native. */
|
||
var Map = getNative(root, 'Map');
|
||
|
||
module.exports = Map;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 933:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var mapCacheClear = __webpack_require__(995),
|
||
mapCacheDelete = __webpack_require__(1002),
|
||
mapCacheGet = __webpack_require__(1004),
|
||
mapCacheHas = __webpack_require__(1005),
|
||
mapCacheSet = __webpack_require__(1006);
|
||
|
||
/**
|
||
* Creates a map cache object to store key-value pairs.
|
||
*
|
||
* @private
|
||
* @constructor
|
||
* @param {Array} [entries] The key-value pairs to cache.
|
||
*/
|
||
function MapCache(entries) {
|
||
var index = -1,
|
||
length = entries == null ? 0 : entries.length;
|
||
|
||
this.clear();
|
||
while (++index < length) {
|
||
var entry = entries[index];
|
||
this.set(entry[0], entry[1]);
|
||
}
|
||
}
|
||
|
||
// Add methods to `MapCache`.
|
||
MapCache.prototype.clear = mapCacheClear;
|
||
MapCache.prototype['delete'] = mapCacheDelete;
|
||
MapCache.prototype.get = mapCacheGet;
|
||
MapCache.prototype.has = mapCacheHas;
|
||
MapCache.prototype.set = mapCacheSet;
|
||
|
||
module.exports = MapCache;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 934:
|
||
/***/ (function(module, exports) {
|
||
|
||
/** Used as references for various `Number` constants. */
|
||
var MAX_SAFE_INTEGER = 9007199254740991;
|
||
|
||
/**
|
||
* Checks if `value` is a valid array-like length.
|
||
*
|
||
* **Note:** This method is loosely based on
|
||
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 4.0.0
|
||
* @category Lang
|
||
* @param {*} value The value to check.
|
||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
||
* @example
|
||
*
|
||
* _.isLength(3);
|
||
* // => true
|
||
*
|
||
* _.isLength(Number.MIN_VALUE);
|
||
* // => false
|
||
*
|
||
* _.isLength(Infinity);
|
||
* // => false
|
||
*
|
||
* _.isLength('3');
|
||
* // => false
|
||
*/
|
||
function isLength(value) {
|
||
return typeof value == 'number' &&
|
||
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
||
}
|
||
|
||
module.exports = isLength;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 935:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var isArray = __webpack_require__(916),
|
||
isSymbol = __webpack_require__(325);
|
||
|
||
/** Used to match property names within property paths. */
|
||
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||
reIsPlainProp = /^\w*$/;
|
||
|
||
/**
|
||
* Checks if `value` is a property name and not a property path.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to check.
|
||
* @param {Object} [object] The object to query keys on.
|
||
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
||
*/
|
||
function isKey(value, object) {
|
||
if (isArray(value)) {
|
||
return false;
|
||
}
|
||
var type = typeof value;
|
||
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
||
value == null || isSymbol(value)) {
|
||
return true;
|
||
}
|
||
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
||
(object != null && value in Object(object));
|
||
}
|
||
|
||
module.exports = isKey;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 940:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Helper function for iterating over a collection
|
||
*
|
||
* @param collection
|
||
* @param fn
|
||
*/
|
||
function each(collection, fn) {
|
||
var i = 0,
|
||
length = collection.length,
|
||
cont;
|
||
|
||
for(i; i < length; i++) {
|
||
cont = fn(collection[i], i);
|
||
if(cont === false) {
|
||
break; //allow early exit
|
||
}
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Helper function for determining whether target object is an array
|
||
*
|
||
* @param target the object under test
|
||
* @return {Boolean} true if array, false otherwise
|
||
*/
|
||
function isArray(target) {
|
||
return Object.prototype.toString.apply(target) === '[object Array]';
|
||
}
|
||
|
||
/**
|
||
* Helper function for determining whether target object is a function
|
||
*
|
||
* @param target the object under test
|
||
* @return {Boolean} true if function, false otherwise
|
||
*/
|
||
function isFunction(target) {
|
||
return typeof target === 'function';
|
||
}
|
||
|
||
module.exports = {
|
||
isFunction : isFunction,
|
||
isArray : isArray,
|
||
each : each
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 943:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var _createReactContext = _interopRequireDefault(__webpack_require__(318));
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
var RowContext = (0, _createReactContext["default"])({});
|
||
var _default = RowContext;
|
||
exports["default"] = _default;
|
||
//# sourceMappingURL=RowContext.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 945:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _objectWithoutProperties2 = __webpack_require__(73);
|
||
|
||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
||
|
||
var _defineProperty2 = __webpack_require__(59);
|
||
|
||
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
||
|
||
var _extends5 = __webpack_require__(19);
|
||
|
||
var _extends6 = _interopRequireDefault(_extends5);
|
||
|
||
var _toConsumableArray2 = __webpack_require__(1038);
|
||
|
||
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
|
||
|
||
var _react = __webpack_require__(0);
|
||
|
||
var _react2 = _interopRequireDefault(_react);
|
||
|
||
var _createReactClass = __webpack_require__(1027);
|
||
|
||
var _createReactClass2 = _interopRequireDefault(_createReactClass);
|
||
|
||
var _unsafeLifecyclesPolyfill = __webpack_require__(1049);
|
||
|
||
var _unsafeLifecyclesPolyfill2 = _interopRequireDefault(_unsafeLifecyclesPolyfill);
|
||
|
||
var _asyncValidator = __webpack_require__(1050);
|
||
|
||
var _asyncValidator2 = _interopRequireDefault(_asyncValidator);
|
||
|
||
var _warning = __webpack_require__(327);
|
||
|
||
var _warning2 = _interopRequireDefault(_warning);
|
||
|
||
var _get = __webpack_require__(957);
|
||
|
||
var _get2 = _interopRequireDefault(_get);
|
||
|
||
var _set = __webpack_require__(947);
|
||
|
||
var _set2 = _interopRequireDefault(_set);
|
||
|
||
var _eq = __webpack_require__(922);
|
||
|
||
var _eq2 = _interopRequireDefault(_eq);
|
||
|
||
var _createFieldsStore = __webpack_require__(1076);
|
||
|
||
var _createFieldsStore2 = _interopRequireDefault(_createFieldsStore);
|
||
|
||
var _utils = __webpack_require__(927);
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||
|
||
/* eslint-disable react/prefer-es6-class */
|
||
/* eslint-disable prefer-promise-reject-errors */
|
||
|
||
var DEFAULT_TRIGGER = 'onChange';
|
||
|
||
function createBaseForm() {
|
||
var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||
var mixins = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
||
var validateMessages = option.validateMessages,
|
||
onFieldsChange = option.onFieldsChange,
|
||
onValuesChange = option.onValuesChange,
|
||
_option$mapProps = option.mapProps,
|
||
mapProps = _option$mapProps === undefined ? _utils.identity : _option$mapProps,
|
||
mapPropsToFields = option.mapPropsToFields,
|
||
fieldNameProp = option.fieldNameProp,
|
||
fieldMetaProp = option.fieldMetaProp,
|
||
fieldDataProp = option.fieldDataProp,
|
||
_option$formPropName = option.formPropName,
|
||
formPropName = _option$formPropName === undefined ? 'form' : _option$formPropName,
|
||
formName = option.name,
|
||
withRef = option.withRef;
|
||
|
||
|
||
return function decorate(WrappedComponent) {
|
||
var Form = (0, _createReactClass2['default'])({
|
||
displayName: 'Form',
|
||
|
||
mixins: mixins,
|
||
|
||
getInitialState: function getInitialState() {
|
||
var _this = this;
|
||
|
||
var fields = mapPropsToFields && mapPropsToFields(this.props);
|
||
this.fieldsStore = (0, _createFieldsStore2['default'])(fields || {});
|
||
|
||
this.instances = {};
|
||
this.cachedBind = {};
|
||
this.clearedFieldMetaCache = {};
|
||
|
||
this.renderFields = {};
|
||
this.domFields = {};
|
||
|
||
// HACK: https://github.com/ant-design/ant-design/issues/6406
|
||
['getFieldsValue', 'getFieldValue', 'setFieldsInitialValue', 'getFieldsError', 'getFieldError', 'isFieldValidating', 'isFieldsValidating', 'isFieldsTouched', 'isFieldTouched'].forEach(function (key) {
|
||
_this[key] = function () {
|
||
var _fieldsStore;
|
||
|
||
if (false) {
|
||
(0, _warning2['default'])(false, 'you should not use `ref` on enhanced form, please use `wrappedComponentRef`. ' + 'See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140');
|
||
}
|
||
return (_fieldsStore = _this.fieldsStore)[key].apply(_fieldsStore, arguments);
|
||
};
|
||
});
|
||
|
||
return {
|
||
submitting: false
|
||
};
|
||
},
|
||
componentDidMount: function componentDidMount() {
|
||
this.cleanUpUselessFields();
|
||
},
|
||
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
|
||
if (mapPropsToFields) {
|
||
this.fieldsStore.updateFields(mapPropsToFields(nextProps));
|
||
}
|
||
},
|
||
componentDidUpdate: function componentDidUpdate() {
|
||
this.cleanUpUselessFields();
|
||
},
|
||
onCollectCommon: function onCollectCommon(name, action, args) {
|
||
var fieldMeta = this.fieldsStore.getFieldMeta(name);
|
||
if (fieldMeta[action]) {
|
||
fieldMeta[action].apply(fieldMeta, (0, _toConsumableArray3['default'])(args));
|
||
} else if (fieldMeta.originalProps && fieldMeta.originalProps[action]) {
|
||
var _fieldMeta$originalPr;
|
||
|
||
(_fieldMeta$originalPr = fieldMeta.originalProps)[action].apply(_fieldMeta$originalPr, (0, _toConsumableArray3['default'])(args));
|
||
}
|
||
var value = fieldMeta.getValueFromEvent ? fieldMeta.getValueFromEvent.apply(fieldMeta, (0, _toConsumableArray3['default'])(args)) : _utils.getValueFromEvent.apply(undefined, (0, _toConsumableArray3['default'])(args));
|
||
if (onValuesChange && value !== this.fieldsStore.getFieldValue(name)) {
|
||
var valuesAll = this.fieldsStore.getAllValues();
|
||
var valuesAllSet = {};
|
||
valuesAll[name] = value;
|
||
Object.keys(valuesAll).forEach(function (key) {
|
||
return (0, _set2['default'])(valuesAllSet, key, valuesAll[key]);
|
||
});
|
||
onValuesChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), (0, _set2['default'])({}, name, value), valuesAllSet);
|
||
}
|
||
var field = this.fieldsStore.getField(name);
|
||
return { name: name, field: (0, _extends6['default'])({}, field, { value: value, touched: true }), fieldMeta: fieldMeta };
|
||
},
|
||
onCollect: function onCollect(name_, action) {
|
||
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
||
args[_key - 2] = arguments[_key];
|
||
}
|
||
|
||
var _onCollectCommon = this.onCollectCommon(name_, action, args),
|
||
name = _onCollectCommon.name,
|
||
field = _onCollectCommon.field,
|
||
fieldMeta = _onCollectCommon.fieldMeta;
|
||
|
||
var validate = fieldMeta.validate;
|
||
|
||
|
||
this.fieldsStore.setFieldsAsDirty();
|
||
|
||
var newField = (0, _extends6['default'])({}, field, {
|
||
dirty: (0, _utils.hasRules)(validate)
|
||
});
|
||
this.setFields((0, _defineProperty3['default'])({}, name, newField));
|
||
},
|
||
onCollectValidate: function onCollectValidate(name_, action) {
|
||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||
args[_key2 - 2] = arguments[_key2];
|
||
}
|
||
|
||
var _onCollectCommon2 = this.onCollectCommon(name_, action, args),
|
||
field = _onCollectCommon2.field,
|
||
fieldMeta = _onCollectCommon2.fieldMeta;
|
||
|
||
var newField = (0, _extends6['default'])({}, field, {
|
||
dirty: true
|
||
});
|
||
|
||
this.fieldsStore.setFieldsAsDirty();
|
||
|
||
this.validateFieldsInternal([newField], {
|
||
action: action,
|
||
options: {
|
||
firstFields: !!fieldMeta.validateFirst
|
||
}
|
||
});
|
||
},
|
||
getCacheBind: function getCacheBind(name, action, fn) {
|
||
if (!this.cachedBind[name]) {
|
||
this.cachedBind[name] = {};
|
||
}
|
||
var cache = this.cachedBind[name];
|
||
if (!cache[action] || cache[action].oriFn !== fn) {
|
||
cache[action] = {
|
||
fn: fn.bind(this, name, action),
|
||
oriFn: fn
|
||
};
|
||
}
|
||
return cache[action].fn;
|
||
},
|
||
getFieldDecorator: function getFieldDecorator(name, fieldOption) {
|
||
var _this2 = this;
|
||
|
||
var props = this.getFieldProps(name, fieldOption);
|
||
return function (fieldElem) {
|
||
// We should put field in record if it is rendered
|
||
_this2.renderFields[name] = true;
|
||
|
||
var fieldMeta = _this2.fieldsStore.getFieldMeta(name);
|
||
var originalProps = fieldElem.props;
|
||
if (false) {
|
||
var valuePropName = fieldMeta.valuePropName;
|
||
(0, _warning2['default'])(!(valuePropName in originalProps), '`getFieldDecorator` will override `' + valuePropName + '`, ' + ('so please don\'t set `' + valuePropName + '` directly ') + 'and use `setFieldsValue` to set it.');
|
||
var defaultValuePropName = 'default' + valuePropName[0].toUpperCase() + valuePropName.slice(1);
|
||
(0, _warning2['default'])(!(defaultValuePropName in originalProps), '`' + defaultValuePropName + '` is invalid ' + ('for `getFieldDecorator` will set `' + valuePropName + '`,') + ' please use `option.initialValue` instead.');
|
||
}
|
||
fieldMeta.originalProps = originalProps;
|
||
fieldMeta.ref = fieldElem.ref;
|
||
return _react2['default'].cloneElement(fieldElem, (0, _extends6['default'])({}, props, _this2.fieldsStore.getFieldValuePropValue(fieldMeta)));
|
||
};
|
||
},
|
||
getFieldProps: function getFieldProps(name) {
|
||
var _this3 = this;
|
||
|
||
var usersFieldOption = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||
|
||
if (!name) {
|
||
throw new Error('Must call `getFieldProps` with valid name string!');
|
||
}
|
||
if (false) {
|
||
(0, _warning2['default'])(this.fieldsStore.isValidNestedFieldName(name), 'One field name cannot be part of another, e.g. `a` and `a.b`. Check field: ' + name);
|
||
(0, _warning2['default'])(!('exclusive' in usersFieldOption), '`option.exclusive` of `getFieldProps`|`getFieldDecorator` had been remove.');
|
||
}
|
||
|
||
delete this.clearedFieldMetaCache[name];
|
||
|
||
var fieldOption = (0, _extends6['default'])({
|
||
name: name,
|
||
trigger: DEFAULT_TRIGGER,
|
||
valuePropName: 'value',
|
||
validate: []
|
||
}, usersFieldOption);
|
||
|
||
var rules = fieldOption.rules,
|
||
trigger = fieldOption.trigger,
|
||
_fieldOption$validate = fieldOption.validateTrigger,
|
||
validateTrigger = _fieldOption$validate === undefined ? trigger : _fieldOption$validate,
|
||
validate = fieldOption.validate;
|
||
|
||
|
||
var fieldMeta = this.fieldsStore.getFieldMeta(name);
|
||
if ('initialValue' in fieldOption) {
|
||
fieldMeta.initialValue = fieldOption.initialValue;
|
||
}
|
||
|
||
var inputProps = (0, _extends6['default'])({}, this.fieldsStore.getFieldValuePropValue(fieldOption), {
|
||
ref: this.getCacheBind(name, name + '__ref', this.saveRef)
|
||
});
|
||
if (fieldNameProp) {
|
||
inputProps[fieldNameProp] = formName ? formName + '_' + name : name;
|
||
}
|
||
|
||
var validateRules = (0, _utils.normalizeValidateRules)(validate, rules, validateTrigger);
|
||
var validateTriggers = (0, _utils.getValidateTriggers)(validateRules);
|
||
validateTriggers.forEach(function (action) {
|
||
if (inputProps[action]) return;
|
||
inputProps[action] = _this3.getCacheBind(name, action, _this3.onCollectValidate);
|
||
});
|
||
|
||
// make sure that the value will be collect
|
||
if (trigger && validateTriggers.indexOf(trigger) === -1) {
|
||
inputProps[trigger] = this.getCacheBind(name, trigger, this.onCollect);
|
||
}
|
||
|
||
var meta = (0, _extends6['default'])({}, fieldMeta, fieldOption, {
|
||
validate: validateRules
|
||
});
|
||
this.fieldsStore.setFieldMeta(name, meta);
|
||
if (fieldMetaProp) {
|
||
inputProps[fieldMetaProp] = meta;
|
||
}
|
||
|
||
if (fieldDataProp) {
|
||
inputProps[fieldDataProp] = this.fieldsStore.getField(name);
|
||
}
|
||
|
||
// This field is rendered, record it
|
||
this.renderFields[name] = true;
|
||
|
||
return inputProps;
|
||
},
|
||
getFieldInstance: function getFieldInstance(name) {
|
||
return this.instances[name];
|
||
},
|
||
getRules: function getRules(fieldMeta, action) {
|
||
var actionRules = fieldMeta.validate.filter(function (item) {
|
||
return !action || item.trigger.indexOf(action) >= 0;
|
||
}).map(function (item) {
|
||
return item.rules;
|
||
});
|
||
return (0, _utils.flattenArray)(actionRules);
|
||
},
|
||
setFields: function setFields(maybeNestedFields, callback) {
|
||
var _this4 = this;
|
||
|
||
var fields = this.fieldsStore.flattenRegisteredFields(maybeNestedFields);
|
||
this.fieldsStore.setFields(fields);
|
||
if (onFieldsChange) {
|
||
var changedFields = Object.keys(fields).reduce(function (acc, name) {
|
||
return (0, _set2['default'])(acc, name, _this4.fieldsStore.getField(name));
|
||
}, {});
|
||
onFieldsChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), changedFields, this.fieldsStore.getNestedAllFields());
|
||
}
|
||
this.forceUpdate(callback);
|
||
},
|
||
setFieldsValue: function setFieldsValue(changedValues, callback) {
|
||
var fieldsMeta = this.fieldsStore.fieldsMeta;
|
||
|
||
var values = this.fieldsStore.flattenRegisteredFields(changedValues);
|
||
var newFields = Object.keys(values).reduce(function (acc, name) {
|
||
var isRegistered = fieldsMeta[name];
|
||
if (false) {
|
||
(0, _warning2['default'])(isRegistered, 'Cannot use `setFieldsValue` until ' + 'you use `getFieldDecorator` or `getFieldProps` to register it.');
|
||
}
|
||
if (isRegistered) {
|
||
var value = values[name];
|
||
acc[name] = {
|
||
value: value
|
||
};
|
||
}
|
||
return acc;
|
||
}, {});
|
||
this.setFields(newFields, callback);
|
||
if (onValuesChange) {
|
||
var allValues = this.fieldsStore.getAllValues();
|
||
onValuesChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), changedValues, allValues);
|
||
}
|
||
},
|
||
saveRef: function saveRef(name, _, component) {
|
||
if (!component) {
|
||
var _fieldMeta = this.fieldsStore.getFieldMeta(name);
|
||
if (!_fieldMeta.preserve) {
|
||
// after destroy, delete data
|
||
this.clearedFieldMetaCache[name] = {
|
||
field: this.fieldsStore.getField(name),
|
||
meta: _fieldMeta
|
||
};
|
||
this.clearField(name);
|
||
}
|
||
delete this.domFields[name];
|
||
return;
|
||
}
|
||
this.domFields[name] = true;
|
||
this.recoverClearedField(name);
|
||
var fieldMeta = this.fieldsStore.getFieldMeta(name);
|
||
if (fieldMeta) {
|
||
var ref = fieldMeta.ref;
|
||
if (ref) {
|
||
if (typeof ref === 'string') {
|
||
throw new Error('can not set ref string for ' + name);
|
||
} else if (typeof ref === 'function') {
|
||
ref(component);
|
||
} else if (Object.prototype.hasOwnProperty.call(ref, 'current')) {
|
||
ref.current = component;
|
||
}
|
||
}
|
||
}
|
||
this.instances[name] = component;
|
||
},
|
||
cleanUpUselessFields: function cleanUpUselessFields() {
|
||
var _this5 = this;
|
||
|
||
var fieldList = this.fieldsStore.getAllFieldsName();
|
||
var removedList = fieldList.filter(function (field) {
|
||
var fieldMeta = _this5.fieldsStore.getFieldMeta(field);
|
||
return !_this5.renderFields[field] && !_this5.domFields[field] && !fieldMeta.preserve;
|
||
});
|
||
if (removedList.length) {
|
||
removedList.forEach(this.clearField);
|
||
}
|
||
this.renderFields = {};
|
||
},
|
||
clearField: function clearField(name) {
|
||
this.fieldsStore.clearField(name);
|
||
delete this.instances[name];
|
||
delete this.cachedBind[name];
|
||
},
|
||
resetFields: function resetFields(ns) {
|
||
var _this6 = this;
|
||
|
||
var newFields = this.fieldsStore.resetFields(ns);
|
||
if (Object.keys(newFields).length > 0) {
|
||
this.setFields(newFields);
|
||
}
|
||
if (ns) {
|
||
var names = Array.isArray(ns) ? ns : [ns];
|
||
names.forEach(function (name) {
|
||
return delete _this6.clearedFieldMetaCache[name];
|
||
});
|
||
} else {
|
||
this.clearedFieldMetaCache = {};
|
||
}
|
||
},
|
||
recoverClearedField: function recoverClearedField(name) {
|
||
if (this.clearedFieldMetaCache[name]) {
|
||
this.fieldsStore.setFields((0, _defineProperty3['default'])({}, name, this.clearedFieldMetaCache[name].field));
|
||
this.fieldsStore.setFieldMeta(name, this.clearedFieldMetaCache[name].meta);
|
||
delete this.clearedFieldMetaCache[name];
|
||
}
|
||
},
|
||
validateFieldsInternal: function validateFieldsInternal(fields, _ref, callback) {
|
||
var _this7 = this;
|
||
|
||
var fieldNames = _ref.fieldNames,
|
||
action = _ref.action,
|
||
_ref$options = _ref.options,
|
||
options = _ref$options === undefined ? {} : _ref$options;
|
||
|
||
var allRules = {};
|
||
var allValues = {};
|
||
var allFields = {};
|
||
var alreadyErrors = {};
|
||
fields.forEach(function (field) {
|
||
var name = field.name;
|
||
if (options.force !== true && field.dirty === false) {
|
||
if (field.errors) {
|
||
(0, _set2['default'])(alreadyErrors, name, { errors: field.errors });
|
||
}
|
||
return;
|
||
}
|
||
var fieldMeta = _this7.fieldsStore.getFieldMeta(name);
|
||
var newField = (0, _extends6['default'])({}, field);
|
||
newField.errors = undefined;
|
||
newField.validating = true;
|
||
newField.dirty = true;
|
||
allRules[name] = _this7.getRules(fieldMeta, action);
|
||
allValues[name] = newField.value;
|
||
allFields[name] = newField;
|
||
});
|
||
this.setFields(allFields);
|
||
// in case normalize
|
||
Object.keys(allValues).forEach(function (f) {
|
||
allValues[f] = _this7.fieldsStore.getFieldValue(f);
|
||
});
|
||
if (callback && (0, _utils.isEmptyObject)(allFields)) {
|
||
callback((0, _utils.isEmptyObject)(alreadyErrors) ? null : alreadyErrors, this.fieldsStore.getFieldsValue(fieldNames));
|
||
return;
|
||
}
|
||
var validator = new _asyncValidator2['default'](allRules);
|
||
if (validateMessages) {
|
||
validator.messages(validateMessages);
|
||
}
|
||
validator.validate(allValues, options, function (errors) {
|
||
var errorsGroup = (0, _extends6['default'])({}, alreadyErrors);
|
||
if (errors && errors.length) {
|
||
errors.forEach(function (e) {
|
||
var errorFieldName = e.field;
|
||
var fieldName = errorFieldName;
|
||
|
||
// Handle using array validation rule.
|
||
// ref: https://github.com/ant-design/ant-design/issues/14275
|
||
Object.keys(allRules).some(function (ruleFieldName) {
|
||
var rules = allRules[ruleFieldName] || [];
|
||
|
||
// Exist if match rule
|
||
if (ruleFieldName === errorFieldName) {
|
||
fieldName = ruleFieldName;
|
||
return true;
|
||
}
|
||
|
||
// Skip if not match array type
|
||
if (rules.every(function (_ref2) {
|
||
var type = _ref2.type;
|
||
return type !== 'array';
|
||
}) || errorFieldName.indexOf(ruleFieldName + '.') !== 0) {
|
||
return false;
|
||
}
|
||
|
||
// Exist if match the field name
|
||
var restPath = errorFieldName.slice(ruleFieldName.length + 1);
|
||
if (/^\d+$/.test(restPath)) {
|
||
fieldName = ruleFieldName;
|
||
return true;
|
||
}
|
||
|
||
return false;
|
||
});
|
||
|
||
var field = (0, _get2['default'])(errorsGroup, fieldName);
|
||
if (typeof field !== 'object' || Array.isArray(field)) {
|
||
(0, _set2['default'])(errorsGroup, fieldName, { errors: [] });
|
||
}
|
||
var fieldErrors = (0, _get2['default'])(errorsGroup, fieldName.concat('.errors'));
|
||
fieldErrors.push(e);
|
||
});
|
||
}
|
||
var expired = [];
|
||
var nowAllFields = {};
|
||
Object.keys(allRules).forEach(function (name) {
|
||
var fieldErrors = (0, _get2['default'])(errorsGroup, name);
|
||
var nowField = _this7.fieldsStore.getField(name);
|
||
// avoid concurrency problems
|
||
if (!(0, _eq2['default'])(nowField.value, allValues[name])) {
|
||
expired.push({
|
||
name: name
|
||
});
|
||
} else {
|
||
nowField.errors = fieldErrors && fieldErrors.errors;
|
||
nowField.value = allValues[name];
|
||
nowField.validating = false;
|
||
nowField.dirty = false;
|
||
nowAllFields[name] = nowField;
|
||
}
|
||
});
|
||
_this7.setFields(nowAllFields);
|
||
if (callback) {
|
||
if (expired.length) {
|
||
expired.forEach(function (_ref3) {
|
||
var name = _ref3.name;
|
||
|
||
var fieldErrors = [{
|
||
message: name + ' need to revalidate',
|
||
field: name
|
||
}];
|
||
(0, _set2['default'])(errorsGroup, name, {
|
||
expired: true,
|
||
errors: fieldErrors
|
||
});
|
||
});
|
||
}
|
||
|
||
callback((0, _utils.isEmptyObject)(errorsGroup) ? null : errorsGroup, _this7.fieldsStore.getFieldsValue(fieldNames));
|
||
}
|
||
});
|
||
},
|
||
validateFields: function validateFields(ns, opt, cb) {
|
||
var _this8 = this;
|
||
|
||
var pending = new Promise(function (resolve, reject) {
|
||
var _getParams = (0, _utils.getParams)(ns, opt, cb),
|
||
names = _getParams.names,
|
||
options = _getParams.options;
|
||
|
||
var _getParams2 = (0, _utils.getParams)(ns, opt, cb),
|
||
callback = _getParams2.callback;
|
||
|
||
if (!callback || typeof callback === 'function') {
|
||
var oldCb = callback;
|
||
callback = function callback(errors, values) {
|
||
if (oldCb) {
|
||
oldCb(errors, values);
|
||
}
|
||
if (errors) {
|
||
reject({ errors: errors, values: values });
|
||
} else {
|
||
resolve(values);
|
||
}
|
||
};
|
||
}
|
||
var fieldNames = names ? _this8.fieldsStore.getValidFieldsFullName(names) : _this8.fieldsStore.getValidFieldsName();
|
||
var fields = fieldNames.filter(function (name) {
|
||
var fieldMeta = _this8.fieldsStore.getFieldMeta(name);
|
||
return (0, _utils.hasRules)(fieldMeta.validate);
|
||
}).map(function (name) {
|
||
var field = _this8.fieldsStore.getField(name);
|
||
field.value = _this8.fieldsStore.getFieldValue(name);
|
||
return field;
|
||
});
|
||
if (!fields.length) {
|
||
callback(null, _this8.fieldsStore.getFieldsValue(fieldNames));
|
||
return;
|
||
}
|
||
if (!('firstFields' in options)) {
|
||
options.firstFields = fieldNames.filter(function (name) {
|
||
var fieldMeta = _this8.fieldsStore.getFieldMeta(name);
|
||
return !!fieldMeta.validateFirst;
|
||
});
|
||
}
|
||
_this8.validateFieldsInternal(fields, {
|
||
fieldNames: fieldNames,
|
||
options: options
|
||
}, callback);
|
||
});
|
||
pending['catch'](function (e) {
|
||
// eslint-disable-next-line no-console
|
||
if (console.error && "production" !== 'production') {
|
||
// eslint-disable-next-line no-console
|
||
console.error(e);
|
||
}
|
||
return e;
|
||
});
|
||
return pending;
|
||
},
|
||
isSubmitting: function isSubmitting() {
|
||
if (false) {
|
||
(0, _warning2['default'])(false, '`isSubmitting` is deprecated. ' + "Actually, it's more convenient to handle submitting status by yourself.");
|
||
}
|
||
return this.state.submitting;
|
||
},
|
||
submit: function submit(callback) {
|
||
var _this9 = this;
|
||
|
||
if (false) {
|
||
(0, _warning2['default'])(false, '`submit` is deprecated. ' + "Actually, it's more convenient to handle submitting status by yourself.");
|
||
}
|
||
var fn = function fn() {
|
||
_this9.setState({
|
||
submitting: false
|
||
});
|
||
};
|
||
this.setState({
|
||
submitting: true
|
||
});
|
||
callback(fn);
|
||
},
|
||
render: function render() {
|
||
var _props = this.props,
|
||
wrappedComponentRef = _props.wrappedComponentRef,
|
||
restProps = (0, _objectWithoutProperties3['default'])(_props, ['wrappedComponentRef']); // eslint-disable-line
|
||
|
||
var formProps = (0, _defineProperty3['default'])({}, formPropName, this.getForm());
|
||
if (withRef) {
|
||
if (false) {
|
||
(0, _warning2['default'])(false, '`withRef` is deprecated, please use `wrappedComponentRef` instead. ' + 'See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140');
|
||
}
|
||
formProps.ref = 'wrappedComponent';
|
||
} else if (wrappedComponentRef) {
|
||
formProps.ref = wrappedComponentRef;
|
||
}
|
||
var props = mapProps.call(this, (0, _extends6['default'])({}, formProps, restProps));
|
||
return _react2['default'].createElement(WrappedComponent, props);
|
||
}
|
||
});
|
||
|
||
return (0, _utils.argumentContainer)((0, _unsafeLifecyclesPolyfill2['default'])(Form), WrappedComponent);
|
||
};
|
||
}
|
||
|
||
exports['default'] = createBaseForm;
|
||
module.exports = exports['default'];
|
||
|
||
/***/ }),
|
||
|
||
/***/ 946:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _util = __webpack_require__(913);
|
||
|
||
var util = _interopRequireWildcard(_util);
|
||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
|
||
|
||
/**
|
||
* Rule for validating required fields.
|
||
*
|
||
* @param rule The validation rule.
|
||
* @param value The value of the field on the source object.
|
||
* @param source The source object being validated.
|
||
* @param errors An array of errors that this rule may add
|
||
* validation errors to.
|
||
* @param options The validation options.
|
||
* @param options.messages The validation messages.
|
||
*/
|
||
function required(rule, value, source, errors, options, type) {
|
||
if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {
|
||
errors.push(util.format(options.messages.required, rule.fullField));
|
||
}
|
||
}
|
||
|
||
exports['default'] = required;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 947:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseSet = __webpack_require__(1072);
|
||
|
||
/**
|
||
* Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
|
||
* it's created. Arrays are created for missing index properties while objects
|
||
* are created for all other missing properties. Use `_.setWith` to customize
|
||
* `path` creation.
|
||
*
|
||
* **Note:** This method mutates `object`.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 3.7.0
|
||
* @category Object
|
||
* @param {Object} object The object to modify.
|
||
* @param {Array|string} path The path of the property to set.
|
||
* @param {*} value The value to set.
|
||
* @returns {Object} Returns `object`.
|
||
* @example
|
||
*
|
||
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
||
*
|
||
* _.set(object, 'a[0].b.c', 4);
|
||
* console.log(object.a[0].b.c);
|
||
* // => 4
|
||
*
|
||
* _.set(object, ['x', '0', 'y', 'z'], 5);
|
||
* console.log(object.x[0].y.z);
|
||
* // => 5
|
||
*/
|
||
function set(object, path, value) {
|
||
return object == null ? object : baseSet(object, path, value);
|
||
}
|
||
|
||
module.exports = set;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 948:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var _extends2 = __webpack_require__(19);
|
||
|
||
var _extends3 = _interopRequireDefault(_extends2);
|
||
|
||
var _classCallCheck2 = __webpack_require__(11);
|
||
|
||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||
|
||
exports.isFormField = isFormField;
|
||
exports["default"] = createFormField;
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
var Field = function Field(fields) {
|
||
(0, _classCallCheck3["default"])(this, Field);
|
||
|
||
(0, _extends3["default"])(this, fields);
|
||
};
|
||
|
||
function isFormField(obj) {
|
||
return obj instanceof Field;
|
||
}
|
||
|
||
function createFormField(field) {
|
||
if (isFormField(field)) {
|
||
return field;
|
||
}
|
||
return new Field(field);
|
||
}
|
||
|
||
/***/ }),
|
||
|
||
/***/ 949:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.FIELD_DATA_PROP = exports.FIELD_META_PROP = void 0;
|
||
var FIELD_META_PROP = 'data-__meta';
|
||
exports.FIELD_META_PROP = FIELD_META_PROP;
|
||
var FIELD_DATA_PROP = 'data-__field';
|
||
exports.FIELD_DATA_PROP = FIELD_DATA_PROP;
|
||
//# sourceMappingURL=constants.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 950:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var _createReactContext = _interopRequireDefault(__webpack_require__(318));
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
var FormContext = (0, _createReactContext["default"])({
|
||
labelAlign: 'right',
|
||
vertical: false
|
||
});
|
||
var _default = FormContext;
|
||
exports["default"] = _default;
|
||
//# sourceMappingURL=context.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 951:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseGetTag = __webpack_require__(323),
|
||
isObject = __webpack_require__(175);
|
||
|
||
/** `Object#toString` result references. */
|
||
var asyncTag = '[object AsyncFunction]',
|
||
funcTag = '[object Function]',
|
||
genTag = '[object GeneratorFunction]',
|
||
proxyTag = '[object Proxy]';
|
||
|
||
/**
|
||
* Checks if `value` is classified as a `Function` object.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 0.1.0
|
||
* @category Lang
|
||
* @param {*} value The value to check.
|
||
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
||
* @example
|
||
*
|
||
* _.isFunction(_);
|
||
* // => true
|
||
*
|
||
* _.isFunction(/abc/);
|
||
* // => false
|
||
*/
|
||
function isFunction(value) {
|
||
if (!isObject(value)) {
|
||
return false;
|
||
}
|
||
// The use of `Object#toString` avoids issues with the `typeof` operator
|
||
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
||
var tag = baseGetTag(value);
|
||
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
||
}
|
||
|
||
module.exports = isFunction;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 952:
|
||
/***/ (function(module, exports) {
|
||
|
||
/** Used for built-in method references. */
|
||
var funcProto = Function.prototype;
|
||
|
||
/** Used to resolve the decompiled source of functions. */
|
||
var funcToString = funcProto.toString;
|
||
|
||
/**
|
||
* Converts `func` to its source code.
|
||
*
|
||
* @private
|
||
* @param {Function} func The function to convert.
|
||
* @returns {string} Returns the source code.
|
||
*/
|
||
function toSource(func) {
|
||
if (func != null) {
|
||
try {
|
||
return funcToString.call(func);
|
||
} catch (e) {}
|
||
try {
|
||
return (func + '');
|
||
} catch (e) {}
|
||
}
|
||
return '';
|
||
}
|
||
|
||
module.exports = toSource;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 953:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseIsArguments = __webpack_require__(1007),
|
||
isObjectLike = __webpack_require__(324);
|
||
|
||
/** Used for built-in method references. */
|
||
var objectProto = Object.prototype;
|
||
|
||
/** Used to check objects for own properties. */
|
||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||
|
||
/** Built-in value references. */
|
||
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
||
|
||
/**
|
||
* Checks if `value` is likely an `arguments` object.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 0.1.0
|
||
* @category Lang
|
||
* @param {*} value The value to check.
|
||
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
||
* else `false`.
|
||
* @example
|
||
*
|
||
* _.isArguments(function() { return arguments; }());
|
||
* // => true
|
||
*
|
||
* _.isArguments([1, 2, 3]);
|
||
* // => false
|
||
*/
|
||
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
||
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
|
||
!propertyIsEnumerable.call(value, 'callee');
|
||
};
|
||
|
||
module.exports = isArguments;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 954:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var castPath = __webpack_require__(923),
|
||
toKey = __webpack_require__(921);
|
||
|
||
/**
|
||
* The base implementation of `_.get` without support for default values.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to query.
|
||
* @param {Array|string} path The path of the property to get.
|
||
* @returns {*} Returns the resolved value.
|
||
*/
|
||
function baseGet(object, path) {
|
||
path = castPath(path, object);
|
||
|
||
var index = 0,
|
||
length = path.length;
|
||
|
||
while (object != null && index < length) {
|
||
object = object[toKey(path[index++])];
|
||
}
|
||
return (index && index == length) ? object : undefined;
|
||
}
|
||
|
||
module.exports = baseGet;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 957:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseGet = __webpack_require__(954);
|
||
|
||
/**
|
||
* Gets the value at `path` of `object`. If the resolved value is
|
||
* `undefined`, the `defaultValue` is returned in its place.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 3.7.0
|
||
* @category Object
|
||
* @param {Object} object The object to query.
|
||
* @param {Array|string} path The path of the property to get.
|
||
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
||
* @returns {*} Returns the resolved value.
|
||
* @example
|
||
*
|
||
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
||
*
|
||
* _.get(object, 'a[0].b.c');
|
||
* // => 3
|
||
*
|
||
* _.get(object, ['a', '0', 'b', 'c']);
|
||
* // => 3
|
||
*
|
||
* _.get(object, 'a.b.c', 'default');
|
||
* // => 'default'
|
||
*/
|
||
function get(object, path, defaultValue) {
|
||
var result = object == null ? undefined : baseGet(object, path);
|
||
return result === undefined ? defaultValue : result;
|
||
}
|
||
|
||
module.exports = get;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 958:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var castPath = __webpack_require__(923),
|
||
isArguments = __webpack_require__(953),
|
||
isArray = __webpack_require__(916),
|
||
isIndex = __webpack_require__(928),
|
||
isLength = __webpack_require__(934),
|
||
toKey = __webpack_require__(921);
|
||
|
||
/**
|
||
* Checks if `path` exists on `object`.
|
||
*
|
||
* @private
|
||
* @param {Object} object The object to query.
|
||
* @param {Array|string} path The path to check.
|
||
* @param {Function} hasFunc The function to check properties.
|
||
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
||
*/
|
||
function hasPath(object, path, hasFunc) {
|
||
path = castPath(path, object);
|
||
|
||
var index = -1,
|
||
length = path.length,
|
||
result = false;
|
||
|
||
while (++index < length) {
|
||
var key = toKey(path[index]);
|
||
if (!(result = object != null && hasFunc(object, key))) {
|
||
break;
|
||
}
|
||
object = object[key];
|
||
}
|
||
if (result || ++index != length) {
|
||
return result;
|
||
}
|
||
length = object == null ? 0 : object.length;
|
||
return !!length && isLength(length) && isIndex(key, length) &&
|
||
(isArray(object) || isArguments(object));
|
||
}
|
||
|
||
module.exports = hasPath;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 959:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.validProgress = validProgress;
|
||
|
||
// eslint-disable-next-line import/prefer-default-export
|
||
function validProgress(progress) {
|
||
if (!progress || progress < 0) {
|
||
return 0;
|
||
}
|
||
|
||
if (progress > 100) {
|
||
return 100;
|
||
}
|
||
|
||
return progress;
|
||
}
|
||
//# sourceMappingURL=utils.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 974:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
__webpack_require__(31);
|
||
|
||
__webpack_require__(1043);
|
||
|
||
__webpack_require__(984);
|
||
//# sourceMappingURL=css.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 975:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports["default"] = void 0;
|
||
|
||
var _Form = _interopRequireDefault(__webpack_require__(1045));
|
||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||
|
||
var _default = _Form["default"];
|
||
exports["default"] = _default;
|
||
//# sourceMappingURL=index.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 976:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Converts `set` to an array of its values.
|
||
*
|
||
* @private
|
||
* @param {Object} set The set to convert.
|
||
* @returns {Array} Returns the values.
|
||
*/
|
||
function setToArray(set) {
|
||
var index = -1,
|
||
result = Array(set.size);
|
||
|
||
set.forEach(function(value) {
|
||
result[++index] = value;
|
||
});
|
||
return result;
|
||
}
|
||
|
||
module.exports = setToArray;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 977:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var baseToString = __webpack_require__(978);
|
||
|
||
/**
|
||
* Converts `value` to a string. An empty string is returned for `null`
|
||
* and `undefined` values. The sign of `-0` is preserved.
|
||
*
|
||
* @static
|
||
* @memberOf _
|
||
* @since 4.0.0
|
||
* @category Lang
|
||
* @param {*} value The value to convert.
|
||
* @returns {string} Returns the converted string.
|
||
* @example
|
||
*
|
||
* _.toString(null);
|
||
* // => ''
|
||
*
|
||
* _.toString(-0);
|
||
* // => '-0'
|
||
*
|
||
* _.toString([1, 2, 3]);
|
||
* // => '1,2,3'
|
||
*/
|
||
function toString(value) {
|
||
return value == null ? '' : baseToString(value);
|
||
}
|
||
|
||
module.exports = toString;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 978:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var Symbol = __webpack_require__(183),
|
||
arrayMap = __webpack_require__(981),
|
||
isArray = __webpack_require__(916),
|
||
isSymbol = __webpack_require__(325);
|
||
|
||
/** Used as references for various `Number` constants. */
|
||
var INFINITY = 1 / 0;
|
||
|
||
/** Used to convert symbols to primitives and strings. */
|
||
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
||
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
||
|
||
/**
|
||
* The base implementation of `_.toString` which doesn't convert nullish
|
||
* values to empty strings.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to process.
|
||
* @returns {string} Returns the string.
|
||
*/
|
||
function baseToString(value) {
|
||
// Exit early for strings to avoid a performance hit in some environments.
|
||
if (typeof value == 'string') {
|
||
return value;
|
||
}
|
||
if (isArray(value)) {
|
||
// Recursively convert values (susceptible to call stack limits).
|
||
return arrayMap(value, baseToString) + '';
|
||
}
|
||
if (isSymbol(value)) {
|
||
return symbolToString ? symbolToString.call(value) : '';
|
||
}
|
||
var result = (value + '');
|
||
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
||
}
|
||
|
||
module.exports = baseToString;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 981:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* A specialized version of `_.map` for arrays without support for iteratee
|
||
* shorthands.
|
||
*
|
||
* @private
|
||
* @param {Array} [array] The array to iterate over.
|
||
* @param {Function} iteratee The function invoked per iteration.
|
||
* @returns {Array} Returns the new mapped array.
|
||
*/
|
||
function arrayMap(array, iteratee) {
|
||
var index = -1,
|
||
length = array == null ? 0 : array.length,
|
||
result = Array(length);
|
||
|
||
while (++index < length) {
|
||
result[index] = iteratee(array[index], index, array);
|
||
}
|
||
return result;
|
||
}
|
||
|
||
module.exports = arrayMap;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 984:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
__webpack_require__(31);
|
||
|
||
__webpack_require__(1031);
|
||
//# sourceMappingURL=css.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 986:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Removes all key-value entries from the list cache.
|
||
*
|
||
* @private
|
||
* @name clear
|
||
* @memberOf ListCache
|
||
*/
|
||
function listCacheClear() {
|
||
this.__data__ = [];
|
||
this.size = 0;
|
||
}
|
||
|
||
module.exports = listCacheClear;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 987:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var assocIndexOf = __webpack_require__(918);
|
||
|
||
/** Used for built-in method references. */
|
||
var arrayProto = Array.prototype;
|
||
|
||
/** Built-in value references. */
|
||
var splice = arrayProto.splice;
|
||
|
||
/**
|
||
* Removes `key` and its value from the list cache.
|
||
*
|
||
* @private
|
||
* @name delete
|
||
* @memberOf ListCache
|
||
* @param {string} key The key of the value to remove.
|
||
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
||
*/
|
||
function listCacheDelete(key) {
|
||
var data = this.__data__,
|
||
index = assocIndexOf(data, key);
|
||
|
||
if (index < 0) {
|
||
return false;
|
||
}
|
||
var lastIndex = data.length - 1;
|
||
if (index == lastIndex) {
|
||
data.pop();
|
||
} else {
|
||
splice.call(data, index, 1);
|
||
}
|
||
--this.size;
|
||
return true;
|
||
}
|
||
|
||
module.exports = listCacheDelete;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 988:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var assocIndexOf = __webpack_require__(918);
|
||
|
||
/**
|
||
* Gets the list cache value for `key`.
|
||
*
|
||
* @private
|
||
* @name get
|
||
* @memberOf ListCache
|
||
* @param {string} key The key of the value to get.
|
||
* @returns {*} Returns the entry value.
|
||
*/
|
||
function listCacheGet(key) {
|
||
var data = this.__data__,
|
||
index = assocIndexOf(data, key);
|
||
|
||
return index < 0 ? undefined : data[index][1];
|
||
}
|
||
|
||
module.exports = listCacheGet;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 989:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var assocIndexOf = __webpack_require__(918);
|
||
|
||
/**
|
||
* Checks if a list cache value for `key` exists.
|
||
*
|
||
* @private
|
||
* @name has
|
||
* @memberOf ListCache
|
||
* @param {string} key The key of the entry to check.
|
||
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
||
*/
|
||
function listCacheHas(key) {
|
||
return assocIndexOf(this.__data__, key) > -1;
|
||
}
|
||
|
||
module.exports = listCacheHas;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 990:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var assocIndexOf = __webpack_require__(918);
|
||
|
||
/**
|
||
* Sets the list cache `key` to `value`.
|
||
*
|
||
* @private
|
||
* @name set
|
||
* @memberOf ListCache
|
||
* @param {string} key The key of the value to set.
|
||
* @param {*} value The value to set.
|
||
* @returns {Object} Returns the list cache instance.
|
||
*/
|
||
function listCacheSet(key, value) {
|
||
var data = this.__data__,
|
||
index = assocIndexOf(data, key);
|
||
|
||
if (index < 0) {
|
||
++this.size;
|
||
data.push([key, value]);
|
||
} else {
|
||
data[index][1] = value;
|
||
}
|
||
return this;
|
||
}
|
||
|
||
module.exports = listCacheSet;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 991:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var isFunction = __webpack_require__(951),
|
||
isMasked = __webpack_require__(992),
|
||
isObject = __webpack_require__(175),
|
||
toSource = __webpack_require__(952);
|
||
|
||
/**
|
||
* Used to match `RegExp`
|
||
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
||
*/
|
||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||
|
||
/** Used to detect host constructors (Safari). */
|
||
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
||
|
||
/** Used for built-in method references. */
|
||
var funcProto = Function.prototype,
|
||
objectProto = Object.prototype;
|
||
|
||
/** Used to resolve the decompiled source of functions. */
|
||
var funcToString = funcProto.toString;
|
||
|
||
/** Used to check objects for own properties. */
|
||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||
|
||
/** Used to detect if a method is native. */
|
||
var reIsNative = RegExp('^' +
|
||
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
||
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
||
);
|
||
|
||
/**
|
||
* The base implementation of `_.isNative` without bad shim checks.
|
||
*
|
||
* @private
|
||
* @param {*} value The value to check.
|
||
* @returns {boolean} Returns `true` if `value` is a native function,
|
||
* else `false`.
|
||
*/
|
||
function baseIsNative(value) {
|
||
if (!isObject(value) || isMasked(value)) {
|
||
return false;
|
||
}
|
||
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
||
return pattern.test(toSource(value));
|
||
}
|
||
|
||
module.exports = baseIsNative;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 992:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var coreJsData = __webpack_require__(993);
|
||
|
||
/** Used to detect methods masquerading as native. */
|
||
var maskSrcKey = (function() {
|
||
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
||
return uid ? ('Symbol(src)_1.' + uid) : '';
|
||
}());
|
||
|
||
/**
|
||
* Checks if `func` has its source masked.
|
||
*
|
||
* @private
|
||
* @param {Function} func The function to check.
|
||
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
||
*/
|
||
function isMasked(func) {
|
||
return !!maskSrcKey && (maskSrcKey in func);
|
||
}
|
||
|
||
module.exports = isMasked;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 993:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var root = __webpack_require__(172);
|
||
|
||
/** Used to detect overreaching core-js shims. */
|
||
var coreJsData = root['__core-js_shared__'];
|
||
|
||
module.exports = coreJsData;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 994:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Gets the value at `key` of `object`.
|
||
*
|
||
* @private
|
||
* @param {Object} [object] The object to query.
|
||
* @param {string} key The key of the property to get.
|
||
* @returns {*} Returns the property value.
|
||
*/
|
||
function getValue(object, key) {
|
||
return object == null ? undefined : object[key];
|
||
}
|
||
|
||
module.exports = getValue;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 995:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var Hash = __webpack_require__(996),
|
||
ListCache = __webpack_require__(925),
|
||
Map = __webpack_require__(932);
|
||
|
||
/**
|
||
* Removes all key-value entries from the map.
|
||
*
|
||
* @private
|
||
* @name clear
|
||
* @memberOf MapCache
|
||
*/
|
||
function mapCacheClear() {
|
||
this.size = 0;
|
||
this.__data__ = {
|
||
'hash': new Hash,
|
||
'map': new (Map || ListCache),
|
||
'string': new Hash
|
||
};
|
||
}
|
||
|
||
module.exports = mapCacheClear;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 996:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var hashClear = __webpack_require__(997),
|
||
hashDelete = __webpack_require__(998),
|
||
hashGet = __webpack_require__(999),
|
||
hashHas = __webpack_require__(1000),
|
||
hashSet = __webpack_require__(1001);
|
||
|
||
/**
|
||
* Creates a hash object.
|
||
*
|
||
* @private
|
||
* @constructor
|
||
* @param {Array} [entries] The key-value pairs to cache.
|
||
*/
|
||
function Hash(entries) {
|
||
var index = -1,
|
||
length = entries == null ? 0 : entries.length;
|
||
|
||
this.clear();
|
||
while (++index < length) {
|
||
var entry = entries[index];
|
||
this.set(entry[0], entry[1]);
|
||
}
|
||
}
|
||
|
||
// Add methods to `Hash`.
|
||
Hash.prototype.clear = hashClear;
|
||
Hash.prototype['delete'] = hashDelete;
|
||
Hash.prototype.get = hashGet;
|
||
Hash.prototype.has = hashHas;
|
||
Hash.prototype.set = hashSet;
|
||
|
||
module.exports = Hash;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 997:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var nativeCreate = __webpack_require__(919);
|
||
|
||
/**
|
||
* Removes all key-value entries from the hash.
|
||
*
|
||
* @private
|
||
* @name clear
|
||
* @memberOf Hash
|
||
*/
|
||
function hashClear() {
|
||
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
||
this.size = 0;
|
||
}
|
||
|
||
module.exports = hashClear;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 998:
|
||
/***/ (function(module, exports) {
|
||
|
||
/**
|
||
* Removes `key` and its value from the hash.
|
||
*
|
||
* @private
|
||
* @name delete
|
||
* @memberOf Hash
|
||
* @param {Object} hash The hash to modify.
|
||
* @param {string} key The key of the value to remove.
|
||
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
||
*/
|
||
function hashDelete(key) {
|
||
var result = this.has(key) && delete this.__data__[key];
|
||
this.size -= result ? 1 : 0;
|
||
return result;
|
||
}
|
||
|
||
module.exports = hashDelete;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 999:
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var nativeCreate = __webpack_require__(919);
|
||
|
||
/** Used to stand-in for `undefined` hash values. */
|
||
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
||
|
||
/** Used for built-in method references. */
|
||
var objectProto = Object.prototype;
|
||
|
||
/** Used to check objects for own properties. */
|
||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||
|
||
/**
|
||
* Gets the hash value for `key`.
|
||
*
|
||
* @private
|
||
* @name get
|
||
* @memberOf Hash
|
||
* @param {string} key The key of the value to get.
|
||
* @returns {*} Returns the entry value.
|
||
*/
|
||
function hashGet(key) {
|
||
var data = this.__data__;
|
||
if (nativeCreate) {
|
||
var result = data[key];
|
||
return result === HASH_UNDEFINED ? undefined : result;
|
||
}
|
||
return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
||
}
|
||
|
||
module.exports = hashGet;
|
||
|
||
|
||
/***/ })
|
||
|
||
}); |