diff -r be944660c56a -r 3d72ae0968f4 wp/wp-includes/js/dist/wordcount.js --- a/wp/wp-includes/js/dist/wordcount.js Wed Sep 21 18:19:35 2022 +0200 +++ b/wp/wp-includes/js/dist/wordcount.js Tue Sep 27 16:37:53 2022 +0200 @@ -1,113 +1,50 @@ -this["wp"] = this["wp"] || {}; this["wp"]["wordcount"] = -/******/ (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: {} +/******/ (function() { // webpackBootstrap +/******/ "use strict"; +/******/ // The require scope +/******/ var __webpack_require__ = {}; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ !function() { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = function(exports, definition) { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } /******/ }; -/******/ -/******/ // 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 = "pC98"); -/******/ }) +/******/ }(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ !function() { +/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +/******/ }(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ !function() { +/******/ // 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 }); +/******/ }; +/******/ }(); +/******/ /************************************************************************/ -/******/ ({ - -/***/ "YLtl": -/***/ (function(module, exports) { - -(function() { module.exports = window["lodash"]; }()); - -/***/ }), - -/***/ "pC98": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; +var __webpack_exports__ = {}; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS -__webpack_require__.d(__webpack_exports__, "count", function() { return /* binding */ count; }); +__webpack_require__.d(__webpack_exports__, { + "count": function() { return /* binding */ count; } +}); -// EXTERNAL MODULE: external "lodash" -var external_lodash_ = __webpack_require__("YLtl"); - -// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/defaultSettings.js +;// CONCATENATED MODULE: external "lodash" +var external_lodash_namespaceObject = window["lodash"]; +;// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/defaultSettings.js /** @typedef {import('./index').WPWordCountStrategy} WPWordCountStrategy */ /** @typedef {Partial<{type: WPWordCountStrategy, shortcodes: string[]}>} WPWordCountL10n */ @@ -151,7 +88,7 @@ HTMLcommentRegExp: //g, spaceRegExp: / | /gi, HTMLEntityRegExp: /&\S+?;/g, - // \u2014 = em-dash + // \u2014 = em-dash. connectorRegExp: /--|\u2014/g, // Characters to be removed from input text. removeRegExp: new RegExp(['[', // Basic Latin (extract) @@ -184,7 +121,7 @@ * Supplemental Mathematical Operators * Miscellaneous Symbols and Arrows */ - '\u2000-\u2BFF', // Supplemental Punctuation + '\u2000-\u2BFF', // Supplemental Punctuation. '\u2E00-\u2E7F', ']'].join(''), 'g'), // Remove UTF-16 surrogate points, see https://en.wikipedia.org/wiki/UTF-16#U.2BD800_to_U.2BDFFF astralRegExp: /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, @@ -208,7 +145,7 @@ } }; -// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/stripTags.js +;// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/stripTags.js /** * Replaces items matched in the regex with new line * @@ -221,7 +158,7 @@ return text.replace(settings.HTMLRegExp, '\n'); } -// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/transposeAstralsToCountableChar.js +;// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/transposeAstralsToCountableChar.js /** * Replaces items matched in the regex with character. * @@ -234,7 +171,7 @@ return text.replace(settings.astralRegExp, 'a'); } -// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/stripHTMLEntities.js +;// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/stripHTMLEntities.js /** * Removes items matched in the regex. * @@ -247,7 +184,7 @@ return text.replace(settings.HTMLEntityRegExp, ''); } -// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/stripConnectors.js +;// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/stripConnectors.js /** * Replaces items matched in the regex with spaces. * @@ -260,7 +197,7 @@ return text.replace(settings.connectorRegExp, ' '); } -// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/stripRemovables.js +;// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/stripRemovables.js /** * Removes items matched in the regex. * @@ -273,7 +210,7 @@ return text.replace(settings.removeRegExp, ''); } -// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/stripHTMLComments.js +;// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/stripHTMLComments.js /** * Removes items matched in the regex. * @@ -286,7 +223,7 @@ return text.replace(settings.HTMLcommentRegExp, ''); } -// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/stripShortcodes.js +;// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/stripShortcodes.js /** * Replaces items matched in the regex with a new line. * @@ -303,7 +240,7 @@ return text; } -// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/stripSpaces.js +;// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/stripSpaces.js /** * Replaces items matched in the regex with spaces. * @@ -316,7 +253,7 @@ return text.replace(settings.spaceRegExp, ' '); } -// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/transposeHTMLEntitiesToCountableChars.js +;// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/transposeHTMLEntitiesToCountableChars.js /** * Replaces items matched in the regex with a single character. * @@ -329,7 +266,7 @@ return text.replace(settings.HTMLEntityRegExp, 'a'); } -// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/index.js +;// CONCATENATED MODULE: ./node_modules/@wordpress/wordcount/build-module/index.js /** * External dependencies */ @@ -371,7 +308,7 @@ function loadSettings(type, userSettings) { var _settings$l10n$shortc, _settings$l10n; - const settings = Object(external_lodash_["extend"])({}, defaultSettings, userSettings); + const settings = (0,external_lodash_namespaceObject.extend)({}, defaultSettings, userSettings); settings.shortcodes = (_settings$l10n$shortc = (_settings$l10n = settings.l10n) === null || _settings$l10n === void 0 ? void 0 : _settings$l10n.shortcodes) !== null && _settings$l10n$shortc !== void 0 ? _settings$l10n$shortc : []; if (settings.shortcodes && settings.shortcodes.length) { @@ -400,7 +337,7 @@ function countWords(text, regex, settings) { var _text$match$length, _text$match; - text = Object(external_lodash_["flow"])(stripTags.bind(null, settings), stripHTMLComments.bind(null, settings), stripShortcodes.bind(null, settings), stripSpaces.bind(null, settings), stripHTMLEntities.bind(null, settings), stripConnectors.bind(null, settings), stripRemovables.bind(null, settings))(text); + text = (0,external_lodash_namespaceObject.flow)(stripTags.bind(null, settings), stripHTMLComments.bind(null, settings), stripShortcodes.bind(null, settings), stripSpaces.bind(null, settings), stripHTMLEntities.bind(null, settings), stripConnectors.bind(null, settings), stripRemovables.bind(null, settings))(text); text = text + '\n'; return (_text$match$length = (_text$match = text.match(regex)) === null || _text$match === void 0 ? void 0 : _text$match.length) !== null && _text$match$length !== void 0 ? _text$match$length : 0; } @@ -418,7 +355,7 @@ function countCharacters(text, regex, settings) { var _text$match$length2, _text$match2; - text = Object(external_lodash_["flow"])(stripTags.bind(null, settings), stripHTMLComments.bind(null, settings), stripShortcodes.bind(null, settings), transposeAstralsToCountableChar.bind(null, settings), stripSpaces.bind(null, settings), transposeHTMLEntitiesToCountableChars.bind(null, settings))(text); + text = (0,external_lodash_namespaceObject.flow)(stripTags.bind(null, settings), stripHTMLComments.bind(null, settings), stripShortcodes.bind(null, settings), transposeAstralsToCountableChar.bind(null, settings), stripSpaces.bind(null, settings), transposeHTMLEntitiesToCountableChars.bind(null, settings))(text); text = text + '\n'; return (_text$match$length2 = (_text$match2 = text.match(regex)) === null || _text$match2 === void 0 ? void 0 : _text$match2.length) !== null && _text$match$length2 !== void 0 ? _text$match$length2 : 0; } @@ -461,7 +398,6 @@ } } - -/***/ }) - -/******/ }); \ No newline at end of file +(window.wp = window.wp || {}).wordcount = __webpack_exports__; +/******/ })() +; \ No newline at end of file