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