PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-admin
/
dist
/
chunks
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[44],{ /***/ 119: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread.js var objectSpread = __webpack_require__(27); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__(16); // EXTERNAL MODULE: external {"this":["wp","element"]} var external_this_wp_element_ = __webpack_require__(0); // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/visually-hidden/utils.js /** * Utility Functions */ /** * renderAsRenderProps is used to wrap a component and convert * the passed property "as" either a string or component, to the * rendered tag if a string, or component. * * See VisuallyHidden hidden for example. * * @param {string|WPComponent} as A tag or component to render. * @return {WPComponent} The rendered component. */ function renderAsRenderProps(_ref) { var _ref$as = _ref.as, Component = _ref$as === void 0 ? 'div' : _ref$as, props = Object(objectWithoutProperties["a" /* default */])(_ref, ["as"]); if (typeof props.children === 'function') { return props.children(props); } return Object(external_this_wp_element_["createElement"])(Component, props); } //# sourceMappingURL=utils.js.map // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/visually-hidden/index.js /** * Internal dependencies */ /** * VisuallyHidden component to render text out non-visually * for use in devices such as a screen reader. */ function VisuallyHidden(_ref) { var _ref$as = _ref.as, as = _ref$as === void 0 ? 'div' : _ref$as, props = Object(objectWithoutProperties["a" /* default */])(_ref, ["as"]); return renderAsRenderProps(Object(objectSpread["a" /* default */])({ as: as, className: 'components-visually-hidden' }, props)); } /* harmony default export */ var visually_hidden = __webpack_exports__["a"] = (VisuallyHidden); //# sourceMappingURL=index.js.map /***/ }), /***/ 171: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _visually_hidden__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(119); /** * External dependencies */ /** * Internal dependencies */ function BaseControl(_ref) { var id = _ref.id, label = _ref.label, hideLabelFromVision = _ref.hideLabelFromVision, help = _ref.help, className = _ref.className, children = _ref.children; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('components-base-control', className) }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "components-base-control__field" }, label && id && (hideLabelFromVision ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_visually_hidden__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], { as: "label", htmlFor: id }, label) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("label", { className: "components-base-control__label", htmlFor: id }, label)), label && !id && (hideLabelFromVision ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_visually_hidden__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], { as: "label" }, label) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(BaseControl.VisualLabel, null, label)), children), !!help && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", { id: id + '__help', className: "components-base-control__help" }, help)); } BaseControl.VisualLabel = function (_ref2) { var className = _ref2.className, children = _ref2.children; className = classnames__WEBPACK_IMPORTED_MODULE_1___default()('components-base-control__label', className); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { className: className }, children); }; /* harmony default export */ __webpack_exports__["a"] = (BaseControl); //# sourceMappingURL=index.js.map /***/ }), /***/ 173: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(11); // EXTERNAL MODULE: external {"this":["wp","element"]} var external_this_wp_element_ = __webpack_require__(0); // EXTERNAL MODULE: ./node_modules/@wordpress/compose/build-module/utils/create-higher-order-component/index.js var create_higher_order_component = __webpack_require__(53); // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js /** * WordPress dependencies */ var instanceMap = new WeakMap(); /** * Creates a new id for a given object. * * @param {Object} object Object reference to create an id for. */ function createId(object) { var instances = instanceMap.get(object) || 0; instanceMap.set(object, instances + 1); return instances; } /** * Provides a unique instance ID. * * @param {Object} object Object reference to create an id for. */ function useInstanceId(object) { return Object(external_this_wp_element_["useMemo"])(function () { return createId(object); }, [object]); } //# sourceMappingURL=index.js.map // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-instance-id/index.js /** * Internal dependencies */ /** * A Higher Order Component used to be provide a unique instance ID by * component. * * @param {WPComponent} WrappedComponent The wrapped component. * * @return {WPComponent} Component with an instanceId prop. */ /* harmony default export */ var with_instance_id = __webpack_exports__["a"] = (Object(create_higher_order_component["a" /* default */])(function (WrappedComponent) { return function (props) { var instanceId = useInstanceId(WrappedComponent); return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, props, { instanceId: instanceId })); }; }, 'withInstanceId')); //# sourceMappingURL=index.js.map /***/ }), /***/ 709: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(173); /* harmony import */ var _base_control__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(171); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function SelectControl(_ref) { var help = _ref.help, instanceId = _ref.instanceId, label = _ref.label, _ref$multiple = _ref.multiple, multiple = _ref$multiple === void 0 ? false : _ref$multiple, onChange = _ref.onChange, _ref$options = _ref.options, options = _ref$options === void 0 ? [] : _ref$options, className = _ref.className, hideLabelFromVision = _ref.hideLabelFromVision, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_ref, ["help", "instanceId", "label", "multiple", "onChange", "options", "className", "hideLabelFromVision"]); var id = "inspector-select-control-".concat(instanceId); var onChangeValue = function onChangeValue(event) { if (multiple) { var selectedOptions = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(event.target.options).filter(function (_ref2) { var selected = _ref2.selected; return selected; }); var newValues = selectedOptions.map(function (_ref3) { var value = _ref3.value; return value; }); onChange(newValues); return; } onChange(event.target.value); }; // Disable reason: A select with an onchange throws a warning /* eslint-disable jsx-a11y/no-onchange */ return !Object(lodash__WEBPACK_IMPORTED_MODULE_4__["isEmpty"])(options) && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(_base_control__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { label: label, hideLabelFromVision: hideLabelFromVision, id: id, help: help, className: className }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])("select", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ id: id, className: "components-select-control__input", onChange: onChangeValue, "aria-describedby": !!help ? "".concat(id, "__help") : undefined, multiple: multiple }, props), options.map(function (option, index) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])("option", { key: "".concat(option.label, "-").concat(option.value, "-").concat(index), value: option.value, disabled: option.disabled }, option.label); }))); /* eslint-enable jsx-a11y/no-onchange */ } /* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(SelectControl)); //# sourceMappingURL=index.js.map /***/ }), /***/ 711: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(0); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(10); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _popover__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(92); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var Dropdown = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(Dropdown, _Component); function Dropdown() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, Dropdown); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Dropdown).apply(this, arguments)); _this.toggle = _this.toggle.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_this)); _this.close = _this.close.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_this)); _this.closeIfFocusOutside = _this.closeIfFocusOutside.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_this)); _this.containerRef = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createRef"])(); _this.state = { isOpen: false }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Dropdown, [{ key: "componentWillUnmount", value: function componentWillUnmount() { var isOpen = this.state.isOpen; var onToggle = this.props.onToggle; if (isOpen && onToggle) { onToggle(false); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps, prevState) { var isOpen = this.state.isOpen; var onToggle = this.props.onToggle; if (prevState.isOpen !== isOpen && onToggle) { onToggle(isOpen); } } }, { key: "toggle", value: function toggle() { this.setState(function (state) { return { isOpen: !state.isOpen }; }); } /** * Closes the dropdown if a focus leaves the dropdown wrapper. This is * intentionally distinct from `onClose` since focus loss from the popover * is expected to occur when using the Dropdown's toggle button, in which * case the correct behavior is to keep the dropdown closed. The same applies * in case when focus is moved to the modal dialog. */ }, { key: "closeIfFocusOutside", value: function closeIfFocusOutside() { if (!this.containerRef.current.contains(document.activeElement) && !document.activeElement.closest('[role="dialog"]')) { this.close(); } } }, { key: "close", value: function close() { if (this.props.onClose) { this.props.onClose(); } this.setState({ isOpen: false }); } }, { key: "render", value: function render() { var isOpen = this.state.isOpen; var _this$props = this.props, renderContent = _this$props.renderContent, renderToggle = _this$props.renderToggle, _this$props$position = _this$props.position, position = _this$props$position === void 0 ? 'bottom' : _this$props$position, className = _this$props.className, contentClassName = _this$props.contentClassName, expandOnMobile = _this$props.expandOnMobile, headerTitle = _this$props.headerTitle, focusOnMount = _this$props.focusOnMount, popoverProps = _this$props.popoverProps; var args = { isOpen: isOpen, onToggle: this.toggle, onClose: this.close }; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("div", { className: classnames__WEBPACK_IMPORTED_MODULE_8___default()('components-dropdown', className), ref: this.containerRef }, renderToggle(args), isOpen && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_popover__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ className: contentClassName, position: position, onClose: this.close, onFocusOutside: this.closeIfFocusOutside, expandOnMobile: expandOnMobile, headerTitle: headerTitle, focusOnMount: focusOnMount }, popoverProps), renderContent(args))); } }]); return Dropdown; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Component"]); /* harmony default export */ __webpack_exports__["a"] = (Dropdown); //# sourceMappingURL=index.js.map /***/ }), /***/ 712: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(173); /* harmony import */ var _base_control__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(171); /** * WordPress dependencies */ /** * Internal dependencies */ function TextControl(_ref) { var label = _ref.label, hideLabelFromVision = _ref.hideLabelFromVision, value = _ref.value, help = _ref.help, className = _ref.className, instanceId = _ref.instanceId, onChange = _ref.onChange, _ref$type = _ref.type, type = _ref$type === void 0 ? 'text' : _ref$type, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["label", "hideLabelFromVision", "value", "help", "className", "instanceId", "onChange", "type"]); var id = "inspector-text-control-".concat(instanceId); var onChangeValue = function onChangeValue(event) { return onChange(event.target.value); }; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_base_control__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], { label: label, hideLabelFromVision: hideLabelFromVision, id: id, help: help, className: className }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("input", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ className: "components-text-control__input", type: type, id: id, value: value, onChange: onChangeValue, "aria-describedby": !!help ? id + '__help' : undefined }, props))); } /* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(TextControl)); //# sourceMappingURL=index.js.map /***/ }), /***/ 715: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return withState; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(0); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _utils_create_higher_order_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(53); /** * WordPress dependencies */ /** * Internal dependencies */ /** * A Higher Order Component used to provide and manage internal component state * via props. * * @param {?Object} initialState Optional initial state of the component. * * @return {WPComponent} Wrapped component. */ function withState() { var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return Object(_utils_create_higher_order_component__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(function (OriginalComponent) { return ( /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(WrappedComponent, _Component); function WrappedComponent() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, WrappedComponent); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(WrappedComponent).apply(this, arguments)); _this.setState = _this.setState.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_this)); _this.state = initialState; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(WrappedComponent, [{ key: "render", value: function render() { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(OriginalComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, this.props, this.state, { setState: this.setState })); } }]); return WrappedComponent; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Component"]) ); }, 'withState'); } //# sourceMappingURL=index.js.map /***/ }), /***/ 753: /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Helpers */ var escapeTest = /[&<>"']/; var escapeReplace = /[&<>"']/g; var escapeTestNoEncode = /[<>"']|&(?!#?\w+;)/; var escapeReplaceNoEncode = /[<>"']|&(?!#?\w+;)/g; var escapeReplacements = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }; var getEscapeReplacement = function getEscapeReplacement(ch) { return escapeReplacements[ch]; }; function escape(html, encode) { if (encode) { if (escapeTest.test(html)) { return html.replace(escapeReplace, getEscapeReplacement); } } else { if (escapeTestNoEncode.test(html)) { return html.replace(escapeReplaceNoEncode, getEscapeReplacement); } } return html; } var unescapeTest = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig; function unescape(html) { // explicitly match decimal, hex, and named HTML entities return html.replace(unescapeTest, function (_, n) { n = n.toLowerCase(); if (n === 'colon') return ':'; if (n.charAt(0) === '#') { return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)); } return ''; }); } var caret = /(^|[^\[])\^/g; function edit(regex, opt) { regex = regex.source || regex; opt = opt || ''; var obj = { replace: function replace(name, val) { val = val.source || val; val = val.replace(caret, '$1'); regex = regex.replace(name, val); return obj; }, getRegex: function getRegex() { return new RegExp(regex, opt); } }; return obj; } var nonWordAndColonTest = /[^\w:]/g; var originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; function cleanUrl(sanitize, base, href) { if (sanitize) { var prot; try { prot = decodeURIComponent(unescape(href)).replace(nonWordAndColonTest, '').toLowerCase(); } catch (e) { return null; } if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) { return null; } } if (base && !originIndependentUrl.test(href)) { href = resolveUrl(base, href); } try { href = encodeURI(href).replace(/%25/g, '%'); } catch (e) { return null; } return href; } var baseUrls = {}; var justDomain = /^[^:]+:\/*[^/]*$/; var protocol = /^([^:]+:)[\s\S]*$/; var domain = /^([^:]+:\/*[^/]*)[\s\S]*$/; function resolveUrl(base, href) { if (!baseUrls[' ' + base]) { // we can ignore everything in base after the last slash of its path component, // but we might need to add _that_ // https://tools.ietf.org/html/rfc3986#section-3 if (justDomain.test(base)) { baseUrls[' ' + base] = base + '/'; } else { baseUrls[' ' + base] = rtrim(base, '/', true); } } base = baseUrls[' ' + base]; var relativeBase = base.indexOf(':') === -1; if (href.substring(0, 2) === '//') { if (relativeBase) { return href; } return base.replace(protocol, '$1') + href; } else if (href.charAt(0) === '/') { if (relativeBase) { return href; } return base.replace(domain, '$1') + href; } else { return base + href; } } var noopTest = { exec: function noopTest() {} }; function merge(obj) { var i = 1, target, key; for (; i < arguments.length; i++) { target = arguments[i]; for (key in target) { if (Object.prototype.hasOwnProperty.call(target, key)) { obj[key] = target[key]; } } } return obj; } function splitCells(tableRow, count) { // ensure that every cell-delimiting pipe has a space // before it to distinguish it from an escaped pipe var row = tableRow.replace(/\|/g, function (match, offset, str) { var escaped = false, curr = offset; while (--curr >= 0 && str[curr] === '\\') { escaped = !escaped; } if (escaped) { // odd number of slashes means | is escaped // so we leave it alone return '|'; } else { // add space before unescaped | return ' |'; } }), cells = row.split(/ \|/); var i = 0; if (cells.length > count) { cells.splice(count); } else { while (cells.length < count) { cells.push(''); } } for (; i < cells.length; i++) { // leading or trailing whitespace is ignored per the gfm spec cells[i] = cells[i].trim().replace(/\\\|/g, '|'); } return cells; } // Remove trailing 'c's. Equivalent to str.replace(/c*$/, ''). // /c*$/ is vulnerable to REDOS. // invert: Remove suffix of non-c chars instead. Default falsey. function rtrim(str, c, invert) { var l = str.length; if (l === 0) { return ''; } // Length of suffix matching the invert condition. var suffLen = 0; // Step left until we fail to match the invert condition. while (suffLen < l) { var currChar = str.charAt(l - suffLen - 1); if (currChar === c && !invert) { suffLen++; } else if (currChar !== c && invert) { suffLen++; } else { break; } } return str.substr(0, l - suffLen); } function findClosingBracket(str, b) { if (str.indexOf(b[1]) === -1) { return -1; } var l = str.length; var level = 0, i = 0; for (; i < l; i++) { if (str[i] === '\\') { i++; } else if (str[i] === b[0]) { level++; } else if (str[i] === b[1]) { level--; if (level < 0) { return i; } } } return -1; } function checkSanitizeDeprecation(opt) { if (opt && opt.sanitize && !opt.silent) { console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options'); } } module.exports = { escape: escape, unescape: unescape, edit: edit, cleanUrl: cleanUrl, resolveUrl: resolveUrl, noopTest: noopTest, merge: merge, splitCells: splitCells, rtrim: rtrim, findClosingBracket: findClosingBracket, checkSanitizeDeprecation: checkSanitizeDeprecation }; /***/ }), /***/ 755: /***/ (function(module, exports, __webpack_require__) { "use strict"; function getDefaults() { return { baseUrl: null, breaks: false, gfm: true, headerIds: true, headerPrefix: '', highlight: null, langPrefix: 'language-', mangle: true, pedantic: false, renderer: null, sanitize: false, sanitizer: null, silent: false, smartLists: false, smartypants: false, xhtml: false }; } function changeDefaults(newDefaults) { module.exports.defaults = newDefaults; } module.exports = { defaults: getDefaults(), getDefaults: getDefaults, changeDefaults: changeDefaults }; /***/ }), /***/ 761: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(173); /* harmony import */ var _base_control__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(171); /* harmony import */ var _dashicon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(80); /** * WordPress dependencies */ /** * Internal dependencies */ function CheckboxControl(_ref) { var label = _ref.label, className = _ref.className, heading = _ref.heading, checked = _ref.checked, help = _ref.help, instanceId = _ref.instanceId, onChange = _ref.onChange, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["label", "className", "heading", "checked", "help", "instanceId", "onChange"]); var id = "inspector-checkbox-control-".concat(instanceId); var onChangeValue = function onChangeValue(event) { return onChange(event.target.checked); }; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_base_control__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], { label: heading, id: id, help: help, className: className }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("span", { className: "components-checkbox-control__input-container" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("input", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ id: id, className: "components-checkbox-control__input", type: "checkbox", value: "1", onChange: onChangeValue, checked: checked, "aria-describedby": !!help ? id + '__help' : undefined }, props)), checked ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_dashicon__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { icon: "yes", className: "components-checkbox-control__checked", role: "presentation" }) : null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("label", { className: "components-checkbox-control__label", htmlFor: id }, label)); } /* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(CheckboxControl)); //# sourceMappingURL=index.js.map /***/ }), /***/ 762: /***/ (function(module, exports, __webpack_require__) { "use strict"; var _require = __webpack_require__(755), defaults = _require.defaults; var _require2 = __webpack_require__(753), cleanUrl = _require2.cleanUrl, escape = _require2.escape; /** * Renderer */ module.exports = /*#__PURE__*/function () { function Renderer(options) { this.options = options || defaults; } var _proto = Renderer.prototype; _proto.code = function code(_code, infostring, escaped) { var lang = (infostring || '').match(/\S*/)[0]; if (this.options.highlight) { var out = this.options.highlight(_code, lang); if (out != null && out !== _code) { escaped = true; _code = out; } } if (!lang) { return '<pre><code>' + (escaped ? _code : escape(_code, true)) + '</code></pre>'; } return '<pre><code class="' + this.options.langPrefix + escape(lang, true) + '">' + (escaped ? _code : escape(_code, true)) + '</code></pre>\n'; }; _proto.blockquote = function blockquote(quote) { return '<blockquote>\n' + quote + '</blockquote>\n'; }; _proto.html = function html(_html) { return _html; }; _proto.heading = function heading(text, level, raw, slugger) { if (this.options.headerIds) { return '<h' + level + ' id="' + this.options.headerPrefix + slugger.slug(raw) + '">' + text + '</h' + level + '>\n'; } // ignore IDs return '<h' + level + '>' + text + '</h' + level + '>\n'; }; _proto.hr = function hr() { return this.options.xhtml ? '<hr/>\n' : '<hr>\n'; }; _proto.list = function list(body, ordered, start) { var type = ordered ? 'ol' : 'ul', startatt = ordered && start !== 1 ? ' start="' + start + '"' : ''; return '<' + type + startatt + '>\n' + body + '</' + type + '>\n'; }; _proto.listitem = function listitem(text) { return '<li>' + text + '</li>\n'; }; _proto.checkbox = function checkbox(checked) { return '<input ' + (checked ? 'checked="" ' : '') + 'disabled="" type="checkbox"' + (this.options.xhtml ? ' /' : '') + '> '; }; _proto.paragraph = function paragraph(text) { return '<p>' + text + '</p>\n'; }; _proto.table = function table(header, body) { if (body) body = '<tbody>' + body + '</tbody>'; return '<table>\n' + '<thead>\n' + header + '</thead>\n' + body + '</table>\n'; }; _proto.tablerow = function tablerow(content) { return '<tr>\n' + content + '</tr>\n'; }; _proto.tablecell = function tablecell(content, flags) { var type = flags.header ? 'th' : 'td'; var tag = flags.align ? '<' + type + ' align="' + flags.align + '">' : '<' + type + '>'; return tag + content + '</' + type + '>\n'; }; // span level renderer _proto.strong = function strong(text) { return '<strong>' + text + '</strong>'; }; _proto.em = function em(text) { return '<em>' + text + '</em>'; }; _proto.codespan = function codespan(text) { return '<code>' + text + '</code>'; }; _proto.br = function br() { return this.options.xhtml ? '<br/>' : '<br>'; }; _proto.del = function del(text) { return '<del>' + text + '</del>'; }; _proto.link = function link(href, title, text) { href = cleanUrl(this.options.sanitize, this.options.baseUrl, href); if (href === null) { return text; } var out = '<a href="' + escape(href) + '"'; if (title) { out += ' title="' + title + '"'; } out += '>' + text + '</a>'; return out; }; _proto.image = function image(href, title, text) { href = cleanUrl(this.options.sanitize, this.options.baseUrl, href); if (href === null) { return text; } var out = '<img src="' + href + '" alt="' + text + '"'; if (title) { out += ' title="' + title + '"'; } out += this.options.xhtml ? '/>' : '>'; return out; }; _proto.text = function text(_text) { return _text; }; return Renderer; }(); /***/ }), /***/ 771: /***/ (function(module, exports, __webpack_require__) { "use strict"; var _require = __webpack_require__(753), noopTest = _require.noopTest, edit = _require.edit, merge = _require.merge; /** * Block-Level Grammar */ var block = { newline: /^\n+/, code: /^( {4}[^\n]+\n*)+/, fences: /^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/, hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/, heading: /^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/, blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/, list: /^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, html: '^ {0,3}(?:' // optional indentation + '<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)' // (1) + '|comment[^\\n]*(\\n+|$)' // (2) + '|<\\?[\\s\\S]*?\\?>\\n*' // (3) + '|<![A-Z][\\s\\S]*?>\\n*' // (4) + '|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*' // (5) + '|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)' // (6) + '|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) open tag + '|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) closing tag + ')', def: /^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/, nptable: noopTest, table: noopTest, lheading: /^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/, // regex template, placeholders will be replaced according to different paragraph // interruption rules of commonmark and the original markdown spec: _paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/, text: /^[^\n]+/ }; block._label = /(?!\s*\])(?:\\[\[\]]|[^\[\]])+/; block._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/; block.def = edit(block.def).replace('label', block._label).replace('title', block._title).getRegex(); block.bullet = /(?:[*+-]|\d{1,9}\.)/; block.item = /^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/; block.item = edit(block.item, 'gm').replace(/bull/g, block.bullet).getRegex(); block.list = edit(block.list).replace(/bull/g, block.bullet).replace('hr', '\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))').replace('def', '\\n+(?=' + block.def.source + ')').getRegex(); block._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + '|track|ul'; block._comment = /<!--(?!-?>)[\s\S]*?-->/; block.html = edit(block.html, 'i').replace('comment', block._comment).replace('tag', block._tag).replace('attribute', / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(); block.paragraph = edit(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs .replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks .getRegex(); block.blockquote = edit(block.blockquote).replace('paragraph', block.paragraph).getRegex(); /** * Normal Block Grammar */ block.normal = merge({}, block); /** * GFM Block Grammar */ block.gfm = merge({}, block.normal, { nptable: '^ *([^|\\n ].*\\|.*)\\n' // Header + ' *([-:]+ *\\|[-| :]*)' // Align + '(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)', // Cells table: '^ *\\|(.+)\\n' // Header + ' *\\|?( *[-:]+[-| :]*)' // Align + '(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells }); block.gfm.nptable = edit(block.gfm.nptable).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks .getRegex(); block.gfm.table = edit(block.gfm.table).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks .getRegex(); /** * Pedantic grammar (original John Gruber's loose markdown specification) */ block.pedantic = merge({}, block.normal, { html: edit('^ *(?:comment *(?:\\n|\\s*$)' + '|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)' // closed tag + '|<tag(?:"[^"]*"|\'[^\']*\'|\\s[^\'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))').replace('comment', block._comment).replace(/tag/g, '(?!(?:' + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + '\\b)\\w+(?!:|[^\\w\\s@]*@)\\b').getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/, fences: noopTest, // fences not supported paragraph: edit(block.normal._paragraph).replace('hr', block.hr).replace('heading', ' *#{1,6} *[^\n]').replace('lheading', block.lheading).replace('blockquote', ' {0,3}>').replace('|fences', '').replace('|list', '').replace('|html', '').getRegex() }); /** * Inline-Level Grammar */ var inline = { escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, url: noopTest, tag: '^comment' + '|^</[a-zA-Z][\\w:-]*\\s*>' // self-closing tag + '|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>' // open tag + '|^<\\?[\\s\\S]*?\\?>' // processing instruction, e.g. <?php ?> + '|^<![a-zA-Z]+\\s[\\s\\S]*?>' // declaration, e.g. <!DOCTYPE html> + '|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>', // CDATA section link: /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/, reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/, nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/, strong: /^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/, em: /^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/, code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, br: /^( {2,}|\\)\n(?!\s*$)/, del: noopTest, text: /^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/ }; // list of punctuation marks from common mark spec // without ` and ] to workaround Rule 17 (inline code blocks/links) inline._punctuation = '!"#$%&\'()*+,\\-./:;<=>?@\\[^_{|}~'; inline.em = edit(inline.em).replace(/punctuation/g, inline._punctuation).getRegex(); inline._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g; inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/; inline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/; inline.autolink = edit(inline.autolink).replace('scheme', inline._scheme).replace('email', inline._email).getRegex(); inline._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/; inline.tag = edit(inline.tag).replace('comment', block._comment).replace('attribute', inline._attribute).getRegex(); inline._label = /(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/; inline._href = /<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/; inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/; inline.link = edit(inline.link).replace('label', inline._label).replace('href', inline._href).replace('title', inline._title).getRegex(); inline.reflink = edit(inline.reflink).replace('label', inline._label).getRegex(); /** * Normal Inline Grammar */ inline.normal = merge({}, inline); /** * Pedantic Inline Grammar */ inline.pedantic = merge({}, inline.normal, { strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/, link: edit(/^!?\[(label)\]\((.*?)\)/).replace('label', inline._label).getRegex(), reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace('label', inline._label).getRegex() }); /** * GFM Inline Grammar */ inline.gfm = merge({}, inline.normal, { escape: edit(inline.escape).replace('])', '~|])').getRegex(), _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/, url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, _backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/, del: /^~+(?=\S)([\s\S]*?\S)~+/, text: /^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/ }); inline.gfm.url = edit(inline.gfm.url, 'i').replace('email', inline.gfm._extended_email).getRegex(); /** * GFM + Line Breaks Inline Grammar */ inline.breaks = merge({}, inline.gfm, { br: edit(inline.br).replace('{2,}', '*').getRegex(), text: edit(inline.gfm.text).replace('\\b_', '\\b_| {2,}\\n').replace(/\{2,\}/g, '*').getRegex() }); module.exports = { block: block, inline: inline }; /***/ }), /***/ 772: /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Slugger generates header id */ module.exports = /*#__PURE__*/function () { function Slugger() { this.seen = {}; } /** * Convert string to unique id */ var _proto = Slugger.prototype; _proto.slug = function slug(value) { var slug = value.toLowerCase().trim() // remove html tags .replace(/<[!\/a-z].*?>/ig, '') // remove unwanted chars .replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '').replace(/\s/g, '-'); if (this.seen.hasOwnProperty(slug)) { var originalSlug = slug; do { this.seen[originalSlug]++; slug = originalSlug + '-' + this.seen[originalSlug]; } while (this.seen.hasOwnProperty(slug)); } this.seen[slug] = 0; return slug; }; return Slugger; }(); /***/ }), /***/ 773: /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(55); var _createClass2 = _interopRequireDefault(__webpack_require__(40)); var Renderer = __webpack_require__(762); var _require = __webpack_require__(755), defaults = _require.defaults; var _require2 = __webpack_require__(771), inline = _require2.inline; var _require3 = __webpack_require__(753), findClosingBracket = _require3.findClosingBracket, escape = _require3.escape; /** * Inline Lexer & Compiler */ module.exports = /*#__PURE__*/function () { function InlineLexer(links, options) { this.options = options || defaults; this.links = links; this.rules = inline.normal; this.options.renderer = this.options.renderer || new Renderer(); this.renderer = this.options.renderer; this.renderer.options = this.options; if (!this.links) { throw new Error('Tokens array requires a `links` property.'); } if (this.options.pedantic) { this.rules = inline.pedantic; } else if (this.options.gfm) { if (this.options.breaks) { this.rules = inline.breaks; } else { this.rules = inline.gfm; } } } /** * Expose Inline Rules */ /** * Static Lexing/Compiling Method */ InlineLexer.output = function output(src, links, options) { var inline = new InlineLexer(links, options); return inline.output(src); } /** * Lexing/Compiling */ ; var _proto = InlineLexer.prototype; _proto.output = function output(src) { var out = '', link, text, href, title, cap, prevCapZero; while (src) { // escape if (cap = this.rules.escape.exec(src)) { src = src.substring(cap[0].length); out += escape(cap[1]); continue; } // tag if (cap = this.rules.tag.exec(src)) { if (!this.inLink && /^<a /i.test(cap[0])) { this.inLink = true; } else if (this.inLink && /^<\/a>/i.test(cap[0])) { this.inLink = false; } if (!this.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])) { this.inRawBlock = true; } else if (this.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])) { this.inRawBlock = false; } src = src.substring(cap[0].length); out += this.renderer.html(this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0]); continue; } // link if (cap = this.rules.link.exec(src)) { var lastParenIndex = findClosingBracket(cap[2], '()'); if (lastParenIndex > -1) { var start = cap[0].indexOf('!') === 0 ? 5 : 4; var linkLen = start + cap[1].length + lastParenIndex; cap[2] = cap[2].substring(0, lastParenIndex); cap[0] = cap[0].substring(0, linkLen).trim(); cap[3] = ''; } src = src.substring(cap[0].length); this.inLink = true; href = cap[2]; if (this.options.pedantic) { link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href); if (link) { href = link[1]; title = link[3]; } else { title = ''; } } else { title = cap[3] ? cap[3].slice(1, -1) : ''; } href = href.trim().replace(/^<([\s\S]*)>$/, '$1'); out += this.outputLink(cap, { href: InlineLexer.escapes(href), title: InlineLexer.escapes(title) }); this.inLink = false; continue; } // reflink, nolink if ((cap = this.rules.reflink.exec(src)) || (cap = this.rules.nolink.exec(src))) { src = src.substring(cap[0].length); link = (cap[2] || cap[1]).replace(/\s+/g, ' '); link = this.links[link.toLowerCase()]; if (!link || !link.href) { out += cap[0].charAt(0); src = cap[0].substring(1) + src; continue; } this.inLink = true; out += this.outputLink(cap, link); this.inLink = false; continue; } // strong if (cap = this.rules.strong.exec(src)) { src = src.substring(cap[0].length); out += this.renderer.strong(this.output(cap[4] || cap[3] || cap[2] || cap[1])); continue; } // em if (cap = this.rules.em.exec(src)) { src = src.substring(cap[0].length); out += this.renderer.em(this.output(cap[6] || cap[5] || cap[4] || cap[3] || cap[2] || cap[1])); continue; } // code if (cap = this.rules.code.exec(src)) { src = src.substring(cap[0].length); out += this.renderer.codespan(escape(cap[2].trim(), true)); continue; } // br if (cap = this.rules.br.exec(src)) { src = src.substring(cap[0].length); out += this.renderer.br(); continue; } // del (gfm) if (cap = this.rules.del.exec(src)) { src = src.substring(cap[0].length); out += this.renderer.del(this.output(cap[1])); continue; } // autolink if (cap = this.rules.autolink.exec(src)) { src = src.substring(cap[0].length); if (cap[2] === '@') { text = escape(this.mangle(cap[1])); href = 'mailto:' + text; } else { text = escape(cap[1]); href = text; } out += this.renderer.link(href, null, text); continue; } // url (gfm) if (!this.inLink && (cap = this.rules.url.exec(src))) { if (cap[2] === '@') { text = escape(cap[0]); href = 'mailto:' + text; } else { // do extended autolink path validation do { prevCapZero = cap[0]; cap[0] = this.rules._backpedal.exec(cap[0])[0]; } while (prevCapZero !== cap[0]); text = escape(cap[0]); if (cap[1] === 'www.') { href = 'http://' + text; } else { href = text; } } src = src.substring(cap[0].length); out += this.renderer.link(href, null, text); continue; } // text if (cap = this.rules.text.exec(src)) { src = src.substring(cap[0].length); if (this.inRawBlock) { out += this.renderer.text(this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0]); } else { out += this.renderer.text(escape(this.smartypants(cap[0]))); } continue; } if (src) { throw new Error('Infinite loop on byte: ' + src.charCodeAt(0)); } } return out; }; InlineLexer.escapes = function escapes(text) { return text ? text.replace(InlineLexer.rules._escapes, '$1') : text; } /** * Compile Link */ ; _proto.outputLink = function outputLink(cap, link) { var href = link.href, title = link.title ? escape(link.title) : null; return cap[0].charAt(0) !== '!' ? this.renderer.link(href, title, this.output(cap[1])) : this.renderer.image(href, title, escape(cap[1])); } /** * Smartypants Transformations */ ; _proto.smartypants = function smartypants(text) { if (!this.options.smartypants) return text; return text // em-dashes .replace(/---/g, "\u2014") // en-dashes .replace(/--/g, "\u2013") // opening singles .replace(/(^|[-\u2014/(\[{"\s])'/g, "$1\u2018") // closing singles & apostrophes .replace(/'/g, "\u2019") // opening doubles .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, "$1\u201C") // closing doubles .replace(/"/g, "\u201D") // ellipses .replace(/\.{3}/g, "\u2026"); } /** * Mangle Links */ ; _proto.mangle = function mangle(text) { if (!this.options.mangle) return text; var l = text.length; var out = '', i = 0, ch; for (; i < l; i++) { ch = text.charCodeAt(i); if (Math.random() > 0.5) { ch = 'x' + ch.toString(16); } out += '&#' + ch + ';'; } return out; }; (0, _createClass2.default)(InlineLexer, null, [{ key: "rules", get: function get() { return inline; } }]); return InlineLexer; }(); /***/ }), /***/ 774: /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * TextRenderer * returns only the textual part of the token */ module.exports = /*#__PURE__*/function () { function TextRenderer() {} var _proto = TextRenderer.prototype; // no need for block level renderers _proto.strong = function strong(text) { return text; }; _proto.em = function em(text) { return text; }; _proto.codespan = function codespan(text) { return text; }; _proto.del = function del(text) { return text; }; _proto.html = function html(text) { return text; }; _proto.text = function text(_text) { return _text; }; _proto.link = function link(href, title, text) { return '' + text; }; _proto.image = function image(href, title, text) { return '' + text; }; _proto.br = function br() { return ''; }; return TextRenderer; }(); /***/ }), /***/ 825: /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(55); var _typeof2 = _interopRequireDefault(__webpack_require__(43)); var Lexer = __webpack_require__(826); var Parser = __webpack_require__(827); var Renderer = __webpack_require__(762); var TextRenderer = __webpack_require__(774); var InlineLexer = __webpack_require__(773); var Slugger = __webpack_require__(772); var _require = __webpack_require__(753), merge = _require.merge, checkSanitizeDeprecation = _require.checkSanitizeDeprecation, escape = _require.escape; var _require2 = __webpack_require__(755), getDefaults = _require2.getDefaults, changeDefaults = _require2.changeDefaults, defaults = _require2.defaults; /** * Marked */ function marked(src, opt, callback) { // throw error in case of non string input if (typeof src === 'undefined' || src === null) { throw new Error('marked(): input parameter is undefined or null'); } if (typeof src !== 'string') { throw new Error('marked(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected'); } if (callback || typeof opt === 'function') { var _ret = function () { if (!callback) { callback = opt; opt = null; } opt = merge({}, marked.defaults, opt || {}); checkSanitizeDeprecation(opt); var highlight = opt.highlight; var tokens, pending, i = 0; try { tokens = Lexer.lex(src, opt); } catch (e) { return { v: callback(e) }; } pending = tokens.length; var done = function done(err) { if (err) { opt.highlight = highlight; return callback(err); } var out; try { out = Parser.parse(tokens, opt); } catch (e) { err = e; } opt.highlight = highlight; return err ? callback(err) : callback(null, out); }; if (!highlight || highlight.length < 3) { return { v: done() }; } delete opt.highlight; if (!pending) return { v: done() }; for (; i < tokens.length; i++) { (function (token) { if (token.type !== 'code') { return --pending || done(); } return highlight(token.text, token.lang, function (err, code) { if (err) return done(err); if (code == null || code === token.text) { return --pending || done(); } token.text = code; token.escaped = true; --pending || done(); }); })(tokens[i]); } return { v: void 0 }; }(); if ((0, _typeof2.default)(_ret) === "object") return _ret.v; } try { opt = merge({}, marked.defaults, opt || {}); checkSanitizeDeprecation(opt); return Parser.parse(Lexer.lex(src, opt), opt); } catch (e) { e.message += '\nPlease report this to https://github.com/markedjs/marked.'; if ((opt || marked.defaults).silent) { return '<p>An error occurred:</p><pre>' + escape(e.message + '', true) + '</pre>'; } throw e; } } /** * Options */ marked.options = marked.setOptions = function (opt) { merge(marked.defaults, opt); changeDefaults(marked.defaults); return marked; }; marked.getDefaults = getDefaults; marked.defaults = defaults; /** * Expose */ marked.Parser = Parser; marked.parser = Parser.parse; marked.Renderer = Renderer; marked.TextRenderer = TextRenderer; marked.Lexer = Lexer; marked.lexer = Lexer.lex; marked.InlineLexer = InlineLexer; marked.inlineLexer = InlineLexer.output; marked.Slugger = Slugger; marked.parse = marked; module.exports = marked; /***/ }), /***/ 826: /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(55); var _createClass2 = _interopRequireDefault(__webpack_require__(40)); var _require = __webpack_require__(755), defaults = _require.defaults; var _require2 = __webpack_require__(771), block = _require2.block; var _require3 = __webpack_require__(753), rtrim = _require3.rtrim, splitCells = _require3.splitCells, escape = _require3.escape; /** * Block Lexer */ module.exports = /*#__PURE__*/function () { function Lexer(options) { this.tokens = []; this.tokens.links = Object.create(null); this.options = options || defaults; this.rules = block.normal; if (this.options.pedantic) { this.rules = block.pedantic; } else if (this.options.gfm) { this.rules = block.gfm; } } /** * Expose Block Rules */ /** * Static Lex Method */ Lexer.lex = function lex(src, options) { var lexer = new Lexer(options); return lexer.lex(src); }; var _proto = Lexer.prototype; /** * Preprocessing */ _proto.lex = function lex(src) { src = src.replace(/\r\n|\r/g, '\n').replace(/\t/g, ' '); return this.token(src, true); }; /** * Lexing */ _proto.token = function token(src, top) { src = src.replace(/^ +$/gm, ''); var next, loose, cap, bull, b, item, listStart, listItems, t, space, i, tag, l, isordered, istask, ischecked; while (src) { // newline if (cap = this.rules.newline.exec(src)) { src = src.substring(cap[0].length); if (cap[0].length > 1) { this.tokens.push({ type: 'space' }); } } // code if (cap = this.rules.code.exec(src)) { var lastToken = this.tokens[this.tokens.length - 1]; src = src.substring(cap[0].length); // An indented code block cannot interrupt a paragraph. if (lastToken && lastToken.type === 'paragraph') { lastToken.text += '\n' + cap[0].trimRight(); } else { cap = cap[0].replace(/^ {4}/gm, ''); this.tokens.push({ type: 'code', codeBlockStyle: 'indented', text: !this.options.pedantic ? rtrim(cap, '\n') : cap }); } continue; } // fences if (cap = this.rules.fences.exec(src)) { src = src.substring(cap[0].length); this.tokens.push({ type: 'code', lang: cap[2] ? cap[2].trim() : cap[2], text: cap[3] || '' }); continue; } // heading if (cap = this.rules.heading.exec(src)) { src = src.substring(cap[0].length); this.tokens.push({ type: 'heading', depth: cap[1].length, text: cap[2] }); continue; } // table no leading pipe (gfm) if (cap = this.rules.nptable.exec(src)) { item = { type: 'table', header: splitCells(cap[1].replace(/^ *| *\| *$/g, '')), align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [] }; if (item.header.length === item.align.length) { src = src.substring(cap[0].length); for (i = 0; i < item.align.length; i++) { if (/^ *-+: *$/.test(item.align[i])) { item.align[i] = 'right'; } else if (/^ *:-+: *$/.test(item.align[i])) { item.align[i] = 'center'; } else if (/^ *:-+ *$/.test(item.align[i])) { item.align[i] = 'left'; } else { item.align[i] = null; } } for (i = 0; i < item.cells.length; i++) { item.cells[i] = splitCells(item.cells[i], item.header.length); } this.tokens.push(item); continue; } } // hr if (cap = this.rules.hr.exec(src)) { src = src.substring(cap[0].length); this.tokens.push({ type: 'hr' }); continue; } // blockquote if (cap = this.rules.blockquote.exec(src)) { src = src.substring(cap[0].length); this.tokens.push({ type: 'blockquote_start' }); cap = cap[0].replace(/^ *> ?/gm, ''); // Pass `top` to keep the current // "toplevel" state. This is exactly // how markdown.pl works. this.token(cap, top); this.tokens.push({ type: 'blockquote_end' }); continue; } // list if (cap = this.rules.list.exec(src)) { src = src.substring(cap[0].length); bull = cap[2]; isordered = bull.length > 1; listStart = { type: 'list_start', ordered: isordered, start: isordered ? +bull : '', loose: false }; this.tokens.push(listStart); // Get each top-level item. cap = cap[0].match(this.rules.item); listItems = []; next = false; l = cap.length; i = 0; for (; i < l; i++) { item = cap[i]; // Remove the list item's bullet // so it is seen as the next token. space = item.length; item = item.replace(/^ *([*+-]|\d+\.) */, ''); // Outdent whatever the // list item contains. Hacky. if (~item.indexOf('\n ')) { space -= item.length; item = !this.options.pedantic ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') : item.replace(/^ {1,4}/gm, ''); } // Determine whether the next list item belongs here. // Backpedal if it does not belong in this list. if (i !== l - 1) { b = block.bullet.exec(cap[i + 1])[0]; if (bull.length > 1 ? b.length === 1 : b.length > 1 || this.options.smartLists && b !== bull) { src = cap.slice(i + 1).join('\n') + src; i = l - 1; } } // Determine whether item is loose or not. // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ // for discount behavior. loose = next || /\n\n(?!\s*$)/.test(item); if (i !== l - 1) { next = item.charAt(item.length - 1) === '\n'; if (!loose) loose = next; } if (loose) { listStart.loose = true; } // Check for task list items istask = /^\[[ xX]\] /.test(item); ischecked = undefined; if (istask) { ischecked = item[1] !== ' '; item = item.replace(/^\[[ xX]\] +/, ''); } t = { type: 'list_item_start', task: istask, checked: ischecked, loose: loose }; listItems.push(t); this.tokens.push(t); // Recurse. this.token(item, false); this.tokens.push({ type: 'list_item_end' }); } if (listStart.loose) { l = listItems.length; i = 0; for (; i < l; i++) { listItems[i].loose = true; } } this.tokens.push({ type: 'list_end' }); continue; } // html if (cap = this.rules.html.exec(src)) { src = src.substring(cap[0].length); this.tokens.push({ type: this.options.sanitize ? 'paragraph' : 'html', pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0] }); continue; } // def if (top && (cap = this.rules.def.exec(src))) { src = src.substring(cap[0].length); if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1); tag = cap[1].toLowerCase().replace(/\s+/g, ' '); if (!this.tokens.links[tag]) { this.tokens.links[tag] = { href: cap[2], title: cap[3] }; } continue; } // table (gfm) if (cap = this.rules.table.exec(src)) { item = { type: 'table', header: splitCells(cap[1].replace(/^ *| *\| *$/g, '')), align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [] }; if (item.header.length === item.align.length) { src = src.substring(cap[0].length); for (i = 0; i < item.align.length; i++) { if (/^ *-+: *$/.test(item.align[i])) { item.align[i] = 'right'; } else if (/^ *:-+: *$/.test(item.align[i])) { item.align[i] = 'center'; } else if (/^ *:-+ *$/.test(item.align[i])) { item.align[i] = 'left'; } else { item.align[i] = null; } } for (i = 0; i < item.cells.length; i++) { item.cells[i] = splitCells(item.cells[i].replace(/^ *\| *| *\| *$/g, ''), item.header.length); } this.tokens.push(item); continue; } } // lheading if (cap = this.rules.lheading.exec(src)) { src = src.substring(cap[0].length); this.tokens.push({ type: 'heading', depth: cap[2].charAt(0) === '=' ? 1 : 2, text: cap[1] }); continue; } // top-level paragraph if (top && (cap = this.rules.paragraph.exec(src))) { src = src.substring(cap[0].length); this.tokens.push({ type: 'paragraph', text: cap[1].charAt(cap[1].length - 1) === '\n' ? cap[1].slice(0, -1) : cap[1] }); continue; } // text if (cap = this.rules.text.exec(src)) { // Top-level should never reach here. src = src.substring(cap[0].length); this.tokens.push({ type: 'text', text: cap[0] }); continue; } if (src) { throw new Error('Infinite loop on byte: ' + src.charCodeAt(0)); } } return this.tokens; }; (0, _createClass2.default)(Lexer, null, [{ key: "rules", get: function get() { return block; } }]); return Lexer; }(); /***/ }), /***/ 827: /***/ (function(module, exports, __webpack_require__) { "use strict"; var Renderer = __webpack_require__(762); var Slugger = __webpack_require__(772); var InlineLexer = __webpack_require__(773); var TextRenderer = __webpack_require__(774); var _require = __webpack_require__(755), defaults = _require.defaults; var _require2 = __webpack_require__(753), merge = _require2.merge, unescape = _require2.unescape; /** * Parsing & Compiling */ module.exports = /*#__PURE__*/function () { function Parser(options) { this.tokens = []; this.token = null; this.options = options || defaults; this.options.renderer = this.options.renderer || new Renderer(); this.renderer = this.options.renderer; this.renderer.options = this.options; this.slugger = new Slugger(); } /** * Static Parse Method */ Parser.parse = function parse(tokens, options) { var parser = new Parser(options); return parser.parse(tokens); }; var _proto = Parser.prototype; /** * Parse Loop */ _proto.parse = function parse(tokens) { this.inline = new InlineLexer(tokens.links, this.options); // use an InlineLexer with a TextRenderer to extract pure text this.inlineText = new InlineLexer(tokens.links, merge({}, this.options, { renderer: new TextRenderer() })); this.tokens = tokens.reverse(); var out = ''; while (this.next()) { out += this.tok(); } return out; }; /** * Next Token */ _proto.next = function next() { this.token = this.tokens.pop(); return this.token; }; /** * Preview Next Token */ _proto.peek = function peek() { return this.tokens[this.tokens.length - 1] || 0; }; /** * Parse Text Tokens */ _proto.parseText = function parseText() { var body = this.token.text; while (this.peek().type === 'text') { body += '\n' + this.next().text; } return this.inline.output(body); }; /** * Parse Current Token */ _proto.tok = function tok() { var body = ''; switch (this.token.type) { case 'space': { return ''; } case 'hr': { return this.renderer.hr(); } case 'heading': { return this.renderer.heading(this.inline.output(this.token.text), this.token.depth, unescape(this.inlineText.output(this.token.text)), this.slugger); } case 'code': { return this.renderer.code(this.token.text, this.token.lang, this.token.escaped); } case 'table': { var header = '', i, row, cell, j; // header cell = ''; for (i = 0; i < this.token.header.length; i++) { cell += this.renderer.tablecell(this.inline.output(this.token.header[i]), { header: true, align: this.token.align[i] }); } header += this.renderer.tablerow(cell); for (i = 0; i < this.token.cells.length; i++) { row = this.token.cells[i]; cell = ''; for (j = 0; j < row.length; j++) { cell += this.renderer.tablecell(this.inline.output(row[j]), { header: false, align: this.token.align[j] }); } body += this.renderer.tablerow(cell); } return this.renderer.table(header, body); } case 'blockquote_start': { body = ''; while (this.next().type !== 'blockquote_end') { body += this.tok(); } return this.renderer.blockquote(body); } case 'list_start': { body = ''; var ordered = this.token.ordered, start = this.token.start; while (this.next().type !== 'list_end') { body += this.tok(); } return this.renderer.list(body, ordered, start); } case 'list_item_start': { body = ''; var loose = this.token.loose; var checked = this.token.checked; var task = this.token.task; if (this.token.task) { if (loose) { if (this.peek().type === 'text') { var nextToken = this.peek(); nextToken.text = this.renderer.checkbox(checked) + ' ' + nextToken.text; } else { this.tokens.push({ type: 'text', text: this.renderer.checkbox(checked) }); } } else { body += this.renderer.checkbox(checked); } } while (this.next().type !== 'list_item_end') { body += !loose && this.token.type === 'text' ? this.parseText() : this.tok(); } return this.renderer.listitem(body, task, checked); } case 'html': { // TODO parse inline content if parameter markdown=1 return this.renderer.html(this.token.text); } case 'paragraph': { return this.renderer.paragraph(this.inline.output(this.token.text)); } case 'text': { return this.renderer.paragraph(this.parseText()); } default: { var errMsg = 'Token with "' + this.token.type + '" type was not found.'; if (this.options.silent) { console.log(errMsg); } else { throw new Error(errMsg); } } } }; return Parser; }(); /***/ }), /***/ 828: /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) { /* ********************************************** Begin prism-core.js ********************************************** */ var _self = (typeof window !== 'undefined') ? window // if in browser : ( (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) ? self // if in worker : {} // if in node js ); /** * Prism: Lightweight, robust, elegant syntax highlighting * MIT license http://www.opensource.org/licenses/mit-license.php/ * @author Lea Verou http://lea.verou.me */ var Prism = (function (_self){ // Private helper vars var lang = /\blang(?:uage)?-([\w-]+)\b/i; var uniqueId = 0; var _ = { manual: _self.Prism && _self.Prism.manual, disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, util: { encode: function encode(tokens) { if (tokens instanceof Token) { return new Token(tokens.type, encode(tokens.content), tokens.alias); } else if (Array.isArray(tokens)) { return tokens.map(encode); } else { return tokens.replace(/&/g, '&').replace(/</g, '<').replace(/\u00a0/g, ' '); } }, type: function (o) { return Object.prototype.toString.call(o).slice(8, -1); }, objId: function (obj) { if (!obj['__id']) { Object.defineProperty(obj, '__id', { value: ++uniqueId }); } return obj['__id']; }, // Deep clone a language definition (e.g. to extend it) clone: function deepClone(o, visited) { var clone, id, type = _.util.type(o); visited = visited || {}; switch (type) { case 'Object': id = _.util.objId(o); if (visited[id]) { return visited[id]; } clone = {}; visited[id] = clone; for (var key in o) { if (o.hasOwnProperty(key)) { clone[key] = deepClone(o[key], visited); } } return clone; case 'Array': id = _.util.objId(o); if (visited[id]) { return visited[id]; } clone = []; visited[id] = clone; o.forEach(function (v, i) { clone[i] = deepClone(v, visited); }); return clone; default: return o; } }, /** * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class. * * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned. * * @param {Element} element * @returns {string} */ getLanguage: function (element) { while (element && !lang.test(element.className)) { element = element.parentElement; } if (element) { return (element.className.match(lang) || [, 'none'])[1].toLowerCase(); } return 'none'; }, /** * Returns the script element that is currently executing. * * This does __not__ work for line script element. * * @returns {HTMLScriptElement | null} */ currentScript: function () { if (typeof document === 'undefined') { return null; } if ('currentScript' in document) { return document.currentScript; } // IE11 workaround // we'll get the src of the current script by parsing IE11's error stack trace // this will not work for inline scripts try { throw new Error(); } catch (err) { // Get file src url from stack. Specifically works with the format of stack traces in IE. // A stack will look like this: // // Error // at _.util.currentScript (http://localhost/components/prism-core.js:119:5) // at Global code (http://localhost/components/prism-core.js:606:1) var src = (/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(err.stack) || [])[1]; if (src) { var scripts = document.getElementsByTagName('script'); for (var i in scripts) { if (scripts[i].src == src) { return scripts[i]; } } } return null; } } }, languages: { extend: function (id, redef) { var lang = _.util.clone(_.languages[id]); for (var key in redef) { lang[key] = redef[key]; } return lang; }, /** * Insert a token before another token in a language literal * As this needs to recreate the object (we cannot actually insert before keys in object literals), * we cannot just provide an object, we need an object and a key. * @param inside The key (or language id) of the parent * @param before The key to insert before. * @param insert Object with the key/value pairs to insert * @param root The object that contains `inside`. If equal to Prism.languages, it can be omitted. */ insertBefore: function (inside, before, insert, root) { root = root || _.languages; var grammar = root[inside]; var ret = {}; for (var token in grammar) { if (grammar.hasOwnProperty(token)) { if (token == before) { for (var newToken in insert) { if (insert.hasOwnProperty(newToken)) { ret[newToken] = insert[newToken]; } } } // Do not insert token which also occur in insert. See #1525 if (!insert.hasOwnProperty(token)) { ret[token] = grammar[token]; } } } var old = root[inside]; root[inside] = ret; // Update references in other language definitions _.languages.DFS(_.languages, function(key, value) { if (value === old && key != inside) { this[key] = ret; } }); return ret; }, // Traverse a language definition with Depth First Search DFS: function DFS(o, callback, type, visited) { visited = visited || {}; var objId = _.util.objId; for (var i in o) { if (o.hasOwnProperty(i)) { callback.call(o, i, o[i], type || i); var property = o[i], propertyType = _.util.type(property); if (propertyType === 'Object' && !visited[objId(property)]) { visited[objId(property)] = true; DFS(property, callback, null, visited); } else if (propertyType === 'Array' && !visited[objId(property)]) { visited[objId(property)] = true; DFS(property, callback, i, visited); } } } } }, plugins: {}, highlightAll: function(async, callback) { _.highlightAllUnder(document, async, callback); }, highlightAllUnder: function(container, async, callback) { var env = { callback: callback, container: container, selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' }; _.hooks.run('before-highlightall', env); env.elements = Array.prototype.slice.apply(env.container.querySelectorAll(env.selector)); _.hooks.run('before-all-elements-highlight', env); for (var i = 0, element; element = env.elements[i++];) { _.highlightElement(element, async === true, env.callback); } }, highlightElement: function(element, async, callback) { // Find language var language = _.util.getLanguage(element); var grammar = _.languages[language]; // Set language on the element, if not present element.className = element.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language; // Set language on the parent, for styling var parent = element.parentNode; if (parent && parent.nodeName.toLowerCase() === 'pre') { parent.className = parent.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language; } var code = element.textContent; var env = { element: element, language: language, grammar: grammar, code: code }; function insertHighlightedCode(highlightedCode) { env.highlightedCode = highlightedCode; _.hooks.run('before-insert', env); env.element.innerHTML = env.highlightedCode; _.hooks.run('after-highlight', env); _.hooks.run('complete', env); callback && callback.call(env.element); } _.hooks.run('before-sanity-check', env); if (!env.code) { _.hooks.run('complete', env); callback && callback.call(env.element); return; } _.hooks.run('before-highlight', env); if (!env.grammar) { insertHighlightedCode(_.util.encode(env.code)); return; } if (async && _self.Worker) { var worker = new Worker(_.filename); worker.onmessage = function(evt) { insertHighlightedCode(evt.data); }; worker.postMessage(JSON.stringify({ language: env.language, code: env.code, immediateClose: true })); } else { insertHighlightedCode(_.highlight(env.code, env.grammar, env.language)); } }, highlight: function (text, grammar, language) { var env = { code: text, grammar: grammar, language: language }; _.hooks.run('before-tokenize', env); env.tokens = _.tokenize(env.code, env.grammar); _.hooks.run('after-tokenize', env); return Token.stringify(_.util.encode(env.tokens), env.language); }, tokenize: function(text, grammar) { var rest = grammar.rest; if (rest) { for (var token in rest) { grammar[token] = rest[token]; } delete grammar.rest; } var tokenList = new LinkedList(); addAfter(tokenList, tokenList.head, text); matchGrammar(text, tokenList, grammar, tokenList.head, 0); return toArray(tokenList); }, hooks: { all: {}, add: function (name, callback) { var hooks = _.hooks.all; hooks[name] = hooks[name] || []; hooks[name].push(callback); }, run: function (name, env) { var callbacks = _.hooks.all[name]; if (!callbacks || !callbacks.length) { return; } for (var i=0, callback; callback = callbacks[i++];) { callback(env); } } }, Token: Token }; _self.Prism = _; function Token(type, content, alias, matchedStr, greedy) { this.type = type; this.content = content; this.alias = alias; // Copy of the full string this token was created from this.length = (matchedStr || '').length|0; this.greedy = !!greedy; } Token.stringify = function stringify(o, language) { if (typeof o == 'string') { return o; } if (Array.isArray(o)) { var s = ''; o.forEach(function (e) { s += stringify(e, language); }); return s; } var env = { type: o.type, content: stringify(o.content, language), tag: 'span', classes: ['token', o.type], attributes: {}, language: language }; var aliases = o.alias; if (aliases) { if (Array.isArray(aliases)) { Array.prototype.push.apply(env.classes, aliases); } else { env.classes.push(aliases); } } _.hooks.run('wrap', env); var attributes = ''; for (var name in env.attributes) { attributes += ' ' + name + '="' + (env.attributes[name] || '').replace(/"/g, '"') + '"'; } return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + attributes + '>' + env.content + '</' + env.tag + '>'; }; /** * @param {string} text * @param {LinkedList<string | Token>} tokenList * @param {any} grammar * @param {LinkedListNode<string | Token>} startNode * @param {number} startPos * @param {boolean} [oneshot=false] * @param {string} [target] */ function matchGrammar(text, tokenList, grammar, startNode, startPos, oneshot, target) { for (var token in grammar) { if (!grammar.hasOwnProperty(token) || !grammar[token]) { continue; } var patterns = grammar[token]; patterns = Array.isArray(patterns) ? patterns : [patterns]; for (var j = 0; j < patterns.length; ++j) { if (target && target == token + ',' + j) { return; } var pattern = patterns[j], inside = pattern.inside, lookbehind = !!pattern.lookbehind, greedy = !!pattern.greedy, lookbehindLength = 0, alias = pattern.alias; if (greedy && !pattern.pattern.global) { // Without the global flag, lastIndex won't work var flags = pattern.pattern.toString().match(/[imsuy]*$/)[0]; pattern.pattern = RegExp(pattern.pattern.source, flags + 'g'); } pattern = pattern.pattern || pattern; for ( // iterate the token list and keep track of the current token/string position var currentNode = startNode.next, pos = startPos; currentNode !== tokenList.tail; pos += currentNode.value.length, currentNode = currentNode.next ) { var str = currentNode.value; if (tokenList.length > text.length) { // Something went terribly wrong, ABORT, ABORT! return; } if (str instanceof Token) { continue; } var removeCount = 1; // this is the to parameter of removeBetween if (greedy && currentNode != tokenList.tail.prev) { pattern.lastIndex = pos; var match = pattern.exec(text); if (!match) { break; } var from = match.index + (lookbehind && match[1] ? match[1].length : 0); var to = match.index + match[0].length; var p = pos; // find the node that contains the match p += currentNode.value.length; while (from >= p) { currentNode = currentNode.next; p += currentNode.value.length; } // adjust pos (and p) p -= currentNode.value.length; pos = p; // the current node is a Token, then the match starts inside another Token, which is invalid if (currentNode.value instanceof Token) { continue; } // find the last node which is affected by this match for ( var k = currentNode; k !== tokenList.tail && (p < to || (typeof k.value === 'string' && !k.prev.value.greedy)); k = k.next ) { removeCount++; p += k.value.length; } removeCount--; // replace with the new match str = text.slice(pos, p); match.index -= pos; } else { pattern.lastIndex = 0; var match = pattern.exec(str); } if (!match) { if (oneshot) { break; } continue; } if (lookbehind) { lookbehindLength = match[1] ? match[1].length : 0; } var from = match.index + lookbehindLength, match = match[0].slice(lookbehindLength), to = from + match.length, before = str.slice(0, from), after = str.slice(to); var removeFrom = currentNode.prev; if (before) { removeFrom = addAfter(tokenList, removeFrom, before); pos += before.length; } removeRange(tokenList, removeFrom, removeCount); var wrapped = new Token(token, inside ? _.tokenize(match, inside) : match, alias, match, greedy); currentNode = addAfter(tokenList, removeFrom, wrapped); if (after) { addAfter(tokenList, currentNode, after); } if (removeCount > 1) matchGrammar(text, tokenList, grammar, currentNode.prev, pos, true, token + ',' + j); if (oneshot) break; } } } } /** * @typedef LinkedListNode * @property {T} value * @property {LinkedListNode<T> | null} prev The previous node. * @property {LinkedListNode<T> | null} next The next node. * @template T */ /** * @template T */ function LinkedList() { /** @type {LinkedListNode<T>} */ var head = { value: null, prev: null, next: null }; /** @type {LinkedListNode<T>} */ var tail = { value: null, prev: head, next: null }; head.next = tail; /** @type {LinkedListNode<T>} */ this.head = head; /** @type {LinkedListNode<T>} */ this.tail = tail; this.length = 0; } /** * Adds a new node with the given value to the list. * @param {LinkedList<T>} list * @param {LinkedListNode<T>} node * @param {T} value * @returns {LinkedListNode<T>} The added node. * @template T */ function addAfter(list, node, value) { // assumes that node != list.tail && values.length >= 0 var next = node.next; var newNode = { value: value, prev: node, next: next }; node.next = newNode; next.prev = newNode; list.length++; return newNode; } /** * Removes `count` nodes after the given node. The given node will not be removed. * @param {LinkedList<T>} list * @param {LinkedListNode<T>} node * @param {number} count * @template T */ function removeRange(list, node, count) { var next = node.next; for (var i = 0; i < count && next !== list.tail; i++) { next = next.next; } node.next = next; next.prev = node; list.length -= i; } /** * @param {LinkedList<T>} list * @returns {T[]} * @template T */ function toArray(list) { var array = []; var node = list.head.next; while (node !== list.tail) { array.push(node.value); node = node.next; } return array; } if (!_self.document) { if (!_self.addEventListener) { // in Node.js return _; } if (!_.disableWorkerMessageHandler) { // In worker _self.addEventListener('message', function (evt) { var message = JSON.parse(evt.data), lang = message.language, code = message.code, immediateClose = message.immediateClose; _self.postMessage(_.highlight(code, _.languages[lang], lang)); if (immediateClose) { _self.close(); } }, false); } return _; } //Get current script and highlight var script = _.util.currentScript(); if (script) { _.filename = script.src; if (script.hasAttribute('data-manual')) { _.manual = true; } } function highlightAutomaticallyCallback() { if (!_.manual) { _.highlightAll(); } } if (!_.manual) { // If the document state is "loading", then we'll use DOMContentLoaded. // If the document state is "interactive" and the prism.js script is deferred, then we'll also use the // DOMContentLoaded event because there might be some plugins or languages which have also been deferred and they // might take longer one animation frame to execute which can create a race condition where only some plugins have // been loaded when Prism.highlightAll() is executed, depending on how fast resources are loaded. // See https://github.com/PrismJS/prism/issues/2102 var readyState = document.readyState; if (readyState === 'loading' || readyState === 'interactive' && script && script.defer) { document.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback); } else { if (window.requestAnimationFrame) { window.requestAnimationFrame(highlightAutomaticallyCallback); } else { window.setTimeout(highlightAutomaticallyCallback, 16); } } } return _; })(_self); if ( true && module.exports) { module.exports = Prism; } // hack for components to work correctly in node.js if (typeof global !== 'undefined') { global.Prism = Prism; } /* ********************************************** Begin prism-markup.js ********************************************** */ Prism.languages.markup = { 'comment': /<!--[\s\S]*?-->/, 'prolog': /<\?[\s\S]+?\?>/, 'doctype': { pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!<!--)[^"'\]]|"[^"]*"|'[^']*'|<!--[\s\S]*?-->)*\]\s*)?>/i, greedy: true }, 'cdata': /<!\[CDATA\[[\s\S]*?]]>/i, 'tag': { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i, greedy: true, inside: { 'tag': { pattern: /^<\/?[^\s>\/]+/i, inside: { 'punctuation': /^<\/?/, 'namespace': /^[^\s>\/:]+:/ } }, 'attr-value': { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i, inside: { 'punctuation': [ /^=/, { pattern: /^(\s*)["']|["']$/, lookbehind: true } ] } }, 'punctuation': /\/?>/, 'attr-name': { pattern: /[^\s>\/]+/, inside: { 'namespace': /^[^\s>\/:]+:/ } } } }, 'entity': /&#?[\da-z]{1,8};/i }; Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] = Prism.languages.markup['entity']; // Plugin to make entity title show the real entity, idea by Roman Komarov Prism.hooks.add('wrap', function(env) { if (env.type === 'entity') { env.attributes['title'] = env.content.replace(/&/, '&'); } }); Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { /** * Adds an inlined language to markup. * * An example of an inlined language is CSS with `<style>` tags. * * @param {string} tagName The name of the tag that contains the inlined language. This name will be treated as * case insensitive. * @param {string} lang The language key. * @example * addInlined('style', 'css'); */ value: function addInlined(tagName, lang) { var includedCdataInside = {}; includedCdataInside['language-' + lang] = { pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i, lookbehind: true, inside: Prism.languages[lang] }; includedCdataInside['cdata'] = /^<!\[CDATA\[|\]\]>$/i; var inside = { 'included-cdata': { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: includedCdataInside } }; inside['language-' + lang] = { pattern: /[\s\S]+/, inside: Prism.languages[lang] }; var def = {}; def[tagName] = { pattern: RegExp(/(<__[\s\S]*?>)(?:<!\[CDATA\[[\s\S]*?\]\]>\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function () { return tagName; }), 'i'), lookbehind: true, greedy: true, inside: inside }; Prism.languages.insertBefore('markup', 'cdata', def); } }); Prism.languages.xml = Prism.languages.extend('markup', {}); Prism.languages.html = Prism.languages.markup; Prism.languages.mathml = Prism.languages.markup; Prism.languages.svg = Prism.languages.markup; /* ********************************************** Begin prism-css.js ********************************************** */ (function (Prism) { var string = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/; Prism.languages.css = { 'comment': /\/\*[\s\S]*?\*\//, 'atrule': { pattern: /@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/, inside: { 'rule': /^@[\w-]+/, 'selector-function-argument': { pattern: /(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/, lookbehind: true, alias: 'selector' } // See rest below } }, 'url': { pattern: RegExp('url\\((?:' + string.source + '|[^\n\r()]*)\\)', 'i'), greedy: true, inside: { 'function': /^url/i, 'punctuation': /^\(|\)$/ } }, 'selector': RegExp('[^{}\\s](?:[^{};"\']|' + string.source + ')*?(?=\\s*\\{)'), 'string': { pattern: string, greedy: true }, 'property': /[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i, 'important': /!important\b/i, 'function': /[-a-z0-9]+(?=\()/i, 'punctuation': /[(){};:,]/ }; Prism.languages.css['atrule'].inside.rest = Prism.languages.css; var markup = Prism.languages.markup; if (markup) { markup.tag.addInlined('style', 'css'); Prism.languages.insertBefore('inside', 'attr-value', { 'style-attr': { pattern: /\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i, inside: { 'attr-name': { pattern: /^\s*style/i, inside: markup.tag.inside }, 'punctuation': /^\s*=\s*['"]|['"]\s*$/, 'attr-value': { pattern: /.+/i, inside: Prism.languages.css } }, alias: 'language-css' } }, markup.tag); } }(Prism)); /* ********************************************** Begin prism-clike.js ********************************************** */ Prism.languages.clike = { 'comment': [ { pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: true }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: true, greedy: true } ], 'string': { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: true }, 'class-name': { pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: true, inside: { 'punctuation': /[.\\]/ } }, 'keyword': /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, 'boolean': /\b(?:true|false)\b/, 'function': /\w+(?=\()/, 'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i, 'operator': /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, 'punctuation': /[{}[\];(),.:]/ }; /* ********************************************** Begin prism-javascript.js ********************************************** */ Prism.languages.javascript = Prism.languages.extend('clike', { 'class-name': [ Prism.languages.clike['class-name'], { pattern: /(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/, lookbehind: true } ], 'keyword': [ { pattern: /((?:^|})\s*)(?:catch|finally)\b/, lookbehind: true }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: true }, ], 'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) 'function': /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, 'operator': /--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/ }); Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/; Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/, lookbehind: true, greedy: true }, // This must be declared before keyword because we use "function" inside the look-forward 'function-variable': { pattern: /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/, alias: 'function' }, 'parameter': [ { pattern: /(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/, lookbehind: true, inside: Prism.languages.javascript }, { pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i, inside: Prism.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/, lookbehind: true, inside: Prism.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, lookbehind: true, inside: Prism.languages.javascript } ], 'constant': /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }); Prism.languages.insertBefore('javascript', 'string', { 'template-string': { pattern: /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/, greedy: true, inside: { 'template-punctuation': { pattern: /^`|`$/, alias: 'string' }, 'interpolation': { pattern: /((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/, lookbehind: true, inside: { 'interpolation-punctuation': { pattern: /^\${|}$/, alias: 'punctuation' }, rest: Prism.languages.javascript } }, 'string': /[\s\S]+/ } } }); if (Prism.languages.markup) { Prism.languages.markup.tag.addInlined('script', 'javascript'); } Prism.languages.js = Prism.languages.javascript; /* ********************************************** Begin prism-file-highlight.js ********************************************** */ (function () { if (typeof self === 'undefined' || !self.Prism || !self.document || !document.querySelector) { return; } /** * @param {Element} [container=document] */ self.Prism.fileHighlight = function(container) { container = container || document; var Extensions = { 'js': 'javascript', 'py': 'python', 'rb': 'ruby', 'ps1': 'powershell', 'psm1': 'powershell', 'sh': 'bash', 'bat': 'batch', 'h': 'c', 'tex': 'latex' }; Array.prototype.slice.call(container.querySelectorAll('pre[data-src]')).forEach(function (pre) { // ignore if already loaded if (pre.hasAttribute('data-src-loaded')) { return; } // load current var src = pre.getAttribute('data-src'); var language, parent = pre; var lang = /\blang(?:uage)?-([\w-]+)\b/i; while (parent && !lang.test(parent.className)) { parent = parent.parentNode; } if (parent) { language = (pre.className.match(lang) || [, ''])[1]; } if (!language) { var extension = (src.match(/\.(\w+)$/) || [, ''])[1]; language = Extensions[extension] || extension; } var code = document.createElement('code'); code.className = 'language-' + language; pre.textContent = ''; code.textContent = 'Loading…'; pre.appendChild(code); var xhr = new XMLHttpRequest(); xhr.open('GET', src, true); xhr.onreadystatechange = function () { if (xhr.readyState == 4) { if (xhr.status < 400 && xhr.responseText) { code.textContent = xhr.responseText; Prism.highlightElement(code); // mark as loaded pre.setAttribute('data-src-loaded', ''); } else if (xhr.status >= 400) { code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText; } else { code.textContent = '✖ Error: File does not exist or is empty'; } } }; xhr.send(null); }); }; document.addEventListener('DOMContentLoaded', function () { // execute inside handler, for dropping Event as argument self.Prism.fileHighlight(); }); })(); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(64))) /***/ }), /***/ 829: /***/ (function(module, exports) { (function(Prism) { var javascript = Prism.util.clone(Prism.languages.javascript); Prism.languages.jsx = Prism.languages.extend('markup', javascript); Prism.languages.jsx.tag.pattern= /<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i; Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/i; Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i; Prism.languages.jsx.tag.inside['tag'].inside['class-name'] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/; Prism.languages.insertBefore('inside', 'attr-name', { 'spread': { pattern: /\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/, inside: { 'punctuation': /\.{3}|[{}.]/, 'attr-value': /\w+/ } } }, Prism.languages.jsx.tag); Prism.languages.insertBefore('inside', 'attr-value',{ 'script': { // Allow for two levels of nesting pattern: /=(?:\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i, inside: { 'script-punctuation': { pattern: /^=(?={)/, alias: 'punctuation' }, rest: Prism.languages.jsx }, 'alias': 'language-javascript' } }, Prism.languages.jsx.tag); // The following will handle plain text inside tags var stringifyToken = function (token) { if (!token) { return ''; } if (typeof token === 'string') { return token; } if (typeof token.content === 'string') { return token.content; } return token.content.map(stringifyToken).join(''); }; var walkTokens = function (tokens) { var openedTags = []; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; var notTagNorBrace = false; if (typeof token !== 'string') { if (token.type === 'tag' && token.content[0] && token.content[0].type === 'tag') { // We found a tag, now find its kind if (token.content[0].content[0].content === '</') { // Closing tag if (openedTags.length > 0 && openedTags[openedTags.length - 1].tagName === stringifyToken(token.content[0].content[1])) { // Pop matching opening tag openedTags.pop(); } } else { if (token.content[token.content.length - 1].content === '/>') { // Autoclosed tag, ignore } else { // Opening tag openedTags.push({ tagName: stringifyToken(token.content[0].content[1]), openedBraces: 0 }); } } } else if (openedTags.length > 0 && token.type === 'punctuation' && token.content === '{') { // Here we might have entered a JSX context inside a tag openedTags[openedTags.length - 1].openedBraces++; } else if (openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces > 0 && token.type === 'punctuation' && token.content === '}') { // Here we might have left a JSX context inside a tag openedTags[openedTags.length - 1].openedBraces--; } else { notTagNorBrace = true } } if (notTagNorBrace || typeof token === 'string') { if (openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces === 0) { // Here we are inside a tag, and not inside a JSX context. // That's plain text: drop any tokens matched. var plainText = stringifyToken(token); // And merge text with adjacent text if (i < tokens.length - 1 && (typeof tokens[i + 1] === 'string' || tokens[i + 1].type === 'plain-text')) { plainText += stringifyToken(tokens[i + 1]); tokens.splice(i + 1, 1); } if (i > 0 && (typeof tokens[i - 1] === 'string' || tokens[i - 1].type === 'plain-text')) { plainText = stringifyToken(tokens[i - 1]) + plainText; tokens.splice(i - 1, 1); i--; } tokens[i] = new Prism.Token('plain-text', plainText, null, plainText); } } if (token.content && typeof token.content !== 'string') { walkTokens(token.content); } } }; Prism.hooks.add('after-tokenize', function (env) { if (env.language !== 'jsx' && env.language !== 'tsx') { return; } walkTokens(env.tokens); }); }(Prism)); /***/ }), /***/ 901: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(173); /* harmony import */ var _base_control__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(171); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function RadioControl(_ref) { var label = _ref.label, className = _ref.className, selected = _ref.selected, help = _ref.help, instanceId = _ref.instanceId, onChange = _ref.onChange, _ref$options = _ref.options, options = _ref$options === void 0 ? [] : _ref$options; var id = "inspector-radio-control-".concat(instanceId); var onChangeValue = function onChangeValue(event) { return onChange(event.target.value); }; return !Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(options) && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_base_control__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], { label: label, id: id, help: help, className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(className, 'components-radio-control') }, options.map(function (option, index) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { key: "".concat(id, "-").concat(index), className: "components-radio-control__option" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("input", { id: "".concat(id, "-").concat(index), className: "components-radio-control__input", type: "radio", name: id, value: option.value, onChange: onChangeValue, checked: option.value === selected, "aria-describedby": !!help ? "".concat(id, "__help") : undefined }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("label", { htmlFor: "".concat(id, "-").concat(index) }, option.label)); })); } /* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(RadioControl)); //# sourceMappingURL=index.js.map /***/ }) }]);
[+]
..
[-] analytics-report-categories~analytics-report-coupons~analytics-report-customers~analytics-report-dow~99eefb40.14e64a592bdaa342c3a7.min.js
[edit]
[-] analytics-report-stock.2939053e1a82a2ae848c.js
[edit]
[-] analytics-report-coupons.43d42c8cb52eecf8abdf.js
[edit]
[-] dashboard.c96cd95056189481403f.js
[edit]
[-] dashboard.c96cd95056189481403f.min.js
[edit]
[-] analytics-report-coupons.43d42c8cb52eecf8abdf.min.js
[edit]
[-] dashboard-charts.d100272c0e3ae443b829.js
[edit]
[-] store-performance.26c7ca1b51a55e317e81.js
[edit]
[-] leaderboards.7186f133618817f88e04.min.js
[edit]
[-] analytics-report-revenue.edcb0bfb0b19d47c76b8.min.js
[edit]
[-] marketing-overview.c105acbfa46d79f7a6d6.js
[edit]
[-] vendors~activity-panels-inbox~leaderboards~store-alerts~task-list.dd09e8a86b0bcaa9aff7.min.js
[edit]
[-] vendors~devdocs.e38a65da5bf9ffb4b567.min.js
[edit]
[-] analytics-report-products.28c933e5937d420efe22.js
[edit]
[-] task-list.52fe0e41a24d55f1b9b1.js
[edit]
[-] activity-panels-orders.7b32de0acca079abb2bc.js
[edit]
[-] task-list.52fe0e41a24d55f1b9b1.min.js
[edit]
[-] analytics-report-categories.13b966705db9cfeb4814.js
[edit]
[-] analytics-report-categories~analytics-report-products.b94ffcec7f813ed34edb.min.js
[edit]
[-] vendors~analytics-report-categories~analytics-report-coupons~analytics-report-downloads~analytics-re~2579715d.3c56dd5478f01faa4b26.min.js
[edit]
[-] activity-panels-inbox.99246a03e7b8aa1b8b26.min.js
[edit]
[-] vendors~marketing-overview.d1653cdc07670674a95f.js
[edit]
[-] leaderboards.7186f133618817f88e04.js
[edit]
[-] devdocs.1eb85d89a9e04d20a4c1.js
[edit]
[-] analytics-report-products.28c933e5937d420efe22.min.js
[edit]
[-] devdocs.1eb85d89a9e04d20a4c1.min.js
[edit]
[-] vendors~profile-wizard~task-list.114a8214ba34dbd3c0f0.min.js
[edit]
[-] store-alerts.a6374b7de173331a7254.js
[edit]
[-] vendors~activity-panels-inbox~activity-panels-orders~activity-panels-stock~dashboard-charts~devdocs~~f6270017.20e4990156e0a34c18b0.min.js
[edit]
[-] activity-panels-stock.6c1332749a67d65f449a.min.js
[edit]
[-] analytics-report-categories~analytics-report-coupons~analytics-report-customers~analytics-report-dow~99eefb40.14e64a592bdaa342c3a7.js
[edit]
[-] vendors~devdocs.e38a65da5bf9ffb4b567.js
[edit]
[-] analytics-report-orders.f2d90c48c3f4b0a88512.min.js
[edit]
[-] vendors~profile-wizard~task-list.114a8214ba34dbd3c0f0.js
[edit]
[-] store-alerts.a6374b7de173331a7254.min.js
[edit]
[-] analytics-report-revenue.edcb0bfb0b19d47c76b8.js
[edit]
[-] customizable-dashboard.0857e5e4c0df1171e886.js
[edit]
[-] activity-panels-orders.7b32de0acca079abb2bc.min.js
[edit]
[-] dashboard-charts.d100272c0e3ae443b829.min.js
[edit]
[-] homepage.e069e25f913b20f89b53.min.js
[edit]
[-] analytics-report-stock.2939053e1a82a2ae848c.min.js
[edit]
[-] analytics-report-customers.86adf07632d91914c6c6.js
[edit]
[-] store-performance.26c7ca1b51a55e317e81.min.js
[edit]
[-] analytics-report-customers.86adf07632d91914c6c6.min.js
[edit]
[-] vendors~activity-panels-inbox~activity-panels-orders~activity-panels-stock~dashboard-charts~devdocs~~f6270017.20e4990156e0a34c18b0.js
[edit]
[-] analytics-report-taxes.d538eaf5233c6bc713b6.js
[edit]
[-] analytics-report-categories~analytics-report-products.b94ffcec7f813ed34edb.js
[edit]
[-] homepage.e069e25f913b20f89b53.js
[edit]
[-] customizable-dashboard.0857e5e4c0df1171e886.min.js
[edit]
[-] vendors~marketing-overview.d1653cdc07670674a95f.min.js
[edit]
[-] profile-wizard.314f6a9f9e0ee86eb8bf.min.js
[edit]
[-] activity-panels-inbox.99246a03e7b8aa1b8b26.js
[edit]
[-] analytics-settings.8c382b88264494e5d4eb.min.js
[edit]
[-] analytics-settings.8c382b88264494e5d4eb.js
[edit]
[-] vendors~activity-panels-inbox~leaderboards~store-alerts~task-list.dd09e8a86b0bcaa9aff7.js
[edit]
[-] analytics-report-categories.13b966705db9cfeb4814.min.js
[edit]
[-] analytics-report-downloads.70ac0d2cc5bff1ecc84d.min.js
[edit]
[-] profile-wizard.314f6a9f9e0ee86eb8bf.js
[edit]
[-] activity-panels-stock.6c1332749a67d65f449a.js
[edit]
[-] analytics-report-orders.f2d90c48c3f4b0a88512.js
[edit]
[-] analytics-report-downloads.70ac0d2cc5bff1ecc84d.js
[edit]
[-] marketing-overview.c105acbfa46d79f7a6d6.min.js
[edit]
[-] analytics-report-taxes.d538eaf5233c6bc713b6.min.js
[edit]
[-] vendors~analytics-report-categories~analytics-report-coupons~analytics-report-downloads~analytics-re~2579715d.3c56dd5478f01faa4b26.js
[edit]