1/******/ (function() { // webpackBootstrap 2/******/ var __webpack_modules__ = ({ 3 4/***/ 4793: 5/***/ (function(module) { 6 7var characterMap = { 8 "Ã": "A", 9 "Ã": "A", 10 "Ã": "A", 11 "Ã": "A", 12 "Ã": "A", 13 "à ": "A", 14 "Ấ": "A", 15 "Ắ": "A", 16 "Ẳ": "A", 17 "Ẵ": "A", 18 "Ặ": "A", 19 "Ã": "AE", 20 "Ầ": "A", 21 "Ằ": "A", 22 "È": "A", 23 "Ã": "C", 24 "á¸": "C", 25 "Ã": "E", 26 "Ã": "E", 27 "Ã": "E", 28 "Ã": "E", 29 "Ế": "E", 30 "á¸": "E", 31 "á»": "E", 32 "á¸": "E", 33 "á¸": "E", 34 "È": "E", 35 "Ã": "I", 36 "Ã": "I", 37 "Ã": "I", 38 "Ã": "I", 39 "Ḯ": "I", 40 "È": "I", 41 "Ã": "D", 42 "Ã": "N", 43 "Ã": "O", 44 "Ã": "O", 45 "Ã": "O", 46 "Ã": "O", 47 "Ã": "O", 48 "Ã": "O", 49 "á»": "O", 50 "á¹": "O", 51 "á¹": "O", 52 "È": "O", 53 "Ã": "U", 54 "Ã": "U", 55 "Ã": "U", 56 "Ã": "U", 57 "Ã": "Y", 58 "à ": "a", 59 "á": "a", 60 "â": "a", 61 "ã": "a", 62 "ä": "a", 63 "Ã¥": "a", 64 "ấ": "a", 65 "ắ": "a", 66 "ẳ": "a", 67 "ẵ": "a", 68 "ặ": "a", 69 "æ": "ae", 70 "ầ": "a", 71 "ằ": "a", 72 "È": "a", 73 "ç": "c", 74 "á¸": "c", 75 "è": "e", 76 "é": "e", 77 "ê": "e", 78 "ë": "e", 79 "ế": "e", 80 "á¸": "e", 81 "á»": "e", 82 "á¸": "e", 83 "á¸": "e", 84 "È": "e", 85 "ì": "i", 86 "Ã": "i", 87 "î": "i", 88 "ï": "i", 89 "ḯ": "i", 90 "È": "i", 91 "ð": "d", 92 "ñ": "n", 93 "ò": "o", 94 "ó": "o", 95 "ô": "o", 96 "õ": "o", 97 "ö": "o", 98 "ø": "o", 99 "á»": "o", 100 "á¹": "o", 101 "á¹": "o", 102 "È": "o", 103 "ù": "u", 104 "ú": "u", 105 "û": "u", 106 "ü": "u", 107 "ý": "y", 108 "ÿ": "y", 109 "Ä": "A", 110 "Ä": "a", 111 "Ä": "A", 112 "Ä": "a", 113 "Ä": "A", 114 "Ä ": "a", 115 "Ä": "C", 116 "Ä": "c", 117 "Ä": "C", 118 "Ä": "c", 119 "Ä": "C", 120 "Ä": "c", 121 "Ä": "C", 122 "Ä": "c", 123 "CÌ": "C", 124 "cÌ": "c", 125 "Ä": "D", 126 "Ä": "d", 127 "Ä": "D", 128 "Ä": "d", 129 "Ä": "E", 130 "Ä": "e", 131 "Ä": "E", 132 "Ä": "e", 133 "Ä": "E", 134 "Ä": "e", 135 "Ä": "E", 136 "Ä": "e", 137 "Ä": "E", 138 "Ä": "e", 139 "Ä": "G", 140 "Ç´": "G", 141 "Ä": "g", 142 "ǵ": "g", 143 "Ä": "G", 144 "Ä": "g", 145 "Ä ": "G", 146 "Ä¡": "g", 147 "Ä¢": "G", 148 "Ä£": "g", 149 "Ĥ": "H", 150 "Ä¥": "h", 151 "Ħ": "H", 152 "ħ": "h", 153 "Ḫ": "H", 154 "ḫ": "h", 155 "Ĩ": "I", 156 "Ä©": "i", 157 "Ī": "I", 158 "Ä«": "i", 159 "Ĭ": "I", 160 "Ä": "i", 161 "Ä®": "I", 162 "į": "i", 163 "İ": "I", 164 "ı": "i", 165 "IJ": "IJ", 166 "ij": "ij", 167 "Ä´": "J", 168 "ĵ": "j", 169 "Ķ": "K", 170 "Ä·": "k", 171 "Ḱ": "K", 172 "ḱ": "k", 173 "KÌ": "K", 174 "kÌ": "k", 175 "Ĺ": "L", 176 "ĺ": "l", 177 "Ä»": "L", 178 "ļ": "l", 179 "Ľ": "L", 180 "ľ": "l", 181 "Ä¿": "L", 182 "Å": "l", 183 "Å": "l", 184 "Å": "l", 185 "Ḿ": "M", 186 "ḿ": "m", 187 "MÌ": "M", 188 "mÌ": "m", 189 "Å": "N", 190 "Å": "n", 191 "Å ": "N", 192 "Å": "n", 193 "Å": "N", 194 "Å": "n", 195 "Å": "n", 196 "NÌ": "N", 197 "nÌ": "n", 198 "Å": "O", 199 "Å": "o", 200 "Å": "O", 201 "Å": "o", 202 "Å": "O", 203 "Å": "o", 204 "Å": "OE", 205 "Å": "oe", 206 "PÌ": "P", 207 "pÌ": "p", 208 "Å": "R", 209 "Å": "r", 210 "Å": "R", 211 "Å": "r", 212 "Å": "R", 213 "Å": "r", 214 "RÌ": "R", 215 "rÌ": "r", 216 "È": "R", 217 "È": "r", 218 "Å": "S", 219 "Å": "s", 220 "Å": "S", 221 "Å": "s", 222 "Å": "S", 223 "È": "S", 224 "È": "s", 225 "Å": "s", 226 "Å ": "S", 227 "Å¡": "s", 228 "Ã": "ss", 229 "Å¢": "T", 230 "Å£": "t", 231 "È": "t", 232 "È": "T", 233 "Ť": "T", 234 "Å¥": "t", 235 "Ŧ": "T", 236 "ŧ": "t", 237 "TÌ": "T", 238 "tÌ": "t", 239 "Ũ": "U", 240 "Å©": "u", 241 "Ū": "U", 242 "Å«": "u", 243 "Ŭ": "U", 244 "Å": "u", 245 "Å®": "U", 246 "ů": "u", 247 "Ű": "U", 248 "ű": "u", 249 "Ų": "U", 250 "ų": "u", 251 "È": "U", 252 "È": "u", 253 "VÌ": "V", 254 "vÌ": "v", 255 "Å´": "W", 256 "ŵ": "w", 257 "áº": "W", 258 "áº": "w", 259 "XÌ": "X", 260 "xÌ": "x", 261 "Ŷ": "Y", 262 "Å·": "y", 263 "Ÿ": "Y", 264 "YÌ": "Y", 265 "yÌ": "y", 266 "Ź": "Z", 267 "ź": "z", 268 "Å»": "Z", 269 "ż": "z", 270 "Ž": "Z", 271 "ž": "z", 272 "Å¿": "s", 273 "Æ": "f", 274 "Æ ": "O", 275 "Æ¡": "o", 276 "Ư": "U", 277 "ư": "u", 278 "Ç": "A", 279 "Ç": "a", 280 "Ç": "I", 281 "Ç": "i", 282 "Ç": "O", 283 "Ç": "o", 284 "Ç": "U", 285 "Ç": "u", 286 "Ç": "U", 287 "Ç": "u", 288 "Ç": "U", 289 "Ç": "u", 290 "Ç": "U", 291 "Ç": "u", 292 "Ç": "U", 293 "Ç": "u", 294 "Ứ": "U", 295 "ứ": "u", 296 "Ṹ": "U", 297 "á¹¹": "u", 298 "Ǻ": "A", 299 "Ç»": "a", 300 "Ǽ": "AE", 301 "ǽ": "ae", 302 "Ǿ": "O", 303 "Ç¿": "o", 304 "Ã": "TH", 305 "þ": "th", 306 "á¹": "P", 307 "á¹": "p", 308 "Ṥ": "S", 309 "á¹¥": "s", 310 "XÌ": "X", 311 "xÌ": "x", 312 "Ð": "Ð", 313 "Ñ": "г", 314 "Ð": "Ð", 315 "Ñ": "к", 316 "AÌ": "A", 317 "aÌ": "a", 318 "EÌ": "E", 319 "eÌ": "e", 320 "IÌ": "I", 321 "iÌ": "i", 322 "Ǹ": "N", 323 "ǹ": "n", 324 "á»": "O", 325 "á»": "o", 326 "á¹": "O", 327 "á¹": "o", 328 "Ừ": "U", 329 "ừ": "u", 330 "áº": "W", 331 "áº": "w", 332 "Ỳ": "Y", 333 "ỳ": "y", 334 "È": "A", 335 "È": "a", 336 "È": "E", 337 "È ": "e", 338 "È": "I", 339 "È": "i", 340 "È": "O", 341 "È": "o", 342 "È": "R", 343 "È": "r", 344 "È": "U", 345 "È": "u", 346 "BÌ": "B", 347 "bÌ": "b", 348 "ÄÌ£": "C", 349 "ÄÌ£": "c", 350 "ÃÌ": "E", 351 "êÌ": "e", 352 "FÌ": "F", 353 "fÌ": "f", 354 "Ǧ": "G", 355 "ǧ": "g", 356 "È": "H", 357 "È": "h", 358 "JÌ": "J", 359 "ǰ": "j", 360 "Ǩ": "K", 361 "Ç©": "k", 362 "MÌ": "M", 363 "mÌ": "m", 364 "PÌ": "P", 365 "pÌ": "p", 366 "QÌ": "Q", 367 "qÌ": "q", 368 "ÅÌ©": "R", 369 "ÅÌ©": "r", 370 "Ṧ": "S", 371 "á¹§": "s", 372 "VÌ": "V", 373 "vÌ": "v", 374 "WÌ": "W", 375 "wÌ": "w", 376 "XÌ": "X", 377 "xÌ": "x", 378 "YÌ": "Y", 379 "yÌ": "y", 380 "A̧": "A", 381 "a̧": "a", 382 "B̧": "B", 383 "b̧": "b", 384 "á¸": "D", 385 "á¸": "d", 386 "Ȩ": "E", 387 "È©": "e", 388 "ÆÌ§": "E", 389 "Ȩ́": "e", 390 "Ḩ": "H", 391 "ḩ": "h", 392 "I̧": "I", 393 "i̧": "i", 394 "ÆÌ§": "I", 395 "ɨ̧": "i", 396 "M̧": "M", 397 "m̧": "m", 398 "O̧": "O", 399 "o̧": "o", 400 "Q̧": "Q", 401 "q̧": "q", 402 "U̧": "U", 403 "u̧": "u", 404 "X̧": "X", 405 "x̧": "x", 406 "Z̧": "Z", 407 "z̧": "z", 408 "й":"и", 409 "Ð":"Ð", 410 "Ñ":"е", 411 "Ð":"Ð", 412}; 413 414var chars = Object.keys(characterMap).join('|'); 415var allAccents = new RegExp(chars, 'g'); 416var firstAccent = new RegExp(chars, ''); 417 418function matcher(match) { 419 return characterMap[match]; 420} 421 422var removeAccents = function(string) { 423 return string.replace(allAccents, matcher); 424}; 425 426var hasAccents = function(string) { 427 return !!string.match(firstAccent); 428}; 429 430module.exports = removeAccents; 431module.exports.has = hasAccents; 432module.exports.remove = removeAccents; 433 434 435/***/ }) 436 437/******/ }); 438/************************************************************************/ 439/******/ // The module cache 440/******/ var __webpack_module_cache__ = {}; 441/******/ 442/******/ // The require function 443/******/ function __webpack_require__(moduleId) { 444/******/ // Check if module is in cache 445/******/ var cachedModule = __webpack_module_cache__[moduleId]; 446/******/ if (cachedModule !== undefined) { 447/******/ return cachedModule.exports; 448/******/ } 449/******/ // Create a new module (and put it into the cache) 450/******/ var module = __webpack_module_cache__[moduleId] = { 451/******/ // no module.id needed 452/******/ // no module.loaded needed 453/******/ exports: {} 454/******/ }; 455/******/ 456/******/ // Execute the module function 457/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 458/******/ 459/******/ // Return the exports of the module 460/******/ return module.exports; 461/******/ } 462/******/ 463/************************************************************************/ 464/******/ /* webpack/runtime/compat get default export */ 465/******/ !function() { 466/******/ // getDefaultExport function for compatibility with non-harmony modules 467/******/ __webpack_require__.n = function(module) {
vendor: 1,686 bytes, lines 468-508
468/******/ var getter = module && module.__esModule ? 469/******/ function() { return module['default']; } : 470/******/ function() { return module; }; 471/******/ __webpack_require__.d(getter, { a: getter }); 472/******/ return getter; 473/******/ }; 474/******/ }(); 475/******/ 476/******/ /* webpack/runtime/define property getters */ 477/******/ !function() { 478/******/ // define getter functions for harmony exports 479/******/ __webpack_require__.d = function(exports, definition) { 480/******/ for(var key in definition) { 481/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 482/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 483/******/ } 484/******/ } 485/******/ }; 486/******/ }(); 487/******/ 488/******/ /* webpack/runtime/hasOwnProperty shorthand */ 489/******/ !function() { 490/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 491/******/ }(); 492/******/ 493/******/ /* webpack/runtime/make namespace object */ 494/******/ !function() { 495/******/ // define __esModule on exports 496/******/ __webpack_require__.r = function(exports) { 497/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 498/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 499/******/ } 500/******/ Object.defineProperty(exports, '__esModule', { value: true }); 501/******/ }; 502/******/ }(); 503/******/ 504/************************************************************************/ 505var __webpack_exports__ = {}; 506// This entry need to be wrapped in an IIFE because it need to be in strict mode. 507!function() { 508"use strict";
509// ESM COMPAT FLAG 510__webpack_require__.r(__webpack_exports__); 511 512// EXPORTS 513__webpack_require__.d(__webpack_exports__, { 514 "addQueryArgs": function() { return /* reexport */ addQueryArgs; }, 515 "buildQueryString": function() { return /* reexport */ buildQueryString; }, 516 "cleanForSlug": function() { return /* reexport */ cleanForSlug; }, 517 "filterURLForDisplay": function() { return /* reexport */ filterURLForDisplay; }, 518 "getAuthority": function() { return /* reexport */ getAuthority; }, 519 "getFilename": function() { return /* reexport */ getFilename; }, 520 "getFragment": function() { return /* reexport */ getFragment; }, 521 "getPath": function() { return /* reexport */ getPath; }, 522 "getPathAndQueryString": function() { return /* reexport */ getPathAndQueryString; }, 523 "getProtocol": function() { return /* reexport */ getProtocol; }, 524 "getQueryArg": function() { return /* reexport */ getQueryArg; }, 525 "getQueryArgs": function() { return /* reexport */ getQueryArgs; }, 526 "getQueryString": function() { return /* reexport */ getQueryString; }, 527 "hasQueryArg": function() { return /* reexport */ hasQueryArg; }, 528 "isEmail": function() { return /* reexport */ isEmail; }, 529 "isURL": function() { return /* reexport */ isURL; }, 530 "isValidAuthority": function() { return /* reexport */ isValidAuthority; }, 531 "isValidFragment": function() { return /* reexport */ isValidFragment; }, 532 "isValidPath": function() { return /* reexport */ isValidPath; }, 533 "isValidProtocol": function() { return /* reexport */ isValidProtocol; }, 534 "isValidQueryString": function() { return /* reexport */ isValidQueryString; }, 535 "normalizePath": function() { return /* reexport */ normalizePath; }, 536 "prependHTTP": function() { return /* reexport */ prependHTTP; }, 537 "prependHTTPS": function() { return /* reexport */ prependHTTPS; }, 538 "removeQueryArgs": function() { return /* reexport */ removeQueryArgs; }, 539 "safeDecodeURI": function() { return /* reexport */ safeDecodeURI; }, 540 "safeDecodeURIComponent": function() { return /* reexport */ safeDecodeURIComponent; } 541}); 542 543;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-url.js 544/** 545 * Determines whether the given string looks like a URL. 546 * 547 * @param {string} url The string to scrutinise. 548 * 549 * @example 550 * ```js 551 * const isURL = isURL( 'https://wordpress.org' ); // true 552 * ``` 553 * 554 * @see https://url.spec.whatwg.org/ 555 * @see https://url.spec.whatwg.org/#valid-url-string 556 * 557 * @return {boolean} Whether or not it looks like a URL. 558 */ 559function isURL(url) { 560 // A URL can be considered value if the `URL` constructor is able to parse 561 // it. The constructor throws an error for an invalid URL. 562 try { 563 new URL(url); 564 return true; 565 } catch { 566 return false; 567 } 568} 569 570;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-email.js 571const EMAIL_REGEXP = /^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i; 572/** 573 * Determines whether the given string looks like an email. 574 * 575 * @param {string} email The string to scrutinise. 576 * 577 * @example 578 * ```js 579 * const isEmail = isEmail( '[email protected]' ); // true 580 * ``` 581 * 582 * @return {boolean} Whether or not it looks like an email. 583 */ 584 585function isEmail(email) { 586 return EMAIL_REGEXP.test(email); 587} 588 589;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-protocol.js 590/** 591 * Returns the protocol part of the URL. 592 * 593 * @param {string} url The full URL. 594 * 595 * @example 596 * ```js 597 * const protocol1 = getProtocol( 'tel:012345678' ); // 'tel:' 598 * const protocol2 = getProtocol( 'https://wordpress.org' ); // 'https:' 599 * ``` 600 * 601 * @return {string|void} The protocol part of the URL. 602 */ 603function getProtocol(url) { 604 const matches = /^([^\s:]+:)/.exec(url); 605 606 if (matches) { 607 return matches[1]; 608 } 609} 610 611;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-protocol.js 612/** 613 * Tests if a url protocol is valid. 614 * 615 * @param {string} protocol The url protocol. 616 * 617 * @example 618 * ```js 619 * const isValid = isValidProtocol( 'https:' ); // true 620 * const isNotValid = isValidProtocol( 'https :' ); // false 621 * ``` 622 * 623 * @return {boolean} True if the argument is a valid protocol (e.g. http:, tel:). 624 */ 625function isValidProtocol(protocol) { 626 if (!protocol) { 627 return false;
628 } 629 630 return /^[a-z\-.\+]+[0-9]*:$/i.test(protocol); 631} 632 633;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-authority.js 634/** 635 * Returns the authority part of the URL. 636 * 637 * @param {string} url The full URL. 638 * 639 * @example 640 * ```js 641 * const authority1 = getAuthority( 'https://wordpress.org/help/' ); // 'wordpress.org' 642 * const authority2 = getAuthority( 'https://localhost:8080/test/' ); // 'localhost:8080' 643 * ``` 644 * 645 * @return {string|void} The authority part of the URL. 646 */ 647function getAuthority(url) { 648 const matches = /^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(url); 649 650 if (matches) { 651 return matches[1]; 652 } 653} 654 655;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-authority.js 656/** 657 * Checks for invalid characters within the provided authority. 658 * 659 * @param {string} authority A string containing the URL authority. 660 * 661 * @example 662 * ```js 663 * const isValid = isValidAuthority( 'wordpress.org' ); // true 664 * const isNotValid = isValidAuthority( 'wordpress#org' ); // false 665 * ``` 666 * 667 * @return {boolean} True if the argument contains a valid authority. 668 */ 669function isValidAuthority(authority) { 670 if (!authority) { 671 return false; 672 } 673 674 return /^[^\s#?]+$/.test(authority); 675} 676 677;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-path.js 678/** 679 * Returns the path part of the URL. 680 * 681 * @param {string} url The full URL. 682 * 683 * @example 684 * ```js 685 * const path1 = getPath( 'http://localhost:8080/this/is/a/test?query=true' ); // 'this/is/a/test' 686 * const path2 = getPath( 'https://wordpress.org/help/faq/' ); // 'help/faq' 687 * ``` 688 * 689 * @return {string|void} The path part of the URL. 690 */ 691function getPath(url) { 692 const matches = /^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(url); 693 694 if (matches) { 695 return matches[1]; 696 } 697} 698 699;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-path.js 700/** 701 * Checks for invalid characters within the provided path. 702 * 703 * @param {string} path The URL path. 704 * 705 * @example 706 * ```js 707 * const isValid = isValidPath( 'test/path/' ); // true 708 * const isNotValid = isValidPath( '/invalid?test/path/' ); // false 709 * ``` 710 * 711 * @return {boolean} True if the argument contains a valid path 712 */ 713function isValidPath(path) { 714 if (!path) { 715 return false; 716 } 717 718 return /^[^\s#?]+$/.test(path); 719} 720 721;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-query-string.js 722/** 723 * Returns the query string part of the URL. 724 * 725 * @param {string} url The full URL. 726 * 727 * @example 728 * ```js 729 * const queryString = getQueryString( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // 'query=true' 730 * ``` 731 * 732 * @return {string|void} The query string part of the URL. 733 */ 734function getQueryString(url) { 735 let query; 736 737 try { 738 query = new URL(url, 'http://example.com').search.substring(1); 739 } catch (error) {} 740 741 if (query) { 742 return query; 743 } 744} 745 746;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/build-query-string.js 747/** 748 * Generates URL-encoded query string using input query data. 749 * 750 * It is intended to behave equivalent as PHP's `http_build_query`, configured 751 * with encoding type PHP_QUERY_RFC3986 (spaces as `%20`). 752 * 753 * @example 754 * ```js 755 * const queryString = buildQueryString( { 756 * simple: 'is ok', 757 * arrays: [ 'are', 'fine', 'too' ], 758 * objects: { 759 * evenNested: { 760 * ok: 'yes', 761 * }, 762 * }, 763 * } ); 764 * // "simple=is%20ok&arrays%5B0%5D=are&arrays%5B1%5D=fine&arrays%5B2%5D=too&objects%5BevenNested%5D%5Bok%5D=yes" 765 * ``` 766 * 767 * @param {Record<string,*>} data Data to encode. 768 * 769 * @return {string} Query string. 770 */ 771function buildQueryString(data) { 772 let string = ''; 773 const stack = Object.entries(data); 774 let pair; 775 776 while (pair = stack.shift()) { 777 let [key, value] = pair; // Support building deeply nested data, from array or object values. 778 779 const hasNestedData = Array.isArray(value) || value && value.constructor === Object; 780 781 if (hasNestedData) { 782 // Push array or object values onto the stack as composed of their 783 // original key and nested index or key, retaining order by a
784 // combination of Array#reverse and Array#unshift onto the stack. 785 const valuePairs = Object.entries(value).reverse(); 786 787 for (const [member, memberValue] of valuePairs) { 788 stack.unshift([`${key}[${member}]`, memberValue]); 789 } 790 } else if (value !== undefined) { 791 // Null is treated as special case, equivalent to empty string. 792 if (value === null) { 793 value = ''; 794 } 795 796 string += '&' + [key, value].map(encodeURIComponent).join('='); 797 } 798 } // Loop will concatenate with leading `&`, but it's only expected for all 799 // but the first query parameter. This strips the leading `&`, while still 800 // accounting for the case that the string may in-fact be empty. 801 802 803 return string.substr(1); 804} 805 806;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-query-string.js 807/** 808 * Checks for invalid characters within the provided query string. 809 * 810 * @param {string} queryString The query string. 811 * 812 * @example 813 * ```js 814 * const isValid = isValidQueryString( 'query=true&another=false' ); // true 815 * const isNotValid = isValidQueryString( 'query=true?another=false' ); // false 816 * ``` 817 * 818 * @return {boolean} True if the argument contains a valid query string. 819 */ 820function isValidQueryString(queryString) { 821 if (!queryString) { 822 return false; 823 } 824 825 return /^[^\s#?\/]+$/.test(queryString); 826} 827 828;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-path-and-query-string.js 829/** 830 * Internal dependencies 831 */ 832 833/** 834 * Returns the path part and query string part of the URL. 835 * 836 * @param {string} url The full URL. 837 * 838 * @example 839 * ```js 840 * const pathAndQueryString1 = getPathAndQueryString( 'http://localhost:8080/this/is/a/test?query=true' ); // '/this/is/a/test?query=true' 841 * const pathAndQueryString2 = getPathAndQueryString( 'https://wordpress.org/help/faq/' ); // '/help/faq' 842 * ``` 843 * 844 * @return {string} The path part and query string part of the URL. 845 */ 846 847function getPathAndQueryString(url) { 848 const path = getPath(url); 849 const queryString = getQueryString(url); 850 let value = '/'; 851 if (path) value += path; 852 if (queryString) value += `?${queryString}`; 853 return value; 854} 855 856;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-fragment.js 857/** 858 * Returns the fragment part of the URL. 859 * 860 * @param {string} url The full URL 861 * 862 * @example 863 * ```js 864 * const fragment1 = getFragment( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // '#fragment' 865 * const fragment2 = getFragment( 'https://wordpress.org#another-fragment?query=true' ); // '#another-fragment' 866 * ``` 867 * 868 * @return {string|void} The fragment part of the URL. 869 */ 870function getFragment(url) { 871 const matches = /^\S+?(#[^\s\?]*)/.exec(url); 872 873 if (matches) { 874 return matches[1]; 875 } 876} 877 878;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-fragment.js 879/** 880 * Checks for invalid characters within the provided fragment. 881 * 882 * @param {string} fragment The url fragment. 883 * 884 * @example 885 * ```js 886 * const isValid = isValidFragment( '#valid-fragment' ); // true 887 * const isNotValid = isValidFragment( '#invalid-#fragment' ); // false 888 * ``` 889 * 890 * @return {boolean} True if the argument contains a valid fragment. 891 */ 892function isValidFragment(fragment) { 893 if (!fragment) { 894 return false; 895 } 896 897 return /^#[^\s#?\/]*$/.test(fragment); 898} 899 900;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/safe-decode-uri-component.js 901/** 902 * Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if 903 * `decodeURIComponent` throws an error. 904 * 905 * @param {string} uriComponent URI component to decode. 906 * 907 * @return {string} Decoded URI component if possible. 908 */ 909function safeDecodeURIComponent(uriComponent) { 910 try { 911 return decodeURIComponent(uriComponent); 912 } catch (uriComponentError) { 913 return uriComponent; 914 } 915} 916 917;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-query-args.js 918/** 919 * Internal dependencies 920 */ 921 922 923/** @typedef {import('./get-query-arg').QueryArgParsed} QueryArgParsed */ 924 925/** 926 * @typedef {Record<string,QueryArgParsed>} QueryArgs 927 */ 928
929/** 930 * Sets a value in object deeply by a given array of path segments. Mutates the 931 * object reference. 932 * 933 * @param {Record<string,*>} object Object in which to assign. 934 * @param {string[]} path Path segment at which to set value. 935 * @param {*} value Value to set. 936 */ 937 938function setPath(object, path, value) { 939 const length = path.length; 940 const lastIndex = length - 1; 941 942 for (let i = 0; i < length; i++) { 943 let key = path[i]; 944 945 if (!key && Array.isArray(object)) { 946 // If key is empty string and next value is array, derive key from 947 // the current length of the array. 948 key = object.length.toString(); 949 } 950 951 key = ['__proto__', 'constructor', 'prototype'].includes(key) ? key.toUpperCase() : key; // If the next key in the path is numeric (or empty string), it will be 952 // created as an array. Otherwise, it will be created as an object. 953 954 const isNextKeyArrayIndex = !isNaN(Number(path[i + 1])); 955 object[key] = i === lastIndex ? // If at end of path, assign the intended value. 956 value : // Otherwise, advance to the next object in the path, creating 957 // it if it does not yet exist. 958 object[key] || (isNextKeyArrayIndex ? [] : {}); 959 960 if (Array.isArray(object[key]) && !isNextKeyArrayIndex) { 961 // If we current key is non-numeric, but the next value is an 962 // array, coerce the value to an object. 963 object[key] = { ...object[key] 964 }; 965 } // Update working reference object to the next in the path. 966 967 968 object = object[key]; 969 } 970} 971/** 972 * Returns an object of query arguments of the given URL. If the given URL is 973 * invalid or has no querystring, an empty object is returned. 974 * 975 * @param {string} url URL. 976 * 977 * @example 978 * ```js 979 * const foo = getQueryArgs( 'https://wordpress.org?foo=bar&bar=baz' ); 980 * // { "foo": "bar", "bar": "baz" } 981 * ``` 982 * 983 * @return {QueryArgs} Query args object. 984 */ 985 986 987function getQueryArgs(url) { 988 return (getQueryString(url) || '' // Normalize space encoding, accounting for PHP URL encoding 989 // corresponding to `application/x-www-form-urlencoded`. 990 // 991 // See: https://tools.ietf.org/html/rfc1866#section-8.2.1 992 ).replace(/\+/g, '%20').split('&').reduce((accumulator, keyValue) => { 993 const [key, value = ''] = keyValue.split('=') // Filtering avoids decoding as `undefined` for value, where 994 // default is restored in destructuring assignment. 995 .filter(Boolean).map(safeDecodeURIComponent); 996 997 if (key) { 998 const segments = key.replace(/\]/g, '').split('['); 999 setPath(accumulator, segments, value); 1000 } 1001 1002 return accumulator; 1003 }, Object.create(null)); 1004} 1005 1006;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/add-query-args.js 1007/** 1008 * Internal dependencies 1009 */ 1010 1011 1012/** 1013 * Appends arguments as querystring to the provided URL. If the URL already 1014 * includes query arguments, the arguments are merged with (and take precedent 1015 * over) the existing set. 1016 * 1017 * @param {string} [url=''] URL to which arguments should be appended. If omitted, 1018 * only the resulting querystring is returned. 1019 * @param {Object} [args] Query arguments to apply to URL. 1020 * 1021 * @example 1022 * ```js 1023 * const newURL = addQueryArgs( 'https://google.com', { q: 'test' } ); // https://google.com/?q=test 1024 * ``` 1025 * 1026 * @return {string} URL with arguments applied. 1027 */ 1028 1029function addQueryArgs(url = '', args) { 1030 // If no arguments are to be appended, return original URL. 1031 if (!args || !Object.keys(args).length) { 1032 return url; 1033 } 1034 1035 let baseUrl = url; // Determine whether URL already had query arguments. 1036 1037 const queryStringIndex = url.indexOf('?'); 1038 1039 if (queryStringIndex !== -1) { 1040 // Merge into existing query arguments. 1041 args = Object.assign(getQueryArgs(url), args); // Change working base URL to omit previous query arguments. 1042 1043 baseUrl = baseUrl.substr(0, queryStringIndex); 1044 } 1045 1046 return baseUrl + '?' + buildQueryString(args); 1047} 1048 1049;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-query-arg.js 1050/** 1051 * Internal dependencies 1052 */ 1053 1054/** 1055 * @typedef {{[key: string]: QueryArgParsed}} QueryArgObject 1056 */ 1057 1058/** 1059 * @typedef {string|string[]|QueryArgObject} QueryArgParsed 1060 */ 1061 1062/** 1063 * Returns a single query argument of the url 1064 * 1065 * @param {string} url URL. 1066 * @param {string} arg Query arg name. 1067 * 1068 * @example 1069 * ```js 1070 * const foo = getQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'foo' ); // bar 1071 * ``` 1072 * 1073 * @return {QueryArgParsed|void} Query arg value. 1074 */ 1075 1076function getQueryArg(url, arg) { 1077 return getQueryArgs(url)[arg]; 1078} 1079 1080;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/has-query-arg.js 1081/** 1082 * Internal dependencies 1083 */ 1084
1085/** 1086 * Determines whether the URL contains a given query arg. 1087 * 1088 * @param {string} url URL. 1089 * @param {string} arg Query arg name. 1090 * 1091 * @example 1092 * ```js 1093 * const hasBar = hasQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'bar' ); // true 1094 * ``` 1095 * 1096 * @return {boolean} Whether or not the URL contains the query arg. 1097 */ 1098 1099function hasQueryArg(url, arg) { 1100 return getQueryArg(url, arg) !== undefined; 1101} 1102 1103;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/remove-query-args.js 1104/** 1105 * Internal dependencies 1106 */ 1107 1108 1109/** 1110 * Removes arguments from the query string of the url 1111 * 1112 * @param {string} url URL. 1113 * @param {...string} args Query Args. 1114 * 1115 * @example 1116 * ```js 1117 * const newUrl = removeQueryArgs( 'https://wordpress.org?foo=bar&bar=baz&baz=foobar', 'foo', 'bar' ); // https://wordpress.org?baz=foobar 1118 * ``` 1119 * 1120 * @return {string} Updated URL. 1121 */ 1122 1123function removeQueryArgs(url, ...args) { 1124 const queryStringIndex = url.indexOf('?'); 1125 1126 if (queryStringIndex === -1) { 1127 return url; 1128 } 1129 1130 const query = getQueryArgs(url); 1131 const baseURL = url.substr(0, queryStringIndex); 1132 args.forEach(arg => delete query[arg]); 1133 const queryString = buildQueryString(query); 1134 return queryString ? baseURL + '?' + queryString : baseURL; 1135} 1136 1137;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/prepend-http.js 1138/** 1139 * Internal dependencies 1140 */ 1141 1142const USABLE_HREF_REGEXP = /^(?:[a-z]+:|#|\?|\.|\/)/i; 1143/** 1144 * Prepends "http://" to a url, if it looks like something that is meant to be a TLD. 1145 * 1146 * @param {string} url The URL to test. 1147 * 1148 * @example 1149 * ```js 1150 * const actualURL = prependHTTP( 'wordpress.org' ); // http://wordpress.org 1151 * ``` 1152 * 1153 * @return {string} The updated URL. 1154 */ 1155 1156function prependHTTP(url) { 1157 if (!url) { 1158 return url; 1159 } 1160 1161 url = url.trim(); 1162 1163 if (!USABLE_HREF_REGEXP.test(url) && !isEmail(url)) { 1164 return 'http://' + url; 1165 } 1166 1167 return url; 1168} 1169 1170;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/safe-decode-uri.js 1171/** 1172 * Safely decodes a URI with `decodeURI`. Returns the URI unmodified if 1173 * `decodeURI` throws an error. 1174 * 1175 * @param {string} uri URI to decode. 1176 * 1177 * @example 1178 * ```js 1179 * const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z' 1180 * ``` 1181 * 1182 * @return {string} Decoded URI if possible. 1183 */ 1184function safeDecodeURI(uri) { 1185 try { 1186 return decodeURI(uri); 1187 } catch (uriError) { 1188 return uri; 1189 } 1190} 1191 1192;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/filter-url-for-display.js 1193/** 1194 * Returns a URL for display. 1195 * 1196 * @param {string} url Original URL. 1197 * @param {number|null} maxLength URL length. 1198 * 1199 * @example 1200 * ```js 1201 * const displayUrl = filterURLForDisplay( 'https://www.wordpress.org/gutenberg/' ); // wordpress.org/gutenberg 1202 * const imageUrl = filterURLForDisplay( 'https://www.wordpress.org/wp-content/uploads/img.png', 20 ); // â¦ent/uploads/img.png 1203 * ``` 1204 * 1205 * @return {string} Displayed URL. 1206 */ 1207function filterURLForDisplay(url, maxLength = null) { 1208 // Remove protocol and www prefixes. 1209 let filteredURL = url.replace(/^(?:https?:)\/\/(?:www\.)?/, ''); // Ends with / and only has that single slash, strip it. 1210 1211 if (filteredURL.match(/^[^\/]+\/$/)) { 1212 filteredURL = filteredURL.replace('/', ''); 1213 } 1214 1215 const mediaRegexp = /([\w|:])*\.(?:jpg|jpeg|gif|png|svg)/; 1216 1217 if (!maxLength || filteredURL.length <= maxLength || !filteredURL.match(mediaRegexp)) { 1218 return filteredURL; 1219 } // If the file is not greater than max length, return last portion of URL. 1220 1221 1222 filteredURL = filteredURL.split('?')[0]; 1223 const urlPieces = filteredURL.split('/'); 1224 const file = urlPieces[urlPieces.length - 1]; 1225 1226 if (file.length <= maxLength) { 1227 return 'â¦' + filteredURL.slice(-maxLength); 1228 } // If the file is greater than max length, truncate the file. 1229 1230 1231 const index = file.lastIndexOf('.'); 1232 const [fileName, extension] = [file.slice(0, index), file.slice(index + 1)]; 1233 const truncatedFile = fileName.slice(-3) + '.' + extension; 1234 return file.slice(0, maxLength - truncatedFile.length - 1) + 'â¦' + truncatedFile; 1235} 1236 1237// EXTERNAL MODULE: ./node_modules/remove-accents/index.js 1238var remove_accents = __webpack_require__(4793); 1239var remove_accents_default = /*#__PURE__*/__webpack_require__.n(remove_accents); 1240;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/clean-for-slug.js 1241/** 1242 * External dependencies 1243 */ 1244
1245/** 1246 * Performs some basic cleanup of a string for use as a post slug. 1247 * 1248 * This replicates some of what `sanitize_title()` does in WordPress core, but 1249 * is only designed to approximate what the slug will be. 1250 * 1251 * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin 1252 * letters. Removes combining diacritical marks. Converts whitespace, periods, 1253 * and forward slashes to hyphens. Removes any remaining non-word characters 1254 * except hyphens. Converts remaining string to lowercase. It does not account 1255 * for octets, HTML entities, or other encoded characters. 1256 * 1257 * @param {string} string Title or slug to be processed. 1258 * 1259 * @return {string} Processed string. 1260 */ 1261 1262function cleanForSlug(string) { 1263 if (!string) { 1264 return ''; 1265 } 1266 1267 return remove_accents_default()(string) // Convert each group of whitespace, periods, and forward slashes to a hyphen. 1268 .replace(/[\s\./]+/g, '-') // Remove anything that's not a letter, number, underscore or hyphen. 1269 .replace(/[^\p{L}\p{N}_-]+/gu, '') // Convert to lowercase 1270 .toLowerCase() // Replace multiple hyphens with a single one. 1271 .replace(/-+/g, '-') // Remove any remaining leading or trailing hyphens. 1272 .replace(/(^-+)|(-+$)/g, ''); 1273} 1274 1275;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-filename.js 1276/** 1277 * Returns the filename part of the URL. 1278 * 1279 * @param {string} url The full URL. 1280 * 1281 * @example 1282 * ```js 1283 * const filename1 = getFilename( 'http://localhost:8080/this/is/a/test.jpg' ); // 'test.jpg' 1284 * const filename2 = getFilename( '/this/is/a/test.png' ); // 'test.png' 1285 * ``` 1286 * 1287 * @return {string|void} The filename part of the URL. 1288 */ 1289function getFilename(url) { 1290 let filename; 1291 1292 try { 1293 filename = new URL(url, 'http://example.com').pathname.split('/').pop(); 1294 } catch (error) {} 1295 1296 if (filename) { 1297 return filename; 1298 } 1299} 1300 1301;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/normalize-path.js 1302/** 1303 * Given a path, returns a normalized path where equal query parameter values 1304 * will be treated as identical, regardless of order they appear in the original 1305 * text. 1306 * 1307 * @param {string} path Original path. 1308 * 1309 * @return {string} Normalized path. 1310 */ 1311function normalizePath(path) { 1312 const splitted = path.split('?'); 1313 const query = splitted[1]; 1314 const base = splitted[0]; 1315 1316 if (!query) { 1317 return base; 1318 } // 'b=1%2C2&c=2&a=5' 1319 1320 1321 return base + '?' + query // [ 'b=1%2C2', 'c=2', 'a=5' ] 1322 .split('&') // [ [ 'b, '1%2C2' ], [ 'c', '2' ], [ 'a', '5' ] ] 1323 .map(entry => entry.split('=')) // [ [ 'b', '1,2' ], [ 'c', '2' ], [ 'a', '5' ] ] 1324 .map(pair => pair.map(decodeURIComponent)) // [ [ 'a', '5' ], [ 'b, '1,2' ], [ 'c', '2' ] ] 1325 .sort((a, b) => a[0].localeCompare(b[0])) // [ [ 'a', '5' ], [ 'b, '1%2C2' ], [ 'c', '2' ] ] 1326 .map(pair => pair.map(encodeURIComponent)) // [ 'a=5', 'b=1%2C2', 'c=2' ] 1327 .map(pair => pair.join('=')) // 'a=5&b=1%2C2&c=2' 1328 .join('&'); 1329} 1330 1331;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/prepend-https.js 1332/** 1333 * Internal dependencies 1334 */ 1335 1336/** 1337 * Prepends "https://" to a url, if it looks like something that is meant to be a TLD. 1338 * 1339 * Note: this will not replace "http://" with "https://". 1340 * 1341 * @param {string} url The URL to test. 1342 * 1343 * @example 1344 * ```js 1345 * const actualURL = prependHTTPS( 'wordpress.org' ); // https://wordpress.org 1346 * ``` 1347 * 1348 * @return {string} The updated URL. 1349 */ 1350 1351function prependHTTPS(url) { 1352 if (!url) { 1353 return url; 1354 } // If url starts with http://, return it as is. 1355 1356 1357 if (url.startsWith('http://')) { 1358 return url; 1359 } 1360 1361 url = prependHTTP(url); 1362 return url.replace(/^http:/, 'https:'); 1363} 1364 1365;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/index.js 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394}(); 1395(window.wp = window.wp || {}).url = __webpack_exports__; 1396/******/ })() 1397;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.