[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-includes/js/dist/ -> compose.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["compose"] =
   2  /******/ (function(modules) { // webpackBootstrap
   3  /******/     // The module cache
   4  /******/     var installedModules = {};
   5  /******/
   6  /******/     // The require function
   7  /******/ 	function __webpack_require__(moduleId) {
   8  /******/
   9  /******/         // Check if module is in cache
  10  /******/         if(installedModules[moduleId]) {
  11  /******/             return installedModules[moduleId].exports;
  12  /******/         }
  13  /******/         // Create a new module (and put it into the cache)
  14  /******/         var module = installedModules[moduleId] = {
  15  /******/             i: moduleId,
  16  /******/             l: false,
  17  /******/             exports: {}
  18  /******/         };
  19  /******/
  20  /******/         // Execute the module function
  21  /******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22  /******/
  23  /******/         // Flag the module as loaded
  24  /******/         module.l = true;
  25  /******/
  26  /******/         // Return the exports of the module
  27  /******/         return module.exports;
  28  /******/     }
  29  /******/
  30  /******/
  31  /******/     // expose the modules object (__webpack_modules__)
  32  /******/     __webpack_require__.m = modules;
  33  /******/
  34  /******/     // expose the module cache
  35  /******/     __webpack_require__.c = installedModules;
  36  /******/
  37  /******/     // define getter function for harmony exports
  38  /******/     __webpack_require__.d = function(exports, name, getter) {
  39  /******/         if(!__webpack_require__.o(exports, name)) {
  40  /******/             Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41  /******/         }
  42  /******/     };
  43  /******/
  44  /******/     // define __esModule on exports
  45  /******/     __webpack_require__.r = function(exports) {
  46  /******/         if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47  /******/             Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48  /******/         }
  49  /******/         Object.defineProperty(exports, '__esModule', { value: true });
  50  /******/     };
  51  /******/
  52  /******/     // create a fake namespace object
  53  /******/     // mode & 1: value is a module id, require it
  54  /******/     // mode & 2: merge all properties of value into the ns
  55  /******/     // mode & 4: return value when already ns object
  56  /******/     // mode & 8|1: behave like require
  57  /******/     __webpack_require__.t = function(value, mode) {
  58  /******/         if(mode & 1) value = __webpack_require__(value);
  59  /******/         if(mode & 8) return value;
  60  /******/         if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61  /******/         var ns = Object.create(null);
  62  /******/         __webpack_require__.r(ns);
  63  /******/         Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64  /******/         if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65  /******/         return ns;
  66  /******/     };
  67  /******/
  68  /******/     // getDefaultExport function for compatibility with non-harmony modules
  69  /******/     __webpack_require__.n = function(module) {
  70  /******/         var getter = module && module.__esModule ?
  71  /******/ 			function getDefault() { return module['default']; } :
  72  /******/ 			function getModuleExports() { return module; };
  73  /******/         __webpack_require__.d(getter, 'a', getter);
  74  /******/         return getter;
  75  /******/     };
  76  /******/
  77  /******/     // Object.prototype.hasOwnProperty.call
  78  /******/     __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79  /******/
  80  /******/     // __webpack_public_path__
  81  /******/     __webpack_require__.p = "";
  82  /******/
  83  /******/
  84  /******/     // Load entry module and return exports
  85  /******/     return __webpack_require__(__webpack_require__.s = 354);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = this["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 11:
  98  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  99  
 100  "use strict";
 101  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
 102  function _defineProperties(target, props) {
 103    for (var i = 0; i < props.length; i++) {
 104      var descriptor = props[i];
 105      descriptor.enumerable = descriptor.enumerable || false;
 106      descriptor.configurable = true;
 107      if ("value" in descriptor) descriptor.writable = true;
 108      Object.defineProperty(target, descriptor.key, descriptor);
 109    }
 110  }
 111  
 112  function _createClass(Constructor, protoProps, staticProps) {
 113    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 114    if (staticProps) _defineProperties(Constructor, staticProps);
 115    return Constructor;
 116  }
 117  
 118  /***/ }),
 119  
 120  /***/ 110:
 121  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 122  
 123  "use strict";
 124  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useMediaQuery; });
 125  /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);
 126  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
 127  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
 128  
 129  
 130  /**
 131   * WordPress dependencies
 132   */
 133  
 134  /**
 135   * Runs a media query and returns its value when it changes.
 136   *
 137   * @param {string} query Media Query.
 138   * @return {boolean} return value of the media query.
 139   */
 140  
 141  function useMediaQuery(query) {
 142    var _useState = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useState"])(false),
 143        _useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_useState, 2),
 144        match = _useState2[0],
 145        setMatch = _useState2[1];
 146  
 147    Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useEffect"])(function () {
 148      var updateMatch = function updateMatch() {
 149        return setMatch(window.matchMedia(query).matches);
 150      };
 151  
 152      updateMatch();
 153      var list = window.matchMedia(query);
 154      list.addListener(updateMatch);
 155      return function () {
 156        list.removeListener(updateMatch);
 157      };
 158    }, [query]);
 159    return match;
 160  }
 161  
 162  
 163  /***/ }),
 164  
 165  /***/ 12:
 166  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 167  
 168  "use strict";
 169  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
 170  function _classCallCheck(instance, Constructor) {
 171    if (!(instance instanceof Constructor)) {
 172      throw new TypeError("Cannot call a class as a function");
 173    }
 174  }
 175  
 176  /***/ }),
 177  
 178  /***/ 13:
 179  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 180  
 181  "use strict";
 182  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
 183  /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31);
 184  /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
 185  
 186  
 187  function _possibleConstructorReturn(self, call) {
 188    if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
 189      return call;
 190    }
 191  
 192    return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
 193  }
 194  
 195  /***/ }),
 196  
 197  /***/ 14:
 198  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 199  
 200  "use strict";
 201  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 202  function _getPrototypeOf(o) {
 203    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 204      return o.__proto__ || Object.getPrototypeOf(o);
 205    };
 206    return _getPrototypeOf(o);
 207  }
 208  
 209  /***/ }),
 210  
 211  /***/ 15:
 212  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 213  
 214  "use strict";
 215  
 216  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
 217  function _setPrototypeOf(o, p) {
 218    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
 219      o.__proto__ = p;
 220      return o;
 221    };
 222  
 223    return _setPrototypeOf(o, p);
 224  }
 225  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
 226  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inherits; });
 227  
 228  function _inherits(subClass, superClass) {
 229    if (typeof superClass !== "function" && superClass !== null) {
 230      throw new TypeError("Super expression must either be null or a function");
 231    }
 232  
 233    subClass.prototype = Object.create(superClass && superClass.prototype, {
 234      constructor: {
 235        value: subClass,
 236        writable: true,
 237        configurable: true
 238      }
 239    });
 240    if (superClass) _setPrototypeOf(subClass, superClass);
 241  }
 242  
 243  /***/ }),
 244  
 245  /***/ 18:
 246  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 247  
 248  "use strict";
 249  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
 250  function _extends() {
 251    _extends = Object.assign || function (target) {
 252      for (var i = 1; i < arguments.length; i++) {
 253        var source = arguments[i];
 254  
 255        for (var key in source) {
 256          if (Object.prototype.hasOwnProperty.call(source, key)) {
 257            target[key] = source[key];
 258          }
 259        }
 260      }
 261  
 262      return target;
 263    };
 264  
 265    return _extends.apply(this, arguments);
 266  }
 267  
 268  /***/ }),
 269  
 270  /***/ 2:
 271  /***/ (function(module, exports) {
 272  
 273  (function() { module.exports = this["lodash"]; }());
 274  
 275  /***/ }),
 276  
 277  /***/ 210:
 278  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 279  
 280  "use strict";
 281  /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var _use_media_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(110);
 282  /**
 283   * Internal dependencies
 284   */
 285  
 286  /**
 287   * Whether or not the user agent is Internet Explorer.
 288   *
 289   * @type {boolean}
 290   */
 291  
 292  var IS_IE = typeof window !== 'undefined' && window.navigator.userAgent.indexOf('Trident') >= 0;
 293  /**
 294   * Hook returning whether the user has a preference for reduced motion.
 295   *
 296   * @return {boolean} Reduced motion preference value.
 297   */
 298  
 299  var useReducedMotion = process.env.FORCE_REDUCED_MOTION || IS_IE ? function () {
 300    return true;
 301  } : function () {
 302    return Object(_use_media_query__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])('(prefers-reduced-motion: reduce)');
 303  };
 304  /* harmony default export */ __webpack_exports__["a"] = (useReducedMotion);
 305  
 306  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(316)))
 307  
 308  /***/ }),
 309  
 310  /***/ 23:
 311  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 312  
 313  "use strict";
 314  
 315  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 316  var arrayWithHoles = __webpack_require__(38);
 317  
 318  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 319  function _iterableToArrayLimit(arr, i) {
 320    var _arr = [];
 321    var _n = true;
 322    var _d = false;
 323    var _e = undefined;
 324  
 325    try {
 326      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 327        _arr.push(_s.value);
 328  
 329        if (i && _arr.length === i) break;
 330      }
 331    } catch (err) {
 332      _d = true;
 333      _e = err;
 334    } finally {
 335      try {
 336        if (!_n && _i["return"] != null) _i["return"]();
 337      } finally {
 338        if (_d) throw _e;
 339      }
 340    }
 341  
 342    return _arr;
 343  }
 344  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 345  var nonIterableRest = __webpack_require__(39);
 346  
 347  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 348  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _slicedToArray; });
 349  
 350  
 351  
 352  function _slicedToArray(arr, i) {
 353    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(nonIterableRest["a" /* default */])();
 354  }
 355  
 356  /***/ }),
 357  
 358  /***/ 31:
 359  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 360  
 361  "use strict";
 362  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
 363  function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
 364  
 365  function _typeof(obj) {
 366    if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
 367      _typeof = function _typeof(obj) {
 368        return _typeof2(obj);
 369      };
 370    } else {
 371      _typeof = function _typeof(obj) {
 372        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
 373      };
 374    }
 375  
 376    return _typeof(obj);
 377  }
 378  
 379  /***/ }),
 380  
 381  /***/ 316:
 382  /***/ (function(module, exports) {
 383  
 384  // shim for using process in browser
 385  var process = module.exports = {};
 386  
 387  // cached from whatever global is present so that test runners that stub it
 388  // don't break things.  But we need to wrap it in a try catch in case it is
 389  // wrapped in strict mode code which doesn't define any globals.  It's inside a
 390  // function because try/catches deoptimize in certain engines.
 391  
 392  var cachedSetTimeout;
 393  var cachedClearTimeout;
 394  
 395  function defaultSetTimout() {
 396      throw new Error('setTimeout has not been defined');
 397  }
 398  function defaultClearTimeout () {
 399      throw new Error('clearTimeout has not been defined');
 400  }
 401  (function () {
 402      try {
 403          if (typeof setTimeout === 'function') {
 404              cachedSetTimeout = setTimeout;
 405          } else {
 406              cachedSetTimeout = defaultSetTimout;
 407          }
 408      } catch (e) {
 409          cachedSetTimeout = defaultSetTimout;
 410      }
 411      try {
 412          if (typeof clearTimeout === 'function') {
 413              cachedClearTimeout = clearTimeout;
 414          } else {
 415              cachedClearTimeout = defaultClearTimeout;
 416          }
 417      } catch (e) {
 418          cachedClearTimeout = defaultClearTimeout;
 419      }
 420  } ())
 421  function runTimeout(fun) {
 422      if (cachedSetTimeout === setTimeout) {
 423          //normal enviroments in sane situations
 424          return setTimeout(fun, 0);
 425      }
 426      // if setTimeout wasn't available but was latter defined
 427      if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
 428          cachedSetTimeout = setTimeout;
 429          return setTimeout(fun, 0);
 430      }
 431      try {
 432          // when when somebody has screwed with setTimeout but no I.E. maddness
 433          return cachedSetTimeout(fun, 0);
 434      } catch(e){
 435          try {
 436              // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
 437              return cachedSetTimeout.call(null, fun, 0);
 438          } catch(e){
 439              // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
 440              return cachedSetTimeout.call(this, fun, 0);
 441          }
 442      }
 443  
 444  
 445  }
 446  function runClearTimeout(marker) {
 447      if (cachedClearTimeout === clearTimeout) {
 448          //normal enviroments in sane situations
 449          return clearTimeout(marker);
 450      }
 451      // if clearTimeout wasn't available but was latter defined
 452      if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
 453          cachedClearTimeout = clearTimeout;
 454          return clearTimeout(marker);
 455      }
 456      try {
 457          // when when somebody has screwed with setTimeout but no I.E. maddness
 458          return cachedClearTimeout(marker);
 459      } catch (e){
 460          try {
 461              // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
 462              return cachedClearTimeout.call(null, marker);
 463          } catch (e){
 464              // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
 465              // Some versions of I.E. have different rules for clearTimeout vs setTimeout
 466              return cachedClearTimeout.call(this, marker);
 467          }
 468      }
 469  
 470  
 471  
 472  }
 473  var queue = [];
 474  var draining = false;
 475  var currentQueue;
 476  var queueIndex = -1;
 477  
 478  function cleanUpNextTick() {
 479      if (!draining || !currentQueue) {
 480          return;
 481      }
 482      draining = false;
 483      if (currentQueue.length) {
 484          queue = currentQueue.concat(queue);
 485      } else {
 486          queueIndex = -1;
 487      }
 488      if (queue.length) {
 489          drainQueue();
 490      }
 491  }
 492  
 493  function drainQueue() {
 494      if (draining) {
 495          return;
 496      }
 497      var timeout = runTimeout(cleanUpNextTick);
 498      draining = true;
 499  
 500      var len = queue.length;
 501      while(len) {
 502          currentQueue = queue;
 503          queue = [];
 504          while (++queueIndex < len) {
 505              if (currentQueue) {
 506                  currentQueue[queueIndex].run();
 507              }
 508          }
 509          queueIndex = -1;
 510          len = queue.length;
 511      }
 512      currentQueue = null;
 513      draining = false;
 514      runClearTimeout(timeout);
 515  }
 516  
 517  process.nextTick = function (fun) {
 518      var args = new Array(arguments.length - 1);
 519      if (arguments.length > 1) {
 520          for (var i = 1; i < arguments.length; i++) {
 521              args[i - 1] = arguments[i];
 522          }
 523      }
 524      queue.push(new Item(fun, args));
 525      if (queue.length === 1 && !draining) {
 526          runTimeout(drainQueue);
 527      }
 528  };
 529  
 530  // v8 likes predictible objects
 531  function Item(fun, array) {
 532      this.fun = fun;
 533      this.array = array;
 534  }
 535  Item.prototype.run = function () {
 536      this.fun.apply(null, this.array);
 537  };
 538  process.title = 'browser';
 539  process.browser = true;
 540  process.env = {};
 541  process.argv = [];
 542  process.version = ''; // empty string to avoid regexp issues
 543  process.versions = {};
 544  
 545  function noop() {}
 546  
 547  process.on = noop;
 548  process.addListener = noop;
 549  process.once = noop;
 550  process.off = noop;
 551  process.removeListener = noop;
 552  process.removeAllListeners = noop;
 553  process.emit = noop;
 554  process.prependListener = noop;
 555  process.prependOnceListener = noop;
 556  
 557  process.listeners = function (name) { return [] }
 558  
 559  process.binding = function (name) {
 560      throw new Error('process.binding is not supported');
 561  };
 562  
 563  process.cwd = function () { return '/' };
 564  process.chdir = function (dir) {
 565      throw new Error('process.chdir is not supported');
 566  };
 567  process.umask = function() { return 0; };
 568  
 569  
 570  /***/ }),
 571  
 572  /***/ 354:
 573  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 574  
 575  "use strict";
 576  __webpack_require__.r(__webpack_exports__);
 577  
 578  // EXTERNAL MODULE: external "lodash"
 579  var external_lodash_ = __webpack_require__(2);
 580  
 581  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/utils/create-higher-order-component/index.js
 582  /**
 583   * External dependencies
 584   */
 585  
 586  /**
 587   * Given a function mapping a component to an enhanced component and modifier
 588   * name, returns the enhanced component augmented with a generated displayName.
 589   *
 590   * @param {Function} mapComponentToEnhancedComponent Function mapping component
 591   *                                                   to enhanced component.
 592   * @param {string}   modifierName                    Seed name from which to
 593   *                                                   generated display name.
 594   *
 595   * @return {WPComponent} Component class with generated display name assigned.
 596   */
 597  
 598  function createHigherOrderComponent(mapComponentToEnhancedComponent, modifierName) {
 599    return function (OriginalComponent) {
 600      var EnhancedComponent = mapComponentToEnhancedComponent(OriginalComponent);
 601      var _OriginalComponent$di = OriginalComponent.displayName,
 602          displayName = _OriginalComponent$di === void 0 ? OriginalComponent.name || 'Component' : _OriginalComponent$di;
 603      EnhancedComponent.displayName = "".concat(Object(external_lodash_["upperFirst"])(Object(external_lodash_["camelCase"])(modifierName)), "(").concat(displayName, ")");
 604      return EnhancedComponent;
 605    };
 606  }
 607  
 608  /* harmony default export */ var create_higher_order_component = (createHigherOrderComponent);
 609  
 610  // EXTERNAL MODULE: external {"this":["wp","element"]}
 611  var external_this_wp_element_ = __webpack_require__(0);
 612  
 613  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/if-condition/index.js
 614  
 615  
 616  /**
 617   * Internal dependencies
 618   */
 619  
 620  /**
 621   * Higher-order component creator, creating a new component which renders if
 622   * the given condition is satisfied or with the given optional prop name.
 623   *
 624   * @param {Function} predicate Function to test condition.
 625   *
 626   * @return {Function} Higher-order component.
 627   */
 628  
 629  var if_condition_ifCondition = function ifCondition(predicate) {
 630    return create_higher_order_component(function (WrappedComponent) {
 631      return function (props) {
 632        if (!predicate(props)) {
 633          return null;
 634        }
 635  
 636        return Object(external_this_wp_element_["createElement"])(WrappedComponent, props);
 637      };
 638    }, 'ifCondition');
 639  };
 640  
 641  /* harmony default export */ var if_condition = (if_condition_ifCondition);
 642  
 643  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
 644  var classCallCheck = __webpack_require__(12);
 645  
 646  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
 647  var createClass = __webpack_require__(11);
 648  
 649  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
 650  var possibleConstructorReturn = __webpack_require__(13);
 651  
 652  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
 653  var getPrototypeOf = __webpack_require__(14);
 654  
 655  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
 656  var inherits = __webpack_require__(15);
 657  
 658  // EXTERNAL MODULE: external {"this":["wp","isShallowEqual"]}
 659  var external_this_wp_isShallowEqual_ = __webpack_require__(41);
 660  var external_this_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_isShallowEqual_);
 661  
 662  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/pure/index.js
 663  
 664  
 665  
 666  
 667  
 668  
 669  
 670  /**
 671   * WordPress dependencies
 672   */
 673  
 674  
 675  /**
 676   * Internal dependencies
 677   */
 678  
 679  
 680  /**
 681   * Given a component returns the enhanced component augmented with a component
 682   * only rerendering when its props/state change
 683   *
 684   * @param {Function} mapComponentToEnhancedComponent Function mapping component
 685   *                                                   to enhanced component.
 686   * @param {string}   modifierName                    Seed name from which to
 687   *                                                   generated display name.
 688   *
 689   * @return {WPComponent} Component class with generated display name assigned.
 690   */
 691  
 692  var pure = create_higher_order_component(function (Wrapped) {
 693    if (Wrapped.prototype instanceof external_this_wp_element_["Component"]) {
 694      return (
 695        /*#__PURE__*/
 696        function (_Wrapped) {
 697          Object(inherits["a" /* default */])(_class, _Wrapped);
 698  
 699          function _class() {
 700            Object(classCallCheck["a" /* default */])(this, _class);
 701  
 702            return Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(_class).apply(this, arguments));
 703          }
 704  
 705          Object(createClass["a" /* default */])(_class, [{
 706            key: "shouldComponentUpdate",
 707            value: function shouldComponentUpdate(nextProps, nextState) {
 708              return !external_this_wp_isShallowEqual_default()(nextProps, this.props) || !external_this_wp_isShallowEqual_default()(nextState, this.state);
 709            }
 710          }]);
 711  
 712          return _class;
 713        }(Wrapped)
 714      );
 715    }
 716  
 717    return (
 718      /*#__PURE__*/
 719      function (_Component) {
 720        Object(inherits["a" /* default */])(_class2, _Component);
 721  
 722        function _class2() {
 723          Object(classCallCheck["a" /* default */])(this, _class2);
 724  
 725          return Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(_class2).apply(this, arguments));
 726        }
 727  
 728        Object(createClass["a" /* default */])(_class2, [{
 729          key: "shouldComponentUpdate",
 730          value: function shouldComponentUpdate(nextProps) {
 731            return !external_this_wp_isShallowEqual_default()(nextProps, this.props);
 732          }
 733        }, {
 734          key: "render",
 735          value: function render() {
 736            return Object(external_this_wp_element_["createElement"])(Wrapped, this.props);
 737          }
 738        }]);
 739  
 740        return _class2;
 741      }(external_this_wp_element_["Component"])
 742    );
 743  }, 'pure');
 744  /* harmony default export */ var higher_order_pure = (pure);
 745  
 746  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
 747  var esm_extends = __webpack_require__(18);
 748  
 749  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
 750  var assertThisInitialized = __webpack_require__(5);
 751  
 752  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-global-events/listener.js
 753  
 754  
 755  
 756  /**
 757   * External dependencies
 758   */
 759  
 760  /**
 761   * Class responsible for orchestrating event handling on the global window,
 762   * binding a single event to be shared across all handling instances, and
 763   * removing the handler when no instances are listening for the event.
 764   */
 765  
 766  var listener_Listener =
 767  /*#__PURE__*/
 768  function () {
 769    function Listener() {
 770      Object(classCallCheck["a" /* default */])(this, Listener);
 771  
 772      this.listeners = {};
 773      this.handleEvent = this.handleEvent.bind(this);
 774    }
 775  
 776    Object(createClass["a" /* default */])(Listener, [{
 777      key: "add",
 778      value: function add(eventType, instance) {
 779        if (!this.listeners[eventType]) {
 780          // Adding first listener for this type, so bind event.
 781          window.addEventListener(eventType, this.handleEvent);
 782          this.listeners[eventType] = [];
 783        }
 784  
 785        this.listeners[eventType].push(instance);
 786      }
 787    }, {
 788      key: "remove",
 789      value: function remove(eventType, instance) {
 790        this.listeners[eventType] = Object(external_lodash_["without"])(this.listeners[eventType], instance);
 791  
 792        if (!this.listeners[eventType].length) {
 793          // Removing last listener for this type, so unbind event.
 794          window.removeEventListener(eventType, this.handleEvent);
 795          delete this.listeners[eventType];
 796        }
 797      }
 798    }, {
 799      key: "handleEvent",
 800      value: function handleEvent(event) {
 801        Object(external_lodash_["forEach"])(this.listeners[event.type], function (instance) {
 802          instance.handleEvent(event);
 803        });
 804      }
 805    }]);
 806  
 807    return Listener;
 808  }();
 809  
 810  /* harmony default export */ var listener = (listener_Listener);
 811  
 812  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-global-events/index.js
 813  
 814  
 815  
 816  
 817  
 818  
 819  
 820  
 821  
 822  /**
 823   * External dependencies
 824   */
 825  
 826  /**
 827   * WordPress dependencies
 828   */
 829  
 830  
 831  /**
 832   * Internal dependencies
 833   */
 834  
 835  
 836  
 837  /**
 838   * Listener instance responsible for managing document event handling.
 839   *
 840   * @type {Listener}
 841   */
 842  
 843  var with_global_events_listener = new listener();
 844  /**
 845   * Higher-order component creator which, given an object of DOM event types and
 846   * values corresponding to a callback function name on the component, will
 847   * create or update a window event handler to invoke the callback when an event
 848   * occurs. On behalf of the consuming developer, the higher-order component
 849   * manages unbinding when the component unmounts, and binding at most a single
 850   * event handler for the entire application.
 851   *
 852   * @param {Object<string,string>} eventTypesToHandlers Object with keys of DOM
 853   *                                                     event type, the value a
 854   *                                                     name of the function on
 855   *                                                     the original component's
 856   *                                                     instance which handles
 857   *                                                     the event.
 858   *
 859   * @return {Function} Higher-order component.
 860   */
 861  
 862  function withGlobalEvents(eventTypesToHandlers) {
 863    return create_higher_order_component(function (WrappedComponent) {
 864      var Wrapper =
 865      /*#__PURE__*/
 866      function (_Component) {
 867        Object(inherits["a" /* default */])(Wrapper, _Component);
 868  
 869        function Wrapper() {
 870          var _this;
 871  
 872          Object(classCallCheck["a" /* default */])(this, Wrapper);
 873  
 874          _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(Wrapper).apply(this, arguments));
 875          _this.handleEvent = _this.handleEvent.bind(Object(assertThisInitialized["a" /* default */])(_this));
 876          _this.handleRef = _this.handleRef.bind(Object(assertThisInitialized["a" /* default */])(_this));
 877          return _this;
 878        }
 879  
 880        Object(createClass["a" /* default */])(Wrapper, [{
 881          key: "componentDidMount",
 882          value: function componentDidMount() {
 883            var _this2 = this;
 884  
 885            Object(external_lodash_["forEach"])(eventTypesToHandlers, function (handler, eventType) {
 886              with_global_events_listener.add(eventType, _this2);
 887            });
 888          }
 889        }, {
 890          key: "componentWillUnmount",
 891          value: function componentWillUnmount() {
 892            var _this3 = this;
 893  
 894            Object(external_lodash_["forEach"])(eventTypesToHandlers, function (handler, eventType) {
 895              with_global_events_listener.remove(eventType, _this3);
 896            });
 897          }
 898        }, {
 899          key: "handleEvent",
 900          value: function handleEvent(event) {
 901            var handler = eventTypesToHandlers[event.type];
 902  
 903            if (typeof this.wrappedRef[handler] === 'function') {
 904              this.wrappedRef[handler](event);
 905            }
 906          }
 907        }, {
 908          key: "handleRef",
 909          value: function handleRef(el) {
 910            this.wrappedRef = el; // Any component using `withGlobalEvents` that is not setting a `ref`
 911            // will cause `this.props.forwardedRef` to be `null`, so we need this
 912            // check.
 913  
 914            if (this.props.forwardedRef) {
 915              this.props.forwardedRef(el);
 916            }
 917          }
 918        }, {
 919          key: "render",
 920          value: function render() {
 921            return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, this.props.ownProps, {
 922              ref: this.handleRef
 923            }));
 924          }
 925        }]);
 926  
 927        return Wrapper;
 928      }(external_this_wp_element_["Component"]);
 929  
 930      return Object(external_this_wp_element_["forwardRef"])(function (props, ref) {
 931        return Object(external_this_wp_element_["createElement"])(Wrapper, {
 932          ownProps: props,
 933          forwardedRef: ref
 934        });
 935      });
 936    }, 'withGlobalEvents');
 937  }
 938  
 939  /* harmony default export */ var with_global_events = (withGlobalEvents);
 940  
 941  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-instance-id/index.js
 942  
 943  
 944  
 945  
 946  
 947  
 948  
 949  
 950  /**
 951   * WordPress dependencies
 952   */
 953  
 954  /**
 955   * Internal dependencies
 956   */
 957  
 958  
 959  /**
 960   * A Higher Order Component used to be provide a unique instance ID by
 961   * component.
 962   *
 963   * @param {WPElement} WrappedComponent The wrapped component.
 964   *
 965   * @return {Component} Component with an instanceId prop.
 966   */
 967  
 968  /* harmony default export */ var with_instance_id = (create_higher_order_component(function (WrappedComponent) {
 969    var instances = 0;
 970    return (
 971      /*#__PURE__*/
 972      function (_Component) {
 973        Object(inherits["a" /* default */])(_class, _Component);
 974  
 975        function _class() {
 976          var _this;
 977  
 978          Object(classCallCheck["a" /* default */])(this, _class);
 979  
 980          _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(_class).apply(this, arguments));
 981          _this.instanceId = instances++;
 982          return _this;
 983        }
 984  
 985        Object(createClass["a" /* default */])(_class, [{
 986          key: "render",
 987          value: function render() {
 988            return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, this.props, {
 989              instanceId: this.instanceId
 990            }));
 991          }
 992        }]);
 993  
 994        return _class;
 995      }(external_this_wp_element_["Component"])
 996    );
 997  }, 'withInstanceId'));
 998  
 999  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-safe-timeout/index.js
