From 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 27 Jul 2020 10:05:23 +0200 Subject: Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my familly --- srcs/wordpress/wp-includes/js/dist/a11y.js | 246 - srcs/wordpress/wp-includes/js/dist/a11y.min.js | 1 - srcs/wordpress/wp-includes/js/dist/annotations.js | 1243 - .../wp-includes/js/dist/annotations.min.js | 1 - srcs/wordpress/wp-includes/js/dist/api-fetch.js | 1681 - .../wordpress/wp-includes/js/dist/api-fetch.min.js | 1 - srcs/wordpress/wp-includes/js/dist/autop.js | 564 - srcs/wordpress/wp-includes/js/dist/autop.min.js | 1 - srcs/wordpress/wp-includes/js/dist/blob.js | 164 - srcs/wordpress/wp-includes/js/dist/blob.min.js | 1 - srcs/wordpress/wp-includes/js/dist/block-editor.js | 28170 ------------ .../wp-includes/js/dist/block-editor.min.js | 49 - .../wordpress/wp-includes/js/dist/block-library.js | 22784 ---------- .../wp-includes/js/dist/block-library.min.js | 13 - .../js/dist/block-serialization-default-parser.js | 550 - .../dist/block-serialization-default-parser.min.js | 1 - srcs/wordpress/wp-includes/js/dist/blocks.js | 13335 ------ srcs/wordpress/wp-includes/js/dist/blocks.min.js | 2 - srcs/wordpress/wp-includes/js/dist/components.js | 43976 ------------------- .../wp-includes/js/dist/components.min.js | 21 - srcs/wordpress/wp-includes/js/dist/compose.js | 1263 - srcs/wordpress/wp-includes/js/dist/compose.min.js | 1 - srcs/wordpress/wp-includes/js/dist/core-data.js | 4819 -- .../wordpress/wp-includes/js/dist/core-data.min.js | 1 - .../wordpress/wp-includes/js/dist/data-controls.js | 369 - .../wp-includes/js/dist/data-controls.min.js | 1 - srcs/wordpress/wp-includes/js/dist/data.js | 4529 -- srcs/wordpress/wp-includes/js/dist/data.min.js | 1 - srcs/wordpress/wp-includes/js/dist/date.js | 1503 - srcs/wordpress/wp-includes/js/dist/date.min.js | 11 - srcs/wordpress/wp-includes/js/dist/deprecated.js | 184 - .../wp-includes/js/dist/deprecated.min.js | 1 - srcs/wordpress/wp-includes/js/dist/dom-ready.js | 127 - .../wordpress/wp-includes/js/dist/dom-ready.min.js | 1 - srcs/wordpress/wp-includes/js/dist/dom.js | 1048 - srcs/wordpress/wp-includes/js/dist/dom.min.js | 1 - srcs/wordpress/wp-includes/js/dist/edit-post.js | 7440 ---- .../wordpress/wp-includes/js/dist/edit-post.min.js | 6 - srcs/wordpress/wp-includes/js/dist/editor.js | 16227 ------- srcs/wordpress/wp-includes/js/dist/editor.min.js | 11 - srcs/wordpress/wp-includes/js/dist/element.js | 1102 - srcs/wordpress/wp-includes/js/dist/element.min.js | 1 - srcs/wordpress/wp-includes/js/dist/escape-html.js | 232 - .../wp-includes/js/dist/escape-html.min.js | 1 - .../wp-includes/js/dist/format-library.js | 1550 - .../wp-includes/js/dist/format-library.min.js | 1 - srcs/wordpress/wp-includes/js/dist/hooks.js | 683 - srcs/wordpress/wp-includes/js/dist/hooks.min.js | 1 - .../wordpress/wp-includes/js/dist/html-entities.js | 136 - .../wp-includes/js/dist/html-entities.min.js | 1 - srcs/wordpress/wp-includes/js/dist/i18n.js | 1142 - srcs/wordpress/wp-includes/js/dist/i18n.min.js | 1 - .../wp-includes/js/dist/is-shallow-equal.js | 230 - .../wp-includes/js/dist/is-shallow-equal.min.js | 1 - srcs/wordpress/wp-includes/js/dist/keycodes.js | 490 - srcs/wordpress/wp-includes/js/dist/keycodes.min.js | 1 - .../wp-includes/js/dist/list-reusable-blocks.js | 1564 - .../js/dist/list-reusable-blocks.min.js | 1 - srcs/wordpress/wp-includes/js/dist/media-utils.js | 1946 - .../wp-includes/js/dist/media-utils.min.js | 1 - srcs/wordpress/wp-includes/js/dist/notices.js | 1375 - srcs/wordpress/wp-includes/js/dist/notices.min.js | 1 - srcs/wordpress/wp-includes/js/dist/nux.js | 1013 - srcs/wordpress/wp-includes/js/dist/nux.min.js | 1 - srcs/wordpress/wp-includes/js/dist/plugins.js | 758 - srcs/wordpress/wp-includes/js/dist/plugins.min.js | 1 - .../wp-includes/js/dist/priority-queue.js | 173 - .../wp-includes/js/dist/priority-queue.min.js | 1 - .../wordpress/wp-includes/js/dist/redux-routine.js | 934 - .../wp-includes/js/dist/redux-routine.min.js | 1 - srcs/wordpress/wp-includes/js/dist/rich-text.js | 5293 --- .../wordpress/wp-includes/js/dist/rich-text.min.js | 6 - .../wp-includes/js/dist/server-side-render.js | 705 - .../wp-includes/js/dist/server-side-render.min.js | 1 - srcs/wordpress/wp-includes/js/dist/shortcode.js | 584 - .../wordpress/wp-includes/js/dist/shortcode.min.js | 1 - srcs/wordpress/wp-includes/js/dist/token-list.js | 1149 - .../wp-includes/js/dist/token-list.min.js | 1 - srcs/wordpress/wp-includes/js/dist/url.js | 1377 - srcs/wordpress/wp-includes/js/dist/url.min.js | 1 - .../wordpress/wp-includes/js/dist/vendor/lodash.js | 17112 -------- .../wp-includes/js/dist/vendor/lodash.min.js | 137 - .../wordpress/wp-includes/js/dist/vendor/moment.js | 4506 -- .../wp-includes/js/dist/vendor/moment.min.js | 1 - .../wp-includes/js/dist/vendor/react-dom.js | 25353 ----------- .../wp-includes/js/dist/vendor/react-dom.min.js | 231 - srcs/wordpress/wp-includes/js/dist/vendor/react.js | 3714 -- .../wp-includes/js/dist/vendor/react.min.js | 34 - .../js/dist/vendor/wp-polyfill-element-closest.js | 33 - .../dist/vendor/wp-polyfill-element-closest.min.js | 1 - .../js/dist/vendor/wp-polyfill-fetch.js | 531 - .../js/dist/vendor/wp-polyfill-fetch.min.js | 1 - .../js/dist/vendor/wp-polyfill-formdata.js | 401 - .../js/dist/vendor/wp-polyfill-formdata.min.js | 17 - .../js/dist/vendor/wp-polyfill-node-contains.js | 30 - .../dist/vendor/wp-polyfill-node-contains.min.js | 1 - .../wp-includes/js/dist/vendor/wp-polyfill.js | 7179 --- .../wp-includes/js/dist/vendor/wp-polyfill.min.js | 1 - srcs/wordpress/wp-includes/js/dist/viewport.js | 388 - srcs/wordpress/wp-includes/js/dist/viewport.min.js | 1 - srcs/wordpress/wp-includes/js/dist/wordcount.js | 428 - .../wordpress/wp-includes/js/dist/wordcount.min.js | 1 - 102 files changed, 232910 deletions(-) delete mode 100644 srcs/wordpress/wp-includes/js/dist/a11y.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/a11y.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/annotations.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/annotations.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/api-fetch.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/api-fetch.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/autop.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/autop.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/blob.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/blob.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/block-editor.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/block-editor.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/block-library.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/block-library.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/block-serialization-default-parser.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/block-serialization-default-parser.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/blocks.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/blocks.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/components.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/components.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/compose.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/compose.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/core-data.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/core-data.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/data-controls.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/data-controls.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/data.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/data.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/date.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/date.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/deprecated.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/deprecated.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/dom-ready.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/dom-ready.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/dom.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/dom.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/edit-post.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/edit-post.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/editor.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/editor.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/element.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/element.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/escape-html.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/escape-html.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/format-library.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/format-library.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/hooks.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/hooks.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/html-entities.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/html-entities.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/i18n.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/i18n.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/is-shallow-equal.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/is-shallow-equal.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/keycodes.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/keycodes.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/list-reusable-blocks.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/list-reusable-blocks.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/media-utils.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/media-utils.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/notices.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/notices.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/nux.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/nux.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/plugins.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/plugins.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/priority-queue.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/priority-queue.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/redux-routine.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/redux-routine.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/rich-text.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/rich-text.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/server-side-render.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/server-side-render.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/shortcode.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/shortcode.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/token-list.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/token-list.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/url.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/url.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/lodash.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/lodash.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/moment.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/moment.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/react-dom.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/react-dom.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/react.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/react.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/wp-polyfill-element-closest.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/wp-polyfill-fetch.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/wp-polyfill-formdata.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/wp-polyfill-node-contains.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/wp-polyfill.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/vendor/wp-polyfill.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/viewport.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/viewport.min.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/wordcount.js delete mode 100644 srcs/wordpress/wp-includes/js/dist/wordcount.min.js (limited to 'srcs/wordpress/wp-includes/js/dist') diff --git a/srcs/wordpress/wp-includes/js/dist/a11y.js b/srcs/wordpress/wp-includes/js/dist/a11y.js deleted file mode 100644 index bf3646f..0000000 --- a/srcs/wordpress/wp-includes/js/dist/a11y.js +++ /dev/null @@ -1,246 +0,0 @@ -this["wp"] = this["wp"] || {}; this["wp"]["a11y"] = -/******/ (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 = 365); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 217: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["domReady"]; }()); - -/***/ }), - -/***/ 365: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); - -// EXTERNAL MODULE: external {"this":["wp","domReady"]} -var external_this_wp_domReady_ = __webpack_require__(217); -var external_this_wp_domReady_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_domReady_); - -// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/addContainer.js -/** - * Build the live regions markup. - * - * @param {string} ariaLive Optional. Value for the 'aria-live' attribute, default 'polite'. - * - * @return {Object} $container The ARIA live region jQuery object. - */ -var addContainer = function addContainer(ariaLive) { - ariaLive = ariaLive || 'polite'; - var container = document.createElement('div'); - container.id = 'a11y-speak-' + ariaLive; - container.className = 'a11y-speak-region'; - container.setAttribute('style', 'position: absolute;' + 'margin: -1px;' + 'padding: 0;' + 'height: 1px;' + 'width: 1px;' + 'overflow: hidden;' + 'clip: rect(1px, 1px, 1px, 1px);' + '-webkit-clip-path: inset(50%);' + 'clip-path: inset(50%);' + 'border: 0;' + 'word-wrap: normal !important;'); - container.setAttribute('aria-live', ariaLive); - container.setAttribute('aria-relevant', 'additions text'); - container.setAttribute('aria-atomic', 'true'); - document.querySelector('body').appendChild(container); - return container; -}; - -/* harmony default export */ var build_module_addContainer = (addContainer); - -// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/clear.js -/** - * Clear the a11y-speak-region elements. - */ -var clear = function clear() { - var regions = document.querySelectorAll('.a11y-speak-region'); - - for (var i = 0; i < regions.length; i++) { - regions[i].textContent = ''; - } -}; - -/* harmony default export */ var build_module_clear = (clear); - -// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/filterMessage.js -var previousMessage = ''; -/** - * Filter the message to be announced to the screenreader. - * - * @param {string} message The message to be announced. - * - * @return {string} The filtered message. - */ - -var filterMessage = function filterMessage(message) { - /* - * Strip HTML tags (if any) from the message string. Ideally, messages should - * be simple strings, carefully crafted for specific use with A11ySpeak. - * When re-using already existing strings this will ensure simple HTML to be - * stripped out and replaced with a space. Browsers will collapse multiple - * spaces natively. - */ - message = message.replace(/<[^<>]+>/g, ' '); - - if (previousMessage === message) { - message += "\xA0"; - } - - previousMessage = message; - return message; -}; - -/* harmony default export */ var build_module_filterMessage = (filterMessage); - -// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/index.js -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setup", function() { return build_module_setup; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "speak", function() { return build_module_speak; }); -/** - * WordPress dependencies - */ - -/** - * Internal dependencies - */ - - - - -/** - * Create the live regions. - */ - -var build_module_setup = function setup() { - var containerPolite = document.getElementById('a11y-speak-polite'); - var containerAssertive = document.getElementById('a11y-speak-assertive'); - - if (containerPolite === null) { - containerPolite = build_module_addContainer('polite'); - } - - if (containerAssertive === null) { - containerAssertive = build_module_addContainer('assertive'); - } -}; -/** - * Run setup on domReady. - */ - -external_this_wp_domReady_default()(build_module_setup); -/** - * Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions. - * This module is inspired by the `speak` function in wp-a11y.js - * - * @param {string} message The message to be announced by Assistive Technologies. - * @param {string} ariaLive Optional. The politeness level for aria-live. Possible values: - * polite or assertive. Default polite. - * - * @example - * ```js - * import { speak } from '@wordpress/a11y'; - * - * // For polite messages that shouldn't interrupt what screen readers are currently announcing. - * speak( 'The message you want to send to the ARIA live region' ); - * - * // For assertive messages that should interrupt what screen readers are currently announcing. - * speak( 'The message you want to send to the ARIA live region', 'assertive' ); - * ``` - */ - -var build_module_speak = function speak(message, ariaLive) { - // Clear previous messages to allow repeated strings being read out. - build_module_clear(); - message = build_module_filterMessage(message); - var containerPolite = document.getElementById('a11y-speak-polite'); - var containerAssertive = document.getElementById('a11y-speak-assertive'); - - if (containerAssertive && 'assertive' === ariaLive) { - containerAssertive.textContent = message; - } else if (containerPolite) { - containerPolite.textContent = message; - } -}; - - -/***/ }) - -/******/ }); \ No newline at end of file diff --git a/srcs/wordpress/wp-includes/js/dist/a11y.min.js b/srcs/wordpress/wp-includes/js/dist/a11y.min.js deleted file mode 100644 index b99a1a6..0000000 --- a/srcs/wordpress/wp-includes/js/dist/a11y.min.js +++ /dev/null @@ -1 +0,0 @@ -this.wp=this.wp||{},this.wp.a11y=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=365)}({217:function(e,t){!function(){e.exports=this.wp.domReady}()},365:function(e,t,n){"use strict";n.r(t);var r=n(217),o=n.n(r),i=function(e){e=e||"polite";var t=document.createElement("div");return t.id="a11y-speak-"+e,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true"),document.querySelector("body").appendChild(t),t},a=function(){for(var e=document.querySelectorAll(".a11y-speak-region"),t=0;t]+>/g," "),u===e&&(e+=" "),u=e,e};n.d(t,"setup",(function(){return p})),n.d(t,"speak",(function(){return c}));var p=function(){var e=document.getElementById("a11y-speak-polite"),t=document.getElementById("a11y-speak-assertive");null===e&&(e=i("polite")),null===t&&(t=i("assertive"))};o()(p);var c=function(e,t){a(),e=l(e);var n=document.getElementById("a11y-speak-polite"),r=document.getElementById("a11y-speak-assertive");r&&"assertive"===t?r.textContent=e:n&&(n.textContent=e)}}}); \ No newline at end of file diff --git a/srcs/wordpress/wp-includes/js/dist/annotations.js b/srcs/wordpress/wp-includes/js/dist/annotations.js deleted file mode 100644 index 229539c..0000000 --- a/srcs/wordpress/wp-includes/js/dist/annotations.js +++ /dev/null @@ -1,1243 +0,0 @@ -this["wp"] = this["wp"] || {}; this["wp"]["annotations"] = -/******/ (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 = 355); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 1: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["i18n"]; }()); - -/***/ }), - -/***/ 10: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", 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; -} - -/***/ }), - -/***/ 17: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js -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; - } -} -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js -var iterableToArray = __webpack_require__(30); - -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance"); -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _toConsumableArray; }); - - - -function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || _nonIterableSpread(); -} - -/***/ }), - -/***/ 2: -/***/ (function(module, exports) { - -(function() { module.exports = this["lodash"]; }()); - -/***/ }), - -/***/ 21: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js -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; -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; }); - -function _objectWithoutProperties(source, excluded) { - if (source == null) return {}; - var target = _objectWithoutPropertiesLoose(source, excluded); - var key, i; - - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - - for (i = 0; i < sourceSymbolKeys.length; i++) { - key = sourceSymbolKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; - target[key] = source[key]; - } - } - - return target; -} - -/***/ }), - -/***/ 22: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["richText"]; }()); - -/***/ }), - -/***/ 27: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["hooks"]; }()); - -/***/ }), - -/***/ 30: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; }); -function _iterableToArray(iter) { - if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); -} - -/***/ }), - -/***/ 355: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var selectors_namespaceObject = {}; -__webpack_require__.r(selectors_namespaceObject); -__webpack_require__.d(selectors_namespaceObject, "__experimentalGetAnnotationsForBlock", function() { return __experimentalGetAnnotationsForBlock; }); -__webpack_require__.d(selectors_namespaceObject, "__experimentalGetAllAnnotationsForBlock", function() { return selectors_experimentalGetAllAnnotationsForBlock; }); -__webpack_require__.d(selectors_namespaceObject, "__experimentalGetAnnotationsForRichText", function() { return __experimentalGetAnnotationsForRichText; }); -__webpack_require__.d(selectors_namespaceObject, "__experimentalGetAnnotations", function() { return __experimentalGetAnnotations; }); -var actions_namespaceObject = {}; -__webpack_require__.r(actions_namespaceObject); -__webpack_require__.d(actions_namespaceObject, "__experimentalAddAnnotation", function() { return __experimentalAddAnnotation; }); -__webpack_require__.d(actions_namespaceObject, "__experimentalRemoveAnnotation", function() { return __experimentalRemoveAnnotation; }); -__webpack_require__.d(actions_namespaceObject, "__experimentalUpdateAnnotationRange", function() { return __experimentalUpdateAnnotationRange; }); -__webpack_require__.d(actions_namespaceObject, "__experimentalRemoveAnnotationsBySource", function() { return __experimentalRemoveAnnotationsBySource; }); - -// EXTERNAL MODULE: external {"this":["wp","data"]} -var external_this_wp_data_ = __webpack_require__(4); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js -var defineProperty = __webpack_require__(10); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules -var toConsumableArray = __webpack_require__(17); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread.js -var objectSpread = __webpack_require__(7); - -// EXTERNAL MODULE: external "lodash" -var external_lodash_ = __webpack_require__(2); - -// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/store/reducer.js - - - - -/** - * External dependencies - */ - -/** - * Filters an array based on the predicate, but keeps the reference the same if - * the array hasn't changed. - * - * @param {Array} collection The collection to filter. - * @param {Function} predicate Function that determines if the item should stay - * in the array. - * @return {Array} Filtered array. - */ - -function filterWithReference(collection, predicate) { - var filteredCollection = collection.filter(predicate); - return collection.length === filteredCollection.length ? collection : filteredCollection; -} -/** - * Verifies whether the given annotations is a valid annotation. - * - * @param {Object} annotation The annotation to verify. - * @return {boolean} Whether the given annotation is valid. - */ - - -function isValidAnnotationRange(annotation) { - return Object(external_lodash_["isNumber"])(annotation.start) && Object(external_lodash_["isNumber"])(annotation.end) && annotation.start <= annotation.end; -} -/** - * Reducer managing annotations. - * - * @param {Array} state The annotations currently shown in the editor. - * @param {Object} action Dispatched action. - * - * @return {Array} Updated state. - */ - - -function reducer_annotations() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var action = arguments.length > 1 ? arguments[1] : undefined; - - switch (action.type) { - case 'ANNOTATION_ADD': - var blockClientId = action.blockClientId; - var newAnnotation = { - id: action.id, - blockClientId: blockClientId, - richTextIdentifier: action.richTextIdentifier, - source: action.source, - selector: action.selector, - range: action.range - }; - - if (newAnnotation.selector === 'range' && !isValidAnnotationRange(newAnnotation.range)) { - return state; - } - - var previousAnnotationsForBlock = Object(external_lodash_["get"])(state, blockClientId, []); - return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, blockClientId, [].concat(Object(toConsumableArray["a" /* default */])(previousAnnotationsForBlock), [newAnnotation]))); - - case 'ANNOTATION_REMOVE': - return Object(external_lodash_["mapValues"])(state, function (annotationsForBlock) { - return filterWithReference(annotationsForBlock, function (annotation) { - return annotation.id !== action.annotationId; - }); - }); - - case 'ANNOTATION_UPDATE_RANGE': - return Object(external_lodash_["mapValues"])(state, function (annotationsForBlock) { - var hasChangedRange = false; - var newAnnotations = annotationsForBlock.map(function (annotation) { - if (annotation.id === action.annotationId) { - hasChangedRange = true; - return Object(objectSpread["a" /* default */])({}, annotation, { - range: { - start: action.start, - end: action.end - } - }); - } - - return annotation; - }); - return hasChangedRange ? newAnnotations : annotationsForBlock; - }); - - case 'ANNOTATION_REMOVE_SOURCE': - return Object(external_lodash_["mapValues"])(state, function (annotationsForBlock) { - return filterWithReference(annotationsForBlock, function (annotation) { - return annotation.source !== action.source; - }); - }); - } - - return state; -} -/* harmony default export */ var reducer = (reducer_annotations); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules -var objectWithoutProperties = __webpack_require__(21); - -// EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js -var rememo = __webpack_require__(36); - -// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/store/selectors.js - - - -/** - * External dependencies - */ - - -/** - * Shared reference to an empty array for cases where it is important to avoid - * returning a new array reference on every invocation, as in a connected or - * other pure component which performs `shouldComponentUpdate` check on props. - * This should be used as a last resort, since the normalized data should be - * maintained by the reducer result in state. - * - * @type {Array} - */ - -var EMPTY_ARRAY = []; -/** - * Returns the annotations for a specific client ID. - * - * @param {Object} state Editor state. - * @param {string} clientId The ID of the block to get the annotations for. - * - * @return {Array} The annotations applicable to this block. - */ - -var __experimentalGetAnnotationsForBlock = Object(rememo["a" /* default */])(function (state, blockClientId) { - return Object(external_lodash_["get"])(state, blockClientId, []).filter(function (annotation) { - return annotation.selector === 'block'; - }); -}, function (state, blockClientId) { - return [Object(external_lodash_["get"])(state, blockClientId, EMPTY_ARRAY)]; -}); -var selectors_experimentalGetAllAnnotationsForBlock = function __experimentalGetAllAnnotationsForBlock(state, blockClientId) { - return Object(external_lodash_["get"])(state, blockClientId, EMPTY_ARRAY); -}; -/** - * Returns the annotations that apply to the given RichText instance. - * - * Both a blockClientId and a richTextIdentifier are required. This is because - * a block might have multiple `RichText` components. This does mean that every - * block needs to implement annotations itself. - * - * @param {Object} state Editor state. - * @param {string} blockClientId The client ID for the block. - * @param {string} richTextIdentifier Unique identifier that identifies the given RichText. - * @return {Array} All the annotations relevant for the `RichText`. - */ - -var __experimentalGetAnnotationsForRichText = Object(rememo["a" /* default */])(function (state, blockClientId, richTextIdentifier) { - return Object(external_lodash_["get"])(state, blockClientId, []).filter(function (annotation) { - return annotation.selector === 'range' && richTextIdentifier === annotation.richTextIdentifier; - }).map(function (annotation) { - var range = annotation.range, - other = Object(objectWithoutProperties["a" /* default */])(annotation, ["range"]); - - return Object(objectSpread["a" /* default */])({}, range, other); - }); -}, function (state, blockClientId) { - return [Object(external_lodash_["get"])(state, blockClientId, EMPTY_ARRAY)]; -}); -/** - * Returns all annotations in the editor state. - * - * @param {Object} state Editor state. - * @return {Array} All annotations currently applied. - */ - -function __experimentalGetAnnotations(state) { - return Object(external_lodash_["flatMap"])(state, function (annotations) { - return annotations; - }); -} - -// EXTERNAL MODULE: ./node_modules/uuid/v4.js -var v4 = __webpack_require__(67); -var v4_default = /*#__PURE__*/__webpack_require__.n(v4); - -// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/store/actions.js -/** - * External dependencies - */ - -/** - * Adds an annotation to a block. - * - * The `block` attribute refers to a block ID that needs to be annotated. - * `isBlockAnnotation` controls whether or not the annotation is a block - * annotation. The `source` is the source of the annotation, this will be used - * to identity groups of annotations. - * - * The `range` property is only relevant if the selector is 'range'. - * - * @param {Object} annotation The annotation to add. - * @param {string} annotation.blockClientId The blockClientId to add the annotation to. - * @param {string} annotation.richTextIdentifier Identifier for the RichText instance the annotation applies to. - * @param {Object} annotation.range The range at which to apply this annotation. - * @param {number} annotation.range.start The offset where the annotation should start. - * @param {number} annotation.range.end The offset where the annotation should end. - * @param {string} annotation.[selector="range"] The way to apply this annotation. - * @param {string} annotation.[source="default"] The source that added the annotation. - * @param {string} annotation.[id] The ID the annotation should have. Generates a UUID by default. - * - * @return {Object} Action object. - */ - -function __experimentalAddAnnotation(_ref) { - var blockClientId = _ref.blockClientId, - _ref$richTextIdentifi = _ref.richTextIdentifier, - richTextIdentifier = _ref$richTextIdentifi === void 0 ? null : _ref$richTextIdentifi, - _ref$range = _ref.range, - range = _ref$range === void 0 ? null : _ref$range, - _ref$selector = _ref.selector, - selector = _ref$selector === void 0 ? 'range' : _ref$selector, - _ref$source = _ref.source, - source = _ref$source === void 0 ? 'default' : _ref$source, - _ref$id = _ref.id, - id = _ref$id === void 0 ? v4_default()() : _ref$id; - var action = { - type: 'ANNOTATION_ADD', - id: id, - blockClientId: blockClientId, - richTextIdentifier: richTextIdentifier, - source: source, - selector: selector - }; - - if (selector === 'range') { - action.range = range; - } - - return action; -} -/** - * Removes an annotation with a specific ID. - * - * @param {string} annotationId The annotation to remove. - * - * @return {Object} Action object. - */ - -function __experimentalRemoveAnnotation(annotationId) { - return { - type: 'ANNOTATION_REMOVE', - annotationId: annotationId - }; -} -/** - * Updates the range of an annotation. - * - * @param {string} annotationId ID of the annotation to update. - * @param {number} start The start of the new range. - * @param {number} end The end of the new range. - * - * @return {Object} Action object. - */ - -function __experimentalUpdateAnnotationRange(annotationId, start, end) { - return { - type: 'ANNOTATION_UPDATE_RANGE', - annotationId: annotationId, - start: start, - end: end - }; -} -/** - * Removes all annotations of a specific source. - * - * @param {string} source The source to remove. - * - * @return {Object} Action object. - */ - -function __experimentalRemoveAnnotationsBySource(source) { - return { - type: 'ANNOTATION_REMOVE_SOURCE', - source: source - }; -} - -// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/store/index.js -/** - * WordPress dependencies - */ - -/** - * Internal dependencies - */ - - - - -/** - * Module Constants - */ - -var MODULE_KEY = 'core/annotations'; -var store = Object(external_this_wp_data_["registerStore"])(MODULE_KEY, { - reducer: reducer, - selectors: selectors_namespaceObject, - actions: actions_namespaceObject -}); -/* harmony default export */ var build_module_store = (store); - -// EXTERNAL MODULE: external {"this":["wp","richText"]} -var external_this_wp_richText_ = __webpack_require__(22); - -// EXTERNAL MODULE: external {"this":["wp","i18n"]} -var external_this_wp_i18n_ = __webpack_require__(1); - -// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/format/annotation.js -/** - * WordPress dependencies - */ - - -var FORMAT_NAME = 'core/annotation'; -var ANNOTATION_ATTRIBUTE_PREFIX = 'annotation-text-'; -var STORE_KEY = 'core/annotations'; -/** - * Applies given annotations to the given record. - * - * @param {Object} record The record to apply annotations to. - * @param {Array} annotations The annotation to apply. - * @return {Object} A record with the annotations applied. - */ - -function applyAnnotations(record) { - var annotations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - annotations.forEach(function (annotation) { - var start = annotation.start, - end = annotation.end; - - if (start > record.text.length) { - start = record.text.length; - } - - if (end > record.text.length) { - end = record.text.length; - } - - var className = ANNOTATION_ATTRIBUTE_PREFIX + annotation.source; - var id = ANNOTATION_ATTRIBUTE_PREFIX + annotation.id; - record = Object(external_this_wp_richText_["applyFormat"])(record, { - type: FORMAT_NAME, - attributes: { - className: className, - id: id - } - }, start, end); - }); - return record; -} -/** - * Removes annotations from the given record. - * - * @param {Object} record Record to remove annotations from. - * @return {Object} The cleaned record. - */ - -function removeAnnotations(record) { - return Object(external_this_wp_richText_["removeFormat"])(record, 'core/annotation', 0, record.text.length); -} -/** - * Retrieves the positions of annotations inside an array of formats. - * - * @param {Array} formats Formats with annotations in there. - * @return {Object} ID keyed positions of annotations. - */ - -function retrieveAnnotationPositions(formats) { - var positions = {}; - formats.forEach(function (characterFormats, i) { - characterFormats = characterFormats || []; - characterFormats = characterFormats.filter(function (format) { - return format.type === FORMAT_NAME; - }); - characterFormats.forEach(function (format) { - var id = format.attributes.id; - id = id.replace(ANNOTATION_ATTRIBUTE_PREFIX, ''); - - if (!positions.hasOwnProperty(id)) { - positions[id] = { - start: i - }; - } // Annotations refer to positions between characters. - // Formats refer to the character themselves. - // So we need to adjust for that here. - - - positions[id].end = i + 1; - }); - }); - return positions; -} -/** - * Updates annotations in the state based on positions retrieved from RichText. - * - * @param {Array} annotations The annotations that are currently applied. - * @param {Array} positions The current positions of the given annotations. - * @param {Object} actions - * @param {Function} actions.removeAnnotation Function to remove an annotation from the state. - * @param {Function} actions.updateAnnotationRange Function to update an annotation range in the state. - */ - - -function updateAnnotationsWithPositions(annotations, positions, _ref) { - var removeAnnotation = _ref.removeAnnotation, - updateAnnotationRange = _ref.updateAnnotationRange; - annotations.forEach(function (currentAnnotation) { - var position = positions[currentAnnotation.id]; // If we cannot find an annotation, delete it. - - if (!position) { - // Apparently the annotation has been removed, so remove it from the state: - // Remove... - removeAnnotation(currentAnnotation.id); - return; - } - - var start = currentAnnotation.start, - end = currentAnnotation.end; - - if (start !== position.start || end !== position.end) { - updateAnnotationRange(currentAnnotation.id, position.start, position.end); - } - }); -} - -var annotation_annotation = { - name: FORMAT_NAME, - title: Object(external_this_wp_i18n_["__"])('Annotation'), - tagName: 'mark', - className: 'annotation-text', - attributes: { - className: 'class', - id: 'id' - }, - edit: function edit() { - return null; - }, - __experimentalGetPropsForEditableTreePreparation: function __experimentalGetPropsForEditableTreePreparation(select, _ref2) { - var richTextIdentifier = _ref2.richTextIdentifier, - blockClientId = _ref2.blockClientId; - return { - annotations: select(STORE_KEY).__experimentalGetAnnotationsForRichText(blockClientId, richTextIdentifier) - }; - }, - __experimentalCreatePrepareEditableTree: function __experimentalCreatePrepareEditableTree(_ref3) { - var annotations = _ref3.annotations; - return function (formats, text) { - if (annotations.length === 0) { - return formats; - } - - var record = { - formats: formats, - text: text - }; - record = applyAnnotations(record, annotations); - return record.formats; - }; - }, - __experimentalGetPropsForEditableTreeChangeHandler: function __experimentalGetPropsForEditableTreeChangeHandler(dispatch) { - return { - removeAnnotation: dispatch(STORE_KEY).__experimentalRemoveAnnotation, - updateAnnotationRange: dispatch(STORE_KEY).__experimentalUpdateAnnotationRange - }; - }, - __experimentalCreateOnChangeEditableValue: function __experimentalCreateOnChangeEditableValue(props) { - return function (formats) { - var positions = retrieveAnnotationPositions(formats); - var removeAnnotation = props.removeAnnotation, - updateAnnotationRange = props.updateAnnotationRange, - annotations = props.annotations; - updateAnnotationsWithPositions(annotations, positions, { - removeAnnotation: removeAnnotation, - updateAnnotationRange: updateAnnotationRange - }); - }; - } -}; - -// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/format/index.js - - -/** - * WordPress dependencies - */ - -/** - * Internal dependencies - */ - - - -var format_name = annotation_annotation.name, - settings = Object(objectWithoutProperties["a" /* default */])(annotation_annotation, ["name"]); - -Object(external_this_wp_richText_["registerFormatType"])(format_name, settings); - -// EXTERNAL MODULE: external {"this":["wp","hooks"]} -var external_this_wp_hooks_ = __webpack_require__(27); - -// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/block/index.js -/** - * WordPress dependencies - */ - - -/** - * Adds annotation className to the block-list-block component. - * - * @param {Object} OriginalComponent The original BlockListBlock component. - * @return {Object} The enhanced component. - */ - -var block_addAnnotationClassName = function addAnnotationClassName(OriginalComponent) { - return Object(external_this_wp_data_["withSelect"])(function (select, _ref) { - var clientId = _ref.clientId; - - var annotations = select('core/annotations').__experimentalGetAnnotationsForBlock(clientId); - - return { - className: annotations.map(function (annotation) { - return 'is-annotated-by-' + annotation.source; - }).join(' ') - }; - })(OriginalComponent); -}; - -Object(external_this_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/annotations', block_addAnnotationClassName); - -// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/index.js -/** - * Internal dependencies - */ - - - - - -/***/ }), - -/***/ 36: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; - - -var LEAF_KEY, hasWeakMap; - -/** - * Arbitrary value used as key for referencing cache object in WeakMap tree. - * - * @type {Object} - */ -LEAF_KEY = {}; - -/** - * Whether environment supports WeakMap. - * - * @type {boolean} - */ -hasWeakMap = typeof WeakMap !== 'undefined'; - -/** - * Returns the first argument as the sole entry in an array. - * - * @param {*} value Value to return. - * - * @return {Array} Value returned as entry in array. - */ -function arrayOf( value ) { - return [ value ]; -} - -/** - * Returns true if the value passed is object-like, or false otherwise. A value - * is object-like if it can support property assignment, e.g. object or array. - * - * @param {*} value Value to test. - * - * @return {boolean} Whether value is object-like. - */ -function isObjectLike( value ) { - return !! value && 'object' === typeof value; -} - -/** - * Creates and returns a new cache object. - * - * @return {Object} Cache object. - */ -function createCache() { - var cache = { - clear: function() { - cache.head = null; - }, - }; - - return cache; -} - -/** - * Returns true if entries within the two arrays are strictly equal by - * reference from a starting index. - * - * @param {Array} a First array. - * @param {Array} b Second array. - * @param {number} fromIndex Index from which to start comparison. - * - * @return {boolean} Whether arrays are shallowly equal. - */ -function isShallowEqual( a, b, fromIndex ) { - var i; - - if ( a.length !== b.length ) { - return false; - } - - for ( i = fromIndex; i < a.length; i++ ) { - if ( a[ i ] !== b[ i ] ) { - return false; - } - } - - return true; -} - -/** - * Returns a memoized selector function. The getDependants function argument is - * called before the memoized selector and is expected to return an immutable - * reference or array of references on which the selector depends for computing - * its own return value. The memoize cache is preserved only as long as those - * dependant references remain the same. If getDependants returns a different - * reference(s), the cache is cleared and the selector value regenerated. - * - * @param {Function} selector Selector function. - * @param {Function} getDependants Dependant getter returning an immutable - * reference or array of reference used in - * cache bust consideration. - * - * @return {Function} Memoized selector. - */ -/* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) { - var rootCache, getCache; - - // Use object source as dependant if getter not provided - if ( ! getDependants ) { - getDependants = arrayOf; - } - - /** - * Returns the root cache. If WeakMap is supported, this is assigned to the - * root WeakMap cache set, otherwise it is a shared instance of the default - * cache object. - * - * @return {(WeakMap|Object)} Root cache object. - */ - function getRootCache() { - return rootCache; - } - - /** - * Returns the cache for a given dependants array. When possible, a WeakMap - * will be used to create a unique cache for each set of dependants. This - * is feasible due to the nature of WeakMap in allowing garbage collection - * to occur on entries where the key object is no longer referenced. Since - * WeakMap requires the key to be an object, this is only possible when the - * dependant is object-like. The root cache is created as a hierarchy where - * each top-level key is the first entry in a dependants set, the value a - * WeakMap where each key is the next dependant, and so on. This continues - * so long as the dependants are object-like. If no dependants are object- - * like, then the cache is shared across all invocations. - * - * @see isObjectLike - * - * @param {Array} dependants Selector dependants. - * - * @return {Object} Cache object. - */ - function getWeakMapCache( dependants ) { - var caches = rootCache, - isUniqueByDependants = true, - i, dependant, map, cache; - - for ( i = 0; i < dependants.length; i++ ) { - dependant = dependants[ i ]; - - // Can only compose WeakMap from object-like key. - if ( ! isObjectLike( dependant ) ) { - isUniqueByDependants = false; - break; - } - - // Does current segment of cache already have a WeakMap? - if ( caches.has( dependant ) ) { - // Traverse into nested WeakMap. - caches = caches.get( dependant ); - } else { - // Create, set, and traverse into a new one. - map = new WeakMap(); - caches.set( dependant, map ); - caches = map; - } - } - - // We use an arbitrary (but consistent) object as key for the last item - // in the WeakMap to serve as our running cache. - if ( ! caches.has( LEAF_KEY ) ) { - cache = createCache(); - cache.isUniqueByDependants = isUniqueByDependants; - caches.set( LEAF_KEY, cache ); - } - - return caches.get( LEAF_KEY ); - } - - // Assign cache handler by availability of WeakMap - getCache = hasWeakMap ? getWeakMapCache : getRootCache; - - /** - * Resets root memoization cache. - */ - function clear() { - rootCache = hasWeakMap ? new WeakMap() : createCache(); - } - - // eslint-disable-next-line jsdoc/check-param-names - /** - * The augmented selector call, considering first whether dependants have - * changed before passing it to underlying memoize function. - * - * @param {Object} source Source object for derivation. - * @param {...*} extraArgs Additional arguments to pass to selector. - * - * @return {*} Selector result. - */ - function callSelector( /* source, ...extraArgs */ ) { - var len = arguments.length, - cache, node, i, args, dependants; - - // Create copy of arguments (avoid leaking deoptimization). - args = new Array( len ); - for ( i = 0; i < len; i++ ) { - args[ i ] = arguments[ i ]; - } - - dependants = getDependants.apply( null, args ); - cache = getCache( dependants ); - - // If not guaranteed uniqueness by dependants (primitive type or lack - // of WeakMap support), shallow compare against last dependants and, if - // references have changed, destroy cache to recalculate result. - if ( ! cache.isUniqueByDependants ) { - if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) { - cache.clear(); - } - - cache.lastDependants = dependants; - } - - node = cache.head; - while ( node ) { - // Check whether node arguments match arguments - if ( ! isShallowEqual( node.args, args, 1 ) ) { - node = node.next; - continue; - } - - // At this point we can assume we've found a match - - // Surface matched node to head if not already - if ( node !== cache.head ) { - // Adjust siblings to point to each other. - node.prev.next = node.next; - if ( node.next ) { - node.next.prev = node.prev; - } - - node.next = cache.head; - node.prev = null; - cache.head.prev = node; - cache.head = node; - } - - // Return immediately - return node.val; - } - - // No cached value found. Continue to insertion phase: - - node = { - // Generate the result from original function - val: selector.apply( null, args ), - }; - - // Avoid including the source object in the cache. - args[ 0 ] = null; - node.args = args; - - // Don't need to check whether node is already head, since it would - // have been returned above already if it was - - // Shift existing head down list - if ( cache.head ) { - cache.head.prev = node; - node.next = cache.head; - } - - cache.head = node; - - return node.val; - } - - callSelector.getDependants = getDependants; - callSelector.clear = clear; - clear(); - - return callSelector; -}); - - -/***/ }), - -/***/ 4: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["data"]; }()); - -/***/ }), - -/***/ 67: -/***/ (function(module, exports, __webpack_require__) { - -var rng = __webpack_require__(85); -var bytesToUuid = __webpack_require__(86); - -function v4(options, buf, offset) { - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || bytesToUuid(rnds); -} - -module.exports = v4; - - -/***/ }), - -/***/ 7: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread; }); -/* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10); - -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 */ "a"])(target, key, source[key]); - }); - } - - return target; -} - -/***/ }), - -/***/ 85: -/***/ (function(module, exports) { - -// Unique ID creation requires a high quality random # generator. In the -// browser this is a little complicated due to unknown quality of Math.random() -// and inconsistent support for the `crypto` API. We do the best we can via -// feature-detection - -// getRandomValues needs to be invoked in a context where "this" is a Crypto -// implementation. Also, find the complete implementation of crypto on IE11. -var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) || - (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto)); - -if (getRandomValues) { - // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto - var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef - - module.exports = function whatwgRNG() { - getRandomValues(rnds8); - return rnds8; - }; -} else { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var rnds = new Array(16); - - module.exports = function mathRNG() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return rnds; - }; -} - - -/***/ }), - -/***/ 86: -/***/ (function(module, exports) { - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -var byteToHex = []; -for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); -} - -function bytesToUuid(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 - return ([bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]]]).join(''); -} - -module.exports = bytesToUuid; - - -/***/ }) - -/******/ }); \ No newline at end of file diff --git a/srcs/wordpress/wp-includes/js/dist/annotations.min.js b/srcs/wordpress/wp-includes/js/dist/annotations.min.js deleted file mode 100644 index 6e0f57f..0000000 --- a/srcs/wordpress/wp-includes/js/dist/annotations.min.js +++ /dev/null @@ -1 +0,0 @@ -this.wp=this.wp||{},this.wp.annotations=function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=355)}({1:function(t,n){!function(){t.exports=this.wp.i18n}()},10:function(t,n,e){"use strict";function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}e.d(n,"a",(function(){return r}))},17:function(t,n,e){"use strict";var r=e(30);function o(t){return function(t){if(Array.isArray(t)){for(var n=0,e=new Array(t.length);n=0||(o[e]=t[e]);return o}(t,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}e.d(n,"a",(function(){return r}))},22:function(t,n){!function(){t.exports=this.wp.richText}()},27:function(t,n){!function(){t.exports=this.wp.hooks}()},30:function(t,n,e){"use strict";function r(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}e.d(n,"a",(function(){return r}))},355:function(t,n,e){"use strict";e.r(n);var r={};e.r(r),e.d(r,"__experimentalGetAnnotationsForBlock",(function(){return v})),e.d(r,"__experimentalGetAllAnnotationsForBlock",(function(){return O})),e.d(r,"__experimentalGetAnnotationsForRichText",(function(){return g})),e.d(r,"__experimentalGetAnnotations",(function(){return m}));var o={};e.r(o),e.d(o,"__experimentalAddAnnotation",(function(){return x})),e.d(o,"__experimentalRemoveAnnotation",(function(){return A})),e.d(o,"__experimentalUpdateAnnotationRange",(function(){return _})),e.d(o,"__experimentalRemoveAnnotationsBySource",(function(){return j}));var a=e(4),i=e(10),u=e(17),c=e(7),f=e(2);function l(t,n){var e=t.filter(n);return t.length===e.length?t:e}var s=function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"ANNOTATION_ADD":var r=e.blockClientId,o={id:e.id,blockClientId:r,richTextIdentifier:e.richTextIdentifier,source:e.source,selector:e.selector,range:e.range};if("range"===o.selector&&(t=o.range,!(Object(f.isNumber)(t.start)&&Object(f.isNumber)(t.end)&&t.start<=t.end)))return n;var a=Object(f.get)(n,r,[]);return Object(c.a)({},n,Object(i.a)({},r,[].concat(Object(u.a)(a),[o])));case"ANNOTATION_REMOVE":return Object(f.mapValues)(n,(function(t){return l(t,(function(t){return t.id!==e.annotationId}))}));case"ANNOTATION_UPDATE_RANGE":return Object(f.mapValues)(n,(function(t){var n=!1,r=t.map((function(t){return t.id===e.annotationId?(n=!0,Object(c.a)({},t,{range:{start:e.start,end:e.end}})):t}));return n?r:t}));case"ANNOTATION_REMOVE_SOURCE":return Object(f.mapValues)(n,(function(t){return l(t,(function(t){return t.source!==e.source}))}))}return n},d=e(21),p=e(36),b=[],v=Object(p.a)((function(t,n){return Object(f.get)(t,n,[]).filter((function(t){return"block"===t.selector}))}),(function(t,n){return[Object(f.get)(t,n,b)]})),O=function(t,n){return Object(f.get)(t,n,b)},g=Object(p.a)((function(t,n,e){return Object(f.get)(t,n,[]).filter((function(t){return"range"===t.selector&&e===t.richTextIdentifier})).map((function(t){var n=t.range,e=Object(d.a)(t,["range"]);return Object(c.a)({},n,e)}))}),(function(t,n){return[Object(f.get)(t,n,b)]}));function m(t){return Object(f.flatMap)(t,(function(t){return t}))}var y=e(67),h=e.n(y);function x(t){var n=t.blockClientId,e=t.richTextIdentifier,r=void 0===e?null:e,o=t.range,a=void 0===o?null:o,i=t.selector,u=void 0===i?"range":i,c=t.source,f=void 0===c?"default":c,l=t.id,s={type:"ANNOTATION_ADD",id:void 0===l?h()():l,blockClientId:n,richTextIdentifier:r,source:f,selector:u};return"range"===u&&(s.range=a),s}function A(t){return{type:"ANNOTATION_REMOVE",annotationId:t}}function _(t,n,e){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:t,start:n,end:e}}function j(t){return{type:"ANNOTATION_REMOVE_SOURCE",source:t}}Object(a.registerStore)("core/annotations",{reducer:s,selectors:r,actions:o});var T=e(22),N=e(1),w="core/annotation",I="annotation-text-";var E={name:w,title:Object(N.__)("Annotation"),tagName:"mark",className:"annotation-text",attributes:{className:"class",id:"id"},edit:function(){return null},__experimentalGetPropsForEditableTreePreparation:function(t,n){var e=n.richTextIdentifier,r=n.blockClientId;return{annotations:t("core/annotations").__experimentalGetAnnotationsForRichText(r,e)}},__experimentalCreatePrepareEditableTree:function(t){var n=t.annotations;return function(t,e){if(0===n.length)return t;var r={formats:t,text:e};return(r=function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((function(n){var e=n.start,r=n.end;e>t.text.length&&(e=t.text.length),r>t.text.length&&(r=t.text.length);var o=I+n.source,a=I+n.id;t=Object(T.applyFormat)(t,{type:w,attributes:{className:o,id:a}},e,r)})),t}(r,n)).formats}},__experimentalGetPropsForEditableTreeChangeHandler:function(t){return{removeAnnotation:t("core/annotations").__experimentalRemoveAnnotation,updateAnnotationRange:t("core/annotations").__experimentalUpdateAnnotationRange}},__experimentalCreateOnChangeEditableValue:function(t){return function(n){var e=function(t){var n={};return t.forEach((function(t,e){(t=(t=t||[]).filter((function(t){return t.type===w}))).forEach((function(t){var r=t.attributes.id;r=r.replace(I,""),n.hasOwnProperty(r)||(n[r]={start:e}),n[r].end=e+1}))})),n}(n),r=t.removeAnnotation,o=t.updateAnnotationRange;!function(t,n,e){var r=e.removeAnnotation,o=e.updateAnnotationRange;t.forEach((function(t){var e=n[t.id];if(e){var a=t.start,i=t.end;a===e.start&&i===e.end||o(t.id,e.start,e.end)}else r(t.id)}))}(t.annotations,e,{removeAnnotation:r,updateAnnotationRange:o})}}},R=E.name,k=Object(d.a)(E,["name"]);Object(T.registerFormatType)(R,k);var P=e(27);Object(P.addFilter)("editor.BlockListBlock","core/annotations",(function(t){return Object(a.withSelect)((function(t,n){var e=n.clientId;return{className:t("core/annotations").__experimentalGetAnnotationsForBlock(e).map((function(t){return"is-annotated-by-"+t.source})).join(" ")}}))(t)}))},36:function(t,n,e){"use strict";var r,o;function a(t){return[t]}function i(){var t={clear:function(){t.head=null}};return t}function u(t,n,e){var r;if(t.length!==n.length)return!1;for(r=e;r>>((3&n)<<3)&255;return o}}},86:function(t,n){for(var e=[],r=0;r<256;++r)e[r]=(r+256).toString(16).substr(1);t.exports=function(t,n){var r=n||0,o=e;return[o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]]].join("")}}}); \ No newline at end of file diff --git a/srcs/wordpress/wp-includes/js/dist/api-fetch.js b/srcs/wordpress/wp-includes/js/dist/api-fetch.js deleted file mode 100644 index 4fa200e..0000000 --- a/srcs/wordpress/wp-includes/js/dist/api-fetch.js +++ /dev/null @@ -1,1681 +0,0 @@ -this["wp"] = this["wp"] || {}; this["wp"]["apiFetch"] = -/******/ (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 = 353); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 1: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["i18n"]; }()); - -/***/ }), - -/***/ 10: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", 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; -} - -/***/ }), - -/***/ 20: -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(47); - - -/***/ }), - -/***/ 21: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js -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; -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; }); - -function _objectWithoutProperties(source, excluded) { - if (source == null) return {}; - var target = _objectWithoutPropertiesLoose(source, excluded); - var key, i; - - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - - for (i = 0; i < sourceSymbolKeys.length; i++) { - key = sourceSymbolKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; - target[key] = source[key]; - } - } - - return target; -} - -/***/ }), - -/***/ 26: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["url"]; }()); - -/***/ }), - -/***/ 353: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread.js -var objectSpread = __webpack_require__(7); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules -var objectWithoutProperties = __webpack_require__(21); - -// CONCATENATED MODULE: ./node_modules/@wordpress/api-fetch/build-module/middlewares/nonce.js - - -function createNonceMiddleware(nonce) { - function middleware(options, next) { - var _options$headers = options.headers, - headers = _options$headers === void 0 ? {} : _options$headers; // If an 'X-WP-Nonce' header (or any case-insensitive variation - // thereof) was specified, no need to add a nonce header. - - for (var headerName in headers) { - if (headerName.toLowerCase() === 'x-wp-nonce') { - return next(options); - } - } - - return next(Object(objectSpread["a" /* default */])({}, options, { - headers: Object(objectSpread["a" /* default */])({}, headers, { - 'X-WP-Nonce': middleware.nonce - }) - })); - } - - middleware.nonce = nonce; - return middleware; -} - -/* harmony default export */ var middlewares_nonce = (createNonceMiddleware); - -// CONCATENATED MODULE: ./node_modules/@wordpress/api-fetch/build-module/middlewares/namespace-endpoint.js - - -var namespace_endpoint_namespaceAndEndpointMiddleware = function namespaceAndEndpointMiddleware(options, next) { - var path = options.path; - var namespaceTrimmed, endpointTrimmed; - - if (typeof options.namespace === 'string' && typeof options.endpoint === 'string') { - namespaceTrimmed = options.namespace.replace(/^\/|\/$/g, ''); - endpointTrimmed = options.endpoint.replace(/^\//, ''); - - if (endpointTrimmed) { - path = namespaceTrimmed + '/' + endpointTrimmed; - } else { - path = namespaceTrimmed; - } - } - - delete options.namespace; - delete options.endpoint; - return next(Object(objectSpread["a" /* default */])({}, options, { - path: path - })); -}; - -/* harmony default export */ var namespace_endpoint = (namespace_endpoint_namespaceAndEndpointMiddleware); - -// CONCATENATED MODULE: ./node_modules/@wordpress/api-fetch/build-module/middlewares/root-url.js - - -/** - * Internal dependencies - */ - - -var root_url_createRootURLMiddleware = function createRootURLMiddleware(rootURL) { - return function (options, next) { - return namespace_endpoint(options, function (optionsWithPath) { - var url = optionsWithPath.url; - var path = optionsWithPath.path; - var apiRoot; - - if (typeof path === 'string') { - apiRoot = rootURL; - - if (-1 !== rootURL.indexOf('?')) { - path = path.replace('?', '&'); - } - - path = path.replace(/^\//, ''); // API root may already include query parameter prefix if site is - // configured to use plain permalinks. - - if ('string' === typeof apiRoot && -1 !== apiRoot.indexOf('?')) { - path = path.replace('?', '&'); - } - - url = apiRoot + path; - } - - return next(Object(objectSpread["a" /* default */])({}, optionsWithPath, { - url: url - })); - }); - }; -}; - -/* harmony default export */ var root_url = (root_url_createRootURLMiddleware); - -// CONCATENATED MODULE: ./node_modules/@wordpress/api-fetch/build-module/middlewares/preloading.js -var createPreloadingMiddleware = function createPreloadingMiddleware(preloadedData) { - return function (options, next) { - function getStablePath(path) { - var splitted = path.split('?'); - var query = splitted[1]; - var base = splitted[0]; - - if (!query) { - return base; - } // 'b=1&c=2&a=5' - - - return base + '?' + query // [ 'b=1', 'c=2', 'a=5' ] - .split('&') // [ [ 'b, '1' ], [ 'c', '2' ], [ 'a', '5' ] ] - .map(function (entry) { - return entry.split('='); - }) // [ [ 'a', '5' ], [ 'b, '1' ], [ 'c', '2' ] ] - .sort(function (a, b) { - return a[0].localeCompare(b[0]); - }) // [ 'a=5', 'b=1', 'c=2' ] - .map(function (pair) { - return pair.join('='); - }) // 'a=5&b=1&c=2' - .join('&'); - } - - var _options$parse = options.parse, - parse = _options$parse === void 0 ? true : _options$parse; - - if (typeof options.path === 'string') { - var method = options.method || 'GET'; - var path = getStablePath(options.path); - - if (parse && 'GET' === method && preloadedData[path]) { - return Promise.resolve(preloadedData[path].body); - } else if ('OPTIONS' === method && preloadedData[method] && preloadedData[method][path]) { - return Promise.resolve(preloadedData[method][path]); - } - } - - return next(options); - }; -}; - -/* harmony default export */ var preloading = (createPreloadingMiddleware); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js -var regenerator = __webpack_require__(20); -var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js -var asyncToGenerator = __webpack_require__(43); - -// EXTERNAL MODULE: external {"this":["wp","url"]} -var external_this_wp_url_ = __webpack_require__(26); - -// CONCATENATED MODULE: ./node_modules/@wordpress/api-fetch/build-module/middlewares/fetch-all-middleware.js - - - - - -/** - * WordPress dependencies - */ - // Apply query arguments to both URL and Path, whichever is present. - -var fetch_all_middleware_modifyQuery = function modifyQuery(_ref, queryArgs) { - var path = _ref.path, - url = _ref.url, - options = Object(objectWithoutProperties["a" /* default */])(_ref, ["path", "url"]); - - return Object(objectSpread["a" /* default */])({}, options, { - url: url && Object(external_this_wp_url_["addQueryArgs"])(url, queryArgs), - path: path && Object(external_this_wp_url_["addQueryArgs"])(path, queryArgs) - }); -}; // Duplicates parsing functionality from apiFetch. - - -var parseResponse = function parseResponse(response) { - return response.json ? response.json() : Promise.reject(response); -}; - -var parseLinkHeader = function parseLinkHeader(linkHeader) { - if (!linkHeader) { - return {}; - } - - var match = linkHeader.match(/<([^>]+)>; rel="next"/); - return match ? { - next: match[1] - } : {}; -}; - -var getNextPageUrl = function getNextPageUrl(response) { - var _parseLinkHeader = parseLinkHeader(response.headers.get('link')), - next = _parseLinkHeader.next; - - return next; -}; - -var requestContainsUnboundedQuery = function requestContainsUnboundedQuery(options) { - var pathIsUnbounded = options.path && options.path.indexOf('per_page=-1') !== -1; - var urlIsUnbounded = options.url && options.url.indexOf('per_page=-1') !== -1; - return pathIsUnbounded || urlIsUnbounded; -}; // The REST API enforces an upper limit on the per_page option. To handle large -// collections, apiFetch consumers can pass `per_page=-1`; this middleware will -// then recursively assemble a full response array from all available pages. - - -var fetchAllMiddleware = -/*#__PURE__*/ -function () { - var _ref2 = Object(asyncToGenerator["a" /* default */])( - /*#__PURE__*/ - regenerator_default.a.mark(function _callee(options, next) { - var response, results, nextPage, mergedResults, nextResponse, nextResults; - return regenerator_default.a.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - if (!(options.parse === false)) { - _context.next = 2; - break; - } - - return _context.abrupt("return", next(options)); - - case 2: - if (requestContainsUnboundedQuery(options)) { - _context.next = 4; - break; - } - - return _context.abrupt("return", next(options)); - - case 4: - _context.next = 6; - return next(Object(objectSpread["a" /* default */])({}, fetch_all_middleware_modifyQuery(options, { - per_page: 100 - }), { - // Ensure headers are returned for page 1. - parse: false - })); - - case 6: - response = _context.sent; - _context.next = 9; - return parseResponse(response); - - case 9: - results = _context.sent; - - if (Array.isArray(results)) { - _context.next = 12; - break; - } - - return _context.abrupt("return", results); - - case 12: - nextPage = getNextPageUrl(response); - - if (nextPage) { - _context.next = 15; - break; - } - - return _context.abrupt("return", results); - - case 15: - // Iteratively fetch all remaining pages until no "next" header is found. - mergedResults = [].concat(results); - - case 16: - if (!nextPage) { - _context.next = 27; - break; - } - - _context.next = 19; - return next(Object(objectSpread["a" /* default */])({}, options, { - // Ensure the URL for the next page is used instead of any provided path. - path: undefined, - url: nextPage, - // Ensure we still get headers so we can identify the next page. - parse: false - })); - - case 19: - nextResponse = _context.sent; - _context.next = 22; - return parseResponse(nextResponse); - - case 22: - nextResults = _context.sent; - mergedResults = mergedResults.concat(nextResults); - nextPage = getNextPageUrl(nextResponse); - _context.next = 16; - break; - - case 27: - return _context.abrupt("return", mergedResults); - - case 28: - case "end": - return _context.stop(); - } - } - }, _callee); - })); - - return function fetchAllMiddleware(_x, _x2) { - return _ref2.apply(this, arguments); - }; -}(); - -/* harmony default export */ var fetch_all_middleware = (fetchAllMiddleware); - -// CONCATENATED MODULE: ./node_modules/@wordpress/api-fetch/build-module/middlewares/http-v1.js - - -/** - * Set of HTTP methods which are eligible to be overridden. - * - * @type {Set} - */ -var OVERRIDE_METHODS = new Set(['PATCH', 'PUT', 'DELETE']); -/** - * Default request method. - * - * "A request has an associated method (a method). Unless stated otherwise it - * is `GET`." - * - * @see https://fetch.spec.whatwg.org/#requests - * - * @type {string} - */ - -var DEFAULT_METHOD = 'GET'; -/** - * API Fetch middleware which overrides the request method for HTTP v1 - * compatibility leveraging the REST API X-HTTP-Method-Override header. - * - * @param {Object} options Fetch options. - * @param {Function} next [description] - * - * @return {*} The evaluated result of the remaining middleware chain. - */ - -function httpV1Middleware(options, next) { - var _options = options, - _options$method = _options.method, - method = _options$method === void 0 ? DEFAULT_METHOD : _options$method; - - if (OVERRIDE_METHODS.has(method.toUpperCase())) { - options = Object(objectSpread["a" /* default */])({}, options, { - headers: Object(objectSpread["a" /* default */])({}, options.headers, { - 'X-HTTP-Method-Override': method, - 'Content-Type': 'application/json' - }), - method: 'POST' - }); - } - - return next(options, next); -} - -/* harmony default export */ var http_v1 = (httpV1Middleware); - -// CONCATENATED MODULE: ./node_modules/@wordpress/api-fetch/build-module/middlewares/user-locale.js -/** - * WordPress dependencies - */ - - -function userLocaleMiddleware(options, next) { - if (typeof options.url === 'string' && !Object(external_this_wp_url_["hasQueryArg"])(options.url, '_locale')) { - options.url = Object(external_this_wp_url_["addQueryArgs"])(options.url, { - _locale: 'user' - }); - } - - if (typeof options.path === 'string' && !Object(external_this_wp_url_["hasQueryArg"])(options.path, '_locale')) { - options.path = Object(external_this_wp_url_["addQueryArgs"])(options.path, { - _locale: 'user' - }); - } - - return next(options, next); -} - -/* harmony default export */ var user_locale = (userLocaleMiddleware); - -// EXTERNAL MODULE: external {"this":["wp","i18n"]} -var external_this_wp_i18n_ = __webpack_require__(1); - -// CONCATENATED MODULE: ./node_modules/@wordpress/api-fetch/build-module/utils/response.js -/** - * WordPress dependencies - */ - -/** - * Parses the apiFetch response. - * - * @param {Response} response - * @param {boolean} shouldParseResponse - * - * @return {Promise} Parsed response - */ - -var response_parseResponse = function parseResponse(response) { - var shouldParseResponse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - - if (shouldParseResponse) { - if (response.status === 204) { - return null; - } - - return response.json ? response.json() : Promise.reject(response); - } - - return response; -}; - -var response_parseJsonAndNormalizeError = function parseJsonAndNormalizeError(response) { - var invalidJsonError = { - code: 'invalid_json', - message: Object(external_this_wp_i18n_["__"])('The response is not a valid JSON response.') - }; - - if (!response || !response.json) { - throw invalidJsonError; - } - - return response.json().catch(function () { - throw invalidJsonError; - }); -}; -/** - * Parses the apiFetch response properly and normalize response errors. - * - * @param {Response} response - * @param {boolean} shouldParseResponse - * - * @return {Promise} Parsed response. - */ - - -var parseResponseAndNormalizeError = function parseResponseAndNormalizeError(response) { - var shouldParseResponse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - return Promise.resolve(response_parseResponse(response, shouldParseResponse)).catch(function (res) { - return parseAndThrowError(res, shouldParseResponse); - }); -}; -function parseAndThrowError(response) { - var shouldParseResponse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - - if (!shouldParseResponse) { - throw response; - } - - return response_parseJsonAndNormalizeError(response).then(function (error) { - var unknownError = { - code: 'unknown_error', - message: Object(external_this_wp_i18n_["__"])('An unknown error occurred.') - }; - throw error || unknownError; - }); -} - -// CONCATENATED MODULE: ./node_modules/@wordpress/api-fetch/build-module/middlewares/media-upload.js - - -/** - * WordPress dependencies - */ - -/** - * Internal dependencies - */ - - -/** - * Middleware handling media upload failures and retries. - * - * @param {Object} options Fetch options. - * @param {Function} next [description] - * - * @return {*} The evaluated result of the remaining middleware chain. - */ - -function mediaUploadMiddleware(options, next) { - var isMediaUploadRequest = options.path && options.path.indexOf('/wp/v2/media') !== -1 || options.url && options.url.indexOf('/wp/v2/media') !== -1; - - if (!isMediaUploadRequest) { - return next(options, next); - } - - var retries = 0; - var maxRetries = 5; - - var postProcess = function postProcess(attachmentId) { - retries++; - return next({ - path: "/wp/v2/media/".concat(attachmentId, "/post-process"), - method: 'POST', - data: { - action: 'create-image-subsizes' - }, - parse: false - }).catch(function () { - if (retries < maxRetries) { - return postProcess(attachmentId); - } - - next({ - path: "/wp/v2/media/".concat(attachmentId, "?force=true"), - method: 'DELETE' - }); - return Promise.reject(); - }); - }; - - return next(Object(objectSpread["a" /* default */])({}, options, { - parse: false - })).catch(function (response) { - var attachmentId = response.headers.get('x-wp-upload-attachment-id'); - - if (response.status >= 500 && response.status < 600 && attachmentId) { - return postProcess(attachmentId).catch(function () { - if (options.parse !== false) { - return Promise.reject({ - code: 'post_process', - message: Object(external_this_wp_i18n_["__"])('Media upload failed. If this is a photo or a large image, please scale it down and try again.') - }); - } - - return Promise.reject(response); - }); - } - - return parseAndThrowError(response, options.parse); - }).then(function (response) { - return parseResponseAndNormalizeError(response, options.parse); - }); -} - -/* harmony default export */ var media_upload = (mediaUploadMiddleware); - -// CONCATENATED MODULE: ./node_modules/@wordpress/api-fetch/build-module/index.js - - - -/** - * Internal dependencies - */ - - - - - - - - - -/** - * Default set of header values which should be sent with every request unless - * explicitly provided through apiFetch options. - * - * @type {Object} - */ - -var DEFAULT_HEADERS = { - // The backend uses the Accept header as a condition for considering an - // incoming request as a REST request. - // - // See: https://core.trac.wordpress.org/ticket/44534 - Accept: 'application/json, */*;q=0.1' -}; -/** - * Default set of fetch option values which should be sent with every request - * unless explicitly provided through apiFetch options. - * - * @type {Object} - */ - -var DEFAULT_OPTIONS = { - credentials: 'include' -}; -var middlewares = [user_locale, namespace_endpoint, http_v1, fetch_all_middleware]; - -function registerMiddleware(middleware) { - middlewares.unshift(middleware); -} - -var checkStatus = function checkStatus(response) { - if (response.status >= 200 && response.status < 300) { - return response; - } - - throw response; -}; - -var build_module_defaultFetchHandler = function defaultFetchHandler(nextOptions) { - var url = nextOptions.url, - path = nextOptions.path, - data = nextOptions.data, - _nextOptions$parse = nextOptions.parse, - parse = _nextOptions$parse === void 0 ? true : _nextOptions$parse, - remainingOptions = Object(objectWithoutProperties["a" /* default */])(nextOptions, ["url", "path", "data", "parse"]); - - var body = nextOptions.body, - headers = nextOptions.headers; // Merge explicitly-provided headers with default values. - - headers = Object(objectSpread["a" /* default */])({}, DEFAULT_HEADERS, headers); // The `data` property is a shorthand for sending a JSON body. - - if (data) { - body = JSON.stringify(data); - headers['Content-Type'] = 'application/json'; - } - - var responsePromise = window.fetch(url || path, Object(objectSpread["a" /* default */])({}, DEFAULT_OPTIONS, remainingOptions, { - body: body, - headers: headers - })); - return responsePromise.then(checkStatus).catch(function (response) { - return parseAndThrowError(response, parse); - }).then(function (response) { - return parseResponseAndNormalizeError(response, parse); - }); -}; - -var fetchHandler = build_module_defaultFetchHandler; -/** - * Defines a custom fetch handler for making the requests that will override - * the default one using window.fetch - * - * @param {Function} newFetchHandler The new fetch handler - */ - -function setFetchHandler(newFetchHandler) { - fetchHandler = newFetchHandler; -} - -function apiFetch(options) { - var steps = [].concat(middlewares, [fetchHandler]); - - var createRunStep = function createRunStep(index) { - return function (workingOptions) { - var step = steps[index]; - - if (index === steps.length - 1) { - return step(workingOptions); - } - - var next = createRunStep(index + 1); - return step(workingOptions, next); - }; - }; - - return new Promise(function (resolve, reject) { - createRunStep(0)(options).then(resolve).catch(function (error) { - if (error.code !== 'rest_cookie_invalid_nonce') { - return reject(error); - } // If the nonce is invalid, refresh it and try again. - - - window.fetch(apiFetch.nonceEndpoint).then(checkStatus).then(function (data) { - return data.text(); - }).then(function (text) { - apiFetch.nonceMiddleware.nonce = text; - apiFetch(options).then(resolve).catch(reject); - }).catch(reject); - }); - }); -} - -apiFetch.use = registerMiddleware; -apiFetch.setFetchHandler = setFetchHandler; -apiFetch.createNonceMiddleware = middlewares_nonce; -apiFetch.createPreloadingMiddleware = preloading; -apiFetch.createRootURLMiddleware = root_url; -apiFetch.fetchAllMiddleware = fetch_all_middleware; -apiFetch.mediaUploadMiddleware = media_upload; -/* harmony default export */ var build_module = __webpack_exports__["default"] = (apiFetch); - - -/***/ }), - -/***/ 43: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", 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); - }); - }; -} - -/***/ }), - -/***/ 47: -/***/ (function(module, exports, __webpack_require__) { - -/** - * Copyright (c) 2014-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -var runtime = (function (exports) { - "use strict"; - - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined; // More compressible than void 0. - var $Symbol = typeof Symbol === "function" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || "@@iterator"; - var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; - var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - - function wrap(innerFn, outerFn, self, tryLocsList) { - // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); - - // The ._invoke method unifies the implementations of the .next, - // .throw, and .return methods. - generator._invoke = makeInvokeMethod(innerFn, self, context); - - return generator; - } - exports.wrap = wrap; - - // Try/catch helper to minimize deoptimizations. Returns a completion - // record like context.tryEntries[i].completion. This interface could - // have been (and was previously) designed to take a closure to be - // invoked without arguments, but in all the cases we care about we - // already have an existing method we want to call, so there's no need - // to create a new function object. We can even get away with assuming - // the method takes exactly one argument, since that happens to be true - // in every case, so we don't have to touch the arguments object. The - // only additional allocation required is the completion record, which - // has a stable shape and so hopefully should be cheap to allocate. - function tryCatch(fn, obj, arg) { - try { - return { type: "normal", arg: fn.call(obj, arg) }; - } catch (err) { - return { type: "throw", arg: err }; - } - } - - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; - - // Returning this object from the innerFn has the same effect as - // breaking out of the dispatch switch statement. - var ContinueSentinel = {}; - - // Dummy constructor functions that we use as the .constructor and - // .constructor.prototype properties for functions that return Generator - // objects. For full spec compliance, you may wish to configure your - // minifier not to mangle the names of these two functions. - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - - // This is a polyfill for %IteratorPrototype% for environments that - // don't natively support it. - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function () { - return this; - }; - - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && - NativeIteratorPrototype !== Op && - hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - // This environment has a native %IteratorPrototype%; use it instead - // of the polyfill. - IteratorPrototype = NativeIteratorPrototype; - } - - var Gp = GeneratorFunctionPrototype.prototype = - Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = - GeneratorFunction.displayName = "GeneratorFunction"; - - // Helper for defining the .next, .throw, and .return methods of the - // Iterator interface in terms of a single ._invoke method. - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function(method) { - prototype[method] = function(arg) { - return this._invoke(method, arg); - }; - }); - } - - exports.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor - ? ctor === GeneratorFunction || - // For the native GeneratorFunction constructor, the best we can - // do is to check its .name property. - (ctor.displayName || ctor.name) === "GeneratorFunction" - : false; - }; - - exports.mark = function(genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - if (!(toStringTagSymbol in genFun)) { - genFun[toStringTagSymbol] = "GeneratorFunction"; - } - } - genFun.prototype = Object.create(Gp); - return genFun; - }; - - // Within the body of any async function, `await x` is transformed to - // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test - // `hasOwn.call(value, "__await")` to determine if the yielded value is - // meant to be awaited. - exports.awrap = function(arg) { - return { __await: arg }; - }; - - function AsyncIterator(generator) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === "throw") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && - typeof value === "object" && - hasOwn.call(value, "__await")) { - return Promise.resolve(value.__await).then(function(value) { - invoke("next", value, resolve, reject); - }, function(err) { - invoke("throw", err, resolve, reject); - }); - } - - return Promise.resolve(value).then(function(unwrapped) { - // When a yielded Promise is resolved, its final value becomes - // the .value of the Promise<{value,done}> result for the - // current iteration. - result.value = unwrapped; - resolve(result); - }, function(error) { - // If a rejected Promise was yielded, throw the rejection back - // into the async generator function so it can be handled there. - return invoke("throw", error, resolve, reject); - }); - } - } - - var previousPromise; - - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new Promise(function(resolve, reject) { - invoke(method, arg, resolve, reject); - }); - } - - return previousPromise = - // If enqueue has been called before, then we want to wait until - // all previous Promises have been resolved before calling invoke, - // so that results are always delivered in the correct order. If - // enqueue has not been called before, then it is important to - // call invoke immediately, without waiting on a callback to fire, - // so that the async generator function has the opportunity to do - // any necessary setup in a predictable way. This predictability - // is why the Promise constructor synchronously invokes its - // executor callback, and why async functions synchronously - // execute code before the first await. Since we implement simple - // async functions in terms of async generators, it is especially - // important to get this right, even though it requires care. - previousPromise ? previousPromise.then( - callInvokeWithMethodAndArg, - // Avoid propagating failures to Promises returned by later - // invocations of the iterator. - callInvokeWithMethodAndArg - ) : callInvokeWithMethodAndArg(); - } - - // Define the unified helper method that is used to implement .next, - // .throw, and .return (see defineIteratorMethods). - this._invoke = enqueue; - } - - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function () { - return this; - }; - exports.AsyncIterator = AsyncIterator; - - // Note that simple async functions are implemented on top of - // AsyncIterator objects; they just return a Promise for the value of - // the final result produced by the iterator. - exports.async = function(innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator( - wrap(innerFn, outerFn, self, tryLocsList) - ); - - return exports.isGeneratorFunction(outerFn) - ? iter // If outerFn is a generator, return the full iterator. - : iter.next().then(function(result) { - return result.done ? result.value : iter.next(); - }); - }; - - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } - - if (state === GenStateCompleted) { - if (method === "throw") { - throw arg; - } - - // Be forgiving, per 25.3.3.3.3 of the spec: - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - return doneResult(); - } - - context.method = method; - context.arg = arg; - - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } - - if (context.method === "next") { - // Setting context._sent for legacy support of Babel's - // function.sent implementation. - context.sent = context._sent = context.arg; - - } else if (context.method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } - - context.dispatchException(context.arg); - - } else if (context.method === "return") { - context.abrupt("return", context.arg); - } - - state = GenStateExecuting; - - var record = tryCatch(innerFn, self, context); - if (record.type === "normal") { - // If an exception is thrown from innerFn, we leave state === - // GenStateExecuting and loop back for another invocation. - state = context.done - ? GenStateCompleted - : GenStateSuspendedYield; - - if (record.arg === ContinueSentinel) { - continue; - } - - return { - value: record.arg, - done: context.done - }; - - } else if (record.type === "throw") { - state = GenStateCompleted; - // Dispatch the exception by looping back around to the - // context.dispatchException(context.arg) call above. - context.method = "throw"; - context.arg = record.arg; - } - } - }; - } - - // Call delegate.iterator[context.method](context.arg) and handle the - // result, either by returning a { value, done } result from the - // delegate iterator, or by modifying context.method and context.arg, - // setting context.delegate to null, and returning the ContinueSentinel. - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined) { - // A .throw or .return when the delegate iterator has no .throw - // method always terminates the yield* loop. - context.delegate = null; - - if (context.method === "throw") { - // Note: ["return"] must be used for ES3 parsing compatibility. - if (delegate.iterator["return"]) { - // If the delegate iterator has a return method, give it a - // chance to clean up. - context.method = "return"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); - - if (context.method === "throw") { - // If maybeInvokeDelegate(context) changed context.method from - // "return" to "throw", let that override the TypeError below. - return ContinueSentinel; - } - } - - context.method = "throw"; - context.arg = new TypeError( - "The iterator does not provide a 'throw' method"); - } - - return ContinueSentinel; - } - - var record = tryCatch(method, delegate.iterator, context.arg); - - if (record.type === "throw") { - context.method = "throw"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } - - var info = record.arg; - - if (! info) { - context.method = "throw"; - context.arg = new TypeError("iterator result is not an object"); - context.delegate = null; - return ContinueSentinel; - } - - if (info.done) { - // Assign the result of the finished delegate to the temporary - // variable specified by delegate.resultName (see delegateYield). - context[delegate.resultName] = info.value; - - // Resume execution at the desired location (see delegateYield). - context.next = delegate.nextLoc; - - // If context.method was "throw" but the delegate handled the - // exception, let the outer generator proceed normally. If - // context.method was "next", forget context.arg since it has been - // "consumed" by the delegate iterator. If context.method was - // "return", allow the original .return call to continue in the - // outer generator. - if (context.method !== "return") { - context.method = "next"; - context.arg = undefined; - } - - } else { - // Re-yield the result returned by the delegate method. - return info; - } - - // The delegate iterator is finished, so forget it and continue with - // the outer generator. - context.delegate = null; - return ContinueSentinel; - } - - // Define Generator.prototype.{next,throw,return} in terms of the - // unified ._invoke helper method. - defineIteratorMethods(Gp); - - Gp[toStringTagSymbol] = "Generator"; - - // A Generator should always return itself as the iterator object when the - // @@iterator function is called on it. Some browsers' implementations of the - // iterator prototype chain incorrectly implement this, causing the Generator - // object to not be returned from this call. This ensures that doesn't happen. - // See https://github.com/facebook/regenerator/issues/274 for more details. - Gp[iteratorSymbol] = function() { - return this; - }; - - Gp.toString = function() { - return "[object Generator]"; - }; - - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; - - if (1 in locs) { - entry.catchLoc = locs[1]; - } - - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - - this.tryEntries.push(entry); - } - - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } - - function Context(tryLocsList) { - // The root entry object (effectively a try statement without a catch - // or a finally block) gives us a place to store values thrown from - // locations where there is no enclosing try statement. - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } - - exports.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - - // Rather than returning an object with a next method, we keep - // things simple and return the next function itself. - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } - - // To avoid creating an additional object, we just hang the .value - // and .done properties off the next function object itself. This - // also ensures that the minifier will not anonymize the function. - next.done = true; - return next; - }; - }; - - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - - if (typeof iterable.next === "function") { - return iterable; - } - - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - - next.value = undefined; - next.done = true; - - return next; - }; - - return next.next = next; - } - } - - // Return an iterator with no values. - return { next: doneResult }; - } - exports.values = values; - - function doneResult() { - return { value: undefined, done: true }; - } - - Context.prototype = { - constructor: Context, - - reset: function(skipTempReset) { - this.prev = 0; - this.next = 0; - // Resetting context._sent for legacy support of Babel's - // function.sent implementation. - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; - - this.method = "next"; - this.arg = undefined; - - this.tryEntries.forEach(resetTryEntry); - - if (!skipTempReset) { - for (var name in this) { - // Not sure about the optimal order of these conditions: - if (name.charAt(0) === "t" && - hasOwn.call(this, name) && - !isNaN(+name.slice(1))) { - this[name] = undefined; - } - } - } - }, - - stop: function() { - this.done = true; - - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } - - return this.rval; - }, - - dispatchException: function(exception) { - if (this.done) { - throw exception; - } - - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; - - if (caught) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - context.method = "next"; - context.arg = undefined; - } - - return !! caught; - } - - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); - } - - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); - - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else { - throw new Error("try statement without catch or finally"); - } - } - } - }, - - abrupt: function(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && - hasOwn.call(entry, "finallyLoc") && - this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - - if (finallyEntry && - (type === "break" || - type === "continue") && - finallyEntry.tryLoc <= arg && - arg <= finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } - - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - - if (finallyEntry) { - this.method = "next"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } - - return this.complete(record); - }, - - complete: function(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } - - if (record.type === "break" || - record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = this.arg = record.arg; - this.method = "return"; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } - - return ContinueSentinel; - }, - - finish: function(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - - "catch": function(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } - - // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - throw new Error("illegal catch attempt"); - }, - - delegateYield: function(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - - if (this.method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - this.arg = undefined; - } - - return ContinueSentinel; - } - }; - - // Regardless of whether this script is executing as a CommonJS module - // or not, return the runtime object so that we can declare the variable - // regeneratorRuntime in the outer scope, which allows this module to be - // injected easily by `bin/regenerator --include-runtime script.js`. - return exports; - -}( - // If this script is executing as a CommonJS module, use module.exports - // as the regeneratorRuntime namespace. Otherwise create a new empty - // object. Either way, the resulting object will be used to initialize - // the regeneratorRuntime variable at the top of this file. - true ? module.exports : undefined -)); - -try { - regeneratorRuntime = runtime; -} catch (accidentalStrictMode) { - // This module should not be running in strict mode, so the above - // assignment should always work unless something is misconfigured. Just - // in case runtime.js accidentally runs in strict mode, we can escape - // strict mode using a global Function call. This could conceivably fail - // if a Content Security Policy forbids using Function, but in that case - // the proper solution is to fix the accidental strict mode problem. If - // you've misconfigured your bundler to force strict mode and applied a - // CSP to forbid Function, and you're not willing to fix either of those - // problems, please detail your unique predicament in a GitHub issue. - Function("r", "regeneratorRuntime = r")(runtime); -} - - -/***/ }), - -/***/ 7: -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread; }); -/* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10); - -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 */ "a"])(target, key, source[key]); - }); - } - - return target; -} - -/***/ }) - -/******/ })["default"]; \ No newline at end of file diff --git a/srcs/wordpress/wp-includes/js/dist/api-fetch.min.js b/srcs/wordpress/wp-includes/js/dist/api-fetch.min.js deleted file mode 100644 index 62b9255..0000000 --- a/srcs/wordpress/wp-includes/js/dist/api-fetch.min.js +++ /dev/null @@ -1 +0,0 @@ -this.wp=this.wp||{},this.wp.apiFetch=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=353)}({1:function(t,e){!function(){t.exports=this.wp.i18n}()},10:function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"a",(function(){return n}))},20:function(t,e,r){t.exports=r(47)},21:function(t,e,r){"use strict";function n(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}r.d(e,"a",(function(){return n}))},26:function(t,e){!function(){t.exports=this.wp.url}()},353:function(t,e,r){"use strict";r.r(e);var n=r(7),o=r(21);var a=function(t){function e(t,r){var o=t.headers,a=void 0===o?{}:o;for(var i in a)if("x-wp-nonce"===i.toLowerCase())return r(t);return r(Object(n.a)({},t,{headers:Object(n.a)({},a,{"X-WP-Nonce":e.nonce})}))}return e.nonce=t,e},i=function(t,e){var r,o,a=t.path;return"string"==typeof t.namespace&&"string"==typeof t.endpoint&&(r=t.namespace.replace(/^\/|\/$/g,""),a=(o=t.endpoint.replace(/^\//,""))?r+"/"+o:r),delete t.namespace,delete t.endpoint,e(Object(n.a)({},t,{path:a}))},c=function(t){return function(e,r){return i(e,(function(e){var o,a=e.url,i=e.path;return"string"==typeof i&&(o=t,-1!==t.indexOf("?")&&(i=i.replace("?","&")),i=i.replace(/^\//,""),"string"==typeof o&&-1!==o.indexOf("?")&&(i=i.replace("?","&")),a=o+i),r(Object(n.a)({},e,{url:a}))}))}},u=function(t){return function(e,r){var n=e.parse,o=void 0===n||n;if("string"==typeof e.path){var a=e.method||"GET",i=function(t){var e=t.split("?"),r=e[1],n=e[0];return r?n+"?"+r.split("&").map((function(t){return t.split("=")})).sort((function(t,e){return t[0].localeCompare(e[0])})).map((function(t){return t.join("=")})).join("&"):n}(e.path);if(o&&"GET"===a&&t[i])return Promise.resolve(t[i].body);if("OPTIONS"===a&&t[a]&&t[a][i])return Promise.resolve(t[a][i])}return r(e)}},s=r(20),f=r.n(s),l=r(43),h=r(26),p=function(t,e){var r=t.path,a=t.url,i=Object(o.a)(t,["path","url"]);return Object(n.a)({},i,{url:a&&Object(h.addQueryArgs)(a,e),path:r&&Object(h.addQueryArgs)(r,e)})},d=function(t){return t.json?t.json():Promise.reject(t)},v=function(t){return function(t){if(!t)return{};var e=t.match(/<([^>]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},y=function(t){var e=t.path&&-1!==t.path.indexOf("per_page=-1"),r=t.url&&-1!==t.url.indexOf("per_page=-1");return e||r},g=function(){var t=Object(l.a)(f.a.mark((function t(e,r){var o,a,i,c,u,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",r(e));case 2:if(y(e)){t.next=4;break}return t.abrupt("return",r(e));case 4:return t.next=6,r(Object(n.a)({},p(e,{per_page:100}),{parse:!1}));case 6:return o=t.sent,t.next=9,d(o);case 9:if(a=t.sent,Array.isArray(a)){t.next=12;break}return t.abrupt("return",a);case 12:if(i=v(o)){t.next=15;break}return t.abrupt("return",a);case 15:c=[].concat(a);case 16:if(!i){t.next=27;break}return t.next=19,r(Object(n.a)({},e,{path:void 0,url:i,parse:!1}));case 19:return u=t.sent,t.next=22,d(u);case 22:s=t.sent,c=c.concat(s),i=v(u),t.next=16;break;case 27:return t.abrupt("return",c);case 28:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),m=new Set(["PATCH","PUT","DELETE"]),b="GET";var w=function(t,e){var r=t.method,o=void 0===r?b:r;return m.has(o.toUpperCase())&&(t=Object(n.a)({},t,{headers:Object(n.a)({},t.headers,{"X-HTTP-Method-Override":o,"Content-Type":"application/json"}),method:"POST"})),e(t,e)};var O=function(t,e){return"string"!=typeof t.url||Object(h.hasQueryArg)(t.url,"_locale")||(t.url=Object(h.addQueryArgs)(t.url,{_locale:"user"})),"string"!=typeof t.path||Object(h.hasQueryArg)(t.path,"_locale")||(t.path=Object(h.addQueryArgs)(t.path,{_locale:"user"})),e(t,e)},j=r(1),x=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},_=function(t){var e={code:"invalid_json",message:Object(j.__)("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},P=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(x(t,e)).catch((function(t){return E(t,e)}))};function E(t){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]))throw t;return _(t).then((function(t){var e={code:"unknown_error",message:Object(j.__)("An unknown error occurred.")};throw t||e}))}var L=function(t,e){if(!(t.path&&-1!==t.path.indexOf("/wp/v2/media")||t.url&&-1!==t.url.indexOf("/wp/v2/media")))return e(t,e);var r=0;return e(Object(n.a)({},t,{parse:!1})).catch((function(n){var o=n.headers.get("x-wp-upload-attachment-id");return n.status>=500&&n.status<600&&o?function t(n){return r++,e({path:"/wp/v2/media/".concat(n,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return r<5?t(n):(e({path:"/wp/v2/media/".concat(n,"?force=true"),method:"DELETE"}),Promise.reject())}))}(o).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:Object(j.__)("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(n)})):E(n,t.parse)})).then((function(e){return P(e,t.parse)}))},T={Accept:"application/json, */*;q=0.1"},k={credentials:"include"},S=[O,i,w,g];var A=function(t){if(t.status>=200&&t.status<300)return t;throw t},N=function(t){var e=t.url,r=t.path,a=t.data,i=t.parse,c=void 0===i||i,u=Object(o.a)(t,["url","path","data","parse"]),s=t.body,f=t.headers;return f=Object(n.a)({},T,f),a&&(s=JSON.stringify(a),f["Content-Type"]="application/json"),window.fetch(e||r,Object(n.a)({},k,u,{body:s,headers:f})).then(A).catch((function(t){return E(t,c)})).then((function(t){return P(t,c)}))};function M(t){var e=[].concat(S,[N]);return new Promise((function(r,n){(function t(r){return function(n){var o=e[r];return r===e.length-1?o(n):o(n,t(r+1))}})(0)(t).then(r).catch((function(e){if("rest_cookie_invalid_nonce"!==e.code)return n(e);window.fetch(M.nonceEndpoint).then(A).then((function(t){return t.text()})).then((function(e){M.nonceMiddleware.nonce=e,M(t).then(r).catch(n)})).catch(n)}))}))}M.use=function(t){S.unshift(t)},M.setFetchHandler=function(t){N=t},M.createNonceMiddleware=a,M.createPreloadingMiddleware=u,M.createRootURLMiddleware=c,M.fetchAllMiddleware=g,M.mediaUploadMiddleware=L;e.default=M},43:function(t,e,r){"use strict";function n(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,a){var i=t.apply(e,r);function c(t){n(i,o,a,c,u,"next",t)}function u(t){n(i,o,a,c,u,"throw",t)}c(void 0)}))}}r.d(e,"a",(function(){return o}))},47:function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw a;return k()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=_(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=s(t,e,r);if("normal"===u.type){if(n=r.done?p:l,u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(t,r,i),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f="suspendedStart",l="suspendedYield",h="executing",p="completed",d={};function v(){}function y(){}function g(){}var m={};m[a]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(T([])));w&&w!==r&&n.call(w,a)&&(m=w);var O=g.prototype=v.prototype=Object.create(m);function j(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function x(t){var e;this._invoke=function(r,o){function a(){return new Promise((function(e,a){!function e(r,o,a,i){var c=s(t[r],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?Promise.resolve(f.__await).then((function(t){e("next",t,a,i)}),(function(t){e("throw",t,a,i)})):Promise.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return e("throw",t,a,i)}))}i(c.arg)}(r,o,e,a)}))}return e=e?e.then(a,a):a()}}function _(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},7:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(10);function o(t){for(var e=1;e is found. - '-(?!->)' + // Dash not followed by end of comment. - '[^\\-]*' + // Consume non-dashes. - ')*' + // Loop possessively. - '(?:-->)?'; // End of comment. If not found, match all input. - - var cdata = '!\\[CDATA\\[' + // Start of comment, after the <. - '[^\\]]*' + // Consume non-]. - '(?:' + // Unroll the loop: Consume everything until ]]> is found. - '](?!]>)' + // One ] not followed by end of comment. - '[^\\]]*' + // Consume non-]. - ')*?' + // Loop possessively. - '(?:]]>)?'; // End of comment. If not found, match all input. - - var escaped = '(?=' + // Is the element escaped? - '!--' + '|' + '!\\[CDATA\\[' + ')' + '((?=!-)' + // If yes, which type? - comments + '|' + cdata + ')'; - var regex = '(' + // Capture the entire match. - '<' + // Find start of element. - '(' + // Conditional expression follows. - escaped + // Find end of escaped element. - '|' + // ... else ... - '[^>]*>?' + // Find end of normal element. - ')' + ')'; - return new RegExp(regex); - /* eslint-enable no-multi-spaces */ -}(); -/** - * Separate HTML elements and comments from the text. - * - * @param {string} input The text which has to be formatted. - * @return {Array} The formatted text. - */ - - -function htmlSplit(input) { - var parts = []; - var workingInput = input; - var match; - - while (match = workingInput.match(htmlSplitRegex)) { - parts.push(workingInput.slice(0, match.index)); - parts.push(match[0]); - workingInput = workingInput.slice(match.index + match[0].length); - } - - if (workingInput.length) { - parts.push(workingInput); - } - - return parts; -} -/** - * Replace characters or phrases within HTML elements only. - * - * @param {string} haystack The text which has to be formatted. - * @param {Object} replacePairs In the form {from: 'to', ...}. - * @return {string} The formatted text. - */ - - -function replaceInHtmlTags(haystack, replacePairs) { - // Find all elements. - var textArr = htmlSplit(haystack); - var changed = false; // Extract all needles. - - var needles = Object.keys(replacePairs); // Loop through delimiters (elements) only. - - for (var i = 1; i < textArr.length; i += 2) { - for (var j = 0; j < needles.length; j++) { - var needle = needles[j]; - - if (-1 !== textArr[i].indexOf(needle)) { - textArr[i] = textArr[i].replace(new RegExp(needle, 'g'), replacePairs[needle]); - changed = true; // After one strtr() break out of the foreach loop and look at next element. - - break; - } - } - } - - if (changed) { - haystack = textArr.join(''); - } - - return haystack; -} -/** - * Replaces double line-breaks with paragraph elements. - * - * A group of regex replaces used to identify text formatted with newlines and - * replace double line-breaks with HTML paragraph tags. The remaining line- - * breaks after conversion become `
` tags, unless br is set to 'false'. - * - * @param {string} text The text which has to be formatted. - * @param {boolean} br Optional. If set, will convert all remaining line- - * breaks after paragraphing. Default true. - * - * @example - *```js - * import { autop } from '@wordpress/autop'; - * autop( 'my text' ); // "

