You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3009 lines
254 KiB
3009 lines
254 KiB
(self["webpackChunk"] = self["webpackChunk"] || []).push([[84732],{
|
|
|
|
/***/ 78673:
|
|
/*!**********************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/switch/index.js + 2 modules ***!
|
|
\**********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ es_switch; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/icons/LoadingOutlined.js + 1 modules
|
|
var LoadingOutlined = __webpack_require__(20555);
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.9@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(79384);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.9@@babel/runtime/helpers/esm/defineProperty.js
|
|
var defineProperty = __webpack_require__(16514);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.9@@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
var slicedToArray = __webpack_require__(35372);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.9@@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(4606);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/hooks/useMergedState.js
|
|
var useMergedState = __webpack_require__(89308);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/KeyCode.js
|
|
var KeyCode = __webpack_require__(39193);
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-switch@4.1.0@rc-switch/es/index.js
|
|
|
|
|
|
|
|
|
|
var _excluded = ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange", "onKeyDown"];
|
|
|
|
|
|
|
|
|
|
var Switch = /*#__PURE__*/_react_17_0_2_react.forwardRef(function (_ref, ref) {
|
|
var _classNames;
|
|
var _ref$prefixCls = _ref.prefixCls,
|
|
prefixCls = _ref$prefixCls === void 0 ? 'rc-switch' : _ref$prefixCls,
|
|
className = _ref.className,
|
|
checked = _ref.checked,
|
|
defaultChecked = _ref.defaultChecked,
|
|
disabled = _ref.disabled,
|
|
loadingIcon = _ref.loadingIcon,
|
|
checkedChildren = _ref.checkedChildren,
|
|
unCheckedChildren = _ref.unCheckedChildren,
|
|
onClick = _ref.onClick,
|
|
onChange = _ref.onChange,
|
|
onKeyDown = _ref.onKeyDown,
|
|
restProps = (0,objectWithoutProperties/* default */.Z)(_ref, _excluded);
|
|
var _useMergedState = (0,useMergedState/* default */.Z)(false, {
|
|
value: checked,
|
|
defaultValue: defaultChecked
|
|
}),
|
|
_useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2),
|
|
innerChecked = _useMergedState2[0],
|
|
setInnerChecked = _useMergedState2[1];
|
|
function triggerChange(newChecked, event) {
|
|
var mergedChecked = innerChecked;
|
|
if (!disabled) {
|
|
mergedChecked = newChecked;
|
|
setInnerChecked(mergedChecked);
|
|
onChange === null || onChange === void 0 ? void 0 : onChange(mergedChecked, event);
|
|
}
|
|
return mergedChecked;
|
|
}
|
|
function onInternalKeyDown(e) {
|
|
if (e.which === KeyCode/* default */.Z.LEFT) {
|
|
triggerChange(false, e);
|
|
} else if (e.which === KeyCode/* default */.Z.RIGHT) {
|
|
triggerChange(true, e);
|
|
}
|
|
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
}
|
|
function onInternalClick(e) {
|
|
var ret = triggerChange(!innerChecked, e);
|
|
// [Legacy] trigger onClick with value
|
|
onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);
|
|
}
|
|
var switchClassName = _classnames_2_5_1_classnames_default()(prefixCls, className, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-checked"), innerChecked), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("button", (0,esm_extends/* default */.Z)({}, restProps, {
|
|
type: "button",
|
|
role: "switch",
|
|
"aria-checked": innerChecked,
|
|
disabled: disabled,
|
|
className: switchClassName,
|
|
ref: ref,
|
|
onKeyDown: onInternalKeyDown,
|
|
onClick: onInternalClick
|
|
}), loadingIcon, /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: "".concat(prefixCls, "-inner")
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: "".concat(prefixCls, "-inner-checked")
|
|
}, checkedChildren), /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: "".concat(prefixCls, "-inner-unchecked")
|
|
}, unCheckedChildren)));
|
|
});
|
|
Switch.displayName = 'Switch';
|
|
/* harmony default export */ var es = (Switch);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/index.js + 4 modules
|
|
var wave = __webpack_require__(14088);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/DisabledContext.js
|
|
var DisabledContext = __webpack_require__(1684);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useSize.js
|
|
var useSize = __webpack_require__(19716);
|
|
// EXTERNAL MODULE: ./node_modules/_@ctrl_tinycolor@3.6.1@@ctrl/tinycolor/dist/module/index.js
|
|
var dist_module = __webpack_require__(64993);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
var style = __webpack_require__(17313);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(37613);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/switch/style/index.js
|
|
|
|
|
|
|
|
const genSwitchSmallStyle = token => {
|
|
const {
|
|
componentCls,
|
|
trackHeightSM,
|
|
trackPadding,
|
|
trackMinWidthSM,
|
|
innerMinMarginSM,
|
|
innerMaxMarginSM,
|
|
handleSizeSM
|
|
} = token;
|
|
const switchInnerCls = `${componentCls}-inner`;
|
|
return {
|
|
[componentCls]: {
|
|
[`&${componentCls}-small`]: {
|
|
minWidth: trackMinWidthSM,
|
|
height: trackHeightSM,
|
|
lineHeight: `${trackHeightSM}px`,
|
|
[`${componentCls}-inner`]: {
|
|
paddingInlineStart: innerMaxMarginSM,
|
|
paddingInlineEnd: innerMinMarginSM,
|
|
[`${switchInnerCls}-checked`]: {
|
|
marginInlineStart: `calc(-100% + ${handleSizeSM + trackPadding * 2}px - ${innerMaxMarginSM * 2}px)`,
|
|
marginInlineEnd: `calc(100% - ${handleSizeSM + trackPadding * 2}px + ${innerMaxMarginSM * 2}px)`
|
|
},
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
marginTop: -trackHeightSM,
|
|
marginInlineStart: 0,
|
|
marginInlineEnd: 0
|
|
}
|
|
},
|
|
[`${componentCls}-handle`]: {
|
|
width: handleSizeSM,
|
|
height: handleSizeSM
|
|
},
|
|
[`${componentCls}-loading-icon`]: {
|
|
top: (handleSizeSM - token.switchLoadingIconSize) / 2,
|
|
fontSize: token.switchLoadingIconSize
|
|
},
|
|
[`&${componentCls}-checked`]: {
|
|
[`${componentCls}-inner`]: {
|
|
paddingInlineStart: innerMinMarginSM,
|
|
paddingInlineEnd: innerMaxMarginSM,
|
|
[`${switchInnerCls}-checked`]: {
|
|
marginInlineStart: 0,
|
|
marginInlineEnd: 0
|
|
},
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
marginInlineStart: `calc(100% - ${handleSizeSM + trackPadding * 2}px + ${innerMaxMarginSM * 2}px)`,
|
|
marginInlineEnd: `calc(-100% + ${handleSizeSM + trackPadding * 2}px - ${innerMaxMarginSM * 2}px)`
|
|
}
|
|
},
|
|
[`${componentCls}-handle`]: {
|
|
insetInlineStart: `calc(100% - ${handleSizeSM + trackPadding}px)`
|
|
}
|
|
},
|
|
[`&:not(${componentCls}-disabled):active`]: {
|
|
[`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
marginInlineStart: token.marginXXS / 2,
|
|
marginInlineEnd: -token.marginXXS / 2
|
|
}
|
|
},
|
|
[`&${componentCls}-checked ${switchInnerCls}`]: {
|
|
[`${switchInnerCls}-checked`]: {
|
|
marginInlineStart: -token.marginXXS / 2,
|
|
marginInlineEnd: token.marginXXS / 2
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const genSwitchLoadingStyle = token => {
|
|
const {
|
|
componentCls,
|
|
handleSize
|
|
} = token;
|
|
return {
|
|
[componentCls]: {
|
|
[`${componentCls}-loading-icon${token.iconCls}`]: {
|
|
position: 'relative',
|
|
top: (handleSize - token.fontSize) / 2,
|
|
color: token.switchLoadingIconColor,
|
|
verticalAlign: 'top'
|
|
},
|
|
[`&${componentCls}-checked ${componentCls}-loading-icon`]: {
|
|
color: token.switchColor
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const genSwitchHandleStyle = token => {
|
|
const {
|
|
componentCls,
|
|
motion,
|
|
trackPadding,
|
|
handleBg,
|
|
handleShadow,
|
|
handleSize
|
|
} = token;
|
|
const switchHandleCls = `${componentCls}-handle`;
|
|
return {
|
|
[componentCls]: {
|
|
[switchHandleCls]: {
|
|
position: 'absolute',
|
|
top: trackPadding,
|
|
insetInlineStart: trackPadding,
|
|
width: handleSize,
|
|
height: handleSize,
|
|
transition: `all ${token.switchDuration} ease-in-out`,
|
|
'&::before': {
|
|
position: 'absolute',
|
|
top: 0,
|
|
insetInlineEnd: 0,
|
|
bottom: 0,
|
|
insetInlineStart: 0,
|
|
backgroundColor: handleBg,
|
|
borderRadius: handleSize / 2,
|
|
boxShadow: handleShadow,
|
|
transition: `all ${token.switchDuration} ease-in-out`,
|
|
content: '""'
|
|
}
|
|
},
|
|
[`&${componentCls}-checked ${switchHandleCls}`]: {
|
|
insetInlineStart: `calc(100% - ${handleSize + trackPadding}px)`
|
|
},
|
|
[`&:not(${componentCls}-disabled):active`]: motion ? {
|
|
[`${switchHandleCls}::before`]: {
|
|
insetInlineEnd: token.switchHandleActiveInset,
|
|
insetInlineStart: 0
|
|
},
|
|
[`&${componentCls}-checked ${switchHandleCls}::before`]: {
|
|
insetInlineEnd: 0,
|
|
insetInlineStart: token.switchHandleActiveInset
|
|
}
|
|
} : /* istanbul ignore next */
|
|
{}
|
|
}
|
|
};
|
|
};
|
|
const genSwitchInnerStyle = token => {
|
|
const {
|
|
componentCls,
|
|
trackHeight,
|
|
trackPadding,
|
|
innerMinMargin,
|
|
innerMaxMargin,
|
|
handleSize
|
|
} = token;
|
|
const switchInnerCls = `${componentCls}-inner`;
|
|
return {
|
|
[componentCls]: {
|
|
[switchInnerCls]: {
|
|
display: 'block',
|
|
overflow: 'hidden',
|
|
borderRadius: 100,
|
|
height: '100%',
|
|
paddingInlineStart: innerMaxMargin,
|
|
paddingInlineEnd: innerMinMargin,
|
|
transition: `padding-inline-start ${token.switchDuration} ease-in-out, padding-inline-end ${token.switchDuration} ease-in-out`,
|
|
[`${switchInnerCls}-checked, ${switchInnerCls}-unchecked`]: {
|
|
display: 'block',
|
|
color: token.colorTextLightSolid,
|
|
fontSize: token.fontSizeSM,
|
|
transition: `margin-inline-start ${token.switchDuration} ease-in-out, margin-inline-end ${token.switchDuration} ease-in-out`,
|
|
pointerEvents: 'none'
|
|
},
|
|
[`${switchInnerCls}-checked`]: {
|
|
marginInlineStart: `calc(-100% + ${handleSize + trackPadding * 2}px - ${innerMaxMargin * 2}px)`,
|
|
marginInlineEnd: `calc(100% - ${handleSize + trackPadding * 2}px + ${innerMaxMargin * 2}px)`
|
|
},
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
marginTop: -trackHeight,
|
|
marginInlineStart: 0,
|
|
marginInlineEnd: 0
|
|
}
|
|
},
|
|
[`&${componentCls}-checked ${switchInnerCls}`]: {
|
|
paddingInlineStart: innerMinMargin,
|
|
paddingInlineEnd: innerMaxMargin,
|
|
[`${switchInnerCls}-checked`]: {
|
|
marginInlineStart: 0,
|
|
marginInlineEnd: 0
|
|
},
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
marginInlineStart: `calc(100% - ${handleSize + trackPadding * 2}px + ${innerMaxMargin * 2}px)`,
|
|
marginInlineEnd: `calc(-100% + ${handleSize + trackPadding * 2}px - ${innerMaxMargin * 2}px)`
|
|
}
|
|
},
|
|
[`&:not(${componentCls}-disabled):active`]: {
|
|
[`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
marginInlineStart: trackPadding * 2,
|
|
marginInlineEnd: -trackPadding * 2
|
|
}
|
|
},
|
|
[`&${componentCls}-checked ${switchInnerCls}`]: {
|
|
[`${switchInnerCls}-checked`]: {
|
|
marginInlineStart: -trackPadding * 2,
|
|
marginInlineEnd: trackPadding * 2
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const genSwitchStyle = token => {
|
|
const {
|
|
componentCls,
|
|
trackHeight,
|
|
trackMinWidth
|
|
} = token;
|
|
return {
|
|
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
position: 'relative',
|
|
display: 'inline-block',
|
|
boxSizing: 'border-box',
|
|
minWidth: trackMinWidth,
|
|
height: trackHeight,
|
|
lineHeight: `${trackHeight}px`,
|
|
verticalAlign: 'middle',
|
|
background: token.colorTextQuaternary,
|
|
border: '0',
|
|
borderRadius: 100,
|
|
cursor: 'pointer',
|
|
transition: `all ${token.motionDurationMid}`,
|
|
userSelect: 'none',
|
|
[`&:hover:not(${componentCls}-disabled)`]: {
|
|
background: token.colorTextTertiary
|
|
}
|
|
}), (0,style/* genFocusStyle */.Qy)(token)), {
|
|
[`&${componentCls}-checked`]: {
|
|
background: token.switchColor,
|
|
[`&:hover:not(${componentCls}-disabled)`]: {
|
|
background: token.colorPrimaryHover
|
|
}
|
|
},
|
|
[`&${componentCls}-loading, &${componentCls}-disabled`]: {
|
|
cursor: 'not-allowed',
|
|
opacity: token.switchDisabledOpacity,
|
|
'*': {
|
|
boxShadow: 'none',
|
|
cursor: 'not-allowed'
|
|
}
|
|
},
|
|
// rtl style
|
|
[`&${componentCls}-rtl`]: {
|
|
direction: 'rtl'
|
|
}
|
|
})
|
|
};
|
|
};
|
|
// ============================== Export ==============================
|
|
/* harmony default export */ var switch_style = ((0,genComponentStyleHook/* default */.Z)('Switch', token => {
|
|
const switchToken = (0,statistic/* merge */.TS)(token, {
|
|
switchDuration: token.motionDurationMid,
|
|
switchColor: token.colorPrimary,
|
|
switchDisabledOpacity: token.opacityLoading,
|
|
switchLoadingIconSize: token.fontSizeIcon * 0.75,
|
|
switchLoadingIconColor: `rgba(0, 0, 0, ${token.opacityLoading})`,
|
|
switchHandleActiveInset: '-30%'
|
|
});
|
|
return [genSwitchStyle(switchToken),
|
|
// inner style
|
|
genSwitchInnerStyle(switchToken),
|
|
// handle style
|
|
genSwitchHandleStyle(switchToken),
|
|
// loading style
|
|
genSwitchLoadingStyle(switchToken),
|
|
// small style
|
|
genSwitchSmallStyle(switchToken)];
|
|
}, token => {
|
|
const {
|
|
fontSize,
|
|
lineHeight,
|
|
controlHeight,
|
|
colorWhite
|
|
} = token;
|
|
const height = fontSize * lineHeight;
|
|
const heightSM = controlHeight / 2;
|
|
const padding = 2; // Fixed value
|
|
const handleSize = height - padding * 2;
|
|
const handleSizeSM = heightSM - padding * 2;
|
|
return {
|
|
trackHeight: height,
|
|
trackHeightSM: heightSM,
|
|
trackMinWidth: handleSize * 2 + padding * 4,
|
|
trackMinWidthSM: handleSizeSM * 2 + padding * 2,
|
|
trackPadding: padding,
|
|
handleBg: colorWhite,
|
|
handleSize,
|
|
handleSizeSM,
|
|
handleShadow: `0 2px 4px 0 ${new dist_module/* TinyColor */.C('#00230b').setAlpha(0.2).toRgbString()}`,
|
|
innerMinMargin: handleSize / 2,
|
|
innerMaxMargin: handleSize + padding + padding * 2,
|
|
innerMinMarginSM: handleSizeSM / 2,
|
|
innerMaxMarginSM: handleSizeSM + padding + padding * 2
|
|
};
|
|
}));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/switch/index.js
|
|
"use client";
|
|
|
|
var __rest = undefined && undefined.__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;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const switch_Switch = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
size: customizeSize,
|
|
disabled: customDisabled,
|
|
loading,
|
|
className,
|
|
rootClassName,
|
|
style
|
|
} = props,
|
|
restProps = __rest(props, ["prefixCls", "size", "disabled", "loading", "className", "rootClassName", "style"]);
|
|
false ? 0 : void 0;
|
|
const {
|
|
getPrefixCls,
|
|
direction,
|
|
switch: SWITCH
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
// ===================== Disabled =====================
|
|
const disabled = _react_17_0_2_react.useContext(DisabledContext/* default */.Z);
|
|
const mergedDisabled = (customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled) || loading;
|
|
const prefixCls = getPrefixCls('switch', customizePrefixCls);
|
|
const loadingIcon = /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-handle`
|
|
}, loading && /*#__PURE__*/_react_17_0_2_react.createElement(LoadingOutlined/* default */.Z, {
|
|
className: `${prefixCls}-loading-icon`
|
|
}));
|
|
// Style
|
|
const [wrapSSR, hashId] = switch_style(prefixCls);
|
|
const mergedSize = (0,useSize/* default */.Z)(customizeSize);
|
|
const classes = _classnames_2_5_1_classnames_default()(SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.className, {
|
|
[`${prefixCls}-small`]: mergedSize === 'small',
|
|
[`${prefixCls}-loading`]: loading,
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
}, className, rootClassName, hashId);
|
|
const mergedStyle = Object.assign(Object.assign({}, SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.style), style);
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(wave/* default */.Z, {
|
|
component: "Switch"
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(es, Object.assign({}, restProps, {
|
|
prefixCls: prefixCls,
|
|
className: classes,
|
|
style: mergedStyle,
|
|
disabled: mergedDisabled,
|
|
ref: ref,
|
|
loadingIcon: loadingIcon
|
|
}))));
|
|
});
|
|
switch_Switch.__ANT_SWITCH = true;
|
|
if (false) {}
|
|
/* harmony default export */ var es_switch = (switch_Switch);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 99498:
|
|
/*!*********************************************************************************!*\
|
|
!*** ./node_modules/_codemirror@5.58.2@codemirror/addon/display/placeholder.js ***!
|
|
\*********************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
|
|
(function(mod) {
|
|
if (true) // CommonJS
|
|
mod(__webpack_require__(/*! ../../lib/codemirror */ 89780));
|
|
else {}
|
|
})(function(CodeMirror) {
|
|
CodeMirror.defineOption("placeholder", "", function(cm, val, old) {
|
|
var prev = old && old != CodeMirror.Init;
|
|
if (val && !prev) {
|
|
cm.on("blur", onBlur);
|
|
cm.on("change", onChange);
|
|
cm.on("swapDoc", onChange);
|
|
CodeMirror.on(cm.getInputField(), "compositionupdate", cm.state.placeholderCompose = function() { onComposition(cm) })
|
|
onChange(cm);
|
|
} else if (!val && prev) {
|
|
cm.off("blur", onBlur);
|
|
cm.off("change", onChange);
|
|
cm.off("swapDoc", onChange);
|
|
CodeMirror.off(cm.getInputField(), "compositionupdate", cm.state.placeholderCompose)
|
|
clearPlaceholder(cm);
|
|
var wrapper = cm.getWrapperElement();
|
|
wrapper.className = wrapper.className.replace(" CodeMirror-empty", "");
|
|
}
|
|
|
|
if (val && !cm.hasFocus()) onBlur(cm);
|
|
});
|
|
|
|
function clearPlaceholder(cm) {
|
|
if (cm.state.placeholder) {
|
|
cm.state.placeholder.parentNode.removeChild(cm.state.placeholder);
|
|
cm.state.placeholder = null;
|
|
}
|
|
}
|
|
function setPlaceholder(cm) {
|
|
clearPlaceholder(cm);
|
|
var elt = cm.state.placeholder = document.createElement("pre");
|
|
elt.style.cssText = "height: 0; overflow: visible";
|
|
elt.style.direction = cm.getOption("direction");
|
|
elt.className = "CodeMirror-placeholder CodeMirror-line-like";
|
|
var placeHolder = cm.getOption("placeholder")
|
|
if (typeof placeHolder == "string") placeHolder = document.createTextNode(placeHolder)
|
|
elt.appendChild(placeHolder)
|
|
cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild);
|
|
}
|
|
|
|
function onComposition(cm) {
|
|
setTimeout(function() {
|
|
var empty = false, input = cm.getInputField()
|
|
if (input.nodeName == "TEXTAREA")
|
|
empty = !input.value
|
|
else if (cm.lineCount() == 1)
|
|
empty = !/[^\u200b]/.test(input.querySelector(".CodeMirror-line").textContent)
|
|
if (empty) setPlaceholder(cm)
|
|
else clearPlaceholder(cm)
|
|
}, 20)
|
|
}
|
|
|
|
function onBlur(cm) {
|
|
if (isEmpty(cm)) setPlaceholder(cm);
|
|
}
|
|
function onChange(cm) {
|
|
var wrapper = cm.getWrapperElement(), empty = isEmpty(cm);
|
|
wrapper.className = wrapper.className.replace(" CodeMirror-empty", "") + (empty ? " CodeMirror-empty" : "");
|
|
|
|
if (empty) setPlaceholder(cm);
|
|
else clearPlaceholder(cm);
|
|
}
|
|
|
|
function isEmpty(cm) {
|
|
return (cm.lineCount() === 1) && (cm.getLine(0) === "");
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 25717:
|
|
/*!********************************************************************************!*\
|
|
!*** ./node_modules/_codemirror@5.58.2@codemirror/addon/edit/closebrackets.js ***!
|
|
\********************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
|
|
(function(mod) {
|
|
if (true) // CommonJS
|
|
mod(__webpack_require__(/*! ../../lib/codemirror */ 89780));
|
|
else {}
|
|
})(function(CodeMirror) {
|
|
var defaults = {
|
|
pairs: "()[]{}''\"\"",
|
|
closeBefore: ")]}'\":;>",
|
|
triples: "",
|
|
explode: "[]{}"
|
|
};
|
|
|
|
var Pos = CodeMirror.Pos;
|
|
|
|
CodeMirror.defineOption("autoCloseBrackets", false, function(cm, val, old) {
|
|
if (old && old != CodeMirror.Init) {
|
|
cm.removeKeyMap(keyMap);
|
|
cm.state.closeBrackets = null;
|
|
}
|
|
if (val) {
|
|
ensureBound(getOption(val, "pairs"))
|
|
cm.state.closeBrackets = val;
|
|
cm.addKeyMap(keyMap);
|
|
}
|
|
});
|
|
|
|
function getOption(conf, name) {
|
|
if (name == "pairs" && typeof conf == "string") return conf;
|
|
if (typeof conf == "object" && conf[name] != null) return conf[name];
|
|
return defaults[name];
|
|
}
|
|
|
|
var keyMap = {Backspace: handleBackspace, Enter: handleEnter};
|
|
function ensureBound(chars) {
|
|
for (var i = 0; i < chars.length; i++) {
|
|
var ch = chars.charAt(i), key = "'" + ch + "'"
|
|
if (!keyMap[key]) keyMap[key] = handler(ch)
|
|
}
|
|
}
|
|
ensureBound(defaults.pairs + "`")
|
|
|
|
function handler(ch) {
|
|
return function(cm) { return handleChar(cm, ch); };
|
|
}
|
|
|
|
function getConfig(cm) {
|
|
var deflt = cm.state.closeBrackets;
|
|
if (!deflt || deflt.override) return deflt;
|
|
var mode = cm.getModeAt(cm.getCursor());
|
|
return mode.closeBrackets || deflt;
|
|
}
|
|
|
|
function handleBackspace(cm) {
|
|
var conf = getConfig(cm);
|
|
if (!conf || cm.getOption("disableInput")) return CodeMirror.Pass;
|
|
|
|
var pairs = getOption(conf, "pairs");
|
|
var ranges = cm.listSelections();
|
|
for (var i = 0; i < ranges.length; i++) {
|
|
if (!ranges[i].empty()) return CodeMirror.Pass;
|
|
var around = charsAround(cm, ranges[i].head);
|
|
if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass;
|
|
}
|
|
for (var i = ranges.length - 1; i >= 0; i--) {
|
|
var cur = ranges[i].head;
|
|
cm.replaceRange("", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1), "+delete");
|
|
}
|
|
}
|
|
|
|
function handleEnter(cm) {
|
|
var conf = getConfig(cm);
|
|
var explode = conf && getOption(conf, "explode");
|
|
if (!explode || cm.getOption("disableInput")) return CodeMirror.Pass;
|
|
|
|
var ranges = cm.listSelections();
|
|
for (var i = 0; i < ranges.length; i++) {
|
|
if (!ranges[i].empty()) return CodeMirror.Pass;
|
|
var around = charsAround(cm, ranges[i].head);
|
|
if (!around || explode.indexOf(around) % 2 != 0) return CodeMirror.Pass;
|
|
}
|
|
cm.operation(function() {
|
|
var linesep = cm.lineSeparator() || "\n";
|
|
cm.replaceSelection(linesep + linesep, null);
|
|
cm.execCommand("goCharLeft");
|
|
ranges = cm.listSelections();
|
|
for (var i = 0; i < ranges.length; i++) {
|
|
var line = ranges[i].head.line;
|
|
cm.indentLine(line, null, true);
|
|
cm.indentLine(line + 1, null, true);
|
|
}
|
|
});
|
|
}
|
|
|
|
function contractSelection(sel) {
|
|
var inverted = CodeMirror.cmpPos(sel.anchor, sel.head) > 0;
|
|
return {anchor: new Pos(sel.anchor.line, sel.anchor.ch + (inverted ? -1 : 1)),
|
|
head: new Pos(sel.head.line, sel.head.ch + (inverted ? 1 : -1))};
|
|
}
|
|
|
|
function handleChar(cm, ch) {
|
|
var conf = getConfig(cm);
|
|
if (!conf || cm.getOption("disableInput")) return CodeMirror.Pass;
|
|
|
|
var pairs = getOption(conf, "pairs");
|
|
var pos = pairs.indexOf(ch);
|
|
if (pos == -1) return CodeMirror.Pass;
|
|
|
|
var closeBefore = getOption(conf,"closeBefore");
|
|
|
|
var triples = getOption(conf, "triples");
|
|
|
|
var identical = pairs.charAt(pos + 1) == ch;
|
|
var ranges = cm.listSelections();
|
|
var opening = pos % 2 == 0;
|
|
|
|
var type;
|
|
for (var i = 0; i < ranges.length; i++) {
|
|
var range = ranges[i], cur = range.head, curType;
|
|
var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1));
|
|
if (opening && !range.empty()) {
|
|
curType = "surround";
|
|
} else if ((identical || !opening) && next == ch) {
|
|
if (identical && stringStartsAfter(cm, cur))
|
|
curType = "both";
|
|
else if (triples.indexOf(ch) >= 0 && cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == ch + ch + ch)
|
|
curType = "skipThree";
|
|
else
|
|
curType = "skip";
|
|
} else if (identical && cur.ch > 1 && triples.indexOf(ch) >= 0 &&
|
|
cm.getRange(Pos(cur.line, cur.ch - 2), cur) == ch + ch) {
|
|
if (cur.ch > 2 && /\bstring/.test(cm.getTokenTypeAt(Pos(cur.line, cur.ch - 2)))) return CodeMirror.Pass;
|
|
curType = "addFour";
|
|
} else if (identical) {
|
|
var prev = cur.ch == 0 ? " " : cm.getRange(Pos(cur.line, cur.ch - 1), cur)
|
|
if (!CodeMirror.isWordChar(next) && prev != ch && !CodeMirror.isWordChar(prev)) curType = "both";
|
|
else return CodeMirror.Pass;
|
|
} else if (opening && (next.length === 0 || /\s/.test(next) || closeBefore.indexOf(next) > -1)) {
|
|
curType = "both";
|
|
} else {
|
|
return CodeMirror.Pass;
|
|
}
|
|
if (!type) type = curType;
|
|
else if (type != curType) return CodeMirror.Pass;
|
|
}
|
|
|
|
var left = pos % 2 ? pairs.charAt(pos - 1) : ch;
|
|
var right = pos % 2 ? ch : pairs.charAt(pos + 1);
|
|
cm.operation(function() {
|
|
if (type == "skip") {
|
|
cm.execCommand("goCharRight");
|
|
} else if (type == "skipThree") {
|
|
for (var i = 0; i < 3; i++)
|
|
cm.execCommand("goCharRight");
|
|
} else if (type == "surround") {
|
|
var sels = cm.getSelections();
|
|
for (var i = 0; i < sels.length; i++)
|
|
sels[i] = left + sels[i] + right;
|
|
cm.replaceSelections(sels, "around");
|
|
sels = cm.listSelections().slice();
|
|
for (var i = 0; i < sels.length; i++)
|
|
sels[i] = contractSelection(sels[i]);
|
|
cm.setSelections(sels);
|
|
} else if (type == "both") {
|
|
cm.replaceSelection(left + right, null);
|
|
cm.triggerElectric(left + right);
|
|
cm.execCommand("goCharLeft");
|
|
} else if (type == "addFour") {
|
|
cm.replaceSelection(left + left + left + left, "before");
|
|
cm.execCommand("goCharRight");
|
|
}
|
|
});
|
|
}
|
|
|
|
function charsAround(cm, pos) {
|
|
var str = cm.getRange(Pos(pos.line, pos.ch - 1),
|
|
Pos(pos.line, pos.ch + 1));
|
|
return str.length == 2 ? str : null;
|
|
}
|
|
|
|
function stringStartsAfter(cm, pos) {
|
|
var token = cm.getTokenAt(Pos(pos.line, pos.ch + 1))
|
|
return /\bstring/.test(token.type) && token.start == pos.ch &&
|
|
(pos.ch == 0 || !/\bstring/.test(cm.getTokenTypeAt(pos)))
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 6313:
|
|
/*!***************************************************************************!*\
|
|
!*** ./node_modules/_codemirror@5.58.2@codemirror/addon/edit/closetag.js ***!
|
|
\***************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
|
|
/**
|
|
* Tag-closer extension for CodeMirror.
|
|
*
|
|
* This extension adds an "autoCloseTags" option that can be set to
|
|
* either true to get the default behavior, or an object to further
|
|
* configure its behavior.
|
|
*
|
|
* These are supported options:
|
|
*
|
|
* `whenClosing` (default true)
|
|
* Whether to autoclose when the '/' of a closing tag is typed.
|
|
* `whenOpening` (default true)
|
|
* Whether to autoclose the tag when the final '>' of an opening
|
|
* tag is typed.
|
|
* `dontCloseTags` (default is empty tags for HTML, none for XML)
|
|
* An array of tag names that should not be autoclosed.
|
|
* `indentTags` (default is block tags for HTML, none for XML)
|
|
* An array of tag names that should, when opened, cause a
|
|
* blank line to be added inside the tag, and the blank line and
|
|
* closing line to be indented.
|
|
* `emptyTags` (default is none)
|
|
* An array of XML tag names that should be autoclosed with '/>'.
|
|
*
|
|
* See demos/closetag.html for a usage example.
|
|
*/
|
|
|
|
(function(mod) {
|
|
if (true) // CommonJS
|
|
mod(__webpack_require__(/*! ../../lib/codemirror */ 89780), __webpack_require__(/*! ../fold/xml-fold */ 32855));
|
|
else {}
|
|
})(function(CodeMirror) {
|
|
CodeMirror.defineOption("autoCloseTags", false, function(cm, val, old) {
|
|
if (old != CodeMirror.Init && old)
|
|
cm.removeKeyMap("autoCloseTags");
|
|
if (!val) return;
|
|
var map = {name: "autoCloseTags"};
|
|
if (typeof val != "object" || val.whenClosing !== false)
|
|
map["'/'"] = function(cm) { return autoCloseSlash(cm); };
|
|
if (typeof val != "object" || val.whenOpening !== false)
|
|
map["'>'"] = function(cm) { return autoCloseGT(cm); };
|
|
cm.addKeyMap(map);
|
|
});
|
|
|
|
var htmlDontClose = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param",
|
|
"source", "track", "wbr"];
|
|
var htmlIndent = ["applet", "blockquote", "body", "button", "div", "dl", "fieldset", "form", "frameset", "h1", "h2", "h3", "h4",
|
|
"h5", "h6", "head", "html", "iframe", "layer", "legend", "object", "ol", "p", "select", "table", "ul"];
|
|
|
|
function autoCloseGT(cm) {
|
|
if (cm.getOption("disableInput")) return CodeMirror.Pass;
|
|
var ranges = cm.listSelections(), replacements = [];
|
|
var opt = cm.getOption("autoCloseTags");
|
|
for (var i = 0; i < ranges.length; i++) {
|
|
if (!ranges[i].empty()) return CodeMirror.Pass;
|
|
var pos = ranges[i].head, tok = cm.getTokenAt(pos);
|
|
var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;
|
|
var tagInfo = inner.mode.xmlCurrentTag && inner.mode.xmlCurrentTag(state)
|
|
var tagName = tagInfo && tagInfo.name
|
|
if (!tagName) return CodeMirror.Pass
|
|
|
|
var html = inner.mode.configuration == "html";
|
|
var dontCloseTags = (typeof opt == "object" && opt.dontCloseTags) || (html && htmlDontClose);
|
|
var indentTags = (typeof opt == "object" && opt.indentTags) || (html && htmlIndent);
|
|
|
|
if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch);
|
|
var lowerTagName = tagName.toLowerCase();
|
|
// Don't process the '>' at the end of an end-tag or self-closing tag
|
|
if (!tagName ||
|
|
tok.type == "string" && (tok.end != pos.ch || !/[\"\']/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1) ||
|
|
tok.type == "tag" && tagInfo.close ||
|
|
tok.string.indexOf("/") == (pos.ch - tok.start - 1) || // match something like <someTagName />
|
|
dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1 ||
|
|
closingTagExists(cm, inner.mode.xmlCurrentContext && inner.mode.xmlCurrentContext(state) || [], tagName, pos, true))
|
|
return CodeMirror.Pass;
|
|
|
|
var emptyTags = typeof opt == "object" && opt.emptyTags;
|
|
if (emptyTags && indexOf(emptyTags, tagName) > -1) {
|
|
replacements[i] = { text: "/>", newPos: CodeMirror.Pos(pos.line, pos.ch + 2) };
|
|
continue;
|
|
}
|
|
|
|
var indent = indentTags && indexOf(indentTags, lowerTagName) > -1;
|
|
replacements[i] = {indent: indent,
|
|
text: ">" + (indent ? "\n\n" : "") + "</" + tagName + ">",
|
|
newPos: indent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1)};
|
|
}
|
|
|
|
var dontIndentOnAutoClose = (typeof opt == "object" && opt.dontIndentOnAutoClose);
|
|
for (var i = ranges.length - 1; i >= 0; i--) {
|
|
var info = replacements[i];
|
|
cm.replaceRange(info.text, ranges[i].head, ranges[i].anchor, "+insert");
|
|
var sel = cm.listSelections().slice(0);
|
|
sel[i] = {head: info.newPos, anchor: info.newPos};
|
|
cm.setSelections(sel);
|
|
if (!dontIndentOnAutoClose && info.indent) {
|
|
cm.indentLine(info.newPos.line, null, true);
|
|
cm.indentLine(info.newPos.line + 1, null, true);
|
|
}
|
|
}
|
|
}
|
|
|
|
function autoCloseCurrent(cm, typingSlash) {
|
|
var ranges = cm.listSelections(), replacements = [];
|
|
var head = typingSlash ? "/" : "</";
|
|
var opt = cm.getOption("autoCloseTags");
|
|
var dontIndentOnAutoClose = (typeof opt == "object" && opt.dontIndentOnSlash);
|
|
for (var i = 0; i < ranges.length; i++) {
|
|
if (!ranges[i].empty()) return CodeMirror.Pass;
|
|
var pos = ranges[i].head, tok = cm.getTokenAt(pos);
|
|
var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;
|
|
if (typingSlash && (tok.type == "string" || tok.string.charAt(0) != "<" ||
|
|
tok.start != pos.ch - 1))
|
|
return CodeMirror.Pass;
|
|
// Kludge to get around the fact that we are not in XML mode
|
|
// when completing in JS/CSS snippet in htmlmixed mode. Does not
|
|
// work for other XML embedded languages (there is no general
|
|
// way to go from a mixed mode to its current XML state).
|
|
var replacement, mixed = inner.mode.name != "xml" && cm.getMode().name == "htmlmixed"
|
|
if (mixed && inner.mode.name == "javascript") {
|
|
replacement = head + "script";
|
|
} else if (mixed && inner.mode.name == "css") {
|
|
replacement = head + "style";
|
|
} else {
|
|
var context = inner.mode.xmlCurrentContext && inner.mode.xmlCurrentContext(state)
|
|
if (!context || (context.length && closingTagExists(cm, context, context[context.length - 1], pos)))
|
|
return CodeMirror.Pass;
|
|
replacement = head + context[context.length - 1]
|
|
}
|
|
if (cm.getLine(pos.line).charAt(tok.end) != ">") replacement += ">";
|
|
replacements[i] = replacement;
|
|
}
|
|
cm.replaceSelections(replacements);
|
|
ranges = cm.listSelections();
|
|
if (!dontIndentOnAutoClose) {
|
|
for (var i = 0; i < ranges.length; i++)
|
|
if (i == ranges.length - 1 || ranges[i].head.line < ranges[i + 1].head.line)
|
|
cm.indentLine(ranges[i].head.line);
|
|
}
|
|
}
|
|
|
|
function autoCloseSlash(cm) {
|
|
if (cm.getOption("disableInput")) return CodeMirror.Pass;
|
|
return autoCloseCurrent(cm, true);
|
|
}
|
|
|
|
CodeMirror.commands.closeTag = function(cm) { return autoCloseCurrent(cm); };
|
|
|
|
function indexOf(collection, elt) {
|
|
if (collection.indexOf) return collection.indexOf(elt);
|
|
for (var i = 0, e = collection.length; i < e; ++i)
|
|
if (collection[i] == elt) return i;
|
|
return -1;
|
|
}
|
|
|
|
// If xml-fold is loaded, we use its functionality to try and verify
|
|
// whether a given tag is actually unclosed.
|
|
function closingTagExists(cm, context, tagName, pos, newTag) {
|
|
if (!CodeMirror.scanForClosingTag) return false;
|
|
var end = Math.min(cm.lastLine() + 1, pos.line + 500);
|
|
var nextClose = CodeMirror.scanForClosingTag(cm, pos, null, end);
|
|
if (!nextClose || nextClose.tag != tagName) return false;
|
|
// If the immediate wrapping context contains onCx instances of
|
|
// the same tag, a closing tag only exists if there are at least
|
|
// that many closing tags of that type following.
|
|
var onCx = newTag ? 1 : 0
|
|
for (var i = context.length - 1; i >= 0; i--) {
|
|
if (context[i] == tagName) ++onCx
|
|
else break
|
|
}
|
|
pos = nextClose.to;
|
|
for (var i = 1; i < onCx; i++) {
|
|
var next = CodeMirror.scanForClosingTag(cm, pos, null, end);
|
|
if (!next || next.tag != tagName) return false;
|
|
pos = next.to;
|
|
}
|
|
return true;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 32855:
|
|
/*!***************************************************************************!*\
|
|
!*** ./node_modules/_codemirror@5.58.2@codemirror/addon/fold/xml-fold.js ***!
|
|
\***************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
|
|
(function(mod) {
|
|
if (true) // CommonJS
|
|
mod(__webpack_require__(/*! ../../lib/codemirror */ 89780));
|
|
else {}
|
|
})(function(CodeMirror) {
|
|
"use strict";
|
|
|
|
var Pos = CodeMirror.Pos;
|
|
function cmp(a, b) { return a.line - b.line || a.ch - b.ch; }
|
|
|
|
var nameStartChar = "A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
|
|
var nameChar = nameStartChar + "\-\:\.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
|
|
var xmlTagStart = new RegExp("<(/?)([" + nameStartChar + "][" + nameChar + "]*)", "g");
|
|
|
|
function Iter(cm, line, ch, range) {
|
|
this.line = line; this.ch = ch;
|
|
this.cm = cm; this.text = cm.getLine(line);
|
|
this.min = range ? Math.max(range.from, cm.firstLine()) : cm.firstLine();
|
|
this.max = range ? Math.min(range.to - 1, cm.lastLine()) : cm.lastLine();
|
|
}
|
|
|
|
function tagAt(iter, ch) {
|
|
var type = iter.cm.getTokenTypeAt(Pos(iter.line, ch));
|
|
return type && /\btag\b/.test(type);
|
|
}
|
|
|
|
function nextLine(iter) {
|
|
if (iter.line >= iter.max) return;
|
|
iter.ch = 0;
|
|
iter.text = iter.cm.getLine(++iter.line);
|
|
return true;
|
|
}
|
|
function prevLine(iter) {
|
|
if (iter.line <= iter.min) return;
|
|
iter.text = iter.cm.getLine(--iter.line);
|
|
iter.ch = iter.text.length;
|
|
return true;
|
|
}
|
|
|
|
function toTagEnd(iter) {
|
|
for (;;) {
|
|
var gt = iter.text.indexOf(">", iter.ch);
|
|
if (gt == -1) { if (nextLine(iter)) continue; else return; }
|
|
if (!tagAt(iter, gt + 1)) { iter.ch = gt + 1; continue; }
|
|
var lastSlash = iter.text.lastIndexOf("/", gt);
|
|
var selfClose = lastSlash > -1 && !/\S/.test(iter.text.slice(lastSlash + 1, gt));
|
|
iter.ch = gt + 1;
|
|
return selfClose ? "selfClose" : "regular";
|
|
}
|
|
}
|
|
function toTagStart(iter) {
|
|
for (;;) {
|
|
var lt = iter.ch ? iter.text.lastIndexOf("<", iter.ch - 1) : -1;
|
|
if (lt == -1) { if (prevLine(iter)) continue; else return; }
|
|
if (!tagAt(iter, lt + 1)) { iter.ch = lt; continue; }
|
|
xmlTagStart.lastIndex = lt;
|
|
iter.ch = lt;
|
|
var match = xmlTagStart.exec(iter.text);
|
|
if (match && match.index == lt) return match;
|
|
}
|
|
}
|
|
|
|
function toNextTag(iter) {
|
|
for (;;) {
|
|
xmlTagStart.lastIndex = iter.ch;
|
|
var found = xmlTagStart.exec(iter.text);
|
|
if (!found) { if (nextLine(iter)) continue; else return; }
|
|
if (!tagAt(iter, found.index + 1)) { iter.ch = found.index + 1; continue; }
|
|
iter.ch = found.index + found[0].length;
|
|
return found;
|
|
}
|
|
}
|
|
function toPrevTag(iter) {
|
|
for (;;) {
|
|
var gt = iter.ch ? iter.text.lastIndexOf(">", iter.ch - 1) : -1;
|
|
if (gt == -1) { if (prevLine(iter)) continue; else return; }
|
|
if (!tagAt(iter, gt + 1)) { iter.ch = gt; continue; }
|
|
var lastSlash = iter.text.lastIndexOf("/", gt);
|
|
var selfClose = lastSlash > -1 && !/\S/.test(iter.text.slice(lastSlash + 1, gt));
|
|
iter.ch = gt + 1;
|
|
return selfClose ? "selfClose" : "regular";
|
|
}
|
|
}
|
|
|
|
function findMatchingClose(iter, tag) {
|
|
var stack = [];
|
|
for (;;) {
|
|
var next = toNextTag(iter), end, startLine = iter.line, startCh = iter.ch - (next ? next[0].length : 0);
|
|
if (!next || !(end = toTagEnd(iter))) return;
|
|
if (end == "selfClose") continue;
|
|
if (next[1]) { // closing tag
|
|
for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == next[2]) {
|
|
stack.length = i;
|
|
break;
|
|
}
|
|
if (i < 0 && (!tag || tag == next[2])) return {
|
|
tag: next[2],
|
|
from: Pos(startLine, startCh),
|
|
to: Pos(iter.line, iter.ch)
|
|
};
|
|
} else { // opening tag
|
|
stack.push(next[2]);
|
|
}
|
|
}
|
|
}
|
|
function findMatchingOpen(iter, tag) {
|
|
var stack = [];
|
|
for (;;) {
|
|
var prev = toPrevTag(iter);
|
|
if (!prev) return;
|
|
if (prev == "selfClose") { toTagStart(iter); continue; }
|
|
var endLine = iter.line, endCh = iter.ch;
|
|
var start = toTagStart(iter);
|
|
if (!start) return;
|
|
if (start[1]) { // closing tag
|
|
stack.push(start[2]);
|
|
} else { // opening tag
|
|
for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == start[2]) {
|
|
stack.length = i;
|
|
break;
|
|
}
|
|
if (i < 0 && (!tag || tag == start[2])) return {
|
|
tag: start[2],
|
|
from: Pos(iter.line, iter.ch),
|
|
to: Pos(endLine, endCh)
|
|
};
|
|
}
|
|
}
|
|
}
|
|
|
|
CodeMirror.registerHelper("fold", "xml", function(cm, start) {
|
|
var iter = new Iter(cm, start.line, 0);
|
|
for (;;) {
|
|
var openTag = toNextTag(iter)
|
|
if (!openTag || iter.line != start.line) return
|
|
var end = toTagEnd(iter)
|
|
if (!end) return
|
|
if (!openTag[1] && end != "selfClose") {
|
|
var startPos = Pos(iter.line, iter.ch);
|
|
var endPos = findMatchingClose(iter, openTag[2]);
|
|
return endPos && cmp(endPos.from, startPos) > 0 ? {from: startPos, to: endPos.from} : null
|
|
}
|
|
}
|
|
});
|
|
CodeMirror.findMatchingTag = function(cm, pos, range) {
|
|
var iter = new Iter(cm, pos.line, pos.ch, range);
|
|
if (iter.text.indexOf(">") == -1 && iter.text.indexOf("<") == -1) return;
|
|
var end = toTagEnd(iter), to = end && Pos(iter.line, iter.ch);
|
|
var start = end && toTagStart(iter);
|
|
if (!end || !start || cmp(iter, pos) > 0) return;
|
|
var here = {from: Pos(iter.line, iter.ch), to: to, tag: start[2]};
|
|
if (end == "selfClose") return {open: here, close: null, at: "open"};
|
|
|
|
if (start[1]) { // closing tag
|
|
return {open: findMatchingOpen(iter, start[2]), close: here, at: "close"};
|
|
} else { // opening tag
|
|
iter = new Iter(cm, to.line, to.ch, range);
|
|
return {open: here, close: findMatchingClose(iter, start[2]), at: "open"};
|
|
}
|
|
};
|
|
|
|
CodeMirror.findEnclosingTag = function(cm, pos, range, tag) {
|
|
var iter = new Iter(cm, pos.line, pos.ch, range);
|
|
for (;;) {
|
|
var open = findMatchingOpen(iter, tag);
|
|
if (!open) break;
|
|
var forward = new Iter(cm, pos.line, pos.ch, range);
|
|
var close = findMatchingClose(forward, open.tag);
|
|
if (close) return {open: open, close: close};
|
|
}
|
|
};
|
|
|
|
// Used by addon/edit/closetag.js
|
|
CodeMirror.scanForClosingTag = function(cm, pos, name, end) {
|
|
var iter = new Iter(cm, pos.line, pos.ch, end ? {from: 0, to: end} : null);
|
|
return findMatchingClose(iter, name);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 25419:
|
|
/*!******************************************************************************!*\
|
|
!*** ./node_modules/_codemirror@5.58.2@codemirror/mode/markdown/markdown.js ***!
|
|
\******************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
|
|
(function(mod) {
|
|
if (true) // CommonJS
|
|
mod(__webpack_require__(/*! ../../lib/codemirror */ 89780), __webpack_require__(/*! ../xml/xml */ 15525), __webpack_require__(/*! ../meta */ 98101));
|
|
else {}
|
|
})(function(CodeMirror) {
|
|
"use strict";
|
|
|
|
CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
|
|
|
var htmlMode = CodeMirror.getMode(cmCfg, "text/html");
|
|
var htmlModeMissing = htmlMode.name == "null"
|
|
|
|
function getMode(name) {
|
|
if (CodeMirror.findModeByName) {
|
|
var found = CodeMirror.findModeByName(name);
|
|
if (found) name = found.mime || found.mimes[0];
|
|
}
|
|
var mode = CodeMirror.getMode(cmCfg, name);
|
|
return mode.name == "null" ? null : mode;
|
|
}
|
|
|
|
// Should characters that affect highlighting be highlighted separate?
|
|
// Does not include characters that will be output (such as `1.` and `-` for lists)
|
|
if (modeCfg.highlightFormatting === undefined)
|
|
modeCfg.highlightFormatting = false;
|
|
|
|
// Maximum number of nested blockquotes. Set to 0 for infinite nesting.
|
|
// Excess `>` will emit `error` token.
|
|
if (modeCfg.maxBlockquoteDepth === undefined)
|
|
modeCfg.maxBlockquoteDepth = 0;
|
|
|
|
// Turn on task lists? ("- [ ] " and "- [x] ")
|
|
if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;
|
|
|
|
// Turn on strikethrough syntax
|
|
if (modeCfg.strikethrough === undefined)
|
|
modeCfg.strikethrough = false;
|
|
|
|
if (modeCfg.emoji === undefined)
|
|
modeCfg.emoji = false;
|
|
|
|
if (modeCfg.fencedCodeBlockHighlighting === undefined)
|
|
modeCfg.fencedCodeBlockHighlighting = true;
|
|
|
|
if (modeCfg.fencedCodeBlockDefaultMode === undefined)
|
|
modeCfg.fencedCodeBlockDefaultMode = 'text/plain';
|
|
|
|
if (modeCfg.xml === undefined)
|
|
modeCfg.xml = true;
|
|
|
|
// Allow token types to be overridden by user-provided token types.
|
|
if (modeCfg.tokenTypeOverrides === undefined)
|
|
modeCfg.tokenTypeOverrides = {};
|
|
|
|
var tokenTypes = {
|
|
header: "header",
|
|
code: "comment",
|
|
quote: "quote",
|
|
list1: "variable-2",
|
|
list2: "variable-3",
|
|
list3: "keyword",
|
|
hr: "hr",
|
|
image: "image",
|
|
imageAltText: "image-alt-text",
|
|
imageMarker: "image-marker",
|
|
formatting: "formatting",
|
|
linkInline: "link",
|
|
linkEmail: "link",
|
|
linkText: "link",
|
|
linkHref: "string",
|
|
em: "em",
|
|
strong: "strong",
|
|
strikethrough: "strikethrough",
|
|
emoji: "builtin"
|
|
};
|
|
|
|
for (var tokenType in tokenTypes) {
|
|
if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {
|
|
tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];
|
|
}
|
|
}
|
|
|
|
var hrRE = /^([*\-_])(?:\s*\1){2,}\s*$/
|
|
, listRE = /^(?:[*\-+]|^[0-9]+([.)]))\s+/
|
|
, taskListRE = /^\[(x| )\](?=\s)/i // Must follow listRE
|
|
, atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/
|
|
, setextHeaderRE = /^ {0,3}(?:\={1,}|-{2,})\s*$/
|
|
, textRE = /^[^#!\[\]*_\\<>` "'(~:]+/
|
|
, fencedCodeRE = /^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/
|
|
, linkDefRE = /^\s*\[[^\]]+?\]:.*$/ // naive link-definition
|
|
, punctuation = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/
|
|
, expandedTab = " " // CommonMark specifies tab as 4 spaces
|
|
|
|
function switchInline(stream, state, f) {
|
|
state.f = state.inline = f;
|
|
return f(stream, state);
|
|
}
|
|
|
|
function switchBlock(stream, state, f) {
|
|
state.f = state.block = f;
|
|
return f(stream, state);
|
|
}
|
|
|
|
function lineIsEmpty(line) {
|
|
return !line || !/\S/.test(line.string)
|
|
}
|
|
|
|
// Blocks
|
|
|
|
function blankLine(state) {
|
|
// Reset linkTitle state
|
|
state.linkTitle = false;
|
|
state.linkHref = false;
|
|
state.linkText = false;
|
|
// Reset EM state
|
|
state.em = false;
|
|
// Reset STRONG state
|
|
state.strong = false;
|
|
// Reset strikethrough state
|
|
state.strikethrough = false;
|
|
// Reset state.quote
|
|
state.quote = 0;
|
|
// Reset state.indentedCode
|
|
state.indentedCode = false;
|
|
if (state.f == htmlBlock) {
|
|
var exit = htmlModeMissing
|
|
if (!exit) {
|
|
var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
|
|
exit = inner.mode.name == "xml" && inner.state.tagStart === null &&
|
|
(!inner.state.context && inner.state.tokenize.isInText)
|
|
}
|
|
if (exit) {
|
|
state.f = inlineNormal;
|
|
state.block = blockNormal;
|
|
state.htmlState = null;
|
|
}
|
|
}
|
|
// Reset state.trailingSpace
|
|
state.trailingSpace = 0;
|
|
state.trailingSpaceNewLine = false;
|
|
// Mark this line as blank
|
|
state.prevLine = state.thisLine
|
|
state.thisLine = {stream: null}
|
|
return null;
|
|
}
|
|
|
|
function blockNormal(stream, state) {
|
|
var firstTokenOnLine = stream.column() === state.indentation;
|
|
var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream);
|
|
var prevLineIsIndentedCode = state.indentedCode;
|
|
var prevLineIsHr = state.prevLine.hr;
|
|
var prevLineIsList = state.list !== false;
|
|
var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3;
|
|
|
|
state.indentedCode = false;
|
|
|
|
var lineIndentation = state.indentation;
|
|
// compute once per line (on first token)
|
|
if (state.indentationDiff === null) {
|
|
state.indentationDiff = state.indentation;
|
|
if (prevLineIsList) {
|
|
state.list = null;
|
|
// While this list item's marker's indentation is less than the deepest
|
|
// list item's content's indentation,pop the deepest list item
|
|
// indentation off the stack, and update block indentation state
|
|
while (lineIndentation < state.listStack[state.listStack.length - 1]) {
|
|
state.listStack.pop();
|
|
if (state.listStack.length) {
|
|
state.indentation = state.listStack[state.listStack.length - 1];
|
|
// less than the first list's indent -> the line is no longer a list
|
|
} else {
|
|
state.list = false;
|
|
}
|
|
}
|
|
if (state.list !== false) {
|
|
state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1]
|
|
}
|
|
}
|
|
}
|
|
|
|
// not comprehensive (currently only for setext detection purposes)
|
|
var allowsInlineContinuation = (
|
|
!prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header &&
|
|
(!prevLineIsList || !prevLineIsIndentedCode) &&
|
|
!state.prevLine.fencedCodeEnd
|
|
);
|
|
|
|
var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) &&
|
|
state.indentation <= maxNonCodeIndentation && stream.match(hrRE);
|
|
|
|
var match = null;
|
|
if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd ||
|
|
state.prevLine.header || prevLineLineIsEmpty)) {
|
|
stream.skipToEnd();
|
|
state.indentedCode = true;
|
|
return tokenTypes.code;
|
|
} else if (stream.eatSpace()) {
|
|
return null;
|
|
} else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) {
|
|
state.quote = 0;
|
|
state.header = match[1].length;
|
|
state.thisLine.header = true;
|
|
if (modeCfg.highlightFormatting) state.formatting = "header";
|
|
state.f = state.inline;
|
|
return getType(state);
|
|
} else if (state.indentation <= maxNonCodeIndentation && stream.eat('>')) {
|
|
state.quote = firstTokenOnLine ? 1 : state.quote + 1;
|
|
if (modeCfg.highlightFormatting) state.formatting = "quote";
|
|
stream.eatSpace();
|
|
return getType(state);
|
|
} else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) {
|
|
var listType = match[1] ? "ol" : "ul";
|
|
|
|
state.indentation = lineIndentation + stream.current().length;
|
|
state.list = true;
|
|
state.quote = 0;
|
|
|
|
// Add this list item's content's indentation to the stack
|
|
state.listStack.push(state.indentation);
|
|
// Reset inline styles which shouldn't propagate aross list items
|
|
state.em = false;
|
|
state.strong = false;
|
|
state.code = false;
|
|
state.strikethrough = false;
|
|
|
|
if (modeCfg.taskLists && stream.match(taskListRE, false)) {
|
|
state.taskList = true;
|
|
}
|
|
state.f = state.inline;
|
|
if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType];
|
|
return getType(state);
|
|
} else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) {
|
|
state.quote = 0;
|
|
state.fencedEndRE = new RegExp(match[1] + "+ *$");
|
|
// try switching mode
|
|
state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2] || modeCfg.fencedCodeBlockDefaultMode );
|
|
if (state.localMode) state.localState = CodeMirror.startState(state.localMode);
|
|
state.f = state.block = local;
|
|
if (modeCfg.highlightFormatting) state.formatting = "code-block";
|
|
state.code = -1
|
|
return getType(state);
|
|
// SETEXT has lowest block-scope precedence after HR, so check it after
|
|
// the others (code, blockquote, list...)
|
|
} else if (
|
|
// if setext set, indicates line after ---/===
|
|
state.setext || (
|
|
// line before ---/===
|
|
(!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false &&
|
|
!state.code && !isHr && !linkDefRE.test(stream.string) &&
|
|
(match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE))
|
|
)
|
|
) {
|
|
if ( !state.setext ) {
|
|
state.header = match[0].charAt(0) == '=' ? 1 : 2;
|
|
state.setext = state.header;
|
|
} else {
|
|
state.header = state.setext;
|
|
// has no effect on type so we can reset it now
|
|
state.setext = 0;
|
|
stream.skipToEnd();
|
|
if (modeCfg.highlightFormatting) state.formatting = "header";
|
|
}
|
|
state.thisLine.header = true;
|
|
state.f = state.inline;
|
|
return getType(state);
|
|
} else if (isHr) {
|
|
stream.skipToEnd();
|
|
state.hr = true;
|
|
state.thisLine.hr = true;
|
|
return tokenTypes.hr;
|
|
} else if (stream.peek() === '[') {
|
|
return switchInline(stream, state, footnoteLink);
|
|
}
|
|
|
|
return switchInline(stream, state, state.inline);
|
|
}
|
|
|
|
function htmlBlock(stream, state) {
|
|
var style = htmlMode.token(stream, state.htmlState);
|
|
if (!htmlModeMissing) {
|
|
var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
|
|
if ((inner.mode.name == "xml" && inner.state.tagStart === null &&
|
|
(!inner.state.context && inner.state.tokenize.isInText)) ||
|
|
(state.md_inside && stream.current().indexOf(">") > -1)) {
|
|
state.f = inlineNormal;
|
|
state.block = blockNormal;
|
|
state.htmlState = null;
|
|
}
|
|
}
|
|
return style;
|
|
}
|
|
|
|
function local(stream, state) {
|
|
var currListInd = state.listStack[state.listStack.length - 1] || 0;
|
|
var hasExitedList = state.indentation < currListInd;
|
|
var maxFencedEndInd = currListInd + 3;
|
|
if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) {
|
|
if (modeCfg.highlightFormatting) state.formatting = "code-block";
|
|
var returnType;
|
|
if (!hasExitedList) returnType = getType(state)
|
|
state.localMode = state.localState = null;
|
|
state.block = blockNormal;
|
|
state.f = inlineNormal;
|
|
state.fencedEndRE = null;
|
|
state.code = 0
|
|
state.thisLine.fencedCodeEnd = true;
|
|
if (hasExitedList) return switchBlock(stream, state, state.block);
|
|
return returnType;
|
|
} else if (state.localMode) {
|
|
return state.localMode.token(stream, state.localState);
|
|
} else {
|
|
stream.skipToEnd();
|
|
return tokenTypes.code;
|
|
}
|
|
}
|
|
|
|
// Inline
|
|
function getType(state) {
|
|
var styles = [];
|
|
|
|
if (state.formatting) {
|
|
styles.push(tokenTypes.formatting);
|
|
|
|
if (typeof state.formatting === "string") state.formatting = [state.formatting];
|
|
|
|
for (var i = 0; i < state.formatting.length; i++) {
|
|
styles.push(tokenTypes.formatting + "-" + state.formatting[i]);
|
|
|
|
if (state.formatting[i] === "header") {
|
|
styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.header);
|
|
}
|
|
|
|
// Add `formatting-quote` and `formatting-quote-#` for blockquotes
|
|
// Add `error` instead if the maximum blockquote nesting depth is passed
|
|
if (state.formatting[i] === "quote") {
|
|
if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
|
|
styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.quote);
|
|
} else {
|
|
styles.push("error");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (state.taskOpen) {
|
|
styles.push("meta");
|
|
return styles.length ? styles.join(' ') : null;
|
|
}
|
|
if (state.taskClosed) {
|
|
styles.push("property");
|
|
return styles.length ? styles.join(' ') : null;
|
|
}
|
|
|
|
if (state.linkHref) {
|
|
styles.push(tokenTypes.linkHref, "url");
|
|
} else { // Only apply inline styles to non-url text
|
|
if (state.strong) { styles.push(tokenTypes.strong); }
|
|
if (state.em) { styles.push(tokenTypes.em); }
|
|
if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }
|
|
if (state.emoji) { styles.push(tokenTypes.emoji); }
|
|
if (state.linkText) { styles.push(tokenTypes.linkText); }
|
|
if (state.code) { styles.push(tokenTypes.code); }
|
|
if (state.image) { styles.push(tokenTypes.image); }
|
|
if (state.imageAltText) { styles.push(tokenTypes.imageAltText, "link"); }
|
|
if (state.imageMarker) { styles.push(tokenTypes.imageMarker); }
|
|
}
|
|
|
|
if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + "-" + state.header); }
|
|
|
|
if (state.quote) {
|
|
styles.push(tokenTypes.quote);
|
|
|
|
// Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth
|
|
if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
|
|
styles.push(tokenTypes.quote + "-" + state.quote);
|
|
} else {
|
|
styles.push(tokenTypes.quote + "-" + modeCfg.maxBlockquoteDepth);
|
|
}
|
|
}
|
|
|
|
if (state.list !== false) {
|
|
var listMod = (state.listStack.length - 1) % 3;
|
|
if (!listMod) {
|
|
styles.push(tokenTypes.list1);
|
|
} else if (listMod === 1) {
|
|
styles.push(tokenTypes.list2);
|
|
} else {
|
|
styles.push(tokenTypes.list3);
|
|
}
|
|
}
|
|
|
|
if (state.trailingSpaceNewLine) {
|
|
styles.push("trailing-space-new-line");
|
|
} else if (state.trailingSpace) {
|
|
styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b"));
|
|
}
|
|
|
|
return styles.length ? styles.join(' ') : null;
|
|
}
|
|
|
|
function handleText(stream, state) {
|
|
if (stream.match(textRE, true)) {
|
|
return getType(state);
|
|
}
|
|
return undefined;
|
|
}
|
|
|
|
function inlineNormal(stream, state) {
|
|
var style = state.text(stream, state);
|
|
if (typeof style !== 'undefined')
|
|
return style;
|
|
|
|
if (state.list) { // List marker (*, +, -, 1., etc)
|
|
state.list = null;
|
|
return getType(state);
|
|
}
|
|
|
|
if (state.taskList) {
|
|
var taskOpen = stream.match(taskListRE, true)[1] === " ";
|
|
if (taskOpen) state.taskOpen = true;
|
|
else state.taskClosed = true;
|
|
if (modeCfg.highlightFormatting) state.formatting = "task";
|
|
state.taskList = false;
|
|
return getType(state);
|
|
}
|
|
|
|
state.taskOpen = false;
|
|
state.taskClosed = false;
|
|
|
|
if (state.header && stream.match(/^#+$/, true)) {
|
|
if (modeCfg.highlightFormatting) state.formatting = "header";
|
|
return getType(state);
|
|
}
|
|
|
|
var ch = stream.next();
|
|
|
|
// Matches link titles present on next line
|
|
if (state.linkTitle) {
|
|
state.linkTitle = false;
|
|
var matchCh = ch;
|
|
if (ch === '(') {
|
|
matchCh = ')';
|
|
}
|
|
matchCh = (matchCh+'').replace(/([.?*+^\[\]\\(){}|-])/g, "\\$1");
|
|
var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh;
|
|
if (stream.match(new RegExp(regex), true)) {
|
|
return tokenTypes.linkHref;
|
|
}
|
|
}
|
|
|
|
// If this block is changed, it may need to be updated in GFM mode
|
|
if (ch === '`') {
|
|
var previousFormatting = state.formatting;
|
|
if (modeCfg.highlightFormatting) state.formatting = "code";
|
|
stream.eatWhile('`');
|
|
var count = stream.current().length
|
|
if (state.code == 0 && (!state.quote || count == 1)) {
|
|
state.code = count
|
|
return getType(state)
|
|
} else if (count == state.code) { // Must be exact
|
|
var t = getType(state)
|
|
state.code = 0
|
|
return t
|
|
} else {
|
|
state.formatting = previousFormatting
|
|
return getType(state)
|
|
}
|
|
} else if (state.code) {
|
|
return getType(state);
|
|
}
|
|
|
|
if (ch === '\\') {
|
|
stream.next();
|
|
if (modeCfg.highlightFormatting) {
|
|
var type = getType(state);
|
|
var formattingEscape = tokenTypes.formatting + "-escape";
|
|
return type ? type + " " + formattingEscape : formattingEscape;
|
|
}
|
|
}
|
|
|
|
if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) {
|
|
state.imageMarker = true;
|
|
state.image = true;
|
|
if (modeCfg.highlightFormatting) state.formatting = "image";
|
|
return getType(state);
|
|
}
|
|
|
|
if (ch === '[' && state.imageMarker && stream.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/, false)) {
|
|
state.imageMarker = false;
|
|
state.imageAltText = true
|
|
if (modeCfg.highlightFormatting) state.formatting = "image";
|
|
return getType(state);
|
|
}
|
|
|
|
if (ch === ']' && state.imageAltText) {
|
|
if (modeCfg.highlightFormatting) state.formatting = "image";
|
|
var type = getType(state);
|
|
state.imageAltText = false;
|
|
state.image = false;
|
|
state.inline = state.f = linkHref;
|
|
return type;
|
|
}
|
|
|
|
if (ch === '[' && !state.image) {
|
|
if (state.linkText && stream.match(/^.*?\]/)) return getType(state)
|
|
state.linkText = true;
|
|
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
return getType(state);
|
|
}
|
|
|
|
if (ch === ']' && state.linkText) {
|
|
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
var type = getType(state);
|
|
state.linkText = false;
|
|
state.inline = state.f = stream.match(/\(.*?\)| ?\[.*?\]/, false) ? linkHref : inlineNormal
|
|
return type;
|
|
}
|
|
|
|
if (ch === '<' && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) {
|
|
state.f = state.inline = linkInline;
|
|
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
var type = getType(state);
|
|
if (type){
|
|
type += " ";
|
|
} else {
|
|
type = "";
|
|
}
|
|
return type + tokenTypes.linkInline;
|
|
}
|
|
|
|
if (ch === '<' && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) {
|
|
state.f = state.inline = linkInline;
|
|
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
var type = getType(state);
|
|
if (type){
|
|
type += " ";
|
|
} else {
|
|
type = "";
|
|
}
|
|
return type + tokenTypes.linkEmail;
|
|
}
|
|
|
|
if (modeCfg.xml && ch === '<' && stream.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i, false)) {
|
|
var end = stream.string.indexOf(">", stream.pos);
|
|
if (end != -1) {
|
|
var atts = stream.string.substring(stream.start, end);
|
|
if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) state.md_inside = true;
|
|
}
|
|
stream.backUp(1);
|
|
state.htmlState = CodeMirror.startState(htmlMode);
|
|
return switchBlock(stream, state, htmlBlock);
|
|
}
|
|
|
|
if (modeCfg.xml && ch === '<' && stream.match(/^\/\w*?>/)) {
|
|
state.md_inside = false;
|
|
return "tag";
|
|
} else if (ch === "*" || ch === "_") {
|
|
var len = 1, before = stream.pos == 1 ? " " : stream.string.charAt(stream.pos - 2)
|
|
while (len < 3 && stream.eat(ch)) len++
|
|
var after = stream.peek() || " "
|
|
// See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis
|
|
var leftFlanking = !/\s/.test(after) && (!punctuation.test(after) || /\s/.test(before) || punctuation.test(before))
|
|
var rightFlanking = !/\s/.test(before) && (!punctuation.test(before) || /\s/.test(after) || punctuation.test(after))
|
|
var setEm = null, setStrong = null
|
|
if (len % 2) { // Em
|
|
if (!state.em && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
|
|
setEm = true
|
|
else if (state.em == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
|
|
setEm = false
|
|
}
|
|
if (len > 1) { // Strong
|
|
if (!state.strong && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
|
|
setStrong = true
|
|
else if (state.strong == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
|
|
setStrong = false
|
|
}
|
|
if (setStrong != null || setEm != null) {
|
|
if (modeCfg.highlightFormatting) state.formatting = setEm == null ? "strong" : setStrong == null ? "em" : "strong em"
|
|
if (setEm === true) state.em = ch
|
|
if (setStrong === true) state.strong = ch
|
|
var t = getType(state)
|
|
if (setEm === false) state.em = false
|
|
if (setStrong === false) state.strong = false
|
|
return t
|
|
}
|
|
} else if (ch === ' ') {
|
|
if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces
|
|
if (stream.peek() === ' ') { // Surrounded by spaces, ignore
|
|
return getType(state);
|
|
} else { // Not surrounded by spaces, back up pointer
|
|
stream.backUp(1);
|
|
}
|
|
}
|
|
}
|
|
|
|
if (modeCfg.strikethrough) {
|
|
if (ch === '~' && stream.eatWhile(ch)) {
|
|
if (state.strikethrough) {// Remove strikethrough
|
|
if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
|
|
var t = getType(state);
|
|
state.strikethrough = false;
|
|
return t;
|
|
} else if (stream.match(/^[^\s]/, false)) {// Add strikethrough
|
|
state.strikethrough = true;
|
|
if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
|
|
return getType(state);
|
|
}
|
|
} else if (ch === ' ') {
|
|
if (stream.match(/^~~/, true)) { // Probably surrounded by space
|
|
if (stream.peek() === ' ') { // Surrounded by spaces, ignore
|
|
return getType(state);
|
|
} else { // Not surrounded by spaces, back up pointer
|
|
stream.backUp(2);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (modeCfg.emoji && ch === ":" && stream.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)) {
|
|
state.emoji = true;
|
|
if (modeCfg.highlightFormatting) state.formatting = "emoji";
|
|
var retType = getType(state);
|
|
state.emoji = false;
|
|
return retType;
|
|
}
|
|
|
|
if (ch === ' ') {
|
|
if (stream.match(/^ +$/, false)) {
|
|
state.trailingSpace++;
|
|
} else if (state.trailingSpace) {
|
|
state.trailingSpaceNewLine = true;
|
|
}
|
|
}
|
|
|
|
return getType(state);
|
|
}
|
|
|
|
function linkInline(stream, state) {
|
|
var ch = stream.next();
|
|
|
|
if (ch === ">") {
|
|
state.f = state.inline = inlineNormal;
|
|
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
var type = getType(state);
|
|
if (type){
|
|
type += " ";
|
|
} else {
|
|
type = "";
|
|
}
|
|
return type + tokenTypes.linkInline;
|
|
}
|
|
|
|
stream.match(/^[^>]+/, true);
|
|
|
|
return tokenTypes.linkInline;
|
|
}
|
|
|
|
function linkHref(stream, state) {
|
|
// Check if space, and return NULL if so (to avoid marking the space)
|
|
if(stream.eatSpace()){
|
|
return null;
|
|
}
|
|
var ch = stream.next();
|
|
if (ch === '(' || ch === '[') {
|
|
state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]");
|
|
if (modeCfg.highlightFormatting) state.formatting = "link-string";
|
|
state.linkHref = true;
|
|
return getType(state);
|
|
}
|
|
return 'error';
|
|
}
|
|
|
|
var linkRE = {
|
|
")": /^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,
|
|
"]": /^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/
|
|
}
|
|
|
|
function getLinkHrefInside(endChar) {
|
|
return function(stream, state) {
|
|
var ch = stream.next();
|
|
|
|
if (ch === endChar) {
|
|
state.f = state.inline = inlineNormal;
|
|
if (modeCfg.highlightFormatting) state.formatting = "link-string";
|
|
var returnState = getType(state);
|
|
state.linkHref = false;
|
|
return returnState;
|
|
}
|
|
|
|
stream.match(linkRE[endChar])
|
|
state.linkHref = true;
|
|
return getType(state);
|
|
};
|
|
}
|
|
|
|
function footnoteLink(stream, state) {
|
|
if (stream.match(/^([^\]\\]|\\.)*\]:/, false)) {
|
|
state.f = footnoteLinkInside;
|
|
stream.next(); // Consume [
|
|
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
state.linkText = true;
|
|
return getType(state);
|
|
}
|
|
return switchInline(stream, state, inlineNormal);
|
|
}
|
|
|
|
function footnoteLinkInside(stream, state) {
|
|
if (stream.match(/^\]:/, true)) {
|
|
state.f = state.inline = footnoteUrl;
|
|
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
var returnType = getType(state);
|
|
state.linkText = false;
|
|
return returnType;
|
|
}
|
|
|
|
stream.match(/^([^\]\\]|\\.)+/, true);
|
|
|
|
return tokenTypes.linkText;
|
|
}
|
|
|
|
function footnoteUrl(stream, state) {
|
|
// Check if space, and return NULL if so (to avoid marking the space)
|
|
if(stream.eatSpace()){
|
|
return null;
|
|
}
|
|
// Match URL
|
|
stream.match(/^[^\s]+/, true);
|
|
// Check for link title
|
|
if (stream.peek() === undefined) { // End of line, set flag to check next line
|
|
state.linkTitle = true;
|
|
} else { // More content on line, check if link title
|
|
stream.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/, true);
|
|
}
|
|
state.f = state.inline = inlineNormal;
|
|
return tokenTypes.linkHref + " url";
|
|
}
|
|
|
|
var mode = {
|
|
startState: function() {
|
|
return {
|
|
f: blockNormal,
|
|
|
|
prevLine: {stream: null},
|
|
thisLine: {stream: null},
|
|
|
|
block: blockNormal,
|
|
htmlState: null,
|
|
indentation: 0,
|
|
|
|
inline: inlineNormal,
|
|
text: handleText,
|
|
|
|
formatting: false,
|
|
linkText: false,
|
|
linkHref: false,
|
|
linkTitle: false,
|
|
code: 0,
|
|
em: false,
|
|
strong: false,
|
|
header: 0,
|
|
setext: 0,
|
|
hr: false,
|
|
taskList: false,
|
|
list: false,
|
|
listStack: [],
|
|
quote: 0,
|
|
trailingSpace: 0,
|
|
trailingSpaceNewLine: false,
|
|
strikethrough: false,
|
|
emoji: false,
|
|
fencedEndRE: null
|
|
};
|
|
},
|
|
|
|
copyState: function(s) {
|
|
return {
|
|
f: s.f,
|
|
|
|
prevLine: s.prevLine,
|
|
thisLine: s.thisLine,
|
|
|
|
block: s.block,
|
|
htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),
|
|
indentation: s.indentation,
|
|
|
|
localMode: s.localMode,
|
|
localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,
|
|
|
|
inline: s.inline,
|
|
text: s.text,
|
|
formatting: false,
|
|
linkText: s.linkText,
|
|
linkTitle: s.linkTitle,
|
|
linkHref: s.linkHref,
|
|
code: s.code,
|
|
em: s.em,
|
|
strong: s.strong,
|
|
strikethrough: s.strikethrough,
|
|
emoji: s.emoji,
|
|
header: s.header,
|
|
setext: s.setext,
|
|
hr: s.hr,
|
|
taskList: s.taskList,
|
|
list: s.list,
|
|
listStack: s.listStack.slice(0),
|
|
quote: s.quote,
|
|
indentedCode: s.indentedCode,
|
|
trailingSpace: s.trailingSpace,
|
|
trailingSpaceNewLine: s.trailingSpaceNewLine,
|
|
md_inside: s.md_inside,
|
|
fencedEndRE: s.fencedEndRE
|
|
};
|
|
},
|
|
|
|
token: function(stream, state) {
|
|
|
|
// Reset state.formatting
|
|
state.formatting = false;
|
|
|
|
if (stream != state.thisLine.stream) {
|
|
state.header = 0;
|
|
state.hr = false;
|
|
|
|
if (stream.match(/^\s*$/, true)) {
|
|
blankLine(state);
|
|
return null;
|
|
}
|
|
|
|
state.prevLine = state.thisLine
|
|
state.thisLine = {stream: stream}
|
|
|
|
// Reset state.taskList
|
|
state.taskList = false;
|
|
|
|
// Reset state.trailingSpace
|
|
state.trailingSpace = 0;
|
|
state.trailingSpaceNewLine = false;
|
|
|
|
if (!state.localState) {
|
|
state.f = state.block;
|
|
if (state.f != htmlBlock) {
|
|
var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, expandedTab).length;
|
|
state.indentation = indentation;
|
|
state.indentationDiff = null;
|
|
if (indentation > 0) return null;
|
|
}
|
|
}
|
|
}
|
|
return state.f(stream, state);
|
|
},
|
|
|
|
innerMode: function(state) {
|
|
if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};
|
|
if (state.localState) return {state: state.localState, mode: state.localMode};
|
|
return {state: state, mode: mode};
|
|
},
|
|
|
|
indent: function(state, textAfter, line) {
|
|
if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line)
|
|
if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line)
|
|
return CodeMirror.Pass
|
|
},
|
|
|
|
blankLine: blankLine,
|
|
|
|
getType: getType,
|
|
|
|
blockCommentStart: "<!--",
|
|
blockCommentEnd: "-->",
|
|
closeBrackets: "()[]{}''\"\"``",
|
|
fold: "markdown"
|
|
};
|
|
return mode;
|
|
}, "xml");
|
|
|
|
CodeMirror.defineMIME("text/markdown", "markdown");
|
|
|
|
CodeMirror.defineMIME("text/x-markdown", "markdown");
|
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 98101:
|
|
/*!*****************************************************************!*\
|
|
!*** ./node_modules/_codemirror@5.58.2@codemirror/mode/meta.js ***!
|
|
\*****************************************************************/
|
|
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
|
|
(function(mod) {
|
|
if (true) // CommonJS
|
|
mod(__webpack_require__(/*! ../lib/codemirror */ 89780));
|
|
else {}
|
|
})(function(CodeMirror) {
|
|
"use strict";
|
|
|
|
CodeMirror.modeInfo = [
|
|
{name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"]},
|
|
{name: "PGP", mimes: ["application/pgp", "application/pgp-encrypted", "application/pgp-keys", "application/pgp-signature"], mode: "asciiarmor", ext: ["asc", "pgp", "sig"]},
|
|
{name: "ASN.1", mime: "text/x-ttcn-asn", mode: "asn.1", ext: ["asn", "asn1"]},
|
|
{name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk", file: /^extensions\.conf$/i},
|
|
{name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"]},
|
|
{name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h", "ino"]},
|
|
{name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"]},
|
|
{name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy"]},
|
|
{name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp", "cs"]},
|
|
{name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj", "cljc", "cljx"]},
|
|
{name: "ClojureScript", mime: "text/x-clojurescript", mode: "clojure", ext: ["cljs"]},
|
|
{name: "Closure Stylesheets (GSS)", mime: "text/x-gss", mode: "css", ext: ["gss"]},
|
|
{name: "CMake", mime: "text/x-cmake", mode: "cmake", ext: ["cmake", "cmake.in"], file: /^CMakeLists\.txt$/},
|
|
{name: "CoffeeScript", mimes: ["application/vnd.coffeescript", "text/coffeescript", "text/x-coffeescript"], mode: "coffeescript", ext: ["coffee"], alias: ["coffee", "coffee-script"]},
|
|
{name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"], alias: ["lisp"]},
|
|
{name: "Cypher", mime: "application/x-cypher-query", mode: "cypher", ext: ["cyp", "cypher"]},
|
|
{name: "Cython", mime: "text/x-cython", mode: "python", ext: ["pyx", "pxd", "pxi"]},
|
|
{name: "Crystal", mime: "text/x-crystal", mode: "crystal", ext: ["cr"]},
|
|
{name: "CSS", mime: "text/css", mode: "css", ext: ["css"]},
|
|
{name: "CQL", mime: "text/x-cassandra", mode: "sql", ext: ["cql"]},
|
|
{name: "D", mime: "text/x-d", mode: "d", ext: ["d"]},
|
|
{name: "Dart", mimes: ["application/dart", "text/x-dart"], mode: "dart", ext: ["dart"]},
|
|
{name: "diff", mime: "text/x-diff", mode: "diff", ext: ["diff", "patch"]},
|
|
{name: "Django", mime: "text/x-django", mode: "django"},
|
|
{name: "Dockerfile", mime: "text/x-dockerfile", mode: "dockerfile", file: /^Dockerfile$/},
|
|
{name: "DTD", mime: "application/xml-dtd", mode: "dtd", ext: ["dtd"]},
|
|
{name: "Dylan", mime: "text/x-dylan", mode: "dylan", ext: ["dylan", "dyl", "intr"]},
|
|
{name: "EBNF", mime: "text/x-ebnf", mode: "ebnf"},
|
|
{name: "ECL", mime: "text/x-ecl", mode: "ecl", ext: ["ecl"]},
|
|
{name: "edn", mime: "application/edn", mode: "clojure", ext: ["edn"]},
|
|
{name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"]},
|
|
{name: "Elm", mime: "text/x-elm", mode: "elm", ext: ["elm"]},
|
|
{name: "Embedded Javascript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"]},
|
|
{name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"]},
|
|
{name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"]},
|
|
{name: "Esper", mime: "text/x-esper", mode: "sql"},
|
|
{name: "Factor", mime: "text/x-factor", mode: "factor", ext: ["factor"]},
|
|
{name: "FCL", mime: "text/x-fcl", mode: "fcl"},
|
|
{name: "Forth", mime: "text/x-forth", mode: "forth", ext: ["forth", "fth", "4th"]},
|
|
{name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90", "f95"]},
|
|
{name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"]},
|
|
{name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"]},
|
|
{name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"]},
|
|
{name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history)\.md$/i},
|
|
{name: "Go", mime: "text/x-go", mode: "go", ext: ["go"]},
|
|
{name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy", "gradle"], file: /^Jenkinsfile$/},
|
|
{name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"]},
|
|
{name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"]},
|
|
{name: "Haskell (Literate)", mime: "text/x-literate-haskell", mode: "haskell-literate", ext: ["lhs"]},
|
|
{name: "Haxe", mime: "text/x-haxe", mode: "haxe", ext: ["hx"]},
|
|
{name: "HXML", mime: "text/x-hxml", mode: "haxe", ext: ["hxml"]},
|
|
{name: "ASP.NET", mime: "application/x-aspx", mode: "htmlembedded", ext: ["aspx"], alias: ["asp", "aspx"]},
|
|
{name: "HTML", mime: "text/html", mode: "htmlmixed", ext: ["html", "htm", "handlebars", "hbs"], alias: ["xhtml"]},
|
|
{name: "HTTP", mime: "message/http", mode: "http"},
|
|
{name: "IDL", mime: "text/x-idl", mode: "idl", ext: ["pro"]},
|
|
{name: "Pug", mime: "text/x-pug", mode: "pug", ext: ["jade", "pug"], alias: ["jade"]},
|
|
{name: "Java", mime: "text/x-java", mode: "clike", ext: ["java"]},
|
|
{name: "Java Server Pages", mime: "application/x-jsp", mode: "htmlembedded", ext: ["jsp"], alias: ["jsp"]},
|
|
{name: "JavaScript", mimes: ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"],
|
|
mode: "javascript", ext: ["js"], alias: ["ecmascript", "js", "node"]},
|
|
{name: "JSON", mimes: ["application/json", "application/x-json"], mode: "javascript", ext: ["json", "map"], alias: ["json5"]},
|
|
{name: "JSON-LD", mime: "application/ld+json", mode: "javascript", ext: ["jsonld"], alias: ["jsonld"]},
|
|
{name: "JSX", mime: "text/jsx", mode: "jsx", ext: ["jsx"]},
|
|
{name: "Jinja2", mime: "text/jinja2", mode: "jinja2", ext: ["j2", "jinja", "jinja2"]},
|
|
{name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"]},
|
|
{name: "Kotlin", mime: "text/x-kotlin", mode: "clike", ext: ["kt"]},
|
|
{name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"]},
|
|
{name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"]},
|
|
{name: "Lua", mime: "text/x-lua", mode: "lua", ext: ["lua"]},
|
|
{name: "Markdown", mime: "text/x-markdown", mode: "markdown", ext: ["markdown", "md", "mkd"]},
|
|
{name: "mIRC", mime: "text/mirc", mode: "mirc"},
|
|
{name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql"},
|
|
{name: "Mathematica", mime: "text/x-mathematica", mode: "mathematica", ext: ["m", "nb", "wl", "wls"]},
|
|
{name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"]},
|
|
{name: "MUMPS", mime: "text/x-mumps", mode: "mumps", ext: ["mps"]},
|
|
{name: "MS SQL", mime: "text/x-mssql", mode: "sql"},
|
|
{name: "mbox", mime: "application/mbox", mode: "mbox", ext: ["mbox"]},
|
|
{name: "MySQL", mime: "text/x-mysql", mode: "sql"},
|
|
{name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\.conf$/i},
|
|
{name: "NSIS", mime: "text/x-nsis", mode: "nsis", ext: ["nsh", "nsi"]},
|
|
{name: "NTriples", mimes: ["application/n-triples", "application/n-quads", "text/n-triples"],
|
|
mode: "ntriples", ext: ["nt", "nq"]},
|
|
{name: "Objective-C", mime: "text/x-objectivec", mode: "clike", ext: ["m"], alias: ["objective-c", "objc"]},
|
|
{name: "Objective-C++", mime: "text/x-objectivec++", mode: "clike", ext: ["mm"], alias: ["objective-c++", "objc++"]},
|
|
{name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"]},
|
|
{name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"]},
|
|
{name: "Oz", mime: "text/x-oz", mode: "oz", ext: ["oz"]},
|
|
{name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"]},
|
|
{name: "PEG.js", mime: "null", mode: "pegjs", ext: ["jsonld"]},
|
|
{name: "Perl", mime: "text/x-perl", mode: "perl", ext: ["pl", "pm"]},
|
|
{name: "PHP", mimes: ["text/x-php", "application/x-httpd-php", "application/x-httpd-php-open"], mode: "php", ext: ["php", "php3", "php4", "php5", "php7", "phtml"]},
|
|
{name: "Pig", mime: "text/x-pig", mode: "pig", ext: ["pig"]},
|
|
{name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"]},
|
|
{name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"]},
|
|
{name: "PostgreSQL", mime: "text/x-pgsql", mode: "sql"},
|
|
{name: "PowerShell", mime: "application/x-powershell", mode: "powershell", ext: ["ps1", "psd1", "psm1"]},
|
|
{name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"]},
|
|
{name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"]},
|
|
{name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], file: /^(BUCK|BUILD)$/},
|
|
{name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"]},
|
|
{name: "Q", mime: "text/x-q", mode: "q", ext: ["q"]},
|
|
{name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r", "R"], alias: ["rscript"]},
|
|
{name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"], alias: ["rst"]},
|
|
{name: "RPM Changes", mime: "text/x-rpm-changes", mode: "rpm"},
|
|
{name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"]},
|
|
{name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"], alias: ["jruby", "macruby", "rake", "rb", "rbx"]},
|
|
{name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"]},
|
|
{name: "SAS", mime: "text/x-sas", mode: "sas", ext: ["sas"]},
|
|
{name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"]},
|
|
{name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"]},
|
|
{name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"]},
|
|
{name: "SCSS", mime: "text/x-scss", mode: "css", ext: ["scss"]},
|
|
{name: "Shell", mimes: ["text/x-sh", "application/x-sh"], mode: "shell", ext: ["sh", "ksh", "bash"], alias: ["bash", "sh", "zsh"], file: /^PKGBUILD$/},
|
|
{name: "Sieve", mime: "application/sieve", mode: "sieve", ext: ["siv", "sieve"]},
|
|
{name: "Slim", mimes: ["text/x-slim", "application/x-slim"], mode: "slim", ext: ["slim"]},
|
|
{name: "Smalltalk", mime: "text/x-stsrc", mode: "smalltalk", ext: ["st"]},
|
|
{name: "Smarty", mime: "text/x-smarty", mode: "smarty", ext: ["tpl"]},
|
|
{name: "Solr", mime: "text/x-solr", mode: "solr"},
|
|
{name: "SML", mime: "text/x-sml", mode: "mllike", ext: ["sml", "sig", "fun", "smackspec"]},
|
|
{name: "Soy", mime: "text/x-soy", mode: "soy", ext: ["soy"], alias: ["closure template"]},
|
|
{name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"]},
|
|
{name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"]},
|
|
{name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]},
|
|
{name: "SQLite", mime: "text/x-sqlite", mode: "sql"},
|
|
{name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"]},
|
|
{name: "Stylus", mime: "text/x-styl", mode: "stylus", ext: ["styl"]},
|
|
{name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"]},
|
|
{name: "sTeX", mime: "text/x-stex", mode: "stex"},
|
|
{name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx", "tex"], alias: ["tex"]},
|
|
{name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v", "sv", "svh"]},
|
|
{name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"]},
|
|
{name: "Textile", mime: "text/x-textile", mode: "textile", ext: ["textile"]},
|
|
{name: "TiddlyWiki", mime: "text/x-tiddlywiki", mode: "tiddlywiki"},
|
|
{name: "Tiki wiki", mime: "text/tiki", mode: "tiki"},
|
|
{name: "TOML", mime: "text/x-toml", mode: "toml", ext: ["toml"]},
|
|
{name: "Tornado", mime: "text/x-tornado", mode: "tornado"},
|
|
{name: "troff", mime: "text/troff", mode: "troff", ext: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]},
|
|
{name: "TTCN", mime: "text/x-ttcn", mode: "ttcn", ext: ["ttcn", "ttcn3", "ttcnpp"]},
|
|
{name: "TTCN_CFG", mime: "text/x-ttcn-cfg", mode: "ttcn-cfg", ext: ["cfg"]},
|
|
{name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"]},
|
|
{name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"]},
|
|
{name: "TypeScript-JSX", mime: "text/typescript-jsx", mode: "jsx", ext: ["tsx"], alias: ["tsx"]},
|
|
{name: "Twig", mime: "text/x-twig", mode: "twig"},
|
|
{name: "Web IDL", mime: "text/x-webidl", mode: "webidl", ext: ["webidl"]},
|
|
{name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"]},
|
|
{name: "VBScript", mime: "text/vbscript", mode: "vbscript", ext: ["vbs"]},
|
|
{name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"]},
|
|
{name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"]},
|
|
{name: "VHDL", mime: "text/x-vhdl", mode: "vhdl", ext: ["vhd", "vhdl"]},
|
|
{name: "Vue.js Component", mimes: ["script/x-vue", "text/x-vue"], mode: "vue", ext: ["vue"]},
|
|
{name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd", "svg"], alias: ["rss", "wsdl", "xsd"]},
|
|
{name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"]},
|
|
{name: "Yacas", mime: "text/x-yacas", mode: "yacas", ext: ["ys"]},
|
|
{name: "YAML", mimes: ["text/x-yaml", "text/yaml"], mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"]},
|
|
{name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"]},
|
|
{name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"]},
|
|
{name: "xu", mime: "text/x-xu", mode: "mscgen", ext: ["xu"]},
|
|
{name: "msgenny", mime: "text/x-msgenny", mode: "mscgen", ext: ["msgenny"]},
|
|
{name: "WebAssembly", mime: "text/webassembly", mode: "wast", ext: ["wat", "wast"]},
|
|
];
|
|
// Ensure all modes have a mime property for backwards compatibility
|
|
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
|
var info = CodeMirror.modeInfo[i];
|
|
if (info.mimes) info.mime = info.mimes[0];
|
|
}
|
|
|
|
CodeMirror.findModeByMIME = function(mime) {
|
|
mime = mime.toLowerCase();
|
|
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
|
var info = CodeMirror.modeInfo[i];
|
|
if (info.mime == mime) return info;
|
|
if (info.mimes) for (var j = 0; j < info.mimes.length; j++)
|
|
if (info.mimes[j] == mime) return info;
|
|
}
|
|
if (/\+xml$/.test(mime)) return CodeMirror.findModeByMIME("application/xml")
|
|
if (/\+json$/.test(mime)) return CodeMirror.findModeByMIME("application/json")
|
|
};
|
|
|
|
CodeMirror.findModeByExtension = function(ext) {
|
|
ext = ext.toLowerCase();
|
|
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
|
var info = CodeMirror.modeInfo[i];
|
|
if (info.ext) for (var j = 0; j < info.ext.length; j++)
|
|
if (info.ext[j] == ext) return info;
|
|
}
|
|
};
|
|
|
|
CodeMirror.findModeByFileName = function(filename) {
|
|
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
|
var info = CodeMirror.modeInfo[i];
|
|
if (info.file && info.file.test(filename)) return info;
|
|
}
|
|
var dot = filename.lastIndexOf(".");
|
|
var ext = dot > -1 && filename.substring(dot + 1, filename.length);
|
|
if (ext) return CodeMirror.findModeByExtension(ext);
|
|
};
|
|
|
|
CodeMirror.findModeByName = function(name) {
|
|
name = name.toLowerCase();
|
|
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
|
var info = CodeMirror.modeInfo[i];
|
|
if (info.name.toLowerCase() == name) return info;
|
|
if (info.alias) for (var j = 0; j < info.alias.length; j++)
|
|
if (info.alias[j].toLowerCase() == name) return info;
|
|
}
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 67549:
|
|
/*!**********************************************************************!*\
|
|
!*** ./node_modules/_codemirror@5.58.2@codemirror/mode/stex/stex.js ***!
|
|
\**********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
|
|
/*
|
|
* Author: Constantin Jucovschi (c.jucovschi@jacobs-university.de)
|
|
* Licence: MIT
|
|
*/
|
|
|
|
(function(mod) {
|
|
if (true) // CommonJS
|
|
mod(__webpack_require__(/*! ../../lib/codemirror */ 89780));
|
|
else {}
|
|
})(function(CodeMirror) {
|
|
"use strict";
|
|
|
|
CodeMirror.defineMode("stex", function(_config, parserConfig) {
|
|
"use strict";
|
|
|
|
function pushCommand(state, command) {
|
|
state.cmdState.push(command);
|
|
}
|
|
|
|
function peekCommand(state) {
|
|
if (state.cmdState.length > 0) {
|
|
return state.cmdState[state.cmdState.length - 1];
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
function popCommand(state) {
|
|
var plug = state.cmdState.pop();
|
|
if (plug) {
|
|
plug.closeBracket();
|
|
}
|
|
}
|
|
|
|
// returns the non-default plugin closest to the end of the list
|
|
function getMostPowerful(state) {
|
|
var context = state.cmdState;
|
|
for (var i = context.length - 1; i >= 0; i--) {
|
|
var plug = context[i];
|
|
if (plug.name == "DEFAULT") {
|
|
continue;
|
|
}
|
|
return plug;
|
|
}
|
|
return { styleIdentifier: function() { return null; } };
|
|
}
|
|
|
|
function addPluginPattern(pluginName, cmdStyle, styles) {
|
|
return function () {
|
|
this.name = pluginName;
|
|
this.bracketNo = 0;
|
|
this.style = cmdStyle;
|
|
this.styles = styles;
|
|
this.argument = null; // \begin and \end have arguments that follow. These are stored in the plugin
|
|
|
|
this.styleIdentifier = function() {
|
|
return this.styles[this.bracketNo - 1] || null;
|
|
};
|
|
this.openBracket = function() {
|
|
this.bracketNo++;
|
|
return "bracket";
|
|
};
|
|
this.closeBracket = function() {};
|
|
};
|
|
}
|
|
|
|
var plugins = {};
|
|
|
|
plugins["importmodule"] = addPluginPattern("importmodule", "tag", ["string", "builtin"]);
|
|
plugins["documentclass"] = addPluginPattern("documentclass", "tag", ["", "atom"]);
|
|
plugins["usepackage"] = addPluginPattern("usepackage", "tag", ["atom"]);
|
|
plugins["begin"] = addPluginPattern("begin", "tag", ["atom"]);
|
|
plugins["end"] = addPluginPattern("end", "tag", ["atom"]);
|
|
|
|
plugins["label" ] = addPluginPattern("label" , "tag", ["atom"]);
|
|
plugins["ref" ] = addPluginPattern("ref" , "tag", ["atom"]);
|
|
plugins["eqref" ] = addPluginPattern("eqref" , "tag", ["atom"]);
|
|
plugins["cite" ] = addPluginPattern("cite" , "tag", ["atom"]);
|
|
plugins["bibitem" ] = addPluginPattern("bibitem" , "tag", ["atom"]);
|
|
plugins["Bibitem" ] = addPluginPattern("Bibitem" , "tag", ["atom"]);
|
|
plugins["RBibitem" ] = addPluginPattern("RBibitem" , "tag", ["atom"]);
|
|
|
|
plugins["DEFAULT"] = function () {
|
|
this.name = "DEFAULT";
|
|
this.style = "tag";
|
|
|
|
this.styleIdentifier = this.openBracket = this.closeBracket = function() {};
|
|
};
|
|
|
|
function setState(state, f) {
|
|
state.f = f;
|
|
}
|
|
|
|
// called when in a normal (no environment) context
|
|
function normal(source, state) {
|
|
var plug;
|
|
// Do we look like '\command' ? If so, attempt to apply the plugin 'command'
|
|
if (source.match(/^\\[a-zA-Z@]+/)) {
|
|
var cmdName = source.current().slice(1);
|
|
plug = plugins.hasOwnProperty(cmdName) ? plugins[cmdName] : plugins["DEFAULT"];
|
|
plug = new plug();
|
|
pushCommand(state, plug);
|
|
setState(state, beginParams);
|
|
return plug.style;
|
|
}
|
|
|
|
// escape characters
|
|
if (source.match(/^\\[$&%#{}_]/)) {
|
|
return "tag";
|
|
}
|
|
|
|
// white space control characters
|
|
if (source.match(/^\\[,;!\/\\]/)) {
|
|
return "tag";
|
|
}
|
|
|
|
// find if we're starting various math modes
|
|
if (source.match("\\[")) {
|
|
setState(state, function(source, state){ return inMathMode(source, state, "\\]"); });
|
|
return "keyword";
|
|
}
|
|
if (source.match("\\(")) {
|
|
setState(state, function(source, state){ return inMathMode(source, state, "\\)"); });
|
|
return "keyword";
|
|
}
|
|
if (source.match("$$")) {
|
|
setState(state, function(source, state){ return inMathMode(source, state, "$$"); });
|
|
return "keyword";
|
|
}
|
|
if (source.match("$")) {
|
|
setState(state, function(source, state){ return inMathMode(source, state, "$"); });
|
|
return "keyword";
|
|
}
|
|
|
|
var ch = source.next();
|
|
if (ch == "%") {
|
|
source.skipToEnd();
|
|
return "comment";
|
|
} else if (ch == '}' || ch == ']') {
|
|
plug = peekCommand(state);
|
|
if (plug) {
|
|
plug.closeBracket(ch);
|
|
setState(state, beginParams);
|
|
} else {
|
|
return "error";
|
|
}
|
|
return "bracket";
|
|
} else if (ch == '{' || ch == '[') {
|
|
plug = plugins["DEFAULT"];
|
|
plug = new plug();
|
|
pushCommand(state, plug);
|
|
return "bracket";
|
|
} else if (/\d/.test(ch)) {
|
|
source.eatWhile(/[\w.%]/);
|
|
return "atom";
|
|
} else {
|
|
source.eatWhile(/[\w\-_]/);
|
|
plug = getMostPowerful(state);
|
|
if (plug.name == 'begin') {
|
|
plug.argument = source.current();
|
|
}
|
|
return plug.styleIdentifier();
|
|
}
|
|
}
|
|
|
|
function inMathMode(source, state, endModeSeq) {
|
|
if (source.eatSpace()) {
|
|
return null;
|
|
}
|
|
if (endModeSeq && source.match(endModeSeq)) {
|
|
setState(state, normal);
|
|
return "keyword";
|
|
}
|
|
if (source.match(/^\\[a-zA-Z@]+/)) {
|
|
return "tag";
|
|
}
|
|
if (source.match(/^[a-zA-Z]+/)) {
|
|
return "variable-2";
|
|
}
|
|
// escape characters
|
|
if (source.match(/^\\[$&%#{}_]/)) {
|
|
return "tag";
|
|
}
|
|
// white space control characters
|
|
if (source.match(/^\\[,;!\/]/)) {
|
|
return "tag";
|
|
}
|
|
// special math-mode characters
|
|
if (source.match(/^[\^_&]/)) {
|
|
return "tag";
|
|
}
|
|
// non-special characters
|
|
if (source.match(/^[+\-<>|=,\/@!*:;'"`~#?]/)) {
|
|
return null;
|
|
}
|
|
if (source.match(/^(\d+\.\d*|\d*\.\d+|\d+)/)) {
|
|
return "number";
|
|
}
|
|
var ch = source.next();
|
|
if (ch == "{" || ch == "}" || ch == "[" || ch == "]" || ch == "(" || ch == ")") {
|
|
return "bracket";
|
|
}
|
|
|
|
if (ch == "%") {
|
|
source.skipToEnd();
|
|
return "comment";
|
|
}
|
|
return "error";
|
|
}
|
|
|
|
function beginParams(source, state) {
|
|
var ch = source.peek(), lastPlug;
|
|
if (ch == '{' || ch == '[') {
|
|
lastPlug = peekCommand(state);
|
|
lastPlug.openBracket(ch);
|
|
source.eat(ch);
|
|
setState(state, normal);
|
|
return "bracket";
|
|
}
|
|
if (/[ \t\r]/.test(ch)) {
|
|
source.eat(ch);
|
|
return null;
|
|
}
|
|
setState(state, normal);
|
|
popCommand(state);
|
|
|
|
return normal(source, state);
|
|
}
|
|
|
|
return {
|
|
startState: function() {
|
|
var f = parserConfig.inMathMode ? function(source, state){ return inMathMode(source, state); } : normal;
|
|
return {
|
|
cmdState: [],
|
|
f: f
|
|
};
|
|
},
|
|
copyState: function(s) {
|
|
return {
|
|
cmdState: s.cmdState.slice(),
|
|
f: s.f
|
|
};
|
|
},
|
|
token: function(stream, state) {
|
|
return state.f(stream, state);
|
|
},
|
|
blankLine: function(state) {
|
|
state.f = normal;
|
|
state.cmdState.length = 0;
|
|
},
|
|
lineComment: "%"
|
|
};
|
|
});
|
|
|
|
CodeMirror.defineMIME("text/x-stex", "stex");
|
|
CodeMirror.defineMIME("text/x-latex", "stex");
|
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 15525:
|
|
/*!********************************************************************!*\
|
|
!*** ./node_modules/_codemirror@5.58.2@codemirror/mode/xml/xml.js ***!
|
|
\********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
|
|
(function(mod) {
|
|
if (true) // CommonJS
|
|
mod(__webpack_require__(/*! ../../lib/codemirror */ 89780));
|
|
else {}
|
|
})(function(CodeMirror) {
|
|
"use strict";
|
|
|
|
var htmlConfig = {
|
|
autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
|
|
'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
|
|
'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
|
|
'track': true, 'wbr': true, 'menuitem': true},
|
|
implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
|
|
'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
|
|
'th': true, 'tr': true},
|
|
contextGrabbers: {
|
|
'dd': {'dd': true, 'dt': true},
|
|
'dt': {'dd': true, 'dt': true},
|
|
'li': {'li': true},
|
|
'option': {'option': true, 'optgroup': true},
|
|
'optgroup': {'optgroup': true},
|
|
'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
|
|
'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
|
|
'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
|
|
'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
|
|
'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
|
|
'rp': {'rp': true, 'rt': true},
|
|
'rt': {'rp': true, 'rt': true},
|
|
'tbody': {'tbody': true, 'tfoot': true},
|
|
'td': {'td': true, 'th': true},
|
|
'tfoot': {'tbody': true},
|
|
'th': {'td': true, 'th': true},
|
|
'thead': {'tbody': true, 'tfoot': true},
|
|
'tr': {'tr': true}
|
|
},
|
|
doNotIndent: {"pre": true},
|
|
allowUnquoted: true,
|
|
allowMissing: true,
|
|
caseFold: true
|
|
}
|
|
|
|
var xmlConfig = {
|
|
autoSelfClosers: {},
|
|
implicitlyClosed: {},
|
|
contextGrabbers: {},
|
|
doNotIndent: {},
|
|
allowUnquoted: false,
|
|
allowMissing: false,
|
|
allowMissingTagName: false,
|
|
caseFold: false
|
|
}
|
|
|
|
CodeMirror.defineMode("xml", function(editorConf, config_) {
|
|
var indentUnit = editorConf.indentUnit
|
|
var config = {}
|
|
var defaults = config_.htmlMode ? htmlConfig : xmlConfig
|
|
for (var prop in defaults) config[prop] = defaults[prop]
|
|
for (var prop in config_) config[prop] = config_[prop]
|
|
|
|
// Return variables for tokenizers
|
|
var type, setStyle;
|
|
|
|
function inText(stream, state) {
|
|
function chain(parser) {
|
|
state.tokenize = parser;
|
|
return parser(stream, state);
|
|
}
|
|
|
|
var ch = stream.next();
|
|
if (ch == "<") {
|
|
if (stream.eat("!")) {
|
|
if (stream.eat("[")) {
|
|
if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));
|
|
else return null;
|
|
} else if (stream.match("--")) {
|
|
return chain(inBlock("comment", "-->"));
|
|
} else if (stream.match("DOCTYPE", true, true)) {
|
|
stream.eatWhile(/[\w\._\-]/);
|
|
return chain(doctype(1));
|
|
} else {
|
|
return null;
|
|
}
|
|
} else if (stream.eat("?")) {
|
|
stream.eatWhile(/[\w\._\-]/);
|
|
state.tokenize = inBlock("meta", "?>");
|
|
return "meta";
|
|
} else {
|
|
type = stream.eat("/") ? "closeTag" : "openTag";
|
|
state.tokenize = inTag;
|
|
return "tag bracket";
|
|
}
|
|
} else if (ch == "&") {
|
|
var ok;
|
|
if (stream.eat("#")) {
|
|
if (stream.eat("x")) {
|
|
ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
|
|
} else {
|
|
ok = stream.eatWhile(/[\d]/) && stream.eat(";");
|
|
}
|
|
} else {
|
|
ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
|
|
}
|
|
return ok ? "atom" : "error";
|
|
} else {
|
|
stream.eatWhile(/[^&<]/);
|
|
return null;
|
|
}
|
|
}
|
|
inText.isInText = true;
|
|
|
|
function inTag(stream, state) {
|
|
var ch = stream.next();
|
|
if (ch == ">" || (ch == "/" && stream.eat(">"))) {
|
|
state.tokenize = inText;
|
|
type = ch == ">" ? "endTag" : "selfcloseTag";
|
|
return "tag bracket";
|
|
} else if (ch == "=") {
|
|
type = "equals";
|
|
return null;
|
|
} else if (ch == "<") {
|
|
state.tokenize = inText;
|
|
state.state = baseState;
|
|
state.tagName = state.tagStart = null;
|
|
var next = state.tokenize(stream, state);
|
|
return next ? next + " tag error" : "tag error";
|
|
} else if (/[\'\"]/.test(ch)) {
|
|
state.tokenize = inAttribute(ch);
|
|
state.stringStartCol = stream.column();
|
|
return state.tokenize(stream, state);
|
|
} else {
|
|
stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);
|
|
return "word";
|
|
}
|
|
}
|
|
|
|
function inAttribute(quote) {
|
|
var closure = function(stream, state) {
|
|
while (!stream.eol()) {
|
|
if (stream.next() == quote) {
|
|
state.tokenize = inTag;
|
|
break;
|
|
}
|
|
}
|
|
return "string";
|
|
};
|
|
closure.isInAttribute = true;
|
|
return closure;
|
|
}
|
|
|
|
function inBlock(style, terminator) {
|
|
return function(stream, state) {
|
|
while (!stream.eol()) {
|
|
if (stream.match(terminator)) {
|
|
state.tokenize = inText;
|
|
break;
|
|
}
|
|
stream.next();
|
|
}
|
|
return style;
|
|
}
|
|
}
|
|
|
|
function doctype(depth) {
|
|
return function(stream, state) {
|
|
var ch;
|
|
while ((ch = stream.next()) != null) {
|
|
if (ch == "<") {
|
|
state.tokenize = doctype(depth + 1);
|
|
return state.tokenize(stream, state);
|
|
} else if (ch == ">") {
|
|
if (depth == 1) {
|
|
state.tokenize = inText;
|
|
break;
|
|
} else {
|
|
state.tokenize = doctype(depth - 1);
|
|
return state.tokenize(stream, state);
|
|
}
|
|
}
|
|
}
|
|
return "meta";
|
|
};
|
|
}
|
|
|
|
function Context(state, tagName, startOfLine) {
|
|
this.prev = state.context;
|
|
this.tagName = tagName;
|
|
this.indent = state.indented;
|
|
this.startOfLine = startOfLine;
|
|
if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
|
|
this.noIndent = true;
|
|
}
|
|
function popContext(state) {
|
|
if (state.context) state.context = state.context.prev;
|
|
}
|
|
function maybePopContext(state, nextTagName) {
|
|
var parentTagName;
|
|
while (true) {
|
|
if (!state.context) {
|
|
return;
|
|
}
|
|
parentTagName = state.context.tagName;
|
|
if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||
|
|
!config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
|
|
return;
|
|
}
|
|
popContext(state);
|
|
}
|
|
}
|
|
|
|
function baseState(type, stream, state) {
|
|
if (type == "openTag") {
|
|
state.tagStart = stream.column();
|
|
return tagNameState;
|
|
} else if (type == "closeTag") {
|
|
return closeTagNameState;
|
|
} else {
|
|
return baseState;
|
|
}
|
|
}
|
|
function tagNameState(type, stream, state) {
|
|
if (type == "word") {
|
|
state.tagName = stream.current();
|
|
setStyle = "tag";
|
|
return attrState;
|
|
} else if (config.allowMissingTagName && type == "endTag") {
|
|
setStyle = "tag bracket";
|
|
return attrState(type, stream, state);
|
|
} else {
|
|
setStyle = "error";
|
|
return tagNameState;
|
|
}
|
|
}
|
|
function closeTagNameState(type, stream, state) {
|
|
if (type == "word") {
|
|
var tagName = stream.current();
|
|
if (state.context && state.context.tagName != tagName &&
|
|
config.implicitlyClosed.hasOwnProperty(state.context.tagName))
|
|
popContext(state);
|
|
if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {
|
|
setStyle = "tag";
|
|
return closeState;
|
|
} else {
|
|
setStyle = "tag error";
|
|
return closeStateErr;
|
|
}
|
|
} else if (config.allowMissingTagName && type == "endTag") {
|
|
setStyle = "tag bracket";
|
|
return closeState(type, stream, state);
|
|
} else {
|
|
setStyle = "error";
|
|
return closeStateErr;
|
|
}
|
|
}
|
|
|
|
function closeState(type, _stream, state) {
|
|
if (type != "endTag") {
|
|
setStyle = "error";
|
|
return closeState;
|
|
}
|
|
popContext(state);
|
|
return baseState;
|
|
}
|
|
function closeStateErr(type, stream, state) {
|
|
setStyle = "error";
|
|
return closeState(type, stream, state);
|
|
}
|
|
|
|
function attrState(type, _stream, state) {
|
|
if (type == "word") {
|
|
setStyle = "attribute";
|
|
return attrEqState;
|
|
} else if (type == "endTag" || type == "selfcloseTag") {
|
|
var tagName = state.tagName, tagStart = state.tagStart;
|
|
state.tagName = state.tagStart = null;
|
|
if (type == "selfcloseTag" ||
|
|
config.autoSelfClosers.hasOwnProperty(tagName)) {
|
|
maybePopContext(state, tagName);
|
|
} else {
|
|
maybePopContext(state, tagName);
|
|
state.context = new Context(state, tagName, tagStart == state.indented);
|
|
}
|
|
return baseState;
|
|
}
|
|
setStyle = "error";
|
|
return attrState;
|
|
}
|
|
function attrEqState(type, stream, state) {
|
|
if (type == "equals") return attrValueState;
|
|
if (!config.allowMissing) setStyle = "error";
|
|
return attrState(type, stream, state);
|
|
}
|
|
function attrValueState(type, stream, state) {
|
|
if (type == "string") return attrContinuedState;
|
|
if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;}
|
|
setStyle = "error";
|
|
return attrState(type, stream, state);
|
|
}
|
|
function attrContinuedState(type, stream, state) {
|
|
if (type == "string") return attrContinuedState;
|
|
return attrState(type, stream, state);
|
|
}
|
|
|
|
return {
|
|
startState: function(baseIndent) {
|
|
var state = {tokenize: inText,
|
|
state: baseState,
|
|
indented: baseIndent || 0,
|
|
tagName: null, tagStart: null,
|
|
context: null}
|
|
if (baseIndent != null) state.baseIndent = baseIndent
|
|
return state
|
|
},
|
|
|
|
token: function(stream, state) {
|
|
if (!state.tagName && stream.sol())
|
|
state.indented = stream.indentation();
|
|
|
|
if (stream.eatSpace()) return null;
|
|
type = null;
|
|
var style = state.tokenize(stream, state);
|
|
if ((style || type) && style != "comment") {
|
|
setStyle = null;
|
|
state.state = state.state(type || style, stream, state);
|
|
if (setStyle)
|
|
style = setStyle == "error" ? style + " error" : setStyle;
|
|
}
|
|
return style;
|
|
},
|
|
|
|
indent: function(state, textAfter, fullLine) {
|
|
var context = state.context;
|
|
// Indent multi-line strings (e.g. css).
|
|
if (state.tokenize.isInAttribute) {
|
|
if (state.tagStart == state.indented)
|
|
return state.stringStartCol + 1;
|
|
else
|
|
return state.indented + indentUnit;
|
|
}
|
|
if (context && context.noIndent) return CodeMirror.Pass;
|
|
if (state.tokenize != inTag && state.tokenize != inText)
|
|
return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
|
|
// Indent the starts of attribute names.
|
|
if (state.tagName) {
|
|
if (config.multilineTagIndentPastTag !== false)
|
|
return state.tagStart + state.tagName.length + 2;
|
|
else
|
|
return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);
|
|
}
|
|
if (config.alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
|
|
var tagAfter = textAfter && /^<(\/)?([\w_:\.-]*)/.exec(textAfter);
|
|
if (tagAfter && tagAfter[1]) { // Closing tag spotted
|
|
while (context) {
|
|
if (context.tagName == tagAfter[2]) {
|
|
context = context.prev;
|
|
break;
|
|
} else if (config.implicitlyClosed.hasOwnProperty(context.tagName)) {
|
|
context = context.prev;
|
|
} else {
|
|
break;
|
|
}
|
|
}
|
|
} else if (tagAfter) { // Opening tag spotted
|
|
while (context) {
|
|
var grabbers = config.contextGrabbers[context.tagName];
|
|
if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))
|
|
context = context.prev;
|
|
else
|
|
break;
|
|
}
|
|
}
|
|
while (context && context.prev && !context.startOfLine)
|
|
context = context.prev;
|
|
if (context) return context.indent + indentUnit;
|
|
else return state.baseIndent || 0;
|
|
},
|
|
|
|
electricInput: /<\/[\s\w:]+>$/,
|
|
blockCommentStart: "<!--",
|
|
blockCommentEnd: "-->",
|
|
|
|
configuration: config.htmlMode ? "html" : "xml",
|
|
helperType: config.htmlMode ? "html" : "xml",
|
|
|
|
skipAttribute: function(state) {
|
|
if (state.state == attrValueState)
|
|
state.state = attrState
|
|
},
|
|
|
|
xmlCurrentTag: function(state) {
|
|
return state.tagName ? {name: state.tagName, close: state.type == "closeTag"} : null
|
|
},
|
|
|
|
xmlCurrentContext: function(state) {
|
|
var context = []
|
|
for (var cx = state.context; cx; cx = cx.prev)
|
|
if (cx.tagName) context.push(cx.tagName)
|
|
return context.reverse()
|
|
}
|
|
};
|
|
});
|
|
|
|
CodeMirror.defineMIME("text/xml", "xml");
|
|
CodeMirror.defineMIME("application/xml", "xml");
|
|
if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
|
|
CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});
|
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 2859:
|
|
/*!*******************************************************************!*\
|
|
!*** ./node_modules/_markerjs3@2.29.1@markerjs3/markerjs2.esm.js ***!
|
|
\*******************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ hP: function() { return /* binding */ K; }
|
|
/* harmony export */ });
|
|
/* unused harmony exports Activator, ArrowMarker, ArrowTypePanel, CalloutMarker, CaptionFrameMarker, ColorPickerPanel, CoverMarker, CurveMarker, EllipseFrameMarker, EllipseMarker, EventListenerRepository, FontFamilyPanel, FrameMarker, FreehandMarker, HighlightMarker, LineMarker, LineStylePanel, LineWidthPanel, LinearMarkerBase, MarkerAreaEvent, MarkerAreaRenderEvent, MarkerBase, MarkerEvent, MeasurementMarker, OpacityPanel, RectangleMarker, RectangularBoxMarkerBase, RectangularBoxMarkerGrips, ResizeGrip, Settings, Style, StyleClass, StyleManager, SvgHelper, TextMarker, ToolboxPanel, TransformMatrix */
|
|
/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */
|
|
var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};function e(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}function i(t,e,i,o){return new(i||(i=Promise))((function(s,r){function n(t){try{h(o.next(t))}catch(t){r(t)}}function a(t){try{h(o.throw(t))}catch(t){r(t)}}function h(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(n,a)}h((o=o.apply(t,e||[])).next())}))}function o(t,e){var i,o,s,r,n={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,o&&(s=2&r[0]?o.return:r[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;switch(o=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return n.label++,{value:r[1],done:!1};case 5:n.label++,o=r[1],r=[0];continue;case 7:r=n.ops.pop(),n.trys.pop();continue;default:if(!(s=n.trys,(s=s.length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){n=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){n.label=r[1];break}if(6===r[0]&&n.label<s[1]){n.label=s[1],s=r;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(r);break}s[2]&&n.ops.pop(),n.trys.pop();continue}r=e.call(t,n)}catch(t){r=[6,t],o=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}}function s(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var o=Array(t),s=0;for(e=0;e<i;e++)for(var r=arguments[e],n=0,a=r.length;n<a;n++,s++)o[s]=r[n];return o}var r=function(){function t(){}return t.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},t.setAttributes=function(t,e){for(var i=0,o=e;i<o.length;i++){var s=o[i],r=s[0],n=s[1];t.setAttribute(r,n)}},t.createRect=function(e,i,o){var s=document.createElementNS("http://www.w3.org/2000/svg","rect");return s.setAttribute("width",e.toString()),s.setAttribute("height",i.toString()),o&&t.setAttributes(s,o),s},t.createLine=function(e,i,o,s,r){var n=document.createElementNS("http://www.w3.org/2000/svg","line");return n.setAttribute("x1",e.toString()),n.setAttribute("y1",i.toString()),n.setAttribute("x2",o.toString()),n.setAttribute("y2",s.toString()),r&&t.setAttributes(n,r),n},t.createPolygon=function(e,i){var o=document.createElementNS("http://www.w3.org/2000/svg","polygon");return o.setAttribute("points",e),i&&t.setAttributes(o,i),o},t.createCircle=function(e,i){var o=document.createElementNS("http://www.w3.org/2000/svg","circle");return o.setAttribute("cx",(e/2).toString()),o.setAttribute("cy",(e/2).toString()),o.setAttribute("r",e.toString()),i&&t.setAttributes(o,i),o},t.createEllipse=function(e,i,o){var s=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return s.setAttribute("cx",(e/2).toString()),s.setAttribute("cy",(i/2).toString()),s.setAttribute("rx",(e/2).toString()),s.setAttribute("ry",(i/2).toString()),o&&t.setAttributes(s,o),s},t.createGroup=function(e){var i=document.createElementNS("http://www.w3.org/2000/svg","g");return e&&t.setAttributes(i,e),i},t.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},t.createMarker=function(e,i,o,s,r,n,a){var h=document.createElementNS("http://www.w3.org/2000/svg","marker");return t.setAttributes(h,[["id",e],["orient",i],["markerWidth",o.toString()],["markerHeight",s.toString()],["refX",r.toString()],["refY",n.toString()]]),h.appendChild(a),h},t.createText=function(e){var i=document.createElementNS("http://www.w3.org/2000/svg","text");return i.setAttribute("x","0"),i.setAttribute("y","0"),e&&t.setAttributes(i,e),i},t.createTSpan=function(e,i){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");return o.textContent=e,i&&t.setAttributes(o,i),o},t.createImage=function(e){var i=document.createElementNS("http://www.w3.org/2000/svg","image");return e&&t.setAttributes(i,e),i},t.createPoint=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return i.x=t,i.y=e,i},t.createPath=function(e,i){var o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",e),i&&t.setAttributes(o,i),o},t}(),n=function(){function t(){}return t.addKey=function(e){t.key=e},Object.defineProperty(t,"isLicensed",{get:function(){return!!t.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(t.key)},enumerable:!1,configurable:!0}),t}(),a=function(){function t(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return t.prototype.rasterize=function(t,e,i){var o=this;return new Promise((function(s){var r=void 0!==i?i:document.createElement("canvas");null===t&&(o.markersOnly=!0,o.naturalSize=!1);var n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("width",e.width.baseVal.valueAsString),n.setAttribute("height",e.height.baseVal.valueAsString),n.setAttribute("viewBox","0 0 "+e.viewBox.baseVal.width.toString()+" "+e.viewBox.baseVal.height.toString()),n.innerHTML=e.innerHTML,!0===o.naturalSize?(n.width.baseVal.value=t.naturalWidth,n.height.baseVal.value=t.naturalHeight):void 0!==o.width&&void 0!==o.height&&(n.width.baseVal.value=o.width,n.height.baseVal.value=o.height),r.width=n.width.baseVal.value,r.height=n.height.baseVal.value;var a=n.outerHTML,h=r.getContext("2d");!0!==o.markersOnly&&h.drawImage(t,0,0,r.width,r.height);var l=window.URL,p=new Image(r.width,r.height);p.setAttribute("crossOrigin","anonymous");var c=new Blob([a],{type:"image/svg+xml"}),d=l.createObjectURL(c);p.onload=function(){h.drawImage(p,0,0),l.revokeObjectURL(d);var t=r.toDataURL(o.imageType,o.imageQuality);s(t)},p.src=d}))},t}(),h=function(){},l=function(){function t(t){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+t+"_"}return Object.defineProperty(t.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),t.prototype.addClass=function(t){return void 0===this.styleSheet&&this.addStyleSheet(),t.name=""+this.classNamePrefix+t.localName,this.classes.push(t),this.styleSheet.sheet.insertRule("."+t.name+" {"+t.style+"}",this.styleSheet.sheet.cssRules.length),t},t.prototype.addRule=function(t){void 0===this.styleSheet&&this.addStyleSheet(),this.rules.push(t),this.styleSheet.sheet.insertRule(t.selector+" {"+t.style+"}",this.styleSheet.sheet.cssRules.length)},t.prototype.addStyleSheet=function(){var t;this.styleSheet=document.createElement("style"),(null!==(t=this.styleSheetRoot)&&void 0!==t?t:document.head).appendChild(this.styleSheet),this.addRule(new p("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new p("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames","\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n ")),this.addRule(new p("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames","\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n ")),this.addClass(new c("fade_in","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_in_animation_frames;\n ")),this.addClass(new c("fade_out","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_out_animation_frames;\n "))},t.prototype.removeStyleSheet=function(){var t;this.styleSheet&&((null!==(t=this.styleSheetRoot)&&void 0!==t?t:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},t}(),p=function(t,e){this.selector=t,this.style=e},c=function(t,e){this.localName=t,this.style=e},d=function(){function t(t,e,i,o,s){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=t,this.displayMode=e,this.markerItems=i,this.uiStyleSettings=o,this.styles=s,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return t.prototype.show=function(t){var e=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var i=document.createElement("div");i.className=this.toolbarBlockStyleClass.name,i.style.whiteSpace="nowrap",this.uiContainer.appendChild(i),this.addActionButton(i,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(i,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(i,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(i,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(i,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(i,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(i,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(i,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach((function(t){var i=document.createElement("div");i.className=""+e.toolbarButtonStyleClass.name,i.setAttribute("data-type-name",t.typeName),i.innerHTML=t.icon,i.addEventListener("click",(function(){e.markerToolbarButtonClicked(i,t)})),e.buttons.push(i),e.markerButtons.push(i)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var o=document.createElement("div");o.className=this.toolbarBlockStyleClass.name,o.style.whiteSpace="nowrap",o.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(o),this.addActionButton(o,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(o,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},t.prototype.addButtonClickListener=function(t){this.buttonClickListeners.push(t)},t.prototype.removeButtonClickListener=function(t){this.buttonClickListeners.indexOf(t)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(t),1)},t.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},t.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var t=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var e=0;e<this.markerButtons.length;e++)e<t||e===t&&this.markerButtons.length-1===t?this.markerButtonBlock.appendChild(this.markerButtons[e]):(e===t&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[e]))}},t.prototype.overflowButtonClicked=function(){"none"!==this.markerButtonOverflowBlock.style.display?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},t.prototype.resetButtonStyles=function(){var t=this;this.buttons.forEach((function(e){e.className=e.className.replace(t.uiStyleSettings.toolbarButtonStyleColorsClassName?t.uiStyleSettings.toolbarButtonStyleColorsClassName:t.toolbarButtonStyleColorsClass.name,"").trim(),e.className=e.className.replace(t.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?t.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:t.toolbarActiveButtonStyleColorsClass.name,"").trim(),e.className+=" "+(t.uiStyleSettings.toolbarButtonStyleColorsClassName?t.uiStyleSettings.toolbarButtonStyleColorsClassName:t.toolbarButtonStyleColorsClass.name)}))},t.prototype.addActionButton=function(t,e,i){var o=this,s=document.createElement("div");switch(s.className=""+this.toolbarButtonStyleClass.name,s.innerHTML=e,s.setAttribute("data-action",i),s.addEventListener("click",(function(){o.actionToolbarButtonClicked(s,i)})),i){case"select":s.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":s.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":s.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":s.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":s.style.fill=this.uiStyleSettings.closeButtonColor}t.appendChild(s),this.buttons.push(s)},t.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new c("toolbar","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.uiStyleSettings.toolbarHeight+"px;\n box-sizing: content-box;\n "+("inline"===this.displayMode?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new c("toolbar_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n box-shadow: 0px 3px rgba(33, 33, 33, 0.1);\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new c("toolbar-block","\n display: inline-block;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new c("toolbar-overflow-block","\n position: absolute;\n top: "+this.uiStyleSettings.toolbarHeight+"px;\n max-width: "+2*this.uiStyleSettings.toolbarHeight+"px;\n z-index: 10;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new c("toolbar-overflow-block_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n "));var t=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new c("toolbar_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new c("toolbar_button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new c("toolbar_active_button","\n fill: "+this.uiStyleSettings.toolbarColor+";\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new p("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n ")),this.styles.addRule(new p("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n "))},t.prototype.markerToolbarButtonClicked=function(t,e){this.setActiveButton(t),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(t){return t("marker",e)})),this.markerButtonOverflowBlock.style.display="none"},t.prototype.actionToolbarButtonClicked=function(t,e){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(t){return t("action",e)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},t.prototype.setActiveButton=function(t){this.resetButtonStyles(),t.className=t.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),t.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},t.prototype.setActiveMarkerButton=function(t){var e=this.markerButtons.find((function(e){return e.getAttribute("data-type-name")===t}));e&&this.setActiveButton(e)},t.prototype.setCurrentMarker=function(t){var e=this;this.currentMarker=t,this.buttons.filter((function(t){return/delete|notes/.test(t.getAttribute("data-action"))})).forEach((function(t){void 0===e.currentMarker?(t.style.fillOpacity="0.4",t.style.pointerEvents="none"):(t.style.fillOpacity="1",t.style.pointerEvents="all")}))},t}(),u=function(){function t(t,e,i,o){this.panels=[],this.panelButtons=[],this.markerjsContainer=t,this.displayMode=e,this.uiStyleSettings=i,this.styles=o,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return t.prototype.addStyles=function(){var t;this.toolboxStyleClass=this.styles.addClass(new c("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new c("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new c("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new c("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new c("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new c("toolbox-panel-row_colors","\n background-color: "+(null!==(t=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==t?t:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new c("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new c("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new c("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new p("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new p("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},t.prototype.show=function(t){var e;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==e?e:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},t.prototype.setPanelButtons=function(t){var e,i,o=this;this.panels=t,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==e?e:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(i=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==i?i:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(t){var e;t.uiStyleSettings=o.uiStyleSettings;var i=document.createElement("div");i.className=o.toolboxButtonStyleClass.name+" "+(null!==(e=o.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==e?e:o.toolboxButtonStyleColorsClass.name),i.innerHTML=t.icon,i.title=t.title,i.addEventListener("click",(function(){o.panelButtonClick(t)})),o.panelButtons.push(i),o.buttonRow.appendChild(i)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},t.prototype.panelButtonClick=function(t){var e=this,i=-1;if(t!==this.activePanel){i=this.panels.indexOf(t),this.panelRow.innerHTML="";var o=t.getUi();o.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(o),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=t}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===e.displayMode?e.panelRow.style.display="none":e.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(t,o){var s,r;t.className=e.toolboxButtonStyleClass.name+" "+(o===i?""+(null!==(s=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==s?s:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(r=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==r?r:e.toolboxButtonStyleColorsClass.name))}))},t}(),y=function(t,e){this.title=t,this.icon=e},g=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return r.colors=[],r.addTransparent=!1,r.colorBoxes=[],r.colors=i,r.currentColor=o,r.setCurrentColor=r.setCurrentColor.bind(r),r.getColorBox=r.getColorBox.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.whiteSpace="nowrap",this.colors.forEach((function(i){var o=t.getColorBox(i);e.appendChild(o),t.colorBoxes.push(o)})),e},i.prototype.getColorBox=function(t){var e=this,i=this.uiStyleSettings.toolbarHeight/4,o=this.uiStyleSettings.toolbarHeight-i,s=document.createElement("div");s.style.display="inline-block",s.style.boxSizing="content-box",s.style.width=o-2+"px",s.style.height=o-2+"px",s.style.padding="1px",s.style.marginRight="2px",s.style.marginBottom="2px",s.style.borderWidth="2px",s.style.borderStyle="solid",s.style.borderRadius=(o+2)/2+"px",s.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",s.addEventListener("click",(function(){e.setCurrentColor(t,s)}));var r=document.createElement("div");return r.style.display="inline-block",r.style.width=o-2+"px",r.style.height=o-2+"px",r.style.backgroundColor=t,r.style.borderRadius=o/2+"px","transparent"===t&&(r.style.fill=this.uiStyleSettings.toolboxAccentColor,r.innerHTML='<svg viewBox="0 0 24 24">\n <path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />\n </svg>'),s.appendChild(r),s},i.prototype.setCurrentColor=function(t,e){var i=this;this.currentColor=t,this.colorBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(t)},i}(y),f=function(){function t(t,e,i){this._state="new",this._isSelected=!1,this._container=t,this._overlayContainer=e,this.globalSettings=i,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(t.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!1},Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},t.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},t.prototype.pointerDown=function(t,e){},t.prototype.dblClick=function(t,e){},t.prototype.manipulate=function(t){},t.prototype.pointerUp=function(t){this.stateChanged()},t.prototype.dispose=function(){},t.prototype.addMarkerVisualToContainer=function(t){this.container.childNodes.length>0?this.container.insertBefore(t,this.container.childNodes[0]):this.container.appendChild(t)},t.prototype.getState=function(){return{typeName:t.typeName,state:this.state,notes:this.notes}},t.prototype.restoreState=function(t){this._state=t.state,this.notes=t.notes},t.prototype.scale=function(t,e){},t.prototype.colorChanged=function(t){this.onColorChanged&&this.onColorChanged(t),this.stateChanged()},t.prototype.fillColorChanged=function(t){this.onFillColorChanged&&this.onFillColorChanged(t),this.stateChanged()},t.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var t=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),t.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(t)&&this.onStateChanged(this)}},t.typeName="MarkerBase",t}(),v=function(){function t(){this.findGripByVisual=this.findGripByVisual.bind(this)}return t.prototype.findGripByVisual=function(t){return this.topLeft.ownsTarget(t)?this.topLeft:this.topCenter.ownsTarget(t)?this.topCenter:this.topRight.ownsTarget(t)?this.topRight:this.centerLeft.ownsTarget(t)?this.centerLeft:this.centerRight.ownsTarget(t)?this.centerRight:this.bottomLeft.ownsTarget(t)?this.bottomLeft:this.bottomCenter.ownsTarget(t)?this.bottomCenter:this.bottomRight.ownsTarget(t)?this.bottomRight:void 0},t}(),m=function(){function t(){this.GRIP_SIZE=10,this.visual=r.createGroup(),this.visual.appendChild(r.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(r.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t}(),C=function(){function t(){}return t.toITransformMatrix=function(t){return{a:t.a,b:t.b,c:t.c,d:t.d,e:t.e,f:t.f}},t.toSVGMatrix=function(t,e){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t},t}(),b=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.left=0,s.top=0,s.width=0,s.height=0,s.defaultSize={x:50,y:20},s.offsetX=0,s.offsetY=0,s.rotationAngle=0,s.CB_DISTANCE=10,s._suppressMarkerCreateEvent=!1,s.container.transform.baseVal.appendItem(r.createTransform()),s.setupControlBox(),s}return e(i,t),Object.defineProperty(i.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var e=r.createTransform();this._visual.transform.baseVal.appendItem(e)},enumerable:!1,configurable:!0}),i.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!!(void 0!==this.controlGrips.findGripByVisual(e)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(e))},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(this.left=e.x,this.top=e.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var o=this.unrotatePoint(e);if(this.manipulationStartX=o.x,this.manipulationStartY=o.y,this.offsetX=o.x-this.left,this.offsetY=o.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(i),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(i)){this.activeGrip=this.rotatorGrip;var s=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=s.x-this.width/2,this.top=s.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var r=this.container.transform.baseVal.getItem(0);r.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(r,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},i.prototype.pointerUp=function(e){var i=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(e),this._state="select","creating"===i&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},i.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},i.prototype.manipulate=function(t){var e=this.unrotatePoint(t);"creating"===this.state?this.resize(t):"move"===this.state?(this.left=this.manipulationStartLeft+(e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(e):"rotate"===this.state&&this.rotate(t)},i.prototype.resize=function(t){var e=this.manipulationStartLeft,i=this.manipulationStartWidth,o=this.manipulationStartTop,s=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:e=this.manipulationStartLeft+t.x-this.manipulationStartX,i=this.manipulationStartWidth+this.manipulationStartLeft-e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:i=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:o=this.manipulationStartTop+t.y-this.manipulationStartY,s=this.manipulationStartHeight+this.manipulationStartTop-o;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:s=this.manipulationStartHeight+t.y-this.manipulationStartY}i>=0?(this.left=e,this.width=i):(this.left=e+i,this.width=-i),s>=0?(this.top=o,this.height=s):(this.top=o+s,this.height=-s),this.setSize()},i.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},i.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var e=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*e,this.applyRotation()}},i.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},i.prototype.rotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM(),i=r.createPoint(t.x,t.y);return{x:(i=i.matrixTransform(e)).x,y:i.y}},i.prototype.unrotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM();e=e.inverse();var i=r.createPoint(t.x,t.y);return{x:(i=i.matrixTransform(e)).x,y:i.y}},i.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},i.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},i.prototype.setupControlBox=function(){this.controlBox=r.createGroup();var t=r.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=r.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=r.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new v,this.addControlGrips(),this.controlBox.style.display="none"},i.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},i.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},i.prototype.createGrip=function(){var t=new m;return t.visual.transform.baseVal.appendItem(r.createTransform()),this.controlBox.appendChild(t.visual),t},i.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,e=-t/2,i=e,o=(this.width+this.CB_DISTANCE)/2-t/2,s=(this.height+this.CB_DISTANCE)/2-t/2,r=this.height+this.CB_DISTANCE-t/2,n=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,e,i),this.positionGrip(this.controlGrips.topCenter.visual,o,i),this.positionGrip(this.controlGrips.topRight.visual,n,i),this.positionGrip(this.controlGrips.centerLeft.visual,e,s),this.positionGrip(this.controlGrips.centerRight.visual,n,s),this.positionGrip(this.controlGrips.bottomLeft.visual,e,r),this.positionGrip(this.controlGrips.bottomCenter.visual,o,r),this.positionGrip(this.controlGrips.bottomRight.visual,n,r),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,o,i-3*this.CB_DISTANCE)},i.prototype.positionGrip=function(t,e,i){var o=t.transform.baseVal.getItem(0);o.setTranslate(e,i),t.transform.baseVal.replaceItem(o,0)},i.prototype.hideControlBox=function(){this.controlBox.style.display="none"},i.prototype.showControlBox=function(){this.controlBox.style.display=""},i.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:C.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:C.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},t.prototype.getState.call(this))},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.left=i.left,this.top=i.top,this.width=i.width,this.height=i.height,this.rotationAngle=i.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(C.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,i.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(C.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,i.containerTransformMatrix))},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i);var o=this.rotatePoint({x:this.left,y:this.top}),s=this.unrotatePoint({x:o.x*e,y:o.y*i});this.left=s.x,this.top=s.y,this.width=this.width*e,this.height=this.height*i,this.adjustControlBox()},i}(f),S=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.fillColor="transparent",s.strokeColor="transparent",s.strokeWidth=0,s.strokeDasharray="",s.opacity=1,s.setStrokeColor=s.setStrokeColor.bind(s),s.setFillColor=s.setFillColor.bind(s),s.setStrokeWidth=s.setStrokeWidth.bind(s),s.setStrokeDasharray=s.setStrokeDasharray.bind(s),s.createVisual=s.createVisual.bind(s),s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},i.prototype.createVisual=function(){this.visual=r.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},i.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e)},i.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},i.prototype.setSize=function(){t.prototype.setSize.call(this),r.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},i.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&r.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},i.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&r.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&r.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&r.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},i.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this))},i.prototype.restoreState=function(e){var i=e;this.fillColor=i.fillColor,this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.opacity=i.opacity,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setSize()},i.title="Rectangle marker",i}(b),x=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return r.widths=[],r.widthBoxes=[],r.widths=i,r.currentWidth=o,r.setCurrentWidth=r.setCurrentWidth.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.widths.forEach((function(i){var o=document.createElement("div");o.style.display="flex",o.style.flexGrow="2",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=i===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentWidth(i,o)})),e.appendChild(o);var s=document.createElement("div");s.innerText=i.toString(),s.style.marginRight="5px",o.appendChild(s);var r=document.createElement("div");r.style.minHeight="20px",r.style.flexGrow="2",r.style.display="flex",r.style.alignItems="center";var n=document.createElement("hr");n.style.minWidth="20px",n.style.border="0px",n.style.borderTop=i+"px solid "+t.uiStyleSettings.toolboxColor,n.style.flexGrow="2",r.appendChild(n),o.appendChild(r),t.widthBoxes.push(o)})),e},i.prototype.setCurrentWidth=function(t,e){var i=this;this.currentWidth=t,this.widthBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},i}(y),k=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return r.styles=[],r.styleBoxes=[],r.styles=i,r.currentStyle=o,r.setCurrentStyle=r.setCurrentStyle.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.styles.forEach((function(i){var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.overflow="hidden",o.style.maxWidth=100/t.styles.length-5+"%",o.style.borderColor=i===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentStyle(i,o)})),e.appendChild(o);var s=document.createElement("div");s.style.minHeight="20px",s.style.flexGrow="2",s.style.overflow="hidden";var r='<svg width="100" height="20">\n <line x1="0" y1="10" x2="100" y2="10" stroke="'+t.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(""!==i?'stroke-dasharray="'+i+'"':"")+" />\n </svg>";s.innerHTML=r,o.appendChild(s),t.styleBoxes.push(o)})),e},i.prototype.setCurrentStyle=function(t,e){var i=this;this.currentStyle=t,this.styleBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},i}(y),w=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.strokeColor=o.defaultColor,s.strokeWidth=o.defaultStrokeWidth,s.strokeDasharray=o.defaultStrokeDasharray,s.strokePanel=new g("Line color",o.defaultColorSet,o.defaultColor),s.strokePanel.onColorChanged=s.setStrokeColor,s.strokeWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),s.strokeWidthPanel.onWidthChanged=s.setStrokeWidth,s.strokeStylePanel=new k("Line style",o.defaultStrokeDasharrays,o.defaultStrokeDasharray),s.strokeStylePanel.onStyleChanged=s.setStrokeDasharray,s}return e(i,t),Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.typeName="FrameMarker",i.title="Frame marker",i.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',i}(S),B=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},E=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.x1=0,s.y1=0,s.x2=0,s.y2=0,s.defaultLength=50,s.manipulationStartX=0,s.manipulationStartY=0,s.manipulationStartX1=0,s.manipulationStartY1=0,s.manipulationStartX2=0,s.manipulationStartY2=0,s.setupControlBox(),s}return e(i,t),i.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!(!this.grip1.ownsTarget(e)&&!this.grip2.ownsTarget(e))},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.manipulationStartX=e.x,this.manipulationStartY=e.y,"new"===this.state&&(this.x1=e.x,this.y1=e.y,this.x2=e.x,this.y2=e.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(i)?this.activeGrip=this.grip1:this.grip2.ownsTarget(i)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},i.prototype.pointerUp=function(e){var i=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(e),this._state="select","creating"===i&&this.onMarkerCreated&&this.onMarkerCreated(this)},i.prototype.adjustVisual=function(){},i.prototype.manipulate=function(t){"creating"===this.state?this.resize(t):"move"===this.state?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(t)},i.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},i.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},i.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},i.prototype.setupControlBox=function(){this.controlBox=r.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},i.prototype.adjustControlBox=function(){this.positionGrips()},i.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},i.prototype.createGrip=function(){var t=new m;return t.visual.transform.baseVal.appendItem(r.createTransform()),this.controlBox.appendChild(t.visual),t},i.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},i.prototype.positionGrip=function(t,e,i){var o=t.transform.baseVal.getItem(0);o.setTranslate(e,i),t.transform.baseVal.replaceItem(o,0)},i.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},t.prototype.getState.call(this))},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.x1=i.x1,this.y1=i.y1,this.x2=i.x2,this.y2=i.y2},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.x1=this.x1*e,this.y1=this.y1*i,this.x2=this.x2*e,this.y2=this.y2*i,this.adjustVisual(),this.adjustControlBox()},i}(f),M=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.strokeColor="transparent",s.strokeWidth=0,s.strokeDasharray="",s.setStrokeColor=s.setStrokeColor.bind(s),s.setStrokeWidth=s.setStrokeWidth.bind(s),s.setStrokeDasharray=s.setStrokeDasharray.bind(s),s.strokeColor=o.defaultColor,s.strokeWidth=o.defaultStrokeWidth,s.strokeDasharray=o.defaultStrokeDasharray,s.strokePanel=new g("Line color",o.defaultColorSet,o.defaultColor),s.strokePanel.onColorChanged=s.setStrokeColor,s.strokeWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),s.strokeWidthPanel.onWidthChanged=s.setStrokeWidth,s.strokeStylePanel=new k("Line style",o.defaultStrokeDasharrays,o.defaultStrokeDasharray),s.strokeStylePanel.onStyleChanged=s.setStrokeDasharray,s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorLine&&e!==this.visibleLine)},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.selectorLine=r.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=r.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},i.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),r.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),r.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),r.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.createVisual(),this.adjustVisual()},i.typeName="LineMarker",i.title="Line marker",i.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',i}(E),T=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return r.fonts=[],r.fontBoxes=[],r.fonts=i,r.currentFont=o,r.setCurrentFont=r.setCurrentFont.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.flexGrow="2",this.fonts.forEach((function(i){var o=document.createElement("div");o.style.display="inline-block",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.overflow="hidden",o.style.maxWidth=100/t.fonts.length-5+"%",o.style.borderColor=i===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentFont(i,o)})),e.appendChild(o);var s=document.createElement("div");s.style.display="flex",s.style.minHeight="20px",s.style.flexGrow="2",s.style.fontFamily=i,s.style.overflow="hidden";var r=document.createElement("div");r.style.whiteSpace="nowrap",r.style.overflow="hidden",r.style.textOverflow="ellipsis",r.innerHTML="The quick brown fox jumps over the lazy dog",s.appendChild(r),o.appendChild(s),t.fontBoxes.push(o)})),e},i.prototype.setCurrentFont=function(t,e){var i=this;this.currentFont=t,this.fontBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},i}(y),P=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.color="transparent",s.padding=5,s.DEFAULT_TEXT="请输入文本",s.text=s.DEFAULT_TEXT,s.isMoved=!1,s.color=o.defaultColor,s.fontFamily=o.defaultFontFamily,s.defaultSize={x:100,y:30},s.setColor=s.setColor.bind(s),s.setFont=s.setFont.bind(s),s.renderText=s.renderText.bind(s),s.sizeText=s.sizeText.bind(s),s.textEditDivClicked=s.textEditDivClicked.bind(s),s.showTextEditor=s.showTextEditor.bind(s),s.setSize=s.setSize.bind(s),s.positionTextEditor=s.positionTextEditor.bind(s),s.colorPanel=new g("Color",o.defaultColorSet,o.defaultColor),s.colorPanel.onColorChanged=s.setColor,s.fontFamilyPanel=new T("Font",o.defaultFontFamilies,o.defaultFontFamily),s.fontFamilyPanel.onFontChanged=s.setFont,s}return e(i,t),i.prototype.ownsTarget=function(e){if(t.prototype.ownsTarget.call(this,e)||e===this.visual||e===this.textElement||e===this.bgRectangle)return!0;var i=!1;return this.textElement.childNodes.forEach((function(t){t===e&&(i=!0)})),i},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.bgRectangle=r.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=r.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(r.createTransform()),this.textElement.transform.baseVal.appendItem(r.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},i.prototype.renderText=function(){var t=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(e){t.textElement.appendChild(r.createTSpan(""===e.trim()?" ":e.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},i.prototype.getTextScale=function(){var t=this.textElement.getBBox(),e=1;if(t.width>0&&t.height>0){var i=(1*this.width-this.width*this.padding*2/100)/t.width,o=(1*this.height-this.height*this.padding*2/100)/t.height;e=Math.min(i,o)}return e},i.prototype.getTextPosition=function(t){var e=this.textElement.getBBox(),i=0,o=0;return e.width>0&&e.height>0&&(i=(this.width-e.width*t)/2,o=this.height/2-e.height*t/2),{x:i,y:o}},i.prototype.sizeText=function(){var t=this.textElement.getBBox(),e=this.getTextScale(),i=this.getTextPosition(e);i.y-=t.y*e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+i.x+"px, "+i.y+"px) scale("+e+", "+e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(i.x,i.y),this.textElement.transform.baseVal.getItem(1).setScale(e,e))},i.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},i.prototype.resize=function(e){t.prototype.resize.call(this,e),this.isMoved=!0,this.setSize(),this.sizeText()},i.prototype.setSize=function(){t.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(r.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),r.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},i.prototype.pointerUp=function(e){var i=this.state;"creating"===i&&(this._suppressMarkerCreateEvent=!0),t.prototype.pointerUp.call(this,e),this.setSize(),("creating"===i||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},i.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(t){t.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var e=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&e>.9;)e-=.1,t.textEditor.style.fontSize=Math.max(e,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(t){if(t.clipboardData){var e=t.clipboardData.getData("text"),i=window.getSelection();if(!i.rangeCount)return!1;i.deleteFromDocument(),i.getRangeAt(0).insertNode(document.createTextNode(e)),t.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){t.textEditDivClicked(t.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},i.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var t=this.getTextScale(),e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),i=this.textElement.getBBox(),o={x:i.width*t,y:i.height*t};e.x-=o.x/2,e.y-=o.y/2,this.textEditor.style.top=e.y+"px",this.textEditor.style.left=e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-e.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},i.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},i.prototype.select=function(){t.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},i.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),t.prototype.deselect.call(this)},i.prototype.dblClick=function(e,i){t.prototype.dblClick.call(this,e,i),this.showTextEditor()},i.prototype.setColor=function(t){this.textElement&&r.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},i.prototype.setFont=function(t){this.textElement&&r.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},i.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},i.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){var i=e;this.color=i.color,this.fontFamily=i.fontFamily,this.padding=i.padding,this.text=i.text,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setSize(),this.sizeText(),this.positionTextEditor()},i.typeName="TextMarker",i.title="Text marker",i.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',i}(b),L=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.color="transparent",s.lineWidth=3,s.drawing=!1,s.pixelRatio=1,s.color=o.defaultColor,s.lineWidth=o.defaultStrokeWidth,s.pixelRatio=o.freehandPixelRatio,s.setColor=s.setColor.bind(s),s.addCanvas=s.addCanvas.bind(s),s.finishCreation=s.finishCreation.bind(s),s.setLineWidth=s.setLineWidth.bind(s),s.colorPanel=new g("Color",o.defaultColorSet,o.defaultColor),s.colorPanel.onColorChanged=s.setColor,s.lineWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),s.lineWidthPanel.onWidthChanged=s.setLineWidth,s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.drawingImage)},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.drawingImage=r.createImage(),this.visual.appendChild(this.drawingImage);var t=r.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(e,i){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(e.x,e.y),this.drawing=!0):t.prototype.pointerDown.call(this,e,i)},i.prototype.manipulate=function(e){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(e.x,e.y),this.canvasContext.stroke()):t.prototype.manipulate.call(this,e)},i.prototype.resize=function(e){t.prototype.resize.call(this,e),r.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),r.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},i.prototype.pointerUp=function(e){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):t.prototype.pointerUp.call(this,e)},i.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},i.prototype.select=function(){"creating"===this.state&&this.finishCreation(),t.prototype.select.call(this)},i.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),t.prototype.deselect.call(this)},i.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],i=e[0],o=e[1],s=e[2],r=e[3],n=!1,a=0;a<this.canvasElement.height;a++)for(var h=0;h<this.canvasElement.width;h++){t.data[a*this.canvasElement.width*4+4*h+3]>0&&(n=!0,a<o&&(o=a),h<i&&(i=h),a>r&&(r=a),h>s&&(s=h))}if(n){this.left=i/this.pixelRatio,this.top=o/this.pixelRatio,this.width=(s-i)/this.pixelRatio,this.height=(r-o)/this.pixelRatio;var l=document.createElement("canvas");l.width=s-i,l.height=r-o,l.getContext("2d").putImageData(this.canvasContext.getImageData(i,o,s-i,r-o),0,0),this.drawingImgUrl=l.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},i.prototype.setDrawingImage=function(){r.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),r.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},i.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},i.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({drawingImgUrl:this.drawingImgUrl},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){this.createVisual(),t.prototype.restoreState.call(this,e),this.drawingImgUrl=e.drawingImgUrl,this.setDrawingImage()},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setDrawingImage()},i.typeName="FreehandMarker",i.title="Freehand marker",i.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',i}(b),D=function(t){function i(e,i,o){var s=t.call(this,e,o||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return s.typeBoxes=[],s.currentType=i,s.setCurrentType=s.setCurrentType.bind(s),s}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2";for(var i=function(i){var s="both";switch(i){case 0:s="both";break;case 1:s="start";break;case 2:s="end";break;case 3:s="none"}var r=document.createElement("div");if(r.style.display="flex",r.style.flexGrow="2",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=s===o.currentType?o.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentType(s,r)})),e.appendChild(r),"both"===s||"start"===s){var n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.minHeight="20px",n.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,5 10,0 10,10" fill="'+(void 0!==o.uiStyleSettings?o.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',n.style.marginLeft="5px",r.appendChild(n)}var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.style.flexGrow="2";var h=document.createElement("hr");if(h.style.minWidth="20px",h.style.border="0px",h.style.borderTop="3px solid "+(void 0!==o.uiStyleSettings?o.uiStyleSettings.toolboxColor:"#eeeeee"),h.style.flexGrow="2",a.appendChild(h),r.appendChild(a),"both"===s||"end"===s){var l=document.createElement("div");l.style.display="flex",l.style.alignItems="center",l.style.minHeight="20px",l.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,0 10,5 0,10" fill="'+(void 0!==o.uiStyleSettings?o.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',l.style.marginRight="5px",r.appendChild(l)}o.typeBoxes.push(r)},o=this,s=0;s<4;s++)i(s);return e},i.prototype.setCurrentType=function(t,e){var i=this;this.currentType=t,this.typeBoxes.forEach((function(t){t.style.borderColor=t===e?void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},i}(y),A=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.arrowType="end",s.arrowBaseHeight=10,s.arrowBaseWidth=10,s.getArrowPoints=s.getArrowPoints.bind(s),s.setArrowType=s.setArrowType.bind(s),s.arrowTypePanel=new D("Arrow type","end"),s.arrowTypePanel.onArrowTypeChanged=s.setArrowType,s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.arrow1&&e!==this.arrow2)},i.prototype.getArrowPoints=function(t,e){var i=this.arrowBaseWidth+2*this.strokeWidth,o=this.arrowBaseHeight+2*this.strokeWidth;return t-i/2+","+(e+o/2)+" "+t+","+(e-o/2)+" "+(t+i/2)+","+(e+o/2)},i.prototype.createTips=function(){this.arrow1=r.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(r.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=r.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(r.createTransform()),this.visual.appendChild(this.arrow2)},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"creating"===this.state&&this.createTips()},i.prototype.adjustVisual=function(){if(t.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",r.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),r.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var e=0;Math.abs(this.x1-this.x2)>.1&&(e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var i=this.arrow1.transform.baseVal.getItem(0);i.setRotate(e,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(i,0);var o=this.arrow2.transform.baseVal.getItem(0);o.setRotate(e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(o,0)}},i.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({arrowType:this.arrowType},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.arrowType=i.arrowType,this.createTips(),this.adjustVisual()},i.typeName="ArrowMarker",i.title="Arrow marker",i.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',i}(M),_=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.fillColor=o.defaultFillColor,s.strokeWidth=0,s.fillPanel=new g("Color",o.defaultColorSet,o.defaultFillColor),s.fillPanel.onColorChanged=s.setFillColor,s}return e(i,t),Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.typeName="CoverMarker",i.title="Cover marker",i.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',i}(S),I=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return r.opacities=[],r.opacityBoxes=[],r.opacities=i,r.currentOpacity=o,r.setCurrentOpacity=r.setCurrentOpacity.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",e.style.justifyContent="space-between",this.opacities.forEach((function(i){var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.justifyContent="center",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=i===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentOpacity(i,o)})),e.appendChild(o);var s=document.createElement("div");s.innerText=100*i+"%",o.appendChild(s),t.opacityBoxes.push(o)})),e},i.prototype.setCurrentOpacity=function(t,e){var i=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},i}(y),W=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.setOpacity=s.setOpacity.bind(s),s.fillColor=o.defaultHighlightColor,s.strokeWidth=0,s.opacity=o.defaultHighlightOpacity,s.fillPanel=new g("Color",o.defaultColorSet,s.fillColor),s.fillPanel.onColorChanged=s.setFillColor,s.opacityPanel=new I("Opacity",o.defaultOpacitySteps,s.opacity),s.opacityPanel.onOpacityChanged=s.setOpacity,s}return e(i,t),i.prototype.setOpacity=function(t){this.opacity=t,this.visual&&r.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.typeName="HighlightMarker",i.title="Highlight marker",i.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',i}(_),N='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',H='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',z=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.bgColor="transparent",s.tipPosition={x:0,y:0},s.tipBase1Position={x:0,y:0},s.tipBase2Position={x:0,y:0},s.tipMoving=!1,s.color=o.defaultStrokeColor,s.bgColor=o.defaultFillColor,s.fontFamily=o.defaultFontFamily,s.defaultSize={x:100,y:30},s.setBgColor=s.setBgColor.bind(s),s.getTipPoints=s.getTipPoints.bind(s),s.positionTip=s.positionTip.bind(s),s.setTipPoints=s.setTipPoints.bind(s),s.colorPanel=new g("Text color",o.defaultColorSet,s.color,N),s.colorPanel.onColorChanged=s.setColor,s.bgColorPanel=new g("Fill color",o.defaultColorSet,s.bgColor,H),s.bgColorPanel.onColorChanged=s.setBgColor,s.fontFamilyPanel=new T("Font",o.defaultFontFamilies,o.defaultFontFamily),s.fontFamilyPanel.onFontChanged=s.setFont,s.tipGrip=new m,s.tipGrip.visual.transform.baseVal.appendItem(r.createTransform()),s.controlBox.appendChild(s.tipGrip.visual),s}return e(i,t),i.prototype.ownsTarget=function(e){return t.prototype.ownsTarget.call(this,e)||this.tipGrip.ownsTarget(e)||this.tip===e},i.prototype.createTip=function(){r.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=r.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},i.prototype.pointerDown=function(e,i){"new"===this.state&&t.prototype.pointerDown.call(this,e,i),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(i)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):t.prototype.pointerDown.call(this,e,i)},i.prototype.pointerUp=function(e){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,t.prototype.pointerUp.call(this,e);else{var i="creating"===this.state;t.prototype.pointerUp.call(this,e),this.setTipPoints(i),this.positionTip()}},i.prototype.manipulate=function(e){if(this.tipMoving){var i=this.unrotatePoint(e);this.tipPosition={x:i.x-this.manipulationStartLeft,y:i.y-this.manipulationStartTop},this.positionTip()}else t.prototype.manipulate.call(this,e)},i.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(r.setAttributes(this.bgRectangle,[["fill",t]]),r.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},i.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},i.prototype.setTipPoints=function(t){void 0===t&&(t=!1);var e=Math.min(this.height/2,15),i=this.height/5;t&&(this.tipPosition={x:e+i/2,y:this.height+20});var o=Math.atan(this.height/2/(this.width/2));if(this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2)o<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(i=this.width/5,e=Math.min(this.width/2,15),this.tipBase1Position={x:e,y:0},this.tipBase2Position={x:e+i,y:0}):(this.tipBase1Position={x:0,y:e},this.tipBase2Position={x:0,y:e+i});else if(this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2){o<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(i=this.width/5,e=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-e-i,y:0},this.tipBase2Position={x:this.width-e,y:0}):(this.tipBase1Position={x:this.width,y:e},this.tipBase2Position={x:this.width,y:e+i})}else if(this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2){o<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(i=this.width/5,e=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-e-i,y:this.height},this.tipBase2Position={x:this.width-e,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-e-i},this.tipBase2Position={x:this.width,y:this.height-e})}else{o<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(i=this.width/5,e=Math.min(this.width/2,15),this.tipBase1Position={x:e,y:this.height},this.tipBase2Position={x:e+i,y:this.height}):(this.tipBase1Position={x:0,y:this.height-e},this.tipBase2Position={x:0,y:this.height-e-i})}},i.prototype.resize=function(e){t.prototype.resize.call(this,e),this.positionTip()},i.prototype.positionTip=function(){r.setAttributes(this.tip,[["points",this.getTipPoints()]]);var t=this.tipGrip.visual.transform.baseVal.getItem(0);t.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(t,0)},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),i.prototype.select=function(){this.positionTip(),t.prototype.select.call(this)},i.prototype.getState=function(){var e=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){var i=e;this.bgColor=i.bgColor,this.tipPosition=i.tipPosition,t.prototype.restoreState.call(this,e),this.createTip(),this.setTipPoints()},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.tipPosition={x:this.tipPosition.x*e,y:this.tipPosition.y*i},this.positionTip()},i.typeName="CalloutMarker",i.title="Callout marker",i.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',i}(P),R=function(t){function i(e,i,o){var r=t.call(this,e,i,o)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.opacity=1,r.strokeColor=o.defaultColor,r.strokeWidth=o.defaultStrokeWidth,r.strokeDasharray=o.defaultStrokeDasharray,r.fillColor=o.defaultFillColor,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.setOpacity=r.setOpacity.bind(r),r.createVisual=r.createVisual.bind(r),r.strokePanel=new g("Line color",s(o.defaultColorSet,["transparent"]),o.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.fillPanel=new g("Fill color",s(o.defaultColorSet,["transparent"]),r.fillColor,H),r.fillPanel.onColorChanged=r.setFillColor,r.strokeWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new k("Line style",o.defaultStrokeDasharrays,o.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r.opacityPanel=new I("Opacity",o.defaultOpacitySteps,r.opacity),r.opacityPanel.onOpacityChanged=r.setOpacity,r}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},i.prototype.createVisual=function(){this.visual=r.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},i.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e)},i.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},i.prototype.setSize=function(){t.prototype.setSize.call(this),r.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},i.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&r.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},i.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&r.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&r.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&r.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},i.prototype.setOpacity=function(t){this.opacity=t,this.visual&&r.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){var i=e;this.fillColor=i.fillColor,this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.opacity=i.opacity,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setSize()},i.typeName="EllipseMarker",i.title="Ellipse marker",i.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',i}(b),O=function(t){function i(e,i,o){return t.call(this,e,i,o)||this}return e(i,t),Object.defineProperty(i.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.tip1&&e!==this.tip2)},i.prototype.createTips=function(){this.tip1=r.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(r.createTransform()),this.visual.appendChild(this.tip1),this.tip2=r.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(r.createTransform()),this.visual.appendChild(this.tip2)},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"creating"===this.state&&this.createTips()},i.prototype.adjustVisual=function(){if(t.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(r.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),r.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),i=this.tip1.transform.baseVal.getItem(0);i.setRotate(e,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(i,0);var o=this.tip2.transform.baseVal.getItem(0);o.setRotate(e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(o,0)}},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e),this.createTips(),this.adjustVisual()},i.typeName="MeasurementMarker",i.title="Measurement marker",i.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',i}(M),V=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.strokePanel.colors=o.defaultColorSet,s.fillColor="transparent",s}return e(i,t),Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.typeName="EllipseFrameMarker",i.title="Ellipse frame marker",i.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',i}(R),G=function(){function t(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),t.prototype.addUndoStep=function(t){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(t)||(this.undoStack.push(t),JSON.stringify(this.lastRedoStep)!==JSON.stringify(t)&&this.redoStack.splice(0,this.redoStack.length))},t.prototype.replaceLastUndoStep=function(t){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=t)},t.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},t.prototype.undo=function(){if(this.undoStack.length>1){var t=this.undoStack.pop();return void 0!==t&&this.redoStack.push(t),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},t.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},t}(),F=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.strokeColor="transparent",s.strokeWidth=0,s.strokeDasharray="",s.curveX=0,s.curveY=0,s.manipulationStartCurveX=0,s.manipulationStartCurveY=0,s.setStrokeColor=s.setStrokeColor.bind(s),s.setStrokeWidth=s.setStrokeWidth.bind(s),s.setStrokeDasharray=s.setStrokeDasharray.bind(s),s.positionGrips=s.positionGrips.bind(s),s.addControlGrips=s.addControlGrips.bind(s),s.adjustVisual=s.adjustVisual.bind(s),s.setupControlBox=s.setupControlBox.bind(s),s.resize=s.resize.bind(s),s.strokeColor=o.defaultColor,s.strokeWidth=o.defaultStrokeWidth,s.strokeDasharray=o.defaultStrokeDasharray,s.strokePanel=new g("Line color",o.defaultColorSet,o.defaultColor),s.strokePanel.onColorChanged=s.setStrokeColor,s.strokeWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),s.strokeWidthPanel.onWidthChanged=s.setStrokeWidth,s.strokeStylePanel=new k("Line style",o.defaultStrokeDasharrays,o.defaultStrokeDasharray),s.strokeStylePanel.onStyleChanged=s.setStrokeDasharray,s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorCurve&&e!==this.visibleCurve&&!this.curveGrip.ownsTarget(e))},i.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.selectorCurve=r.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=r.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=e.x,this.curveY=e.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(i)&&(this.activeGrip=this.curveGrip,this._state="resize")},i.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),r.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),r.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),r.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},i.prototype.setupControlBox=function(){t.prototype.setupControlBox.call(this),this.curveControlLine1=r.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=r.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},i.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,t.prototype.addControlGrips.call(this)},i.prototype.positionGrips=function(){t.prototype.positionGrips.call(this);var e=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-e/2,this.curveY-e/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},i.prototype.manipulate=function(e){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+e.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+e.y-this.manipulationStartY),t.prototype.manipulate.call(this,e)},i.prototype.resize=function(e){this.activeGrip===this.curveGrip&&(this.curveX=e.x,this.curveY=e.y),t.prototype.resize.call(this,e),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},i.prototype.scale=function(e,i){this.curveX=this.curveX*e,this.curveY=this.curveY*i,t.prototype.scale.call(this,e,i)},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.curveX=i.curveX,this.curveY=i.curveY,this.createVisual(),this.adjustVisual()},i.typeName="CurveMarker",i.title="Curve marker",i.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',i}(E),j=function(t){function i(e,i,o){var r=t.call(this,e,i,o)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.textColor="transparent",r.fontSize="1rem",r.isMoved=!1,r.captionText="Caption",r.PADDING=5,r.captionBoxWidth=0,r.captionBoxHeight=0,r.strokeColor=o.defaultColor,r.strokeWidth=o.defaultStrokeWidth,r.strokeDasharray=o.defaultStrokeDasharray,r.fillColor=o.defaultFillColor,r.textColor=o.defaultStrokeColor,r.fontFamily=o.defaultFontFamily,r.fontSize=o.defaultCaptionFontSize,r.captionText=o.defaultCaptionText,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.createVisual=r.createVisual.bind(r),r.sizeCaption=r.sizeCaption.bind(r),r.setCaptionText=r.setCaptionText.bind(r),r.showTextEditor=r.showTextEditor.bind(r),r.positionTextEditor=r.positionTextEditor.bind(r),r.finishTextEditing=r.finishTextEditing.bind(r),r.setFont=r.setFont.bind(r),r.setTextColor=r.setTextColor.bind(r),r.strokePanel=new g("Line color",s(o.defaultColorSet,["transparent"]),r.strokeColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.fillPanel=new g("Fill color",s(o.defaultColorSet,["transparent"]),r.fillColor,H),r.fillPanel.onColorChanged=r.setFillColor,r.strokeWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new k("Line style",o.defaultStrokeDasharrays,o.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r.fontFamilyPanel=new T("Font",o.defaultFontFamilies,o.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r.textColorPanel=new g("Text color",o.defaultColorSet,r.textColor,N),r.textColorPanel.onColorChanged=r.setTextColor,r}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.frame&&e!==this.captionBg&&e!==this.captionElement)},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=r.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=r.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=r.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},i.prototype.setCaptionText=function(t){this.captionText=t,this.captionElement.textContent=this.captionText,this.sizeCaption()},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},i.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},i.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},i.prototype.sizeCaption=function(){var t=this.captionElement.getBBox();""!==this.captionText.trim()?(this.captionBoxWidth=t.width+2*this.PADDING,this.captionBoxHeight=t.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),r.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),r.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},i.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",(function(t){t.stopPropagation()})),this.textEditBox.addEventListener("keypress",(function(e){"Enter"===e.key&&t.finishTextEditing(t.textEditBox.value)})),this.textEditBox.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditBox.addEventListener("blur",(function(){t.finishTextEditing(t.textEditBox.value)})),this.textEditDiv.addEventListener("pointerup",(function(){t.finishTextEditing(t.textEditBox.value)})),this.positionTextEditor(),this.textEditBox.focus()},i.prototype.positionTextEditor=function(){"edit"===this.state&&(void 0===this.textEditBox?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},i.prototype.finishTextEditing=function(t){this.setCaptionText(t.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},i.prototype.setFont=function(t){this.captionElement&&r.setAttributes(this.captionElement,[["font-family",t]]),this.fontFamily=t,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},i.prototype.setTextColor=function(t){this.captionElement&&r.setAttributes(this.captionElement,[["fill",t]]),this.textColor=t,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},i.prototype.setSize=function(){t.prototype.setSize.call(this),r.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},i.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},i.prototype.dblClick=function(e,i){t.prototype.dblClick.call(this,e,i),this.showTextEditor()},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.frame&&r.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},i.prototype.setFillColor=function(t){this.fillColor=t,this.captionBg&&r.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.frame&&r.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.frame&&r.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},t.prototype.getState.call(this));return e.typeName=this.typeName,e},i.prototype.restoreState=function(e){var i=e;this.fillColor=i.fillColor,this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.textColor=i.textColor,this.fontFamily=i.fontFamily,this.captionText=i.captionText,this.fontSize=i.fontSize,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setSize()},i.typeName="CaptionFrameMarker",i.title="Caption frame marker",i.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',i}(b),U=function(){function t(t,e){void 0===e&&(e=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=t,this.cancelable=e}return Object.defineProperty(t.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this._defaultPrevented=!0},t}(),Y=function(t){function i(e,i,o){var s=t.call(this,e,!1)||this;return s.dataUrl=i,s.state=o,s}return e(i,t),i}(U),X=function(t){function i(e,i,o){void 0===o&&(o=!1);var s=t.call(this,e,o)||this;return s.marker=i,s}return e(i,t),i}(U),Z=function(){function t(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return t.prototype.addEventListener=function(t,e){this[t].push(e)},t.prototype.removeEventListener=function(t,e){var i=this[t].indexOf(e);i>-1&&this[t].splice(i,1)},t}(),K=function(){function t(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new B,this._isOpen=!1,this.undoRedoManager=new G,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Z,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=t.instanceCounter++,this.styles=new l(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(t.prototype,"ALL_MARKER_TYPES",{get:function(){return[w,L,A,P,V,R,W,z,O,_,M,F,j]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[w,L,A,P,R,W,z]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BASIC_MARKER_TYPES",{get:function(){return[w,L,A,P,W]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(t){var e=this;this._availableMarkerTypes.splice(0),t.forEach((function(t){if("string"==typeof t){var i=e.ALL_MARKER_TYPES.find((function(e){return e.typeName===t}));void 0!==i&&e._availableMarkerTypes.push(i)}else e._availableMarkerTypes.push(t)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(t){this._zoomLevel=t,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),n.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},t.prototype.show=function(){var t=this;void 0===this.styles.styleSheetRoot&&void 0!==h.styleSheetRoot&&(this.styles.styleSheetRoot=h.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(e){return e(new U(t))}))},t.prototype.render=function(){return i(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return this.setCurrentMarker(),(t=new a).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.markersOnly=this.renderMarkersOnly,t.width=this.renderWidth,t.height=this.renderHeight,[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return e.sent(),[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,e.sent()]}}))}))},t.prototype.close=function(t){var e=this;if(void 0===t&&(t=!1),this.isOpen){var i=!1;t||this.eventListeners.beforeclose.forEach((function(t){var o=new U(e,!0);t(o),o.defaultPrevented&&(i=!0)})),i||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(t){return t(new U(e))})),this.detachEvents(),this._isOpen=!1)}},t.prototype.addMarkersToToolbar=function(){for(var t,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];(t=this._availableMarkerTypes).push.apply(t,e)},t.prototype.addRenderEventListener=function(t){this.addEventListener("render",(function(e){t(e.dataUrl,e.state)}))},t.prototype.removeRenderEventListener=function(t){},t.prototype.addCloseEventListener=function(t){this.addEventListener("close",(function(){t()}))},t.prototype.removeCloseEventListener=function(t){},t.prototype.setupResizeObserver=function(){var t=this;"inline"===this.settings.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){t.resize(t.target.clientWidth,t.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.settings.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){return t.onPopupTargetResize()})),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},t.prototype.onPopupTargetResize=function(){var t=1*this.target.clientWidth/this.target.clientHeight,e=this.editorCanvas.clientWidth/t>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*t:this.editorCanvas.clientWidth,i=e<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/t;this.resize(e,i)},t.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},t.prototype.resize=function(t,e){this._isResizing=!0;var i=t/this.imageWidth,o=e/this.imageHeight;this.imageWidth=Math.round(t),this.imageHeight=Math.round(e),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px","popup"!==this.settings.displayMode?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),void 0!==this.toolbar&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(i,o),this._isResizing=!1},t.prototype.scaleMarkers=function(t,e){var i,o=this;this._currentMarker&&this._currentMarker instanceof P?this._currentMarker.scale(t,e):(i=this._currentMarker,this.setCurrentMarker()),this.markers.forEach((function(i){i!==o._currentMarker&&i.scale(t,e)})),void 0!==i&&this.setCurrentMarker(i)},t.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},t.prototype.setTopLeft=function(){var t=this.editingTarget.getBoundingClientRect(),e=this.editorCanvas.getBoundingClientRect();this.left=t.left-e.left,this.top=t.top-e.top},t.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},t.prototype.addDefs=function(){for(var t,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];this.defs=r.createDefs(),this.addDefsToImage(),(t=this.defs).append.apply(t,e)},t.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},t.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},t.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},t.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},t.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},t.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},t.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},t.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var t=document.createElement("a");t.href="https://markerjs.com/",t.target="_blank",t.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',t.title="Powered by marker.js",t.style.display="grid",t.style.alignItems="center",t.style.justifyItems="center",t.style.padding="3px",t.style.width="20px",t.style.height="20px",this.logoUI.appendChild(t),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},t.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},t.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},t.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},t.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var t=void 0!==this.settings.uiOffsetTop?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new d(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1","popup"===this.settings.displayMode&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex","popup"===this.settings.displayMode&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),void 0===this.settings.uiOffsetTop&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new u(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},t.prototype.closeUI=function(){"popup"===this.settings.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},t.prototype.removeMarker=function(t){this.markerImage.removeChild(t.container),this.markers.indexOf(t)>-1&&this.markers.splice(this.markers.indexOf(t),1),t.dispose()},t.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},t.prototype.toolbarButtonClicked=function(t,e){if("marker"===t&&void 0!==e)this.createNewMarker(e);else if("action"===t)switch(e){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},t.prototype.deleteSelectedMarker=function(){var t=this;if(void 0!==this._currentMarker){var e=!1;if(this.eventListeners.markerbeforedelete.forEach((function(i){var o=new X(t,t._currentMarker,!0);i(o),o.defaultPrevented&&(e=!0)})),!e){var i=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach((function(e){return e(new X(t,i))}))}}},t.prototype.clear=function(){var t=this,e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(i){var o=new X(t,void 0,!0);i(o),o.defaultPrevented&&(e=!0)})),!e)){this.setCurrentMarker();for(var i=function(e){var i=o.markers[e];o.setCurrentMarker(o.markers[e]),o._currentMarker.dispose(),o.markerImage.removeChild(o._currentMarker.container),o.markers.splice(o.markers.indexOf(o._currentMarker),1),o.eventListeners.markerdelete.forEach((function(e){return e(new X(t,i))}))},o=this,s=this.markers.length-1;s>=0;s--)i(s);this.addUndoStep()}},Object.defineProperty(t.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),t.prototype.showNotesEditor=function(){var t;void 0!==this._currentMarker&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=null!==(t=this._currentMarker.notes)&&void 0!==t?t:"",this.overlayContainer.appendChild(this.notesArea))},t.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},t.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},t.prototype.addUndoStep=function(){var t=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var e=this.getState(),i=this.undoRedoManager.getLastUndoStep();if(!i||i.width===e.width&&i.height===e.height){var o=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(e),o<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach((function(e){return e(new U(t))}))}else this.undoRedoManager.replaceLastUndoStep(e),this.eventListeners.statechange.forEach((function(e){return e(new U(t))}))}},t.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},t.prototype.undoStep=function(){var t=this,e=this.undoRedoManager.undo();void 0!==e&&(this.restoreState(e),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(e){return e(new U(t))})))},t.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},t.prototype.redoStep=function(){var t=this,e=this.undoRedoManager.redo();void 0!==e&&(this.restoreState(e),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(e){return e(new U(t))})))},t.prototype.stepZoom=function(){var t=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=t<this.zoomSteps.length-1?this.zoomSteps[t+1]:this.zoomSteps[0]},t.prototype.panTo=function(t){this.contentDiv.scrollBy({left:this.prevPanPoint.x-t.x,top:this.prevPanPoint.y-t.y}),this.prevPanPoint=t},t.prototype.startRenderAndClose=function(){return i(this,void 0,void 0,(function(){var t,e,i=this;return o(this,(function(o){switch(o.label){case 0:return[4,this.render()];case 1:return t=o.sent(),e=this.getState(),this.eventListeners.render.forEach((function(o){return o(new Y(i,t,e))})),this.close(!0),[2]}}))}))},t.prototype.getState=function(t){!0===t&&this.setCurrentMarker();var e={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach((function(t){return e.markers.push(t.getState())})),e},t.prototype.restoreState=function(t){var e=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);t.markers.forEach((function(t){var i=e._availableMarkerTypes.find((function(e){return e.typeName===t.typeName}));if(void 0!==i){var o=e.addNewMarker(i);o.restoreState(t),e.markers.push(o)}})),t.width&&t.height&&(t.width!==this.imageWidth||t.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/t.width,this.imageHeight/t.height),this.eventListeners.restorestate.forEach((function(t){return t(new U(e))}))},t.prototype.addNewMarker=function(t){var e=r.createGroup();return this.markerImage.appendChild(e),new t(e,this.overlayContainer,this.settings)},t.prototype.createNewMarker=function(t){var e,i=this;(e="string"==typeof t?this._availableMarkerTypes.find((function(e){return e.typeName===t})):t)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(e),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(e.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach((function(t){return t(new X(i,i._currentMarker))})))},t.prototype.markerCreated=function(t){var e=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(t),this.setCurrentMarker(t),t instanceof L&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(L):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach((function(t){return t(new X(e,e._currentMarker))}))},t.prototype.colorChanged=function(t){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=t,this.settings.defaultStrokeColor=t)},t.prototype.fillColorChanged=function(t){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=t)},t.prototype.markerStateChanged=function(t){var e=this;this.eventListeners.markerchange.forEach((function(i){return i(new X(e,t))}))},t.prototype.setCurrentMarker=function(t){var e=this;this._currentMarker!==t&&void 0!==this._currentMarker&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach((function(t){return t(new X(e,e._currentMarker))}))),this._currentMarker=t,void 0===this._currentMarker||this._currentMarker.isSelected||("new"!==this._currentMarker.state&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach((function(t){return t(new X(e,e._currentMarker))})))},t.prototype.onPointerDown=function(t){if(this._isFocused||this.focus(),this.touchPoints++,1===this.touchPoints||"touch"!==t.pointerType)if(void 0===this._currentMarker||"new"!==this._currentMarker.state&&"creating"!==this._currentMarker.state){if("select"===this.mode){var e=this.markers.find((function(e){return e.ownsTarget(t.target)}));void 0!==e?(this.setCurrentMarker(e),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(t.clientX,t.clientY),t.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:t.clientX,y:t.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(t.clientX,t.clientY))},t.prototype.onDblClick=function(t){if(this._isFocused||this.focus(),"select"===this.mode){var e=this.markers.find((function(e){return e.ownsTarget(t.target)}));void 0!==e&&e!==this._currentMarker&&this.setCurrentMarker(e),void 0!==this._currentMarker?this._currentMarker.dblClick(this.clientToLocalCoordinates(t.clientX,t.clientY),t.target):this.setCurrentMarker()}},t.prototype.onPointerMove=function(t){1!==this.touchPoints&&"touch"===t.pointerType||(void 0!==this._currentMarker||this.isDragging)&&(void 0!==this._currentMarker&&"edit"===this._currentMarker.state||t.preventDefault(),void 0!==this._currentMarker?this._currentMarker.manipulate(this.clientToLocalCoordinates(t.clientX,t.clientY)):this.zoomLevel>1&&this.panTo({x:t.clientX,y:t.clientY}))},t.prototype.onPointerUp=function(t){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(t.clientX,t.clientY)),this.isDragging=!1,this.addUndoStep()},t.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},t.prototype.onKeyUp=function(t){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==t.key&&"Backspace"!==t.key||this.deleteSelectedMarker()},t.prototype.clientToLocalCoordinates=function(t,e){var i=this.markerImage.getBoundingClientRect();return{x:(t-i.left)/this.zoomLevel,y:(e-i.top)/this.zoomLevel}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},t.prototype.addLicenseKey=function(t){n.addKey(t)},t.prototype.addEventListener=function(t,e){this.eventListeners.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.eventListeners.removeEventListener(t,e)},t.prototype.renderState=function(t){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(t),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),t.prototype.focus=function(){var t=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(e){return e(new U(t))})))},t.prototype.blur=function(){var t=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(e){return e(new U(t))})))},t.instanceCounter=0,t}();
|
|
//# sourceMappingURL=markerjs2.esm.js.map
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |