this["wp"] = this["wp"] || {}; this["wp"]["editor"] = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./node_modules/@wordpress/editor/build-module/index.js"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _arrayWithHoles; }); function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _arrayWithoutHoles; }); function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js": /*!**************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***! \**************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _assertThisInitialized; }); function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js": /*!*********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _asyncToGenerator; }); function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _classCallCheck; }); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js": /*!****************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _createClass; }); function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _defineProperty; }); function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/extends.js": /*!************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _extends; }); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _getPrototypeOf; }); function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js": /*!*************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _inherits; }); /* harmony import */ var _setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"); function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Object(_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__["default"])(subClass, superClass); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js": /*!********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _iterableToArray; }); function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js": /*!*************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***! \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _iterableToArrayLimit; }); function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js": /*!********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _nonIterableRest; }); function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _nonIterableSpread; }); function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js": /*!*****************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/objectSpread.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectSpread; }); /* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); }); } return target; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js": /*!****************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js ***! \****************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectWithoutProperties; }); /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"); function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js": /*!*********************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***! \*********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectWithoutPropertiesLoose; }); function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js": /*!******************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***! \******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _possibleConstructorReturn; }); /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); function _possibleConstructorReturn(self, call) { if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(call) === "object" || typeof call === "function")) { return call; } return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__["default"])(self); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _setPrototypeOf; }); function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js": /*!******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _slicedToArray; }); /* harmony import */ var _arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles */ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js"); /* harmony import */ var _iterableToArrayLimit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit */ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js"); /* harmony import */ var _nonIterableRest__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nonIterableRest */ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js"); function _slicedToArray(arr, i) { return Object(_arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || Object(_iterableToArrayLimit__WEBPACK_IMPORTED_MODULE_1__["default"])(arr, i) || Object(_nonIterableRest__WEBPACK_IMPORTED_MODULE_2__["default"])(); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _toConsumableArray; }); /* harmony import */ var _arrayWithoutHoles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithoutHoles */ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js"); /* harmony import */ var _iterableToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray */ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js"); /* harmony import */ var _nonIterableSpread__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nonIterableSpread */ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js"); function _toConsumableArray(arr) { return Object(_arrayWithoutHoles__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || Object(_iterableToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(arr) || Object(_nonIterableSpread__WEBPACK_IMPORTED_MODULE_2__["default"])(); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js": /*!***********************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _typeof; }); function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } function _typeof(obj) { if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { _typeof = function _typeof(obj) { return _typeof2(obj); }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); }; } return _typeof(obj); } /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/alignment-toolbar/index.js": /*!*******************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/alignment-toolbar/index.js ***! \*******************************************************************************************/ /*! exports provided: AlignmentToolbar, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AlignmentToolbar", function() { return AlignmentToolbar; }); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/viewport */ "@wordpress/viewport"); /* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _block_edit_context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../block-edit/context */ "./node_modules/@wordpress/editor/build-module/components/block-edit/context.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var DEFAULT_ALIGNMENT_CONTROLS = [{ icon: 'editor-alignleft', title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Align text left'), align: 'left' }, { icon: 'editor-aligncenter', title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Align text center'), align: 'center' }, { icon: 'editor-alignright', title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Align text right'), align: 'right' }]; function AlignmentToolbar(_ref) { var isCollapsed = _ref.isCollapsed, value = _ref.value, onChange = _ref.onChange, _ref$alignmentControl = _ref.alignmentControls, alignmentControls = _ref$alignmentControl === void 0 ? DEFAULT_ALIGNMENT_CONTROLS : _ref$alignmentControl; function applyOrUnset(align) { return function () { return onChange(value === align ? undefined : align); }; } var activeAlignment = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["find"])(alignmentControls, function (control) { return control.align === value; }); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["Toolbar"], { isCollapsed: isCollapsed, icon: activeAlignment ? activeAlignment.icon : 'editor-alignleft', label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Change Text Alignment'), controls: alignmentControls.map(function (control) { var align = control.align; var isActive = value === align; return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, control, { isActive: isActive, onClick: applyOrUnset(align) }); }) }); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__["compose"])(Object(_block_edit_context__WEBPACK_IMPORTED_MODULE_8__["withBlockEditContext"])(function (_ref2) { var clientId = _ref2.clientId; return { clientId: clientId }; }), Object(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_5__["withViewportMatch"])({ isLargeViewport: 'medium' }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withSelect"])(function (select, _ref3) { var clientId = _ref3.clientId, isLargeViewport = _ref3.isLargeViewport, isCollapsed = _ref3.isCollapsed; var _select = select('core/editor'), getBlockRootClientId = _select.getBlockRootClientId, getEditorSettings = _select.getEditorSettings; return { isCollapsed: isCollapsed || !isLargeViewport || !getEditorSettings().hasFixedToolbar && getBlockRootClientId(clientId) }; }))(AlignmentToolbar)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/autocomplete/index.js": /*!**************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/autocomplete/index.js ***! \**************************************************************************************/ /*! exports provided: withFilteredAutocompleters, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withFilteredAutocompleters", function() { return withFilteredAutocompleters; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _block_edit_context__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../block-edit/context */ "./node_modules/@wordpress/editor/build-module/components/block-edit/context.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /* * Use one array instance for fallback rather than inline array literals * because the latter may cause rerender due to failed prop equality checks. */ var completersFallback = []; /** * Wrap the default Autocomplete component with one that * supports a filter hook for customizing its list of autocompleters. * * Since there may be many Autocomplete instances at one time, this component * applies the filter on demand, when the component is first focused after * receiving a new list of completers. * * This function is exported for unit test. * * @param {Function} Autocomplete Original component. * @return {Function} Wrapped component */ function withFilteredAutocompleters(Autocomplete) { return ( /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__["default"])(FilteredAutocomplete, _Component); function FilteredAutocomplete() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, FilteredAutocomplete); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__["default"])(FilteredAutocomplete).call(this)); _this.state = { completers: completersFallback }; _this.saveParentRef = _this.saveParentRef.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.onFocus = _this.onFocus.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(FilteredAutocomplete, [{ key: "componentDidUpdate", value: function componentDidUpdate() { var hasFocus = this.parentNode.contains(document.activeElement); /* * It's possible for props to be updated when the component has focus, * so here, we ensure new completers are immediately applied while we * have the focus. * * NOTE: This may trigger another render but only when the component has focus. */ if (hasFocus && this.hasStaleCompleters()) { this.updateCompletersState(); } } }, { key: "onFocus", value: function onFocus() { if (this.hasStaleCompleters()) { this.updateCompletersState(); } } }, { key: "hasStaleCompleters", value: function hasStaleCompleters() { return !('lastFilteredCompletersProp' in this.state) || this.state.lastFilteredCompletersProp !== this.props.completers; } }, { key: "updateCompletersState", value: function updateCompletersState() { var _this$props = this.props, blockName = _this$props.blockName, completers = _this$props.completers; var nextCompleters = completers; var lastFilteredCompletersProp = nextCompleters; if (Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__["hasFilter"])('editor.Autocomplete.completers')) { nextCompleters = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_10__["applyFilters"])('editor.Autocomplete.completers', // Provide copies so filters may directly modify them. nextCompleters && nextCompleters.map(lodash__WEBPACK_IMPORTED_MODULE_9__["clone"]), blockName); } this.setState({ lastFilteredCompletersProp: lastFilteredCompletersProp, completers: nextCompleters || completersFallback }); } }, { key: "saveParentRef", value: function saveParentRef(parentNode) { this.parentNode = parentNode; } }, { key: "render", value: function render() { var completers = this.state.completers; var autocompleteProps = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__["default"])({}, this.props, { completers: completers }); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { onFocus: this.onFocus, ref: this.saveParentRef }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(Autocomplete, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ onFocus: this.onFocus }, autocompleteProps))); } }]); return FilteredAutocomplete; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["Component"]) ); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_11__["compose"])([Object(_block_edit_context__WEBPACK_IMPORTED_MODULE_13__["withBlockEditContext"])(function (_ref) { var name = _ref.name; return { blockName: name }; }), withFilteredAutocompleters])(_wordpress_components__WEBPACK_IMPORTED_MODULE_12__["Autocomplete"])); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/autocompleters/block.js": /*!****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/autocompleters/block.js ***! \****************************************************************************************/ /*! exports provided: createBlockCompleter, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBlockCompleter", function() { return createBlockCompleter; }); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _block_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../block-icon */ "./node_modules/@wordpress/editor/build-module/components/block-icon/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ /** * Returns the client ID of the parent where a newly inserted block would be * placed. * * @return {string} Client ID of the parent where a newly inserted block would * be placed. */ function defaultGetBlockInsertionParentClientId() { return Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["select"])('core/editor').getBlockInsertionPoint().rootClientId; } /** * Returns the inserter items for the specified parent block. * * @param {string} rootClientId Client ID of the block for which to retrieve * inserter items. * * @return {Array} The inserter items for the specified * parent. */ function defaultGetInserterItems(rootClientId) { return Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["select"])('core/editor').getInserterItems(rootClientId); } /** * Returns the name of the currently selected block. * * @return {string?} The name of the currently selected block or `null` if no * block is selected. */ function defaultGetSelectedBlockName() { var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["select"])('core/editor'), getSelectedBlockClientId = _select.getSelectedBlockClientId, getBlockName = _select.getBlockName; var selectedBlockClientId = getSelectedBlockClientId(); return selectedBlockClientId ? getBlockName(selectedBlockClientId) : null; } /** * Creates a blocks repeater for replacing the current block with a selected block type. * * @return {Completer} A blocks completer. */ function createBlockCompleter() { var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, _ref$getBlockInsertio = _ref.getBlockInsertionParentClientId, getBlockInsertionParentClientId = _ref$getBlockInsertio === void 0 ? defaultGetBlockInsertionParentClientId : _ref$getBlockInsertio, _ref$getInserterItems = _ref.getInserterItems, getInserterItems = _ref$getInserterItems === void 0 ? defaultGetInserterItems : _ref$getInserterItems, _ref$getSelectedBlock = _ref.getSelectedBlockName, getSelectedBlockName = _ref$getSelectedBlock === void 0 ? defaultGetSelectedBlockName : _ref$getSelectedBlock; return { name: 'blocks', className: 'editor-autocompleters__block', triggerPrefix: '/', options: function options() { var selectedBlockName = getSelectedBlockName(); return getInserterItems(getBlockInsertionParentClientId()).filter( // Avoid offering to replace the current block with a block of the same type. function (inserterItem) { return selectedBlockName !== inserterItem.name; }); }, getOptionKeywords: function getOptionKeywords(inserterItem) { var title = inserterItem.title, _inserterItem$keyword = inserterItem.keywords, keywords = _inserterItem$keyword === void 0 ? [] : _inserterItem$keyword; return Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(keywords).concat([title]); }, getOptionLabel: function getOptionLabel(inserterItem) { var icon = inserterItem.icon, title = inserterItem.title; return [Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_block_icon__WEBPACK_IMPORTED_MODULE_4__["default"], { key: "icon", icon: icon, showColors: true }), title]; }, allowContext: function allowContext(before, after) { return !(/\S/.test(before) || /\S/.test(after)); }, getOptionCompletion: function getOptionCompletion(inserterItem) { var name = inserterItem.name, initialAttributes = inserterItem.initialAttributes; return { action: 'replace', value: Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__["createBlock"])(name, initialAttributes) }; }, isOptionDisabled: function isOptionDisabled(inserterItem) { return inserterItem.isDisabled; } }; } /** * Creates a blocks repeater for replacing the current block with a selected block type. * * @return {Completer} A blocks completer. */ /* harmony default export */ __webpack_exports__["default"] = (createBlockCompleter()); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/autocompleters/index.js": /*!****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/autocompleters/index.js ***! \****************************************************************************************/ /*! exports provided: blockAutocompleter, userAutocompleter */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _block__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./block */ "./node_modules/@wordpress/editor/build-module/components/autocompleters/block.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blockAutocompleter", function() { return _block__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _user__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./user */ "./node_modules/@wordpress/editor/build-module/components/autocompleters/user.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "userAutocompleter", function() { return _user__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/autocompleters/user.js": /*!***************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/autocompleters/user.js ***! \***************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ /** * A user mentions completer. * * @type {Completer} */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'users', className: 'editor-autocompleters__user', triggerPrefix: '@', options: function options(search) { var payload = ''; if (search) { payload = '?search=' + encodeURIComponent(search); } return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({ path: '/wp/v2/users' + payload }); }, isDebounced: true, getOptionKeywords: function getOptionKeywords(user) { return [user.slug, user.name]; }, getOptionLabel: function getOptionLabel(user) { return [Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("img", { key: "avatar", className: "editor-autocompleters__user-avatar", alt: "", src: user.avatar_urls[24] }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { key: "name", className: "editor-autocompleters__user-name" }, user.name), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { key: "slug", className: "editor-autocompleters__user-slug" }, user.slug)]; }, getOptionCompletion: function getOptionCompletion(user) { return "@".concat(user.slug); } }); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/autosave-monitor/index.js": /*!******************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/autosave-monitor/index.js ***! \******************************************************************************************/ /*! exports provided: AutosaveMonitor, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutosaveMonitor", function() { return AutosaveMonitor; }); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__); /** * WordPress dependencies */ var AutosaveMonitor = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(AutosaveMonitor, _Component); function AutosaveMonitor() { Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, AutosaveMonitor); return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(AutosaveMonitor).apply(this, arguments)); } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(AutosaveMonitor, [{ key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var _this$props = this.props, isDirty = _this$props.isDirty, editsReference = _this$props.editsReference, isAutosaveable = _this$props.isAutosaveable; if (prevProps.isDirty !== isDirty || prevProps.isAutosaveable !== isAutosaveable || prevProps.editsReference !== editsReference) { this.toggleTimer(isDirty && isAutosaveable); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.toggleTimer(false); } }, { key: "toggleTimer", value: function toggleTimer(isPendingSave) { var _this = this; clearTimeout(this.pendingSave); var autosaveInterval = this.props.autosaveInterval; if (isPendingSave) { this.pendingSave = setTimeout(function () { return _this.props.autosave(); }, autosaveInterval * 1000); } } }, { key: "render", value: function render() { return null; } }]); return AutosaveMonitor; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__["withSelect"])(function (select) { var _select = select('core/editor'), isEditedPostDirty = _select.isEditedPostDirty, isEditedPostAutosaveable = _select.isEditedPostAutosaveable, getEditorSettings = _select.getEditorSettings, getReferenceByDistinctEdits = _select.getReferenceByDistinctEdits; var _getEditorSettings = getEditorSettings(), autosaveInterval = _getEditorSettings.autosaveInterval; return { isDirty: isEditedPostDirty(), isAutosaveable: isEditedPostAutosaveable(), editsReference: getReferenceByDistinctEdits(), autosaveInterval: autosaveInterval }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__["withDispatch"])(function (dispatch) { return { autosave: dispatch('core/editor').autosave }; })])(AutosaveMonitor)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-actions/index.js": /*!***************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-actions/index.js ***! \***************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__); /** * External dependencies */ /** * WordPress dependencies */ function BlockActions(_ref) { var onDuplicate = _ref.onDuplicate, onRemove = _ref.onRemove, onInsertBefore = _ref.onInsertBefore, onInsertAfter = _ref.onInsertAfter, isLocked = _ref.isLocked, canDuplicate = _ref.canDuplicate, children = _ref.children; return children({ onDuplicate: onDuplicate, onRemove: onRemove, onInsertAfter: onInsertAfter, onInsertBefore: onInsertBefore, isLocked: isLocked, canDuplicate: canDuplicate }); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select, props) { var _select = select('core/editor'), getBlocksByClientId = _select.getBlocksByClientId, getBlockIndex = _select.getBlockIndex, getTemplateLock = _select.getTemplateLock, getBlockRootClientId = _select.getBlockRootClientId; var blocks = getBlocksByClientId(props.clientIds); var canDuplicate = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["every"])(blocks, function (block) { return !!block && Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__["hasBlockSupport"])(block.name, 'multiple', true); }); var rootClientId = getBlockRootClientId(props.clientIds[0]); return { firstSelectedIndex: getBlockIndex(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["first"])(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["castArray"])(props.clientIds)), rootClientId), lastSelectedIndex: getBlockIndex(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["last"])(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["castArray"])(props.clientIds)), rootClientId), isLocked: !!getTemplateLock(rootClientId), blocks: blocks, canDuplicate: canDuplicate, rootClientId: rootClientId, extraProps: props }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withDispatch"])(function (dispatch, props) { var clientIds = props.clientIds, rootClientId = props.rootClientId, blocks = props.blocks, firstSelectedIndex = props.firstSelectedIndex, lastSelectedIndex = props.lastSelectedIndex, isLocked = props.isLocked, canDuplicate = props.canDuplicate; var _dispatch = dispatch('core/editor'), insertBlocks = _dispatch.insertBlocks, multiSelect = _dispatch.multiSelect, removeBlocks = _dispatch.removeBlocks, insertDefaultBlock = _dispatch.insertDefaultBlock; return { onDuplicate: function onDuplicate() { if (isLocked || !canDuplicate) { return; } var clonedBlocks = blocks.map(function (block) { return Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__["cloneBlock"])(block); }); insertBlocks(clonedBlocks, lastSelectedIndex + 1, rootClientId); if (clonedBlocks.length > 1) { multiSelect(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["first"])(clonedBlocks).clientId, Object(lodash__WEBPACK_IMPORTED_MODULE_0__["last"])(clonedBlocks).clientId); } }, onRemove: function onRemove() { if (!isLocked) { removeBlocks(clientIds); } }, onInsertBefore: function onInsertBefore() { if (!isLocked) { insertDefaultBlock({}, rootClientId, firstSelectedIndex); } }, onInsertAfter: function onInsertAfter() { if (!isLocked) { insertDefaultBlock({}, rootClientId, lastSelectedIndex + 1); } } }; })])(BlockActions)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-alignment-toolbar/index.js": /*!*************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-alignment-toolbar/index.js ***! \*************************************************************************************************/ /*! exports provided: BlockAlignmentToolbar, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockAlignmentToolbar", function() { return BlockAlignmentToolbar; }); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/viewport */ "@wordpress/viewport"); /* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _block_edit_context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../block-edit/context */ "./node_modules/@wordpress/editor/build-module/components/block-edit/context.js"); /** * WordPress dependencies */ /** * Internal dependencies */ var BLOCK_ALIGNMENTS_CONTROLS = { left: { icon: 'align-left', title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Align left') }, center: { icon: 'align-center', title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Align center') }, right: { icon: 'align-right', title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Align right') }, wide: { icon: 'align-wide', title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Wide width') }, full: { icon: 'align-full-width', title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Full width') } }; var DEFAULT_CONTROLS = ['left', 'center', 'right', 'wide', 'full']; var WIDE_CONTROLS = ['wide', 'full']; function BlockAlignmentToolbar(_ref) { var isCollapsed = _ref.isCollapsed, value = _ref.value, onChange = _ref.onChange, _ref$controls = _ref.controls, controls = _ref$controls === void 0 ? DEFAULT_CONTROLS : _ref$controls, _ref$wideControlsEnab = _ref.wideControlsEnabled, wideControlsEnabled = _ref$wideControlsEnab === void 0 ? false : _ref$wideControlsEnab; function applyOrUnset(align) { return function () { return onChange(value === align ? undefined : align); }; } var enabledControls = wideControlsEnabled ? controls : controls.filter(function (control) { return WIDE_CONTROLS.indexOf(control) === -1; }); var activeAlignment = BLOCK_ALIGNMENTS_CONTROLS[value]; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["Toolbar"], { isCollapsed: isCollapsed, icon: activeAlignment ? activeAlignment.icon : 'align-left', label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Change Alignment'), controls: enabledControls.map(function (control) { return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, BLOCK_ALIGNMENTS_CONTROLS[control], { isActive: value === control, onClick: applyOrUnset(control) }); }) }); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__["compose"])(Object(_block_edit_context__WEBPACK_IMPORTED_MODULE_7__["withBlockEditContext"])(function (_ref2) { var clientId = _ref2.clientId; return { clientId: clientId }; }), Object(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_4__["withViewportMatch"])({ isLargeViewport: 'medium' }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withSelect"])(function (select, _ref3) { var clientId = _ref3.clientId, isLargeViewport = _ref3.isLargeViewport, isCollapsed = _ref3.isCollapsed; var _select = select('core/editor'), getBlockRootClientId = _select.getBlockRootClientId, getEditorSettings = _select.getEditorSettings; return { wideControlsEnabled: select('core/editor').getEditorSettings().alignWide, isCollapsed: isCollapsed || !isLargeViewport || !getEditorSettings().hasFixedToolbar && getBlockRootClientId(clientId) }; }))(BlockAlignmentToolbar)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-compare/block-view.js": /*!********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-compare/block-view.js ***! \********************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var BlockView = function BlockView(_ref) { var title = _ref.title, rawContent = _ref.rawContent, renderedContent = _ref.renderedContent, action = _ref.action, actionText = _ref.actionText, className = _ref.className; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: className }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-compare__content" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("h1", { className: "editor-block-compare__heading" }, title), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-compare__html" }, rawContent), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-compare__preview edit-post-visual-editor" }, renderedContent)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-compare__action" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Button"], { isLarge: true, tabIndex: "0", onClick: action }, actionText))); }; /* harmony default export */ __webpack_exports__["default"] = (BlockView); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-compare/index.js": /*!***************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-compare/index.js ***! \***************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var diff__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! diff */ "./node_modules/diff/dist/diff.js"); /* harmony import */ var diff__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(diff__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _block_view__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./block-view */ "./node_modules/@wordpress/editor/build-module/components/block-compare/block-view.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var BlockCompare = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(BlockCompare, _Component); function BlockCompare() { Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, BlockCompare); return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(BlockCompare).apply(this, arguments)); } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(BlockCompare, [{ key: "getDifference", value: function getDifference(originalContent, newContent) { var difference = Object(diff__WEBPACK_IMPORTED_MODULE_8__["diffChars"])(originalContent, newContent); return difference.map(function (item, pos) { var classes = classnames__WEBPACK_IMPORTED_MODULE_6___default()({ 'editor-block-compare__added': item.added, 'editor-block-compare__removed': item.removed }); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("span", { key: pos, className: classes }, item.value); }); } }, { key: "getOriginalContent", value: function getOriginalContent(block) { return { rawContent: block.originalContent, renderedContent: Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__["getSaveElement"])(block.name, block.attributes) }; } }, { key: "getConvertedContent", value: function getConvertedContent(block) { // The convertor may return an array of items or a single item var newBlocks = Object(lodash__WEBPACK_IMPORTED_MODULE_7__["castArray"])(block); // Get converted block details var newContent = newBlocks.map(function (item) { return Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__["getSaveContent"])(item.name, item.attributes, item.innerBlocks); }); var renderedContent = newBlocks.map(function (item) { return Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__["getSaveElement"])(item.name, item.attributes, item.innerBlocks); }); return { rawContent: newContent.join(''), renderedContent: renderedContent }; } }, { key: "render", value: function render() { var _this$props = this.props, block = _this$props.block, onKeep = _this$props.onKeep, onConvert = _this$props.onConvert, convertor = _this$props.convertor, convertButtonText = _this$props.convertButtonText; var original = this.getOriginalContent(block); var converted = this.getConvertedContent(convertor(block)); var difference = this.getDifference(original.rawContent, converted.rawContent); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("div", { className: "editor-block-compare__wrapper" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_block_view__WEBPACK_IMPORTED_MODULE_11__["default"], { title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Current'), className: "editor-block-compare__current", action: onKeep, actionText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Convert to HTML'), rawContent: original.rawContent, renderedContent: original.renderedContent }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_block_view__WEBPACK_IMPORTED_MODULE_11__["default"], { title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('After Conversion'), className: "editor-block-compare__converted", action: onConvert, actionText: convertButtonText, rawContent: difference, renderedContent: converted.renderedContent })); } }]); return BlockCompare; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (BlockCompare); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-controls/index.js": /*!****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-controls/index.js ***! \****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _block_edit_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../block-edit/context */ "./node_modules/@wordpress/editor/build-module/components/block-edit/context.js"); /** * WordPress dependencies */ /** * Internal dependencies */ var _createSlotFill = Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["createSlotFill"])('BlockControls'), Fill = _createSlotFill.Fill, Slot = _createSlotFill.Slot; var BlockControlsFill = function BlockControlsFill(_ref) { var controls = _ref.controls, children = _ref.children; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(Fill, null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Toolbar"], { controls: controls }), children); }; var BlockControls = Object(_block_edit_context__WEBPACK_IMPORTED_MODULE_2__["ifBlockEditSelected"])(BlockControlsFill); BlockControls.Slot = Slot; /* harmony default export */ __webpack_exports__["default"] = (BlockControls); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-draggable/index.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-draggable/index.js ***! \*****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /** * WordPress dependencies */ var BlockDraggable = function BlockDraggable(_ref) { var children = _ref.children, clientId = _ref.clientId, rootClientId = _ref.rootClientId, blockElementId = _ref.blockElementId, index = _ref.index, onDragStart = _ref.onDragStart, onDragEnd = _ref.onDragEnd; var transferData = { type: 'block', srcIndex: index, srcRootClientId: rootClientId, srcClientId: clientId }; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Draggable"], { elementId: blockElementId, transferData: transferData, onDragStart: onDragStart, onDragEnd: onDragEnd }, function (_ref2) { var onDraggableStart = _ref2.onDraggableStart, onDraggableEnd = _ref2.onDraggableEnd; return children({ onDraggableStart: onDraggableStart, onDraggableEnd: onDraggableEnd }); }); }; /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select, _ref3) { var clientId = _ref3.clientId; var _select = select('core/editor'), getBlockIndex = _select.getBlockIndex, getBlockRootClientId = _select.getBlockRootClientId; return { index: getBlockIndex(clientId), rootClientId: getBlockRootClientId(clientId) }; })(BlockDraggable)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-drop-zone/index.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-drop-zone/index.js ***! \*****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _media_upload_check__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../media-upload/check */ "./node_modules/@wordpress/editor/build-module/components/media-upload/check.js"); /** * External Dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var parseDropEvent = function parseDropEvent(event) { var result = { srcRootClientId: null, srcClientId: null, srcIndex: null, type: null }; if (!event.dataTransfer) { return result; } try { result = Object.assign(result, JSON.parse(event.dataTransfer.getData('text'))); } catch (err) { return result; } return result; }; var BlockDropZone = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(BlockDropZone, _Component); function BlockDropZone() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, BlockDropZone); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(BlockDropZone).apply(this, arguments)); _this.onFilesDrop = _this.onFilesDrop.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onHTMLDrop = _this.onHTMLDrop.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onDrop = _this.onDrop.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(BlockDropZone, [{ key: "getInsertIndex", value: function getInsertIndex(position) { var index = this.props.index; if (index !== undefined) { return position.y === 'top' ? index : index + 1; } } }, { key: "onFilesDrop", value: function onFilesDrop(files, position) { var transformation = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_9__["findTransform"])(Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_9__["getBlockTransforms"])('from'), function (transform) { return transform.type === 'files' && transform.isMatch(files); }); if (transformation) { var insertIndex = this.getInsertIndex(position); var blocks = transformation.transform(files, this.props.updateBlockAttributes); this.props.insertBlocks(blocks, insertIndex); } } }, { key: "onHTMLDrop", value: function onHTMLDrop(HTML, position) { var blocks = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_9__["pasteHandler"])({ HTML: HTML, mode: 'BLOCKS' }); if (blocks.length) { this.props.insertBlocks(blocks, this.getInsertIndex(position)); } } }, { key: "onDrop", value: function onDrop(event, position) { var _this$props = this.props, dstRootClientId = _this$props.rootClientId, dstClientId = _this$props.clientId, dstIndex = _this$props.index, getClientIdsOfDescendants = _this$props.getClientIdsOfDescendants; var _parseDropEvent = parseDropEvent(event), srcRootClientId = _parseDropEvent.srcRootClientId, srcClientId = _parseDropEvent.srcClientId, srcIndex = _parseDropEvent.srcIndex, type = _parseDropEvent.type; var isBlockDropType = function isBlockDropType(dropType) { return dropType === 'block'; }; var isSameLevel = function isSameLevel(srcRoot, dstRoot) { // Note that rootClientId of top-level blocks will be undefined OR a void string, // so we also need to account for that case separately. return srcRoot === dstRoot || !srcRoot === true && !dstRoot === true; }; var isSameBlock = function isSameBlock(src, dst) { return src === dst; }; var isSrcBlockAnAncestorOfDstBlock = function isSrcBlockAnAncestorOfDstBlock(src, dst) { return getClientIdsOfDescendants([src]).some(function (id) { return id === dst; }); }; if (!isBlockDropType(type) || isSameBlock(srcClientId, dstClientId) || isSrcBlockAnAncestorOfDstBlock(srcClientId, dstClientId)) { return; } var positionIndex = this.getInsertIndex(position); // If the block is kept at the same level and moved downwards, // subtract to account for blocks shifting upward to occupy its old position. var insertIndex = dstIndex && srcIndex < dstIndex && isSameLevel(srcRootClientId, dstRootClientId) ? positionIndex - 1 : positionIndex; this.props.moveBlockToPosition(srcClientId, srcRootClientId, insertIndex); } }, { key: "render", value: function render() { var _this$props2 = this.props, isLocked = _this$props2.isLocked, index = _this$props2.index; if (isLocked) { return null; } var isAppender = index === undefined; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_media_upload_check__WEBPACK_IMPORTED_MODULE_12__["default"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["DropZone"], { className: classnames__WEBPACK_IMPORTED_MODULE_7___default()('editor-block-drop-zone', { 'is-appender': isAppender }), onFilesDrop: this.onFilesDrop, onHTMLDrop: this.onHTMLDrop, onDrop: this.onDrop })); } }]); return BlockDropZone; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_11__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withDispatch"])(function (dispatch, ownProps) { var _dispatch = dispatch('core/editor'), _insertBlocks = _dispatch.insertBlocks, _updateBlockAttributes = _dispatch.updateBlockAttributes, _moveBlockToPosition = _dispatch.moveBlockToPosition; return { insertBlocks: function insertBlocks(blocks, index) { var rootClientId = ownProps.rootClientId; _insertBlocks(blocks, index, rootClientId); }, updateBlockAttributes: function updateBlockAttributes() { _updateBlockAttributes.apply(void 0, arguments); }, moveBlockToPosition: function moveBlockToPosition(srcClientId, srcRootClientId, dstIndex) { var dstRootClientId = ownProps.rootClientId; _moveBlockToPosition(srcClientId, srcRootClientId, dstRootClientId, dstIndex); } }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withSelect"])(function (select, _ref) { var rootClientId = _ref.rootClientId; var _select = select('core/editor'), getClientIdsOfDescendants = _select.getClientIdsOfDescendants, getTemplateLock = _select.getTemplateLock; return { isLocked: !!getTemplateLock(rootClientId), getClientIdsOfDescendants: getClientIdsOfDescendants }; }), Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["withFilters"])('editor.BlockDropZone'))(BlockDropZone)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-edit/context.js": /*!**************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-edit/context.js ***! \**************************************************************************************/ /*! exports provided: BlockEditContextProvider, withBlockEditContext, ifBlockEditSelected */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockEditContextProvider", function() { return Provider; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withBlockEditContext", function() { return withBlockEditContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ifBlockEditSelected", function() { return ifBlockEditSelected; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__); /** * External dependencies */ /** * WordPress dependencies */ var _createContext = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createContext"])({ name: '', isSelected: false, focusedElement: null, setFocusedElement: lodash__WEBPACK_IMPORTED_MODULE_2__["noop"], clientId: null }), Consumer = _createContext.Consumer, Provider = _createContext.Provider; /** * A Higher Order Component used to inject BlockEdit context to the * wrapped component. * * @param {Function} mapContextToProps Function called on every context change, * expected to return object of props to * merge with the component's own props. * * @return {Component} Enhanced component with injected context as props. */ var withBlockEditContext = function withBlockEditContext(mapContextToProps) { return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["createHigherOrderComponent"])(function (OriginalComponent) { return function (props) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(Consumer, null, function (context) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(OriginalComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, mapContextToProps(context, props))); }); }; }, 'withBlockEditContext'); }; /** * A Higher Order Component used to render conditionally the wrapped * component only when the BlockEdit has selected state set. * * @param {Component} OriginalComponent Component to wrap. * * @return {Component} Component which renders only when the BlockEdit is selected. */ var ifBlockEditSelected = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["createHigherOrderComponent"])(function (OriginalComponent) { return function (props) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(Consumer, null, function (_ref) { var isSelected = _ref.isSelected; return isSelected && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(OriginalComponent, props); }); }; }, 'ifBlockEditSelected'); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-edit/edit.js": /*!***********************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-edit/edit.js ***! \***********************************************************************************/ /*! exports provided: Edit, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Edit", function() { return Edit; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__); /** * External dependencies */ /** * WordPress dependencies */ var Edit = function Edit(props) { var _props$attributes = props.attributes, attributes = _props$attributes === void 0 ? {} : _props$attributes, name = props.name; var blockType = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__["getBlockType"])(name); if (!blockType) { return null; } // Generate a class name for the block's editable form var generatedClassName = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__["hasBlockSupport"])(blockType, 'className', true) ? Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__["getBlockDefaultClassName"])(name) : null; var className = classnames__WEBPACK_IMPORTED_MODULE_2___default()(generatedClassName, attributes.className); // `edit` and `save` are functions or components describing the markup // with which a block is displayed. If `blockType` is valid, assign // them preferentially as the render value for the block. var Component = blockType.edit || blockType.save; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, { className: className })); }; /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["withFilters"])('editor.BlockEdit')(Edit)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-edit/index.js": /*!************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-edit/index.js ***! \************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./edit */ "./node_modules/@wordpress/editor/build-module/components/block-edit/edit.js"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./context */ "./node_modules/@wordpress/editor/build-module/components/block-edit/context.js"); /** * WordPress dependencies */ /** * Internal dependencies */ var BlockEdit = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(BlockEdit, _Component); function BlockEdit(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, BlockEdit); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(BlockEdit).call(this, props)); _this.setFocusedElement = _this.setFocusedElement.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.state = { focusedElement: null, setFocusedElement: _this.setFocusedElement }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(BlockEdit, [{ key: "setFocusedElement", value: function setFocusedElement(focusedElement) { this.setState(function (prevState) { if (prevState.focusedElement === focusedElement) { return null; } return { focusedElement: focusedElement }; }); } }, { key: "render", value: function render() { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_context__WEBPACK_IMPORTED_MODULE_8__["BlockEditContextProvider"], { value: this.state }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_edit__WEBPACK_IMPORTED_MODULE_7__["default"], this.props)); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(props) { var clientId = props.clientId, name = props.name, isSelected = props.isSelected; return { name: name, isSelected: isSelected, clientId: clientId }; } }]); return BlockEdit; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (BlockEdit); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-format-controls/index.js": /*!***********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-format-controls/index.js ***! \***********************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _block_edit_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../block-edit/context */ "./node_modules/@wordpress/editor/build-module/components/block-edit/context.js"); /** * WordPress dependencies */ /** * Internal dependencies */ var _createSlotFill = Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__["createSlotFill"])('BlockFormatControls'), Fill = _createSlotFill.Fill, Slot = _createSlotFill.Slot; var BlockFormatControls = Object(_block_edit_context__WEBPACK_IMPORTED_MODULE_1__["ifBlockEditSelected"])(Fill); BlockFormatControls.Slot = Slot; /* harmony default export */ __webpack_exports__["default"] = (BlockFormatControls); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-icon/index.js": /*!************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-icon/index.js ***! \************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return BlockIcon; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /** * External dependencies */ /** * WordPress dependencies */ function BlockIcon(_ref) { var icon = _ref.icon, _ref$showColors = _ref.showColors, showColors = _ref$showColors === void 0 ? false : _ref$showColors, className = _ref.className; if (Object(lodash__WEBPACK_IMPORTED_MODULE_2__["get"])(icon, ['src']) === 'block-default') { icon = { src: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["Path"], { d: "M19 7h-1V5h-4v2h-4V5H6v2H5c-1.1 0-2 .9-2 2v10h18V9c0-1.1-.9-2-2-2zm0 10H5V9h14v8z" })) }; } var renderedIcon = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["Icon"], { icon: icon && icon.src ? icon.src : icon }); var style = showColors ? { backgroundColor: icon && icon.background, color: icon && icon.foreground } : {}; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { style: style, className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('editor-block-icon', className, { 'has-colors': showColors }) }, renderedIcon); } /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-inspector/index.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-inspector/index.js ***! \*****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _skip_to_selected_block__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../skip-to-selected-block */ "./node_modules/@wordpress/editor/build-module/components/skip-to-selected-block/index.js"); /* harmony import */ var _block_icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../block-icon */ "./node_modules/@wordpress/editor/build-module/components/block-icon/index.js"); /* harmony import */ var _inspector_controls__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../inspector-controls */ "./node_modules/@wordpress/editor/build-module/components/inspector-controls/index.js"); /* harmony import */ var _inspector_advanced_controls__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../inspector-advanced-controls */ "./node_modules/@wordpress/editor/build-module/components/inspector-advanced-controls/index.js"); /* harmony import */ var _block_styles__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../block-styles */ "./node_modules/@wordpress/editor/build-module/components/block-styles/index.js"); /* harmony import */ var _multi_selection_inspector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../multi-selection-inspector */ "./node_modules/@wordpress/editor/build-module/components/multi-selection-inspector/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal Dependencies */ var BlockInspector = function BlockInspector(_ref) { var selectedBlockClientId = _ref.selectedBlockClientId, selectedBlockName = _ref.selectedBlockName, blockType = _ref.blockType, count = _ref.count, hasBlockStyles = _ref.hasBlockStyles; if (count > 1) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_multi_selection_inspector__WEBPACK_IMPORTED_MODULE_11__["default"], null); } var isSelectedBlockUnregistered = selectedBlockName === Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__["getUnregisteredTypeHandlerName"])(); /* * If the selected block is of an unregistered type, avoid showing it as an actual selection * because we want the user to focus on the unregistered block warning, not block settings. */ if (!blockType || !selectedBlockClientId || isSelectedBlockUnregistered) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { className: "editor-block-inspector__no-blocks" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('No block selected.')); } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-inspector__card" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_icon__WEBPACK_IMPORTED_MODULE_7__["default"], { icon: blockType.icon, showColors: true }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-inspector__card-content" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-inspector__card-title" }, blockType.title), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-inspector__card-description" }, blockType.description))), hasBlockStyles && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["PanelBody"], { title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Styles'), initialOpen: false }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_styles__WEBPACK_IMPORTED_MODULE_10__["default"], { clientId: selectedBlockClientId }))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_inspector_controls__WEBPACK_IMPORTED_MODULE_8__["default"].Slot, null)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_inspector_advanced_controls__WEBPACK_IMPORTED_MODULE_9__["default"].Slot, null, function (fills) { return !Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(fills) && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["PanelBody"], { className: "editor-block-inspector__advanced", title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Advanced'), initialOpen: false }, fills); })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_skip_to_selected_block__WEBPACK_IMPORTED_MODULE_6__["default"], { key: "back" })); }; /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withSelect"])(function (select) { var _select = select('core/editor'), getSelectedBlockClientId = _select.getSelectedBlockClientId, getSelectedBlockCount = _select.getSelectedBlockCount, getBlockName = _select.getBlockName; var _select2 = select('core/blocks'), getBlockStyles = _select2.getBlockStyles; var selectedBlockClientId = getSelectedBlockClientId(); var selectedBlockName = selectedBlockClientId && getBlockName(selectedBlockClientId); var blockType = selectedBlockClientId && Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__["getBlockType"])(selectedBlockName); var blockStyles = selectedBlockClientId && getBlockStyles(selectedBlockName); return { count: getSelectedBlockCount(), hasBlockStyles: blockStyles && blockStyles.length > 0, selectedBlockName: selectedBlockName, selectedBlockClientId: selectedBlockClientId, blockType: blockType }; })(BlockInspector)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-list-appender/index.js": /*!*********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-list-appender/index.js ***! \*********************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _ignore_nested_events__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../ignore-nested-events */ "./node_modules/@wordpress/editor/build-module/components/ignore-nested-events/index.js"); /* harmony import */ var _default_block_appender__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../default-block-appender */ "./node_modules/@wordpress/editor/build-module/components/default-block-appender/index.js"); /* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../inserter */ "./node_modules/@wordpress/editor/build-module/components/inserter/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function BlockListAppender(_ref) { var blockClientIds = _ref.blockClientIds, rootClientId = _ref.rootClientId, canInsertDefaultBlock = _ref.canInsertDefaultBlock, isLocked = _ref.isLocked; if (isLocked) { return null; } if (canInsertDefaultBlock) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_ignore_nested_events__WEBPACK_IMPORTED_MODULE_6__["default"], { childHandledEvents: ['onFocus', 'onClick', 'onKeyDown'] }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_default_block_appender__WEBPACK_IMPORTED_MODULE_7__["default"], { rootClientId: rootClientId, lastBlockClientId: Object(lodash__WEBPACK_IMPORTED_MODULE_1__["last"])(blockClientIds) })); } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "block-list-appender" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_inserter__WEBPACK_IMPORTED_MODULE_8__["default"], { rootClientId: rootClientId, renderToggle: function renderToggle(_ref2) { var onToggle = _ref2.onToggle, disabled = _ref2.disabled, isOpen = _ref2.isOpen; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["Button"], { "aria-label": Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Add block'), onClick: onToggle, className: "block-list-appender__toggle", "aria-haspopup": "true", "aria-expanded": isOpen, disabled: disabled }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["Dashicon"], { icon: "insert" })); } })); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select, _ref3) { var rootClientId = _ref3.rootClientId; var _select = select('core/editor'), getBlockOrder = _select.getBlockOrder, canInsertBlockType = _select.canInsertBlockType, getTemplateLock = _select.getTemplateLock; return { isLocked: !!getTemplateLock(rootClientId), blockClientIds: getBlockOrder(rootClientId), canInsertDefaultBlock: canInsertBlockType(Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__["getDefaultBlockName"])(), rootClientId) }; })(BlockListAppender)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-list/block-contextual-toolbar.js": /*!*******************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-list/block-contextual-toolbar.js ***! \*******************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _navigable_toolbar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../navigable-toolbar */ "./node_modules/@wordpress/editor/build-module/components/navigable-toolbar/index.js"); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ */ "./node_modules/@wordpress/editor/build-module/components/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ function BlockContextualToolbar(_ref) { var focusOnMount = _ref.focusOnMount; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_navigable_toolbar__WEBPACK_IMPORTED_MODULE_2__["default"], { focusOnMount: focusOnMount, className: "editor-block-contextual-toolbar" /* translators: accessibility text for the block toolbar */ , "aria-label": Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Block tools') }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(___WEBPACK_IMPORTED_MODULE_3__["BlockToolbar"], null)); } /* harmony default export */ __webpack_exports__["default"] = (BlockContextualToolbar); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-list/block-crash-boundary.js": /*!***************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-list/block-crash-boundary.js ***! \***************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__); /** * WordPress dependencies */ var BlockCrashBoundary = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(BlockCrashBoundary, _Component); function BlockCrashBoundary() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, BlockCrashBoundary); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(BlockCrashBoundary).apply(this, arguments)); _this.state = { hasError: false }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(BlockCrashBoundary, [{ key: "componentDidCatch", value: function componentDidCatch(error) { this.props.onError(error); this.setState({ hasError: true }); } }, { key: "render", value: function render() { if (this.state.hasError) { return null; } return this.props.children; } }]); return BlockCrashBoundary; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (BlockCrashBoundary); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-list/block-crash-warning.js": /*!**************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-list/block-crash-warning.js ***! \**************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../warning */ "./node_modules/@wordpress/editor/build-module/components/warning/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ var warning = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_warning__WEBPACK_IMPORTED_MODULE_2__["default"], null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('This block has encountered an error and cannot be previewed.')); /* harmony default export */ __webpack_exports__["default"] = (function () { return warning; }); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-list/block-html.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-list/block-html.js ***! \*****************************************************************************************/ /*! exports provided: BlockHTML, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockHTML", function() { return BlockHTML; }); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var react_autosize_textarea__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-autosize-textarea */ "./node_modules/react-autosize-textarea/lib/index.js"); /* harmony import */ var react_autosize_textarea__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_autosize_textarea__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__); /** * External Dependencies */ /** * WordPress Dependencies */ var BlockHTML = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(BlockHTML, _Component); function BlockHTML(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, BlockHTML); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(BlockHTML).apply(this, arguments)); _this.onChange = _this.onChange.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onBlur = _this.onBlur.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.state = { html: props.block.isValid ? Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__["getBlockContent"])(props.block) : props.block.originalContent }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(BlockHTML, [{ key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (!Object(lodash__WEBPACK_IMPORTED_MODULE_8__["isEqual"])(this.props.block.attributes, prevProps.block.attributes)) { this.setState({ html: Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__["getBlockContent"])(this.props.block) }); } } }, { key: "onBlur", value: function onBlur() { var html = this.state.html; var blockType = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__["getBlockType"])(this.props.block.name); var attributes = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__["getBlockAttributes"])(blockType, html, this.props.block.attributes); // If html is empty we reset the block to the default HTML and mark it as valid to avoid triggering an error var content = html ? html : Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__["getSaveContent"])(blockType, attributes); var isValid = html ? Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__["isValidBlockContent"])(blockType, attributes, content) : true; this.props.onChange(this.props.clientId, attributes, content, isValid); // Ensure the state is updated if we reset so it displays the default content if (!html) { this.setState({ html: content }); } } }, { key: "onChange", value: function onChange(event) { this.setState({ html: event.target.value }); } }, { key: "render", value: function render() { var html = this.state.html; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(react_autosize_textarea__WEBPACK_IMPORTED_MODULE_7___default.a, { className: "editor-block-list__block-html-textarea", value: html, onBlur: this.onBlur, onChange: this.onChange }); } }]); return BlockHTML; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__["withSelect"])(function (select, ownProps) { return { block: select('core/editor').getBlock(ownProps.clientId) }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__["withDispatch"])(function (dispatch) { return { onChange: function onChange(clientId, attributes, originalContent, isValid) { dispatch('core/editor').updateBlock(clientId, { attributes: attributes, originalContent: originalContent, isValid: isValid }); } }; })])(BlockHTML)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-list/block-invalid-warning.js": /*!****************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-list/block-invalid-warning.js ***! \****************************************************************************************************/ /*! exports provided: BlockInvalidWarning, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockInvalidWarning", function() { return BlockInvalidWarning; }); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../warning */ "./node_modules/@wordpress/editor/build-module/components/warning/index.js"); /* harmony import */ var _block_compare__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../block-compare */ "./node_modules/@wordpress/editor/build-module/components/block-compare/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ var BlockInvalidWarning = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(BlockInvalidWarning, _Component); function BlockInvalidWarning(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, BlockInvalidWarning); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(BlockInvalidWarning).call(this, props)); _this.state = { compare: false }; _this.onCompare = _this.onCompare.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onCompareClose = _this.onCompareClose.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(BlockInvalidWarning, [{ key: "onCompare", value: function onCompare() { this.setState({ compare: true }); } }, { key: "onCompareClose", value: function onCompareClose() { this.setState({ compare: false }); } }, { key: "render", value: function render() { var _this$props = this.props, convertToHTML = _this$props.convertToHTML, convertToBlocks = _this$props.convertToBlocks, convertToClassic = _this$props.convertToClassic, block = _this$props.block; var hasHTMLBlock = !!Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_9__["getBlockType"])('core/html'); var compare = this.state.compare; var hiddenActions = [{ title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Convert to Classic Block'), onClick: convertToClassic }]; if (compare) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["Modal"], { title: // translators: Dialog title to fix block content Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Resolve Block'), onRequestClose: this.onCompareClose, className: "editor-block-compare" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_block_compare__WEBPACK_IMPORTED_MODULE_12__["default"], { block: block, onKeep: convertToHTML, onConvert: convertToBlocks, convertor: blockToBlocks, convertButtonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Convert to Blocks') })); } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_warning__WEBPACK_IMPORTED_MODULE_11__["default"], { actions: [Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["Button"], { key: "convert", onClick: this.onCompare, isLarge: true, isPrimary: !hasHTMLBlock }, // translators: Button to fix block content Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["_x"])('Resolve', 'imperative verb')), hasHTMLBlock && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["Button"], { key: "edit", onClick: convertToHTML, isLarge: true, isPrimary: true }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Convert to HTML'))], secondaryActions: hiddenActions }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('This block contains unexpected or invalid content.')); } }]); return BlockInvalidWarning; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); var blockToClassic = function blockToClassic(block) { return Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_9__["createBlock"])('core/freeform', { content: block.originalContent }); }; var blockToHTML = function blockToHTML(block) { return Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_9__["createBlock"])('core/html', { content: block.originalContent }); }; var blockToBlocks = function blockToBlocks(block) { return Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_9__["rawHandler"])({ HTML: block.originalContent }); }; /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withDispatch"])(function (dispatch, _ref) { var block = _ref.block; var _dispatch = dispatch('core/editor'), replaceBlock = _dispatch.replaceBlock; return { convertToClassic: function convertToClassic() { replaceBlock(block.clientId, blockToClassic(block)); }, convertToHTML: function convertToHTML() { replaceBlock(block.clientId, blockToHTML(block)); }, convertToBlocks: function convertToBlocks() { replaceBlock(block.clientId, blockToBlocks(block)); } }; })(BlockInvalidWarning)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-list/block-mobile-toolbar.js": /*!***************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-list/block-mobile-toolbar.js ***! \***************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/viewport */ "@wordpress/viewport"); /* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _block_mover__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../block-mover */ "./node_modules/@wordpress/editor/build-module/components/block-mover/index.js"); /* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../inserter */ "./node_modules/@wordpress/editor/build-module/components/inserter/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ function BlockMobileToolbar(_ref) { var clientId = _ref.clientId; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-list__block-mobile-toolbar" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_inserter__WEBPACK_IMPORTED_MODULE_3__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_mover__WEBPACK_IMPORTED_MODULE_2__["default"], { clientIds: [clientId] })); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_1__["ifViewportMatches"])('< small')(BlockMobileToolbar)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-list/block.js": /*!************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-list/block.js ***! \************************************************************************************/ /*! exports provided: BlockListBlock, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockListBlock", function() { return BlockListBlock; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/dom */ "@wordpress/dom"); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_dom__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @wordpress/viewport */ "@wordpress/viewport"); /* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var _block_edit__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../block-edit */ "./node_modules/@wordpress/editor/build-module/components/block-edit/index.js"); /* harmony import */ var _block_mover__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../block-mover */ "./node_modules/@wordpress/editor/build-module/components/block-mover/index.js"); /* harmony import */ var _block_drop_zone__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../block-drop-zone */ "./node_modules/@wordpress/editor/build-module/components/block-drop-zone/index.js"); /* harmony import */ var _block_invalid_warning__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./block-invalid-warning */ "./node_modules/@wordpress/editor/build-module/components/block-list/block-invalid-warning.js"); /* harmony import */ var _block_crash_warning__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./block-crash-warning */ "./node_modules/@wordpress/editor/build-module/components/block-list/block-crash-warning.js"); /* harmony import */ var _block_crash_boundary__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./block-crash-boundary */ "./node_modules/@wordpress/editor/build-module/components/block-list/block-crash-boundary.js"); /* harmony import */ var _block_html__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./block-html */ "./node_modules/@wordpress/editor/build-module/components/block-list/block-html.js"); /* harmony import */ var _breadcrumb__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./breadcrumb */ "./node_modules/@wordpress/editor/build-module/components/block-list/breadcrumb.js"); /* harmony import */ var _block_contextual_toolbar__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./block-contextual-toolbar */ "./node_modules/@wordpress/editor/build-module/components/block-list/block-contextual-toolbar.js"); /* harmony import */ var _multi_controls__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./multi-controls */ "./node_modules/@wordpress/editor/build-module/components/block-list/multi-controls.js"); /* harmony import */ var _block_mobile_toolbar__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./block-mobile-toolbar */ "./node_modules/@wordpress/editor/build-module/components/block-list/block-mobile-toolbar.js"); /* harmony import */ var _insertion_point__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./insertion-point */ "./node_modules/@wordpress/editor/build-module/components/block-list/insertion-point.js"); /* harmony import */ var _ignore_nested_events__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../ignore-nested-events */ "./node_modules/@wordpress/editor/build-module/components/ignore-nested-events/index.js"); /* harmony import */ var _inserter_with_shortcuts__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../inserter-with-shortcuts */ "./node_modules/@wordpress/editor/build-module/components/inserter-with-shortcuts/index.js"); /* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../inserter */ "./node_modules/@wordpress/editor/build-module/components/inserter/index.js"); /* harmony import */ var _hover_area__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./hover-area */ "./node_modules/@wordpress/editor/build-module/components/block-list/hover-area.js"); /* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../utils/dom */ "./node_modules/@wordpress/editor/build-module/utils/dom.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var BlockListBlock = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__["default"])(BlockListBlock, _Component); function BlockListBlock() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, BlockListBlock); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__["default"])(BlockListBlock).apply(this, arguments)); _this.setBlockListRef = _this.setBlockListRef.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.bindBlockNode = _this.bindBlockNode.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.setAttributes = _this.setAttributes.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.maybeHover = _this.maybeHover.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.forceFocusedContextualToolbar = _this.forceFocusedContextualToolbar.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.hideHoverEffects = _this.hideHoverEffects.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.mergeBlocks = _this.mergeBlocks.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.insertBlocksAfter = _this.insertBlocksAfter.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.onFocus = _this.onFocus.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.preventDrag = _this.preventDrag.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.onPointerDown = _this.onPointerDown.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.deleteOrInsertAfterWrapper = _this.deleteOrInsertAfterWrapper.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.onBlockError = _this.onBlockError.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.onTouchStart = _this.onTouchStart.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.onClick = _this.onClick.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.onDragStart = _this.onDragStart.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.onDragEnd = _this.onDragEnd.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.selectOnOpen = _this.selectOnOpen.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.onShiftSelection = _this.onShiftSelection.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.hadTouchStart = false; _this.state = { error: null, dragging: false, isHovered: false }; _this.isForcingContextualToolbar = false; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(BlockListBlock, [{ key: "componentDidMount", value: function componentDidMount() { if (this.props.isSelected) { this.focusTabbable(); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (this.isForcingContextualToolbar) { // The forcing of contextual toolbar should only be true during one update, // after the first update normal conditions should apply. this.isForcingContextualToolbar = false; } if (this.props.isTypingWithinBlock || this.props.isSelected) { this.hideHoverEffects(); } if (this.props.isSelected && !prevProps.isSelected) { this.focusTabbable(true); } // When triggering a multi-selection, // move the focus to the wrapper of the first selected block. if (this.props.isFirstMultiSelected && !prevProps.isFirstMultiSelected) { this.wrapperNode.focus(); } } }, { key: "setBlockListRef", value: function setBlockListRef(node) { this.wrapperNode = node; this.props.blockRef(node, this.props.clientId); // We need to rerender to trigger a rerendering of HoverArea // it depents on this.wrapperNode but we can't keep this.wrapperNode in state // Because we need it to be immediately availeble for `focusableTabbable` to work. this.forceUpdate(); } }, { key: "bindBlockNode", value: function bindBlockNode(node) { this.node = node; } /** * When a block becomes selected, transition focus to an inner tabbable. * * @param {boolean} ignoreInnerBlocks Should not focus inner blocks. */ }, { key: "focusTabbable", value: function focusTabbable(ignoreInnerBlocks) { var _this2 = this; var initialPosition = this.props.initialPosition; // Focus is captured by the wrapper node, so while focus transition // should only consider tabbables within editable display, since it // may be the wrapper itself or a side control which triggered the // focus event, don't unnecessary transition to an inner tabbable. if (this.wrapperNode.contains(document.activeElement)) { return; } // Find all tabbables within node. var textInputs = _wordpress_dom__WEBPACK_IMPORTED_MODULE_11__["focus"].tabbable.find(this.node).filter(_wordpress_dom__WEBPACK_IMPORTED_MODULE_11__["isTextField"]) // Exclude inner blocks .filter(function (node) { return !ignoreInnerBlocks || Object(_utils_dom__WEBPACK_IMPORTED_MODULE_35__["isInsideRootBlock"])(_this2.node, node); }); // If reversed (e.g. merge via backspace), use the last in the set of // tabbables. var isReverse = -1 === initialPosition; var target = (isReverse ? lodash__WEBPACK_IMPORTED_MODULE_10__["last"] : lodash__WEBPACK_IMPORTED_MODULE_10__["first"])(textInputs); if (!target) { this.wrapperNode.focus(); return; } target.focus(); // In reverse case, need to explicitly place caret position. if (isReverse) { Object(_wordpress_dom__WEBPACK_IMPORTED_MODULE_11__["placeCaretAtHorizontalEdge"])(target, true); Object(_wordpress_dom__WEBPACK_IMPORTED_MODULE_11__["placeCaretAtVerticalEdge"])(target, true); } } }, { key: "setAttributes", value: function setAttributes(attributes) { var _this$props = this.props, block = _this$props.block, onChange = _this$props.onChange; var type = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_13__["getBlockType"])(block.name); onChange(block.clientId, attributes); var metaAttributes = Object(lodash__WEBPACK_IMPORTED_MODULE_10__["reduce"])(attributes, function (result, value, key) { if (Object(lodash__WEBPACK_IMPORTED_MODULE_10__["get"])(type, ['attributes', key, 'source']) === 'meta') { result[type.attributes[key].meta] = value; } return result; }, {}); if (Object(lodash__WEBPACK_IMPORTED_MODULE_10__["size"])(metaAttributes)) { this.props.onMetaChange(metaAttributes); } } }, { key: "onTouchStart", value: function onTouchStart() { // Detect touchstart to disable hover on iOS this.hadTouchStart = true; } }, { key: "onClick", value: function onClick() { // Clear touchstart detection // Browser will try to emulate mouse events also see https://www.html5rocks.com/en/mobile/touchandmouse/ this.hadTouchStart = false; } /** * A mouseover event handler to apply hover effect when a pointer device is * placed within the bounds of the block. The mouseover event is preferred * over mouseenter because it may be the case that a previous mouseenter * event was blocked from being handled by a IgnoreNestedEvents component, * therefore transitioning out of a nested block to the bounds of the block * would otherwise not trigger a hover effect. * * @see https://developer.mozilla.org/en-US/docs/Web/Events/mouseenter */ }, { key: "maybeHover", value: function maybeHover() { var _this$props2 = this.props, isPartOfMultiSelection = _this$props2.isPartOfMultiSelection, isSelected = _this$props2.isSelected; var isHovered = this.state.isHovered; if (isHovered || isPartOfMultiSelection || isSelected || this.props.isMultiSelecting || this.hadTouchStart) { return; } this.setState({ isHovered: true }); } /** * Sets the block state as unhovered if currently hovering. There are cases * where mouseleave may occur but the block is not hovered (multi-select), * so to avoid unnecesary renders, the state is only set if hovered. */ }, { key: "hideHoverEffects", value: function hideHoverEffects() { if (this.state.isHovered) { this.setState({ isHovered: false }); } } }, { key: "mergeBlocks", value: function mergeBlocks() { var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var _this$props3 = this.props, block = _this$props3.block, previousBlockClientId = _this$props3.previousBlockClientId, nextBlockClientId = _this$props3.nextBlockClientId, onMerge = _this$props3.onMerge; // Do nothing when it's the first block. if (!forward && !previousBlockClientId || forward && !nextBlockClientId) { return; } if (forward) { onMerge(block.clientId, nextBlockClientId); } else { onMerge(previousBlockClientId, block.clientId); } } }, { key: "insertBlocksAfter", value: function insertBlocksAfter(blocks) { this.props.onInsertBlocks(blocks, this.props.order + 1); } /** * Marks the block as selected when focused and not already selected. This * specifically handles the case where block does not set focus on its own * (via `setFocus`), typically if there is no focusable input in the block. * * @return {void} */ }, { key: "onFocus", value: function onFocus() { if (!this.props.isSelected && !this.props.isPartOfMultiSelection) { this.props.onSelect(); } } /** * Prevents default dragging behavior within a block to allow for multi- * selection to take effect unhampered. * * @param {DragEvent} event Drag event. * * @return {void} */ }, { key: "preventDrag", value: function preventDrag(event) { event.preventDefault(); } /** * Begins tracking cursor multi-selection when clicking down within block. * * @param {MouseEvent} event A mousedown event. * * @return {void} */ }, { key: "onPointerDown", value: function onPointerDown(event) { // Not the main button. // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button if (event.button !== 0) { return; } if (event.shiftKey) { if (!this.props.isSelected) { this.onShiftSelection(); event.preventDefault(); } } else { this.props.onSelectionStart(this.props.clientId); // Allow user to escape out of a multi-selection to a singular // selection of a block via click. This is handled here since // onFocus excludes blocks involved in a multiselection, as // focus can be incurred by starting a multiselection (focus // moved to first block's multi-controls). if (this.props.isPartOfMultiSelection) { this.props.onSelect(); } } } /** * Interprets keydown event intent to remove or insert after block if key * event occurs on wrapper node. This can occur when the block has no text * fields of its own, particularly after initial insertion, to allow for * easy deletion and continuous writing flow to add additional content. * * @param {KeyboardEvent} event Keydown event. */ }, { key: "deleteOrInsertAfterWrapper", value: function deleteOrInsertAfterWrapper(event) { var keyCode = event.keyCode, target = event.target; if (!this.props.isSelected || target !== this.wrapperNode || this.props.isLocked) { return; } switch (keyCode) { case _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["ENTER"]: // Insert default block after current block if enter and event // not already handled by descendant. this.props.onInsertDefaultBlockAfter(); event.preventDefault(); break; case _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["BACKSPACE"]: case _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["DELETE"]: // Remove block on backspace. var _this$props4 = this.props, clientId = _this$props4.clientId, onRemove = _this$props4.onRemove; onRemove(clientId); event.preventDefault(); break; } } }, { key: "onBlockError", value: function onBlockError(error) { this.setState({ error: error }); } }, { key: "onDragStart", value: function onDragStart() { this.setState({ dragging: true }); } }, { key: "onDragEnd", value: function onDragEnd() { this.setState({ dragging: false }); } }, { key: "selectOnOpen", value: function selectOnOpen(open) { if (open && !this.props.isSelected) { this.props.onSelect(); } } }, { key: "onShiftSelection", value: function onShiftSelection() { if (!this.props.isSelectionEnabled) { return; } var _this$props5 = this.props, getBlockSelectionStart = _this$props5.getBlockSelectionStart, onMultiSelect = _this$props5.onMultiSelect, onSelect = _this$props5.onSelect; if (getBlockSelectionStart()) { onMultiSelect(getBlockSelectionStart(), this.props.clientId); } else { onSelect(this.props.clientId); } } }, { key: "forceFocusedContextualToolbar", value: function forceFocusedContextualToolbar() { this.isForcingContextualToolbar = true; // trigger a re-render this.setState(function () { return {}; }); } }, { key: "render", value: function render() { var _this3 = this; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_hover_area__WEBPACK_IMPORTED_MODULE_34__["default"], { container: this.wrapperNode }, function (_ref) { var hoverArea = _ref.hoverArea; var _this3$props = _this3.props, block = _this3$props.block, order = _this3$props.order, mode = _this3$props.mode, isFocusMode = _this3$props.isFocusMode, hasFixedToolbar = _this3$props.hasFixedToolbar, isLocked = _this3$props.isLocked, isFirst = _this3$props.isFirst, isLast = _this3$props.isLast, clientId = _this3$props.clientId, rootClientId = _this3$props.rootClientId, isSelected = _this3$props.isSelected, isPartOfMultiSelection = _this3$props.isPartOfMultiSelection, isFirstMultiSelected = _this3$props.isFirstMultiSelected, isTypingWithinBlock = _this3$props.isTypingWithinBlock, isCaretWithinFormattedText = _this3$props.isCaretWithinFormattedText, isMultiSelecting = _this3$props.isMultiSelecting, isEmptyDefaultBlock = _this3$props.isEmptyDefaultBlock, isMovable = _this3$props.isMovable, isPreviousBlockADefaultEmptyBlock = _this3$props.isPreviousBlockADefaultEmptyBlock, isParentOfSelectedBlock = _this3$props.isParentOfSelectedBlock, isDraggable = _this3$props.isDraggable, className = _this3$props.className; var isHovered = _this3.state.isHovered && !isMultiSelecting; var blockName = block.name, isValid = block.isValid; var blockType = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_13__["getBlockType"])(blockName); // translators: %s: Type of block (i.e. Text, Image etc) var blockLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_15__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_15__["__"])('Block: %s'), blockType.title); // The block as rendered in the editor is composed of general block UI // (mover, toolbar, wrapper) and the display of the block content. var isUnregisteredBlock = block.name === Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_13__["getUnregisteredTypeHandlerName"])(); // If the block is selected and we're typing the block should not appear. // Empty paragraph blocks should always show up as unselected. var showEmptyBlockSideInserter = (isSelected || isHovered) && isEmptyDefaultBlock && isValid; var showSideInserter = (isSelected || isHovered) && isEmptyDefaultBlock; var shouldAppearSelected = !isFocusMode && !showSideInserter && isSelected && !isTypingWithinBlock; var shouldAppearHovered = !isFocusMode && !hasFixedToolbar && isHovered && !isEmptyDefaultBlock; // We render block movers and block settings to keep them tabbale even if hidden var shouldRenderMovers = !isFocusMode && (isSelected || hoverArea === 'left') && !showEmptyBlockSideInserter && !isMultiSelecting && !isPartOfMultiSelection && !isTypingWithinBlock; var shouldShowBreadcrumb = !isFocusMode && isHovered && !isEmptyDefaultBlock; var shouldShowContextualToolbar = !hasFixedToolbar && !showSideInserter && (isSelected && (!isTypingWithinBlock || isCaretWithinFormattedText) || isFirstMultiSelected); var shouldShowMobileToolbar = shouldAppearSelected; var _this3$state = _this3.state, error = _this3$state.error, dragging = _this3$state.dragging; // Insertion point can only be made visible if the block is at the // the extent of a multi-selection, or not in a multi-selection. var shouldShowInsertionPoint = isPartOfMultiSelection && isFirstMultiSelected || !isPartOfMultiSelection; var canShowInBetweenInserter = !isEmptyDefaultBlock && !isPreviousBlockADefaultEmptyBlock; // The wp-block className is important for editor styles. // Generate the wrapper class names handling the different states of the block. var wrapperClassName = classnames__WEBPACK_IMPORTED_MODULE_9___default()('wp-block editor-block-list__block', { 'has-warning': !isValid || !!error || isUnregisteredBlock, 'is-selected': shouldAppearSelected, 'is-multi-selected': isPartOfMultiSelection, 'is-hovered': shouldAppearHovered, 'is-reusable': Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_13__["isReusableBlock"])(blockType), 'is-dragging': dragging, 'is-typing': isTypingWithinBlock, 'is-focused': isFocusMode && (isSelected || isParentOfSelectedBlock), 'is-focus-mode': isFocusMode }, className); var onReplace = _this3.props.onReplace; // Determine whether the block has props to apply to the wrapper. var wrapperProps = _this3.props.wrapperProps; if (blockType.getEditWrapperProps) { wrapperProps = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__["default"])({}, wrapperProps, blockType.getEditWrapperProps(block.attributes)); } var blockElementId = "block-".concat(clientId); // We wrap the BlockEdit component in a div that hides it when editing in // HTML mode. This allows us to render all of the ancillary pieces // (InspectorControls, etc.) which are inside `BlockEdit` but not // `BlockHTML`, even in HTML mode. var blockEdit = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_block_edit__WEBPACK_IMPORTED_MODULE_19__["default"], { name: blockName, isSelected: isSelected, attributes: block.attributes, setAttributes: _this3.setAttributes, insertBlocksAfter: isLocked ? undefined : _this3.insertBlocksAfter, onReplace: isLocked ? undefined : onReplace, mergeBlocks: isLocked ? undefined : _this3.mergeBlocks, clientId: clientId, isSelectionEnabled: _this3.props.isSelectionEnabled, toggleSelection: _this3.props.toggleSelection }); if (mode !== 'visual') { blockEdit = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { style: { display: 'none' } }, blockEdit); } // Disable reasons: // // jsx-a11y/mouse-events-have-key-events: // - onMouseOver is explicitly handling hover effects // // jsx-a11y/no-static-element-interactions: // - Each block can be selected by clicking on it /* eslint-disable jsx-a11y/mouse-events-have-key-events, jsx-a11y/no-static-element-interactions, jsx-a11y/onclick-has-role, jsx-a11y/click-events-have-key-events */ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_ignore_nested_events__WEBPACK_IMPORTED_MODULE_31__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ id: blockElementId, ref: _this3.setBlockListRef, onMouseOver: _this3.maybeHover, onMouseOverHandled: _this3.hideHoverEffects, onMouseLeave: _this3.hideHoverEffects, className: wrapperClassName, "data-type": block.name, onTouchStart: _this3.onTouchStart, onFocus: _this3.onFocus, onClick: _this3.onClick, onKeyDown: _this3.deleteOrInsertAfterWrapper, tabIndex: "0", "aria-label": blockLabel, childHandledEvents: ['onDragStart', 'onMouseDown'] }, wrapperProps), shouldShowInsertionPoint && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_insertion_point__WEBPACK_IMPORTED_MODULE_30__["default"], { clientId: clientId, rootClientId: rootClientId, canShowInserter: canShowInBetweenInserter }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_block_drop_zone__WEBPACK_IMPORTED_MODULE_21__["default"], { index: order, clientId: clientId, rootClientId: rootClientId }), shouldRenderMovers && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_block_mover__WEBPACK_IMPORTED_MODULE_20__["default"], { clientIds: clientId, blockElementId: blockElementId, isFirst: isFirst, isLast: isLast, isHidden: !(isHovered || isSelected) || hoverArea !== 'left', isDraggable: isDraggable !== false && !isPartOfMultiSelection && isMovable, onDragStart: _this3.onDragStart, onDragEnd: _this3.onDragEnd }), isFirstMultiSelected && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_multi_controls__WEBPACK_IMPORTED_MODULE_28__["default"], { rootClientId: rootClientId }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { className: "editor-block-list__block-edit" }, shouldShowBreadcrumb && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_breadcrumb__WEBPACK_IMPORTED_MODULE_26__["default"], { clientId: clientId, isHidden: !(isHovered || isSelected) || hoverArea !== 'left' }), (shouldShowContextualToolbar || _this3.isForcingContextualToolbar) && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_block_contextual_toolbar__WEBPACK_IMPORTED_MODULE_27__["default"] // If the toolbar is being shown because of being forced // it should focus the toolbar right after the mount. , { focusOnMount: _this3.isForcingContextualToolbar }), !shouldShowContextualToolbar && isSelected && !hasFixedToolbar && !isEmptyDefaultBlock && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_14__["KeyboardShortcuts"], { bindGlobal: true, eventName: "keydown", shortcuts: { 'alt+f10': _this3.forceFocusedContextualToolbar } }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_ignore_nested_events__WEBPACK_IMPORTED_MODULE_31__["default"], { ref: _this3.bindBlockNode, onDragStart: _this3.preventDrag, onMouseDown: _this3.onPointerDown, "data-block": clientId }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_block_crash_boundary__WEBPACK_IMPORTED_MODULE_24__["default"], { onError: _this3.onBlockError }, isValid && blockEdit, isValid && mode === 'html' && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_block_html__WEBPACK_IMPORTED_MODULE_25__["default"], { clientId: clientId }), !isValid && [Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_block_invalid_warning__WEBPACK_IMPORTED_MODULE_22__["default"], { key: "invalid-warning", block: block }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { key: "invalid-preview" }, Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_13__["getSaveElement"])(blockType, block.attributes))]), shouldShowMobileToolbar && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_block_mobile_toolbar__WEBPACK_IMPORTED_MODULE_29__["default"], { clientId: clientId }), !!error && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_block_crash_warning__WEBPACK_IMPORTED_MODULE_23__["default"], null))), showEmptyBlockSideInserter && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { className: "editor-block-list__side-inserter" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_inserter_with_shortcuts__WEBPACK_IMPORTED_MODULE_32__["default"], { clientId: clientId, rootClientId: rootClientId, onToggle: _this3.selectOnOpen })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { className: "editor-block-list__empty-block-inserter" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_inserter__WEBPACK_IMPORTED_MODULE_33__["default"], { position: "top right", onToggle: _this3.selectOnOpen })))); /* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/onclick-has-role, jsx-a11y/click-events-have-key-events */ }); } }]); return BlockListBlock; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["Component"]); var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_16__["withSelect"])(function (select, _ref2) { var clientId = _ref2.clientId, rootClientId = _ref2.rootClientId, isLargeViewport = _ref2.isLargeViewport; var _select = select('core/editor'), isBlockSelected = _select.isBlockSelected, getPreviousBlockClientId = _select.getPreviousBlockClientId, getNextBlockClientId = _select.getNextBlockClientId, getBlock = _select.getBlock, isAncestorMultiSelected = _select.isAncestorMultiSelected, isBlockMultiSelected = _select.isBlockMultiSelected, isFirstMultiSelectedBlock = _select.isFirstMultiSelectedBlock, isMultiSelecting = _select.isMultiSelecting, isTyping = _select.isTyping, isCaretWithinFormattedText = _select.isCaretWithinFormattedText, getBlockIndex = _select.getBlockIndex, getBlockMode = _select.getBlockMode, isSelectionEnabled = _select.isSelectionEnabled, getSelectedBlocksInitialCaretPosition = _select.getSelectedBlocksInitialCaretPosition, getEditorSettings = _select.getEditorSettings, hasSelectedInnerBlock = _select.hasSelectedInnerBlock, getTemplateLock = _select.getTemplateLock, getBlockSelectionStart = _select.getBlockSelectionStart; var isSelected = isBlockSelected(clientId); var _getEditorSettings = getEditorSettings(), hasFixedToolbar = _getEditorSettings.hasFixedToolbar, focusMode = _getEditorSettings.focusMode; var block = getBlock(clientId); var previousBlockClientId = getPreviousBlockClientId(clientId); var previousBlock = getBlock(previousBlockClientId); var templateLock = getTemplateLock(rootClientId); var isParentOfSelectedBlock = hasSelectedInnerBlock(clientId, true); return { nextBlockClientId: getNextBlockClientId(clientId), isPartOfMultiSelection: isBlockMultiSelected(clientId) || isAncestorMultiSelected(clientId), isFirstMultiSelected: isFirstMultiSelectedBlock(clientId), isMultiSelecting: isMultiSelecting(), // We only care about this prop when the block is selected // Thus to avoid unnecessary rerenders we avoid updating the prop if the block is not selected. isTypingWithinBlock: (isSelected || isParentOfSelectedBlock) && isTyping(), isCaretWithinFormattedText: isCaretWithinFormattedText(), order: getBlockIndex(clientId, rootClientId), mode: getBlockMode(clientId), isSelectionEnabled: isSelectionEnabled(), initialPosition: getSelectedBlocksInitialCaretPosition(), isEmptyDefaultBlock: block && Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_13__["isUnmodifiedDefaultBlock"])(block), isPreviousBlockADefaultEmptyBlock: previousBlock && Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_13__["isUnmodifiedDefaultBlock"])(previousBlock), isMovable: 'all' !== templateLock, isLocked: !!templateLock, isFocusMode: focusMode && isLargeViewport, hasFixedToolbar: hasFixedToolbar && isLargeViewport, previousBlockClientId: previousBlockClientId, block: block, isSelected: isSelected, isParentOfSelectedBlock: isParentOfSelectedBlock, // We only care about this value when the shift key is pressed. // We call it dynamically in the event handler to avoid unnecessary re-renders. getBlockSelectionStart: getBlockSelectionStart }; }); var applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_16__["withDispatch"])(function (dispatch, ownProps) { var _dispatch = dispatch('core/editor'), updateBlockAttributes = _dispatch.updateBlockAttributes, selectBlock = _dispatch.selectBlock, multiSelect = _dispatch.multiSelect, insertBlocks = _dispatch.insertBlocks, insertDefaultBlock = _dispatch.insertDefaultBlock, removeBlock = _dispatch.removeBlock, mergeBlocks = _dispatch.mergeBlocks, replaceBlocks = _dispatch.replaceBlocks, editPost = _dispatch.editPost, _toggleSelection = _dispatch.toggleSelection; return { onChange: function onChange(clientId, attributes) { updateBlockAttributes(clientId, attributes); }, onSelect: function onSelect() { var clientId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ownProps.clientId; var initialPosition = arguments.length > 1 ? arguments[1] : undefined; selectBlock(clientId, initialPosition); }, onMultiSelect: multiSelect, onInsertBlocks: function onInsertBlocks(blocks, index) { var rootClientId = ownProps.rootClientId; insertBlocks(blocks, index, rootClientId); }, onInsertDefaultBlockAfter: function onInsertDefaultBlockAfter() { var order = ownProps.order, rootClientId = ownProps.rootClientId; insertDefaultBlock({}, rootClientId, order + 1); }, onRemove: function onRemove(clientId) { removeBlock(clientId); }, onMerge: function onMerge() { mergeBlocks.apply(void 0, arguments); }, onReplace: function onReplace(blocks) { replaceBlocks([ownProps.clientId], blocks); }, onMetaChange: function onMetaChange(meta) { editPost({ meta: meta }); }, toggleSelection: function toggleSelection(selectionEnabled) { _toggleSelection(selectionEnabled); } }; }); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_18__["compose"])(Object(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_17__["withViewportMatch"])({ isLargeViewport: 'medium' }), applyWithSelect, applyWithDispatch, Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_14__["withFilters"])('editor.BlockListBlock'))(BlockListBlock)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-list/breadcrumb.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-list/breadcrumb.js ***! \*****************************************************************************************/ /*! exports provided: BlockBreadcrumb, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockBreadcrumb", function() { return BlockBreadcrumb; }); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _block_title__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../block-title */ "./node_modules/@wordpress/editor/build-module/components/block-title/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ /** * Block breadcrumb component, displaying the label of the block. If the block * descends from a root block, a button is displayed enabling the user to select * the root block. * * @param {string} props.clientId Client ID of block. * @param {string} props.rootClientId Client ID of block's root. * @param {Function} props.selectRootBlock Callback to select root block. */ var BlockBreadcrumb = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(BlockBreadcrumb, _Component); function BlockBreadcrumb() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, BlockBreadcrumb); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(BlockBreadcrumb).apply(this, arguments)); _this.state = { isFocused: false }; _this.onFocus = _this.onFocus.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onBlur = _this.onBlur.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(BlockBreadcrumb, [{ key: "onFocus", value: function onFocus(event) { this.setState({ isFocused: true }); // This is used for improved interoperability // with the block's `onFocus` handler which selects the block, thus conflicting // with the intention to select the root block. event.stopPropagation(); } }, { key: "onBlur", value: function onBlur() { this.setState({ isFocused: false }); } }, { key: "render", value: function render() { var _this$props = this.props, clientId = _this$props.clientId, rootClientId = _this$props.rootClientId; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { className: 'editor-block-list__breadcrumb' }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__["Toolbar"], null, rootClientId && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_block_title__WEBPACK_IMPORTED_MODULE_10__["default"], { clientId: rootClientId }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("span", { className: "editor-block-list__descendant-arrow" })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_block_title__WEBPACK_IMPORTED_MODULE_10__["default"], { clientId: clientId }))); } }]); return BlockBreadcrumb; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__["withSelect"])(function (select, ownProps) { var _select = select('core/editor'), getBlockRootClientId = _select.getBlockRootClientId; var clientId = ownProps.clientId; return { rootClientId: getBlockRootClientId(clientId) }; })])(BlockBreadcrumb)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-list/hover-area.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-list/hover-area.js ***! \*****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__); /** * WordPress dependencies */ var HoverArea = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(HoverArea, _Component); function HoverArea() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, HoverArea); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(HoverArea).apply(this, arguments)); _this.state = { hoverArea: null }; _this.onMouseLeave = _this.onMouseLeave.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onMouseMove = _this.onMouseMove.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(HoverArea, [{ key: "componentWillUnmount", value: function componentWillUnmount() { if (this.props.container) { this.toggleListeners(this.props.container, false); } } }, { key: "componentDidMount", value: function componentDidMount() { if (this.props.container) { this.toggleListeners(this.props.container); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (prevProps.container === this.props.container) { return; } if (prevProps.container) { this.toggleListeners(prevProps.container, false); } if (this.props.container) { this.toggleListeners(this.props.container, true); } } }, { key: "toggleListeners", value: function toggleListeners(container) { var shouldListnerToEvents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; var method = shouldListnerToEvents ? 'addEventListener' : 'removeEventListener'; container[method]('mousemove', this.onMouseMove); container[method]('mouseleave', this.onMouseLeave); } }, { key: "onMouseLeave", value: function onMouseLeave() { if (this.state.hoverArea) { this.setState({ hoverArea: null }); } } }, { key: "onMouseMove", value: function onMouseMove(event) { var _this$props = this.props, isRTL = _this$props.isRTL, container = _this$props.container; var _container$getBoundin = container.getBoundingClientRect(), width = _container$getBoundin.width, left = _container$getBoundin.left, right = _container$getBoundin.right; var hoverArea = null; if (event.clientX - left < width / 3) { hoverArea = isRTL ? 'right' : 'left'; } else if (right - event.clientX < width / 3) { hoverArea = isRTL ? 'left' : 'right'; } if (hoverArea !== this.state.hoverArea) { this.setState({ hoverArea: hoverArea }); } } }, { key: "render", value: function render() { var hoverArea = this.state.hoverArea; var children = this.props.children; return children({ hoverArea: hoverArea }); } }]); return HoverArea; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__["withSelect"])(function (select) { return { isRTL: select('core/editor').getEditorSettings().isRTL }; })(HoverArea)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-list/index.js": /*!************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-list/index.js ***! \************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _block__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./block */ "./node_modules/@wordpress/editor/build-module/components/block-list/block.js"); /* harmony import */ var _block_list_appender__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../block-list-appender */ "./node_modules/@wordpress/editor/build-module/components/block-list-appender/index.js"); /* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/dom */ "./node_modules/@wordpress/editor/build-module/utils/dom.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var BlockList = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__["default"])(BlockList, _Component); function BlockList(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, BlockList); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__["default"])(BlockList).call(this, props)); _this.onSelectionStart = _this.onSelectionStart.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.onSelectionEnd = _this.onSelectionEnd.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.setBlockRef = _this.setBlockRef.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.setLastClientY = _this.setLastClientY.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.onPointerMove = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["throttle"])(_this.onPointerMove.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))), 100); // Browser does not fire `*move` event when the pointer position changes // relative to the document, so fire it with the last known position. _this.onScroll = function () { return _this.onPointerMove({ clientY: _this.lastClientY }); }; _this.lastClientY = 0; _this.nodes = {}; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(BlockList, [{ key: "componentDidMount", value: function componentDidMount() { window.addEventListener('mousemove', this.setLastClientY); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { window.removeEventListener('mousemove', this.setLastClientY); } }, { key: "setLastClientY", value: function setLastClientY(_ref) { var clientY = _ref.clientY; this.lastClientY = clientY; } }, { key: "setBlockRef", value: function setBlockRef(node, clientId) { if (node === null) { delete this.nodes[clientId]; } else { this.nodes = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__["default"])({}, this.nodes, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])({}, clientId, node)); } } /** * Handles a pointer move event to update the extent of the current cursor * multi-selection. * * @param {MouseEvent} event A mousemove event object. * * @return {void} */ }, { key: "onPointerMove", value: function onPointerMove(_ref2) { var clientY = _ref2.clientY; // We don't start multi-selection until the mouse starts moving, so as // to avoid dispatching multi-selection actions on an in-place click. if (!this.props.isMultiSelecting) { this.props.onStartMultiSelect(); } var blockContentBoundaries = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_14__["getBlockDOMNode"])(this.selectionAtStart).getBoundingClientRect(); // prevent multi-selection from triggering when the selected block is a float // and the cursor is still between the top and the bottom of the block. if (clientY >= blockContentBoundaries.top && clientY <= blockContentBoundaries.bottom) { return; } var y = clientY - blockContentBoundaries.top; var key = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["findLast"])(this.coordMapKeys, function (coordY) { return coordY < y; }); this.onSelectionChange(this.coordMap[key]); } /** * Binds event handlers to the document for tracking a pending multi-select * in response to a mousedown event occurring in a rendered block. * * @param {string} clientId Client ID of block where mousedown occurred. * * @return {void} */ }, { key: "onSelectionStart", value: function onSelectionStart(clientId) { if (!this.props.isSelectionEnabled) { return; } var boundaries = this.nodes[clientId].getBoundingClientRect(); // Create a clientId to Y coördinate map. var clientIdToCoordMap = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["mapValues"])(this.nodes, function (node) { return node.getBoundingClientRect().top - boundaries.top; }); // Cache a Y coördinate to clientId map for use in `onPointerMove`. this.coordMap = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["invert"])(clientIdToCoordMap); // Cache an array of the Y coördinates for use in `onPointerMove`. // Sort the coördinates, as `this.nodes` will not necessarily reflect // the current block sequence. this.coordMapKeys = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["sortBy"])(Object.values(clientIdToCoordMap)); this.selectionAtStart = clientId; window.addEventListener('mousemove', this.onPointerMove); // Capture scroll on all elements. window.addEventListener('scroll', this.onScroll, true); window.addEventListener('mouseup', this.onSelectionEnd); } /** * Handles multi-selection changes in response to pointer move. * * @param {string} clientId Client ID of block under cursor in multi-select * drag. */ }, { key: "onSelectionChange", value: function onSelectionChange(clientId) { var _this$props = this.props, onMultiSelect = _this$props.onMultiSelect, selectionStart = _this$props.selectionStart, selectionEnd = _this$props.selectionEnd; var selectionAtStart = this.selectionAtStart; var isAtStart = selectionAtStart === clientId; if (!selectionAtStart || !this.props.isSelectionEnabled) { return; } // If multi-selecting and cursor extent returns to the start of // selection, cancel multi-select. if (isAtStart && selectionStart) { onMultiSelect(null, null); } // Expand multi-selection to block under cursor. if (!isAtStart && selectionEnd !== clientId) { onMultiSelect(selectionAtStart, clientId); } } /** * Handles a mouseup event to end the current cursor multi-selection. * * @return {void} */ }, { key: "onSelectionEnd", value: function onSelectionEnd() { // Cancel throttled calls. this.onPointerMove.cancel(); delete this.coordMap; delete this.coordMapKeys; delete this.selectionAtStart; window.removeEventListener('mousemove', this.onPointerMove); window.removeEventListener('scroll', this.onScroll, true); window.removeEventListener('mouseup', this.onSelectionEnd); // We may or may not be in a multi-selection when mouseup occurs (e.g. // an in-place mouse click), so only trigger stop if multi-selecting. if (this.props.isMultiSelecting) { this.props.onStopMultiSelect(); } } }, { key: "render", value: function render() { var _this2 = this; var _this$props2 = this.props, blockClientIds = _this$props2.blockClientIds, rootClientId = _this$props2.rootClientId, isDraggable = _this$props2.isDraggable; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { className: "editor-block-list__layout" }, Object(lodash__WEBPACK_IMPORTED_MODULE_9__["map"])(blockClientIds, function (clientId, blockIndex) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_block__WEBPACK_IMPORTED_MODULE_12__["default"], { key: 'block-' + clientId, index: blockIndex, clientId: clientId, blockRef: _this2.setBlockRef, onSelectionStart: _this2.onSelectionStart, rootClientId: rootClientId, isFirst: blockIndex === 0, isLast: blockIndex === blockClientIds.length - 1, isDraggable: isDraggable }); }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_block_list_appender__WEBPACK_IMPORTED_MODULE_13__["default"], { rootClientId: rootClientId })); } }]); return BlockList; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_11__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withSelect"])(function (select, ownProps) { var _select = select('core/editor'), getBlockOrder = _select.getBlockOrder, isSelectionEnabled = _select.isSelectionEnabled, isMultiSelecting = _select.isMultiSelecting, getMultiSelectedBlocksStartClientId = _select.getMultiSelectedBlocksStartClientId, getMultiSelectedBlocksEndClientId = _select.getMultiSelectedBlocksEndClientId; var rootClientId = ownProps.rootClientId; return { blockClientIds: getBlockOrder(rootClientId), selectionStart: getMultiSelectedBlocksStartClientId(), selectionEnd: getMultiSelectedBlocksEndClientId(), isSelectionEnabled: isSelectionEnabled(), isMultiSelecting: isMultiSelecting() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), startMultiSelect = _dispatch.startMultiSelect, stopMultiSelect = _dispatch.stopMultiSelect, multiSelect = _dispatch.multiSelect; return { onStartMultiSelect: startMultiSelect, onStopMultiSelect: stopMultiSelect, onMultiSelect: multiSelect }; })])(BlockList)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-list/insertion-point.js": /*!**********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-list/insertion-point.js ***! \**********************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../inserter */ "./node_modules/@wordpress/editor/build-module/components/inserter/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var BlockInsertionPoint = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(BlockInsertionPoint, _Component); function BlockInsertionPoint() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, BlockInsertionPoint); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(BlockInsertionPoint).apply(this, arguments)); _this.state = { isInserterFocused: false }; _this.onBlurInserter = _this.onBlurInserter.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onFocusInserter = _this.onFocusInserter.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(BlockInsertionPoint, [{ key: "onFocusInserter", value: function onFocusInserter(event) { // Stop propagation of the focus event to avoid selecting the current // block while inserting a new block, as it is not relevant to sibling // insertion and conflicts with contextual toolbar placement. event.stopPropagation(); this.setState({ isInserterFocused: true }); } }, { key: "onBlurInserter", value: function onBlurInserter() { this.setState({ isInserterFocused: false }); } }, { key: "render", value: function render() { var isInserterFocused = this.state.isInserterFocused; var _this$props = this.props, showInsertionPoint = _this$props.showInsertionPoint, canShowInserter = _this$props.canShowInserter, rootClientId = _this$props.rootClientId, insertIndex = _this$props.insertIndex; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { className: "editor-block-list__insertion-point" }, showInsertionPoint && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { className: "editor-block-list__insertion-point-indicator" }), canShowInserter && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { onFocus: this.onFocusInserter, onBlur: this.onBlurInserter // While ideally it would be enough to capture the // bubbling focus event from the Inserter, due to the // characteristics of click focusing of `button`s in // Firefox and Safari, it is not reliable. // // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus , tabIndex: -1, className: classnames__WEBPACK_IMPORTED_MODULE_7___default()('editor-block-list__insertion-point-inserter', { 'is-visible': isInserterFocused }) }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_inserter__WEBPACK_IMPORTED_MODULE_10__["default"], { rootClientId: rootClientId, index: insertIndex }))); } }]); return BlockInsertionPoint; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withSelect"])(function (select, _ref) { var clientId = _ref.clientId, rootClientId = _ref.rootClientId; var _select = select('core/editor'), getBlockIndex = _select.getBlockIndex, getBlockInsertionPoint = _select.getBlockInsertionPoint, getBlock = _select.getBlock, isBlockInsertionPointVisible = _select.isBlockInsertionPointVisible; var blockIndex = getBlockIndex(clientId, rootClientId); var insertIndex = blockIndex; var insertionPoint = getBlockInsertionPoint(); var block = getBlock(clientId); var showInsertionPoint = isBlockInsertionPointVisible() && insertionPoint.index === insertIndex && insertionPoint.rootClientId === rootClientId && !Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_8__["isUnmodifiedDefaultBlock"])(block); return { showInsertionPoint: showInsertionPoint, insertIndex: insertIndex }; })(BlockInsertionPoint)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-list/multi-controls.js": /*!*********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-list/multi-controls.js ***! \*********************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _block_mover__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../block-mover */ "./node_modules/@wordpress/editor/build-module/components/block-mover/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function BlockListMultiControls(_ref) { var multiSelectedBlockClientIds = _ref.multiSelectedBlockClientIds, clientId = _ref.clientId, isSelecting = _ref.isSelecting, isFirst = _ref.isFirst, isLast = _ref.isLast; if (isSelecting) { return null; } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_mover__WEBPACK_IMPORTED_MODULE_3__["default"], { key: "mover", clientId: clientId, clientIds: multiSelectedBlockClientIds, isFirst: isFirst, isLast: isLast }); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select, _ref2) { var clientId = _ref2.clientId; var _select = select('core/editor'), getMultiSelectedBlockClientIds = _select.getMultiSelectedBlockClientIds, isMultiSelecting = _select.isMultiSelecting, getBlockIndex = _select.getBlockIndex, getBlockCount = _select.getBlockCount; var clientIds = getMultiSelectedBlockClientIds(); var firstIndex = getBlockIndex(Object(lodash__WEBPACK_IMPORTED_MODULE_1__["first"])(clientIds), clientId); var lastIndex = getBlockIndex(Object(lodash__WEBPACK_IMPORTED_MODULE_1__["last"])(clientIds), clientId); return { multiSelectedBlockClientIds: clientIds, isSelecting: isMultiSelecting(), isFirst: firstIndex === 0, isLast: lastIndex + 1 === getBlockCount() }; })(BlockListMultiControls)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-mover/drag-handle.js": /*!*******************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-mover/drag-handle.js ***! \*******************************************************************************************/ /*! exports provided: IconDragHandle */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IconDragHandle", function() { return IconDragHandle; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _block_draggable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../block-draggable */ "./node_modules/@wordpress/editor/build-module/components/block-draggable/index.js"); /** * External dependencies */ /** * WordPress dependencies */ var IconDragHandle = function IconDragHandle(_ref) { var isVisible = _ref.isVisible, className = _ref.className, icon = _ref.icon, onDragStart = _ref.onDragStart, onDragEnd = _ref.onDragEnd, blockElementId = _ref.blockElementId, clientId = _ref.clientId; if (!isVisible) { return null; } var dragHandleClassNames = classnames__WEBPACK_IMPORTED_MODULE_1___default()('editor-block-mover__control-drag-handle', className); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_draggable__WEBPACK_IMPORTED_MODULE_2__["default"], { clientId: clientId, blockElementId: blockElementId, onDragStart: onDragStart, onDragEnd: onDragEnd }, function (_ref2) { var onDraggableStart = _ref2.onDraggableStart, onDraggableEnd = _ref2.onDraggableEnd; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: dragHandleClassNames, "aria-hidden": "true", onDragStart: onDraggableStart, onDragEnd: onDraggableEnd, draggable: true }, icon); }); }; /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-mover/icons.js": /*!*************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-mover/icons.js ***! \*************************************************************************************/ /*! exports provided: upArrow, downArrow, dragHandle */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "upArrow", function() { return upArrow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "downArrow", function() { return downArrow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dragHandle", function() { return dragHandle; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var upArrow = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["SVG"], { width: "18", height: "18", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 18 18" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Polygon"], { points: "9,4.5 3.3,10.1 4.8,11.5 9,7.3 13.2,11.5 14.7,10.1 " })); var downArrow = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["SVG"], { width: "18", height: "18", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 18 18" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Polygon"], { points: "9,13.5 14.7,7.9 13.2,6.5 9,10.7 4.8,6.5 3.3,7.9 " })); var dragHandle = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["SVG"], { width: "18", height: "18", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 18 18" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M13,8c0.6,0,1-0.4,1-1s-0.4-1-1-1s-1,0.4-1,1S12.4,8,13,8z M5,6C4.4,6,4,6.4,4,7s0.4,1,1,1s1-0.4,1-1S5.6,6,5,6z M5,10 c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S5.6,10,5,10z M13,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S13.6,10,13,10z M9,6 C8.4,6,8,6.4,8,7s0.4,1,1,1s1-0.4,1-1S9.6,6,9,6z M9,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S9.6,10,9,10z" })); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-mover/index.js": /*!*************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-mover/index.js ***! \*************************************************************************************/ /*! exports provided: BlockMover, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockMover", function() { return BlockMover; }); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _mover_description__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./mover-description */ "./node_modules/@wordpress/editor/build-module/components/block-mover/mover-description.js"); /* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./icons */ "./node_modules/@wordpress/editor/build-module/components/block-mover/icons.js"); /* harmony import */ var _drag_handle__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./drag-handle */ "./node_modules/@wordpress/editor/build-module/components/block-mover/drag-handle.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var BlockMover = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(BlockMover, _Component); function BlockMover() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, BlockMover); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(BlockMover).apply(this, arguments)); _this.state = { isFocused: false }; _this.onFocus = _this.onFocus.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onBlur = _this.onBlur.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(BlockMover, [{ key: "onFocus", value: function onFocus() { this.setState({ isFocused: true }); } }, { key: "onBlur", value: function onBlur() { this.setState({ isFocused: false }); } }, { key: "render", value: function render() { var _this$props = this.props, onMoveUp = _this$props.onMoveUp, onMoveDown = _this$props.onMoveDown, isFirst = _this$props.isFirst, isLast = _this$props.isLast, isDraggable = _this$props.isDraggable, onDragStart = _this$props.onDragStart, onDragEnd = _this$props.onDragEnd, clientIds = _this$props.clientIds, blockElementId = _this$props.blockElementId, blockType = _this$props.blockType, firstIndex = _this$props.firstIndex, isLocked = _this$props.isLocked, instanceId = _this$props.instanceId, isHidden = _this$props.isHidden; var isFocused = this.state.isFocused; var blocksCount = Object(lodash__WEBPACK_IMPORTED_MODULE_7__["castArray"])(clientIds).length; if (isLocked || isFirst && isLast) { return null; } // We emulate a disabled state because forcefully applying the `disabled` // attribute on the button while it has focus causes the screen to change // to an unfocused state (body as active element) without firing blur on, // the rendering parent, leaving it unable to react to focus out. return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { className: classnames__WEBPACK_IMPORTED_MODULE_8___default()('editor-block-mover', { 'is-visible': isFocused || !isHidden }) }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["IconButton"], { className: "editor-block-mover__control", onClick: isFirst ? null : onMoveUp, icon: _icons__WEBPACK_IMPORTED_MODULE_15__["upArrow"], label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Move up'), "aria-describedby": "editor-block-mover__up-description-".concat(instanceId), "aria-disabled": isFirst, onFocus: this.onFocus, onBlur: this.onBlur }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_drag_handle__WEBPACK_IMPORTED_MODULE_16__["IconDragHandle"], { className: "editor-block-mover__control", icon: _icons__WEBPACK_IMPORTED_MODULE_15__["dragHandle"], clientId: clientIds, blockElementId: blockElementId, isVisible: isDraggable, onDragStart: onDragStart, onDragEnd: onDragEnd }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["IconButton"], { className: "editor-block-mover__control", onClick: isLast ? null : onMoveDown, icon: _icons__WEBPACK_IMPORTED_MODULE_15__["downArrow"], label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Move down'), "aria-describedby": "editor-block-mover__down-description-".concat(instanceId), "aria-disabled": isLast, onFocus: this.onFocus, onBlur: this.onBlur }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("span", { id: "editor-block-mover__up-description-".concat(instanceId), className: "editor-block-mover__description" }, Object(_mover_description__WEBPACK_IMPORTED_MODULE_14__["getBlockMoverDescription"])(blocksCount, blockType && blockType.title, firstIndex, isFirst, isLast, -1)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("span", { id: "editor-block-mover__down-description-".concat(instanceId), className: "editor-block-mover__description" }, Object(_mover_description__WEBPACK_IMPORTED_MODULE_14__["getBlockMoverDescription"])(blocksCount, blockType && blockType.title, firstIndex, isFirst, isLast, 1))); } }]); return BlockMover; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_12__["withSelect"])(function (select, _ref) { var clientIds = _ref.clientIds; var _select = select('core/editor'), getBlock = _select.getBlock, getBlockIndex = _select.getBlockIndex, getTemplateLock = _select.getTemplateLock, getBlockRootClientId = _select.getBlockRootClientId; var firstClientId = Object(lodash__WEBPACK_IMPORTED_MODULE_7__["first"])(Object(lodash__WEBPACK_IMPORTED_MODULE_7__["castArray"])(clientIds)); var block = getBlock(firstClientId); var rootClientId = getBlockRootClientId(Object(lodash__WEBPACK_IMPORTED_MODULE_7__["first"])(Object(lodash__WEBPACK_IMPORTED_MODULE_7__["castArray"])(clientIds))); return { firstIndex: getBlockIndex(firstClientId, rootClientId), blockType: block ? Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_11__["getBlockType"])(block.name) : null, isLocked: getTemplateLock(rootClientId) === 'all', rootClientId: rootClientId }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_12__["withDispatch"])(function (dispatch, _ref2) { var clientIds = _ref2.clientIds, rootClientId = _ref2.rootClientId; var _dispatch = dispatch('core/editor'), moveBlocksDown = _dispatch.moveBlocksDown, moveBlocksUp = _dispatch.moveBlocksUp; return { onMoveDown: Object(lodash__WEBPACK_IMPORTED_MODULE_7__["partial"])(moveBlocksDown, clientIds, rootClientId), onMoveUp: Object(lodash__WEBPACK_IMPORTED_MODULE_7__["partial"])(moveBlocksUp, clientIds, rootClientId) }; }), _wordpress_compose__WEBPACK_IMPORTED_MODULE_13__["withInstanceId"])(BlockMover)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-mover/mover-description.js": /*!*************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-mover/mover-description.js ***! \*************************************************************************************************/ /*! exports provided: getBlockMoverDescription, getMultiBlockMoverDescription */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBlockMoverDescription", function() { return getBlockMoverDescription; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMultiBlockMoverDescription", function() { return getMultiBlockMoverDescription; }); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); /** * WordPress dependencies */ /** * Return a label for the block movement controls depending on block position. * * @param {number} selectedCount Number of blocks selected. * @param {string} type Block type - in the case of a single block, should * define its 'type'. I.e. 'Text', 'Heading', 'Image' etc. * @param {number} firstIndex The index (position - 1) of the first block selected. * @param {boolean} isFirst This is the first block. * @param {boolean} isLast This is the last block. * @param {number} dir Direction of movement (> 0 is considered to be going * down, < 0 is up). * * @return {string} Label for the block movement controls. */ function getBlockMoverDescription(selectedCount, type, firstIndex, isFirst, isLast, dir) { var position = firstIndex + 1; if (selectedCount > 1) { return getMultiBlockMoverDescription(selectedCount, firstIndex, isFirst, isLast, dir); } if (isFirst && isLast) { // translators: %s: Type of block (i.e. Text, Image etc) return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Block %s is the only block, and cannot be moved'), type); } if (dir > 0 && !isLast) { // moving down return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Move %1$s block from position %2$d down to position %3$d'), type, position, position + 1); } if (dir > 0 && isLast) { // moving down, and is the last item // translators: %s: Type of block (i.e. Text, Image etc) return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Block %s is at the end of the content and can’t be moved down'), type); } if (dir < 0 && !isFirst) { // moving up return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["sprintf"])( // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Move %1$s block from position %2$d up to position %3$d'), type, position, position - 1); } if (dir < 0 && isFirst) { // moving up, and is the first item // translators: %s: Type of block (i.e. Text, Image etc) return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Block %s is at the beginning of the content and can’t be moved up'), type); } } /** * Return a label for the block movement controls depending on block position. * * @param {number} selectedCount Number of blocks selected. * @param {number} firstIndex The index (position - 1) of the first block selected. * @param {boolean} isFirst This is the first block. * @param {boolean} isLast This is the last block. * @param {number} dir Direction of movement (> 0 is considered to be going * down, < 0 is up). * * @return {string} Label for the block movement controls. */ function getMultiBlockMoverDescription(selectedCount, firstIndex, isFirst, isLast, dir) { var position = firstIndex + 1; if (dir < 0 && isFirst) { return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Blocks cannot be moved up as they are already at the top'); } if (dir > 0 && isLast) { return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Blocks cannot be moved down as they are already at the bottom'); } if (dir < 0 && !isFirst) { return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["sprintf"])( // translators: 1: Number of selected blocks, 2: Position of selected blocks Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_n"])('Move %1$d block from position %2$d up by one place', 'Move %1$d blocks from position %2$d up by one place', selectedCount), selectedCount, position); } if (dir > 0 && !isLast) { return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["sprintf"])( // translators: 1: Number of selected blocks, 2: Position of selected blocks Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_n"])('Move %1$d block from position %2$d down by one place', 'Move %1$d blocks from position %2$d down by one place', selectedCount), selectedCount, position); } } /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-navigation/dropdown.js": /*!*********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-navigation/dropdown.js ***! \*********************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ */ "./node_modules/@wordpress/editor/build-module/components/block-navigation/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ var MenuIcon = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "20", height: "20" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Path"], { d: "M5 5H3v2h2V5zm3 8h11v-2H8v2zm9-8H6v2h11V5zM7 11H5v2h2v-2zm0 8h2v-2H7v2zm3-2v2h11v-2H10z" })); function BlockNavigationDropdown() { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Dropdown"], { renderToggle: function renderToggle(_ref) { var isOpen = _ref.isOpen, onToggle = _ref.onToggle; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["KeyboardShortcuts"], { bindGlobal: true, shortcuts: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])({}, _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_4__["rawShortcut"].access('o'), onToggle) }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["IconButton"], { icon: MenuIcon, "aria-expanded": isOpen, onClick: onToggle, label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Block Navigation'), className: "editor-block-navigation", shortcut: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_4__["displayShortcut"].access('o') })); }, renderContent: function renderContent(_ref3) { var onClose = _ref3.onClose; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(___WEBPACK_IMPORTED_MODULE_5__["default"], { onSelect: onClose }); } }); } /* harmony default export */ __webpack_exports__["default"] = (BlockNavigationDropdown); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-navigation/index.js": /*!******************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-navigation/index.js ***! \******************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* 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__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _block_icon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../block-icon */ "./node_modules/@wordpress/editor/build-module/components/block-icon/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function BlockNavigationList(_ref) { var blocks = _ref.blocks, selectedBlockClientId = _ref.selectedBlockClientId, selectBlock = _ref.selectBlock, showNestedBlocks = _ref.showNestedBlocks; return ( /* * Disable reason: The `list` ARIA role is redundant but * Safari+VoiceOver won't announce the list otherwise. */ /* eslint-disable jsx-a11y/no-redundant-roles */ Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("ul", { className: "editor-block-navigation__list", role: "list" }, Object(lodash__WEBPACK_IMPORTED_MODULE_1__["map"])(blocks, function (block) { var blockType = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__["getBlockType"])(block.name); var isSelected = block.clientId === selectedBlockClientId; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("li", { key: block.clientId }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-navigation__item" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["Button"], { className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('editor-block-navigation__item-button', { 'is-selected': block.clientId === selectedBlockClientId }), onClick: function onClick() { return selectBlock(block.clientId); }, isSelected: isSelected }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_icon__WEBPACK_IMPORTED_MODULE_8__["default"], { icon: blockType.icon, showColors: true }), blockType.title, isSelected && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { className: "screen-reader-text" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('(selected block)')))), showNestedBlocks && !!block.innerBlocks && !!block.innerBlocks.length && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(BlockNavigationList, { blocks: block.innerBlocks, selectedBlockClientId: selectedBlockClientId, selectBlock: selectBlock, showNestedBlocks: true })); })) /* eslint-enable jsx-a11y/no-redundant-roles */ ); } function BlockNavigation(_ref2) { var rootBlock = _ref2.rootBlock, rootBlocks = _ref2.rootBlocks, selectedBlockClientId = _ref2.selectedBlockClientId, selectBlock = _ref2.selectBlock; var hasHierarchy = rootBlock && (rootBlock.clientId !== selectedBlockClientId || rootBlock.innerBlocks && rootBlock.innerBlocks.length !== 0); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["NavigableMenu"], { role: "presentation", className: "editor-block-navigation__container" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", { className: "editor-block-navigation__label" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Block Navigation')), hasHierarchy && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(BlockNavigationList, { blocks: [rootBlock], selectedBlockClientId: selectedBlockClientId, selectBlock: selectBlock, showNestedBlocks: true }), !hasHierarchy && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(BlockNavigationList, { blocks: rootBlocks, selectedBlockClientId: selectedBlockClientId, selectBlock: selectBlock }), (!rootBlocks || rootBlocks.length === 0) && // If there are no blocks in this document, don't render a list of blocks. // Instead: inform the user no blocks exist yet. Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", { className: "editor-block-navigation__paragraph" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('No blocks created yet.'))); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withSelect"])(function (select) { var _select = select('core/editor'), getSelectedBlockClientId = _select.getSelectedBlockClientId, getBlockHierarchyRootClientId = _select.getBlockHierarchyRootClientId, getBlock = _select.getBlock, getBlocks = _select.getBlocks; var selectedBlockClientId = getSelectedBlockClientId(); return { rootBlocks: getBlocks(), rootBlock: selectedBlockClientId ? getBlock(getBlockHierarchyRootClientId(selectedBlockClientId)) : null, selectedBlockClientId: selectedBlockClientId }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withDispatch"])(function (dispatch, _ref3) { var _ref3$onSelect = _ref3.onSelect, onSelect = _ref3$onSelect === void 0 ? lodash__WEBPACK_IMPORTED_MODULE_1__["noop"] : _ref3$onSelect; return { selectBlock: function selectBlock(clientId) { dispatch('core/editor').selectBlock(clientId); onSelect(clientId); } }; }))(BlockNavigation)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-preview/index.js": /*!***************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-preview/index.js ***! \***************************************************************************************/ /*! exports provided: BlockPreviewContent, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockPreviewContent", function() { return BlockPreviewContent; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _block_edit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../block-edit */ "./node_modules/@wordpress/editor/build-module/components/block-edit/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Block Preview Component: It renders a preview given a block name and attributes. * * @param {Object} props Component props. * * @return {WPElement} Rendered element. */ function BlockPreview(props) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-preview" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-preview__title" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Preview')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(BlockPreviewContent, props)); } function BlockPreviewContent(_ref) { var name = _ref.name, attributes = _ref.attributes; var block = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__["createBlock"])(name, attributes); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["Disabled"], { className: "editor-block-preview__content editor-styles-wrapper", "aria-hidden": true }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_edit__WEBPACK_IMPORTED_MODULE_5__["default"], { name: name, focus: false, attributes: block.attributes, setAttributes: lodash__WEBPACK_IMPORTED_MODULE_1__["noop"] })); } /* harmony default export */ __webpack_exports__["default"] = (BlockPreview); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-selection-clearer/index.js": /*!*************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-selection-clearer/index.js ***! \*************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__); /** * External dependencies */ /** * WordPress dependencies */ var BlockSelectionClearer = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__["default"])(BlockSelectionClearer, _Component); function BlockSelectionClearer() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, BlockSelectionClearer); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(BlockSelectionClearer).apply(this, arguments)); _this.bindContainer = _this.bindContainer.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); _this.clearSelectionIfFocusTarget = _this.clearSelectionIfFocusTarget.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(BlockSelectionClearer, [{ key: "bindContainer", value: function bindContainer(ref) { this.container = ref; } /** * Clears the selected block on focus if the container is the target of the * focus. This assumes no other descendents have received focus until event * has bubbled to the container. * * @param {FocusEvent} event Focus event. */ }, { key: "clearSelectionIfFocusTarget", value: function clearSelectionIfFocusTarget(event) { var _this$props = this.props, hasSelectedBlock = _this$props.hasSelectedBlock, hasMultiSelection = _this$props.hasMultiSelection, clearSelectedBlock = _this$props.clearSelectedBlock; var hasSelection = hasSelectedBlock || hasMultiSelection; if (event.target === this.container && hasSelection) { clearSelectedBlock(); } } }, { key: "render", value: function render() { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ tabIndex: -1, onFocus: this.clearSelectionIfFocusTarget, ref: this.bindContainer }, Object(lodash__WEBPACK_IMPORTED_MODULE_8__["omit"])(this.props, ['clearSelectedBlock', 'hasSelectedBlock', 'hasMultiSelection']))); } }]); return BlockSelectionClearer; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withSelect"])(function (select) { var _select = select('core/editor'), hasSelectedBlock = _select.hasSelectedBlock, hasMultiSelection = _select.hasMultiSelection; return { hasSelectedBlock: hasSelectedBlock(), hasMultiSelection: hasMultiSelection() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), clearSelectedBlock = _dispatch.clearSelectedBlock; return { clearSelectedBlock: clearSelectedBlock }; })])(BlockSelectionClearer)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-convert-button.js": /*!************************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-convert-button.js ***! \************************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return BlockConvertButton; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); /** * WordPress dependencies */ function BlockConvertButton(_ref) { var shouldRender = _ref.shouldRender, onClick = _ref.onClick, small = _ref.small; if (!shouldRender) { return null; } var label = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Convert to Blocks'); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["MenuItem"], { className: "editor-block-settings-menu__control", onClick: onClick, icon: "screenoptions", label: small ? label : undefined }, !small && label); } /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-html-convert-button.js": /*!*****************************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-html-convert-button.js ***! \*****************************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _block_convert_button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block-convert-button */ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-convert-button.js"); /** * WordPress dependencies */ /** * Internal dependencies */ /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select, _ref) { var clientId = _ref.clientId; var block = select('core/editor').getBlock(clientId); return { block: block, shouldRender: block && block.name === 'core/html' }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withDispatch"])(function (dispatch, _ref2) { var block = _ref2.block; return { onClick: function onClick() { return dispatch('core/editor').replaceBlocks(block.clientId, Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__["rawHandler"])({ HTML: Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__["getBlockContent"])(block) })); } }; }))(_block_convert_button__WEBPACK_IMPORTED_MODULE_3__["default"])); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-mode-toggle.js": /*!*********************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-mode-toggle.js ***! \*********************************************************************************************************/ /*! exports provided: BlockModeToggle, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockModeToggle", function() { return BlockModeToggle; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__); /** * External dependencies */ /** * WordPress dependencies */ function BlockModeToggle(_ref) { var blockType = _ref.blockType, mode = _ref.mode, onToggleMode = _ref.onToggleMode, _ref$small = _ref.small, small = _ref$small === void 0 ? false : _ref$small; if (!Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__["hasBlockSupport"])(blockType, 'html', true)) { return null; } var label = mode === 'visual' ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Edit as HTML') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Edit visually'); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["MenuItem"], { className: "editor-block-settings-menu__control", onClick: onToggleMode, icon: "html", label: small ? label : undefined }, !small && label); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withSelect"])(function (select, _ref2) { var clientId = _ref2.clientId; var _select = select('core/editor'), getBlock = _select.getBlock, getBlockMode = _select.getBlockMode; var block = getBlock(clientId); return { mode: getBlockMode(clientId), blockType: block ? Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__["getBlockType"])(block.name) : null }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withDispatch"])(function (dispatch, _ref3) { var _ref3$onToggle = _ref3.onToggle, onToggle = _ref3$onToggle === void 0 ? lodash__WEBPACK_IMPORTED_MODULE_1__["noop"] : _ref3$onToggle, clientId = _ref3.clientId; return { onToggleMode: function onToggleMode() { dispatch('core/editor').toggleBlockMode(clientId); onToggle(); } }; })])(BlockModeToggle)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-settings-menu-first-item.js": /*!**********************************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-settings-menu-first-item.js ***! \**********************************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); /** * WordPress dependencies */ var _createSlotFill = Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__["createSlotFill"])('_BlockSettingsMenuFirstItem'), _BlockSettingsMenuFirstItem = _createSlotFill.Fill, Slot = _createSlotFill.Slot; _BlockSettingsMenuFirstItem.Slot = Slot; /* harmony default export */ __webpack_exports__["default"] = (_BlockSettingsMenuFirstItem); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-settings-menu-plugins-extension.js": /*!*****************************************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-settings-menu-plugins-extension.js ***! \*****************************************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); /** * WordPress dependencies */ var _createSlotFill = Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__["createSlotFill"])('_BlockSettingsMenuPluginsExtension'), _BlockSettingsMenuPluginsExtension = _createSlotFill.Fill, Slot = _createSlotFill.Slot; _BlockSettingsMenuPluginsExtension.Slot = Slot; /* harmony default export */ __webpack_exports__["default"] = (_BlockSettingsMenuPluginsExtension); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-unknown-convert-button.js": /*!********************************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-unknown-convert-button.js ***! \********************************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _block_convert_button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block-convert-button */ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-convert-button.js"); /** * WordPress dependencies */ /** * Internal dependencies */ /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select, _ref) { var clientId = _ref.clientId; var block = select('core/editor').getBlock(clientId); return { block: block, shouldRender: block && block.name === Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__["getFreeformContentHandlerName"])() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withDispatch"])(function (dispatch, _ref2) { var block = _ref2.block; return { onClick: function onClick() { return dispatch('core/editor').replaceBlocks(block.clientId, Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__["rawHandler"])({ HTML: Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__["serialize"])(block) })); } }; }))(_block_convert_button__WEBPACK_IMPORTED_MODULE_3__["default"])); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/index.js": /*!*********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-settings-menu/index.js ***! \*********************************************************************************************/ /*! exports provided: BlockSettingsMenu, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockSettingsMenu", function() { return BlockSettingsMenu; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _editor_global_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../editor-global-keyboard-shortcuts */ "./node_modules/@wordpress/editor/build-module/components/editor-global-keyboard-shortcuts/index.js"); /* harmony import */ var _block_actions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../block-actions */ "./node_modules/@wordpress/editor/build-module/components/block-actions/index.js"); /* harmony import */ var _block_mode_toggle__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./block-mode-toggle */ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-mode-toggle.js"); /* harmony import */ var _reusable_block_convert_button__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./reusable-block-convert-button */ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/reusable-block-convert-button.js"); /* harmony import */ var _reusable_block_delete_button__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./reusable-block-delete-button */ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/reusable-block-delete-button.js"); /* harmony import */ var _block_html_convert_button__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./block-html-convert-button */ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-html-convert-button.js"); /* harmony import */ var _block_unknown_convert_button__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./block-unknown-convert-button */ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-unknown-convert-button.js"); /* harmony import */ var _block_settings_menu_first_item__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./block-settings-menu-first-item */ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-settings-menu-first-item.js"); /* harmony import */ var _block_settings_menu_plugins_extension__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./block-settings-menu-plugins-extension */ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-settings-menu-plugins-extension.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function BlockSettingsMenu(_ref) { var clientIds = _ref.clientIds, onSelect = _ref.onSelect; var blockClientIds = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["castArray"])(clientIds); var count = blockClientIds.length; var firstBlockClientId = blockClientIds[0]; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_actions__WEBPACK_IMPORTED_MODULE_7__["default"], { clientIds: clientIds }, function (_ref2) { var onDuplicate = _ref2.onDuplicate, onRemove = _ref2.onRemove, onInsertAfter = _ref2.onInsertAfter, onInsertBefore = _ref2.onInsertBefore, canDuplicate = _ref2.canDuplicate, isLocked = _ref2.isLocked; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["Dropdown"], { contentClassName: "editor-block-settings-menu__popover", position: "bottom right", renderToggle: function renderToggle(_ref3) { var onToggle = _ref3.onToggle, isOpen = _ref3.isOpen; var toggleClassname = classnames__WEBPACK_IMPORTED_MODULE_1___default()('editor-block-settings-menu__toggle', { 'is-opened': isOpen }); var label = isOpen ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Hide options') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('More options'); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["Toolbar"], { controls: [{ icon: 'ellipsis', title: label, onClick: function onClick() { if (count === 1) { onSelect(firstBlockClientId); } onToggle(); }, className: toggleClassname, extraProps: { 'aria-expanded': isOpen } }] }); }, renderContent: function renderContent(_ref4) { var onClose = _ref4.onClose; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["NavigableMenu"], { className: "editor-block-settings-menu__content" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_settings_menu_first_item__WEBPACK_IMPORTED_MODULE_13__["default"].Slot, { fillProps: { onClose: onClose } }), count === 1 && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_unknown_convert_button__WEBPACK_IMPORTED_MODULE_12__["default"], { clientId: firstBlockClientId }), count === 1 && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_html_convert_button__WEBPACK_IMPORTED_MODULE_11__["default"], { clientId: firstBlockClientId }), !isLocked && canDuplicate && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["MenuItem"], { className: "editor-block-settings-menu__control", onClick: onDuplicate, icon: "admin-page", shortcut: _editor_global_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_6__["shortcuts"].duplicate.display }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Duplicate')), !isLocked && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["MenuItem"], { className: "editor-block-settings-menu__control", onClick: onInsertBefore, icon: "insert-before", shortcut: _editor_global_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_6__["shortcuts"].insertBefore.display }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Insert Before')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["MenuItem"], { className: "editor-block-settings-menu__control", onClick: onInsertAfter, icon: "insert-after", shortcut: _editor_global_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_6__["shortcuts"].insertAfter.display }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Insert After'))), count === 1 && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_mode_toggle__WEBPACK_IMPORTED_MODULE_8__["default"], { clientId: firstBlockClientId, onToggle: onClose }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_reusable_block_convert_button__WEBPACK_IMPORTED_MODULE_9__["default"], { clientIds: clientIds, onToggle: onClose }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_settings_menu_plugins_extension__WEBPACK_IMPORTED_MODULE_14__["default"].Slot, { fillProps: { clientIds: clientIds, onClose: onClose } }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-settings-menu__separator" }), count === 1 && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_reusable_block_delete_button__WEBPACK_IMPORTED_MODULE_10__["default"], { clientId: firstBlockClientId, onToggle: onClose }), !isLocked && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["MenuItem"], { className: "editor-block-settings-menu__control", onClick: onRemove, icon: "trash", shortcut: _editor_global_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_6__["shortcuts"].removeBlock.display }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Remove Block'))); } }); }); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), selectBlock = _dispatch.selectBlock; return { onSelect: function onSelect(clientId) { selectBlock(clientId); } }; })(BlockSettingsMenu)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/reusable-block-convert-button.js": /*!*********************************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-settings-menu/reusable-block-convert-button.js ***! \*********************************************************************************************************************/ /*! exports provided: ReusableBlockConvertButton, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReusableBlockConvertButton", function() { return ReusableBlockConvertButton; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__); /** * External dependencies */ /** * WordPress dependencies */ function ReusableBlockConvertButton(_ref) { var isVisible = _ref.isVisible, isStaticBlock = _ref.isStaticBlock, onConvertToStatic = _ref.onConvertToStatic, onConvertToReusable = _ref.onConvertToReusable; if (!isVisible) { return null; } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, isStaticBlock && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["MenuItem"], { className: "editor-block-settings-menu__control", icon: "controls-repeat", onClick: onConvertToReusable }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Add to Reusable Blocks')), !isStaticBlock && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["MenuItem"], { className: "editor-block-settings-menu__control", icon: "controls-repeat", onClick: onConvertToStatic }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Convert to Regular Block'))); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withSelect"])(function (select, _ref2) { var clientIds = _ref2.clientIds; var _select = select('core/editor'), getBlocksByClientId = _select.getBlocksByClientId, canInsertBlockType = _select.canInsertBlockType, getReusableBlock = _select.__experimentalGetReusableBlock; var blocks = getBlocksByClientId(clientIds); var isVisible = // Hide 'Add to Reusable Blocks' when Reusable Blocks are disabled, i.e. when // core/block is not in the allowed_block_types filter. canInsertBlockType('core/block') && Object(lodash__WEBPACK_IMPORTED_MODULE_1__["every"])(blocks, function (block) { return (// Guard against the case where a regular block has *just* been converted to a // reusable block and doesn't yet exist in the editor store. !!block && // Only show the option to covert to reusable blocks on valid blocks. block.isValid && // Make sure the block supports being converted into a reusable block (by default that is the case). Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__["hasBlockSupport"])(block.name, 'reusable', true) ); }); return { isVisible: isVisible, isStaticBlock: isVisible && (blocks.length !== 1 || !Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__["isReusableBlock"])(blocks[0]) || !getReusableBlock(blocks[0].attributes.ref)) }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withDispatch"])(function (dispatch, _ref3) { var clientIds = _ref3.clientIds, _ref3$onToggle = _ref3.onToggle, onToggle = _ref3$onToggle === void 0 ? lodash__WEBPACK_IMPORTED_MODULE_1__["noop"] : _ref3$onToggle; var _dispatch = dispatch('core/editor'), convertBlockToReusable = _dispatch.__experimentalConvertBlockToReusable, convertBlockToStatic = _dispatch.__experimentalConvertBlockToStatic; return { onConvertToStatic: function onConvertToStatic() { if (clientIds.length !== 1) { return; } convertBlockToStatic(clientIds[0]); onToggle(); }, onConvertToReusable: function onConvertToReusable() { convertBlockToReusable(clientIds); onToggle(); } }; })])(ReusableBlockConvertButton)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/reusable-block-delete-button.js": /*!********************************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-settings-menu/reusable-block-delete-button.js ***! \********************************************************************************************************************/ /*! exports provided: ReusableBlockDeleteButton, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReusableBlockDeleteButton", function() { return ReusableBlockDeleteButton; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__); /** * External dependencies */ /** * WordPress dependencies */ function ReusableBlockDeleteButton(_ref) { var reusableBlock = _ref.reusableBlock, onDelete = _ref.onDelete; if (!reusableBlock) { return null; } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["MenuItem"], { className: "editor-block-settings-menu__control", icon: "no", disabled: reusableBlock.isTemporary, onClick: function onClick() { return onDelete(reusableBlock.id); } }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Remove from Reusable Blocks')); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withSelect"])(function (select, _ref2) { var clientId = _ref2.clientId; var _select = select('core/editor'), getBlock = _select.getBlock, getReusableBlock = _select.__experimentalGetReusableBlock; var block = getBlock(clientId); return { reusableBlock: block && Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__["isReusableBlock"])(block) ? getReusableBlock(block.attributes.ref) : null }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withDispatch"])(function (dispatch, _ref3) { var _ref3$onToggle = _ref3.onToggle, onToggle = _ref3$onToggle === void 0 ? lodash__WEBPACK_IMPORTED_MODULE_1__["noop"] : _ref3$onToggle; var _dispatch = dispatch('core/editor'), deleteReusableBlock = _dispatch.__experimentalDeleteReusableBlock; return { onDelete: function onDelete(id) { // TODO: Make this a component or similar // eslint-disable-next-line no-alert var hasConfirmed = window.confirm(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Are you sure you want to delete this Reusable Block?\n\n' + 'It will be permanently removed from all posts and pages that use it.')); if (hasConfirmed) { deleteReusableBlock(id); onToggle(); } } }; })])(ReusableBlockDeleteButton)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-styles/index.js": /*!**************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-styles/index.js ***! \**************************************************************************************/ /*! exports provided: getActiveStyle, replaceActiveStyle, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActiveStyle", function() { return getActiveStyle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "replaceActiveStyle", function() { return replaceActiveStyle; }); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_token_list__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/token-list */ "@wordpress/token-list"); /* harmony import */ var _wordpress_token_list__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_token_list__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _block_preview__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../block-preview */ "./node_modules/@wordpress/editor/build-module/components/block-preview/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Returns the active style from the given className. * * @param {Array} styles Block style variations. * @param {string} className Class name * * @return {Object?} The active style. */ function getActiveStyle(styles, className) { var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = new _wordpress_token_list__WEBPACK_IMPORTED_MODULE_6___default.a(className).values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var style = _step.value; if (style.indexOf('is-style-') === -1) { continue; } var potentialStyleName = style.substring(9); var activeStyle = Object(lodash__WEBPACK_IMPORTED_MODULE_2__["find"])(styles, { name: potentialStyleName }); if (activeStyle) { return activeStyle; } } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator.return != null) { _iterator.return(); } } finally { if (_didIteratorError) { throw _iteratorError; } } } return Object(lodash__WEBPACK_IMPORTED_MODULE_2__["find"])(styles, 'isDefault'); } /** * Replaces the active style in the block's className. * * @param {string} className Class name. * @param {Object?} activeStyle The replaced style. * @param {Object} newStyle The replacing style. * * @return {string} The updated className. */ function replaceActiveStyle(className, activeStyle, newStyle) { var list = new _wordpress_token_list__WEBPACK_IMPORTED_MODULE_6___default.a(className); if (activeStyle) { list.remove('is-style-' + activeStyle.name); } list.add('is-style-' + newStyle.name); return list.value; } function BlockStyles(_ref) { var styles = _ref.styles, className = _ref.className, onChangeClassName = _ref.onChangeClassName, name = _ref.name, attributes = _ref.attributes, _ref$onSwitch = _ref.onSwitch, onSwitch = _ref$onSwitch === void 0 ? lodash__WEBPACK_IMPORTED_MODULE_2__["noop"] : _ref$onSwitch, _ref$onHoverClassName = _ref.onHoverClassName, onHoverClassName = _ref$onHoverClassName === void 0 ? lodash__WEBPACK_IMPORTED_MODULE_2__["noop"] : _ref$onHoverClassName; if (!styles || styles.length === 0) { return null; } var activeStyle = getActiveStyle(styles, className); function updateClassName(style) { var updatedClassName = replaceActiveStyle(className, activeStyle, style); onChangeClassName(updatedClassName); onSwitch(); } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", { className: "editor-block-styles" }, styles.map(function (style) { var styleClassName = replaceActiveStyle(className, activeStyle, style); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", { key: style.name, className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('editor-block-styles__item', { 'is-active': activeStyle === style }), onClick: function onClick() { return updateClassName(style); }, onKeyDown: function onKeyDown(event) { if (_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_7__["ENTER"] === event.keyCode || _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_7__["SPACE"] === event.keyCode) { event.preventDefault(); updateClassName(style); } }, onMouseEnter: function onMouseEnter() { return onHoverClassName(styleClassName); }, onMouseLeave: function onMouseLeave() { return onHoverClassName(null); }, role: "button", tabIndex: "0", "aria-label": style.label || style.name }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", { className: "editor-block-styles__item-preview" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_block_preview__WEBPACK_IMPORTED_MODULE_8__["BlockPreviewContent"], { name: name, attributes: Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, attributes, { className: styleClassName }) })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", { className: "editor-block-styles__item-label" }, style.label || style.name)); })); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withSelect"])(function (select, _ref2) { var clientId = _ref2.clientId; var _select = select('core/editor'), getBlock = _select.getBlock; var _select2 = select('core/blocks'), getBlockStyles = _select2.getBlockStyles; var block = getBlock(clientId); return { name: block.name, attributes: block.attributes, className: block.attributes.className || '', styles: getBlockStyles(block.name) }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withDispatch"])(function (dispatch, _ref3) { var clientId = _ref3.clientId; return { onChangeClassName: function onChangeClassName(newClassName) { dispatch('core/editor').updateBlockAttributes(clientId, { className: newClassName }); } }; })])(BlockStyles)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-switcher/index.js": /*!****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-switcher/index.js ***! \****************************************************************************************/ /*! exports provided: BlockSwitcher, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockSwitcher", function() { return BlockSwitcher; }); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _block_icon__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../block-icon */ "./node_modules/@wordpress/editor/build-module/components/block-icon/index.js"); /* harmony import */ var _block_styles__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../block-styles */ "./node_modules/@wordpress/editor/build-module/components/block-styles/index.js"); /* harmony import */ var _block_preview__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../block-preview */ "./node_modules/@wordpress/editor/build-module/components/block-preview/index.js"); /* harmony import */ var _block_types_list__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../block-types-list */ "./node_modules/@wordpress/editor/build-module/components/block-types-list/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var BlockSwitcher = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__["default"])(BlockSwitcher, _Component); function BlockSwitcher() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, BlockSwitcher); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(BlockSwitcher).apply(this, arguments)); _this.state = { hoveredClassName: null }; _this.onHoverClassName = _this.onHoverClassName.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(BlockSwitcher, [{ key: "onHoverClassName", value: function onHoverClassName(className) { this.setState({ hoveredClassName: className }); } }, { key: "render", value: function render() { var _this2 = this; var _this$props = this.props, blocks = _this$props.blocks, onTransform = _this$props.onTransform, inserterItems = _this$props.inserterItems, hasBlockStyles = _this$props.hasBlockStyles; var hoveredClassName = this.state.hoveredClassName; if (!blocks || !blocks.length) { return null; } var itemsByName = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["mapKeys"])(inserterItems, function (_ref) { var name = _ref.name; return name; }); var possibleBlockTransformations = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["orderBy"])(Object(lodash__WEBPACK_IMPORTED_MODULE_8__["filter"])(Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_11__["getPossibleBlockTransformations"])(blocks), function (block) { return !!itemsByName[block.name]; }), function (block) { return itemsByName[block.name].frecency; }, 'desc'); var sourceBlockName = blocks[0].name; var blockType = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_11__["getBlockType"])(sourceBlockName); if (!hasBlockStyles && !possibleBlockTransformations.length) { if (blocks.length > 1) { return null; } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["Toolbar"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["IconButton"], { disabled: true, className: "editor-block-switcher__no-switcher-icon", label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Block icon') }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_block_icon__WEBPACK_IMPORTED_MODULE_15__["default"], { icon: blockType.icon, showColors: true }))); } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["Dropdown"], { position: "bottom right", className: "editor-block-switcher", contentClassName: "editor-block-switcher__popover", renderToggle: function renderToggle(_ref2) { var onToggle = _ref2.onToggle, isOpen = _ref2.isOpen; var openOnArrowDown = function openOnArrowDown(event) { if (!isOpen && event.keyCode === _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["DOWN"]) { event.preventDefault(); event.stopPropagation(); onToggle(); } }; var label = 1 === blocks.length ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Change block type') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["_n"])('Change type of %d block', 'Change type of %d blocks', blocks.length), blocks.length); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["Toolbar"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["IconButton"], { className: "editor-block-switcher__toggle", onClick: onToggle, "aria-haspopup": "true", "aria-expanded": isOpen, label: label, tooltip: label, onKeyDown: openOnArrowDown }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_block_icon__WEBPACK_IMPORTED_MODULE_15__["default"], { icon: blockType.icon, showColors: true }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["SVG"], { className: "editor-block-switcher__transform", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["Path"], { d: "M6.5 8.9c.6-.6 1.4-.9 2.2-.9h6.9l-1.3 1.3 1.4 1.4L19.4 7l-3.7-3.7-1.4 1.4L15.6 6H8.7c-1.4 0-2.6.5-3.6 1.5l-2.8 2.8 1.4 1.4 2.8-2.8zm13.8 2.4l-2.8 2.8c-.6.6-1.3.9-2.1.9h-7l1.3-1.3-1.4-1.4L4.6 16l3.7 3.7 1.4-1.4L8.4 17h6.9c1.3 0 2.6-.5 3.5-1.5l2.8-2.8-1.3-1.4z" })))); }, renderContent: function renderContent(_ref3) { var onClose = _ref3.onClose; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Fragment"], null, hasBlockStyles && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["PanelBody"], { title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Block Styles'), initialOpen: true }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_block_styles__WEBPACK_IMPORTED_MODULE_16__["default"], { clientId: blocks[0].clientId, onSwitch: onClose, onHoverClassName: _this2.onHoverClassName })), possibleBlockTransformations.length !== 0 && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["PanelBody"], { title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Transform To:'), initialOpen: true }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_block_types_list__WEBPACK_IMPORTED_MODULE_18__["default"], { items: possibleBlockTransformations.map(function (destinationBlockType) { return { id: destinationBlockType.name, icon: destinationBlockType.icon, title: destinationBlockType.title, hasChildBlocksWithInserterSupport: Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_11__["hasChildBlocksWithInserterSupport"])(destinationBlockType.name) }; }), onSelect: function onSelect(item) { onTransform(blocks, item.id); onClose(); } })), hoveredClassName !== null && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_block_preview__WEBPACK_IMPORTED_MODULE_17__["default"], { name: blocks[0].name, attributes: Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blocks[0].attributes, { className: hoveredClassName }) })); } }); } }]); return BlockSwitcher; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_14__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_13__["withSelect"])(function (select, _ref4) { var clientIds = _ref4.clientIds; var _select = select('core/editor'), getBlocksByClientId = _select.getBlocksByClientId, getBlockRootClientId = _select.getBlockRootClientId, getInserterItems = _select.getInserterItems; var _select2 = select('core/blocks'), getBlockStyles = _select2.getBlockStyles; var rootClientId = getBlockRootClientId(Object(lodash__WEBPACK_IMPORTED_MODULE_8__["first"])(Object(lodash__WEBPACK_IMPORTED_MODULE_8__["castArray"])(clientIds))); var blocks = getBlocksByClientId(clientIds); var firstBlock = blocks && blocks.length === 1 ? blocks[0] : null; var styles = firstBlock && getBlockStyles(firstBlock.name); return { blocks: blocks, inserterItems: getInserterItems(rootClientId), hasBlockStyles: styles && styles.length > 0 }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_13__["withDispatch"])(function (dispatch, ownProps) { return { onTransform: function onTransform(blocks, name) { dispatch('core/editor').replaceBlocks(ownProps.clientIds, Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_11__["switchToBlockType"])(blocks, name)); } }; }))(BlockSwitcher)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-switcher/multi-blocks-switcher.js": /*!********************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-switcher/multi-blocks-switcher.js ***! \********************************************************************************************************/ /*! exports provided: MultiBlocksSwitcher, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiBlocksSwitcher", function() { return MultiBlocksSwitcher; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ */ "./node_modules/@wordpress/editor/build-module/components/block-switcher/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ function MultiBlocksSwitcher(_ref) { var isMultiBlockSelection = _ref.isMultiBlockSelection, selectedBlockClientIds = _ref.selectedBlockClientIds; if (!isMultiBlockSelection) { return null; } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(___WEBPACK_IMPORTED_MODULE_2__["default"], { key: "switcher", clientIds: selectedBlockClientIds }); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["withSelect"])(function (select) { var selectedBlockClientIds = select('core/editor').getMultiSelectedBlockClientIds(); return { isMultiBlockSelection: selectedBlockClientIds.length > 1, selectedBlockClientIds: selectedBlockClientIds }; })(MultiBlocksSwitcher)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-title/index.js": /*!*************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-title/index.js ***! \*************************************************************************************/ /*! exports provided: BlockTitle, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockTitle", function() { return BlockTitle; }); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ /** * Renders the block's configured title as a string, or empty if the title * cannot be determined. * * @example * * ```jsx * * ``` * * @param {?string} props.name Block name. * * @return {?string} Block title. */ function BlockTitle(_ref) { var name = _ref.name; if (!name) { return null; } var blockType = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__["getBlockType"])(name); if (!blockType) { return null; } return blockType.title; } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__["withSelect"])(function (select, ownProps) { var _select = select('core/editor'), getBlockName = _select.getBlockName; var clientId = ownProps.clientId; return { name: getBlockName(clientId) }; })(BlockTitle)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-toolbar/index.js": /*!***************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-toolbar/index.js ***! \***************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _block_switcher__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../block-switcher */ "./node_modules/@wordpress/editor/build-module/components/block-switcher/index.js"); /* harmony import */ var _block_switcher_multi_blocks_switcher__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../block-switcher/multi-blocks-switcher */ "./node_modules/@wordpress/editor/build-module/components/block-switcher/multi-blocks-switcher.js"); /* harmony import */ var _block_controls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../block-controls */ "./node_modules/@wordpress/editor/build-module/components/block-controls/index.js"); /* harmony import */ var _block_format_controls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../block-format-controls */ "./node_modules/@wordpress/editor/build-module/components/block-format-controls/index.js"); /* harmony import */ var _block_settings_menu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../block-settings-menu */ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/index.js"); /** * WordPress Dependencies */ /** * Internal Dependencies */ function BlockToolbar(_ref) { var blockClientIds = _ref.blockClientIds, isValid = _ref.isValid, mode = _ref.mode; if (blockClientIds.length === 0) { return null; } if (blockClientIds.length > 1) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-toolbar" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_switcher_multi_blocks_switcher__WEBPACK_IMPORTED_MODULE_3__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_settings_menu__WEBPACK_IMPORTED_MODULE_6__["default"], { clientIds: blockClientIds })); } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-block-toolbar" }, mode === 'visual' && isValid && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_switcher__WEBPACK_IMPORTED_MODULE_2__["default"], { clientIds: blockClientIds }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_controls__WEBPACK_IMPORTED_MODULE_4__["default"].Slot, null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_format_controls__WEBPACK_IMPORTED_MODULE_5__["default"].Slot, null)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_settings_menu__WEBPACK_IMPORTED_MODULE_6__["default"], { clientIds: blockClientIds })); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["withSelect"])(function (select) { var _select = select('core/editor'), getSelectedBlockClientId = _select.getSelectedBlockClientId, getBlockMode = _select.getBlockMode, getMultiSelectedBlockClientIds = _select.getMultiSelectedBlockClientIds, isBlockValid = _select.isBlockValid; var selectedBlockClientId = getSelectedBlockClientId(); var blockClientIds = selectedBlockClientId ? [selectedBlockClientId] : getMultiSelectedBlockClientIds(); return { blockClientIds: blockClientIds, isValid: selectedBlockClientId ? isBlockValid(selectedBlockClientId) : null, mode: selectedBlockClientId ? getBlockMode(selectedBlockClientId) : null }; })(BlockToolbar)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/block-types-list/index.js": /*!******************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/block-types-list/index.js ***! \******************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _inserter_list_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../inserter-list-item */ "./node_modules/@wordpress/editor/build-module/components/inserter-list-item/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ function BlockTypesList(_ref) { var items = _ref.items, onSelect = _ref.onSelect, _ref$onHover = _ref.onHover, onHover = _ref$onHover === void 0 ? function () {} : _ref$onHover, children = _ref.children; return ( /* * Disable reason: The `list` ARIA role is redundant but * Safari+VoiceOver won't announce the list otherwise. */ /* eslint-disable jsx-a11y/no-redundant-roles */ Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("ul", { role: "list", className: "editor-block-types-list" }, items && items.map(function (item) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_inserter_list_item__WEBPACK_IMPORTED_MODULE_2__["default"], { key: item.id, className: Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__["getBlockMenuDefaultClassName"])(item.id), icon: item.icon, hasChildBlocksWithInserterSupport: item.hasChildBlocksWithInserterSupport, onClick: function onClick() { onSelect(item); onHover(null); }, onFocus: function onFocus() { return onHover(item); }, onMouseEnter: function onMouseEnter() { return onHover(item); }, onMouseLeave: function onMouseLeave() { return onHover(null); }, onBlur: function onBlur() { return onHover(null); }, isDisabled: item.isDisabled, title: item.title }); }), children) /* eslint-enable jsx-a11y/no-redundant-roles */ ); } /* harmony default export */ __webpack_exports__["default"] = (BlockTypesList); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/color-palette/control.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/color-palette/control.js ***! \*****************************************************************************************/ /*! exports provided: ColorPaletteControl, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPaletteControl", function() { return ColorPaletteControl; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ */ "./node_modules/@wordpress/editor/build-module/components/color-palette/index.js"); /* harmony import */ var _with_color_context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./with-color-context */ "./node_modules/@wordpress/editor/build-module/components/color-palette/with-color-context.js"); /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../colors */ "./node_modules/@wordpress/editor/build-module/components/colors/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ // translators: first %s: The type of color (e.g. background color), second %s: the color name or value (e.g. red or #ff0000) var colorIndicatorAriaLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('(current %s: %s)'); function ColorPaletteControl(_ref) { var colors = _ref.colors, disableCustomColors = _ref.disableCustomColors, label = _ref.label, onChange = _ref.onChange, value = _ref.value; var colorObject = Object(_colors__WEBPACK_IMPORTED_MODULE_7__["getColorObjectByColorValue"])(colors, value); var colorName = colorObject && colorObject.name; var ariaLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["sprintf"])(colorIndicatorAriaLabel, label.toLowerCase(), colorName || value); var labelElement = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null, label, value && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["ColorIndicator"], { colorValue: value, "aria-label": ariaLabel })); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["BaseControl"], { className: "editor-color-palette-control", label: labelElement }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(___WEBPACK_IMPORTED_MODULE_5__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "editor-color-palette-control__color-palette", value: value, onChange: onChange }, { colors: colors, disableCustomColors: disableCustomColors }))); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["compose"])([_with_color_context__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["ifCondition"])(function (_ref2) { var hasColorsToChoose = _ref2.hasColorsToChoose; return hasColorsToChoose; })])(ColorPaletteControl)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/color-palette/index.js": /*!***************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/color-palette/index.js ***! \***************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _with_color_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./with-color-context */ "./node_modules/@wordpress/editor/build-module/components/color-palette/with-color-context.js"); /** * WordPress dependencies */ /** * Internal dependencies */ /* harmony default export */ __webpack_exports__["default"] = (Object(_with_color_context__WEBPACK_IMPORTED_MODULE_1__["default"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__["ColorPalette"])); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/color-palette/with-color-context.js": /*!****************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/color-palette/with-color-context.js ***! \****************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /** * External dependencies */ /** * WordPress dependencies */ /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__["createHigherOrderComponent"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select, ownProps) { var settings = select('core/editor').getEditorSettings(); var colors = ownProps.colors === undefined ? settings.colors : ownProps.colors; var disableCustomColors = ownProps.disableCustomColors === undefined ? settings.disableCustomColors : ownProps.disableCustomColors; return { colors: colors, disableCustomColors: disableCustomColors, hasColorsToChoose: !Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(colors) || !disableCustomColors }; }), 'withColorContext')); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/colors/index.js": /*!********************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/colors/index.js ***! \********************************************************************************/ /*! exports provided: getColorClassName, getColorObjectByAttributeValues, getColorObjectByColorValue, withColors */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./node_modules/@wordpress/editor/build-module/components/colors/utils.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getColorClassName", function() { return _utils__WEBPACK_IMPORTED_MODULE_0__["getColorClassName"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getColorObjectByAttributeValues", function() { return _utils__WEBPACK_IMPORTED_MODULE_0__["getColorObjectByAttributeValues"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getColorObjectByColorValue", function() { return _utils__WEBPACK_IMPORTED_MODULE_0__["getColorObjectByColorValue"]; }); /* harmony import */ var _with_colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./with-colors */ "./node_modules/@wordpress/editor/build-module/components/colors/with-colors.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withColors", function() { return _with_colors__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/colors/utils.js": /*!********************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/colors/utils.js ***! \********************************************************************************/ /*! exports provided: getColorObjectByAttributeValues, getColorObjectByColorValue, getColorClassName, getMostReadableColor */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getColorObjectByAttributeValues", function() { return getColorObjectByAttributeValues; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getColorObjectByColorValue", function() { return getColorObjectByColorValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getColorClassName", function() { return getColorClassName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMostReadableColor", function() { return getMostReadableColor; }); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var tinycolor2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tinycolor2 */ "./node_modules/tinycolor2/tinycolor.js"); /* harmony import */ var tinycolor2__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(tinycolor2__WEBPACK_IMPORTED_MODULE_1__); /** * External dependencies */ /** * Provided an array of color objects as set by the theme or by the editor defaults, * and the values of the defined color or custom color returns a color object describing the color. * * @param {Array} colors Array of color objects as set by the theme or by the editor defaults. * @param {?string} definedColor A string containing the color slug. * @param {?string} customColor A string containing the customColor value. * * @return {?string} If definedColor is passed and the name is found in colors, * the color object exactly as set by the theme or editor defaults is returned. * Otherwise, an object that just sets the color is defined. */ var getColorObjectByAttributeValues = function getColorObjectByAttributeValues(colors, definedColor, customColor) { if (definedColor) { var colorObj = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["find"])(colors, { slug: definedColor }); if (colorObj) { return colorObj; } } return { color: customColor }; }; /** * Provided an array of color objects as set by the theme or by the editor defaults, and a color value returns the color object matching that value or undefined. * * @param {Array} colors Array of color objects as set by the theme or by the editor defaults. * @param {?string} colorValue A string containing the color value. * * @return {?string} Returns the color object included in the colors array whose color property equals colorValue. * Returns undefined if no color object matches this requirement. */ var getColorObjectByColorValue = function getColorObjectByColorValue(colors, colorValue) { return Object(lodash__WEBPACK_IMPORTED_MODULE_0__["find"])(colors, { color: colorValue }); }; /** * Returns a class based on the context a color is being used and its slug. * * @param {string} colorContextName Context/place where color is being used e.g: background, text etc... * @param {string} colorSlug Slug of the color. * * @return {string} String with the class corresponding to the color in the provided context. */ function getColorClassName(colorContextName, colorSlug) { if (!colorContextName || !colorSlug) { return; } return "has-".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["kebabCase"])(colorSlug), "-").concat(colorContextName); } /** * Given an array of color objects and a color value returns the color value of the most readable color in the array. * * @param {Array} colors Array of color objects as set by the theme or by the editor defaults. * @param {?string} colorValue A string containing the color value. * * @return {string} String with the color value of the most readable color. */ function getMostReadableColor(colors, colorValue) { return tinycolor2__WEBPACK_IMPORTED_MODULE_1___default.a.mostReadable(colorValue, Object(lodash__WEBPACK_IMPORTED_MODULE_0__["map"])(colors, 'color')).toHexString(); } /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/colors/with-colors.js": /*!**************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/colors/with-colors.js ***! \**************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils */ "./node_modules/@wordpress/editor/build-module/components/colors/utils.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var DEFAULT_COLORS = []; /** * Higher-order component, which handles color logic for class generation * color value, retrieval and color attribute setting. * * @param {...(object|string)} args The arguments can be strings or objects. If the argument is an object, * it should contain the color attribute name as key and the color context as value. * If the argument is a string the value should be the color attribute name, * the color context is computed by applying a kebab case transform to the value. * Color context represents the context/place where the color is going to be used. * The class name of the color is generated using 'has' followed by the color name * and ending with the color context all in kebab case e.g: has-green-background-color. * * * @return {Function} Higher-order component. */ /* harmony default export */ __webpack_exports__["default"] = (function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var colorMap = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["reduce"])(args, function (colorObject, arg) { return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_7__["default"])({}, colorObject, Object(lodash__WEBPACK_IMPORTED_MODULE_9__["isString"])(arg) ? Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__["default"])({}, arg, Object(lodash__WEBPACK_IMPORTED_MODULE_9__["kebabCase"])(arg)) : arg); }, {}); return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_11__["createHigherOrderComponent"])(Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_11__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withSelect"])(function (select) { var settings = select('core/editor').getEditorSettings(); return { colors: Object(lodash__WEBPACK_IMPORTED_MODULE_9__["get"])(settings, ['colors'], DEFAULT_COLORS) }; }), function (WrappedComponent) { return ( /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(_class, _Component); function _class(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, _class); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(_class).call(this, props)); _this.setters = _this.createSetters(); _this.colorUtils = { getMostReadableColor: _this.getMostReadableColor.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))) }; _this.state = {}; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(_class, [{ key: "getMostReadableColor", value: function getMostReadableColor(colorValue) { var colors = this.props.colors; return Object(_utils__WEBPACK_IMPORTED_MODULE_12__["getMostReadableColor"])(colors, colorValue); } }, { key: "createSetters", value: function createSetters() { var _this2 = this; return Object(lodash__WEBPACK_IMPORTED_MODULE_9__["reduce"])(colorMap, function (settersAccumulator, colorContext, colorAttributeName) { var upperFirstColorAttributeName = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["upperFirst"])(colorAttributeName); var customColorAttributeName = "custom".concat(upperFirstColorAttributeName); settersAccumulator["set".concat(upperFirstColorAttributeName)] = _this2.createSetColor(colorAttributeName, customColorAttributeName); return settersAccumulator; }, {}); } }, { key: "createSetColor", value: function createSetColor(colorAttributeName, customColorAttributeName) { var _this3 = this; return function (colorValue) { var _this3$props$setAttri; var colorObject = Object(_utils__WEBPACK_IMPORTED_MODULE_12__["getColorObjectByColorValue"])(_this3.props.colors, colorValue); _this3.props.setAttributes((_this3$props$setAttri = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__["default"])(_this3$props$setAttri, colorAttributeName, colorObject && colorObject.slug ? colorObject.slug : undefined), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__["default"])(_this3$props$setAttri, customColorAttributeName, colorObject && colorObject.slug ? undefined : colorValue), _this3$props$setAttri)); }; } }, { key: "render", value: function render() { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(WrappedComponent, Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_7__["default"])({}, this.props, { colors: undefined }, this.state, this.setters, { colorUtils: this.colorUtils })); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(_ref2, previousState) { var attributes = _ref2.attributes, colors = _ref2.colors; return Object(lodash__WEBPACK_IMPORTED_MODULE_9__["reduce"])(colorMap, function (newState, colorContext, colorAttributeName) { var colorObject = Object(_utils__WEBPACK_IMPORTED_MODULE_12__["getColorObjectByAttributeValues"])(colors, attributes[colorAttributeName], attributes["custom".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_9__["upperFirst"])(colorAttributeName))]); var previousColorObject = previousState[colorAttributeName]; var previousColor = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["get"])(previousColorObject, ['color']); /** * The "and previousColorObject" condition checks that a previous color object was already computed. * At the start previousColorObject and colorValue are both equal to undefined * bus as previousColorObject does not exist we should compute the object. */ if (previousColor === colorObject.color && previousColorObject) { newState[colorAttributeName] = previousColorObject; } else { newState[colorAttributeName] = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_7__["default"])({}, colorObject, { class: Object(_utils__WEBPACK_IMPORTED_MODULE_12__["getColorClassName"])(colorContext, colorObject.slug) }); } return newState; }, {}); } }]); return _class; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["Component"]) ); }]), 'withColors'); }); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/contrast-checker/index.js": /*!******************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/contrast-checker/index.js ***! \******************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var tinycolor2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tinycolor2 */ "./node_modules/tinycolor2/tinycolor.js"); /* harmony import */ var tinycolor2__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(tinycolor2__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /** * External dependencies */ /** * WordPress dependencies */ function ContrastChecker(_ref) { var backgroundColor = _ref.backgroundColor, fallbackBackgroundColor = _ref.fallbackBackgroundColor, fallbackTextColor = _ref.fallbackTextColor, fontSize = _ref.fontSize, isLargeText = _ref.isLargeText, textColor = _ref.textColor; if (!(backgroundColor || fallbackBackgroundColor) || !(textColor || fallbackTextColor)) { return null; } var tinyBackgroundColor = tinycolor2__WEBPACK_IMPORTED_MODULE_1___default()(backgroundColor || fallbackBackgroundColor); var tinyTextColor = tinycolor2__WEBPACK_IMPORTED_MODULE_1___default()(textColor || fallbackTextColor); var hasTransparency = tinyBackgroundColor.getAlpha() !== 1 || tinyTextColor.getAlpha() !== 1; if (hasTransparency || tinycolor2__WEBPACK_IMPORTED_MODULE_1___default.a.isReadable(tinyBackgroundColor, tinyTextColor, { level: 'AA', size: isLargeText || isLargeText !== false && fontSize >= 24 ? 'large' : 'small' })) { return null; } var msg = tinyBackgroundColor.getBrightness() < tinyTextColor.getBrightness() ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color.') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.'); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-contrast-checker" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["Notice"], { status: "warning", isDismissible: false }, msg)); } /* harmony default export */ __webpack_exports__["default"] = (ContrastChecker); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/copy-handler/index.js": /*!**************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/copy-handler/index.js ***! \**************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/dom */ "@wordpress/dom"); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_dom__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__); /** * WordPress dependencies */ var CopyHandler = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(CopyHandler, _Component); function CopyHandler() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, CopyHandler); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(CopyHandler).apply(this, arguments)); _this.onCopy = _this.onCopy.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onCut = _this.onCut.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(CopyHandler, [{ key: "componentDidMount", value: function componentDidMount() { document.addEventListener('copy', this.onCopy); document.addEventListener('cut', this.onCut); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { document.removeEventListener('copy', this.onCopy); document.removeEventListener('cut', this.onCut); } }, { key: "onCopy", value: function onCopy(event) { var _this$props = this.props, hasMultiSelection = _this$props.hasMultiSelection, selectedBlockClientIds = _this$props.selectedBlockClientIds, getBlocksByClientId = _this$props.getBlocksByClientId; if (selectedBlockClientIds.length === 0) { return; } // Let native copy behaviour take over in input fields. if (!hasMultiSelection && Object(_wordpress_dom__WEBPACK_IMPORTED_MODULE_8__["documentHasSelection"])()) { return; } var serialized = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_7__["serialize"])(getBlocksByClientId(selectedBlockClientIds)); event.clipboardData.setData('text/plain', serialized); event.clipboardData.setData('text/html', serialized); event.preventDefault(); } }, { key: "onCut", value: function onCut(event) { var _this$props2 = this.props, hasMultiSelection = _this$props2.hasMultiSelection, selectedBlockClientIds = _this$props2.selectedBlockClientIds; this.onCopy(event); if (hasMultiSelection) { this.props.onRemove(selectedBlockClientIds); } } }, { key: "render", value: function render() { return null; } }]); return CopyHandler; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withSelect"])(function (select) { var _select = select('core/editor'), getMultiSelectedBlockClientIds = _select.getMultiSelectedBlockClientIds, getSelectedBlockClientId = _select.getSelectedBlockClientId, getBlocksByClientId = _select.getBlocksByClientId, hasMultiSelection = _select.hasMultiSelection; var selectedBlockClientId = getSelectedBlockClientId(); var selectedBlockClientIds = selectedBlockClientId ? [selectedBlockClientId] : getMultiSelectedBlockClientIds(); return { hasMultiSelection: hasMultiSelection(), selectedBlockClientIds: selectedBlockClientIds, // We only care about this value when the copy is performed // We call it dynamically in the event handler to avoid unnecessary re-renders. getBlocksByClientId: getBlocksByClientId }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withDispatch"])(function (dispatch) { return { onRemove: dispatch('core/editor').removeBlocks }; })])(CopyHandler)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/default-block-appender/index.js": /*!************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/default-block-appender/index.js ***! \************************************************************************************************/ /*! exports provided: DefaultBlockAppender, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultBlockAppender", function() { return DefaultBlockAppender; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_autosize_textarea__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-autosize-textarea */ "./node_modules/react-autosize-textarea/lib/index.js"); /* harmony import */ var react_autosize_textarea__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_autosize_textarea__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/html-entities */ "@wordpress/html-entities"); /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _block_drop_zone__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../block-drop-zone */ "./node_modules/@wordpress/editor/build-module/components/block-drop-zone/index.js"); /* harmony import */ var _inserter_with_shortcuts__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../inserter-with-shortcuts */ "./node_modules/@wordpress/editor/build-module/components/inserter-with-shortcuts/index.js"); /* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../inserter */ "./node_modules/@wordpress/editor/build-module/components/inserter/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function DefaultBlockAppender(_ref) { var isLocked = _ref.isLocked, isVisible = _ref.isVisible, onAppend = _ref.onAppend, showPrompt = _ref.showPrompt, placeholder = _ref.placeholder, rootClientId = _ref.rootClientId; if (isLocked || !isVisible) { return null; } var value = Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_5__["decodeEntities"])(placeholder) || Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Start writing or type / to choose a block'); // The appender "button" is in-fact a text field so as to support // transitions by WritingFlow occurring by arrow key press. WritingFlow // only supports tab transitions into text fields and to the block focus // boundary. // // See: https://github.com/WordPress/gutenberg/issues/4829#issuecomment-374213658 // // If it were ever to be made to be a proper `button` element, it is // important to note that `onFocus` alone would not be sufficient to // capture click events, notably in Firefox. // // See: https://gist.github.com/cvrebert/68659d0333a578d75372 // The wp-block className is important for editor styles. return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { "data-root-client-id": rootClientId || '', className: "wp-block editor-default-block-appender" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_drop_zone__WEBPACK_IMPORTED_MODULE_7__["default"], { rootClientId: rootClientId }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(react_autosize_textarea__WEBPACK_IMPORTED_MODULE_1___default.a, { role: "button", "aria-label": Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Add block'), className: "editor-default-block-appender__content", readOnly: true, onFocus: onAppend, value: showPrompt ? value : '' }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_inserter_with_shortcuts__WEBPACK_IMPORTED_MODULE_8__["default"], { rootClientId: rootClientId }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_inserter__WEBPACK_IMPORTED_MODULE_9__["default"], { position: "top right" })); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withSelect"])(function (select, ownProps) { var _select = select('core/editor'), getBlockCount = _select.getBlockCount, getBlockName = _select.getBlockName, isBlockValid = _select.isBlockValid, getEditorSettings = _select.getEditorSettings, getTemplateLock = _select.getTemplateLock; var isEmpty = !getBlockCount(ownProps.rootClientId); var isLastBlockDefault = getBlockName(ownProps.lastBlockClientId) === Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__["getDefaultBlockName"])(); var isLastBlockValid = isBlockValid(ownProps.lastBlockClientId); var _getEditorSettings = getEditorSettings(), bodyPlaceholder = _getEditorSettings.bodyPlaceholder; return { isVisible: isEmpty || !isLastBlockDefault || !isLastBlockValid, showPrompt: isEmpty, isLocked: !!getTemplateLock(ownProps.rootClientId), placeholder: bodyPlaceholder }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withDispatch"])(function (dispatch, ownProps) { var _dispatch = dispatch('core/editor'), insertDefaultBlock = _dispatch.insertDefaultBlock, startTyping = _dispatch.startTyping; return { onAppend: function onAppend() { var rootClientId = ownProps.rootClientId; insertDefaultBlock(undefined, rootClientId); startTyping(); } }; }))(DefaultBlockAppender)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/document-outline/check.js": /*!******************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/document-outline/check.js ***! \******************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); /** * External dependencies */ /** * WordPress dependencies */ function DocumentOutlineCheck(_ref) { var blocks = _ref.blocks, children = _ref.children; var headings = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["filter"])(blocks, function (block) { return block.name === 'core/heading'; }); if (headings.length < 1) { return null; } return children; } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["withSelect"])(function (select) { return { blocks: select('core/editor').getBlocks() }; })(DocumentOutlineCheck)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/document-outline/index.js": /*!******************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/document-outline/index.js ***! \******************************************************************************************/ /*! exports provided: DocumentOutline, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentOutline", function() { return DocumentOutline; }); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _item__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./item */ "./node_modules/@wordpress/editor/build-module/components/document-outline/item.js"); /* harmony import */ var _rich_text__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./../rich-text */ "./node_modules/@wordpress/editor/build-module/components/rich-text/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Module constants */ var emptyHeadingContent = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("em", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('(Empty heading)')); var incorrectLevelContent = [Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("br", { key: "incorrect-break" }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("em", { key: "incorrect-message" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('(Incorrect heading level)'))]; var singleH1Headings = [Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("br", { key: "incorrect-break-h1" }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("em", { key: "incorrect-message-h1" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('(Your theme may already use a H1 for the post title)'))]; var multipleH1Headings = [Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("br", { key: "incorrect-break-multiple-h1" }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("em", { key: "incorrect-message-multiple-h1" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('(Multiple H1 headings are not recommended)'))]; /** * Returns an array of heading blocks enhanced with the following properties: * path - An array of blocks that are ancestors of the heading starting from a top-level node. * Can be an empty array if the heading is a top-level node (is not nested inside another block). * level - An integer with the heading level. * isEmpty - Flag indicating if the heading has no content. * * @param {?Array} blocks An array of blocks. * @param {?Array} path An array of blocks that are ancestors of the blocks passed as blocks. * * @return {Array} An array of heading blocks enhanced with the properties described above. */ var computeOutlineHeadings = function computeOutlineHeadings() { var blocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; return Object(lodash__WEBPACK_IMPORTED_MODULE_3__["flatMap"])(blocks, function () { var block = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; if (block.name === 'core/heading') { return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__["default"])({}, block, { path: path, level: block.attributes.level, isEmpty: isEmptyHeading(block) }); } return computeOutlineHeadings(block.innerBlocks, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(path).concat([block])); }); }; var isEmptyHeading = function isEmptyHeading(heading) { return !heading.attributes.content || heading.attributes.content.length === 0; }; var DocumentOutline = function DocumentOutline(_ref) { var _ref$blocks = _ref.blocks, blocks = _ref$blocks === void 0 ? [] : _ref$blocks, title = _ref.title, onSelect = _ref.onSelect, isTitleSupported = _ref.isTitleSupported; var headings = computeOutlineHeadings(blocks); if (headings.length < 1) { return null; } var prevHeadingLevel = 1; // Select the corresponding block in the main editor // when clicking on a heading item from the list. var onSelectHeading = function onSelectHeading(clientId) { return onSelect(clientId); }; var focusTitle = function focusTitle() { // Not great but it's the simplest way to focus the title right now. var titleNode = document.querySelector('.editor-post-title__input'); if (titleNode) { titleNode.focus(); } }; var hasTitle = isTitleSupported && title; var countByLevel = Object(lodash__WEBPACK_IMPORTED_MODULE_3__["countBy"])(headings, 'level'); var hasMultipleH1 = countByLevel[1] > 1; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("div", { className: "document-outline" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("ul", null, hasTitle && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_item__WEBPACK_IMPORTED_MODULE_7__["default"], { level: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Title'), isValid: true, onClick: focusTitle }, title), headings.map(function (item, index) { // Headings remain the same, go up by one, or down by any amount. // Otherwise there are missing levels. var isIncorrectLevel = item.level > prevHeadingLevel + 1; var isValid = !item.isEmpty && !isIncorrectLevel && !!item.level && (item.level !== 1 || !hasMultipleH1 && !hasTitle); prevHeadingLevel = item.level; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_item__WEBPACK_IMPORTED_MODULE_7__["default"], { key: index, level: "H".concat(item.level), isValid: isValid, onClick: function onClick() { return onSelectHeading(item.clientId); }, path: item.path }, item.isEmpty ? emptyHeadingContent : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_rich_text__WEBPACK_IMPORTED_MODULE_8__["default"].Content, { tagName: "span", value: item.attributes.content }), isIncorrectLevel && incorrectLevelContent, item.level === 1 && hasMultipleH1 && multipleH1Headings, hasTitle && item.level === 1 && !hasMultipleH1 && singleH1Headings); }))); }; /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withSelect"])(function (select) { var _select = select('core/editor'), getEditedPostAttribute = _select.getEditedPostAttribute, getBlocks = _select.getBlocks; var _select2 = select('core'), getPostType = _select2.getPostType; var postType = getPostType(getEditedPostAttribute('type')); return { title: getEditedPostAttribute('title'), blocks: getBlocks(), isTitleSupported: Object(lodash__WEBPACK_IMPORTED_MODULE_3__["get"])(postType, ['supports', 'title'], false) }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), selectBlock = _dispatch.selectBlock; return { onSelect: selectBlock }; }))(DocumentOutline)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/document-outline/item.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/document-outline/item.js ***! \*****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _block_title__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../block-title */ "./node_modules/@wordpress/editor/build-module/components/block-title/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var TableOfContentsItem = function TableOfContentsItem(_ref) { var children = _ref.children, isValid = _ref.isValid, level = _ref.level, onClick = _ref.onClick, _ref$path = _ref.path, path = _ref$path === void 0 ? [] : _ref$path; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("li", { className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('document-outline__item', "is-".concat(level.toLowerCase()), { 'is-invalid': !isValid }) }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("button", { className: "document-outline__button", onClick: onClick }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { className: "document-outline__emdash", "aria-hidden": "true" }), // path is an array of nodes that are ancestors of the heading starting in the top level node. // This mapping renders each ancestor to make it easier for the user to know where the headings are nested. path.map(function (_ref2, index) { var clientId = _ref2.clientId; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("strong", { key: index, className: "document-outline__level" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_title__WEBPACK_IMPORTED_MODULE_3__["default"], { clientId: clientId })); }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("strong", { className: "document-outline__level" }, level), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { className: "document-outline__item-content" }, children), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { className: "screen-reader-text" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('(Click to focus this heading)')))); }; /* harmony default export */ __webpack_exports__["default"] = (TableOfContentsItem); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/editor-global-keyboard-shortcuts/index.js": /*!**********************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/editor-global-keyboard-shortcuts/index.js ***! \**********************************************************************************************************/ /*! exports provided: shortcuts, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shortcuts", function() { return shortcuts; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _block_actions__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../block-actions */ "./node_modules/@wordpress/editor/build-module/components/block-actions/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var preventDefault = function preventDefault(event) { event.preventDefault(); return event; }; var shortcuts = { duplicate: { raw: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["rawShortcut"].primaryShift('d'), display: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["displayShortcut"].primaryShift('d') }, removeBlock: { raw: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["rawShortcut"].access('z'), display: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["displayShortcut"].access('z') }, insertBefore: { raw: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["rawShortcut"].primaryAlt('t'), display: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["displayShortcut"].primaryAlt('t') }, insertAfter: { raw: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["rawShortcut"].primaryAlt('y'), display: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["displayShortcut"].primaryAlt('y') } }; var EditorGlobalKeyboardShortcuts = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__["default"])(EditorGlobalKeyboardShortcuts, _Component); function EditorGlobalKeyboardShortcuts() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, EditorGlobalKeyboardShortcuts); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(EditorGlobalKeyboardShortcuts).apply(this, arguments)); _this.selectAll = _this.selectAll.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); _this.undoOrRedo = _this.undoOrRedo.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); _this.save = _this.save.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); _this.deleteSelectedBlocks = _this.deleteSelectedBlocks.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); _this.clearMultiSelection = _this.clearMultiSelection.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(EditorGlobalKeyboardShortcuts, [{ key: "selectAll", value: function selectAll(event) { var _this$props = this.props, rootBlocksClientIds = _this$props.rootBlocksClientIds, onMultiSelect = _this$props.onMultiSelect; event.preventDefault(); onMultiSelect(Object(lodash__WEBPACK_IMPORTED_MODULE_8__["first"])(rootBlocksClientIds), Object(lodash__WEBPACK_IMPORTED_MODULE_8__["last"])(rootBlocksClientIds)); } }, { key: "undoOrRedo", value: function undoOrRedo(event) { var _this$props2 = this.props, onRedo = _this$props2.onRedo, onUndo = _this$props2.onUndo; if (event.shiftKey) { onRedo(); } else { onUndo(); } event.preventDefault(); } }, { key: "save", value: function save(event) { event.preventDefault(); this.props.onSave(); } }, { key: "deleteSelectedBlocks", value: function deleteSelectedBlocks(event) { var _this$props3 = this.props, selectedBlockClientIds = _this$props3.selectedBlockClientIds, hasMultiSelection = _this$props3.hasMultiSelection, onRemove = _this$props3.onRemove, isLocked = _this$props3.isLocked; if (hasMultiSelection) { event.preventDefault(); if (!isLocked) { onRemove(selectedBlockClientIds); } } } /** * Clears current multi-selection, if one exists. */ }, { key: "clearMultiSelection", value: function clearMultiSelection() { var _this$props4 = this.props, hasMultiSelection = _this$props4.hasMultiSelection, clearSelectedBlock = _this$props4.clearSelectedBlock; if (hasMultiSelection) { clearSelectedBlock(); window.getSelection().removeAllRanges(); } } }, { key: "render", value: function render() { var _ref; var selectedBlockClientIds = this.props.selectedBlockClientIds; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__["KeyboardShortcuts"], { shortcuts: (_ref = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref, _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["rawShortcut"].primary('a'), this.selectAll), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref, _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["rawShortcut"].primary('z'), this.undoOrRedo), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref, _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["rawShortcut"].primaryShift('z'), this.undoOrRedo), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref, "backspace", this.deleteSelectedBlocks), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref, "del", this.deleteSelectedBlocks), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref, "escape", this.clearMultiSelection), _ref) }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__["KeyboardShortcuts"], { bindGlobal: true, shortcuts: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])({}, _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["rawShortcut"].primary('s'), this.save) }), selectedBlockClientIds.length > 0 && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_block_actions__WEBPACK_IMPORTED_MODULE_13__["default"], { clientIds: selectedBlockClientIds }, function (_ref3) { var _ref4; var onDuplicate = _ref3.onDuplicate, onRemove = _ref3.onRemove, onInsertAfter = _ref3.onInsertAfter, onInsertBefore = _ref3.onInsertBefore; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__["KeyboardShortcuts"], { bindGlobal: true, shortcuts: (_ref4 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref4, shortcuts.duplicate.raw, Object(lodash__WEBPACK_IMPORTED_MODULE_8__["flow"])(preventDefault, onDuplicate)), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref4, shortcuts.removeBlock.raw, Object(lodash__WEBPACK_IMPORTED_MODULE_8__["flow"])(preventDefault, onRemove)), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref4, shortcuts.insertBefore.raw, Object(lodash__WEBPACK_IMPORTED_MODULE_8__["flow"])(preventDefault, onInsertBefore)), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref4, shortcuts.insertAfter.raw, Object(lodash__WEBPACK_IMPORTED_MODULE_8__["flow"])(preventDefault, onInsertAfter)), _ref4) }); })); } }]); return EditorGlobalKeyboardShortcuts; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_12__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withSelect"])(function (select) { var _select = select('core/editor'), getBlockOrder = _select.getBlockOrder, getMultiSelectedBlockClientIds = _select.getMultiSelectedBlockClientIds, hasMultiSelection = _select.hasMultiSelection, isEditedPostDirty = _select.isEditedPostDirty, getBlockRootClientId = _select.getBlockRootClientId, getTemplateLock = _select.getTemplateLock, getSelectedBlockClientId = _select.getSelectedBlockClientId; var selectedBlockClientId = getSelectedBlockClientId(); var selectedBlockClientIds = selectedBlockClientId ? [selectedBlockClientId] : getMultiSelectedBlockClientIds(); return { rootBlocksClientIds: getBlockOrder(), hasMultiSelection: hasMultiSelection(), isLocked: Object(lodash__WEBPACK_IMPORTED_MODULE_8__["some"])(selectedBlockClientIds, function (clientId) { return !!getTemplateLock(getBlockRootClientId(clientId)); }), isDirty: isEditedPostDirty(), selectedBlockClientIds: selectedBlockClientIds }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withDispatch"])(function (dispatch, ownProps) { var _dispatch = dispatch('core/editor'), clearSelectedBlock = _dispatch.clearSelectedBlock, multiSelect = _dispatch.multiSelect, redo = _dispatch.redo, undo = _dispatch.undo, removeBlocks = _dispatch.removeBlocks, savePost = _dispatch.savePost; return { onSave: function onSave() { // TODO: This should be handled in the `savePost` effect in // considering `isSaveable`. See note on `isEditedPostSaveable` // selector about dirtiness and meta-boxes. When removing, also // remember to remove `isDirty` prop passing from `withSelect`. // // See: `isEditedPostSaveable` if (!ownProps.isDirty) { return; } savePost(); }, clearSelectedBlock: clearSelectedBlock, onMultiSelect: multiSelect, onRedo: redo, onUndo: undo, onRemove: removeBlocks }; })])(EditorGlobalKeyboardShortcuts)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/editor-history/redo.js": /*!***************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/editor-history/redo.js ***! \***************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_5__); /** * WordPress dependencies */ function EditorHistoryRedo(_ref) { var hasRedo = _ref.hasRedo, redo = _ref.redo; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["IconButton"], { icon: "redo", label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Redo'), shortcut: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_5__["displayShortcut"].primaryShift('z') // If there are no redo levels we don't want to actually disable this // button, because it will remove focus for keyboard users. // See: https://github.com/WordPress/gutenberg/issues/3486 , "aria-disabled": !hasRedo, onClick: hasRedo ? redo : undefined, className: "editor-history__redo" }); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withSelect"])(function (select) { return { hasRedo: select('core/editor').hasEditorRedo() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withDispatch"])(function (dispatch) { return { redo: dispatch('core/editor').redo }; })])(EditorHistoryRedo)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/editor-history/undo.js": /*!***************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/editor-history/undo.js ***! \***************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_5__); /** * WordPress dependencies */ function EditorHistoryUndo(_ref) { var hasUndo = _ref.hasUndo, undo = _ref.undo; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["IconButton"], { icon: "undo", label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Undo'), shortcut: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_5__["displayShortcut"].primary('z') // If there are no undo levels we don't want to actually disable this // button, because it will remove focus for keyboard users. // See: https://github.com/WordPress/gutenberg/issues/3486 , "aria-disabled": !hasUndo, onClick: hasUndo ? undo : undefined, className: "editor-history__undo" }); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withSelect"])(function (select) { return { hasUndo: select('core/editor').hasEditorUndo() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withDispatch"])(function (dispatch) { return { undo: dispatch('core/editor').undo }; })])(EditorHistoryUndo)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/editor-notices/index.js": /*!****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/editor-notices/index.js ***! \****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _template_validation_notice__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../template-validation-notice */ "./node_modules/@wordpress/editor/build-module/components/template-validation-notice/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ function EditorNotices(props) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["NoticeList"], props, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_template_validation_notice__WEBPACK_IMPORTED_MODULE_4__["default"], null)); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select) { return { notices: select('core/notices').getNotices() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withDispatch"])(function (dispatch) { return { onRemove: dispatch('core/notices').removeNotice }; })])(EditorNotices)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/error-boundary/index.js": /*!****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/error-boundary/index.js ***! \****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ */ "./node_modules/@wordpress/editor/build-module/components/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ var ErrorBoundary = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(ErrorBoundary, _Component); function ErrorBoundary() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, ErrorBoundary); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(ErrorBoundary).apply(this, arguments)); _this.reboot = _this.reboot.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.getContent = _this.getContent.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.state = { error: null }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(ErrorBoundary, [{ key: "componentDidCatch", value: function componentDidCatch(error) { this.setState({ error: error }); } }, { key: "reboot", value: function reboot() { this.props.onError(); } }, { key: "getContent", value: function getContent() { try { // While `select` in a component is generally discouraged, it is // used here because it (a) reduces the chance of data loss in the // case of additional errors by performing a direct retrieval and // (b) avoids the performance cost associated with unnecessary // content serialization throughout the lifetime of a non-erroring // application. return Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["select"])('core/editor').getEditedPostContent(); } catch (error) {} } }, { key: "render", value: function render() { var error = this.state.error; if (!error) { return this.props.children; } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(___WEBPACK_IMPORTED_MODULE_10__["Warning"], { className: "editor-error-boundary", actions: [Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["Button"], { key: "recovery", onClick: this.reboot, isLarge: true }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Attempt Recovery')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["ClipboardButton"], { key: "copy-post", text: this.getContent, isLarge: true }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Copy Post Text')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["ClipboardButton"], { key: "copy-error", text: error.stack, isLarge: true }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Copy Error'))] }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('The editor has encountered an unexpected error.')); } }]); return ErrorBoundary; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (ErrorBoundary); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/font-sizes/font-size-picker.js": /*!***********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/font-sizes/font-size-picker.js ***! \***********************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["withSelect"])(function (select) { var _select$getEditorSett = select('core/editor').getEditorSettings(), disableCustomFontSizes = _select$getEditorSett.disableCustomFontSizes, fontSizes = _select$getEditorSett.fontSizes; return { disableCustomFontSizes: disableCustomFontSizes, fontSizes: fontSizes }; })(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__["FontSizePicker"])); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/font-sizes/index.js": /*!************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/font-sizes/index.js ***! \************************************************************************************/ /*! exports provided: getFontSize, getFontSizeClass, FontSizePicker, withFontSizes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./node_modules/@wordpress/editor/build-module/components/font-sizes/utils.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFontSize", function() { return _utils__WEBPACK_IMPORTED_MODULE_0__["getFontSize"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFontSizeClass", function() { return _utils__WEBPACK_IMPORTED_MODULE_0__["getFontSizeClass"]; }); /* harmony import */ var _font_size_picker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./font-size-picker */ "./node_modules/@wordpress/editor/build-module/components/font-sizes/font-size-picker.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FontSizePicker", function() { return _font_size_picker__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _with_font_sizes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./with-font-sizes */ "./node_modules/@wordpress/editor/build-module/components/font-sizes/with-font-sizes.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withFontSizes", function() { return _with_font_sizes__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/font-sizes/utils.js": /*!************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/font-sizes/utils.js ***! \************************************************************************************/ /*! exports provided: getFontSize, getFontSizeClass */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFontSize", function() { return getFontSize; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFontSizeClass", function() { return getFontSizeClass; }); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /** * External dependencies */ /** * Returns the font size object based on an array of named font sizes and the namedFontSize and customFontSize values. * If namedFontSize is undefined or not found in fontSizes an object with just the size value based on customFontSize is returned. * * @param {Array} fontSizes Array of font size objects containing at least the "name" and "size" values as properties. * @param {?string} fontSizeAttribute Content of the font size attribute (slug). * @param {?number} customFontSizeAttribute Contents of the custom font size attribute (value). * * @return {?string} If fontSizeAttribute is set and an equal slug is found in fontSizes it returns the font size object for that slug. * Otherwise, an object with just the size value based on customFontSize is returned. */ var getFontSize = function getFontSize(fontSizes, fontSizeAttribute, customFontSizeAttribute) { if (fontSizeAttribute) { var fontSizeObject = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["find"])(fontSizes, { slug: fontSizeAttribute }); if (fontSizeObject) { return fontSizeObject; } } return { size: customFontSizeAttribute }; }; /** * Returns a class based on fontSizeName. * * @param {string} fontSizeSlug Slug of the fontSize. * * @return {string} String with the class corresponding to the fontSize passed. * The class is generated by appending 'has-' followed by fontSizeSlug in kebabCase and ending with '-font-size'. */ function getFontSizeClass(fontSizeSlug) { if (!fontSizeSlug) { return; } return "has-".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["kebabCase"])(fontSizeSlug), "-font-size"); } /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/font-sizes/with-font-sizes.js": /*!**********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/font-sizes/with-font-sizes.js ***! \**********************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils */ "./node_modules/@wordpress/editor/build-module/components/font-sizes/utils.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Higher-order component, which handles font size logic for class generation, * font size value retrieval, and font size change handling. * * @param {...(object|string)} args The arguments should all be strings * Each string contains the font size attribute name e.g: 'fontSize'. * * @return {Function} Higher-order component. */ /* harmony default export */ __webpack_exports__["default"] = (function () { for (var _len = arguments.length, fontSizeNames = new Array(_len), _key = 0; _key < _len; _key++) { fontSizeNames[_key] = arguments[_key]; } /* * Computes an object whose key is the font size attribute name as passed in the array, * and the value is the custom font size attribute name. * Custom font size is automatically compted by appending custom followed by the font size attribute name in with the first letter capitalized. */ var fontSizeAttributeNames = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["reduce"])(fontSizeNames, function (fontSizeAttributeNamesAccumulator, fontSizeAttributeName) { fontSizeAttributeNamesAccumulator[fontSizeAttributeName] = "custom".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_8__["upperFirst"])(fontSizeAttributeName)); return fontSizeAttributeNamesAccumulator; }, {}); return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__["createHigherOrderComponent"])(Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withSelect"])(function (select) { var _select$getEditorSett = select('core/editor').getEditorSettings(), fontSizes = _select$getEditorSett.fontSizes; return { fontSizes: fontSizes }; }), function (WrappedComponent) { return ( /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__["default"])(_class, _Component); function _class(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, _class); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__["default"])(_class).call(this, props)); _this.setters = _this.createSetters(); _this.state = {}; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(_class, [{ key: "createSetters", value: function createSetters() { var _this2 = this; return Object(lodash__WEBPACK_IMPORTED_MODULE_8__["reduce"])(fontSizeAttributeNames, function (settersAccumulator, customFontSizeAttributeName, fontSizeAttributeName) { var upperFirstFontSizeAttributeName = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["upperFirst"])(fontSizeAttributeName); settersAccumulator["set".concat(upperFirstFontSizeAttributeName)] = _this2.createSetFontSize(fontSizeAttributeName, customFontSizeAttributeName); return settersAccumulator; }, {}); } }, { key: "createSetFontSize", value: function createSetFontSize(fontSizeAttributeName, customFontSizeAttributeName) { var _this3 = this; return function (fontSizeValue) { var _this3$props$setAttri; var fontSizeObject = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["find"])(_this3.props.fontSizes, { size: fontSizeValue }); _this3.props.setAttributes((_this3$props$setAttri = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_this3$props$setAttri, fontSizeAttributeName, fontSizeObject && fontSizeObject.slug ? fontSizeObject.slug : undefined), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_this3$props$setAttri, customFontSizeAttributeName, fontSizeObject && fontSizeObject.slug ? undefined : fontSizeValue), _this3$props$setAttri)); }; } }, { key: "render", value: function render() { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(WrappedComponent, Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, this.props, { fontSizes: undefined }, this.state, this.setters)); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(_ref, previousState) { var attributes = _ref.attributes, fontSizes = _ref.fontSizes; var didAttributesChange = function didAttributesChange(customFontSizeAttributeName, fontSizeAttributeName) { if (previousState[fontSizeAttributeName]) { // if new font size is name compare with the previous slug if (attributes[fontSizeAttributeName]) { return attributes[fontSizeAttributeName] !== previousState[fontSizeAttributeName].slug; } // if font size is not named, update when the font size value changes. return previousState[fontSizeAttributeName].size !== attributes[customFontSizeAttributeName]; } // in this case we need to build the font size object return true; }; if (!Object(lodash__WEBPACK_IMPORTED_MODULE_8__["some"])(fontSizeAttributeNames, didAttributesChange)) { return null; } var newState = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["reduce"])(Object(lodash__WEBPACK_IMPORTED_MODULE_8__["pickBy"])(fontSizeAttributeNames, didAttributesChange), function (newStateAccumulator, customFontSizeAttributeName, fontSizeAttributeName) { var fontSizeAttributeValue = attributes[fontSizeAttributeName]; var fontSizeObject = Object(_utils__WEBPACK_IMPORTED_MODULE_11__["getFontSize"])(fontSizes, fontSizeAttributeValue, attributes[customFontSizeAttributeName]); newStateAccumulator[fontSizeAttributeName] = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, fontSizeObject, { class: Object(_utils__WEBPACK_IMPORTED_MODULE_11__["getFontSizeClass"])(fontSizeAttributeValue) }); return newStateAccumulator; }, {}); return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, previousState, newState); } }]); return _class; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Component"]) ); }]), 'withFontSizes'); }); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/ignore-nested-events/index.js": /*!**********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/ignore-nested-events/index.js ***! \**********************************************************************************************/ /*! exports provided: IgnoreNestedEvents, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IgnoreNestedEvents", function() { return IgnoreNestedEvents; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__); /** * External dependencies */ /** * WordPress dependencies */ /** * Component which renders a div with passed props applied except the optional * `childHandledEvents` prop. Event prop handlers are replaced with a proxying * event handler to capture and prevent events from being handled by ancestor * `IgnoreNestedEvents` elements by testing the presence of a private property * assigned on the event object. * * Optionally accepts an `childHandledEvents` prop array, which can be used in * instances where an inner `IgnoreNestedEvents` element exists and the outer * element should stop propagation but not invoke a callback handler, since it * would be assumed these are invoked by the child element. * * @type {Component} */ var IgnoreNestedEvents = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_7__["default"])(IgnoreNestedEvents, _Component); function IgnoreNestedEvents() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_3__["default"])(this, IgnoreNestedEvents); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__["default"])(IgnoreNestedEvents).apply(this, arguments)); _this.proxyEvent = _this.proxyEvent.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(_this))); // The event map is responsible for tracking an event type to a React // component prop name, since it is easy to determine event type from // a React prop name, but not the other way around. _this.eventMap = {}; return _this; } /** * General event handler which only calls to its original props callback if * it has not already been handled by a descendant IgnoreNestedEvents. * * @param {Event} event Event object. * * @return {void} */ Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_4__["default"])(IgnoreNestedEvents, [{ key: "proxyEvent", value: function proxyEvent(event) { var isHandled = !!event.nativeEvent._blockHandled; // Assign into the native event, since React will reuse their synthetic // event objects and this property assignment could otherwise leak. // // See: https://reactjs.org/docs/events.html#event-pooling event.nativeEvent._blockHandled = true; // Invoke original prop handler var propKey = this.eventMap[event.type]; // If already handled (i.e. assume nested block), only invoke a // corresponding "Handled"-suffixed prop callback. if (isHandled) { propKey += 'Handled'; } if (this.props[propKey]) { this.props[propKey](event); } } }, { key: "render", value: function render() { var _this2 = this; var _this$props = this.props, _this$props$childHand = _this$props.childHandledEvents, childHandledEvents = _this$props$childHand === void 0 ? [] : _this$props$childHand, forwardedRef = _this$props.forwardedRef, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(_this$props, ["childHandledEvents", "forwardedRef"]); var eventHandlers = Object(lodash__WEBPACK_IMPORTED_MODULE_10__["reduce"])(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__["default"])(childHandledEvents).concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__["default"])(Object.keys(props))), function (result, key) { // Try to match prop key as event handler var match = key.match(/^on([A-Z][a-zA-Z]+?)(Handled)?$/); if (match) { var isHandledProp = !!match[2]; if (isHandledProp) { // Avoid assigning through the invalid prop key. This // assumes mutation of shallow clone by above spread. delete props[key]; } // Re-map the prop to the local proxy handler to check whether // the event has already been handled. var proxiedPropName = 'on' + match[1]; result[proxiedPropName] = _this2.proxyEvent; // Assign event -> propName into an instance variable, so as to // avoid re-renders which could be incurred either by setState // or in mapping values to a newly created function. _this2.eventMap[match[1].toLowerCase()] = proxiedPropName; } return result; }, {}); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ ref: forwardedRef }, props, eventHandlers)); } }]); return IgnoreNestedEvents; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["Component"]); var forwardedIgnoreNestedEvents = function forwardedIgnoreNestedEvents(props, ref) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])(IgnoreNestedEvents, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, { forwardedRef: ref })); }; forwardedIgnoreNestedEvents.displayName = 'IgnoreNestedEvents'; /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["forwardRef"])(forwardedIgnoreNestedEvents)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/index.js": /*!*************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/index.js ***! \*************************************************************************/ /*! exports provided: Autocomplete, AlignmentToolbar, BlockAlignmentToolbar, BlockControls, BlockEdit, BlockFormatControls, BlockNavigationDropdown, BlockIcon, ColorPalette, withColorContext, ContrastChecker, InnerBlocks, InspectorAdvancedControls, InspectorControls, PanelColorSettings, PlainText, RichText, RichTextShortcut, RichTextToolbarButton, RichTextInserterItem, ServerSideRender, MediaPlaceholder, MediaUpload, MediaUploadCheck, URLInput, URLInputButton, URLPopover, AutosaveMonitor, DocumentOutline, DocumentOutlineCheck, EditorGlobalKeyboardShortcuts, EditorHistoryRedo, EditorHistoryUndo, EditorNotices, PageAttributesCheck, PageAttributesOrder, PageAttributesParent, PageTemplate, PostAuthor, PostAuthorCheck, PostComments, PostExcerpt, PostExcerptCheck, PostFeaturedImage, PostFeaturedImageCheck, PostFormat, PostFormatCheck, PostLastRevision, PostLastRevisionCheck, PostLockedModal, PostPendingStatus, PostPendingStatusCheck, PostPingbacks, PostPreviewButton, PostPublishButton, PostPublishButtonLabel, PostPublishPanel, PostSavedState, PostSchedule, PostScheduleCheck, PostScheduleLabel, PostSticky, PostStickyCheck, PostSwitchToDraftButton, PostTaxonomies, PostTaxonomiesCheck, PostTextEditor, PostTitle, PostTrash, PostTrashCheck, PostTypeSupportCheck, PostVisibility, PostVisibilityLabel, PostVisibilityCheck, TableOfContents, UnsavedChangesWarning, WordCount, BlockInspector, BlockList, BlockMover, BlockSelectionClearer, BlockSettingsMenu, _BlockSettingsMenuFirstItem, _BlockSettingsMenuPluginsExtension, BlockTitle, BlockToolbar, CopyHandler, DefaultBlockAppender, ErrorBoundary, Inserter, MultiBlocksSwitcher, MultiSelectScrollIntoView, NavigableToolbar, ObserveTyping, PreserveScrollInReorder, SkipToSelectedBlock, Warning, WritingFlow, EditorProvider, blockAutocompleter, userAutocompleter, getColorClassName, getColorObjectByAttributeValues, getColorObjectByColorValue, withColors, getFontSize, getFontSizeClass, FontSizePicker, withFontSizes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _autocomplete__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./autocomplete */ "./node_modules/@wordpress/editor/build-module/components/autocomplete/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Autocomplete", function() { return _autocomplete__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _autocompleters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./autocompleters */ "./node_modules/@wordpress/editor/build-module/components/autocompleters/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blockAutocompleter", function() { return _autocompleters__WEBPACK_IMPORTED_MODULE_1__["blockAutocompleter"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "userAutocompleter", function() { return _autocompleters__WEBPACK_IMPORTED_MODULE_1__["userAutocompleter"]; }); /* harmony import */ var _alignment_toolbar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./alignment-toolbar */ "./node_modules/@wordpress/editor/build-module/components/alignment-toolbar/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AlignmentToolbar", function() { return _alignment_toolbar__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _block_alignment_toolbar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block-alignment-toolbar */ "./node_modules/@wordpress/editor/build-module/components/block-alignment-toolbar/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlockAlignmentToolbar", function() { return _block_alignment_toolbar__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _block_controls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block-controls */ "./node_modules/@wordpress/editor/build-module/components/block-controls/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlockControls", function() { return _block_controls__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _block_edit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./block-edit */ "./node_modules/@wordpress/editor/build-module/components/block-edit/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlockEdit", function() { return _block_edit__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _block_format_controls__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./block-format-controls */ "./node_modules/@wordpress/editor/build-module/components/block-format-controls/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlockFormatControls", function() { return _block_format_controls__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _block_navigation_dropdown__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./block-navigation/dropdown */ "./node_modules/@wordpress/editor/build-module/components/block-navigation/dropdown.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlockNavigationDropdown", function() { return _block_navigation_dropdown__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _block_icon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./block-icon */ "./node_modules/@wordpress/editor/build-module/components/block-icon/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlockIcon", function() { return _block_icon__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _color_palette__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./color-palette */ "./node_modules/@wordpress/editor/build-module/components/color-palette/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPalette", function() { return _color_palette__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _color_palette_with_color_context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./color-palette/with-color-context */ "./node_modules/@wordpress/editor/build-module/components/color-palette/with-color-context.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withColorContext", function() { return _color_palette_with_color_context__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./colors */ "./node_modules/@wordpress/editor/build-module/components/colors/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getColorClassName", function() { return _colors__WEBPACK_IMPORTED_MODULE_11__["getColorClassName"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getColorObjectByAttributeValues", function() { return _colors__WEBPACK_IMPORTED_MODULE_11__["getColorObjectByAttributeValues"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getColorObjectByColorValue", function() { return _colors__WEBPACK_IMPORTED_MODULE_11__["getColorObjectByColorValue"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withColors", function() { return _colors__WEBPACK_IMPORTED_MODULE_11__["withColors"]; }); /* harmony import */ var _contrast_checker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./contrast-checker */ "./node_modules/@wordpress/editor/build-module/components/contrast-checker/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContrastChecker", function() { return _contrast_checker__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _font_sizes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./font-sizes */ "./node_modules/@wordpress/editor/build-module/components/font-sizes/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFontSize", function() { return _font_sizes__WEBPACK_IMPORTED_MODULE_13__["getFontSize"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFontSizeClass", function() { return _font_sizes__WEBPACK_IMPORTED_MODULE_13__["getFontSizeClass"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FontSizePicker", function() { return _font_sizes__WEBPACK_IMPORTED_MODULE_13__["FontSizePicker"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withFontSizes", function() { return _font_sizes__WEBPACK_IMPORTED_MODULE_13__["withFontSizes"]; }); /* harmony import */ var _inner_blocks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./inner-blocks */ "./node_modules/@wordpress/editor/build-module/components/inner-blocks/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InnerBlocks", function() { return _inner_blocks__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _inspector_advanced_controls__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./inspector-advanced-controls */ "./node_modules/@wordpress/editor/build-module/components/inspector-advanced-controls/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InspectorAdvancedControls", function() { return _inspector_advanced_controls__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony import */ var _inspector_controls__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./inspector-controls */ "./node_modules/@wordpress/editor/build-module/components/inspector-controls/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InspectorControls", function() { return _inspector_controls__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony import */ var _panel_color_settings__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./panel-color-settings */ "./node_modules/@wordpress/editor/build-module/components/panel-color-settings/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PanelColorSettings", function() { return _panel_color_settings__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /* harmony import */ var _plain_text__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./plain-text */ "./node_modules/@wordpress/editor/build-module/components/plain-text/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PlainText", function() { return _plain_text__WEBPACK_IMPORTED_MODULE_18__["default"]; }); /* harmony import */ var _rich_text__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./rich-text */ "./node_modules/@wordpress/editor/build-module/components/rich-text/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RichText", function() { return _rich_text__WEBPACK_IMPORTED_MODULE_19__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RichTextShortcut", function() { return _rich_text__WEBPACK_IMPORTED_MODULE_19__["RichTextShortcut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RichTextToolbarButton", function() { return _rich_text__WEBPACK_IMPORTED_MODULE_19__["RichTextToolbarButton"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RichTextInserterItem", function() { return _rich_text__WEBPACK_IMPORTED_MODULE_19__["RichTextInserterItem"]; }); /* harmony import */ var _server_side_render__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./server-side-render */ "./node_modules/@wordpress/editor/build-module/components/server-side-render/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ServerSideRender", function() { return _server_side_render__WEBPACK_IMPORTED_MODULE_20__["default"]; }); /* harmony import */ var _media_placeholder__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./media-placeholder */ "./node_modules/@wordpress/editor/build-module/components/media-placeholder/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MediaPlaceholder", function() { return _media_placeholder__WEBPACK_IMPORTED_MODULE_21__["default"]; }); /* harmony import */ var _media_upload__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./media-upload */ "./node_modules/@wordpress/editor/build-module/components/media-upload/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MediaUpload", function() { return _media_upload__WEBPACK_IMPORTED_MODULE_22__["default"]; }); /* harmony import */ var _media_upload_check__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./media-upload/check */ "./node_modules/@wordpress/editor/build-module/components/media-upload/check.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MediaUploadCheck", function() { return _media_upload_check__WEBPACK_IMPORTED_MODULE_23__["default"]; }); /* harmony import */ var _url_input__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./url-input */ "./node_modules/@wordpress/editor/build-module/components/url-input/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "URLInput", function() { return _url_input__WEBPACK_IMPORTED_MODULE_24__["default"]; }); /* harmony import */ var _url_input_button__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./url-input/button */ "./node_modules/@wordpress/editor/build-module/components/url-input/button.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "URLInputButton", function() { return _url_input_button__WEBPACK_IMPORTED_MODULE_25__["default"]; }); /* harmony import */ var _url_popover__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./url-popover */ "./node_modules/@wordpress/editor/build-module/components/url-popover/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "URLPopover", function() { return _url_popover__WEBPACK_IMPORTED_MODULE_26__["default"]; }); /* harmony import */ var _autosave_monitor__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./autosave-monitor */ "./node_modules/@wordpress/editor/build-module/components/autosave-monitor/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutosaveMonitor", function() { return _autosave_monitor__WEBPACK_IMPORTED_MODULE_27__["default"]; }); /* harmony import */ var _document_outline__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./document-outline */ "./node_modules/@wordpress/editor/build-module/components/document-outline/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentOutline", function() { return _document_outline__WEBPACK_IMPORTED_MODULE_28__["default"]; }); /* harmony import */ var _document_outline_check__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./document-outline/check */ "./node_modules/@wordpress/editor/build-module/components/document-outline/check.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentOutlineCheck", function() { return _document_outline_check__WEBPACK_IMPORTED_MODULE_29__["default"]; }); /* harmony import */ var _editor_global_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./editor-global-keyboard-shortcuts */ "./node_modules/@wordpress/editor/build-module/components/editor-global-keyboard-shortcuts/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EditorGlobalKeyboardShortcuts", function() { return _editor_global_keyboard_shortcuts__WEBPACK_IMPORTED_MODULE_30__["default"]; }); /* harmony import */ var _editor_history_redo__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./editor-history/redo */ "./node_modules/@wordpress/editor/build-module/components/editor-history/redo.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EditorHistoryRedo", function() { return _editor_history_redo__WEBPACK_IMPORTED_MODULE_31__["default"]; }); /* harmony import */ var _editor_history_undo__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./editor-history/undo */ "./node_modules/@wordpress/editor/build-module/components/editor-history/undo.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EditorHistoryUndo", function() { return _editor_history_undo__WEBPACK_IMPORTED_MODULE_32__["default"]; }); /* harmony import */ var _editor_notices__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./editor-notices */ "./node_modules/@wordpress/editor/build-module/components/editor-notices/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EditorNotices", function() { return _editor_notices__WEBPACK_IMPORTED_MODULE_33__["default"]; }); /* harmony import */ var _page_attributes_check__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./page-attributes/check */ "./node_modules/@wordpress/editor/build-module/components/page-attributes/check.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageAttributesCheck", function() { return _page_attributes_check__WEBPACK_IMPORTED_MODULE_34__["default"]; }); /* harmony import */ var _page_attributes_order__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./page-attributes/order */ "./node_modules/@wordpress/editor/build-module/components/page-attributes/order.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageAttributesOrder", function() { return _page_attributes_order__WEBPACK_IMPORTED_MODULE_35__["default"]; }); /* harmony import */ var _page_attributes_parent__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./page-attributes/parent */ "./node_modules/@wordpress/editor/build-module/components/page-attributes/parent.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageAttributesParent", function() { return _page_attributes_parent__WEBPACK_IMPORTED_MODULE_36__["default"]; }); /* harmony import */ var _page_attributes_template__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./page-attributes/template */ "./node_modules/@wordpress/editor/build-module/components/page-attributes/template.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageTemplate", function() { return _page_attributes_template__WEBPACK_IMPORTED_MODULE_37__["default"]; }); /* harmony import */ var _post_author__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./post-author */ "./node_modules/@wordpress/editor/build-module/components/post-author/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostAuthor", function() { return _post_author__WEBPACK_IMPORTED_MODULE_38__["default"]; }); /* harmony import */ var _post_author_check__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./post-author/check */ "./node_modules/@wordpress/editor/build-module/components/post-author/check.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostAuthorCheck", function() { return _post_author_check__WEBPACK_IMPORTED_MODULE_39__["default"]; }); /* harmony import */ var _post_comments__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./post-comments */ "./node_modules/@wordpress/editor/build-module/components/post-comments/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostComments", function() { return _post_comments__WEBPACK_IMPORTED_MODULE_40__["default"]; }); /* harmony import */ var _post_excerpt__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./post-excerpt */ "./node_modules/@wordpress/editor/build-module/components/post-excerpt/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostExcerpt", function() { return _post_excerpt__WEBPACK_IMPORTED_MODULE_41__["default"]; }); /* harmony import */ var _post_excerpt_check__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./post-excerpt/check */ "./node_modules/@wordpress/editor/build-module/components/post-excerpt/check.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostExcerptCheck", function() { return _post_excerpt_check__WEBPACK_IMPORTED_MODULE_42__["default"]; }); /* harmony import */ var _post_featured_image__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./post-featured-image */ "./node_modules/@wordpress/editor/build-module/components/post-featured-image/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostFeaturedImage", function() { return _post_featured_image__WEBPACK_IMPORTED_MODULE_43__["default"]; }); /* harmony import */ var _post_featured_image_check__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./post-featured-image/check */ "./node_modules/@wordpress/editor/build-module/components/post-featured-image/check.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostFeaturedImageCheck", function() { return _post_featured_image_check__WEBPACK_IMPORTED_MODULE_44__["default"]; }); /* harmony import */ var _post_format__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./post-format */ "./node_modules/@wordpress/editor/build-module/components/post-format/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostFormat", function() { return _post_format__WEBPACK_IMPORTED_MODULE_45__["default"]; }); /* harmony import */ var _post_format_check__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./post-format/check */ "./node_modules/@wordpress/editor/build-module/components/post-format/check.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostFormatCheck", function() { return _post_format_check__WEBPACK_IMPORTED_MODULE_46__["default"]; }); /* harmony import */ var _post_last_revision__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./post-last-revision */ "./node_modules/@wordpress/editor/build-module/components/post-last-revision/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostLastRevision", function() { return _post_last_revision__WEBPACK_IMPORTED_MODULE_47__["default"]; }); /* harmony import */ var _post_last_revision_check__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./post-last-revision/check */ "./node_modules/@wordpress/editor/build-module/components/post-last-revision/check.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostLastRevisionCheck", function() { return _post_last_revision_check__WEBPACK_IMPORTED_MODULE_48__["default"]; }); /* harmony import */ var _post_locked_modal__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./post-locked-modal */ "./node_modules/@wordpress/editor/build-module/components/post-locked-modal/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostLockedModal", function() { return _post_locked_modal__WEBPACK_IMPORTED_MODULE_49__["default"]; }); /* harmony import */ var _post_pending_status__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./post-pending-status */ "./node_modules/@wordpress/editor/build-module/components/post-pending-status/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostPendingStatus", function() { return _post_pending_status__WEBPACK_IMPORTED_MODULE_50__["default"]; }); /* harmony import */ var _post_pending_status_check__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./post-pending-status/check */ "./node_modules/@wordpress/editor/build-module/components/post-pending-status/check.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostPendingStatusCheck", function() { return _post_pending_status_check__WEBPACK_IMPORTED_MODULE_51__["default"]; }); /* harmony import */ var _post_pingbacks__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./post-pingbacks */ "./node_modules/@wordpress/editor/build-module/components/post-pingbacks/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostPingbacks", function() { return _post_pingbacks__WEBPACK_IMPORTED_MODULE_52__["default"]; }); /* harmony import */ var _post_preview_button__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./post-preview-button */ "./node_modules/@wordpress/editor/build-module/components/post-preview-button/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostPreviewButton", function() { return _post_preview_button__WEBPACK_IMPORTED_MODULE_53__["default"]; }); /* harmony import */ var _post_publish_button__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./post-publish-button */ "./node_modules/@wordpress/editor/build-module/components/post-publish-button/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostPublishButton", function() { return _post_publish_button__WEBPACK_IMPORTED_MODULE_54__["default"]; }); /* harmony import */ var _post_publish_button_label__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./post-publish-button/label */ "./node_modules/@wordpress/editor/build-module/components/post-publish-button/label.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostPublishButtonLabel", function() { return _post_publish_button_label__WEBPACK_IMPORTED_MODULE_55__["default"]; }); /* harmony import */ var _post_publish_panel__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./post-publish-panel */ "./node_modules/@wordpress/editor/build-module/components/post-publish-panel/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostPublishPanel", function() { return _post_publish_panel__WEBPACK_IMPORTED_MODULE_56__["default"]; }); /* harmony import */ var _post_saved_state__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./post-saved-state */ "./node_modules/@wordpress/editor/build-module/components/post-saved-state/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostSavedState", function() { return _post_saved_state__WEBPACK_IMPORTED_MODULE_57__["default"]; }); /* harmony import */ var _post_schedule__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./post-schedule */ "./node_modules/@wordpress/editor/build-module/components/post-schedule/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostSchedule", function() { return _post_schedule__WEBPACK_IMPORTED_MODULE_58__["default"]; }); /* harmony import */ var _post_schedule_check__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./post-schedule/check */ "./node_modules/@wordpress/editor/build-module/components/post-schedule/check.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostScheduleCheck", function() { return _post_schedule_check__WEBPACK_IMPORTED_MODULE_59__["default"]; }); /* harmony import */ var _post_schedule_label__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./post-schedule/label */ "./node_modules/@wordpress/editor/build-module/components/post-schedule/label.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostScheduleLabel", function() { return _post_schedule_label__WEBPACK_IMPORTED_MODULE_60__["default"]; }); /* harmony import */ var _post_sticky__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./post-sticky */ "./node_modules/@wordpress/editor/build-module/components/post-sticky/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostSticky", function() { return _post_sticky__WEBPACK_IMPORTED_MODULE_61__["default"]; }); /* harmony import */ var _post_sticky_check__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./post-sticky/check */ "./node_modules/@wordpress/editor/build-module/components/post-sticky/check.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostStickyCheck", function() { return _post_sticky_check__WEBPACK_IMPORTED_MODULE_62__["default"]; }); /* harmony import */ var _post_switch_to_draft_button__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./post-switch-to-draft-button */ "./node_modules/@wordpress/editor/build-module/components/post-switch-to-draft-button/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostSwitchToDraftButton", function() { return _post_switch_to_draft_button__WEBPACK_IMPORTED_MODULE_63__["default"]; }); /* harmony import */ var _post_taxonomies__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./post-taxonomies */ "./node_modules/@wordpress/editor/build-module/components/post-taxonomies/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostTaxonomies", function() { return _post_taxonomies__WEBPACK_IMPORTED_MODULE_64__["default"]; }); /* harmony import */ var _post_taxonomies_check__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./post-taxonomies/check */ "./node_modules/@wordpress/editor/build-module/components/post-taxonomies/check.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostTaxonomiesCheck", function() { return _post_taxonomies_check__WEBPACK_IMPORTED_MODULE_65__["default"]; }); /* harmony import */ var _post_text_editor__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./post-text-editor */ "./node_modules/@wordpress/editor/build-module/components/post-text-editor/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostTextEditor", function() { return _post_text_editor__WEBPACK_IMPORTED_MODULE_66__["default"]; }); /* harmony import */ var _post_title__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./post-title */ "./node_modules/@wordpress/editor/build-module/components/post-title/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostTitle", function() { return _post_title__WEBPACK_IMPORTED_MODULE_67__["default"]; }); /* harmony import */ var _post_trash__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./post-trash */ "./node_modules/@wordpress/editor/build-module/components/post-trash/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostTrash", function() { return _post_trash__WEBPACK_IMPORTED_MODULE_68__["default"]; }); /* harmony import */ var _post_trash_check__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./post-trash/check */ "./node_modules/@wordpress/editor/build-module/components/post-trash/check.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostTrashCheck", function() { return _post_trash_check__WEBPACK_IMPORTED_MODULE_69__["default"]; }); /* harmony import */ var _post_type_support_check__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./post-type-support-check */ "./node_modules/@wordpress/editor/build-module/components/post-type-support-check/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostTypeSupportCheck", function() { return _post_type_support_check__WEBPACK_IMPORTED_MODULE_70__["default"]; }); /* harmony import */ var _post_visibility__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./post-visibility */ "./node_modules/@wordpress/editor/build-module/components/post-visibility/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostVisibility", function() { return _post_visibility__WEBPACK_IMPORTED_MODULE_71__["default"]; }); /* harmony import */ var _post_visibility_label__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./post-visibility/label */ "./node_modules/@wordpress/editor/build-module/components/post-visibility/label.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostVisibilityLabel", function() { return _post_visibility_label__WEBPACK_IMPORTED_MODULE_72__["default"]; }); /* harmony import */ var _post_visibility_check__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./post-visibility/check */ "./node_modules/@wordpress/editor/build-module/components/post-visibility/check.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PostVisibilityCheck", function() { return _post_visibility_check__WEBPACK_IMPORTED_MODULE_73__["default"]; }); /* harmony import */ var _table_of_contents__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./table-of-contents */ "./node_modules/@wordpress/editor/build-module/components/table-of-contents/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TableOfContents", function() { return _table_of_contents__WEBPACK_IMPORTED_MODULE_74__["default"]; }); /* harmony import */ var _unsaved_changes_warning__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./unsaved-changes-warning */ "./node_modules/@wordpress/editor/build-module/components/unsaved-changes-warning/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UnsavedChangesWarning", function() { return _unsaved_changes_warning__WEBPACK_IMPORTED_MODULE_75__["default"]; }); /* harmony import */ var _word_count__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./word-count */ "./node_modules/@wordpress/editor/build-module/components/word-count/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WordCount", function() { return _word_count__WEBPACK_IMPORTED_MODULE_76__["default"]; }); /* harmony import */ var _block_inspector__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./block-inspector */ "./node_modules/@wordpress/editor/build-module/components/block-inspector/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlockInspector", function() { return _block_inspector__WEBPACK_IMPORTED_MODULE_77__["default"]; }); /* harmony import */ var _block_list__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./block-list */ "./node_modules/@wordpress/editor/build-module/components/block-list/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlockList", function() { return _block_list__WEBPACK_IMPORTED_MODULE_78__["default"]; }); /* harmony import */ var _block_mover__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./block-mover */ "./node_modules/@wordpress/editor/build-module/components/block-mover/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlockMover", function() { return _block_mover__WEBPACK_IMPORTED_MODULE_79__["default"]; }); /* harmony import */ var _block_selection_clearer__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./block-selection-clearer */ "./node_modules/@wordpress/editor/build-module/components/block-selection-clearer/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlockSelectionClearer", function() { return _block_selection_clearer__WEBPACK_IMPORTED_MODULE_80__["default"]; }); /* harmony import */ var _block_settings_menu__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./block-settings-menu */ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlockSettingsMenu", function() { return _block_settings_menu__WEBPACK_IMPORTED_MODULE_81__["default"]; }); /* harmony import */ var _block_settings_menu_block_settings_menu_first_item__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./block-settings-menu/block-settings-menu-first-item */ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-settings-menu-first-item.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_BlockSettingsMenuFirstItem", function() { return _block_settings_menu_block_settings_menu_first_item__WEBPACK_IMPORTED_MODULE_82__["default"]; }); /* harmony import */ var _block_settings_menu_block_settings_menu_plugins_extension__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./block-settings-menu/block-settings-menu-plugins-extension */ "./node_modules/@wordpress/editor/build-module/components/block-settings-menu/block-settings-menu-plugins-extension.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_BlockSettingsMenuPluginsExtension", function() { return _block_settings_menu_block_settings_menu_plugins_extension__WEBPACK_IMPORTED_MODULE_83__["default"]; }); /* harmony import */ var _block_title__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./block-title */ "./node_modules/@wordpress/editor/build-module/components/block-title/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlockTitle", function() { return _block_title__WEBPACK_IMPORTED_MODULE_84__["default"]; }); /* harmony import */ var _block_toolbar__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ./block-toolbar */ "./node_modules/@wordpress/editor/build-module/components/block-toolbar/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BlockToolbar", function() { return _block_toolbar__WEBPACK_IMPORTED_MODULE_85__["default"]; }); /* harmony import */ var _copy_handler__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./copy-handler */ "./node_modules/@wordpress/editor/build-module/components/copy-handler/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CopyHandler", function() { return _copy_handler__WEBPACK_IMPORTED_MODULE_86__["default"]; }); /* harmony import */ var _default_block_appender__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./default-block-appender */ "./node_modules/@wordpress/editor/build-module/components/default-block-appender/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DefaultBlockAppender", function() { return _default_block_appender__WEBPACK_IMPORTED_MODULE_87__["default"]; }); /* harmony import */ var _error_boundary__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./error-boundary */ "./node_modules/@wordpress/editor/build-module/components/error-boundary/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ErrorBoundary", function() { return _error_boundary__WEBPACK_IMPORTED_MODULE_88__["default"]; }); /* harmony import */ var _inserter__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./inserter */ "./node_modules/@wordpress/editor/build-module/components/inserter/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Inserter", function() { return _inserter__WEBPACK_IMPORTED_MODULE_89__["default"]; }); /* harmony import */ var _block_switcher_multi_blocks_switcher__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ./block-switcher/multi-blocks-switcher */ "./node_modules/@wordpress/editor/build-module/components/block-switcher/multi-blocks-switcher.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiBlocksSwitcher", function() { return _block_switcher_multi_blocks_switcher__WEBPACK_IMPORTED_MODULE_90__["default"]; }); /* harmony import */ var _multi_select_scroll_into_view__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ./multi-select-scroll-into-view */ "./node_modules/@wordpress/editor/build-module/components/multi-select-scroll-into-view/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiSelectScrollIntoView", function() { return _multi_select_scroll_into_view__WEBPACK_IMPORTED_MODULE_91__["default"]; }); /* harmony import */ var _navigable_toolbar__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ./navigable-toolbar */ "./node_modules/@wordpress/editor/build-module/components/navigable-toolbar/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NavigableToolbar", function() { return _navigable_toolbar__WEBPACK_IMPORTED_MODULE_92__["default"]; }); /* harmony import */ var _observe_typing__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ./observe-typing */ "./node_modules/@wordpress/editor/build-module/components/observe-typing/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObserveTyping", function() { return _observe_typing__WEBPACK_IMPORTED_MODULE_93__["default"]; }); /* harmony import */ var _preserve_scroll_in_reorder__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ./preserve-scroll-in-reorder */ "./node_modules/@wordpress/editor/build-module/components/preserve-scroll-in-reorder/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PreserveScrollInReorder", function() { return _preserve_scroll_in_reorder__WEBPACK_IMPORTED_MODULE_94__["default"]; }); /* harmony import */ var _skip_to_selected_block__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ./skip-to-selected-block */ "./node_modules/@wordpress/editor/build-module/components/skip-to-selected-block/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SkipToSelectedBlock", function() { return _skip_to_selected_block__WEBPACK_IMPORTED_MODULE_95__["default"]; }); /* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ./warning */ "./node_modules/@wordpress/editor/build-module/components/warning/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Warning", function() { return _warning__WEBPACK_IMPORTED_MODULE_96__["default"]; }); /* harmony import */ var _writing_flow__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ./writing-flow */ "./node_modules/@wordpress/editor/build-module/components/writing-flow/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WritingFlow", function() { return _writing_flow__WEBPACK_IMPORTED_MODULE_97__["default"]; }); /* harmony import */ var _provider__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ./provider */ "./node_modules/@wordpress/editor/build-module/components/provider/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EditorProvider", function() { return _provider__WEBPACK_IMPORTED_MODULE_98__["default"]; }); // Block Creation Components // Post Related Components // Content Related Components // State Related Components /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/inner-blocks/index.js": /*!**************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/inner-blocks/index.js ***! \**************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/viewport */ "@wordpress/viewport"); /* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/is-shallow-equal */ "@wordpress/is-shallow-equal"); /* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _block_list__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../block-list */ "./node_modules/@wordpress/editor/build-module/components/block-list/index.js"); /* harmony import */ var _block_edit_context__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../block-edit/context */ "./node_modules/@wordpress/editor/build-module/components/block-edit/context.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var InnerBlocks = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(InnerBlocks, _Component); function InnerBlocks() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, InnerBlocks); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(InnerBlocks).apply(this, arguments)); _this.state = { templateInProcess: !!_this.props.template }; _this.updateNestedSettings(); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(InnerBlocks, [{ key: "getTemplateLock", value: function getTemplateLock() { var _this$props = this.props, templateLock = _this$props.templateLock, parentLock = _this$props.parentLock; return templateLock === undefined ? parentLock : templateLock; } }, { key: "componentDidMount", value: function componentDidMount() { var innerBlocks = this.props.block.innerBlocks; // only synchronize innerBlocks with template if innerBlocks are empty or a locking all exists if (innerBlocks.length === 0 || this.getTemplateLock() === 'all') { this.synchronizeBlocksWithTemplate(); } if (this.state.templateInProcess) { this.setState({ templateInProcess: false }); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var _this$props2 = this.props, template = _this$props2.template, block = _this$props2.block; var innerBlocks = block.innerBlocks; this.updateNestedSettings(); // only synchronize innerBlocks with template if innerBlocks are empty or a locking all exists if (innerBlocks.length === 0 || this.getTemplateLock() === 'all') { var hasTemplateChanged = !Object(lodash__WEBPACK_IMPORTED_MODULE_6__["isEqual"])(template, prevProps.template); if (hasTemplateChanged) { this.synchronizeBlocksWithTemplate(); } } } /** * Called on mount or when a mismatch exists between the templates and * inner blocks, synchronizes inner blocks with the template, replacing * current blocks. */ }, { key: "synchronizeBlocksWithTemplate", value: function synchronizeBlocksWithTemplate() { var _this$props3 = this.props, template = _this$props3.template, block = _this$props3.block, replaceInnerBlocks = _this$props3.replaceInnerBlocks; var innerBlocks = block.innerBlocks; // Synchronize with templates. If the next set differs, replace. var nextBlocks = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__["synchronizeBlocksWithTemplate"])(innerBlocks, template); if (!Object(lodash__WEBPACK_IMPORTED_MODULE_6__["isEqual"])(nextBlocks, innerBlocks)) { replaceInnerBlocks(nextBlocks); } } }, { key: "updateNestedSettings", value: function updateNestedSettings() { var _this$props4 = this.props, blockListSettings = _this$props4.blockListSettings, allowedBlocks = _this$props4.allowedBlocks, updateNestedSettings = _this$props4.updateNestedSettings; var newSettings = { allowedBlocks: allowedBlocks, templateLock: this.getTemplateLock() }; if (!_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_11___default()(blockListSettings, newSettings)) { updateNestedSettings(newSettings); } } }, { key: "render", value: function render() { var _this$props5 = this.props, clientId = _this$props5.clientId, isSmallScreen = _this$props5.isSmallScreen, isSelectedBlockInRoot = _this$props5.isSelectedBlockInRoot; var templateInProcess = this.state.templateInProcess; var classes = classnames__WEBPACK_IMPORTED_MODULE_7___default()('editor-inner-blocks', { 'has-overlay': isSmallScreen && !isSelectedBlockInRoot }); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("div", { className: classes }, !templateInProcess && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_block_list__WEBPACK_IMPORTED_MODULE_13__["default"], { rootClientId: clientId })); } }]); return InnerBlocks; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Component"]); InnerBlocks = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_12__["compose"])([Object(_block_edit_context__WEBPACK_IMPORTED_MODULE_14__["withBlockEditContext"])(function (context) { return Object(lodash__WEBPACK_IMPORTED_MODULE_6__["pick"])(context, ['clientId']); }), Object(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_8__["withViewportMatch"])({ isSmallScreen: '< medium' }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withSelect"])(function (select, ownProps) { var _select = select('core/editor'), isBlockSelected = _select.isBlockSelected, hasSelectedInnerBlock = _select.hasSelectedInnerBlock, getBlock = _select.getBlock, getBlockListSettings = _select.getBlockListSettings, getBlockRootClientId = _select.getBlockRootClientId, getTemplateLock = _select.getTemplateLock; var clientId = ownProps.clientId; var rootClientId = getBlockRootClientId(clientId); return { isSelectedBlockInRoot: isBlockSelected(clientId) || hasSelectedInnerBlock(clientId), block: getBlock(clientId), blockListSettings: getBlockListSettings(clientId), parentLock: getTemplateLock(rootClientId) }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withDispatch"])(function (dispatch, ownProps) { var _dispatch = dispatch('core/editor'), replaceBlocks = _dispatch.replaceBlocks, insertBlocks = _dispatch.insertBlocks, updateBlockListSettings = _dispatch.updateBlockListSettings; var block = ownProps.block, clientId = ownProps.clientId, _ownProps$templateIns = ownProps.templateInsertUpdatesSelection, templateInsertUpdatesSelection = _ownProps$templateIns === void 0 ? true : _ownProps$templateIns; return { replaceInnerBlocks: function replaceInnerBlocks(blocks) { var clientIds = Object(lodash__WEBPACK_IMPORTED_MODULE_6__["map"])(block.innerBlocks, 'clientId'); if (clientIds.length) { replaceBlocks(clientIds, blocks); } else { insertBlocks(blocks, undefined, clientId, templateInsertUpdatesSelection); } }, updateNestedSettings: function updateNestedSettings(settings) { dispatch(updateBlockListSettings(clientId, settings)); } }; })])(InnerBlocks); InnerBlocks.Content = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_10__["withBlockContentContext"])(function (_ref) { var BlockContent = _ref.BlockContent; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(BlockContent, null); }); /* harmony default export */ __webpack_exports__["default"] = (InnerBlocks); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/inserter-list-item/index.js": /*!********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/inserter-list-item/index.js ***! \********************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _block_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../block-icon */ "./node_modules/@wordpress/editor/build-module/components/block-icon/index.js"); /** * External dependencies */ /** * Internal dependencies */ function InserterListItem(_ref) { var icon = _ref.icon, hasChildBlocksWithInserterSupport = _ref.hasChildBlocksWithInserterSupport, _onClick = _ref.onClick, isDisabled = _ref.isDisabled, title = _ref.title, className = _ref.className, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, ["icon", "hasChildBlocksWithInserterSupport", "onClick", "isDisabled", "title", "className"]); var itemIconStyle = icon ? { backgroundColor: icon.background, color: icon.foreground } : {}; var itemIconStackStyle = icon && icon.shadowColor ? { backgroundColor: icon.shadowColor } : {}; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("li", { className: "editor-block-types-list__list-item" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("button", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('editor-block-types-list__item', className, { 'editor-block-types-list__item-has-children': hasChildBlocksWithInserterSupport }), onClick: function onClick(event) { event.preventDefault(); _onClick(); }, disabled: isDisabled, "aria-label": title // Fix for IE11 and JAWS 2018. }, props), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("span", { className: "editor-block-types-list__item-icon", style: itemIconStyle }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_block_icon__WEBPACK_IMPORTED_MODULE_4__["default"], { icon: icon, showColors: true }), hasChildBlocksWithInserterSupport && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("span", { className: "editor-block-types-list__item-icon-stack", style: itemIconStackStyle })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("span", { className: "editor-block-types-list__item-title" }, title))); } /* harmony default export */ __webpack_exports__["default"] = (InserterListItem); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/inserter-with-shortcuts/index.js": /*!*************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/inserter-with-shortcuts/index.js ***! \*************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _block_icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../block-icon */ "./node_modules/@wordpress/editor/build-module/components/block-icon/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function InserterWithShortcuts(_ref) { var items = _ref.items, isLocked = _ref.isLocked, onInsert = _ref.onInsert; if (isLocked) { return null; } var itemsWithoutDefaultBlock = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["filter"])(items, function (item) { return !item.isDisabled && (item.name !== Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__["getDefaultBlockName"])() || !Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(item.initialAttributes)); }).slice(0, 3); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-inserter-with-shortcuts" }, itemsWithoutDefaultBlock.map(function (item) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["IconButton"], { key: item.id, className: "editor-inserter-with-shortcuts__block", onClick: function onClick() { return onInsert(item); } // translators: %s: block title/name to be added , label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__["__"])('Add %s'), item.title), icon: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_icon__WEBPACK_IMPORTED_MODULE_7__["default"], { icon: item.icon }) }); })); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withSelect"])(function (select, _ref2) { var rootClientId = _ref2.rootClientId; var _select = select('core/editor'), getInserterItems = _select.getInserterItems, getTemplateLock = _select.getTemplateLock; return { items: getInserterItems(rootClientId), isLocked: !!getTemplateLock(rootClientId) }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withDispatch"])(function (dispatch, ownProps) { var clientId = ownProps.clientId, rootClientId = ownProps.rootClientId; return { onInsert: function onInsert(_ref3) { var name = _ref3.name, initialAttributes = _ref3.initialAttributes; var block = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__["createBlock"])(name, initialAttributes); if (clientId) { dispatch('core/editor').replaceBlocks(clientId, block); } else { dispatch('core/editor').insertBlock(block, undefined, rootClientId); } } }; }))(InserterWithShortcuts)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/inserter/child-blocks.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/inserter/child-blocks.js ***! \*****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _block_types_list__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../block-types-list */ "./node_modules/@wordpress/editor/build-module/components/block-types-list/index.js"); /* harmony import */ var _block_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../block-icon */ "./node_modules/@wordpress/editor/build-module/components/block-icon/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ function ChildBlocks(_ref) { var rootBlockIcon = _ref.rootBlockIcon, rootBlockTitle = _ref.rootBlockTitle, items = _ref.items, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, ["rootBlockIcon", "rootBlockTitle", "items"]); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("div", { className: "editor-inserter__child-blocks" }, (rootBlockIcon || rootBlockTitle) && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("div", { className: "editor-inserter__parent-block-header" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_block_icon__WEBPACK_IMPORTED_MODULE_6__["default"], { icon: rootBlockIcon, showColors: true }), rootBlockTitle && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("h2", null, rootBlockTitle)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_block_types_list__WEBPACK_IMPORTED_MODULE_5__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ items: items }, props))); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__["compose"])(Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__["ifCondition"])(function (_ref2) { var items = _ref2.items; return items && items.length > 0; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withSelect"])(function (select, _ref3) { var rootClientId = _ref3.rootClientId; var _select = select('core/blocks'), getBlockType = _select.getBlockType; var _select2 = select('core/editor'), getBlockName = _select2.getBlockName; var rootBlockName = getBlockName(rootClientId); var rootBlockType = getBlockType(rootBlockName); return { rootBlockTitle: rootBlockType && rootBlockType.title, rootBlockIcon: rootBlockType && rootBlockType.icon }; }))(ChildBlocks)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/inserter/index.js": /*!**********************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/inserter/index.js ***! \**********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./menu */ "./node_modules/@wordpress/editor/build-module/components/inserter/menu.js"); /** * WordPress dependencies */ /** * Internal dependencies */ var defaultRenderToggle = function defaultRenderToggle(_ref) { var onToggle = _ref.onToggle, disabled = _ref.disabled, isOpen = _ref.isOpen; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["IconButton"], { icon: "insert", label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Add block'), onClick: onToggle, className: "editor-inserter__toggle", "aria-haspopup": "true", "aria-expanded": isOpen, disabled: disabled }); }; var Inserter = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(Inserter, _Component); function Inserter() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, Inserter); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(Inserter).apply(this, arguments)); _this.onToggle = _this.onToggle.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.renderToggle = _this.renderToggle.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.renderContent = _this.renderContent.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Inserter, [{ key: "onToggle", value: function onToggle(isOpen) { var onToggle = this.props.onToggle; // Surface toggle callback to parent component if (onToggle) { onToggle(isOpen); } } /** * Render callback to display Dropdown toggle element. * * @param {Function} options.onToggle Callback to invoke when toggle is * pressed. * @param {boolean} options.isOpen Whether dropdown is currently open. * * @return {WPElement} Dropdown toggle element. */ }, { key: "renderToggle", value: function renderToggle(_ref2) { var onToggle = _ref2.onToggle, isOpen = _ref2.isOpen; var _this$props = this.props, disabled = _this$props.disabled, _this$props$renderTog = _this$props.renderToggle, renderToggle = _this$props$renderTog === void 0 ? defaultRenderToggle : _this$props$renderTog; return renderToggle({ onToggle: onToggle, isOpen: isOpen, disabled: disabled }); } /** * Render callback to display Dropdown content element. * * @param {Function} options.onClose Callback to invoke when dropdown is * closed. * * @return {WPElement} Dropdown content element. */ }, { key: "renderContent", value: function renderContent(_ref3) { var onClose = _ref3.onClose; var _this$props2 = this.props, rootClientId = _this$props2.rootClientId, index = _this$props2.index; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_menu__WEBPACK_IMPORTED_MODULE_11__["default"], { onSelect: onClose, rootClientId: rootClientId, index: index }); } }, { key: "render", value: function render() { var _this$props3 = this.props, position = _this$props3.position, title = _this$props3.title; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["Dropdown"], { className: "editor-inserter", contentClassName: "editor-inserter__popover", position: position, onToggle: this.onToggle, expandOnMobile: true, headerTitle: title, renderToggle: this.renderToggle, renderContent: this.renderContent }); } }]); return Inserter; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withSelect"])(function (select, _ref4) { var rootClientId = _ref4.rootClientId, index = _ref4.index; var _select = select('core/editor'), getEditedPostAttribute = _select.getEditedPostAttribute, getBlockInsertionPoint = _select.getBlockInsertionPoint, hasInserterItems = _select.hasInserterItems; if (rootClientId === undefined && index === undefined) { // Unless explicitly provided, the default insertion point provided // by the store occurs immediately following the selected block. // Otherwise, the default behavior for an undefined index is to // append block to the end of the rootClientId context. var insertionPoint = getBlockInsertionPoint(); rootClientId = insertionPoint.rootClientId; index = insertionPoint.index; } return { title: getEditedPostAttribute('title'), hasItems: hasInserterItems(rootClientId), rootClientId: rootClientId, index: index }; }), Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__["ifCondition"])(function (_ref5) { var hasItems = _ref5.hasItems; return hasItems; })])(Inserter)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/inserter/inline-elements.js": /*!********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/inserter/inline-elements.js ***! \********************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _block_types_list__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../block-types-list */ "./node_modules/@wordpress/editor/build-module/components/block-types-list/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var InserterInlineElements = function InserterInlineElements(_ref) { var filterValue = _ref.filterValue; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["Slot"], { name: "Inserter.InlineElements", fillProps: { filterValue: filterValue } }, function (fills) { return !Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(fills) && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["PanelBody"], { title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Inline Elements'), initialOpen: false, className: "editor-inserter__inline-elements" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_types_list__WEBPACK_IMPORTED_MODULE_4__["default"], null, fills)); }); }; /* harmony default export */ __webpack_exports__["default"] = (InserterInlineElements); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/inserter/menu.js": /*!*********************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/inserter/menu.js ***! \*********************************************************************************/ /*! exports provided: searchItems, normalizeTerm, InserterMenu, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "searchItems", function() { return searchItems; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeTerm", function() { return normalizeTerm; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InserterMenu", function() { return InserterMenu; }); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var dom_scroll_into_view__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! dom-scroll-into-view */ "./node_modules/dom-scroll-into-view/lib/index.js"); /* harmony import */ var dom_scroll_into_view__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(dom_scroll_into_view__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var _block_preview__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../block-preview */ "./node_modules/@wordpress/editor/build-module/components/block-preview/index.js"); /* harmony import */ var _block_types_list__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../block-types-list */ "./node_modules/@wordpress/editor/build-module/components/block-types-list/index.js"); /* harmony import */ var _child_blocks__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./child-blocks */ "./node_modules/@wordpress/editor/build-module/components/inserter/child-blocks.js"); /* harmony import */ var _inline_elements__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./inline-elements */ "./node_modules/@wordpress/editor/build-module/components/inserter/inline-elements.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var MAX_SUGGESTED_ITEMS = 9; var stopKeyPropagation = function stopKeyPropagation(event) { return event.stopPropagation(); }; /** * Filters an item list given a search term. * * @param {Array} items Item list * @param {string} searchTerm Search term. * * @return {Array} Filtered item list. */ var searchItems = function searchItems(items, searchTerm) { var normalizedSearchTerm = normalizeTerm(searchTerm); var matchSearch = function matchSearch(string) { return normalizeTerm(string).indexOf(normalizedSearchTerm) !== -1; }; var categories = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_12__["getCategories"])(); return items.filter(function (item) { var itemCategory = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["find"])(categories, { slug: item.category }); return matchSearch(item.title) || Object(lodash__WEBPACK_IMPORTED_MODULE_8__["some"])(item.keywords, matchSearch) || itemCategory && matchSearch(itemCategory.title); }); }; /** * Converts the search term into a normalized term. * * @param {string} term The search term to normalize. * * @return {string} The normalized search term. */ var normalizeTerm = function normalizeTerm(term) { // Disregard diacritics. // Input: "média" term = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["deburr"])(term); // Accommodate leading slash, matching autocomplete expectations. // Input: "/media" term = term.replace(/^\//, ''); // Lowercase. // Input: "MEDIA" term = term.toLowerCase(); // Strip leading and trailing whitespace. // Input: " media " term = term.trim(); return term; }; var InserterMenu = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__["default"])(InserterMenu, _Component); function InserterMenu() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, InserterMenu); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(InserterMenu).apply(this, arguments)); _this.state = { childItems: [], filterValue: '', hoveredItem: null, suggestedItems: [], reusableItems: [], itemsPerCategory: {}, openPanels: ['suggested'] }; _this.onChangeSearchInput = _this.onChangeSearchInput.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); _this.onHover = _this.onHover.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); _this.panels = {}; _this.inserterResults = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createRef"])(); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(InserterMenu, [{ key: "componentDidMount", value: function componentDidMount() { // This could be replaced by a resolver. this.props.fetchReusableBlocks(); this.filter(); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (prevProps.items !== this.props.items) { this.filter(this.state.filterValue); } } }, { key: "onChangeSearchInput", value: function onChangeSearchInput(event) { this.filter(event.target.value); } }, { key: "onHover", value: function onHover(item) { this.setState({ hoveredItem: item }); var _this$props = this.props, showInsertionPoint = _this$props.showInsertionPoint, hideInsertionPoint = _this$props.hideInsertionPoint; if (item) { var _this$props2 = this.props, rootClientId = _this$props2.rootClientId, index = _this$props2.index; showInsertionPoint(rootClientId, index); } else { hideInsertionPoint(); } } }, { key: "bindPanel", value: function bindPanel(name) { var _this2 = this; return function (ref) { _this2.panels[name] = ref; }; } }, { key: "onTogglePanel", value: function onTogglePanel(panel) { var _this3 = this; return function () { var isOpened = _this3.state.openPanels.indexOf(panel) !== -1; if (isOpened) { _this3.setState({ openPanels: Object(lodash__WEBPACK_IMPORTED_MODULE_8__["without"])(_this3.state.openPanels, panel) }); } else { _this3.setState({ openPanels: Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_this3.state.openPanels).concat([panel]) }); _this3.props.setTimeout(function () { // We need a generic way to access the panel's container // eslint-disable-next-line react/no-find-dom-node dom_scroll_into_view__WEBPACK_IMPORTED_MODULE_9___default()(_this3.panels[panel], _this3.inserterResults.current, { alignWithTop: true }); }); } }; } }, { key: "filter", value: function filter() { var filterValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; var _this$props3 = this.props, debouncedSpeak = _this$props3.debouncedSpeak, items = _this$props3.items, rootChildBlocks = _this$props3.rootChildBlocks; var filteredItems = searchItems(items, filterValue); var childItems = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["filter"])(filteredItems, function (_ref) { var name = _ref.name; return Object(lodash__WEBPACK_IMPORTED_MODULE_8__["includes"])(rootChildBlocks, name); }); var suggestedItems = []; if (!filterValue) { var maxSuggestedItems = this.props.maxSuggestedItems || MAX_SUGGESTED_ITEMS; suggestedItems = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["filter"])(items, function (item) { return item.utility > 0; }).slice(0, maxSuggestedItems); } var reusableItems = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["filter"])(filteredItems, { category: 'reusable' }); var getCategoryIndex = function getCategoryIndex(item) { return Object(lodash__WEBPACK_IMPORTED_MODULE_8__["findIndex"])(Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_12__["getCategories"])(), function (category) { return category.slug === item.category; }); }; var itemsPerCategory = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["flow"])(function (itemList) { return Object(lodash__WEBPACK_IMPORTED_MODULE_8__["filter"])(itemList, function (item) { return item.category !== 'reusable'; }); }, function (itemList) { return Object(lodash__WEBPACK_IMPORTED_MODULE_8__["sortBy"])(itemList, getCategoryIndex); }, function (itemList) { return Object(lodash__WEBPACK_IMPORTED_MODULE_8__["groupBy"])(itemList, 'category'); })(filteredItems); var openPanels = this.state.openPanels; if (filterValue !== this.state.filterValue) { if (!filterValue) { openPanels = ['suggested']; } else if (reusableItems.length) { openPanels = ['reusable']; } else if (filteredItems.length) { var firstCategory = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["find"])(Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_12__["getCategories"])(), function (_ref2) { var slug = _ref2.slug; return itemsPerCategory[slug] && itemsPerCategory[slug].length; }); openPanels = [firstCategory.slug]; } } this.setState({ hoveredItem: null, childItems: childItems, filterValue: filterValue, suggestedItems: suggestedItems, reusableItems: reusableItems, itemsPerCategory: itemsPerCategory, openPanels: openPanels }); var resultCount = Object.keys(itemsPerCategory).reduce(function (accumulator, currentCategorySlug) { return accumulator + itemsPerCategory[currentCategorySlug].length; }, 0); var resultsFoundMessage = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["_n"])('%d result found.', '%d results found.', resultCount), resultCount); debouncedSpeak(resultsFoundMessage, 'assertive'); } }, { key: "onKeyDown", value: function onKeyDown(event) { if (Object(lodash__WEBPACK_IMPORTED_MODULE_8__["includes"])([_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_15__["LEFT"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_15__["DOWN"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_15__["RIGHT"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_15__["UP"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_15__["BACKSPACE"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_15__["ENTER"]], event.keyCode)) { // Stop the key event from propagating up to ObserveTyping.startTypingInTextField. event.stopPropagation(); } } }, { key: "render", value: function render() { var _this4 = this; var _this$props4 = this.props, instanceId = _this$props4.instanceId, onSelect = _this$props4.onSelect, rootClientId = _this$props4.rootClientId; var _this$state = this.state, childItems = _this$state.childItems, filterValue = _this$state.filterValue, hoveredItem = _this$state.hoveredItem, suggestedItems = _this$state.suggestedItems, reusableItems = _this$state.reusableItems, itemsPerCategory = _this$state.itemsPerCategory, openPanels = _this$state.openPanels; var isPanelOpen = function isPanelOpen(panel) { return openPanels.indexOf(panel) !== -1; }; var isSearching = !!filterValue; // Disable reason (no-autofocus): The inserter menu is a modal display, not one which // is always visible, and one which already incurs this behavior of autoFocus via // Popover's focusOnMount. // Disable reason (no-static-element-interactions): Navigational key-presses within // the menu are prevented from triggering WritingFlow and ObserveTyping interactions. /* eslint-disable jsx-a11y/no-autofocus, jsx-a11y/no-static-element-interactions */ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("div", { className: "editor-inserter__menu", onKeyPress: stopKeyPropagation, onKeyDown: this.onKeyDown }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("label", { htmlFor: "editor-inserter__search-".concat(instanceId), className: "screen-reader-text" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Search for a block')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("input", { id: "editor-inserter__search-".concat(instanceId), type: "search", placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Search for a block'), className: "editor-inserter__search", autoFocus: true, onChange: this.onChangeSearchInput }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("div", { className: "editor-inserter__results", ref: this.inserterResults, tabIndex: "0", role: "region", "aria-label": Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Available block types') }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_child_blocks__WEBPACK_IMPORTED_MODULE_18__["default"], { rootClientId: rootClientId, items: childItems, onSelect: onSelect, onHover: this.onHover }), !!suggestedItems.length && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__["PanelBody"], { title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["_x"])('Most Used', 'blocks'), opened: isPanelOpen('suggested'), onToggle: this.onTogglePanel('suggested'), ref: this.bindPanel('suggested') }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_block_types_list__WEBPACK_IMPORTED_MODULE_17__["default"], { items: suggestedItems, onSelect: onSelect, onHover: this.onHover })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_inline_elements__WEBPACK_IMPORTED_MODULE_19__["default"], { filterValue: filterValue }), Object(lodash__WEBPACK_IMPORTED_MODULE_8__["map"])(Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_12__["getCategories"])(), function (category) { var categoryItems = itemsPerCategory[category.slug]; if (!categoryItems || !categoryItems.length) { return null; } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__["PanelBody"], { key: category.slug, title: category.title, icon: category.icon, opened: isSearching || isPanelOpen(category.slug), onToggle: _this4.onTogglePanel(category.slug), ref: _this4.bindPanel(category.slug) }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_block_types_list__WEBPACK_IMPORTED_MODULE_17__["default"], { items: categoryItems, onSelect: onSelect, onHover: _this4.onHover })); }), !!reusableItems.length && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__["PanelBody"], { className: "editor-inserter__reusable-blocks-panel", title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Reusable'), opened: isPanelOpen('reusable'), onToggle: this.onTogglePanel('reusable'), icon: "controls-repeat", ref: this.bindPanel('reusable') }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_block_types_list__WEBPACK_IMPORTED_MODULE_17__["default"], { items: reusableItems, onSelect: onSelect, onHover: this.onHover }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("a", { className: "editor-inserter__manage-reusable-blocks", href: "edit.php?post_type=wp_block" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Manage All Reusable Blocks'))), Object(lodash__WEBPACK_IMPORTED_MODULE_8__["isEmpty"])(suggestedItems) && Object(lodash__WEBPACK_IMPORTED_MODULE_8__["isEmpty"])(reusableItems) && Object(lodash__WEBPACK_IMPORTED_MODULE_8__["isEmpty"])(itemsPerCategory) && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("p", { className: "editor-inserter__no-results" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('No blocks found.'))), hoveredItem && Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_12__["isReusableBlock"])(hoveredItem) && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_block_preview__WEBPACK_IMPORTED_MODULE_16__["default"], { name: hoveredItem.name, attributes: hoveredItem.initialAttributes })); /* eslint-enable jsx-a11y/no-autofocus, jsx-a11y/no-noninteractive-element-interactions */ } }]); return InserterMenu; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_14__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_13__["withSelect"])(function (select, _ref3) { var rootClientId = _ref3.rootClientId; var _select = select('core/editor'), getEditedPostAttribute = _select.getEditedPostAttribute, getSelectedBlock = _select.getSelectedBlock, getInserterItems = _select.getInserterItems, getBlockName = _select.getBlockName; var _select2 = select('core/blocks'), getChildBlockNames = _select2.getChildBlockNames; var rootBlockName = getBlockName(rootClientId); return { selectedBlock: getSelectedBlock(), rootChildBlocks: getChildBlockNames(rootBlockName), title: getEditedPostAttribute('title'), items: getInserterItems(rootClientId), rootClientId: rootClientId }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_13__["withDispatch"])(function (dispatch, ownProps) { var _dispatch = dispatch('core/editor'), fetchReusableBlocks = _dispatch.__experimentalFetchReusableBlocks, showInsertionPoint = _dispatch.showInsertionPoint, hideInsertionPoint = _dispatch.hideInsertionPoint; return { fetchReusableBlocks: fetchReusableBlocks, showInsertionPoint: showInsertionPoint, hideInsertionPoint: hideInsertionPoint, onSelect: function onSelect(item) { var _dispatch2 = dispatch('core/editor'), replaceBlocks = _dispatch2.replaceBlocks, insertBlock = _dispatch2.insertBlock; var selectedBlock = ownProps.selectedBlock, index = ownProps.index, rootClientId = ownProps.rootClientId; var name = item.name, initialAttributes = item.initialAttributes; var insertedBlock = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_12__["createBlock"])(name, initialAttributes); if (selectedBlock && Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_12__["isUnmodifiedDefaultBlock"])(selectedBlock)) { replaceBlocks(selectedBlock.clientId, insertedBlock); } else { insertBlock(insertedBlock, index, rootClientId); } ownProps.onSelect(); } }; }), _wordpress_components__WEBPACK_IMPORTED_MODULE_11__["withSpokenMessages"], _wordpress_compose__WEBPACK_IMPORTED_MODULE_14__["withInstanceId"], _wordpress_compose__WEBPACK_IMPORTED_MODULE_14__["withSafeTimeout"])(InserterMenu)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/inspector-advanced-controls/index.js": /*!*****************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/inspector-advanced-controls/index.js ***! \*****************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _block_edit_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../block-edit/context */ "./node_modules/@wordpress/editor/build-module/components/block-edit/context.js"); /** * WordPress dependencies */ /** * Internal dependencies */ var _createSlotFill = Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__["createSlotFill"])('InspectorAdvancedControls'), Fill = _createSlotFill.Fill, Slot = _createSlotFill.Slot; var InspectorAdvancedControls = Object(_block_edit_context__WEBPACK_IMPORTED_MODULE_1__["ifBlockEditSelected"])(Fill); InspectorAdvancedControls.Slot = Slot; /* harmony default export */ __webpack_exports__["default"] = (InspectorAdvancedControls); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/inspector-controls/index.js": /*!********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/inspector-controls/index.js ***! \********************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _block_edit_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../block-edit/context */ "./node_modules/@wordpress/editor/build-module/components/block-edit/context.js"); /** * WordPress dependencies */ /** * Internal dependencies */ var _createSlotFill = Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__["createSlotFill"])('InspectorControls'), Fill = _createSlotFill.Fill, Slot = _createSlotFill.Slot; var InspectorControls = Object(_block_edit_context__WEBPACK_IMPORTED_MODULE_1__["ifBlockEditSelected"])(Fill); InspectorControls.Slot = Slot; /* harmony default export */ __webpack_exports__["default"] = (InspectorControls); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/media-placeholder/index.js": /*!*******************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/media-placeholder/index.js ***! \*******************************************************************************************/ /*! exports provided: MediaPlaceholder, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MediaPlaceholder", function() { return MediaPlaceholder; }); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _media_upload__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../media-upload */ "./node_modules/@wordpress/editor/build-module/components/media-upload/index.js"); /* harmony import */ var _media_upload_check__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../media-upload/check */ "./node_modules/@wordpress/editor/build-module/components/media-upload/check.js"); /* harmony import */ var _url_popover__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../url-popover */ "./node_modules/@wordpress/editor/build-module/components/url-popover/index.js"); /* harmony import */ var _utils___WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../utils/ */ "./node_modules/@wordpress/editor/build-module/utils/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var InsertFromURLPopover = function InsertFromURLPopover(_ref) { var src = _ref.src, onChange = _ref.onChange, onSubmit = _ref.onSubmit, onClose = _ref.onClose; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_url_popover__WEBPACK_IMPORTED_MODULE_16__["default"], { onClose: onClose }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("form", { className: "editor-media-placeholder__url-input-form", onSubmit: onSubmit }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("input", { className: "editor-media-placeholder__url-input-field", type: "url", "aria-label": Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('URL'), placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Paste or type URL'), onChange: onChange, value: src }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["IconButton"], { className: "editor-media-placeholder__url-input-submit-button", icon: "editor-break", label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Apply'), type: "submit" }))); }; var MediaPlaceholder = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__["default"])(MediaPlaceholder, _Component); function MediaPlaceholder() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, MediaPlaceholder); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(MediaPlaceholder).apply(this, arguments)); _this.state = { src: '', isURLInputVisible: false }; _this.onChangeSrc = _this.onChangeSrc.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); _this.onSubmitSrc = _this.onSubmitSrc.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); _this.onUpload = _this.onUpload.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); _this.onFilesUpload = _this.onFilesUpload.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); _this.openURLInput = _this.openURLInput.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); _this.closeURLInput = _this.closeURLInput.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(MediaPlaceholder, [{ key: "onlyAllowsImages", value: function onlyAllowsImages() { var allowedTypes = this.props.allowedTypes; if (!allowedTypes) { return false; } return Object(lodash__WEBPACK_IMPORTED_MODULE_8__["every"])(allowedTypes, function (allowedType) { return allowedType === 'image' || Object(lodash__WEBPACK_IMPORTED_MODULE_8__["startsWith"])(allowedType, 'image/'); }); } }, { key: "componentDidMount", value: function componentDidMount() { this.setState({ src: Object(lodash__WEBPACK_IMPORTED_MODULE_8__["get"])(this.props.value, ['src'], '') }); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (Object(lodash__WEBPACK_IMPORTED_MODULE_8__["get"])(prevProps.value, ['src'], '') !== Object(lodash__WEBPACK_IMPORTED_MODULE_8__["get"])(this.props.value, ['src'], '')) { this.setState({ src: Object(lodash__WEBPACK_IMPORTED_MODULE_8__["get"])(this.props.value, ['src'], '') }); } } }, { key: "onChangeSrc", value: function onChangeSrc(event) { this.setState({ src: event.target.value }); } }, { key: "onSubmitSrc", value: function onSubmitSrc(event) { event.preventDefault(); if (this.state.src && this.props.onSelectURL) { this.props.onSelectURL(this.state.src); this.closeURLInput(); } } }, { key: "onUpload", value: function onUpload(event) { this.onFilesUpload(event.target.files); } }, { key: "onFilesUpload", value: function onFilesUpload(files) { var _this$props = this.props, onSelect = _this$props.onSelect, multiple = _this$props.multiple, onError = _this$props.onError, allowedTypes = _this$props.allowedTypes; var setMedia = multiple ? onSelect : function (_ref2) { var _ref3 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref2, 1), media = _ref3[0]; return onSelect(media); }; Object(_utils___WEBPACK_IMPORTED_MODULE_17__["mediaUpload"])({ allowedTypes: allowedTypes, filesList: files, onFileChange: setMedia, onError: onError }); } }, { key: "openURLInput", value: function openURLInput() { this.setState({ isURLInputVisible: true }); } }, { key: "closeURLInput", value: function closeURLInput() { this.setState({ isURLInputVisible: false }); } }, { key: "render", value: function render() { var _this$props2 = this.props, accept = _this$props2.accept, icon = _this$props2.icon, className = _this$props2.className, _this$props2$labels = _this$props2.labels, labels = _this$props2$labels === void 0 ? {} : _this$props2$labels, onSelect = _this$props2.onSelect, _this$props2$value = _this$props2.value, value = _this$props2$value === void 0 ? {} : _this$props2$value, onSelectURL = _this$props2.onSelectURL, _this$props2$onHTMLDr = _this$props2.onHTMLDrop, onHTMLDrop = _this$props2$onHTMLDr === void 0 ? lodash__WEBPACK_IMPORTED_MODULE_8__["noop"] : _this$props2$onHTMLDr, _this$props2$multiple = _this$props2.multiple, multiple = _this$props2$multiple === void 0 ? false : _this$props2$multiple, notices = _this$props2.notices, _this$props2$allowedT = _this$props2.allowedTypes, allowedTypes = _this$props2$allowedT === void 0 ? [] : _this$props2$allowedT, hasUploadPermissions = _this$props2.hasUploadPermissions; var _this$state = this.state, isURLInputVisible = _this$state.isURLInputVisible, src = _this$state.src; var instructions = labels.instructions || ''; var title = labels.title || ''; if (!hasUploadPermissions && !onSelectURL) { instructions = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('To edit this block, you need permission to upload media.'); } if (!instructions || !title) { var isOneType = 1 === allowedTypes.length; var isAudio = isOneType && 'audio' === allowedTypes[0]; var isImage = isOneType && 'image' === allowedTypes[0]; var isVideo = isOneType && 'video' === allowedTypes[0]; if (!instructions) { if (hasUploadPermissions) { instructions = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Drag a media file, upload a new one or select a file from your library.'); if (isAudio) { instructions = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Drag an audio, upload a new one or select a file from your library.'); } else if (isImage) { instructions = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Drag an image, upload a new one or select a file from your library.'); } else if (isVideo) { instructions = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Drag a video, upload a new one or select a file from your library.'); } } else if (!hasUploadPermissions && onSelectURL) { instructions = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Given your current role, you can only link a media file, you cannot upload.'); if (isAudio) { instructions = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Given your current role, you can only link an audio, you cannot upload.'); } else if (isImage) { instructions = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Given your current role, you can only link an image, you cannot upload.'); } else if (isVideo) { instructions = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Given your current role, you can only link a video, you cannot upload.'); } } } if (!title) { title = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Media'); if (isAudio) { title = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Audio'); } else if (isImage) { title = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Image'); } else if (isVideo) { title = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Video'); } } } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["Placeholder"], { icon: icon, label: title, instructions: instructions, className: classnames__WEBPACK_IMPORTED_MODULE_9___default()('editor-media-placeholder', className), notices: notices }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_media_upload_check__WEBPACK_IMPORTED_MODULE_15__["default"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["DropZone"], { onFilesDrop: this.onFilesUpload, onHTMLDrop: onHTMLDrop }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["FormFileUpload"], { isLarge: true, className: "editor-media-placeholder__button", onChange: this.onUpload, accept: accept, multiple: multiple }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Upload')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_media_upload__WEBPACK_IMPORTED_MODULE_14__["default"], { gallery: multiple && this.onlyAllowsImages(), multiple: multiple, onSelect: onSelect, allowedTypes: allowedTypes, value: value.id, render: function render(_ref4) { var open = _ref4.open; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["Button"], { isLarge: true, className: "editor-media-placeholder__button", onClick: open }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Media Library')); } })), onSelectURL && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("div", { className: "editor-media-placeholder__url-input-container" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["Button"], { className: "editor-media-placeholder__button", onClick: this.openURLInput, isToggled: isURLInputVisible, isLarge: true }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Insert from URL')), isURLInputVisible && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(InsertFromURLPopover, { src: src, onChange: this.onChangeSrc, onSubmit: this.onSubmitSrc, onClose: this.closeURLInput }))); } }]); return MediaPlaceholder; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Component"]); var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_13__["withSelect"])(function (select) { var _select = select('core'), hasUploadPermissions = _select.hasUploadPermissions; return { hasUploadPermissions: hasUploadPermissions() }; }); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_12__["compose"])(applyWithSelect, Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["withFilters"])('editor.MediaPlaceholder'))(MediaPlaceholder)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/media-upload/check.js": /*!**************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/media-upload/check.js ***! \**************************************************************************************/ /*! exports provided: MediaUploadCheck, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MediaUploadCheck", function() { return MediaUploadCheck; }); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__); /** * WordPress dependencies */ function MediaUploadCheck(_ref) { var hasUploadPermissions = _ref.hasUploadPermissions, _ref$fallback = _ref.fallback, fallback = _ref$fallback === void 0 ? null : _ref$fallback, children = _ref.children; return hasUploadPermissions ? children : fallback; } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__["withSelect"])(function (select) { var _select = select('core'), hasUploadPermissions = _select.hasUploadPermissions; return { hasUploadPermissions: hasUploadPermissions() }; })(MediaUploadCheck)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/media-upload/index.js": /*!**************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/media-upload/index.js ***! \**************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); /** * WordPress dependencies */ /** * This is a placeholder for the media upload component necessary to make it possible to provide * an integration with the core blocks that handle media files. By default it renders nothing but * it provides a way to have it overridden with the `editor.MediaUpload` filter. * * @return {WPElement} Media upload element. */ var MediaUpload = function MediaUpload() { return null; }; // Todo: rename the filter /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__["withFilters"])('editor.MediaUpload')(MediaUpload)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/multi-select-scroll-into-view/index.js": /*!*******************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/multi-select-scroll-into-view/index.js ***! \*******************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var dom_scroll_into_view__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! dom-scroll-into-view */ "./node_modules/dom-scroll-into-view/lib/index.js"); /* harmony import */ var dom_scroll_into_view__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(dom_scroll_into_view__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/dom */ "@wordpress/dom"); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_dom__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/dom */ "./node_modules/@wordpress/editor/build-module/utils/dom.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var MultiSelectScrollIntoView = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(MultiSelectScrollIntoView, _Component); function MultiSelectScrollIntoView() { Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, MultiSelectScrollIntoView); return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(MultiSelectScrollIntoView).apply(this, arguments)); } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(MultiSelectScrollIntoView, [{ key: "componentDidUpdate", value: function componentDidUpdate() { // Relies on expectation that `componentDidUpdate` will only be called // if value of `extentClientId` changes. this.scrollIntoView(); } /** * Ensures that if a multi-selection exists, the extent of the selection is * visible within the nearest scrollable container. * * @return {void} */ }, { key: "scrollIntoView", value: function scrollIntoView() { var extentClientId = this.props.extentClientId; if (!extentClientId) { return; } var extentNode = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_9__["getBlockDOMNode"])(extentClientId); if (!extentNode) { return; } var scrollContainer = Object(_wordpress_dom__WEBPACK_IMPORTED_MODULE_8__["getScrollContainer"])(extentNode); // If there's no scroll container, it follows that there's no scrollbar // and thus there's no need to try to scroll into view. if (!scrollContainer) { return; } dom_scroll_into_view__WEBPACK_IMPORTED_MODULE_5___default()(extentNode, scrollContainer, { onlyScrollIfNeeded: true }); } }, { key: "render", value: function render() { return null; } }]); return MultiSelectScrollIntoView; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__["withSelect"])(function (select) { var _select = select('core/editor'), getLastMultiSelectedBlockClientId = _select.getLastMultiSelectedBlockClientId; return { extentClientId: getLastMultiSelectedBlockClientId() }; })(MultiSelectScrollIntoView)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/multi-selection-inspector/index.js": /*!***************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/multi-selection-inspector/index.js ***! \***************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_wordcount__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/wordcount */ "@wordpress/wordcount"); /* harmony import */ var _wordpress_wordcount__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_wordcount__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _block_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../block-icon */ "./node_modules/@wordpress/editor/build-module/components/block-icon/index.js"); /** * WordPress dependencies */ /** * Internal Dependencies */ function MultiSelectionInspector(_ref) { var blocks = _ref.blocks; var words = Object(_wordpress_wordcount__WEBPACK_IMPORTED_MODULE_4__["count"])(Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__["serialize"])(blocks), 'words'); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-multi-selection-inspector__card" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_icon__WEBPACK_IMPORTED_MODULE_6__["default"], { icon: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["Path"], { d: "M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z" })), showColors: true }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-multi-selection-inspector__card-content" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-multi-selection-inspector__card-title" }, /* translators: %d: number of blocks */ Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["_n"])('%d block', '%d blocks', blocks.length), blocks.length)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-multi-selection-inspector__card-description" }, /* translators: %d: number of words */ Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["_n"])('%d word', '%d words', words), words)))); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select) { var _select = select('core/editor'), getMultiSelectedBlocks = _select.getMultiSelectedBlocks; return { blocks: getMultiSelectedBlocks() }; })(MultiSelectionInspector)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/navigable-toolbar/index.js": /*!*******************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/navigable-toolbar/index.js ***! \*******************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/dom */ "@wordpress/dom"); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_dom__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__); /** * External dependencies */ /** * WordPress dependencies */ /** * Browser dependencies */ var _window = window, Node = _window.Node, getSelection = _window.getSelection; var NavigableToolbar = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__["default"])(NavigableToolbar, _Component); function NavigableToolbar() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, NavigableToolbar); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__["default"])(NavigableToolbar).apply(this, arguments)); _this.focusToolbar = _this.focusToolbar.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.focusSelection = _this.focusSelection.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.switchOnKeyDown = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["cond"])([[Object(lodash__WEBPACK_IMPORTED_MODULE_9__["matchesProperty"])(['keyCode'], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["ESCAPE"]), _this.focusSelection]]); _this.toolbar = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createRef"])(); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(NavigableToolbar, [{ key: "focusToolbar", value: function focusToolbar() { var tabbables = _wordpress_dom__WEBPACK_IMPORTED_MODULE_11__["focus"].tabbable.find(this.toolbar.current); if (tabbables.length) { tabbables[0].focus(); } } /** * Programmatically shifts focus to the element where the current selection * exists, if there is a selection. */ }, { key: "focusSelection", value: function focusSelection() { // Ensure that a selection exists. var selection = getSelection(); if (!selection) { return; } // Focus node may be a text node, which cannot be focused directly. // Find its parent element instead. var focusNode = selection.focusNode; var focusElement = focusNode; if (focusElement.nodeType !== Node.ELEMENT_NODE) { focusElement = focusElement.parentElement; } if (focusElement) { focusElement.focus(); } } }, { key: "componentDidMount", value: function componentDidMount() { if (this.props.focusOnMount) { this.focusToolbar(); } } }, { key: "render", value: function render() { var _this$props = this.props, children = _this$props.children, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_this$props, ["children"]); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["NavigableMenu"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ orientation: "horizontal", role: "toolbar", ref: this.toolbar, onKeyDown: this.switchOnKeyDown }, Object(lodash__WEBPACK_IMPORTED_MODULE_9__["omit"])(props, ['focusOnMount'])), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["KeyboardShortcuts"], { bindGlobal: true // Use the same event that TinyMCE uses in the Classic block for its own `alt+f10` shortcut. , eventName: "keydown", shortcuts: { 'alt+f10': this.focusToolbar } }), children); } }]); return NavigableToolbar; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (NavigableToolbar); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/observe-typing/index.js": /*!****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/observe-typing/index.js ***! \****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/dom */ "@wordpress/dom"); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_dom__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_11__); /** * External dependencies */ /** * WordPress dependencies */ /** * Set of key codes upon which typing is to be initiated on a keydown event. * * @type {number[]} */ var KEY_DOWN_ELIGIBLE_KEY_CODES = [_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_10__["UP"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_10__["RIGHT"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_10__["DOWN"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_10__["LEFT"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_10__["ENTER"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_10__["BACKSPACE"]]; /** * Returns true if a given keydown event can be inferred as intent to start * typing, or false otherwise. A keydown is considered eligible if it is a * text navigation without shift active. * * @param {KeyboardEvent} event Keydown event to test. * * @return {boolean} Whether event is eligible to start typing. */ function isKeyDownEligibleForStartTyping(event) { var keyCode = event.keyCode, shiftKey = event.shiftKey; return !shiftKey && Object(lodash__WEBPACK_IMPORTED_MODULE_7__["includes"])(KEY_DOWN_ELIGIBLE_KEY_CODES, keyCode); } var ObserveTyping = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(ObserveTyping, _Component); function ObserveTyping() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, ObserveTyping); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(ObserveTyping).apply(this, arguments)); _this.stopTypingOnSelectionUncollapse = _this.stopTypingOnSelectionUncollapse.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.stopTypingOnMouseMove = _this.stopTypingOnMouseMove.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.startTypingInTextField = _this.startTypingInTextField.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.stopTypingOnNonTextField = _this.stopTypingOnNonTextField.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.stopTypingOnEscapeKey = _this.stopTypingOnEscapeKey.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onKeyDown = Object(lodash__WEBPACK_IMPORTED_MODULE_7__["over"])([_this.startTypingInTextField, _this.stopTypingOnEscapeKey]); _this.lastMouseMove = null; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(ObserveTyping, [{ key: "componentDidMount", value: function componentDidMount() { this.toggleEventBindings(this.props.isTyping); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (this.props.isTyping !== prevProps.isTyping) { this.toggleEventBindings(this.props.isTyping); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.toggleEventBindings(false); } /** * Bind or unbind events to the document when typing has started or stopped * respectively, or when component has become unmounted. * * @param {boolean} isBound Whether event bindings should be applied. */ }, { key: "toggleEventBindings", value: function toggleEventBindings(isBound) { var bindFn = isBound ? 'addEventListener' : 'removeEventListener'; document[bindFn]('selectionchange', this.stopTypingOnSelectionUncollapse); document[bindFn]('mousemove', this.stopTypingOnMouseMove); } /** * On mouse move, unset typing flag if user has moved cursor. * * @param {MouseEvent} event Mousemove event. */ }, { key: "stopTypingOnMouseMove", value: function stopTypingOnMouseMove(event) { var clientX = event.clientX, clientY = event.clientY; // We need to check that the mouse really moved because Safari triggers // mousemove events when shift or ctrl are pressed. if (this.lastMouseMove) { var _this$lastMouseMove = this.lastMouseMove, lastClientX = _this$lastMouseMove.clientX, lastClientY = _this$lastMouseMove.clientY; if (lastClientX !== clientX || lastClientY !== clientY) { this.props.onStopTyping(); } } this.lastMouseMove = { clientX: clientX, clientY: clientY }; } /** * On selection change, unset typing flag if user has made an uncollapsed * (shift) selection. */ }, { key: "stopTypingOnSelectionUncollapse", value: function stopTypingOnSelectionUncollapse() { var selection = window.getSelection(); var isCollapsed = selection.rangeCount > 0 && selection.getRangeAt(0).collapsed; if (!isCollapsed) { this.props.onStopTyping(); } } /** * Unsets typing flag if user presses Escape while typing flag is active. * * @param {KeyboardEvent} event Keypress or keydown event to interpret. */ }, { key: "stopTypingOnEscapeKey", value: function stopTypingOnEscapeKey(event) { if (this.props.isTyping && event.keyCode === _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_10__["ESCAPE"]) { this.props.onStopTyping(); } } /** * Handles a keypress or keydown event to infer intention to start typing. * * @param {KeyboardEvent} event Keypress or keydown event to interpret. */ }, { key: "startTypingInTextField", value: function startTypingInTextField(event) { var _this$props = this.props, isTyping = _this$props.isTyping, onStartTyping = _this$props.onStartTyping; var type = event.type, target = event.target; // Abort early if already typing, or key press is incurred outside a // text field (e.g. arrow-ing through toolbar buttons). // Ignore typing in a block toolbar if (isTyping || !Object(_wordpress_dom__WEBPACK_IMPORTED_MODULE_9__["isTextField"])(target) || target.closest('.editor-block-toolbar')) { return; } // Special-case keydown because certain keys do not emit a keypress // event. Conversely avoid keydown as the canonical event since there // are many keydown which are explicitly not targeted for typing. if (type === 'keydown' && !isKeyDownEligibleForStartTyping(event)) { return; } onStartTyping(); } /** * Stops typing when focus transitions to a non-text field element. * * @param {FocusEvent} event Focus event. */ }, { key: "stopTypingOnNonTextField", value: function stopTypingOnNonTextField(event) { var _this2 = this; event.persist(); // Since focus to a non-text field via arrow key will trigger before // the keydown event, wait until after current stack before evaluating // whether typing is to be stopped. Otherwise, typing will re-start. this.props.setTimeout(function () { var _this2$props = _this2.props, isTyping = _this2$props.isTyping, onStopTyping = _this2$props.onStopTyping; var target = event.target; if (isTyping && !Object(_wordpress_dom__WEBPACK_IMPORTED_MODULE_9__["isTextField"])(target)) { onStopTyping(); } }); } }, { key: "render", value: function render() { var children = this.props.children; // Disable reason: This component is responsible for capturing bubbled // keyboard events which are interpreted as typing intent. /* eslint-disable jsx-a11y/no-static-element-interactions */ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { onFocus: this.stopTypingOnNonTextField, onKeyPress: this.startTypingInTextField, onKeyDown: this.onKeyDown }, children); /* eslint-enable jsx-a11y/no-static-element-interactions */ } }]); return ObserveTyping; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_11__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__["withSelect"])(function (select) { var _select = select('core/editor'), isTyping = _select.isTyping; return { isTyping: isTyping() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), startTyping = _dispatch.startTyping, stopTyping = _dispatch.stopTyping; return { onStartTyping: startTyping, onStopTyping: stopTyping }; }), _wordpress_compose__WEBPACK_IMPORTED_MODULE_11__["withSafeTimeout"]])(ObserveTyping)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/page-attributes/check.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/page-attributes/check.js ***! \*****************************************************************************************/ /*! exports provided: PageAttributesCheck, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageAttributesCheck", function() { return PageAttributesCheck; }); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); /** * External dependencies */ /** * WordPress dependencies */ function PageAttributesCheck(_ref) { var availableTemplates = _ref.availableTemplates, postType = _ref.postType, children = _ref.children; var supportsPageAttributes = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["get"])(postType, ['supports', 'page-attributes'], false); // Only render fields if post type supports page attributes or available templates exist. if (!supportsPageAttributes && Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(availableTemplates)) { return null; } return children; } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["withSelect"])(function (select) { var _select = select('core/editor'), getEditedPostAttribute = _select.getEditedPostAttribute, getEditorSettings = _select.getEditorSettings; var _select2 = select('core'), getPostType = _select2.getPostType; var _getEditorSettings = getEditorSettings(), availableTemplates = _getEditorSettings.availableTemplates; return { postType: getPostType(getEditedPostAttribute('type')), availableTemplates: availableTemplates }; })(PageAttributesCheck)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/page-attributes/order.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/page-attributes/order.js ***! \*****************************************************************************************/ /*! exports provided: PageAttributesOrder, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageAttributesOrder", function() { return PageAttributesOrder; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _post_type_support_check__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../post-type-support-check */ "./node_modules/@wordpress/editor/build-module/components/post-type-support-check/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var PageAttributesOrder = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__["withState"])({ orderInput: null })(function (_ref) { var onUpdateOrder = _ref.onUpdateOrder, _ref$order = _ref.order, order = _ref$order === void 0 ? 0 : _ref$order, orderInput = _ref.orderInput, setState = _ref.setState; var setUpdatedOrder = function setUpdatedOrder(value) { setState({ orderInput: value }); var newOrder = Number(value); if (Number.isInteger(newOrder) && Object(lodash__WEBPACK_IMPORTED_MODULE_1__["invoke"])(value, ['trim']) !== '') { onUpdateOrder(Number(value)); } }; var value = orderInput === null ? order : orderInput; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["TextControl"], { className: "editor-page-attributes__order", type: "number", label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Order'), value: value, onChange: setUpdatedOrder, size: 6, onBlur: function onBlur() { setState({ orderInput: null }); } }); }); function PageAttributesOrderWithChecks(props) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_post_type_support_check__WEBPACK_IMPORTED_MODULE_6__["default"], { supportKeys: "page-attributes" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(PageAttributesOrder, props)); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withSelect"])(function (select) { return { order: select('core/editor').getEditedPostAttribute('menu_order') }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withDispatch"])(function (dispatch) { return { onUpdateOrder: function onUpdateOrder(order) { dispatch('core/editor').editPost({ menu_order: order }); } }; })])(PageAttributesOrderWithChecks)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/page-attributes/parent.js": /*!******************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/page-attributes/parent.js ***! \******************************************************************************************/ /*! exports provided: PageAttributesParent, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageAttributesParent", function() { return PageAttributesParent; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _utils_terms__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/terms */ "./node_modules/@wordpress/editor/build-module/utils/terms.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function PageAttributesParent(_ref) { var parent = _ref.parent, postType = _ref.postType, items = _ref.items, onUpdateParent = _ref.onUpdateParent; var isHierarchical = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(postType, ['hierarchical'], false); var parentPageLabel = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(postType, ['labels', 'parent_item_colon']); var pageItems = items || []; if (!isHierarchical || !parentPageLabel || !pageItems.length) { return null; } var pagesTree = Object(_utils_terms__WEBPACK_IMPORTED_MODULE_6__["buildTermsTree"])(pageItems.map(function (item) { return { id: item.id, parent: item.parent, name: item.title.raw ? item.title.raw : "#".concat(item.id, " (").concat(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('no title'), ")") }; })); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["TreeSelect"], { label: parentPageLabel, noOptionLabel: "(".concat(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('no parent'), ")"), tree: pagesTree, selectedId: parent, onChange: onUpdateParent }); } var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withSelect"])(function (select) { var _select = select('core'), getPostType = _select.getPostType, getEntityRecords = _select.getEntityRecords; var _select2 = select('core/editor'), getCurrentPostId = _select2.getCurrentPostId, getEditedPostAttribute = _select2.getEditedPostAttribute; var postTypeSlug = getEditedPostAttribute('type'); var postType = getPostType(postTypeSlug); var postId = getCurrentPostId(); var isHierarchical = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(postType, ['hierarchical'], false); var query = { per_page: -1, exclude: postId, parent_exclude: postId, orderby: 'menu_order', order: 'asc' }; return { parent: getEditedPostAttribute('parent'), items: isHierarchical ? getEntityRecords('postType', postTypeSlug, query) : [], postType: postType }; }); var applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), editPost = _dispatch.editPost; return { onUpdateParent: function onUpdateParent(parent) { editPost({ parent: parent || 0 }); } }; }); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__["compose"])([applyWithSelect, applyWithDispatch])(PageAttributesParent)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/page-attributes/template.js": /*!********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/page-attributes/template.js ***! \********************************************************************************************/ /*! exports provided: PageTemplate, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageTemplate", function() { return PageTemplate; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); /** * External dependencies */ /** * WordPress dependencies */ function PageTemplate(_ref) { var availableTemplates = _ref.availableTemplates, selectedTemplate = _ref.selectedTemplate, onUpdate = _ref.onUpdate; if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(availableTemplates)) { return null; } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["SelectControl"], { label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Template:'), value: selectedTemplate, onChange: onUpdate, className: "editor-page-attributes__template", options: Object(lodash__WEBPACK_IMPORTED_MODULE_1__["map"])(availableTemplates, function (templateName, templateSlug) { return { value: templateSlug, label: templateName }; }) }); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withSelect"])(function (select) { var _select = select('core/editor'), getEditedPostAttribute = _select.getEditedPostAttribute, getEditorSettings = _select.getEditorSettings; var _getEditorSettings = getEditorSettings(), availableTemplates = _getEditorSettings.availableTemplates; return { selectedTemplate: getEditedPostAttribute('template'), availableTemplates: availableTemplates }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withDispatch"])(function (dispatch) { return { onUpdate: function onUpdate(templateSlug) { dispatch('core/editor').editPost({ template: templateSlug || '' }); } }; }))(PageTemplate)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/panel-color-settings/index.js": /*!**********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/panel-color-settings/index.js ***! \**********************************************************************************************/ /*! exports provided: PanelColorSettings, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PanelColorSettings", function() { return PanelColorSettings; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _color_palette_control__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../color-palette/control */ "./node_modules/@wordpress/editor/build-module/components/color-palette/control.js"); /* harmony import */ var _color_palette_with_color_context__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../color-palette/with-color-context */ "./node_modules/@wordpress/editor/build-module/components/color-palette/with-color-context.js"); /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../colors */ "./node_modules/@wordpress/editor/build-module/components/colors/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var hasCustomColorsDisabledForSetting = function hasCustomColorsDisabledForSetting(disableCustomColors, colorSetting) { if (colorSetting.disableCustomColors !== undefined) { return colorSetting.disableCustomColors; } return disableCustomColors; }; var hasColorsToChooseInSetting = function hasColorsToChooseInSetting() { var colors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var disableCustomColors = arguments.length > 1 ? arguments[1] : undefined; var colorSetting = arguments.length > 2 ? arguments[2] : undefined; if (!hasCustomColorsDisabledForSetting(disableCustomColors, colorSetting)) { return true; } return (colorSetting.colors || colors).length > 0; }; var hasColorsToChoose = function hasColorsToChoose(_ref) { var colors = _ref.colors, disableCustomColors = _ref.disableCustomColors, colorSettings = _ref.colorSettings; return Object(lodash__WEBPACK_IMPORTED_MODULE_4__["some"])(colorSettings, function (colorSetting) { return hasColorsToChooseInSetting(colors, disableCustomColors, colorSetting); }); }; // translators: first %s: The type of color (e.g. background color), second %s: the color name or value (e.g. red or #ff0000) var colorIndicatorAriaLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('(%s: %s)'); var renderColorIndicators = function renderColorIndicators(colorSettings, colors) { return colorSettings.map(function (_ref2, index) { var value = _ref2.value, label = _ref2.label, availableColors = _ref2.colors; if (!value) { return null; } var colorObject = Object(_colors__WEBPACK_IMPORTED_MODULE_10__["getColorObjectByColorValue"])(availableColors || colors, value); var colorName = colorObject && colorObject.name; var ariaLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["sprintf"])(colorIndicatorAriaLabel, label.toLowerCase(), colorName || value); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["ColorIndicator"], { key: index, colorValue: value, "aria-label": ariaLabel }); }); }; // colorSettings is passed as an array of props so that it can be used for // mapping both ColorIndicator and ColorPaletteControl components. Passing // an array of components/nodes here wouldn't be feasible. var PanelColorSettings = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__["ifCondition"])(hasColorsToChoose)(function (_ref3) { var children = _ref3.children, colors = _ref3.colors, colorSettings = _ref3.colorSettings, disableCustomColors = _ref3.disableCustomColors, title = _ref3.title, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(_ref3, ["children", "colors", "colorSettings", "disableCustomColors", "title"]); var className = 'editor-panel-color-settings'; var titleElement = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])("span", { className: "".concat(className, "__panel-title") }, title, renderColorIndicators(colorSettings, colors)); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["PanelBody"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: className, title: titleElement }, props), colorSettings.map(function (settings, index) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(_color_palette_control__WEBPACK_IMPORTED_MODULE_8__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ key: index }, Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__["default"])({ colors: colors, disableCustomColors: disableCustomColors }, settings))); }), children); }); /* harmony default export */ __webpack_exports__["default"] = (Object(_color_palette_with_color_context__WEBPACK_IMPORTED_MODULE_9__["default"])(PanelColorSettings)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/plain-text/index.js": /*!************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/plain-text/index.js ***! \************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var react_autosize_textarea__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-autosize-textarea */ "./node_modules/react-autosize-textarea/lib/index.js"); /* harmony import */ var react_autosize_textarea__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_autosize_textarea__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /** * External dependencies */ function PlainText(_ref) { var _onChange = _ref.onChange, className = _ref.className, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, ["onChange", "className"]); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(react_autosize_textarea__WEBPACK_IMPORTED_MODULE_3___default.a, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: classnames__WEBPACK_IMPORTED_MODULE_4___default()('editor-plain-text', className), onChange: function onChange(event) { return _onChange(event.target.value); } }, props)); } /* harmony default export */ __webpack_exports__["default"] = (PlainText); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-author/check.js": /*!*************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-author/check.js ***! \*************************************************************************************/ /*! exports provided: PostAuthorCheck, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostAuthorCheck", function() { return PostAuthorCheck; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _post_type_support_check__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../post-type-support-check */ "./node_modules/@wordpress/editor/build-module/components/post-type-support-check/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function PostAuthorCheck(_ref) { var hasAssignAuthorAction = _ref.hasAssignAuthorAction, authors = _ref.authors, children = _ref.children; if (!hasAssignAuthorAction || authors.length < 2) { return null; } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_post_type_support_check__WEBPACK_IMPORTED_MODULE_4__["default"], { supportKeys: "author" }, children); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withSelect"])(function (select) { var post = select('core/editor').getCurrentPost(); return { hasAssignAuthorAction: Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(post, ['_links', 'wp:action-assign-author'], false), postType: select('core/editor').getCurrentPostType(), authors: select('core').getAuthors() }; }), _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["withInstanceId"]])(PostAuthorCheck)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-author/index.js": /*!*************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-author/index.js ***! \*************************************************************************************/ /*! exports provided: PostAuthor, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostAuthor", function() { return PostAuthor; }); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _check__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./check */ "./node_modules/@wordpress/editor/build-module/components/post-author/check.js"); /** * WordPress dependencies */ /** * Internal dependencies */ var PostAuthor = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(PostAuthor, _Component); function PostAuthor() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, PostAuthor); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(PostAuthor).apply(this, arguments)); _this.setAuthorId = _this.setAuthorId.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(PostAuthor, [{ key: "setAuthorId", value: function setAuthorId(event) { var onUpdateAuthor = this.props.onUpdateAuthor; var value = event.target.value; onUpdateAuthor(Number(value)); } }, { key: "render", value: function render() { var _this$props = this.props, postAuthor = _this$props.postAuthor, instanceId = _this$props.instanceId, authors = _this$props.authors; var selectId = 'post-author-selector-' + instanceId; // Disable reason: A select with an onchange throws a warning /* eslint-disable jsx-a11y/no-onchange */ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_check__WEBPACK_IMPORTED_MODULE_10__["default"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("label", { htmlFor: selectId }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Author')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("select", { id: selectId, value: postAuthor, onChange: this.setAuthorId, className: "editor-post-author__select" }, authors.map(function (author) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("option", { key: author.id, value: author.id }, author.name); }))); /* eslint-enable jsx-a11y/no-onchange */ } }]); return PostAuthor; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_8__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withSelect"])(function (select) { return { postAuthor: select('core/editor').getEditedPostAttribute('author'), authors: select('core').getAuthors() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withDispatch"])(function (dispatch) { return { onUpdateAuthor: function onUpdateAuthor(author) { dispatch('core/editor').editPost({ author: author }); } }; }), _wordpress_compose__WEBPACK_IMPORTED_MODULE_8__["withInstanceId"]])(PostAuthor)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-comments/index.js": /*!***************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-comments/index.js ***! \***************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); /** * WordPress dependencies */ function PostComments(_ref) { var _ref$commentStatus = _ref.commentStatus, commentStatus = _ref$commentStatus === void 0 ? 'open' : _ref$commentStatus, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref, ["commentStatus"]); var onToggleComments = function onToggleComments() { return props.editPost({ comment_status: commentStatus === 'open' ? 'closed' : 'open' }); }; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["CheckboxControl"], { label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Allow Comments'), checked: commentStatus === 'open', onChange: onToggleComments }); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withSelect"])(function (select) { return { commentStatus: select('core/editor').getEditedPostAttribute('comment_status') }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withDispatch"])(function (dispatch) { return { editPost: dispatch('core/editor').editPost }; })])(PostComments)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-excerpt/check.js": /*!**************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-excerpt/check.js ***! \**************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _post_type_support_check__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../post-type-support-check */ "./node_modules/@wordpress/editor/build-module/components/post-type-support-check/index.js"); /** * Internal dependencies */ function PostExcerptCheck(props) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_post_type_support_check__WEBPACK_IMPORTED_MODULE_2__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, { supportKeys: "excerpt" })); } /* harmony default export */ __webpack_exports__["default"] = (PostExcerptCheck); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-excerpt/index.js": /*!**************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-excerpt/index.js ***! \**************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__); /** * WordPress dependencies */ function PostExcerpt(_ref) { var excerpt = _ref.excerpt, onUpdateExcerpt = _ref.onUpdateExcerpt; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-post-excerpt" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["TextareaControl"], { label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Write an excerpt (optional)'), className: "editor-post-excerpt__textarea", onChange: function onChange(value) { return onUpdateExcerpt(value); }, value: excerpt }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["ExternalLink"], { href: "https://codex.wordpress.org/Excerpt" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Learn more about manual excerpts'))); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withSelect"])(function (select) { return { excerpt: select('core/editor').getEditedPostAttribute('excerpt') }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withDispatch"])(function (dispatch) { return { onUpdateExcerpt: function onUpdateExcerpt(excerpt) { dispatch('core/editor').editPost({ excerpt: excerpt }); } }; })])(PostExcerpt)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-featured-image/check.js": /*!*********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-featured-image/check.js ***! \*********************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _post_type_support_check__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../post-type-support-check */ "./node_modules/@wordpress/editor/build-module/components/post-type-support-check/index.js"); /* harmony import */ var _theme_support_check__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../theme-support-check */ "./node_modules/@wordpress/editor/build-module/components/theme-support-check/index.js"); /** * Internal dependencies */ function PostFeaturedImageCheck(props) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_theme_support_check__WEBPACK_IMPORTED_MODULE_3__["default"], { supportKeys: "post-thumbnails" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_post_type_support_check__WEBPACK_IMPORTED_MODULE_2__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, { supportKeys: "thumbnail" }))); } /* harmony default export */ __webpack_exports__["default"] = (PostFeaturedImageCheck); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-featured-image/index.js": /*!*********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-featured-image/index.js ***! \*********************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _check__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./check */ "./node_modules/@wordpress/editor/build-module/components/post-featured-image/check.js"); /* harmony import */ var _media_upload__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../media-upload */ "./node_modules/@wordpress/editor/build-module/components/media-upload/index.js"); /* harmony import */ var _media_upload_check__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../media-upload/check */ "./node_modules/@wordpress/editor/build-module/components/media-upload/check.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var ALLOWED_MEDIA_TYPES = ['image']; // Used when labels from post type were not yet loaded or when they are not present. var DEFAULT_FEATURE_IMAGE_LABEL = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Featured Image'); var DEFAULT_SET_FEATURE_IMAGE_LABEL = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Set featured image'); var DEFAULT_REMOVE_FEATURE_IMAGE_LABEL = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Remove image'); function PostFeaturedImage(_ref) { var currentPostId = _ref.currentPostId, featuredImageId = _ref.featuredImageId, onUpdateImage = _ref.onUpdateImage, onRemoveImage = _ref.onRemoveImage, media = _ref.media, postType = _ref.postType; var postLabel = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(postType, ['labels'], {}); var instructions = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('To edit the featured image, you need permission to upload media.')); var mediaWidth, mediaHeight, mediaSourceUrl; if (media) { var mediaSize = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__["applyFilters"])('editor.PostFeaturedImage.imageSize', 'post-thumbnail', media.id, currentPostId); if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__["has"])(media, ['media_details', 'sizes', mediaSize])) { mediaWidth = media.media_details.sizes[mediaSize].width; mediaHeight = media.media_details.sizes[mediaSize].height; mediaSourceUrl = media.media_details.sizes[mediaSize].source_url; } else { mediaWidth = media.media_details.width; mediaHeight = media.media_details.height; mediaSourceUrl = media.source_url; } } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_check__WEBPACK_IMPORTED_MODULE_7__["default"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-post-featured-image" }, !!featuredImageId && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_media_upload_check__WEBPACK_IMPORTED_MODULE_9__["default"], { fallback: instructions }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_media_upload__WEBPACK_IMPORTED_MODULE_8__["default"], { title: postLabel.featured_image || DEFAULT_FEATURE_IMAGE_LABEL, onSelect: onUpdateImage, allowedTypes: ALLOWED_MEDIA_TYPES, modalClass: "editor-post-featured-image__media-modal", render: function render(_ref2) { var open = _ref2.open; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["Button"], { className: "editor-post-featured-image__preview", onClick: open, "aria-label": Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Edit or update the image') }, media && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["ResponsiveWrapper"], { naturalWidth: mediaWidth, naturalHeight: mediaHeight }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("img", { src: mediaSourceUrl, alt: "" })), !media && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["Spinner"], null)); }, value: featuredImageId })), !!featuredImageId && media && !media.isLoading && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_media_upload_check__WEBPACK_IMPORTED_MODULE_9__["default"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_media_upload__WEBPACK_IMPORTED_MODULE_8__["default"], { title: postLabel.featured_image || DEFAULT_FEATURE_IMAGE_LABEL, onSelect: onUpdateImage, allowedTypes: ALLOWED_MEDIA_TYPES, modalClass: "editor-post-featured-image__media-modal", render: function render(_ref3) { var open = _ref3.open; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["Button"], { onClick: open, isDefault: true, isLarge: true }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Replace image')); } })), !featuredImageId && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_media_upload_check__WEBPACK_IMPORTED_MODULE_9__["default"], { fallback: instructions }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_media_upload__WEBPACK_IMPORTED_MODULE_8__["default"], { title: postLabel.featured_image || DEFAULT_FEATURE_IMAGE_LABEL, onSelect: onUpdateImage, allowedTypes: ALLOWED_MEDIA_TYPES, modalClass: "editor-post-featured-image__media-modal", render: function render(_ref4) { var open = _ref4.open; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["Button"], { className: "editor-post-featured-image__toggle", onClick: open }, postLabel.set_featured_image || DEFAULT_SET_FEATURE_IMAGE_LABEL); } }))), !!featuredImageId && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_media_upload_check__WEBPACK_IMPORTED_MODULE_9__["default"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["Button"], { onClick: onRemoveImage, isLink: true, isDestructive: true }, postLabel.remove_featured_image || DEFAULT_REMOVE_FEATURE_IMAGE_LABEL)))); } var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withSelect"])(function (select) { var _select = select('core'), getMedia = _select.getMedia, getPostType = _select.getPostType; var _select2 = select('core/editor'), getCurrentPostId = _select2.getCurrentPostId, getEditedPostAttribute = _select2.getEditedPostAttribute; var featuredImageId = getEditedPostAttribute('featured_media'); return { media: featuredImageId ? getMedia(featuredImageId) : null, currentPostId: getCurrentPostId(), postType: getPostType(getEditedPostAttribute('type')), featuredImageId: featuredImageId }; }); var applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), editPost = _dispatch.editPost; return { onUpdateImage: function onUpdateImage(image) { editPost({ featured_media: image.id }); }, onRemoveImage: function onRemoveImage() { editPost({ featured_media: 0 }); } }; }); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__["compose"])(applyWithSelect, applyWithDispatch, Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["withFilters"])('editor.PostFeaturedImage'))(PostFeaturedImage)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-format/check.js": /*!*************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-format/check.js ***! \*************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _post_type_support_check__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../post-type-support-check */ "./node_modules/@wordpress/editor/build-module/components/post-type-support-check/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ function PostFormatCheck(_ref) { var disablePostFormats = _ref.disablePostFormats, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, ["disablePostFormats"]); return !disablePostFormats && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_post_type_support_check__WEBPACK_IMPORTED_MODULE_4__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, { supportKeys: "post-formats" })); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withSelect"])(function (select) { var editorSettings = select('core/editor').getEditorSettings(); return { disablePostFormats: editorSettings.disablePostFormats }; })(PostFormatCheck)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-format/index.js": /*!*************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-format/index.js ***! \*************************************************************************************/ /*! exports provided: POST_FORMATS, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "POST_FORMATS", function() { return POST_FORMATS; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _check__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./check */ "./node_modules/@wordpress/editor/build-module/components/post-format/check.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var POST_FORMATS = [{ id: 'aside', caption: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Aside') }, { id: 'gallery', caption: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Gallery') }, { id: 'link', caption: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Link') }, { id: 'image', caption: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Image') }, { id: 'quote', caption: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Quote') }, { id: 'standard', caption: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Standard') }, { id: 'status', caption: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Status') }, { id: 'video', caption: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Video') }, { id: 'audio', caption: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Audio') }, { id: 'chat', caption: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Chat') }]; function PostFormat(_ref) { var onUpdatePostFormat = _ref.onUpdatePostFormat, _ref$postFormat = _ref.postFormat, postFormat = _ref$postFormat === void 0 ? 'standard' : _ref$postFormat, supportedFormats = _ref.supportedFormats, suggestedFormat = _ref.suggestedFormat, instanceId = _ref.instanceId; var postFormatSelectorId = 'post-format-selector-' + instanceId; var formats = POST_FORMATS.filter(function (format) { return Object(lodash__WEBPACK_IMPORTED_MODULE_1__["includes"])(supportedFormats, format.id); }); var suggestion = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["find"])(formats, function (format) { return format.id === suggestedFormat; }); // Disable reason: We need to change the value immiediately to show/hide the suggestion if needed /* eslint-disable jsx-a11y/no-onchange */ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_check__WEBPACK_IMPORTED_MODULE_6__["default"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-post-format" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-post-format__content" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("label", { htmlFor: postFormatSelectorId }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Post Format')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["SelectControl"], { value: postFormat, onChange: function onChange(format) { return onUpdatePostFormat(format); }, id: postFormatSelectorId, options: formats.map(function (format) { return { label: format.caption, value: format.id }; }) })), suggestion && suggestion.id !== postFormat && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-post-format__suggestion" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Suggestion:'), ' ', Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["Button"], { isLink: true, onClick: function onClick() { return onUpdatePostFormat(suggestion.id); } }, suggestion.caption)))); /* eslint-enable jsx-a11y/no-onchange */ } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withSelect"])(function (select) { var _select = select('core/editor'), getEditedPostAttribute = _select.getEditedPostAttribute, getSuggestedPostFormat = _select.getSuggestedPostFormat; var postFormat = getEditedPostAttribute('format'); var themeSupports = select('core').getThemeSupports(); // Ensure current format is always in the set. // The current format may not be a format supported by the theme. var supportedFormats = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["union"])([postFormat], Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(themeSupports, ['formats'], [])); return { postFormat: postFormat, supportedFormats: supportedFormats, suggestedFormat: getSuggestedPostFormat() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withDispatch"])(function (dispatch) { return { onUpdatePostFormat: function onUpdatePostFormat(postFormat) { dispatch('core/editor').editPost({ format: postFormat }); } }; }), _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__["withInstanceId"]])(PostFormat)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-last-revision/check.js": /*!********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-last-revision/check.js ***! \********************************************************************************************/ /*! exports provided: PostLastRevisionCheck, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostLastRevisionCheck", function() { return PostLastRevisionCheck; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _post_type_support_check__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../post-type-support-check */ "./node_modules/@wordpress/editor/build-module/components/post-type-support-check/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ function PostLastRevisionCheck(_ref) { var lastRevisionId = _ref.lastRevisionId, revisionsCount = _ref.revisionsCount, children = _ref.children; if (!lastRevisionId || revisionsCount < 2) { return null; } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_post_type_support_check__WEBPACK_IMPORTED_MODULE_2__["default"], { supportKeys: "revisions" }, children); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["withSelect"])(function (select) { var _select = select('core/editor'), getCurrentPostLastRevisionId = _select.getCurrentPostLastRevisionId, getCurrentPostRevisionsCount = _select.getCurrentPostRevisionsCount; return { lastRevisionId: getCurrentPostLastRevisionId(), revisionsCount: getCurrentPostRevisionsCount() }; })(PostLastRevisionCheck)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-last-revision/index.js": /*!********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-last-revision/index.js ***! \********************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _check__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./check */ "./node_modules/@wordpress/editor/build-module/components/post-last-revision/check.js"); /* harmony import */ var _utils_url__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/url */ "./node_modules/@wordpress/editor/build-module/utils/url.js"); /** * WordPress dependencies */ /** * Internal dependencies */ function LastRevision(_ref) { var lastRevisionId = _ref.lastRevisionId, revisionsCount = _ref.revisionsCount; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_check__WEBPACK_IMPORTED_MODULE_4__["default"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["IconButton"], { href: Object(_utils_url__WEBPACK_IMPORTED_MODULE_5__["getWPAdminURL"])('revision.php', { revision: lastRevisionId, gutenberg: true }), className: "editor-post-last-revision__title", icon: "backup" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["_n"])('%d Revision', '%d Revisions', revisionsCount), revisionsCount))); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withSelect"])(function (select) { var _select = select('core/editor'), getCurrentPostLastRevisionId = _select.getCurrentPostLastRevisionId, getCurrentPostRevisionsCount = _select.getCurrentPostRevisionsCount; return { lastRevisionId: getCurrentPostLastRevisionId(), revisionsCount: getCurrentPostRevisionsCount() }; })(LastRevision)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-locked-modal/index.js": /*!*******************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-locked-modal/index.js ***! \*******************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! jquery */ "jquery"); /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url"); /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _utils_url__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/url */ "./node_modules/@wordpress/editor/build-module/utils/url.js"); /* harmony import */ var _post_preview_button__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../post-preview-button */ "./node_modules/@wordpress/editor/build-module/components/post-preview-button/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var PostLockedModal = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(PostLockedModal, _Component); function PostLockedModal() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, PostLockedModal); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(PostLockedModal).apply(this, arguments)); _this.sendPostLock = _this.sendPostLock.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.receivePostLock = _this.receivePostLock.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.releasePostLock = _this.releasePostLock.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(PostLockedModal, [{ key: "componentDidMount", value: function componentDidMount() { // Details on these events on the Heartbeat API docs // https://developer.wordpress.org/plugins/javascript/heartbeat-api/ jquery__WEBPACK_IMPORTED_MODULE_7___default()(document).on('heartbeat-send.refresh-lock', this.sendPostLock).on('heartbeat-tick.refresh-lock', this.receivePostLock); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { jquery__WEBPACK_IMPORTED_MODULE_7___default()(document).off('heartbeat-send.refresh-lock', this.sendPostLock).off('heartbeat-tick.refresh-lock', this.receivePostLock); } /** * Keep the lock refreshed. * * When the user does not send a heartbeat in a heartbeat-tick * the user is no longer editing and another user can start editing. * * @param {Object} event Event. * @param {Object} data Data to send in the heartbeat request. */ }, { key: "sendPostLock", value: function sendPostLock(event, data) { var _this$props = this.props, isLocked = _this$props.isLocked, activePostLock = _this$props.activePostLock, postId = _this$props.postId; if (isLocked) { return; } data['wp-refresh-post-lock'] = { lock: activePostLock, post_id: postId }; } /** * Refresh post locks: update the lock string or show the dialog if somebody has taken over editing. * * @param {Object} event Event. * @param {Object} data Data received in the heartbeat request */ }, { key: "receivePostLock", value: function receivePostLock(event, data) { if (!data['wp-refresh-post-lock']) { return; } var _this$props2 = this.props, autosave = _this$props2.autosave, updatePostLock = _this$props2.updatePostLock; var received = data['wp-refresh-post-lock']; if (received.lock_error) { // Auto save and display the takeover modal. autosave(); updatePostLock({ isLocked: true, isTakeover: true, user: { avatar: received.lock_error.avatar_src } }); } else if (received.new_lock) { updatePostLock({ isLocked: false, activePostLock: received.new_lock }); } } /** * Unlock the post before the window is exited. */ }, { key: "releasePostLock", value: function releasePostLock() { var _this$props3 = this.props, isLocked = _this$props3.isLocked, activePostLock = _this$props3.activePostLock, postLockUtils = _this$props3.postLockUtils, postId = _this$props3.postId; if (isLocked || !activePostLock) { return; } var data = { action: 'wp-remove-post-lock', _wpnonce: postLockUtils.unlockNonce, post_ID: postId, active_post_lock: activePostLock }; jquery__WEBPACK_IMPORTED_MODULE_7___default.a.post({ async: false, url: postLockUtils.ajaxUrl, data: data }); } }, { key: "render", value: function render() { var _this$props4 = this.props, user = _this$props4.user, postId = _this$props4.postId, isLocked = _this$props4.isLocked, isTakeover = _this$props4.isTakeover, postLockUtils = _this$props4.postLockUtils, postType = _this$props4.postType; if (!isLocked) { return null; } var userDisplayName = user.name; var userAvatar = user.avatar; var unlockUrl = Object(_wordpress_url__WEBPACK_IMPORTED_MODULE_12__["addQueryArgs"])('post.php', { 'get-post-lock': '1', lockKey: true, post: postId, action: 'edit', _wpnonce: postLockUtils.nonce }); var allPostsUrl = Object(_utils_url__WEBPACK_IMPORTED_MODULE_14__["getWPAdminURL"])('edit.php', { post_type: Object(lodash__WEBPACK_IMPORTED_MODULE_8__["get"])(postType, ['slug']) }); var allPostsLabel = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["get"])(postType, ['labels', 'all_items']); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["Modal"], { title: isTakeover ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Someone else has taken over this post.') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('This post is already being edited.'), focusOnMount: true, shouldCloseOnClickOutside: false, shouldCloseOnEsc: false, isDismissable: false, className: "editor-post-locked-modal" }, !!userAvatar && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("img", { src: userAvatar, alt: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Avatar'), className: "editor-post-locked-modal__avatar" }), !!isTakeover && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", null, userDisplayName ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["sprintf"])( /* translators: %s: user's display name */ Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved.'), userDisplayName) : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { className: "editor-post-locked-modal__buttons" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["Button"], { isPrimary: true, isLarge: true, href: allPostsUrl }, allPostsLabel))), !isTakeover && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", null, userDisplayName ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["sprintf"])( /* translators: %s: user's display name */ Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('%s is currently working on this post, which means you cannot make changes, unless you take over.'), userDisplayName) : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Another user is currently working on this post, which means you cannot make changes, unless you take over.')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { className: "editor-post-locked-modal__buttons" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["Button"], { isDefault: true, isLarge: true, href: allPostsUrl }, allPostsLabel), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_post_preview_button__WEBPACK_IMPORTED_MODULE_15__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["Button"], { isPrimary: true, isLarge: true, href: unlockUrl }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Take Over'))))); } }]); return PostLockedModal; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__["withSelect"])(function (select) { var _select = select('core/editor'), getEditorSettings = _select.getEditorSettings, isPostLocked = _select.isPostLocked, isPostLockTakeover = _select.isPostLockTakeover, getPostLockUser = _select.getPostLockUser, getCurrentPostId = _select.getCurrentPostId, getActivePostLock = _select.getActivePostLock, getEditedPostAttribute = _select.getEditedPostAttribute; var _select2 = select('core'), getPostType = _select2.getPostType; return { isLocked: isPostLocked(), isTakeover: isPostLockTakeover(), user: getPostLockUser(), postId: getCurrentPostId(), postLockUtils: getEditorSettings().postLockUtils, activePostLock: getActivePostLock(), postType: getPostType(getEditedPostAttribute('type')) }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), autosave = _dispatch.autosave, updatePostLock = _dispatch.updatePostLock; return { autosave: autosave, updatePostLock: updatePostLock }; }), Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__["withGlobalEvents"])({ beforeunload: 'releasePostLock' }))(PostLockedModal)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-pending-status/check.js": /*!*********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-pending-status/check.js ***! \*********************************************************************************************/ /*! exports provided: PostPendingStatusCheck, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostPendingStatusCheck", function() { return PostPendingStatusCheck; }); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /** * External dependencies */ /** * WordPress dependencies */ function PostPendingStatusCheck(_ref) { var hasPublishAction = _ref.hasPublishAction, isPublished = _ref.isPublished, children = _ref.children; if (isPublished || !hasPublishAction) { return null; } return children; } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select) { var _select = select('core/editor'), isCurrentPostPublished = _select.isCurrentPostPublished, getCurrentPostType = _select.getCurrentPostType, getCurrentPost = _select.getCurrentPost; return { hasPublishAction: Object(lodash__WEBPACK_IMPORTED_MODULE_0__["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false), isPublished: isCurrentPostPublished(), postType: getCurrentPostType() }; }))(PostPendingStatusCheck)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-pending-status/index.js": /*!*********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-pending-status/index.js ***! \*********************************************************************************************/ /*! exports provided: PostPendingStatus, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostPendingStatus", function() { return PostPendingStatus; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _check__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./check */ "./node_modules/@wordpress/editor/build-module/components/post-pending-status/check.js"); /** * WordPress dependencies */ /** * Internal dependencies */ function PostPendingStatus(_ref) { var status = _ref.status, onUpdateStatus = _ref.onUpdateStatus; var togglePendingStatus = function togglePendingStatus() { var updatedStatus = status === 'pending' ? 'draft' : 'pending'; onUpdateStatus(updatedStatus); }; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_check__WEBPACK_IMPORTED_MODULE_5__["default"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["CheckboxControl"], { label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Pending Review'), checked: status === 'pending', onChange: togglePendingStatus })); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withSelect"])(function (select) { return { status: select('core/editor').getEditedPostAttribute('status') }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withDispatch"])(function (dispatch) { return { onUpdateStatus: function onUpdateStatus(status) { dispatch('core/editor').editPost({ status: status }); } }; }))(PostPendingStatus)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-permalink/editor.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-permalink/editor.js ***! \*****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _utils_url__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/url */ "./node_modules/@wordpress/editor/build-module/utils/url.js"); /** * WordPress dependencies */ /** * Internal dependencies */ var PostPermalinkEditor = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(PostPermalinkEditor, _Component); function PostPermalinkEditor(_ref) { var _this; var permalinkParts = _ref.permalinkParts, slug = _ref.slug; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, PostPermalinkEditor); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(PostPermalinkEditor).apply(this, arguments)); _this.state = { editedPostName: slug || permalinkParts.postName }; _this.onSavePermalink = _this.onSavePermalink.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(PostPermalinkEditor, [{ key: "onSavePermalink", value: function onSavePermalink(event) { var postName = Object(_utils_url__WEBPACK_IMPORTED_MODULE_11__["cleanForSlug"])(this.state.editedPostName); event.preventDefault(); this.props.onSave(); if (postName === this.props.postName) { return; } this.props.editPost({ slug: postName }); this.setState({ editedPostName: postName }); } }, { key: "render", value: function render() { var _this2 = this; var _this$props$permalink = this.props.permalinkParts, prefix = _this$props$permalink.prefix, suffix = _this$props$permalink.suffix; var editedPostName = this.state.editedPostName; /* eslint-disable jsx-a11y/no-autofocus */ // Autofocus is allowed here, as this mini-UI is only loaded when the user clicks to open it. return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("form", { className: "editor-post-permalink-editor", onSubmit: this.onSavePermalink }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("span", { className: "editor-post-permalink__editor-container" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("span", { className: "editor-post-permalink-editor__prefix" }, prefix), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("input", { className: "editor-post-permalink-editor__edit", "aria-label": Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('Edit post permalink'), value: editedPostName, onChange: function onChange(event) { return _this2.setState({ editedPostName: event.target.value }); }, type: "text", autoFocus: true }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("span", { className: "editor-post-permalink-editor__suffix" }, suffix), "\u200E"), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__["Button"], { className: "editor-post-permalink-editor__save", isLarge: true, onClick: this.onSavePermalink }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('Save'))); /* eslint-enable jsx-a11y/no-autofocus */ } }]); return PostPermalinkEditor; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__["withSelect"])(function (select) { var _select = select('core/editor'), getPermalinkParts = _select.getPermalinkParts; return { permalinkParts: getPermalinkParts() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), editPost = _dispatch.editPost; return { editPost: editPost }; })])(PostPermalinkEditor)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-permalink/index.js": /*!****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-permalink/index.js ***! \****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url"); /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./editor.js */ "./node_modules/@wordpress/editor/build-module/components/post-permalink/editor.js"); /* harmony import */ var _utils_url__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/url */ "./node_modules/@wordpress/editor/build-module/utils/url.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal Dependencies */ var PostPermalink = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(PostPermalink, _Component); function PostPermalink() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, PostPermalink); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(PostPermalink).apply(this, arguments)); _this.addVisibilityCheck = _this.addVisibilityCheck.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onVisibilityChange = _this.onVisibilityChange.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.state = { isCopied: false, isEditingPermalink: false }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(PostPermalink, [{ key: "addVisibilityCheck", value: function addVisibilityCheck() { window.addEventListener('visibilitychange', this.onVisibilityChange); } }, { key: "onVisibilityChange", value: function onVisibilityChange() { var _this$props = this.props, isEditable = _this$props.isEditable, refreshPost = _this$props.refreshPost; // If the user just returned after having clicked the "Change Permalinks" button, // fetch a new copy of the post from the server, just in case they enabled permalinks. if (!isEditable && 'visible' === document.visibilityState) { refreshPost(); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps, prevState) { // If we've just stopped editing the permalink, focus on the new permalink. if (prevState.isEditingPermalink && !this.state.isEditingPermalink) { this.linkElement.focus(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { window.removeEventListener('visibilitychange', this.addVisibilityCheck); } }, { key: "render", value: function render() { var _this2 = this; var _this$props2 = this.props, isNew = _this$props2.isNew, postLink = _this$props2.postLink, permalinkParts = _this$props2.permalinkParts, postSlug = _this$props2.postSlug, postTitle = _this$props2.postTitle, postID = _this$props2.postID, isEditable = _this$props2.isEditable, isPublished = _this$props2.isPublished; if (isNew || !postLink) { return null; } var _this$state = this.state, isCopied = _this$state.isCopied, isEditingPermalink = _this$state.isEditingPermalink; var ariaLabel = isCopied ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Permalink copied') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Copy the permalink'); var prefix = permalinkParts.prefix, suffix = permalinkParts.suffix; var slug = postSlug || Object(_utils_url__WEBPACK_IMPORTED_MODULE_14__["cleanForSlug"])(postTitle) || postID; var samplePermalink = isEditable ? prefix + slug + suffix : prefix; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { className: "editor-post-permalink" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__["ClipboardButton"], { className: classnames__WEBPACK_IMPORTED_MODULE_7___default()('editor-post-permalink__copy', { 'is-copied': isCopied }), text: samplePermalink, label: ariaLabel, onCopy: function onCopy() { return _this2.setState({ isCopied: true }); }, "aria-disabled": isCopied, icon: "admin-links" }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("span", { className: "editor-post-permalink__label" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Permalink:')), !isEditingPermalink && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__["ExternalLink"], { className: "editor-post-permalink__link", href: !isPublished ? postLink : samplePermalink, target: "_blank", ref: function ref(linkElement) { return _this2.linkElement = linkElement; } }, Object(_wordpress_url__WEBPACK_IMPORTED_MODULE_12__["safeDecodeURI"])(samplePermalink), "\u200E"), isEditingPermalink && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_editor_js__WEBPACK_IMPORTED_MODULE_13__["default"], { slug: slug, onSave: function onSave() { return _this2.setState({ isEditingPermalink: false }); } }), isEditable && !isEditingPermalink && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__["Button"], { className: "editor-post-permalink__edit", isLarge: true, onClick: function onClick() { return _this2.setState({ isEditingPermalink: true }); } }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Edit')), !isEditable && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__["Button"], { className: "editor-post-permalink__change", isLarge: true, href: Object(_utils_url__WEBPACK_IMPORTED_MODULE_14__["getWPAdminURL"])('options-permalink.php'), onClick: this.addVisibilityCheck, target: "_blank" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Change Permalinks'))); } }]); return PostPermalink; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__["withSelect"])(function (select) { var _select = select('core/editor'), isEditedPostNew = _select.isEditedPostNew, isPermalinkEditable = _select.isPermalinkEditable, getCurrentPost = _select.getCurrentPost, getPermalinkParts = _select.getPermalinkParts, getEditedPostAttribute = _select.getEditedPostAttribute, isCurrentPostPublished = _select.isCurrentPostPublished; var _getCurrentPost = getCurrentPost(), id = _getCurrentPost.id, link = _getCurrentPost.link; return { isNew: isEditedPostNew(), postLink: link, permalinkParts: getPermalinkParts(), postSlug: getEditedPostAttribute('slug'), isEditable: isPermalinkEditable(), isPublished: isCurrentPostPublished(), postTitle: getEditedPostAttribute('title'), postID: id }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), refreshPost = _dispatch.refreshPost; return { refreshPost: refreshPost }; })])(PostPermalink)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-pingbacks/index.js": /*!****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-pingbacks/index.js ***! \****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__); /** * WordPress dependencies */ function PostPingbacks(_ref) { var _ref$pingStatus = _ref.pingStatus, pingStatus = _ref$pingStatus === void 0 ? 'open' : _ref$pingStatus, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref, ["pingStatus"]); var onTogglePingback = function onTogglePingback() { return props.editPost({ ping_status: pingStatus === 'open' ? 'closed' : 'open' }); }; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["CheckboxControl"], { label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Allow Pingbacks & Trackbacks'), checked: pingStatus === 'open', onChange: onTogglePingback }); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withSelect"])(function (select) { return { pingStatus: select('core/editor').getEditedPostAttribute('ping_status') }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withDispatch"])(function (dispatch) { return { editPost: dispatch('core/editor').editPost }; })])(PostPingbacks)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-preview-button/index.js": /*!*********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-preview-button/index.js ***! \*********************************************************************************************/ /*! exports provided: PostPreviewButton, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostPreviewButton", function() { return PostPreviewButton; }); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_nux__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/nux */ "@wordpress/nux"); /* harmony import */ var _wordpress_nux__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_nux__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_12__); /** * External dependencies */ /** * WordPress dependencies */ function writeInterstitialMessage(targetDocument) { var markup = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["renderToString"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { className: "editor-post-preview-button__interstitial-message" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 96 96" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["Path"], { className: "outer", d: "M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36", fill: "none" }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["Path"], { className: "inner", d: "M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z", fill: "none" })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Generating preview…')))); markup += "\n\t\t\n\t"; targetDocument.write(markup); targetDocument.close(); } var PostPreviewButton = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(PostPreviewButton, _Component); function PostPreviewButton() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, PostPreviewButton); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(PostPreviewButton).apply(this, arguments)); _this.openPreviewWindow = _this.openPreviewWindow.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(PostPreviewButton, [{ key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var previewLink = this.props.previewLink; // This relies on the window being responsible to unset itself when // navigation occurs or a new preview window is opened, to avoid // unintentional forceful redirects. if (previewLink && !prevProps.previewLink) { this.setPreviewWindowLink(previewLink); } } /** * Sets the preview window's location to the given URL, if a preview window * exists and is not closed. * * @param {string} url URL to assign as preview window location. */ }, { key: "setPreviewWindowLink", value: function setPreviewWindowLink(url) { var previewWindow = this.previewWindow; if (previewWindow && !previewWindow.closed) { previewWindow.location = url; } } }, { key: "getWindowTarget", value: function getWindowTarget() { var postId = this.props.postId; return "wp-preview-".concat(postId); } }, { key: "openPreviewWindow", value: function openPreviewWindow(event) { // Our Preview button has its 'href' and 'target' set correctly for a11y // purposes. Unfortunately, though, we can't rely on the default 'click' // handler since sometimes it incorrectly opens a new tab instead of reusing // the existing one. // https://github.com/WordPress/gutenberg/pull/8330 event.preventDefault(); // Open up a Preview tab if needed. This is where we'll show the preview. if (!this.previewWindow || this.previewWindow.closed) { this.previewWindow = window.open('', this.getWindowTarget()); } // Focus the Preview tab. This might not do anything, depending on the browser's // and user's preferences. // https://html.spec.whatwg.org/multipage/interaction.html#dom-window-focus this.previewWindow.focus(); // If we don't need to autosave the post before previewing, then we simply // load the Preview URL in the Preview tab. if (!this.props.isAutosaveable) { this.setPreviewWindowLink(event.target.href); return; } // Request an autosave. This happens asynchronously and causes the component // to update when finished. if (this.props.isDraft) { this.props.savePost({ isPreview: true }); } else { this.props.autosave({ isPreview: true }); } // Display a 'Generating preview' message in the Preview tab while we wait for the // autosave to finish. writeInterstitialMessage(this.previewWindow.document); } }, { key: "render", value: function render() { var _this$props = this.props, previewLink = _this$props.previewLink, currentPostLink = _this$props.currentPostLink, isSaveable = _this$props.isSaveable; // Link to the `?preview=true` URL if we have it, since this lets us see // changes that were autosaved since the post was last published. Otherwise, // just link to the post's URL. var href = previewLink || currentPostLink; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["Button"], { isLarge: true, className: "editor-post-preview", href: href, target: this.getWindowTarget(), disabled: !isSaveable, onClick: this.openPreviewWindow }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["_x"])('Preview', 'imperative verb'), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("span", { className: "screen-reader-text" }, /* translators: accessibility text */ Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('(opens in a new tab)')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_nux__WEBPACK_IMPORTED_MODULE_11__["DotTip"], { tipId: "core/editor.preview" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Click “Preview” to load a preview of this page, so you can make sure you’re happy with your blocks.'))); } }]); return PostPreviewButton; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_12__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withSelect"])(function (select, _ref) { var forcePreviewLink = _ref.forcePreviewLink, forceIsAutosaveable = _ref.forceIsAutosaveable; var _select = select('core/editor'), getCurrentPostId = _select.getCurrentPostId, getCurrentPostAttribute = _select.getCurrentPostAttribute, getEditedPostAttribute = _select.getEditedPostAttribute, isEditedPostSaveable = _select.isEditedPostSaveable, isEditedPostAutosaveable = _select.isEditedPostAutosaveable, getEditedPostPreviewLink = _select.getEditedPostPreviewLink; var _select2 = select('core'), getPostType = _select2.getPostType; var previewLink = getEditedPostPreviewLink(); var postType = getPostType(getEditedPostAttribute('type')); return { postId: getCurrentPostId(), currentPostLink: getCurrentPostAttribute('link'), previewLink: forcePreviewLink !== undefined ? forcePreviewLink : previewLink, isSaveable: isEditedPostSaveable(), isAutosaveable: forceIsAutosaveable || isEditedPostAutosaveable(), isViewable: Object(lodash__WEBPACK_IMPORTED_MODULE_7__["get"])(postType, ['viewable'], false), isDraft: ['draft', 'auto-draft'].indexOf(getEditedPostAttribute('status')) !== -1 }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withDispatch"])(function (dispatch) { return { autosave: dispatch('core/editor').autosave, savePost: dispatch('core/editor').savePost }; }), Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_12__["ifCondition"])(function (_ref2) { var isViewable = _ref2.isViewable; return isViewable; })])(PostPreviewButton)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-publish-button/index.js": /*!*********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-publish-button/index.js ***! \*********************************************************************************************/ /*! exports provided: PostPublishButton, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostPublishButton", function() { return PostPublishButton; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_nux__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/nux */ "@wordpress/nux"); /* harmony import */ var _wordpress_nux__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_nux__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _label__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./label */ "./node_modules/@wordpress/editor/build-module/components/post-publish-button/label.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var PostPublishButton = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__["default"])(PostPublishButton, _Component); function PostPublishButton(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, PostPublishButton); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(PostPublishButton).call(this, props)); _this.buttonNode = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createRef"])(); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(PostPublishButton, [{ key: "componentDidMount", value: function componentDidMount() { if (this.props.focusOnMount) { this.buttonNode.current.focus(); } } }, { key: "render", value: function render() { var _this$props = this.props, forceIsDirty = _this$props.forceIsDirty, forceIsSaving = _this$props.forceIsSaving, hasPublishAction = _this$props.hasPublishAction, isBeingScheduled = _this$props.isBeingScheduled, isOpen = _this$props.isOpen, isPostSavingLocked = _this$props.isPostSavingLocked, isPublishable = _this$props.isPublishable, isPublished = _this$props.isPublished, isSaveable = _this$props.isSaveable, isSaving = _this$props.isSaving, isToggle = _this$props.isToggle, onSave = _this$props.onSave, onStatusChange = _this$props.onStatusChange, _this$props$onSubmit = _this$props.onSubmit, onSubmit = _this$props$onSubmit === void 0 ? lodash__WEBPACK_IMPORTED_MODULE_7__["noop"] : _this$props$onSubmit, onToggle = _this$props.onToggle, visibility = _this$props.visibility; var isButtonDisabled = isSaving || forceIsSaving || !isSaveable || isPostSavingLocked || !isPublishable && !forceIsDirty; var isToggleDisabled = isPublished || isSaving || forceIsSaving || !isSaveable || !isPublishable && !forceIsDirty; var publishStatus; if (!hasPublishAction) { publishStatus = 'pending'; } else if (isBeingScheduled) { publishStatus = 'future'; } else if (visibility === 'private') { publishStatus = 'private'; } else { publishStatus = 'publish'; } var onClick = function onClick() { onSubmit(); onStatusChange(publishStatus); onSave(); }; var buttonProps = { 'aria-disabled': isButtonDisabled, className: 'editor-post-publish-button', isBusy: isSaving && isPublished, isLarge: true, isPrimary: true, onClick: onClick }; var toggleProps = { 'aria-disabled': isToggleDisabled, 'aria-expanded': isOpen, className: 'editor-post-publish-panel__toggle', isBusy: isSaving && isPublished, isPrimary: true, onClick: onToggle }; var toggleChildren = isBeingScheduled ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Schedule…') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Publish…'); var buttonChildren = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_label__WEBPACK_IMPORTED_MODULE_13__["default"], { forceIsSaving: forceIsSaving }); var componentProps = isToggle ? toggleProps : buttonProps; var componentChildren = isToggle ? toggleChildren : buttonChildren; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["Button"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ ref: this.buttonNode }, componentProps), componentChildren, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_nux__WEBPACK_IMPORTED_MODULE_12__["DotTip"], { tipId: "core/editor.publish" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Finished writing? That’s great, let’s get this published right now. Just click “Publish” and you’re good to go.'))); } }]); return PostPublishButton; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withSelect"])(function (select) { var _select = select('core/editor'), isSavingPost = _select.isSavingPost, isEditedPostBeingScheduled = _select.isEditedPostBeingScheduled, getEditedPostVisibility = _select.getEditedPostVisibility, isCurrentPostPublished = _select.isCurrentPostPublished, isEditedPostSaveable = _select.isEditedPostSaveable, isEditedPostPublishable = _select.isEditedPostPublishable, isPostSavingLocked = _select.isPostSavingLocked, getCurrentPost = _select.getCurrentPost, getCurrentPostType = _select.getCurrentPostType; return { isSaving: isSavingPost(), isBeingScheduled: isEditedPostBeingScheduled(), visibility: getEditedPostVisibility(), isSaveable: isEditedPostSaveable(), isPostSavingLocked: isPostSavingLocked(), isPublishable: isEditedPostPublishable(), isPublished: isCurrentPostPublished(), hasPublishAction: Object(lodash__WEBPACK_IMPORTED_MODULE_7__["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false), postType: getCurrentPostType() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), editPost = _dispatch.editPost, savePost = _dispatch.savePost; return { onStatusChange: function onStatusChange(status) { return editPost({ status: status }); }, onSave: savePost }; })])(PostPublishButton)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-publish-button/label.js": /*!*********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-publish-button/label.js ***! \*********************************************************************************************/ /*! exports provided: PublishButtonLabel, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PublishButtonLabel", function() { return PublishButtonLabel; }); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /** * External dependencies */ /** * WordPress dependencies */ function PublishButtonLabel(_ref) { var isPublished = _ref.isPublished, isBeingScheduled = _ref.isBeingScheduled, isSaving = _ref.isSaving, isPublishing = _ref.isPublishing, hasPublishAction = _ref.hasPublishAction, isAutosaving = _ref.isAutosaving; if (isPublishing) { return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Publishing…'); } else if (isPublished && isSaving && !isAutosaving) { return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Updating…'); } else if (isBeingScheduled && isSaving && !isAutosaving) { return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Scheduling…'); } if (!hasPublishAction) { return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Submit for Review'); } else if (isPublished) { return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Update'); } else if (isBeingScheduled) { return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Schedule'); } return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Publish'); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withSelect"])(function (select, _ref2) { var forceIsSaving = _ref2.forceIsSaving; var _select = select('core/editor'), isCurrentPostPublished = _select.isCurrentPostPublished, isEditedPostBeingScheduled = _select.isEditedPostBeingScheduled, isSavingPost = _select.isSavingPost, isPublishingPost = _select.isPublishingPost, getCurrentPost = _select.getCurrentPost, getCurrentPostType = _select.getCurrentPostType, isAutosavingPost = _select.isAutosavingPost; return { isPublished: isCurrentPostPublished(), isBeingScheduled: isEditedPostBeingScheduled(), isSaving: forceIsSaving || isSavingPost(), isPublishing: isPublishingPost(), hasPublishAction: Object(lodash__WEBPACK_IMPORTED_MODULE_0__["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false), postType: getCurrentPostType(), isAutosaving: isAutosavingPost() }; })])(PublishButtonLabel)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-publish-panel/index.js": /*!********************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/index.js ***! \********************************************************************************************/ /*! exports provided: PostPublishPanel, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostPublishPanel", function() { return PostPublishPanel; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _post_publish_button__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../post-publish-button */ "./node_modules/@wordpress/editor/build-module/components/post-publish-button/index.js"); /* harmony import */ var _prepublish__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./prepublish */ "./node_modules/@wordpress/editor/build-module/components/post-publish-panel/prepublish.js"); /* harmony import */ var _postpublish__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./postpublish */ "./node_modules/@wordpress/editor/build-module/components/post-publish-panel/postpublish.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal Dependencies */ var PostPublishPanel = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__["default"])(PostPublishPanel, _Component); function PostPublishPanel() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, PostPublishPanel); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__["default"])(PostPublishPanel).apply(this, arguments)); _this.onSubmit = _this.onSubmit.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(PostPublishPanel, [{ key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { // Automatically collapse the publish sidebar when a post // is published and the user makes an edit. if (prevProps.isPublished && !this.props.isSaving && this.props.isDirty) { this.props.onClose(); } } }, { key: "onSubmit", value: function onSubmit() { var _this$props = this.props, onClose = _this$props.onClose, hasPublishAction = _this$props.hasPublishAction, isPostTypeViewable = _this$props.isPostTypeViewable; if (!hasPublishAction || !isPostTypeViewable) { onClose(); } } }, { key: "render", value: function render() { var _this$props2 = this.props, forceIsDirty = _this$props2.forceIsDirty, forceIsSaving = _this$props2.forceIsSaving, isBeingScheduled = _this$props2.isBeingScheduled, isPublished = _this$props2.isPublished, isPublishSidebarEnabled = _this$props2.isPublishSidebarEnabled, isScheduled = _this$props2.isScheduled, isSaving = _this$props2.isSaving, onClose = _this$props2.onClose, onTogglePublishSidebar = _this$props2.onTogglePublishSidebar, PostPublishExtension = _this$props2.PostPublishExtension, PrePublishExtension = _this$props2.PrePublishExtension, additionalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_this$props2, ["forceIsDirty", "forceIsSaving", "isBeingScheduled", "isPublished", "isPublishSidebarEnabled", "isScheduled", "isSaving", "onClose", "onTogglePublishSidebar", "PostPublishExtension", "PrePublishExtension"]); var propsForPanel = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["omit"])(additionalProps, ['hasPublishAction', 'isDirty', 'isPostTypeViewable']); var isPublishedOrScheduled = isPublished || isScheduled && isBeingScheduled; var isPrePublish = !isPublishedOrScheduled && !isSaving; var isPostPublish = isPublishedOrScheduled && !isSaving; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "editor-post-publish-panel" }, propsForPanel), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { className: "editor-post-publish-panel__header" }, isPostPublish ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { className: "editor-post-publish-panel__header-published" }, isScheduled ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Scheduled') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Published')) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { className: "editor-post-publish-panel__header-publish-button" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_post_publish_button__WEBPACK_IMPORTED_MODULE_14__["default"], { focusOnMount: true, onSubmit: this.onSubmit, forceIsDirty: forceIsDirty, forceIsSaving: forceIsSaving }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("span", { className: "editor-post-publish-panel__spacer" })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__["IconButton"], { "aria-expanded": true, onClick: onClose, icon: "no-alt", label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Close panel') })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { className: "editor-post-publish-panel__content" }, isPrePublish && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_prepublish__WEBPACK_IMPORTED_MODULE_15__["default"], null, PrePublishExtension && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(PrePublishExtension, null)), isPostPublish && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_postpublish__WEBPACK_IMPORTED_MODULE_16__["default"], { focusOnMount: true }, PostPublishExtension && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(PostPublishExtension, null)), isSaving && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__["Spinner"], null)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { className: "editor-post-publish-panel__footer" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__["CheckboxControl"], { label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Always show pre-publish checks.'), checked: isPublishSidebarEnabled, onChange: onTogglePublishSidebar }))); } }]); return PostPublishPanel; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_12__["withSelect"])(function (select) { var _select = select('core'), getPostType = _select.getPostType; var _select2 = select('core/editor'), getCurrentPost = _select2.getCurrentPost, getEditedPostAttribute = _select2.getEditedPostAttribute, isCurrentPostPublished = _select2.isCurrentPostPublished, isCurrentPostScheduled = _select2.isCurrentPostScheduled, isEditedPostBeingScheduled = _select2.isEditedPostBeingScheduled, isEditedPostDirty = _select2.isEditedPostDirty, isSavingPost = _select2.isSavingPost; var _select3 = select('core/editor'), isPublishSidebarEnabled = _select3.isPublishSidebarEnabled; var postType = getPostType(getEditedPostAttribute('type')); return { hasPublishAction: Object(lodash__WEBPACK_IMPORTED_MODULE_9__["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false), isPostTypeViewable: Object(lodash__WEBPACK_IMPORTED_MODULE_9__["get"])(postType, ['viewable'], false), isBeingScheduled: isEditedPostBeingScheduled(), isDirty: isEditedPostDirty(), isPublished: isCurrentPostPublished(), isPublishSidebarEnabled: isPublishSidebarEnabled(), isSaving: isSavingPost(), isScheduled: isCurrentPostScheduled() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_12__["withDispatch"])(function (dispatch, _ref) { var isPublishSidebarEnabled = _ref.isPublishSidebarEnabled; var _dispatch = dispatch('core/editor'), disablePublishSidebar = _dispatch.disablePublishSidebar, enablePublishSidebar = _dispatch.enablePublishSidebar; return { onTogglePublishSidebar: function onTogglePublishSidebar() { if (isPublishSidebarEnabled) { disablePublishSidebar(); } else { enablePublishSidebar(); } } }; }), _wordpress_components__WEBPACK_IMPORTED_MODULE_11__["withFocusReturn"], _wordpress_components__WEBPACK_IMPORTED_MODULE_11__["withConstrainedTabbing"]])(PostPublishPanel)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-publish-panel/maybe-post-format-panel.js": /*!**************************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/maybe-post-format-panel.js ***! \**************************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _post_format__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../post-format */ "./node_modules/@wordpress/editor/build-module/components/post-format/index.js"); /** * External dependencies */ /** * WordPress dependencies. */ /** * Internal dependencies. */ var PostFormatSuggestion = function PostFormatSuggestion(_ref) { var suggestedPostFormat = _ref.suggestedPostFormat, suggestionText = _ref.suggestionText, onUpdatePostFormat = _ref.onUpdatePostFormat; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["Button"], { isLink: true, onClick: function onClick() { return onUpdatePostFormat(suggestedPostFormat); } }, suggestionText); }; var PostFormatPanel = function PostFormatPanel(_ref2) { var suggestion = _ref2.suggestion, onUpdatePostFormat = _ref2.onUpdatePostFormat; var panelBodyTitle = [Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Suggestion:'), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { className: "editor-post-publish-panel__link", key: "label" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Use a post format'))]; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["PanelBody"], { initialOpen: false, title: panelBodyTitle }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(PostFormatSuggestion, { onUpdatePostFormat: onUpdatePostFormat, suggestedPostFormat: suggestion.id, suggestionText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Apply the "%1$s" format.'), suggestion.caption) }))); }; var getSuggestion = function getSuggestion(supportedFormats, suggestedPostFormat) { var formats = _post_format__WEBPACK_IMPORTED_MODULE_6__["POST_FORMATS"].filter(function (format) { return Object(lodash__WEBPACK_IMPORTED_MODULE_1__["includes"])(supportedFormats, format.id); }); return Object(lodash__WEBPACK_IMPORTED_MODULE_1__["find"])(formats, function (format) { return format.id === suggestedPostFormat; }); }; /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withSelect"])(function (select) { var _select = select('core/editor'), getEditedPostAttribute = _select.getEditedPostAttribute, getSuggestedPostFormat = _select.getSuggestedPostFormat; var supportedFormats = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(select('core').getThemeSupports(), ['formats'], []); return { currentPostFormat: getEditedPostAttribute('format'), suggestion: getSuggestion(supportedFormats, getSuggestedPostFormat()) }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withDispatch"])(function (dispatch) { return { onUpdatePostFormat: function onUpdatePostFormat(postFormat) { dispatch('core/editor').editPost({ format: postFormat }); } }; }), Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["ifCondition"])(function (_ref3) { var suggestion = _ref3.suggestion, currentPostFormat = _ref3.currentPostFormat; return suggestion && suggestion.id !== currentPostFormat; }))(PostFormatPanel)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-publish-panel/maybe-tags-panel.js": /*!*******************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/maybe-tags-panel.js ***! \*******************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _post_taxonomies_flat_term_selector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../post-taxonomies/flat-term-selector */ "./node_modules/@wordpress/editor/build-module/components/post-taxonomies/flat-term-selector.js"); /** * External dependencies */ /** * WordPress dependencies */ var TagsPanel = function TagsPanel() { var panelBodyTitle = [Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Suggestion:'), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("span", { className: "editor-post-publish-panel__link", key: "label" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Add tags'))]; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["PanelBody"], { initialOpen: false, title: panelBodyTitle }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("p", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_post_taxonomies_flat_term_selector__WEBPACK_IMPORTED_MODULE_11__["default"], { slug: 'post_tag' })); }; var MaybeTagsPanel = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(MaybeTagsPanel, _Component); function MaybeTagsPanel(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, MaybeTagsPanel); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(MaybeTagsPanel).call(this, props)); _this.state = { hadTagsWhenOpeningThePanel: props.hasTags }; return _this; } /* * We only want to show the tag panel if the post didn't have * any tags when the user hit the Publish button. * * We can't use the prop.hasTags because it'll change to true * if the user adds a new tag within the pre-publish panel. * This would force a re-render and a new prop.hasTags check, * hiding this panel and keeping the user from adding * more than one tag. */ Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(MaybeTagsPanel, [{ key: "render", value: function render() { if (!this.state.hadTagsWhenOpeningThePanel) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(TagsPanel, null); } return null; } }]); return MaybeTagsPanel; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_8__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withSelect"])(function (select) { var postType = select('core/editor').getCurrentPostType(); var tagsTaxonomy = select('core').getTaxonomy('post_tag'); var tags = tagsTaxonomy && select('core/editor').getEditedPostAttribute(tagsTaxonomy.rest_base); return { areTagsFetched: tagsTaxonomy !== undefined, isPostTypeSupported: tagsTaxonomy && Object(lodash__WEBPACK_IMPORTED_MODULE_6__["some"])(tagsTaxonomy.types, function (type) { return type === postType; }), hasTags: tags && tags.length }; }), Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_8__["ifCondition"])(function (_ref) { var areTagsFetched = _ref.areTagsFetched, isPostTypeSupported = _ref.isPostTypeSupported; return isPostTypeSupported && areTagsFetched; }))(MaybeTagsPanel)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-publish-panel/postpublish.js": /*!**************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/postpublish.js ***! \**************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _post_schedule_label__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../post-schedule/label */ "./node_modules/@wordpress/editor/build-module/components/post-schedule/label.js"); /** * External Dependencies */ /** * WordPress Dependencies */ /** * Internal dependencies */ var PostPublishPanelPostpublish = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(PostPublishPanelPostpublish, _Component); function PostPublishPanelPostpublish() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, PostPublishPanelPostpublish); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(PostPublishPanelPostpublish).apply(this, arguments)); _this.state = { showCopyConfirmation: false }; _this.onCopy = _this.onCopy.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onSelectInput = _this.onSelectInput.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.postLink = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createRef"])(); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(PostPublishPanelPostpublish, [{ key: "componentDidMount", value: function componentDidMount() { if (this.props.focusOnMount) { this.postLink.current.focus(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { clearTimeout(this.dismissCopyConfirmation); } }, { key: "onCopy", value: function onCopy() { var _this2 = this; this.setState({ showCopyConfirmation: true }); clearTimeout(this.dismissCopyConfirmation); this.dismissCopyConfirmation = setTimeout(function () { _this2.setState({ showCopyConfirmation: false }); }, 4000); } }, { key: "onSelectInput", value: function onSelectInput(event) { event.target.select(); } }, { key: "render", value: function render() { var _this$props = this.props, children = _this$props.children, isScheduled = _this$props.isScheduled, post = _this$props.post, postType = _this$props.postType; var postLabel = Object(lodash__WEBPACK_IMPORTED_MODULE_7__["get"])(postType, ['labels', 'singular_name']); var viewPostLabel = Object(lodash__WEBPACK_IMPORTED_MODULE_7__["get"])(postType, ['labels', 'view_item']); var postPublishNonLinkHeader = isScheduled ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Fragment"], null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('is now scheduled. It will go live on'), " ", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_post_schedule_label__WEBPACK_IMPORTED_MODULE_11__["default"], null), ".") : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('is now live.'); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { className: "post-publish-panel__postpublish" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["PanelBody"], { className: "post-publish-panel__postpublish-header" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", { ref: this.postLink, href: post.link }, post.title || Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('(no title)')), " ", postPublishNonLinkHeader), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["PanelBody"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { className: "post-publish-panel__postpublish-subheader" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("strong", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('What’s next?'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["TextControl"], { className: "post-publish-panel__postpublish-post-address", readOnly: true, label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["sprintf"])( /* translators: %s: post type singular name */ Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('%s address'), postLabel), value: post.link, onFocus: this.onSelectInput }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { className: "post-publish-panel__postpublish-buttons" }, !isScheduled && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["Button"], { isDefault: true, href: post.link }, viewPostLabel), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["ClipboardButton"], { isDefault: true, text: post.link, onCopy: this.onCopy }, this.state.showCopyConfirmation ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Copied!') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Copy Link')))), children); } }]); return PostPublishPanelPostpublish; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withSelect"])(function (select) { var _select = select('core/editor'), getEditedPostAttribute = _select.getEditedPostAttribute, getCurrentPost = _select.getCurrentPost, isCurrentPostScheduled = _select.isCurrentPostScheduled; var _select2 = select('core'), getPostType = _select2.getPostType; return { post: getCurrentPost(), postType: getPostType(getEditedPostAttribute('type')), isScheduled: isCurrentPostScheduled() }; })(PostPublishPanelPostpublish)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-publish-panel/prepublish.js": /*!*************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/prepublish.js ***! \*************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _post_visibility__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../post-visibility */ "./node_modules/@wordpress/editor/build-module/components/post-visibility/index.js"); /* harmony import */ var _post_visibility_label__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../post-visibility/label */ "./node_modules/@wordpress/editor/build-module/components/post-visibility/label.js"); /* harmony import */ var _post_schedule__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../post-schedule */ "./node_modules/@wordpress/editor/build-module/components/post-schedule/index.js"); /* harmony import */ var _post_schedule_label__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../post-schedule/label */ "./node_modules/@wordpress/editor/build-module/components/post-schedule/label.js"); /* harmony import */ var _maybe_tags_panel__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./maybe-tags-panel */ "./node_modules/@wordpress/editor/build-module/components/post-publish-panel/maybe-tags-panel.js"); /* harmony import */ var _maybe_post_format_panel__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./maybe-post-format-panel */ "./node_modules/@wordpress/editor/build-module/components/post-publish-panel/maybe-post-format-panel.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal Dependencies */ function PostPublishPanelPrepublish(_ref) { var hasPublishAction = _ref.hasPublishAction, isBeingScheduled = _ref.isBeingScheduled, children = _ref.children; var prePublishTitle, prePublishBodyText; if (!hasPublishAction) { prePublishTitle = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Are you ready to submit for review?'); prePublishBodyText = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('When you’re ready, submit your work for review, and an Editor will be able to approve it for you.'); } else if (isBeingScheduled) { prePublishTitle = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Are you ready to schedule?'); prePublishBodyText = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Your work will be published at the specified date and time.'); } else { prePublishTitle = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Are you ready to publish?'); prePublishBodyText = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Double-check your settings before publishing.'); } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-post-publish-panel__prepublish" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("strong", null, prePublishTitle)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", null, prePublishBodyText), hasPublishAction && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["PanelBody"], { initialOpen: false, title: [Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Visibility:'), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { className: "editor-post-publish-panel__link", key: "label" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_post_visibility_label__WEBPACK_IMPORTED_MODULE_6__["default"], null))] }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_post_visibility__WEBPACK_IMPORTED_MODULE_5__["default"], null)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["PanelBody"], { initialOpen: false, title: [Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Publish:'), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { className: "editor-post-publish-panel__link", key: "label" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_post_schedule_label__WEBPACK_IMPORTED_MODULE_8__["default"], null))] }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_post_schedule__WEBPACK_IMPORTED_MODULE_7__["default"], null)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_maybe_post_format_panel__WEBPACK_IMPORTED_MODULE_10__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_maybe_tags_panel__WEBPACK_IMPORTED_MODULE_9__["default"], null), children)); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withSelect"])(function (select) { var _select = select('core/editor'), getCurrentPost = _select.getCurrentPost, isEditedPostBeingScheduled = _select.isEditedPostBeingScheduled; return { hasPublishAction: Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false), isBeingScheduled: isEditedPostBeingScheduled() }; })(PostPublishPanelPrepublish)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-saved-state/index.js": /*!******************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-saved-state/index.js ***! \******************************************************************************************/ /*! exports provided: PostSavedState, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostSavedState", function() { return PostSavedState; }); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/viewport */ "@wordpress/viewport"); /* harmony import */ var _wordpress_viewport__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _post_switch_to_draft_button__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../post-switch-to-draft-button */ "./node_modules/@wordpress/editor/build-module/components/post-switch-to-draft-button/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Component showing whether the post is saved or not and displaying save links. * * @param {Object} Props Component Props. */ var PostSavedState = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(PostSavedState, _Component); function PostSavedState() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, PostSavedState); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(PostSavedState).apply(this, arguments)); _this.state = { forceSavedMessage: false }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(PostSavedState, [{ key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var _this2 = this; if (prevProps.isSaving && !this.props.isSaving) { this.setState({ forceSavedMessage: true }); this.props.setTimeout(function () { _this2.setState({ forceSavedMessage: false }); }, 1000); } } }, { key: "render", value: function render() { var _this$props = this.props, post = _this$props.post, isNew = _this$props.isNew, isScheduled = _this$props.isScheduled, isPublished = _this$props.isPublished, isDirty = _this$props.isDirty, isSaving = _this$props.isSaving, isSaveable = _this$props.isSaveable, onSave = _this$props.onSave, isAutosaving = _this$props.isAutosaving, isPending = _this$props.isPending, isLargeViewport = _this$props.isLargeViewport; var forceSavedMessage = this.state.forceSavedMessage; var hasPublishAction = Object(lodash__WEBPACK_IMPORTED_MODULE_7__["get"])(post, ['_links', 'wp:action-publish'], false); if (isSaving) { // TODO: Classes generation should be common across all return // paths of this function, including proper naming convention for // the "Save Draft" button. var classes = classnames__WEBPACK_IMPORTED_MODULE_6___default()('editor-post-saved-state', 'is-saving', { 'is-autosaving': isAutosaving }); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("span", { className: classes }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__["Dashicon"], { icon: "cloud" }), isAutosaving ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('Autosaving') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('Saving')); } if (isPublished || isScheduled) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_post_switch_to_draft_button__WEBPACK_IMPORTED_MODULE_14__["default"], null); } if (!isSaveable) { return null; } if (forceSavedMessage || !isNew && !isDirty) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("span", { className: "editor-post-saved-state is-saved" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__["Dashicon"], { icon: "saved" }), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('Saved')); } // Once the post has been submitted for review this button // is not needed for the contributor role. if (!hasPublishAction && isPending) { return null; } var label = isPending ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('Save as Pending') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('Save Draft'); if (!isLargeViewport) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__["IconButton"], { className: "editor-post-save-draft", label: label, onClick: onSave, shortcut: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["displayShortcut"].primary('s'), icon: "cloud-upload" }); } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__["Button"], { className: "editor-post-save-draft", onClick: onSave, shortcut: _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["displayShortcut"].primary('s'), isTertiary: true }, label); } }]); return PostSavedState; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_12__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withSelect"])(function (select, _ref) { var forceIsDirty = _ref.forceIsDirty, forceIsSaving = _ref.forceIsSaving; var _select = select('core/editor'), isEditedPostNew = _select.isEditedPostNew, isCurrentPostPublished = _select.isCurrentPostPublished, isCurrentPostScheduled = _select.isCurrentPostScheduled, isEditedPostDirty = _select.isEditedPostDirty, isSavingPost = _select.isSavingPost, isEditedPostSaveable = _select.isEditedPostSaveable, getCurrentPost = _select.getCurrentPost, isAutosavingPost = _select.isAutosavingPost, getEditedPostAttribute = _select.getEditedPostAttribute; return { post: getCurrentPost(), isNew: isEditedPostNew(), isPublished: isCurrentPostPublished(), isScheduled: isCurrentPostScheduled(), isDirty: forceIsDirty || isEditedPostDirty(), isSaving: forceIsSaving || isSavingPost(), isSaveable: isEditedPostSaveable(), isAutosaving: isAutosavingPost(), isPending: 'pending' === getEditedPostAttribute('status') }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withDispatch"])(function (dispatch) { return { onSave: dispatch('core/editor').savePost }; }), _wordpress_compose__WEBPACK_IMPORTED_MODULE_12__["withSafeTimeout"], Object(_wordpress_viewport__WEBPACK_IMPORTED_MODULE_13__["withViewportMatch"])({ isLargeViewport: 'medium' })])(PostSavedState)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-schedule/check.js": /*!***************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-schedule/check.js ***! \***************************************************************************************/ /*! exports provided: PostScheduleCheck, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostScheduleCheck", function() { return PostScheduleCheck; }); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /** * External dependencies */ /** * WordPress dependencies */ function PostScheduleCheck(_ref) { var hasPublishAction = _ref.hasPublishAction, children = _ref.children; if (!hasPublishAction) { return null; } return children; } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select) { var _select = select('core/editor'), getCurrentPost = _select.getCurrentPost, getCurrentPostType = _select.getCurrentPostType; return { hasPublishAction: Object(lodash__WEBPACK_IMPORTED_MODULE_0__["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false), postType: getCurrentPostType() }; })])(PostScheduleCheck)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-schedule/index.js": /*!***************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-schedule/index.js ***! \***************************************************************************************/ /*! exports provided: PostSchedule, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostSchedule", function() { return PostSchedule; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_date__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/date */ "@wordpress/date"); /* harmony import */ var _wordpress_date__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_date__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__); /** * WordPress dependencies */ function PostSchedule(_ref) { var date = _ref.date, onUpdateDate = _ref.onUpdateDate; var settings = Object(_wordpress_date__WEBPACK_IMPORTED_MODULE_1__["__experimentalGetSettings"])(); // To know if the current timezone is a 12 hour time with look for "a" in the time format // We also make sure this a is not escaped by a "/" var is12HourTime = /a(?!\\)/i.test(settings.formats.time.toLowerCase() // Test only the lower case a .replace(/\\\\/g, '') // Replace "//" with empty strings .split('').reverse().join('') // Reverse the string and test for "a" not followed by a slash ); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["DateTimePicker"], { key: "date-time-picker", currentDate: date, onChange: onUpdateDate, is12Hour: is12HourTime }); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select) { return { date: select('core/editor').getEditedPostAttribute('date') }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withDispatch"])(function (dispatch) { return { onUpdateDate: function onUpdateDate(date) { dispatch('core/editor').editPost({ date: date }); } }; })])(PostSchedule)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-schedule/label.js": /*!***************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-schedule/label.js ***! \***************************************************************************************/ /*! exports provided: PostScheduleLabel, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostScheduleLabel", function() { return PostScheduleLabel; }); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_date__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/date */ "@wordpress/date"); /* harmony import */ var _wordpress_date__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_date__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /** * WordPress dependencies */ function PostScheduleLabel(_ref) { var date = _ref.date, isFloating = _ref.isFloating; var settings = Object(_wordpress_date__WEBPACK_IMPORTED_MODULE_1__["__experimentalGetSettings"])(); return date && !isFloating ? Object(_wordpress_date__WEBPACK_IMPORTED_MODULE_1__["dateI18n"])(settings.formats.datetimeAbbreviated, date) : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Immediately'); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select) { return { date: select('core/editor').getEditedPostAttribute('date'), isFloating: select('core/editor').isEditedPostDateFloating() }; })(PostScheduleLabel)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-sticky/check.js": /*!*************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-sticky/check.js ***! \*************************************************************************************/ /*! exports provided: PostStickyCheck, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostStickyCheck", function() { return PostStickyCheck; }); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /** * External dependencies */ /** * WordPress dependencies */ function PostStickyCheck(_ref) { var hasStickyAction = _ref.hasStickyAction, postType = _ref.postType, children = _ref.children; if (postType !== 'post' || !hasStickyAction) { return null; } return children; } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select) { var post = select('core/editor').getCurrentPost(); return { hasStickyAction: Object(lodash__WEBPACK_IMPORTED_MODULE_0__["get"])(post, ['_links', 'wp:action-sticky'], false), postType: select('core/editor').getCurrentPostType() }; })])(PostStickyCheck)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-sticky/index.js": /*!*************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-sticky/index.js ***! \*************************************************************************************/ /*! exports provided: PostSticky, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostSticky", function() { return PostSticky; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _check__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./check */ "./node_modules/@wordpress/editor/build-module/components/post-sticky/check.js"); /** * WordPress dependencies */ /** * Internal dependencies */ function PostSticky(_ref) { var onUpdateSticky = _ref.onUpdateSticky, _ref$postSticky = _ref.postSticky, postSticky = _ref$postSticky === void 0 ? false : _ref$postSticky; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_check__WEBPACK_IMPORTED_MODULE_5__["default"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["CheckboxControl"], { label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Stick to the Front Page'), checked: postSticky, onChange: function onChange() { return onUpdateSticky(!postSticky); } })); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withSelect"])(function (select) { return { postSticky: select('core/editor').getEditedPostAttribute('sticky') }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withDispatch"])(function (dispatch) { return { onUpdateSticky: function onUpdateSticky(postSticky) { dispatch('core/editor').editPost({ sticky: postSticky }); } }; })])(PostSticky)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-switch-to-draft-button/index.js": /*!*****************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-switch-to-draft-button/index.js ***! \*****************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__); /** * WordPress dependencies */ function PostSwitchToDraftButton(_ref) { var isSaving = _ref.isSaving, isPublished = _ref.isPublished, isScheduled = _ref.isScheduled, onClick = _ref.onClick; if (!isPublished && !isScheduled) { return null; } var onSwitch = function onSwitch() { var alertMessage; if (isPublished) { alertMessage = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Are you sure you want to unpublish this post?'); } else if (isScheduled) { alertMessage = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Are you sure you want to unschedule this post?'); } // eslint-disable-next-line no-alert if (window.confirm(alertMessage)) { onClick(); } }; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Button"], { className: "editor-post-switch-to-draft", onClick: onSwitch, disabled: isSaving, isTertiary: true }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Switch to Draft')); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_4__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withSelect"])(function (select) { var _select = select('core/editor'), isSavingPost = _select.isSavingPost, isCurrentPostPublished = _select.isCurrentPostPublished, isCurrentPostScheduled = _select.isCurrentPostScheduled; return { isSaving: isSavingPost(), isPublished: isCurrentPostPublished(), isScheduled: isCurrentPostScheduled() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), editPost = _dispatch.editPost, savePost = _dispatch.savePost; return { onClick: function onClick() { editPost({ status: 'draft' }); savePost(); } }; })])(PostSwitchToDraftButton)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-taxonomies/check.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/check.js ***! \*****************************************************************************************/ /*! exports provided: PostTaxonomiesCheck, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostTaxonomiesCheck", function() { return PostTaxonomiesCheck; }); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /** * External Dependencies */ /** * WordPress dependencies */ function PostTaxonomiesCheck(_ref) { var postType = _ref.postType, taxonomies = _ref.taxonomies, children = _ref.children; var hasTaxonomies = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["some"])(taxonomies, function (taxonomy) { return Object(lodash__WEBPACK_IMPORTED_MODULE_0__["includes"])(taxonomy.types, postType); }); if (!hasTaxonomies) { return null; } return children; } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select) { return { postType: select('core/editor').getCurrentPostType(), taxonomies: select('core').getTaxonomies() }; })])(PostTaxonomiesCheck)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-taxonomies/flat-term-selector.js": /*!******************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/flat-term-selector.js ***! \******************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url"); /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_15__); /** * External dependencies */ /** * WordPress dependencies */ /** * Module constants */ var DEFAULT_QUERY = { per_page: -1, orderby: 'count', order: 'desc', _fields: 'id,name' }; var MAX_TERMS_SUGGESTIONS = 20; var isSameTermName = function isSameTermName(termA, termB) { return termA.toLowerCase() === termB.toLowerCase(); }; var FlatTermSelector = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__["default"])(FlatTermSelector, _Component); function FlatTermSelector() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, FlatTermSelector); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__["default"])(FlatTermSelector).apply(this, arguments)); _this.onChange = _this.onChange.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.searchTerms = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["throttle"])(_this.searchTerms.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))), 500); _this.findOrCreateTerm = _this.findOrCreateTerm.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.state = { loading: false, availableTerms: [], selectedTerms: [] }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(FlatTermSelector, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; if (!Object(lodash__WEBPACK_IMPORTED_MODULE_9__["isEmpty"])(this.props.terms)) { this.setState({ loading: false }); this.initRequest = this.fetchTerms({ include: this.props.terms.join(','), per_page: -1 }); this.initRequest.then(function () { _this2.setState({ loading: false }); }, function (xhr) { if (xhr.statusText === 'abort') { return; } _this2.setState({ loading: false }); }); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { Object(lodash__WEBPACK_IMPORTED_MODULE_9__["invoke"])(this.initRequest, ['abort']); Object(lodash__WEBPACK_IMPORTED_MODULE_9__["invoke"])(this.searchRequest, ['abort']); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (prevProps.terms !== this.props.terms) { this.updateSelectedTerms(this.props.terms); } } }, { key: "fetchTerms", value: function fetchTerms() { var _this3 = this; var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var taxonomy = this.props.taxonomy; var query = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__["default"])({}, DEFAULT_QUERY, params); var request = _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_14___default()({ path: Object(_wordpress_url__WEBPACK_IMPORTED_MODULE_15__["addQueryArgs"])("/wp/v2/".concat(taxonomy.rest_base), query) }); request.then(function (terms) { _this3.setState(function (state) { return { availableTerms: state.availableTerms.concat(terms.filter(function (term) { return !Object(lodash__WEBPACK_IMPORTED_MODULE_9__["find"])(state.availableTerms, function (availableTerm) { return availableTerm.id === term.id; }); })) }; }); _this3.updateSelectedTerms(_this3.props.terms); }); return request; } }, { key: "updateSelectedTerms", value: function updateSelectedTerms() { var _this4 = this; var terms = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var selectedTerms = terms.reduce(function (result, termId) { var termObject = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["find"])(_this4.state.availableTerms, function (term) { return term.id === termId; }); if (termObject) { result.push(termObject.name); } return result; }, []); this.setState({ selectedTerms: selectedTerms }); } }, { key: "findOrCreateTerm", value: function findOrCreateTerm(termName) { var _this5 = this; var taxonomy = this.props.taxonomy; // Tries to create a term or fetch it if it already exists. return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_14___default()({ path: "/wp/v2/".concat(taxonomy.rest_base), method: 'POST', data: { name: termName } }).catch(function (error) { var errorCode = error.code; if (errorCode === 'term_exists') { // If the terms exist, fetch it instead of creating a new one. _this5.addRequest = _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_14___default()({ path: Object(_wordpress_url__WEBPACK_IMPORTED_MODULE_15__["addQueryArgs"])("/wp/v2/".concat(taxonomy.rest_base), Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__["default"])({}, DEFAULT_QUERY, { search: termName })) }); return _this5.addRequest.then(function (searchResult) { return Object(lodash__WEBPACK_IMPORTED_MODULE_9__["find"])(searchResult, function (result) { return isSameTermName(result.name, termName); }); }); } return Promise.reject(error); }); } }, { key: "onChange", value: function onChange(termNames) { var _this6 = this; var uniqueTerms = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["uniqBy"])(termNames, function (term) { return term.toLowerCase(); }); this.setState({ selectedTerms: uniqueTerms }); var newTermNames = uniqueTerms.filter(function (termName) { return !Object(lodash__WEBPACK_IMPORTED_MODULE_9__["find"])(_this6.state.availableTerms, function (term) { return isSameTermName(term.name, termName); }); }); var termNamesToIds = function termNamesToIds(names, availableTerms) { return names.map(function (termName) { return Object(lodash__WEBPACK_IMPORTED_MODULE_9__["find"])(availableTerms, function (term) { return isSameTermName(term.name, termName); }).id; }); }; if (newTermNames.length === 0) { return this.props.onUpdateTerms(termNamesToIds(uniqueTerms, this.state.availableTerms), this.props.taxonomy.rest_base); } Promise.all(newTermNames.map(this.findOrCreateTerm)).then(function (newTerms) { var newAvailableTerms = _this6.state.availableTerms.concat(newTerms); _this6.setState({ availableTerms: newAvailableTerms }); return _this6.props.onUpdateTerms(termNamesToIds(uniqueTerms, newAvailableTerms), _this6.props.taxonomy.rest_base); }); } }, { key: "searchTerms", value: function searchTerms() { var search = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; Object(lodash__WEBPACK_IMPORTED_MODULE_9__["invoke"])(this.searchRequest, ['abort']); this.searchRequest = this.fetchTerms({ search: search }); } }, { key: "render", value: function render() { var _this$props = this.props, slug = _this$props.slug, taxonomy = _this$props.taxonomy, hasAssignAction = _this$props.hasAssignAction; if (!hasAssignAction) { return null; } var _this$state = this.state, loading = _this$state.loading, availableTerms = _this$state.availableTerms, selectedTerms = _this$state.selectedTerms; var termNames = availableTerms.map(function (term) { return term.name; }); var newTermLabel = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["get"])(taxonomy, ['labels', 'add_new_item'], slug === 'post_tag' ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Add New Tag') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Add New Term')); var singularName = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["get"])(taxonomy, ['labels', 'singular_name'], slug === 'post_tag' ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Tag') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Term')); var termAddedLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["_x"])('%s added', 'term'), singularName); var termRemovedLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["_x"])('%s removed', 'term'), singularName); var removeTermLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["_x"])('Remove %s', 'term'), singularName); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__["FormTokenField"], { value: selectedTerms, displayTransform: lodash__WEBPACK_IMPORTED_MODULE_9__["unescape"], suggestions: termNames, onChange: this.onChange, onInputChange: this.searchTerms, maxSuggestions: MAX_TERMS_SUGGESTIONS, disabled: loading, label: newTermLabel, messages: { added: termAddedLabel, removed: termRemovedLabel, remove: removeTermLabel } }); } }]); return FlatTermSelector; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_12__["withSelect"])(function (select, _ref) { var slug = _ref.slug; var _select = select('core/editor'), getCurrentPost = _select.getCurrentPost; var _select2 = select('core'), getTaxonomy = _select2.getTaxonomy; var taxonomy = getTaxonomy(slug); return { hasCreateAction: taxonomy ? Object(lodash__WEBPACK_IMPORTED_MODULE_9__["get"])(getCurrentPost(), ['_links', 'wp:action-create-' + taxonomy.rest_base], false) : false, hasAssignAction: taxonomy ? Object(lodash__WEBPACK_IMPORTED_MODULE_9__["get"])(getCurrentPost(), ['_links', 'wp:action-assign-' + taxonomy.rest_base], false) : false, terms: taxonomy ? select('core/editor').getEditedPostAttribute(taxonomy.rest_base) : [], taxonomy: taxonomy }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_12__["withDispatch"])(function (dispatch) { return { onUpdateTerms: function onUpdateTerms(terms, restBase) { dispatch('core/editor').editPost(Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])({}, restBase, terms)); } }; }), Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_11__["withFilters"])('editor.PostTaxonomyType'))(FlatTermSelector)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-taxonomies/hierarchical-term-selector.js": /*!**************************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/hierarchical-term-selector.js ***! \**************************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url"); /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var _utils_terms__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../utils/terms */ "./node_modules/@wordpress/editor/build-module/utils/terms.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Module Constants */ var DEFAULT_QUERY = { per_page: -1, orderby: 'name', order: 'asc', _fields: 'id,name,parent' }; var MIN_TERMS_COUNT_FOR_FILTER = 8; var HierarchicalTermSelector = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_7__["default"])(HierarchicalTermSelector, _Component); function HierarchicalTermSelector() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_3__["default"])(this, HierarchicalTermSelector); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__["default"])(HierarchicalTermSelector).apply(this, arguments)); _this.findTerm = _this.findTerm.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(_this))); _this.onChange = _this.onChange.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(_this))); _this.onChangeFormName = _this.onChangeFormName.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(_this))); _this.onChangeFormParent = _this.onChangeFormParent.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(_this))); _this.onAddTerm = _this.onAddTerm.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(_this))); _this.onToggleForm = _this.onToggleForm.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(_this))); _this.setFilterValue = _this.setFilterValue.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(_this))); _this.sortBySelected = _this.sortBySelected.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__["default"])(_this))); _this.state = { loading: true, availableTermsTree: [], availableTerms: [], adding: false, formName: '', formParent: '', showForm: false, filterValue: '', filteredTermsTree: [] }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_4__["default"])(HierarchicalTermSelector, [{ key: "onChange", value: function onChange(event) { var _this$props = this.props, onUpdateTerms = _this$props.onUpdateTerms, _this$props$terms = _this$props.terms, terms = _this$props$terms === void 0 ? [] : _this$props$terms, taxonomy = _this$props.taxonomy; var termId = parseInt(event.target.value, 10); var hasTerm = terms.indexOf(termId) !== -1; var newTerms = hasTerm ? Object(lodash__WEBPACK_IMPORTED_MODULE_10__["without"])(terms, termId) : Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(terms).concat([termId]); onUpdateTerms(newTerms, taxonomy.rest_base); } }, { key: "onChangeFormName", value: function onChangeFormName(event) { var newValue = event.target.value.trim() === '' ? '' : event.target.value; this.setState({ formName: newValue }); } }, { key: "onChangeFormParent", value: function onChangeFormParent(newParent) { this.setState({ formParent: newParent }); } }, { key: "onToggleForm", value: function onToggleForm() { this.setState(function (state) { return { showForm: !state.showForm }; }); } }, { key: "findTerm", value: function findTerm(terms, parent, name) { return Object(lodash__WEBPACK_IMPORTED_MODULE_10__["find"])(terms, function (term) { return (!term.parent && !parent || parseInt(term.parent) === parseInt(parent)) && term.name.toLowerCase() === name.toLowerCase(); }); } }, { key: "onAddTerm", value: function onAddTerm(event) { var _this2 = this; event.preventDefault(); var _this$props2 = this.props, onUpdateTerms = _this$props2.onUpdateTerms, taxonomy = _this$props2.taxonomy, terms = _this$props2.terms, slug = _this$props2.slug; var _this$state = this.state, formName = _this$state.formName, formParent = _this$state.formParent, adding = _this$state.adding, availableTerms = _this$state.availableTerms; if (formName === '' || adding) { return; } // check if the term we are adding already exists var existingTerm = this.findTerm(availableTerms, formParent, formName); if (existingTerm) { // if the term we are adding exists but is not selected select it if (!Object(lodash__WEBPACK_IMPORTED_MODULE_10__["some"])(terms, function (term) { return term === existingTerm.id; })) { onUpdateTerms(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(terms).concat([existingTerm.id]), taxonomy.rest_base); } this.setState({ formName: '', formParent: '' }); return; } this.setState({ adding: true }); this.addRequest = _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_15___default()({ path: "/wp/v2/".concat(taxonomy.rest_base), method: 'POST', data: { name: formName, parent: formParent ? formParent : undefined } }); // Tries to create a term or fetch it if it already exists var findOrCreatePromise = this.addRequest.catch(function (error) { var errorCode = error.code; if (errorCode === 'term_exists') { // search the new category created since last fetch _this2.addRequest = _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_15___default()({ path: Object(_wordpress_url__WEBPACK_IMPORTED_MODULE_16__["addQueryArgs"])("/wp/v2/".concat(taxonomy.rest_base), Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__["default"])({}, DEFAULT_QUERY, { parent: formParent || 0, search: formName })) }); return _this2.addRequest.then(function (searchResult) { return _this2.findTerm(searchResult, formParent, formName); }); } return Promise.reject(error); }); findOrCreatePromise.then(function (term) { var hasTerm = !!Object(lodash__WEBPACK_IMPORTED_MODULE_10__["find"])(_this2.state.availableTerms, function (availableTerm) { return availableTerm.id === term.id; }); var newAvailableTerms = hasTerm ? _this2.state.availableTerms : [term].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_this2.state.availableTerms)); var termAddedMessage = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["_x"])('%s added', 'term'), Object(lodash__WEBPACK_IMPORTED_MODULE_10__["get"])(_this2.props.taxonomy, ['labels', 'singular_name'], slug === 'category' ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Category') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Term'))); _this2.props.speak(termAddedMessage, 'assertive'); _this2.addRequest = null; _this2.setState({ adding: false, formName: '', formParent: '', availableTerms: newAvailableTerms, availableTermsTree: _this2.sortBySelected(Object(_utils_terms__WEBPACK_IMPORTED_MODULE_17__["buildTermsTree"])(newAvailableTerms)) }); onUpdateTerms(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(terms).concat([term.id]), taxonomy.rest_base); }, function (xhr) { if (xhr.statusText === 'abort') { return; } _this2.addRequest = null; _this2.setState({ adding: false }); }); } }, { key: "componentDidMount", value: function componentDidMount() { this.fetchTerms(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { Object(lodash__WEBPACK_IMPORTED_MODULE_10__["invoke"])(this.fetchRequest, ['abort']); Object(lodash__WEBPACK_IMPORTED_MODULE_10__["invoke"])(this.addRequest, ['abort']); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (this.props.taxonomy !== prevProps.taxonomy) { this.fetchTerms(); } } }, { key: "fetchTerms", value: function fetchTerms() { var _this3 = this; var taxonomy = this.props.taxonomy; if (!taxonomy) { return; } this.fetchRequest = _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_15___default()({ path: Object(_wordpress_url__WEBPACK_IMPORTED_MODULE_16__["addQueryArgs"])("/wp/v2/".concat(taxonomy.rest_base), DEFAULT_QUERY) }); this.fetchRequest.then(function (terms) { // resolve var availableTermsTree = _this3.sortBySelected(Object(_utils_terms__WEBPACK_IMPORTED_MODULE_17__["buildTermsTree"])(terms)); _this3.fetchRequest = null; _this3.setState({ loading: false, availableTermsTree: availableTermsTree, availableTerms: terms }); }, function (xhr) { // reject if (xhr.statusText === 'abort') { return; } _this3.fetchRequest = null; _this3.setState({ loading: false }); }); } }, { key: "sortBySelected", value: function sortBySelected(termsTree) { var terms = this.props.terms; var treeHasSelection = function treeHasSelection(termTree) { if (terms.indexOf(termTree.id) !== -1) { return true; } if (undefined === termTree.children) { return false; } var anyChildIsSelected = termTree.children.map(treeHasSelection).filter(function (child) { return child; }).length > 0; if (anyChildIsSelected) { return true; } return false; }; var termOrChildIsSelected = function termOrChildIsSelected(termA, termB) { var termASelected = treeHasSelection(termA); var termBSelected = treeHasSelection(termB); if (termASelected === termBSelected) { return 0; } if (termASelected && !termBSelected) { return -1; } if (!termASelected && termBSelected) { return 1; } return 0; }; termsTree.sort(termOrChildIsSelected); return termsTree; } }, { key: "setFilterValue", value: function setFilterValue(event) { var availableTermsTree = this.state.availableTermsTree; var filterValue = event.target.value; var filteredTermsTree = availableTermsTree.map(this.getFilterMatcher(filterValue)).filter(function (term) { return term; }); var getResultCount = function getResultCount(terms) { var count = 0; for (var i = 0; i < terms.length; i++) { count++; if (undefined !== terms[i].children) { count += getResultCount(terms[i].children); } } return count; }; this.setState({ filterValue: filterValue, filteredTermsTree: filteredTermsTree }); var resultCount = getResultCount(filteredTermsTree); var resultsFoundMessage = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["_n"])('%d result found.', '%d results found.', resultCount), resultCount); this.props.debouncedSpeak(resultsFoundMessage, 'assertive'); } }, { key: "getFilterMatcher", value: function getFilterMatcher(filterValue) { var matchTermsForFilter = function matchTermsForFilter(originalTerm) { if ('' === filterValue) { return originalTerm; } // Shallow clone, because we'll be filtering the term's children and // don't want to modify the original term. var term = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__["default"])({}, originalTerm); // Map and filter the children, recursive so we deal with grandchildren // and any deeper levels. if (term.children.length > 0) { term.children = term.children.map(matchTermsForFilter).filter(function (child) { return child; }); } // If the term's name contains the filterValue, or it has children // (i.e. some child matched at some point in the tree) then return it. if (-1 !== term.name.toLowerCase().indexOf(filterValue) || term.children.length > 0) { return term; } // Otherwise, return false. After mapping, the list of terms will need // to have false values filtered out. return false; }; return matchTermsForFilter; } }, { key: "renderTerms", value: function renderTerms(renderedTerms) { var _this4 = this; var _this$props$terms2 = this.props.terms, terms = _this$props$terms2 === void 0 ? [] : _this$props$terms2; return renderedTerms.map(function (term) { var id = "editor-post-taxonomies-hierarchical-term-".concat(term.id); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])("div", { key: term.id, className: "editor-post-taxonomies__hierarchical-terms-choice" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])("input", { id: id, className: "editor-post-taxonomies__hierarchical-terms-input", type: "checkbox", checked: terms.indexOf(term.id) !== -1, value: term.id, onChange: _this4.onChange }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])("label", { htmlFor: id }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__["unescape"])(term.name)), !!term.children.length && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])("div", { className: "editor-post-taxonomies__hierarchical-terms-subchoices" }, _this4.renderTerms(term.children))); }); } }, { key: "render", value: function render() { var _this$props3 = this.props, slug = _this$props3.slug, taxonomy = _this$props3.taxonomy, instanceId = _this$props3.instanceId, hasCreateAction = _this$props3.hasCreateAction, hasAssignAction = _this$props3.hasAssignAction; if (!hasAssignAction) { return null; } var _this$state2 = this.state, availableTermsTree = _this$state2.availableTermsTree, availableTerms = _this$state2.availableTerms, filteredTermsTree = _this$state2.filteredTermsTree, formName = _this$state2.formName, formParent = _this$state2.formParent, loading = _this$state2.loading, showForm = _this$state2.showForm, filterValue = _this$state2.filterValue; var labelWithFallback = function labelWithFallback(labelProperty, fallbackIsCategory, fallbackIsNotCategory) { return Object(lodash__WEBPACK_IMPORTED_MODULE_10__["get"])(taxonomy, ['labels', labelProperty], slug === 'category' ? fallbackIsCategory : fallbackIsNotCategory); }; var newTermButtonLabel = labelWithFallback('add_new_item', Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Add new category'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Add new term')); var newTermLabel = labelWithFallback('new_item_name', Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Add new category'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Add new term')); var parentSelectLabel = labelWithFallback('parent_item', Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Parent Category'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Parent Term')); var noParentOption = "\u2014 ".concat(parentSelectLabel, " \u2014"); var newTermSubmitLabel = newTermButtonLabel; var inputId = "editor-post-taxonomies__hierarchical-terms-input-".concat(instanceId); var filterInputId = "editor-post-taxonomies__hierarchical-terms-filter-".concat(instanceId); var filterLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["_x"])('Search %s', 'term'), Object(lodash__WEBPACK_IMPORTED_MODULE_10__["get"])(this.props.taxonomy, ['name'], slug === 'category' ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Categories') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Terms'))); var groupLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["_x"])('Available %s', 'term'), Object(lodash__WEBPACK_IMPORTED_MODULE_10__["get"])(this.props.taxonomy, ['name'], slug === 'category' ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Categories') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('Terms'))); var showFilter = availableTerms.length >= MIN_TERMS_COUNT_FOR_FILTER; return [showFilter && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])("label", { key: "filter-label", htmlFor: filterInputId }, filterLabel), showFilter && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])("input", { type: "search", id: filterInputId, value: filterValue, onChange: this.setFilterValue, className: "editor-post-taxonomies__hierarchical-terms-filter", key: "term-filter-input" }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])("div", { className: "editor-post-taxonomies__hierarchical-terms-list", key: "term-list", tabIndex: "0", role: "group", "aria-label": groupLabel }, this.renderTerms('' !== filterValue ? filteredTermsTree : availableTermsTree)), !loading && hasCreateAction && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_12__["Button"], { key: "term-add-button", onClick: this.onToggleForm, className: "editor-post-taxonomies__hierarchical-terms-add", "aria-expanded": showForm, isLink: true }, newTermButtonLabel), showForm && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])("form", { onSubmit: this.onAddTerm, key: "hierarchical-terms-form" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])("label", { htmlFor: inputId, className: "editor-post-taxonomies__hierarchical-terms-label" }, newTermLabel), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])("input", { type: "text", id: inputId, className: "editor-post-taxonomies__hierarchical-terms-input", value: formName, onChange: this.onChangeFormName, required: true }), !!availableTerms.length && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_12__["TreeSelect"], { label: parentSelectLabel, noOptionLabel: noParentOption, onChange: this.onChangeFormParent, selectedId: formParent, tree: availableTermsTree }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_12__["Button"], { isDefault: true, type: "submit", className: "editor-post-taxonomies__hierarchical-terms-submit" }, newTermSubmitLabel))]; /* eslint-enable jsx-a11y/no-onchange */ } }]); return HierarchicalTermSelector; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_14__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_13__["withSelect"])(function (select, _ref) { var slug = _ref.slug; var _select = select('core/editor'), getCurrentPost = _select.getCurrentPost; var _select2 = select('core'), getTaxonomy = _select2.getTaxonomy; var taxonomy = getTaxonomy(slug); return { hasCreateAction: taxonomy ? Object(lodash__WEBPACK_IMPORTED_MODULE_10__["get"])(getCurrentPost(), ['_links', 'wp:action-create-' + taxonomy.rest_base], false) : false, hasAssignAction: taxonomy ? Object(lodash__WEBPACK_IMPORTED_MODULE_10__["get"])(getCurrentPost(), ['_links', 'wp:action-assign-' + taxonomy.rest_base], false) : false, terms: taxonomy ? select('core/editor').getEditedPostAttribute(taxonomy.rest_base) : [], taxonomy: taxonomy }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_13__["withDispatch"])(function (dispatch) { return { onUpdateTerms: function onUpdateTerms(terms, restBase) { dispatch('core/editor').editPost(Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])({}, restBase, terms)); } }; }), _wordpress_components__WEBPACK_IMPORTED_MODULE_12__["withSpokenMessages"], _wordpress_compose__WEBPACK_IMPORTED_MODULE_14__["withInstanceId"], Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_12__["withFilters"])('editor.PostTaxonomyType')])(HierarchicalTermSelector)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-taxonomies/index.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/index.js ***! \*****************************************************************************************/ /*! exports provided: PostTaxonomies, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostTaxonomies", function() { return PostTaxonomies; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _hierarchical_term_selector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hierarchical-term-selector */ "./node_modules/@wordpress/editor/build-module/components/post-taxonomies/hierarchical-term-selector.js"); /* harmony import */ var _flat_term_selector__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./flat-term-selector */ "./node_modules/@wordpress/editor/build-module/components/post-taxonomies/flat-term-selector.js"); /** * External Dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function PostTaxonomies(_ref) { var postType = _ref.postType, taxonomies = _ref.taxonomies, _ref$taxonomyWrapper = _ref.taxonomyWrapper, taxonomyWrapper = _ref$taxonomyWrapper === void 0 ? lodash__WEBPACK_IMPORTED_MODULE_1__["identity"] : _ref$taxonomyWrapper; var availableTaxonomies = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["filter"])(taxonomies, function (taxonomy) { return Object(lodash__WEBPACK_IMPORTED_MODULE_1__["includes"])(taxonomy.types, postType); }); var visibleTaxonomies = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["filter"])(availableTaxonomies, function (taxonomy) { return taxonomy.visibility.show_ui; }); return visibleTaxonomies.map(function (taxonomy) { var TaxonomyComponent = taxonomy.hierarchical ? _hierarchical_term_selector__WEBPACK_IMPORTED_MODULE_4__["default"] : _flat_term_selector__WEBPACK_IMPORTED_MODULE_5__["default"]; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], { key: "taxonomy-".concat(taxonomy.slug) }, taxonomyWrapper(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(TaxonomyComponent, { slug: taxonomy.slug }), taxonomy)); }); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select) { return { postType: select('core/editor').getCurrentPostType(), taxonomies: select('core').getTaxonomies({ per_page: -1 }) }; })])(PostTaxonomies)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-text-editor/index.js": /*!******************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-text-editor/index.js ***! \******************************************************************************************/ /*! exports provided: PostTextEditor, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostTextEditor", function() { return PostTextEditor; }); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var react_autosize_textarea__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-autosize-textarea */ "./node_modules/react-autosize-textarea/lib/index.js"); /* harmony import */ var react_autosize_textarea__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_autosize_textarea__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_11__); /** * External dependencies */ /** * WordPress dependencies */ var PostTextEditor = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(PostTextEditor, _Component); function PostTextEditor() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, PostTextEditor); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(PostTextEditor).apply(this, arguments)); _this.edit = _this.edit.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.stopEditing = _this.stopEditing.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.state = {}; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(PostTextEditor, [{ key: "edit", /** * Handles a textarea change event to notify the onChange prop callback and * reflect the new value in the component's own state. This marks the start * of the user's edits, if not already changed, preventing future props * changes to value from replacing the rendered value. This is expected to * be followed by a reset to dirty state via `stopEditing`. * * @see stopEditing * * @param {Event} event Change event. */ value: function edit(event) { var value = event.target.value; this.props.onChange(value); this.setState({ value: value, isDirty: true }); } /** * Function called when the user has completed their edits, responsible for * ensuring that changes, if made, are surfaced to the onPersist prop * callback and resetting dirty state. */ }, { key: "stopEditing", value: function stopEditing() { if (this.state.isDirty) { this.props.onPersist(this.state.value); this.setState({ isDirty: false }); } } }, { key: "render", value: function render() { var value = this.state.value; var instanceId = this.props.instanceId; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("label", { htmlFor: "post-content-".concat(instanceId), className: "screen-reader-text" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('Type text or HTML')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(react_autosize_textarea__WEBPACK_IMPORTED_MODULE_7___default.a, { autoComplete: "off", dir: "auto", value: value, onChange: this.edit, onBlur: this.stopEditing, className: "editor-post-text-editor", id: "post-content-".concat(instanceId), placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('Start writing with text or HTML') })); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(props, state) { if (state.isDirty) { return null; } return { value: props.value, isDirty: false }; } }]); return PostTextEditor; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_11__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withSelect"])(function (select) { var _select = select('core/editor'), getEditedPostContent = _select.getEditedPostContent; return { value: getEditedPostContent() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), editPost = _dispatch.editPost, resetBlocks = _dispatch.resetBlocks; return { onChange: function onChange(content) { editPost({ content: content }); }, onPersist: function onPersist(content) { resetBlocks(Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_9__["parse"])(content)); } }; }), _wordpress_compose__WEBPACK_IMPORTED_MODULE_11__["withInstanceId"]])(PostTextEditor)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-title/index.js": /*!************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-title/index.js ***! \************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var react_autosize_textarea__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-autosize-textarea */ "./node_modules/react-autosize-textarea/lib/index.js"); /* harmony import */ var react_autosize_textarea__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_autosize_textarea__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/html-entities */ "@wordpress/html-entities"); /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var _post_permalink__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../post-permalink */ "./node_modules/@wordpress/editor/build-module/components/post-permalink/index.js"); /* harmony import */ var _post_type_support_check__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../post-type-support-check */ "./node_modules/@wordpress/editor/build-module/components/post-type-support-check/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Constants */ var REGEXP_NEWLINES = /[\r\n]+/g; var PostTitle = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(PostTitle, _Component); function PostTitle() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, PostTitle); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(PostTitle).apply(this, arguments)); _this.onChange = _this.onChange.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onSelect = _this.onSelect.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onUnselect = _this.onUnselect.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.onKeyDown = _this.onKeyDown.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.redirectHistory = _this.redirectHistory.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.state = { isSelected: false }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(PostTitle, [{ key: "handleFocusOutside", value: function handleFocusOutside() { this.onUnselect(); } }, { key: "onSelect", value: function onSelect() { this.setState({ isSelected: true }); this.props.clearSelectedBlock(); } }, { key: "onUnselect", value: function onUnselect() { this.setState({ isSelected: false }); } }, { key: "onChange", value: function onChange(event) { var newTitle = event.target.value.replace(REGEXP_NEWLINES, ' '); this.props.onUpdate(newTitle); } }, { key: "onKeyDown", value: function onKeyDown(event) { if (event.keyCode === _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["ENTER"]) { event.preventDefault(); this.props.onEnterPress(); } } /** * Emulates behavior of an undo or redo on its corresponding key press * combination. This is a workaround to React's treatment of undo in a * controlled textarea where characters are updated one at a time. * Instead, leverage the store's undo handling of title changes. * * @see https://github.com/facebook/react/issues/8514 * * @param {KeyboardEvent} event Key event. */ }, { key: "redirectHistory", value: function redirectHistory(event) { if (event.shiftKey) { this.props.onRedo(); } else { this.props.onUndo(); } event.preventDefault(); } }, { key: "render", value: function render() { var _this$props = this.props, hasFixedToolbar = _this$props.hasFixedToolbar, isCleanNewPost = _this$props.isCleanNewPost, isFocusMode = _this$props.isFocusMode, isPostTypeViewable = _this$props.isPostTypeViewable, instanceId = _this$props.instanceId, placeholder = _this$props.placeholder, title = _this$props.title; var isSelected = this.state.isSelected; // The wp-block className is important for editor styles. var className = classnames__WEBPACK_IMPORTED_MODULE_8___default()('wp-block editor-post-title__block', { 'is-selected': isSelected, 'is-focus-mode': isFocusMode, 'has-fixed-toolbar': hasFixedToolbar }); var decodedPlaceholder = Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_11__["decodeEntities"])(placeholder); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_post_type_support_check__WEBPACK_IMPORTED_MODULE_17__["default"], { supportKeys: "title" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { className: "editor-post-title" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { className: className }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_14__["KeyboardShortcuts"], { shortcuts: { 'mod+z': this.redirectHistory, 'mod+shift+z': this.redirectHistory } }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("label", { htmlFor: "post-title-".concat(instanceId), className: "screen-reader-text" }, decodedPlaceholder || Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Add title')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(react_autosize_textarea__WEBPACK_IMPORTED_MODULE_7___default.a, { id: "post-title-".concat(instanceId), className: "editor-post-title__input", value: title, onChange: this.onChange, placeholder: decodedPlaceholder || Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Add title'), onFocus: this.onSelect, onKeyDown: this.onKeyDown, onKeyPress: this.onUnselect /* Only autofocus the title when the post is entirely empty. This should only happen for a new post, which means we focus the title on new post so the author can start typing right away, without needing to click anything. */ /* eslint-disable jsx-a11y/no-autofocus */ , autoFocus: isCleanNewPost /* eslint-enable jsx-a11y/no-autofocus */ })), isSelected && isPostTypeViewable && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_post_permalink__WEBPACK_IMPORTED_MODULE_16__["default"], null)))); } }]); return PostTitle; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_13__["withSelect"])(function (select) { var _select = select('core/editor'), getEditedPostAttribute = _select.getEditedPostAttribute, getEditorSettings = _select.getEditorSettings, isCleanNewPost = _select.isCleanNewPost; var _select2 = select('core'), getPostType = _select2.getPostType; var postType = getPostType(getEditedPostAttribute('type')); var _getEditorSettings = getEditorSettings(), titlePlaceholder = _getEditorSettings.titlePlaceholder, focusMode = _getEditorSettings.focusMode, hasFixedToolbar = _getEditorSettings.hasFixedToolbar; return { isCleanNewPost: isCleanNewPost(), title: getEditedPostAttribute('title'), isPostTypeViewable: Object(lodash__WEBPACK_IMPORTED_MODULE_9__["get"])(postType, ['viewable'], false), placeholder: titlePlaceholder, isFocusMode: focusMode, hasFixedToolbar: hasFixedToolbar }; }); var applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_13__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), insertDefaultBlock = _dispatch.insertDefaultBlock, editPost = _dispatch.editPost, clearSelectedBlock = _dispatch.clearSelectedBlock, undo = _dispatch.undo, redo = _dispatch.redo; return { onEnterPress: function onEnterPress() { insertDefaultBlock(undefined, undefined, 0); }, onUpdate: function onUpdate(title) { editPost({ title: title }); }, onUndo: undo, onRedo: redo, clearSelectedBlock: clearSelectedBlock }; }); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_15__["compose"])(applyWithSelect, applyWithDispatch, _wordpress_compose__WEBPACK_IMPORTED_MODULE_15__["withInstanceId"], _wordpress_components__WEBPACK_IMPORTED_MODULE_14__["withFocusOutside"])(PostTitle)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-trash/check.js": /*!************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-trash/check.js ***! \************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__); /** * WordPress dependencies */ function PostTrashCheck(_ref) { var isNew = _ref.isNew, postId = _ref.postId, children = _ref.children; if (isNew || !postId) { return null; } return children; } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__["withSelect"])(function (select) { var _select = select('core/editor'), isEditedPostNew = _select.isEditedPostNew, getCurrentPostId = _select.getCurrentPostId; return { isNew: isEditedPostNew(), postId: getCurrentPostId() }; })(PostTrashCheck)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-trash/index.js": /*!************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-trash/index.js ***! \************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__); /** * WordPress dependencies */ function PostTrash(_ref) { var isNew = _ref.isNew, postId = _ref.postId, postType = _ref.postType, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref, ["isNew", "postId", "postType"]); if (isNew || !postId) { return null; } var onClick = function onClick() { return props.trashPost(postId, postType); }; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["Button"], { className: "editor-post-trash button-link-delete", onClick: onClick, isDefault: true, isLarge: true }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Move to trash')); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withSelect"])(function (select) { var _select = select('core/editor'), isEditedPostNew = _select.isEditedPostNew, getCurrentPostId = _select.getCurrentPostId, getCurrentPostType = _select.getCurrentPostType; return { isNew: isEditedPostNew(), postId: getCurrentPostId(), postType: getCurrentPostType() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withDispatch"])(function (dispatch) { return { trashPost: dispatch('core/editor').trashPost }; })])(PostTrash)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-type-support-check/index.js": /*!*************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-type-support-check/index.js ***! \*************************************************************************************************/ /*! exports provided: PostTypeSupportCheck, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostTypeSupportCheck", function() { return PostTypeSupportCheck; }); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); /** * External dependencies */ /** * WordPress dependencies */ /** * A component which renders its own children only if the current editor post * type supports one of the given `supportKeys` prop. * * @param {?Object} props.postType Current post type. * @param {WPElement} props.children Children to be rendered if post * type supports. * @param {(string|string[])} props.supportKeys String or string array of keys * to test. * * @return {WPElement} Rendered element. */ function PostTypeSupportCheck(_ref) { var postType = _ref.postType, children = _ref.children, supportKeys = _ref.supportKeys; var isSupported = true; if (postType) { isSupported = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["some"])(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["castArray"])(supportKeys), function (key) { return !!postType.supports[key]; }); } if (!isSupported) { return null; } return children; } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["withSelect"])(function (select) { var _select = select('core/editor'), getEditedPostAttribute = _select.getEditedPostAttribute; var _select2 = select('core'), getPostType = _select2.getPostType; return { postType: getPostType(getEditedPostAttribute('type')) }; })(PostTypeSupportCheck)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-visibility/check.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-visibility/check.js ***! \*****************************************************************************************/ /*! exports provided: PostVisibilityCheck, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostVisibilityCheck", function() { return PostVisibilityCheck; }); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /** * External dependencies */ /** * WordPress dependencies */ function PostVisibilityCheck(_ref) { var hasPublishAction = _ref.hasPublishAction, render = _ref.render; var canEdit = hasPublishAction; return render({ canEdit: canEdit }); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__["withSelect"])(function (select) { var _select = select('core/editor'), getCurrentPost = _select.getCurrentPost, getCurrentPostType = _select.getCurrentPostType; return { hasPublishAction: Object(lodash__WEBPACK_IMPORTED_MODULE_0__["get"])(getCurrentPost(), ['_links', 'wp:action-publish'], false), postType: getCurrentPostType() }; })])(PostVisibilityCheck)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-visibility/index.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-visibility/index.js ***! \*****************************************************************************************/ /*! exports provided: PostVisibility, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostVisibility", function() { return PostVisibility; }); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils */ "./node_modules/@wordpress/editor/build-module/components/post-visibility/utils.js"); /** * WordPress dependencies */ /** * Internal Dependencies */ var PostVisibility = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(PostVisibility, _Component); function PostVisibility(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, PostVisibility); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(PostVisibility).apply(this, arguments)); _this.setPublic = _this.setPublic.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.setPrivate = _this.setPrivate.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.setPasswordProtected = _this.setPasswordProtected.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.updatePassword = _this.updatePassword.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); _this.state = { hasPassword: !!props.password }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(PostVisibility, [{ key: "setPublic", value: function setPublic() { var _this$props = this.props, visibility = _this$props.visibility, onUpdateVisibility = _this$props.onUpdateVisibility, status = _this$props.status; onUpdateVisibility(visibility === 'private' ? 'draft' : status); this.setState({ hasPassword: false }); } }, { key: "setPrivate", value: function setPrivate() { if (!window.confirm(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Would you like to privately publish this post now?'))) { // eslint-disable-line no-alert return; } var _this$props2 = this.props, onUpdateVisibility = _this$props2.onUpdateVisibility, onSave = _this$props2.onSave; onUpdateVisibility('private'); this.setState({ hasPassword: false }); onSave(); } }, { key: "setPasswordProtected", value: function setPasswordProtected() { var _this$props3 = this.props, visibility = _this$props3.visibility, onUpdateVisibility = _this$props3.onUpdateVisibility, status = _this$props3.status, password = _this$props3.password; onUpdateVisibility(visibility === 'private' ? 'draft' : status, password || ''); this.setState({ hasPassword: true }); } }, { key: "updatePassword", value: function updatePassword(event) { var _this$props4 = this.props, status = _this$props4.status, onUpdateVisibility = _this$props4.onUpdateVisibility; onUpdateVisibility(status, event.target.value); } }, { key: "render", value: function render() { var _this$props5 = this.props, visibility = _this$props5.visibility, password = _this$props5.password, instanceId = _this$props5.instanceId; var visibilityHandlers = { public: { onSelect: this.setPublic, checked: visibility === 'public' && !this.state.hasPassword }, private: { onSelect: this.setPrivate, checked: visibility === 'private' }, password: { onSelect: this.setPasswordProtected, checked: this.state.hasPassword } }; return [Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("fieldset", { key: "visibility-selector", className: "editor-post-visibility__dialog-fieldset" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("legend", { className: "editor-post-visibility__dialog-legend" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Post Visibility')), _utils__WEBPACK_IMPORTED_MODULE_10__["visibilityOptions"].map(function (_ref) { var value = _ref.value, label = _ref.label, info = _ref.info; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { key: value, className: "editor-post-visibility__choice" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("input", { type: "radio", name: "editor-post-visibility__setting-".concat(instanceId), value: value, onChange: visibilityHandlers[value].onSelect, checked: visibilityHandlers[value].checked, id: "editor-post-".concat(value, "-").concat(instanceId), "aria-describedby": "editor-post-".concat(value, "-").concat(instanceId, "-description"), className: "editor-post-visibility__dialog-radio" }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("label", { htmlFor: "editor-post-".concat(value, "-").concat(instanceId), className: "editor-post-visibility__dialog-label" }, label), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { id: "editor-post-".concat(value, "-").concat(instanceId, "-description"), className: "editor-post-visibility__dialog-info" }, info)); })), this.state.hasPassword && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { className: "editor-post-visibility__dialog-password", key: "password-selector" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("label", { htmlFor: "editor-post-visibility__dialog-password-input-".concat(instanceId), className: "screen-reader-text" }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Create password')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("input", { className: "editor-post-visibility__dialog-password-input", id: "editor-post-visibility__dialog-password-input-".concat(instanceId), type: "text", onChange: this.updatePassword, value: password, placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Use a secure password') }))]; } }]); return PostVisibility; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_8__["compose"])([Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withSelect"])(function (select) { var _select = select('core/editor'), getEditedPostAttribute = _select.getEditedPostAttribute, getEditedPostVisibility = _select.getEditedPostVisibility; return { status: getEditedPostAttribute('status'), visibility: getEditedPostVisibility(), password: getEditedPostAttribute('password') }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), savePost = _dispatch.savePost, editPost = _dispatch.editPost; return { onSave: savePost, onUpdateVisibility: function onUpdateVisibility(status) { var password = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; editPost({ status: status, password: password }); } }; }), _wordpress_compose__WEBPACK_IMPORTED_MODULE_8__["withInstanceId"]])(PostVisibility)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-visibility/label.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-visibility/label.js ***! \*****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@wordpress/editor/build-module/components/post-visibility/utils.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal Dependencies */ function PostVisibilityLabel(_ref) { var visibility = _ref.visibility; var getVisibilityLabel = function getVisibilityLabel() { return Object(lodash__WEBPACK_IMPORTED_MODULE_0__["find"])(_utils__WEBPACK_IMPORTED_MODULE_2__["visibilityOptions"], { value: visibility }).label; }; return getVisibilityLabel(visibility); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["withSelect"])(function (select) { return { visibility: select('core/editor').getEditedPostVisibility() }; })(PostVisibilityLabel)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/post-visibility/utils.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/post-visibility/utils.js ***! \*****************************************************************************************/ /*! exports provided: visibilityOptions */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "visibilityOptions", function() { return visibilityOptions; }); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); /** * WordPress Dependencies */ var visibilityOptions = [{ value: 'public', label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Public'), info: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Visible to everyone.') }, { value: 'private', label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Private'), info: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Only visible to site admins and editors.') }, { value: 'password', label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Password Protected'), info: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Protected with a password you choose. Only those with the password can view this post.') }]; /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/preserve-scroll-in-reorder/index.js": /*!****************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/preserve-scroll-in-reorder/index.js ***! \****************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/dom */ "@wordpress/dom"); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_dom__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/dom */ "./node_modules/@wordpress/editor/build-module/utils/dom.js"); /** * WordPress dependencies */ /** * Internal dependencies */ /** * Non-visual component which preserves offset of selected block within nearest * scrollable container while reordering. * * @example * * ```jsx * * ``` */ var PreserveScrollInReorder = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(PreserveScrollInReorder, _Component); function PreserveScrollInReorder() { Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, PreserveScrollInReorder); return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(PreserveScrollInReorder).apply(this, arguments)); } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(PreserveScrollInReorder, [{ key: "getSnapshotBeforeUpdate", value: function getSnapshotBeforeUpdate(prevProps) { var _this$props = this.props, blockOrder = _this$props.blockOrder, selectionStart = _this$props.selectionStart; if (blockOrder !== prevProps.blockOrder && selectionStart) { return this.getOffset(selectionStart); } return null; } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps, prevState, snapshot) { if (snapshot) { this.restorePreviousOffset(snapshot); } } /** * Given the block client ID of the start of the selection, saves the * block's top offset as an instance property before a reorder is to occur. * * @param {string} selectionStart Client ID of selected block. * * @return {number?} The scroll offset. */ }, { key: "getOffset", value: function getOffset(selectionStart) { var blockNode = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_8__["getBlockDOMNode"])(selectionStart); if (!blockNode) { return null; } return blockNode.getBoundingClientRect().top; } /** * After a block reordering, restores the previous viewport top offset. * * @param {number} offset The scroll offset. */ }, { key: "restorePreviousOffset", value: function restorePreviousOffset(offset) { var selectionStart = this.props.selectionStart; var blockNode = Object(_utils_dom__WEBPACK_IMPORTED_MODULE_8__["getBlockDOMNode"])(selectionStart); if (blockNode) { var scrollContainer = Object(_wordpress_dom__WEBPACK_IMPORTED_MODULE_7__["getScrollContainer"])(blockNode); if (scrollContainer) { scrollContainer.scrollTop = scrollContainer.scrollTop + blockNode.getBoundingClientRect().top - offset; } } } }, { key: "render", value: function render() { return null; } }]); return PreserveScrollInReorder; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withSelect"])(function (select) { return { blockOrder: select('core/editor').getBlockOrder(), selectionStart: select('core/editor').getBlockSelectionStart() }; })(PreserveScrollInReorder)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/provider/index.js": /*!**********************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/provider/index.js ***! \**********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _editor_styles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../editor-styles */ "./node_modules/@wordpress/editor/build-module/editor-styles/index.js"); /** * External dependencies */ /** * WordPress Dependencies */ /** * Internal dependencies */ var EditorProvider = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__["default"])(EditorProvider, _Component); function EditorProvider(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, EditorProvider); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(EditorProvider).apply(this, arguments)); // Assume that we don't need to initialize in the case of an error recovery. if (props.recovery) { return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(_this); } props.updateEditorSettings(props.settings); props.updatePostLock(props.settings.postLock); props.setupEditor(props.post, props.initialEdits); if (props.settings.autosave) { props.createWarningNotice(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('There is an autosave of this post that is more recent than the version below.'), { id: 'autosave-exists', actions: [{ label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__["__"])('View the autosave'), url: props.settings.autosave.editLink }] }); } return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(EditorProvider, [{ key: "componentDidMount", value: function componentDidMount() { if (!this.props.settings.styles) { return; } Object(lodash__WEBPACK_IMPORTED_MODULE_6__["map"])(this.props.settings.styles, function (_ref) { var css = _ref.css, baseURL = _ref.baseURL; var transforms = [Object(_editor_styles__WEBPACK_IMPORTED_MODULE_12__["wrap"])('.editor-styles-wrapper')]; if (baseURL) { transforms.push(Object(_editor_styles__WEBPACK_IMPORTED_MODULE_12__["urlRewrite"])(baseURL)); } var updatedCSS = Object(_editor_styles__WEBPACK_IMPORTED_MODULE_12__["traverse"])(css, Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__["compose"])(transforms)); if (updatedCSS) { var node = document.createElement('style'); node.innerHTML = updatedCSS; document.body.appendChild(node); } }); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (this.props.settings !== prevProps.settings) { this.props.updateEditorSettings(this.props.settings); } } }, { key: "render", value: function render() { var children = this.props.children; var providers = [// Slot / Fill provider: // // - context.getSlot // - context.registerSlot // - context.unregisterSlot [_wordpress_components__WEBPACK_IMPORTED_MODULE_9__["SlotFillProvider"]], // DropZone provider: [_wordpress_components__WEBPACK_IMPORTED_MODULE_9__["DropZoneProvider"]]]; var createEditorElement = Object(lodash__WEBPACK_IMPORTED_MODULE_6__["flow"])(providers.map(function (_ref2) { var _ref3 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref2, 2), Provider = _ref3[0], props = _ref3[1]; return function (arg) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(Provider, props, arg); }; })); return createEditorElement(children); } }]); return EditorProvider; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), setupEditor = _dispatch.setupEditor, updateEditorSettings = _dispatch.updateEditorSettings, updatePostLock = _dispatch.updatePostLock; var _dispatch2 = dispatch('core/notices'), createWarningNotice = _dispatch2.createWarningNotice; return { setupEditor: setupEditor, updateEditorSettings: updateEditorSettings, updatePostLock: updatePostLock, createWarningNotice: createWarningNotice }; })(EditorProvider)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/rich-text/aria.js": /*!**********************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/rich-text/aria.js ***! \**********************************************************************************/ /*! exports provided: pickAriaProps, diffAriaProps */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pickAriaProps", function() { return pickAriaProps; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "diffAriaProps", function() { return diffAriaProps; }); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /** * External dependencies */ var isAriaPropName = function isAriaPropName(name) { return Object(lodash__WEBPACK_IMPORTED_MODULE_0__["startsWith"])(name, 'aria-'); }; var pickAriaProps = function pickAriaProps(props) { return Object(lodash__WEBPACK_IMPORTED_MODULE_0__["pickBy"])(props, function (value, key) { return isAriaPropName(key) && !Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isNil"])(value); }); }; var diffAriaProps = function diffAriaProps(props, nextProps) { var prevAriaKeys = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["keys"])(pickAriaProps(props)); var nextAriaKeys = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["keys"])(pickAriaProps(nextProps)); var removedKeys = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["difference"])(prevAriaKeys, nextAriaKeys); var updatedKeys = nextAriaKeys.filter(function (key) { return !Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isEqual"])(props[key], nextProps[key]); }); return { removedKeys: removedKeys, updatedKeys: updatedKeys }; }; /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/rich-text/format-edit.js": /*!*****************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/rich-text/format-edit.js ***! \*****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/rich-text */ "@wordpress/rich-text"); /* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_2__); /** * WordPress dependencies */ var FormatEdit = function FormatEdit(_ref) { var formatTypes = _ref.formatTypes, onChange = _ref.onChange, value = _ref.value; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, formatTypes.map(function (_ref2) { var name = _ref2.name, Edit = _ref2.edit; if (!Edit) { return null; } var activeFormat = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_2__["getActiveFormat"])(value, name); var isActive = activeFormat !== undefined; var activeAttributes = isActive ? activeFormat.attributes || {} : {}; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(Edit, { key: name, isActive: isActive, activeAttributes: activeAttributes, value: value, onChange: onChange }); })); }; /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["withSelect"])(function (select) { var _select = select('core/rich-text'), getFormatTypes = _select.getFormatTypes; return { formatTypes: getFormatTypes() }; })(FormatEdit)); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/rich-text/format-toolbar/index.js": /*!**************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/rich-text/format-toolbar/index.js ***! \**************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var FormatToolbar = function FormatToolbar(_ref) { var controls = _ref.controls; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "editor-format-toolbar" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Toolbar"], null, controls.map(function (format) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Slot"], { name: "RichText.ToolbarControls.".concat(format), key: format }); }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Slot"], { name: "RichText.ToolbarControls" }))); }; /* harmony default export */ __webpack_exports__["default"] = (FormatToolbar); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/rich-text/index.js": /*!***********************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/rich-text/index.js ***! \***********************************************************************************/ /*! exports provided: RichText, default, RichTextShortcut, RichTextToolbarButton, RichTextInserterItem */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RichText", function() { return RichText; }); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var memize__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! memize */ "./node_modules/memize/index.js"); /* harmony import */ var memize__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(memize__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/dom */ "@wordpress/dom"); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_dom__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _wordpress_blob__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @wordpress/blob */ "@wordpress/blob"); /* harmony import */ var _wordpress_blob__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blob__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url"); /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_20__); /* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/rich-text */ "@wordpress/rich-text"); /* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__); /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @wordpress/html-entities */ "@wordpress/html-entities"); /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_22__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/deprecated */ "@wordpress/deprecated"); /* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var _autocomplete__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../autocomplete */ "./node_modules/@wordpress/editor/build-module/components/autocomplete/index.js"); /* harmony import */ var _block_format_controls__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../block-format-controls */ "./node_modules/@wordpress/editor/build-module/components/block-format-controls/index.js"); /* harmony import */ var _format_edit__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./format-edit */ "./node_modules/@wordpress/editor/build-module/components/rich-text/format-edit.js"); /* harmony import */ var _format_toolbar__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./format-toolbar */ "./node_modules/@wordpress/editor/build-module/components/rich-text/format-toolbar/index.js"); /* harmony import */ var _tinymce__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./tinymce */ "./node_modules/@wordpress/editor/build-module/components/rich-text/tinymce.js"); /* harmony import */ var _aria__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./aria */ "./node_modules/@wordpress/editor/build-module/components/rich-text/aria.js"); /* harmony import */ var _patterns__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./patterns */ "./node_modules/@wordpress/editor/build-module/components/rich-text/patterns.js"); /* harmony import */ var _block_edit_context__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../block-edit/context */ "./node_modules/@wordpress/editor/build-module/components/block-edit/context.js"); /* harmony import */ var _list_edit__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./list-edit */ "./node_modules/@wordpress/editor/build-module/components/rich-text/list-edit.js"); /* harmony import */ var _remove_browser_shortcuts__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./remove-browser-shortcuts */ "./node_modules/@wordpress/editor/build-module/components/rich-text/remove-browser-shortcuts.js"); /* harmony import */ var _shortcut__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./shortcut */ "./node_modules/@wordpress/editor/build-module/components/rich-text/shortcut.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RichTextShortcut", function() { return _shortcut__WEBPACK_IMPORTED_MODULE_35__["RichTextShortcut"]; }); /* harmony import */ var _toolbar_button__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./toolbar-button */ "./node_modules/@wordpress/editor/build-module/components/rich-text/toolbar-button.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RichTextToolbarButton", function() { return _toolbar_button__WEBPACK_IMPORTED_MODULE_36__["RichTextToolbarButton"]; }); /* harmony import */ var _inserter_list_item__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./inserter-list-item */ "./node_modules/@wordpress/editor/build-module/components/rich-text/inserter-list-item.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RichTextInserterItem", function() { return _inserter_list_item__WEBPACK_IMPORTED_MODULE_37__["RichTextInserterItem"]; }); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Browser dependencies */ var _window = window, getSelection = _window.getSelection; var RichText = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_8__["default"])(RichText, _Component); function RichText(_ref) { var _this; var value = _ref.value, onReplace = _ref.onReplace, multiline = _ref.multiline; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_4__["default"])(this, RichText); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__["default"])(RichText).apply(this, arguments)); if (multiline === true || multiline === 'p' || multiline === 'li') { _this.multilineTag = multiline === true ? 'p' : multiline; } if (_this.multilineTag === 'li') { _this.multilineWrapperTags = ['ul', 'ol']; } if (_this.props.onSplit) { _this.onSplit = _this.props.onSplit; _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_24___default()('wp.editor.RichText onSplit prop', { plugin: 'Gutenberg', alternative: 'wp.editor.RichText unstableOnSplit prop' }); } else if (_this.props.unstableOnSplit) { _this.onSplit = _this.props.unstableOnSplit; } _this.onSetup = _this.onSetup.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.onFocus = _this.onFocus.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.onChange = _this.onChange.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.onDeleteKeyDown = _this.onDeleteKeyDown.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.onKeyDown = _this.onKeyDown.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.onPaste = _this.onPaste.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.onCreateUndoLevel = _this.onCreateUndoLevel.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.setFocusedElement = _this.setFocusedElement.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.onInput = _this.onInput.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.onCompositionEnd = _this.onCompositionEnd.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.onSelectionChange = _this.onSelectionChange.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.getRecord = _this.getRecord.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.createRecord = _this.createRecord.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.applyRecord = _this.applyRecord.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.isEmpty = _this.isEmpty.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.valueToFormat = _this.valueToFormat.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.setRef = _this.setRef.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.isActive = _this.isActive.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))); _this.formatToValue = memize__WEBPACK_IMPORTED_MODULE_13___default()(_this.formatToValue.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_9__["default"])(_this))), { size: 1 }); _this.savedContent = value; _this.patterns = Object(_patterns__WEBPACK_IMPORTED_MODULE_31__["getPatterns"])({ onReplace: onReplace, onCreateUndoLevel: _this.onCreateUndoLevel, valueToFormat: _this.valueToFormat, onChange: _this.onChange }); _this.enterPatterns = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_18__["getBlockTransforms"])('from').filter(function (_ref2) { var type = _ref2.type; return type === 'enter'; }); _this.state = {}; _this.usedDeprecatedChildrenSource = Array.isArray(value); _this.lastHistoryValue = value; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_5__["default"])(RichText, [{ key: "componentDidMount", value: function componentDidMount() { document.addEventListener('selectionchange', this.onSelectionChange); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { document.removeEventListener('selectionchange', this.onSelectionChange); } }, { key: "setRef", value: function setRef(node) { this.editableRef = node; } }, { key: "isActive", value: function isActive() { return this.editableRef === document.activeElement; } /** * Handles the onSetup event for the TinyMCE component. * * Will setup event handlers for the TinyMCE instance. * An `onSetup` function in the props will be called if it is present. * * @param {tinymce} editor The editor instance as passed by TinyMCE. */ }, { key: "onSetup", value: function onSetup(editor) { this.editor = editor; } }, { key: "setFocusedElement", value: function setFocusedElement() { if (this.props.setFocusedElement) { this.props.setFocusedElement(this.props.instanceId); } } /** * Get the current record (value and selection) from props and state. * * @return {Object} The current record (value and selection). */ }, { key: "getRecord", value: function getRecord() { var _this$formatToValue = this.formatToValue(this.props.value), formats = _this$formatToValue.formats, text = _this$formatToValue.text; var _this$state = this.state, start = _this$state.start, end = _this$state.end; return { formats: formats, text: text, start: start, end: end }; } }, { key: "createRecord", value: function createRecord() { var range = getSelection().getRangeAt(0); return Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["create"])({ element: this.editableRef, range: range, multilineTag: this.multilineTag, multilineWrapperTags: this.multilineWrapperTags, removeNode: function removeNode(node) { return node.getAttribute('data-mce-bogus') === 'all'; }, unwrapNode: function unwrapNode(node) { return !!node.getAttribute('data-mce-bogus'); }, removeAttribute: function removeAttribute(attribute) { return attribute.indexOf('data-mce-') === 0; }, filterString: function filterString(string) { return string.replace(_tinymce__WEBPACK_IMPORTED_MODULE_29__["TINYMCE_ZWSP"], ''); }, prepareEditableTree: this.props.prepareEditableTree }); } }, { key: "applyRecord", value: function applyRecord(record) { Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["apply"])({ value: record, current: this.editableRef, multilineTag: this.multilineTag, multilineWrapperTags: this.multilineWrapperTags, createLinePadding: function createLinePadding(doc) { var element = doc.createElement('br'); element.setAttribute('data-mce-bogus', '1'); return element; }, prepareEditableTree: this.props.prepareEditableTree }); } }, { key: "isEmpty", value: function isEmpty() { return Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["isEmpty"])(this.formatToValue(this.props.value)); } /** * Handles a paste event. * * Saves the pasted data as plain text in `pastedPlainText`. * * @param {PasteEvent} event The paste event. */ }, { key: "onPaste", value: function onPaste(event) { var clipboardData = event.clipboardData; var items = clipboardData.items, files = clipboardData.files; // In Edge these properties can be null instead of undefined, so a more // rigorous test is required over using default values. items = Object(lodash__WEBPACK_IMPORTED_MODULE_12__["isNil"])(items) ? [] : items; files = Object(lodash__WEBPACK_IMPORTED_MODULE_12__["isNil"])(files) ? [] : files; var item = Object(lodash__WEBPACK_IMPORTED_MODULE_12__["find"])(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__["default"])(items).concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__["default"])(files)), function (_ref3) { var type = _ref3.type; return /^image\/(?:jpe?g|png|gif)$/.test(type); }); var plainText = ''; var html = ''; // IE11 only supports `Text` as an argument for `getData` and will // otherwise throw an invalid argument error, so we try the standard // arguments first, then fallback to `Text` if they fail. try { plainText = clipboardData.getData('text/plain'); html = clipboardData.getData('text/html'); } catch (error1) { try { html = clipboardData.getData('Text'); } catch (error2) { // Some browsers like UC Browser paste plain text by default and // don't support clipboardData at all, so allow default // behaviour. return; } } event.preventDefault(); // Allows us to ask for this information when we get a report. window.console.log('Received HTML:\n\n', html); window.console.log('Received plain text:\n\n', plainText); // Only process file if no HTML is present. // Note: a pasted file may have the URL as plain text. if (item && !html) { var file = item.getAsFile ? item.getAsFile() : item; var _content = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_18__["pasteHandler"])({ HTML: ""), mode: 'BLOCKS', tagName: this.props.tagName }); var _shouldReplace = this.props.onReplace && this.isEmpty(); // Allows us to ask for this information when we get a report. window.console.log('Received item:\n\n', file); if (_shouldReplace) { this.props.onReplace(_content); } else if (this.onSplit) { this.splitContent(_content); } return; } var record = this.getRecord(); // There is a selection, check if a URL is pasted. if (!Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["isCollapsed"])(record)) { var pastedText = (html || plainText).replace(/<[^>]+>/g, '').trim(); // A URL was pasted, turn the selection into a link if (Object(_wordpress_url__WEBPACK_IMPORTED_MODULE_20__["isURL"])(pastedText)) { this.onChange(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["applyFormat"])(record, { type: 'a', attributes: { href: Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_22__["decodeEntities"])(pastedText) } })); // Allows us to ask for this information when we get a report. window.console.log('Created link:\n\n', pastedText); return; } } var shouldReplace = this.props.onReplace && this.isEmpty(); var mode = 'INLINE'; if (shouldReplace) { mode = 'BLOCKS'; } else if (this.onSplit) { mode = 'AUTO'; } var content = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_18__["pasteHandler"])({ HTML: html, plainText: plainText, mode: mode, tagName: this.props.tagName, canUserUseUnfilteredHTML: this.props.canUserUseUnfilteredHTML }); if (typeof content === 'string') { var recordToInsert = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["create"])({ html: content }); this.onChange(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["insert"])(record, recordToInsert)); } else if (this.onSplit) { if (!content.length) { return; } if (shouldReplace) { this.props.onReplace(content); } else { this.splitContent(content, { paste: true }); } } } /** * Handles a focus event on the contenteditable field, calling the * `unstableOnFocus` prop callback if one is defined. The callback does not * receive any arguments. * * This is marked as a private API and the `unstableOnFocus` prop is not * documented, as the current requirements where it is used are subject to * future refactoring following `isSelected` handling. * * In contrast with `setFocusedElement`, this is only triggered in response * to focus within the contenteditable field, whereas `setFocusedElement` * is triggered on focus within any `RichText` descendent element. * * @see setFocusedElement * * @private */ }, { key: "onFocus", value: function onFocus() { var unstableOnFocus = this.props.unstableOnFocus; if (unstableOnFocus) { unstableOnFocus(); } } /** * Handle input on the next selection change event. * * @param {SyntheticEvent} event Synthetic input event. */ }, { key: "onInput", value: function onInput(event) { // For Input Method Editor (IME), used in Chinese, Japanese, and Korean // (CJK), do not trigger a change if characters are being composed. // Browsers setting `isComposing` to `true` will usually emit a final // `input` event when the characters are composed. if (event.nativeEvent.isComposing) { return; } var record = this.createRecord(); var transformed = this.patterns.reduce(function (accumlator, transform) { return transform(accumlator); }, record); this.onChange(transformed, { withoutHistory: true }); // Create an undo level when input stops for over a second. this.props.clearTimeout(this.onInput.timeout); this.onInput.timeout = this.props.setTimeout(this.onCreateUndoLevel, 1000); } }, { key: "onCompositionEnd", value: function onCompositionEnd() { // Ensure the value is up-to-date for browsers that don't emit a final // input event after composition. this.onChange(this.createRecord()); } /** * Handles the `selectionchange` event: sync the selection to local state. */ }, { key: "onSelectionChange", value: function onSelectionChange() { // Ensure it's the active element. This is a global event. if (!this.isActive()) { return; } var _this$createRecord = this.createRecord(), start = _this$createRecord.start, end = _this$createRecord.end, formats = _this$createRecord.formats; if (start !== this.state.start || end !== this.state.end) { var isCaretWithinFormattedText = this.props.isCaretWithinFormattedText; if (!isCaretWithinFormattedText && formats[start]) { this.props.onEnterFormattedText(); } else if (isCaretWithinFormattedText && !formats[start]) { this.props.onExitFormattedText(); } this.setState({ start: start, end: end }); } } /** * Calls all registered onChangeEditableValue handlers. * * @param {Array} formats The formats of the latest rich-text value. * @param {string} text The text of the latest rich-text value. */ }, { key: "onChangeEditableValue", value: function onChangeEditableValue(_ref4) { var formats = _ref4.formats, text = _ref4.text; Object(lodash__WEBPACK_IMPORTED_MODULE_12__["get"])(this.props, ['onChangeEditableValue'], []).forEach(function (eventHandler) { eventHandler(formats, text); }); } /** * Sync the value to global state. The node tree and selection will also be * updated if differences are found. * * @param {Object} record The record to sync and apply. * @param {Object} $2 Named options. * @param {boolean} $2.withoutHistory If true, no undo level will be * created. */ }, { key: "onChange", value: function onChange(record) { var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, withoutHistory = _ref5.withoutHistory; this.applyRecord(record); var start = record.start, end = record.end; this.onChangeEditableValue(record); this.savedContent = this.valueToFormat(record); this.props.onChange(this.savedContent); this.setState({ start: start, end: end }); if (!withoutHistory) { this.onCreateUndoLevel(); } } }, { key: "onCreateUndoLevel", value: function onCreateUndoLevel() { // If the content is the same, no level needs to be created. if (this.lastHistoryValue === this.savedContent) { return; } this.props.onCreateUndoLevel(); this.lastHistoryValue = this.savedContent; } /** * Handles a delete keyDown event to handle merge or removal for collapsed * selection where caret is at directional edge: forward for a delete key, * reverse for a backspace key. * * @link https://en.wikipedia.org/wiki/Caret_navigation * * @param {KeyboardEvent} event Keydown event. */ }, { key: "onDeleteKeyDown", value: function onDeleteKeyDown(event) { var _this$props = this.props, onMerge = _this$props.onMerge, onRemove = _this$props.onRemove; if (!onMerge && !onRemove) { return; } var keyCode = event.keyCode; var isReverse = keyCode === _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_16__["BACKSPACE"]; // Only process delete if the key press occurs at uncollapsed edge. if (!Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["isCollapsed"])(this.createRecord())) { return; } var empty = this.isEmpty(); // It is important to consider emptiness because an empty container // will include a bogus TinyMCE BR node _after_ the caret, so in a // forward deletion the isHorizontalEdge function will incorrectly // interpret the presence of the bogus node as not being at the edge. var isEdge = empty || Object(_wordpress_dom__WEBPACK_IMPORTED_MODULE_14__["isHorizontalEdge"])(this.editableRef, isReverse); if (!isEdge) { return; } if (onMerge) { onMerge(!isReverse); } // Only handle remove on Backspace. This serves dual-purpose of being // an intentional user interaction distinguishing between Backspace and // Delete to remove the empty field, but also to avoid merge & remove // causing destruction of two fields (merge, then removed merged). if (onRemove && empty && isReverse) { onRemove(!isReverse); } event.preventDefault(); } /** * Handles a keydown event. * * @param {KeyboardEvent} event The keydown event. */ }, { key: "onKeyDown", value: function onKeyDown(event) { var keyCode = event.keyCode; if (keyCode === _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_16__["DELETE"] || keyCode === _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_16__["BACKSPACE"]) { var value = this.createRecord(); var start = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["getSelectionStart"])(value); var end = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["getSelectionEnd"])(value); // Always handle full content deletion ourselves. if (start === 0 && end !== 0 && end === value.text.length) { this.onChange(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["remove"])(value)); event.preventDefault(); return; } if (this.multilineTag) { var newValue; if (keyCode === _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_16__["BACKSPACE"]) { if (Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["charAt"])(value, start - 1) === _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["LINE_SEPARATOR"]) { newValue = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["remove"])(value, // Only remove the line if the selection is // collapsed. Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["isCollapsed"])(value) ? start - 1 : start, end); } } else if (Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["charAt"])(value, end) === _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["LINE_SEPARATOR"]) { newValue = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["remove"])(value, start, // Only remove the line if the selection is collapsed. Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["isCollapsed"])(value) ? end + 1 : end); } if (newValue) { this.onChange(newValue); event.preventDefault(); } } this.onDeleteKeyDown(event); } else if (keyCode === _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_16__["ENTER"]) { event.preventDefault(); var record = this.createRecord(); if (this.props.onReplace) { var text = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["getTextContent"])(record); var transformation = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_18__["findTransform"])(this.enterPatterns, function (item) { return item.regExp.test(text); }); if (transformation) { this.props.onReplace([transformation.transform({ content: text })]); return; } } if (this.multilineTag) { if (this.onSplit && Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["isEmptyLine"])(record)) { this.onSplit.apply(this, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__["default"])(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["split"])(record).map(this.valueToFormat))); } else { this.onChange(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["insertLineSeparator"])(record)); } } else if (event.shiftKey || !this.onSplit) { var _text = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["getTextContent"])(record); var length = _text.length; var toInsert = '\n'; // If the caret is at the end of the text, and there is no // trailing line break or no text at all, we have to insert two // line breaks in order to create a new line visually and place // the caret there. if (record.end === length && (_text.charAt(length - 1) !== '\n' || length === 0)) { toInsert = '\n\n'; } this.onChange(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["insert"])(record, toInsert)); } else { this.splitContent(); } } } /** * Splits the content at the location of the selection. * * Replaces the content of the editor inside this element with the contents * before the selection. Sends the elements after the selection to the `onSplit` * handler. * * @param {Array} blocks The blocks to add after the split point. * @param {Object} context The context for splitting. */ }, { key: "splitContent", value: function splitContent() { var blocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var record = this.createRecord(); if (!this.onSplit) { return; } var _split = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["split"])(record), _split2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_split, 2), before = _split2[0], after = _split2[1]; // In case split occurs at the trailing or leading edge of the field, // assume that the before/after values respectively reflect the current // value. This also provides an opportunity for the parent component to // determine whether the before/after value has changed using a trivial // strict equality operation. if (Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["isEmpty"])(after)) { before = record; } else if (Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["isEmpty"])(before)) { after = record; } // If pasting and the split would result in no content other than the // pasted blocks, remove the before and after blocks. if (context.paste) { before = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["isEmpty"])(before) ? null : before; after = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["isEmpty"])(after) ? null : after; } if (before) { before = this.valueToFormat(before); } if (after) { after = this.valueToFormat(after); } this.onSplit.apply(this, [before, after].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__["default"])(blocks))); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var _this2 = this; var _this$props2 = this.props, tagName = _this$props2.tagName, value = _this$props2.value, isSelected = _this$props2.isSelected; if (tagName === prevProps.tagName && value !== prevProps.value && value !== this.savedContent) { // Handle deprecated `children` and `node` sources. // The old way of passing a value with the `node` matcher required // the value to be mapped first, creating a new array each time, so // a shallow check wouldn't work. We need to check deep equality. // This is only executed for a deprecated API and will eventually be // removed. if (Array.isArray(value) && Object(lodash__WEBPACK_IMPORTED_MODULE_12__["isEqual"])(value, this.savedContent)) { return; } var record = this.formatToValue(value); if (isSelected) { var prevRecord = this.formatToValue(prevProps.value); var length = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["getTextContent"])(prevRecord).length; record.start = length; record.end = length; } this.applyRecord(record); this.savedContent = value; } // If blocks are merged, but the content remains the same, e.g. merging // an empty paragraph into another, then also set the selection to the // end. if (isSelected && !prevProps.isSelected && !this.isActive()) { var _record = this.formatToValue(value); var _prevRecord = this.formatToValue(prevProps.value); var _length = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["getTextContent"])(_prevRecord).length; _record.start = _length; _record.end = _length; this.applyRecord(_record); } // If any format props update, reapply value. var shouldReapply = Object.keys(this.props).some(function (name) { if (name.indexOf('format_') !== 0) { return false; } // Allow primitives and arrays: if (!Object(lodash__WEBPACK_IMPORTED_MODULE_12__["isPlainObject"])(_this2.props[name])) { return _this2.props[name] !== prevProps[name]; } return Object.keys(_this2.props[name]).some(function (subName) { return _this2.props[name][subName] !== prevProps[name][subName]; }); }); if (shouldReapply) { var _record2 = this.formatToValue(value); // Maintain the previous selection: _record2.start = this.state.start; _record2.end = this.state.end; this.applyRecord(_record2); } } /** * Get props that are provided by formats to modify RichText. * * @return {Object} Props that start with 'format_'. */ }, { key: "getFormatProps", value: function getFormatProps() { return Object(lodash__WEBPACK_IMPORTED_MODULE_12__["pickBy"])(this.props, function (propValue, name) { return name.startsWith('format_'); }); } /** * Converts the outside data structure to our internal representation. * * @param {*} value The outside value, data type depends on props. * @return {Object} An internal rich-text value. */ }, { key: "formatToValue", value: function formatToValue(value) { // Handle deprecated `children` and `node` sources. if (Array.isArray(value)) { return Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["create"])({ html: _wordpress_blocks__WEBPACK_IMPORTED_MODULE_18__["children"].toHTML(value), multilineTag: this.multilineTag, multilineWrapperTags: this.multilineWrapperTags }); } if (this.props.format === 'string') { return Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["create"])({ html: value, multilineTag: this.multilineTag, multilineWrapperTags: this.multilineWrapperTags }); } // Guard for blocks passing `null` in onSplit callbacks. May be removed // if onSplit is revised to not pass a `null` value. if (value === null) { return Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["create"])(); } return value; } }, { key: "valueToEditableHTML", value: function valueToEditableHTML(value) { return Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["unstableToDom"])({ value: value, multilineTag: this.multilineTag, multilineWrapperTags: this.multilineWrapperTags, createLinePadding: function createLinePadding(doc) { var element = doc.createElement('br'); element.setAttribute('data-mce-bogus', '1'); return element; }, prepareEditableTree: this.props.prepareEditableTree }).body.innerHTML; } /** * Removes editor only formats from the value. * * Editor only formats are applied using `prepareEditableTree`, so we need to * remove them before converting the internal state * * @param {Object} value The internal rich-text value. * @return {Object} A new rich-text value. */ }, { key: "removeEditorOnlyFormats", value: function removeEditorOnlyFormats(value) { this.props.formatTypes.forEach(function (formatType) { // Remove formats created by prepareEditableTree, because they are editor only. if (formatType.__experimentalCreatePrepareEditableTree) { value = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["removeFormat"])(value, formatType.name, 0, value.text.length); } }); return value; } /** * Converts the internal value to the external data format. * * @param {Object} value The internal rich-text value. * @return {*} The external data format, data type depends on props. */ }, { key: "valueToFormat", value: function valueToFormat(value) { value = this.removeEditorOnlyFormats(value); // Handle deprecated `children` and `node` sources. if (this.usedDeprecatedChildrenSource) { return _wordpress_blocks__WEBPACK_IMPORTED_MODULE_18__["children"].fromDOM(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["unstableToDom"])({ value: value, multilineTag: this.multilineTag, multilineWrapperTags: this.multilineWrapperTags }).body.childNodes); } if (this.props.format === 'string') { return Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_21__["toHTMLString"])({ value: value, multilineTag: this.multilineTag, multilineWrapperTags: this.multilineWrapperTags }); } return value; } }, { key: "render", value: function render() { var _this3 = this; var _this$props3 = this.props, _this$props3$tagName = _this$props3.tagName, Tagname = _this$props3$tagName === void 0 ? 'div' : _this$props3$tagName, style = _this$props3.style, wrapperClassName = _this$props3.wrapperClassName, className = _this$props3.className, _this$props3$inlineTo = _this$props3.inlineToolbar, inlineToolbar = _this$props3$inlineTo === void 0 ? false : _this$props3$inlineTo, formattingControls = _this$props3.formattingControls, placeholder = _this$props3.placeholder, _this$props3$keepPlac = _this$props3.keepPlaceholderOnFocus, keepPlaceholderOnFocus = _this$props3$keepPlac === void 0 ? false : _this$props3$keepPlac, isSelected = _this$props3.isSelected, autocompleters = _this$props3.autocompleters, onTagNameChange = _this$props3.onTagNameChange; var MultilineTag = this.multilineTag; var ariaProps = Object(_aria__WEBPACK_IMPORTED_MODULE_30__["pickAriaProps"])(this.props); // Generating a key that includes `tagName` ensures that if the tag // changes, we unmount and destroy the previous TinyMCE element, then // mount and initialize a new child element in its place. var key = ['editor', Tagname].join(); var isPlaceholderVisible = placeholder && (!isSelected || keepPlaceholderOnFocus) && this.isEmpty(); var classes = classnames__WEBPACK_IMPORTED_MODULE_11___default()(wrapperClassName, 'editor-rich-text'); var record = this.getRecord(); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])("div", { className: classes, onFocus: this.setFocusedElement }, isSelected && this.editor && this.multilineTag === 'li' && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])(_list_edit__WEBPACK_IMPORTED_MODULE_33__["ListEdit"], { editor: this.editor, onTagNameChange: onTagNameChange, tagName: Tagname, onSyncDOM: function onSyncDOM() { return _this3.onChange(_this3.createRecord()); } }), isSelected && !inlineToolbar && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])(_block_format_controls__WEBPACK_IMPORTED_MODULE_26__["default"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])(_format_toolbar__WEBPACK_IMPORTED_MODULE_28__["default"], { controls: formattingControls })), isSelected && inlineToolbar && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_23__["IsolatedEventContainer"], { className: "editor-rich-text__inline-toolbar" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])(_format_toolbar__WEBPACK_IMPORTED_MODULE_28__["default"], { controls: formattingControls })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])(_autocomplete__WEBPACK_IMPORTED_MODULE_25__["default"], { onReplace: this.props.onReplace, completers: autocompleters, record: record, onChange: this.onChange }, function (_ref6) { var isExpanded = _ref6.isExpanded, listBoxId = _ref6.listBoxId, activeId = _ref6.activeId; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])(_tinymce__WEBPACK_IMPORTED_MODULE_29__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ tagName: Tagname, onSetup: _this3.onSetup, style: style, defaultValue: _this3.valueToEditableHTML(record), isPlaceholderVisible: isPlaceholderVisible, "aria-label": placeholder, "aria-autocomplete": "list", "aria-expanded": isExpanded, "aria-owns": listBoxId, "aria-activedescendant": activeId }, ariaProps, { className: className, key: key, onPaste: _this3.onPaste, onInput: _this3.onInput, onCompositionEnd: _this3.onCompositionEnd, onKeyDown: _this3.onKeyDown, onFocus: _this3.onFocus, multilineTag: _this3.multilineTag, multilineWrapperTags: _this3.multilineWrapperTags, setRef: _this3.setRef })), isPlaceholderVisible && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])(Tagname, { className: classnames__WEBPACK_IMPORTED_MODULE_11___default()('editor-rich-text__tinymce', className), style: style }, MultilineTag ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])(MultilineTag, null, placeholder) : placeholder), isSelected && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])(_format_edit__WEBPACK_IMPORTED_MODULE_27__["default"], { value: record, onChange: _this3.onChange })); }), isSelected && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])(_remove_browser_shortcuts__WEBPACK_IMPORTED_MODULE_34__["RemoveBrowserShortcuts"], null)); } }]); return RichText; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["Component"]); RichText.defaultProps = { formattingControls: ['bold', 'italic', 'link', 'strikethrough'], format: 'string', value: '' }; var RichTextContainer = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_19__["compose"])([_wordpress_compose__WEBPACK_IMPORTED_MODULE_19__["withInstanceId"], Object(_block_edit_context__WEBPACK_IMPORTED_MODULE_32__["withBlockEditContext"])(function (context, ownProps) { // When explicitly set as not selected, do nothing. if (ownProps.isSelected === false) { return { clientId: context.clientId }; } // When explicitly set as selected, use the value stored in the context instead. if (ownProps.isSelected === true) { return { isSelected: context.isSelected, clientId: context.clientId }; } // Ensures that only one RichText component can be focused. return { isSelected: context.isSelected && context.focusedElement === ownProps.instanceId, setFocusedElement: context.setFocusedElement, clientId: context.clientId }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_17__["withSelect"])(function (select) { var _select = select('core/editor'), canUserUseUnfilteredHTML = _select.canUserUseUnfilteredHTML, isCaretWithinFormattedText = _select.isCaretWithinFormattedText; var _select2 = select('core/rich-text'), getFormatTypes = _select2.getFormatTypes; return { canUserUseUnfilteredHTML: canUserUseUnfilteredHTML(), isCaretWithinFormattedText: isCaretWithinFormattedText(), formatTypes: getFormatTypes() }; }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_17__["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/editor'), createUndoLevel = _dispatch.createUndoLevel, redo = _dispatch.redo, undo = _dispatch.undo, enterFormattedText = _dispatch.enterFormattedText, exitFormattedText = _dispatch.exitFormattedText; return { onCreateUndoLevel: createUndoLevel, onRedo: redo, onUndo: undo, onEnterFormattedText: enterFormattedText, onExitFormattedText: exitFormattedText }; }), _wordpress_compose__WEBPACK_IMPORTED_MODULE_19__["withSafeTimeout"], Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_23__["withFilters"])('experimentalRichText')])(RichText); RichTextContainer.Content = function (_ref7) { var value = _ref7.value, Tag = _ref7.tagName, multiline = _ref7.multiline, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref7, ["value", "tagName", "multiline"]); var html = value; var MultilineTag; if (multiline === true || multiline === 'p' || multiline === 'li') { MultilineTag = multiline === true ? 'p' : multiline; } // Handle deprecated `children` and `node` sources. if (Array.isArray(value)) { html = _wordpress_blocks__WEBPACK_IMPORTED_MODULE_18__["children"].toHTML(value); } if (!html && MultilineTag) { html = "<".concat(MultilineTag, ">"); } var content = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["RawHTML"], null, html); if (Tag) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_10__["createElement"])(Tag, Object(lodash__WEBPACK_IMPORTED_MODULE_12__["omit"])(props, ['format']), content); } return content; }; RichTextContainer.isEmpty = function () { var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; // Handle deprecated `children` and `node` sources. if (Array.isArray(value)) { return !value || value.length === 0; } return value.length === 0; }; RichTextContainer.Content.defaultProps = { format: 'string', value: '' }; /* harmony default export */ __webpack_exports__["default"] = (RichTextContainer); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/rich-text/inserter-list-item.js": /*!************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/rich-text/inserter-list-item.js ***! \************************************************************************************************/ /*! exports provided: RichTextInserterItem */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RichTextInserterItem", function() { return RichTextInserterItem; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _inserter_list_item__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../inserter-list-item */ "./node_modules/@wordpress/editor/build-module/components/inserter-list-item/index.js"); /* harmony import */ var _inserter_menu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../inserter/menu */ "./node_modules/@wordpress/editor/build-module/components/inserter/menu.js"); /** * WordPress dependencies */ /** * Internal dependencies */ function isResult(keywords, filterValue) { return keywords.some(function (string) { return Object(_inserter_menu__WEBPACK_IMPORTED_MODULE_6__["normalizeTerm"])(string).indexOf(Object(_inserter_menu__WEBPACK_IMPORTED_MODULE_6__["normalizeTerm"])(filterValue)) !== -1; }); } var RichTextInserterItem = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withSelect"])(function (select, _ref) { var name = _ref.name; return { formatType: select('core/rich-text').getFormatType(name) }; })(function (props) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["Fill"], { name: "Inserter.InlineElements" }, function (_ref2) { var filterValue = _ref2.filterValue; var _props$formatType = props.formatType, _props$formatType$key = _props$formatType.keywords, keywords = _props$formatType$key === void 0 ? [] : _props$formatType$key, title = _props$formatType.title; keywords.push(title, props.title); if (filterValue && !isResult(keywords, filterValue)) { return null; } return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_inserter_list_item__WEBPACK_IMPORTED_MODULE_5__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, { icon: Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__["normalizeIconObject"])(props.icon) })); }); }); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/rich-text/list-edit.js": /*!***************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/rich-text/list-edit.js ***! \***************************************************************************************/ /*! exports provided: ListEdit */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListEdit", function() { return ListEdit; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _shortcut__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shortcut */ "./node_modules/@wordpress/editor/build-module/components/rich-text/shortcut.js"); /* harmony import */ var _block_format_controls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../block-format-controls */ "./node_modules/@wordpress/editor/build-module/components/block-format-controls/index.js"); /** * WordPress dependencies */ /** * Internal dependencies */ function isListRootSelected(editor) { return !editor.selection || editor.selection.getNode().closest('ol,ul') === editor.getBody(); } function isActiveListType(editor, tagName, rootTagName) { if (document.activeElement !== editor.getBody()) { return tagName === rootTagName; } var listItem = editor.selection.getNode(); var list = listItem.closest('ol,ul'); if (!list) { return; } return list.nodeName.toLowerCase() === tagName; } var ListEdit = function ListEdit(_ref) { var editor = _ref.editor, onTagNameChange = _ref.onTagNameChange, tagName = _ref.tagName, onSyncDOM = _ref.onSyncDOM; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_shortcut__WEBPACK_IMPORTED_MODULE_3__["RichTextShortcut"], { type: "primary", character: "[", onUse: function onUse() { editor.execCommand('Outdent'); onSyncDOM(); } }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_shortcut__WEBPACK_IMPORTED_MODULE_3__["RichTextShortcut"], { type: "primary", character: "]", onUse: function onUse() { editor.execCommand('Indent'); onSyncDOM(); } }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_shortcut__WEBPACK_IMPORTED_MODULE_3__["RichTextShortcut"], { type: "primary", character: "m", onUse: function onUse() { editor.execCommand('Indent'); onSyncDOM(); } }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_shortcut__WEBPACK_IMPORTED_MODULE_3__["RichTextShortcut"], { type: "primaryShift", character: "m", onUse: function onUse() { editor.execCommand('Outdent'); onSyncDOM(); } }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_block_format_controls__WEBPACK_IMPORTED_MODULE_4__["default"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Toolbar"], { controls: [{ icon: 'editor-ul', title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Convert to unordered list'), isActive: isActiveListType(editor, 'ul', tagName), onClick: function onClick() { if (isListRootSelected(editor)) { onTagNameChange('ul'); } else { editor.execCommand('InsertUnorderedList'); onSyncDOM(); } } }, { icon: 'editor-ol', title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Convert to ordered list'), isActive: isActiveListType(editor, 'ol', tagName), onClick: function onClick() { if (isListRootSelected(editor)) { onTagNameChange('ol'); } else { editor.execCommand('InsertOrderedList'); onSyncDOM(); } } }, { icon: 'editor-outdent', title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Outdent list item'), onClick: function onClick() { editor.execCommand('Outdent'); onSyncDOM(); } }, { icon: 'editor-indent', title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Indent list item'), onClick: function onClick() { editor.execCommand('Indent'); onSyncDOM(); } }] }))); }; /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/rich-text/patterns.js": /*!**************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/rich-text/patterns.js ***! \**************************************************************************************/ /*! exports provided: getPatterns */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPatterns", function() { return getPatterns; }); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/rich-text */ "@wordpress/rich-text"); /* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ function getPatterns(_ref) { var onReplace = _ref.onReplace, valueToFormat = _ref.valueToFormat, onCreateUndoLevel = _ref.onCreateUndoLevel, onChange = _ref.onChange; var prefixTransforms = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__["getBlockTransforms"])('from').filter(function (_ref2) { var type = _ref2.type; return type === 'prefix'; }); return [function (record) { if (!onReplace) { return record; } var start = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__["getSelectionStart"])(record); var text = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__["getTextContent"])(record); var characterBefore = text.slice(start - 1, start); if (!/\s/.test(characterBefore)) { return record; } var trimmedTextBefore = text.slice(0, start).trim(); var transformation = Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__["findTransform"])(prefixTransforms, function (_ref3) { var prefix = _ref3.prefix; return trimmedTextBefore === prefix; }); if (!transformation) { return record; } var content = valueToFormat(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__["slice"])(record, start, text.length)); var block = transformation.transform(content); onCreateUndoLevel(); onReplace([block]); return record; }, function (record) { var BACKTICK = '`'; var start = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__["getSelectionStart"])(record); var text = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__["getTextContent"])(record); var characterBefore = text.slice(start - 1, start); // Quick check the text for the necessary character. if (characterBefore !== BACKTICK) { return record; } var textBefore = text.slice(0, start - 1); var indexBefore = textBefore.lastIndexOf(BACKTICK); if (indexBefore === -1) { return record; } var startIndex = indexBefore; var endIndex = start - 2; if (startIndex === endIndex) { return record; } onChange(record); record = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__["remove"])(record, startIndex, startIndex + 1); record = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__["remove"])(record, endIndex, endIndex + 1); record = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__["applyFormat"])(record, { type: 'code' }, startIndex, endIndex); return record; }]; } /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/rich-text/remove-browser-shortcuts.js": /*!******************************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/rich-text/remove-browser-shortcuts.js ***! \******************************************************************************************************/ /*! exports provided: RemoveBrowserShortcuts */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RemoveBrowserShortcuts", function() { return RemoveBrowserShortcuts; }); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* 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__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /** * External dependencies */ /** * WordPress dependencies */ /** * Set of keyboard shortcuts handled internally by RichText. * * @type {Array} */ var HANDLED_SHORTCUTS = [_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_2__["rawShortcut"].primary('z'), _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_2__["rawShortcut"].primaryShift('z'), _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_2__["rawShortcut"].primary('y')]; /** * An instance of a KeyboardShortcuts element pre-bound for the handled * shortcuts. Since shortcuts never change, the element can be considered * static, and can be skipped in reconciliation. * * @type {WPElement} */ var SHORTCUTS_ELEMENT = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["KeyboardShortcuts"], { bindGlobal: true, shortcuts: Object(lodash__WEBPACK_IMPORTED_MODULE_1__["fromPairs"])(HANDLED_SHORTCUTS.map(function (shortcut) { return [shortcut, function (event) { return event.preventDefault(); }]; })) }); /** * Component which registered keyboard event handlers to prevent default * behaviors for key combinations otherwise handled internally by RichText. * * @return {WPElement} WordPress element. */ var RemoveBrowserShortcuts = function RemoveBrowserShortcuts() { return SHORTCUTS_ELEMENT; }; /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/rich-text/shortcut.js": /*!**************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/rich-text/shortcut.js ***! \**************************************************************************************/ /*! exports provided: RichTextShortcut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RichTextShortcut", function() { return RichTextShortcut; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_9__); /** * WordPress dependencies */ var RichTextShortcut = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__["default"])(RichTextShortcut, _Component); function RichTextShortcut() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, RichTextShortcut); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(RichTextShortcut).apply(this, arguments)); _this.onUse = _this.onUse.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(RichTextShortcut, [{ key: "onUse", value: function onUse() { this.props.onUse(); return false; } }, { key: "render", value: function render() { var _this$props = this.props, character = _this$props.character, type = _this$props.type; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["KeyboardShortcuts"], { bindGlobal: true, shortcuts: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])({}, _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_9__["rawShortcut"][type](character), this.onUse) }); } }]); return RichTextShortcut; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Component"]); /***/ }), /***/ "./node_modules/@wordpress/editor/build-module/components/rich-text/tinymce.js": /*!*************************************************************************************!*\ !*** ./node_modules/@wordpress/editor/build-module/components/rich-text/tinymce.js ***! \*************************************************************************************/ /*! exports provided: TINYMCE_ZWSP, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TINYMCE_ZWSP", function() { return TINYMCE_ZWSP; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TinyMCE; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var tinymce__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! tinymce */ "tinymce"); /* harmony import */ var tinymce__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(tinymce__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/dom */ "@wordpress/dom"); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_dom__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _aria__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./aria */ "./node_modules/@wordpress/editor/build-module/components/rich-text/aria.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Browser dependencies */ var _window = window, getSelection = _window.getSelection; var TEXT_NODE = window.Node.TEXT_NODE; /** * Zero-width space character used by TinyMCE as a caret landing point for * inline boundary nodes. * * @see tinymce/src/core/main/ts/text/Zwsp.ts * * @type {string} */ var TINYMCE_ZWSP = "\uFEFF"; /** * Determines whether we need a fix to provide `input` events for contenteditable. * * @param {Element} editorNode The root editor node. * * @return {boolean} A boolean indicating whether the fix is needed. */ function needsInternetExplorerInputFix(editorNode) { return (// Rely on userAgent in the absence of a reasonable feature test for contenteditable `input` events. /Trident/.test(window.navigator.userAgent) && // IE11 dispatches input events for `` and `