my text

" - * ``` - * - * @return {string} Text which has been converted into paragraph tags. - */ - - -function autop(text) { - var br = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - var preTags = []; - - if (text.trim() === '') { - return ''; - } // Just to make things a little easier, pad the end. - - - text = text + '\n'; - /* - * Pre tags shouldn't be touched by autop. - * Replace pre tags with placeholders and bring them back after autop. - */ - - if (text.indexOf(''); - var lastText = textParts.pop(); - text = ''; - - for (var i = 0; i < textParts.length; i++) { - var textPart = textParts[i]; - var start = textPart.indexOf(''; - preTags.push([name, textPart.substr(start) + '']); - text += textPart.substr(0, start) + name; - } - - text += lastText; - } // Change multiple
s into two line breaks, which will turn into paragraphs. - - - text = text.replace(/\s*/g, '\n\n'); - var allBlocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)'; // Add a double line break above block-level opening tags. - - text = text.replace(new RegExp('(<' + allBlocks + '[\\s\/>])', 'g'), '\n\n$1'); // Add a double line break below block-level closing tags. - - text = text.replace(new RegExp('(<\/' + allBlocks + '>)', 'g'), '$1\n\n'); // Standardize newline characters to "\n". - - text = text.replace(/\r\n|\r/g, '\n'); // Find newlines in all elements and add placeholders. - - text = replaceInHtmlTags(text, { - '\n': ' ' - }); // Collapse line breaks before and after '); - } - /* - * Collapse line breaks inside elements, before and elements - * so they don't get autop'd. - */ - - - if (text.indexOf('') !== -1) { - text = text.replace(/(]*>)\s*/g, '$1'); - text = text.replace(/\s*<\/object>/g, ''); - text = text.replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g, '$1'); - } - /* - * Collapse line breaks inside