1000  
1001  
1002  
1003  
1004  
1005  
1006  
1007  
1008  
1009  /**
1010   * External dependencies
1011   */
1012  
1013  /**
1014   * WordPress dependencies
1015   */
1016  
1017  
1018  /**
1019   * Internal dependencies
1020   */
1021  
1022  
1023  /**
1024   * A higher-order component used to provide and manage delayed function calls
1025   * that ought to be bound to a component's lifecycle.
1026   *
1027   * @param {Component} OriginalComponent Component requiring setTimeout
1028   *
1029   * @return {Component}                  Wrapped component.
1030   */
1031  
1032  var withSafeTimeout = create_higher_order_component(function (OriginalComponent) {
1033    return (
1034      /*#__PURE__*/
1035      function (_Component) {
1036        Object(inherits["a" /* default */])(WrappedComponent, _Component);
1037  
1038        function WrappedComponent() {
1039          var _this;
1040  
1041          Object(classCallCheck["a" /* default */])(this, WrappedComponent);
1042  
1043          _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(WrappedComponent).apply(this, arguments));
1044          _this.timeouts = [];
1045          _this.setTimeout = _this.setTimeout.bind(Object(assertThisInitialized["a" /* default */])(_this));
1046          _this.clearTimeout = _this.clearTimeout.bind(Object(assertThisInitialized["a" /* default */])(_this));
1047          return _this;
1048        }
1049  
1050        Object(createClass["a" /* default */])(WrappedComponent, [{
1051          key: "componentWillUnmount",
1052          value: function componentWillUnmount() {
1053            this.timeouts.forEach(clearTimeout);
1054          }
1055        }, {
1056          key: "setTimeout",
1057          value: function (_setTimeout) {
1058            function setTimeout(_x, _x2) {
1059              return _setTimeout.apply(this, arguments);
1060            }
1061  
1062            setTimeout.toString = function () {
1063              return _setTimeout.toString();
1064            };
1065  
1066            return setTimeout;
1067          }(function (fn, delay) {
1068            var _this2 = this;
1069  
1070            var id = setTimeout(function () {
1071              fn();
1072  
1073              _this2.clearTimeout(id);
1074            }, delay);
1075            this.timeouts.push(id);
1076            return id;
1077          })
1078        }, {
1079          key: "clearTimeout",
1080          value: function (_clearTimeout) {
1081            function clearTimeout(_x3) {
1082              return _clearTimeout.apply(this, arguments);
1083            }
1084  
1085            clearTimeout.toString = function () {
1086              return _clearTimeout.toString();
1087            };
1088  
1089            return clearTimeout;
1090          }(function (id) {
1091            clearTimeout(id);
1092            this.timeouts = Object(external_lodash_["without"])(this.timeouts, id);
1093          })
1094        }, {
1095          key: "render",
1096          value: function render() {
1097            return Object(external_this_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, this.props, {
1098              setTimeout: this.setTimeout,
1099              clearTimeout: this.clearTimeout
1100            }));
1101          }
1102        }]);
1103  
1104        return WrappedComponent;
1105      }(external_this_wp_element_["Component"])
1106    );
1107  }, 'withSafeTimeout');
1108  /* harmony default export */ var with_safe_timeout = (withSafeTimeout);
1109  
1110  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-state/index.js
1111  
1112  
1113  
1114  
1115  
1116  
1117  
1118  
1119  
1120  /**
1121   * WordPress dependencies
1122   */
1123  
1124  /**
1125   * Internal dependencies
1126   */
1127  
1128  
1129  /**
1130   * A Higher Order Component used to provide and manage internal component state
1131   * via props.
1132   *
1133   * @param {?Object} initialState Optional initial state of the component.
1134   *
1135   * @return {Component} Wrapped component.
1136   */
1137  
1138  function withState() {
1139    var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1140    return create_higher_order_component(function (OriginalComponent) {
1141      return (
1142        /*#__PURE__*/
1143        function (_Component) {
1144          Object(inherits["a" /* default */])(WrappedComponent, _Component);
1145  
1146          function WrappedComponent() {
1147            var _this;
1148  
1149            Object(classCallCheck["a" /* default */])(this, WrappedComponent);
1150  
1151            _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(WrappedComponent).apply(this, arguments));
1152            _this.setState = _this.setState.bind(Object(assertThisInitialized["a" /* default */])(_this));
1153            _this.state = initialState;
1154            return _this;
1155          }
1156  
1157          Object(createClass["a" /* default */])(WrappedComponent, [{
1158            key: "render",
1159            value: function render() {
1160              return Object(external_this_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, this.props, this.state, {
1161                setState: this.setState
1162              }));
1163            }
1164          }]);
1165  
1166          return WrappedComponent;
1167        }(external_this_wp_element_["Component"])
1168      );
1169    }, 'withState');
1170  }
1171  
1172  // EXTERNAL MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-media-query/index.js
1173  var use_media_query = __webpack_require__(110);
1174  
1175  // EXTERNAL MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-reduced-motion/index.js
1176  var use_reduced_motion = __webpack_require__(210);
1177  
1178  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/index.js
1179  /* concated harmony reexport createHigherOrderComponent */__webpack_require__.d(__webpack_exports__, "createHigherOrderComponent", function() { return create_higher_order_component; });
1180  /* concated harmony reexport compose */__webpack_require__.d(__webpack_exports__, "compose", function() { return external_lodash_["flowRight"]; });
1181  /* concated harmony reexport ifCondition */__webpack_require__.d(__webpack_exports__, "ifCondition", function() { return if_condition; });
1182  /* concated harmony reexport pure */__webpack_require__.d(__webpack_exports__, "pure", function() { return higher_order_pure; });
1183  /* concated harmony reexport withGlobalEvents */__webpack_require__.d(__webpack_exports__, "withGlobalEvents", function() { return with_global_events; });
1184  /* concated harmony reexport withInstanceId */__webpack_require__.d(__webpack_exports__, "withInstanceId", function() { return with_instance_id; });
1185  /* concated harmony reexport withSafeTimeout */__webpack_require__.d(__webpack_exports__, "withSafeTimeout", function() { return with_safe_timeout; });
1186  /* concated harmony reexport withState */__webpack_require__.d(__webpack_exports__, "withState", function() { return withState; });
1187  /* concated harmony reexport useMediaQuery */__webpack_require__.d(__webpack_exports__, "useMediaQuery", function() { return use_media_query["a" /* default */]; });
1188  /* concated harmony reexport useReducedMotion */__webpack_require__.d(__webpack_exports__, "useReducedMotion", function() { return use_reduced_motion["a" /* default */]; });
1189  /**
1190   * External dependencies
1191   */
1192   // Utils
1193  
1194  
1195  /**
1196   * Composes multiple higher-order components into a single higher-order component. Performs right-to-left function
1197   * composition, where each successive invocation is supplied the return value of the previous.
1198   *
1199   * @param {...Function} hocs The HOC functions to invoke.
1200   *
1201   * @return {Function} Returns the new composite function.
1202   */
1203  
1204   // Higher-order components
1205  
1206  
1207  
1208  
1209  
1210  
1211   // Hooks
1212  
1213  
1214  
1215  
1216  
1217  /***/ }),
1218  
1219  /***/ 38:
1220  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1221  
1222  "use strict";
1223  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
1224  function _arrayWithHoles(arr) {
1225    if (Array.isArray(arr)) return arr;
1226  }
1227  
1228  /***/ }),
1229  
1230  /***/ 39:
1231  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1232  
1233  "use strict";
1234  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
1235  function _nonIterableRest() {
1236    throw new TypeError("Invalid attempt to destructure non-iterable instance");
1237  }
1238  
1239  /***/ }),
1240  
1241  /***/ 41:
1242  /***/ (function(module, exports) {
1243  
1244  (function() { module.exports = this["wp"]["isShallowEqual"]; }());
1245  
1246  /***/ }),
1247  
1248  /***/ 5:
1249  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1250  
1251  "use strict";
1252  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
1253  function _assertThisInitialized(self) {
1254    if (self === void 0) {
1255      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1256    }
1257  
1258    return self;
1259  }
1260  
1261  /***/ })
1262  
1263  /******/ });


Generated: Sat Nov 23 20:47:33 2019 Cross-referenced by PHPXref 0.7