WooCommerce Admin - Version 1.3.3

Version Description

2021-09-21 =

  • Fix unsecured reports
Download this release

Release Info

Developer joshuaflow
Plugin Icon 128x128 WooCommerce Admin
Version 1.3.3
Comparing to
See all releases

Code changes from version 2.2.6 to 1.3.3

Files changed (1) hide show
  1. dist/app/index.js +11437 -14001
dist/app/index.js CHANGED
@@ -35,7 +35,7 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
35
  /******/
36
  /******/ // object to store loaded CSS chunks
37
  /******/ var installedCssChunks = {
38
- /******/ 21: 0
39
  /******/ }
40
  /******/ var isCssRtlEnabled = function() {
41
  /******/ return document.dir === 'rtl';
@@ -45,25 +45,16 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
45
  /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
46
  /******/ // Promise = chunk loading, 0 = chunk loaded
47
  /******/ var installedChunks = {
48
- /******/ 21: 0
49
  /******/ };
50
  /******/
51
  /******/
52
  /******/
53
  /******/ // script path function
54
- /******/ function webpackJsonpScriptSrc(chunkId) {
55
- /******/ return __webpack_require__.p + "chunks/" + ({"7":"activity-panels-help","8":"activity-panels-inbox","9":"analytics-report","10":"analytics-report-categories","11":"analytics-report-coupons","12":"analytics-report-customers","13":"analytics-report-downloads","14":"analytics-report-orders","15":"analytics-report-products","16":"analytics-report-revenue","17":"analytics-report-stock","18":"analytics-report-taxes","19":"analytics-report-variations","20":"analytics-settings","27":"customizable-dashboard","28":"dashboard","29":"dashboard-charts","32":"homescreen","34":"leaderboards","36":"marketing-overview","46":"profile-wizard","47":"store-alerts","48":"store-performance","49":"task-list","51":"wcpay-usage-modal"}[chunkId]||chunkId) + ".js"
56
- /******/ }
57
- /******/
58
  /******/ function jsonpScriptSrc(chunkId) {
59
- /******/ var src = webpackJsonpScriptSrc(chunkId);
60
- /******/ if ( window.wcAdminAssets && window.wcAdminAssets.version ) {
61
- /******/ src += '?ver=' + window.wcAdminAssets.version;
62
- /******/ }
63
- /******/ return src;
64
  /******/ }
65
  /******/
66
- /******/
67
  /******/ // The require function
68
  /******/ function __webpack_require__(moduleId) {
69
  /******/
@@ -95,7 +86,7 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
95
  /******/
96
  /******/
97
  /******/ // mini-css-extract-plugin CSS loading
98
- /******/ var cssChunks = {"0":1,"4":1,"7":1,"9":1,"10":1,"14":1,"15":1,"20":1,"28":1,"29":1,"32":1,"34":1,"36":1,"46":1,"47":1,"48":1,"49":1};
99
  /******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
100
  /******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
101
  /******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
@@ -128,9 +119,6 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
128
  /******/ reject(err);
129
  /******/ };
130
  /******/ linkTag.href = fullhref;
131
- /******/ if ( window.wcAdminAssets && window.wcAdminAssets.version ) {
132
- /******/ linkTag.href += '?ver=' + window.wcAdminAssets.version;
133
- /******/ }
134
  /******/
135
  /******/ var head = document.getElementsByTagName("head")[0];
136
  /******/ head.appendChild(linkTag);
@@ -250,7 +238,7 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
250
  /******/ // on error function for async loading
251
  /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
252
  /******/
253
- /******/ var jsonpArray = window["__wcAdmin_webpackJsonp"] = window["__wcAdmin_webpackJsonp"] || [];
254
  /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
255
  /******/ jsonpArray.push = webpackJsonpCallback;
256
  /******/ jsonpArray = jsonpArray.slice();
@@ -259,17 +247,19 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
259
  /******/
260
  /******/
261
  /******/ // Load entry module and return exports
262
- /******/ return __webpack_require__(__webpack_require__.s = 418);
263
  /******/ })
264
  /************************************************************************/
265
- /******/ ([
266
- /* 0 */
 
267
  /***/ (function(module, exports) {
268
 
269
- (function() { module.exports = window["wp"]["element"]; }());
270
 
271
  /***/ }),
272
- /* 1 */
 
273
  /***/ (function(module, exports, __webpack_require__) {
274
 
275
  /**
@@ -282,1871 +272,1471 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
282
  if (false) { var throwOnDirectAccess, ReactIs; } else {
283
  // By explicitly using `prop-types` you are opting into new production behavior.
284
  // http://fb.me/prop-types-in-prod
285
- module.exports = __webpack_require__(215)();
286
  }
287
 
288
 
289
  /***/ }),
290
- /* 2 */
291
- /***/ (function(module, exports) {
292
 
293
- (function() { module.exports = window["wp"]["i18n"]; }());
 
294
 
295
- /***/ }),
296
- /* 3 */
297
- /***/ (function(module, exports, __webpack_require__) {
298
 
299
- /* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {
300
- return it && it.Math == Math && it;
301
- };
302
 
303
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
304
- module.exports =
305
- /* global globalThis -- safe */
306
- check(typeof globalThis == 'object' && globalThis) ||
307
- check(typeof window == 'object' && window) ||
308
- check(typeof self == 'object' && self) ||
309
- check(typeof global == 'object' && global) ||
310
- // eslint-disable-next-line no-new-func -- fallback
311
- (function () { return this; })() || Function('return this')();
312
 
313
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(96)))
 
 
314
 
315
- /***/ }),
316
- /* 4 */
317
- /***/ (function(module, exports) {
 
318
 
319
- (function() { module.exports = window["wp"]["components"]; }());
 
 
 
 
 
 
 
 
320
 
321
  /***/ }),
322
- /* 5 */
323
- /***/ (function(module, exports) {
324
-
325
- (function() { module.exports = window["lodash"]; }());
326
 
327
- /***/ }),
328
- /* 6 */
329
- /***/ (function(module, exports) {
330
 
331
- module.exports = function (exec) {
332
- try {
333
- return !!exec();
334
- } catch (error) {
335
- return true;
336
- }
337
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
 
339
 
340
- /***/ }),
341
- /* 7 */
342
- /***/ (function(module, exports) {
343
 
344
- function _defineProperty(obj, key, value) {
345
- if (key in obj) {
346
- Object.defineProperty(obj, key, {
347
- value: value,
348
- enumerable: true,
349
- configurable: true,
350
- writable: true
351
- });
352
- } else {
353
- obj[key] = value;
354
- }
355
 
356
- return obj;
357
- }
358
 
359
- module.exports = _defineProperty;
360
 
361
- /***/ }),
362
- /* 8 */
363
- /***/ (function(module, exports, __webpack_require__) {
364
 
365
- var global = __webpack_require__(3);
366
- var shared = __webpack_require__(58);
367
- var has = __webpack_require__(11);
368
- var uid = __webpack_require__(55);
369
- var NATIVE_SYMBOL = __webpack_require__(62);
370
- var USE_SYMBOL_AS_UID = __webpack_require__(93);
371
-
372
- var WellKnownSymbolsStore = shared('wks');
373
- var Symbol = global.Symbol;
374
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
375
-
376
- module.exports = function (name) {
377
- if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
378
- if (NATIVE_SYMBOL && has(Symbol, name)) {
379
- WellKnownSymbolsStore[name] = Symbol[name];
380
- } else {
381
- WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
382
- }
383
- } return WellKnownSymbolsStore[name];
384
- };
385
 
386
 
387
- /***/ }),
388
- /* 9 */
389
- /***/ (function(module, exports, __webpack_require__) {
390
 
391
- var isObject = __webpack_require__(10);
392
 
393
- module.exports = function (it) {
394
- if (!isObject(it)) {
395
- throw TypeError(String(it) + ' is not an object');
396
- } return it;
397
- };
 
 
398
 
 
 
 
399
 
400
- /***/ }),
401
- /* 10 */
402
- /***/ (function(module, exports) {
403
 
404
- module.exports = function (it) {
405
- return typeof it === 'object' ? it !== null : typeof it === 'function';
406
- };
407
 
408
 
409
- /***/ }),
410
- /* 11 */
411
- /***/ (function(module, exports) {
412
 
413
- var hasOwnProperty = {}.hasOwnProperty;
 
 
 
 
 
 
 
 
 
414
 
415
- module.exports = function (it, key) {
416
- return hasOwnProperty.call(it, key);
417
- };
 
 
 
 
 
 
 
418
 
 
 
419
 
420
- /***/ }),
421
- /* 12 */
422
- /***/ (function(module, exports, __webpack_require__) {
423
 
424
- var global = __webpack_require__(3);
425
- var getOwnPropertyDescriptor = __webpack_require__(33).f;
426
- var createNonEnumerableProperty = __webpack_require__(19);
427
- var redefine = __webpack_require__(27);
428
- var setGlobal = __webpack_require__(46);
429
- var copyConstructorProperties = __webpack_require__(103);
430
- var isForced = __webpack_require__(74);
431
 
432
- /*
433
- options.target - name of the target object
434
- options.global - target is the global object
435
- options.stat - export as static methods of target
436
- options.proto - export as prototype methods of target
437
- options.real - real prototype method for the `pure` version
438
- options.forced - export even if the native feature is available
439
- options.bind - bind methods to the target, required for the `pure` version
440
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
441
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
442
- options.sham - add a flag to not completely full polyfills
443
- options.enumerable - export as enumerable property
444
- options.noTargetGet - prevent calling a getter on target
445
- */
446
- module.exports = function (options, source) {
447
- var TARGET = options.target;
448
- var GLOBAL = options.global;
449
- var STATIC = options.stat;
450
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
451
- if (GLOBAL) {
452
- target = global;
453
- } else if (STATIC) {
454
- target = global[TARGET] || setGlobal(TARGET, {});
455
- } else {
456
- target = (global[TARGET] || {}).prototype;
457
- }
458
- if (target) for (key in source) {
459
- sourceProperty = source[key];
460
- if (options.noTargetGet) {
461
- descriptor = getOwnPropertyDescriptor(target, key);
462
- targetProperty = descriptor && descriptor.value;
463
- } else targetProperty = target[key];
464
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
465
- // contained in target
466
- if (!FORCED && targetProperty !== undefined) {
467
- if (typeof sourceProperty === typeof targetProperty) continue;
468
- copyConstructorProperties(sourceProperty, targetProperty);
469
- }
470
- // add a flag to not completely full polyfills
471
- if (options.sham || (targetProperty && targetProperty.sham)) {
472
- createNonEnumerableProperty(sourceProperty, 'sham', true);
473
- }
474
- // extend global
475
- redefine(target, key, sourceProperty, options);
476
- }
477
- };
478
 
 
 
479
 
480
- /***/ }),
481
- /* 13 */
482
- /***/ (function(module, exports, __webpack_require__) {
483
 
484
- var fails = __webpack_require__(6);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
485
 
486
- // Detect IE8's incomplete defineProperty implementation
487
- module.exports = !fails(function () {
488
- return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
489
- });
 
 
 
 
 
 
 
 
 
 
 
 
490
 
 
 
 
491
 
492
- /***/ }),
493
- /* 14 */
494
- /***/ (function(module, exports) {
 
 
495
 
496
- function _getPrototypeOf(o) {
497
- module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
498
- return o.__proto__ || Object.getPrototypeOf(o);
499
- };
500
- return _getPrototypeOf(o);
501
- }
502
 
503
- module.exports = _getPrototypeOf;
 
504
 
505
- /***/ }),
506
- /* 15 */
507
- /***/ (function(module, exports, __webpack_require__) {
508
 
509
- /*!
510
- Copyright (c) 2017 Jed Watson.
511
- Licensed under the MIT License (MIT), see
512
- http://jedwatson.github.io/classnames
513
- */
514
- /* global define */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
515
 
516
- (function () {
517
- 'use strict';
 
 
 
518
 
519
- var hasOwn = {}.hasOwnProperty;
520
 
521
- function classNames () {
522
- var classes = [];
523
 
524
- for (var i = 0; i < arguments.length; i++) {
525
- var arg = arguments[i];
526
- if (!arg) continue;
527
 
528
- var argType = typeof arg;
 
 
 
 
 
 
 
 
 
 
 
 
 
529
 
530
- if (argType === 'string' || argType === 'number') {
531
- classes.push(arg);
532
- } else if (Array.isArray(arg) && arg.length) {
533
- var inner = classNames.apply(null, arg);
534
- if (inner) {
535
- classes.push(inner);
536
- }
537
- } else if (argType === 'object') {
538
- for (var key in arg) {
539
- if (hasOwn.call(arg, key) && arg[key]) {
540
- classes.push(key);
541
- }
542
- }
543
- }
544
- }
545
 
546
- return classes.join(' ');
547
- }
 
 
 
 
 
 
 
548
 
549
- if ( true && module.exports) {
550
- classNames.default = classNames;
551
- module.exports = classNames;
552
- } else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
553
- // register as 'classnames', consistent with npm package name
554
- define('classnames', [], function () {
555
- return classNames;
556
- });
557
- } else {
558
- window.classNames = classNames;
559
- }
560
- }());
561
 
 
 
 
562
 
563
- /***/ }),
564
- /* 16 */
565
- /***/ (function(module, exports) {
 
 
 
 
566
 
567
- (function() { module.exports = window["regeneratorRuntime"]; }());
 
 
 
 
 
 
 
 
 
 
 
 
568
 
569
- /***/ }),
570
- /* 17 */
571
- /***/ (function(module, exports, __webpack_require__) {
572
 
573
- var DESCRIPTORS = __webpack_require__(13);
574
- var IE8_DOM_DEFINE = __webpack_require__(72);
575
- var anObject = __webpack_require__(9);
576
- var toPrimitive = __webpack_require__(40);
577
-
578
- var nativeDefineProperty = Object.defineProperty;
579
-
580
- // `Object.defineProperty` method
581
- // https://tc39.es/ecma262/#sec-object.defineproperty
582
- exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
583
- anObject(O);
584
- P = toPrimitive(P, true);
585
- anObject(Attributes);
586
- if (IE8_DOM_DEFINE) try {
587
- return nativeDefineProperty(O, P, Attributes);
588
- } catch (error) { /* empty */ }
589
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
590
- if ('value' in Attributes) O[P] = Attributes.value;
591
- return O;
592
  };
593
 
 
594
 
595
  /***/ }),
596
- /* 18 */
597
- /***/ (function(module, exports) {
598
 
599
- function _assertThisInitialized(self) {
600
- if (self === void 0) {
601
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
602
- }
603
 
604
- return self;
605
- }
 
 
606
 
607
- module.exports = _assertThisInitialized;
608
 
609
- /***/ }),
610
- /* 19 */
611
- /***/ (function(module, exports, __webpack_require__) {
612
 
613
- var DESCRIPTORS = __webpack_require__(13);
614
- var definePropertyModule = __webpack_require__(17);
615
- var createPropertyDescriptor = __webpack_require__(39);
616
 
617
- module.exports = DESCRIPTORS ? function (object, key, value) {
618
- return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
619
- } : function (object, key, value) {
620
- object[key] = value;
621
- return object;
622
- };
623
 
 
624
 
625
- /***/ }),
626
- /* 20 */
627
- /***/ (function(module, exports) {
628
 
629
- (function() { module.exports = window["React"]; }());
630
 
631
- /***/ }),
632
- /* 21 */
633
- /***/ (function(module, exports, __webpack_require__) {
634
 
635
- // toObject with fallback for non-array-like ES3 strings
636
- var IndexedObject = __webpack_require__(71);
637
- var requireObjectCoercible = __webpack_require__(32);
638
 
639
- module.exports = function (it) {
640
- return IndexedObject(requireObjectCoercible(it));
641
- };
642
 
 
 
 
643
 
644
- /***/ }),
645
- /* 22 */
646
- /***/ (function(module, exports) {
 
 
 
 
 
647
 
648
- function _classCallCheck(instance, Constructor) {
649
- if (!(instance instanceof Constructor)) {
650
- throw new TypeError("Cannot call a class as a function");
651
- }
652
- }
653
 
654
- module.exports = _classCallCheck;
655
 
656
  /***/ }),
657
- /* 23 */
658
- /***/ (function(module, exports) {
659
 
660
- function _defineProperties(target, props) {
661
- for (var i = 0; i < props.length; i++) {
662
- var descriptor = props[i];
663
- descriptor.enumerable = descriptor.enumerable || false;
664
- descriptor.configurable = true;
665
- if ("value" in descriptor) descriptor.writable = true;
666
- Object.defineProperty(target, descriptor.key, descriptor);
667
- }
668
- }
669
 
670
- function _createClass(Constructor, protoProps, staticProps) {
671
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
672
- if (staticProps) _defineProperties(Constructor, staticProps);
673
- return Constructor;
 
 
 
 
 
 
 
 
 
 
 
 
674
  }
675
 
676
- module.exports = _createClass;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
677
 
678
  /***/ }),
679
- /* 24 */
680
- /***/ (function(module, exports, __webpack_require__) {
681
 
682
- var setPrototypeOf = __webpack_require__(204);
 
683
 
684
- function _inherits(subClass, superClass) {
685
- if (typeof superClass !== "function" && superClass !== null) {
686
- throw new TypeError("Super expression must either be null or a function");
687
- }
688
-
689
- subClass.prototype = Object.create(superClass && superClass.prototype, {
690
- constructor: {
691
- value: subClass,
692
- writable: true,
693
- configurable: true
694
- }
695
- });
696
- if (superClass) setPrototypeOf(subClass, superClass);
697
- }
698
-
699
- module.exports = _inherits;
700
-
701
- /***/ }),
702
- /* 25 */
703
- /***/ (function(module, exports, __webpack_require__) {
704
-
705
- var _typeof = __webpack_require__(108);
706
 
707
- var assertThisInitialized = __webpack_require__(18);
708
 
709
  function _possibleConstructorReturn(self, call) {
710
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
711
  return call;
712
  }
713
 
714
- return assertThisInitialized(self);
715
  }
716
 
717
- module.exports = _possibleConstructorReturn;
718
-
719
- /***/ }),
720
- /* 26 */
721
- /***/ (function(module, exports) {
722
-
723
- (function() { module.exports = window["wp"]["data"]; }());
724
-
725
  /***/ }),
726
- /* 27 */
727
- /***/ (function(module, exports, __webpack_require__) {
728
-
729
- var global = __webpack_require__(3);
730
- var createNonEnumerableProperty = __webpack_require__(19);
731
- var has = __webpack_require__(11);
732
- var setGlobal = __webpack_require__(46);
733
- var inspectSource = __webpack_require__(68);
734
- var InternalStateModule = __webpack_require__(45);
735
-
736
- var getInternalState = InternalStateModule.get;
737
- var enforceInternalState = InternalStateModule.enforce;
738
- var TEMPLATE = String(String).split('String');
739
-
740
- (module.exports = function (O, key, value, options) {
741
- var unsafe = options ? !!options.unsafe : false;
742
- var simple = options ? !!options.enumerable : false;
743
- var noTargetGet = options ? !!options.noTargetGet : false;
744
- var state;
745
- if (typeof value == 'function') {
746
- if (typeof key == 'string' && !has(value, 'name')) {
747
- createNonEnumerableProperty(value, 'name', key);
748
- }
749
- state = enforceInternalState(value);
750
- if (!state.source) {
751
- state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
752
- }
753
- }
754
- if (O === global) {
755
- if (simple) O[key] = value;
756
- else setGlobal(key, value);
757
- return;
758
- } else if (!unsafe) {
759
- delete O[key];
760
- } else if (!noTargetGet && O[key]) {
761
- simple = true;
762
- }
763
- if (simple) O[key] = value;
764
- else createNonEnumerableProperty(O, key, value);
765
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
766
- })(Function.prototype, 'toString', function toString() {
767
- return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
768
- });
769
-
770
 
771
- /***/ }),
772
- /* 28 */
773
  /***/ (function(module, exports) {
774
 
775
- (function() { module.exports = window["wp"]["primitives"]; }());
776
 
777
  /***/ }),
778
- /* 29 */
779
- /***/ (function(module, exports) {
780
 
781
- (function() { module.exports = window["moment"]; }());
782
-
783
- /***/ }),
784
- /* 30 */
785
- /***/ (function(module, exports) {
786
 
787
- var toString = {}.toString;
 
 
 
 
 
 
788
 
789
- module.exports = function (it) {
790
- return toString.call(it).slice(8, -1);
791
- };
792
 
793
 
794
- /***/ }),
795
- /* 31 */
796
- /***/ (function(module, exports, __webpack_require__) {
797
 
798
- var path = __webpack_require__(81);
799
- var global = __webpack_require__(3);
 
800
 
801
- var aFunction = function (variable) {
802
- return typeof variable == 'function' ? variable : undefined;
803
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
804
 
805
- module.exports = function (namespace, method) {
806
- return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
807
- : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
808
- };
 
 
 
 
 
 
 
809
 
 
 
 
810
 
811
- /***/ }),
812
- /* 32 */
813
- /***/ (function(module, exports) {
814
 
815
- // `RequireObjectCoercible` abstract operation
816
- // https://tc39.es/ecma262/#sec-requireobjectcoercible
817
- module.exports = function (it) {
818
- if (it == undefined) throw TypeError("Can't call method on " + it);
819
- return it;
820
  };
821
 
822
 
823
  /***/ }),
824
- /* 33 */
825
- /***/ (function(module, exports, __webpack_require__) {
826
-
827
- var DESCRIPTORS = __webpack_require__(13);
828
- var propertyIsEnumerableModule = __webpack_require__(76);
829
- var createPropertyDescriptor = __webpack_require__(39);
830
- var toIndexedObject = __webpack_require__(21);
831
- var toPrimitive = __webpack_require__(40);
832
- var has = __webpack_require__(11);
833
- var IE8_DOM_DEFINE = __webpack_require__(72);
834
-
835
- var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
836
-
837
- // `Object.getOwnPropertyDescriptor` method
838
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
839
- exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
840
- O = toIndexedObject(O);
841
- P = toPrimitive(P, true);
842
- if (IE8_DOM_DEFINE) try {
843
- return nativeGetOwnPropertyDescriptor(O, P);
844
- } catch (error) { /* empty */ }
845
- if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
846
- };
847
 
848
-
849
- /***/ }),
850
- /* 34 */
851
  /***/ (function(module, exports, __webpack_require__) {
852
 
853
- var toInteger = __webpack_require__(42);
 
 
 
 
 
 
854
 
855
- var min = Math.min;
856
 
857
- // `ToLength` abstract operation
858
- // https://tc39.es/ecma262/#sec-tolength
859
- module.exports = function (argument) {
860
- return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
861
- };
862
 
 
863
 
864
- /***/ }),
865
- /* 35 */
866
- /***/ (function(module, exports) {
867
 
868
- (function() { module.exports = window["wp"]["dataControls"]; }());
869
 
870
  /***/ }),
871
- /* 36 */
872
- /***/ (function(module, exports) {
873
-
874
- module.exports = {};
875
 
876
-
877
- /***/ }),
878
- /* 37 */
879
  /***/ (function(module, exports, __webpack_require__) {
880
 
881
- var $ = __webpack_require__(12);
882
- var toObject = __webpack_require__(38);
883
- var nativeKeys = __webpack_require__(54);
884
- var fails = __webpack_require__(6);
885
-
886
- var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
887
-
888
- // `Object.keys` method
889
- // https://tc39.es/ecma262/#sec-object.keys
890
- $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
891
- keys: function keys(it) {
892
- return nativeKeys(toObject(it));
893
- }
894
- });
895
-
896
 
897
- /***/ }),
898
- /* 38 */
899
- /***/ (function(module, exports, __webpack_require__) {
900
 
901
- var requireObjectCoercible = __webpack_require__(32);
 
 
902
 
903
- // `ToObject` abstract operation
904
- // https://tc39.es/ecma262/#sec-toobject
905
- module.exports = function (argument) {
906
- return Object(requireObjectCoercible(argument));
 
 
 
 
 
 
 
907
  };
908
 
909
-
910
- /***/ }),
911
- /* 39 */
912
- /***/ (function(module, exports) {
913
-
914
- module.exports = function (bitmap, value) {
915
- return {
916
- enumerable: !(bitmap & 1),
917
- configurable: !(bitmap & 2),
918
- writable: !(bitmap & 4),
919
- value: value
920
- };
921
  };
922
 
 
923
 
924
- /***/ }),
925
- /* 40 */
926
- /***/ (function(module, exports, __webpack_require__) {
927
-
928
- var isObject = __webpack_require__(10);
929
-
930
- // `ToPrimitive` abstract operation
931
- // https://tc39.es/ecma262/#sec-toprimitive
932
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
933
- // and the second argument - flag - preferred type is a string
934
- module.exports = function (input, PREFERRED_STRING) {
935
- if (!isObject(input)) return input;
936
- var fn, val;
937
- if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
938
- if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
939
- if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
940
- throw TypeError("Can't convert object to primitive value");
 
 
941
  };
942
 
 
 
 
 
 
 
 
943
 
944
- /***/ }),
945
- /* 41 */
946
- /***/ (function(module, exports, __webpack_require__) {
947
-
948
- "use strict";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
949
 
950
- var $ = __webpack_require__(12);
951
- var $filter = __webpack_require__(75).filter;
952
- var arrayMethodHasSpeciesSupport = __webpack_require__(89);
 
953
 
954
- var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
 
955
 
956
- // `Array.prototype.filter` method
957
- // https://tc39.es/ecma262/#sec-array.prototype.filter
958
- // with adding support of @@species
959
- $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
960
- filter: function filter(callbackfn /* , thisArg */) {
961
- return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
962
- }
963
- });
964
 
 
965
 
966
- /***/ }),
967
- /* 42 */
968
- /***/ (function(module, exports) {
969
 
970
- var ceil = Math.ceil;
971
- var floor = Math.floor;
 
 
 
 
 
972
 
973
- // `ToInteger` abstract operation
974
- // https://tc39.es/ecma262/#sec-tointeger
975
- module.exports = function (argument) {
976
- return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
977
- };
978
 
 
 
 
979
 
980
- /***/ }),
981
- /* 43 */
982
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
983
 
984
- var arrayWithHoles = __webpack_require__(182);
 
985
 
986
- var iterableToArrayLimit = __webpack_require__(183);
 
 
 
987
 
988
- var unsupportedIterableToArray = __webpack_require__(131);
 
 
989
 
990
- var nonIterableRest = __webpack_require__(184);
 
 
 
991
 
992
- function _slicedToArray(arr, i) {
993
- return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
994
- }
995
-
996
- module.exports = _slicedToArray;
997
-
998
- /***/ }),
999
- /* 44 */
1000
- /***/ (function(module, exports, __webpack_require__) {
1001
-
1002
- var arrayWithoutHoles = __webpack_require__(179);
1003
 
1004
- var iterableToArray = __webpack_require__(180);
 
 
 
1005
 
1006
- var unsupportedIterableToArray = __webpack_require__(131);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1007
 
1008
- var nonIterableSpread = __webpack_require__(181);
 
 
1009
 
1010
- function _toConsumableArray(arr) {
1011
- return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
1012
- }
1013
 
1014
- module.exports = _toConsumableArray;
 
 
 
 
 
 
1015
 
1016
- /***/ }),
1017
- /* 45 */
1018
- /***/ (function(module, exports, __webpack_require__) {
1019
 
1020
- var NATIVE_WEAK_MAP = __webpack_require__(106);
1021
- var global = __webpack_require__(3);
1022
- var isObject = __webpack_require__(10);
1023
- var createNonEnumerableProperty = __webpack_require__(19);
1024
- var objectHas = __webpack_require__(11);
1025
- var shared = __webpack_require__(47);
1026
- var sharedKey = __webpack_require__(52);
1027
- var hiddenKeys = __webpack_require__(36);
1028
 
1029
- var WeakMap = global.WeakMap;
1030
- var set, get, has;
 
 
 
 
 
 
1031
 
1032
- var enforce = function (it) {
1033
- return has(it) ? get(it) : set(it, {});
1034
- };
1035
 
1036
- var getterFor = function (TYPE) {
1037
- return function (it) {
1038
- var state;
1039
- if (!isObject(it) || (state = get(it)).type !== TYPE) {
1040
- throw TypeError('Incompatible receiver, ' + TYPE + ' required');
1041
- } return state;
1042
- };
1043
- };
1044
 
1045
- if (NATIVE_WEAK_MAP) {
1046
- var store = shared.state || (shared.state = new WeakMap());
1047
- var wmget = store.get;
1048
- var wmhas = store.has;
1049
- var wmset = store.set;
1050
- set = function (it, metadata) {
1051
- metadata.facade = it;
1052
- wmset.call(store, it, metadata);
1053
- return metadata;
1054
- };
1055
- get = function (it) {
1056
- return wmget.call(store, it) || {};
1057
- };
1058
- has = function (it) {
1059
- return wmhas.call(store, it);
1060
- };
1061
- } else {
1062
- var STATE = sharedKey('state');
1063
- hiddenKeys[STATE] = true;
1064
- set = function (it, metadata) {
1065
- metadata.facade = it;
1066
- createNonEnumerableProperty(it, STATE, metadata);
1067
- return metadata;
1068
- };
1069
- get = function (it) {
1070
- return objectHas(it, STATE) ? it[STATE] : {};
1071
- };
1072
- has = function (it) {
1073
- return objectHas(it, STATE);
1074
- };
1075
- }
1076
 
1077
- module.exports = {
1078
- set: set,
1079
- get: get,
1080
- has: has,
1081
- enforce: enforce,
1082
- getterFor: getterFor
1083
- };
1084
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1085
 
1086
- /***/ }),
1087
- /* 46 */
1088
- /***/ (function(module, exports, __webpack_require__) {
1089
 
1090
- var global = __webpack_require__(3);
1091
- var createNonEnumerableProperty = __webpack_require__(19);
 
 
 
 
 
 
 
1092
 
1093
- module.exports = function (key, value) {
1094
- try {
1095
- createNonEnumerableProperty(global, key, value);
1096
- } catch (error) {
1097
- global[key] = value;
1098
- } return value;
1099
  };
1100
 
1101
 
1102
  /***/ }),
1103
- /* 47 */
1104
- /***/ (function(module, exports, __webpack_require__) {
1105
 
1106
- var global = __webpack_require__(3);
1107
- var setGlobal = __webpack_require__(46);
1108
-
1109
- var SHARED = '__core-js_shared__';
1110
- var store = global[SHARED] || setGlobal(SHARED, {});
1111
 
1112
- module.exports = store;
1113
 
1114
 
1115
- /***/ }),
1116
- /* 48 */
1117
- /***/ (function(module, exports) {
1118
 
1119
- // IE8- don't enum bug keys
1120
- module.exports = [
1121
- 'constructor',
1122
- 'hasOwnProperty',
1123
- 'isPrototypeOf',
1124
- 'propertyIsEnumerable',
1125
- 'toLocaleString',
1126
- 'toString',
1127
- 'valueOf'
1128
- ];
1129
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1130
 
1131
- /***/ }),
1132
- /* 49 */
1133
- /***/ (function(module, exports, __webpack_require__) {
 
 
1134
 
1135
- var global = __webpack_require__(3);
1136
- var DOMIterables = __webpack_require__(127);
1137
- var forEach = __webpack_require__(149);
1138
- var createNonEnumerableProperty = __webpack_require__(19);
1139
-
1140
- for (var COLLECTION_NAME in DOMIterables) {
1141
- var Collection = global[COLLECTION_NAME];
1142
- var CollectionPrototype = Collection && Collection.prototype;
1143
- // some Chrome versions have non-configurable methods on DOMTokenList
1144
- if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
1145
- createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
1146
- } catch (error) {
1147
- CollectionPrototype.forEach = forEach;
1148
- }
1149
- }
1150
 
 
 
1151
 
1152
- /***/ }),
1153
- /* 50 */
1154
- /***/ (function(module, exports) {
 
 
 
 
 
 
 
1155
 
1156
- (function() { module.exports = window["wc"]["navigation"]; }());
 
 
 
 
 
1157
 
1158
- /***/ }),
1159
- /* 51 */
1160
- /***/ (function(module, exports, __webpack_require__) {
1161
 
1162
- "use strict";
 
 
 
 
 
 
1163
 
1164
- var $ = __webpack_require__(12);
1165
- var $map = __webpack_require__(75).map;
1166
- var arrayMethodHasSpeciesSupport = __webpack_require__(89);
 
 
 
 
 
 
 
 
 
 
 
1167
 
1168
- var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
 
 
 
 
1169
 
1170
- // `Array.prototype.map` method
1171
- // https://tc39.es/ecma262/#sec-array.prototype.map
1172
- // with adding support of @@species
1173
- $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
1174
- map: function map(callbackfn /* , thisArg */) {
1175
- return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1176
- }
1177
- });
1178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1179
 
1180
- /***/ }),
1181
- /* 52 */
1182
- /***/ (function(module, exports, __webpack_require__) {
1183
 
1184
- var shared = __webpack_require__(58);
1185
- var uid = __webpack_require__(55);
 
1186
 
1187
- var keys = shared('keys');
 
 
 
 
 
1188
 
1189
- module.exports = function (key) {
1190
- return keys[key] || (keys[key] = uid(key));
1191
  };
1192
 
 
 
1193
 
1194
- /***/ }),
1195
- /* 53 */
1196
- /***/ (function(module, exports, __webpack_require__) {
1197
-
1198
- "use strict";
1199
-
1200
- var $ = __webpack_require__(12);
1201
- var global = __webpack_require__(3);
1202
- var getBuiltIn = __webpack_require__(31);
1203
- var IS_PURE = __webpack_require__(57);
1204
- var DESCRIPTORS = __webpack_require__(13);
1205
- var NATIVE_SYMBOL = __webpack_require__(62);
1206
- var USE_SYMBOL_AS_UID = __webpack_require__(93);
1207
- var fails = __webpack_require__(6);
1208
- var has = __webpack_require__(11);
1209
- var isArray = __webpack_require__(84);
1210
- var isObject = __webpack_require__(10);
1211
- var anObject = __webpack_require__(9);
1212
- var toObject = __webpack_require__(38);
1213
- var toIndexedObject = __webpack_require__(21);
1214
- var toPrimitive = __webpack_require__(40);
1215
- var createPropertyDescriptor = __webpack_require__(39);
1216
- var nativeObjectCreate = __webpack_require__(69);
1217
- var objectKeys = __webpack_require__(54);
1218
- var getOwnPropertyNamesModule = __webpack_require__(56);
1219
- var getOwnPropertyNamesExternal = __webpack_require__(147);
1220
- var getOwnPropertySymbolsModule = __webpack_require__(79);
1221
- var getOwnPropertyDescriptorModule = __webpack_require__(33);
1222
- var definePropertyModule = __webpack_require__(17);
1223
- var propertyIsEnumerableModule = __webpack_require__(76);
1224
- var createNonEnumerableProperty = __webpack_require__(19);
1225
- var redefine = __webpack_require__(27);
1226
- var shared = __webpack_require__(58);
1227
- var sharedKey = __webpack_require__(52);
1228
- var hiddenKeys = __webpack_require__(36);
1229
- var uid = __webpack_require__(55);
1230
- var wellKnownSymbol = __webpack_require__(8);
1231
- var wrappedWellKnownSymbolModule = __webpack_require__(119);
1232
- var defineWellKnownSymbol = __webpack_require__(148);
1233
- var setToStringTag = __webpack_require__(90);
1234
- var InternalStateModule = __webpack_require__(45);
1235
- var $forEach = __webpack_require__(75).forEach;
1236
-
1237
- var HIDDEN = sharedKey('hidden');
1238
- var SYMBOL = 'Symbol';
1239
- var PROTOTYPE = 'prototype';
1240
- var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
1241
- var setInternalState = InternalStateModule.set;
1242
- var getInternalState = InternalStateModule.getterFor(SYMBOL);
1243
- var ObjectPrototype = Object[PROTOTYPE];
1244
- var $Symbol = global.Symbol;
1245
- var $stringify = getBuiltIn('JSON', 'stringify');
1246
- var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1247
- var nativeDefineProperty = definePropertyModule.f;
1248
- var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
1249
- var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
1250
- var AllSymbols = shared('symbols');
1251
- var ObjectPrototypeSymbols = shared('op-symbols');
1252
- var StringToSymbolRegistry = shared('string-to-symbol-registry');
1253
- var SymbolToStringRegistry = shared('symbol-to-string-registry');
1254
- var WellKnownSymbolsStore = shared('wks');
1255
- var QObject = global.QObject;
1256
- // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
1257
- var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
1258
-
1259
- // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
1260
- var setSymbolDescriptor = DESCRIPTORS && fails(function () {
1261
- return nativeObjectCreate(nativeDefineProperty({}, 'a', {
1262
- get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
1263
- })).a != 7;
1264
- }) ? function (O, P, Attributes) {
1265
- var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
1266
- if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
1267
- nativeDefineProperty(O, P, Attributes);
1268
- if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
1269
- nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
1270
- }
1271
- } : nativeDefineProperty;
1272
-
1273
- var wrap = function (tag, description) {
1274
- var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);
1275
- setInternalState(symbol, {
1276
- type: SYMBOL,
1277
- tag: tag,
1278
- description: description
1279
- });
1280
- if (!DESCRIPTORS) symbol.description = description;
1281
- return symbol;
1282
- };
1283
 
1284
- var isSymbol = USE_SYMBOL_AS_UID ? function (it) {
1285
- return typeof it == 'symbol';
1286
- } : function (it) {
1287
- return Object(it) instanceof $Symbol;
1288
- };
1289
-
1290
- var $defineProperty = function defineProperty(O, P, Attributes) {
1291
- if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
1292
- anObject(O);
1293
- var key = toPrimitive(P, true);
1294
- anObject(Attributes);
1295
- if (has(AllSymbols, key)) {
1296
- if (!Attributes.enumerable) {
1297
- if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
1298
- O[HIDDEN][key] = true;
1299
- } else {
1300
- if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
1301
- Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
1302
- } return setSymbolDescriptor(O, key, Attributes);
1303
- } return nativeDefineProperty(O, key, Attributes);
1304
- };
1305
-
1306
- var $defineProperties = function defineProperties(O, Properties) {
1307
- anObject(O);
1308
- var properties = toIndexedObject(Properties);
1309
- var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
1310
- $forEach(keys, function (key) {
1311
- if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
1312
- });
1313
- return O;
1314
- };
1315
-
1316
- var $create = function create(O, Properties) {
1317
- return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
1318
- };
1319
-
1320
- var $propertyIsEnumerable = function propertyIsEnumerable(V) {
1321
- var P = toPrimitive(V, true);
1322
- var enumerable = nativePropertyIsEnumerable.call(this, P);
1323
- if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
1324
- return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
1325
- };
1326
-
1327
- var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
1328
- var it = toIndexedObject(O);
1329
- var key = toPrimitive(P, true);
1330
- if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
1331
- var descriptor = nativeGetOwnPropertyDescriptor(it, key);
1332
- if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
1333
- descriptor.enumerable = true;
1334
- }
1335
- return descriptor;
1336
- };
1337
-
1338
- var $getOwnPropertyNames = function getOwnPropertyNames(O) {
1339
- var names = nativeGetOwnPropertyNames(toIndexedObject(O));
1340
- var result = [];
1341
- $forEach(names, function (key) {
1342
- if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
1343
- });
1344
- return result;
1345
- };
1346
 
1347
- var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
1348
- var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
1349
- var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
1350
- var result = [];
1351
- $forEach(names, function (key) {
1352
- if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
1353
- result.push(AllSymbols[key]);
1354
  }
1355
- });
1356
- return result;
1357
- };
1358
-
1359
- // `Symbol` constructor
1360
- // https://tc39.es/ecma262/#sec-symbol-constructor
1361
- if (!NATIVE_SYMBOL) {
1362
- $Symbol = function Symbol() {
1363
- if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
1364
- var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
1365
- var tag = uid(description);
1366
- var setter = function (value) {
1367
- if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
1368
- if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
1369
- setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
1370
- };
1371
- if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
1372
- return wrap(tag, description);
1373
- };
1374
-
1375
- redefine($Symbol[PROTOTYPE], 'toString', function toString() {
1376
- return getInternalState(this).tag;
1377
- });
1378
-
1379
- redefine($Symbol, 'withoutSetter', function (description) {
1380
- return wrap(uid(description), description);
1381
- });
1382
-
1383
- propertyIsEnumerableModule.f = $propertyIsEnumerable;
1384
- definePropertyModule.f = $defineProperty;
1385
- getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
1386
- getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
1387
- getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
1388
 
1389
- wrappedWellKnownSymbolModule.f = function (name) {
1390
- return wrap(wellKnownSymbol(name), name);
1391
- };
1392
 
1393
- if (DESCRIPTORS) {
1394
- // https://github.com/tc39/proposal-Symbol-description
1395
- nativeDefineProperty($Symbol[PROTOTYPE], 'description', {
1396
- configurable: true,
1397
- get: function description() {
1398
- return getInternalState(this).description;
1399
- }
1400
- });
1401
- if (!IS_PURE) {
1402
- redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
1403
  }
1404
- }
1405
- }
1406
 
1407
- $({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
1408
- Symbol: $Symbol
1409
- });
1410
 
1411
- $forEach(objectKeys(WellKnownSymbolsStore), function (name) {
1412
- defineWellKnownSymbol(name);
1413
- });
1414
 
1415
- $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
1416
- // `Symbol.for` method
1417
- // https://tc39.es/ecma262/#sec-symbol.for
1418
- 'for': function (key) {
1419
- var string = String(key);
1420
- if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
1421
- var symbol = $Symbol(string);
1422
- StringToSymbolRegistry[string] = symbol;
1423
- SymbolToStringRegistry[symbol] = string;
1424
- return symbol;
1425
- },
1426
- // `Symbol.keyFor` method
1427
- // https://tc39.es/ecma262/#sec-symbol.keyfor
1428
- keyFor: function keyFor(sym) {
1429
- if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
1430
- if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
1431
- },
1432
- useSetter: function () { USE_SETTER = true; },
1433
- useSimple: function () { USE_SETTER = false; }
1434
- });
1435
 
1436
- $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
1437
- // `Object.create` method
1438
- // https://tc39.es/ecma262/#sec-object.create
1439
- create: $create,
1440
- // `Object.defineProperty` method
1441
- // https://tc39.es/ecma262/#sec-object.defineproperty
1442
- defineProperty: $defineProperty,
1443
- // `Object.defineProperties` method
1444
- // https://tc39.es/ecma262/#sec-object.defineproperties
1445
- defineProperties: $defineProperties,
1446
- // `Object.getOwnPropertyDescriptor` method
1447
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
1448
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor
1449
- });
1450
 
1451
- $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
1452
- // `Object.getOwnPropertyNames` method
1453
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
1454
- getOwnPropertyNames: $getOwnPropertyNames,
1455
- // `Object.getOwnPropertySymbols` method
1456
- // https://tc39.es/ecma262/#sec-object.getownpropertysymbols
1457
- getOwnPropertySymbols: $getOwnPropertySymbols
1458
- });
1459
 
1460
- // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
1461
- // https://bugs.chromium.org/p/v8/issues/detail?id=3443
1462
- $({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {
1463
- getOwnPropertySymbols: function getOwnPropertySymbols(it) {
1464
- return getOwnPropertySymbolsModule.f(toObject(it));
1465
- }
1466
- });
1467
 
1468
- // `JSON.stringify` method behavior with symbols
1469
- // https://tc39.es/ecma262/#sec-json.stringify
1470
- if ($stringify) {
1471
- var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
1472
- var symbol = $Symbol();
1473
- // MS Edge converts symbol values to JSON as {}
1474
- return $stringify([symbol]) != '[null]'
1475
- // WebKit converts symbol values to JSON as null
1476
- || $stringify({ a: symbol }) != '{}'
1477
- // V8 throws on boxed symbols
1478
- || $stringify(Object(symbol)) != '{}';
1479
- });
1480
 
1481
- $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
1482
- // eslint-disable-next-line no-unused-vars -- required for `.length`
1483
- stringify: function stringify(it, replacer, space) {
1484
- var args = [it];
1485
- var index = 1;
1486
- var $replacer;
1487
- while (arguments.length > index) args.push(arguments[index++]);
1488
- $replacer = replacer;
1489
- if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
1490
- if (!isArray(replacer)) replacer = function (key, value) {
1491
- if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
1492
- if (!isSymbol(value)) return value;
1493
- };
1494
- args[1] = replacer;
1495
- return $stringify.apply(null, args);
1496
  }
1497
- });
1498
- }
1499
-
1500
- // `Symbol.prototype[@@toPrimitive]` method
1501
- // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
1502
- if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
1503
- createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
1504
- }
1505
- // `Symbol.prototype[@@toStringTag]` property
1506
- // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
1507
- setToStringTag($Symbol, SYMBOL);
1508
 
1509
- hiddenKeys[HIDDEN] = true;
1510
 
 
 
 
 
 
 
 
 
 
 
1511
 
1512
- /***/ }),
1513
- /* 54 */
1514
- /***/ (function(module, exports, __webpack_require__) {
1515
 
1516
- var internalObjectKeys = __webpack_require__(73);
1517
- var enumBugKeys = __webpack_require__(48);
 
1518
 
1519
- // `Object.keys` method
1520
- // https://tc39.es/ecma262/#sec-object.keys
1521
- module.exports = Object.keys || function keys(O) {
1522
- return internalObjectKeys(O, enumBugKeys);
1523
  };
1524
 
 
 
 
 
1525
 
1526
- /***/ }),
1527
- /* 55 */
1528
- /***/ (function(module, exports) {
1529
 
1530
- var id = 0;
1531
- var postfix = Math.random();
 
 
1532
 
1533
- module.exports = function (key) {
1534
- return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1535
  };
1536
 
 
 
1537
 
1538
- /***/ }),
1539
- /* 56 */
1540
- /***/ (function(module, exports, __webpack_require__) {
1541
 
1542
- var internalObjectKeys = __webpack_require__(73);
1543
- var enumBugKeys = __webpack_require__(48);
 
 
1544
 
1545
- var hiddenKeys = enumBugKeys.concat('length', 'prototype');
 
 
 
 
 
1546
 
1547
- // `Object.getOwnPropertyNames` method
1548
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
1549
- exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1550
- return internalObjectKeys(O, hiddenKeys);
1551
  };
1552
 
1553
 
1554
  /***/ }),
1555
- /* 57 */
1556
- /***/ (function(module, exports) {
1557
 
1558
- module.exports = false;
1559
-
1560
-
1561
- /***/ }),
1562
- /* 58 */
1563
  /***/ (function(module, exports, __webpack_require__) {
1564
 
1565
- var IS_PURE = __webpack_require__(57);
1566
- var store = __webpack_require__(47);
1567
-
1568
- (module.exports = function (key, value) {
1569
- return store[key] || (store[key] = value !== undefined ? value : {});
1570
- })('versions', []).push({
1571
- version: '3.9.1',
1572
- mode: IS_PURE ? 'pure' : 'global',
1573
- copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
1574
- });
1575
 
1576
 
1577
- /***/ }),
1578
- /* 59 */
1579
- /***/ (function(module, exports) {
1580
 
1581
- (function() { module.exports = window["wc"]["data"]; }());
 
 
 
 
 
 
 
 
 
1582
 
1583
- /***/ }),
1584
- /* 60 */
1585
- /***/ (function(module, exports, __webpack_require__) {
1586
 
1587
- var $ = __webpack_require__(12);
1588
- var fails = __webpack_require__(6);
1589
- var toIndexedObject = __webpack_require__(21);
1590
- var nativeGetOwnPropertyDescriptor = __webpack_require__(33).f;
1591
- var DESCRIPTORS = __webpack_require__(13);
1592
 
1593
- var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
1594
- var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
 
1595
 
1596
- // `Object.getOwnPropertyDescriptor` method
1597
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
1598
- $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
1599
- getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
1600
- return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
1601
- }
1602
- });
 
 
 
 
 
 
 
 
 
 
1603
 
 
 
1604
 
1605
- /***/ }),
1606
- /* 61 */
1607
- /***/ (function(module, exports, __webpack_require__) {
1608
 
1609
- var $ = __webpack_require__(12);
1610
- var DESCRIPTORS = __webpack_require__(13);
1611
- var ownKeys = __webpack_require__(86);
1612
- var toIndexedObject = __webpack_require__(21);
1613
- var getOwnPropertyDescriptorModule = __webpack_require__(33);
1614
- var createProperty = __webpack_require__(102);
1615
-
1616
- // `Object.getOwnPropertyDescriptors` method
1617
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
1618
- $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
1619
- getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
1620
- var O = toIndexedObject(object);
1621
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1622
- var keys = ownKeys(O);
1623
- var result = {};
1624
- var index = 0;
1625
- var key, descriptor;
1626
- while (keys.length > index) {
1627
- descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
1628
- if (descriptor !== undefined) createProperty(result, key, descriptor);
1629
- }
1630
- return result;
1631
- }
1632
- });
1633
 
1634
 
1635
  /***/ }),
1636
- /* 62 */
 
1637
  /***/ (function(module, exports, __webpack_require__) {
1638
 
1639
- var IS_NODE = __webpack_require__(77);
1640
- var V8_VERSION = __webpack_require__(63);
1641
- var fails = __webpack_require__(6);
1642
 
1643
- module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
1644
- /* global Symbol -- required for testing */
1645
- return !Symbol.sham &&
1646
- // Chrome 38 Symbol has incorrect toString conversion
1647
- // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
1648
- (IS_NODE ? V8_VERSION === 38 : V8_VERSION > 37 && V8_VERSION < 41);
1649
- });
1650
 
 
 
 
 
 
 
 
 
 
 
1651
 
1652
- /***/ }),
1653
- /* 63 */
1654
- /***/ (function(module, exports, __webpack_require__) {
1655
 
1656
- var global = __webpack_require__(3);
1657
- var userAgent = __webpack_require__(87);
 
1658
 
1659
- var process = global.process;
1660
- var versions = process && process.versions;
1661
- var v8 = versions && versions.v8;
1662
- var match, version;
 
1663
 
1664
- if (v8) {
1665
- match = v8.split('.');
1666
- version = match[0] + match[1];
1667
- } else if (userAgent) {
1668
- match = userAgent.match(/Edge\/(\d+)/);
1669
- if (!match || match[1] >= 74) {
1670
- match = userAgent.match(/Chrome\/(\d+)/);
1671
- if (match) version = match[1];
1672
- }
1673
  }
1674
 
1675
- module.exports = version && +version;
1676
 
1677
 
1678
  /***/ }),
1679
- /* 64 */
 
1680
  /***/ (function(module, exports, __webpack_require__) {
1681
 
1682
- var $ = __webpack_require__(12);
1683
- var getBuiltIn = __webpack_require__(31);
1684
- var aFunction = __webpack_require__(70);
1685
- var anObject = __webpack_require__(9);
1686
- var isObject = __webpack_require__(10);
1687
- var create = __webpack_require__(69);
1688
- var bind = __webpack_require__(212);
1689
- var fails = __webpack_require__(6);
1690
-
1691
- var nativeConstruct = getBuiltIn('Reflect', 'construct');
1692
-
1693
- // `Reflect.construct` method
1694
- // https://tc39.es/ecma262/#sec-reflect.construct
1695
- // MS Edge supports only 2 arguments and argumentsList argument is optional
1696
- // FF Nightly sets third argument as `new.target`, but does not create `this` from it
1697
- var NEW_TARGET_BUG = fails(function () {
1698
- function F() { /* empty */ }
1699
- return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
1700
- });
1701
- var ARGS_BUG = !fails(function () {
1702
- nativeConstruct(function () { /* empty */ });
1703
- });
1704
- var FORCED = NEW_TARGET_BUG || ARGS_BUG;
1705
-
1706
- $({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
1707
- construct: function construct(Target, args /* , newTarget */) {
1708
- aFunction(Target);
1709
- anObject(args);
1710
- var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
1711
- if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
1712
- if (Target == newTarget) {
1713
- // w/o altered newTarget, optimization for 0-4 arguments
1714
- switch (args.length) {
1715
- case 0: return new Target();
1716
- case 1: return new Target(args[0]);
1717
- case 2: return new Target(args[0], args[1]);
1718
- case 3: return new Target(args[0], args[1], args[2]);
1719
- case 4: return new Target(args[0], args[1], args[2], args[3]);
1720
- }
1721
- // w/o altered newTarget, lot of arguments case
1722
- var $args = [null];
1723
- $args.push.apply($args, args);
1724
- return new (bind.apply(Target, $args))();
1725
- }
1726
- // with altered newTarget, not support built-in constructors
1727
- var proto = newTarget.prototype;
1728
- var instance = create(isObject(proto) ? proto : Object.prototype);
1729
- var result = Function.apply.call(Target, instance, args);
1730
- return isObject(result) ? result : instance;
1731
- }
1732
- });
1733
 
1734
 
1735
- /***/ }),
1736
- /* 65 */
1737
- /***/ (function(module, exports) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1738
 
1739
- (function() { module.exports = window["wp"]["compose"]; }());
 
 
 
1740
 
1741
- /***/ }),
1742
- /* 66 */
1743
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
1744
 
1745
- "use strict";
 
 
 
 
 
 
1746
 
1747
- var $ = __webpack_require__(12);
1748
- var fails = __webpack_require__(6);
1749
- var isArray = __webpack_require__(84);
1750
- var isObject = __webpack_require__(10);
1751
- var toObject = __webpack_require__(38);
1752
- var toLength = __webpack_require__(34);
1753
- var createProperty = __webpack_require__(102);
1754
- var arraySpeciesCreate = __webpack_require__(109);
1755
- var arrayMethodHasSpeciesSupport = __webpack_require__(89);
1756
- var wellKnownSymbol = __webpack_require__(8);
1757
- var V8_VERSION = __webpack_require__(63);
1758
-
1759
- var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
1760
- var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
1761
- var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
1762
-
1763
- // We can't use this feature detection in V8 since it causes
1764
- // deoptimization and serious performance degradation
1765
- // https://github.com/zloirock/core-js/issues/679
1766
- var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
1767
- var array = [];
1768
- array[IS_CONCAT_SPREADABLE] = false;
1769
- return array.concat()[0] !== array;
1770
- });
1771
 
1772
- var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
 
 
 
1773
 
1774
- var isConcatSpreadable = function (O) {
1775
- if (!isObject(O)) return false;
1776
- var spreadable = O[IS_CONCAT_SPREADABLE];
1777
- return spreadable !== undefined ? !!spreadable : isArray(O);
1778
- };
1779
 
1780
- var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
1781
-
1782
- // `Array.prototype.concat` method
1783
- // https://tc39.es/ecma262/#sec-array.prototype.concat
1784
- // with adding support of @@isConcatSpreadable and @@species
1785
- $({ target: 'Array', proto: true, forced: FORCED }, {
1786
- // eslint-disable-next-line no-unused-vars -- required for `.length`
1787
- concat: function concat(arg) {
1788
- var O = toObject(this);
1789
- var A = arraySpeciesCreate(O, 0);
1790
- var n = 0;
1791
- var i, k, length, len, E;
1792
- for (i = -1, length = arguments.length; i < length; i++) {
1793
- E = i === -1 ? O : arguments[i];
1794
- if (isConcatSpreadable(E)) {
1795
- len = toLength(E.length);
1796
- if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1797
- for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
1798
- } else {
1799
- if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1800
- createProperty(A, n++, E);
1801
  }
1802
- }
1803
- A.length = n;
1804
- return A;
1805
- }
1806
- });
1807
 
 
 
 
 
1808
 
1809
- /***/ }),
1810
- /* 67 */
1811
- /***/ (function(module, exports, __webpack_require__) {
1812
 
1813
- var global = __webpack_require__(3);
1814
- var isObject = __webpack_require__(10);
 
 
 
 
 
1815
 
1816
- var document = global.document;
1817
- // typeof document.createElement is 'object' in old IE
1818
- var EXISTS = isObject(document) && isObject(document.createElement);
 
1819
 
1820
- module.exports = function (it) {
1821
- return EXISTS ? document.createElement(it) : {};
1822
- };
1823
 
 
 
 
 
 
 
1824
 
1825
- /***/ }),
1826
- /* 68 */
1827
- /***/ (function(module, exports, __webpack_require__) {
1828
 
1829
- var store = __webpack_require__(47);
 
 
1830
 
1831
- var functionToString = Function.toString;
 
 
1832
 
1833
- // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
1834
- if (typeof store.inspectSource != 'function') {
1835
- store.inspectSource = function (it) {
1836
- return functionToString.call(it);
1837
- };
1838
- }
1839
 
1840
- module.exports = store.inspectSource;
 
 
 
1841
 
 
 
 
 
 
 
 
 
1842
 
1843
- /***/ }),
1844
- /* 69 */
1845
- /***/ (function(module, exports, __webpack_require__) {
1846
 
1847
- var anObject = __webpack_require__(9);
1848
- var defineProperties = __webpack_require__(104);
1849
- var enumBugKeys = __webpack_require__(48);
1850
- var hiddenKeys = __webpack_require__(36);
1851
- var html = __webpack_require__(98);
1852
- var documentCreateElement = __webpack_require__(67);
1853
- var sharedKey = __webpack_require__(52);
1854
 
1855
- var GT = '>';
1856
- var LT = '<';
1857
- var PROTOTYPE = 'prototype';
1858
- var SCRIPT = 'script';
1859
- var IE_PROTO = sharedKey('IE_PROTO');
1860
 
1861
- var EmptyConstructor = function () { /* empty */ };
 
 
 
1862
 
1863
- var scriptTag = function (content) {
1864
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1865
- };
1866
 
1867
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1868
- var NullProtoObjectViaActiveX = function (activeXDocument) {
1869
- activeXDocument.write(scriptTag(''));
1870
- activeXDocument.close();
1871
- var temp = activeXDocument.parentWindow.Object;
1872
- activeXDocument = null; // avoid memory leak
1873
- return temp;
1874
- };
1875
-
1876
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
1877
- var NullProtoObjectViaIFrame = function () {
1878
- // Thrash, waste and sodomy: IE GC bug
1879
- var iframe = documentCreateElement('iframe');
1880
- var JS = 'java' + SCRIPT + ':';
1881
- var iframeDocument;
1882
- iframe.style.display = 'none';
1883
- html.appendChild(iframe);
1884
- // https://github.com/zloirock/core-js/issues/475
1885
- iframe.src = String(JS);
1886
- iframeDocument = iframe.contentWindow.document;
1887
- iframeDocument.open();
1888
- iframeDocument.write(scriptTag('document.F=Object'));
1889
- iframeDocument.close();
1890
- return iframeDocument.F;
1891
- };
1892
-
1893
- // Check for document.domain and active x support
1894
- // No need to use active x approach when document.domain is not set
1895
- // see https://github.com/es-shims/es5-shim/issues/150
1896
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1897
- // avoid IE GC bug
1898
- var activeXDocument;
1899
- var NullProtoObject = function () {
1900
- try {
1901
- /* global ActiveXObject -- old IE */
1902
- activeXDocument = document.domain && new ActiveXObject('htmlfile');
1903
- } catch (error) { /* ignore */ }
1904
- NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
1905
- var length = enumBugKeys.length;
1906
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1907
- return NullProtoObject();
1908
- };
1909
-
1910
- hiddenKeys[IE_PROTO] = true;
1911
-
1912
- // `Object.create` method
1913
- // https://tc39.es/ecma262/#sec-object.create
1914
- module.exports = Object.create || function create(O, Properties) {
1915
- var result;
1916
- if (O !== null) {
1917
- EmptyConstructor[PROTOTYPE] = anObject(O);
1918
- result = new EmptyConstructor();
1919
- EmptyConstructor[PROTOTYPE] = null;
1920
- // add "__proto__" for Object.getPrototypeOf polyfill
1921
- result[IE_PROTO] = O;
1922
- } else result = NullProtoObject();
1923
- return Properties === undefined ? result : defineProperties(result, Properties);
1924
- };
1925
-
1926
-
1927
- /***/ }),
1928
- /* 70 */
1929
- /***/ (function(module, exports) {
1930
-
1931
- module.exports = function (it) {
1932
- if (typeof it != 'function') {
1933
- throw TypeError(String(it) + ' is not a function');
1934
- } return it;
1935
- };
1936
-
1937
-
1938
- /***/ }),
1939
- /* 71 */
1940
- /***/ (function(module, exports, __webpack_require__) {
1941
-
1942
- var fails = __webpack_require__(6);
1943
- var classof = __webpack_require__(30);
1944
-
1945
- var split = ''.split;
1946
-
1947
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
1948
- module.exports = fails(function () {
1949
- // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
1950
- // eslint-disable-next-line no-prototype-builtins -- safe
1951
- return !Object('z').propertyIsEnumerable(0);
1952
- }) ? function (it) {
1953
- return classof(it) == 'String' ? split.call(it, '') : Object(it);
1954
- } : Object;
1955
-
1956
-
1957
- /***/ }),
1958
- /* 72 */
1959
- /***/ (function(module, exports, __webpack_require__) {
1960
-
1961
- var DESCRIPTORS = __webpack_require__(13);
1962
- var fails = __webpack_require__(6);
1963
- var createElement = __webpack_require__(67);
1964
-
1965
- // Thank's IE8 for his funny defineProperty
1966
- module.exports = !DESCRIPTORS && !fails(function () {
1967
- return Object.defineProperty(createElement('div'), 'a', {
1968
- get: function () { return 7; }
1969
- }).a != 7;
1970
- });
1971
-
1972
-
1973
- /***/ }),
1974
- /* 73 */
1975
- /***/ (function(module, exports, __webpack_require__) {
1976
-
1977
- var has = __webpack_require__(11);
1978
- var toIndexedObject = __webpack_require__(21);
1979
- var indexOf = __webpack_require__(83).indexOf;
1980
- var hiddenKeys = __webpack_require__(36);
1981
-
1982
- module.exports = function (object, names) {
1983
- var O = toIndexedObject(object);
1984
- var i = 0;
1985
- var result = [];
1986
- var key;
1987
- for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
1988
- // Don't enum bug & hidden keys
1989
- while (names.length > i) if (has(O, key = names[i++])) {
1990
- ~indexOf(result, key) || result.push(key);
1991
  }
1992
- return result;
1993
- };
1994
-
 
 
 
 
 
 
 
 
 
 
 
 
 
1995
 
1996
- /***/ }),
1997
- /* 74 */
1998
- /***/ (function(module, exports, __webpack_require__) {
 
 
1999
 
2000
- var fails = __webpack_require__(6);
2001
 
2002
- var replacement = /#|\.prototype\./;
 
 
 
 
 
2003
 
2004
- var isForced = function (feature, detection) {
2005
- var value = data[normalize(feature)];
2006
- return value == POLYFILL ? true
2007
- : value == NATIVE ? false
2008
- : typeof detection == 'function' ? fails(detection)
2009
- : !!detection;
2010
- };
 
 
 
 
2011
 
2012
- var normalize = isForced.normalize = function (string) {
2013
- return String(string).replace(replacement, '.').toLowerCase();
2014
- };
2015
 
2016
- var data = isForced.data = {};
2017
- var NATIVE = isForced.NATIVE = 'N';
2018
- var POLYFILL = isForced.POLYFILL = 'P';
 
 
 
 
 
 
 
 
 
 
 
2019
 
2020
- module.exports = isForced;
2021
 
 
 
 
 
2022
 
2023
- /***/ }),
2024
- /* 75 */
2025
- /***/ (function(module, exports, __webpack_require__) {
2026
 
2027
- var bind = __webpack_require__(94);
2028
- var IndexedObject = __webpack_require__(71);
2029
- var toObject = __webpack_require__(38);
2030
- var toLength = __webpack_require__(34);
2031
- var arraySpeciesCreate = __webpack_require__(109);
2032
-
2033
- var push = [].push;
2034
-
2035
- // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
2036
- var createMethod = function (TYPE) {
2037
- var IS_MAP = TYPE == 1;
2038
- var IS_FILTER = TYPE == 2;
2039
- var IS_SOME = TYPE == 3;
2040
- var IS_EVERY = TYPE == 4;
2041
- var IS_FIND_INDEX = TYPE == 6;
2042
- var IS_FILTER_OUT = TYPE == 7;
2043
- var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
2044
- return function ($this, callbackfn, that, specificCreate) {
2045
- var O = toObject($this);
2046
- var self = IndexedObject(O);
2047
- var boundFunction = bind(callbackfn, that, 3);
2048
- var length = toLength(self.length);
2049
- var index = 0;
2050
- var create = specificCreate || arraySpeciesCreate;
2051
- var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
2052
- var value, result;
2053
- for (;length > index; index++) if (NO_HOLES || index in self) {
2054
- value = self[index];
2055
- result = boundFunction(value, index, O);
2056
- if (TYPE) {
2057
- if (IS_MAP) target[index] = result; // map
2058
- else if (result) switch (TYPE) {
2059
- case 3: return true; // some
2060
- case 5: return value; // find
2061
- case 6: return index; // findIndex
2062
- case 2: push.call(target, value); // filter
2063
- } else switch (TYPE) {
2064
- case 4: return false; // every
2065
- case 7: push.call(target, value); // filterOut
2066
- }
2067
  }
2068
  }
2069
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
2070
- };
2071
- };
2072
-
2073
- module.exports = {
2074
- // `Array.prototype.forEach` method
2075
- // https://tc39.es/ecma262/#sec-array.prototype.foreach
2076
- forEach: createMethod(0),
2077
- // `Array.prototype.map` method
2078
- // https://tc39.es/ecma262/#sec-array.prototype.map
2079
- map: createMethod(1),
2080
- // `Array.prototype.filter` method
2081
- // https://tc39.es/ecma262/#sec-array.prototype.filter
2082
- filter: createMethod(2),
2083
- // `Array.prototype.some` method
2084
- // https://tc39.es/ecma262/#sec-array.prototype.some
2085
- some: createMethod(3),
2086
- // `Array.prototype.every` method
2087
- // https://tc39.es/ecma262/#sec-array.prototype.every
2088
- every: createMethod(4),
2089
- // `Array.prototype.find` method
2090
- // https://tc39.es/ecma262/#sec-array.prototype.find
2091
- find: createMethod(5),
2092
- // `Array.prototype.findIndex` method
2093
- // https://tc39.es/ecma262/#sec-array.prototype.findIndex
2094
- findIndex: createMethod(6),
2095
- // `Array.prototype.filterOut` method
2096
- // https://github.com/tc39/proposal-array-filtering
2097
- filterOut: createMethod(7)
2098
- };
2099
-
2100
-
2101
- /***/ }),
2102
- /* 76 */
2103
- /***/ (function(module, exports, __webpack_require__) {
2104
-
2105
- "use strict";
2106
-
2107
- var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
2108
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2109
 
2110
- // Nashorn ~ JDK8 bug
2111
- var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
 
 
 
2112
 
2113
- // `Object.prototype.propertyIsEnumerable` method implementation
2114
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
2115
- exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
2116
- var descriptor = getOwnPropertyDescriptor(this, V);
2117
- return !!descriptor && descriptor.enumerable;
2118
- } : nativePropertyIsEnumerable;
 
 
 
2119
 
2120
 
2121
- /***/ }),
2122
- /* 77 */
2123
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
2124
 
2125
- var classof = __webpack_require__(30);
2126
- var global = __webpack_require__(3);
2127
 
2128
- module.exports = classof(global.process) == 'process';
 
 
 
2129
 
 
 
2130
 
2131
- /***/ }),
2132
- /* 78 */
2133
- /***/ (function(module, exports) {
2134
 
2135
- (function() { module.exports = window["wp"]["url"]; }());
2136
 
2137
  /***/ }),
2138
- /* 79 */
2139
- /***/ (function(module, exports) {
2140
-
2141
- exports.f = Object.getOwnPropertySymbols;
2142
 
 
 
2143
 
2144
- /***/ }),
2145
- /* 80 */
2146
- /***/ (function(module, exports) {
2147
-
2148
  function _extends() {
2149
- module.exports = _extends = Object.assign || function (target) {
2150
  for (var i = 1; i < arguments.length; i++) {
2151
  var source = arguments[i];
2152
 
@@ -2163,9600 +1753,8343 @@ function _extends() {
2163
  return _extends.apply(this, arguments);
2164
  }
2165
 
2166
- module.exports = _extends;
2167
-
2168
  /***/ }),
2169
- /* 81 */
2170
- /***/ (function(module, exports, __webpack_require__) {
2171
 
2172
- var global = __webpack_require__(3);
 
 
 
 
 
2173
 
2174
- module.exports = global;
 
 
 
 
 
2175
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2176
 
2177
- /***/ }),
2178
- /* 82 */
2179
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
2180
 
2181
- var wellKnownSymbol = __webpack_require__(8);
 
 
 
 
 
 
2182
 
2183
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2184
- var test = {};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2185
 
2186
- test[TO_STRING_TAG] = 'z';
 
 
 
 
 
 
2187
 
2188
- module.exports = String(test) === '[object z]';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2189
 
 
 
 
 
 
 
 
2190
 
2191
- /***/ }),
2192
- /* 83 */
2193
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
2194
 
2195
- var toIndexedObject = __webpack_require__(21);
2196
- var toLength = __webpack_require__(34);
2197
- var toAbsoluteIndex = __webpack_require__(97);
2198
-
2199
- // `Array.prototype.{ indexOf, includes }` methods implementation
2200
- var createMethod = function (IS_INCLUDES) {
2201
- return function ($this, el, fromIndex) {
2202
- var O = toIndexedObject($this);
2203
- var length = toLength(O.length);
2204
- var index = toAbsoluteIndex(fromIndex, length);
2205
- var value;
2206
- // Array#includes uses SameValueZero equality algorithm
2207
- // eslint-disable-next-line no-self-compare -- NaN check
2208
- if (IS_INCLUDES && el != el) while (length > index) {
2209
- value = O[index++];
2210
- // eslint-disable-next-line no-self-compare -- NaN check
2211
- if (value != value) return true;
2212
- // Array#indexOf ignores holes, Array#includes - not
2213
- } else for (;length > index; index++) {
2214
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
2215
- } return !IS_INCLUDES && -1;
2216
- };
2217
- };
2218
 
2219
- module.exports = {
2220
- // `Array.prototype.includes` method
2221
- // https://tc39.es/ecma262/#sec-array.prototype.includes
2222
- includes: createMethod(true),
2223
- // `Array.prototype.indexOf` method
2224
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
2225
- indexOf: createMethod(false)
2226
- };
2227
 
2228
 
2229
  /***/ }),
2230
- /* 84 */
2231
- /***/ (function(module, exports, __webpack_require__) {
2232
 
2233
- var classof = __webpack_require__(30);
 
2234
 
2235
- // `IsArray` abstract operation
2236
- // https://tc39.es/ecma262/#sec-isarray
2237
- module.exports = Array.isArray || function isArray(arg) {
2238
- return classof(arg) == 'Array';
2239
- };
2240
 
 
2241
 
2242
  /***/ }),
2243
- /* 85 */
 
2244
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2245
 
2246
  "use strict";
2247
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ADMIN_URL; });
2248
- /* unused harmony export COUNTRIES */
2249
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CURRENCY; });
2250
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return LOCALE; });
2251
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ORDER_STATUSES; });
2252
- /* unused harmony export SITE_TITLE */
2253
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return WC_ASSET_URL; });
2254
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getSetting; });
2255
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return setSetting; });
2256
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getAdminLink; });
2257
- /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(108);
2258
- /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);
2259
- /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37);
2260
- /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_1__);
2261
- /* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(107);
2262
- /* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_2__);
2263
- /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2);
2264
- /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
2265
-
2266
-
2267
 
 
 
2268
 
2269
- /**
2270
- * External dependencies
2271
- */
2272
- // Remove mutable data from settings object to prevent access. Data stores should be used instead.
2273
 
2274
- var mutableSources = ['wcAdminSettings', 'preloadSettings'];
2275
- var settings = (typeof wcSettings === "undefined" ? "undefined" : _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(wcSettings)) === 'object' ? wcSettings : {};
2276
- var SOURCE = Object.keys(settings).reduce(function (source, key) {
2277
- if (!mutableSources.includes(key)) {
2278
- source[key] = settings[key];
2279
- }
2280
 
2281
- return source;
2282
- }, {});
2283
- var ADMIN_URL = SOURCE.adminUrl;
2284
- var COUNTRIES = SOURCE.countries;
2285
- var CURRENCY = SOURCE.currency;
2286
- var LOCALE = SOURCE.locale;
2287
- var ORDER_STATUSES = SOURCE.orderStatuses;
2288
- var SITE_TITLE = SOURCE.siteTitle;
2289
- var WC_ASSET_URL = SOURCE.wcAssetUrl;
2290
  /**
2291
- * Retrieves a setting value from the setting state.
2292
  *
2293
- * @param {string} name The identifier for the setting.
2294
- * @param {*} [fallback=false] The value to use as a fallback
2295
- * if the setting is not in the
2296
- * state.
2297
- * @param {Function} [filter=( val ) => val] A callback for filtering the
2298
- * value before it's returned.
2299
- * Receives both the found value
2300
- * (if it exists for the key) and
2301
- * the provided fallback arg.
2302
  *
2303
- * @return {*} The value present in the settings state for the given
2304
- * name.
2305
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2306
 
2307
- function getSetting(name) {
2308
- var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
2309
- var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (val) {
2310
- return val;
2311
- };
2312
-
2313
- if (mutableSources.includes(name)) {
2314
- throw new Error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Mutable settings should be accessed via data store.'));
2315
  }
2316
-
2317
- var value = SOURCE.hasOwnProperty(name) ? SOURCE[name] : fallback;
2318
- return filter(value, fallback);
2319
  }
 
 
 
2320
  /**
2321
- * Sets a value to a property on the settings state.
2322
- *
2323
- * NOTE: This feature is to be removed in favour of data stores when a full migration
2324
- * is complete.
2325
  *
2326
- * @deprecated
2327
  *
2328
- * @param {string} name The setting property key for the
2329
- * setting being mutated.
2330
- * @param {*} value The value to set.
2331
- * @param {Function} [filter=( val ) => val] Allows for providing a callback
2332
- * to sanitize the setting (eg.
2333
- * ensure it's a number)
2334
  */
2335
 
2336
- function setSetting(name, value) {
2337
- var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (val) {
2338
- return val;
2339
- };
 
 
 
 
 
2340
 
2341
- if (mutableSources.includes(name)) {
2342
- throw new Error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Mutable settings should be mutated via data store.'));
2343
  }
2344
 
2345
- SOURCE[name] = filter(value);
 
2346
  }
 
 
2347
  /**
2348
- * Returns a string with the site's wp-admin URL appended. JS version of `admin_url`.
2349
- *
2350
- * @param {string} path Relative path.
2351
- * @return {string} Full admin URL.
2352
  */
2353
 
2354
- function getAdminLink(path) {
2355
- return (ADMIN_URL || '') + path;
2356
- }
2357
-
2358
- /***/ }),
2359
- /* 86 */
2360
- /***/ (function(module, exports, __webpack_require__) {
2361
-
2362
- var getBuiltIn = __webpack_require__(31);
2363
- var getOwnPropertyNamesModule = __webpack_require__(56);
2364
- var getOwnPropertySymbolsModule = __webpack_require__(79);
2365
- var anObject = __webpack_require__(9);
2366
 
2367
- // all object keys, includes non-enumerable and symbols
2368
- module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
2369
- var keys = getOwnPropertyNamesModule.f(anObject(it));
2370
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
2371
- return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
2372
- };
2373
 
2374
 
2375
- /***/ }),
2376
- /* 87 */
2377
- /***/ (function(module, exports, __webpack_require__) {
2378
 
2379
- var getBuiltIn = __webpack_require__(31);
 
 
2380
 
2381
- module.exports = getBuiltIn('navigator', 'userAgent') || '';
 
 
2382
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2383
 
2384
  /***/ }),
2385
- /* 88 */
 
2386
  /***/ (function(module, exports, __webpack_require__) {
2387
 
2388
- "use strict";
 
 
 
 
 
2389
 
2390
- var $ = __webpack_require__(12);
2391
- var exec = __webpack_require__(91);
2392
 
2393
- // `RegExp.prototype.exec` method
2394
- // https://tc39.es/ecma262/#sec-regexp.prototype.exec
2395
- $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2396
- exec: exec
2397
- });
 
 
 
 
 
2398
 
 
2399
 
2400
  /***/ }),
2401
- /* 89 */
2402
- /***/ (function(module, exports, __webpack_require__) {
2403
 
2404
- var fails = __webpack_require__(6);
2405
- var wellKnownSymbol = __webpack_require__(8);
2406
- var V8_VERSION = __webpack_require__(63);
2407
 
2408
- var SPECIES = wellKnownSymbol('species');
2409
 
2410
- module.exports = function (METHOD_NAME) {
2411
- // We can't use this feature detection in V8 since it causes
2412
- // deoptimization and serious performance degradation
2413
- // https://github.com/zloirock/core-js/issues/677
2414
- return V8_VERSION >= 51 || !fails(function () {
2415
- var array = [];
2416
- var constructor = array.constructor = {};
2417
- constructor[SPECIES] = function () {
2418
- return { foo: 1 };
2419
- };
2420
- return array[METHOD_NAME](Boolean).foo !== 1;
2421
- });
2422
- };
2423
 
 
 
2424
 
2425
- /***/ }),
2426
- /* 90 */
2427
- /***/ (function(module, exports, __webpack_require__) {
2428
 
2429
- var defineProperty = __webpack_require__(17).f;
2430
- var has = __webpack_require__(11);
2431
- var wellKnownSymbol = __webpack_require__(8);
 
2432
 
2433
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
 
2434
 
2435
- module.exports = function (it, TAG, STATIC) {
2436
- if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
2437
- defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
 
 
 
2438
  }
2439
- };
2440
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2441
 
2442
  /***/ }),
2443
- /* 91 */
 
2444
  /***/ (function(module, exports, __webpack_require__) {
2445
 
2446
  "use strict";
 
 
 
 
 
 
2447
 
2448
- var regexpFlags = __webpack_require__(114);
2449
- var stickyHelpers = __webpack_require__(137);
2450
-
2451
- var nativeExec = RegExp.prototype.exec;
2452
- // This always refers to the native implementation, because the
2453
- // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
2454
- // which loads this file before patching the method.
2455
- var nativeReplace = String.prototype.replace;
2456
 
2457
- var patchedExec = nativeExec;
2458
 
2459
- var UPDATES_LAST_INDEX_WRONG = (function () {
2460
- var re1 = /a/;
2461
- var re2 = /b*/g;
2462
- nativeExec.call(re1, 'a');
2463
- nativeExec.call(re2, 'a');
2464
- return re1.lastIndex !== 0 || re2.lastIndex !== 0;
2465
- })();
2466
 
2467
- var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;
 
 
2468
 
2469
- // nonparticipating capturing group, copied from es5-shim's String#split patch.
2470
- // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
2471
- var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
2472
 
2473
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
 
2474
 
2475
- if (PATCH) {
2476
- patchedExec = function exec(str) {
2477
- var re = this;
2478
- var lastIndex, reCopy, match, i;
2479
- var sticky = UNSUPPORTED_Y && re.sticky;
2480
- var flags = regexpFlags.call(re);
2481
- var source = re.source;
2482
- var charsAdded = 0;
2483
- var strCopy = str;
2484
 
2485
- if (sticky) {
2486
- flags = flags.replace('y', '');
2487
- if (flags.indexOf('g') === -1) {
2488
- flags += 'g';
2489
- }
2490
 
2491
- strCopy = String(str).slice(re.lastIndex);
2492
- // Support anchored sticky behavior.
2493
- if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
2494
- source = '(?: ' + source + ')';
2495
- strCopy = ' ' + strCopy;
2496
- charsAdded++;
2497
- }
2498
- // ^(? + rx + ) is needed, in combination with some str slicing, to
2499
- // simulate the 'y' flag.
2500
- reCopy = new RegExp('^(?:' + source + ')', flags);
2501
- }
2502
-
2503
- if (NPCG_INCLUDED) {
2504
- reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
2505
- }
2506
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
2507
-
2508
- match = nativeExec.call(sticky ? reCopy : re, strCopy);
2509
-
2510
- if (sticky) {
2511
- if (match) {
2512
- match.input = match.input.slice(charsAdded);
2513
- match[0] = match[0].slice(charsAdded);
2514
- match.index = re.lastIndex;
2515
- re.lastIndex += match[0].length;
2516
- } else re.lastIndex = 0;
2517
- } else if (UPDATES_LAST_INDEX_WRONG && match) {
2518
- re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
2519
- }
2520
- if (NPCG_INCLUDED && match && match.length > 1) {
2521
- // Fix browsers whose `exec` methods don't consistently return `undefined`
2522
- // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
2523
- nativeReplace.call(match[0], reCopy, function () {
2524
- for (i = 1; i < arguments.length - 2; i++) {
2525
- if (arguments[i] === undefined) match[i] = undefined;
2526
- }
2527
- });
2528
- }
2529
 
2530
- return match;
 
 
 
 
2531
  };
 
 
 
 
 
2532
  }
2533
 
2534
- module.exports = patchedExec;
 
 
 
 
 
 
 
 
 
2535
 
 
 
 
 
 
 
 
2536
 
2537
- /***/ }),
2538
- /* 92 */
2539
- /***/ (function(module, exports) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2540
 
2541
- (function() { module.exports = window["wc"]["tracks"]; }());
 
 
 
2542
 
2543
- /***/ }),
2544
- /* 93 */
2545
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2546
 
2547
- var NATIVE_SYMBOL = __webpack_require__(62);
 
 
 
2548
 
2549
- module.exports = NATIVE_SYMBOL
2550
- /* global Symbol -- safe */
2551
- && !Symbol.sham
2552
- && typeof Symbol.iterator == 'symbol';
2553
 
 
 
 
 
2554
 
2555
- /***/ }),
2556
- /* 94 */
2557
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
2558
 
2559
- var aFunction = __webpack_require__(70);
 
2560
 
2561
- // optional / simple context binding
2562
- module.exports = function (fn, that, length) {
2563
- aFunction(fn);
2564
- if (that === undefined) return fn;
2565
- switch (length) {
2566
- case 0: return function () {
2567
- return fn.call(that);
2568
- };
2569
- case 1: return function (a) {
2570
- return fn.call(that, a);
2571
- };
2572
- case 2: return function (a, b) {
2573
- return fn.call(that, a, b);
2574
- };
2575
- case 3: return function (a, b, c) {
2576
- return fn.call(that, a, b, c);
2577
- };
2578
  }
2579
- return function (/* ...args */) {
2580
- return fn.apply(that, arguments);
2581
- };
2582
  };
2583
 
 
 
 
 
 
 
 
 
 
 
 
 
2584
 
2585
- /***/ }),
2586
- /* 95 */
2587
- /***/ (function(module, exports) {
2588
-
2589
- (function() { module.exports = window["wp"]["apiFetch"]; }());
2590
-
2591
- /***/ }),
2592
- /* 96 */
2593
- /***/ (function(module, exports) {
 
 
2594
 
2595
- var g;
 
 
 
 
 
 
 
 
 
2596
 
2597
- // This works in non-strict mode
2598
- g = (function() {
2599
- return this;
2600
- })();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2601
 
2602
- try {
2603
- // This works if eval is allowed (see CSP)
2604
- g = g || new Function("return this")();
2605
- } catch (e) {
2606
- // This works if the window reference is available
2607
- if (typeof window === "object") g = window;
 
 
 
 
 
 
 
2608
  }
2609
 
2610
- // g can still be undefined, but nothing to do about it...
2611
- // We return undefined, instead of nothing here, so it's
2612
- // easier to handle this case. if(!global) { ...}
2613
 
2614
- module.exports = g;
2615
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2616
 
2617
- /***/ }),
2618
- /* 97 */
2619
- /***/ (function(module, exports, __webpack_require__) {
 
 
2620
 
2621
- var toInteger = __webpack_require__(42);
2622
 
2623
- var max = Math.max;
2624
- var min = Math.min;
 
 
 
 
 
 
 
2625
 
2626
- // Helper for a popular repeating case of the spec:
2627
- // Let integer be ? ToInteger(index).
2628
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
2629
- module.exports = function (index, length) {
2630
- var integer = toInteger(index);
2631
- return integer < 0 ? max(integer + length, 0) : min(integer, length);
2632
- };
2633
 
2634
 
2635
  /***/ }),
2636
- /* 98 */
 
2637
  /***/ (function(module, exports, __webpack_require__) {
2638
 
2639
- var getBuiltIn = __webpack_require__(31);
 
 
 
 
 
 
 
2640
 
2641
- module.exports = getBuiltIn('document', 'documentElement');
2642
 
2643
 
2644
- /***/ }),
2645
- /* 99 */,
2646
- /* 100 */
2647
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
2648
 
2649
- var TO_STRING_TAG_SUPPORT = __webpack_require__(82);
2650
- var redefine = __webpack_require__(27);
2651
- var toString = __webpack_require__(130);
2652
 
2653
- // `Object.prototype.toString` method
2654
- // https://tc39.es/ecma262/#sec-object.prototype.tostring
2655
- if (!TO_STRING_TAG_SUPPORT) {
2656
- redefine(Object.prototype, 'toString', toString, { unsafe: true });
2657
- }
2658
 
 
 
2659
 
2660
- /***/ }),
2661
- /* 101 */
2662
- /***/ (function(module, exports) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2663
 
2664
- (function() { module.exports = window["wc"]["date"]; }());
2665
 
2666
  /***/ }),
2667
- /* 102 */
2668
- /***/ (function(module, exports, __webpack_require__) {
2669
 
2670
- "use strict";
 
2671
 
2672
- var toPrimitive = __webpack_require__(40);
2673
- var definePropertyModule = __webpack_require__(17);
2674
- var createPropertyDescriptor = __webpack_require__(39);
2675
 
2676
- module.exports = function (object, key, value) {
2677
- var propertyKey = toPrimitive(key);
2678
- if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
2679
- else object[propertyKey] = value;
2680
- };
2681
 
 
 
2682
 
2683
- /***/ }),
2684
- /* 103 */
2685
- /***/ (function(module, exports, __webpack_require__) {
2686
 
2687
- var has = __webpack_require__(11);
2688
- var ownKeys = __webpack_require__(86);
2689
- var getOwnPropertyDescriptorModule = __webpack_require__(33);
2690
- var definePropertyModule = __webpack_require__(17);
 
 
 
 
 
2691
 
2692
- module.exports = function (target, source) {
2693
- var keys = ownKeys(source);
2694
- var defineProperty = definePropertyModule.f;
2695
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
2696
- for (var i = 0; i < keys.length; i++) {
2697
- var key = keys[i];
2698
- if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
2699
- }
2700
- };
2701
 
2702
 
2703
- /***/ }),
2704
- /* 104 */
2705
- /***/ (function(module, exports, __webpack_require__) {
2706
 
2707
- var DESCRIPTORS = __webpack_require__(13);
2708
- var definePropertyModule = __webpack_require__(17);
2709
- var anObject = __webpack_require__(9);
2710
- var objectKeys = __webpack_require__(54);
2711
-
2712
- // `Object.defineProperties` method
2713
- // https://tc39.es/ecma262/#sec-object.defineproperties
2714
- module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
2715
- anObject(O);
2716
- var keys = objectKeys(Properties);
2717
- var length = keys.length;
2718
- var index = 0;
2719
- var key;
2720
- while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
2721
- return O;
2722
- };
2723
 
 
 
 
2724
 
2725
  /***/ }),
2726
- /* 105 */
2727
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
2728
 
2729
  "use strict";
2730
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Navigation; });
2731
- /* unused harmony export NavigationBackButton */
2732
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NavigationGroup; });
2733
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return NavigationMenu; });
2734
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return NavigationItem; });
2735
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return Text; });
2736
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return useSlot; });
2737
- /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
2738
- /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
2739
  /**
2740
- * External dependencies
 
 
 
 
2741
  */
2742
 
2743
- /**
2744
- * Prioritize exports of non-experimental components over experimental.
2745
- */
2746
 
2747
- var Navigation = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["Navigation"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalNavigation"];
2748
- var NavigationBackButton = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["NavigationBackButton"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalNavigationBackButton"];
2749
- var NavigationGroup = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["NavigationGroup"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalNavigationGroup"];
2750
- var NavigationMenu = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["NavigationMenu"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalNavigationMenu"];
2751
- var NavigationItem = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["NavigationItem"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalNavigationItem"];
2752
- var Text = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["Text"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalText"];
2753
- var useSlot = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["useSlot"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalUseSlot"];
2754
 
2755
- /***/ }),
2756
- /* 106 */
2757
- /***/ (function(module, exports, __webpack_require__) {
2758
 
2759
- var global = __webpack_require__(3);
2760
- var inspectSource = __webpack_require__(68);
 
 
 
 
2761
 
2762
- var WeakMap = global.WeakMap;
2763
 
2764
- module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
2765
 
 
2766
 
2767
  /***/ }),
2768
- /* 107 */
 
2769
  /***/ (function(module, exports, __webpack_require__) {
2770
 
2771
  "use strict";
2772
 
2773
- var $ = __webpack_require__(12);
2774
- var $includes = __webpack_require__(83).includes;
2775
- var addToUnscopables = __webpack_require__(118);
2776
 
2777
- // `Array.prototype.includes` method
2778
- // https://tc39.es/ecma262/#sec-array.prototype.includes
2779
- $({ target: 'Array', proto: true }, {
2780
- includes: function includes(el /* , fromIndex = 0 */) {
2781
- return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2782
- }
2783
- });
2784
-
2785
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2786
- addToUnscopables('includes');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2787
 
 
 
 
 
 
2788
 
2789
  /***/ }),
2790
- /* 108 */
2791
- /***/ (function(module, exports) {
2792
 
2793
- function _typeof(obj) {
2794
- "@babel/helpers - typeof";
2795
 
2796
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
2797
- module.exports = _typeof = function _typeof(obj) {
2798
- return typeof obj;
2799
- };
2800
- } else {
2801
- module.exports = _typeof = function _typeof(obj) {
2802
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2803
- };
2804
  }
2805
 
2806
- return _typeof(obj);
2807
  }
2808
 
2809
- module.exports = _typeof;
2810
 
2811
  /***/ }),
2812
- /* 109 */
2813
- /***/ (function(module, exports, __webpack_require__) {
2814
 
2815
- var isObject = __webpack_require__(10);
2816
- var isArray = __webpack_require__(84);
2817
- var wellKnownSymbol = __webpack_require__(8);
2818
-
2819
- var SPECIES = wellKnownSymbol('species');
2820
-
2821
- // `ArraySpeciesCreate` abstract operation
2822
- // https://tc39.es/ecma262/#sec-arrayspeciescreate
2823
- module.exports = function (originalArray, length) {
2824
- var C;
2825
- if (isArray(originalArray)) {
2826
- C = originalArray.constructor;
2827
- // cross-realm fallback
2828
- if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
2829
- else if (isObject(C)) {
2830
- C = C[SPECIES];
2831
- if (C === null) C = undefined;
2832
- }
2833
- } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
2834
- };
 
 
 
 
 
2835
 
 
 
2836
 
2837
  /***/ }),
2838
- /* 110 */
 
2839
  /***/ (function(module, exports) {
2840
 
2841
- module.exports = {};
 
 
 
 
 
 
 
 
 
 
 
 
 
2842
 
 
2843
 
2844
  /***/ }),
2845
- /* 111 */
2846
- /***/ (function(module, exports, __webpack_require__) {
 
2847
 
2848
  "use strict";
2849
 
2850
- // TODO: Remove from `core-js@4` since it's moved to entry points
2851
- __webpack_require__(88);
2852
- var redefine = __webpack_require__(27);
2853
- var fails = __webpack_require__(6);
2854
- var wellKnownSymbol = __webpack_require__(8);
2855
- var regexpExec = __webpack_require__(91);
2856
- var createNonEnumerableProperty = __webpack_require__(19);
2857
-
2858
- var SPECIES = wellKnownSymbol('species');
2859
-
2860
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
2861
- // #replace needs built-in support for named groups.
2862
- // #match works fine because it just return the exec results, even if it has
2863
- // a "grops" property.
2864
- var re = /./;
2865
- re.exec = function () {
2866
- var result = [];
2867
- result.groups = { a: '7' };
2868
- return result;
2869
- };
2870
- return ''.replace(re, '$<a>') !== '7';
2871
- });
2872
 
2873
- // IE <= 11 replaces $0 with the whole match, as if it was $&
2874
- // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
2875
- var REPLACE_KEEPS_$0 = (function () {
2876
- return 'a'.replace(/./, '$0') === '$0';
2877
- })();
2878
 
2879
- var REPLACE = wellKnownSymbol('replace');
2880
- // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
2881
- var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
2882
- if (/./[REPLACE]) {
2883
- return /./[REPLACE]('a', '$0') === '';
2884
- }
2885
- return false;
2886
- })();
2887
 
2888
- // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
2889
- // Weex JS has frozen built-in prototypes, so use try / catch wrapper
2890
- var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
2891
- // eslint-disable-next-line regexp/no-empty-group -- required for testing
2892
- var re = /(?:)/;
2893
- var originalExec = re.exec;
2894
- re.exec = function () { return originalExec.apply(this, arguments); };
2895
- var result = 'ab'.split(re);
2896
- return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
2897
- });
2898
 
2899
- module.exports = function (KEY, length, exec, sham) {
2900
- var SYMBOL = wellKnownSymbol(KEY);
2901
 
2902
- var DELEGATES_TO_SYMBOL = !fails(function () {
2903
- // String methods call symbol-named RegEp methods
2904
- var O = {};
2905
- O[SYMBOL] = function () { return 7; };
2906
- return ''[KEY](O) != 7;
2907
- });
2908
 
2909
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
2910
- // Symbol-named RegExp methods call .exec
2911
- var execCalled = false;
2912
- var re = /a/;
2913
 
2914
- if (KEY === 'split') {
2915
- // We can't use real regex here since it causes deoptimization
2916
- // and serious performance degradation in V8
2917
- // https://github.com/zloirock/core-js/issues/306
2918
- re = {};
2919
- // RegExp[@@split] doesn't call the regex's exec method, but first creates
2920
- // a new one. We need to return the patched regex when creating the new one.
2921
- re.constructor = {};
2922
- re.constructor[SPECIES] = function () { return re; };
2923
- re.flags = '';
2924
- re[SYMBOL] = /./[SYMBOL];
2925
- }
 
 
 
 
2926
 
2927
- re.exec = function () { execCalled = true; return null; };
 
 
 
2928
 
2929
- re[SYMBOL]('');
2930
- return !execCalled;
2931
- });
2932
 
2933
- if (
2934
- !DELEGATES_TO_SYMBOL ||
2935
- !DELEGATES_TO_EXEC ||
2936
- (KEY === 'replace' && !(
2937
- REPLACE_SUPPORTS_NAMED_GROUPS &&
2938
- REPLACE_KEEPS_$0 &&
2939
- !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
2940
- )) ||
2941
- (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
2942
- ) {
2943
- var nativeRegExpMethod = /./[SYMBOL];
2944
- var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
2945
- if (regexp.exec === regexpExec) {
2946
- if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
2947
- // The native String method already delegates to @@method (this
2948
- // polyfilled function), leasing to infinite recursion.
2949
- // We avoid it by directly calling the native @@method method.
2950
- return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
2951
- }
2952
- return { done: true, value: nativeMethod.call(str, regexp, arg2) };
2953
- }
2954
- return { done: false };
2955
- }, {
2956
- REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
2957
- REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
2958
- });
2959
- var stringMethod = methods[0];
2960
- var regexMethod = methods[1];
2961
-
2962
- redefine(String.prototype, KEY, stringMethod);
2963
- redefine(RegExp.prototype, SYMBOL, length == 2
2964
- // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
2965
- // 21.2.5.11 RegExp.prototype[@@split](string, limit)
2966
- ? function (string, arg) { return regexMethod.call(string, this, arg); }
2967
- // 21.2.5.6 RegExp.prototype[@@match](string)
2968
- // 21.2.5.9 RegExp.prototype[@@search](string)
2969
- : function (string) { return regexMethod.call(string, this); }
2970
- );
2971
  }
2972
 
2973
- if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
2974
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2975
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2976
 
2977
- /***/ }),
2978
- /* 112 */
2979
- /***/ (function(module, exports, __webpack_require__) {
2980
 
2981
- var classof = __webpack_require__(30);
2982
- var regexpExec = __webpack_require__(91);
 
 
 
 
 
 
2983
 
2984
- // `RegExpExec` abstract operation
2985
- // https://tc39.es/ecma262/#sec-regexpexec
2986
- module.exports = function (R, S) {
2987
- var exec = R.exec;
2988
- if (typeof exec === 'function') {
2989
- var result = exec.call(R, S);
2990
- if (typeof result !== 'object') {
2991
- throw TypeError('RegExp exec method returned something other than an Object or null');
2992
- }
2993
- return result;
2994
  }
 
 
 
 
 
 
 
 
2995
 
2996
- if (classof(R) !== 'RegExp') {
2997
- throw TypeError('RegExp#exec called on incompatible receiver');
2998
- }
2999
 
3000
- return regexpExec.call(R, S);
3001
- };
 
3002
 
 
 
 
3003
 
 
 
 
 
 
 
 
 
 
3004
 
3005
- /***/ }),
3006
- /* 113 */
3007
- /***/ (function(module, exports, __webpack_require__) {
3008
 
3009
- var TO_STRING_TAG_SUPPORT = __webpack_require__(82);
3010
- var classofRaw = __webpack_require__(30);
3011
- var wellKnownSymbol = __webpack_require__(8);
3012
 
3013
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
3014
- // ES3 wrong here
3015
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3016
 
3017
- // fallback for IE11 Script Access Denied error
3018
- var tryGet = function (it, key) {
3019
- try {
3020
- return it[key];
3021
- } catch (error) { /* empty */ }
3022
- };
3023
 
3024
- // getting tag from ES6+ `Object.prototype.toString`
3025
- module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
3026
- var O, tag, result;
3027
- return it === undefined ? 'Undefined' : it === null ? 'Null'
3028
- // @@toStringTag case
3029
- : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
3030
- // builtinTag case
3031
- : CORRECT_ARGUMENTS ? classofRaw(O)
3032
- // ES3 arguments fallback
3033
- : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
3034
- };
3035
 
3036
 
3037
- /***/ }),
3038
- /* 114 */
3039
- /***/ (function(module, exports, __webpack_require__) {
3040
 
3041
- "use strict";
 
 
3042
 
3043
- var anObject = __webpack_require__(9);
3044
-
3045
- // `RegExp.prototype.flags` getter implementation
3046
- // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
3047
- module.exports = function () {
3048
- var that = anObject(this);
3049
- var result = '';
3050
- if (that.global) result += 'g';
3051
- if (that.ignoreCase) result += 'i';
3052
- if (that.multiline) result += 'm';
3053
- if (that.dotAll) result += 's';
3054
- if (that.unicode) result += 'u';
3055
- if (that.sticky) result += 'y';
3056
- return result;
3057
  };
 
 
 
 
 
3058
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3059
 
3060
- /***/ }),
3061
- /* 115 */,
3062
- /* 116 */
3063
- /***/ (function(module, exports, __webpack_require__) {
 
 
3064
 
3065
- var objectWithoutPropertiesLoose = __webpack_require__(233);
 
 
3066
 
3067
- function _objectWithoutProperties(source, excluded) {
3068
- if (source == null) return {};
3069
- var target = objectWithoutPropertiesLoose(source, excluded);
3070
- var key, i;
3071
 
3072
- if (Object.getOwnPropertySymbols) {
3073
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 
 
3074
 
3075
- for (i = 0; i < sourceSymbolKeys.length; i++) {
3076
- key = sourceSymbolKeys[i];
3077
- if (excluded.indexOf(key) >= 0) continue;
3078
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
3079
- target[key] = source[key];
3080
  }
 
 
3081
  }
3082
 
3083
- return target;
 
 
 
 
3084
  }
3085
 
3086
- module.exports = _objectWithoutProperties;
 
3087
 
3088
- /***/ }),
3089
- /* 117 */
3090
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
3091
 
3092
- "use strict";
3093
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
3094
- function _extends() {
3095
- _extends = Object.assign || function (target) {
3096
- for (var i = 1; i < arguments.length; i++) {
3097
- var source = arguments[i];
3098
 
3099
- for (var key in source) {
3100
- if (Object.prototype.hasOwnProperty.call(source, key)) {
3101
- target[key] = source[key];
3102
- }
3103
- }
3104
- }
3105
 
3106
- return target;
3107
- };
 
3108
 
3109
- return _extends.apply(this, arguments);
 
 
 
3110
  }
3111
 
3112
- /***/ }),
3113
- /* 118 */
3114
- /***/ (function(module, exports, __webpack_require__) {
3115
-
3116
- var wellKnownSymbol = __webpack_require__(8);
3117
- var create = __webpack_require__(69);
3118
- var definePropertyModule = __webpack_require__(17);
3119
 
3120
- var UNSCOPABLES = wellKnownSymbol('unscopables');
3121
- var ArrayPrototype = Array.prototype;
 
 
3122
 
3123
- // Array.prototype[@@unscopables]
3124
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3125
- if (ArrayPrototype[UNSCOPABLES] == undefined) {
3126
- definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
3127
- configurable: true,
3128
- value: create(null)
3129
- });
3130
  }
3131
 
3132
- // add a key to Array.prototype[@@unscopables]
3133
- module.exports = function (key) {
3134
- ArrayPrototype[UNSCOPABLES][key] = true;
3135
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3136
 
 
 
 
 
 
 
3137
 
3138
- /***/ }),
3139
- /* 119 */
3140
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
3141
 
3142
- var wellKnownSymbol = __webpack_require__(8);
3143
 
3144
- exports.f = wellKnownSymbol;
 
 
 
 
3145
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3146
 
3147
- /***/ }),
3148
- /* 120 */,
3149
- /* 121 */
3150
- /***/ (function(module, exports, __webpack_require__) {
3151
 
3152
- "use strict";
 
 
3153
 
3154
- var fails = __webpack_require__(6);
 
 
3155
 
3156
- module.exports = function (METHOD_NAME, argument) {
3157
- var method = [][METHOD_NAME];
3158
- return !!method && fails(function () {
3159
- // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
3160
- method.call(null, argument || function () { throw 1; }, 1);
3161
  });
3162
- };
3163
 
 
 
 
3164
 
3165
- /***/ }),
3166
- /* 122 */
3167
- /***/ (function(module, exports, __webpack_require__) {
3168
-
3169
- "use strict";
3170
 
3171
- var charAt = __webpack_require__(125).charAt;
 
 
3172
 
3173
- // `AdvanceStringIndex` abstract operation
3174
- // https://tc39.es/ecma262/#sec-advancestringindex
3175
- module.exports = function (S, index, unicode) {
3176
- return index + (unicode ? charAt(S, index).length : 1);
3177
- };
3178
 
 
 
 
3179
 
3180
- /***/ }),
3181
- /* 123 */
3182
- /***/ (function(module, exports, __webpack_require__) {
 
3183
 
3184
- "use strict";
3185
 
3186
- var toIndexedObject = __webpack_require__(21);
3187
- var addToUnscopables = __webpack_require__(118);
3188
- var Iterators = __webpack_require__(110);
3189
- var InternalStateModule = __webpack_require__(45);
3190
- var defineIterator = __webpack_require__(166);
3191
-
3192
- var ARRAY_ITERATOR = 'Array Iterator';
3193
- var setInternalState = InternalStateModule.set;
3194
- var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
3195
-
3196
- // `Array.prototype.entries` method
3197
- // https://tc39.es/ecma262/#sec-array.prototype.entries
3198
- // `Array.prototype.keys` method
3199
- // https://tc39.es/ecma262/#sec-array.prototype.keys
3200
- // `Array.prototype.values` method
3201
- // https://tc39.es/ecma262/#sec-array.prototype.values
3202
- // `Array.prototype[@@iterator]` method
3203
- // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
3204
- // `CreateArrayIterator` internal method
3205
- // https://tc39.es/ecma262/#sec-createarrayiterator
3206
- module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
3207
- setInternalState(this, {
3208
- type: ARRAY_ITERATOR,
3209
- target: toIndexedObject(iterated), // target
3210
- index: 0, // next index
3211
- kind: kind // kind
3212
- });
3213
- // `%ArrayIteratorPrototype%.next` method
3214
- // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
3215
- }, function () {
3216
- var state = getInternalState(this);
3217
- var target = state.target;
3218
- var kind = state.kind;
3219
- var index = state.index++;
3220
- if (!target || index >= target.length) {
3221
- state.target = undefined;
3222
- return { value: undefined, done: true };
3223
- }
3224
- if (kind == 'keys') return { value: index, done: false };
3225
- if (kind == 'values') return { value: target[index], done: false };
3226
- return { value: [index, target[index]], done: false };
3227
- }, 'values');
3228
 
3229
- // argumentsList[@@iterator] is %ArrayProto_values%
3230
- // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
3231
- // https://tc39.es/ecma262/#sec-createmappedargumentsobject
3232
- Iterators.Arguments = Iterators.Array;
 
3233
 
3234
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3235
- addToUnscopables('keys');
3236
- addToUnscopables('values');
3237
- addToUnscopables('entries');
 
 
 
 
3238
 
 
 
 
 
 
 
 
 
 
 
 
3239
 
3240
- /***/ }),
3241
- /* 124 */
3242
- /***/ (function(module, exports) {
 
 
 
 
 
 
 
 
 
 
 
 
3243
 
3244
- function _arrayLikeToArray(arr, len) {
3245
- if (len == null || len > arr.length) len = arr.length;
3246
 
3247
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
3248
- arr2[i] = arr[i];
 
3249
  }
3250
-
3251
- return arr2;
3252
  }
 
 
 
 
 
3253
 
3254
- module.exports = _arrayLikeToArray;
3255
 
3256
- /***/ }),
3257
- /* 125 */
3258
- /***/ (function(module, exports, __webpack_require__) {
3259
 
3260
- var toInteger = __webpack_require__(42);
3261
- var requireObjectCoercible = __webpack_require__(32);
3262
-
3263
- // `String.prototype.{ codePointAt, at }` methods implementation
3264
- var createMethod = function (CONVERT_TO_STRING) {
3265
- return function ($this, pos) {
3266
- var S = String(requireObjectCoercible($this));
3267
- var position = toInteger(pos);
3268
- var size = S.length;
3269
- var first, second;
3270
- if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
3271
- first = S.charCodeAt(position);
3272
- return first < 0xD800 || first > 0xDBFF || position + 1 === size
3273
- || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
3274
- ? CONVERT_TO_STRING ? S.charAt(position) : first
3275
- : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
3276
- };
3277
  };
 
 
 
 
 
3278
 
3279
- module.exports = {
3280
- // `String.prototype.codePointAt` method
3281
- // https://tc39.es/ecma262/#sec-string.prototype.codepointat
3282
- codeAt: createMethod(false),
3283
- // `String.prototype.at` method
3284
- // https://github.com/mathiasbynens/String.prototype.at
3285
- charAt: createMethod(true)
3286
- };
3287
 
 
 
 
 
 
 
 
 
 
 
 
3288
 
3289
- /***/ }),
3290
- /* 126 */
3291
- /***/ (function(module, exports) {
3292
 
3293
- (function() { module.exports = window["wp"]["keycodes"]; }());
 
 
 
 
 
 
 
3294
 
3295
- /***/ }),
3296
- /* 127 */
3297
- /***/ (function(module, exports) {
 
 
 
 
 
 
3298
 
3299
- // iterable DOM collections
3300
- // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
3301
- module.exports = {
3302
- CSSRuleList: 0,
3303
- CSSStyleDeclaration: 0,
3304
- CSSValueList: 0,
3305
- ClientRectList: 0,
3306
- DOMRectList: 0,
3307
- DOMStringList: 0,
3308
- DOMTokenList: 1,
3309
- DataTransferItemList: 0,
3310
- FileList: 0,
3311
- HTMLAllCollection: 0,
3312
- HTMLCollection: 0,
3313
- HTMLFormElement: 0,
3314
- HTMLSelectElement: 0,
3315
- MediaList: 0,
3316
- MimeTypeArray: 0,
3317
- NamedNodeMap: 0,
3318
- NodeList: 1,
3319
- PaintRequestList: 0,
3320
- Plugin: 0,
3321
- PluginArray: 0,
3322
- SVGLengthList: 0,
3323
- SVGNumberList: 0,
3324
- SVGPathSegList: 0,
3325
- SVGPointList: 0,
3326
- SVGStringList: 0,
3327
- SVGTransformList: 0,
3328
- SourceBufferList: 0,
3329
- StyleSheetList: 0,
3330
- TextTrackCueList: 0,
3331
- TextTrackList: 0,
3332
- TouchList: 0
3333
- };
3334
 
3335
 
3336
- /***/ }),
3337
- /* 128 */
3338
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3339
 
3340
- "use strict";
3341
 
3342
- // EXPORTS
3343
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inheritsLoose; });
3344
 
3345
- // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
3346
- function _setPrototypeOf(o, p) {
3347
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
3348
- o.__proto__ = p;
3349
- return o;
3350
- };
3351
 
3352
- return _setPrototypeOf(o, p);
3353
- }
3354
- // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
3355
 
3356
- function _inheritsLoose(subClass, superClass) {
3357
- subClass.prototype = Object.create(superClass.prototype);
3358
- subClass.prototype.constructor = subClass;
3359
- _setPrototypeOf(subClass, superClass);
3360
- }
3361
 
3362
- /***/ }),
3363
- /* 129 */
3364
- /***/ (function(module, exports, __webpack_require__) {
3365
 
3366
- var DESCRIPTORS = __webpack_require__(13);
3367
- var defineProperty = __webpack_require__(17).f;
3368
-
3369
- var FunctionPrototype = Function.prototype;
3370
- var FunctionPrototypeToString = FunctionPrototype.toString;
3371
- var nameRE = /^\s*function ([^ (]*)/;
3372
- var NAME = 'name';
3373
-
3374
- // Function instances `.name` property
3375
- // https://tc39.es/ecma262/#sec-function-instances-name
3376
- if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
3377
- defineProperty(FunctionPrototype, NAME, {
3378
- configurable: true,
3379
- get: function () {
3380
- try {
3381
- return FunctionPrototypeToString.call(this).match(nameRE)[1];
3382
- } catch (error) {
3383
- return '';
3384
- }
3385
- }
3386
- });
3387
  }
3388
 
 
 
3389
 
3390
- /***/ }),
3391
- /* 130 */
3392
- /***/ (function(module, exports, __webpack_require__) {
3393
 
3394
- "use strict";
 
 
3395
 
3396
- var TO_STRING_TAG_SUPPORT = __webpack_require__(82);
3397
- var classof = __webpack_require__(113);
 
3398
 
3399
- // `Object.prototype.toString` method implementation
3400
- // https://tc39.es/ecma262/#sec-object.prototype.tostring
3401
- module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
3402
- return '[object ' + classof(this) + ']';
3403
- };
 
3404
 
 
 
 
3405
 
3406
- /***/ }),
3407
- /* 131 */
3408
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
3409
 
3410
- var arrayLikeToArray = __webpack_require__(124);
 
 
 
3411
 
3412
- function _unsupportedIterableToArray(o, minLen) {
3413
- if (!o) return;
3414
- if (typeof o === "string") return arrayLikeToArray(o, minLen);
3415
- var n = Object.prototype.toString.call(o).slice(8, -1);
3416
- if (n === "Object" && o.constructor) n = o.constructor.name;
3417
- if (n === "Map" || n === "Set") return Array.from(o);
3418
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
3419
- }
3420
 
3421
- module.exports = _unsupportedIterableToArray;
3422
 
3423
- /***/ }),
3424
- /* 132 */
3425
- /***/ (function(module, exports) {
3426
 
3427
- (function() { module.exports = window["wp"]["htmlEntities"]; }());
 
 
3428
 
3429
- /***/ }),
3430
- /* 133 */
3431
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3432
 
3433
- "use strict";
3434
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
3435
- function _objectWithoutPropertiesLoose(source, excluded) {
3436
- if (source == null) return {};
3437
- var target = {};
3438
- var sourceKeys = Object.keys(source);
3439
- var key, i;
3440
 
3441
- for (i = 0; i < sourceKeys.length; i++) {
3442
- key = sourceKeys[i];
3443
- if (excluded.indexOf(key) >= 0) continue;
3444
- target[key] = source[key];
3445
- }
3446
 
3447
- return target;
3448
- }
3449
 
3450
- /***/ }),
3451
- /* 134 */
3452
- /***/ (function(module, exports) {
3453
 
3454
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
3455
- try {
3456
- var info = gen[key](arg);
3457
- var value = info.value;
3458
- } catch (error) {
3459
- reject(error);
3460
- return;
3461
- }
3462
 
3463
- if (info.done) {
3464
- resolve(value);
3465
- } else {
3466
- Promise.resolve(value).then(_next, _throw);
3467
- }
3468
- }
3469
 
3470
- function _asyncToGenerator(fn) {
3471
- return function () {
3472
- var self = this,
3473
- args = arguments;
3474
- return new Promise(function (resolve, reject) {
3475
- var gen = fn.apply(self, args);
3476
 
3477
- function _next(value) {
3478
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
3479
- }
 
 
3480
 
3481
- function _throw(err) {
3482
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
3483
- }
 
 
 
 
 
3484
 
3485
- _next(undefined);
3486
- });
3487
  };
3488
- }
3489
 
3490
- module.exports = _asyncToGenerator;
 
 
3491
 
3492
- /***/ }),
3493
- /* 135 */
3494
- /***/ (function(module, exports, __webpack_require__) {
 
3495
 
3496
- "use strict";
3497
 
3498
- var fixRegExpWellKnownSymbolLogic = __webpack_require__(111);
3499
- var anObject = __webpack_require__(9);
3500
- var toLength = __webpack_require__(34);
3501
- var toInteger = __webpack_require__(42);
3502
- var requireObjectCoercible = __webpack_require__(32);
3503
- var advanceStringIndex = __webpack_require__(122);
3504
- var getSubstitution = __webpack_require__(168);
3505
- var regExpExec = __webpack_require__(112);
3506
 
3507
- var max = Math.max;
3508
- var min = Math.min;
 
 
3509
 
3510
- var maybeToString = function (it) {
3511
- return it === undefined ? it : String(it);
3512
- };
3513
 
3514
- // @@replace logic
3515
- fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
3516
- var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
3517
- var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
3518
- var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
3519
-
3520
- return [
3521
- // `String.prototype.replace` method
3522
- // https://tc39.es/ecma262/#sec-string.prototype.replace
3523
- function replace(searchValue, replaceValue) {
3524
- var O = requireObjectCoercible(this);
3525
- var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
3526
- return replacer !== undefined
3527
- ? replacer.call(searchValue, O, replaceValue)
3528
- : nativeReplace.call(String(O), searchValue, replaceValue);
3529
- },
3530
- // `RegExp.prototype[@@replace]` method
3531
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
3532
- function (regexp, replaceValue) {
3533
- if (
3534
- (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
3535
- (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
3536
- ) {
3537
- var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
3538
- if (res.done) return res.value;
3539
- }
3540
 
3541
- var rx = anObject(regexp);
3542
- var S = String(this);
 
 
3543
 
3544
- var functionalReplace = typeof replaceValue === 'function';
3545
- if (!functionalReplace) replaceValue = String(replaceValue);
3546
 
3547
- var global = rx.global;
3548
- if (global) {
3549
- var fullUnicode = rx.unicode;
3550
- rx.lastIndex = 0;
3551
- }
3552
- var results = [];
3553
- while (true) {
3554
- var result = regExpExec(rx, S);
3555
- if (result === null) break;
3556
 
3557
- results.push(result);
3558
- if (!global) break;
3559
 
3560
- var matchStr = String(result[0]);
3561
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
3562
- }
 
 
3563
 
3564
- var accumulatedResult = '';
3565
- var nextSourcePosition = 0;
3566
- for (var i = 0; i < results.length; i++) {
3567
- result = results[i];
3568
-
3569
- var matched = String(result[0]);
3570
- var position = max(min(toInteger(result.index), S.length), 0);
3571
- var captures = [];
3572
- // NOTE: This is equivalent to
3573
- // captures = result.slice(1).map(maybeToString)
3574
- // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
3575
- // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
3576
- // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
3577
- for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
3578
- var namedCaptures = result.groups;
3579
- if (functionalReplace) {
3580
- var replacerArgs = [matched].concat(captures, position, S);
3581
- if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
3582
- var replacement = String(replaceValue.apply(undefined, replacerArgs));
3583
- } else {
3584
- replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
3585
- }
3586
- if (position >= nextSourcePosition) {
3587
- accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
3588
- nextSourcePosition = position + matched.length;
3589
- }
3590
- }
3591
- return accumulatedResult + S.slice(nextSourcePosition);
3592
  }
3593
- ];
3594
- });
3595
 
 
 
 
3596
 
3597
- /***/ }),
3598
- /* 136 */
3599
- /***/ (function(module, exports) {
3600
 
3601
- module.exports = function (it, Constructor, name) {
3602
- if (!(it instanceof Constructor)) {
3603
- throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
3604
- } return it;
3605
- };
3606
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3607
 
3608
- /***/ }),
3609
- /* 137 */
3610
- /***/ (function(module, exports, __webpack_require__) {
3611
 
3612
- "use strict";
 
 
 
3613
 
 
 
3614
 
3615
- var fails = __webpack_require__(6);
 
 
 
3616
 
3617
- // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
3618
- // so we use an intermediate function.
3619
- function RE(s, f) {
3620
- return RegExp(s, f);
3621
- }
3622
 
3623
- exports.UNSUPPORTED_Y = fails(function () {
3624
- // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
3625
- var re = RE('a', 'y');
3626
- re.lastIndex = 2;
3627
- return re.exec('abcd') != null;
3628
- });
3629
 
3630
- exports.BROKEN_CARET = fails(function () {
3631
- // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
3632
- var re = RE('^r', 'gy');
3633
- re.lastIndex = 2;
3634
- return re.exec('str') != null;
3635
- });
3636
 
 
3637
 
3638
- /***/ }),
3639
- /* 138 */,
3640
- /* 139 */
3641
- /***/ (function(module, exports, __webpack_require__) {
3642
 
3643
- "use strict";
 
3644
 
3645
- var $ = __webpack_require__(12);
3646
- var IndexedObject = __webpack_require__(71);
3647
- var toIndexedObject = __webpack_require__(21);
3648
- var arrayMethodIsStrict = __webpack_require__(121);
3649
 
3650
- var nativeJoin = [].join;
3651
 
3652
- var ES3_STRINGS = IndexedObject != Object;
3653
- var STRICT_METHOD = arrayMethodIsStrict('join', ',');
3654
 
3655
- // `Array.prototype.join` method
3656
- // https://tc39.es/ecma262/#sec-array.prototype.join
3657
- $({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
3658
- join: function join(separator) {
3659
- return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
3660
- }
3661
- });
3662
 
 
 
 
 
3663
 
3664
- /***/ }),
3665
- /* 140 */
3666
- /***/ (function(module, exports, __webpack_require__) {
 
3667
 
3668
- "use strict";
 
 
 
 
3669
 
3670
- var $ = __webpack_require__(12);
3671
- var notARegExp = __webpack_require__(207);
3672
- var requireObjectCoercible = __webpack_require__(32);
3673
- var correctIsRegExpLogic = __webpack_require__(208);
3674
 
3675
- // `String.prototype.includes` method
3676
- // https://tc39.es/ecma262/#sec-string.prototype.includes
3677
- $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
3678
- includes: function includes(searchString /* , position = 0 */) {
3679
- return !!~String(requireObjectCoercible(this))
3680
- .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);
3681
- }
3682
- });
3683
 
 
 
3684
 
3685
- /***/ }),
3686
- /* 141 */
3687
- /***/ (function(module, exports) {
 
3688
 
3689
- (function() { module.exports = window["wp"]["hooks"]; }());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3690
 
3691
- /***/ }),
3692
- /* 142 */
3693
- /***/ (function(module, exports, __webpack_require__) {
 
3694
 
3695
- "use strict";
 
 
3696
 
3697
- var redefine = __webpack_require__(27);
3698
- var anObject = __webpack_require__(9);
3699
- var fails = __webpack_require__(6);
3700
- var flags = __webpack_require__(114);
3701
 
3702
- var TO_STRING = 'toString';
3703
- var RegExpPrototype = RegExp.prototype;
3704
- var nativeToString = RegExpPrototype[TO_STRING];
3705
 
3706
- var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
3707
- // FF44- RegExp#toString has a wrong name
3708
- var INCORRECT_NAME = nativeToString.name != TO_STRING;
3709
 
3710
- // `RegExp.prototype.toString` method
3711
- // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
3712
- if (NOT_GENERIC || INCORRECT_NAME) {
3713
- redefine(RegExp.prototype, TO_STRING, function toString() {
3714
- var R = anObject(this);
3715
- var p = String(R.source);
3716
- var rf = R.flags;
3717
- var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
3718
- return '/' + p + '/' + f;
3719
- }, { unsafe: true });
3720
- }
3721
 
 
 
3722
 
3723
- /***/ }),
3724
- /* 143 */
3725
- /***/ (function(module, exports, __webpack_require__) {
3726
 
3727
- /* eslint-disable no-proto -- safe */
3728
- var anObject = __webpack_require__(9);
3729
- var aPossiblePrototype = __webpack_require__(160);
3730
-
3731
- // `Object.setPrototypeOf` method
3732
- // https://tc39.es/ecma262/#sec-object.setprototypeof
3733
- // Works with __proto__ only. Old v8 can't work with null proto objects.
3734
- module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
3735
- var CORRECT_SETTER = false;
3736
- var test = {};
3737
- var setter;
3738
- try {
3739
- setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
3740
- setter.call(test, []);
3741
- CORRECT_SETTER = test instanceof Array;
3742
- } catch (error) { /* empty */ }
3743
- return function setPrototypeOf(O, proto) {
3744
- anObject(O);
3745
- aPossiblePrototype(proto);
3746
- if (CORRECT_SETTER) setter.call(O, proto);
3747
- else O.__proto__ = proto;
3748
- return O;
3749
  };
3750
- }() : undefined);
3751
 
 
 
 
3752
 
3753
- /***/ }),
3754
- /* 144 */
3755
- /***/ (function(module, exports, __webpack_require__) {
3756
 
3757
- var isObject = __webpack_require__(10);
3758
- var classof = __webpack_require__(30);
3759
- var wellKnownSymbol = __webpack_require__(8);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3760
 
3761
- var MATCH = wellKnownSymbol('match');
3762
 
3763
- // `IsRegExp` abstract operation
3764
- // https://tc39.es/ecma262/#sec-isregexp
3765
- module.exports = function (it) {
3766
- var isRegExp;
3767
- return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
3768
- };
3769
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3770
 
3771
- /***/ }),
3772
- /* 145 */
3773
- /***/ (function(module, exports) {
3774
 
3775
- (function() { module.exports = window["wc"]["components"]; }());
3776
 
3777
  /***/ }),
3778
- /* 146 */
 
3779
  /***/ (function(module, exports, __webpack_require__) {
3780
 
3781
- var global = __webpack_require__(3);
3782
- var DOMIterables = __webpack_require__(127);
3783
- var ArrayIteratorMethods = __webpack_require__(123);
3784
- var createNonEnumerableProperty = __webpack_require__(19);
3785
- var wellKnownSymbol = __webpack_require__(8);
3786
-
3787
- var ITERATOR = wellKnownSymbol('iterator');
3788
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
3789
- var ArrayValues = ArrayIteratorMethods.values;
3790
-
3791
- for (var COLLECTION_NAME in DOMIterables) {
3792
- var Collection = global[COLLECTION_NAME];
3793
- var CollectionPrototype = Collection && Collection.prototype;
3794
- if (CollectionPrototype) {
3795
- // some Chrome versions have non-configurable methods on DOMTokenList
3796
- if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
3797
- createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
3798
- } catch (error) {
3799
- CollectionPrototype[ITERATOR] = ArrayValues;
3800
- }
3801
- if (!CollectionPrototype[TO_STRING_TAG]) {
3802
- createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
3803
- }
3804
- if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
3805
- // some Chrome versions have non-configurable methods on DOMTokenList
3806
- if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
3807
- createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
3808
- } catch (error) {
3809
- CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
3810
- }
3811
- }
3812
- }
3813
  }
3814
 
 
3815
 
3816
  /***/ }),
3817
- /* 147 */
3818
- /***/ (function(module, exports, __webpack_require__) {
3819
 
3820
- var toIndexedObject = __webpack_require__(21);
3821
- var nativeGetOwnPropertyNames = __webpack_require__(56).f;
3822
-
3823
- var toString = {}.toString;
3824
 
3825
- var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
3826
- ? Object.getOwnPropertyNames(window) : [];
3827
 
3828
- var getWindowNames = function (it) {
3829
- try {
3830
- return nativeGetOwnPropertyNames(it);
3831
- } catch (error) {
3832
- return windowNames.slice();
3833
- }
3834
- };
3835
 
3836
- // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
3837
- module.exports.f = function getOwnPropertyNames(it) {
3838
- return windowNames && toString.call(it) == '[object Window]'
3839
- ? getWindowNames(it)
3840
- : nativeGetOwnPropertyNames(toIndexedObject(it));
3841
- };
3842
 
3843
 
3844
  /***/ }),
3845
- /* 148 */
3846
- /***/ (function(module, exports, __webpack_require__) {
3847
-
3848
- var path = __webpack_require__(81);
3849
- var has = __webpack_require__(11);
3850
- var wrappedWellKnownSymbolModule = __webpack_require__(119);
3851
- var defineProperty = __webpack_require__(17).f;
3852
 
3853
- module.exports = function (NAME) {
3854
- var Symbol = path.Symbol || (path.Symbol = {});
3855
- if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
3856
- value: wrappedWellKnownSymbolModule.f(NAME)
3857
- });
3858
- };
3859
 
 
3860
 
3861
  /***/ }),
3862
- /* 149 */
3863
- /***/ (function(module, exports, __webpack_require__) {
 
3864
 
3865
  "use strict";
3866
 
3867
- var $forEach = __webpack_require__(75).forEach;
3868
- var arrayMethodIsStrict = __webpack_require__(121);
3869
 
3870
- var STRICT_METHOD = arrayMethodIsStrict('forEach');
 
 
 
 
 
 
 
 
 
 
3871
 
3872
- // `Array.prototype.forEach` method implementation
3873
- // https://tc39.es/ecma262/#sec-array.prototype.foreach
3874
- module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
3875
- return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
3876
- } : [].forEach;
3877
 
 
 
 
 
 
 
 
 
 
 
 
 
3878
 
3879
- /***/ }),
3880
- /* 150 */
3881
- /***/ (function(module, exports, __webpack_require__) {
 
3882
 
3883
- var anObject = __webpack_require__(9);
3884
- var aFunction = __webpack_require__(70);
3885
- var wellKnownSymbol = __webpack_require__(8);
 
 
3886
 
3887
- var SPECIES = wellKnownSymbol('species');
3888
 
3889
- // `SpeciesConstructor` abstract operation
3890
- // https://tc39.es/ecma262/#sec-speciesconstructor
3891
- module.exports = function (O, defaultConstructor) {
3892
- var C = anObject(O).constructor;
3893
- var S;
3894
- return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
3895
- };
3896
 
3897
 
3898
- /***/ }),
3899
- /* 151 */
 
 
 
 
 
3900
  /***/ (function(module, exports, __webpack_require__) {
3901
 
3902
  "use strict";
3903
 
3904
- var charAt = __webpack_require__(125).charAt;
3905
- var InternalStateModule = __webpack_require__(45);
3906
- var defineIterator = __webpack_require__(166);
3907
-
3908
- var STRING_ITERATOR = 'String Iterator';
3909
- var setInternalState = InternalStateModule.set;
3910
- var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
3911
-
3912
- // `String.prototype[@@iterator]` method
3913
- // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
3914
- defineIterator(String, 'String', function (iterated) {
3915
- setInternalState(this, {
3916
- type: STRING_ITERATOR,
3917
- string: String(iterated),
3918
- index: 0
3919
- });
3920
- // `%StringIteratorPrototype%.next` method
3921
- // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
3922
- }, function next() {
3923
- var state = getInternalState(this);
3924
- var string = state.string;
3925
- var index = state.index;
3926
- var point;
3927
- if (index >= string.length) return { value: undefined, done: true };
3928
- point = charAt(string, index);
3929
- state.index += point.length;
3930
- return { value: point, done: false };
3931
- });
3932
 
 
3933
 
3934
- /***/ }),
3935
- /* 152 */
3936
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3937
 
3938
- var redefine = __webpack_require__(27);
 
 
 
 
3939
 
3940
- module.exports = function (target, src, options) {
3941
- for (var key in src) redefine(target, key, src[key], options);
3942
- return target;
3943
- };
3944
 
 
 
3945
 
3946
- /***/ }),
3947
- /* 153 */
3948
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
3949
 
3950
- "use strict";
 
 
 
3951
 
3952
- var getBuiltIn = __webpack_require__(31);
3953
- var definePropertyModule = __webpack_require__(17);
3954
- var wellKnownSymbol = __webpack_require__(8);
3955
- var DESCRIPTORS = __webpack_require__(13);
3956
 
3957
- var SPECIES = wellKnownSymbol('species');
 
 
3958
 
3959
- module.exports = function (CONSTRUCTOR_NAME) {
3960
- var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
3961
- var defineProperty = definePropertyModule.f;
3962
 
3963
- if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
3964
- defineProperty(Constructor, SPECIES, {
3965
- configurable: true,
3966
- get: function () { return this; }
3967
- });
 
 
 
 
 
 
 
3968
  }
3969
- };
 
 
 
 
3970
 
3971
 
3972
  /***/ }),
3973
- /* 154 */
3974
- /***/ (function(module, exports, __webpack_require__) {
3975
 
3976
- var anObject = __webpack_require__(9);
3977
- var isArrayIteratorMethod = __webpack_require__(171);
3978
- var toLength = __webpack_require__(34);
3979
- var bind = __webpack_require__(94);
3980
- var getIteratorMethod = __webpack_require__(155);
3981
- var iteratorClose = __webpack_require__(172);
3982
 
3983
- var Result = function (stopped, result) {
3984
- this.stopped = stopped;
3985
- this.result = result;
3986
- };
 
 
 
 
 
 
 
 
3987
 
3988
- module.exports = function (iterable, unboundFunction, options) {
3989
- var that = options && options.that;
3990
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
3991
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
3992
- var INTERRUPTED = !!(options && options.INTERRUPTED);
3993
- var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
3994
- var iterator, iterFn, index, length, result, next, step;
3995
-
3996
- var stop = function (condition) {
3997
- if (iterator) iteratorClose(iterator);
3998
- return new Result(true, condition);
3999
- };
4000
 
4001
- var callFn = function (value) {
4002
- if (AS_ENTRIES) {
4003
- anObject(value);
4004
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
4005
- } return INTERRUPTED ? fn(value, stop) : fn(value);
4006
- };
4007
 
4008
- if (IS_ITERATOR) {
4009
- iterator = iterable;
4010
- } else {
4011
- iterFn = getIteratorMethod(iterable);
4012
- if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
4013
- // optimisation for array iterators
4014
- if (isArrayIteratorMethod(iterFn)) {
4015
- for (index = 0, length = toLength(iterable.length); length > index; index++) {
4016
- result = callFn(iterable[index]);
4017
- if (result && result instanceof Result) return result;
4018
- } return new Result(false);
4019
- }
4020
- iterator = iterFn.call(iterable);
4021
- }
4022
 
4023
- next = iterator.next;
4024
- while (!(step = next.call(iterator)).done) {
4025
- try {
4026
- result = callFn(step.value);
4027
- } catch (error) {
4028
- iteratorClose(iterator);
4029
- throw error;
4030
- }
4031
- if (typeof result == 'object' && result && result instanceof Result) return result;
4032
- } return new Result(false);
4033
- };
4034
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4035
 
4036
  /***/ }),
4037
- /* 155 */
4038
- /***/ (function(module, exports, __webpack_require__) {
4039
 
4040
- var classof = __webpack_require__(113);
4041
- var Iterators = __webpack_require__(110);
4042
- var wellKnownSymbol = __webpack_require__(8);
4043
 
4044
- var ITERATOR = wellKnownSymbol('iterator');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4045
 
4046
- module.exports = function (it) {
4047
- if (it != undefined) return it[ITERATOR]
4048
- || it['@@iterator']
4049
- || Iterators[classof(it)];
4050
- };
4051
 
4052
 
4053
- /***/ }),
4054
- /* 156 */
4055
- /***/ (function(module, exports, __webpack_require__) {
4056
 
4057
- var isObject = __webpack_require__(10);
4058
- var setPrototypeOf = __webpack_require__(143);
4059
 
4060
- // makes subclassing work correct for wrapped built-ins
4061
- module.exports = function ($this, dummy, Wrapper) {
4062
- var NewTarget, NewTargetPrototype;
4063
- if (
4064
- // it can work only with native `setPrototypeOf`
4065
- setPrototypeOf &&
4066
- // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
4067
- typeof (NewTarget = dummy.constructor) == 'function' &&
4068
- NewTarget !== Wrapper &&
4069
- isObject(NewTargetPrototype = NewTarget.prototype) &&
4070
- NewTargetPrototype !== Wrapper.prototype
4071
- ) setPrototypeOf($this, NewTargetPrototype);
4072
- return $this;
4073
- };
4074
 
4075
 
4076
- /***/ }),
4077
- /* 157 */
4078
- /***/ (function(module, exports, __webpack_require__) {
4079
 
4080
- var global = __webpack_require__(3);
4081
- var fails = __webpack_require__(6);
4082
- var bind = __webpack_require__(94);
4083
- var html = __webpack_require__(98);
4084
- var createElement = __webpack_require__(67);
4085
- var IS_IOS = __webpack_require__(158);
4086
- var IS_NODE = __webpack_require__(77);
4087
-
4088
- var location = global.location;
4089
- var set = global.setImmediate;
4090
- var clear = global.clearImmediate;
4091
- var process = global.process;
4092
- var MessageChannel = global.MessageChannel;
4093
- var Dispatch = global.Dispatch;
4094
- var counter = 0;
4095
- var queue = {};
4096
- var ONREADYSTATECHANGE = 'onreadystatechange';
4097
- var defer, channel, port;
4098
-
4099
- var run = function (id) {
4100
- // eslint-disable-next-line no-prototype-builtins -- safe
4101
- if (queue.hasOwnProperty(id)) {
4102
- var fn = queue[id];
4103
- delete queue[id];
4104
- fn();
4105
- }
4106
- };
4107
 
4108
- var runner = function (id) {
4109
- return function () {
4110
- run(id);
4111
- };
4112
- };
4113
 
4114
- var listener = function (event) {
4115
- run(event.data);
4116
- };
4117
 
4118
- var post = function (id) {
4119
- // old engines have not location.origin
4120
- global.postMessage(id + '', location.protocol + '//' + location.host);
4121
- };
4122
 
4123
- // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
4124
- if (!set || !clear) {
4125
- set = function setImmediate(fn) {
4126
- var args = [];
4127
- var i = 1;
4128
- while (arguments.length > i) args.push(arguments[i++]);
4129
- queue[++counter] = function () {
4130
- // eslint-disable-next-line no-new-func -- spec requirement
4131
- (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
4132
- };
4133
- defer(counter);
4134
- return counter;
4135
- };
4136
- clear = function clearImmediate(id) {
4137
- delete queue[id];
4138
- };
4139
- // Node.js 0.8-
4140
- if (IS_NODE) {
4141
- defer = function (id) {
4142
- process.nextTick(runner(id));
4143
- };
4144
- // Sphere (JS game engine) Dispatch API
4145
- } else if (Dispatch && Dispatch.now) {
4146
- defer = function (id) {
4147
- Dispatch.now(runner(id));
4148
- };
4149
- // Browsers with MessageChannel, includes WebWorkers
4150
- // except iOS - https://github.com/zloirock/core-js/issues/624
4151
- } else if (MessageChannel && !IS_IOS) {
4152
- channel = new MessageChannel();
4153
- port = channel.port2;
4154
- channel.port1.onmessage = listener;
4155
- defer = bind(port.postMessage, port, 1);
4156
- // Browsers with postMessage, skip WebWorkers
4157
- // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
4158
- } else if (
4159
- global.addEventListener &&
4160
- typeof postMessage == 'function' &&
4161
- !global.importScripts &&
4162
- location && location.protocol !== 'file:' &&
4163
- !fails(post)
4164
- ) {
4165
- defer = post;
4166
- global.addEventListener('message', listener, false);
4167
- // IE8-
4168
- } else if (ONREADYSTATECHANGE in createElement('script')) {
4169
- defer = function (id) {
4170
- html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
4171
- html.removeChild(this);
4172
- run(id);
4173
- };
4174
- };
4175
- // Rest old browsers
4176
- } else {
4177
- defer = function (id) {
4178
- setTimeout(runner(id), 0);
4179
- };
4180
- }
4181
- }
4182
 
4183
- module.exports = {
4184
- set: set,
4185
- clear: clear
4186
- };
4187
 
4188
 
4189
- /***/ }),
4190
- /* 158 */
4191
- /***/ (function(module, exports, __webpack_require__) {
4192
 
4193
- var userAgent = __webpack_require__(87);
 
 
4194
 
4195
- module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);
4196
 
4197
 
4198
- /***/ }),
4199
- /* 159 */
4200
- /***/ (function(module, exports, __webpack_require__) {
4201
 
4202
- "use strict";
4203
 
4204
- var aFunction = __webpack_require__(70);
4205
 
4206
- var PromiseCapability = function (C) {
4207
- var resolve, reject;
4208
- this.promise = new C(function ($$resolve, $$reject) {
4209
- if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
4210
- resolve = $$resolve;
4211
- reject = $$reject;
4212
- });
4213
- this.resolve = aFunction(resolve);
4214
- this.reject = aFunction(reject);
4215
- };
4216
 
4217
- // 25.4.1.5 NewPromiseCapability(C)
4218
- module.exports.f = function (C) {
4219
- return new PromiseCapability(C);
4220
- };
4221
 
4222
 
4223
- /***/ }),
4224
- /* 160 */
4225
- /***/ (function(module, exports, __webpack_require__) {
4226
 
4227
- var isObject = __webpack_require__(10);
 
 
 
 
 
 
 
 
4228
 
4229
- module.exports = function (it) {
4230
- if (!isObject(it) && it !== null) {
4231
- throw TypeError("Can't set " + String(it) + ' as a prototype');
4232
- } return it;
4233
  };
4234
 
 
 
4235
 
4236
- /***/ }),
4237
- /* 161 */,
4238
- /* 162 */
4239
- /***/ (function(module, exports, __webpack_require__) {
4240
 
4241
- "use strict";
 
4242
 
 
4243
 
4244
- var stringify = __webpack_require__(227);
4245
- var parse = __webpack_require__(228);
4246
- var formats = __webpack_require__(169);
 
 
 
4247
 
4248
- module.exports = {
4249
- formats: formats,
4250
- parse: parse,
4251
- stringify: stringify
4252
- };
 
 
4253
 
 
 
 
 
 
 
 
 
 
4254
 
4255
- /***/ }),
4256
- /* 163 */
4257
- /***/ (function(module, exports) {
4258
 
4259
- (function() { module.exports = window["ReactDOM"]; }());
 
 
 
 
4260
 
4261
- /***/ }),
4262
- /* 164 */
4263
- /***/ (function(module, exports, __webpack_require__) {
 
4264
 
4265
- "use strict";
 
 
4266
 
4267
- var $ = __webpack_require__(12);
4268
- var IS_PURE = __webpack_require__(57);
4269
- var global = __webpack_require__(3);
4270
- var getBuiltIn = __webpack_require__(31);
4271
- var NativePromise = __webpack_require__(193);
4272
- var redefine = __webpack_require__(27);
4273
- var redefineAll = __webpack_require__(152);
4274
- var setToStringTag = __webpack_require__(90);
4275
- var setSpecies = __webpack_require__(153);
4276
- var isObject = __webpack_require__(10);
4277
- var aFunction = __webpack_require__(70);
4278
- var anInstance = __webpack_require__(136);
4279
- var inspectSource = __webpack_require__(68);
4280
- var iterate = __webpack_require__(154);
4281
- var checkCorrectnessOfIteration = __webpack_require__(165);
4282
- var speciesConstructor = __webpack_require__(150);
4283
- var task = __webpack_require__(157).set;
4284
- var microtask = __webpack_require__(194);
4285
- var promiseResolve = __webpack_require__(196);
4286
- var hostReportErrors = __webpack_require__(197);
4287
- var newPromiseCapabilityModule = __webpack_require__(159);
4288
- var perform = __webpack_require__(198);
4289
- var InternalStateModule = __webpack_require__(45);
4290
- var isForced = __webpack_require__(74);
4291
- var wellKnownSymbol = __webpack_require__(8);
4292
- var IS_NODE = __webpack_require__(77);
4293
- var V8_VERSION = __webpack_require__(63);
4294
-
4295
- var SPECIES = wellKnownSymbol('species');
4296
- var PROMISE = 'Promise';
4297
- var getInternalState = InternalStateModule.get;
4298
- var setInternalState = InternalStateModule.set;
4299
- var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
4300
- var PromiseConstructor = NativePromise;
4301
- var TypeError = global.TypeError;
4302
- var document = global.document;
4303
- var process = global.process;
4304
- var $fetch = getBuiltIn('fetch');
4305
- var newPromiseCapability = newPromiseCapabilityModule.f;
4306
- var newGenericPromiseCapability = newPromiseCapability;
4307
- var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
4308
- var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
4309
- var UNHANDLED_REJECTION = 'unhandledrejection';
4310
- var REJECTION_HANDLED = 'rejectionhandled';
4311
- var PENDING = 0;
4312
- var FULFILLED = 1;
4313
- var REJECTED = 2;
4314
- var HANDLED = 1;
4315
- var UNHANDLED = 2;
4316
- var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
4317
-
4318
- var FORCED = isForced(PROMISE, function () {
4319
- var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
4320
- if (!GLOBAL_CORE_JS_PROMISE) {
4321
- // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
4322
- // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
4323
- // We can't detect it synchronously, so just check versions
4324
- if (V8_VERSION === 66) return true;
4325
- // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
4326
- if (!IS_NODE && !NATIVE_REJECTION_EVENT) return true;
4327
- }
4328
- // We need Promise#finally in the pure version for preventing prototype pollution
4329
- if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;
4330
- // We can't use @@species feature detection in V8 since it causes
4331
- // deoptimization and performance degradation
4332
- // https://github.com/zloirock/core-js/issues/679
4333
- if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;
4334
- // Detect correctness of subclassing with @@species support
4335
- var promise = PromiseConstructor.resolve(1);
4336
- var FakePromise = function (exec) {
4337
- exec(function () { /* empty */ }, function () { /* empty */ });
4338
- };
4339
- var constructor = promise.constructor = {};
4340
- constructor[SPECIES] = FakePromise;
4341
- return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
4342
- });
4343
 
4344
- var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
4345
- PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
4346
- });
4347
 
4348
- // helpers
4349
- var isThenable = function (it) {
4350
- var then;
4351
- return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
4352
  };
 
 
 
4353
 
4354
- var notify = function (state, isReject) {
4355
- if (state.notified) return;
4356
- state.notified = true;
4357
- var chain = state.reactions;
4358
- microtask(function () {
4359
- var value = state.value;
4360
- var ok = state.state == FULFILLED;
4361
- var index = 0;
4362
- // variable length - can't use forEach
4363
- while (chain.length > index) {
4364
- var reaction = chain[index++];
4365
- var handler = ok ? reaction.ok : reaction.fail;
4366
- var resolve = reaction.resolve;
4367
- var reject = reaction.reject;
4368
- var domain = reaction.domain;
4369
- var result, then, exited;
4370
- try {
4371
- if (handler) {
4372
- if (!ok) {
4373
- if (state.rejection === UNHANDLED) onHandleUnhandled(state);
4374
- state.rejection = HANDLED;
4375
- }
4376
- if (handler === true) result = value;
4377
- else {
4378
- if (domain) domain.enter();
4379
- result = handler(value); // can throw
4380
- if (domain) {
4381
- domain.exit();
4382
- exited = true;
4383
- }
4384
- }
4385
- if (result === reaction.promise) {
4386
- reject(TypeError('Promise-chain cycle'));
4387
- } else if (then = isThenable(result)) {
4388
- then.call(result, resolve, reject);
4389
- } else resolve(result);
4390
- } else reject(value);
4391
- } catch (error) {
4392
- if (domain && !exited) domain.exit();
4393
- reject(error);
4394
- }
4395
- }
4396
- state.reactions = [];
4397
- state.notified = false;
4398
- if (isReject && !state.rejection) onUnhandled(state);
4399
- });
4400
- };
4401
-
4402
- var dispatchEvent = function (name, promise, reason) {
4403
- var event, handler;
4404
- if (DISPATCH_EVENT) {
4405
- event = document.createEvent('Event');
4406
- event.promise = promise;
4407
- event.reason = reason;
4408
- event.initEvent(name, false, true);
4409
- global.dispatchEvent(event);
4410
- } else event = { promise: promise, reason: reason };
4411
- if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
4412
- else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
4413
- };
4414
-
4415
- var onUnhandled = function (state) {
4416
- task.call(global, function () {
4417
- var promise = state.facade;
4418
- var value = state.value;
4419
- var IS_UNHANDLED = isUnhandled(state);
4420
- var result;
4421
- if (IS_UNHANDLED) {
4422
- result = perform(function () {
4423
- if (IS_NODE) {
4424
- process.emit('unhandledRejection', value, promise);
4425
- } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
4426
- });
4427
- // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
4428
- state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
4429
- if (result.error) throw result.value;
4430
- }
4431
- });
4432
- };
4433
-
4434
- var isUnhandled = function (state) {
4435
- return state.rejection !== HANDLED && !state.parent;
4436
- };
4437
-
4438
- var onHandleUnhandled = function (state) {
4439
- task.call(global, function () {
4440
- var promise = state.facade;
4441
- if (IS_NODE) {
4442
- process.emit('rejectionHandled', promise);
4443
- } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
4444
- });
4445
- };
4446
 
4447
- var bind = function (fn, state, unwrap) {
4448
- return function (value) {
4449
- fn(state, value, unwrap);
4450
- };
4451
- };
4452
 
4453
- var internalReject = function (state, value, unwrap) {
4454
- if (state.done) return;
4455
- state.done = true;
4456
- if (unwrap) state = unwrap;
4457
- state.value = value;
4458
- state.state = REJECTED;
4459
- notify(state, true);
4460
- };
4461
 
4462
- var internalResolve = function (state, value, unwrap) {
4463
- if (state.done) return;
4464
- state.done = true;
4465
- if (unwrap) state = unwrap;
4466
- try {
4467
- if (state.facade === value) throw TypeError("Promise can't be resolved itself");
4468
- var then = isThenable(value);
4469
- if (then) {
4470
- microtask(function () {
4471
- var wrapper = { done: false };
4472
- try {
4473
- then.call(value,
4474
- bind(internalResolve, wrapper, state),
4475
- bind(internalReject, wrapper, state)
4476
- );
4477
- } catch (error) {
4478
- internalReject(wrapper, error, state);
4479
- }
4480
- });
4481
- } else {
4482
- state.value = value;
4483
- state.state = FULFILLED;
4484
- notify(state, false);
4485
- }
4486
- } catch (error) {
4487
- internalReject({ done: false }, error, state);
4488
  }
4489
- };
4490
 
4491
- // constructor polyfill
4492
- if (FORCED) {
4493
- // 25.4.3.1 Promise(executor)
4494
- PromiseConstructor = function Promise(executor) {
4495
- anInstance(this, PromiseConstructor, PROMISE);
4496
- aFunction(executor);
4497
- Internal.call(this);
4498
- var state = getInternalState(this);
4499
- try {
4500
- executor(bind(internalResolve, state), bind(internalReject, state));
4501
- } catch (error) {
4502
- internalReject(state, error);
4503
- }
4504
- };
4505
- // eslint-disable-next-line no-unused-vars -- required for `.length`
4506
- Internal = function Promise(executor) {
4507
- setInternalState(this, {
4508
- type: PROMISE,
4509
- done: false,
4510
- notified: false,
4511
- parent: false,
4512
- reactions: [],
4513
- rejection: false,
4514
- state: PENDING,
4515
- value: undefined
4516
- });
4517
- };
4518
- Internal.prototype = redefineAll(PromiseConstructor.prototype, {
4519
- // `Promise.prototype.then` method
4520
- // https://tc39.es/ecma262/#sec-promise.prototype.then
4521
- then: function then(onFulfilled, onRejected) {
4522
- var state = getInternalPromiseState(this);
4523
- var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
4524
- reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
4525
- reaction.fail = typeof onRejected == 'function' && onRejected;
4526
- reaction.domain = IS_NODE ? process.domain : undefined;
4527
- state.parent = true;
4528
- state.reactions.push(reaction);
4529
- if (state.state != PENDING) notify(state, false);
4530
- return reaction.promise;
4531
- },
4532
- // `Promise.prototype.catch` method
4533
- // https://tc39.es/ecma262/#sec-promise.prototype.catch
4534
- 'catch': function (onRejected) {
4535
- return this.then(undefined, onRejected);
4536
- }
4537
- });
4538
- OwnPromiseCapability = function () {
4539
- var promise = new Internal();
4540
- var state = getInternalState(promise);
4541
- this.promise = promise;
4542
- this.resolve = bind(internalResolve, state);
4543
- this.reject = bind(internalReject, state);
4544
- };
4545
- newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
4546
- return C === PromiseConstructor || C === PromiseWrapper
4547
- ? new OwnPromiseCapability(C)
4548
- : newGenericPromiseCapability(C);
4549
  };
 
4550
 
4551
- if (!IS_PURE && typeof NativePromise == 'function') {
4552
- nativeThen = NativePromise.prototype.then;
4553
-
4554
- // wrap native Promise#then for native async functions
4555
- redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {
4556
- var that = this;
4557
- return new PromiseConstructor(function (resolve, reject) {
4558
- nativeThen.call(that, resolve, reject);
4559
- }).then(onFulfilled, onRejected);
4560
- // https://github.com/zloirock/core-js/issues/640
4561
- }, { unsafe: true });
4562
-
4563
- // wrap fetch result
4564
- if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {
4565
- // eslint-disable-next-line no-unused-vars -- required for `.length`
4566
- fetch: function fetch(input /* , init */) {
4567
- return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));
4568
- }
4569
- });
4570
- }
4571
- }
4572
-
4573
- $({ global: true, wrap: true, forced: FORCED }, {
4574
- Promise: PromiseConstructor
4575
- });
4576
-
4577
- setToStringTag(PromiseConstructor, PROMISE, false, true);
4578
- setSpecies(PROMISE);
4579
 
4580
- PromiseWrapper = getBuiltIn(PROMISE);
 
4581
 
4582
- // statics
4583
- $({ target: PROMISE, stat: true, forced: FORCED }, {
4584
- // `Promise.reject` method
4585
- // https://tc39.es/ecma262/#sec-promise.reject
4586
- reject: function reject(r) {
4587
- var capability = newPromiseCapability(this);
4588
- capability.reject.call(undefined, r);
4589
- return capability.promise;
4590
- }
4591
- });
4592
 
4593
- $({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
4594
- // `Promise.resolve` method
4595
- // https://tc39.es/ecma262/#sec-promise.resolve
4596
- resolve: function resolve(x) {
4597
- return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
4598
- }
4599
- });
4600
 
4601
- $({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
4602
- // `Promise.all` method
4603
- // https://tc39.es/ecma262/#sec-promise.all
4604
- all: function all(iterable) {
4605
- var C = this;
4606
- var capability = newPromiseCapability(C);
4607
- var resolve = capability.resolve;
4608
- var reject = capability.reject;
4609
- var result = perform(function () {
4610
- var $promiseResolve = aFunction(C.resolve);
4611
- var values = [];
4612
- var counter = 0;
4613
- var remaining = 1;
4614
- iterate(iterable, function (promise) {
4615
- var index = counter++;
4616
- var alreadyCalled = false;
4617
- values.push(undefined);
4618
- remaining++;
4619
- $promiseResolve.call(C, promise).then(function (value) {
4620
- if (alreadyCalled) return;
4621
- alreadyCalled = true;
4622
- values[index] = value;
4623
- --remaining || resolve(values);
4624
- }, reject);
4625
- });
4626
- --remaining || resolve(values);
4627
- });
4628
- if (result.error) reject(result.value);
4629
- return capability.promise;
4630
- },
4631
- // `Promise.race` method
4632
- // https://tc39.es/ecma262/#sec-promise.race
4633
- race: function race(iterable) {
4634
- var C = this;
4635
- var capability = newPromiseCapability(C);
4636
- var reject = capability.reject;
4637
- var result = perform(function () {
4638
- var $promiseResolve = aFunction(C.resolve);
4639
- iterate(iterable, function (promise) {
4640
- $promiseResolve.call(C, promise).then(capability.resolve, reject);
4641
- });
4642
- });
4643
- if (result.error) reject(result.value);
4644
- return capability.promise;
4645
- }
4646
- });
4647
 
 
 
 
4648
 
4649
- /***/ }),
4650
- /* 165 */
4651
- /***/ (function(module, exports, __webpack_require__) {
4652
 
4653
- var wellKnownSymbol = __webpack_require__(8);
 
 
4654
 
4655
- var ITERATOR = wellKnownSymbol('iterator');
4656
- var SAFE_CLOSING = false;
 
4657
 
4658
- try {
4659
- var called = 0;
4660
- var iteratorWithReturn = {
4661
- next: function () {
4662
- return { done: !!called++ };
4663
- },
4664
- 'return': function () {
4665
- SAFE_CLOSING = true;
4666
- }
4667
- };
4668
- iteratorWithReturn[ITERATOR] = function () {
4669
- return this;
4670
- };
4671
- // eslint-disable-next-line no-throw-literal -- required for testing
4672
- Array.from(iteratorWithReturn, function () { throw 2; });
4673
- } catch (error) { /* empty */ }
4674
 
4675
- module.exports = function (exec, SKIP_CLOSING) {
4676
- if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
4677
- var ITERATION_SUPPORT = false;
4678
- try {
4679
- var object = {};
4680
- object[ITERATOR] = function () {
4681
- return {
4682
- next: function () {
4683
- return { done: ITERATION_SUPPORT = true };
4684
- }
4685
- };
4686
- };
4687
- exec(object);
4688
- } catch (error) { /* empty */ }
4689
- return ITERATION_SUPPORT;
4690
- };
4691
 
 
 
 
4692
 
4693
- /***/ }),
4694
- /* 166 */
4695
- /***/ (function(module, exports, __webpack_require__) {
4696
 
4697
- "use strict";
 
4698
 
4699
- var $ = __webpack_require__(12);
4700
- var createIteratorConstructor = __webpack_require__(199);
4701
- var getPrototypeOf = __webpack_require__(174);
4702
- var setPrototypeOf = __webpack_require__(143);
4703
- var setToStringTag = __webpack_require__(90);
4704
- var createNonEnumerableProperty = __webpack_require__(19);
4705
- var redefine = __webpack_require__(27);
4706
- var wellKnownSymbol = __webpack_require__(8);
4707
- var IS_PURE = __webpack_require__(57);
4708
- var Iterators = __webpack_require__(110);
4709
- var IteratorsCore = __webpack_require__(173);
4710
-
4711
- var IteratorPrototype = IteratorsCore.IteratorPrototype;
4712
- var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
4713
- var ITERATOR = wellKnownSymbol('iterator');
4714
- var KEYS = 'keys';
4715
- var VALUES = 'values';
4716
- var ENTRIES = 'entries';
4717
-
4718
- var returnThis = function () { return this; };
4719
-
4720
- module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
4721
- createIteratorConstructor(IteratorConstructor, NAME, next);
4722
-
4723
- var getIterationMethod = function (KIND) {
4724
- if (KIND === DEFAULT && defaultIterator) return defaultIterator;
4725
- if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
4726
- switch (KIND) {
4727
- case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
4728
- case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
4729
- case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
4730
- } return function () { return new IteratorConstructor(this); };
4731
- };
4732
 
4733
- var TO_STRING_TAG = NAME + ' Iterator';
4734
- var INCORRECT_VALUES_NAME = false;
4735
- var IterablePrototype = Iterable.prototype;
4736
- var nativeIterator = IterablePrototype[ITERATOR]
4737
- || IterablePrototype['@@iterator']
4738
- || DEFAULT && IterablePrototype[DEFAULT];
4739
- var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
4740
- var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
4741
- var CurrentIteratorPrototype, methods, KEY;
4742
-
4743
- // fix native
4744
- if (anyNativeIterator) {
4745
- CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
4746
- if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
4747
- if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
4748
- if (setPrototypeOf) {
4749
- setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
4750
- } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
4751
- createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
4752
- }
4753
- }
4754
- // Set @@toStringTag to native iterators
4755
- setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
4756
- if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
4757
- }
4758
- }
4759
 
4760
- // fix Array#{values, @@iterator}.name in V8 / FF
4761
- if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
4762
- INCORRECT_VALUES_NAME = true;
4763
- defaultIterator = function values() { return nativeIterator.call(this); };
4764
- }
4765
 
4766
- // define iterator
4767
- if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
4768
- createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
4769
- }
4770
- Iterators[NAME] = defaultIterator;
4771
 
4772
- // export additional methods
4773
- if (DEFAULT) {
4774
- methods = {
4775
- values: getIterationMethod(VALUES),
4776
- keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
4777
- entries: getIterationMethod(ENTRIES)
4778
- };
4779
- if (FORCED) for (KEY in methods) {
4780
- if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
4781
- redefine(IterablePrototype, KEY, methods[KEY]);
4782
- }
4783
- } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
4784
- }
4785
 
4786
- return methods;
4787
- };
 
4788
 
 
 
 
4789
 
4790
- /***/ }),
4791
- /* 167 */,
4792
- /* 168 */
4793
- /***/ (function(module, exports, __webpack_require__) {
4794
 
4795
- var toObject = __webpack_require__(38);
4796
-
4797
- var floor = Math.floor;
4798
- var replace = ''.replace;
4799
- var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
4800
- var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
4801
-
4802
- // https://tc39.es/ecma262/#sec-getsubstitution
4803
- module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
4804
- var tailPos = position + matched.length;
4805
- var m = captures.length;
4806
- var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
4807
- if (namedCaptures !== undefined) {
4808
- namedCaptures = toObject(namedCaptures);
4809
- symbols = SUBSTITUTION_SYMBOLS;
4810
- }
4811
- return replace.call(replacement, symbols, function (match, ch) {
4812
- var capture;
4813
- switch (ch.charAt(0)) {
4814
- case '$': return '$';
4815
- case '&': return matched;
4816
- case '`': return str.slice(0, position);
4817
- case "'": return str.slice(tailPos);
4818
- case '<':
4819
- capture = namedCaptures[ch.slice(1, -1)];
4820
- break;
4821
- default: // \d\d?
4822
- var n = +ch;
4823
- if (n === 0) return match;
4824
- if (n > m) {
4825
- var f = floor(n / 10);
4826
- if (f === 0) return match;
4827
- if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
4828
- return match;
4829
- }
4830
- capture = captures[n - 1];
4831
- }
4832
- return capture === undefined ? '' : capture;
4833
- });
4834
- };
4835
 
4836
 
4837
- /***/ }),
4838
- /* 169 */
4839
- /***/ (function(module, exports, __webpack_require__) {
4840
 
4841
- "use strict";
4842
 
4843
 
4844
- var replace = String.prototype.replace;
4845
- var percentTwenties = /%20/g;
4846
 
4847
- var Format = {
4848
- RFC1738: 'RFC1738',
4849
- RFC3986: 'RFC3986'
4850
- };
 
 
 
4851
 
4852
- module.exports = {
4853
- 'default': Format.RFC3986,
4854
- formatters: {
4855
- RFC1738: function (value) {
4856
- return replace.call(value, percentTwenties, '+');
4857
- },
4858
- RFC3986: function (value) {
4859
- return String(value);
4860
- }
4861
  },
4862
- RFC1738: Format.RFC1738,
4863
- RFC3986: Format.RFC3986
4864
- };
4865
-
4866
-
4867
- /***/ }),
4868
- /* 170 */
4869
- /***/ (function(module, exports, __webpack_require__) {
4870
-
4871
- "use strict";
4872
-
4873
- var fixRegExpWellKnownSymbolLogic = __webpack_require__(111);
4874
- var anObject = __webpack_require__(9);
4875
- var requireObjectCoercible = __webpack_require__(32);
4876
- var sameValue = __webpack_require__(214);
4877
- var regExpExec = __webpack_require__(112);
4878
-
4879
- // @@search logic
4880
- fixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
4881
- return [
4882
- // `String.prototype.search` method
4883
- // https://tc39.es/ecma262/#sec-string.prototype.search
4884
- function search(regexp) {
4885
- var O = requireObjectCoercible(this);
4886
- var searcher = regexp == undefined ? undefined : regexp[SEARCH];
4887
- return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
4888
  },
4889
- // `RegExp.prototype[@@search]` method
4890
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
4891
- function (regexp) {
4892
- var res = maybeCallNative(nativeSearch, regexp, this);
4893
- if (res.done) return res.value;
4894
-
4895
- var rx = anObject(regexp);
4896
- var S = String(this);
4897
-
4898
- var previousLastIndex = rx.lastIndex;
4899
- if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
4900
- var result = regExpExec(rx, S);
4901
- if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
4902
- return result === null ? -1 : result.index;
4903
- }
4904
- ];
4905
- });
4906
-
4907
 
4908
- /***/ }),
4909
- /* 171 */
4910
- /***/ (function(module, exports, __webpack_require__) {
4911
 
4912
- var wellKnownSymbol = __webpack_require__(8);
4913
- var Iterators = __webpack_require__(110);
4914
 
4915
- var ITERATOR = wellKnownSymbol('iterator');
4916
- var ArrayPrototype = Array.prototype;
4917
 
4918
- // check on default Array iterator
4919
- module.exports = function (it) {
4920
- return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
4921
- };
4922
 
 
 
4923
 
4924
- /***/ }),
4925
- /* 172 */
4926
- /***/ (function(module, exports, __webpack_require__) {
 
4927
 
4928
- var anObject = __webpack_require__(9);
4929
 
4930
- module.exports = function (iterator) {
4931
- var returnMethod = iterator['return'];
4932
- if (returnMethod !== undefined) {
4933
- return anObject(returnMethod.call(iterator)).value;
4934
- }
4935
- };
4936
 
 
 
4937
 
4938
- /***/ }),
4939
- /* 173 */
4940
- /***/ (function(module, exports, __webpack_require__) {
 
 
4941
 
4942
- "use strict";
 
 
 
4943
 
4944
- var fails = __webpack_require__(6);
4945
- var getPrototypeOf = __webpack_require__(174);
4946
- var createNonEnumerableProperty = __webpack_require__(19);
4947
- var has = __webpack_require__(11);
4948
- var wellKnownSymbol = __webpack_require__(8);
4949
- var IS_PURE = __webpack_require__(57);
4950
 
4951
- var ITERATOR = wellKnownSymbol('iterator');
4952
- var BUGGY_SAFARI_ITERATORS = false;
4953
 
4954
- var returnThis = function () { return this; };
 
 
 
 
 
4955
 
4956
- // `%IteratorPrototype%` object
4957
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
4958
- var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
4959
 
4960
- if ([].keys) {
4961
- arrayIterator = [].keys();
4962
- // Safari 8 has buggy iterators w/o `next`
4963
- if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
4964
- else {
4965
- PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
4966
- if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
4967
- }
4968
- }
4969
 
4970
- var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
4971
- var test = {};
4972
- // FF44- legacy iterators case
4973
- return IteratorPrototype[ITERATOR].call(test) !== test;
4974
- });
4975
 
4976
- if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
 
 
 
4977
 
4978
- // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
4979
- if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {
4980
- createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
4981
- }
4982
 
4983
- module.exports = {
4984
- IteratorPrototype: IteratorPrototype,
4985
- BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
4986
- };
4987
 
 
 
4988
 
4989
- /***/ }),
4990
- /* 174 */
4991
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
4992
 
4993
- var has = __webpack_require__(11);
4994
- var toObject = __webpack_require__(38);
4995
- var sharedKey = __webpack_require__(52);
4996
- var CORRECT_PROTOTYPE_GETTER = __webpack_require__(213);
4997
-
4998
- var IE_PROTO = sharedKey('IE_PROTO');
4999
- var ObjectPrototype = Object.prototype;
5000
-
5001
- // `Object.getPrototypeOf` method
5002
- // https://tc39.es/ecma262/#sec-object.getprototypeof
5003
- module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
5004
- O = toObject(O);
5005
- if (has(O, IE_PROTO)) return O[IE_PROTO];
5006
- if (typeof O.constructor == 'function' && O instanceof O.constructor) {
5007
- return O.constructor.prototype;
5008
- } return O instanceof Object ? ObjectPrototype : null;
5009
- };
5010
 
 
5011
 
5012
- /***/ }),
5013
- /* 175 */,
5014
- /* 176 */
5015
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
5016
 
5017
- "use strict";
5018
- var isProduction = "production" === 'production';
5019
- var prefix = 'Invariant failed';
5020
- function invariant(condition, message) {
5021
- if (condition) {
5022
- return;
5023
- }
5024
- if (isProduction) {
5025
- throw new Error(prefix);
5026
- }
5027
- throw new Error(prefix + ": " + (message || ''));
5028
- }
5029
-
5030
- /* harmony default export */ __webpack_exports__["a"] = (invariant);
5031
-
5032
-
5033
- /***/ }),
5034
- /* 177 */
5035
- /***/ (function(module, exports, __webpack_require__) {
5036
 
5037
- "use strict";
 
 
5038
 
5039
- var fixRegExpWellKnownSymbolLogic = __webpack_require__(111);
5040
- var isRegExp = __webpack_require__(144);
5041
- var anObject = __webpack_require__(9);
5042
- var requireObjectCoercible = __webpack_require__(32);
5043
- var speciesConstructor = __webpack_require__(150);
5044
- var advanceStringIndex = __webpack_require__(122);
5045
- var toLength = __webpack_require__(34);
5046
- var callRegExpExec = __webpack_require__(112);
5047
- var regexpExec = __webpack_require__(91);
5048
- var fails = __webpack_require__(6);
5049
-
5050
- var arrayPush = [].push;
5051
- var min = Math.min;
5052
- var MAX_UINT32 = 0xFFFFFFFF;
5053
-
5054
- // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
5055
- var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
5056
-
5057
- // @@split logic
5058
- fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
5059
- var internalSplit;
5060
- if (
5061
- 'abbc'.split(/(b)*/)[1] == 'c' ||
5062
- // eslint-disable-next-line regexp/no-empty-group -- required for testing
5063
- 'test'.split(/(?:)/, -1).length != 4 ||
5064
- 'ab'.split(/(?:ab)*/).length != 2 ||
5065
- '.'.split(/(.?)(.?)/).length != 4 ||
5066
- // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
5067
- '.'.split(/()()/).length > 1 ||
5068
- ''.split(/.?/).length
5069
- ) {
5070
- // based on es5-shim implementation, need to rework it
5071
- internalSplit = function (separator, limit) {
5072
- var string = String(requireObjectCoercible(this));
5073
- var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
5074
- if (lim === 0) return [];
5075
- if (separator === undefined) return [string];
5076
- // If `separator` is not a regex, use native split
5077
- if (!isRegExp(separator)) {
5078
- return nativeSplit.call(string, separator, lim);
5079
- }
5080
- var output = [];
5081
- var flags = (separator.ignoreCase ? 'i' : '') +
5082
- (separator.multiline ? 'm' : '') +
5083
- (separator.unicode ? 'u' : '') +
5084
- (separator.sticky ? 'y' : '');
5085
- var lastLastIndex = 0;
5086
- // Make `global` and avoid `lastIndex` issues by working with a copy
5087
- var separatorCopy = new RegExp(separator.source, flags + 'g');
5088
- var match, lastIndex, lastLength;
5089
- while (match = regexpExec.call(separatorCopy, string)) {
5090
- lastIndex = separatorCopy.lastIndex;
5091
- if (lastIndex > lastLastIndex) {
5092
- output.push(string.slice(lastLastIndex, match.index));
5093
- if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
5094
- lastLength = match[0].length;
5095
- lastLastIndex = lastIndex;
5096
- if (output.length >= lim) break;
5097
- }
5098
- if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
5099
  }
5100
- if (lastLastIndex === string.length) {
5101
- if (lastLength || !separatorCopy.test('')) output.push('');
5102
- } else output.push(string.slice(lastLastIndex));
5103
- return output.length > lim ? output.slice(0, lim) : output;
5104
- };
5105
- // Chakra, V8
5106
- } else if ('0'.split(undefined, 0).length) {
5107
- internalSplit = function (separator, limit) {
5108
- return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
5109
  };
5110
- } else internalSplit = nativeSplit;
5111
-
5112
- return [
5113
- // `String.prototype.split` method
5114
- // https://tc39.es/ecma262/#sec-string.prototype.split
5115
- function split(separator, limit) {
5116
- var O = requireObjectCoercible(this);
5117
- var splitter = separator == undefined ? undefined : separator[SPLIT];
5118
- return splitter !== undefined
5119
- ? splitter.call(separator, O, limit)
5120
- : internalSplit.call(String(O), separator, limit);
5121
- },
5122
- // `RegExp.prototype[@@split]` method
5123
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
5124
- //
5125
- // NOTE: This cannot be properly polyfilled in engines that don't support
5126
- // the 'y' flag.
5127
- function (regexp, limit) {
5128
- var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
5129
- if (res.done) return res.value;
5130
-
5131
- var rx = anObject(regexp);
5132
- var S = String(this);
5133
- var C = speciesConstructor(rx, RegExp);
5134
-
5135
- var unicodeMatching = rx.unicode;
5136
- var flags = (rx.ignoreCase ? 'i' : '') +
5137
- (rx.multiline ? 'm' : '') +
5138
- (rx.unicode ? 'u' : '') +
5139
- (SUPPORTS_Y ? 'y' : 'g');
5140
-
5141
- // ^(? + rx + ) is needed, in combination with some S slicing, to
5142
- // simulate the 'y' flag.
5143
- var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
5144
- var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
5145
- if (lim === 0) return [];
5146
- if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
5147
- var p = 0;
5148
- var q = 0;
5149
- var A = [];
5150
- while (q < S.length) {
5151
- splitter.lastIndex = SUPPORTS_Y ? q : 0;
5152
- var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
5153
- var e;
5154
- if (
5155
- z === null ||
5156
- (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
5157
- ) {
5158
- q = advanceStringIndex(S, q, unicodeMatching);
5159
- } else {
5160
- A.push(S.slice(p, q));
5161
- if (A.length === lim) return A;
5162
- for (var i = 1; i <= z.length - 1; i++) {
5163
- A.push(z[i]);
5164
- if (A.length === lim) return A;
5165
- }
5166
- q = p = e;
5167
- }
5168
- }
5169
- A.push(S.slice(p));
5170
- return A;
5171
- }
5172
- ];
5173
- }, !SUPPORTS_Y);
5174
-
5175
 
5176
- /***/ }),
5177
- /* 178 */
5178
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
5179
 
5180
- "use strict";
 
 
5181
 
5182
- var DESCRIPTORS = __webpack_require__(13);
5183
- var global = __webpack_require__(3);
5184
- var isForced = __webpack_require__(74);
5185
- var redefine = __webpack_require__(27);
5186
- var has = __webpack_require__(11);
5187
- var classof = __webpack_require__(30);
5188
- var inheritIfRequired = __webpack_require__(156);
5189
- var toPrimitive = __webpack_require__(40);
5190
- var fails = __webpack_require__(6);
5191
- var create = __webpack_require__(69);
5192
- var getOwnPropertyNames = __webpack_require__(56).f;
5193
- var getOwnPropertyDescriptor = __webpack_require__(33).f;
5194
- var defineProperty = __webpack_require__(17).f;
5195
- var trim = __webpack_require__(188).trim;
5196
-
5197
- var NUMBER = 'Number';
5198
- var NativeNumber = global[NUMBER];
5199
- var NumberPrototype = NativeNumber.prototype;
5200
-
5201
- // Opera ~12 has broken Object#toString
5202
- var BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;
5203
-
5204
- // `ToNumber` abstract operation
5205
- // https://tc39.es/ecma262/#sec-tonumber
5206
- var toNumber = function (argument) {
5207
- var it = toPrimitive(argument, false);
5208
- var first, third, radix, maxCode, digits, length, index, code;
5209
- if (typeof it == 'string' && it.length > 2) {
5210
- it = trim(it);
5211
- first = it.charCodeAt(0);
5212
- if (first === 43 || first === 45) {
5213
- third = it.charCodeAt(2);
5214
- if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
5215
- } else if (first === 48) {
5216
- switch (it.charCodeAt(1)) {
5217
- case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
5218
- case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
5219
- default: return +it;
5220
- }
5221
- digits = it.slice(2);
5222
- length = digits.length;
5223
- for (index = 0; index < length; index++) {
5224
- code = digits.charCodeAt(index);
5225
- // parseInt parses a string to a first unavailable symbol
5226
- // but ToNumber should return NaN if a string contains unavailable symbols
5227
- if (code < 48 || code > maxCode) return NaN;
5228
- } return parseInt(digits, radix);
5229
- }
5230
- } return +it;
5231
- };
5232
 
5233
- // `Number` constructor
5234
- // https://tc39.es/ecma262/#sec-number-constructor
5235
- if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
5236
- var NumberWrapper = function Number(value) {
5237
- var it = arguments.length < 1 ? 0 : value;
5238
- var dummy = this;
5239
- return dummy instanceof NumberWrapper
5240
- // check on 1..constructor(foo) case
5241
- && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)
5242
- ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);
5243
  };
5244
- for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (
5245
- // ES3:
5246
- 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
5247
- // ES2015 (in case, if modules with ES2015 Number statics required before):
5248
- 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
5249
- 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +
5250
- // ESNext
5251
- 'fromString,range'
5252
- ).split(','), j = 0, key; keys.length > j; j++) {
5253
- if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {
5254
- defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));
5255
- }
5256
- }
5257
- NumberWrapper.prototype = NumberPrototype;
5258
- NumberPrototype.constructor = NumberWrapper;
5259
- redefine(global, NUMBER, NumberWrapper);
5260
  }
5261
 
 
5262
 
5263
- /***/ }),
5264
- /* 179 */
5265
- /***/ (function(module, exports, __webpack_require__) {
5266
 
5267
- var arrayLikeToArray = __webpack_require__(124);
 
5268
 
5269
- function _arrayWithoutHoles(arr) {
5270
- if (Array.isArray(arr)) return arrayLikeToArray(arr);
5271
- }
5272
 
5273
- module.exports = _arrayWithoutHoles;
 
 
5274
 
5275
- /***/ }),
5276
- /* 180 */
5277
- /***/ (function(module, exports) {
5278
 
5279
- function _iterableToArray(iter) {
5280
- if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
5281
- }
5282
 
5283
- module.exports = _iterableToArray;
 
 
5284
 
5285
- /***/ }),
5286
- /* 181 */
5287
- /***/ (function(module, exports) {
5288
 
5289
- function _nonIterableSpread() {
5290
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5291
- }
5292
 
5293
- module.exports = _nonIterableSpread;
5294
 
5295
- /***/ }),
5296
- /* 182 */
5297
- /***/ (function(module, exports) {
5298
 
5299
- function _arrayWithHoles(arr) {
5300
- if (Array.isArray(arr)) return arr;
5301
- }
5302
 
5303
- module.exports = _arrayWithHoles;
5304
 
5305
- /***/ }),
5306
- /* 183 */
5307
- /***/ (function(module, exports) {
5308
 
5309
- function _iterableToArrayLimit(arr, i) {
5310
- if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
5311
- var _arr = [];
5312
- var _n = true;
5313
- var _d = false;
5314
- var _e = undefined;
5315
 
5316
- try {
5317
- for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
5318
- _arr.push(_s.value);
5319
 
5320
- if (i && _arr.length === i) break;
5321
- }
5322
- } catch (err) {
5323
- _d = true;
5324
- _e = err;
5325
- } finally {
5326
- try {
5327
- if (!_n && _i["return"] != null) _i["return"]();
5328
- } finally {
5329
- if (_d) throw _e;
5330
- }
5331
- }
5332
 
5333
- return _arr;
5334
- }
5335
 
5336
- module.exports = _iterableToArrayLimit;
5337
 
5338
- /***/ }),
5339
- /* 184 */
5340
- /***/ (function(module, exports) {
5341
 
5342
- function _nonIterableRest() {
5343
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5344
- }
5345
 
5346
- module.exports = _nonIterableRest;
 
 
 
 
5347
 
5348
- /***/ }),
5349
- /* 185 */,
5350
- /* 186 */,
5351
- /* 187 */
5352
- /***/ (function(module, exports, __webpack_require__) {
5353
 
5354
- "use strict";
 
 
5355
 
5356
- var $ = __webpack_require__(12);
5357
- var isObject = __webpack_require__(10);
5358
- var isArray = __webpack_require__(84);
5359
- var toAbsoluteIndex = __webpack_require__(97);
5360
- var toLength = __webpack_require__(34);
5361
- var toIndexedObject = __webpack_require__(21);
5362
- var createProperty = __webpack_require__(102);
5363
- var wellKnownSymbol = __webpack_require__(8);
5364
- var arrayMethodHasSpeciesSupport = __webpack_require__(89);
5365
-
5366
- var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
5367
-
5368
- var SPECIES = wellKnownSymbol('species');
5369
- var nativeSlice = [].slice;
5370
- var max = Math.max;
5371
-
5372
- // `Array.prototype.slice` method
5373
- // https://tc39.es/ecma262/#sec-array.prototype.slice
5374
- // fallback for not array-like ES3 strings and DOM objects
5375
- $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
5376
- slice: function slice(start, end) {
5377
- var O = toIndexedObject(this);
5378
- var length = toLength(O.length);
5379
- var k = toAbsoluteIndex(start, length);
5380
- var fin = toAbsoluteIndex(end === undefined ? length : end, length);
5381
- // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
5382
- var Constructor, result, n;
5383
- if (isArray(O)) {
5384
- Constructor = O.constructor;
5385
- // cross-realm fallback
5386
- if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
5387
- Constructor = undefined;
5388
- } else if (isObject(Constructor)) {
5389
- Constructor = Constructor[SPECIES];
5390
- if (Constructor === null) Constructor = undefined;
5391
- }
5392
- if (Constructor === Array || Constructor === undefined) {
5393
- return nativeSlice.call(O, k, fin);
5394
- }
5395
- }
5396
- result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
5397
- for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
5398
- result.length = n;
5399
- return result;
5400
- }
5401
- });
5402
 
 
 
 
 
 
 
 
 
5403
 
5404
- /***/ }),
5405
- /* 188 */
5406
- /***/ (function(module, exports, __webpack_require__) {
5407
 
5408
- var requireObjectCoercible = __webpack_require__(32);
5409
- var whitespaces = __webpack_require__(189);
 
 
 
 
 
 
5410
 
5411
- var whitespace = '[' + whitespaces + ']';
5412
- var ltrim = RegExp('^' + whitespace + whitespace + '*');
5413
- var rtrim = RegExp(whitespace + whitespace + '*$');
5414
 
5415
- // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
5416
- var createMethod = function (TYPE) {
5417
- return function ($this) {
5418
- var string = String(requireObjectCoercible($this));
5419
- if (TYPE & 1) string = string.replace(ltrim, '');
5420
- if (TYPE & 2) string = string.replace(rtrim, '');
5421
- return string;
5422
- };
5423
- };
 
 
5424
 
5425
- module.exports = {
5426
- // `String.prototype.{ trimLeft, trimStart }` methods
5427
- // https://tc39.es/ecma262/#sec-string.prototype.trimstart
5428
- start: createMethod(1),
5429
- // `String.prototype.{ trimRight, trimEnd }` methods
5430
- // https://tc39.es/ecma262/#sec-string.prototype.trimend
5431
- end: createMethod(2),
5432
- // `String.prototype.trim` method
5433
- // https://tc39.es/ecma262/#sec-string.prototype.trim
5434
- trim: createMethod(3)
5435
- };
5436
 
 
5437
 
5438
- /***/ }),
5439
- /* 189 */
5440
- /***/ (function(module, exports) {
5441
 
5442
- // a string of all valid unicode whitespaces
5443
- module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
5444
- '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
 
 
 
5445
 
 
 
 
5446
 
5447
- /***/ }),
5448
- /* 190 */,
5449
- /* 191 */,
5450
- /* 192 */
5451
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
5452
 
5453
- "use strict";
 
5454
 
5455
- var $ = __webpack_require__(12);
5456
- var $find = __webpack_require__(75).find;
5457
- var addToUnscopables = __webpack_require__(118);
5458
 
5459
- var FIND = 'find';
5460
- var SKIPS_HOLES = true;
 
5461
 
5462
- // Shouldn't skip holes
5463
- if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
 
 
5464
 
5465
- // `Array.prototype.find` method
5466
- // https://tc39.es/ecma262/#sec-array.prototype.find
5467
- $({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
5468
- find: function find(callbackfn /* , that = undefined */) {
5469
- return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
5470
- }
5471
- });
5472
 
5473
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
5474
- addToUnscopables(FIND);
 
5475
 
 
 
 
 
5476
 
5477
- /***/ }),
5478
- /* 193 */
5479
- /***/ (function(module, exports, __webpack_require__) {
5480
 
5481
- var global = __webpack_require__(3);
 
 
 
 
 
5482
 
5483
- module.exports = global.Promise;
 
5484
 
 
5485
 
5486
- /***/ }),
5487
- /* 194 */
5488
- /***/ (function(module, exports, __webpack_require__) {
 
5489
 
5490
- var global = __webpack_require__(3);
5491
- var getOwnPropertyDescriptor = __webpack_require__(33).f;
5492
- var macrotask = __webpack_require__(157).set;
5493
- var IS_IOS = __webpack_require__(158);
5494
- var IS_WEBOS_WEBKIT = __webpack_require__(195);
5495
- var IS_NODE = __webpack_require__(77);
5496
-
5497
- var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
5498
- var document = global.document;
5499
- var process = global.process;
5500
- var Promise = global.Promise;
5501
- // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
5502
- var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
5503
- var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
5504
-
5505
- var flush, head, last, notify, toggle, node, promise, then;
5506
-
5507
- // modern engines have queueMicrotask method
5508
- if (!queueMicrotask) {
5509
- flush = function () {
5510
- var parent, fn;
5511
- if (IS_NODE && (parent = process.domain)) parent.exit();
5512
- while (head) {
5513
- fn = head.fn;
5514
- head = head.next;
5515
- try {
5516
- fn();
5517
- } catch (error) {
5518
- if (head) notify();
5519
- else last = undefined;
5520
- throw error;
5521
- }
5522
- } last = undefined;
5523
- if (parent) parent.enter();
5524
- };
5525
-
5526
- // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
5527
- // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
5528
- if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
5529
- toggle = true;
5530
- node = document.createTextNode('');
5531
- new MutationObserver(flush).observe(node, { characterData: true });
5532
- notify = function () {
5533
- node.data = toggle = !toggle;
5534
- };
5535
- // environments with maybe non-completely correct, but existent Promise
5536
- } else if (Promise && Promise.resolve) {
5537
- // Promise.resolve without an argument throws an error in LG WebOS 2
5538
- promise = Promise.resolve(undefined);
5539
- then = promise.then;
5540
- notify = function () {
5541
- then.call(promise, flush);
5542
- };
5543
- // Node.js without promises
5544
- } else if (IS_NODE) {
5545
- notify = function () {
5546
- process.nextTick(flush);
5547
- };
5548
- // for other environments - macrotask based on:
5549
- // - setImmediate
5550
- // - MessageChannel
5551
- // - window.postMessag
5552
- // - onreadystatechange
5553
- // - setTimeout
5554
- } else {
5555
- notify = function () {
5556
- // strange IE + webpack dev server bug - use .call(global)
5557
- macrotask.call(global, flush);
5558
- };
5559
  }
5560
- }
5561
 
5562
- module.exports = queueMicrotask || function (fn) {
5563
- var task = { fn: fn, next: undefined };
5564
- if (last) last.next = task;
5565
- if (!head) {
5566
- head = task;
5567
- notify();
5568
- } last = task;
5569
- };
5570
 
 
 
 
5571
 
5572
- /***/ }),
5573
- /* 195 */
5574
- /***/ (function(module, exports, __webpack_require__) {
5575
 
5576
- var userAgent = __webpack_require__(87);
 
 
5577
 
5578
- module.exports = /web0s(?!.*chrome)/i.test(userAgent);
 
 
5579
 
 
 
5580
 
5581
- /***/ }),
5582
- /* 196 */
5583
- /***/ (function(module, exports, __webpack_require__) {
5584
 
5585
- var anObject = __webpack_require__(9);
5586
- var isObject = __webpack_require__(10);
5587
- var newPromiseCapability = __webpack_require__(159);
5588
-
5589
- module.exports = function (C, x) {
5590
- anObject(C);
5591
- if (isObject(x) && x.constructor === C) return x;
5592
- var promiseCapability = newPromiseCapability.f(C);
5593
- var resolve = promiseCapability.resolve;
5594
- resolve(x);
5595
- return promiseCapability.promise;
5596
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
5597
 
 
5598
 
5599
- /***/ }),
5600
- /* 197 */
5601
- /***/ (function(module, exports, __webpack_require__) {
5602
 
5603
- var global = __webpack_require__(3);
 
 
5604
 
5605
- module.exports = function (a, b) {
5606
- var console = global.console;
5607
- if (console && console.error) {
5608
- arguments.length === 1 ? console.error(a) : console.error(a, b);
5609
  }
5610
- };
5611
 
 
 
 
 
 
5612
 
5613
- /***/ }),
5614
- /* 198 */
5615
- /***/ (function(module, exports) {
5616
 
5617
- module.exports = function (exec) {
5618
- try {
5619
- return { error: false, value: exec() };
5620
- } catch (error) {
5621
- return { error: true, value: error };
5622
  }
5623
- };
5624
 
 
 
 
5625
 
5626
- /***/ }),
5627
- /* 199 */
5628
- /***/ (function(module, exports, __webpack_require__) {
 
5629
 
5630
- "use strict";
 
 
5631
 
5632
- var IteratorPrototype = __webpack_require__(173).IteratorPrototype;
5633
- var create = __webpack_require__(69);
5634
- var createPropertyDescriptor = __webpack_require__(39);
5635
- var setToStringTag = __webpack_require__(90);
5636
- var Iterators = __webpack_require__(110);
 
 
 
 
 
 
 
 
 
5637
 
5638
- var returnThis = function () { return this; };
 
 
 
5639
 
5640
- module.exports = function (IteratorConstructor, NAME, next) {
5641
- var TO_STRING_TAG = NAME + ' Iterator';
5642
- IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
5643
- setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
5644
- Iterators[TO_STRING_TAG] = returnThis;
5645
- return IteratorConstructor;
5646
- };
5647
 
 
 
 
 
 
 
 
 
 
 
5648
 
5649
- /***/ }),
5650
- /* 200 */
5651
- /***/ (function(module, exports, __webpack_require__) {
5652
 
5653
- "use strict";
 
 
5654
 
 
 
 
 
 
 
 
 
 
 
5655
 
5656
- var formats = __webpack_require__(169);
 
 
 
5657
 
5658
- var has = Object.prototype.hasOwnProperty;
5659
- var isArray = Array.isArray;
 
 
 
5660
 
5661
- var hexTable = (function () {
5662
- var array = [];
5663
- for (var i = 0; i < 256; ++i) {
5664
- array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
5665
- }
5666
 
5667
- return array;
5668
- }());
 
 
5669
 
5670
- var compactQueue = function compactQueue(queue) {
5671
- while (queue.length > 1) {
5672
- var item = queue.pop();
5673
- var obj = item.obj[item.prop];
 
5674
 
5675
- if (isArray(obj)) {
5676
- var compacted = [];
 
 
 
 
 
 
 
 
 
 
5677
 
5678
- for (var j = 0; j < obj.length; ++j) {
5679
- if (typeof obj[j] !== 'undefined') {
5680
- compacted.push(obj[j]);
5681
- }
5682
- }
 
 
5683
 
5684
- item.obj[item.prop] = compacted;
5685
- }
5686
- }
5687
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5688
 
5689
- var arrayToObject = function arrayToObject(source, options) {
5690
- var obj = options && options.plainObjects ? Object.create(null) : {};
5691
- for (var i = 0; i < source.length; ++i) {
5692
- if (typeof source[i] !== 'undefined') {
5693
- obj[i] = source[i];
5694
- }
5695
- }
5696
 
5697
- return obj;
5698
- };
 
 
 
 
 
 
5699
 
5700
- var merge = function merge(target, source, options) {
5701
- /* eslint no-param-reassign: 0 */
5702
- if (!source) {
5703
- return target;
5704
- }
5705
 
5706
- if (typeof source !== 'object') {
5707
- if (isArray(target)) {
5708
- target.push(source);
5709
- } else if (target && typeof target === 'object') {
5710
- if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
5711
- target[source] = true;
5712
- }
5713
- } else {
5714
- return [target, source];
5715
- }
5716
-
5717
- return target;
5718
- }
5719
 
5720
- if (!target || typeof target !== 'object') {
5721
- return [target].concat(source);
5722
- }
5723
 
5724
- var mergeTarget = target;
5725
- if (isArray(target) && !isArray(source)) {
5726
- mergeTarget = arrayToObject(target, options);
5727
- }
5728
 
5729
- if (isArray(target) && isArray(source)) {
5730
- source.forEach(function (item, i) {
5731
- if (has.call(target, i)) {
5732
- var targetItem = target[i];
5733
- if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
5734
- target[i] = merge(targetItem, item, options);
5735
- } else {
5736
- target.push(item);
5737
- }
5738
- } else {
5739
- target[i] = item;
5740
- }
5741
- });
5742
- return target;
5743
- }
5744
 
5745
- return Object.keys(source).reduce(function (acc, key) {
5746
- var value = source[key];
 
 
 
5747
 
5748
- if (has.call(acc, key)) {
5749
- acc[key] = merge(acc[key], value, options);
5750
- } else {
5751
- acc[key] = value;
5752
- }
5753
- return acc;
5754
- }, mergeTarget);
5755
- };
5756
 
5757
- var assign = function assignSingleSource(target, source) {
5758
- return Object.keys(source).reduce(function (acc, key) {
5759
- acc[key] = source[key];
5760
- return acc;
5761
- }, target);
5762
- };
5763
 
5764
- var decode = function (str, decoder, charset) {
5765
- var strWithoutPlus = str.replace(/\+/g, ' ');
5766
- if (charset === 'iso-8859-1') {
5767
- // unescape never throws, no try...catch needed:
5768
- return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
5769
- }
5770
- // utf-8
5771
- try {
5772
- return decodeURIComponent(strWithoutPlus);
5773
- } catch (e) {
5774
- return strWithoutPlus;
5775
- }
5776
- };
5777
 
5778
- var encode = function encode(str, defaultEncoder, charset, kind, format) {
5779
- // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
5780
- // It has been adapted here for stricter adherence to RFC 3986
5781
- if (str.length === 0) {
5782
- return str;
5783
- }
5784
 
5785
- var string = str;
5786
- if (typeof str === 'symbol') {
5787
- string = Symbol.prototype.toString.call(str);
5788
- } else if (typeof str !== 'string') {
5789
- string = String(str);
5790
- }
5791
 
5792
- if (charset === 'iso-8859-1') {
5793
- return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
5794
- return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
5795
- });
5796
- }
5797
 
5798
- var out = '';
5799
- for (var i = 0; i < string.length; ++i) {
5800
- var c = string.charCodeAt(i);
5801
 
5802
- if (
5803
- c === 0x2D // -
5804
- || c === 0x2E // .
5805
- || c === 0x5F // _
5806
- || c === 0x7E // ~
5807
- || (c >= 0x30 && c <= 0x39) // 0-9
5808
- || (c >= 0x41 && c <= 0x5A) // a-z
5809
- || (c >= 0x61 && c <= 0x7A) // A-Z
5810
- || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
5811
- ) {
5812
- out += string.charAt(i);
5813
- continue;
5814
- }
5815
 
5816
- if (c < 0x80) {
5817
- out = out + hexTable[c];
5818
- continue;
5819
- }
 
 
 
 
5820
 
5821
- if (c < 0x800) {
5822
- out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
5823
- continue;
5824
- }
5825
 
5826
- if (c < 0xD800 || c >= 0xE000) {
5827
- out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
5828
- continue;
5829
- }
 
5830
 
5831
- i += 1;
5832
- c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
5833
- out += hexTable[0xF0 | (c >> 18)]
5834
- + hexTable[0x80 | ((c >> 12) & 0x3F)]
5835
- + hexTable[0x80 | ((c >> 6) & 0x3F)]
5836
- + hexTable[0x80 | (c & 0x3F)];
5837
- }
5838
 
5839
- return out;
5840
- };
5841
 
5842
- var compact = function compact(value) {
5843
- var queue = [{ obj: { o: value }, prop: 'o' }];
5844
- var refs = [];
 
5845
 
5846
- for (var i = 0; i < queue.length; ++i) {
5847
- var item = queue[i];
5848
- var obj = item.obj[item.prop];
5849
 
5850
- var keys = Object.keys(obj);
5851
- for (var j = 0; j < keys.length; ++j) {
5852
- var key = keys[j];
5853
- var val = obj[key];
5854
- if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
5855
- queue.push({ obj: obj, prop: key });
5856
- refs.push(val);
5857
- }
5858
- }
5859
  }
5860
 
5861
- compactQueue(queue);
5862
 
5863
- return value;
5864
- };
 
5865
 
5866
- var isRegExp = function isRegExp(obj) {
5867
- return Object.prototype.toString.call(obj) === '[object RegExp]';
5868
- };
5869
 
5870
- var isBuffer = function isBuffer(obj) {
5871
- if (!obj || typeof obj !== 'object') {
5872
- return false;
5873
- }
5874
 
5875
- return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
5876
- };
 
5877
 
5878
- var combine = function combine(a, b) {
5879
- return [].concat(a, b);
5880
- };
5881
 
5882
- var maybeMap = function maybeMap(val, fn) {
5883
- if (isArray(val)) {
5884
- var mapped = [];
5885
- for (var i = 0; i < val.length; i += 1) {
5886
- mapped.push(fn(val[i]));
5887
- }
5888
- return mapped;
5889
- }
5890
- return fn(val);
5891
- };
5892
-
5893
- module.exports = {
5894
- arrayToObject: arrayToObject,
5895
- assign: assign,
5896
- combine: combine,
5897
- compact: compact,
5898
- decode: decode,
5899
- encode: encode,
5900
- isBuffer: isBuffer,
5901
- isRegExp: isRegExp,
5902
- maybeMap: maybeMap,
5903
- merge: merge
5904
- };
5905
 
 
 
 
 
 
 
 
 
 
 
5906
 
5907
- /***/ }),
5908
- /* 201 */,
5909
- /* 202 */
5910
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
5911
 
5912
- "use strict";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5913
 
5914
- // EXPORTS
5915
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ createBrowserHistory; });
5916
- __webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ createMemoryHistory; });
5917
- __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ createLocation; });
5918
- __webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ locationsAreEqual; });
5919
- __webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ createPath; });
5920
 
5921
- // UNUSED EXPORTS: createHashHistory, parsePath
5922
 
5923
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
5924
- var esm_extends = __webpack_require__(117);
 
5925
 
5926
- // CONCATENATED MODULE: ./node_modules/resolve-pathname/esm/resolve-pathname.js
5927
- function isAbsolute(pathname) {
5928
- return pathname.charAt(0) === '/';
5929
- }
5930
 
5931
- // About 1.5x faster than the two-arg version of Array#splice()
5932
- function spliceOne(list, index) {
5933
- for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
5934
- list[i] = list[k];
5935
  }
5936
 
5937
- list.pop();
5938
- }
5939
 
5940
- // This implementation is based heavily on node's url.parse
5941
- function resolvePathname(to, from) {
5942
- if (from === undefined) from = '';
5943
 
5944
- var toParts = (to && to.split('/')) || [];
5945
- var fromParts = (from && from.split('/')) || [];
 
 
 
 
 
5946
 
5947
- var isToAbs = to && isAbsolute(to);
5948
- var isFromAbs = from && isAbsolute(from);
5949
- var mustEndAbs = isToAbs || isFromAbs;
 
 
 
 
 
 
 
 
 
 
 
 
5950
 
5951
- if (to && isAbsolute(to)) {
5952
- // to is absolute
5953
- fromParts = toParts;
5954
- } else if (toParts.length) {
5955
- // to is relative, drop the filename
5956
- fromParts.pop();
5957
- fromParts = fromParts.concat(toParts);
5958
- }
5959
 
5960
- if (!fromParts.length) return '/';
5961
 
5962
- var hasTrailingSlash;
5963
- if (fromParts.length) {
5964
- var last = fromParts[fromParts.length - 1];
5965
- hasTrailingSlash = last === '.' || last === '..' || last === '';
5966
- } else {
5967
- hasTrailingSlash = false;
5968
- }
5969
 
5970
- var up = 0;
5971
- for (var i = fromParts.length; i >= 0; i--) {
5972
- var part = fromParts[i];
5973
 
5974
- if (part === '.') {
5975
- spliceOne(fromParts, i);
5976
- } else if (part === '..') {
5977
- spliceOne(fromParts, i);
5978
- up++;
5979
- } else if (up) {
5980
- spliceOne(fromParts, i);
5981
- up--;
5982
- }
5983
- }
5984
 
5985
- if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');
 
 
 
 
 
 
5986
 
5987
- if (
5988
- mustEndAbs &&
5989
- fromParts[0] !== '' &&
5990
- (!fromParts[0] || !isAbsolute(fromParts[0]))
5991
- )
5992
- fromParts.unshift('');
5993
 
5994
- var result = fromParts.join('/');
5995
 
5996
- if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';
 
5997
 
5998
- return result;
 
 
 
 
5999
  }
 
 
6000
 
6001
- /* harmony default export */ var resolve_pathname = (resolvePathname);
 
 
 
6002
 
6003
- // CONCATENATED MODULE: ./node_modules/value-equal/esm/value-equal.js
6004
- function value_equal_valueOf(obj) {
6005
- return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);
6006
  }
 
 
6007
 
6008
- function valueEqual(a, b) {
6009
- // Test for strict equality first.
6010
- if (a === b) return true;
6011
 
6012
- // Otherwise, if either of them == null they are not equal.
6013
- if (a == null || b == null) return false;
6014
 
6015
- if (Array.isArray(a)) {
6016
- return (
6017
- Array.isArray(b) &&
6018
- a.length === b.length &&
6019
- a.every(function(item, index) {
6020
- return valueEqual(item, b[index]);
6021
- })
6022
- );
6023
- }
6024
 
6025
- if (typeof a === 'object' || typeof b === 'object') {
6026
- var aValue = value_equal_valueOf(a);
6027
- var bValue = value_equal_valueOf(b);
6028
 
6029
- if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);
 
6030
 
6031
- return Object.keys(Object.assign({}, a, b)).every(function(key) {
6032
- return valueEqual(a[key], b[key]);
6033
- });
6034
- }
6035
 
6036
- return false;
6037
- }
6038
 
6039
- /* harmony default export */ var value_equal = (valueEqual);
 
6040
 
6041
- // EXTERNAL MODULE: ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js
6042
- var tiny_invariant_esm = __webpack_require__(176);
6043
 
6044
- // CONCATENATED MODULE: ./node_modules/history/esm/history.js
 
6045
 
 
 
6046
 
 
 
6047
 
 
 
6048
 
 
 
6049
 
 
 
6050
 
6051
- function addLeadingSlash(path) {
6052
- return path.charAt(0) === '/' ? path : '/' + path;
6053
- }
6054
- function stripLeadingSlash(path) {
6055
- return path.charAt(0) === '/' ? path.substr(1) : path;
6056
- }
6057
- function hasBasename(path, prefix) {
6058
- return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;
6059
- }
6060
- function stripBasename(path, prefix) {
6061
- return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
6062
- }
6063
- function stripTrailingSlash(path) {
6064
- return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
6065
- }
6066
- function parsePath(path) {
6067
- var pathname = path || '/';
6068
- var search = '';
6069
- var hash = '';
6070
- var hashIndex = pathname.indexOf('#');
6071
 
6072
- if (hashIndex !== -1) {
6073
- hash = pathname.substr(hashIndex);
6074
- pathname = pathname.substr(0, hashIndex);
6075
- }
6076
 
6077
- var searchIndex = pathname.indexOf('?');
6078
 
6079
- if (searchIndex !== -1) {
6080
- search = pathname.substr(searchIndex);
6081
- pathname = pathname.substr(0, searchIndex);
6082
- }
6083
 
6084
- return {
6085
- pathname: pathname,
6086
- search: search === '?' ? '' : search,
6087
- hash: hash === '#' ? '' : hash
6088
- };
6089
- }
6090
- function createPath(location) {
6091
- var pathname = location.pathname,
6092
- search = location.search,
6093
- hash = location.hash;
6094
- var path = pathname || '/';
6095
- if (search && search !== '?') path += search.charAt(0) === '?' ? search : "?" + search;
6096
- if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : "#" + hash;
6097
- return path;
6098
- }
6099
 
6100
- function createLocation(path, state, key, currentLocation) {
6101
- var location;
6102
 
6103
- if (typeof path === 'string') {
6104
- // Two-arg form: push(path, state)
6105
- location = parsePath(path);
6106
- location.state = state;
6107
- } else {
6108
- // One-arg form: push(location)
6109
- location = Object(esm_extends["a" /* default */])({}, path);
6110
- if (location.pathname === undefined) location.pathname = '';
6111
 
6112
- if (location.search) {
6113
- if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
6114
- } else {
6115
- location.search = '';
6116
- }
6117
 
6118
- if (location.hash) {
6119
- if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
6120
- } else {
6121
- location.hash = '';
6122
- }
6123
 
6124
- if (state !== undefined && location.state === undefined) location.state = state;
6125
- }
 
6126
 
6127
- try {
6128
- location.pathname = decodeURI(location.pathname);
6129
- } catch (e) {
6130
- if (e instanceof URIError) {
6131
- throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
6132
- } else {
6133
- throw e;
6134
- }
6135
- }
6136
 
6137
- if (key) location.key = key;
6138
 
6139
- if (currentLocation) {
6140
- // Resolve incomplete/relative pathname relative to current location.
6141
- if (!location.pathname) {
6142
- location.pathname = currentLocation.pathname;
6143
- } else if (location.pathname.charAt(0) !== '/') {
6144
- location.pathname = resolve_pathname(location.pathname, currentLocation.pathname);
6145
- }
6146
- } else {
6147
- // When there is no prior location and pathname is empty, set it to /
6148
- if (!location.pathname) {
6149
- location.pathname = '/';
6150
- }
6151
- }
6152
 
6153
- return location;
6154
- }
6155
- function locationsAreEqual(a, b) {
6156
- return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && value_equal(a.state, b.state);
6157
- }
6158
 
6159
- function createTransitionManager() {
6160
- var prompt = null;
 
6161
 
6162
- function setPrompt(nextPrompt) {
6163
- false ? undefined : void 0;
6164
- prompt = nextPrompt;
6165
- return function () {
6166
- if (prompt === nextPrompt) prompt = null;
6167
- };
6168
- }
6169
 
6170
- function confirmTransitionTo(location, action, getUserConfirmation, callback) {
6171
- // TODO: If another transition starts while we're still confirming
6172
- // the previous one, we may end up in a weird state. Figure out the
6173
- // best way to handle this.
6174
- if (prompt != null) {
6175
- var result = typeof prompt === 'function' ? prompt(location, action) : prompt;
6176
 
6177
- if (typeof result === 'string') {
6178
- if (typeof getUserConfirmation === 'function') {
6179
- getUserConfirmation(result, callback);
6180
- } else {
6181
- false ? undefined : void 0;
6182
- callback(true);
6183
- }
6184
- } else {
6185
- // Return false from a transition hook to cancel the transition.
6186
- callback(result !== false);
6187
- }
6188
- } else {
6189
- callback(true);
6190
- }
6191
- }
6192
 
6193
- var listeners = [];
6194
 
6195
- function appendListener(fn) {
6196
- var isActive = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6197
 
6198
- function listener() {
6199
- if (isActive) fn.apply(void 0, arguments);
6200
- }
 
 
6201
 
6202
- listeners.push(listener);
6203
- return function () {
6204
- isActive = false;
6205
- listeners = listeners.filter(function (item) {
6206
- return item !== listener;
6207
- });
6208
- };
 
 
 
 
 
 
 
 
 
 
 
6209
  }
6210
 
6211
- function notifyListeners() {
6212
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
6213
- args[_key] = arguments[_key];
6214
- }
 
 
 
 
6215
 
6216
- listeners.forEach(function (listener) {
6217
- return listener.apply(void 0, args);
 
 
 
 
6218
  });
6219
  }
6220
 
6221
- return {
6222
- setPrompt: setPrompt,
6223
- confirmTransitionTo: confirmTransitionTo,
6224
- appendListener: appendListener,
6225
- notifyListeners: notifyListeners
6226
- };
6227
- }
 
 
6228
 
6229
- var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
6230
- function getConfirmation(message, callback) {
6231
- callback(window.confirm(message)); // eslint-disable-line no-alert
6232
- }
6233
- /**
6234
- * Returns true if the HTML5 history API is supported. Taken from Modernizr.
6235
- *
6236
- * https://github.com/Modernizr/Modernizr/blob/master/LICENSE
6237
- * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
6238
- * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586
6239
- */
 
 
 
 
 
 
 
 
 
 
6240
 
6241
- function supportsHistory() {
6242
- var ua = window.navigator.userAgent;
6243
- if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;
6244
- return window.history && 'pushState' in window.history;
6245
- }
6246
- /**
6247
- * Returns true if browser fires popstate on hash change.
6248
- * IE10 and IE11 do not.
6249
- */
6250
 
6251
- function supportsPopStateOnHashChange() {
6252
- return window.navigator.userAgent.indexOf('Trident') === -1;
6253
- }
6254
- /**
6255
- * Returns false if using go(n) with hash history causes a full page reload.
6256
- */
6257
 
6258
- function supportsGoWithoutReloadUsingHash() {
6259
- return window.navigator.userAgent.indexOf('Firefox') === -1;
6260
- }
6261
- /**
6262
- * Returns true if a given popstate event is an extraneous WebKit event.
6263
- * Accounts for the fact that Chrome on iOS fires real popstate events
6264
- * containing undefined state when pressing the back button.
6265
- */
6266
 
6267
- function isExtraneousPopstateEvent(event) {
6268
- return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
6269
- }
 
6270
 
6271
- var PopStateEvent = 'popstate';
6272
- var HashChangeEvent = 'hashchange';
6273
 
6274
- function getHistoryState() {
6275
- try {
6276
- return window.history.state || {};
6277
- } catch (e) {
6278
- // IE 11 sometimes throws when accessing window.history.state
6279
- // See https://github.com/ReactTraining/history/pull/289
6280
- return {};
6281
  }
6282
- }
6283
- /**
6284
- * Creates a history object that uses the HTML5 history API including
6285
- * pushState, replaceState, and the popstate event.
6286
- */
6287
 
 
 
 
 
 
 
 
 
 
 
 
6288
 
6289
- function createBrowserHistory(props) {
6290
- if (props === void 0) {
6291
- props = {};
6292
- }
 
6293
 
6294
- !canUseDOM ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
6295
- var globalHistory = window.history;
6296
- var canUseHistory = supportsHistory();
6297
- var needsHashChangeListener = !supportsPopStateOnHashChange();
6298
- var _props = props,
6299
- _props$forceRefresh = _props.forceRefresh,
6300
- forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,
6301
- _props$getUserConfirm = _props.getUserConfirmation,
6302
- getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
6303
- _props$keyLength = _props.keyLength,
6304
- keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
6305
- var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
6306
 
6307
- function getDOMLocation(historyState) {
6308
- var _ref = historyState || {},
6309
- key = _ref.key,
6310
- state = _ref.state;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6311
 
6312
- var _window$location = window.location,
6313
- pathname = _window$location.pathname,
6314
- search = _window$location.search,
6315
- hash = _window$location.hash;
6316
- var path = pathname + search + hash;
6317
- false ? undefined : void 0;
6318
- if (basename) path = stripBasename(path, basename);
6319
- return createLocation(path, state, key);
6320
- }
 
6321
 
6322
- function createKey() {
6323
- return Math.random().toString(36).substr(2, keyLength);
6324
- }
6325
 
6326
- var transitionManager = createTransitionManager();
 
 
 
 
 
 
 
6327
 
6328
- function setState(nextState) {
6329
- Object(esm_extends["a" /* default */])(history, nextState);
6330
 
6331
- history.length = globalHistory.length;
6332
- transitionManager.notifyListeners(history.location, history.action);
 
 
6333
  }
 
6334
 
6335
- function handlePopState(event) {
6336
- // Ignore extraneous popstate events in WebKit.
6337
- if (isExtraneousPopstateEvent(event)) return;
6338
- handlePop(getDOMLocation(event.state));
6339
- }
 
 
6340
 
6341
- function handleHashChange() {
6342
- handlePop(getDOMLocation(getHistoryState()));
6343
- }
6344
 
6345
- var forceNextPop = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6346
 
6347
- function handlePop(location) {
6348
- if (forceNextPop) {
6349
- forceNextPop = false;
6350
- setState();
6351
- } else {
6352
- var action = 'POP';
6353
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
6354
- if (ok) {
6355
- setState({
6356
- action: action,
6357
- location: location
6358
- });
6359
- } else {
6360
- revertPop(location);
6361
- }
6362
- });
6363
  }
6364
  }
6365
 
6366
- function revertPop(fromLocation) {
6367
- var toLocation = history.location; // TODO: We could probably make this more reliable by
6368
- // keeping a list of keys we've seen in sessionStorage.
6369
- // Instead, we just default to 0 for keys we don't know.
 
 
6370
 
6371
- var toIndex = allKeys.indexOf(toLocation.key);
6372
- if (toIndex === -1) toIndex = 0;
6373
- var fromIndex = allKeys.indexOf(fromLocation.key);
6374
- if (fromIndex === -1) fromIndex = 0;
6375
- var delta = toIndex - fromIndex;
6376
 
6377
- if (delta) {
6378
- forceNextPop = true;
6379
- go(delta);
6380
- }
6381
- }
6382
 
6383
- var initialLocation = getDOMLocation(getHistoryState());
6384
- var allKeys = [initialLocation.key]; // Public interface
6385
 
6386
- function createHref(location) {
6387
- return basename + createPath(location);
6388
- }
6389
 
6390
- function push(path, state) {
6391
- false ? undefined : void 0;
6392
- var action = 'PUSH';
6393
- var location = createLocation(path, state, createKey(), history.location);
6394
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
6395
- if (!ok) return;
6396
- var href = createHref(location);
6397
- var key = location.key,
6398
- state = location.state;
6399
 
6400
- if (canUseHistory) {
6401
- globalHistory.pushState({
6402
- key: key,
6403
- state: state
6404
- }, null, href);
6405
 
6406
- if (forceRefresh) {
6407
- window.location.href = href;
6408
- } else {
6409
- var prevIndex = allKeys.indexOf(history.location.key);
6410
- var nextKeys = allKeys.slice(0, prevIndex + 1);
6411
- nextKeys.push(location.key);
6412
- allKeys = nextKeys;
6413
- setState({
6414
- action: action,
6415
- location: location
6416
- });
6417
- }
6418
- } else {
6419
- false ? undefined : void 0;
6420
- window.location.href = href;
6421
- }
6422
- });
6423
- }
6424
 
6425
- function replace(path, state) {
6426
- false ? undefined : void 0;
6427
- var action = 'REPLACE';
6428
- var location = createLocation(path, state, createKey(), history.location);
6429
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
6430
- if (!ok) return;
6431
- var href = createHref(location);
6432
- var key = location.key,
6433
- state = location.state;
6434
 
6435
- if (canUseHistory) {
6436
- globalHistory.replaceState({
6437
- key: key,
6438
- state: state
6439
- }, null, href);
6440
 
6441
- if (forceRefresh) {
6442
- window.location.replace(href);
6443
- } else {
6444
- var prevIndex = allKeys.indexOf(history.location.key);
6445
- if (prevIndex !== -1) allKeys[prevIndex] = location.key;
6446
- setState({
6447
- action: action,
6448
- location: location
6449
- });
6450
- }
6451
- } else {
6452
- false ? undefined : void 0;
6453
- window.location.replace(href);
6454
- }
6455
- });
6456
- }
6457
 
6458
- function go(n) {
6459
- globalHistory.go(n);
6460
- }
6461
 
6462
- function goBack() {
6463
- go(-1);
6464
- }
6465
 
6466
- function goForward() {
6467
- go(1);
6468
- }
6469
 
6470
- var listenerCount = 0;
6471
 
6472
- function checkDOMListeners(delta) {
6473
- listenerCount += delta;
 
 
 
 
 
 
 
 
 
6474
 
6475
- if (listenerCount === 1 && delta === 1) {
6476
- window.addEventListener(PopStateEvent, handlePopState);
6477
- if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);
6478
- } else if (listenerCount === 0) {
6479
- window.removeEventListener(PopStateEvent, handlePopState);
6480
- if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);
6481
- }
6482
- }
 
 
 
6483
 
6484
- var isBlocked = false;
 
 
 
 
 
 
 
6485
 
6486
- function block(prompt) {
6487
- if (prompt === void 0) {
6488
- prompt = false;
6489
- }
6490
 
6491
- var unblock = transitionManager.setPrompt(prompt);
 
 
 
6492
 
6493
- if (!isBlocked) {
6494
- checkDOMListeners(1);
6495
- isBlocked = true;
6496
- }
6497
 
6498
- return function () {
6499
- if (isBlocked) {
6500
- isBlocked = false;
6501
- checkDOMListeners(-1);
6502
- }
6503
 
6504
- return unblock();
6505
- };
6506
- }
6507
 
6508
- function listen(listener) {
6509
- var unlisten = transitionManager.appendListener(listener);
6510
- checkDOMListeners(1);
6511
- return function () {
6512
- checkDOMListeners(-1);
6513
- unlisten();
6514
- };
6515
- }
6516
 
6517
- var history = {
6518
- length: globalHistory.length,
6519
- action: 'POP',
6520
- location: initialLocation,
6521
- createHref: createHref,
6522
- push: push,
6523
- replace: replace,
6524
- go: go,
6525
- goBack: goBack,
6526
- goForward: goForward,
6527
- block: block,
6528
- listen: listen
6529
- };
6530
- return history;
6531
- }
6532
 
6533
- var HashChangeEvent$1 = 'hashchange';
6534
- var HashPathCoders = {
6535
- hashbang: {
6536
- encodePath: function encodePath(path) {
6537
- return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);
6538
- },
6539
- decodePath: function decodePath(path) {
6540
- return path.charAt(0) === '!' ? path.substr(1) : path;
6541
- }
6542
- },
6543
- noslash: {
6544
- encodePath: stripLeadingSlash,
6545
- decodePath: addLeadingSlash
6546
- },
6547
- slash: {
6548
- encodePath: addLeadingSlash,
6549
- decodePath: addLeadingSlash
6550
  }
6551
- };
6552
 
6553
- function stripHash(url) {
6554
- var hashIndex = url.indexOf('#');
6555
- return hashIndex === -1 ? url : url.slice(0, hashIndex);
6556
- }
 
 
 
 
 
6557
 
6558
- function getHashPath() {
6559
- // We can't use window.location.hash here because it's not
6560
- // consistent across browsers - Firefox will pre-decode it!
6561
- var href = window.location.href;
6562
- var hashIndex = href.indexOf('#');
6563
- return hashIndex === -1 ? '' : href.substring(hashIndex + 1);
6564
- }
6565
 
6566
- function pushHashPath(path) {
6567
- window.location.hash = path;
6568
- }
6569
 
6570
- function replaceHashPath(path) {
6571
- window.location.replace(stripHash(window.location.href) + '#' + path);
6572
  }
 
 
 
 
 
 
6573
 
6574
- function createHashHistory(props) {
6575
- if (props === void 0) {
6576
- props = {};
6577
- }
6578
 
6579
- !canUseDOM ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
6580
- var globalHistory = window.history;
6581
- var canGoWithoutReload = supportsGoWithoutReloadUsingHash();
6582
- var _props = props,
6583
- _props$getUserConfirm = _props.getUserConfirmation,
6584
- getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
6585
- _props$hashType = _props.hashType,
6586
- hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;
6587
- var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
6588
- var _HashPathCoders$hashT = HashPathCoders[hashType],
6589
- encodePath = _HashPathCoders$hashT.encodePath,
6590
- decodePath = _HashPathCoders$hashT.decodePath;
6591
 
6592
- function getDOMLocation() {
6593
- var path = decodePath(getHashPath());
6594
- false ? undefined : void 0;
6595
- if (basename) path = stripBasename(path, basename);
6596
- return createLocation(path);
6597
  }
6598
 
6599
- var transitionManager = createTransitionManager();
 
 
 
 
 
 
 
 
 
6600
 
6601
- function setState(nextState) {
6602
- Object(esm_extends["a" /* default */])(history, nextState);
 
6603
 
6604
- history.length = globalHistory.length;
6605
- transitionManager.notifyListeners(history.location, history.action);
6606
  }
6607
 
6608
- var forceNextPop = false;
6609
- var ignorePath = null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6610
 
6611
- function locationsAreEqual$$1(a, b) {
6612
- return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;
 
6613
  }
6614
 
6615
- function handleHashChange() {
6616
- var path = getHashPath();
6617
- var encodedPath = encodePath(path);
 
 
 
 
6618
 
6619
- if (path !== encodedPath) {
6620
- // Ensure we always have a properly-encoded hash.
6621
- replaceHashPath(encodedPath);
6622
- } else {
6623
- var location = getDOMLocation();
6624
- var prevLocation = history.location;
6625
- if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.
6626
 
6627
- if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.
6628
 
6629
- ignorePath = null;
6630
- handlePop(location);
6631
- }
6632
- }
6633
 
6634
- function handlePop(location) {
6635
- if (forceNextPop) {
6636
- forceNextPop = false;
6637
- setState();
6638
- } else {
6639
- var action = 'POP';
6640
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
6641
- if (ok) {
6642
- setState({
6643
- action: action,
6644
- location: location
6645
- });
6646
- } else {
6647
- revertPop(location);
6648
- }
6649
- });
6650
- }
6651
- }
6652
 
6653
- function revertPop(fromLocation) {
6654
- var toLocation = history.location; // TODO: We could probably make this more reliable by
6655
- // keeping a list of paths we've seen in sessionStorage.
6656
- // Instead, we just default to 0 for paths we don't know.
6657
 
6658
- var toIndex = allPaths.lastIndexOf(createPath(toLocation));
6659
- if (toIndex === -1) toIndex = 0;
6660
- var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));
6661
- if (fromIndex === -1) fromIndex = 0;
6662
- var delta = toIndex - fromIndex;
6663
 
6664
- if (delta) {
6665
- forceNextPop = true;
6666
- go(delta);
6667
- }
6668
- } // Ensure the hash is encoded properly before doing anything else.
6669
 
6670
 
6671
- var path = getHashPath();
6672
- var encodedPath = encodePath(path);
6673
- if (path !== encodedPath) replaceHashPath(encodedPath);
6674
- var initialLocation = getDOMLocation();
6675
- var allPaths = [createPath(initialLocation)]; // Public interface
6676
 
6677
- function createHref(location) {
6678
- var baseTag = document.querySelector('base');
6679
- var href = '';
6680
 
6681
- if (baseTag && baseTag.getAttribute('href')) {
6682
- href = stripHash(window.location.href);
6683
- }
6684
 
6685
- return href + '#' + encodePath(basename + createPath(location));
6686
- }
 
6687
 
6688
- function push(path, state) {
6689
- false ? undefined : void 0;
6690
- var action = 'PUSH';
6691
- var location = createLocation(path, undefined, undefined, history.location);
6692
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
6693
- if (!ok) return;
6694
- var path = createPath(location);
6695
- var encodedPath = encodePath(basename + path);
6696
- var hashChanged = getHashPath() !== encodedPath;
6697
 
6698
- if (hashChanged) {
6699
- // We cannot tell if a hashchange was caused by a PUSH, so we'd
6700
- // rather setState here and ignore the hashchange. The caveat here
6701
- // is that other hash histories in the page will consider it a POP.
6702
- ignorePath = path;
6703
- pushHashPath(encodedPath);
6704
- var prevIndex = allPaths.lastIndexOf(createPath(history.location));
6705
- var nextPaths = allPaths.slice(0, prevIndex + 1);
6706
- nextPaths.push(path);
6707
- allPaths = nextPaths;
6708
- setState({
6709
- action: action,
6710
- location: location
6711
- });
6712
- } else {
6713
- false ? undefined : void 0;
6714
- setState();
6715
- }
6716
- });
6717
- }
6718
 
6719
- function replace(path, state) {
6720
- false ? undefined : void 0;
6721
- var action = 'REPLACE';
6722
- var location = createLocation(path, undefined, undefined, history.location);
6723
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
6724
- if (!ok) return;
6725
- var path = createPath(location);
6726
- var encodedPath = encodePath(basename + path);
6727
- var hashChanged = getHashPath() !== encodedPath;
6728
 
6729
- if (hashChanged) {
6730
- // We cannot tell if a hashchange was caused by a REPLACE, so we'd
6731
- // rather setState here and ignore the hashchange. The caveat here
6732
- // is that other hash histories in the page will consider it a POP.
6733
- ignorePath = path;
6734
- replaceHashPath(encodedPath);
6735
- }
6736
 
6737
- var prevIndex = allPaths.indexOf(createPath(history.location));
6738
- if (prevIndex !== -1) allPaths[prevIndex] = path;
6739
- setState({
6740
- action: action,
6741
- location: location
6742
- });
6743
- });
6744
- }
6745
 
6746
- function go(n) {
6747
- false ? undefined : void 0;
6748
- globalHistory.go(n);
6749
- }
6750
 
6751
- function goBack() {
6752
- go(-1);
6753
- }
6754
 
6755
- function goForward() {
6756
- go(1);
6757
- }
6758
 
6759
- var listenerCount = 0;
6760
 
6761
- function checkDOMListeners(delta) {
6762
- listenerCount += delta;
6763
-
6764
- if (listenerCount === 1 && delta === 1) {
6765
- window.addEventListener(HashChangeEvent$1, handleHashChange);
6766
- } else if (listenerCount === 0) {
6767
- window.removeEventListener(HashChangeEvent$1, handleHashChange);
6768
- }
6769
- }
6770
-
6771
- var isBlocked = false;
6772
 
6773
- function block(prompt) {
6774
- if (prompt === void 0) {
6775
- prompt = false;
6776
- }
6777
 
6778
- var unblock = transitionManager.setPrompt(prompt);
6779
 
6780
- if (!isBlocked) {
6781
- checkDOMListeners(1);
6782
- isBlocked = true;
6783
- }
6784
 
6785
- return function () {
6786
- if (isBlocked) {
6787
- isBlocked = false;
6788
- checkDOMListeners(-1);
6789
- }
6790
 
6791
- return unblock();
6792
- };
6793
- }
6794
 
6795
- function listen(listener) {
6796
- var unlisten = transitionManager.appendListener(listener);
6797
- checkDOMListeners(1);
6798
- return function () {
6799
- checkDOMListeners(-1);
6800
- unlisten();
6801
- };
6802
- }
 
 
 
 
6803
 
6804
- var history = {
6805
- length: globalHistory.length,
6806
- action: 'POP',
6807
- location: initialLocation,
6808
- createHref: createHref,
6809
- push: push,
6810
- replace: replace,
6811
- go: go,
6812
- goBack: goBack,
6813
- goForward: goForward,
6814
- block: block,
6815
- listen: listen
6816
- };
6817
- return history;
6818
- }
6819
 
6820
- function clamp(n, lowerBound, upperBound) {
6821
- return Math.min(Math.max(n, lowerBound), upperBound);
6822
- }
6823
- /**
6824
- * Creates a history object that stores locations in memory.
6825
- */
6826
 
 
 
6827
 
6828
- function createMemoryHistory(props) {
6829
- if (props === void 0) {
6830
- props = {};
6831
- }
6832
 
6833
- var _props = props,
6834
- getUserConfirmation = _props.getUserConfirmation,
6835
- _props$initialEntries = _props.initialEntries,
6836
- initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,
6837
- _props$initialIndex = _props.initialIndex,
6838
- initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,
6839
- _props$keyLength = _props.keyLength,
6840
- keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
6841
- var transitionManager = createTransitionManager();
6842
 
6843
- function setState(nextState) {
6844
- Object(esm_extends["a" /* default */])(history, nextState);
6845
 
6846
- history.length = history.entries.length;
6847
- transitionManager.notifyListeners(history.location, history.action);
 
 
 
 
 
 
 
 
 
 
6848
  }
6849
 
6850
- function createKey() {
6851
- return Math.random().toString(36).substr(2, keyLength);
6852
- }
 
 
 
6853
 
6854
- var index = clamp(initialIndex, 0, initialEntries.length - 1);
6855
- var entries = initialEntries.map(function (entry) {
6856
- return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());
6857
- }); // Public interface
 
6858
 
6859
- var createHref = createPath;
 
 
 
 
 
 
 
6860
 
6861
- function push(path, state) {
6862
- false ? undefined : void 0;
6863
- var action = 'PUSH';
6864
- var location = createLocation(path, state, createKey(), history.location);
6865
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
6866
- if (!ok) return;
6867
- var prevIndex = history.index;
6868
- var nextIndex = prevIndex + 1;
6869
- var nextEntries = history.entries.slice(0);
 
 
 
 
 
 
 
 
 
6870
 
6871
- if (nextEntries.length > nextIndex) {
6872
- nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);
6873
- } else {
6874
- nextEntries.push(location);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6875
  }
 
6876
 
6877
- setState({
6878
- action: action,
6879
- location: location,
6880
- index: nextIndex,
6881
- entries: nextEntries
6882
- });
6883
- });
6884
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6885
 
6886
- function replace(path, state) {
6887
- false ? undefined : void 0;
6888
- var action = 'REPLACE';
6889
- var location = createLocation(path, state, createKey(), history.location);
6890
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
6891
- if (!ok) return;
6892
- history.entries[history.index] = location;
6893
- setState({
6894
- action: action,
6895
- location: location
 
 
 
 
 
 
 
 
 
 
 
 
6896
  });
6897
- });
6898
- }
6899
 
6900
- function go(n) {
6901
- var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);
6902
- var action = 'POP';
6903
- var location = history.entries[nextIndex];
6904
- transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
6905
- if (ok) {
6906
- setState({
6907
- action: action,
6908
- location: location,
6909
- index: nextIndex
6910
  });
6911
- } else {
6912
- // Mimic the behavior of DOM histories by
6913
- // causing a render after a cancelled POP.
6914
- setState();
6915
  }
6916
- });
6917
- }
6918
 
6919
- function goBack() {
6920
- go(-1);
6921
- }
6922
-
6923
- function goForward() {
6924
- go(1);
6925
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6926
 
6927
- function canGo(n) {
6928
- var nextIndex = history.index + n;
6929
- return nextIndex >= 0 && nextIndex < history.entries.length;
6930
- }
6931
 
6932
- function block(prompt) {
6933
- if (prompt === void 0) {
6934
- prompt = false;
 
 
 
 
 
 
 
 
 
6935
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6936
 
6937
- return transitionManager.setPrompt(prompt);
6938
- }
6939
-
6940
- function listen(listener) {
6941
- return transitionManager.appendListener(listener);
6942
- }
6943
 
6944
- var history = {
6945
- length: entries.length,
6946
- action: 'POP',
6947
- location: entries[index],
6948
- index: index,
6949
- entries: entries,
6950
- createHref: createHref,
6951
- push: push,
6952
- replace: replace,
6953
- go: go,
6954
- goBack: goBack,
6955
- goForward: goForward,
6956
- canGo: canGo,
6957
- block: block,
6958
- listen: listen
6959
  };
6960
- return history;
6961
- }
6962
 
6963
 
6964
 
6965
 
6966
- /***/ }),
6967
- /* 203 */
6968
- /***/ (function(module, exports, __webpack_require__) {
6969
 
6970
- "use strict";
6971
 
6972
- var fixRegExpWellKnownSymbolLogic = __webpack_require__(111);
6973
- var anObject = __webpack_require__(9);
6974
- var toLength = __webpack_require__(34);
6975
- var requireObjectCoercible = __webpack_require__(32);
6976
- var advanceStringIndex = __webpack_require__(122);
6977
- var regExpExec = __webpack_require__(112);
6978
-
6979
- // @@match logic
6980
- fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
6981
- return [
6982
- // `String.prototype.match` method
6983
- // https://tc39.es/ecma262/#sec-string.prototype.match
6984
- function match(regexp) {
6985
- var O = requireObjectCoercible(this);
6986
- var matcher = regexp == undefined ? undefined : regexp[MATCH];
6987
- return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
6988
- },
6989
- // `RegExp.prototype[@@match]` method
6990
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
6991
- function (regexp) {
6992
- var res = maybeCallNative(nativeMatch, regexp, this);
6993
- if (res.done) return res.value;
6994
-
6995
- var rx = anObject(regexp);
6996
- var S = String(this);
6997
-
6998
- if (!rx.global) return regExpExec(rx, S);
6999
-
7000
- var fullUnicode = rx.unicode;
7001
- rx.lastIndex = 0;
7002
- var A = [];
7003
- var n = 0;
7004
- var result;
7005
- while ((result = regExpExec(rx, S)) !== null) {
7006
- var matchStr = String(result[0]);
7007
- A[n] = matchStr;
7008
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
7009
- n++;
7010
- }
7011
- return n === 0 ? null : A;
7012
- }
7013
- ];
7014
- });
7015
 
7016
 
7017
- /***/ }),
7018
- /* 204 */
7019
- /***/ (function(module, exports) {
7020
 
7021
- function _setPrototypeOf(o, p) {
7022
- module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
7023
- o.__proto__ = p;
7024
- return o;
7025
- };
7026
 
7027
- return _setPrototypeOf(o, p);
7028
- }
 
7029
 
7030
- module.exports = _setPrototypeOf;
7031
 
7032
- /***/ }),
7033
- /* 205 */
7034
- /***/ (function(module, exports, __webpack_require__) {
7035
 
7036
- var hiddenKeys = __webpack_require__(36);
7037
- var isObject = __webpack_require__(10);
7038
- var has = __webpack_require__(11);
7039
- var defineProperty = __webpack_require__(17).f;
7040
- var uid = __webpack_require__(55);
7041
- var FREEZING = __webpack_require__(253);
7042
 
7043
- var METADATA = uid('meta');
7044
- var id = 0;
7045
 
7046
- var isExtensible = Object.isExtensible || function () {
7047
- return true;
7048
- };
7049
 
7050
- var setMetadata = function (it) {
7051
- defineProperty(it, METADATA, { value: {
7052
- objectID: 'O' + ++id, // object ID
7053
- weakData: {} // weak collections IDs
7054
- } });
7055
- };
7056
 
7057
- var fastKey = function (it, create) {
7058
- // return a primitive with prefix
7059
- if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
7060
- if (!has(it, METADATA)) {
7061
- // can't set metadata to uncaught frozen object
7062
- if (!isExtensible(it)) return 'F';
7063
- // not necessary to add metadata
7064
- if (!create) return 'E';
7065
- // add missing metadata
7066
- setMetadata(it);
7067
- // return object ID
7068
- } return it[METADATA].objectID;
7069
- };
7070
 
7071
- var getWeakData = function (it, create) {
7072
- if (!has(it, METADATA)) {
7073
- // can't set metadata to uncaught frozen object
7074
- if (!isExtensible(it)) return true;
7075
- // not necessary to add metadata
7076
- if (!create) return false;
7077
- // add missing metadata
7078
- setMetadata(it);
7079
- // return the store of weak collections IDs
7080
- } return it[METADATA].weakData;
7081
- };
7082
 
7083
- // add metadata on freeze-family methods calling
7084
- var onFreeze = function (it) {
7085
- if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
7086
- return it;
7087
- };
7088
 
7089
- var meta = module.exports = {
7090
- REQUIRED: false,
7091
- fastKey: fastKey,
7092
- getWeakData: getWeakData,
7093
- onFreeze: onFreeze
7094
- };
7095
 
7096
- hiddenKeys[METADATA] = true;
7097
 
7098
 
7099
- /***/ }),
7100
- /* 206 */,
7101
- /* 207 */
7102
- /***/ (function(module, exports, __webpack_require__) {
7103
 
7104
- var isRegExp = __webpack_require__(144);
 
7105
 
7106
- module.exports = function (it) {
7107
- if (isRegExp(it)) {
7108
- throw TypeError("The method doesn't accept regular expressions");
7109
- } return it;
7110
- };
7111
 
 
 
7112
 
7113
- /***/ }),
7114
- /* 208 */
7115
- /***/ (function(module, exports, __webpack_require__) {
7116
-
7117
- var wellKnownSymbol = __webpack_require__(8);
7118
-
7119
- var MATCH = wellKnownSymbol('match');
7120
-
7121
- module.exports = function (METHOD_NAME) {
7122
- var regexp = /./;
7123
- try {
7124
- '/./'[METHOD_NAME](regexp);
7125
- } catch (error1) {
7126
- try {
7127
- regexp[MATCH] = false;
7128
- return '/./'[METHOD_NAME](regexp);
7129
- } catch (error2) { /* empty */ }
7130
- } return false;
7131
- };
7132
-
7133
-
7134
- /***/ }),
7135
- /* 209 */
7136
- /***/ (function(module, exports, __webpack_require__) {
7137
-
7138
- var DESCRIPTORS = __webpack_require__(13);
7139
- var global = __webpack_require__(3);
7140
- var isForced = __webpack_require__(74);
7141
- var inheritIfRequired = __webpack_require__(156);
7142
- var defineProperty = __webpack_require__(17).f;
7143
- var getOwnPropertyNames = __webpack_require__(56).f;
7144
- var isRegExp = __webpack_require__(144);
7145
- var getFlags = __webpack_require__(114);
7146
- var stickyHelpers = __webpack_require__(137);
7147
- var redefine = __webpack_require__(27);
7148
- var fails = __webpack_require__(6);
7149
- var setInternalState = __webpack_require__(45).set;
7150
- var setSpecies = __webpack_require__(153);
7151
- var wellKnownSymbol = __webpack_require__(8);
7152
-
7153
- var MATCH = wellKnownSymbol('match');
7154
- var NativeRegExp = global.RegExp;
7155
- var RegExpPrototype = NativeRegExp.prototype;
7156
- var re1 = /a/g;
7157
- var re2 = /a/g;
7158
-
7159
- // "new" should create a new object, old webkit bug
7160
- var CORRECT_NEW = new NativeRegExp(re1) !== re1;
7161
-
7162
- var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
7163
-
7164
- var FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () {
7165
- re2[MATCH] = false;
7166
- // RegExp constructor can alter flags and IsRegExp works correct with @@match
7167
- return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
7168
- })));
7169
-
7170
- // `RegExp` constructor
7171
- // https://tc39.es/ecma262/#sec-regexp-constructor
7172
- if (FORCED) {
7173
- var RegExpWrapper = function RegExp(pattern, flags) {
7174
- var thisIsRegExp = this instanceof RegExpWrapper;
7175
- var patternIsRegExp = isRegExp(pattern);
7176
- var flagsAreUndefined = flags === undefined;
7177
- var sticky;
7178
-
7179
- if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {
7180
- return pattern;
7181
- }
7182
-
7183
- if (CORRECT_NEW) {
7184
- if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;
7185
- } else if (pattern instanceof RegExpWrapper) {
7186
- if (flagsAreUndefined) flags = getFlags.call(pattern);
7187
- pattern = pattern.source;
7188
- }
7189
-
7190
- if (UNSUPPORTED_Y) {
7191
- sticky = !!flags && flags.indexOf('y') > -1;
7192
- if (sticky) flags = flags.replace(/y/g, '');
7193
- }
7194
-
7195
- var result = inheritIfRequired(
7196
- CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),
7197
- thisIsRegExp ? this : RegExpPrototype,
7198
- RegExpWrapper
7199
- );
7200
-
7201
- if (UNSUPPORTED_Y && sticky) setInternalState(result, { sticky: sticky });
7202
 
7203
- return result;
7204
- };
7205
- var proxy = function (key) {
7206
- key in RegExpWrapper || defineProperty(RegExpWrapper, key, {
7207
- configurable: true,
7208
- get: function () { return NativeRegExp[key]; },
7209
- set: function (it) { NativeRegExp[key] = it; }
7210
- });
7211
- };
7212
- var keys = getOwnPropertyNames(NativeRegExp);
7213
- var index = 0;
7214
- while (keys.length > index) proxy(keys[index++]);
7215
- RegExpPrototype.constructor = RegExpWrapper;
7216
- RegExpWrapper.prototype = RegExpPrototype;
7217
- redefine(global, 'RegExp', RegExpWrapper);
7218
- }
7219
 
7220
- // https://tc39.es/ecma262/#sec-get-regexp-@@species
7221
- setSpecies('RegExp');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7222
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7223
 
7224
- /***/ }),
7225
- /* 210 */
7226
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7227
 
7228
- "use strict";
7229
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return STORE_KEY; });
7230
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return API_NAMESPACE; });
7231
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return QUEUE_OPTION_NAME; });
7232
- var STORE_KEY = 'wc/customer-effort-score';
7233
- var API_NAMESPACE = '/wc-admin';
7234
- var QUEUE_OPTION_NAME = 'woocommerce_ces_tracks_queue';
7235
 
7236
- /***/ }),
7237
- /* 211 */
7238
- /***/ (function(module, exports) {
7239
 
7240
- (function() { module.exports = window["wp"]["date"]; }());
 
 
 
 
 
7241
 
7242
- /***/ }),
7243
- /* 212 */
7244
- /***/ (function(module, exports, __webpack_require__) {
 
7245
 
7246
- "use strict";
7247
 
7248
- var aFunction = __webpack_require__(70);
7249
- var isObject = __webpack_require__(10);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7250
 
7251
- var slice = [].slice;
7252
- var factories = {};
7253
 
7254
- var construct = function (C, argsLength, args) {
7255
- if (!(argsLength in factories)) {
7256
- for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
7257
- // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only
7258
- factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
7259
- } return factories[argsLength](C, args);
7260
  };
7261
-
7262
- // `Function.prototype.bind` method implementation
7263
- // https://tc39.es/ecma262/#sec-function.prototype.bind
7264
- module.exports = Function.bind || function bind(that /* , ...args */) {
7265
- var fn = aFunction(this);
7266
- var partArgs = slice.call(arguments, 1);
7267
- var boundFunction = function bound(/* args... */) {
7268
- var args = partArgs.concat(slice.call(arguments));
7269
- return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
7270
- };
7271
- if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
7272
- return boundFunction;
7273
  };
 
 
7274
 
7275
 
7276
- /***/ }),
7277
- /* 213 */
7278
- /***/ (function(module, exports, __webpack_require__) {
7279
-
7280
- var fails = __webpack_require__(6);
7281
 
7282
- module.exports = !fails(function () {
7283
- function F() { /* empty */ }
7284
- F.prototype.constructor = null;
7285
- return Object.getPrototypeOf(new F()) !== F.prototype;
7286
- });
7287
 
7288
 
7289
- /***/ }),
7290
- /* 214 */
7291
- /***/ (function(module, exports) {
7292
 
7293
- // `SameValue` abstract operation
7294
- // https://tc39.es/ecma262/#sec-samevalue
7295
- module.exports = Object.is || function is(x, y) {
7296
- // eslint-disable-next-line no-self-compare -- NaN check
7297
- return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
7298
- };
7299
 
 
7300
 
7301
- /***/ }),
7302
- /* 215 */
7303
- /***/ (function(module, exports, __webpack_require__) {
7304
 
7305
- "use strict";
7306
  /**
7307
- * Copyright (c) 2013-present, Facebook, Inc.
7308
- *
7309
- * This source code is licensed under the MIT license found in the
7310
- * LICENSE file in the root directory of this source tree.
7311
  */
7312
 
7313
 
 
 
7314
 
7315
- var ReactPropTypesSecret = __webpack_require__(216);
7316
 
7317
- function emptyFunction() {}
7318
- function emptyFunctionWithReset() {}
7319
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
7320
 
7321
- module.exports = function() {
7322
- function shim(props, propName, componentName, location, propFullName, secret) {
7323
- if (secret === ReactPropTypesSecret) {
7324
- // It is still safe when called from React.
7325
- return;
 
 
 
 
 
7326
  }
7327
- var err = new Error(
7328
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
7329
- 'Use PropTypes.checkPropTypes() to call them. ' +
7330
- 'Read more at http://fb.me/use-check-prop-types'
7331
- );
7332
- err.name = 'Invariant Violation';
7333
- throw err;
7334
- };
7335
- shim.isRequired = shim;
7336
- function getShim() {
7337
- return shim;
7338
- };
7339
- // Important!
7340
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
7341
- var ReactPropTypes = {
7342
- array: shim,
7343
- bool: shim,
7344
- func: shim,
7345
- number: shim,
7346
- object: shim,
7347
- string: shim,
7348
- symbol: shim,
7349
 
7350
- any: shim,
7351
- arrayOf: getShim,
7352
- element: shim,
7353
- elementType: shim,
7354
- instanceOf: getShim,
7355
- node: shim,
7356
- objectOf: getShim,
7357
- oneOf: getShim,
7358
- oneOfType: getShim,
7359
- shape: getShim,
7360
- exact: getShim,
7361
 
7362
- checkPropTypes: emptyFunctionWithReset,
7363
- resetWarningCache: emptyFunction
7364
- };
 
7365
 
7366
- ReactPropTypes.PropTypes = ReactPropTypes;
 
7367
 
7368
- return ReactPropTypes;
7369
- };
7370
 
 
 
7371
 
7372
- /***/ }),
7373
- /* 216 */
7374
- /***/ (function(module, exports, __webpack_require__) {
7375
 
7376
- "use strict";
7377
- /**
7378
- * Copyright (c) 2013-present, Facebook, Inc.
7379
- *
7380
- * This source code is licensed under the MIT license found in the
7381
- * LICENSE file in the root directory of this source tree.
7382
- */
7383
 
 
7384
 
7385
 
7386
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
7387
 
7388
- module.exports = ReactPropTypesSecret;
7389
 
7390
 
7391
- /***/ }),
7392
- /* 217 */,
7393
- /* 218 */,
7394
- /* 219 */,
7395
- /* 220 */,
7396
- /* 221 */
7397
- /***/ (function(module, exports, __webpack_require__) {
7398
 
7399
- "use strict";
 
 
7400
 
7401
- var DESCRIPTORS = __webpack_require__(13);
7402
- var fails = __webpack_require__(6);
7403
- var objectKeys = __webpack_require__(54);
7404
- var getOwnPropertySymbolsModule = __webpack_require__(79);
7405
- var propertyIsEnumerableModule = __webpack_require__(76);
7406
- var toObject = __webpack_require__(38);
7407
- var IndexedObject = __webpack_require__(71);
7408
 
7409
- var nativeAssign = Object.assign;
7410
- var defineProperty = Object.defineProperty;
7411
 
7412
- // `Object.assign` method
7413
- // https://tc39.es/ecma262/#sec-object.assign
7414
- module.exports = !nativeAssign || fails(function () {
7415
- // should have correct order of operations (Edge bug)
7416
- if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
7417
- enumerable: true,
7418
- get: function () {
7419
- defineProperty(this, 'b', {
7420
- value: 3,
7421
- enumerable: false
7422
- });
7423
- }
7424
- }), { b: 2 })).b !== 1) return true;
7425
- // should work with symbols and should have deterministic property order (V8 bug)
7426
- var A = {};
7427
- var B = {};
7428
- /* global Symbol -- required for testing */
7429
- var symbol = Symbol();
7430
- var alphabet = 'abcdefghijklmnopqrst';
7431
- A[symbol] = 7;
7432
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
7433
- return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
7434
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
7435
- var T = toObject(target);
7436
- var argumentsLength = arguments.length;
7437
- var index = 1;
7438
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
7439
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
7440
- while (argumentsLength > index) {
7441
- var S = IndexedObject(arguments[index++]);
7442
- var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
7443
- var length = keys.length;
7444
- var j = 0;
7445
- var key;
7446
- while (length > j) {
7447
- key = keys[j++];
7448
- if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
7449
- }
7450
- } return T;
7451
- } : nativeAssign;
7452
 
7453
 
7454
- /***/ }),
7455
- /* 222 */,
7456
- /* 223 */,
7457
- /* 224 */
7458
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7459
 
7460
- "use strict";
7461
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
7462
- function _defineProperty(obj, key, value) {
7463
- if (key in obj) {
7464
- Object.defineProperty(obj, key, {
7465
- value: value,
7466
- enumerable: true,
7467
- configurable: true,
7468
- writable: true
7469
- });
7470
- } else {
7471
- obj[key] = value;
7472
- }
7473
 
7474
- return obj;
7475
- }
7476
 
7477
- /***/ }),
7478
- /* 225 */
7479
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
7480
 
7481
- "use strict";
7482
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
7483
- /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(133);
 
 
 
 
7484
 
7485
- function _objectWithoutProperties(source, excluded) {
7486
- if (source == null) return {};
7487
- var target = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
7488
- var key, i;
 
7489
 
7490
- if (Object.getOwnPropertySymbols) {
7491
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7492
 
7493
- for (i = 0; i < sourceSymbolKeys.length; i++) {
7494
- key = sourceSymbolKeys[i];
7495
- if (excluded.indexOf(key) >= 0) continue;
7496
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
7497
- target[key] = source[key];
7498
- }
7499
- }
7500
 
7501
- return target;
7502
- }
 
 
 
 
 
7503
 
7504
- /***/ }),
7505
- /* 226 */,
7506
- /* 227 */
7507
- /***/ (function(module, exports, __webpack_require__) {
7508
-
7509
- "use strict";
 
 
 
 
 
 
 
 
 
 
7510
 
 
 
 
 
 
7511
 
7512
- var utils = __webpack_require__(200);
7513
- var formats = __webpack_require__(169);
7514
- var has = Object.prototype.hasOwnProperty;
 
 
 
 
7515
 
7516
- var arrayPrefixGenerators = {
7517
- brackets: function brackets(prefix) {
7518
- return prefix + '[]';
7519
- },
7520
- comma: 'comma',
7521
- indices: function indices(prefix, key) {
7522
- return prefix + '[' + key + ']';
7523
  },
7524
- repeat: function repeat(prefix) {
7525
- return prefix;
7526
- }
7527
- };
7528
 
7529
- var isArray = Array.isArray;
7530
- var push = Array.prototype.push;
7531
- var pushToArray = function (arr, valueOrArray) {
7532
- push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
7533
- };
7534
 
7535
- var toISO = Date.prototype.toISOString;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7536
 
7537
- var defaultFormat = formats['default'];
7538
- var defaults = {
7539
- addQueryPrefix: false,
7540
- allowDots: false,
7541
- charset: 'utf-8',
7542
- charsetSentinel: false,
7543
- delimiter: '&',
7544
- encode: true,
7545
- encoder: utils.encode,
7546
- encodeValuesOnly: false,
7547
- format: defaultFormat,
7548
- formatter: formats.formatters[defaultFormat],
7549
- // deprecated
7550
- indices: false,
7551
- serializeDate: function serializeDate(date) {
7552
- return toISO.call(date);
7553
- },
7554
- skipNulls: false,
7555
- strictNullHandling: false
7556
- };
7557
 
7558
- var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
7559
- return typeof v === 'string'
7560
- || typeof v === 'number'
7561
- || typeof v === 'boolean'
7562
- || typeof v === 'symbol'
7563
- || typeof v === 'bigint';
7564
- };
7565
 
7566
- var stringify = function stringify(
7567
- object,
7568
- prefix,
7569
- generateArrayPrefix,
7570
- strictNullHandling,
7571
- skipNulls,
7572
- encoder,
7573
- filter,
7574
- sort,
7575
- allowDots,
7576
- serializeDate,
7577
- format,
7578
- formatter,
7579
- encodeValuesOnly,
7580
- charset
7581
- ) {
7582
- var obj = object;
7583
- if (typeof filter === 'function') {
7584
- obj = filter(prefix, obj);
7585
- } else if (obj instanceof Date) {
7586
- obj = serializeDate(obj);
7587
- } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
7588
- obj = utils.maybeMap(obj, function (value) {
7589
- if (value instanceof Date) {
7590
- return serializeDate(value);
7591
- }
7592
- return value;
7593
- });
7594
- }
7595
 
7596
- if (obj === null) {
7597
- if (strictNullHandling) {
7598
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
7599
- }
7600
 
7601
- obj = '';
7602
- }
7603
 
7604
- if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
7605
- if (encoder) {
7606
- var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
7607
- return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
7608
- }
7609
- return [formatter(prefix) + '=' + formatter(String(obj))];
7610
- }
7611
 
7612
- var values = [];
7613
 
7614
- if (typeof obj === 'undefined') {
7615
- return values;
7616
- }
7617
 
7618
- var objKeys;
7619
- if (generateArrayPrefix === 'comma' && isArray(obj)) {
7620
- // we need to join elements in
7621
- objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : undefined }];
7622
- } else if (isArray(filter)) {
7623
- objKeys = filter;
7624
- } else {
7625
- var keys = Object.keys(obj);
7626
- objKeys = sort ? keys.sort(sort) : keys;
7627
- }
7628
 
7629
- for (var i = 0; i < objKeys.length; ++i) {
7630
- var key = objKeys[i];
7631
- var value = typeof key === 'object' && key.value !== undefined ? key.value : obj[key];
7632
 
7633
- if (skipNulls && value === null) {
7634
- continue;
7635
- }
7636
 
7637
- var keyPrefix = isArray(obj)
7638
- ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
7639
- : prefix + (allowDots ? '.' + key : '[' + key + ']');
7640
 
7641
- pushToArray(values, stringify(
7642
- value,
7643
- keyPrefix,
7644
- generateArrayPrefix,
7645
- strictNullHandling,
7646
- skipNulls,
7647
- encoder,
7648
- filter,
7649
- sort,
7650
- allowDots,
7651
- serializeDate,
7652
- format,
7653
- formatter,
7654
- encodeValuesOnly,
7655
- charset
7656
- ));
7657
- }
7658
 
7659
- return values;
7660
- };
7661
 
7662
- var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
7663
- if (!opts) {
7664
- return defaults;
7665
- }
7666
 
7667
- if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
7668
- throw new TypeError('Encoder has to be a function.');
7669
- }
7670
 
7671
- var charset = opts.charset || defaults.charset;
7672
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
7673
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
7674
- }
7675
 
7676
- var format = formats['default'];
7677
- if (typeof opts.format !== 'undefined') {
7678
- if (!has.call(formats.formatters, opts.format)) {
7679
- throw new TypeError('Unknown format option provided.');
7680
- }
7681
- format = opts.format;
7682
- }
7683
- var formatter = formats.formatters[format];
7684
 
7685
- var filter = defaults.filter;
7686
- if (typeof opts.filter === 'function' || isArray(opts.filter)) {
7687
- filter = opts.filter;
7688
- }
7689
 
7690
- return {
7691
- addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
7692
- allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
7693
- charset: charset,
7694
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
7695
- delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
7696
- encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
7697
- encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
7698
- encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
7699
- filter: filter,
7700
- format: format,
7701
- formatter: formatter,
7702
- serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
7703
- skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
7704
- sort: typeof opts.sort === 'function' ? opts.sort : null,
7705
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
7706
- };
7707
- };
7708
 
7709
- module.exports = function (object, opts) {
7710
- var obj = object;
7711
- var options = normalizeStringifyOptions(opts);
7712
 
7713
- var objKeys;
7714
- var filter;
7715
 
7716
- if (typeof options.filter === 'function') {
7717
- filter = options.filter;
7718
- obj = filter('', obj);
7719
- } else if (isArray(options.filter)) {
7720
- filter = options.filter;
7721
- objKeys = filter;
7722
- }
7723
 
7724
- var keys = [];
 
7725
 
7726
- if (typeof obj !== 'object' || obj === null) {
7727
- return '';
 
 
 
 
 
 
 
 
 
 
 
7728
  }
 
7729
 
7730
- var arrayFormat;
7731
- if (opts && opts.arrayFormat in arrayPrefixGenerators) {
7732
- arrayFormat = opts.arrayFormat;
7733
- } else if (opts && 'indices' in opts) {
7734
- arrayFormat = opts.indices ? 'indices' : 'repeat';
7735
- } else {
7736
- arrayFormat = 'indices';
7737
- }
7738
 
7739
- var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
 
 
 
 
7740
 
7741
- if (!objKeys) {
7742
- objKeys = Object.keys(obj);
7743
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7744
 
7745
- if (options.sort) {
7746
- objKeys.sort(options.sort);
7747
- }
7748
 
7749
- for (var i = 0; i < objKeys.length; ++i) {
7750
- var key = objKeys[i];
7751
 
7752
- if (options.skipNulls && obj[key] === null) {
7753
- continue;
7754
- }
7755
- pushToArray(keys, stringify(
7756
- obj[key],
7757
- key,
7758
- generateArrayPrefix,
7759
- options.strictNullHandling,
7760
- options.skipNulls,
7761
- options.encode ? options.encoder : null,
7762
- options.filter,
7763
- options.sort,
7764
- options.allowDots,
7765
- options.serializeDate,
7766
- options.format,
7767
- options.formatter,
7768
- options.encodeValuesOnly,
7769
- options.charset
7770
- ));
7771
- }
7772
-
7773
- var joined = keys.join(options.delimiter);
7774
- var prefix = options.addQueryPrefix === true ? '?' : '';
7775
-
7776
- if (options.charsetSentinel) {
7777
- if (options.charset === 'iso-8859-1') {
7778
- // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
7779
- prefix += 'utf8=%26%2310003%3B&';
7780
- } else {
7781
- // encodeURIComponent('✓')
7782
- prefix += 'utf8=%E2%9C%93&';
7783
- }
7784
- }
7785
-
7786
- return joined.length > 0 ? prefix + joined : '';
7787
- };
7788
 
7789
 
7790
- /***/ }),
7791
- /* 228 */
7792
- /***/ (function(module, exports, __webpack_require__) {
7793
 
7794
- "use strict";
7795
 
7796
 
7797
- var utils = __webpack_require__(200);
7798
 
7799
- var has = Object.prototype.hasOwnProperty;
7800
- var isArray = Array.isArray;
7801
 
7802
- var defaults = {
7803
- allowDots: false,
7804
- allowPrototypes: false,
7805
- arrayLimit: 20,
7806
- charset: 'utf-8',
7807
- charsetSentinel: false,
7808
- comma: false,
7809
- decoder: utils.decode,
7810
- delimiter: '&',
7811
- depth: 5,
7812
- ignoreQueryPrefix: false,
7813
- interpretNumericEntities: false,
7814
- parameterLimit: 1000,
7815
- parseArrays: true,
7816
- plainObjects: false,
7817
- strictNullHandling: false
7818
- };
7819
 
7820
- var interpretNumericEntities = function (str) {
7821
- return str.replace(/&#(\d+);/g, function ($0, numberStr) {
7822
- return String.fromCharCode(parseInt(numberStr, 10));
7823
- });
7824
- };
7825
 
7826
- var parseArrayValue = function (val, options) {
7827
- if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
7828
- return val.split(',');
7829
- }
7830
 
7831
- return val;
7832
- };
7833
 
7834
- // This is what browsers will submit when the character occurs in an
7835
- // application/x-www-form-urlencoded body and the encoding of the page containing
7836
- // the form is iso-8859-1, or when the submitted form has an accept-charset
7837
- // attribute of iso-8859-1. Presumably also with other charsets that do not contain
7838
- // the ✓ character, such as us-ascii.
7839
- var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
7840
 
7841
- // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
7842
- var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
 
7843
 
7844
- var parseValues = function parseQueryStringValues(str, options) {
7845
- var obj = {};
7846
- var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
7847
- var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
7848
- var parts = cleanStr.split(options.delimiter, limit);
7849
- var skipIndex = -1; // Keep track of where the utf8 sentinel was found
7850
- var i;
7851
 
7852
- var charset = options.charset;
7853
- if (options.charsetSentinel) {
7854
- for (i = 0; i < parts.length; ++i) {
7855
- if (parts[i].indexOf('utf8=') === 0) {
7856
- if (parts[i] === charsetSentinel) {
7857
- charset = 'utf-8';
7858
- } else if (parts[i] === isoSentinel) {
7859
- charset = 'iso-8859-1';
7860
- }
7861
- skipIndex = i;
7862
- i = parts.length; // The eslint settings do not allow break;
7863
- }
7864
- }
7865
- }
7866
 
7867
- for (i = 0; i < parts.length; ++i) {
7868
- if (i === skipIndex) {
7869
- continue;
7870
- }
7871
- var part = parts[i];
7872
 
7873
- var bracketEqualsPos = part.indexOf(']=');
7874
- var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
7875
 
7876
- var key, val;
7877
- if (pos === -1) {
7878
- key = options.decoder(part, defaults.decoder, charset, 'key');
7879
- val = options.strictNullHandling ? null : '';
7880
- } else {
7881
- key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
7882
- val = utils.maybeMap(
7883
- parseArrayValue(part.slice(pos + 1), options),
7884
- function (encodedVal) {
7885
- return options.decoder(encodedVal, defaults.decoder, charset, 'value');
7886
- }
7887
- );
7888
- }
7889
 
7890
- if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
7891
- val = interpretNumericEntities(val);
7892
- }
7893
 
7894
- if (part.indexOf('[]=') > -1) {
7895
- val = isArray(val) ? [val] : val;
7896
- }
7897
 
7898
- if (has.call(obj, key)) {
7899
- obj[key] = utils.combine(obj[key], val);
7900
- } else {
7901
- obj[key] = val;
7902
- }
7903
- }
7904
 
7905
- return obj;
7906
- };
7907
 
7908
- var parseObject = function (chain, val, options, valuesParsed) {
7909
- var leaf = valuesParsed ? val : parseArrayValue(val, options);
7910
 
7911
- for (var i = chain.length - 1; i >= 0; --i) {
7912
- var obj;
7913
- var root = chain[i];
7914
 
7915
- if (root === '[]' && options.parseArrays) {
7916
- obj = [].concat(leaf);
7917
- } else {
7918
- obj = options.plainObjects ? Object.create(null) : {};
7919
- var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
7920
- var index = parseInt(cleanRoot, 10);
7921
- if (!options.parseArrays && cleanRoot === '') {
7922
- obj = { 0: leaf };
7923
- } else if (
7924
- !isNaN(index)
7925
- && root !== cleanRoot
7926
- && String(index) === cleanRoot
7927
- && index >= 0
7928
- && (options.parseArrays && index <= options.arrayLimit)
7929
- ) {
7930
- obj = [];
7931
- obj[index] = leaf;
7932
- } else {
7933
- obj[cleanRoot] = leaf;
7934
- }
7935
- }
7936
 
7937
- leaf = obj;
7938
- }
7939
 
7940
- return leaf;
7941
- };
7942
 
7943
- var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
7944
- if (!givenKey) {
7945
- return;
7946
- }
7947
 
7948
- // Transform dot notation to bracket notation
7949
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
7950
 
7951
- // The regex chunks
7952
 
7953
- var brackets = /(\[[^[\]]*])/;
7954
- var child = /(\[[^[\]]*])/g;
 
7955
 
7956
- // Get the parent
 
7957
 
7958
- var segment = options.depth > 0 && brackets.exec(key);
7959
- var parent = segment ? key.slice(0, segment.index) : key;
7960
 
7961
- // Stash the parent if it exists
 
7962
 
7963
- var keys = [];
7964
- if (parent) {
7965
- // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
7966
- if (!options.plainObjects && has.call(Object.prototype, parent)) {
7967
- if (!options.allowPrototypes) {
7968
- return;
7969
- }
7970
- }
7971
 
7972
- keys.push(parent);
 
 
 
 
 
 
 
 
 
7973
  }
 
7974
 
7975
- // Loop through children appending to the array until we hit depth
 
7976
 
7977
- var i = 0;
7978
- while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
7979
- i += 1;
7980
- if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
7981
- if (!options.allowPrototypes) {
7982
- return;
7983
- }
7984
- }
7985
- keys.push(segment[1]);
7986
- }
7987
 
7988
- // If there's a remainder, just add whatever is left
7989
 
7990
- if (segment) {
7991
- keys.push('[' + key.slice(segment.index) + ']');
7992
- }
7993
 
7994
- return parseObject(keys, val, options, valuesParsed);
7995
- };
7996
 
7997
- var normalizeParseOptions = function normalizeParseOptions(opts) {
7998
- if (!opts) {
7999
- return defaults;
 
8000
  }
 
 
 
 
 
8001
 
8002
- if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
8003
- throw new TypeError('Decoder has to be a function.');
8004
- }
8005
 
8006
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
8007
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
 
8008
  }
8009
- var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
8010
-
8011
- return {
8012
- allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
8013
- allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
8014
- arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
8015
- charset: charset,
8016
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
8017
- comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
8018
- decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
8019
- delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
8020
- // eslint-disable-next-line no-implicit-coercion, no-extra-parens
8021
- depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
8022
- ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
8023
- interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
8024
- parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
8025
- parseArrays: opts.parseArrays !== false,
8026
- plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
8027
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
8028
- };
8029
- };
8030
 
8031
- module.exports = function (str, opts) {
8032
- var options = normalizeParseOptions(opts);
8033
 
8034
- if (str === '' || str === null || typeof str === 'undefined') {
8035
- return options.plainObjects ? Object.create(null) : {};
8036
- }
 
 
8037
 
8038
- var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
8039
- var obj = options.plainObjects ? Object.create(null) : {};
8040
 
8041
- // Iterate over the keys and setup the new object
 
 
8042
 
8043
- var keys = Object.keys(tempObj);
8044
- for (var i = 0; i < keys.length; ++i) {
8045
- var key = keys[i];
8046
- var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
8047
- obj = utils.merge(obj, newObj, options);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8048
  }
 
8049
 
8050
- return utils.compact(obj);
8051
- };
8052
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8053
 
8054
- /***/ }),
8055
- /* 229 */
8056
- /***/ (function(module, exports, __webpack_require__) {
 
8057
 
8058
- "use strict";
 
 
 
8059
 
8060
- var $ = __webpack_require__(12);
8061
- var global = __webpack_require__(3);
8062
- var isForced = __webpack_require__(74);
8063
- var redefine = __webpack_require__(27);
8064
- var InternalMetadataModule = __webpack_require__(205);
8065
- var iterate = __webpack_require__(154);
8066
- var anInstance = __webpack_require__(136);
8067
- var isObject = __webpack_require__(10);
8068
- var fails = __webpack_require__(6);
8069
- var checkCorrectnessOfIteration = __webpack_require__(165);
8070
- var setToStringTag = __webpack_require__(90);
8071
- var inheritIfRequired = __webpack_require__(156);
8072
-
8073
- module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
8074
- var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
8075
- var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
8076
- var ADDER = IS_MAP ? 'set' : 'add';
8077
- var NativeConstructor = global[CONSTRUCTOR_NAME];
8078
- var NativePrototype = NativeConstructor && NativeConstructor.prototype;
8079
- var Constructor = NativeConstructor;
8080
- var exported = {};
8081
-
8082
- var fixMethod = function (KEY) {
8083
- var nativeMethod = NativePrototype[KEY];
8084
- redefine(NativePrototype, KEY,
8085
- KEY == 'add' ? function add(value) {
8086
- nativeMethod.call(this, value === 0 ? 0 : value);
8087
- return this;
8088
- } : KEY == 'delete' ? function (key) {
8089
- return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
8090
- } : KEY == 'get' ? function get(key) {
8091
- return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);
8092
- } : KEY == 'has' ? function has(key) {
8093
- return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
8094
- } : function set(key, value) {
8095
- nativeMethod.call(this, key === 0 ? 0 : key, value);
8096
- return this;
8097
- }
8098
- );
8099
  };
 
8100
 
8101
- var REPLACE = isForced(
8102
- CONSTRUCTOR_NAME,
8103
- typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
8104
- new NativeConstructor().entries().next();
8105
- }))
8106
- );
8107
 
8108
- if (REPLACE) {
8109
- // create collection constructor
8110
- Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
8111
- InternalMetadataModule.REQUIRED = true;
8112
- } else if (isForced(CONSTRUCTOR_NAME, true)) {
8113
- var instance = new Constructor();
8114
- // early implementations not supports chaining
8115
- var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
8116
- // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
8117
- var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
8118
- // most early implementations doesn't supports iterables, most modern - not close it correctly
8119
- // eslint-disable-next-line no-new -- required for testing
8120
- var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
8121
- // for early implementations -0 and +0 not the same
8122
- var BUGGY_ZERO = !IS_WEAK && fails(function () {
8123
- // V8 ~ Chromium 42- fails only with 5+ elements
8124
- var $instance = new NativeConstructor();
8125
- var index = 5;
8126
- while (index--) $instance[ADDER](index, index);
8127
- return !$instance.has(-0);
8128
- });
8129
 
8130
- if (!ACCEPT_ITERABLES) {
8131
- Constructor = wrapper(function (dummy, iterable) {
8132
- anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
8133
- var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
8134
- if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
8135
- return that;
8136
- });
8137
- Constructor.prototype = NativePrototype;
8138
- NativePrototype.constructor = Constructor;
8139
- }
8140
 
8141
- if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
8142
- fixMethod('delete');
8143
- fixMethod('has');
8144
- IS_MAP && fixMethod('get');
 
 
 
 
 
 
 
 
 
 
 
 
 
8145
  }
 
8146
 
8147
- if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
 
8148
 
8149
- // weak collections should not contains .clear method
8150
- if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
8151
- }
 
8152
 
8153
- exported[CONSTRUCTOR_NAME] = Constructor;
8154
- $({ global: true, forced: Constructor != NativeConstructor }, exported);
8155
 
8156
- setToStringTag(Constructor, CONSTRUCTOR_NAME);
 
8157
 
8158
- if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
 
8159
 
8160
- return Constructor;
8161
- };
 
 
 
 
 
 
 
 
 
8162
 
 
 
8163
 
8164
  /***/ }),
8165
- /* 230 */,
8166
- /* 231 */
8167
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
8168
 
8169
- "use strict";
8170
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getCountryCode; });
8171
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getCurrencyRegion; });
8172
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getProductIdsForCart; });
8173
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getCategorizedOnboardingProducts; });
8174
- /* unused harmony export getProductList */
8175
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getPriceValue; });
8176
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isWCAdmin; });
8177
- /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44);
8178
- /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);
8179
- /* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
8180
- /* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1__);
8181
- /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88);
8182
- /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__);
8183
- /* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(107);
8184
- /* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_3__);
8185
- /* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(140);
8186
- /* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_4__);
8187
- /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(51);
8188
- /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_5__);
8189
- /* harmony import */ var core_js_modules_es_set_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(248);
8190
- /* harmony import */ var core_js_modules_es_set_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_set_js__WEBPACK_IMPORTED_MODULE_6__);
8191
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(100);
8192
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__);
8193
- /* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(151);
8194
- /* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_8__);
8195
- /* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(123);
8196
- /* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9__);
8197
- /* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(146);
8198
- /* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
8199
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(66);
8200
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_11__);
8201
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(49);
8202
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12__);
8203
- /* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(192);
8204
- /* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13__);
8205
- /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(178);
8206
- /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_14__);
8207
- /* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(135);
8208
- /* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15__);
8209
- /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(132);
8210
- /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_16__);
8211
- /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(5);
8212
- /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_17__);
8213
- /* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(85);
8214
 
 
8215
 
 
8216
 
 
 
8217
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8218
 
8219
 
 
 
 
8220
 
8221
 
 
 
 
8222
 
8223
 
 
 
 
 
 
 
 
 
8224
 
 
8225
 
 
 
8226
 
 
8227
 
 
8228
 
 
 
8229
 
 
 
 
 
 
 
 
8230
 
8231
  /**
8232
- * External dependencies
8233
  */
8234
 
8235
 
 
 
 
8236
 
8237
  /**
8238
- * Gets the country code from a country:state value string.
8239
  *
8240
- * @param {string} countryState Country state string, e.g. US:GA.
8241
- * @return {string} Country string.
 
8242
  */
8243
 
8244
- function getCountryCode(countryState) {
8245
- if (!countryState) {
8246
- return null;
8247
- }
8248
-
8249
- return countryState.split(':')[0];
8250
- }
8251
- function getCurrencyRegion(countryState) {
8252
- var region = getCountryCode(countryState);
8253
- var euCountries = Object(lodash__WEBPACK_IMPORTED_MODULE_17__["without"])(Object(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_18__[/* getSetting */ "g"])('onboarding', {
8254
- euCountries: []
8255
- }).euCountries, 'GB');
8256
-
8257
- if (euCountries.includes(region)) {
8258
- region = 'EU';
8259
- }
8260
 
8261
- return region;
8262
- }
8263
  /**
8264
- * Gets the product IDs for items based on the product types and theme selected in the onboarding profiler.
8265
  *
8266
- * @param {Object} profileItems Onboarding profile.
8267
- * @param {boolean} includeInstalledItems Include installed items in returned product IDs.
8268
- * @param {Array} installedPlugins Installed plugins.
8269
- * @return {Array} Product Ids.
8270
  */
8271
 
8272
- function getProductIdsForCart(profileItems) {
8273
- var includeInstalledItems = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
8274
- var installedPlugins = arguments.length > 2 ? arguments[2] : undefined;
8275
- var productList = getProductList(profileItems, includeInstalledItems, installedPlugins);
8276
- var productIds = productList.map(function (product) {
8277
- return product.id || product.product;
8278
- });
8279
- return productIds;
8280
- }
8281
  /**
8282
- * Gets the labeled/categorized product names and types for items based on the product types and theme selected in the onboarding profiler.
8283
  *
8284
- * @param {Object} profileItems Onboarding profile.
8285
- * @param {Array} installedPlugins Installed plugins.
8286
- * @return {Array} Objects with labeled/categorized product names and types.
8287
  */
8288
 
8289
- function getCategorizedOnboardingProducts(profileItems, installedPlugins) {
8290
- var productList = {};
8291
- productList.products = getProductList(profileItems, true, installedPlugins);
8292
- productList.remainingProducts = getProductList(profileItems, false, installedPlugins);
8293
-
8294
- var uniqueItemsList = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(new Set([].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(productList.products), _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(productList.remainingProducts))));
8295
-
8296
- productList.uniqueItemsList = uniqueItemsList.map(function (product) {
8297
- var cleanedProduct;
8298
-
8299
- if (product.label) {
8300
- cleanedProduct = {
8301
- type: 'extension',
8302
- name: product.label
8303
- };
8304
- } else {
8305
- cleanedProduct = {
8306
- type: 'theme',
8307
- name: product.title
8308
- };
8309
- }
8310
-
8311
- return cleanedProduct;
8312
- });
8313
- return productList;
8314
- }
8315
  /**
8316
- * Gets a product list for items based on the product types and theme selected in the onboarding profiler.
 
 
 
 
 
8317
  *
8318
- * @param {Object} profileItems Onboarding profile.
8319
- * @param {boolean} includeInstalledItems Include installed items in returned product list.
8320
- * @param {Array} installedPlugins Installed plugins.
8321
- * @return {Array} Products.
 
 
8322
  */
8323
 
8324
- function getProductList(profileItems) {
8325
- var includeInstalledItems = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
8326
- var installedPlugins = arguments.length > 2 ? arguments[2] : undefined;
8327
- var onboarding = Object(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_18__[/* getSetting */ "g"])('onboarding', {});
8328
- var productList = []; // The population of onboarding.productTypes only happens if the task list should be shown
8329
- // so bail early if it isn't present.
8330
 
8331
- if (!onboarding.productTypes) {
8332
- return productList;
8333
  }
8334
 
8335
- var productTypes = profileItems.product_types || [];
8336
- productTypes.forEach(function (productType) {
8337
- if (onboarding.productTypes[productType] && onboarding.productTypes[productType].product && (includeInstalledItems || !installedPlugins.includes(onboarding.productTypes[productType].slug))) {
8338
- productList.push(onboarding.productTypes[productType]);
8339
- }
8340
- });
8341
- var theme = onboarding.themes.find(function (themeData) {
8342
- return themeData.slug === profileItems.theme;
8343
- });
8344
 
8345
- if (theme && theme.id && getPriceValue(theme.price) > 0 && (includeInstalledItems || !theme.is_installed)) {
8346
- productList.push(theme);
8347
- }
 
 
 
 
 
 
 
 
 
 
8348
 
8349
- return productList;
8350
- }
8351
- /**
8352
- * Get the value of a price from a string, removing any non-numeric characters.
8353
- *
8354
- * @param {string} string Price string.
8355
- * @return {number} Number value.
8356
- */
8357
 
8358
- function getPriceValue(string) {
8359
- return Number(Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_16__["decodeEntities"])(string).replace(/[^0-9.-]+/g, ''));
8360
- }
8361
  /**
8362
- * Determines if a URL is a WC admin url.
8363
- *
8364
- * @param {*} url - the url to test
8365
- * @return {boolean} true if the url is a wc-admin URL
8366
  */
8367
 
8368
- function isWCAdmin(url) {
8369
- return /admin.php\?page=wc-admin/.test(url);
8370
- }
 
 
 
 
 
8371
 
8372
  /***/ }),
8373
- /* 232 */,
8374
- /* 233 */
8375
- /***/ (function(module, exports) {
8376
-
8377
- function _objectWithoutPropertiesLoose(source, excluded) {
8378
- if (source == null) return {};
8379
- var target = {};
8380
- var sourceKeys = Object.keys(source);
8381
- var key, i;
8382
-
8383
- for (i = 0; i < sourceKeys.length; i++) {
8384
- key = sourceKeys[i];
8385
- if (excluded.indexOf(key) >= 0) continue;
8386
- target[key] = source[key];
8387
- }
8388
 
8389
- return target;
8390
- }
8391
 
8392
- module.exports = _objectWithoutPropertiesLoose;
8393
 
8394
  /***/ }),
8395
- /* 234 */
 
8396
  /***/ (function(module, exports, __webpack_require__) {
8397
 
8398
  "use strict";
 
 
 
 
 
 
 
 
8399
 
8400
- var bind = __webpack_require__(94);
8401
- var toObject = __webpack_require__(38);
8402
- var callWithSafeIterationClosing = __webpack_require__(252);
8403
- var isArrayIteratorMethod = __webpack_require__(171);
8404
- var toLength = __webpack_require__(34);
8405
- var createProperty = __webpack_require__(102);
8406
- var getIteratorMethod = __webpack_require__(155);
8407
-
8408
- // `Array.from` method implementation
8409
- // https://tc39.es/ecma262/#sec-array.from
8410
- module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
8411
- var O = toObject(arrayLike);
8412
- var C = typeof this == 'function' ? this : Array;
8413
- var argumentsLength = arguments.length;
8414
- var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
8415
- var mapping = mapfn !== undefined;
8416
- var iteratorMethod = getIteratorMethod(O);
8417
- var index = 0;
8418
- var length, result, step, iterator, next, value;
8419
- if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
8420
- // if the target is not iterable or it's an array with the default iterator - use a simple case
8421
- if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
8422
- iterator = iteratorMethod.call(O);
8423
- next = iterator.next;
8424
- result = new C();
8425
- for (;!(step = next.call(iterator)).done; index++) {
8426
- value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
8427
- createProperty(result, index, value);
8428
- }
8429
- } else {
8430
- length = toLength(O.length);
8431
- result = new C(length);
8432
- for (;length > index; index++) {
8433
- value = mapping ? mapfn(O[index], index) : O[index];
8434
- createProperty(result, index, value);
8435
- }
8436
- }
8437
- result.length = index;
8438
- return result;
8439
- };
8440
 
8441
 
8442
  /***/ }),
8443
- /* 235 */
 
8444
  /***/ (function(module, exports, __webpack_require__) {
8445
 
8446
- "use strict";
8447
 
8448
- var defineProperty = __webpack_require__(17).f;
8449
- var create = __webpack_require__(69);
8450
- var redefineAll = __webpack_require__(152);
8451
- var bind = __webpack_require__(94);
8452
- var anInstance = __webpack_require__(136);
8453
- var iterate = __webpack_require__(154);
8454
- var defineIterator = __webpack_require__(166);
8455
- var setSpecies = __webpack_require__(153);
8456
- var DESCRIPTORS = __webpack_require__(13);
8457
- var fastKey = __webpack_require__(205).fastKey;
8458
- var InternalStateModule = __webpack_require__(45);
8459
-
8460
- var setInternalState = InternalStateModule.set;
8461
- var internalStateGetterFor = InternalStateModule.getterFor;
8462
-
8463
- module.exports = {
8464
- getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
8465
- var C = wrapper(function (that, iterable) {
8466
- anInstance(that, C, CONSTRUCTOR_NAME);
8467
- setInternalState(that, {
8468
- type: CONSTRUCTOR_NAME,
8469
- index: create(null),
8470
- first: undefined,
8471
- last: undefined,
8472
- size: 0
8473
- });
8474
- if (!DESCRIPTORS) that.size = 0;
8475
- if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
8476
- });
8477
-
8478
- var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
8479
-
8480
- var define = function (that, key, value) {
8481
- var state = getInternalState(that);
8482
- var entry = getEntry(that, key);
8483
- var previous, index;
8484
- // change existing entry
8485
- if (entry) {
8486
- entry.value = value;
8487
- // create new entry
8488
- } else {
8489
- state.last = entry = {
8490
- index: index = fastKey(key, true),
8491
- key: key,
8492
- value: value,
8493
- previous: previous = state.last,
8494
- next: undefined,
8495
- removed: false
8496
- };
8497
- if (!state.first) state.first = entry;
8498
- if (previous) previous.next = entry;
8499
- if (DESCRIPTORS) state.size++;
8500
- else that.size++;
8501
- // add to index
8502
- if (index !== 'F') state.index[index] = entry;
8503
- } return that;
8504
- };
8505
-
8506
- var getEntry = function (that, key) {
8507
- var state = getInternalState(that);
8508
- // fast case
8509
- var index = fastKey(key);
8510
- var entry;
8511
- if (index !== 'F') return state.index[index];
8512
- // frozen object case
8513
- for (entry = state.first; entry; entry = entry.next) {
8514
- if (entry.key == key) return entry;
8515
- }
8516
- };
8517
-
8518
- redefineAll(C.prototype, {
8519
- // 23.1.3.1 Map.prototype.clear()
8520
- // 23.2.3.2 Set.prototype.clear()
8521
- clear: function clear() {
8522
- var that = this;
8523
- var state = getInternalState(that);
8524
- var data = state.index;
8525
- var entry = state.first;
8526
- while (entry) {
8527
- entry.removed = true;
8528
- if (entry.previous) entry.previous = entry.previous.next = undefined;
8529
- delete data[entry.index];
8530
- entry = entry.next;
8531
- }
8532
- state.first = state.last = undefined;
8533
- if (DESCRIPTORS) state.size = 0;
8534
- else that.size = 0;
8535
- },
8536
- // 23.1.3.3 Map.prototype.delete(key)
8537
- // 23.2.3.4 Set.prototype.delete(value)
8538
- 'delete': function (key) {
8539
- var that = this;
8540
- var state = getInternalState(that);
8541
- var entry = getEntry(that, key);
8542
- if (entry) {
8543
- var next = entry.next;
8544
- var prev = entry.previous;
8545
- delete state.index[entry.index];
8546
- entry.removed = true;
8547
- if (prev) prev.next = next;
8548
- if (next) next.previous = prev;
8549
- if (state.first == entry) state.first = next;
8550
- if (state.last == entry) state.last = prev;
8551
- if (DESCRIPTORS) state.size--;
8552
- else that.size--;
8553
- } return !!entry;
8554
- },
8555
- // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
8556
- // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
8557
- forEach: function forEach(callbackfn /* , that = undefined */) {
8558
- var state = getInternalState(this);
8559
- var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
8560
- var entry;
8561
- while (entry = entry ? entry.next : state.first) {
8562
- boundFunction(entry.value, entry.key, this);
8563
- // revert to the last existing entry
8564
- while (entry && entry.removed) entry = entry.previous;
8565
- }
8566
- },
8567
- // 23.1.3.7 Map.prototype.has(key)
8568
- // 23.2.3.7 Set.prototype.has(value)
8569
- has: function has(key) {
8570
- return !!getEntry(this, key);
8571
- }
8572
- });
8573
-
8574
- redefineAll(C.prototype, IS_MAP ? {
8575
- // 23.1.3.6 Map.prototype.get(key)
8576
- get: function get(key) {
8577
- var entry = getEntry(this, key);
8578
- return entry && entry.value;
8579
- },
8580
- // 23.1.3.9 Map.prototype.set(key, value)
8581
- set: function set(key, value) {
8582
- return define(this, key === 0 ? 0 : key, value);
8583
- }
8584
- } : {
8585
- // 23.2.3.1 Set.prototype.add(value)
8586
- add: function add(value) {
8587
- return define(this, value = value === 0 ? 0 : value, value);
8588
- }
8589
- });
8590
- if (DESCRIPTORS) defineProperty(C.prototype, 'size', {
8591
- get: function () {
8592
- return getInternalState(this).size;
8593
- }
8594
- });
8595
- return C;
8596
- },
8597
- setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {
8598
- var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
8599
- var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
8600
- var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
8601
- // add .keys, .values, .entries, [@@iterator]
8602
- // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
8603
- defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {
8604
- setInternalState(this, {
8605
- type: ITERATOR_NAME,
8606
- target: iterated,
8607
- state: getInternalCollectionState(iterated),
8608
- kind: kind,
8609
- last: undefined
8610
- });
8611
- }, function () {
8612
- var state = getInternalIteratorState(this);
8613
- var kind = state.kind;
8614
- var entry = state.last;
8615
- // revert to the last existing entry
8616
- while (entry && entry.removed) entry = entry.previous;
8617
- // get next entry
8618
- if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
8619
- // or finish the iteration
8620
- state.target = undefined;
8621
- return { value: undefined, done: true };
8622
- }
8623
- // return step by kind
8624
- if (kind == 'keys') return { value: entry.key, done: false };
8625
- if (kind == 'values') return { value: entry.value, done: false };
8626
- return { value: [entry.key, entry.value], done: false };
8627
- }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
8628
-
8629
- // add [@@species], 23.1.2.2, 23.2.2.2
8630
- setSpecies(CONSTRUCTOR_NAME);
8631
- }
8632
- };
8633
 
 
8634
 
8635
  /***/ }),
8636
- /* 236 */,
8637
- /* 237 */,
8638
- /* 238 */,
8639
- /* 239 */,
8640
- /* 240 */,
8641
- /* 241 */,
8642
- /* 242 */,
8643
- /* 243 */,
8644
- /* 244 */,
8645
- /* 245 */,
8646
- /* 246 */,
8647
- /* 247 */
8648
  /***/ (function(module, exports) {
8649
 
8650
- (function() { module.exports = window["wc"]["currency"]; }());
 
 
 
 
8651
 
8652
  /***/ }),
8653
- /* 248 */
8654
- /***/ (function(module, exports, __webpack_require__) {
8655
-
8656
- "use strict";
8657
 
8658
- var collection = __webpack_require__(229);
8659
- var collectionStrong = __webpack_require__(235);
8660
 
8661
- // `Set` constructor
8662
- // https://tc39.es/ecma262/#sec-set-objects
8663
- module.exports = collection('Set', function (init) {
8664
- return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };
8665
- }, collectionStrong);
8666
 
 
8667
 
8668
  /***/ }),
8669
- /* 249 */
8670
- /***/ (function(module, exports, __webpack_require__) {
8671
-
8672
- var DESCRIPTORS = __webpack_require__(13);
8673
- var objectKeys = __webpack_require__(54);
8674
- var toIndexedObject = __webpack_require__(21);
8675
- var propertyIsEnumerable = __webpack_require__(76).f;
8676
-
8677
- // `Object.{ entries, values }` methods implementation
8678
- var createMethod = function (TO_ENTRIES) {
8679
- return function (it) {
8680
- var O = toIndexedObject(it);
8681
- var keys = objectKeys(O);
8682
- var length = keys.length;
8683
- var i = 0;
8684
- var result = [];
8685
- var key;
8686
- while (length > i) {
8687
- key = keys[i++];
8688
- if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {
8689
- result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
8690
- }
8691
- }
8692
- return result;
8693
- };
8694
- };
8695
 
8696
- module.exports = {
8697
- // `Object.entries` method
8698
- // https://tc39.es/ecma262/#sec-object.entries
8699
- entries: createMethod(true),
8700
- // `Object.values` method
8701
- // https://tc39.es/ecma262/#sec-object.values
8702
- values: createMethod(false)
8703
- };
8704
 
 
8705
 
8706
  /***/ }),
8707
- /* 250 */
8708
- /***/ (function(module, exports, __webpack_require__) {
8709
-
8710
- var $ = __webpack_require__(12);
8711
- var assign = __webpack_require__(221);
8712
 
8713
- // `Object.assign` method
8714
- // https://tc39.es/ecma262/#sec-object.assign
8715
- $({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
8716
- assign: assign
8717
- });
8718
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8719
 
8720
- /***/ }),
8721
- /* 251 */,
8722
- /* 252 */
8723
- /***/ (function(module, exports, __webpack_require__) {
8724
 
8725
- var anObject = __webpack_require__(9);
8726
- var iteratorClose = __webpack_require__(172);
 
 
8727
 
8728
- // call something on iterator step with safe closing on error
8729
- module.exports = function (iterator, fn, value, ENTRIES) {
8730
- try {
8731
- return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
8732
- // 7.4.6 IteratorClose(iterator, completion)
8733
- } catch (error) {
8734
- iteratorClose(iterator);
8735
- throw error;
8736
  }
8737
- };
8738
-
8739
-
8740
- /***/ }),
8741
- /* 253 */
8742
- /***/ (function(module, exports, __webpack_require__) {
8743
 
8744
- var fails = __webpack_require__(6);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8745
 
8746
- module.exports = !fails(function () {
8747
- return Object.isExtensible(Object.preventExtensions({}));
8748
- });
 
 
8749
 
 
 
 
8750
 
8751
- /***/ }),
8752
- /* 254 */
8753
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8754
 
8755
- var fails = __webpack_require__(6);
8756
- var wellKnownSymbol = __webpack_require__(8);
8757
- var IS_PURE = __webpack_require__(57);
 
8758
 
8759
- var ITERATOR = wellKnownSymbol('iterator');
 
 
8760
 
8761
- module.exports = !fails(function () {
8762
- var url = new URL('b?a=1&b=2&c=3', 'http://a');
8763
- var searchParams = url.searchParams;
8764
- var result = '';
8765
- url.pathname = 'c%20d';
8766
- searchParams.forEach(function (value, key) {
8767
- searchParams['delete']('b');
8768
- result += key + value;
8769
- });
8770
- return (IS_PURE && !url.toJSON)
8771
- || !searchParams.sort
8772
- || url.href !== 'http://a/c%20d?a=1&c=3'
8773
- || searchParams.get('c') !== '3'
8774
- || String(new URLSearchParams('?a=1')) !== 'a=1'
8775
- || !searchParams[ITERATOR]
8776
- // throws in Edge
8777
- || new URL('https://a@b').username !== 'a'
8778
- || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
8779
- // not punycoded in Edge
8780
- || new URL('http://тест').host !== 'xn--e1aybc'
8781
- // not escaped in Chrome 62-
8782
- || new URL('http://a#б').hash !== '#%D0%B1'
8783
- // fails in Chrome 66-
8784
- || result !== 'a1c3'
8785
- // throws in Safari
8786
- || new URL('http://x', undefined).host !== 'x';
8787
- });
8788
 
 
 
 
8789
 
8790
  /***/ }),
8791
- /* 255 */,
8792
- /* 256 */,
8793
- /* 257 */,
8794
- /* 258 */,
8795
- /* 259 */,
8796
- /* 260 */,
8797
- /* 261 */,
8798
- /* 262 */
8799
  /***/ (function(module, exports) {
8800
 
8801
- (function() { module.exports = window["wp"]["dom"]; }());
8802
 
8803
  /***/ }),
8804
- /* 263 */,
8805
- /* 264 */,
8806
- /* 265 */,
8807
- /* 266 */,
8808
- /* 267 */,
8809
- /* 268 */
8810
  /***/ (function(module, exports, __webpack_require__) {
8811
 
8812
  "use strict";
8813
 
8814
 
8815
- if (true) {
8816
- module.exports = __webpack_require__(298);
8817
- } else {}
8818
 
 
8819
 
8820
- /***/ }),
8821
- /* 269 */,
8822
- /* 270 */,
8823
- /* 271 */,
8824
- /* 272 */,
8825
- /* 273 */,
8826
- /* 274 */,
8827
- /* 275 */,
8828
- /* 276 */,
8829
- /* 277 */
8830
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
8831
 
8832
- "use strict";
8833
- /* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(164);
8834
- /* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_0__);
8835
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(100);
8836
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__);
8837
- /* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(151);
8838
- /* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_2__);
8839
- /* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(123);
8840
- /* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_3__);
8841
- /* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(146);
8842
- /* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_4__);
8843
- /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41);
8844
- /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_5__);
8845
- /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2);
8846
- /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__);
8847
- /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(141);
8848
- /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__);
8849
- /* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(85);
8850
- /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(0);
8851
- /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);
 
 
 
 
 
 
 
 
 
 
 
8852
 
 
 
 
8853
 
 
 
 
8854
 
 
 
 
 
 
 
 
8855
 
 
 
 
 
 
 
 
 
 
 
 
8856
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8857
 
 
 
8858
 
8859
- /**
8860
- * External dependencies
8861
- */
8862
-
8863
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8864
 
 
 
8865
 
8866
- var manageStock = Object(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_8__[/* getSetting */ "g"])('manageStock', 'no');
8867
- var REPORTS_FILTER = 'woocommerce_admin_reports_list';
8868
- /**
8869
- * Internal dependencies
8870
- */
 
 
8871
 
8872
- var RevenueReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
8873
- return Promise.all(/* import() | analytics-report-revenue */[__webpack_require__.e(0), __webpack_require__.e(16)]).then(__webpack_require__.bind(null, 584));
8874
- });
8875
- var ProductsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
8876
- return Promise.all(/* import() | analytics-report-products */[__webpack_require__.e(0), __webpack_require__.e(2), __webpack_require__.e(15)]).then(__webpack_require__.bind(null, 580));
8877
- });
8878
- var VariationsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
8879
- return Promise.all(/* import() | analytics-report-variations */[__webpack_require__.e(0), __webpack_require__.e(2), __webpack_require__.e(19)]).then(__webpack_require__.bind(null, 585));
8880
- });
8881
- var OrdersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
8882
- return Promise.all(/* import() | analytics-report-orders */[__webpack_require__.e(0), __webpack_require__.e(5), __webpack_require__.e(14)]).then(__webpack_require__.bind(null, 586));
8883
- });
8884
- var CategoriesReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
8885
- return Promise.all(/* import() | analytics-report-categories */[__webpack_require__.e(0), __webpack_require__.e(2), __webpack_require__.e(10)]).then(__webpack_require__.bind(null, 582));
8886
- });
8887
- var CouponsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
8888
- return Promise.all(/* import() | analytics-report-coupons */[__webpack_require__.e(0), __webpack_require__.e(11)]).then(__webpack_require__.bind(null, 587));
8889
- });
8890
- var TaxesReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
8891
- return Promise.all(/* import() | analytics-report-taxes */[__webpack_require__.e(0), __webpack_require__.e(18)]).then(__webpack_require__.bind(null, 588));
8892
- });
8893
- var DownloadsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
8894
- return Promise.all(/* import() | analytics-report-downloads */[__webpack_require__.e(0), __webpack_require__.e(13)]).then(__webpack_require__.bind(null, 589));
8895
- });
8896
- var StockReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
8897
- return Promise.all(/* import() | analytics-report-stock */[__webpack_require__.e(0), __webpack_require__.e(17)]).then(__webpack_require__.bind(null, 581));
8898
- });
8899
- var CustomersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
8900
- return Promise.all(/* import() | analytics-report-customers */[__webpack_require__.e(0), __webpack_require__.e(12)]).then(__webpack_require__.bind(null, 583));
8901
- });
8902
- /* harmony default export */ __webpack_exports__["a"] = (function () {
8903
- var reports = [{
8904
- report: 'revenue',
8905
- title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Revenue', 'woocommerce-admin'),
8906
- component: RevenueReport,
8907
- navArgs: {
8908
- id: 'woocommerce-analytics-revenue'
8909
- }
8910
- }, {
8911
- report: 'products',
8912
- title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Products', 'woocommerce-admin'),
8913
- component: ProductsReport,
8914
- navArgs: {
8915
- id: 'woocommerce-analytics-products'
8916
- }
8917
- }, {
8918
- report: 'variations',
8919
- title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Variations', 'woocommerce-admin'),
8920
- component: VariationsReport,
8921
- navArgs: {
8922
- id: 'woocommerce-analytics-variations'
8923
- }
8924
- }, {
8925
- report: 'orders',
8926
- title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Orders', 'woocommerce-admin'),
8927
- component: OrdersReport,
8928
- navArgs: {
8929
- id: 'woocommerce-analytics-orders'
8930
- }
8931
- }, {
8932
- report: 'categories',
8933
- title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Categories', 'woocommerce-admin'),
8934
- component: CategoriesReport,
8935
- navArgs: {
8936
- id: 'woocommerce-analytics-categories'
8937
- }
8938
- }, {
8939
- report: 'coupons',
8940
- title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Coupons', 'woocommerce-admin'),
8941
- component: CouponsReport,
8942
- navArgs: {
8943
- id: 'woocommerce-analytics-coupons'
8944
- }
8945
- }, {
8946
- report: 'taxes',
8947
- title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Taxes', 'woocommerce-admin'),
8948
- component: TaxesReport,
8949
- navArgs: {
8950
- id: 'woocommerce-analytics-taxes'
8951
- }
8952
- }, manageStock === 'yes' ? {
8953
- report: 'stock',
8954
- title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Stock', 'woocommerce-admin'),
8955
- component: StockReport,
8956
- navArgs: {
8957
- id: 'woocommerce-analytics-stock'
8958
- }
8959
- } : null, {
8960
- report: 'customers',
8961
- title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Customers', 'woocommerce-admin'),
8962
- component: CustomersReport
8963
- }, {
8964
- report: 'downloads',
8965
- title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Downloads', 'woocommerce-admin'),
8966
- component: DownloadsReport,
8967
- navArgs: {
8968
- id: 'woocommerce-analytics-downloads'
8969
  }
8970
- }].filter(Boolean);
8971
- return Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__["applyFilters"])(REPORTS_FILTER, reports);
8972
- });
8973
 
8974
- /***/ }),
8975
- /* 278 */
8976
- /***/ (function(module, exports, __webpack_require__) {
8977
 
8978
- "use strict";
 
 
 
 
 
 
8979
 
 
8980
 
8981
- var reactIs = __webpack_require__(268);
 
 
8982
 
8983
- /**
8984
- * Copyright 2015, Yahoo! Inc.
8985
- * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
8986
- */
8987
- var REACT_STATICS = {
8988
- childContextTypes: true,
8989
- contextType: true,
8990
- contextTypes: true,
8991
- defaultProps: true,
8992
- displayName: true,
8993
- getDefaultProps: true,
8994
- getDerivedStateFromError: true,
8995
- getDerivedStateFromProps: true,
8996
- mixins: true,
8997
- propTypes: true,
8998
- type: true
8999
- };
9000
- var KNOWN_STATICS = {
9001
- name: true,
9002
- length: true,
9003
- prototype: true,
9004
- caller: true,
9005
- callee: true,
9006
- arguments: true,
9007
- arity: true
9008
- };
9009
- var FORWARD_REF_STATICS = {
9010
- '$$typeof': true,
9011
- render: true,
9012
- defaultProps: true,
9013
- displayName: true,
9014
- propTypes: true
9015
- };
9016
- var MEMO_STATICS = {
9017
- '$$typeof': true,
9018
- compare: true,
9019
- defaultProps: true,
9020
- displayName: true,
9021
- propTypes: true,
9022
- type: true
9023
- };
9024
- var TYPE_STATICS = {};
9025
- TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
9026
- TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
9027
 
9028
- function getStatics(component) {
9029
- // React v16.11 and below
9030
- if (reactIs.isMemo(component)) {
9031
- return MEMO_STATICS;
9032
- } // React v16.12 and above
9033
 
 
9034
 
9035
- return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
9036
- }
 
9037
 
9038
- var defineProperty = Object.defineProperty;
9039
- var getOwnPropertyNames = Object.getOwnPropertyNames;
9040
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
9041
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
9042
- var getPrototypeOf = Object.getPrototypeOf;
9043
- var objectPrototype = Object.prototype;
9044
- function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
9045
- if (typeof sourceComponent !== 'string') {
9046
- // don't hoist over string (html) components
9047
- if (objectPrototype) {
9048
- var inheritedComponent = getPrototypeOf(sourceComponent);
9049
 
9050
- if (inheritedComponent && inheritedComponent !== objectPrototype) {
9051
- hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
9052
- }
9053
- }
 
9054
 
9055
- var keys = getOwnPropertyNames(sourceComponent);
 
 
 
 
 
9056
 
9057
- if (getOwnPropertySymbols) {
9058
- keys = keys.concat(getOwnPropertySymbols(sourceComponent));
 
 
 
9059
  }
9060
 
9061
- var targetStatics = getStatics(targetComponent);
9062
- var sourceStatics = getStatics(sourceComponent);
9063
 
9064
- for (var i = 0; i < keys.length; ++i) {
9065
- var key = keys[i];
 
 
 
9066
 
9067
- if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
9068
- var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
 
 
 
9069
 
9070
- try {
9071
- // Avoid failures from read-only properties
9072
- defineProperty(targetComponent, key, descriptor);
9073
- } catch (e) {}
9074
- }
9075
- }
9076
  }
9077
 
9078
- return targetComponent;
9079
- }
9080
-
9081
- module.exports = hoistNonReactStatics;
9082
-
 
9083
 
9084
- /***/ }),
9085
- /* 279 */
9086
- /***/ (function(module, exports) {
9087
 
9088
- (function() { module.exports = window["wp"]["plugins"]; }());
 
 
9089
 
9090
- /***/ }),
9091
- /* 280 */
9092
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
9093
 
9094
- "use strict";
 
 
 
 
9095
 
9096
- // EXPORTS
9097
- __webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ layout_PrimaryLayout; });
9098
- __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ PageLayout; });
9099
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ EmbedLayout; });
9100
-
9101
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.construct.js
9102
- var es_reflect_construct = __webpack_require__(64);
9103
-
9104
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
9105
- var es_object_keys = __webpack_require__(37);
9106
-
9107
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.js
9108
- var es_symbol = __webpack_require__(53);
9109
-
9110
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js
9111
- var es_object_get_own_property_descriptor = __webpack_require__(60);
9112
 
9113
- // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
9114
- var web_dom_collections_for_each = __webpack_require__(49);
9115
 
9116
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js
9117
- var es_object_get_own_property_descriptors = __webpack_require__(61);
9118
 
9119
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
9120
- var helpers_extends = __webpack_require__(80);
9121
- var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
 
9122
 
9123
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js
9124
- var objectWithoutProperties = __webpack_require__(116);
9125
- var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
9126
 
9127
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
9128
- var defineProperty = __webpack_require__(7);
9129
- var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
 
 
9130
 
9131
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
9132
- var classCallCheck = __webpack_require__(22);
9133
- var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
9134
 
9135
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js
9136
- var createClass = __webpack_require__(23);
9137
- var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
9138
 
9139
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js
9140
- var inherits = __webpack_require__(24);
9141
- var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);
9142
 
9143
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js
9144
- var possibleConstructorReturn = __webpack_require__(25);
9145
- var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9146
 
9147
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/getPrototypeOf.js
9148
- var getPrototypeOf = __webpack_require__(14);
9149
- var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9150
 
9151
- // EXTERNAL MODULE: external ["wp","element"]
9152
- var external_wp_element_ = __webpack_require__(0);
 
9153
 
9154
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
9155
- var es_promise = __webpack_require__(164);
 
 
9156
 
9157
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
9158
- var es_object_to_string = __webpack_require__(100);
9159
 
9160
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
9161
- var es_string_iterator = __webpack_require__(151);
 
 
 
 
9162
 
9163
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
9164
- var es_array_iterator = __webpack_require__(123);
9165
 
9166
- // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
9167
- var web_dom_collections_iterator = __webpack_require__(146);
9168
 
9169
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.search.js
9170
- var es_string_search = __webpack_require__(170);
9171
 
9172
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
9173
- var es_regexp_exec = __webpack_require__(88);
 
9174
 
9175
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
9176
- var es_string_replace = __webpack_require__(135);
 
 
 
 
 
 
9177
 
9178
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
9179
- var es_array_includes = __webpack_require__(107);
9180
 
9181
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
9182
- var es_string_includes = __webpack_require__(140);
 
9183
 
9184
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
9185
- var es_array_map = __webpack_require__(51);
 
 
 
 
9186
 
9187
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
9188
- var es_array_filter = __webpack_require__(41);
 
 
 
 
 
 
 
 
 
 
 
9189
 
9190
- // EXTERNAL MODULE: external ["wp","compose"]
9191
- var external_wp_compose_ = __webpack_require__(65);
 
 
 
9192
 
9193
- // EXTERNAL MODULE: external ["wp","data"]
9194
- var external_wp_data_ = __webpack_require__(26);
9195
 
9196
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js + 1 modules
9197
- var inheritsLoose = __webpack_require__(128);
 
 
 
 
 
 
 
9198
 
9199
- // EXTERNAL MODULE: external "React"
9200
- var external_React_ = __webpack_require__(20);
9201
- var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_);
9202
 
9203
- // EXTERNAL MODULE: ./node_modules/prop-types/index.js
9204
- var prop_types = __webpack_require__(1);
9205
- var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
9206
 
9207
- // EXTERNAL MODULE: ./node_modules/history/esm/history.js + 2 modules
9208
- var esm_history = __webpack_require__(202);
9209
 
9210
- // EXTERNAL MODULE: ./node_modules/mini-create-react-context/dist/esm/index.js
9211
- var esm = __webpack_require__(316);
 
 
 
 
 
 
9212
 
9213
- // EXTERNAL MODULE: ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js
9214
- var tiny_invariant_esm = __webpack_require__(176);
9215
 
9216
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
9217
- var esm_extends = __webpack_require__(117);
 
 
9218
 
9219
- // EXTERNAL MODULE: ./node_modules/path-to-regexp/index.js
9220
- var path_to_regexp = __webpack_require__(317);
9221
- var path_to_regexp_default = /*#__PURE__*/__webpack_require__.n(path_to_regexp);
9222
 
9223
- // EXTERNAL MODULE: ./node_modules/react-is/index.js
9224
- var react_is = __webpack_require__(268);
9225
-
9226
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
9227
- var objectWithoutPropertiesLoose = __webpack_require__(133);
9228
-
9229
- // EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
9230
- var hoist_non_react_statics_cjs = __webpack_require__(278);
9231
- var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
9232
-
9233
- // CONCATENATED MODULE: ./node_modules/react-router/esm/react-router.js
9234
 
 
 
 
 
 
9235
 
9236
 
 
 
 
 
 
9237
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9238
 
 
9239
 
 
9240
 
 
 
 
 
 
 
 
9241
 
9242
 
 
 
 
 
 
 
 
9243
 
9244
 
 
9245
 
 
 
 
 
 
9246
 
9247
- // TODO: Replace with React.createContext once we can assume React 16+
 
 
9248
 
9249
- var react_router_createNamedContext = function createNamedContext(name) {
9250
- var context = Object(esm["a" /* default */])();
9251
- context.displayName = name;
9252
- return context;
9253
- };
9254
 
9255
- var historyContext =
9256
- /*#__PURE__*/
9257
- react_router_createNamedContext("Router-History");
9258
 
9259
- // TODO: Replace with React.createContext once we can assume React 16+
9260
 
9261
- var createNamedContext$1 = function createNamedContext(name) {
9262
- var context = Object(esm["a" /* default */])();
9263
- context.displayName = name;
9264
- return context;
9265
- };
9266
 
9267
- var react_router_context =
9268
- /*#__PURE__*/
9269
- createNamedContext$1("Router");
 
 
9270
 
9271
- /**
9272
- * The public API for putting history on context.
9273
- */
9274
 
9275
- var react_router_Router =
9276
- /*#__PURE__*/
9277
- function (_React$Component) {
9278
- Object(inheritsLoose["a" /* default */])(Router, _React$Component);
 
9279
 
9280
- Router.computeRootMatch = function computeRootMatch(pathname) {
9281
- return {
9282
- path: "/",
9283
- url: "/",
9284
- params: {},
9285
- isExact: pathname === "/"
9286
- };
9287
- };
9288
 
9289
- function Router(props) {
9290
- var _this;
9291
 
9292
- _this = _React$Component.call(this, props) || this;
9293
- _this.state = {
9294
- location: props.history.location
9295
- }; // This is a bit of a hack. We have to start listening for location
9296
- // changes here in the constructor in case there are any <Redirect>s
9297
- // on the initial render. If there are, they will replace/push when
9298
- // they mount and since cDM fires in children before parents, we may
9299
- // get a new location before the <Router> is mounted.
9300
 
9301
- _this._isMounted = false;
9302
- _this._pendingLocation = null;
 
9303
 
9304
- if (!props.staticContext) {
9305
- _this.unlisten = props.history.listen(function (location) {
9306
- if (_this._isMounted) {
9307
- _this.setState({
9308
- location: location
9309
- });
9310
- } else {
9311
- _this._pendingLocation = location;
9312
- }
9313
- });
9314
- }
9315
 
9316
- return _this;
 
 
 
 
 
9317
  }
9318
 
9319
- var _proto = Router.prototype;
 
 
9320
 
9321
- _proto.componentDidMount = function componentDidMount() {
9322
- this._isMounted = true;
 
 
 
9323
 
9324
- if (this._pendingLocation) {
9325
- this.setState({
9326
- location: this._pendingLocation
9327
- });
9328
- }
9329
  };
9330
 
9331
- _proto.componentWillUnmount = function componentWillUnmount() {
9332
- if (this.unlisten) this.unlisten();
 
9333
  };
 
9334
 
9335
- _proto.render = function render() {
9336
- return external_React_default.a.createElement(react_router_context.Provider, {
9337
- value: {
9338
- history: this.props.history,
9339
- location: this.state.location,
9340
- match: Router.computeRootMatch(this.state.location.pathname),
9341
- staticContext: this.props.staticContext
9342
- }
9343
- }, external_React_default.a.createElement(historyContext.Provider, {
9344
- children: this.props.children || null,
9345
- value: this.props.history
9346
- }));
9347
- };
9348
 
9349
- return Router;
9350
- }(external_React_default.a.Component);
 
9351
 
9352
- if (false) {}
 
 
9353
 
9354
- /**
9355
- * The public API for a <Router> that stores location in memory.
9356
- */
9357
 
9358
- var react_router_MemoryRouter =
9359
- /*#__PURE__*/
9360
- function (_React$Component) {
9361
- Object(inheritsLoose["a" /* default */])(MemoryRouter, _React$Component);
9362
 
9363
- function MemoryRouter() {
9364
- var _this;
9365
 
9366
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
9367
- args[_key] = arguments[_key];
9368
- }
9369
 
9370
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
9371
- _this.history = Object(esm_history["c" /* createMemoryHistory */])(_this.props);
9372
- return _this;
9373
  }
9374
 
9375
- var _proto = MemoryRouter.prototype;
9376
-
9377
- _proto.render = function render() {
9378
- return external_React_default.a.createElement(react_router_Router, {
9379
- history: this.history,
9380
- children: this.props.children
9381
- });
9382
- };
9383
-
9384
- return MemoryRouter;
9385
- }(external_React_default.a.Component);
9386
-
9387
- if (false) {}
9388
 
9389
- var react_router_Lifecycle =
9390
  /*#__PURE__*/
9391
- function (_React$Component) {
9392
- Object(inheritsLoose["a" /* default */])(Lifecycle, _React$Component);
9393
 
9394
- function Lifecycle() {
9395
- return _React$Component.apply(this, arguments) || this;
9396
- }
9397
 
9398
- var _proto = Lifecycle.prototype;
 
 
 
 
 
9399
 
9400
- _proto.componentDidMount = function componentDidMount() {
9401
- if (this.props.onMount) this.props.onMount.call(this, this);
9402
- };
9403
 
9404
- _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
9405
- if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);
 
 
9406
  };
9407
 
9408
- _proto.componentWillUnmount = function componentWillUnmount() {
9409
- if (this.props.onUnmount) this.props.onUnmount.call(this, this);
9410
  };
9411
 
9412
- _proto.render = function render() {
9413
- return null;
9414
  };
9415
 
9416
- return Lifecycle;
9417
- }(external_React_default.a.Component);
9418
 
9419
- /**
9420
- * The public API for prompting the user before navigating away from a screen.
9421
- */
9422
 
9423
- function Prompt(_ref) {
9424
- var message = _ref.message,
9425
- _ref$when = _ref.when,
9426
- when = _ref$when === void 0 ? true : _ref$when;
9427
- return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
9428
- !context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
9429
- if (!when || context.staticContext) return null;
9430
- var method = context.history.block;
9431
- return external_React_default.a.createElement(react_router_Lifecycle, {
9432
- onMount: function onMount(self) {
9433
- self.release = method(message);
9434
- },
9435
- onUpdate: function onUpdate(self, prevProps) {
9436
- if (prevProps.message !== message) {
9437
- self.release();
9438
- self.release = method(message);
9439
- }
9440
- },
9441
- onUnmount: function onUnmount(self) {
9442
- self.release();
9443
- },
9444
- message: message
9445
- });
9446
- });
9447
- }
 
9448
 
9449
- if (false) { var messageType; }
 
 
9450
 
9451
- var cache = {};
9452
- var cacheLimit = 10000;
9453
- var cacheCount = 0;
 
9454
 
9455
- function compilePath(path) {
9456
- if (cache[path]) return cache[path];
9457
- var generator = path_to_regexp_default.a.compile(path);
 
 
 
 
 
9458
 
9459
- if (cacheCount < cacheLimit) {
9460
- cache[path] = generator;
9461
- cacheCount++;
9462
- }
9463
 
9464
- return generator;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9465
  }
 
9466
  /**
9467
- * Public API for generating a URL pathname from a path and parameters.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9468
  */
 
 
 
 
 
 
 
 
 
9469
 
 
 
 
 
9470
 
9471
- function generatePath(path, params) {
9472
- if (path === void 0) {
9473
- path = "/";
9474
- }
9475
 
9476
- if (params === void 0) {
9477
- params = {};
9478
- }
 
 
 
 
 
 
9479
 
9480
- return path === "/" ? path : compilePath(path)(params, {
9481
- pretty: true
9482
- });
9483
- }
9484
 
9485
- /**
9486
- * The public API for navigating programmatically with a component.
9487
- */
9488
 
9489
- function Redirect(_ref) {
9490
- var computedMatch = _ref.computedMatch,
9491
- to = _ref.to,
9492
- _ref$push = _ref.push,
9493
- push = _ref$push === void 0 ? false : _ref$push;
9494
- return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
9495
- !context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
9496
- var history = context.history,
9497
- staticContext = context.staticContext;
9498
- var method = push ? history.push : history.replace;
9499
- var location = Object(esm_history["b" /* createLocation */])(computedMatch ? typeof to === "string" ? generatePath(to, computedMatch.params) : Object(esm_extends["a" /* default */])({}, to, {
9500
- pathname: generatePath(to.pathname, computedMatch.params)
9501
- }) : to); // When rendering in a static context,
9502
- // set the new location immediately.
9503
 
9504
- if (staticContext) {
9505
- method(location);
9506
- return null;
9507
- }
9508
 
9509
- return external_React_default.a.createElement(react_router_Lifecycle, {
9510
- onMount: function onMount() {
9511
- method(location);
9512
- },
9513
- onUpdate: function onUpdate(self, prevProps) {
9514
- var prevLocation = Object(esm_history["b" /* createLocation */])(prevProps.to);
9515
 
9516
- if (!Object(esm_history["e" /* locationsAreEqual */])(prevLocation, Object(esm_extends["a" /* default */])({}, location, {
9517
- key: prevLocation.key
9518
- }))) {
9519
- method(location);
9520
- }
9521
- },
9522
- to: to
9523
  });
9524
- });
9525
- }
9526
 
9527
- if (false) {}
 
 
9528
 
9529
- var cache$1 = {};
9530
- var cacheLimit$1 = 10000;
9531
- var cacheCount$1 = 0;
9532
 
9533
- function compilePath$1(path, options) {
9534
- var cacheKey = "" + options.end + options.strict + options.sensitive;
9535
- var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});
9536
- if (pathCache[path]) return pathCache[path];
9537
- var keys = [];
9538
- var regexp = path_to_regexp_default()(path, keys, options);
9539
- var result = {
9540
- regexp: regexp,
9541
- keys: keys
9542
  };
9543
 
9544
- if (cacheCount$1 < cacheLimit$1) {
9545
- pathCache[path] = result;
9546
- cacheCount$1++;
9547
- }
9548
 
9549
- return result;
9550
- }
9551
- /**
9552
- * Public API for matching a URL pathname to a path.
9553
- */
9554
 
 
 
9555
 
9556
- function matchPath(pathname, options) {
9557
- if (options === void 0) {
9558
- options = {};
 
 
9559
  }
9560
 
9561
- if (typeof options === "string" || Array.isArray(options)) {
9562
- options = {
9563
- path: options
9564
- };
9565
- }
9566
 
9567
- var _options = options,
9568
- path = _options.path,
9569
- _options$exact = _options.exact,
9570
- exact = _options$exact === void 0 ? false : _options$exact,
9571
- _options$strict = _options.strict,
9572
- strict = _options$strict === void 0 ? false : _options$strict,
9573
- _options$sensitive = _options.sensitive,
9574
- sensitive = _options$sensitive === void 0 ? false : _options$sensitive;
9575
- var paths = [].concat(path);
9576
- return paths.reduce(function (matched, path) {
9577
- if (!path && path !== "") return null;
9578
- if (matched) return matched;
9579
 
9580
- var _compilePath = compilePath$1(path, {
9581
- end: exact,
9582
- strict: strict,
9583
- sensitive: sensitive
9584
- }),
9585
- regexp = _compilePath.regexp,
9586
- keys = _compilePath.keys;
9587
 
9588
- var match = regexp.exec(pathname);
9589
- if (!match) return null;
9590
- var url = match[0],
9591
- values = match.slice(1);
9592
- var isExact = pathname === url;
9593
- if (exact && !isExact) return null;
9594
- return {
9595
- path: path,
9596
- // the path used to match
9597
- url: path === "/" && url === "" ? "/" : url,
9598
- // the matched portion of the URL
9599
- isExact: isExact,
9600
- // whether or not we matched exactly
9601
- params: keys.reduce(function (memo, key, index) {
9602
- memo[key.name] = values[index];
9603
- return memo;
9604
- }, {})
9605
- };
9606
- }, null);
9607
- }
9608
 
9609
- function isEmptyChildren(children) {
9610
- return external_React_default.a.Children.count(children) === 0;
9611
- }
 
 
9612
 
9613
- function evalChildrenDev(children, props, path) {
9614
- var value = children(props);
9615
- false ? undefined : void 0;
9616
- return value || null;
9617
- }
9618
- /**
9619
- * The public API for matching a single path and rendering.
9620
- */
9621
 
 
 
9622
 
9623
- var react_router_Route =
 
 
9624
  /*#__PURE__*/
9625
- function (_React$Component) {
9626
- Object(inheritsLoose["a" /* default */])(Route, _React$Component);
 
9627
 
9628
- function Route() {
9629
- return _React$Component.apply(this, arguments) || this;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9630
  }
 
 
 
9631
 
9632
- var _proto = Route.prototype;
9633
 
9634
- _proto.render = function render() {
9635
- var _this = this;
9636
 
9637
- return external_React_default.a.createElement(react_router_context.Consumer, null, function (context$1) {
9638
- !context$1 ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
9639
- var location = _this.props.location || context$1.location;
9640
- var match = _this.props.computedMatch ? _this.props.computedMatch // <Switch> already computed the match for us
9641
- : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
9642
 
9643
- var props = Object(esm_extends["a" /* default */])({}, context$1, {
9644
- location: location,
9645
- match: match
9646
- });
 
9647
 
9648
- var _this$props = _this.props,
9649
- children = _this$props.children,
9650
- component = _this$props.component,
9651
- render = _this$props.render; // Preact uses an empty array as children by
9652
- // default, so use null if that's the case.
 
 
 
 
 
 
9653
 
9654
- if (Array.isArray(children) && children.length === 0) {
9655
- children = null;
9656
- }
9657
 
9658
- return external_React_default.a.createElement(react_router_context.Provider, {
9659
- value: props
9660
- }, props.match ? children ? typeof children === "function" ? false ? undefined : children(props) : children : component ? external_React_default.a.createElement(component, props) : render ? render(props) : null : typeof children === "function" ? false ? undefined : children(props) : null);
9661
- });
9662
- };
9663
 
9664
- return Route;
9665
- }(external_React_default.a.Component);
 
 
 
 
 
9666
 
9667
- if (false) {}
9668
 
9669
- function addLeadingSlash(path) {
9670
- return path.charAt(0) === "/" ? path : "/" + path;
9671
- }
9672
 
9673
- function addBasename(basename, location) {
9674
- if (!basename) return location;
9675
- return Object(esm_extends["a" /* default */])({}, location, {
9676
- pathname: addLeadingSlash(basename) + location.pathname
9677
- });
9678
- }
9679
 
9680
- function stripBasename(basename, location) {
9681
- if (!basename) return location;
9682
- var base = addLeadingSlash(basename);
9683
- if (location.pathname.indexOf(base) !== 0) return location;
9684
- return Object(esm_extends["a" /* default */])({}, location, {
9685
- pathname: location.pathname.substr(base.length)
9686
- });
9687
- }
9688
 
9689
- function createURL(location) {
9690
- return typeof location === "string" ? location : Object(esm_history["d" /* createPath */])(location);
9691
- }
9692
 
9693
- function staticHandler(methodName) {
9694
- return function () {
9695
- false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) ;
9696
- };
9697
- }
 
 
 
 
 
 
9698
 
9699
- function noop() {}
9700
- /**
9701
- * The public top-level API for a "static" <Router>, so-called because it
9702
- * can't actually change the current location. Instead, it just records
9703
- * location changes in a context object. Useful mainly in testing and
9704
- * server-rendering scenarios.
9705
- */
9706
 
 
 
 
9707
 
9708
- var react_router_StaticRouter =
9709
- /*#__PURE__*/
9710
- function (_React$Component) {
9711
- Object(inheritsLoose["a" /* default */])(StaticRouter, _React$Component);
9712
 
9713
- function StaticRouter() {
9714
- var _this;
 
 
 
9715
 
9716
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
9717
- args[_key] = arguments[_key];
9718
- }
9719
 
9720
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
9721
 
9722
- _this.handlePush = function (location) {
9723
- return _this.navigateTo(location, "PUSH");
9724
- };
9725
 
9726
- _this.handleReplace = function (location) {
9727
- return _this.navigateTo(location, "REPLACE");
9728
- };
 
 
 
 
 
 
 
 
 
9729
 
9730
- _this.handleListen = function () {
9731
- return noop;
9732
- };
9733
 
9734
- _this.handleBlock = function () {
9735
- return noop;
9736
- };
9737
 
9738
- return _this;
 
 
 
 
 
9739
  }
 
 
9740
 
9741
- var _proto = StaticRouter.prototype;
9742
-
9743
- _proto.navigateTo = function navigateTo(location, action) {
9744
- var _this$props = this.props,
9745
- _this$props$basename = _this$props.basename,
9746
- basename = _this$props$basename === void 0 ? "" : _this$props$basename,
9747
- _this$props$context = _this$props.context,
9748
- context = _this$props$context === void 0 ? {} : _this$props$context;
9749
- context.action = action;
9750
- context.location = addBasename(basename, Object(esm_history["b" /* createLocation */])(location));
9751
- context.url = createURL(context.location);
9752
  };
9753
 
9754
- _proto.render = function render() {
9755
- var _this$props2 = this.props,
9756
- _this$props2$basename = _this$props2.basename,
9757
- basename = _this$props2$basename === void 0 ? "" : _this$props2$basename,
9758
- _this$props2$context = _this$props2.context,
9759
- context = _this$props2$context === void 0 ? {} : _this$props2$context,
9760
- _this$props2$location = _this$props2.location,
9761
- location = _this$props2$location === void 0 ? "/" : _this$props2$location,
9762
- rest = Object(objectWithoutPropertiesLoose["a" /* default */])(_this$props2, ["basename", "context", "location"]);
9763
 
9764
- var history = {
9765
- createHref: function createHref(path) {
9766
- return addLeadingSlash(basename + createURL(path));
9767
- },
9768
- action: "POP",
9769
- location: stripBasename(basename, Object(esm_history["b" /* createLocation */])(location)),
9770
- push: this.handlePush,
9771
- replace: this.handleReplace,
9772
- go: staticHandler("go"),
9773
- goBack: staticHandler("goBack"),
9774
- goForward: staticHandler("goForward"),
9775
- listen: this.handleListen,
9776
- block: this.handleBlock
9777
- };
9778
- return external_React_default.a.createElement(react_router_Router, Object(esm_extends["a" /* default */])({}, rest, {
9779
- history: history,
9780
- staticContext: context
9781
- }));
9782
- };
9783
 
9784
- return StaticRouter;
9785
- }(external_React_default.a.Component);
9786
 
9787
- if (false) {}
9788
 
9789
- /**
9790
- * The public API for rendering the first <Route> that matches.
9791
- */
9792
 
9793
- var react_router_Switch =
9794
- /*#__PURE__*/
9795
- function (_React$Component) {
9796
- Object(inheritsLoose["a" /* default */])(Switch, _React$Component);
9797
 
9798
- function Switch() {
9799
- return _React$Component.apply(this, arguments) || this;
9800
- }
 
 
 
 
 
9801
 
9802
- var _proto = Switch.prototype;
 
 
 
 
 
 
 
 
 
9803
 
9804
- _proto.render = function render() {
9805
- var _this = this;
9806
 
9807
- return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
9808
- !context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
9809
- var location = _this.props.location || context.location;
9810
- var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()
9811
- // here because toArray adds keys to all child elements and we do not want
9812
- // to trigger an unmount/remount for two <Route>s that render the same
9813
- // component at different URLs.
 
 
9814
 
9815
- external_React_default.a.Children.forEach(_this.props.children, function (child) {
9816
- if (match == null && external_React_default.a.isValidElement(child)) {
9817
- element = child;
9818
- var path = child.props.path || child.props.from;
9819
- match = path ? matchPath(location.pathname, Object(esm_extends["a" /* default */])({}, child.props, {
9820
- path: path
9821
- })) : context.match;
9822
- }
9823
  });
9824
- return match ? external_React_default.a.cloneElement(element, {
9825
- location: location,
9826
- computedMatch: match
9827
- }) : null;
9828
- });
9829
  };
9830
 
9831
- return Switch;
9832
- }(external_React_default.a.Component);
9833
 
9834
- if (false) {}
 
 
 
 
 
 
 
 
 
 
 
9835
 
9836
- /**
9837
- * A public higher-order component to access the imperative API
9838
- */
 
 
9839
 
9840
- function withRouter(Component) {
9841
- var displayName = "withRouter(" + (Component.displayName || Component.name) + ")";
9842
 
9843
- var C = function C(props) {
9844
- var wrappedComponentRef = props.wrappedComponentRef,
9845
- remainingProps = Object(objectWithoutPropertiesLoose["a" /* default */])(props, ["wrappedComponentRef"]);
9846
 
9847
- return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
9848
- !context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
9849
- return external_React_default.a.createElement(Component, Object(esm_extends["a" /* default */])({}, remainingProps, context, {
9850
- ref: wrappedComponentRef
9851
- }));
9852
- });
9853
- };
9854
 
9855
- C.displayName = displayName;
9856
- C.WrappedComponent = Component;
 
 
 
9857
 
9858
- if (false) {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9859
 
9860
- return hoist_non_react_statics_cjs_default()(C, Component);
9861
- }
 
 
 
 
 
 
9862
 
9863
- var useContext = external_React_default.a.useContext;
9864
- function useHistory() {
9865
- if (false) {}
9866
 
9867
- return useContext(historyContext);
9868
- }
9869
- function useLocation() {
9870
- if (false) {}
9871
 
9872
- return useContext(react_router_context).location;
9873
- }
9874
- function useParams() {
9875
- if (false) {}
9876
-
9877
- var match = useContext(react_router_context).match;
9878
- return match ? match.params : {};
9879
- }
9880
- function useRouteMatch(path) {
9881
- if (false) {}
9882
-
9883
- var location = useLocation();
9884
- var match = useContext(react_router_context).match;
9885
- return path ? matchPath(location.pathname, path) : match;
9886
- }
9887
-
9888
- if (false) { var secondaryBuildName, initialBuildName, buildNames, react_router_key, global; }
9889
 
 
 
 
9890
 
9891
- //# sourceMappingURL=react-router.js.map
 
 
 
 
 
 
 
 
9892
 
9893
- // EXTERNAL MODULE: external "lodash"
9894
- var external_lodash_ = __webpack_require__(5);
 
 
 
 
 
 
 
9895
 
9896
- // EXTERNAL MODULE: ./node_modules/qs/lib/index.js
9897
- var lib = __webpack_require__(162);
 
9898
 
9899
- // EXTERNAL MODULE: external ["wc","components"]
9900
- var external_wc_components_ = __webpack_require__(145);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9901
 
9902
- // EXTERNAL MODULE: external ["wc","navigation"]
9903
- var external_wc_navigation_ = __webpack_require__(50);
 
 
 
 
 
 
 
 
9904
 
9905
- // EXTERNAL MODULE: ./client/wc-admin-settings/index.js
9906
- var wc_admin_settings = __webpack_require__(85);
 
 
 
 
9907
 
9908
- // EXTERNAL MODULE: external ["wc","data"]
9909
- var external_wc_data_ = __webpack_require__(59);
 
9910
 
9911
- // EXTERNAL MODULE: external ["wc","tracks"]
9912
- var external_wc_tracks_ = __webpack_require__(92);
 
 
 
9913
 
9914
- // EXTERNAL MODULE: external ["wc","notices"]
9915
- var external_wc_notices_ = __webpack_require__(421);
 
 
 
9916
 
9917
- // EXTERNAL MODULE: ./client/layout/style.scss
9918
- var layout_style = __webpack_require__(422);
9919
 
9920
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
9921
- var es_array_concat = __webpack_require__(66);
 
 
 
 
 
 
 
 
9922
 
9923
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
9924
- var es_string_match = __webpack_require__(203);
9925
 
9926
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js
9927
- var es_string_split = __webpack_require__(177);
 
 
9928
 
9929
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
9930
- var es_object_assign = __webpack_require__(250);
 
 
9931
 
9932
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.from.js
9933
- var es_array_from = __webpack_require__(283);
 
 
 
 
 
 
9934
 
9935
- // EXTERNAL MODULE: external ["wp","hooks"]
9936
- var external_wp_hooks_ = __webpack_require__(141);
 
 
 
 
 
 
 
 
 
 
9937
 
9938
- // EXTERNAL MODULE: external ["wp","i18n"]
9939
- var external_wp_i18n_ = __webpack_require__(2);
9940
 
9941
- // EXTERNAL MODULE: ./client/analytics/report/get-reports.js
9942
- var get_reports = __webpack_require__(277);
 
 
 
 
 
 
 
 
 
 
 
 
9943
 
9944
- // EXTERNAL MODULE: ./client/dashboard/utils.js
9945
- var utils = __webpack_require__(231);
 
9946
 
9947
- // CONCATENATED MODULE: ./client/layout/controller.js
 
9948
 
 
 
 
 
 
 
 
 
9949
 
 
 
 
 
 
 
 
9950
 
 
 
 
 
 
 
 
9951
 
 
 
 
 
 
 
 
 
 
9952
 
 
 
 
 
9953
 
 
 
9954
 
 
 
 
 
9955
 
9956
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
 
9957
 
9958
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
 
 
 
9959
 
 
 
 
 
 
9960
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9961
 
9962
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9963
 
 
 
 
9964
 
 
 
 
 
 
9965
 
 
 
 
 
9966
 
 
 
 
 
9967
 
 
 
 
9968
 
 
 
 
 
 
 
 
9969
 
 
 
 
 
 
 
9970
 
 
 
 
 
 
 
 
9971
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9972
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9973
 
 
 
 
 
 
 
9974
 
 
 
9975
 
 
9976
 
9977
- /**
9978
- * External dependencies
9979
- */
9980
-
9981
-
9982
-
9983
-
9984
-
9985
-
9986
-
9987
-
9988
- /**
9989
- * Internal dependencies
9990
- */
9991
 
 
9992
 
 
 
 
 
 
 
 
 
 
 
 
 
9993
 
9994
- var AnalyticsReport = Object(external_wp_element_["lazy"])(function () {
9995
- return __webpack_require__.e(/* import() | analytics-report */ 9).then(__webpack_require__.bind(null, 691));
9996
- });
9997
- var AnalyticsSettings = Object(external_wp_element_["lazy"])(function () {
9998
- return __webpack_require__.e(/* import() | analytics-settings */ 20).then(__webpack_require__.bind(null, 711));
9999
- });
10000
- var Dashboard = Object(external_wp_element_["lazy"])(function () {
10001
- return __webpack_require__.e(/* import() | dashboard */ 28).then(__webpack_require__.bind(null, 692));
10002
- });
10003
- var Homescreen = Object(external_wp_element_["lazy"])(function () {
10004
- return Promise.all(/* import() | homescreen */[__webpack_require__.e(1), __webpack_require__.e(3), __webpack_require__.e(52), __webpack_require__.e(4), __webpack_require__.e(32)]).then(__webpack_require__.bind(null, 708));
10005
- });
10006
- var MarketingOverview = Object(external_wp_element_["lazy"])(function () {
10007
- return Promise.all(/* import() | marketing-overview */[__webpack_require__.e(3), __webpack_require__.e(36)]).then(__webpack_require__.bind(null, 712));
10008
- });
10009
- var ProfileWizard = Object(external_wp_element_["lazy"])(function () {
10010
- return Promise.all(/* import() | profile-wizard */[__webpack_require__.e(53), __webpack_require__.e(46)]).then(__webpack_require__.bind(null, 709));
10011
- });
10012
- var SettingsGroup = Object(external_wp_element_["lazy"])(function () {
10013
- return Promise.all(/* import() | profile-wizard */[__webpack_require__.e(53), __webpack_require__.e(46)]).then(__webpack_require__.bind(null, 704));
10014
- });
10015
- var PAGES_FILTER = 'woocommerce_admin_pages_list';
10016
- var controller_getPages = function getPages() {
10017
- var pages = [];
10018
- var initialBreadcrumbs = [['', wcSettings.woocommerceTranslation]];
10019
- pages.push({
10020
- container: Homescreen,
10021
- path: '/',
10022
- breadcrumbs: [].concat(initialBreadcrumbs, [Object(external_wp_i18n_["__"])('Home', 'woocommerce-admin')]),
10023
- wpOpenMenu: 'toplevel_page_woocommerce',
10024
- navArgs: {
10025
- id: 'woocommerce-home'
10026
- },
10027
- capability: 'manage_woocommerce'
10028
- });
10029
 
10030
- if (window.wcAdminFeatures.analytics) {
10031
- pages.push({
10032
- container: Dashboard,
10033
- path: '/analytics/overview',
10034
- breadcrumbs: [].concat(initialBreadcrumbs, [['/analytics/overview', Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], Object(external_wp_i18n_["__"])('Overview', 'woocommerce-admin')]),
10035
- wpOpenMenu: 'toplevel_page_wc-admin-path--analytics-overview',
10036
- navArgs: {
10037
- id: 'woocommerce-analytics-overview'
10038
- },
10039
- capability: 'view_woocommerce_reports'
10040
- });
10041
- pages.push({
10042
- container: AnalyticsSettings,
10043
- path: '/analytics/settings',
10044
- breadcrumbs: [].concat(initialBreadcrumbs, [['/analytics/revenue', Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], Object(external_wp_i18n_["__"])('Settings', 'woocommerce-admin')]),
10045
- wpOpenMenu: 'toplevel_page_wc-admin-path--analytics-overview',
10046
- navArgs: {
10047
- id: 'woocommerce-analytics-settings'
10048
- },
10049
- capability: 'view_woocommerce_reports'
10050
- });
10051
- pages.push({
10052
- container: AnalyticsReport,
10053
- path: '/customers',
10054
- breadcrumbs: [].concat(initialBreadcrumbs, [Object(external_wp_i18n_["__"])('Customers', 'woocommerce-admin')]),
10055
- wpOpenMenu: 'toplevel_page_woocommerce',
10056
- navArgs: {
10057
- id: 'woocommerce-analytics-customers'
10058
- },
10059
- capability: 'view_woocommerce_reports'
10060
- });
10061
- pages.push({
10062
- container: AnalyticsReport,
10063
- path: '/analytics/:report',
10064
- breadcrumbs: function breadcrumbs(_ref) {
10065
- var match = _ref.match;
10066
- var report = Object(external_lodash_["find"])(Object(get_reports["a" /* default */])(), {
10067
- report: match.params.report
10068
- });
10069
 
10070
- if (!report) {
10071
- return [];
10072
- }
10073
 
10074
- return [].concat(initialBreadcrumbs, [['/analytics/revenue', Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], report.title]);
10075
- },
10076
- wpOpenMenu: 'toplevel_page_wc-admin-path--analytics-overview',
10077
- capability: 'view_woocommerce_reports'
10078
  });
10079
  }
10080
 
10081
- if (window.wcAdminFeatures.marketing) {
10082
- pages.push({
10083
- container: MarketingOverview,
10084
- path: '/marketing',
10085
- breadcrumbs: [].concat(initialBreadcrumbs, [['/marketing', Object(external_wp_i18n_["__"])('Marketing', 'woocommerce-admin')], Object(external_wp_i18n_["__"])('Overview', 'woocommerce-admin')]),
10086
- wpOpenMenu: 'toplevel_page_woocommerce-marketing',
10087
- navArgs: {
10088
- id: 'woocommerce-marketing-overview'
10089
- },
10090
- capability: 'view_woocommerce_reports'
10091
- });
10092
- }
 
 
 
 
 
 
 
 
 
 
 
10093
 
10094
- if (window.wcAdminFeatures.onboarding) {
10095
- pages.push({
10096
- container: ProfileWizard,
10097
- path: '/setup-wizard',
10098
- breadcrumbs: [].concat(initialBreadcrumbs, [['/setup-wizard', Object(external_wp_i18n_["__"])('Setup Wizard', 'woocommerce-admin')]]),
10099
- capability: 'manage_woocommerce'
10100
- });
10101
- }
10102
 
10103
- if (window.wcAdminFeatures.settings) {
10104
- pages.push({
10105
- container: SettingsGroup,
10106
- path: '/settings/:page',
10107
- breadcrumbs: function breadcrumbs(_ref2) {
10108
- var match = _ref2.match;
10109
- // @todo This might need to be refactored to retreive groups via data store.
10110
- var settingsPages = Object(wc_admin_settings["g" /* getSetting */])('settingsPages');
10111
- var page = settingsPages[match.params.page];
10112
 
10113
- if (!page) {
10114
- return [];
10115
- }
10116
 
10117
- return [].concat(initialBreadcrumbs, [[settingsPages.general ? '/settings/general' : "/settings/".concat(Object.keys(settingsPages)[0]), Object(external_wp_i18n_["__"])('Settings', 'woocommerce-admin')], page]);
10118
- },
10119
- wpOpenMenu: 'toplevel_page_woocommerce',
10120
- capability: 'manage_woocommerce'
10121
- });
10122
- }
10123
 
10124
- return Object(external_wp_hooks_["applyFilters"])(PAGES_FILTER, pages);
10125
- };
10126
- var controller_Controller = /*#__PURE__*/function (_Component) {
10127
- inherits_default()(Controller, _Component);
 
 
10128
 
10129
- var _super = _createSuper(Controller);
 
10130
 
10131
- function Controller() {
10132
- classCallCheck_default()(this, Controller);
10133
 
10134
- return _super.apply(this, arguments);
10135
  }
10136
 
10137
- createClass_default()(Controller, [{
10138
- key: "componentDidMount",
10139
- value: function componentDidMount() {
10140
- window.document.documentElement.scrollTop = 0;
10141
- window.document.body.classList.remove('woocommerce-admin-is-loading');
10142
- }
10143
- }, {
10144
- key: "componentDidUpdate",
10145
- value: function componentDidUpdate(prevProps) {
10146
- var prevBaseQuery = Object(external_lodash_["omit"])(prevProps.query, 'chartType', 'filter', 'paged');
10147
- var baseQuery = Object(external_lodash_["omit"])(this.props.query, 'chartType', 'filter', 'paged');
10148
 
10149
- if (prevProps.query.paged > 1 && !Object(external_lodash_["isEqual"])(prevBaseQuery, baseQuery)) {
10150
- Object(external_wc_navigation_["getHistory"])().replace(Object(external_wc_navigation_["getNewPath"])({
10151
- paged: 1
10152
- }));
10153
- }
10154
-
10155
- if (prevProps.match.url !== this.props.match.url) {
10156
- window.document.documentElement.scrollTop = 0;
10157
- }
10158
- }
10159
- }, {
10160
- key: "render",
10161
- value: function render() {
10162
- var _this$props = this.props,
10163
- page = _this$props.page,
10164
- match = _this$props.match,
10165
- query = _this$props.query;
10166
- var url = match.url,
10167
- params = match.params;
10168
- window.wpNavMenuUrlUpdate(query);
10169
- window.wpNavMenuClassChange(page, url);
10170
- return Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
10171
- fallback: Object(external_wp_element_["createElement"])(external_wc_components_["Spinner"], null)
10172
- }, Object(external_wp_element_["createElement"])(page.container, {
10173
- params: params,
10174
- path: url,
10175
- pathMatch: page.path,
10176
- query: query
10177
- }));
10178
- }
10179
- }]);
10180
-
10181
- return Controller;
10182
- }(external_wp_element_["Component"]);
10183
- /**
10184
- * Update an anchor's link in sidebar to include persisted queries. Leave excluded screens
10185
- * as is.
10186
- *
10187
- * @param {HTMLElement} item - Sidebar anchor link.
10188
- * @param {Object} nextQuery - A query object to be added to updated hrefs.
10189
- * @param {Array} excludedScreens - wc-admin screens to avoid updating.
10190
- */
10191
-
10192
- function updateLinkHref(item, nextQuery, excludedScreens) {
10193
- if (Object(utils["f" /* isWCAdmin */])(item.href)) {
10194
- var search = Object(external_lodash_["last"])(item.href.split('?'));
10195
- var query = Object(lib["parse"])(search);
10196
- var path = query.path || 'homescreen';
10197
- var screen = Object(external_wc_navigation_["getScreenFromPath"])(path);
10198
- var isExcludedScreen = excludedScreens.includes(screen);
10199
- var href = 'admin.php?' + Object(lib["stringify"])(Object.assign(query, isExcludedScreen ? {} : nextQuery)); // Replace the href so you can see the url on hover.
10200
 
10201
- item.href = href;
 
 
 
 
 
 
 
 
 
 
 
 
 
10202
 
10203
- item.onclick = function (e) {
10204
- e.preventDefault();
10205
- Object(external_wc_navigation_["getHistory"])().push(href);
10206
- };
10207
- }
10208
- } // Update's wc-admin links in wp-admin menu
10209
 
10210
- window.wpNavMenuUrlUpdate = function (query) {
10211
- var nextQuery = Object(external_wc_navigation_["getPersistedQuery"])(query);
10212
- var excludedScreens = Object(external_wc_navigation_["getQueryExcludedScreens"])();
10213
- Array.from(document.querySelectorAll('#adminmenu a')).forEach(function (item) {
10214
- return updateLinkHref(item, nextQuery, excludedScreens);
10215
- });
10216
- }; // When the route changes, we need to update wp-admin's menu with the correct section & current link
10217
 
 
10218
 
10219
- window.wpNavMenuClassChange = function (page, url) {
10220
- Array.from(document.getElementsByClassName('current')).forEach(function (item) {
10221
- item.classList.remove('current');
 
 
10222
  });
10223
- var submenu = Array.from(document.querySelectorAll('.wp-has-current-submenu'));
10224
- submenu.forEach(function (element) {
10225
- element.classList.remove('wp-has-current-submenu');
10226
- element.classList.remove('wp-menu-open');
10227
- element.classList.remove('selected');
10228
- element.classList.add('wp-not-current-submenu');
10229
- element.classList.add('menu-top');
10230
  });
10231
- var pageUrl = url === '/' ? 'admin.php?page=wc-admin' : 'admin.php?page=wc-admin&path=' + encodeURIComponent(url);
10232
- var currentItemsSelector = url === '/' ? "li > a[href$=\"".concat(pageUrl, "\"], li > a[href*=\"").concat(pageUrl, "?\"]") : "li > a[href*=\"".concat(pageUrl, "\"]");
10233
- var currentItems = document.querySelectorAll(currentItemsSelector);
10234
- Array.from(currentItems).forEach(function (item) {
10235
- item.parentElement.classList.add('current');
10236
  });
 
10237
 
10238
- if (page.wpOpenMenu) {
10239
- var currentMenu = document.querySelector('#' + page.wpOpenMenu);
10240
-
10241
- if (currentMenu) {
10242
- currentMenu.classList.remove('wp-not-current-submenu');
10243
- currentMenu.classList.add('wp-has-current-submenu');
10244
- currentMenu.classList.add('wp-menu-open');
10245
- currentMenu.classList.add('current');
10246
- }
10247
- }
10248
-
10249
- var wpWrap = document.querySelector('#wpwrap');
10250
- wpWrap.classList.remove('wp-responsive-open');
10251
- };
10252
- // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js
10253
- var web_url = __webpack_require__(287);
10254
-
10255
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js
10256
- var es_array_slice = __webpack_require__(187);
10257
-
10258
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.join.js
10259
- var es_array_join = __webpack_require__(139);
10260
-
10261
- // EXTERNAL MODULE: external ["wp","components"]
10262
- var external_wp_components_ = __webpack_require__(4);
10263
-
10264
- // EXTERNAL MODULE: ./node_modules/classnames/index.js
10265
- var classnames = __webpack_require__(15);
10266
- var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
10267
-
10268
- // EXTERNAL MODULE: external ["wp","htmlEntities"]
10269
- var external_wp_htmlEntities_ = __webpack_require__(132);
10270
-
10271
- // EXTERNAL MODULE: ./packages/experimental/build-module/index.js
10272
- var build_module = __webpack_require__(105);
10273
-
10274
- // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
10275
- var build_module_icon = __webpack_require__(426);
10276
-
10277
- // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
10278
- var chevron_left = __webpack_require__(597);
10279
-
10280
- // EXTERNAL MODULE: external ["wp","keycodes"]
10281
- var external_wp_keycodes_ = __webpack_require__(126);
10282
-
10283
- // EXTERNAL MODULE: ./client/header/style.scss
10284
- var header_style = __webpack_require__(423);
10285
 
10286
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
10287
- var slicedToArray = __webpack_require__(43);
10288
- var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10289
 
10290
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
10291
- var es_function_name = __webpack_require__(129);
 
 
10292
 
10293
- // EXTERNAL MODULE: external ["wp","primitives"]
10294
- var external_wp_primitives_ = __webpack_require__(28);
 
 
 
 
 
 
 
 
 
 
 
 
 
10295
 
10296
- // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/inbox.js
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10297
 
 
 
 
 
10298
 
10299
- /**
10300
- * WordPress dependencies
10301
- */
 
10302
 
10303
- var inbox_inbox = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
10304
- xmlns: "http://www.w3.org/2000/svg",
10305
- viewBox: "0 0 24 24"
10306
- }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
10307
- fillRule: "evenodd",
10308
- d: "M6 5.5h12a.5.5 0 01.5.5v7H14a2 2 0 11-4 0H5.5V6a.5.5 0 01.5-.5zm-.5 9V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5v-3.5h-3.337a3.5 3.5 0 01-6.326 0H5.5zM4 13V6a2 2 0 012-2h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2v-5z",
10309
- clipRule: "evenodd"
10310
- }));
10311
- /* harmony default export */ var library_inbox = (inbox_inbox);
10312
- //# sourceMappingURL=inbox.js.map
10313
- // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/help.js
10314
 
 
 
 
10315
 
10316
- /**
10317
- * WordPress dependencies
10318
- */
 
 
 
 
 
 
 
 
 
10319
 
10320
- var help_help = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
10321
- xmlns: "http://www.w3.org/2000/svg",
10322
- viewBox: "0 0 24 24"
10323
- }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
10324
- d: "M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"
10325
- }));
10326
- /* harmony default export */ var library_help = (help_help);
10327
- //# sourceMappingURL=help.js.map
10328
- // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
10329
- var external = __webpack_require__(596);
10330
 
10331
- // EXTERNAL MODULE: ./client/header/activity-panel/style.scss
10332
- var activity_panel_style = __webpack_require__(424);
10333
 
10334
- // EXTERNAL MODULE: ./client/inbox-panel/utils.js
10335
- var inbox_panel_utils = __webpack_require__(332);
 
10336
 
10337
- // CONCATENATED MODULE: ./client/header/activity-panel/unread-indicators.js
10338
- /**
10339
- * External dependencies
10340
- */
10341
 
 
 
 
10342
 
10343
- /**
10344
- * Internal dependencies
10345
- */
10346
 
 
 
10347
 
10348
- var UNREAD_NOTES_QUERY = {
10349
- page: 1,
10350
- per_page: external_wc_data_["QUERY_DEFAULTS"].pageSize,
10351
- status: 'unactioned',
10352
- type: external_wc_data_["QUERY_DEFAULTS"].noteTypes,
10353
- orderby: 'date',
10354
- order: 'desc'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10355
  };
10356
- function getUnreadNotes(select) {
10357
- var _select = select(external_wc_data_["NOTES_STORE_NAME"]),
10358
- getNotes = _select.getNotes,
10359
- getNotesError = _select.getNotesError,
10360
- isResolving = _select.isResolving;
10361
-
10362
- var _select2 = select(external_wc_data_["USER_STORE_NAME"]),
10363
- getCurrentUser = _select2.getCurrentUser;
10364
-
10365
- var userData = getCurrentUser();
10366
- var lastRead = parseInt(userData && userData.woocommerce_meta && userData.woocommerce_meta.activity_panel_inbox_last_read, 10);
10367
 
10368
- if (!lastRead) {
10369
- return null;
10370
- }
10371
-
10372
- getNotes(UNREAD_NOTES_QUERY);
10373
- var isError = Boolean(getNotesError('getNotes', [UNREAD_NOTES_QUERY]));
10374
- var isRequesting = isResolving('getNotes', [UNREAD_NOTES_QUERY]);
10375
 
10376
- if (isError || isRequesting) {
10377
- return null;
 
10378
  }
10379
 
10380
- var latestNotes = getNotes(UNREAD_NOTES_QUERY);
10381
- var unreadNotesCount = Object(inbox_panel_utils["a" /* getUnreadNotesCount */])(latestNotes, lastRead);
10382
- return unreadNotesCount > 0;
10383
- }
10384
- function getLowStockCount() {
10385
- return Object(wc_admin_settings["g" /* getSetting */])('lowStockCount', 0);
10386
  }
10387
- // CONCATENATED MODULE: ./client/header/activity-panel/tab/index.js
10388
-
10389
-
10390
-
10391
- /**
10392
- * External dependencies
10393
- */
10394
 
 
 
 
 
 
 
 
 
10395
 
 
 
10396
 
10397
- var tab_Tab = function Tab(_ref) {
10398
- var icon = _ref.icon,
10399
- title = _ref.title,
10400
- name = _ref.name,
10401
- unread = _ref.unread,
10402
- selected = _ref.selected,
10403
- isPanelOpen = _ref.isPanelOpen,
10404
- onTabClick = _ref.onTabClick;
10405
- var className = classnames_default()('woocommerce-layout__activity-panel-tab', {
10406
- 'is-active': isPanelOpen && selected,
10407
- 'has-unread': unread
10408
- });
10409
- var tabKey = "activity-panel-tab-".concat(name);
10410
- return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
10411
- role: "tab",
10412
- className: className,
10413
- "aria-selected": selected,
10414
- "aria-controls": "activity-panel-".concat(name),
10415
- key: tabKey,
10416
- id: tabKey,
10417
- onClick: function onClick() {
10418
- onTabClick(name);
10419
- }
10420
- }, icon, title, ' ', unread && Object(external_wp_element_["createElement"])("span", {
10421
- className: "screen-reader-text"
10422
- }, Object(external_wp_i18n_["__"])('unread activity', 'woocommerce-admin')));
10423
- };
10424
- // CONCATENATED MODULE: ./client/header/activity-panel/tabs/index.js
10425
 
 
 
10426
 
 
 
10427
 
 
 
10428
 
 
 
 
10429
 
 
 
 
10430
 
10431
- /**
10432
- * External dependencies
10433
- */
 
 
 
 
 
 
 
 
 
 
10434
 
 
 
 
10435
 
10436
 
10437
- /**
10438
- * Internal dependencies
10439
- */
10440
 
 
 
 
 
 
 
 
10441
 
10442
- var tabs_Tabs = function Tabs(_ref) {
10443
- var tabs = _ref.tabs,
10444
- _onTabClick = _ref.onTabClick,
10445
- selectedTabName = _ref.selectedTab,
10446
- _ref$tabOpen = _ref.tabOpen,
10447
- tabOpen = _ref$tabOpen === void 0 ? false : _ref$tabOpen;
 
10448
 
10449
- var _useState = Object(external_wp_element_["useState"])({
10450
- tabOpen: tabOpen,
10451
- currentTab: selectedTabName
10452
- }),
10453
- _useState2 = slicedToArray_default()(_useState, 2),
10454
- _useState2$ = _useState2[0],
10455
- tabIsOpenState = _useState2$.tabOpen,
10456
- currentTab = _useState2$.currentTab,
10457
- setTabState = _useState2[1]; // Keep state synced with props
10458
 
10459
 
10460
- Object(external_wp_element_["useEffect"])(function () {
10461
- setTabState({
10462
- tabOpen: tabOpen,
10463
- currentTab: selectedTabName
10464
- });
10465
- }, [tabOpen, selectedTabName]);
10466
- return Object(external_wp_element_["createElement"])(external_wp_components_["NavigableMenu"], {
10467
- role: "tablist",
10468
- orientation: "horizontal",
10469
- className: "woocommerce-layout__activity-panel-tabs"
10470
- }, tabs && tabs.map(function (tab, i) {
10471
- if (tab.component) {
10472
- var Comp = tab.component,
10473
- options = tab.options;
10474
- return Object(external_wp_element_["createElement"])(Comp, extends_default()({
10475
- key: i
10476
- }, options));
10477
- }
10478
-
10479
- return Object(external_wp_element_["createElement"])(tab_Tab, extends_default()({
10480
- key: i,
10481
- index: i,
10482
- isPanelOpen: tabIsOpenState,
10483
- selected: currentTab === tab.name
10484
- }, tab, {
10485
- onTabClick: function onTabClick() {
10486
- var isTabOpen = currentTab === tab.name || currentTab === '' ? !tabIsOpenState : true; // If a panel is being opened, or if an existing panel is already open and a different one is being opened, record a track.
10487
-
10488
- if (!isTabOpen || currentTab !== tab.name) {
10489
- Object(external_wc_tracks_["recordEvent"])('activity_panel_open', {
10490
- tab: tab.name
10491
- });
10492
- }
10493
 
10494
- setTabState({
10495
- tabOpen: isTabOpen,
10496
- currentTab: tab.name
10497
- });
10498
-
10499
- _onTabClick(tab, isTabOpen);
10500
- }
10501
- }));
10502
- }));
10503
- };
10504
- // CONCATENATED MODULE: ./client/header/activity-panel/setup-progress.js
10505
-
10506
- var setup_progress_SetupProgress = function SetupProgress() {
10507
- return Object(external_wp_element_["createElement"])("svg", {
10508
- className: "woocommerce-layout__activity-panel-tab-icon setup-progress",
10509
- width: "18",
10510
- height: "18",
10511
- viewBox: "0 0 24 24",
10512
- fill: "none",
10513
- xmlns: "http://www.w3.org/2000/svg"
10514
- }, Object(external_wp_element_["createElement"])("path", {
10515
- d: "M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z",
10516
- stroke: "#DCDCDE",
10517
- strokeWidth: "2"
10518
- }), Object(external_wp_element_["createElement"])("path", {
10519
- d: "M4 12V12C4 16.4183 7.58172 20 12 20V20C16.4183 20 20 16.4183 20 12V12C20 7.58172 16.4183 4 12 4V4",
10520
- strokeWidth: "2",
10521
- strokeLinecap: "round"
10522
- }));
10523
- };
10524
- // CONCATENATED MODULE: ./client/header/activity-panel/display-options/icons/display.js
10525
 
 
 
 
 
 
 
 
10526
 
10527
- /**
10528
- * External dependencies
10529
- */
 
 
 
 
10530
 
10531
- var display_DisplayIcon = function DisplayIcon() {
10532
- return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("svg", {
10533
- className: "woocommerce-layout__activity-panel-tab-icon",
10534
- width: "24",
10535
- height: "24",
10536
- viewBox: "3 3 24 24",
10537
- fill: "none",
10538
- xmlns: "http://www.w3.org/2000/svg"
10539
- }, Object(external_wp_element_["createElement"])("path", {
10540
- d: "M13.8053 15.3982C13.8053 15.7965 13.4867 16.1947 13.0089 16.1947H6.79646C6.55752 16.1947 6.39823 16.115 6.23894 15.9558C6.07965 15.7965 6 15.6372 6 15.3982V6.79646C6 6.63717 6.15929 6.39823 6.23894 6.23894C6.39823 6.07965 6.55752 6 6.79646 6H13.0089C13.4071 6 13.8053 6.31858 13.8053 6.79646V15.3982Z",
10541
- strokeWidth: "1.5",
10542
- strokeLinecap: "round",
10543
- strokeLinejoin: "round"
10544
- }), Object(external_wp_element_["createElement"])("path", {
10545
- d: "M23.9203 10.6195C23.9203 11.0177 23.6017 11.4159 23.1238 11.4159H16.9115C16.6725 11.4159 16.5132 11.3363 16.3539 11.177C16.1946 11.0177 16.115 10.8584 16.115 10.6195V6.79646C16.115 6.39823 16.4336 6 16.9115 6H23.1238C23.5221 6 23.9203 6.31858 23.9203 6.79646V10.6195Z",
10546
- strokeWidth: "1.5",
10547
- strokeLinecap: "round",
10548
- strokeLinejoin: "round"
10549
- }), Object(external_wp_element_["createElement"])("path", {
10550
- d: "M13.8053 23.2035C13.8053 23.4424 13.7257 23.6017 13.5664 23.761C13.4071 23.9203 13.2478 23.9999 13.0089 23.9999H6.79646C6.39823 23.9999 6 23.6813 6 23.2035V19.3804C6 19.1415 6.07965 18.9822 6.23894 18.8229C6.39823 18.6636 6.55752 18.584 6.79646 18.584H13.0089C13.4071 18.584 13.8053 18.9026 13.8053 19.3804V23.2035Z",
10551
- strokeWidth: "1.5",
10552
- strokeLinecap: "round",
10553
- strokeLinejoin: "round"
10554
- }), Object(external_wp_element_["createElement"])("path", {
10555
- d: "M16.9912 23.9999C16.7522 23.9999 16.5929 23.9202 16.4336 23.7609C16.2743 23.6016 16.1947 23.4423 16.1947 23.2034V14.6016C16.1947 14.3627 16.2743 14.2034 16.4336 14.0441C16.5929 13.8848 16.7522 13.8052 16.9912 13.8052H23.2036C23.4425 13.8052 23.6018 13.8848 23.7611 14.0441C23.9204 14.2034 24 14.3627 24 14.6016V23.2034C24 23.6016 23.6814 23.9999 23.2036 23.9999H16.9912Z",
10556
- strokeWidth: "1.5",
10557
- strokeLinecap: "round",
10558
- strokeLinejoin: "round"
10559
- })), Object(external_wp_i18n_["__"])('Display', 'woocommerce-admin'));
10560
- };
10561
- // CONCATENATED MODULE: ./client/header/activity-panel/display-options/icons/single-column.js
10562
-
10563
- var single_column_SingleColumnIcon = function SingleColumnIcon() {
10564
- return Object(external_wp_element_["createElement"])("svg", {
10565
- className: "woocommerce-layout__activity-panel-tab-icon",
10566
- width: "12",
10567
- height: "14",
10568
- viewBox: "0 0 12 14",
10569
- fill: "none",
10570
- xmlns: "http://www.w3.org/2000/svg"
10571
- }, Object(external_wp_element_["createElement"])("rect", {
10572
- x: "0.5",
10573
- y: "0.5",
10574
- width: "11",
10575
- height: "13",
10576
- strokeWidth: "1"
10577
- }));
10578
- };
10579
- // CONCATENATED MODULE: ./client/header/activity-panel/display-options/icons/two-columns.js
10580
-
10581
- var two_columns_TwoColumnsIcon = function TwoColumnsIcon() {
10582
- return Object(external_wp_element_["createElement"])("svg", {
10583
- className: "woocommerce-layout__activity-panel-tab-icon",
10584
- width: "18",
10585
- height: "14",
10586
- viewBox: "0 0 18 14",
10587
- fill: "none",
10588
- xmlns: "http://www.w3.org/2000/svg"
10589
- }, Object(external_wp_element_["createElement"])("rect", {
10590
- x: "0.5",
10591
- y: "0.5",
10592
- width: "7",
10593
- height: "13",
10594
- strokeWidth: "1"
10595
- }), Object(external_wp_element_["createElement"])("rect", {
10596
- x: "9.5",
10597
- y: "0.5",
10598
- width: "7",
10599
- height: "13",
10600
- strokeWidth: "1"
10601
- }));
10602
- };
10603
- // CONCATENATED MODULE: ./client/header/activity-panel/display-options/index.js
10604
 
 
 
 
 
 
 
 
 
10605
 
10606
- /**
10607
- * External dependencies
10608
- */
 
 
 
 
 
10609
 
 
 
 
 
 
 
10610
 
 
 
 
 
10611
 
 
 
 
 
 
 
10612
 
 
 
 
 
 
 
 
10613
 
10614
- /**
10615
- * Internal dependencies
10616
- */
 
 
 
 
 
 
 
 
10617
 
10618
 
 
 
10619
 
 
10620
 
10621
- var LAYOUTS = [{
10622
- value: 'single_column',
10623
- label: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(single_column_SingleColumnIcon, null), Object(external_wp_i18n_["__"])('Single column', 'woocommerce-admin'))
10624
- }, {
10625
- value: 'two_columns',
10626
- label: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(two_columns_TwoColumnsIcon, null), Object(external_wp_i18n_["__"])('Two columns', 'woocommerce-admin'))
10627
- }];
10628
- var display_options_DisplayOptions = function DisplayOptions() {
10629
- var defaultHomescreenLayout = Object(external_wp_data_["useSelect"])(function (select) {
10630
- var _select = select(external_wc_data_["OPTIONS_STORE_NAME"]),
10631
- getOption = _select.getOption;
10632
 
10633
- return getOption('woocommerce_default_homepage_layout') || 'single_column';
 
 
 
 
 
10634
  });
10635
-
10636
- var _useUserPreferences = Object(external_wc_data_["useUserPreferences"])(),
10637
- updateUserPreferences = _useUserPreferences.updateUserPreferences,
10638
- layout = _useUserPreferences.homepage_layout;
10639
-
10640
- return Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
10641
- icon: Object(external_wp_element_["createElement"])(display_DisplayIcon, null)
10642
- /* translators: button label text should, if possible, be under 16 characters. */
10643
- ,
10644
- label: Object(external_wp_i18n_["__"])('Display options', 'woocommerce-admin'),
10645
- toggleProps: {
10646
- className: 'woocommerce-layout__activity-panel-tab display-options',
10647
- onClick: function onClick() {
10648
- return Object(external_wc_tracks_["recordEvent"])('homescreen_display_click');
10649
- }
10650
- },
10651
- popoverProps: {
10652
- className: 'woocommerce-layout__activity-panel-popover'
10653
- }
10654
- }, function (_ref) {
10655
- var onClose = _ref.onClose;
10656
- return Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
10657
- className: "woocommerce-layout__homescreen-display-options",
10658
- label: Object(external_wp_i18n_["__"])('Layout', 'woocommerce-admin')
10659
- }, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItemsChoice"], {
10660
- choices: LAYOUTS,
10661
- onSelect: function onSelect(newLayout) {
10662
- updateUserPreferences({
10663
- homepage_layout: newLayout
10664
- });
10665
- onClose();
10666
- Object(external_wc_tracks_["recordEvent"])('homescreen_display_option', {
10667
- display_option: newLayout
10668
- });
10669
- },
10670
- value: layout || defaultHomescreenLayout
10671
  }));
10672
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
10673
  };
10674
- // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
10675
- var library_close = __webpack_require__(595);
10676
-
10677
- // EXTERNAL MODULE: ./client/header/activity-panel/highlight-tooltip/style.scss
10678
- var highlight_tooltip_style = __webpack_require__(425);
10679
-
10680
- // CONCATENATED MODULE: ./client/header/activity-panel/highlight-tooltip/index.js
10681
-
10682
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10683
 
10684
- /**
10685
- * External dependencies
10686
- */
10687
 
 
 
 
 
 
 
 
10688
 
 
 
 
10689
 
 
 
10690
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10691
 
 
 
 
10692
 
10693
- /**
10694
- * Internal dependencies
10695
- */
10696
 
 
 
 
 
 
 
 
10697
 
10698
- var SHOW_CLASS = 'highlight-tooltip__show';
10699
-
10700
- function HighlightTooltip(_ref) {
10701
- var title = _ref.title,
10702
- closeButtonText = _ref.closeButtonText,
10703
- content = _ref.content,
10704
- _ref$show = _ref.show,
10705
- show = _ref$show === void 0 ? true : _ref$show,
10706
- id = _ref.id,
10707
- onClose = _ref.onClose,
10708
- delay = _ref.delay,
10709
- _ref$onShow = _ref.onShow,
10710
- onShow = _ref$onShow === void 0 ? external_lodash_["noop"] : _ref$onShow,
10711
- _ref$useAnchor = _ref.useAnchor,
10712
- useAnchor = _ref$useAnchor === void 0 ? false : _ref$useAnchor;
10713
-
10714
- var _useState = Object(external_wp_element_["useState"])(delay > 0 ? null : show),
10715
- _useState2 = slicedToArray_default()(_useState, 2),
10716
- showHighlight = _useState2[0],
10717
- setShowHighlight = _useState2[1];
10718
-
10719
- var _useState3 = Object(external_wp_element_["useState"])(null),
10720
- _useState4 = slicedToArray_default()(_useState3, 2),
10721
- node = _useState4[0],
10722
- setNode = _useState4[1];
10723
-
10724
- var _useState5 = Object(external_wp_element_["useState"])(null),
10725
- _useState6 = slicedToArray_default()(_useState5, 2),
10726
- anchorRect = _useState6[0],
10727
- setAnchorRect = _useState6[1];
10728
-
10729
- Object(external_wp_element_["useEffect"])(function () {
10730
- var element = document.getElementById(id);
10731
- var container, parent;
10732
-
10733
- if (element && !node) {
10734
- // Add tooltip container
10735
- if (!useAnchor) {
10736
- parent = element.parentElement;
10737
- } else {
10738
- parent = document.createElement('div');
10739
- document.body.appendChild(parent);
10740
- }
10741
 
10742
- container = document.createElement('div');
10743
- container.classList.add('highlight-tooltip__container');
10744
- parent.appendChild(container);
10745
- setNode(container);
 
 
10746
  }
10747
 
10748
- var timeoutId = triggerShowTooltip(container);
10749
- return function () {
10750
- if (container) {
10751
- var parentElement = container.parentElement;
10752
- parentElement.removeChild(container);
10753
 
10754
- if (useAnchor) {
10755
- parentElement.remove();
10756
- }
10757
- }
10758
-
10759
- if (timeoutId) {
10760
- clearTimeout(timeoutId);
10761
- }
10762
- };
10763
- }, []);
10764
- Object(external_wp_element_["useEffect"])(function () {
10765
- if (!showHighlight && node) {
10766
- node.classList.remove(SHOW_CLASS);
10767
- }
10768
- }, [showHighlight]);
10769
- Object(external_wp_element_["useEffect"])(function () {
10770
- if (show !== showHighlight && showHighlight !== null && node) {
10771
- setShowHighlight(show);
10772
-
10773
- if (!show) {
10774
- node.classList.remove(SHOW_CLASS);
10775
- } else if (node) {
10776
- triggerShowTooltip(node);
10777
- }
10778
- }
10779
- }, [show]);
10780
- Object(external_wp_element_["useLayoutEffect"])(function () {
10781
- window.addEventListener('resize', updateSize);
10782
- return function () {
10783
- return window.removeEventListener('resize', updateSize);
10784
- };
10785
- }, []);
10786
-
10787
- function updateSize() {
10788
- if (useAnchor) {
10789
- var element = document.getElementById(id);
10790
- setAnchorRect(element.getBoundingClientRect());
10791
- }
10792
- }
10793
-
10794
- var triggerShowTooltip = function triggerShowTooltip(container) {
10795
- var timeoutId = null;
10796
-
10797
- if (delay > 0) {
10798
- timeoutId = setTimeout(function () {
10799
- timeoutId = null;
10800
- showTooltip(container);
10801
- }, delay);
10802
- } else if (!showHighlight) {
10803
- showTooltip(container);
10804
- }
10805
-
10806
- return timeoutId;
10807
- };
10808
-
10809
- var showTooltip = function showTooltip(container) {
10810
- var element = document.getElementById(id);
10811
-
10812
- if (element && useAnchor) {
10813
- setAnchorRect(element.getBoundingClientRect());
10814
- }
10815
-
10816
- if (container) {
10817
- container.classList.add(SHOW_CLASS);
10818
- }
10819
-
10820
- setShowHighlight(true);
10821
- onShow();
10822
- };
10823
-
10824
- var triggerClose = function triggerClose() {
10825
- setShowHighlight(false);
10826
-
10827
- if (onClose) {
10828
- onClose();
10829
- }
10830
- };
10831
-
10832
- if (!node) {
10833
- return null;
10834
- }
10835
-
10836
- return Object(external_wp_element_["createPortal"])(Object(external_wp_element_["createElement"])("div", {
10837
- className: "highlight-tooltip__portal"
10838
- }, showHighlight ? Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["IsolatedEventContainer"], {
10839
- className: "highlight-tooltip__overlay"
10840
- }), Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
10841
- className: "highlight-tooltip__popover",
10842
- noArrow: false,
10843
- anchorRect: anchorRect,
10844
- focusOnMount: "container"
10845
- }, Object(external_wp_element_["createElement"])(external_wp_components_["Card"], {
10846
- size: "medium"
10847
- }, Object(external_wp_element_["createElement"])(external_wp_components_["CardHeader"], null, title, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
10848
- isSmall: true,
10849
- onClick: triggerClose,
10850
- icon: library_close["a" /* default */]
10851
- })), Object(external_wp_element_["createElement"])(external_wp_components_["CardBody"], null, content || null), Object(external_wp_element_["createElement"])(external_wp_components_["CardFooter"], {
10852
- isBorderless: true
10853
- }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
10854
- size: "small",
10855
- isPrimary: true,
10856
- onClick: triggerClose
10857
- }, closeButtonText || Object(external_wp_i18n_["__"])('Close', 'woocommerce-admin')))))) : null), node);
10858
- }
10859
-
10860
- HighlightTooltip.propTypes = {
10861
- /**
10862
- * The id of the element it should highlight, should be unique per HighlightTooltip.
10863
- */
10864
- id: prop_types_default.a.string.isRequired,
10865
-
10866
- /**
10867
- * Title of the popup
10868
- */
10869
- title: prop_types_default.a.string.isRequired,
10870
-
10871
- /**
10872
- * Text of the close button.
10873
- */
10874
- closeButtonText: prop_types_default.a.string.isRequired,
10875
-
10876
- /**
10877
- * Content of the popup, can be either text or react element.
10878
- */
10879
- content: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.node]),
10880
-
10881
- /**
10882
- * If to show the popup, defaults to true.
10883
- */
10884
- show: prop_types_default.a.bool,
10885
-
10886
- /**
10887
- * Callback for when the user closes the popup.
10888
- */
10889
- onClose: prop_types_default.a.func,
10890
-
10891
- /**
10892
- * This will delay the popup from appearing by the number of ms.
10893
- */
10894
- delay: prop_types_default.a.number,
10895
-
10896
- /**
10897
- * A callback for when the tooltip is shown.
10898
- */
10899
- onShow: prop_types_default.a.func,
10900
 
10901
- /**
10902
- * useAnchor, will append the tooltip to the body tag, and make use of the anchorRect to display the tooltip.
10903
- * Defaults to false.
10904
- */
10905
- useAnchor: prop_types_default.a.bool
10906
- };
 
 
 
 
 
 
10907
 
10908
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find.js
10909
- var es_array_find = __webpack_require__(192);
10910
 
10911
- // EXTERNAL MODULE: external ["wp","dom"]
10912
- var external_wp_dom_ = __webpack_require__(262);
10913
 
10914
- // CONCATENATED MODULE: ./client/hooks/useFocusOnMount.js
 
10915
 
 
10916
 
10917
  /**
10918
- * This hook was directly copied from https://github.com/WordPress/gutenberg/blob/master/packages/compose/src/hooks/use-focus-on-mount/index.js
10919
- * to avoid its absence in older versions of WordPress.
10920
- *
10921
- * This can be removed once the minimum supported version of WordPress includes this hook.
10922
  */
 
 
 
 
 
10923
 
10924
  /**
10925
- * External dependencies
 
 
10926
  */
10927
-
 
 
 
 
 
 
 
 
 
 
 
10928
 
10929
  /**
10930
- * Hook used to focus the first tabbable element on mount.
10931
- *
10932
- * @param {boolean|string} focusOnMount Focus on mount mode.
10933
- * @return {Function} Ref callback.
10934
  *
10935
- * @example
10936
- * ```js
10937
- * import { useFocusOnMount } from '@wordpress/compose';
10938
- *
10939
- * const WithFocusOnMount = () => {
10940
- * const ref = useFocusOnMount()
10941
- * return (
10942
- * <div ref={ ref }>
10943
- * <Button />
10944
- * <Button />
10945
- * </div>
10946
- * );
10947
- * }
10948
- * ```
10949
  */
 
 
 
 
 
 
 
10950
 
10951
- function useFocusOnMount() {
10952
- var focusOnMount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'firstElement';
10953
- var focusOnMountRef = Object(external_wp_element_["useRef"])(focusOnMount);
10954
- Object(external_wp_element_["useEffect"])(function () {
10955
- focusOnMountRef.current = focusOnMount;
10956
- }, [focusOnMount]);
10957
- return Object(external_wp_element_["useCallback"])(function (node) {
10958
- if (!node || focusOnMountRef.current === false) {
10959
- return;
10960
- }
10961
 
10962
- if (node.contains(node.ownerDocument.activeElement)) {
10963
- return;
 
 
10964
  }
10965
 
10966
- var target = node;
10967
-
10968
- if (focusOnMountRef.current === 'firstElement') {
10969
- var firstTabbable = external_wp_dom_["focus"].tabbable.find(node)[0];
 
 
 
10970
 
10971
- if (firstTabbable) {
10972
- target = firstTabbable;
10973
- }
 
10974
  }
10975
 
10976
- target.focus();
10977
- }, []);
10978
- }
10979
- // CONCATENATED MODULE: ./client/hooks/useFocusOutside.js
10980
- /**
10981
- * External dependencies
10982
- */
10983
-
10984
-
10985
- /**
10986
- * Input types which are classified as button types, for use in considering
10987
- * whether element is a (focus-normalized) button.
10988
- *
10989
- * @type {string[]}
10990
- */
10991
-
10992
- var INPUT_BUTTON_TYPES = ['button', 'submit'];
10993
- /**
10994
- * @typedef {HTMLButtonElement | HTMLLinkElement | HTMLInputElement} FocusNormalizedButton
10995
- */
10996
- // Disable reason: Rule doesn't support predicate return types
10997
-
10998
- /* eslint-disable jsdoc/valid-types */
10999
-
11000
- /**
11001
- * Returns true if the given element is a button element subject to focus
11002
- * normalization, or false otherwise.
11003
- *
11004
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
11005
- *
11006
- * @param {EventTarget} eventTarget The target from a mouse or touch event.
11007
- *
11008
- * @return {eventTarget is FocusNormalizedButton} Whether element is a button.
11009
- */
11010
 
11011
- function isFocusNormalizedButton(eventTarget) {
11012
- if (!(eventTarget instanceof window.HTMLElement)) {
11013
- return false;
 
 
 
 
 
 
 
11014
  }
11015
 
11016
- switch (eventTarget.nodeName) {
11017
- case 'A':
11018
- case 'BUTTON':
11019
- return true;
11020
 
11021
- case 'INPUT':
11022
- return Object(external_lodash_["includes"])(INPUT_BUTTON_TYPES,
11023
- /** @type {HTMLInputElement} */
11024
- eventTarget.type);
11025
  }
11026
 
11027
- return false;
11028
  }
11029
- /* eslint-enable jsdoc/valid-types */
11030
 
11031
  /**
11032
- * @typedef {import('react').SyntheticEvent} SyntheticEvent
 
 
 
 
11033
  */
 
 
 
11034
 
11035
  /**
11036
- * @callback EventCallback
11037
- * @param {SyntheticEvent} event input related event.
 
 
11038
  */
 
 
 
 
 
11039
 
11040
  /**
11041
- * @typedef FocusOutsideReactElement
11042
- * @property {EventCallback} handleFocusOutside callback for a focus outside event.
 
 
11043
  */
 
 
 
 
 
11044
 
11045
  /**
11046
- * @typedef {import('react').MutableRefObject<FocusOutsideReactElement | undefined>} FocusOutsideRef
11047
  */
 
 
 
11048
 
11049
- /**
11050
- * @typedef {Object} FocusOutsideReturnValue
11051
- * @property {EventCallback} onFocus An event handler for focus events.
11052
- * @property {EventCallback} onBlur An event handler for blur events.
11053
- * @property {EventCallback} onMouseDown An event handler for mouse down events.
11054
- * @property {EventCallback} onMouseUp An event handler for mouse up events.
11055
- * @property {EventCallback} onTouchStart An event handler for touch start events.
11056
- * @property {EventCallback} onTouchEnd An event handler for touch end events.
11057
- */
11058
 
11059
- /**
11060
- * A react hook that can be used to check whether focus has moved outside the
11061
- * element the event handlers are bound to.
11062
- *
11063
- * @param {EventCallback} onFocusOutside A callback triggered when focus moves outside
11064
- * the element the event handlers are bound to.
11065
- *
11066
- * @return {FocusOutsideReturnValue} An object containing event handlers. Bind the event handlers
11067
- * to a wrapping element element to capture when focus moves
11068
- * outside that element.
11069
- */
11070
 
 
 
11071
 
11072
- function useFocusOutside(onFocusOutside) {
11073
- var currentOnFocusOutside = Object(external_wp_element_["useRef"])(onFocusOutside);
11074
- Object(external_wp_element_["useEffect"])(function () {
11075
- currentOnFocusOutside.current = onFocusOutside;
11076
- }, [onFocusOutside]);
11077
- var preventBlurCheck = Object(external_wp_element_["useRef"])(false);
11078
- /**
11079
- * @type {import('react').MutableRefObject<number | undefined>}
11080
- */
11081
 
11082
- var blurCheckTimeoutId = Object(external_wp_element_["useRef"])();
11083
- /**
11084
- * Cancel a blur check timeout.
11085
- */
11086
 
11087
- var cancelBlurCheck = Object(external_wp_element_["useCallback"])(function () {
11088
- clearTimeout(blurCheckTimeoutId.current);
11089
- }, []); // Cancel blur checks on unmount.
11090
 
11091
- Object(external_wp_element_["useEffect"])(function () {
11092
- return function () {
11093
- return cancelBlurCheck();
11094
- };
11095
- }, []); // Cancel a blur check if the callback or ref is no longer provided.
 
11096
 
11097
- Object(external_wp_element_["useEffect"])(function () {
11098
- if (!onFocusOutside) {
11099
- cancelBlurCheck();
11100
- }
11101
- }, [onFocusOutside, cancelBlurCheck]);
11102
- /**
11103
- * Handles a mousedown or mouseup event to respectively assign and
11104
- * unassign a flag for preventing blur check on button elements. Some
11105
- * browsers, namely Firefox and Safari, do not emit a focus event on
11106
- * button elements when clicked, while others do. The logic here
11107
- * intends to normalize this as treating click on buttons as focus.
11108
- *
11109
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
11110
- *
11111
- * @param {SyntheticEvent} event Event for mousedown or mouseup.
11112
- */
11113
 
11114
- var normalizeButtonFocus = Object(external_wp_element_["useCallback"])(function (event) {
11115
- var type = event.type,
11116
- target = event.target;
11117
- var isInteractionEnd = Object(external_lodash_["includes"])(['mouseup', 'touchend'], type);
11118
 
11119
- if (isInteractionEnd) {
11120
- preventBlurCheck.current = false;
11121
- } else if (isFocusNormalizedButton(target)) {
11122
- preventBlurCheck.current = true;
11123
- }
11124
- }, []);
11125
- /**
11126
- * A callback triggered when a blur event occurs on the element the handler
11127
- * is bound to.
11128
- *
11129
- * Calls the `onFocusOutside` callback in an immediate timeout if focus has
11130
- * move outside the bound element and is still within the document.
11131
- *
11132
- * @param {SyntheticEvent} event Blur event.
11133
- */
11134
 
11135
- var queueBlurCheck = Object(external_wp_element_["useCallback"])(function (event) {
11136
- // React does not allow using an event reference asynchronously
11137
- // due to recycling behavior, except when explicitly persisted.
11138
- event.persist(); // Skip blur check if clicking button. See `normalizeButtonFocus`.
11139
 
11140
- if (preventBlurCheck.current) {
11141
- return;
11142
- }
11143
 
11144
- blurCheckTimeoutId.current = setTimeout(function () {
11145
- // If document is not focused then focus should remain
11146
- // inside the wrapped component and therefore we cancel
11147
- // this blur event thereby leaving focus in place.
11148
- // https://developer.mozilla.org/en-US/docs/Web/API/Document/hasFocus.
11149
- if (!document.hasFocus()) {
11150
- event.preventDefault();
11151
- return;
11152
  }
11153
 
11154
- if (typeof currentOnFocusOutside.current === 'function') {
11155
- currentOnFocusOutside.current(event);
 
 
11156
  }
11157
- }, 0);
11158
- }, []);
11159
- return {
11160
- onFocus: cancelBlurCheck,
11161
- onMouseDown: normalizeButtonFocus,
11162
- onMouseUp: normalizeButtonFocus,
11163
- onTouchStart: normalizeButtonFocus,
11164
- onTouchEnd: normalizeButtonFocus,
11165
- onBlur: queueBlurCheck
11166
- };
11167
- }
11168
- // CONCATENATED MODULE: ./client/header/activity-panel/panel.js
11169
 
 
 
11170
 
 
 
 
11171
 
11172
  /**
11173
- * External dependencies
 
 
 
11174
  */
11175
-
11176
-
 
11177
 
11178
  /**
11179
- * Internal dependencies
 
 
 
11180
  */
 
 
 
11181
 
 
 
 
 
 
 
 
 
 
 
 
11182
 
 
 
 
 
 
 
 
 
 
11183
 
11184
- var panel_Panel = function Panel(_ref) {
11185
- var content = _ref.content,
11186
- isPanelOpen = _ref.isPanelOpen,
11187
- isPanelSwitching = _ref.isPanelSwitching,
11188
- currentTab = _ref.currentTab,
11189
- tab = _ref.tab,
11190
- closePanel = _ref.closePanel,
11191
- clearPanel = _ref.clearPanel;
11192
- var panelClass = 'woocommerce-layout__activity-panel-wrapper';
11193
-
11194
- var handleFocusOutside = function handleFocusOutside(event) {
11195
- var isClickOnModalOrSnackbar = event.relatedTarget && (event.relatedTarget.closest('.woocommerce-inbox-dismiss-confirmation_modal') || event.relatedTarget.closest('.components-snackbar__action'));
11196
 
11197
- if (isPanelOpen && !isClickOnModalOrSnackbar) {
11198
- closePanel();
 
 
 
 
 
 
 
 
 
 
11199
  }
11200
- };
11201
 
11202
- var possibleFocusPanel = function possibleFocusPanel() {
11203
- if (!containerRef.current || !isPanelOpen || !tab) {
11204
- return;
11205
- }
11206
 
11207
- focusOnMountRef(containerRef.current);
11208
- };
 
 
 
 
 
 
 
 
11209
 
11210
- var finishTransition = function finishTransition(e) {
11211
- if (e && e.propertyName === 'transform') {
11212
- clearPanel();
11213
- possibleFocusPanel();
11214
- }
11215
- };
11216
 
11217
- var focusOnMountRef = useFocusOnMount();
11218
- var useFocusOutsideProps = useFocusOutside(handleFocusOutside);
11219
- var containerRef = Object(external_wp_element_["useRef"])(null);
11220
- var mergedContainerRef = Object(external_wp_element_["useCallback"])(function (node) {
11221
- containerRef.current = node;
11222
- focusOnMountRef(node);
11223
- }, []);
11224
 
11225
- if (!tab) {
11226
- return Object(external_wp_element_["createElement"])("div", {
11227
- className: panelClass
11228
- });
11229
- }
11230
 
11231
- if (!content) {
11232
- return null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11233
  }
11234
 
11235
- var classNames = classnames_default()(panelClass, {
11236
- 'is-open': isPanelOpen,
11237
- 'is-switching': isPanelSwitching
11238
- });
11239
- return Object(external_wp_element_["createElement"])("div", extends_default()({
11240
- className: classNames,
11241
- tabIndex: 0,
11242
- role: "tabpanel",
11243
- "aria-label": tab.title,
11244
- onTransitionEnd: finishTransition
11245
- }, useFocusOutsideProps, {
11246
- ref: mergedContainerRef
11247
- }), Object(external_wp_element_["createElement"])("div", {
11248
- className: "woocommerce-layout__activity-panel-content",
11249
- key: 'activity-panel-' + currentTab,
11250
- id: 'activity-panel-' + currentTab
11251
- }, Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
11252
- fallback: Object(external_wp_element_["createElement"])(external_wc_components_["Spinner"], null)
11253
- }, content)));
11254
- };
11255
- /* harmony default export */ var panel = (panel_Panel);
11256
- // CONCATENATED MODULE: ./client/header/activity-panel/index.js
11257
 
 
 
 
11258
 
 
 
 
11259
 
 
 
 
 
 
11260
 
 
11261
 
 
 
 
11262
 
 
 
 
 
 
 
 
 
 
11263
 
 
 
 
11264
 
 
 
11265
 
 
 
 
 
 
 
 
11266
 
 
 
 
 
 
 
 
11267
 
 
 
11268
 
11269
  /**
11270
- * External dependencies
 
 
 
 
 
 
 
 
 
11271
  */
 
 
 
 
 
11272
 
 
11273
 
 
 
 
11274
 
 
 
 
11275
 
 
 
11276
 
11277
 
 
11278
 
 
 
11279
 
 
 
 
11280
 
11281
 
11282
- /**
11283
- * Internal dependencies
11284
- */
11285
 
 
 
 
 
 
 
 
 
 
11286
 
 
 
11287
 
 
11288
 
 
11289
 
 
 
11290
 
 
 
 
 
 
 
11291
 
 
11292
 
 
11293
 
11294
- var HelpPanel = Object(external_wp_element_["lazy"])(function () {
11295
- return Promise.all(/* import() | activity-panels-help */[__webpack_require__.e(54), __webpack_require__.e(6), __webpack_require__.e(7)]).then(__webpack_require__.bind(null, 705));
11296
- });
11297
- var InboxPanel = Object(external_wp_element_["lazy"])(function () {
11298
- return Promise.all(/* import() | activity-panels-inbox */[__webpack_require__.e(1), __webpack_require__.e(3), __webpack_require__.e(4), __webpack_require__.e(8)]).then(__webpack_require__.bind(null, 689));
11299
- });
11300
- var activity_panel_ActivityPanel = function ActivityPanel(_ref) {
11301
- var isEmbedded = _ref.isEmbedded,
11302
- query = _ref.query,
11303
- userPreferencesData = _ref.userPreferencesData;
11304
-
11305
- var _useState = Object(external_wp_element_["useState"])(''),
11306
- _useState2 = slicedToArray_default()(_useState, 2),
11307
- currentTab = _useState2[0],
11308
- setCurrentTab = _useState2[1];
11309
-
11310
- var _useState3 = Object(external_wp_element_["useState"])(false),
11311
- _useState4 = slicedToArray_default()(_useState3, 2),
11312
- isPanelClosing = _useState4[0],
11313
- setIsPanelClosing = _useState4[1];
11314
-
11315
- var _useState5 = Object(external_wp_element_["useState"])(false),
11316
- _useState6 = slicedToArray_default()(_useState5, 2),
11317
- isPanelOpen = _useState6[0],
11318
- setIsPanelOpen = _useState6[1];
11319
-
11320
- var _useState7 = Object(external_wp_element_["useState"])(false),
11321
- _useState8 = slicedToArray_default()(_useState7, 2),
11322
- isPanelSwitching = _useState8[0],
11323
- setIsPanelSwitching = _useState8[1];
11324
-
11325
- var _useSelect = Object(external_wp_data_["useSelect"])(function (select) {
11326
- var _select = select(external_wc_data_["OPTIONS_STORE_NAME"]),
11327
- getOption = _select.getOption,
11328
- isResolving = _select.isResolving;
11329
 
11330
- return {
11331
- hasUnreadNotes: getUnreadNotes(select),
11332
- requestingTaskListOptions: isResolving('getOption', ['woocommerce_task_list_complete']) || isResolving('getOption', ['woocommerce_task_list_hidden']),
11333
- setupTaskListComplete: getOption('woocommerce_task_list_complete') === 'yes',
11334
- setupTaskListHidden: getOption('woocommerce_task_list_hidden') === 'yes',
11335
- trackedCompletedTasks: getOption('woocommerce_task_list_tracked_completed_tasks') || []
11336
- };
11337
- }),
11338
- hasUnreadNotes = _useSelect.hasUnreadNotes,
11339
- requestingTaskListOptions = _useSelect.requestingTaskListOptions,
11340
- setupTaskListComplete = _useSelect.setupTaskListComplete,
11341
- setupTaskListHidden = _useSelect.setupTaskListHidden,
11342
- trackedCompletedTasks = _useSelect.trackedCompletedTasks;
 
 
 
 
 
 
 
11343
 
11344
- var _useDispatch = Object(external_wp_data_["useDispatch"])(external_wc_data_["OPTIONS_STORE_NAME"]),
11345
- updateOptions = _useDispatch.updateOptions;
11346
 
11347
- var _useUser = Object(external_wc_data_["useUser"])(),
11348
- currentUserCan = _useUser.currentUserCan;
11349
 
11350
- var togglePanel = function togglePanel(_ref2, isTabOpen) {
11351
- var tabName = _ref2.name;
11352
- var panelSwitching = tabName !== currentTab && currentTab !== '' && isTabOpen && isPanelOpen;
11353
 
11354
- if (isPanelClosing) {
11355
- return;
11356
- }
11357
 
11358
- setCurrentTab(tabName);
11359
- setIsPanelOpen(isTabOpen);
11360
- setIsPanelSwitching(panelSwitching);
11361
- };
11362
 
11363
- var _closePanel = function closePanel() {
11364
- setIsPanelClosing(true);
11365
- setIsPanelOpen(false);
11366
- };
11367
 
11368
- var _clearPanel = function clearPanel() {
11369
- if (!isPanelOpen) {
11370
- setIsPanelClosing(false);
11371
- setIsPanelSwitching(false);
11372
- setCurrentTab('');
11373
- }
11374
- };
11375
 
11376
- var isHomescreen = function isHomescreen() {
11377
- return query.page === 'wc-admin' && !query.path;
11378
- };
11379
 
11380
- var isPerformingSetupTask = function isPerformingSetupTask() {
11381
- return query.task && !query.path && (requestingTaskListOptions === true || setupTaskListHidden === false && setupTaskListComplete === false);
11382
- }; // @todo Pull in dynamic unread status/count
11383
 
11384
 
11385
- var getTabs = function getTabs() {
11386
- var inbox = {
11387
- name: 'inbox',
11388
- title: Object(external_wp_i18n_["__"])('Inbox', 'woocommerce-admin'),
11389
- icon: Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
11390
- icon: library_inbox
11391
- }),
11392
- unread: hasUnreadNotes,
11393
- visible: (isEmbedded || !isHomescreen()) && !isPerformingSetupTask()
11394
- };
11395
- var setup = {
11396
- name: 'setup',
11397
- title: Object(external_wp_i18n_["__"])('Finish setup', 'woocommerce-admin'),
11398
- icon: Object(external_wp_element_["createElement"])(setup_progress_SetupProgress, null),
11399
- onClick: function onClick() {
11400
- var currentLocation = window.location.href;
11401
- var homescreenLocation = Object(wc_admin_settings["f" /* getAdminLink */])('admin.php?page=wc-admin'); // Don't navigate if we're already on the homescreen, this will cause an infinite loop
11402
-
11403
- if (currentLocation !== homescreenLocation) {
11404
- // Ensure that if the user is trying to get to the task list they can see it even if
11405
- // it was dismissed.
11406
- if (setupTaskListHidden === 'no') {
11407
- redirectToHomeScreen();
11408
- } else {
11409
- updateOptions({
11410
- woocommerce_task_list_hidden: 'no'
11411
- }).then(redirectToHomeScreen);
11412
- }
11413
- }
11414
 
11415
- return null;
11416
- },
11417
- visible: currentUserCan('manage_woocommerce') && !setupTaskListComplete && !setupTaskListHidden && !isPerformingSetupTask() && (!isHomescreen() || isEmbedded)
11418
- };
11419
- var help = {
11420
- name: 'help',
11421
- title: Object(external_wp_i18n_["__"])('Help', 'woocommerce-admin'),
11422
- icon: Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
11423
- icon: library_help
11424
- }),
11425
- visible: isHomescreen() && !isEmbedded || isPerformingSetupTask()
11426
- };
11427
- var displayOptions = {
11428
- component: display_options_DisplayOptions,
11429
- visible: !isEmbedded && isHomescreen() && !isPerformingSetupTask()
11430
- };
11431
- var previewSite = {
11432
- name: 'previewSite',
11433
- title: Object(external_wp_i18n_["__"])('Preview site', 'woocommerce-admin'),
11434
- icon: Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
11435
- icon: external["a" /* default */]
11436
- }),
11437
- visible: query.page === 'wc-admin' && query.task === 'appearance',
11438
- onClick: function onClick() {
11439
- window.open(window.wcSettings.siteUrl);
11440
- return null;
11441
- }
11442
- };
11443
- return [inbox, setup, previewSite, displayOptions, help].filter(function (tab) {
11444
- return tab.visible;
11445
- });
11446
- };
11447
 
11448
- var getPanelContent = function getPanelContent(tab) {
11449
- var task = query.task;
11450
 
11451
- switch (tab) {
11452
- case 'inbox':
11453
- return Object(external_wp_element_["createElement"])(InboxPanel, null);
11454
 
11455
- case 'help':
11456
- return Object(external_wp_element_["createElement"])(HelpPanel, {
11457
- taskName: task
11458
- });
11459
 
11460
- default:
11461
- return null;
11462
- }
11463
- };
11464
 
11465
- var redirectToHomeScreen = function redirectToHomeScreen() {
11466
- if (Object(utils["f" /* isWCAdmin */])(window.location.href)) {
11467
- Object(external_wc_navigation_["getHistory"])().push(Object(external_wc_navigation_["getNewPath"])({}, '/', {}));
11468
- } else {
11469
- window.location.href = Object(wc_admin_settings["f" /* getAdminLink */])('admin.php?page=wc-admin');
11470
- }
11471
- };
11472
 
11473
- var closedHelpPanelHighlight = function closedHelpPanelHighlight() {
11474
- Object(external_wc_tracks_["recordEvent"])('help_tooltip_click');
11475
 
11476
- if (userPreferencesData && userPreferencesData.updateUserPreferences) {
11477
- userPreferencesData.updateUserPreferences({
11478
- help_panel_highlight_shown: 'yes'
11479
- });
11480
- }
11481
- };
11482
 
11483
- var shouldShowHelpTooltip = function shouldShowHelpTooltip() {
11484
- var task = query.task;
11485
- var startedTasks = userPreferencesData && userPreferencesData.task_list_tracked_started_tasks;
11486
- var highlightShown = userPreferencesData && userPreferencesData.help_panel_highlight_shown;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11487
 
11488
- if (task && highlightShown !== 'yes' && (startedTasks || {})[task] > 1 && !trackedCompletedTasks.includes(task)) {
11489
- return true;
 
 
 
 
 
11490
  }
 
11491
 
11492
- return false;
11493
- };
11494
-
11495
- var tabs = getTabs();
11496
- var headerId = Object(external_lodash_["uniqueId"])('activity-panel-header_');
11497
- var showHelpHighlightTooltip = shouldShowHelpTooltip();
11498
- return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wc_components_["H"], {
11499
- id: headerId,
11500
- className: "screen-reader-text"
11501
- }, Object(external_wp_i18n_["__"])('Store Activity', 'woocommerce-admin')), Object(external_wp_element_["createElement"])(external_wc_components_["Section"], {
11502
- component: "aside",
11503
- id: "woocommerce-activity-panel",
11504
- className: "woocommerce-layout__activity-panel",
11505
- "aria-labelledby": headerId
11506
- }, Object(external_wp_element_["createElement"])(tabs_Tabs, {
11507
- tabs: tabs,
11508
- tabOpen: isPanelOpen,
11509
- selectedTab: currentTab,
11510
- onTabClick: function onTabClick(tab, tabOpen) {
11511
- if (tab.onClick) {
11512
- tab.onClick();
11513
- return;
11514
- }
11515
 
11516
- togglePanel(tab, tabOpen);
11517
- }
11518
- }), Object(external_wp_element_["createElement"])(panel_Panel, {
11519
- currentTab: true,
11520
- isPanelOpen: isPanelOpen,
11521
- isPanelSwitching: isPanelSwitching,
11522
- tab: Object(external_lodash_["find"])(getTabs(), {
11523
- name: currentTab
11524
- }),
11525
- content: getPanelContent(currentTab),
11526
- closePanel: function closePanel() {
11527
- return _closePanel();
11528
- },
11529
- clearPanel: function clearPanel() {
11530
- return _clearPanel();
11531
- }
11532
- })), showHelpHighlightTooltip ? Object(external_wp_element_["createElement"])(HighlightTooltip, {
11533
- delay: 1000,
11534
- useAnchor: true,
11535
- title: Object(external_wp_i18n_["__"])("We're here for help", 'woocommerce-admin'),
11536
- content: Object(external_wp_i18n_["__"])('If you have any questions, feel free to explore the WooCommerce docs listed here.', 'woocommerce-admin'),
11537
- closeButtonText: Object(external_wp_i18n_["__"])('Got it', 'woocommerce-admin'),
11538
- id: "activity-panel-tab-help",
11539
- onClose: function onClose() {
11540
- return closedHelpPanelHighlight();
11541
- },
11542
- onShow: function onShow() {
11543
- return Object(external_wc_tracks_["recordEvent"])('help_tooltip_view');
11544
- }
11545
- }) : null);
11546
- };
11547
- activity_panel_ActivityPanel.defaultProps = {
11548
- getHistory: external_wc_navigation_["getHistory"]
11549
- };
11550
- /* harmony default export */ var activity_panel = (activity_panel_ActivityPanel);
11551
- // CONCATENATED MODULE: ./client/lib/platform/index.js
11552
- var ANDROID_PLATFORM = 'android';
11553
- var IOS_PLATFORM = 'ios';
11554
- var UNKNOWN_PLATFORM = 'unknown';
11555
- /**
11556
- * Provide basic detection of platform based on user agent. This is not
11557
- * a robust check for browser features or the like. You should only use
11558
- * this for non-critical display logic.
11559
- */
11560
 
11561
- var platform = function platform() {
11562
- if (/iPhone|iPad|iPod/i.test(window.navigator.userAgent)) {
11563
- return IOS_PLATFORM;
11564
- } else if (/Android/i.test(window.navigator.userAgent)) {
11565
- return ANDROID_PLATFORM;
11566
- }
11567
 
11568
- return UNKNOWN_PLATFORM;
 
 
 
11569
  };
11570
- // CONCATENATED MODULE: ./client/mobile-banner/app-icon.js
11571
-
11572
- var app_icon_AppIcon = function AppIcon() {
11573
- return Object(external_wp_element_["createElement"])("svg", {
11574
- width: "37",
11575
- height: "37",
11576
- viewBox: "0 0 92 92",
11577
- fill: "none",
11578
- xmlns: "http://www.w3.org/2000/svg"
11579
- }, Object(external_wp_element_["createElement"])("rect", {
11580
- width: "92",
11581
- height: "92",
11582
- rx: "21.3953",
11583
- fill: "#7F54B3"
11584
- }), Object(external_wp_element_["createElement"])("path", {
11585
- fillRule: "evenodd",
11586
- clipRule: "evenodd",
11587
- d: "M72.5937 28.043H19.8094C16.4781 28.0459 13.7783 30.7705 13.7754 34.1324V54.4501C13.7783 57.812 16.4781 60.5366 19.8094 60.5395H44.8229L56.2573 66.9607L53.6672 60.5395H72.599C74.2009 60.5402 75.7374 59.8983 76.8702 58.7552C78.0029 57.612 78.639 56.0614 78.6383 54.4447V34.1324C78.6376 32.5157 78.0002 30.9657 76.8664 29.8235C75.7327 28.6814 74.1956 28.0408 72.5937 28.043ZM19.1057 32.4208C18.4658 32.4324 17.8646 32.7359 17.467 33.2482C17.0888 33.7635 16.9404 34.4175 17.058 35.0502C18.5962 45.0986 20.0338 51.8757 21.371 55.3816C21.8779 56.658 22.4896 57.2703 23.2063 57.2185C24.3075 57.1489 25.6263 55.5968 27.1627 52.5621C27.9964 50.8412 29.2602 48.2662 30.9539 44.837C32.3785 49.88 34.309 53.6787 36.7456 56.2331C37.4291 56.9436 38.1204 57.2748 38.8195 57.2266C39.4185 57.1931 39.953 56.8315 40.217 56.2813C40.4753 55.7358 40.5806 55.1278 40.5211 54.5248C40.3516 52.0703 40.5919 48.667 41.2421 44.3149C41.9081 39.8057 42.7523 36.5818 43.7749 34.6432C43.9822 34.2526 44.0733 33.8087 44.037 33.366C44.0039 32.7587 43.7116 32.1969 43.2374 31.829C42.7745 31.4367 42.1799 31.2446 41.5803 31.2935C40.8334 31.3325 40.1682 31.7885 39.8499 32.4797C38.2331 35.5019 37.0812 40.4109 36.3943 47.2068C35.2823 44.2394 34.4509 41.1703 33.9114 38.0412C33.623 36.4613 32.9037 35.7125 31.7536 35.7946C30.9592 35.8589 30.3063 36.3944 29.7819 37.4012L24.0348 48.5643C23.0997 44.6692 22.2205 39.9289 21.3972 34.3433C21.1997 32.9652 20.4358 32.3244 19.1057 32.4208ZM69.9089 34.6877C71.6969 35.0381 73.2407 36.2 74.1186 37.8559C74.9693 39.3247 75.3946 41.1161 75.3946 43.23C75.4148 45.9567 74.7062 48.6357 73.3477 50.9687C71.7778 53.7023 69.7195 55.0691 67.1727 55.0691C66.6933 55.0668 66.2153 55.0128 65.7467 54.9078C63.9584 54.5581 62.4143 53.396 61.5371 51.7396C60.6864 50.2452 60.261 48.4411 60.261 46.3272C60.2357 43.6127 60.945 40.9454 62.3079 38.6295C63.9023 35.8959 65.9607 34.5291 68.4829 34.5291C68.9623 34.5304 69.4402 34.5836 69.9089 34.6877ZM68.7937 49.4848C69.7707 48.5773 70.4399 47.2269 70.8012 45.4337V45.4419C70.9315 44.7826 70.9959 44.1112 70.9933 43.4382C70.986 42.5849 70.8291 41.74 70.5302 40.9452C70.1443 39.901 69.6304 39.3124 68.9884 39.1793C68.0378 38.9643 67.1239 39.5256 66.2469 40.8632C65.5812 41.8393 65.109 42.9432 64.8577 44.1106C64.7276 44.7708 64.6632 45.4432 64.6657 46.1171C64.6739 46.9677 64.8308 47.8096 65.1287 48.6019C65.5146 49.6388 66.0294 50.2274 66.6731 50.3678C67.3169 50.5081 68.0237 50.2138 68.7937 49.4848ZM57.9079 37.8559C57.0291 36.2008 55.4854 35.0392 53.6976 34.6877C53.2279 34.5837 52.749 34.5306 52.2687 34.5291C49.7443 34.5291 47.6856 35.8959 46.0927 38.6295C44.7295 40.9454 44.0201 43.6127 44.0454 46.3272C44.0454 48.4411 44.4699 50.2452 45.319 51.7396C46.1976 53.3949 47.7414 54.5566 49.5294 54.9078C49.999 55.0126 50.4779 55.0667 50.9582 55.0691C53.5055 55.0691 55.5642 53.7023 57.1343 50.9687C58.4922 48.6355 59.2001 45.9565 59.1789 43.23C59.1789 41.1161 58.7544 39.3247 57.9053 37.8559H57.9079ZM54.5903 45.4337C54.2307 47.2269 53.5614 48.5773 52.5825 49.4848C51.8115 50.2065 51.101 50.5017 50.4589 50.3678C49.8169 50.2338 49.3011 49.6461 48.9169 48.6019C48.6181 47.8097 48.4603 46.9678 48.4511 46.1171C48.4495 45.4431 48.5148 44.7707 48.6459 44.1106C48.8971 42.9432 49.3694 41.8393 50.0353 40.8632C50.9124 39.5256 51.8264 38.9643 52.7773 39.1793C53.4193 39.3124 53.9333 39.901 54.3193 40.9452C54.617 41.7404 54.7739 42.585 54.7824 43.4382C54.785 44.1112 54.7207 44.7826 54.5903 45.4419V45.4337Z",
11588
- fill: "white"
11589
- }));
11590
  };
11591
- // EXTERNAL MODULE: ./client/mobile-banner/style.scss
11592
- var mobile_banner_style = __webpack_require__(427);
11593
-
11594
- // CONCATENATED MODULE: ./client/mobile-banner/constants.js
11595
- // The Play Store link is defined as an exported constant mainly for the sake of testing the Mobile App Banner.
11596
- // It is nearly impossible to fake navigation in JSDOM 16, so exposing this link for mocking allows us to
11597
- // avoid triggering a navigation.
11598
- var PLAY_STORE_LINK = 'https://play.google.com/store/apps/details?id=com.woocommerce.android';
11599
- var TRACKING_EVENT_NAME = 'wcadmin_mobile_android_banner_click';
11600
- // CONCATENATED MODULE: ./client/mobile-banner/index.js
11601
 
 
11602
 
 
 
11603
 
 
 
 
11604
  /**
11605
- * External dependencies
 
 
 
11606
  */
11607
-
11608
-
11609
-
11610
-
 
 
 
 
 
 
 
 
 
11611
  /**
11612
- * Internal dependencies
 
 
11613
  */
11614
 
 
 
11615
 
 
 
 
 
11616
 
11617
-
11618
-
11619
- var SHOW_APP_BANNER_MODIFIER_CLASS = 'woocommerce-layout__show-app-banner';
11620
- var mobile_banner_MobileAppBanner = function MobileAppBanner(_ref) {
11621
- var onInstall = _ref.onInstall,
11622
- onDismiss = _ref.onDismiss;
11623
- Object(external_wp_element_["useEffect"])(function () {
11624
- var layout = document.getElementsByClassName('woocommerce-layout')[0];
11625
-
11626
- if (platform() === ANDROID_PLATFORM) {
11627
- if (layout) {
11628
- // This is a hack to allow the mobile banner to work in the context of the header which is
11629
- // position fixed. This can be refactored away when we move away from the activity panel
11630
- // in future.
11631
- layout.classList.add(SHOW_APP_BANNER_MODIFIER_CLASS);
11632
- }
11633
- }
11634
-
11635
- return function () {
11636
- if (layout) {
11637
- layout.classList.remove(SHOW_APP_BANNER_MODIFIER_CLASS);
11638
- }
11639
- };
11640
- }, []);
11641
-
11642
- var _useState = Object(external_wp_element_["useState"])(false),
11643
- _useState2 = slicedToArray_default()(_useState, 2),
11644
- isDismissed = _useState2[0],
11645
- setDismissed = _useState2[1]; // On iOS the "Smart App Banner" meta tag is used so only display this on Android.
11646
-
11647
-
11648
- if (platform() === ANDROID_PLATFORM && !isDismissed) {
11649
- return Object(external_wp_element_["createElement"])("div", {
11650
- className: "woocommerce-mobile-app-banner"
11651
- }, Object(external_wp_element_["createElement"])(external_wp_components_["Icon"], {
11652
- icon: "no-alt",
11653
- "data-testid": "dismiss-btn",
11654
- onClick: function onClick() {
11655
- onDismiss();
11656
- setDismissed(true);
11657
- Object(external_wc_tracks_["recordEvent"])(TRACKING_EVENT_NAME, {
11658
- action: 'dismiss'
11659
- });
11660
- }
11661
- }), Object(external_wp_element_["createElement"])(app_icon_AppIcon, null), Object(external_wp_element_["createElement"])("div", {
11662
- className: "woocommerce-mobile-app-banner__description"
11663
- }, Object(external_wp_element_["createElement"])("p", {
11664
- className: "woocommerce-mobile-app-banner__description__text"
11665
- }, Object(external_wp_i18n_["__"])('Run your store from anywhere', 'woocommerce-admin')), Object(external_wp_element_["createElement"])("p", {
11666
- className: "woocommerce-mobile-app-banner__description__text"
11667
- }, Object(external_wp_i18n_["__"])('Download the WooCommerce app', 'woocommerce-admin'))), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
11668
- href: PLAY_STORE_LINK,
11669
- isSecondary: true,
11670
- onClick: function onClick() {
11671
- onInstall();
11672
- setDismissed(true);
11673
- Object(external_wc_tracks_["recordEvent"])(TRACKING_EVENT_NAME, {
11674
- action: 'install'
11675
- });
11676
- }
11677
- }, Object(external_wp_i18n_["__"])('Install', 'woocommerce-admin')));
11678
  }
11679
 
11680
- return null;
11681
- };
11682
- // CONCATENATED MODULE: ./client/hooks/useIsScrolled.js
11683
-
11684
 
11685
- /**
11686
- * External dependencies
11687
- */
11688
 
11689
- function useIsScrolled() {
11690
- var _useState = Object(external_wp_element_["useState"])(false),
11691
- _useState2 = slicedToArray_default()(_useState, 2),
11692
- isScrolled = _useState2[0],
11693
- setIsScrolled = _useState2[1];
11694
 
11695
- var rafHandle = Object(external_wp_element_["useRef"])(null);
11696
- Object(external_wp_element_["useEffect"])(function () {
11697
- var updateIsScrolled = function updateIsScrolled() {
11698
- setIsScrolled(window.pageYOffset > 20);
11699
- };
11700
 
11701
- var scrollListener = function scrollListener() {
11702
- rafHandle.current = window.requestAnimationFrame(updateIsScrolled);
11703
- };
11704
 
11705
- window.addEventListener('scroll', scrollListener);
11706
- return function () {
11707
- window.removeEventListener('scroll', scrollListener);
11708
- window.cancelAnimationFrame(rafHandle.current);
11709
- };
11710
- }, []);
11711
- return isScrolled;
11712
- }
11713
- // EXTERNAL MODULE: external ["wp","plugins"]
11714
- var external_wp_plugins_ = __webpack_require__(279);
11715
 
11716
- // EXTERNAL MODULE: ./client/navigation/style.scss
11717
- var navigation_style = __webpack_require__(428);
11718
 
11719
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
11720
- var toConsumableArray = __webpack_require__(44);
11721
- var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
11722
 
11723
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.values.js
11724
- var es_object_values = __webpack_require__(285);
11725
 
11726
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.max-safe-integer.js
11727
- var es_number_max_safe_integer = __webpack_require__(429);
11728
 
11729
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js
11730
- var es_number_constructor = __webpack_require__(178);
11731
 
11732
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.constructor.js
11733
- var es_regexp_constructor = __webpack_require__(209);
11734
 
11735
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js
11736
- var es_regexp_to_string = __webpack_require__(142);
 
11737
 
11738
- // CONCATENATED MODULE: ./client/navigation/utils.ts
 
11739
 
 
 
11740
 
 
 
11741
 
11742
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
 
11743
 
11744
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
 
11745
 
 
11746
 
11747
 
 
 
 
11748
 
 
 
 
11749
 
11750
 
 
 
 
11751
 
11752
 
11753
 
11754
 
 
 
 
11755
 
 
 
11756
 
 
11757
 
 
 
 
 
 
 
 
 
11758
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11759
 
 
 
11760
 
11761
 
11762
  /**
@@ -11764,1087 +10097,1207 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
11764
  */
11765
 
11766
 
11767
- /**
11768
- * Get the full URL if a relative path is passed.
11769
- */
11770
- var utils_getFullUrl = function getFullUrl(url) {
11771
- if (url.indexOf('http') === 0) {
11772
- return url;
11773
- }
11774
-
11775
- return Object(wc_admin_settings["f" /* getAdminLink */])(url);
11776
- };
11777
- /**
11778
- * Get a default regex expression to match the path and provided params.
11779
- */
11780
-
11781
- var utils_getDefaultMatchExpression = function getDefaultMatchExpression(url) {
11782
- var escapedUrl = url.replace(/[-\/\\^$*+?.()|[\]{}]/gi, '\\$&');
11783
 
11784
- var _escapedUrl$split = escapedUrl.split(/\\\?|#/),
11785
- _escapedUrl$split2 = slicedToArray_default()(_escapedUrl$split, 3),
11786
- path = _escapedUrl$split2[0],
11787
- args = _escapedUrl$split2[1],
11788
- hash = _escapedUrl$split2[2];
11789
 
11790
- var hashExpression = hash ? "(.*#".concat(hash, "$)") : '';
11791
- var argsExpression = args ? args.split('&').reduce(function (acc, param) {
11792
- return "".concat(acc, "(?=.*[?|&]").concat(param, "(&|$|#))");
11793
- }, '') : '';
11794
- return '^' + path + argsExpression + hashExpression;
11795
- };
11796
  /**
11797
- * Get a match score for a menu item given a location.
11798
  */
11799
 
11800
- var getMatchScore = function getMatchScore(location, itemUrl) {
11801
- var itemExpression = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
11802
 
11803
- if (!itemUrl) {
11804
- return 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11805
  }
 
11806
 
11807
- var fullUrl = utils_getFullUrl(itemUrl);
11808
- var href = location.href; // Return highest possible score for exact match.
 
 
 
 
 
 
 
 
11809
 
11810
- if (fullUrl === href) {
11811
- return Number.MAX_SAFE_INTEGER;
 
 
11812
  }
11813
 
11814
- var defaultExpression = utils_getDefaultMatchExpression(fullUrl);
11815
- var regexp = new RegExp(itemExpression || defaultExpression, 'i');
11816
- return (decodeURIComponent(href).match(regexp) || []).length;
11817
- };
11818
 
11819
- /**
11820
- * Adds a listener that runs on history change.
11821
- *
11822
- * @param {Function} listener Listener to add on history change.
11823
- * @return {Function} Function to remove listeners.
11824
- */
11825
- var addHistoryListener = function addHistoryListener(listener) {
11826
- // Monkey patch pushState to allow trigger the pushstate event listener.
11827
- if (!window.wcNavigation.historyPatched) {
11828
- (function (history) {
11829
- /* global CustomEvent */
11830
- var pushState = history.pushState;
11831
- var replaceState = history.replaceState;
11832
 
11833
- history.pushState = function (state, title, url) {
11834
- var pushStateEvent = new CustomEvent('pushstate', state);
11835
- window.dispatchEvent(pushStateEvent);
11836
- return pushState.apply(history, [state, title, url]);
11837
- };
11838
 
11839
- history.replaceState = function (state, title, url) {
11840
- var replaceStateEvent = new CustomEvent('replacestate', state);
11841
- window.dispatchEvent(replaceStateEvent);
11842
- return replaceState.apply(history, [state, title, url]);
11843
- };
11844
 
11845
- window.wcNavigation.historyPatched = true;
11846
- })(window.history);
11847
- }
 
 
 
11848
 
11849
- window.addEventListener('popstate', listener);
11850
- window.addEventListener('pushstate', listener);
11851
- window.addEventListener('replacestate', listener);
11852
- return function () {
11853
- window.removeEventListener('popstate', listener);
11854
- window.removeEventListener('pushstate', listener);
11855
- window.removeEventListener('replacestate', listener);
11856
- };
11857
- };
11858
- /**
11859
- * Get the closest matching item.
11860
- *
11861
- * @param {Array} items An array of items to match against.
11862
- */
11863
 
11864
- var getMatchingItem = function getMatchingItem(items) {
11865
- var matchedItem = null;
11866
- var highestMatchScore = 0;
11867
- items.forEach(function (item) {
11868
- var score = getMatchScore(window.location, item.url, item.matchExpression);
11869
 
11870
- if (score > 0 && score >= highestMatchScore) {
11871
- highestMatchScore = score;
11872
- matchedItem = item;
11873
- }
11874
- });
11875
- return matchedItem || null;
11876
- };
11877
  /**
11878
- * Available menu IDs.
11879
  */
11880
 
11881
- var menuIds = ['primary', 'favorites', 'plugins', 'secondary'];
11882
-
11883
  /**
11884
- * Default categories for the menu.
11885
  */
11886
- var defaultCategories = {
11887
- woocommerce: {
11888
- id: 'woocommerce',
11889
- isCategory: true,
11890
- menuId: 'primary',
11891
- migrate: true,
11892
- order: 10,
11893
- parent: '',
11894
- title: 'WooCommerce'
11895
- }
11896
- };
11897
  /**
11898
- * Sort an array of menu items by their order property.
11899
  *
11900
- * @param {Array} menuItems Array of menu items.
11901
- * @return {Array} Sorted menu items.
 
 
 
 
 
 
11902
  */
11903
 
11904
- var sortMenuItems = function sortMenuItems(menuItems) {
11905
- return menuItems.sort(function (a, b) {
11906
- if (a.order === b.order) {
11907
- return a.title.localeCompare(b.title);
11908
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11909
 
11910
- return a.order - b.order;
 
 
11911
  });
11912
- };
11913
  /**
11914
- * Get a flat tree structure of all Categories and thier children grouped by menuId
11915
  *
11916
- * @param {Array} menuItems Array of menu items.
11917
- * @param {Function} currentUserCan Callback method passed the capability to determine if a menu item is visible.
11918
- * @return {Object} Mapped menu items and categories.
 
11919
  */
11920
 
11921
- var getMappedItemsCategories = function getMappedItemsCategories(menuItems, currentUserCan) {
11922
- var categories = _objectSpread({}, defaultCategories);
11923
-
11924
- var items = sortMenuItems(menuItems).reduce(function (acc, item) {
11925
- // Set up the category if it doesn't yet exist.
11926
- if (!acc[item.parent]) {
11927
- acc[item.parent] = {};
11928
- menuIds.forEach(function (menuId) {
11929
- acc[item.parent][menuId] = [];
11930
- });
11931
- } // Incorrect menu ID.
11932
-
11933
-
11934
- if (!acc[item.parent][item.menuId]) {
11935
- return acc;
11936
- } // User does not have permission to view this item.
11937
-
11938
-
11939
- if (currentUserCan && item.capability && !currentUserCan(item.capability)) {
11940
- return acc;
11941
- } // Add categories.
11942
-
11943
 
11944
- if (item.isCategory) {
11945
- categories[item.id] = item;
11946
  }
11947
 
11948
- var menuIdArray = acc[item.parent][item.menuId];
11949
-
11950
- if (menuIdArray) {
11951
- menuIdArray.push(item);
11952
  }
11953
-
11954
- return acc;
11955
- }, {});
11956
  return {
11957
  items: items,
11958
- categories: categories
 
11959
  };
11960
- };
11961
- // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/wordpress.js
11962
-
11963
 
11964
- /**
11965
- * WordPress dependencies
11966
- */
11967
 
11968
- var wordpress = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
11969
- xmlns: "http://www.w3.org/2000/svg",
11970
- viewBox: "-2 -2 24 24"
11971
- }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
11972
- d: "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"
11973
- }));
11974
- /* harmony default export */ var library_wordpress = (wordpress);
11975
- //# sourceMappingURL=wordpress.js.map
11976
- // CONCATENATED MODULE: ./client/navigation/components/header/index.js
11977
 
 
11978
 
 
11979
 
11980
- /**
11981
- * External dependencies
11982
- */
11983
 
 
11984
 
 
11985
 
 
 
11986
 
 
 
 
 
11987
 
 
 
 
11988
 
 
 
11989
 
 
11990
 
 
 
11991
 
11992
- /**
11993
- * Internal dependencies
11994
- */
11995
 
 
 
 
 
 
 
 
11996
 
 
11997
 
 
 
11998
 
11999
- var header_Header = function Header() {
12000
- var siteTitle = Object(wc_admin_settings["g" /* getSetting */])('siteTitle', '');
12001
- var homeUrl = Object(wc_admin_settings["g" /* getSetting */])('homeUrl', '');
12002
- var isScrolled = useIsScrolled();
12003
 
12004
- var _useState = Object(external_wp_element_["useState"])(document.body.classList.contains(false)),
12005
- _useState2 = slicedToArray_default()(_useState, 2),
12006
- isFolded = _useState2[0],
12007
- setIsFolded = _useState2[1];
12008
 
12009
- var navClasses = {
12010
- folded: 'is-wc-nav-folded',
12011
- expanded: 'is-wc-nav-expanded'
12012
- };
12013
 
12014
- var foldNav = function foldNav() {
12015
- document.body.classList.add(navClasses.folded);
12016
- document.body.classList.remove(navClasses.expanded);
12017
- setIsFolded(true);
12018
- };
12019
 
12020
- var expandNav = function expandNav() {
12021
- document.body.classList.remove(navClasses.folded);
12022
- document.body.classList.add(navClasses.expanded);
12023
- setIsFolded(false);
12024
- };
 
 
12025
 
12026
- var toggleFolded = function toggleFolded() {
12027
- if (document.body.classList.contains(navClasses.folded)) {
12028
- expandNav();
12029
- } else {
12030
- foldNav();
12031
- }
12032
- };
12033
 
12034
- var foldOnMobile = function foldOnMobile() {
12035
- var screenWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body.clientWidth;
 
 
 
12036
 
12037
- if (screenWidth <= 960) {
12038
- foldNav();
12039
- } else {
12040
- expandNav();
12041
- }
12042
- };
12043
 
12044
- Object(external_wp_element_["useEffect"])(function () {
12045
- foldOnMobile();
12046
- var foldEvents = [{
12047
- eventName: 'orientationchange',
12048
- handler: function handler(e) {
12049
- return foldOnMobile(e.target.screen.availWidth);
12050
- }
12051
- }, {
12052
- eventName: 'resize',
12053
- handler: Object(external_lodash_["debounce"])(function () {
12054
- return foldOnMobile();
12055
- }, 200)
12056
- }];
12057
 
12058
- for (var _i = 0, _foldEvents = foldEvents; _i < _foldEvents.length; _i++) {
12059
- var _foldEvents$_i = _foldEvents[_i],
12060
- eventName = _foldEvents$_i.eventName,
12061
- handler = _foldEvents$_i.handler;
12062
- window.addEventListener(eventName, handler, false);
12063
- }
 
 
 
 
12064
 
12065
- addHistoryListener(function () {
12066
- return foldOnMobile();
12067
- });
12068
- }, []);
12069
- var buttonIcon = Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
12070
- size: "36px",
12071
- icon: library_wordpress
12072
- });
12073
 
12074
- var _useSelect = Object(external_wp_data_["useSelect"])(function (select) {
12075
- var _select = select('core/data'),
12076
- isResolving = _select.isResolving;
12077
 
12078
- var _select2 = select('core'),
12079
- getEntityRecord = _select2.getEntityRecord;
12080
 
12081
- var siteData = getEntityRecord('root', '__unstableBase', undefined) || {};
12082
- return {
12083
- isRequestingSiteIcon: isResolving('core', 'getEntityRecord', ['root', '__unstableBase', undefined]),
12084
- siteIconUrl: siteData.siteIconUrl
12085
- };
12086
- }),
12087
- isRequestingSiteIcon = _useSelect.isRequestingSiteIcon,
12088
- siteIconUrl = _useSelect.siteIconUrl;
12089
 
12090
- if (siteIconUrl) {
12091
- buttonIcon = Object(external_wp_element_["createElement"])("img", {
12092
- alt: Object(external_wp_i18n_["__"])('Site Icon'),
12093
- src: siteIconUrl
12094
- });
12095
- } else if (isRequestingSiteIcon) {
12096
- buttonIcon = null;
12097
- }
12098
 
12099
- var className = classnames_default()('woocommerce-navigation-header', {
12100
- 'is-scrolled': isScrolled
12101
- });
12102
- return Object(external_wp_element_["createElement"])("div", {
12103
- className: className
12104
- }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
12105
- onClick: function onClick() {
12106
- return toggleFolded();
12107
- },
12108
- className: "woocommerce-navigation-header__site-icon",
12109
- "aria-label": "Fold navigation",
12110
- role: "switch",
12111
- "aria-checked": isFolded ? 'true' : 'false'
12112
- }, buttonIcon), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
12113
- href: homeUrl,
12114
- className: "woocommerce-navigation-header__site-title",
12115
- as: "span"
12116
- }, Object(external_wp_htmlEntities_["decodeEntities"])(siteTitle)));
12117
- };
12118
 
12119
- /* harmony default export */ var header = (header_Header);
12120
- // EXTERNAL MODULE: ./client/navigation/components/category-title/style.scss
12121
- var category_title_style = __webpack_require__(430);
 
 
 
12122
 
12123
- // EXTERNAL MODULE: ./client/navigation/components/favorite-button/style.scss
12124
- var favorite_button_style = __webpack_require__(431);
 
12125
 
12126
- // CONCATENATED MODULE: ./client/navigation/components/favorite-button/index.js
 
 
 
12127
 
 
 
 
 
12128
 
 
 
 
 
12129
 
 
 
 
 
12130
 
 
12131
  /**
12132
- * External dependencies
12133
  */
12134
 
 
 
 
 
12135
 
 
 
 
 
12136
 
 
 
 
 
12137
 
 
 
 
 
12138
 
 
12139
  /**
12140
- * Internal dependencies
12141
  */
12142
 
 
 
 
 
12143
 
12144
- var favorite_button_FavoriteButton = function FavoriteButton(_ref) {
12145
- var id = _ref.id;
 
 
12146
 
12147
- var _useSelect = Object(external_wp_data_["useSelect"])(function (select) {
12148
- return {
12149
- favorites: select(external_wc_data_["NAVIGATION_STORE_NAME"]).getFavorites(),
12150
- isResolving: select(external_wc_data_["NAVIGATION_STORE_NAME"]).isResolving('getFavorites')
12151
- };
12152
- }),
12153
- favorites = _useSelect.favorites,
12154
- isResolving = _useSelect.isResolving;
12155
 
12156
- var _useDispatch = Object(external_wp_data_["useDispatch"])(external_wc_data_["NAVIGATION_STORE_NAME"]),
12157
- addFavorite = _useDispatch.addFavorite,
12158
- removeFavorite = _useDispatch.removeFavorite;
 
12159
 
12160
- var isFavorited = favorites.includes(id);
 
 
 
12161
 
12162
- var toggleFavorite = function toggleFavorite() {
12163
- var toggle = isFavorited ? removeFavorite : addFavorite;
12164
- toggle(id);
12165
- Object(external_wc_tracks_["recordEvent"])('navigation_favorite', {
12166
- id: id,
12167
- action: isFavorited ? 'unfavorite' : 'favorite'
12168
- });
12169
- };
 
 
 
 
 
 
 
 
12170
 
12171
- if (isResolving) {
12172
- return null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12173
  }
12174
-
12175
- return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
12176
- id: "woocommerce-navigation-favorite-button",
12177
- className: "woocommerce-navigation-favorite-button",
12178
- isTertiary: true,
12179
- onClick: toggleFavorite,
12180
- icon: isFavorited ? 'star-filled' : 'star-empty',
12181
- "aria-label": isFavorited ? Object(external_wp_i18n_["__"])('Add this item to your favorites.', 'woocommerce-admin') : Object(external_wp_i18n_["__"])('Remove this item from your favorites.', 'woocommerce-admin')
12182
- });
12183
  };
12184
- /* harmony default export */ var favorite_button = (favorite_button_FavoriteButton);
12185
- // CONCATENATED MODULE: ./client/navigation/components/favorites-tooltip/index.js
12186
-
12187
-
12188
-
12189
  /**
12190
- * External dependencies
 
 
 
 
12191
  */
12192
 
 
 
 
12193
 
12194
-
 
 
12195
  /**
12196
- * Internal dependencies
 
 
 
 
12197
  */
12198
 
 
 
 
12199
 
12200
- var tooltipHiddenOption = 'woocommerce_navigation_favorites_tooltip_hidden';
12201
- var favorites_tooltip_FavoritesTooltip = function FavoritesTooltip() {
12202
- var _useSelect = Object(external_wp_data_["useSelect"])(function (select) {
12203
- var _select = select(external_wc_data_["OPTIONS_STORE_NAME"]),
12204
- getOption = _select.getOption,
12205
- isResolving = _select.isResolving;
12206
-
12207
- return {
12208
- isFavoritesResolving: select(external_wc_data_["NAVIGATION_STORE_NAME"]).isResolving('getFavorites'),
12209
- isOptionResolving: isResolving('getOption', [tooltipHiddenOption]),
12210
- isTooltipHidden: getOption(tooltipHiddenOption) === 'yes'
12211
- };
12212
- }),
12213
- isFavoritesResolving = _useSelect.isFavoritesResolving,
12214
- isOptionResolving = _useSelect.isOptionResolving,
12215
- isTooltipHidden = _useSelect.isTooltipHidden;
12216
-
12217
- var _useDispatch = Object(external_wp_data_["useDispatch"])(external_wc_data_["OPTIONS_STORE_NAME"]),
12218
- updateOptions = _useDispatch.updateOptions;
12219
-
12220
- if (isFavoritesResolving || isTooltipHidden || isOptionResolving) {
12221
- return null;
12222
- }
12223
-
12224
- if (document.body.classList.contains('is-wc-nav-folded')) {
12225
- return null;
12226
- }
12227
 
12228
- return Object(external_wp_element_["createElement"])(HighlightTooltip, {
12229
- delay: 1000,
12230
- title: Object(external_wp_i18n_["__"])('Introducing favorites', 'woocommerce-admin'),
12231
- content: Object(external_wp_i18n_["__"])('You can now favorite your extensions to pin them in the top level of the navigation.', 'woocommerce-admin'),
12232
- closeButtonText: Object(external_wp_i18n_["__"])('Got it', 'woocommerce-admin'),
12233
- id: "woocommerce-navigation-favorite-button",
12234
- onClose: function onClose() {
12235
- return updateOptions(defineProperty_default()({}, tooltipHiddenOption, 'yes'));
12236
- },
12237
- useAnchor: true
12238
- });
12239
- };
12240
- /* harmony default export */ var favorites_tooltip = (favorites_tooltip_FavoritesTooltip);
12241
- // CONCATENATED MODULE: ./client/navigation/components/category-title/index.js
12242
 
 
 
 
12243
 
 
 
 
12244
 
 
 
 
 
 
 
12245
  /**
12246
- * Internal dependencies
 
 
 
 
12247
  */
12248
 
 
 
 
12249
 
 
 
 
 
 
 
 
 
 
 
12250
 
12251
- var category_title_CategoryTitle = function CategoryTitle(_ref) {
12252
- var category = _ref.category;
12253
- var id = category.id,
12254
- menuId = category.menuId,
12255
- title = category.title;
12256
- var className = 'woocommerce-navigation-category-title';
12257
 
12258
- if (['plugins', 'favorites'].includes(menuId)) {
12259
- return Object(external_wp_element_["createElement"])("span", {
12260
- className: className
12261
- }, Object(external_wp_element_["createElement"])("span", {
12262
- className: "".concat(className, "__text")
12263
- }, title), Object(external_wp_element_["createElement"])(favorite_button_FavoriteButton, {
12264
- id: id
12265
- }), Object(external_wp_element_["createElement"])(favorites_tooltip_FavoritesTooltip, null));
12266
- }
12267
 
12268
- return Object(external_wp_element_["createElement"])("span", {
12269
- className: className
12270
- }, title);
12271
- };
12272
- /* harmony default export */ var category_title = (category_title_CategoryTitle);
12273
- // CONCATENATED MODULE: ./client/navigation/components/Item/index.js
12274
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12275
 
 
 
 
 
 
12276
  /**
12277
- * External dependencies
 
 
 
 
 
12278
  */
12279
 
12280
 
 
 
 
12281
 
 
 
12282
 
12283
- var Item_Item = function Item(_ref) {
12284
- var item = _ref.item;
12285
- var slot = Object(external_wc_navigation_["useNavSlot"])('woocommerce_navigation_' + item.id);
12286
- var hasFills = Boolean(slot.fills && slot.fills.length);
12287
 
12288
- var trackClick = function trackClick(id) {
12289
- Object(external_wc_tracks_["recordEvent"])('navigation_click', {
12290
- menu_item: id
12291
- });
12292
- }; // Disable reason: The div wrapping the slot item is used for tracking purposes
12293
- // and should not be a tabbable element.
12294
 
12295
- /* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
12296
- // Only render a slot if a coresponding Fill exists and the item is not a category
 
 
12297
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12298
 
12299
- if (hasFills && !item.isCategory) {
12300
- return Object(external_wp_element_["createElement"])(build_module["c" /* NavigationItem */], {
12301
- key: item.id,
12302
- item: item.id
12303
- }, Object(external_wp_element_["createElement"])("div", {
12304
- onClick: function onClick() {
12305
- return trackClick(item.id);
12306
- }
12307
- }, Object(external_wp_element_["createElement"])(external_wc_navigation_["WooNavigationItem"].Slot, {
12308
- name: item.id
12309
- })));
12310
- }
12311
-
12312
- return Object(external_wp_element_["createElement"])(build_module["c" /* NavigationItem */], {
12313
- key: item.id,
12314
- item: item.id,
12315
- title: item.title,
12316
- href: item.url,
12317
- navigateToMenu: !item.url && item.id,
12318
- onClick: function onClick() {
12319
- return trackClick(item.id);
12320
- },
12321
- hideIfTargetMenuEmpty: true
12322
- });
12323
- /* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
12324
- };
12325
 
12326
- /* harmony default export */ var components_Item = (Item_Item);
12327
- // CONCATENATED MODULE: ./client/navigation/components/container/primary-menu.js
12328
 
 
12329
 
 
12330
 
12331
  /**
12332
  * External dependencies
12333
  */
12334
 
12335
-
12336
-
12337
  /**
12338
- * Internal dependencies
12339
  */
12340
 
 
12341
 
 
12342
 
12343
- var primary_menu_PrimaryMenu = function PrimaryMenu(_ref) {
12344
- var category = _ref.category,
12345
- onBackClick = _ref.onBackClick,
12346
- pluginItems = _ref.pluginItems,
12347
- primaryItems = _ref.primaryItems;
12348
 
12349
- if (!primaryItems.length && !pluginItems.length) {
12350
- return null;
12351
- }
12352
 
12353
- var rootBackLabel = Object(external_wp_hooks_["applyFilters"])('woocommerce_navigation_root_back_label', Object(external_wp_i18n_["__"])('WordPress Dashboard', 'woocommerce-admin'));
12354
- var rootBackUrl = Object(external_wp_hooks_["applyFilters"])('woocommerce_navigation_root_back_url', window.wcNavigation.rootBackUrl);
12355
- var isRootBackVisible = category.id === 'woocommerce' && rootBackUrl;
12356
- return Object(external_wp_element_["createElement"])(build_module["d" /* NavigationMenu */], {
12357
- title: Object(external_wp_element_["createElement"])(category_title, {
12358
- category: category
12359
- }),
12360
- menu: category.id,
12361
- parentMenu: category.parent,
12362
- backButtonLabel: isRootBackVisible ? rootBackLabel : category.backButtonLabel || null,
12363
- onBackButtonClick: isRootBackVisible ? function () {
12364
- onBackClick('woocommerce');
12365
- window.location = rootBackUrl;
12366
- } : function () {
12367
- return onBackClick(category.id);
12368
- }
12369
- }, !!primaryItems.length && Object(external_wp_element_["createElement"])(build_module["b" /* NavigationGroup */], null, primaryItems.map(function (item) {
12370
- return Object(external_wp_element_["createElement"])(components_Item, {
12371
- key: item.id,
12372
- item: item
12373
- });
12374
- })), !!pluginItems.length && Object(external_wp_element_["createElement"])(build_module["b" /* NavigationGroup */], {
12375
- title: category.id === 'woocommerce' ? Object(external_wp_i18n_["__"])('Extensions', 'woocommerce-admin') : null
12376
- }, pluginItems.map(function (item) {
12377
- return Object(external_wp_element_["createElement"])(components_Item, {
12378
- key: item.id,
12379
- item: item
12380
- });
12381
- })));
12382
- };
12383
- // CONCATENATED MODULE: ./client/navigation/components/container/secondary-menu.js
12384
 
 
 
 
 
 
 
 
 
12385
 
 
 
 
 
 
 
 
 
12386
 
 
 
 
12387
  /**
12388
- * External dependencies
 
 
12389
  */
12390
 
 
 
 
12391
  /**
12392
- * Internal dependencies
 
 
12393
  */
12394
 
 
 
 
 
 
 
 
 
12395
 
 
 
 
 
 
 
 
 
12396
 
12397
- var secondary_menu_SecondaryMenu = function SecondaryMenu(_ref) {
12398
- var category = _ref.category,
12399
- items = _ref.items,
12400
- onBackClick = _ref.onBackClick;
 
 
 
 
12401
 
12402
- if (!items.length) {
12403
- return null;
12404
- }
 
 
 
 
 
12405
 
12406
- var isRoot = category.id === 'woocommerce';
12407
- return Object(external_wp_element_["createElement"])(build_module["d" /* NavigationMenu */], {
12408
- className: "components-navigation__menu-secondary",
12409
- title: !isRoot && Object(external_wp_element_["createElement"])(category_title, {
12410
- category: category
12411
- }),
12412
- menu: category.id,
12413
- parentMenu: category.parent,
12414
- backButtonLabel: category.backButtonLabel || null,
12415
- onBackButtonClick: isRoot ? null : function () {
12416
- return onBackClick(category.id);
12417
- }
12418
- }, Object(external_wp_element_["createElement"])(build_module["b" /* NavigationGroup */], {
12419
- onBackButtonClick: function onBackButtonClick() {
12420
- return onBackClick(category.id);
12421
- }
12422
- }, items.map(function (item) {
12423
- return Object(external_wp_element_["createElement"])(components_Item, {
12424
- key: item.id,
12425
- item: item
12426
- });
12427
- })));
12428
  };
12429
- // CONCATENATED MODULE: ./client/navigation/components/container/index.js
 
 
 
 
 
 
12430
 
 
 
 
 
12431
 
 
 
 
 
 
 
 
 
 
12432
 
12433
 
 
 
 
12434
 
 
12435
 
 
 
12436
 
 
 
 
 
 
 
 
 
 
 
12437
  /**
12438
  * External dependencies
12439
  */
12440
 
 
 
 
 
12441
 
 
 
 
 
12442
 
 
 
 
 
 
 
 
 
12443
 
 
12444
 
 
 
12445
 
12446
- /**
12447
- * Internal dependencies
12448
- */
12449
-
12450
-
12451
-
12452
-
12453
-
12454
 
12455
- var container_Container = function Container() {
12456
- var _useSelect = Object(external_wp_data_["useSelect"])(function (select) {
12457
- return {
12458
- menuItems: select(external_wc_data_["NAVIGATION_STORE_NAME"]).getMenuItems()
12459
  };
12460
- }),
12461
- menuItems = _useSelect.menuItems;
12462
-
12463
- Object(external_wp_element_["useEffect"])(function () {
12464
- // Collapse the original WP Menu.
12465
- document.documentElement.classList.remove('wp-toolbar');
12466
- document.body.classList.add('has-woocommerce-navigation');
12467
- var adminMenu = document.getElementById('adminmenumain');
12468
-
12469
- if (!adminMenu) {
12470
- return;
12471
- }
12472
-
12473
- adminMenu.classList.add('folded');
12474
- }, []);
12475
-
12476
- var _useState = Object(external_wp_element_["useState"])('woocommerce-home'),
12477
- _useState2 = slicedToArray_default()(_useState, 2),
12478
- activeItem = _useState2[0],
12479
- setActiveItem = _useState2[1];
12480
-
12481
- var _useState3 = Object(external_wp_element_["useState"])('woocommerce'),
12482
- _useState4 = slicedToArray_default()(_useState3, 2),
12483
- activeLevel = _useState4[0],
12484
- setActiveLevel = _useState4[1];
12485
-
12486
- Object(external_wp_element_["useEffect"])(function () {
12487
- var initialMatchedItem = getMatchingItem(menuItems);
12488
-
12489
- if (initialMatchedItem && activeItem !== initialMatchedItem) {
12490
- setActiveItem(initialMatchedItem);
12491
- setActiveLevel(initialMatchedItem.parent);
12492
- }
12493
-
12494
- var removeListener = addHistoryListener(function () {
12495
- setTimeout(function () {
12496
- var matchedItem = getMatchingItem(menuItems);
12497
-
12498
- if (matchedItem) {
12499
- setActiveItem(matchedItem);
12500
- setActiveLevel(matchedItem.parent);
12501
- }
12502
- }, 0);
12503
- });
12504
- return removeListener;
12505
- }, [menuItems]);
12506
-
12507
- var _useUser = Object(external_wc_data_["useUser"])(),
12508
- currentUserCan = _useUser.currentUserCan;
12509
-
12510
- var _useMemo = Object(external_wp_element_["useMemo"])(function () {
12511
- return getMappedItemsCategories(menuItems, currentUserCan);
12512
- }, [menuItems, currentUserCan]),
12513
- categories = _useMemo.categories,
12514
- items = _useMemo.items;
12515
 
12516
- var navDomRef = Object(external_wp_element_["useRef"])(null);
 
12517
 
12518
- var onBackClick = function onBackClick(id) {
12519
- Object(external_wc_tracks_["recordEvent"])('navigation_back_click', {
12520
- category: id
12521
- });
12522
- };
12523
 
12524
- var isRoot = activeLevel === 'woocommerce';
12525
- var classes = classnames_default()('woocommerce-navigation', {
12526
- 'is-root': isRoot
12527
- });
12528
- return Object(external_wp_element_["createElement"])("div", {
12529
- className: classes
12530
- }, Object(external_wp_element_["createElement"])(header, null), Object(external_wp_element_["createElement"])("div", {
12531
- className: "woocommerce-navigation__wrapper",
12532
- ref: navDomRef
12533
- }, Object(external_wp_element_["createElement"])(build_module["a" /* Navigation */], {
12534
- activeItem: activeItem ? activeItem.id : null,
12535
- activeMenu: activeLevel,
12536
- onActivateMenu: function onActivateMenu() {
12537
- if (navDomRef && navDomRef.current) {
12538
- navDomRef.current.scrollTop = 0;
12539
- }
12540
 
12541
- setActiveLevel.apply(void 0, arguments);
12542
- }
12543
- }, Object.values(categories).map(function (category) {
12544
- var categoryItems = items[category.id];
12545
- return !!categoryItems && [Object(external_wp_element_["createElement"])(primary_menu_PrimaryMenu, {
12546
- key: category.id,
12547
- category: category,
12548
- onBackClick: onBackClick,
12549
- primaryItems: [].concat(toConsumableArray_default()(categoryItems.primary), toConsumableArray_default()(categoryItems.favorites)),
12550
- pluginItems: categoryItems.plugins
12551
- }), Object(external_wp_element_["createElement"])(secondary_menu_SecondaryMenu, {
12552
- key: "secondary/".concat(category.id),
12553
- category: category,
12554
- onBackClick: onBackClick,
12555
- items: categoryItems.secondary
12556
- })];
12557
- }))));
12558
- };
12559
 
12560
- /* harmony default export */ var container = (container_Container);
12561
- // CONCATENATED MODULE: ./client/navigation/index.js
12562
 
12563
 
12564
- /**
12565
- * External dependencies
12566
- */
12567
 
 
 
 
12568
 
12569
 
12570
  /**
12571
- * Internal dependencies
12572
  */
12573
 
12574
 
 
12575
 
 
12576
 
12577
- var navigation_Navigation = function Navigation() {
12578
- return Object(external_wp_element_["createElement"])(external_wc_navigation_["NavSlotFillProvider"], null, Object(external_wp_element_["createElement"])(container, null), Object(external_wp_element_["createElement"])(external_wp_plugins_["PluginArea"], null));
12579
- };
12580
-
12581
- var HydratedNavigation = Object(external_wc_data_["withNavigationHydration"])(window.wcNavigation)(navigation_Navigation);
12582
- /* harmony default export */ var navigation = (HydratedNavigation);
12583
- // CONCATENATED MODULE: ./client/header/index.js
12584
-
12585
-
12586
-
12587
-
12588
- function header_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
12589
-
12590
- function header_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { header_ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { header_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
12591
-
12592
-
12593
-
12594
 
 
12595
 
 
12596
 
 
12597
 
 
12598
 
 
12599
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12600
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12601
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12602
 
 
 
 
12603
 
 
 
 
 
 
12604
 
 
 
12605
 
 
 
 
 
12606
 
12607
- /**
12608
- * External dependencies
12609
- */
12610
 
 
12611
 
 
 
 
12612
 
 
 
 
 
12613
 
 
 
12614
 
 
12615
 
 
 
 
 
 
 
12616
 
 
 
 
12617
 
 
 
12618
 
 
12619
 
 
 
12620
 
 
 
 
 
 
 
 
 
 
12621
 
12622
- /**
12623
- * Internal dependencies
12624
- */
 
 
12625
 
 
12626
 
 
12627
 
 
 
12628
 
 
 
 
 
 
12629
 
 
12630
 
 
12631
 
12632
- var header_renderTaskListBackButton = function renderTaskListBackButton() {
12633
- var currentUrl = new URL(window.location.href);
12634
- var task = currentUrl.searchParams.get('task');
12635
 
12636
- if (task) {
12637
- var homeText = Object(external_wp_i18n_["__"])('WooCommerce Home', 'woocommerce-admin');
12638
 
12639
- var navigateHome = function navigateHome() {
12640
- Object(external_wc_tracks_["recordEvent"])('topbar_back_button', {
12641
- page_name: header_getPageTitle(window.title)
12642
- });
12643
- Object(external_wc_navigation_["updateQueryString"])({}, Object(external_wc_navigation_["getHistory"])().location.pathname, {});
12644
- }; // if it's a task list page, render a back button to the homescreen
12645
-
12646
-
12647
- return Object(external_wp_element_["createElement"])(external_wp_components_["Tooltip"], {
12648
- text: homeText
12649
- }, Object(external_wp_element_["createElement"])("div", {
12650
- tabIndex: "0",
12651
- role: "button",
12652
- "data-testid": "header-back-button",
12653
- className: "woocommerce-layout__header-back-button",
12654
- onKeyDown: function onKeyDown(_ref) {
12655
- var keyCode = _ref.keyCode;
12656
-
12657
- if (keyCode === external_wp_keycodes_["ENTER"] || keyCode === external_wp_keycodes_["SPACE"]) {
12658
- navigateHome();
12659
- }
12660
- }
12661
- }, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
12662
- icon: chevron_left["a" /* default */],
12663
- onClick: navigateHome
12664
- })));
12665
  }
12666
 
12667
- return null;
12668
- };
12669
-
12670
- var header_getPageTitle = function getPageTitle(defaultTitle) {
12671
- var currentUrl = new URL(window.location.href);
12672
- var task = currentUrl.searchParams.get('task'); // If it's the task list then render a title based on which task the user is on.
12673
-
12674
- return {
12675
- payments: Object(external_wp_i18n_["__"])('Choose payment methods', 'woocommerce-admin'),
12676
- tax: Object(external_wp_i18n_["__"])('Add tax rates', 'woocommerce-admin'),
12677
- appearance: Object(external_wp_i18n_["__"])('Personalize your store', 'woocommerce-admin'),
12678
- products: Object(external_wp_i18n_["__"])('Add products', 'woocommerce-admin'),
12679
- shipping: Object(external_wp_i18n_["__"])('Set up shipping costs', 'woocommerce-admin')
12680
- }[task] || defaultTitle;
12681
- };
12682
-
12683
- var client_header_Header = function Header(_ref2) {
12684
- var sections = _ref2.sections,
12685
- _ref2$isEmbedded = _ref2.isEmbedded,
12686
- isEmbedded = _ref2$isEmbedded === void 0 ? false : _ref2$isEmbedded,
12687
- query = _ref2.query;
12688
- var headerElement = Object(external_wp_element_["useRef"])(null);
12689
- var siteTitle = Object(wc_admin_settings["g" /* getSetting */])('siteTitle', '');
12690
- var pageTitle = sections.slice(-1)[0];
12691
- var isScrolled = useIsScrolled();
12692
-
12693
- var _useUserPreferences = Object(external_wc_data_["useUserPreferences"])(),
12694
- updateUserPreferences = _useUserPreferences.updateUserPreferences,
12695
- userData = objectWithoutProperties_default()(_useUserPreferences, ["updateUserPreferences"]);
12696
-
12697
- var isModalDismissed = userData.android_app_banner_dismissed === 'yes';
12698
- var debounceTimer = null;
12699
- var className = classnames_default()('woocommerce-layout__header', {
12700
- 'is-scrolled': isScrolled
12701
  });
12702
- Object(external_wp_element_["useLayoutEffect"])(function () {
12703
- updateBodyMargin();
12704
- window.addEventListener('resize', updateBodyMargin);
12705
- return function () {
12706
- window.removeEventListener('resize', updateBodyMargin);
12707
- var wpBody = document.querySelector('#wpbody');
12708
-
12709
- if (!wpBody) {
12710
- return;
12711
- }
12712
 
12713
- wpBody.style.marginTop = null;
12714
- };
12715
- }, [isModalDismissed]);
12716
 
12717
- var updateBodyMargin = function updateBodyMargin() {
12718
- clearTimeout(debounceTimer);
12719
- debounceTimer = setTimeout(function () {
12720
- var wpBody = document.querySelector('#wpbody');
12721
 
12722
- if (!wpBody || !headerElement.current) {
12723
- return;
12724
- }
12725
 
12726
- wpBody.style.marginTop = "".concat(headerElement.current.offsetHeight, "px");
12727
- }, 200);
 
 
 
12728
  };
 
 
12729
 
12730
- Object(external_wp_element_["useEffect"])(function () {
12731
- if (!isEmbedded) {
12732
- var documentTitle = sections.map(function (section) {
12733
- return Array.isArray(section) ? section[1] : section;
12734
- }).reverse().join(' &lsaquo; ');
12735
- var decodedTitle = Object(external_wp_htmlEntities_["decodeEntities"])(Object(external_wp_i18n_["sprintf"])(
12736
- /* translators: 1: document title. 2: page title */
12737
- Object(external_wp_i18n_["__"])('%1$s &lsaquo; %2$s &#8212; WooCommerce', 'woocommerce-admin'), documentTitle, siteTitle));
12738
 
12739
- if (document.title !== decodedTitle) {
12740
- document.title = decodedTitle;
12741
- }
12742
- }
12743
- }, [isEmbedded, sections, siteTitle]);
12744
 
12745
- var dismissHandler = function dismissHandler() {
12746
- updateUserPreferences({
12747
- android_app_banner_dismissed: 'yes'
12748
- });
12749
- };
12750
 
12751
- var backButton = header_renderTaskListBackButton();
12752
- var backButtonClass = backButton ? 'with-back-button' : '';
12753
- return Object(external_wp_element_["createElement"])("div", {
12754
- className: className,
12755
- ref: headerElement
12756
- }, !isModalDismissed && Object(external_wp_element_["createElement"])(mobile_banner_MobileAppBanner, {
12757
- onDismiss: dismissHandler,
12758
- onInstall: dismissHandler
12759
- }), Object(external_wp_element_["createElement"])("div", {
12760
- className: "woocommerce-layout__header-wrapper"
12761
- }, window.wcAdminFeatures.navigation && Object(external_wp_element_["createElement"])(navigation, null), header_renderTaskListBackButton(), Object(external_wp_element_["createElement"])(build_module["e" /* Text */], {
12762
- className: "woocommerce-layout__header-heading ".concat(backButtonClass),
12763
- as: "h1",
12764
- variant: "subtitle.small"
12765
- }, header_getPageTitle(Object(external_wp_htmlEntities_["decodeEntities"])(pageTitle))), window.wcAdminFeatures['activity-panels'] && Object(external_wp_element_["createElement"])(activity_panel, {
12766
- isEmbedded: isEmbedded,
12767
- query: query,
12768
- userPreferencesData: header_objectSpread(header_objectSpread({}, userData), {}, {
12769
- updateUserPreferences: updateUserPreferences
12770
- })
12771
- })));
12772
- };
12773
- // CONCATENATED MODULE: ./client/layout/notices.js
12774
 
 
12775
 
 
 
12776
 
 
12777
 
12778
 
 
12779
 
 
12780
 
 
12781
 
12782
- function notices_createSuper(Derived) { var hasNativeReflectConstruct = notices_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
12783
 
12784
- function notices_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12785
 
12786
- /**
12787
- * External dependencies
12788
- */
12789
 
 
 
 
12790
 
12791
- var notices_Notices = /*#__PURE__*/function (_Component) {
12792
- inherits_default()(Notices, _Component);
12793
 
12794
- var _super = notices_createSuper(Notices);
 
12795
 
12796
- function Notices() {
12797
- classCallCheck_default()(this, Notices);
12798
 
12799
- return _super.apply(this, arguments);
12800
- }
12801
 
12802
- createClass_default()(Notices, [{
12803
- key: "render",
12804
- value: function render() {
12805
- return Object(external_wp_element_["createElement"])("div", {
12806
- id: "woocommerce-layout__notice-list",
12807
- className: "woocommerce-layout__notice-list"
12808
- });
12809
  }
12810
- }]);
12811
 
12812
- return Notices;
12813
- }(external_wp_element_["Component"]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12814
 
12815
- /* harmony default export */ var layout_notices = (notices_Notices);
12816
- // EXTERNAL MODULE: external "regeneratorRuntime"
12817
- var external_regeneratorRuntime_ = __webpack_require__(16);
12818
- var external_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(external_regeneratorRuntime_);
12819
 
12820
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
12821
- var asyncToGenerator = __webpack_require__(134);
12822
- var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
12823
 
12824
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.weak-map.js
12825
- var es_weak_map = __webpack_require__(432);
12826
 
12827
- // EXTERNAL MODULE: ./node_modules/react-spring/web.cjs.js
12828
- var web_cjs = __webpack_require__(315);
12829
 
12830
- // EXTERNAL MODULE: ./client/layout/transient-notices/snackbar/index.js
12831
- var snackbar = __webpack_require__(392);
12832
 
12833
- // CONCATENATED MODULE: ./client/layout/transient-notices/snackbar/list.js
 
12834
 
12835
 
 
12836
 
 
 
12837
 
 
 
12838
 
12839
 
 
12840
 
 
 
12841
 
 
 
 
 
 
 
 
 
 
 
 
 
12842
 
12843
 
 
 
 
12844
 
12845
 
12846
  /**
12847
- * External dependencies
12848
  */
12849
 
12850
 
@@ -12856,216 +11309,196 @@ var snackbar = __webpack_require__(392);
12856
  */
12857
 
12858
 
 
 
 
12859
  /**
12860
- * Renders a list of notices.
 
12861
  *
12862
- * @param {Object} $0 Props passed to the component.
12863
- * @param {Array} $0.notices Array of notices to render.
12864
- * @param {Function} $0.onRemove Function called when a notice should be removed / dismissed.
12865
- * @param {Function} $0.onRemove2 Function called when a notice should be removed / dismissed.
12866
- * @param {Object} $0.className Name of the class used by the component.
12867
- * @param {Object} $0.children Array of children to be rendered inside the notice list.
12868
- * @return {Object} The rendered notices list.
12869
  */
12870
 
12871
- function SnackbarList(_ref) {
12872
- var notices = _ref.notices,
12873
- className = _ref.className,
 
 
 
 
 
 
 
 
12874
  children = _ref.children,
 
 
 
 
 
 
12875
  _ref$onRemove = _ref.onRemove,
12876
- onRemove = _ref$onRemove === void 0 ? external_lodash_["noop"] : _ref$onRemove,
12877
- _ref$onRemove2 = _ref.onRemove2,
12878
- onRemove2 = _ref$onRemove2 === void 0 ? external_lodash_["noop"] : _ref$onRemove2;
12879
- var isReducedMotion = Object(external_wp_compose_["useReducedMotion"])();
 
 
 
 
 
 
 
12880
 
12881
- var _useState = Object(external_wp_element_["useState"])(function () {
12882
- return new WeakMap();
12883
- }),
12884
- _useState2 = slicedToArray_default()(_useState, 1),
12885
- refMap = _useState2[0];
12886
 
12887
- var transitions = Object(web_cjs["useTransition"])(notices, function (notice) {
12888
- return notice.id;
12889
- }, {
12890
- from: {
12891
- opacity: 0,
12892
- height: 0
12893
- },
12894
- enter: function enter(item) {
12895
- return /*#__PURE__*/function () {
12896
- var _ref2 = asyncToGenerator_default()( /*#__PURE__*/external_regeneratorRuntime_default.a.mark(function _callee(next) {
12897
- return external_regeneratorRuntime_default.a.wrap(function _callee$(_context) {
12898
- while (1) {
12899
- switch (_context.prev = _context.next) {
12900
- case 0:
12901
- _context.next = 2;
12902
- return next({
12903
- opacity: 1,
12904
- height: refMap.get(item).offsetHeight
12905
- });
12906
 
12907
- case 2:
12908
- return _context.abrupt("return", _context.sent);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12909
 
12910
- case 3:
12911
- case "end":
12912
- return _context.stop();
12913
- }
12914
- }
12915
- }, _callee);
12916
- }));
 
12917
 
12918
- return function (_x) {
12919
- return _ref2.apply(this, arguments);
12920
- };
12921
- }();
12922
- },
12923
- leave: function leave() {
12924
- return /*#__PURE__*/function () {
12925
- var _ref3 = asyncToGenerator_default()( /*#__PURE__*/external_regeneratorRuntime_default.a.mark(function _callee2(next) {
12926
- return external_regeneratorRuntime_default.a.wrap(function _callee2$(_context2) {
12927
- while (1) {
12928
- switch (_context2.prev = _context2.next) {
12929
- case 0:
12930
- _context2.next = 2;
12931
- return next({
12932
- opacity: 0
12933
- });
12934
 
12935
- case 2:
12936
- _context2.next = 4;
12937
- return next({
12938
- height: 0
12939
- });
12940
 
12941
- case 4:
12942
- case "end":
12943
- return _context2.stop();
12944
- }
12945
- }
12946
- }, _callee2);
12947
- }));
12948
 
12949
- return function (_x2) {
12950
- return _ref3.apply(this, arguments);
12951
- };
12952
- }();
12953
- },
12954
- immediate: isReducedMotion
12955
- });
12956
- className = classnames_default()('components-snackbar-list', className);
12957
 
12958
- var removeNotice = function removeNotice(notice) {
12959
- return function () {
12960
- onRemove(notice.id); // To be removed when we're no longer using core/notices2.
12961
 
12962
- onRemove2(notice.id);
12963
- };
12964
- };
12965
 
12966
- return Object(external_wp_element_["createElement"])("div", {
12967
- className: className
12968
- }, children, transitions.map(function (_ref4) {
12969
- var notice = _ref4.item,
12970
- key = _ref4.key,
12971
- style = _ref4.props;
12972
- return Object(external_wp_element_["createElement"])(web_cjs["animated"].div, {
12973
- key: key,
12974
- style: style
12975
- }, Object(external_wp_element_["createElement"])("div", {
12976
- className: "components-snackbar-list__notice-container",
12977
- ref: function ref(_ref5) {
12978
- return _ref5 && refMap.set(notice, _ref5);
12979
- }
12980
- }, Object(external_wp_element_["createElement"])(snackbar["a" /* default */], extends_default()({}, Object(external_lodash_["omit"])(notice, ['content']), {
12981
- onRemove: removeNotice(notice)
12982
- }), notice.content)));
12983
- }));
12984
- }
12985
 
12986
- /* harmony default export */ var list = (SnackbarList);
12987
- // EXTERNAL MODULE: ./client/layout/transient-notices/style.scss
12988
- var transient_notices_style = __webpack_require__(435);
12989
 
12990
- // CONCATENATED MODULE: ./client/layout/transient-notices/index.js
12991
 
 
12992
 
 
 
12993
 
 
 
 
 
 
12994
  /**
12995
- * External dependencies
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12996
  */
12997
 
12998
 
12999
-
13000
- /**
13001
- * Internal dependencies
13002
- */
13003
-
13004
 
13005
 
 
 
 
13006
 
13007
- function TransientNotices(props) {
13008
- var _useDispatch = Object(external_wp_data_["useDispatch"])('core/notices'),
13009
- onRemove = _useDispatch.removeNotice;
 
 
 
 
13010
 
13011
- var _useDispatch2 = Object(external_wp_data_["useDispatch"])('core/notices2'),
13012
- onRemove2 = _useDispatch2.removeNotice;
13013
 
13014
- var noticeData = Object(external_wp_data_["useSelect"])(function (select) {
13015
- // NOTE: This uses core/notices2, if this file is copied back upstream
13016
- // to Gutenberg this needs to be changed back to just core/notices.
13017
- var notices = select('core/notices').getNotices();
13018
- var notices2 = select('core/notices2').getNotices();
13019
- return {
13020
- notices: notices,
13021
- notices2: notices2
13022
- };
13023
- });
13024
- /**
13025
- * Combines the two notices in the component vs in the useSelect, as we don't want to
13026
- * create new object references on each useSelect call.
13027
- */
13028
 
13029
- var getNotices = function getNotices() {
13030
- var notices = noticeData.notices,
13031
- _noticeData$notices = noticeData.notices2,
13032
- notices2 = _noticeData$notices === void 0 ? [] : _noticeData$notices;
13033
- return notices.concat(notices2);
13034
- };
13035
 
13036
- var className = props.className;
13037
- var classes = classnames_default()('woocommerce-transient-notices', 'components-notices__snackbar', className);
13038
- var notices = getNotices();
13039
- return Object(external_wp_element_["createElement"])(list, {
13040
- notices: notices,
13041
- className: classes,
13042
- onRemove: onRemove,
13043
- onRemove2: onRemove2
13044
- });
13045
- }
13046
 
13047
- TransientNotices.propTypes = {
13048
- /**
13049
- * Additional class name to style the component.
13050
- */
13051
- className: prop_types_default.a.string,
13052
 
13053
- /**
13054
- * Array of notices to be displayed.
13055
- */
13056
- notices: prop_types_default.a.array
13057
  };
13058
- /* harmony default export */ var transient_notices = (TransientNotices);
13059
- // CONCATENATED MODULE: ./client/layout/navigation.js
13060
-
13061
-
13062
-
13063
 
13064
- function navigation_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
13065
 
13066
- function navigation_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { navigation_ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { navigation_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
13067
 
 
 
13068
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13069
 
13070
 
13071
 
@@ -13073,14 +11506,18 @@ function navigation_objectSpread(target) { for (var i = 1; i < arguments.length;
13073
 
13074
 
13075
 
 
13076
 
 
13077
 
13078
  /**
13079
  * External dependencies
13080
  */
13081
 
13082
 
13083
-
 
 
13084
 
13085
 
13086
  /**
@@ -13089,105 +11526,135 @@ function navigation_objectSpread(target) { for (var i = 1; i < arguments.length;
13089
 
13090
 
13091
 
 
 
13092
 
 
13093
 
 
 
13094
 
13095
- var navigation_NavigationPlugin = function NavigationPlugin() {
13096
- var _useState = Object(external_wp_element_["useState"])(Object(external_wc_navigation_["getPersistedQuery"])()),
13097
- _useState2 = slicedToArray_default()(_useState, 2),
13098
- persistedQuery = _useState2[0],
13099
- setPersistedQuery = _useState2[1];
13100
-
13101
- var pathIsExcluded = function pathIsExcluded(path) {
13102
- return Object(external_wc_navigation_["getQueryExcludedScreens"])().includes(Object(external_wc_navigation_["getScreenFromPath"])(path));
13103
- }; // Update the persisted queries when history is updated
13104
-
13105
-
13106
- Object(external_wp_element_["useEffect"])(function () {
13107
- return addHistoryListener(function () {
13108
- setTimeout(function () {
13109
- if (pathIsExcluded()) {
13110
- return;
13111
- }
13112
-
13113
- setPersistedQuery(Object(external_wc_navigation_["getPersistedQuery"])());
13114
- }, 0);
13115
- });
13116
- }, []);
13117
- /**
13118
- * If the current page is embedded, stay with the default urls
13119
- * provided by Navigation because the router isn't present to
13120
- * respond to <Link /> component's manipulation of the url.
13121
- */
13122
-
13123
- if (!Object(utils["f" /* isWCAdmin */])(window.location.href)) {
13124
- return null;
13125
  }
13126
 
13127
- var reports = Object(get_reports["a" /* default */])().filter(function (item) {
13128
- return item.navArgs;
13129
- });
13130
- var pages = controller_getPages().filter(function (page) {
13131
- return page.navArgs;
13132
- }).map(function (page) {
13133
- if (page.path === '/analytics/settings') {
13134
- return navigation_objectSpread(navigation_objectSpread({}, page), {}, {
13135
- breadcrumbs: [Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')]
13136
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13137
  }
 
13138
 
13139
- return page;
13140
- });
13141
- return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, pages.map(function (page) {
13142
- return Object(external_wp_element_["createElement"])(external_wc_navigation_["WooNavigationItem"], {
13143
- item: page.navArgs.id,
13144
- key: page.navArgs.id
13145
- }, Object(external_wp_element_["createElement"])(external_wc_components_["Link"], {
13146
- className: "components-button",
13147
- href: Object(external_wc_navigation_["getNewPath"])(pathIsExcluded(page.path) ? {} : persistedQuery, page.path, {}),
13148
- type: "wc-admin"
13149
- }, page.breadcrumbs[page.breadcrumbs.length - 1]));
13150
- }), reports.map(function (item) {
13151
- return Object(external_wp_element_["createElement"])(external_wc_navigation_["WooNavigationItem"], {
13152
- item: item.navArgs.id,
13153
- key: item.navArgs.id
13154
- }, Object(external_wp_element_["createElement"])(external_wc_components_["Link"], {
13155
- className: "components-button",
13156
- href: Object(external_wc_navigation_["getNewPath"])(pathIsExcluded(item.report) ? {} : persistedQuery, "/analytics/".concat(item.report), {}),
13157
- type: "wc-admin"
13158
- }, item.title));
13159
- }));
13160
- };
13161
 
13162
- Object(external_wp_plugins_["registerPlugin"])('wc-admin-navigation', {
13163
- render: navigation_NavigationPlugin
13164
- });
13165
- // CONCATENATED MODULE: ./client/layout/index.js
 
 
 
 
13166
 
 
 
13167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13168
 
 
 
13169
 
13170
 
 
13171
 
 
 
13172
 
 
13173
 
 
13174
 
 
 
13175
 
 
 
13176
 
 
 
13177
 
 
 
13178
 
 
 
13179
 
 
 
13180
 
 
 
13181
 
13182
- function layout_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
 
13183
 
13184
- function layout_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { layout_ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { layout_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
 
13185
 
13186
- function layout_createSuper(Derived) { var hasNativeReflectConstruct = layout_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
 
13187
 
13188
- function layout_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
 
13189
 
 
 
13190
 
 
13191
 
13192
 
13193
 
@@ -13198,6685 +11665,12183 @@ function layout_isNativeReflectConstruct() { if (typeof Reflect === "undefined"
13198
 
13199
 
13200
 
 
13201
 
 
13202
 
13203
  /**
13204
  * External dependencies
13205
  */
13206
 
 
 
 
13207
 
13208
 
13209
 
13210
 
 
 
13211
 
 
 
 
 
 
13212
 
 
 
13213
 
 
 
13214
 
 
13215
 
 
 
13216
 
 
13217
 
 
 
 
 
 
 
 
13218
 
13219
- /**
13220
- * Internal dependencies
13221
- */
13222
-
13223
-
13224
-
13225
-
13226
-
13227
-
13228
-
13229
- var StoreAlerts = Object(external_wp_element_["lazy"])(function () {
13230
- return Promise.all(/* import() | store-alerts */[__webpack_require__.e(1), __webpack_require__.e(47)]).then(__webpack_require__.bind(null, 714));
13231
- });
13232
- var WCPayUsageModal = Object(external_wp_element_["lazy"])(function () {
13233
- return __webpack_require__.e(/* import() | wcpay-usage-modal */ 51).then(__webpack_require__.bind(null, 609));
13234
- });
13235
- var layout_PrimaryLayout = /*#__PURE__*/function (_Component) {
13236
- inherits_default()(PrimaryLayout, _Component);
13237
-
13238
- var _super = layout_createSuper(PrimaryLayout);
13239
-
13240
- function PrimaryLayout() {
13241
- classCallCheck_default()(this, PrimaryLayout);
13242
-
13243
- return _super.apply(this, arguments);
13244
- }
13245
-
13246
- createClass_default()(PrimaryLayout, [{
13247
- key: "render",
13248
- value: function render() {
13249
- var children = this.props.children;
13250
- return Object(external_wp_element_["createElement"])("div", {
13251
- className: "woocommerce-layout__primary",
13252
- id: "woocommerce-layout__primary"
13253
- }, window.wcAdminFeatures['store-alerts'] && Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
13254
- fallback: Object(external_wp_element_["createElement"])(external_wc_components_["Spinner"], null)
13255
- }, Object(external_wp_element_["createElement"])(StoreAlerts, null)), Object(external_wp_element_["createElement"])(layout_notices, null), children);
13256
- }
13257
- }]);
13258
-
13259
- return PrimaryLayout;
13260
- }(external_wp_element_["Component"]);
13261
-
13262
- var layout_Layout = /*#__PURE__*/function (_Component2) {
13263
- inherits_default()(_Layout, _Component2);
13264
-
13265
- var _super2 = layout_createSuper(_Layout);
13266
-
13267
- function _Layout() {
13268
- classCallCheck_default()(this, _Layout);
13269
-
13270
- return _super2.apply(this, arguments);
13271
- }
13272
-
13273
- createClass_default()(_Layout, [{
13274
  key: "componentDidMount",
13275
  value: function componentDidMount() {
13276
- this.recordPageViewTrack();
 
 
 
 
 
 
13277
  }
13278
  }, {
13279
- key: "componentDidUpdate",
13280
- value: function componentDidUpdate(prevProps) {
13281
- var previousPath = Object(external_lodash_["get"])(prevProps, 'location.pathname');
13282
- var currentPath = Object(external_lodash_["get"])(this.props, 'location.pathname');
13283
-
13284
- if (!previousPath || !currentPath) {
13285
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13286
  }
13287
 
13288
- if (previousPath !== currentPath) {
13289
- this.recordPageViewTrack();
 
 
 
 
 
 
 
13290
  }
13291
  }
13292
  }, {
13293
- key: "recordPageViewTrack",
13294
- value: function recordPageViewTrack() {
13295
- var _this$props = this.props,
13296
- activePlugins = _this$props.activePlugins,
13297
- installedPlugins = _this$props.installedPlugins,
13298
- isEmbedded = _this$props.isEmbedded,
13299
- isJetpackConnected = _this$props.isJetpackConnected;
13300
- var navigationFlag = {
13301
- has_navigation: !!window.wcNavigation
13302
- };
13303
 
13304
- if (isEmbedded) {
13305
- var _path = document.location.pathname + document.location.search;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13306
 
13307
- Object(external_wc_tracks_["recordPageView"])(_path, layout_objectSpread({
13308
- is_embedded: true
13309
- }, navigationFlag));
13310
  return;
13311
  }
13312
 
13313
- var pathname = Object(external_lodash_["get"])(this.props, 'location.pathname');
13314
 
13315
- if (!pathname) {
13316
  return;
13317
- } // Remove leading slash, and camel case remaining pathname
13318
-
13319
-
13320
- var path = pathname.substring(1).replace(/\//g, '_'); // When pathname is `/` we are on the home screen.
13321
-
13322
- if (path.length === 0) {
13323
- path = 'home_screen';
13324
  }
13325
 
13326
- Object(external_wc_tracks_["recordPageView"])(path, layout_objectSpread({
13327
- jetpack_installed: installedPlugins.includes('jetpack'),
13328
- jetpack_active: activePlugins.includes('jetpack'),
13329
- jetpack_connected: isJetpackConnected
13330
- }, navigationFlag));
13331
- }
13332
- }, {
13333
- key: "getQuery",
13334
- value: function getQuery(searchString) {
13335
- if (!searchString) {
13336
- return {};
13337
- }
13338
-
13339
- var search = searchString.substring(1);
13340
- return Object(lib["parse"])(search);
13341
- }
13342
- }, {
13343
- key: "isWCPaySettingsPage",
13344
- value: function isWCPaySettingsPage() {
13345
- var _getQuery = Object(external_wc_navigation_["getQuery"])(),
13346
- page = _getQuery.page,
13347
- section = _getQuery.section,
13348
- tab = _getQuery.tab;
13349
 
13350
- return page === 'wc-settings' && tab === 'checkout' && section === 'woocommerce_payments';
 
 
 
13351
  }
13352
  }, {
13353
  key: "render",
13354
  value: function render() {
13355
  var _this$props2 = this.props,
13356
- isEmbedded = _this$props2.isEmbedded,
13357
- restProps = objectWithoutProperties_default()(_this$props2, ["isEmbedded"]);
13358
 
13359
- var _this$props3 = this.props,
13360
- location = _this$props3.location,
13361
- page = _this$props3.page;
13362
- var breadcrumbs = page.breadcrumbs;
13363
- var query = this.getQuery(location && location.search);
13364
- return Object(external_wp_element_["createElement"])("div", {
13365
- className: "woocommerce-layout"
13366
- }, Object(external_wp_element_["createElement"])(client_header_Header, {
13367
- sections: Object(external_lodash_["isFunction"])(breadcrumbs) ? breadcrumbs(this.props) : breadcrumbs,
13368
- isEmbedded: isEmbedded,
13369
- query: query
13370
- }), Object(external_wp_element_["createElement"])(transient_notices, null), !isEmbedded && Object(external_wp_element_["createElement"])(layout_PrimaryLayout, null, Object(external_wp_element_["createElement"])("div", {
13371
- className: "woocommerce-layout__main"
13372
- }, Object(external_wp_element_["createElement"])(controller_Controller, extends_default()({}, restProps, {
13373
- query: query
13374
- })))), isEmbedded && this.isWCPaySettingsPage() && Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
13375
- fallback: null
13376
- }, Object(external_wp_element_["createElement"])(WCPayUsageModal, null)));
13377
  }
13378
  }]);
13379
 
13380
- return _Layout;
13381
- }(external_wp_element_["Component"]);
13382
 
13383
- layout_Layout.propTypes = {
13384
- isEmbedded: prop_types_default.a.bool,
13385
- page: prop_types_default.a.shape({
13386
- container: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.object // Support React.lazy
13387
- ]),
13388
- path: prop_types_default.a.string,
13389
- breadcrumbs: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.arrayOf(prop_types_default.a.oneOfType([prop_types_default.a.arrayOf(prop_types_default.a.string), prop_types_default.a.string]))]).isRequired,
13390
- wpOpenMenu: prop_types_default.a.string
13391
- }).isRequired
13392
  };
13393
- var Layout = Object(external_wp_compose_["compose"])(Object(external_wc_data_["withPluginsHydration"])(layout_objectSpread(layout_objectSpread({}, window.wcSettings.plugins || {}), {}, {
13394
- jetpackStatus: window.wcSettings.dataEndpoints && window.wcSettings.dataEndpoints.jetpackStatus || false
13395
- })), Object(external_wp_data_["withSelect"])(function (select, _ref) {
13396
- var isEmbedded = _ref.isEmbedded;
13397
 
13398
- // Embedded pages don't send plugin info to Tracks.
13399
- if (isEmbedded) {
13400
- return;
13401
- }
13402
 
13403
- var _select = select(external_wc_data_["PLUGINS_STORE_NAME"]),
13404
- getActivePlugins = _select.getActivePlugins,
13405
- getInstalledPlugins = _select.getInstalledPlugins,
13406
- isJetpackConnected = _select.isJetpackConnected;
13407
 
13408
- return {
13409
- activePlugins: getActivePlugins(),
13410
- isJetpackConnected: isJetpackConnected(),
13411
- installedPlugins: getInstalledPlugins()
13412
- };
13413
- }))(layout_Layout);
13414
 
13415
- var layout_PageLayout = function _PageLayout() {
13416
- var _useUser = Object(external_wc_data_["useUser"])(),
13417
- currentUserCan = _useUser.currentUserCan;
13418
-
13419
- return Object(external_wp_element_["createElement"])(react_router_Router, {
13420
- history: Object(external_wc_navigation_["getHistory"])()
13421
- }, Object(external_wp_element_["createElement"])(react_router_Switch, null, controller_getPages().filter(function (page) {
13422
- return !page.capability || currentUserCan(page.capability);
13423
- }).map(function (page) {
13424
- return Object(external_wp_element_["createElement"])(react_router_Route, {
13425
- key: page.path,
13426
- path: page.path,
13427
- exact: true,
13428
- render: function render(props) {
13429
- return Object(external_wp_element_["createElement"])(Layout, extends_default()({
13430
- page: page
13431
- }, props));
13432
- }
13433
- });
13434
- })));
13435
- };
13436
 
13437
- var PageLayout = Object(external_wp_compose_["compose"])(window.wcSettings.preloadOptions ? Object(external_wc_data_["withOptionsHydration"])(layout_objectSpread({}, window.wcSettings.preloadOptions)) : external_lodash_["identity"])(layout_PageLayout);
 
 
13438
 
13439
- var layout_EmbedLayout = function _EmbedLayout() {
13440
- return Object(external_wp_element_["createElement"])(Layout, {
13441
- page: {
13442
- breadcrumbs: Object(wc_admin_settings["g" /* getSetting */])('embedBreadcrumbs', [])
13443
- },
13444
- isEmbedded: true
13445
- });
13446
- };
13447
 
13448
- var EmbedLayout = Object(external_wp_compose_["compose"])(window.wcSettings.preloadOptions ? Object(external_wc_data_["withOptionsHydration"])(layout_objectSpread({}, window.wcSettings.preloadOptions)) : external_lodash_["identity"])(layout_EmbedLayout);
13449
 
13450
- /***/ }),
13451
- /* 281 */
13452
- /***/ (function(module, exports) {
13453
 
13454
- (function() { module.exports = window["wc"]["number"]; }());
 
 
13455
 
13456
- /***/ }),
13457
- /* 282 */,
13458
- /* 283 */
13459
- /***/ (function(module, exports, __webpack_require__) {
13460
 
13461
- var $ = __webpack_require__(12);
13462
- var from = __webpack_require__(234);
13463
- var checkCorrectnessOfIteration = __webpack_require__(165);
 
 
 
13464
 
13465
- var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
13466
- Array.from(iterable);
13467
- });
 
13468
 
13469
- // `Array.from` method
13470
- // https://tc39.es/ecma262/#sec-array.from
13471
- $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
13472
- from: from
13473
- });
13474
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13475
 
13476
  /***/ }),
13477
- /* 284 */,
13478
- /* 285 */
13479
  /***/ (function(module, exports, __webpack_require__) {
13480
 
13481
- var $ = __webpack_require__(12);
13482
- var $values = __webpack_require__(249).values;
13483
 
13484
- // `Object.values` method
13485
- // https://tc39.es/ecma262/#sec-object.values
13486
- $({ target: 'Object', stat: true }, {
13487
- values: function values(O) {
13488
- return $values(O);
13489
  }
13490
- });
13491
 
 
 
 
 
13492
 
13493
  /***/ }),
13494
- /* 286 */,
13495
- /* 287 */
13496
- /***/ (function(module, exports, __webpack_require__) {
13497
 
13498
- "use strict";
 
13499
 
13500
- // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
13501
- __webpack_require__(151);
13502
- var $ = __webpack_require__(12);
13503
- var DESCRIPTORS = __webpack_require__(13);
13504
- var USE_NATIVE_URL = __webpack_require__(254);
13505
- var global = __webpack_require__(3);
13506
- var defineProperties = __webpack_require__(104);
13507
- var redefine = __webpack_require__(27);
13508
- var anInstance = __webpack_require__(136);
13509
- var has = __webpack_require__(11);
13510
- var assign = __webpack_require__(221);
13511
- var arrayFrom = __webpack_require__(234);
13512
- var codeAt = __webpack_require__(125).codeAt;
13513
- var toASCII = __webpack_require__(294);
13514
- var setToStringTag = __webpack_require__(90);
13515
- var URLSearchParamsModule = __webpack_require__(295);
13516
- var InternalStateModule = __webpack_require__(45);
13517
-
13518
- var NativeURL = global.URL;
13519
- var URLSearchParams = URLSearchParamsModule.URLSearchParams;
13520
- var getInternalSearchParamsState = URLSearchParamsModule.getState;
13521
- var setInternalState = InternalStateModule.set;
13522
- var getInternalURLState = InternalStateModule.getterFor('URL');
13523
- var floor = Math.floor;
13524
- var pow = Math.pow;
13525
-
13526
- var INVALID_AUTHORITY = 'Invalid authority';
13527
- var INVALID_SCHEME = 'Invalid scheme';
13528
- var INVALID_HOST = 'Invalid host';
13529
- var INVALID_PORT = 'Invalid port';
13530
-
13531
- var ALPHA = /[A-Za-z]/;
13532
- var ALPHANUMERIC = /[\d+-.A-Za-z]/;
13533
- var DIGIT = /\d/;
13534
- var HEX_START = /^(0x|0X)/;
13535
- var OCT = /^[0-7]+$/;
13536
- var DEC = /^\d+$/;
13537
- var HEX = /^[\dA-Fa-f]+$/;
13538
- /* eslint-disable no-control-regex -- safe */
13539
- var FORBIDDEN_HOST_CODE_POINT = /[\u0000\t\u000A\u000D #%/:?@[\\]]/;
13540
- var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\t\u000A\u000D #/:?@[\\]]/;
13541
- var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;
13542
- var TAB_AND_NEW_LINE = /[\t\u000A\u000D]/g;
13543
- /* eslint-enable no-control-regex -- safe */
13544
- var EOF;
13545
-
13546
- var parseHost = function (url, input) {
13547
- var result, codePoints, index;
13548
- if (input.charAt(0) == '[') {
13549
- if (input.charAt(input.length - 1) != ']') return INVALID_HOST;
13550
- result = parseIPv6(input.slice(1, -1));
13551
- if (!result) return INVALID_HOST;
13552
- url.host = result;
13553
- // opaque host
13554
- } else if (!isSpecial(url)) {
13555
- if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;
13556
- result = '';
13557
- codePoints = arrayFrom(input);
13558
- for (index = 0; index < codePoints.length; index++) {
13559
- result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
13560
- }
13561
- url.host = result;
13562
- } else {
13563
- input = toASCII(input);
13564
- if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;
13565
- result = parseIPv4(input);
13566
- if (result === null) return INVALID_HOST;
13567
- url.host = result;
13568
- }
13569
- };
13570
 
13571
- var parseIPv4 = function (input) {
13572
- var parts = input.split('.');
13573
- var partsLength, numbers, index, part, radix, number, ipv4;
13574
- if (parts.length && parts[parts.length - 1] == '') {
13575
- parts.pop();
13576
- }
13577
- partsLength = parts.length;
13578
- if (partsLength > 4) return input;
13579
- numbers = [];
13580
- for (index = 0; index < partsLength; index++) {
13581
- part = parts[index];
13582
- if (part == '') return input;
13583
- radix = 10;
13584
- if (part.length > 1 && part.charAt(0) == '0') {
13585
- radix = HEX_START.test(part) ? 16 : 8;
13586
- part = part.slice(radix == 8 ? 1 : 2);
13587
- }
13588
- if (part === '') {
13589
- number = 0;
13590
- } else {
13591
- if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;
13592
- number = parseInt(part, radix);
13593
- }
13594
- numbers.push(number);
13595
- }
13596
- for (index = 0; index < partsLength; index++) {
13597
- number = numbers[index];
13598
- if (index == partsLength - 1) {
13599
- if (number >= pow(256, 5 - partsLength)) return null;
13600
- } else if (number > 255) return null;
13601
- }
13602
- ipv4 = numbers.pop();
13603
- for (index = 0; index < numbers.length; index++) {
13604
- ipv4 += numbers[index] * pow(256, 3 - index);
13605
- }
13606
- return ipv4;
13607
- };
13608
 
13609
- // eslint-disable-next-line max-statements -- TODO
13610
- var parseIPv6 = function (input) {
13611
- var address = [0, 0, 0, 0, 0, 0, 0, 0];
13612
- var pieceIndex = 0;
13613
- var compress = null;
13614
- var pointer = 0;
13615
- var value, length, numbersSeen, ipv4Piece, number, swaps, swap;
13616
 
13617
- var char = function () {
13618
- return input.charAt(pointer);
13619
- };
 
 
 
 
 
 
 
 
 
13620
 
13621
- if (char() == ':') {
13622
- if (input.charAt(1) != ':') return;
13623
- pointer += 2;
13624
- pieceIndex++;
13625
- compress = pieceIndex;
13626
- }
13627
- while (char()) {
13628
- if (pieceIndex == 8) return;
13629
- if (char() == ':') {
13630
- if (compress !== null) return;
13631
- pointer++;
13632
- pieceIndex++;
13633
- compress = pieceIndex;
13634
- continue;
13635
- }
13636
- value = length = 0;
13637
- while (length < 4 && HEX.test(char())) {
13638
- value = value * 16 + parseInt(char(), 16);
13639
- pointer++;
13640
- length++;
13641
- }
13642
- if (char() == '.') {
13643
- if (length == 0) return;
13644
- pointer -= length;
13645
- if (pieceIndex > 6) return;
13646
- numbersSeen = 0;
13647
- while (char()) {
13648
- ipv4Piece = null;
13649
- if (numbersSeen > 0) {
13650
- if (char() == '.' && numbersSeen < 4) pointer++;
13651
- else return;
13652
- }
13653
- if (!DIGIT.test(char())) return;
13654
- while (DIGIT.test(char())) {
13655
- number = parseInt(char(), 10);
13656
- if (ipv4Piece === null) ipv4Piece = number;
13657
- else if (ipv4Piece == 0) return;
13658
- else ipv4Piece = ipv4Piece * 10 + number;
13659
- if (ipv4Piece > 255) return;
13660
- pointer++;
13661
- }
13662
- address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
13663
- numbersSeen++;
13664
- if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
13665
- }
13666
- if (numbersSeen != 4) return;
13667
- break;
13668
- } else if (char() == ':') {
13669
- pointer++;
13670
- if (!char()) return;
13671
- } else if (char()) return;
13672
- address[pieceIndex++] = value;
13673
- }
13674
- if (compress !== null) {
13675
- swaps = pieceIndex - compress;
13676
- pieceIndex = 7;
13677
- while (pieceIndex != 0 && swaps > 0) {
13678
- swap = address[pieceIndex];
13679
- address[pieceIndex--] = address[compress + swaps - 1];
13680
- address[compress + --swaps] = swap;
13681
- }
13682
- } else if (pieceIndex != 8) return;
13683
- return address;
13684
- };
13685
 
13686
- var findLongestZeroSequence = function (ipv6) {
13687
- var maxIndex = null;
13688
- var maxLength = 1;
13689
- var currStart = null;
13690
- var currLength = 0;
13691
- var index = 0;
13692
- for (; index < 8; index++) {
13693
- if (ipv6[index] !== 0) {
13694
- if (currLength > maxLength) {
13695
- maxIndex = currStart;
13696
- maxLength = currLength;
13697
- }
13698
- currStart = null;
13699
- currLength = 0;
13700
- } else {
13701
- if (currStart === null) currStart = index;
13702
- ++currLength;
13703
- }
13704
- }
13705
- if (currLength > maxLength) {
13706
- maxIndex = currStart;
13707
- maxLength = currLength;
13708
- }
13709
- return maxIndex;
13710
- };
13711
 
13712
- var serializeHost = function (host) {
13713
- var result, index, compress, ignore0;
13714
- // ipv4
13715
- if (typeof host == 'number') {
13716
- result = [];
13717
- for (index = 0; index < 4; index++) {
13718
- result.unshift(host % 256);
13719
- host = floor(host / 256);
13720
- } return result.join('.');
13721
- // ipv6
13722
- } else if (typeof host == 'object') {
13723
- result = '';
13724
- compress = findLongestZeroSequence(host);
13725
- for (index = 0; index < 8; index++) {
13726
- if (ignore0 && host[index] === 0) continue;
13727
- if (ignore0) ignore0 = false;
13728
- if (compress === index) {
13729
- result += index ? ':' : '::';
13730
- ignore0 = true;
13731
- } else {
13732
- result += host[index].toString(16);
13733
- if (index < 7) result += ':';
13734
- }
13735
- }
13736
- return '[' + result + ']';
13737
- } return host;
13738
- };
13739
 
13740
- var C0ControlPercentEncodeSet = {};
13741
- var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
13742
- ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
13743
- });
13744
- var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
13745
- '#': 1, '?': 1, '{': 1, '}': 1
13746
- });
13747
- var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
13748
- '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
13749
- });
13750
 
13751
- var percentEncode = function (char, set) {
13752
- var code = codeAt(char, 0);
13753
- return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);
13754
- };
13755
 
13756
- var specialSchemes = {
13757
- ftp: 21,
13758
- file: null,
13759
- http: 80,
13760
- https: 443,
13761
- ws: 80,
13762
- wss: 443
13763
- };
13764
 
13765
- var isSpecial = function (url) {
13766
- return has(specialSchemes, url.scheme);
13767
- };
13768
 
13769
- var includesCredentials = function (url) {
13770
- return url.username != '' || url.password != '';
13771
- };
13772
 
13773
- var cannotHaveUsernamePasswordPort = function (url) {
13774
- return !url.host || url.cannotBeABaseURL || url.scheme == 'file';
13775
- };
13776
 
13777
- var isWindowsDriveLetter = function (string, normalized) {
13778
- var second;
13779
- return string.length == 2 && ALPHA.test(string.charAt(0))
13780
- && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));
13781
- };
13782
 
13783
- var startsWithWindowsDriveLetter = function (string) {
13784
- var third;
13785
- return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (
13786
- string.length == 2 ||
13787
- ((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#')
13788
- );
13789
- };
13790
 
13791
- var shortenURLsPath = function (url) {
13792
- var path = url.path;
13793
- var pathSize = path.length;
13794
- if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
13795
- path.pop();
13796
  }
13797
- };
13798
 
13799
- var isSingleDot = function (segment) {
13800
- return segment === '.' || segment.toLowerCase() === '%2e';
13801
- };
13802
 
13803
- var isDoubleDot = function (segment) {
13804
- segment = segment.toLowerCase();
13805
- return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
13806
- };
13807
 
13808
- // States:
13809
- var SCHEME_START = {};
13810
- var SCHEME = {};
13811
- var NO_SCHEME = {};
13812
- var SPECIAL_RELATIVE_OR_AUTHORITY = {};
13813
- var PATH_OR_AUTHORITY = {};
13814
- var RELATIVE = {};
13815
- var RELATIVE_SLASH = {};
13816
- var SPECIAL_AUTHORITY_SLASHES = {};
13817
- var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
13818
- var AUTHORITY = {};
13819
- var HOST = {};
13820
- var HOSTNAME = {};
13821
- var PORT = {};
13822
- var FILE = {};
13823
- var FILE_SLASH = {};
13824
- var FILE_HOST = {};
13825
- var PATH_START = {};
13826
- var PATH = {};
13827
- var CANNOT_BE_A_BASE_URL_PATH = {};
13828
- var QUERY = {};
13829
- var FRAGMENT = {};
13830
-
13831
- // eslint-disable-next-line max-statements -- TODO
13832
- var parseURL = function (url, input, stateOverride, base) {
13833
- var state = stateOverride || SCHEME_START;
13834
- var pointer = 0;
13835
- var buffer = '';
13836
- var seenAt = false;
13837
- var seenBracket = false;
13838
- var seenPasswordToken = false;
13839
- var codePoints, char, bufferCodePoints, failure;
13840
-
13841
- if (!stateOverride) {
13842
- url.scheme = '';
13843
- url.username = '';
13844
- url.password = '';
13845
- url.host = null;
13846
- url.port = null;
13847
- url.path = [];
13848
- url.query = null;
13849
- url.fragment = null;
13850
- url.cannotBeABaseURL = false;
13851
- input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
13852
- }
13853
-
13854
- input = input.replace(TAB_AND_NEW_LINE, '');
13855
-
13856
- codePoints = arrayFrom(input);
13857
-
13858
- while (pointer <= codePoints.length) {
13859
- char = codePoints[pointer];
13860
- switch (state) {
13861
- case SCHEME_START:
13862
- if (char && ALPHA.test(char)) {
13863
- buffer += char.toLowerCase();
13864
- state = SCHEME;
13865
- } else if (!stateOverride) {
13866
- state = NO_SCHEME;
13867
- continue;
13868
- } else return INVALID_SCHEME;
13869
- break;
13870
 
13871
- case SCHEME:
13872
- if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {
13873
- buffer += char.toLowerCase();
13874
- } else if (char == ':') {
13875
- if (stateOverride && (
13876
- (isSpecial(url) != has(specialSchemes, buffer)) ||
13877
- (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||
13878
- (url.scheme == 'file' && !url.host)
13879
- )) return;
13880
- url.scheme = buffer;
13881
- if (stateOverride) {
13882
- if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;
13883
- return;
13884
- }
13885
- buffer = '';
13886
- if (url.scheme == 'file') {
13887
- state = FILE;
13888
- } else if (isSpecial(url) && base && base.scheme == url.scheme) {
13889
- state = SPECIAL_RELATIVE_OR_AUTHORITY;
13890
- } else if (isSpecial(url)) {
13891
- state = SPECIAL_AUTHORITY_SLASHES;
13892
- } else if (codePoints[pointer + 1] == '/') {
13893
- state = PATH_OR_AUTHORITY;
13894
- pointer++;
13895
- } else {
13896
- url.cannotBeABaseURL = true;
13897
- url.path.push('');
13898
- state = CANNOT_BE_A_BASE_URL_PATH;
13899
- }
13900
- } else if (!stateOverride) {
13901
- buffer = '';
13902
- state = NO_SCHEME;
13903
- pointer = 0;
13904
- continue;
13905
- } else return INVALID_SCHEME;
13906
- break;
13907
 
13908
- case NO_SCHEME:
13909
- if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;
13910
- if (base.cannotBeABaseURL && char == '#') {
13911
- url.scheme = base.scheme;
13912
- url.path = base.path.slice();
13913
- url.query = base.query;
13914
- url.fragment = '';
13915
- url.cannotBeABaseURL = true;
13916
- state = FRAGMENT;
13917
- break;
13918
- }
13919
- state = base.scheme == 'file' ? FILE : RELATIVE;
13920
- continue;
13921
 
13922
- case SPECIAL_RELATIVE_OR_AUTHORITY:
13923
- if (char == '/' && codePoints[pointer + 1] == '/') {
13924
- state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
13925
- pointer++;
13926
- } else {
13927
- state = RELATIVE;
13928
- continue;
13929
- } break;
13930
 
13931
- case PATH_OR_AUTHORITY:
13932
- if (char == '/') {
13933
- state = AUTHORITY;
13934
- break;
13935
- } else {
13936
- state = PATH;
13937
- continue;
13938
- }
13939
 
13940
- case RELATIVE:
13941
- url.scheme = base.scheme;
13942
- if (char == EOF) {
13943
- url.username = base.username;
13944
- url.password = base.password;
13945
- url.host = base.host;
13946
- url.port = base.port;
13947
- url.path = base.path.slice();
13948
- url.query = base.query;
13949
- } else if (char == '/' || (char == '\\' && isSpecial(url))) {
13950
- state = RELATIVE_SLASH;
13951
- } else if (char == '?') {
13952
- url.username = base.username;
13953
- url.password = base.password;
13954
- url.host = base.host;
13955
- url.port = base.port;
13956
- url.path = base.path.slice();
13957
- url.query = '';
13958
- state = QUERY;
13959
- } else if (char == '#') {
13960
- url.username = base.username;
13961
- url.password = base.password;
13962
- url.host = base.host;
13963
- url.port = base.port;
13964
- url.path = base.path.slice();
13965
- url.query = base.query;
13966
- url.fragment = '';
13967
- state = FRAGMENT;
13968
- } else {
13969
- url.username = base.username;
13970
- url.password = base.password;
13971
- url.host = base.host;
13972
- url.port = base.port;
13973
- url.path = base.path.slice();
13974
- url.path.pop();
13975
- state = PATH;
13976
- continue;
13977
- } break;
13978
 
13979
- case RELATIVE_SLASH:
13980
- if (isSpecial(url) && (char == '/' || char == '\\')) {
13981
- state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
13982
- } else if (char == '/') {
13983
- state = AUTHORITY;
13984
- } else {
13985
- url.username = base.username;
13986
- url.password = base.password;
13987
- url.host = base.host;
13988
- url.port = base.port;
13989
- state = PATH;
13990
- continue;
13991
- } break;
13992
 
13993
- case SPECIAL_AUTHORITY_SLASHES:
13994
- state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
13995
- if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;
13996
- pointer++;
13997
- break;
 
 
 
13998
 
13999
- case SPECIAL_AUTHORITY_IGNORE_SLASHES:
14000
- if (char != '/' && char != '\\') {
14001
- state = AUTHORITY;
14002
- continue;
14003
- } break;
14004
-
14005
- case AUTHORITY:
14006
- if (char == '@') {
14007
- if (seenAt) buffer = '%40' + buffer;
14008
- seenAt = true;
14009
- bufferCodePoints = arrayFrom(buffer);
14010
- for (var i = 0; i < bufferCodePoints.length; i++) {
14011
- var codePoint = bufferCodePoints[i];
14012
- if (codePoint == ':' && !seenPasswordToken) {
14013
- seenPasswordToken = true;
14014
- continue;
14015
- }
14016
- var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
14017
- if (seenPasswordToken) url.password += encodedCodePoints;
14018
- else url.username += encodedCodePoints;
14019
- }
14020
- buffer = '';
14021
- } else if (
14022
- char == EOF || char == '/' || char == '?' || char == '#' ||
14023
- (char == '\\' && isSpecial(url))
14024
- ) {
14025
- if (seenAt && buffer == '') return INVALID_AUTHORITY;
14026
- pointer -= arrayFrom(buffer).length + 1;
14027
- buffer = '';
14028
- state = HOST;
14029
- } else buffer += char;
14030
- break;
14031
 
14032
- case HOST:
14033
- case HOSTNAME:
14034
- if (stateOverride && url.scheme == 'file') {
14035
- state = FILE_HOST;
14036
- continue;
14037
- } else if (char == ':' && !seenBracket) {
14038
- if (buffer == '') return INVALID_HOST;
14039
- failure = parseHost(url, buffer);
14040
- if (failure) return failure;
14041
- buffer = '';
14042
- state = PORT;
14043
- if (stateOverride == HOSTNAME) return;
14044
- } else if (
14045
- char == EOF || char == '/' || char == '?' || char == '#' ||
14046
- (char == '\\' && isSpecial(url))
14047
- ) {
14048
- if (isSpecial(url) && buffer == '') return INVALID_HOST;
14049
- if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;
14050
- failure = parseHost(url, buffer);
14051
- if (failure) return failure;
14052
- buffer = '';
14053
- state = PATH_START;
14054
- if (stateOverride) return;
14055
- continue;
14056
- } else {
14057
- if (char == '[') seenBracket = true;
14058
- else if (char == ']') seenBracket = false;
14059
- buffer += char;
14060
- } break;
14061
-
14062
- case PORT:
14063
- if (DIGIT.test(char)) {
14064
- buffer += char;
14065
- } else if (
14066
- char == EOF || char == '/' || char == '?' || char == '#' ||
14067
- (char == '\\' && isSpecial(url)) ||
14068
- stateOverride
14069
- ) {
14070
- if (buffer != '') {
14071
- var port = parseInt(buffer, 10);
14072
- if (port > 0xFFFF) return INVALID_PORT;
14073
- url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;
14074
- buffer = '';
14075
- }
14076
- if (stateOverride) return;
14077
- state = PATH_START;
14078
- continue;
14079
- } else return INVALID_PORT;
14080
- break;
14081
 
14082
- case FILE:
14083
- url.scheme = 'file';
14084
- if (char == '/' || char == '\\') state = FILE_SLASH;
14085
- else if (base && base.scheme == 'file') {
14086
- if (char == EOF) {
14087
- url.host = base.host;
14088
- url.path = base.path.slice();
14089
- url.query = base.query;
14090
- } else if (char == '?') {
14091
- url.host = base.host;
14092
- url.path = base.path.slice();
14093
- url.query = '';
14094
- state = QUERY;
14095
- } else if (char == '#') {
14096
- url.host = base.host;
14097
- url.path = base.path.slice();
14098
- url.query = base.query;
14099
- url.fragment = '';
14100
- state = FRAGMENT;
14101
- } else {
14102
- if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
14103
- url.host = base.host;
14104
- url.path = base.path.slice();
14105
- shortenURLsPath(url);
14106
- }
14107
- state = PATH;
14108
- continue;
14109
- }
14110
- } else {
14111
- state = PATH;
14112
- continue;
14113
- } break;
14114
 
14115
- case FILE_SLASH:
14116
- if (char == '/' || char == '\\') {
14117
- state = FILE_HOST;
14118
- break;
14119
- }
14120
- if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
14121
- if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);
14122
- else url.host = base.host;
14123
- }
14124
- state = PATH;
14125
- continue;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14126
 
14127
- case FILE_HOST:
14128
- if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') {
14129
- if (!stateOverride && isWindowsDriveLetter(buffer)) {
14130
- state = PATH;
14131
- } else if (buffer == '') {
14132
- url.host = '';
14133
- if (stateOverride) return;
14134
- state = PATH_START;
14135
- } else {
14136
- failure = parseHost(url, buffer);
14137
- if (failure) return failure;
14138
- if (url.host == 'localhost') url.host = '';
14139
- if (stateOverride) return;
14140
- buffer = '';
14141
- state = PATH_START;
14142
- } continue;
14143
- } else buffer += char;
14144
- break;
14145
 
14146
- case PATH_START:
14147
- if (isSpecial(url)) {
14148
- state = PATH;
14149
- if (char != '/' && char != '\\') continue;
14150
- } else if (!stateOverride && char == '?') {
14151
- url.query = '';
14152
- state = QUERY;
14153
- } else if (!stateOverride && char == '#') {
14154
- url.fragment = '';
14155
- state = FRAGMENT;
14156
- } else if (char != EOF) {
14157
- state = PATH;
14158
- if (char != '/') continue;
14159
- } break;
14160
-
14161
- case PATH:
14162
- if (
14163
- char == EOF || char == '/' ||
14164
- (char == '\\' && isSpecial(url)) ||
14165
- (!stateOverride && (char == '?' || char == '#'))
14166
- ) {
14167
- if (isDoubleDot(buffer)) {
14168
- shortenURLsPath(url);
14169
- if (char != '/' && !(char == '\\' && isSpecial(url))) {
14170
- url.path.push('');
14171
- }
14172
- } else if (isSingleDot(buffer)) {
14173
- if (char != '/' && !(char == '\\' && isSpecial(url))) {
14174
- url.path.push('');
14175
- }
14176
- } else {
14177
- if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
14178
- if (url.host) url.host = '';
14179
- buffer = buffer.charAt(0) + ':'; // normalize windows drive letter
14180
- }
14181
- url.path.push(buffer);
14182
- }
14183
- buffer = '';
14184
- if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {
14185
- while (url.path.length > 1 && url.path[0] === '') {
14186
- url.path.shift();
14187
- }
14188
- }
14189
- if (char == '?') {
14190
- url.query = '';
14191
- state = QUERY;
14192
- } else if (char == '#') {
14193
- url.fragment = '';
14194
- state = FRAGMENT;
14195
- }
14196
- } else {
14197
- buffer += percentEncode(char, pathPercentEncodeSet);
14198
- } break;
14199
-
14200
- case CANNOT_BE_A_BASE_URL_PATH:
14201
- if (char == '?') {
14202
- url.query = '';
14203
- state = QUERY;
14204
- } else if (char == '#') {
14205
- url.fragment = '';
14206
- state = FRAGMENT;
14207
- } else if (char != EOF) {
14208
- url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);
14209
- } break;
14210
-
14211
- case QUERY:
14212
- if (!stateOverride && char == '#') {
14213
- url.fragment = '';
14214
- state = FRAGMENT;
14215
- } else if (char != EOF) {
14216
- if (char == "'" && isSpecial(url)) url.query += '%27';
14217
- else if (char == '#') url.query += '%23';
14218
- else url.query += percentEncode(char, C0ControlPercentEncodeSet);
14219
- } break;
14220
-
14221
- case FRAGMENT:
14222
- if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);
14223
- break;
14224
- }
14225
 
14226
- pointer++;
14227
- }
14228
- };
 
 
 
 
14229
 
14230
- // `URL` constructor
14231
- // https://url.spec.whatwg.org/#url-class
14232
- var URLConstructor = function URL(url /* , base */) {
14233
- var that = anInstance(this, URLConstructor, 'URL');
14234
- var base = arguments.length > 1 ? arguments[1] : undefined;
14235
- var urlString = String(url);
14236
- var state = setInternalState(that, { type: 'URL' });
14237
- var baseState, failure;
14238
- if (base !== undefined) {
14239
- if (base instanceof URLConstructor) baseState = getInternalURLState(base);
14240
- else {
14241
- failure = parseURL(baseState = {}, String(base));
14242
- if (failure) throw TypeError(failure);
14243
- }
14244
- }
14245
- failure = parseURL(state, urlString, null, baseState);
14246
- if (failure) throw TypeError(failure);
14247
- var searchParams = state.searchParams = new URLSearchParams();
14248
- var searchParamsState = getInternalSearchParamsState(searchParams);
14249
- searchParamsState.updateSearchParams(state.query);
14250
- searchParamsState.updateURL = function () {
14251
- state.query = String(searchParams) || null;
14252
  };
14253
- if (!DESCRIPTORS) {
14254
- that.href = serializeURL.call(that);
14255
- that.origin = getOrigin.call(that);
14256
- that.protocol = getProtocol.call(that);
14257
- that.username = getUsername.call(that);
14258
- that.password = getPassword.call(that);
14259
- that.host = getHost.call(that);
14260
- that.hostname = getHostname.call(that);
14261
- that.port = getPort.call(that);
14262
- that.pathname = getPathname.call(that);
14263
- that.search = getSearch.call(that);
14264
- that.searchParams = getSearchParams.call(that);
14265
- that.hash = getHash.call(that);
14266
- }
14267
- };
14268
-
14269
- var URLPrototype = URLConstructor.prototype;
14270
-
14271
- var serializeURL = function () {
14272
- var url = getInternalURLState(this);
14273
- var scheme = url.scheme;
14274
- var username = url.username;
14275
- var password = url.password;
14276
- var host = url.host;
14277
- var port = url.port;
14278
- var path = url.path;
14279
- var query = url.query;
14280
- var fragment = url.fragment;
14281
- var output = scheme + ':';
14282
- if (host !== null) {
14283
- output += '//';
14284
- if (includesCredentials(url)) {
14285
- output += username + (password ? ':' + password : '') + '@';
14286
- }
14287
- output += serializeHost(host);
14288
- if (port !== null) output += ':' + port;
14289
- } else if (scheme == 'file') output += '//';
14290
- output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
14291
- if (query !== null) output += '?' + query;
14292
- if (fragment !== null) output += '#' + fragment;
14293
- return output;
14294
- };
14295
 
14296
- var getOrigin = function () {
14297
- var url = getInternalURLState(this);
14298
- var scheme = url.scheme;
14299
- var port = url.port;
14300
- if (scheme == 'blob') try {
14301
- return new URL(scheme.path[0]).origin;
14302
- } catch (error) {
14303
- return 'null';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14304
  }
14305
- if (scheme == 'file' || !isSpecial(url)) return 'null';
14306
- return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');
14307
- };
14308
 
14309
- var getProtocol = function () {
14310
- return getInternalURLState(this).scheme + ':';
14311
- };
 
 
 
 
 
 
14312
 
14313
- var getUsername = function () {
14314
- return getInternalURLState(this).username;
14315
- };
 
 
 
 
 
 
 
 
 
14316
 
14317
- var getPassword = function () {
14318
- return getInternalURLState(this).password;
14319
- };
 
 
 
 
14320
 
14321
- var getHost = function () {
14322
- var url = getInternalURLState(this);
14323
- var host = url.host;
14324
- var port = url.port;
14325
- return host === null ? ''
14326
- : port === null ? serializeHost(host)
14327
- : serializeHost(host) + ':' + port;
14328
- };
 
 
 
 
 
 
 
 
 
14329
 
14330
- var getHostname = function () {
14331
- var host = getInternalURLState(this).host;
14332
- return host === null ? '' : serializeHost(host);
14333
- };
 
 
 
 
 
 
 
 
 
14334
 
14335
- var getPort = function () {
14336
- var port = getInternalURLState(this).port;
14337
- return port === null ? '' : String(port);
14338
- };
14339
 
14340
- var getPathname = function () {
14341
- var url = getInternalURLState(this);
14342
- var path = url.path;
14343
- return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
14344
- };
 
14345
 
14346
- var getSearch = function () {
14347
- var query = getInternalURLState(this).query;
14348
- return query ? '?' + query : '';
14349
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14350
 
14351
- var getSearchParams = function () {
14352
- return getInternalURLState(this).searchParams;
14353
- };
 
 
14354
 
14355
- var getHash = function () {
14356
- var fragment = getInternalURLState(this).fragment;
14357
- return fragment ? '#' + fragment : '';
14358
- };
14359
 
14360
- var accessorDescriptor = function (getter, setter) {
14361
- return { get: getter, set: setter, configurable: true, enumerable: true };
14362
- };
 
 
 
14363
 
14364
- if (DESCRIPTORS) {
14365
- defineProperties(URLPrototype, {
14366
- // `URL.prototype.href` accessors pair
14367
- // https://url.spec.whatwg.org/#dom-url-href
14368
- href: accessorDescriptor(serializeURL, function (href) {
14369
- var url = getInternalURLState(this);
14370
- var urlString = String(href);
14371
- var failure = parseURL(url, urlString);
14372
- if (failure) throw TypeError(failure);
14373
- getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
14374
- }),
14375
- // `URL.prototype.origin` getter
14376
- // https://url.spec.whatwg.org/#dom-url-origin
14377
- origin: accessorDescriptor(getOrigin),
14378
- // `URL.prototype.protocol` accessors pair
14379
- // https://url.spec.whatwg.org/#dom-url-protocol
14380
- protocol: accessorDescriptor(getProtocol, function (protocol) {
14381
- var url = getInternalURLState(this);
14382
- parseURL(url, String(protocol) + ':', SCHEME_START);
14383
- }),
14384
- // `URL.prototype.username` accessors pair
14385
- // https://url.spec.whatwg.org/#dom-url-username
14386
- username: accessorDescriptor(getUsername, function (username) {
14387
- var url = getInternalURLState(this);
14388
- var codePoints = arrayFrom(String(username));
14389
- if (cannotHaveUsernamePasswordPort(url)) return;
14390
- url.username = '';
14391
- for (var i = 0; i < codePoints.length; i++) {
14392
- url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
14393
- }
14394
- }),
14395
- // `URL.prototype.password` accessors pair
14396
- // https://url.spec.whatwg.org/#dom-url-password
14397
- password: accessorDescriptor(getPassword, function (password) {
14398
- var url = getInternalURLState(this);
14399
- var codePoints = arrayFrom(String(password));
14400
- if (cannotHaveUsernamePasswordPort(url)) return;
14401
- url.password = '';
14402
- for (var i = 0; i < codePoints.length; i++) {
14403
- url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
14404
- }
14405
- }),
14406
- // `URL.prototype.host` accessors pair
14407
- // https://url.spec.whatwg.org/#dom-url-host
14408
- host: accessorDescriptor(getHost, function (host) {
14409
- var url = getInternalURLState(this);
14410
- if (url.cannotBeABaseURL) return;
14411
- parseURL(url, String(host), HOST);
14412
- }),
14413
- // `URL.prototype.hostname` accessors pair
14414
- // https://url.spec.whatwg.org/#dom-url-hostname
14415
- hostname: accessorDescriptor(getHostname, function (hostname) {
14416
- var url = getInternalURLState(this);
14417
- if (url.cannotBeABaseURL) return;
14418
- parseURL(url, String(hostname), HOSTNAME);
14419
- }),
14420
- // `URL.prototype.port` accessors pair
14421
- // https://url.spec.whatwg.org/#dom-url-port
14422
- port: accessorDescriptor(getPort, function (port) {
14423
- var url = getInternalURLState(this);
14424
- if (cannotHaveUsernamePasswordPort(url)) return;
14425
- port = String(port);
14426
- if (port == '') url.port = null;
14427
- else parseURL(url, port, PORT);
14428
- }),
14429
- // `URL.prototype.pathname` accessors pair
14430
- // https://url.spec.whatwg.org/#dom-url-pathname
14431
- pathname: accessorDescriptor(getPathname, function (pathname) {
14432
- var url = getInternalURLState(this);
14433
- if (url.cannotBeABaseURL) return;
14434
- url.path = [];
14435
- parseURL(url, pathname + '', PATH_START);
14436
- }),
14437
- // `URL.prototype.search` accessors pair
14438
- // https://url.spec.whatwg.org/#dom-url-search
14439
- search: accessorDescriptor(getSearch, function (search) {
14440
- var url = getInternalURLState(this);
14441
- search = String(search);
14442
- if (search == '') {
14443
- url.query = null;
14444
- } else {
14445
- if ('?' == search.charAt(0)) search = search.slice(1);
14446
- url.query = '';
14447
- parseURL(url, search, QUERY);
14448
  }
14449
- getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
14450
- }),
14451
- // `URL.prototype.searchParams` getter
14452
- // https://url.spec.whatwg.org/#dom-url-searchparams
14453
- searchParams: accessorDescriptor(getSearchParams),
14454
- // `URL.prototype.hash` accessors pair
14455
- // https://url.spec.whatwg.org/#dom-url-hash
14456
- hash: accessorDescriptor(getHash, function (hash) {
14457
- var url = getInternalURLState(this);
14458
- hash = String(hash);
14459
- if (hash == '') {
14460
- url.fragment = null;
14461
- return;
14462
  }
14463
- if ('#' == hash.charAt(0)) hash = hash.slice(1);
14464
- url.fragment = '';
14465
- parseURL(url, hash, FRAGMENT);
14466
- })
14467
- });
14468
- }
14469
 
14470
- // `URL.prototype.toJSON` method
14471
- // https://url.spec.whatwg.org/#dom-url-tojson
14472
- redefine(URLPrototype, 'toJSON', function toJSON() {
14473
- return serializeURL.call(this);
14474
- }, { enumerable: true });
14475
-
14476
- // `URL.prototype.toString` method
14477
- // https://url.spec.whatwg.org/#URL-stringification-behavior
14478
- redefine(URLPrototype, 'toString', function toString() {
14479
- return serializeURL.call(this);
14480
- }, { enumerable: true });
14481
-
14482
- if (NativeURL) {
14483
- var nativeCreateObjectURL = NativeURL.createObjectURL;
14484
- var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
14485
- // `URL.createObjectURL` method
14486
- // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
14487
- // eslint-disable-next-line no-unused-vars -- required for `.length`
14488
- if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {
14489
- return nativeCreateObjectURL.apply(NativeURL, arguments);
14490
- });
14491
- // `URL.revokeObjectURL` method
14492
- // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
14493
- // eslint-disable-next-line no-unused-vars -- required for `.length`
14494
- if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {
14495
- return nativeRevokeObjectURL.apply(NativeURL, arguments);
14496
- });
14497
- }
14498
 
14499
- setToStringTag(URLConstructor, 'URL');
 
 
 
 
 
 
 
 
14500
 
14501
- $({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
14502
- URL: URLConstructor
14503
- });
 
14504
 
 
 
 
 
 
14505
 
14506
- /***/ }),
14507
- /* 288 */,
14508
- /* 289 */,
14509
- /* 290 */,
14510
- /* 291 */,
14511
- /* 292 */,
14512
- /* 293 */
14513
- /***/ (function(module, exports) {
14514
 
14515
- (function() { module.exports = window["wp"]["notices"]; }());
 
 
14516
 
14517
- /***/ }),
14518
- /* 294 */
14519
- /***/ (function(module, exports, __webpack_require__) {
14520
 
14521
- "use strict";
 
 
 
 
 
 
14522
 
14523
- // based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
14524
- var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
14525
- var base = 36;
14526
- var tMin = 1;
14527
- var tMax = 26;
14528
- var skew = 38;
14529
- var damp = 700;
14530
- var initialBias = 72;
14531
- var initialN = 128; // 0x80
14532
- var delimiter = '-'; // '\x2D'
14533
- var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
14534
- var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
14535
- var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
14536
- var baseMinusTMin = base - tMin;
14537
- var floor = Math.floor;
14538
- var stringFromCharCode = String.fromCharCode;
14539
-
14540
- /**
14541
- * Creates an array containing the numeric code points of each Unicode
14542
- * character in the string. While JavaScript uses UCS-2 internally,
14543
- * this function will convert a pair of surrogate halves (each of which
14544
- * UCS-2 exposes as separate characters) into a single code point,
14545
- * matching UTF-16.
14546
- */
14547
- var ucs2decode = function (string) {
14548
- var output = [];
14549
- var counter = 0;
14550
- var length = string.length;
14551
- while (counter < length) {
14552
- var value = string.charCodeAt(counter++);
14553
- if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
14554
- // It's a high surrogate, and there is a next character.
14555
- var extra = string.charCodeAt(counter++);
14556
- if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
14557
- output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
14558
- } else {
14559
- // It's an unmatched surrogate; only append this code unit, in case the
14560
- // next code unit is the high surrogate of a surrogate pair.
14561
- output.push(value);
14562
- counter--;
14563
- }
14564
- } else {
14565
- output.push(value);
14566
- }
14567
- }
14568
- return output;
14569
- };
14570
 
14571
- /**
14572
- * Converts a digit/integer into a basic code point.
14573
- */
14574
- var digitToBasic = function (digit) {
14575
- // 0..25 map to ASCII a..z or A..Z
14576
- // 26..35 map to ASCII 0..9
14577
- return digit + 22 + 75 * (digit < 26);
14578
- };
14579
 
14580
- /**
14581
- * Bias adaptation function as per section 3.4 of RFC 3492.
14582
- * https://tools.ietf.org/html/rfc3492#section-3.4
14583
- */
14584
- var adapt = function (delta, numPoints, firstTime) {
14585
- var k = 0;
14586
- delta = firstTime ? floor(delta / damp) : delta >> 1;
14587
- delta += floor(delta / numPoints);
14588
- for (; delta > baseMinusTMin * tMax >> 1; k += base) {
14589
- delta = floor(delta / baseMinusTMin);
14590
  }
14591
- return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
14592
- };
14593
 
14594
- /**
14595
- * Converts a string of Unicode symbols (e.g. a domain name label) to a
14596
- * Punycode string of ASCII-only symbols.
14597
- */
14598
- // eslint-disable-next-line max-statements -- TODO
14599
- var encode = function (input) {
14600
- var output = [];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14601
 
14602
- // Convert the input in UCS-2 to an array of Unicode code points.
14603
- input = ucs2decode(input);
 
 
14604
 
14605
- // Cache the length.
14606
- var inputLength = input.length;
14607
 
14608
- // Initialize the state.
14609
- var n = initialN;
14610
- var delta = 0;
14611
- var bias = initialBias;
14612
- var i, currentValue;
14613
 
14614
- // Handle the basic code points.
14615
- for (i = 0; i < input.length; i++) {
14616
- currentValue = input[i];
14617
- if (currentValue < 0x80) {
14618
- output.push(stringFromCharCode(currentValue));
14619
  }
14620
- }
14621
-
14622
- var basicLength = output.length; // number of basic code points.
14623
- var handledCPCount = basicLength; // number of code points that have been handled;
14624
 
14625
- // Finish the basic string with a delimiter unless it's empty.
14626
- if (basicLength) {
14627
- output.push(delimiter);
14628
- }
14629
 
14630
- // Main encoding loop:
14631
- while (handledCPCount < inputLength) {
14632
- // All non-basic code points < n have been handled already. Find the next larger one:
14633
- var m = maxInt;
14634
- for (i = 0; i < input.length; i++) {
14635
- currentValue = input[i];
14636
- if (currentValue >= n && currentValue < m) {
14637
- m = currentValue;
14638
- }
14639
  }
14640
 
14641
- // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
14642
- var handledCPCountPlusOne = handledCPCount + 1;
14643
- if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
14644
- throw RangeError(OVERFLOW_ERROR);
14645
- }
14646
 
14647
- delta += (m - n) * handledCPCountPlusOne;
14648
- n = m;
14649
 
14650
- for (i = 0; i < input.length; i++) {
14651
- currentValue = input[i];
14652
- if (currentValue < n && ++delta > maxInt) {
14653
- throw RangeError(OVERFLOW_ERROR);
 
 
 
 
 
14654
  }
14655
- if (currentValue == n) {
14656
- // Represent delta as a generalized variable-length integer.
14657
- var q = delta;
14658
- for (var k = base; /* no condition */; k += base) {
14659
- var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
14660
- if (q < t) break;
14661
- var qMinusT = q - t;
14662
- var baseMinusT = base - t;
14663
- output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
14664
- q = floor(qMinusT / baseMinusT);
14665
- }
14666
 
14667
- output.push(stringFromCharCode(digitToBasic(q)));
14668
- bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
14669
- delta = 0;
14670
- ++handledCPCount;
14671
- }
14672
  }
14673
 
14674
- ++delta;
14675
- ++n;
 
 
14676
  }
14677
- return output.join('');
14678
- };
14679
 
14680
- module.exports = function (input) {
14681
- var encoded = [];
14682
- var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.');
14683
- var i, label;
14684
- for (i = 0; i < labels.length; i++) {
14685
- label = labels[i];
14686
- encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);
14687
- }
14688
- return encoded.join('.');
14689
- };
14690
 
 
14691
 
14692
- /***/ }),
14693
- /* 295 */
14694
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
14695
 
14696
- "use strict";
 
 
14697
 
14698
- // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
14699
- __webpack_require__(123);
14700
- var $ = __webpack_require__(12);
14701
- var getBuiltIn = __webpack_require__(31);
14702
- var USE_NATIVE_URL = __webpack_require__(254);
14703
- var redefine = __webpack_require__(27);
14704
- var redefineAll = __webpack_require__(152);
14705
- var setToStringTag = __webpack_require__(90);
14706
- var createIteratorConstructor = __webpack_require__(199);
14707
- var InternalStateModule = __webpack_require__(45);
14708
- var anInstance = __webpack_require__(136);
14709
- var hasOwn = __webpack_require__(11);
14710
- var bind = __webpack_require__(94);
14711
- var classof = __webpack_require__(113);
14712
- var anObject = __webpack_require__(9);
14713
- var isObject = __webpack_require__(10);
14714
- var create = __webpack_require__(69);
14715
- var createPropertyDescriptor = __webpack_require__(39);
14716
- var getIterator = __webpack_require__(296);
14717
- var getIteratorMethod = __webpack_require__(155);
14718
- var wellKnownSymbol = __webpack_require__(8);
14719
-
14720
- var $fetch = getBuiltIn('fetch');
14721
- var Headers = getBuiltIn('Headers');
14722
- var ITERATOR = wellKnownSymbol('iterator');
14723
- var URL_SEARCH_PARAMS = 'URLSearchParams';
14724
- var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
14725
- var setInternalState = InternalStateModule.set;
14726
- var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
14727
- var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);
14728
-
14729
- var plus = /\+/g;
14730
- var sequences = Array(4);
14731
-
14732
- var percentSequence = function (bytes) {
14733
- return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
14734
- };
14735
 
14736
- var percentDecode = function (sequence) {
14737
- try {
14738
- return decodeURIComponent(sequence);
14739
- } catch (error) {
14740
- return sequence;
14741
- }
14742
- };
14743
 
14744
- var deserialize = function (it) {
14745
- var result = it.replace(plus, ' ');
14746
- var bytes = 4;
14747
- try {
14748
- return decodeURIComponent(result);
14749
- } catch (error) {
14750
- while (bytes) {
14751
- result = result.replace(percentSequence(bytes--), percentDecode);
14752
  }
14753
- return result;
 
14754
  }
14755
- };
14756
 
14757
- var find = /[!'()~]|%20/g;
 
 
 
 
 
14758
 
14759
- var replace = {
14760
- '!': '%21',
14761
- "'": '%27',
14762
- '(': '%28',
14763
- ')': '%29',
14764
- '~': '%7E',
14765
- '%20': '+'
14766
- };
14767
 
14768
- var replacer = function (match) {
14769
- return replace[match];
14770
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14771
 
14772
- var serialize = function (it) {
14773
- return encodeURIComponent(it).replace(find, replacer);
14774
- };
 
 
 
 
14775
 
14776
- var parseSearchParams = function (result, query) {
14777
- if (query) {
14778
- var attributes = query.split('&');
14779
- var index = 0;
14780
- var attribute, entry;
14781
- while (index < attributes.length) {
14782
- attribute = attributes[index++];
14783
- if (attribute.length) {
14784
- entry = attribute.split('=');
14785
- result.push({
14786
- key: deserialize(entry.shift()),
14787
- value: deserialize(entry.join('='))
14788
- });
14789
  }
14790
- }
14791
- }
14792
- };
14793
 
14794
- var updateSearchParams = function (query) {
14795
- this.entries.length = 0;
14796
- parseSearchParams(this.entries, query);
14797
- };
14798
 
14799
- var validateArgumentsLength = function (passed, required) {
14800
- if (passed < required) throw TypeError('Not enough arguments');
14801
- };
 
 
 
 
 
 
14802
 
14803
- var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
14804
- setInternalState(this, {
14805
- type: URL_SEARCH_PARAMS_ITERATOR,
14806
- iterator: getIterator(getInternalParamsState(params).entries),
14807
- kind: kind
14808
- });
14809
- }, 'Iterator', function next() {
14810
- var state = getInternalIteratorState(this);
14811
- var kind = state.kind;
14812
- var step = state.iterator.next();
14813
- var entry = step.value;
14814
- if (!step.done) {
14815
- step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
14816
- } return step;
14817
- });
14818
 
14819
- // `URLSearchParams` constructor
14820
- // https://url.spec.whatwg.org/#interface-urlsearchparams
14821
- var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
14822
- anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);
14823
- var init = arguments.length > 0 ? arguments[0] : undefined;
14824
- var that = this;
14825
- var entries = [];
14826
- var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;
14827
-
14828
- setInternalState(that, {
14829
- type: URL_SEARCH_PARAMS,
14830
- entries: entries,
14831
- updateURL: function () { /* empty */ },
14832
- updateSearchParams: updateSearchParams
14833
- });
14834
 
14835
- if (init !== undefined) {
14836
- if (isObject(init)) {
14837
- iteratorMethod = getIteratorMethod(init);
14838
- if (typeof iteratorMethod === 'function') {
14839
- iterator = iteratorMethod.call(init);
14840
- next = iterator.next;
14841
- while (!(step = next.call(iterator)).done) {
14842
- entryIterator = getIterator(anObject(step.value));
14843
- entryNext = entryIterator.next;
14844
- if (
14845
- (first = entryNext.call(entryIterator)).done ||
14846
- (second = entryNext.call(entryIterator)).done ||
14847
- !entryNext.call(entryIterator).done
14848
- ) throw TypeError('Expected sequence with length 2');
14849
- entries.push({ key: first.value + '', value: second.value + '' });
14850
- }
14851
- } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });
14852
- } else {
14853
- parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');
14854
  }
14855
- }
14856
- };
14857
 
14858
- var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
 
 
 
14859
 
14860
- redefineAll(URLSearchParamsPrototype, {
14861
- // `URLSearchParams.prototype.append` method
14862
- // https://url.spec.whatwg.org/#dom-urlsearchparams-append
14863
- append: function append(name, value) {
14864
- validateArgumentsLength(arguments.length, 2);
14865
- var state = getInternalParamsState(this);
14866
- state.entries.push({ key: name + '', value: value + '' });
14867
- state.updateURL();
14868
- },
14869
- // `URLSearchParams.prototype.delete` method
14870
- // https://url.spec.whatwg.org/#dom-urlsearchparams-delete
14871
- 'delete': function (name) {
14872
- validateArgumentsLength(arguments.length, 1);
14873
- var state = getInternalParamsState(this);
14874
- var entries = state.entries;
14875
- var key = name + '';
14876
- var index = 0;
14877
- while (index < entries.length) {
14878
- if (entries[index].key === key) entries.splice(index, 1);
14879
- else index++;
14880
- }
14881
- state.updateURL();
14882
- },
14883
- // `URLSearchParams.prototype.get` method
14884
- // https://url.spec.whatwg.org/#dom-urlsearchparams-get
14885
- get: function get(name) {
14886
- validateArgumentsLength(arguments.length, 1);
14887
- var entries = getInternalParamsState(this).entries;
14888
- var key = name + '';
14889
- var index = 0;
14890
- for (; index < entries.length; index++) {
14891
- if (entries[index].key === key) return entries[index].value;
14892
- }
14893
- return null;
14894
- },
14895
- // `URLSearchParams.prototype.getAll` method
14896
- // https://url.spec.whatwg.org/#dom-urlsearchparams-getall
14897
- getAll: function getAll(name) {
14898
- validateArgumentsLength(arguments.length, 1);
14899
- var entries = getInternalParamsState(this).entries;
14900
- var key = name + '';
14901
- var result = [];
14902
- var index = 0;
14903
- for (; index < entries.length; index++) {
14904
- if (entries[index].key === key) result.push(entries[index].value);
14905
- }
14906
- return result;
14907
- },
14908
- // `URLSearchParams.prototype.has` method
14909
- // https://url.spec.whatwg.org/#dom-urlsearchparams-has
14910
- has: function has(name) {
14911
- validateArgumentsLength(arguments.length, 1);
14912
- var entries = getInternalParamsState(this).entries;
14913
- var key = name + '';
14914
- var index = 0;
14915
- while (index < entries.length) {
14916
- if (entries[index++].key === key) return true;
14917
- }
14918
- return false;
14919
- },
14920
- // `URLSearchParams.prototype.set` method
14921
- // https://url.spec.whatwg.org/#dom-urlsearchparams-set
14922
- set: function set(name, value) {
14923
- validateArgumentsLength(arguments.length, 1);
14924
- var state = getInternalParamsState(this);
14925
- var entries = state.entries;
14926
- var found = false;
14927
- var key = name + '';
14928
- var val = value + '';
14929
- var index = 0;
14930
- var entry;
14931
- for (; index < entries.length; index++) {
14932
- entry = entries[index];
14933
- if (entry.key === key) {
14934
- if (found) entries.splice(index--, 1);
14935
- else {
14936
- found = true;
14937
- entry.value = val;
14938
- }
14939
- }
14940
- }
14941
- if (!found) entries.push({ key: key, value: val });
14942
- state.updateURL();
14943
- },
14944
- // `URLSearchParams.prototype.sort` method
14945
- // https://url.spec.whatwg.org/#dom-urlsearchparams-sort
14946
- sort: function sort() {
14947
- var state = getInternalParamsState(this);
14948
- var entries = state.entries;
14949
- // Array#sort is not stable in some engines
14950
- var slice = entries.slice();
14951
- var entry, entriesIndex, sliceIndex;
14952
- entries.length = 0;
14953
- for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {
14954
- entry = slice[sliceIndex];
14955
- for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {
14956
- if (entries[entriesIndex].key > entry.key) {
14957
- entries.splice(entriesIndex, 0, entry);
14958
- break;
14959
- }
14960
- }
14961
- if (entriesIndex === sliceIndex) entries.push(entry);
14962
- }
14963
- state.updateURL();
14964
- },
14965
- // `URLSearchParams.prototype.forEach` method
14966
- forEach: function forEach(callback /* , thisArg */) {
14967
- var entries = getInternalParamsState(this).entries;
14968
- var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
14969
- var index = 0;
14970
- var entry;
14971
- while (index < entries.length) {
14972
- entry = entries[index++];
14973
- boundFunction(entry.value, entry.key, this);
14974
- }
14975
- },
14976
- // `URLSearchParams.prototype.keys` method
14977
- keys: function keys() {
14978
- return new URLSearchParamsIterator(this, 'keys');
14979
- },
14980
- // `URLSearchParams.prototype.values` method
14981
- values: function values() {
14982
- return new URLSearchParamsIterator(this, 'values');
14983
- },
14984
- // `URLSearchParams.prototype.entries` method
14985
- entries: function entries() {
14986
- return new URLSearchParamsIterator(this, 'entries');
14987
  }
14988
- }, { enumerable: true });
14989
 
14990
- // `URLSearchParams.prototype[@@iterator]` method
14991
- redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);
14992
 
14993
- // `URLSearchParams.prototype.toString` method
14994
- // https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
14995
- redefine(URLSearchParamsPrototype, 'toString', function toString() {
14996
- var entries = getInternalParamsState(this).entries;
14997
- var result = [];
14998
- var index = 0;
14999
- var entry;
15000
- while (index < entries.length) {
15001
- entry = entries[index++];
15002
- result.push(serialize(entry.key) + '=' + serialize(entry.value));
15003
- } return result.join('&');
15004
- }, { enumerable: true });
15005
 
15006
- setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
 
15007
 
15008
- $({ global: true, forced: !USE_NATIVE_URL }, {
15009
- URLSearchParams: URLSearchParamsConstructor
15010
- });
15011
 
15012
- // Wrap `fetch` for correct work with polyfilled `URLSearchParams`
15013
- // https://github.com/zloirock/core-js/issues/674
15014
- if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {
15015
- $({ global: true, enumerable: true, forced: true }, {
15016
- fetch: function fetch(input /* , init */) {
15017
- var args = [input];
15018
- var init, body, headers;
15019
- if (arguments.length > 1) {
15020
- init = arguments[1];
15021
- if (isObject(init)) {
15022
- body = init.body;
15023
- if (classof(body) === URL_SEARCH_PARAMS) {
15024
- headers = init.headers ? new Headers(init.headers) : new Headers();
15025
- if (!headers.has('content-type')) {
15026
- headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
15027
- }
15028
- init = create(init, {
15029
- body: createPropertyDescriptor(0, String(body)),
15030
- headers: createPropertyDescriptor(0, headers)
15031
- });
15032
  }
15033
  }
15034
- args.push(init);
15035
- } return $fetch.apply(this, args);
15036
- }
15037
- });
15038
- }
15039
 
15040
- module.exports = {
15041
- URLSearchParams: URLSearchParamsConstructor,
15042
- getState: getInternalParamsState
15043
- };
15044
 
 
 
 
 
 
15045
 
15046
- /***/ }),
15047
- /* 296 */
15048
- /***/ (function(module, exports, __webpack_require__) {
15049
 
15050
- var anObject = __webpack_require__(9);
15051
- var getIteratorMethod = __webpack_require__(155);
 
 
15052
 
15053
- module.exports = function (it) {
15054
- var iteratorMethod = getIteratorMethod(it);
15055
- if (typeof iteratorMethod != 'function') {
15056
- throw TypeError(String(it) + ' is not iterable');
15057
- } return anObject(iteratorMethod.call(it));
15058
- };
 
 
 
 
 
 
15059
 
 
 
15060
 
15061
- /***/ }),
15062
- /* 297 */
15063
- /***/ (function(module, exports) {
15064
 
15065
- // shim for using process in browser
15066
- var process = module.exports = {};
 
 
 
 
15067
 
15068
- // cached from whatever global is present so that test runners that stub it
15069
- // don't break things. But we need to wrap it in a try catch in case it is
15070
- // wrapped in strict mode code which doesn't define any globals. It's inside a
15071
- // function because try/catches deoptimize in certain engines.
15072
 
15073
- var cachedSetTimeout;
15074
- var cachedClearTimeout;
 
 
 
 
15075
 
15076
- function defaultSetTimout() {
15077
- throw new Error('setTimeout has not been defined');
15078
- }
15079
- function defaultClearTimeout () {
15080
- throw new Error('clearTimeout has not been defined');
15081
- }
15082
- (function () {
15083
- try {
15084
- if (typeof setTimeout === 'function') {
15085
- cachedSetTimeout = setTimeout;
15086
- } else {
15087
- cachedSetTimeout = defaultSetTimout;
15088
- }
15089
- } catch (e) {
15090
- cachedSetTimeout = defaultSetTimout;
15091
- }
15092
- try {
15093
- if (typeof clearTimeout === 'function') {
15094
- cachedClearTimeout = clearTimeout;
15095
- } else {
15096
- cachedClearTimeout = defaultClearTimeout;
15097
  }
15098
- } catch (e) {
15099
- cachedClearTimeout = defaultClearTimeout;
15100
- }
15101
- } ())
15102
- function runTimeout(fun) {
15103
- if (cachedSetTimeout === setTimeout) {
15104
- //normal enviroments in sane situations
15105
- return setTimeout(fun, 0);
15106
- }
15107
- // if setTimeout wasn't available but was latter defined
15108
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
15109
- cachedSetTimeout = setTimeout;
15110
- return setTimeout(fun, 0);
15111
- }
15112
- try {
15113
- // when when somebody has screwed with setTimeout but no I.E. maddness
15114
- return cachedSetTimeout(fun, 0);
15115
- } catch(e){
15116
- try {
15117
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
15118
- return cachedSetTimeout.call(null, fun, 0);
15119
- } catch(e){
15120
- // 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
15121
- return cachedSetTimeout.call(this, fun, 0);
15122
  }
15123
- }
15124
 
 
 
 
 
 
 
 
 
 
15125
 
15126
- }
15127
- function runClearTimeout(marker) {
15128
- if (cachedClearTimeout === clearTimeout) {
15129
- //normal enviroments in sane situations
15130
- return clearTimeout(marker);
15131
- }
15132
- // if clearTimeout wasn't available but was latter defined
15133
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
15134
- cachedClearTimeout = clearTimeout;
15135
- return clearTimeout(marker);
15136
- }
15137
- try {
15138
- // when when somebody has screwed with setTimeout but no I.E. maddness
15139
- return cachedClearTimeout(marker);
15140
- } catch (e){
15141
- try {
15142
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
15143
- return cachedClearTimeout.call(null, marker);
15144
- } catch (e){
15145
- // 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.
15146
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
15147
- return cachedClearTimeout.call(this, marker);
15148
- }
15149
- }
15150
 
 
 
 
 
 
15151
 
 
 
15152
 
15153
- }
15154
- var queue = [];
15155
- var draining = false;
15156
- var currentQueue;
15157
- var queueIndex = -1;
15158
 
15159
- function cleanUpNextTick() {
15160
- if (!draining || !currentQueue) {
15161
- return;
15162
- }
15163
- draining = false;
15164
- if (currentQueue.length) {
15165
- queue = currentQueue.concat(queue);
15166
- } else {
15167
- queueIndex = -1;
15168
- }
15169
- if (queue.length) {
15170
- drainQueue();
15171
- }
15172
- }
15173
 
15174
- function drainQueue() {
15175
- if (draining) {
15176
- return;
15177
- }
15178
- var timeout = runTimeout(cleanUpNextTick);
15179
- draining = true;
15180
 
15181
- var len = queue.length;
15182
- while(len) {
15183
- currentQueue = queue;
15184
- queue = [];
15185
- while (++queueIndex < len) {
15186
- if (currentQueue) {
15187
- currentQueue[queueIndex].run();
15188
- }
15189
  }
15190
- queueIndex = -1;
15191
- len = queue.length;
15192
- }
15193
- currentQueue = null;
15194
- draining = false;
15195
- runClearTimeout(timeout);
15196
- }
15197
 
15198
- process.nextTick = function (fun) {
15199
- var args = new Array(arguments.length - 1);
15200
- if (arguments.length > 1) {
15201
- for (var i = 1; i < arguments.length; i++) {
15202
- args[i - 1] = arguments[i];
 
 
 
 
 
15203
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15204
  }
15205
- queue.push(new Item(fun, args));
15206
- if (queue.length === 1 && !draining) {
15207
- runTimeout(drainQueue);
15208
- }
15209
- };
15210
 
15211
- // v8 likes predictible objects
15212
- function Item(fun, array) {
15213
- this.fun = fun;
15214
- this.array = array;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15215
  }
15216
- Item.prototype.run = function () {
15217
- this.fun.apply(null, this.array);
15218
- };
15219
- process.title = 'browser';
15220
- process.browser = true;
15221
- process.env = {};
15222
- process.argv = [];
15223
- process.version = ''; // empty string to avoid regexp issues
15224
- process.versions = {};
15225
 
15226
- function noop() {}
15227
 
15228
- process.on = noop;
15229
- process.addListener = noop;
15230
- process.once = noop;
15231
- process.off = noop;
15232
- process.removeListener = noop;
15233
- process.removeAllListeners = noop;
15234
- process.emit = noop;
15235
- process.prependListener = noop;
15236
- process.prependOnceListener = noop;
15237
 
15238
- process.listeners = function (name) { return [] }
 
15239
 
15240
- process.binding = function (name) {
15241
- throw new Error('process.binding is not supported');
15242
- };
15243
 
15244
- process.cwd = function () { return '/' };
15245
- process.chdir = function (dir) {
15246
- throw new Error('process.chdir is not supported');
15247
- };
15248
- process.umask = function() { return 0; };
15249
 
 
 
 
 
15250
 
15251
  /***/ }),
15252
- /* 298 */
 
15253
  /***/ (function(module, exports, __webpack_require__) {
15254
 
15255
- "use strict";
15256
- /** @license React v16.13.1
15257
- * react-is.production.min.js
15258
- *
15259
- * Copyright (c) Facebook, Inc. and its affiliates.
15260
- *
15261
- * This source code is licensed under the MIT license found in the
15262
- * LICENSE file in the root directory of this source tree.
15263
- */
15264
 
15265
- var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
15266
- Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
15267
- function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;
15268
- exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};
15269
- exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
15270
- exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;
15271
 
 
15272
 
15273
  /***/ }),
15274
- /* 299 */,
15275
- /* 300 */,
15276
- /* 301 */,
15277
- /* 302 */,
15278
- /* 303 */,
15279
- /* 304 */,
15280
- /* 305 */,
15281
- /* 306 */,
15282
- /* 307 */,
15283
- /* 308 */,
15284
- /* 309 */,
15285
- /* 310 */,
15286
- /* 311 */,
15287
- /* 312 */,
15288
- /* 313 */,
15289
- /* 314 */,
15290
- /* 315 */
15291
  /***/ (function(module, exports, __webpack_require__) {
15292
 
15293
  "use strict";
15294
 
15295
 
15296
- Object.defineProperty(exports, '__esModule', { value: true });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15297
 
15298
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
 
 
 
 
 
 
 
 
15299
 
15300
- var _extends = _interopDefault(__webpack_require__(80));
15301
- var _objectWithoutPropertiesLoose = _interopDefault(__webpack_require__(233));
15302
- var React = __webpack_require__(20);
15303
- var React__default = _interopDefault(React);
15304
- var _inheritsLoose = _interopDefault(__webpack_require__(434));
15305
- var _assertThisInitialized = _interopDefault(__webpack_require__(18));
15306
 
15307
- var is = {
15308
- arr: Array.isArray,
15309
- obj: function obj(a) {
15310
- return Object.prototype.toString.call(a) === '[object Object]';
15311
- },
15312
- fun: function fun(a) {
15313
- return typeof a === 'function';
15314
- },
15315
- str: function str(a) {
15316
- return typeof a === 'string';
15317
- },
15318
- num: function num(a) {
15319
- return typeof a === 'number';
15320
- },
15321
- und: function und(a) {
15322
- return a === void 0;
15323
- },
15324
- nul: function nul(a) {
15325
- return a === null;
15326
- },
15327
- set: function set(a) {
15328
- return a instanceof Set;
15329
- },
15330
- map: function map(a) {
15331
- return a instanceof Map;
15332
- },
15333
- equ: function equ(a, b) {
15334
- if (typeof a !== typeof b) return false;
15335
- if (is.str(a) || is.num(a)) return a === b;
15336
- if (is.obj(a) && is.obj(b) && Object.keys(a).length + Object.keys(b).length === 0) return true;
15337
- var i;
15338
 
15339
- for (i in a) {
15340
- if (!(i in b)) return false;
15341
- }
 
 
 
15342
 
15343
- for (i in b) {
15344
- if (a[i] !== b[i]) return false;
15345
- }
15346
 
15347
- return is.und(i) ? a === b : true;
15348
- }
15349
- };
15350
- function merge(target, lowercase) {
15351
- if (lowercase === void 0) {
15352
- lowercase = true;
15353
- }
15354
 
15355
- return function (object) {
15356
- return (is.arr(object) ? object : Object.keys(object)).reduce(function (acc, element) {
15357
- var key = lowercase ? element[0].toLowerCase() + element.substring(1) : element;
15358
- acc[key] = target(key);
15359
- return acc;
15360
- }, target);
15361
- };
15362
- }
15363
- function useForceUpdate() {
15364
- var _useState = React.useState(false),
15365
- f = _useState[1];
15366
 
15367
- var forceUpdate = React.useCallback(function () {
15368
- return f(function (v) {
15369
- return !v;
15370
- });
15371
- }, []);
15372
- return forceUpdate;
15373
- }
15374
- function withDefault(value, defaultValue) {
15375
- return is.und(value) || is.nul(value) ? defaultValue : value;
15376
- }
15377
- function toArray(a) {
15378
- return !is.und(a) ? is.arr(a) ? a : [a] : [];
15379
- }
15380
- function callProp(obj) {
15381
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
15382
- args[_key - 1] = arguments[_key];
15383
- }
15384
 
15385
- return is.fun(obj) ? obj.apply(void 0, args) : obj;
15386
  }
15387
 
15388
- function getForwardProps(props) {
15389
- var to = props.to,
15390
- from = props.from,
15391
- config = props.config,
15392
- onStart = props.onStart,
15393
- onRest = props.onRest,
15394
- onFrame = props.onFrame,
15395
- children = props.children,
15396
- reset = props.reset,
15397
- reverse = props.reverse,
15398
- force = props.force,
15399
- immediate = props.immediate,
15400
- delay = props.delay,
15401
- attach = props.attach,
15402
- destroyed = props.destroyed,
15403
- interpolateTo = props.interpolateTo,
15404
- ref = props.ref,
15405
- lazy = props.lazy,
15406
- forward = _objectWithoutPropertiesLoose(props, ["to", "from", "config", "onStart", "onRest", "onFrame", "children", "reset", "reverse", "force", "immediate", "delay", "attach", "destroyed", "interpolateTo", "ref", "lazy"]);
15407
 
15408
- return forward;
15409
- }
15410
 
15411
- function interpolateTo(props) {
15412
- var forward = getForwardProps(props);
15413
- if (is.und(forward)) return _extends({
15414
- to: forward
15415
- }, props);
15416
- var rest = Object.keys(props).reduce(function (a, k) {
15417
- var _extends2;
15418
 
15419
- return !is.und(forward[k]) ? a : _extends({}, a, (_extends2 = {}, _extends2[k] = props[k], _extends2));
15420
- }, {});
15421
- return _extends({
15422
- to: forward
15423
- }, rest);
15424
- }
15425
- function handleRef(ref, forward) {
15426
- if (forward) {
15427
- // If it's a function, assume it's a ref callback
15428
- if (is.fun(forward)) forward(ref);else if (is.obj(forward)) {
15429
- forward.current = ref;
15430
- }
15431
- }
15432
 
15433
- return ref;
15434
- }
15435
 
15436
- var Animated =
15437
- /*#__PURE__*/
15438
- function () {
15439
- function Animated() {
15440
- this.payload = void 0;
15441
- this.children = [];
15442
- }
15443
 
15444
- var _proto = Animated.prototype;
 
15445
 
15446
- _proto.getAnimatedValue = function getAnimatedValue() {
15447
- return this.getValue();
15448
- };
15449
 
15450
- _proto.getPayload = function getPayload() {
15451
- return this.payload || this;
15452
- };
15453
 
15454
- _proto.attach = function attach() {};
 
15455
 
15456
- _proto.detach = function detach() {};
 
 
15457
 
15458
- _proto.getChildren = function getChildren() {
15459
- return this.children;
15460
- };
15461
 
15462
- _proto.addChild = function addChild(child) {
15463
- if (this.children.length === 0) this.attach();
15464
- this.children.push(child);
15465
- };
15466
 
15467
- _proto.removeChild = function removeChild(child) {
15468
- var index = this.children.indexOf(child);
15469
- this.children.splice(index, 1);
15470
- if (this.children.length === 0) this.detach();
15471
- };
15472
 
15473
- return Animated;
15474
- }();
15475
- var AnimatedArray =
15476
- /*#__PURE__*/
15477
- function (_Animated) {
15478
- _inheritsLoose(AnimatedArray, _Animated);
15479
 
15480
- function AnimatedArray() {
15481
- var _this;
15482
 
15483
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
15484
- args[_key] = arguments[_key];
15485
- }
15486
 
15487
- _this = _Animated.call.apply(_Animated, [this].concat(args)) || this;
15488
- _this.payload = [];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15489
 
15490
- _this.attach = function () {
15491
- return _this.payload.forEach(function (p) {
15492
- return p instanceof Animated && p.addChild(_assertThisInitialized(_this));
15493
- });
15494
- };
15495
 
15496
- _this.detach = function () {
15497
- return _this.payload.forEach(function (p) {
15498
- return p instanceof Animated && p.removeChild(_assertThisInitialized(_this));
15499
- });
15500
- };
15501
 
15502
- return _this;
15503
- }
15504
 
15505
- return AnimatedArray;
15506
- }(Animated);
15507
- var AnimatedObject =
15508
- /*#__PURE__*/
15509
- function (_Animated2) {
15510
- _inheritsLoose(AnimatedObject, _Animated2);
15511
 
15512
- function AnimatedObject() {
15513
- var _this2;
15514
 
15515
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
15516
- args[_key3] = arguments[_key3];
15517
- }
15518
 
15519
- _this2 = _Animated2.call.apply(_Animated2, [this].concat(args)) || this;
15520
- _this2.payload = {};
 
 
15521
 
15522
- _this2.attach = function () {
15523
- return Object.values(_this2.payload).forEach(function (s) {
15524
- return s instanceof Animated && s.addChild(_assertThisInitialized(_this2));
15525
- });
15526
- };
 
 
15527
 
15528
- _this2.detach = function () {
15529
- return Object.values(_this2.payload).forEach(function (s) {
15530
- return s instanceof Animated && s.removeChild(_assertThisInitialized(_this2));
15531
- });
15532
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15533
 
15534
- return _this2;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15535
  }
15536
 
15537
- var _proto2 = AnimatedObject.prototype;
 
 
 
 
 
 
 
 
 
15538
 
15539
- _proto2.getValue = function getValue(animated) {
15540
- if (animated === void 0) {
15541
- animated = false;
 
 
 
15542
  }
15543
 
15544
- var payload = {};
15545
 
15546
- for (var _key4 in this.payload) {
15547
- var value = this.payload[_key4];
15548
- if (animated && !(value instanceof Animated)) continue;
15549
- payload[_key4] = value instanceof Animated ? value[animated ? 'getAnimatedValue' : 'getValue']() : value;
15550
  }
15551
 
15552
- return payload;
15553
- };
 
 
 
 
15554
 
15555
- _proto2.getAnimatedValue = function getAnimatedValue() {
15556
- return this.getValue(true);
15557
- };
 
15558
 
15559
- return AnimatedObject;
15560
- }(Animated);
 
15561
 
15562
- var applyAnimatedValues;
15563
- function injectApplyAnimatedValues(fn, transform) {
15564
- applyAnimatedValues = {
15565
- fn: fn,
15566
- transform: transform
15567
- };
15568
- }
15569
- var colorNames;
15570
- function injectColorNames(names) {
15571
- colorNames = names;
15572
- }
15573
- var requestFrame = function requestFrame(cb) {
15574
- return typeof window !== 'undefined' ? window.requestAnimationFrame(cb) : -1;
15575
- };
15576
- var cancelFrame = function cancelFrame(id) {
15577
- typeof window !== 'undefined' && window.cancelAnimationFrame(id);
15578
- };
15579
- function injectFrame(raf, caf) {
15580
- requestFrame = raf;
15581
- cancelFrame = caf;
15582
- }
15583
- var interpolation;
15584
- function injectStringInterpolator(fn) {
15585
- interpolation = fn;
15586
- }
15587
- var now = function now() {
15588
- return Date.now();
15589
- };
15590
- function injectNow(nowFn) {
15591
- now = nowFn;
15592
- }
15593
- var defaultElement;
15594
- function injectDefaultElement(el) {
15595
- defaultElement = el;
15596
- }
15597
- var animatedApi = function animatedApi(node) {
15598
- return node.current;
15599
- };
15600
- function injectAnimatedApi(fn) {
15601
- animatedApi = fn;
15602
- }
15603
- var createAnimatedStyle;
15604
- function injectCreateAnimatedStyle(factory) {
15605
- createAnimatedStyle = factory;
15606
- }
15607
- var manualFrameloop;
15608
- function injectManualFrameloop(callback) {
15609
- manualFrameloop = callback;
15610
  }
 
 
 
 
 
 
 
15611
 
15612
- var Globals = /*#__PURE__*/Object.freeze({
15613
- get applyAnimatedValues () { return applyAnimatedValues; },
15614
- injectApplyAnimatedValues: injectApplyAnimatedValues,
15615
- get colorNames () { return colorNames; },
15616
- injectColorNames: injectColorNames,
15617
- get requestFrame () { return requestFrame; },
15618
- get cancelFrame () { return cancelFrame; },
15619
- injectFrame: injectFrame,
15620
- get interpolation () { return interpolation; },
15621
- injectStringInterpolator: injectStringInterpolator,
15622
- get now () { return now; },
15623
- injectNow: injectNow,
15624
- get defaultElement () { return defaultElement; },
15625
- injectDefaultElement: injectDefaultElement,
15626
- get animatedApi () { return animatedApi; },
15627
- injectAnimatedApi: injectAnimatedApi,
15628
- get createAnimatedStyle () { return createAnimatedStyle; },
15629
- injectCreateAnimatedStyle: injectCreateAnimatedStyle,
15630
- get manualFrameloop () { return manualFrameloop; },
15631
- injectManualFrameloop: injectManualFrameloop
15632
- });
15633
 
 
 
 
15634
  /**
15635
- * Wraps the `style` property with `AnimatedStyle`.
 
 
 
 
 
15636
  */
15637
 
15638
- var AnimatedProps =
15639
- /*#__PURE__*/
15640
- function (_AnimatedObject) {
15641
- _inheritsLoose(AnimatedProps, _AnimatedObject);
 
 
 
15642
 
15643
- function AnimatedProps(props, callback) {
15644
- var _this;
 
15645
 
15646
- _this = _AnimatedObject.call(this) || this;
15647
- _this.update = void 0;
15648
- _this.payload = !props.style ? props : _extends({}, props, {
15649
- style: createAnimatedStyle(props.style)
15650
- });
15651
- _this.update = callback;
15652
 
15653
- _this.attach();
15654
 
15655
- return _this;
15656
- }
 
 
 
15657
 
15658
- return AnimatedProps;
15659
- }(AnimatedObject);
15660
 
15661
- var isFunctionComponent = function isFunctionComponent(val) {
15662
- return is.fun(val) && !(val.prototype instanceof React__default.Component);
15663
- };
 
15664
 
15665
- var createAnimatedComponent = function createAnimatedComponent(Component) {
15666
- var AnimatedComponent = React.forwardRef(function (props, ref) {
15667
- var forceUpdate = useForceUpdate();
15668
- var mounted = React.useRef(true);
15669
- var propsAnimated = React.useRef(null);
15670
- var node = React.useRef(null);
15671
- var attachProps = React.useCallback(function (props) {
15672
- var oldPropsAnimated = propsAnimated.current;
 
 
 
 
 
 
 
15673
 
15674
- var callback = function callback() {
15675
- var didUpdate = false;
15676
 
15677
- if (node.current) {
15678
- didUpdate = applyAnimatedValues.fn(node.current, propsAnimated.current.getAnimatedValue());
15679
- }
 
 
 
 
 
 
 
 
 
 
 
15680
 
15681
- if (!node.current || didUpdate === false) {
15682
- // If no referenced node has been found, or the update target didn't have a
15683
- // native-responder, then forceUpdate the animation ...
15684
- forceUpdate();
15685
- }
15686
- };
15687
 
15688
- propsAnimated.current = new AnimatedProps(props, callback);
15689
- oldPropsAnimated && oldPropsAnimated.detach();
15690
- }, []);
15691
- React.useEffect(function () {
15692
- return function () {
15693
- mounted.current = false;
15694
- propsAnimated.current && propsAnimated.current.detach();
15695
- };
15696
- }, []);
15697
- React.useImperativeHandle(ref, function () {
15698
- return animatedApi(node, mounted, forceUpdate);
15699
- });
15700
- attachProps(props);
15701
 
15702
- var _getValue = propsAnimated.current.getValue(),
15703
- scrollTop = _getValue.scrollTop,
15704
- scrollLeft = _getValue.scrollLeft,
15705
- animatedProps = _objectWithoutPropertiesLoose(_getValue, ["scrollTop", "scrollLeft"]); // Functions cannot have refs, see:
15706
- // See: https://github.com/react-spring/react-spring/issues/569
15707
 
 
 
 
15708
 
15709
- var refFn = isFunctionComponent(Component) ? undefined : function (childRef) {
15710
- return node.current = handleRef(childRef, ref);
15711
- };
15712
- return React__default.createElement(Component, _extends({}, animatedProps, {
15713
- ref: refFn
15714
- }));
15715
- });
15716
- return AnimatedComponent;
15717
- };
15718
 
15719
- var active = false;
15720
- var controllers = new Set();
 
 
 
 
 
 
 
15721
 
15722
- var update = function update() {
15723
- if (!active) return false;
15724
- var time = now();
15725
 
15726
- for (var _iterator = controllers, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
15727
- var _ref;
 
15728
 
15729
- if (_isArray) {
15730
- if (_i >= _iterator.length) break;
15731
- _ref = _iterator[_i++];
15732
- } else {
15733
- _i = _iterator.next();
15734
- if (_i.done) break;
15735
- _ref = _i.value;
15736
- }
 
15737
 
15738
- var controller = _ref;
15739
- var isActive = false;
 
 
15740
 
15741
- for (var configIdx = 0; configIdx < controller.configs.length; configIdx++) {
15742
- var config = controller.configs[configIdx];
15743
- var endOfAnimation = void 0,
15744
- lastTime = void 0;
 
 
 
 
 
15745
 
15746
- for (var valIdx = 0; valIdx < config.animatedValues.length; valIdx++) {
15747
- var animation = config.animatedValues[valIdx]; // If an animation is done, skip, until all of them conclude
 
 
15748
 
15749
- if (animation.done) continue;
15750
- var from = config.fromValues[valIdx];
15751
- var to = config.toValues[valIdx];
15752
- var position = animation.lastPosition;
15753
- var isAnimated = to instanceof Animated;
15754
- var velocity = Array.isArray(config.initialVelocity) ? config.initialVelocity[valIdx] : config.initialVelocity;
15755
- if (isAnimated) to = to.getValue(); // Conclude animation if it's either immediate, or from-values match end-state
 
 
 
15756
 
15757
- if (config.immediate) {
15758
- animation.setValue(to);
15759
- animation.done = true;
15760
- continue;
15761
- } // Break animation when string values are involved
15762
 
 
 
 
 
15763
 
15764
- if (typeof from === 'string' || typeof to === 'string') {
15765
- animation.setValue(to);
15766
- animation.done = true;
15767
- continue;
15768
- }
15769
 
15770
- if (config.duration !== void 0) {
15771
- /** Duration easing */
15772
- position = from + config.easing((time - animation.startTime) / config.duration) * (to - from);
15773
- endOfAnimation = time >= animation.startTime + config.duration;
15774
- } else if (config.decay) {
15775
- /** Decay easing */
15776
- position = from + velocity / (1 - 0.998) * (1 - Math.exp(-(1 - 0.998) * (time - animation.startTime)));
15777
- endOfAnimation = Math.abs(animation.lastPosition - position) < 0.1;
15778
- if (endOfAnimation) to = position;
15779
- } else {
15780
- /** Spring easing */
15781
- lastTime = animation.lastTime !== void 0 ? animation.lastTime : time;
15782
- velocity = animation.lastVelocity !== void 0 ? animation.lastVelocity : config.initialVelocity; // If we lost a lot of frames just jump to the end.
15783
-
15784
- if (time > lastTime + 64) lastTime = time; // http://gafferongames.com/game-physics/fix-your-timestep/
15785
 
15786
- var numSteps = Math.floor(time - lastTime);
15787
 
15788
- for (var i = 0; i < numSteps; ++i) {
15789
- var force = -config.tension * (position - to);
15790
- var damping = -config.friction * velocity;
15791
- var acceleration = (force + damping) / config.mass;
15792
- velocity = velocity + acceleration * 1 / 1000;
15793
- position = position + velocity * 1 / 1000;
15794
- } // Conditions for stopping the spring animation
15795
 
 
 
 
 
 
 
 
15796
 
15797
- var isOvershooting = config.clamp && config.tension !== 0 ? from < to ? position > to : position < to : false;
15798
- var isVelocity = Math.abs(velocity) <= config.precision;
15799
- var isDisplacement = config.tension !== 0 ? Math.abs(to - position) <= config.precision : true;
15800
- endOfAnimation = isOvershooting || isVelocity && isDisplacement;
15801
- animation.lastVelocity = velocity;
15802
- animation.lastTime = time;
15803
- } // Trails aren't done until their parents conclude
15804
 
 
 
15805
 
15806
- if (isAnimated && !config.toValues[valIdx].done) endOfAnimation = false;
15807
 
15808
- if (endOfAnimation) {
15809
- // Ensure that we end up with a round value
15810
- if (animation.value !== to) position = to;
15811
- animation.done = true;
15812
- } else isActive = true;
15813
 
15814
- animation.setValue(position);
15815
- animation.lastPosition = position;
15816
- } // Keep track of updated values only when necessary
15817
 
 
 
 
 
15818
 
15819
- if (controller.props.onFrame) controller.values[config.name] = config.interpolation.getValue();
15820
- } // Update callbacks in the end of the frame
15821
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15822
 
15823
- if (controller.props.onFrame) controller.props.onFrame(controller.values); // Either call onEnd or next frame
15824
 
15825
- if (!isActive) {
15826
- controllers.delete(controller);
15827
- controller.stop(true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15828
  }
15829
- } // Loop over as long as there are controllers ...
15830
 
15831
 
15832
- if (controllers.size) {
15833
- if (manualFrameloop) manualFrameloop();else requestFrame(update);
15834
- } else {
15835
- active = false;
15836
- }
15837
 
15838
- return active;
15839
- };
 
 
 
15840
 
15841
- var start = function start(controller) {
15842
- if (!controllers.has(controller)) controllers.add(controller);
 
 
 
 
 
 
 
 
 
 
 
 
15843
 
15844
- if (!active) {
15845
- active = true;
15846
- if (manualFrameloop) requestFrame(manualFrameloop);else requestFrame(update);
15847
- }
15848
- };
 
15849
 
15850
- var stop = function stop(controller) {
15851
- if (controllers.has(controller)) controllers.delete(controller);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15852
  };
15853
 
15854
- function createInterpolator(range, output, extrapolate) {
15855
- if (typeof range === 'function') {
15856
- return range;
15857
- }
 
 
 
 
 
 
 
 
 
 
15858
 
15859
- if (Array.isArray(range)) {
15860
- return createInterpolator({
15861
- range: range,
15862
- output: output,
15863
- extrapolate: extrapolate
15864
- });
15865
- }
15866
 
15867
- if (interpolation && typeof range.output[0] === 'string') {
15868
- return interpolation(range);
15869
- }
 
 
 
 
 
 
15870
 
15871
- var config = range;
15872
- var outputRange = config.output;
15873
- var inputRange = config.range || [0, 1];
15874
- var extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend';
15875
- var extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend';
15876
 
15877
- var easing = config.easing || function (t) {
15878
- return t;
15879
- };
15880
 
15881
- return function (input) {
15882
- var range = findRange(input, inputRange);
15883
- return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map);
15884
- };
15885
- }
15886
 
15887
- function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
15888
- var result = map ? map(input) : input; // Extrapolate
15889
 
15890
- if (result < inputMin) {
15891
- if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin;
15892
- }
15893
 
15894
- if (result > inputMax) {
15895
- if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax;
15896
- }
15897
 
15898
- if (outputMin === outputMax) return outputMin;
15899
- if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax; // Input Range
15900
 
15901
- if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin); // Easing
15902
 
15903
- result = easing(result); // Output Range
 
15904
 
15905
- if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin;
15906
- return result;
 
 
 
 
 
 
 
 
 
15907
  }
15908
 
15909
- function findRange(input, inputRange) {
15910
- for (var i = 1; i < inputRange.length - 1; ++i) {
15911
- if (inputRange[i] >= input) break;
 
 
 
 
 
 
 
15912
  }
15913
 
15914
- return i - 1;
15915
  }
15916
 
15917
- var AnimatedInterpolation =
15918
- /*#__PURE__*/
15919
- function (_AnimatedArray) {
15920
- _inheritsLoose(AnimatedInterpolation, _AnimatedArray);
15921
 
15922
- function AnimatedInterpolation(parents, range, output, extrapolate) {
15923
- var _this;
15924
 
15925
- _this = _AnimatedArray.call(this) || this;
15926
- _this.calc = void 0;
15927
- _this.payload = parents instanceof AnimatedArray && !(parents instanceof AnimatedInterpolation) ? parents.getPayload() : Array.isArray(parents) ? parents : [parents];
15928
- _this.calc = createInterpolator(range, output, extrapolate);
15929
- return _this;
 
 
15930
  }
15931
 
15932
- var _proto = AnimatedInterpolation.prototype;
 
 
 
 
 
15933
 
15934
- _proto.getValue = function getValue() {
15935
- return this.calc.apply(this, this.payload.map(function (value) {
15936
- return value.getValue();
15937
- }));
15938
- };
 
15939
 
15940
- _proto.updateConfig = function updateConfig(range, output, extrapolate) {
15941
- this.calc = createInterpolator(range, output, extrapolate);
15942
- };
15943
 
15944
- _proto.interpolate = function interpolate(range, output, extrapolate) {
15945
- return new AnimatedInterpolation(this, range, output, extrapolate);
15946
- };
15947
 
15948
- return AnimatedInterpolation;
15949
- }(AnimatedArray);
 
 
15950
 
15951
- var interpolate$1 = function interpolate(parents, range, output) {
15952
- return parents && new AnimatedInterpolation(parents, range, output);
15953
- };
15954
 
15955
- var config = {
15956
- default: {
15957
- tension: 170,
15958
- friction: 26
15959
- },
15960
- gentle: {
15961
- tension: 120,
15962
- friction: 14
15963
- },
15964
- wobbly: {
15965
- tension: 180,
15966
- friction: 12
15967
- },
15968
- stiff: {
15969
- tension: 210,
15970
- friction: 20
15971
- },
15972
- slow: {
15973
- tension: 280,
15974
- friction: 60
15975
- },
15976
- molasses: {
15977
- tension: 280,
15978
- friction: 120
15979
- }
15980
- };
15981
 
15982
- /** API
15983
- * useChain(references, timeSteps, timeFrame)
15984
- */
15985
 
15986
- function useChain(refs, timeSteps, timeFrame) {
15987
- if (timeFrame === void 0) {
15988
- timeFrame = 1000;
15989
- }
15990
 
15991
- var previous = React.useRef();
15992
- React.useEffect(function () {
15993
- if (is.equ(refs, previous.current)) refs.forEach(function (_ref) {
15994
- var current = _ref.current;
15995
- return current && current.start();
15996
- });else if (timeSteps) {
15997
- refs.forEach(function (_ref2, index) {
15998
- var current = _ref2.current;
15999
 
16000
- if (current) {
16001
- var ctrls = current.controllers;
16002
 
16003
- if (ctrls.length) {
16004
- var t = timeFrame * timeSteps[index];
16005
- ctrls.forEach(function (ctrl) {
16006
- ctrl.queue = ctrl.queue.map(function (e) {
16007
- return _extends({}, e, {
16008
- delay: e.delay + t
16009
- });
16010
- });
16011
- ctrl.start();
16012
- });
16013
- }
16014
- }
16015
- });
16016
- } else refs.reduce(function (q, _ref3, rI) {
16017
- var current = _ref3.current;
16018
- return q = q.then(function () {
16019
- return current.start();
16020
- });
16021
- }, Promise.resolve());
16022
- previous.current = refs;
16023
- });
16024
- }
16025
 
16026
  /**
16027
- * Animated works by building a directed acyclic graph of dependencies
16028
- * transparently when you render your Animated components.
16029
- *
16030
- * new Animated.Value(0)
16031
- * .interpolate() .interpolate() new Animated.Value(1)
16032
- * opacity translateY scale
16033
- * style transform
16034
- * View#234 style
16035
- * View#123
16036
  *
16037
- * A) Top Down phase
16038
- * When an AnimatedValue is updated, we recursively go down through this
16039
- * graph in order to find leaf nodes: the views that we flag as needing
16040
- * an update.
16041
  *
16042
- * B) Bottom Up phase
16043
- * When a view is flagged as needing an update, we recursively go back up
16044
- * in order to build the new value that it needs. The reason why we need
16045
- * this two-phases process is to deal with composite props such as
16046
- * transform which can receive values from multiple parents.
16047
  */
16048
- function addAnimatedStyles(node, styles) {
16049
- if ('update' in node) {
16050
- styles.add(node);
16051
- } else {
16052
- node.getChildren().forEach(function (child) {
16053
- return addAnimatedStyles(child, styles);
16054
- });
16055
- }
 
16056
  }
16057
 
16058
- var AnimatedValue =
16059
- /*#__PURE__*/
16060
- function (_Animated) {
16061
- _inheritsLoose(AnimatedValue, _Animated);
16062
 
16063
- function AnimatedValue(_value) {
16064
- var _this;
16065
 
16066
- _this = _Animated.call(this) || this;
16067
- _this.animatedStyles = new Set();
16068
- _this.value = void 0;
16069
- _this.startPosition = void 0;
16070
- _this.lastPosition = void 0;
16071
- _this.lastVelocity = void 0;
16072
- _this.startTime = void 0;
16073
- _this.lastTime = void 0;
16074
- _this.done = false;
16075
 
16076
- _this.setValue = function (value, flush) {
16077
- if (flush === void 0) {
16078
- flush = true;
16079
- }
 
16080
 
16081
- _this.value = value;
16082
- if (flush) _this.flush();
16083
- };
16084
 
16085
- _this.value = _value;
16086
- _this.startPosition = _value;
16087
- _this.lastPosition = _value;
16088
- return _this;
16089
- }
16090
 
16091
- var _proto = AnimatedValue.prototype;
 
16092
 
16093
- _proto.flush = function flush() {
16094
- if (this.animatedStyles.size === 0) {
16095
- addAnimatedStyles(this, this.animatedStyles);
16096
- }
16097
 
16098
- this.animatedStyles.forEach(function (animatedStyle) {
16099
- return animatedStyle.update();
16100
- });
16101
- };
16102
 
16103
- _proto.clearStyles = function clearStyles() {
16104
- this.animatedStyles.clear();
16105
- };
 
 
 
 
16106
 
16107
- _proto.getValue = function getValue() {
16108
- return this.value;
16109
- };
16110
 
16111
- _proto.interpolate = function interpolate(range, output, extrapolate) {
16112
- return new AnimatedInterpolation(this, range, output, extrapolate);
16113
- };
16114
 
16115
- return AnimatedValue;
16116
- }(Animated);
16117
 
16118
- var AnimatedValueArray =
16119
- /*#__PURE__*/
16120
- function (_AnimatedArray) {
16121
- _inheritsLoose(AnimatedValueArray, _AnimatedArray);
16122
 
16123
- function AnimatedValueArray(values) {
16124
- var _this;
16125
 
16126
- _this = _AnimatedArray.call(this) || this;
16127
- _this.payload = values.map(function (n) {
16128
- return new AnimatedValue(n);
16129
- });
16130
- return _this;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16131
  }
 
 
 
 
 
 
 
 
 
 
 
 
16132
 
16133
- var _proto = AnimatedValueArray.prototype;
16134
 
16135
- _proto.setValue = function setValue(value, flush) {
16136
- var _this2 = this;
16137
 
16138
- if (flush === void 0) {
16139
- flush = true;
16140
- }
 
16141
 
16142
- if (Array.isArray(value)) {
16143
- if (value.length === this.payload.length) {
16144
- value.forEach(function (v, i) {
16145
- return _this2.payload[i].setValue(v, flush);
16146
- });
16147
- }
16148
- } else {
16149
- this.payload.forEach(function (p) {
16150
- return p.setValue(value, flush);
16151
- });
16152
- }
16153
- };
16154
 
16155
- _proto.getValue = function getValue() {
16156
- return this.payload.map(function (v) {
16157
- return v.getValue();
 
 
 
 
 
 
 
 
 
16158
  });
16159
- };
 
 
16160
 
16161
- _proto.interpolate = function interpolate(range, output) {
16162
- return new AnimatedInterpolation(this, range, output);
16163
- };
16164
 
16165
- return AnimatedValueArray;
16166
- }(AnimatedArray);
16167
 
16168
- var G = 0;
 
16169
 
16170
- var Controller =
16171
- /*#__PURE__*/
16172
- function () {
16173
- function Controller() {
16174
- var _this = this;
 
 
16175
 
16176
- this.id = void 0;
16177
- this.idle = true;
16178
- this.hasChanged = false;
16179
- this.guid = 0;
16180
- this.local = 0;
16181
- this.props = {};
16182
- this.merged = {};
16183
- this.animations = {};
16184
- this.interpolations = {};
16185
- this.values = {};
16186
- this.configs = [];
16187
- this.listeners = [];
16188
- this.queue = [];
16189
- this.localQueue = void 0;
16190
 
16191
- this.getValues = function () {
16192
- return _this.interpolations;
16193
- };
16194
 
16195
- this.id = G++;
 
 
16196
  }
16197
- /** update(props)
16198
- * This function filters input props and creates an array of tasks which are executed in .start()
16199
- * Each task is allowed to carry a delay, which means it can execute asnychroneously */
16200
-
16201
 
16202
- var _proto = Controller.prototype;
 
16203
 
16204
- _proto.update = function update$$1(args) {
16205
- //this._id = n + this.id
16206
- if (!args) return this; // Extract delay and the to-prop from props
16207
 
16208
- var _ref = interpolateTo(args),
16209
- _ref$delay = _ref.delay,
16210
- delay = _ref$delay === void 0 ? 0 : _ref$delay,
16211
- to = _ref.to,
16212
- props = _objectWithoutPropertiesLoose(_ref, ["delay", "to"]);
16213
 
16214
- if (is.arr(to) || is.fun(to)) {
16215
- // If config is either a function or an array queue it up as is
16216
- this.queue.push(_extends({}, props, {
16217
- delay: delay,
16218
- to: to
16219
- }));
16220
- } else if (to) {
16221
- // Otherwise go through each key since it could be delayed individually
16222
- var ops = {};
16223
- Object.entries(to).forEach(function (_ref2) {
16224
- var _to;
16225
 
16226
- var k = _ref2[0],
16227
- v = _ref2[1];
 
 
 
 
 
 
 
 
16228
 
16229
- // Fetch delay and create an entry, consisting of the to-props, the delay, and basic props
16230
- var entry = _extends({
16231
- to: (_to = {}, _to[k] = v, _to),
16232
- delay: callProp(delay, k)
16233
- }, props);
16234
 
16235
- var previous = ops[entry.delay] && ops[entry.delay].to;
16236
- ops[entry.delay] = _extends({}, ops[entry.delay], entry, {
16237
- to: _extends({}, previous, entry.to)
16238
- });
16239
- });
16240
- this.queue = Object.values(ops);
16241
- } // Sort queue, so that async calls go last
16242
 
 
16243
 
16244
- this.queue = this.queue.sort(function (a, b) {
16245
- return a.delay - b.delay;
16246
- }); // Diff the reduced props immediately (they'll contain the from-prop and some config)
16247
 
16248
- this.diff(props);
16249
- return this;
16250
- }
16251
- /** start(onEnd)
16252
- * This function either executes a queue, if present, or starts the frameloop, which animates */
16253
- ;
16254
 
16255
- _proto.start = function start$$1(onEnd) {
16256
- var _this2 = this;
 
16257
 
16258
- // If a queue is present we must excecute it
16259
- if (this.queue.length) {
16260
- this.idle = false; // Updates can interrupt trailing queues, in that case we just merge values
 
 
 
 
16261
 
16262
- if (this.localQueue) {
16263
- this.localQueue.forEach(function (_ref3) {
16264
- var _ref3$from = _ref3.from,
16265
- from = _ref3$from === void 0 ? {} : _ref3$from,
16266
- _ref3$to = _ref3.to,
16267
- to = _ref3$to === void 0 ? {} : _ref3$to;
16268
- if (is.obj(from)) _this2.merged = _extends({}, from, _this2.merged);
16269
- if (is.obj(to)) _this2.merged = _extends({}, _this2.merged, to);
16270
- });
16271
- } // The guid helps us tracking frames, a new queue over an old one means an override
16272
- // We discard async calls in that caseÍ
16273
 
 
 
 
16274
 
16275
- var local = this.local = ++this.guid;
16276
- var queue = this.localQueue = this.queue;
16277
- this.queue = []; // Go through each entry and execute it
 
 
 
 
 
 
 
16278
 
16279
- queue.forEach(function (_ref4, index) {
16280
- var delay = _ref4.delay,
16281
- props = _objectWithoutPropertiesLoose(_ref4, ["delay"]);
 
 
 
16282
 
16283
- var cb = function cb(finished) {
16284
- if (index === queue.length - 1 && local === _this2.guid && finished) {
16285
- _this2.idle = true;
16286
- if (_this2.props.onRest) _this2.props.onRest(_this2.merged);
16287
- }
 
 
 
 
16288
 
16289
- if (onEnd) onEnd();
16290
- }; // Entries can be delayed, ansyc or immediate
 
 
 
 
 
 
16291
 
 
 
 
 
 
 
16292
 
16293
- var async = is.arr(props.to) || is.fun(props.to);
16294
-
16295
- if (delay) {
16296
- setTimeout(function () {
16297
- if (local === _this2.guid) {
16298
- if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
16299
- }
16300
- }, delay);
16301
- } else if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
16302
- });
16303
- } // Otherwise we kick of the frameloop
16304
- else {
16305
- if (is.fun(onEnd)) this.listeners.push(onEnd);
16306
- if (this.props.onStart) this.props.onStart();
16307
-
16308
- start(this);
16309
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16310
 
16311
- return this;
16312
- };
 
 
 
 
 
 
 
16313
 
16314
- _proto.stop = function stop$$1(finished) {
16315
- this.listeners.forEach(function (onEnd) {
16316
- return onEnd(finished);
16317
- });
16318
- this.listeners = [];
16319
- return this;
16320
  }
16321
- /** Pause sets onEnd listeners free, but also removes the controller from the frameloop */
16322
- ;
16323
 
16324
- _proto.pause = function pause(finished) {
16325
- this.stop(true);
16326
- if (finished) stop(this);
16327
- return this;
16328
- };
16329
 
16330
- _proto.runAsync = function runAsync(_ref5, onEnd) {
16331
- var _this3 = this;
16332
 
16333
- var delay = _ref5.delay,
16334
- props = _objectWithoutPropertiesLoose(_ref5, ["delay"]);
16335
 
16336
- var local = this.local; // If "to" is either a function or an array it will be processed async, therefor "to" should be empty right now
16337
- // If the view relies on certain values "from" has to be present
16338
 
16339
- var queue = Promise.resolve(undefined);
16340
 
16341
- if (is.arr(props.to)) {
16342
- var _loop = function _loop(i) {
16343
- var index = i;
16344
 
16345
- var fresh = _extends({}, props, interpolateTo(props.to[index]));
 
 
 
 
16346
 
16347
- if (is.arr(fresh.config)) fresh.config = fresh.config[index];
16348
- queue = queue.then(function () {
16349
- //this.stop()
16350
- if (local === _this3.guid) return new Promise(function (r) {
16351
- return _this3.diff(fresh).start(r);
16352
- });
16353
- });
16354
- };
16355
 
16356
- for (var i = 0; i < props.to.length; i++) {
16357
- _loop(i);
16358
- }
16359
- } else if (is.fun(props.to)) {
16360
- var index = 0;
16361
- var last;
16362
- queue = queue.then(function () {
16363
- return props.to( // next(props)
16364
- function (p) {
16365
- var fresh = _extends({}, props, interpolateTo(p));
16366
 
16367
- if (is.arr(fresh.config)) fresh.config = fresh.config[index];
16368
- index++; //this.stop()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16369
 
16370
- if (local === _this3.guid) return last = new Promise(function (r) {
16371
- return _this3.diff(fresh).start(r);
16372
- });
16373
- return;
16374
- }, // cancel()
16375
- function (finished) {
16376
- if (finished === void 0) {
16377
- finished = true;
16378
- }
16379
 
16380
- return _this3.stop(finished);
16381
- }).then(function () {
16382
- return last;
16383
- });
16384
- });
16385
- }
16386
 
16387
- queue.then(onEnd);
16388
- };
16389
 
16390
- _proto.diff = function diff(props) {
16391
- var _this4 = this;
16392
 
16393
- this.props = _extends({}, this.props, props);
16394
- var _this$props = this.props,
16395
- _this$props$from = _this$props.from,
16396
- from = _this$props$from === void 0 ? {} : _this$props$from,
16397
- _this$props$to = _this$props.to,
16398
- to = _this$props$to === void 0 ? {} : _this$props$to,
16399
- _this$props$config = _this$props.config,
16400
- config = _this$props$config === void 0 ? {} : _this$props$config,
16401
- reverse = _this$props.reverse,
16402
- attach = _this$props.attach,
16403
- reset = _this$props.reset,
16404
- immediate = _this$props.immediate; // Reverse values when requested
16405
 
16406
- if (reverse) {
16407
- var _ref6 = [to, from];
16408
- from = _ref6[0];
16409
- to = _ref6[1];
16410
- } // This will collect all props that were ever set, reset merged props when necessary
16411
 
16412
 
16413
- this.merged = _extends({}, from, this.merged, to);
16414
- this.hasChanged = false; // Attachment handling, trailed springs can "attach" themselves to a previous spring
 
16415
 
16416
- var target = attach && attach(this); // Reduces input { name: value } pairs into animated values
 
 
 
 
16417
 
16418
- this.animations = Object.entries(this.merged).reduce(function (acc, _ref7) {
16419
- var name = _ref7[0],
16420
- value = _ref7[1];
16421
- // Issue cached entries, except on reset
16422
- var entry = acc[name] || {}; // Figure out what the value is supposed to be
16423
 
16424
- var isNumber = is.num(value);
16425
- var isString = is.str(value) && !value.startsWith('#') && !/\d/.test(value) && !colorNames[value];
16426
- var isArray = is.arr(value);
16427
- var isInterpolation = !isNumber && !isArray && !isString;
16428
- var fromValue = !is.und(from[name]) ? from[name] : value;
16429
- var toValue = isNumber || isArray ? value : isString ? value : 1;
16430
- var toConfig = callProp(config, name);
16431
- if (target) toValue = target.animations[name].parent;
16432
- var parent = entry.parent,
16433
- interpolation$$1 = entry.interpolation,
16434
- toValues = toArray(target ? toValue.getPayload() : toValue),
16435
- animatedValues;
16436
- var newValue = value;
16437
- if (isInterpolation) newValue = interpolation({
16438
- range: [0, 1],
16439
- output: [value, value]
16440
- })(1);
16441
- var currentValue = interpolation$$1 && interpolation$$1.getValue(); // Change detection flags
16442
 
16443
- var isFirst = is.und(parent);
16444
- var isActive = !isFirst && entry.animatedValues.some(function (v) {
16445
- return !v.done;
16446
- });
16447
- var currentValueDiffersFromGoal = !is.equ(newValue, currentValue);
16448
- var hasNewGoal = !is.equ(newValue, entry.previous);
16449
- var hasNewConfig = !is.equ(toConfig, entry.config); // Change animation props when props indicate a new goal (new value differs from previous one)
16450
- // and current values differ from it. Config changes trigger a new update as well (though probably shouldn't?)
16451
 
16452
- if (reset || hasNewGoal && currentValueDiffersFromGoal || hasNewConfig) {
16453
- var _extends2;
 
 
 
 
 
 
 
 
16454
 
16455
- // Convert regular values into animated values, ALWAYS re-use if possible
16456
- if (isNumber || isString) parent = interpolation$$1 = entry.parent || new AnimatedValue(fromValue);else if (isArray) parent = interpolation$$1 = entry.parent || new AnimatedValueArray(fromValue);else if (isInterpolation) {
16457
- var prev = entry.interpolation && entry.interpolation.calc(entry.parent.value);
16458
- prev = prev !== void 0 && !reset ? prev : fromValue;
 
 
16459
 
16460
- if (entry.parent) {
16461
- parent = entry.parent;
16462
- parent.setValue(0, false);
16463
- } else parent = new AnimatedValue(0);
 
 
16464
 
16465
- var range = {
16466
- output: [prev, value]
16467
- };
16468
 
16469
- if (entry.interpolation) {
16470
- interpolation$$1 = entry.interpolation;
16471
- entry.interpolation.updateConfig(range);
16472
- } else interpolation$$1 = parent.interpolate(range);
16473
- }
16474
- toValues = toArray(target ? toValue.getPayload() : toValue);
16475
- animatedValues = toArray(parent.getPayload());
16476
- if (reset && !isInterpolation) parent.setValue(fromValue, false);
16477
- _this4.hasChanged = true; // Reset animated values
16478
 
16479
- animatedValues.forEach(function (value) {
16480
- value.startPosition = value.value;
16481
- value.lastPosition = value.value;
16482
- value.lastVelocity = isActive ? value.lastVelocity : undefined;
16483
- value.lastTime = isActive ? value.lastTime : undefined;
16484
- value.startTime = now();
16485
- value.done = false;
16486
- value.animatedStyles.clear();
16487
- }); // Set immediate values
16488
 
16489
- if (callProp(immediate, name)) {
16490
- parent.setValue(isInterpolation ? toValue : value, false);
16491
- }
16492
 
16493
- return _extends({}, acc, (_extends2 = {}, _extends2[name] = _extends({}, entry, {
16494
- name: name,
16495
- parent: parent,
16496
- interpolation: interpolation$$1,
16497
- animatedValues: animatedValues,
16498
- toValues: toValues,
16499
- previous: newValue,
16500
- config: toConfig,
16501
- fromValues: toArray(parent.getValue()),
16502
- immediate: callProp(immediate, name),
16503
- initialVelocity: withDefault(toConfig.velocity, 0),
16504
- clamp: withDefault(toConfig.clamp, false),
16505
- precision: withDefault(toConfig.precision, 0.01),
16506
- tension: withDefault(toConfig.tension, 170),
16507
- friction: withDefault(toConfig.friction, 26),
16508
- mass: withDefault(toConfig.mass, 1),
16509
- duration: toConfig.duration,
16510
- easing: withDefault(toConfig.easing, function (t) {
16511
- return t;
16512
- }),
16513
- decay: toConfig.decay
16514
- }), _extends2));
16515
- } else {
16516
- if (!currentValueDiffersFromGoal) {
16517
- var _extends3;
16518
-
16519
- // So ... the current target value (newValue) appears to be different from the previous value,
16520
- // which normally constitutes an update, but the actual value (currentValue) matches the target!
16521
- // In order to resolve this without causing an animation update we silently flag the animation as done,
16522
- // which it technically is. Interpolations also needs a config update with their target set to 1.
16523
- if (isInterpolation) {
16524
- parent.setValue(1, false);
16525
- interpolation$$1.updateConfig({
16526
- output: [newValue, newValue]
16527
- });
16528
- }
16529
 
16530
- parent.done = true;
16531
- _this4.hasChanged = true;
16532
- return _extends({}, acc, (_extends3 = {}, _extends3[name] = _extends({}, acc[name], {
16533
- previous: newValue
16534
- }), _extends3));
16535
- }
 
 
 
 
 
 
 
16536
 
16537
- return acc;
16538
- }
16539
- }, this.animations);
16540
 
16541
- if (this.hasChanged) {
16542
- // Make animations available to frameloop
16543
- this.configs = Object.values(this.animations);
16544
- this.values = {};
16545
- this.interpolations = {};
16546
 
16547
- for (var key in this.animations) {
16548
- this.interpolations[key] = this.animations[key].interpolation;
16549
- this.values[key] = this.animations[key].interpolation.getValue();
16550
- }
16551
- }
16552
 
16553
- return this;
16554
- };
16555
 
16556
- _proto.destroy = function destroy() {
16557
- this.stop();
16558
- this.props = {};
16559
- this.merged = {};
16560
- this.animations = {};
16561
- this.interpolations = {};
16562
- this.values = {};
16563
- this.configs = [];
16564
- this.local = 0;
16565
- };
16566
 
16567
- return Controller;
16568
- }();
16569
 
16570
- /** API
16571
- * const props = useSprings(number, [{ ... }, { ... }, ...])
16572
- * const [props, set] = useSprings(number, (i, controller) => ({ ... }))
16573
  */
16574
 
16575
- var useSprings = function useSprings(length, props) {
16576
- var mounted = React.useRef(false);
16577
- var ctrl = React.useRef();
16578
- var isFn = is.fun(props); // The controller maintains the animation values, starts and stops animations
16579
 
16580
- var _useMemo = React.useMemo(function () {
16581
- // Remove old controllers
16582
- if (ctrl.current) {
16583
- ctrl.current.map(function (c) {
16584
- return c.destroy();
16585
- });
16586
- ctrl.current = undefined;
16587
- }
16588
 
16589
- var ref;
16590
- return [new Array(length).fill().map(function (_, i) {
16591
- var ctrl = new Controller();
16592
- var newProps = isFn ? callProp(props, i, ctrl) : props[i];
16593
- if (i === 0) ref = newProps.ref;
16594
- ctrl.update(newProps);
16595
- if (!ref) ctrl.start();
16596
- return ctrl;
16597
- }), ref];
16598
- }, [length]),
16599
- controllers = _useMemo[0],
16600
- ref = _useMemo[1];
16601
 
16602
- ctrl.current = controllers; // The hooks reference api gets defined here ...
16603
 
16604
- var api = React.useImperativeHandle(ref, function () {
16605
- return {
16606
- start: function start() {
16607
- return Promise.all(ctrl.current.map(function (c) {
16608
- return new Promise(function (r) {
16609
- return c.start(r);
16610
- });
16611
- }));
16612
- },
16613
- stop: function stop(finished) {
16614
- return ctrl.current.forEach(function (c) {
16615
- return c.stop(finished);
16616
- });
16617
- },
16618
 
16619
- get controllers() {
16620
- return ctrl.current;
16621
- }
16622
 
16623
- };
16624
- }); // This function updates the controllers
16625
 
16626
- var updateCtrl = React.useMemo(function () {
16627
- return function (updateProps) {
16628
- return ctrl.current.map(function (c, i) {
16629
- c.update(isFn ? callProp(updateProps, i, c) : updateProps[i]);
16630
- if (!ref) c.start();
16631
- });
16632
- };
16633
- }, [length]); // Update controller if props aren't functional
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16634
 
16635
- React.useEffect(function () {
16636
- if (mounted.current) {
16637
- if (!isFn) updateCtrl(props);
16638
- } else if (!ref) ctrl.current.forEach(function (c) {
16639
- return c.start();
16640
  });
16641
- }); // Update mounted flag and destroy controller on unmount
16642
-
16643
- React.useEffect(function () {
16644
- return mounted.current = true, function () {
16645
- return ctrl.current.forEach(function (c) {
16646
- return c.destroy();
16647
- });
16648
- };
16649
- }, []); // Return animated props, or, anim-props + the update-setter above
16650
 
16651
- var propValues = ctrl.current.map(function (c) {
16652
- return c.getValues();
 
 
 
 
 
 
 
 
 
 
16653
  });
16654
- return isFn ? [propValues, updateCtrl, function (finished) {
16655
- return ctrl.current.forEach(function (c) {
16656
- return c.pause(finished);
16657
- });
16658
- }] : propValues;
16659
- };
 
 
 
 
16660
 
16661
- /** API
16662
- * const props = useSpring({ ... })
16663
- * const [props, set] = useSpring(() => ({ ... }))
16664
- */
16665
 
16666
- var useSpring = function useSpring(props) {
16667
- var isFn = is.fun(props);
16668
 
16669
- var _useSprings = useSprings(1, isFn ? props : [props]),
16670
- result = _useSprings[0],
16671
- set = _useSprings[1],
16672
- pause = _useSprings[2];
16673
 
16674
- return isFn ? [result[0], set, pause] : result;
16675
- };
 
 
 
 
 
 
 
 
 
16676
 
16677
- /** API
16678
- * const trails = useTrail(number, { ... })
16679
- * const [trails, set] = useTrail(number, () => ({ ... }))
16680
- */
16681
 
16682
- var useTrail = function useTrail(length, props) {
16683
- var mounted = React.useRef(false);
16684
- var isFn = is.fun(props);
16685
- var updateProps = callProp(props);
16686
- var instances = React.useRef();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16687
 
16688
- var _useSprings = useSprings(length, function (i, ctrl) {
16689
- if (i === 0) instances.current = [];
16690
- instances.current.push(ctrl);
16691
- return _extends({}, updateProps, {
16692
- config: callProp(updateProps.config, i),
16693
- attach: i > 0 && function () {
16694
- return instances.current[i - 1];
16695
- }
16696
- });
16697
- }),
16698
- result = _useSprings[0],
16699
- set = _useSprings[1],
16700
- pause = _useSprings[2]; // Set up function to update controller
16701
 
 
 
16702
 
16703
- var updateCtrl = React.useMemo(function () {
16704
- return function (props) {
16705
- return set(function (i, ctrl) {
16706
- var last = props.reverse ? i === 0 : length - 1 === i;
16707
- var attachIdx = props.reverse ? i + 1 : i - 1;
16708
- var attachController = instances.current[attachIdx];
16709
- return _extends({}, props, {
16710
- config: callProp(props.config || updateProps.config, i),
16711
- attach: attachController && function () {
16712
- return attachController;
16713
- }
16714
- });
16715
- });
16716
- };
16717
- }, [length, updateProps.reverse]); // Update controller if props aren't functional
16718
 
16719
- React.useEffect(function () {
16720
- return void (mounted.current && !isFn && updateCtrl(props));
16721
- }); // Update mounted flag and destroy controller on unmount
 
 
16722
 
16723
- React.useEffect(function () {
16724
- return void (mounted.current = true);
16725
- }, []);
16726
- return isFn ? [result, updateCtrl, pause] : result;
16727
- };
16728
 
16729
- /** API
16730
- * const transitions = useTransition(items, itemKeys, { ... })
16731
- * const [transitions, update] = useTransition(items, itemKeys, () => ({ ... }))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16732
  */
16733
 
16734
- var guid = 0;
16735
- var ENTER = 'enter';
16736
- var LEAVE = 'leave';
16737
- var UPDATE = 'update';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16738
 
16739
- var mapKeys = function mapKeys(items, keys) {
16740
- return (typeof keys === 'function' ? items.map(keys) : toArray(keys)).map(String);
16741
- };
16742
 
16743
- var get = function get(props) {
16744
- var items = props.items,
16745
- _props$keys = props.keys,
16746
- keys = _props$keys === void 0 ? function (item) {
16747
- return item;
16748
- } : _props$keys,
16749
- rest = _objectWithoutPropertiesLoose(props, ["items", "keys"]);
16750
-
16751
- items = toArray(items !== void 0 ? items : null);
16752
- return _extends({
16753
- items: items,
16754
- keys: mapKeys(items, keys)
16755
- }, rest);
16756
- };
16757
-
16758
- function useTransition(input, keyTransform, config) {
16759
- var props = _extends({
16760
- items: input,
16761
- keys: keyTransform || function (i) {
16762
- return i;
16763
- }
16764
- }, config);
16765
 
16766
- var _get = get(props),
16767
- _get$lazy = _get.lazy,
16768
- lazy = _get$lazy === void 0 ? false : _get$lazy,
16769
- _get$unique = _get.unique,
16770
- _get$reset = _get.reset,
16771
- reset = _get$reset === void 0 ? false : _get$reset,
16772
- enter = _get.enter,
16773
- leave = _get.leave,
16774
- update = _get.update,
16775
- onDestroyed = _get.onDestroyed,
16776
- keys = _get.keys,
16777
- items = _get.items,
16778
- onFrame = _get.onFrame,
16779
- _onRest = _get.onRest,
16780
- onStart = _get.onStart,
16781
- ref = _get.ref,
16782
- extra = _objectWithoutPropertiesLoose(_get, ["lazy", "unique", "reset", "enter", "leave", "update", "onDestroyed", "keys", "items", "onFrame", "onRest", "onStart", "ref"]);
16783
 
16784
- var forceUpdate = useForceUpdate();
16785
- var mounted = React.useRef(false);
16786
- var state = React.useRef({
16787
- mounted: false,
16788
- first: true,
16789
- deleted: [],
16790
- current: {},
16791
- transitions: [],
16792
- prevProps: {},
16793
- paused: !!props.ref,
16794
- instances: !mounted.current && new Map(),
16795
- forceUpdate: forceUpdate
16796
- });
16797
- React.useImperativeHandle(props.ref, function () {
16798
- return {
16799
- start: function start() {
16800
- return Promise.all(Array.from(state.current.instances).map(function (_ref) {
16801
- var c = _ref[1];
16802
- return new Promise(function (r) {
16803
- return c.start(r);
16804
- });
16805
- }));
16806
- },
16807
- stop: function stop(finished) {
16808
- return Array.from(state.current.instances).forEach(function (_ref2) {
16809
- var c = _ref2[1];
16810
- return c.stop(finished);
16811
- });
16812
- },
16813
 
16814
- get controllers() {
16815
- return Array.from(state.current.instances).map(function (_ref3) {
16816
- var c = _ref3[1];
16817
- return c;
16818
- });
16819
- }
16820
 
16821
- };
16822
- }); // Update state
16823
 
16824
- state.current = diffItems(state.current, props);
 
16825
 
16826
- if (state.current.changed) {
16827
- // Update state
16828
- state.current.transitions.forEach(function (transition) {
16829
- var slot = transition.slot,
16830
- from = transition.from,
16831
- to = transition.to,
16832
- config = transition.config,
16833
- trail = transition.trail,
16834
- key = transition.key,
16835
- item = transition.item;
16836
- if (!state.current.instances.has(key)) state.current.instances.set(key, new Controller()); // update the map object
16837
 
16838
- var ctrl = state.current.instances.get(key);
16839
 
16840
- var newProps = _extends({}, extra, {
16841
- to: to,
16842
- from: from,
16843
- config: config,
16844
- ref: ref,
16845
- onRest: function onRest(values) {
16846
- if (state.current.mounted) {
16847
- if (transition.destroyed) {
16848
- // If no ref is given delete destroyed items immediately
16849
- if (!ref && !lazy) cleanUp(state, key);
16850
- if (onDestroyed) onDestroyed(item);
16851
- } // A transition comes to rest once all its springs conclude
16852
 
 
 
 
 
 
 
 
 
 
16853
 
16854
- var curInstances = Array.from(state.current.instances);
16855
- var active = curInstances.some(function (_ref4) {
16856
- var c = _ref4[1];
16857
- return !c.idle;
16858
- });
16859
- if (!active && (ref || lazy) && state.current.deleted.length > 0) cleanUp(state);
16860
- if (_onRest) _onRest(item, slot, values);
16861
- }
16862
- },
16863
- onStart: onStart && function () {
16864
- return onStart(item, slot);
16865
- },
16866
- onFrame: onFrame && function (values) {
16867
- return onFrame(item, slot, values);
16868
- },
16869
- delay: trail,
16870
- reset: reset && slot === ENTER // Update controller
16871
 
16872
- });
 
 
 
 
 
 
16873
 
16874
- ctrl.update(newProps);
16875
- if (!state.current.paused) ctrl.start();
16876
- });
16877
  }
16878
 
16879
- React.useEffect(function () {
16880
- state.current.mounted = mounted.current = true;
16881
- return function () {
16882
- state.current.mounted = mounted.current = false;
16883
- Array.from(state.current.instances).map(function (_ref5) {
16884
- var c = _ref5[1];
16885
- return c.destroy();
16886
- });
16887
- state.current.instances.clear();
16888
- };
16889
- }, []);
16890
- return state.current.transitions.map(function (_ref6) {
16891
- var item = _ref6.item,
16892
- slot = _ref6.slot,
16893
- key = _ref6.key;
16894
- return {
16895
- item: item,
16896
- key: key,
16897
- state: slot,
16898
- props: state.current.instances.get(key).getValues()
16899
- };
16900
- });
16901
  }
16902
 
16903
- function cleanUp(state, filterKey) {
16904
- var deleted = state.current.deleted;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16905
 
16906
- var _loop = function _loop() {
16907
- if (_isArray) {
16908
- if (_i >= _iterator.length) return "break";
16909
- _ref8 = _iterator[_i++];
16910
- } else {
16911
- _i = _iterator.next();
16912
- if (_i.done) return "break";
16913
- _ref8 = _i.value;
16914
- }
16915
 
16916
- var _ref7 = _ref8;
16917
- var key = _ref7.key;
 
16918
 
16919
- var filter = function filter(t) {
16920
- return t.key !== key;
16921
- };
 
16922
 
16923
- if (is.und(filterKey) || filterKey === key) {
16924
- state.current.instances.delete(key);
16925
- state.current.transitions = state.current.transitions.filter(filter);
16926
- state.current.deleted = state.current.deleted.filter(filter);
16927
  }
16928
- };
16929
 
16930
- for (var _iterator = deleted, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
16931
- var _ref8;
16932
 
16933
- var _ret = _loop();
 
 
16934
 
16935
- if (_ret === "break") break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16936
  }
 
 
 
 
 
16937
 
16938
- state.current.forceUpdate();
16939
- }
16940
 
16941
- function diffItems(_ref9, props) {
16942
- var first = _ref9.first,
16943
- prevProps = _ref9.prevProps,
16944
- state = _objectWithoutPropertiesLoose(_ref9, ["first", "prevProps"]);
16945
 
16946
- var _get2 = get(props),
16947
- items = _get2.items,
16948
- keys = _get2.keys,
16949
- initial = _get2.initial,
16950
- from = _get2.from,
16951
- enter = _get2.enter,
16952
- leave = _get2.leave,
16953
- update = _get2.update,
16954
- _get2$trail = _get2.trail,
16955
- trail = _get2$trail === void 0 ? 0 : _get2$trail,
16956
- unique = _get2.unique,
16957
- config = _get2.config,
16958
- _get2$order = _get2.order,
16959
- order = _get2$order === void 0 ? [ENTER, LEAVE, UPDATE] : _get2$order;
 
 
 
 
 
 
 
 
 
 
 
16960
 
16961
- var _get3 = get(prevProps),
16962
- _keys = _get3.keys,
16963
- _items = _get3.items;
16964
 
16965
- var current = _extends({}, state.current);
 
 
 
16966
 
16967
- var deleted = [].concat(state.deleted); // Compare next keys with current keys
 
 
16968
 
16969
- var currentKeys = Object.keys(current);
16970
- var currentSet = new Set(currentKeys);
16971
- var nextSet = new Set(keys);
16972
- var added = keys.filter(function (item) {
16973
- return !currentSet.has(item);
16974
- });
16975
- var removed = state.transitions.filter(function (item) {
16976
- return !item.destroyed && !nextSet.has(item.originalKey);
16977
- }).map(function (i) {
16978
- return i.originalKey;
16979
- });
16980
- var updated = keys.filter(function (item) {
16981
- return currentSet.has(item);
16982
- });
16983
- var delay = -trail;
16984
 
16985
- while (order.length) {
16986
- var changeType = order.shift();
 
16987
 
16988
- switch (changeType) {
16989
- case ENTER:
16990
- {
16991
- added.forEach(function (key, index) {
16992
- // In unique mode, remove fading out transitions if their key comes in again
16993
- if (unique && deleted.find(function (d) {
16994
- return d.originalKey === key;
16995
- })) deleted = deleted.filter(function (t) {
16996
- return t.originalKey !== key;
16997
- });
16998
- var keyIndex = keys.indexOf(key);
16999
- var item = items[keyIndex];
17000
- var slot = first && initial !== void 0 ? 'initial' : ENTER;
17001
- current[key] = {
17002
- slot: slot,
17003
- originalKey: key,
17004
- key: unique ? String(key) : guid++,
17005
- item: item,
17006
- trail: delay = delay + trail,
17007
- config: callProp(config, item, slot),
17008
- from: callProp(first ? initial !== void 0 ? initial || {} : from : from, item),
17009
- to: callProp(enter, item)
17010
- };
17011
- });
17012
- break;
17013
- }
 
 
 
 
 
 
17014
 
17015
- case LEAVE:
17016
- {
17017
- removed.forEach(function (key) {
17018
- var keyIndex = _keys.indexOf(key);
17019
 
17020
- var item = _items[keyIndex];
17021
- var slot = LEAVE;
17022
- deleted.unshift(_extends({}, current[key], {
17023
- slot: slot,
17024
- destroyed: true,
17025
- left: _keys[Math.max(0, keyIndex - 1)],
17026
- right: _keys[Math.min(_keys.length, keyIndex + 1)],
17027
- trail: delay = delay + trail,
17028
- config: callProp(config, item, slot),
17029
- to: callProp(leave, item)
17030
- }));
17031
- delete current[key];
17032
- });
17033
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17034
  }
17035
 
17036
- case UPDATE:
17037
- {
17038
- updated.forEach(function (key) {
17039
- var keyIndex = keys.indexOf(key);
17040
- var item = items[keyIndex];
17041
- var slot = UPDATE;
17042
- current[key] = _extends({}, current[key], {
17043
- item: item,
17044
- slot: slot,
17045
- trail: delay = delay + trail,
17046
- config: callProp(config, item, slot),
17047
- to: callProp(update, item)
17048
- });
17049
- });
17050
- break;
17051
  }
17052
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17053
  }
 
17054
 
17055
- var out = keys.map(function (key) {
17056
- return current[key];
17057
- }); // This tries to restore order for deleted items by finding their last known siblings
17058
- // only using the left sibling to keep order placement consistent for all deleted items
17059
 
17060
- deleted.forEach(function (_ref10) {
17061
- var left = _ref10.left,
17062
- right = _ref10.right,
17063
- item = _objectWithoutPropertiesLoose(_ref10, ["left", "right"]);
 
 
17064
 
17065
- var pos; // Was it the element on the left, if yes, move there ...
17066
 
17067
- if ((pos = out.findIndex(function (t) {
17068
- return t.originalKey === left;
17069
- })) !== -1) pos += 1; // And if nothing else helps, move it to the start ¯\_(ツ)_/¯
 
 
17070
 
17071
- pos = Math.max(0, pos);
17072
- out = [].concat(out.slice(0, pos), [item], out.slice(pos));
 
 
 
 
 
 
 
 
 
 
 
 
17073
  });
17074
- return _extends({}, state, {
17075
- changed: added.length || removed.length || updated.length,
17076
- first: first && added.length === 0,
17077
- transitions: out,
17078
- current: current,
17079
- deleted: deleted,
17080
- prevProps: props
17081
  });
 
 
 
 
 
17082
  }
17083
 
17084
- var AnimatedStyle =
17085
- /*#__PURE__*/
17086
- function (_AnimatedObject) {
17087
- _inheritsLoose(AnimatedStyle, _AnimatedObject);
 
 
17088
 
17089
- function AnimatedStyle(style) {
17090
- var _this;
 
17091
 
17092
- if (style === void 0) {
17093
- style = {};
 
 
17094
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17095
 
17096
- _this = _AnimatedObject.call(this) || this;
17097
 
17098
- if (style.transform && !(style.transform instanceof Animated)) {
17099
- style = applyAnimatedValues.transform(style);
 
 
 
 
 
 
 
 
 
17100
  }
 
17101
 
17102
- _this.payload = style;
17103
- return _this;
 
 
 
 
 
 
 
 
 
 
 
17104
  }
17105
 
17106
- return AnimatedStyle;
17107
- }(AnimatedObject);
 
 
17108
 
17109
- // http://www.w3.org/TR/css3-color/#svg-color
17110
- var colors = {
17111
- transparent: 0x00000000,
17112
- aliceblue: 0xf0f8ffff,
17113
- antiquewhite: 0xfaebd7ff,
17114
- aqua: 0x00ffffff,
17115
- aquamarine: 0x7fffd4ff,
17116
- azure: 0xf0ffffff,
17117
- beige: 0xf5f5dcff,
17118
- bisque: 0xffe4c4ff,
17119
- black: 0x000000ff,
17120
- blanchedalmond: 0xffebcdff,
17121
- blue: 0x0000ffff,
17122
- blueviolet: 0x8a2be2ff,
17123
- brown: 0xa52a2aff,
17124
- burlywood: 0xdeb887ff,
17125
- burntsienna: 0xea7e5dff,
17126
- cadetblue: 0x5f9ea0ff,
17127
- chartreuse: 0x7fff00ff,
17128
- chocolate: 0xd2691eff,
17129
- coral: 0xff7f50ff,
17130
- cornflowerblue: 0x6495edff,
17131
- cornsilk: 0xfff8dcff,
17132
- crimson: 0xdc143cff,
17133
- cyan: 0x00ffffff,
17134
- darkblue: 0x00008bff,
17135
- darkcyan: 0x008b8bff,
17136
- darkgoldenrod: 0xb8860bff,
17137
- darkgray: 0xa9a9a9ff,
17138
- darkgreen: 0x006400ff,
17139
- darkgrey: 0xa9a9a9ff,
17140
- darkkhaki: 0xbdb76bff,
17141
- darkmagenta: 0x8b008bff,
17142
- darkolivegreen: 0x556b2fff,
17143
- darkorange: 0xff8c00ff,
17144
- darkorchid: 0x9932ccff,
17145
- darkred: 0x8b0000ff,
17146
- darksalmon: 0xe9967aff,
17147
- darkseagreen: 0x8fbc8fff,
17148
- darkslateblue: 0x483d8bff,
17149
- darkslategray: 0x2f4f4fff,
17150
- darkslategrey: 0x2f4f4fff,
17151
- darkturquoise: 0x00ced1ff,
17152
- darkviolet: 0x9400d3ff,
17153
- deeppink: 0xff1493ff,
17154
- deepskyblue: 0x00bfffff,
17155
- dimgray: 0x696969ff,
17156
- dimgrey: 0x696969ff,
17157
- dodgerblue: 0x1e90ffff,
17158
- firebrick: 0xb22222ff,
17159
- floralwhite: 0xfffaf0ff,
17160
- forestgreen: 0x228b22ff,
17161
- fuchsia: 0xff00ffff,
17162
- gainsboro: 0xdcdcdcff,
17163
- ghostwhite: 0xf8f8ffff,
17164
- gold: 0xffd700ff,
17165
- goldenrod: 0xdaa520ff,
17166
- gray: 0x808080ff,
17167
- green: 0x008000ff,
17168
- greenyellow: 0xadff2fff,
17169
- grey: 0x808080ff,
17170
- honeydew: 0xf0fff0ff,
17171
- hotpink: 0xff69b4ff,
17172
- indianred: 0xcd5c5cff,
17173
- indigo: 0x4b0082ff,
17174
- ivory: 0xfffff0ff,
17175
- khaki: 0xf0e68cff,
17176
- lavender: 0xe6e6faff,
17177
- lavenderblush: 0xfff0f5ff,
17178
- lawngreen: 0x7cfc00ff,
17179
- lemonchiffon: 0xfffacdff,
17180
- lightblue: 0xadd8e6ff,
17181
- lightcoral: 0xf08080ff,
17182
- lightcyan: 0xe0ffffff,
17183
- lightgoldenrodyellow: 0xfafad2ff,
17184
- lightgray: 0xd3d3d3ff,
17185
- lightgreen: 0x90ee90ff,
17186
- lightgrey: 0xd3d3d3ff,
17187
- lightpink: 0xffb6c1ff,
17188
- lightsalmon: 0xffa07aff,
17189
- lightseagreen: 0x20b2aaff,
17190
- lightskyblue: 0x87cefaff,
17191
- lightslategray: 0x778899ff,
17192
- lightslategrey: 0x778899ff,
17193
- lightsteelblue: 0xb0c4deff,
17194
- lightyellow: 0xffffe0ff,
17195
- lime: 0x00ff00ff,
17196
- limegreen: 0x32cd32ff,
17197
- linen: 0xfaf0e6ff,
17198
- magenta: 0xff00ffff,
17199
- maroon: 0x800000ff,
17200
- mediumaquamarine: 0x66cdaaff,
17201
- mediumblue: 0x0000cdff,
17202
- mediumorchid: 0xba55d3ff,
17203
- mediumpurple: 0x9370dbff,
17204
- mediumseagreen: 0x3cb371ff,
17205
- mediumslateblue: 0x7b68eeff,
17206
- mediumspringgreen: 0x00fa9aff,
17207
- mediumturquoise: 0x48d1ccff,
17208
- mediumvioletred: 0xc71585ff,
17209
- midnightblue: 0x191970ff,
17210
- mintcream: 0xf5fffaff,
17211
- mistyrose: 0xffe4e1ff,
17212
- moccasin: 0xffe4b5ff,
17213
- navajowhite: 0xffdeadff,
17214
- navy: 0x000080ff,
17215
- oldlace: 0xfdf5e6ff,
17216
- olive: 0x808000ff,
17217
- olivedrab: 0x6b8e23ff,
17218
- orange: 0xffa500ff,
17219
- orangered: 0xff4500ff,
17220
- orchid: 0xda70d6ff,
17221
- palegoldenrod: 0xeee8aaff,
17222
- palegreen: 0x98fb98ff,
17223
- paleturquoise: 0xafeeeeff,
17224
- palevioletred: 0xdb7093ff,
17225
- papayawhip: 0xffefd5ff,
17226
- peachpuff: 0xffdab9ff,
17227
- peru: 0xcd853fff,
17228
- pink: 0xffc0cbff,
17229
- plum: 0xdda0ddff,
17230
- powderblue: 0xb0e0e6ff,
17231
- purple: 0x800080ff,
17232
- rebeccapurple: 0x663399ff,
17233
- red: 0xff0000ff,
17234
- rosybrown: 0xbc8f8fff,
17235
- royalblue: 0x4169e1ff,
17236
- saddlebrown: 0x8b4513ff,
17237
- salmon: 0xfa8072ff,
17238
- sandybrown: 0xf4a460ff,
17239
- seagreen: 0x2e8b57ff,
17240
- seashell: 0xfff5eeff,
17241
- sienna: 0xa0522dff,
17242
- silver: 0xc0c0c0ff,
17243
- skyblue: 0x87ceebff,
17244
- slateblue: 0x6a5acdff,
17245
- slategray: 0x708090ff,
17246
- slategrey: 0x708090ff,
17247
- snow: 0xfffafaff,
17248
- springgreen: 0x00ff7fff,
17249
- steelblue: 0x4682b4ff,
17250
- tan: 0xd2b48cff,
17251
- teal: 0x008080ff,
17252
- thistle: 0xd8bfd8ff,
17253
- tomato: 0xff6347ff,
17254
- turquoise: 0x40e0d0ff,
17255
- violet: 0xee82eeff,
17256
- wheat: 0xf5deb3ff,
17257
- white: 0xffffffff,
17258
- whitesmoke: 0xf5f5f5ff,
17259
- yellow: 0xffff00ff,
17260
- yellowgreen: 0x9acd32ff
35
  /******/
36
  /******/ // object to store loaded CSS chunks
37
  /******/ var installedCssChunks = {
38
+ /******/ 20: 0
39
  /******/ }
40
  /******/ var isCssRtlEnabled = function() {
41
  /******/ return document.dir === 'rtl';
45
  /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
46
  /******/ // Promise = chunk loading, 0 = chunk loaded
47
  /******/ var installedChunks = {
48
+ /******/ 20: 0
49
  /******/ };
50
  /******/
51
  /******/
52
  /******/
53
  /******/ // script path function
 
 
 
 
54
  /******/ function jsonpScriptSrc(chunkId) {
55
+ /******/ return __webpack_require__.p + "chunks/" + chunkId + "." + {"0":"807d6e1809f4991fa907","1":"e1c8e02fb4cc487e41ea","2":"9367ee984c36b762467c","3":"f7c0fca32cdac1ba4add","4":"27a2fa3f1ef8662ba455","5":"88800d5332efd00d661a","6":"fe82c7bafbd1c82cece8","7":"2ae760efec968acd9eca","8":"1fde2df723551e19bad1","9":"28b11ea4a01212cca6c7","10":"6e5e757ab15373ddf47c","11":"b3e2eb89a0181fa5e2f2","12":"81a5de16019a0cc85173","13":"2a0a9c9a9543a94e0408","14":"49811bcba1b9d3f84157","15":"413a29db1c4e7f2eefdb","16":"1a3c8e4420d552b12da0","17":"b72560c96ee6b8cc0379","18":"641586025741e6eaf968","19":"eb511aac4da1306199c8","24":"1638e9bc628250a9f64e","25":"22002b888fd496ab0bcb","26":"3e3f9f7255f3350affb3","29":"d82487c6523d08e53b6d","30":"9bbf7b5f14fd288036ac","32":"8359029241f4148734e6","34":"44ef8509679f54ad2c98","42":"48572b505167be20c1dd","43":"2f9cc9ecefe7511d3048","44":"e536ad012d121468cce4","45":"5e06cffaff8645bfd280","46":"5999667eb5ce84f5f4f9","47":"29a2aff1aafb89a2d76b","48":"eb11cd8899cc6d720e4b","49":"94f13463bcd370f6f957"}[chunkId] + ".js"
 
 
 
 
56
  /******/ }
57
  /******/
 
58
  /******/ // The require function
59
  /******/ function __webpack_require__(moduleId) {
60
  /******/
86
  /******/
87
  /******/
88
  /******/ // mini-css-extract-plugin CSS loading
89
+ /******/ var cssChunks = {"0":1,"5":1,"7":1,"8":1,"9":1,"14":1,"19":1,"25":1,"26":1,"29":1,"30":1,"32":1,"34":1,"42":1,"43":1,"44":1,"45":1};
90
  /******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
91
  /******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
92
  /******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
119
  /******/ reject(err);
120
  /******/ };
121
  /******/ linkTag.href = fullhref;
 
 
 
122
  /******/
123
  /******/ var head = document.getElementsByTagName("head")[0];
124
  /******/ head.appendChild(linkTag);
238
  /******/ // on error function for async loading
239
  /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
240
  /******/
241
+ /******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
242
  /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
243
  /******/ jsonpArray.push = webpackJsonpCallback;
244
  /******/ jsonpArray = jsonpArray.slice();
247
  /******/
248
  /******/
249
  /******/ // Load entry module and return exports
250
+ /******/ return __webpack_require__(__webpack_require__.s = 434);
251
  /******/ })
252
  /************************************************************************/
253
+ /******/ ({
254
+
255
+ /***/ 0:
256
  /***/ (function(module, exports) {
257
 
258
+ (function() { module.exports = this["wp"]["element"]; }());
259
 
260
  /***/ }),
261
+
262
+ /***/ 1:
263
  /***/ (function(module, exports, __webpack_require__) {
264
 
265
  /**
272
  if (false) { var throwOnDirectAccess, ReactIs; } else {
273
  // By explicitly using `prop-types` you are opting into new production behavior.
274
  // http://fb.me/prop-types-in-prod
275
+ module.exports = __webpack_require__(113)();
276
  }
277
 
278
 
279
  /***/ }),
 
 
280
 
281
+ /***/ 10:
282
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
283
 
284
+ "use strict";
 
 
285
 
286
+ // EXPORTS
287
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; });
 
288
 
289
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
290
+ function _setPrototypeOf(o, p) {
291
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
292
+ o.__proto__ = p;
293
+ return o;
294
+ };
 
 
 
295
 
296
+ return _setPrototypeOf(o, p);
297
+ }
298
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
299
 
300
+ function _inherits(subClass, superClass) {
301
+ if (typeof superClass !== "function" && superClass !== null) {
302
+ throw new TypeError("Super expression must either be null or a function");
303
+ }
304
 
305
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
306
+ constructor: {
307
+ value: subClass,
308
+ writable: true,
309
+ configurable: true
310
+ }
311
+ });
312
+ if (superClass) _setPrototypeOf(subClass, superClass);
313
+ }
314
 
315
  /***/ }),
 
 
 
 
316
 
317
+ /***/ 101:
318
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
319
 
320
+ "use strict";
321
+ /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80);
322
+ /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
323
+ /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38);
324
+ /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);
325
+ /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(37);
326
+ /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);
327
+ /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(62);
328
+ /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__);
329
+ /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(39);
330
+ /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);
331
+ /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42);
332
+ /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);
333
+ /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(26);
334
+ /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);
335
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(0);
336
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);
337
+ /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2);
338
+ /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__);
339
+ /* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(65);
340
+ /* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_9__);
341
+ /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(54);
342
+ /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(18);
343
+ /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__);
344
 
345
 
 
 
 
346
 
 
 
 
 
 
 
 
 
 
 
 
347
 
 
 
348
 
 
349
 
 
 
 
350
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
 
352
 
353
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, result); }; }
 
 
354
 
355
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
356
 
357
+ /**
358
+ * NOTE: This is temporary code. It exists only until a version of `@wordpress/data`
359
+ * is released which supports this functionality.
360
+ *
361
+ * @todo Remove this and use `@wordpress/data` `withSelect` instead after
362
+ * this PR is merged: https://github.com/WordPress/gutenberg/pull/11460
363
+ */
364
 
365
+ /**
366
+ * External dependencies
367
+ */
368
 
 
 
 
369
 
 
 
 
370
 
371
 
 
 
 
372
 
373
+ /**
374
+ * Higher-order component used to inject state-derived props using registered
375
+ * selectors.
376
+ *
377
+ * @param {Function} mapSelectToProps Function called on every state change,
378
+ * expected to return object of props to
379
+ * merge with the component's own props.
380
+ *
381
+ * @return {Component} Enhanced component with merged state data props.
382
+ */
383
 
384
+ var withSelect = function withSelect(mapSelectToProps) {
385
+ return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(function (WrappedComponent) {
386
+ /**
387
+ * Default merge props. A constant value is used as the fallback since it
388
+ * can be more efficiently shallow compared in case component is repeatedly
389
+ * rendered without its own merge props.
390
+ *
391
+ * @type {Object}
392
+ */
393
+ var DEFAULT_MERGE_PROPS = {};
394
 
395
+ var ComponentWithSelect = /*#__PURE__*/function (_Component) {
396
+ _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(ComponentWithSelect, _Component);
397
 
398
+ var _super = _createSuper(ComponentWithSelect);
 
 
399
 
400
+ function ComponentWithSelect(props) {
401
+ var _this;
 
 
 
 
 
402
 
403
+ _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComponentWithSelect);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
404
 
405
+ _this = _super.call(this, props);
406
+ _this.onStoreChange = _this.onStoreChange.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this));
407
 
408
+ _this.subscribe(props.registry);
 
 
409
 
410
+ _this.onUnmounts = {};
411
+ _this.mergeProps = _this.getNextMergeProps(props);
412
+ return _this;
413
+ }
414
+ /**
415
+ * Given a props object, returns the next merge props by mapSelectToProps.
416
+ *
417
+ * @param {Object} props Props to pass as argument to mapSelectToProps.
418
+ *
419
+ * @return {Object} Props to merge into rendered wrapped element.
420
+ */
421
+
422
+
423
+ _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComponentWithSelect, [{
424
+ key: "getNextMergeProps",
425
+ value: function getNextMergeProps(props) {
426
+ var _this2 = this;
427
+
428
+ var storeSelectors = {};
429
+ var onCompletes = [];
430
+ var componentContext = {
431
+ component: this
432
+ };
433
 
434
+ var getStoreFromRegistry = function getStoreFromRegistry(key, registry, context) {
435
+ // This is our first time selecting from this store.
436
+ // Do some lazy-loading of handling at this time.
437
+ var selectorsForKey = registry.select(key);
438
+
439
+ if (Object(lodash__WEBPACK_IMPORTED_MODULE_8__["isFunction"])(selectorsForKey)) {
440
+ // This store has special handling for its selectors.
441
+ // We give it a context, and we check for a "resolve"
442
+ var _selectorsForKey = selectorsForKey(context),
443
+ selectors = _selectorsForKey.selectors,
444
+ onComplete = _selectorsForKey.onComplete,
445
+ onUnmount = _selectorsForKey.onUnmount;
446
+
447
+ if (onComplete) {
448
+ onCompletes.push(onComplete);
449
+ }
450
 
451
+ if (onUnmount) {
452
+ _this2.onUnmounts[key] = onUnmount;
453
+ }
454
 
455
+ storeSelectors[key] = selectors;
456
+ } else {
457
+ storeSelectors[key] = selectorsForKey;
458
+ }
459
+ };
460
 
461
+ var select = function select(key) {
462
+ if (!storeSelectors[key]) {
463
+ getStoreFromRegistry(key, props.registry, componentContext);
464
+ }
 
 
465
 
466
+ return storeSelectors[key];
467
+ };
468
 
469
+ var selectedProps = mapSelectToProps(select, props.ownProps) || DEFAULT_MERGE_PROPS; // Complete the select for those stores which support it.
 
 
470
 
471
+ onCompletes.forEach(function (onComplete) {
472
+ return onComplete();
473
+ });
474
+ return selectedProps;
475
+ }
476
+ }, {
477
+ key: "componentDidMount",
478
+ value: function componentDidMount() {
479
+ this.canRunSelection = true; // A state change may have occurred between the constructor and
480
+ // mount of the component (e.g. during the wrapped component's own
481
+ // constructor), in which case selection should be rerun.
482
+
483
+ if (this.hasQueuedSelection) {
484
+ this.hasQueuedSelection = false;
485
+ this.onStoreChange();
486
+ }
487
+ }
488
+ }, {
489
+ key: "componentWillUnmount",
490
+ value: function componentWillUnmount() {
491
+ var _this3 = this;
492
+
493
+ this.canRunSelection = false;
494
+ this.unsubscribe();
495
+ Object.keys(this.onUnmounts).forEach(function (key) {
496
+ return _this3.onUnmounts[key]();
497
+ });
498
+ }
499
+ }, {
500
+ key: "shouldComponentUpdate",
501
+ value: function shouldComponentUpdate(nextProps, nextState) {
502
+ // Cycle subscription if registry changes.
503
+ var hasRegistryChanged = nextProps.registry !== this.props.registry;
504
 
505
+ if (hasRegistryChanged) {
506
+ this.unsubscribe();
507
+ this.subscribe(nextProps.registry);
508
+ } // Treat a registry change as equivalent to `ownProps`, to reflect
509
+ // `mergeProps` to rendered component if and only if updated.
510
 
 
511
 
512
+ var hasPropsChanged = hasRegistryChanged || !_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_9___default()(this.props.ownProps, nextProps.ownProps); // Only render if props have changed or merge props have been updated
513
+ // from the store subscriber.
514
 
515
+ if (this.state === nextState && !hasPropsChanged) {
516
+ return false;
517
+ }
518
 
519
+ if (hasPropsChanged) {
520
+ var nextMergeProps = this.getNextMergeProps(nextProps);
521
+
522
+ if (!_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_9___default()(this.mergeProps, nextMergeProps)) {
523
+ // If merge props change as a result of the incoming props,
524
+ // they should be reflected as such in the upcoming render.
525
+ // While side effects are discouraged in lifecycle methods,
526
+ // this component is used heavily, and prior efforts to use
527
+ // `getDerivedStateFromProps` had demonstrated miserable
528
+ // performance.
529
+ this.mergeProps = nextMergeProps;
530
+ } // Regardless whether merge props are changing, fall through to
531
+ // incur the render since the component will need to receive
532
+ // the changed `ownProps`.
533
 
534
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
535
 
536
+ return true;
537
+ }
538
+ }, {
539
+ key: "onStoreChange",
540
+ value: function onStoreChange() {
541
+ if (!this.canRunSelection) {
542
+ this.hasQueuedSelection = true;
543
+ return;
544
+ }
545
 
546
+ var nextMergeProps = this.getNextMergeProps(this.props);
 
 
 
 
 
 
 
 
 
 
 
547
 
548
+ if (_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_9___default()(this.mergeProps, nextMergeProps)) {
549
+ return;
550
+ }
551
 
552
+ this.mergeProps = nextMergeProps; // Schedule an update. Merge props are not assigned to state since
553
+ // derivation of merge props from incoming props occurs within
554
+ // shouldComponentUpdate, where setState is not allowed. setState
555
+ // is used here instead of forceUpdate because forceUpdate bypasses
556
+ // shouldComponentUpdate altogether, which isn't desireable if both
557
+ // state and props change within the same render. Unfortunately,
558
+ // this requires that next merge props are generated twice.
559
 
560
+ this.setState({});
561
+ }
562
+ }, {
563
+ key: "subscribe",
564
+ value: function subscribe(registry) {
565
+ this.unsubscribe = registry.subscribe(this.onStoreChange);
566
+ }
567
+ }, {
568
+ key: "render",
569
+ value: function render() {
570
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(WrappedComponent, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, this.props.ownProps, this.mergeProps));
571
+ }
572
+ }]);
573
 
574
+ return ComponentWithSelect;
575
+ }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Component"]);
 
576
 
577
+ return function (ownProps) {
578
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__["RegistryConsumer"], null, function (registry) {
579
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(ComponentWithSelect, {
580
+ ownProps: ownProps,
581
+ registry: registry
582
+ });
583
+ });
584
+ };
585
+ }, 'withSelect');
 
 
 
 
 
 
 
 
 
 
586
  };
587
 
588
+ /* harmony default export */ __webpack_exports__["a"] = (withSelect);
589
 
590
  /***/ }),
 
 
591
 
592
+ /***/ 108:
593
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
594
 
595
+ "use strict";
596
+ /* harmony import */ var _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24);
597
+ /* harmony import */ var _woocommerce_date__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_date__WEBPACK_IMPORTED_MODULE_0__);
598
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "k", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["isoDateFormat"]; });
599
 
600
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["appendTimestamp"]; });
601
 
602
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "h", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["getDateParamsFromQuery"]; });
 
 
603
 
604
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "f", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["getCurrentDates"]; });
 
 
605
 
606
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "j", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["getPreviousDate"]; });
 
 
 
 
 
607
 
608
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "d", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["getAllowedIntervalsForQuery"]; });
609
 
610
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "i", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["getIntervalForQuery"]; });
 
 
611
 
612
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "e", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["getChartTypeForQuery"]; });
613
 
614
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["defaultTableDateFormat"]; });
 
 
615
 
616
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "g", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["getDateFormatsForInterval"]; });
 
 
617
 
618
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["dateValidationMessages"]; });
 
 
619
 
620
+ /**
621
+ * External dependencies
622
+ */
623
 
624
+ /**
625
+ * Internal dependencies
626
+ */
627
+
628
+ /**
629
+ * WooCommerce dependencies
630
+ */
631
+ // Export the expected API for the consuming app.
632
 
 
 
 
 
 
633
 
 
634
 
635
  /***/ }),
 
 
636
 
637
+ /***/ 109:
638
+ /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
639
 
640
+ "use strict";
641
+
642
+
643
+ /**
644
+ * Copyright (c) 2013-present, Facebook, Inc.
645
+ *
646
+ * This source code is licensed under the MIT license found in the
647
+ * LICENSE file in the root directory of this source tree.
648
+ *
649
+ *
650
+ */
651
+
652
+ function makeEmptyFunction(arg) {
653
+ return function () {
654
+ return arg;
655
+ };
656
  }
657
 
658
+ /**
659
+ * This function accepts and discards inputs; it has no side effects. This is
660
+ * primarily useful idiomatically for overridable function endpoints which
661
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
662
+ */
663
+ var emptyFunction = function emptyFunction() {};
664
+
665
+ emptyFunction.thatReturns = makeEmptyFunction;
666
+ emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
667
+ emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
668
+ emptyFunction.thatReturnsNull = makeEmptyFunction(null);
669
+ emptyFunction.thatReturnsThis = function () {
670
+ return this;
671
+ };
672
+ emptyFunction.thatReturnsArgument = function (arg) {
673
+ return arg;
674
+ };
675
+
676
+ module.exports = emptyFunction;
677
 
678
  /***/ }),
 
 
679
 
680
+ /***/ 11:
681
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
682
 
683
+ "use strict";
684
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
685
+ /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
686
+ /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
687
 
 
688
 
689
  function _possibleConstructorReturn(self, call) {
690
+ if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
691
  return call;
692
  }
693
 
694
+ return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
695
  }
696
 
 
 
 
 
 
 
 
 
697
  /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
698
 
699
+ /***/ 111:
 
700
  /***/ (function(module, exports) {
701
 
702
+ (function() { module.exports = this["wc"]["currency"]; }());
703
 
704
  /***/ }),
 
 
705
 
706
+ /***/ 113:
707
+ /***/ (function(module, exports, __webpack_require__) {
 
 
 
708
 
709
+ "use strict";
710
+ /**
711
+ * Copyright (c) 2013-present, Facebook, Inc.
712
+ *
713
+ * This source code is licensed under the MIT license found in the
714
+ * LICENSE file in the root directory of this source tree.
715
+ */
716
 
 
 
 
717
 
718
 
719
+ var ReactPropTypesSecret = __webpack_require__(114);
 
 
720
 
721
+ function emptyFunction() {}
722
+ function emptyFunctionWithReset() {}
723
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
724
 
725
+ module.exports = function() {
726
+ function shim(props, propName, componentName, location, propFullName, secret) {
727
+ if (secret === ReactPropTypesSecret) {
728
+ // It is still safe when called from React.
729
+ return;
730
+ }
731
+ var err = new Error(
732
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
733
+ 'Use PropTypes.checkPropTypes() to call them. ' +
734
+ 'Read more at http://fb.me/use-check-prop-types'
735
+ );
736
+ err.name = 'Invariant Violation';
737
+ throw err;
738
+ };
739
+ shim.isRequired = shim;
740
+ function getShim() {
741
+ return shim;
742
+ };
743
+ // Important!
744
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
745
+ var ReactPropTypes = {
746
+ array: shim,
747
+ bool: shim,
748
+ func: shim,
749
+ number: shim,
750
+ object: shim,
751
+ string: shim,
752
+ symbol: shim,
753
 
754
+ any: shim,
755
+ arrayOf: getShim,
756
+ element: shim,
757
+ elementType: shim,
758
+ instanceOf: getShim,
759
+ node: shim,
760
+ objectOf: getShim,
761
+ oneOf: getShim,
762
+ oneOfType: getShim,
763
+ shape: getShim,
764
+ exact: getShim,
765
 
766
+ checkPropTypes: emptyFunctionWithReset,
767
+ resetWarningCache: emptyFunction
768
+ };
769
 
770
+ ReactPropTypes.PropTypes = ReactPropTypes;
 
 
771
 
772
+ return ReactPropTypes;
 
 
 
 
773
  };
774
 
775
 
776
  /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
777
 
778
+ /***/ 114:
 
 
779
  /***/ (function(module, exports, __webpack_require__) {
780
 
781
+ "use strict";
782
+ /**
783
+ * Copyright (c) 2013-present, Facebook, Inc.
784
+ *
785
+ * This source code is licensed under the MIT license found in the
786
+ * LICENSE file in the root directory of this source tree.
787
+ */
788
 
 
789
 
 
 
 
 
 
790
 
791
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
792
 
793
+ module.exports = ReactPropTypesSecret;
 
 
794
 
 
795
 
796
  /***/ }),
 
 
 
 
797
 
798
+ /***/ 115:
 
 
799
  /***/ (function(module, exports, __webpack_require__) {
800
 
801
+ "use strict";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
802
 
 
 
 
803
 
804
+ var utils = __webpack_require__(73);
805
+ var formats = __webpack_require__(94);
806
+ var has = Object.prototype.hasOwnProperty;
807
 
808
+ var arrayPrefixGenerators = {
809
+ brackets: function brackets(prefix) {
810
+ return prefix + '[]';
811
+ },
812
+ comma: 'comma',
813
+ indices: function indices(prefix, key) {
814
+ return prefix + '[' + key + ']';
815
+ },
816
+ repeat: function repeat(prefix) {
817
+ return prefix;
818
+ }
819
  };
820
 
821
+ var isArray = Array.isArray;
822
+ var push = Array.prototype.push;
823
+ var pushToArray = function (arr, valueOrArray) {
824
+ push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
 
 
 
 
 
 
 
 
825
  };
826
 
827
+ var toISO = Date.prototype.toISOString;
828
 
829
+ var defaultFormat = formats['default'];
830
+ var defaults = {
831
+ addQueryPrefix: false,
832
+ allowDots: false,
833
+ charset: 'utf-8',
834
+ charsetSentinel: false,
835
+ delimiter: '&',
836
+ encode: true,
837
+ encoder: utils.encode,
838
+ encodeValuesOnly: false,
839
+ format: defaultFormat,
840
+ formatter: formats.formatters[defaultFormat],
841
+ // deprecated
842
+ indices: false,
843
+ serializeDate: function serializeDate(date) {
844
+ return toISO.call(date);
845
+ },
846
+ skipNulls: false,
847
+ strictNullHandling: false
848
  };
849
 
850
+ var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
851
+ return typeof v === 'string'
852
+ || typeof v === 'number'
853
+ || typeof v === 'boolean'
854
+ || typeof v === 'symbol'
855
+ || typeof v === 'bigint';
856
+ };
857
 
858
+ var stringify = function stringify(
859
+ object,
860
+ prefix,
861
+ generateArrayPrefix,
862
+ strictNullHandling,
863
+ skipNulls,
864
+ encoder,
865
+ filter,
866
+ sort,
867
+ allowDots,
868
+ serializeDate,
869
+ formatter,
870
+ encodeValuesOnly,
871
+ charset
872
+ ) {
873
+ var obj = object;
874
+ if (typeof filter === 'function') {
875
+ obj = filter(prefix, obj);
876
+ } else if (obj instanceof Date) {
877
+ obj = serializeDate(obj);
878
+ } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
879
+ obj = obj.join(',');
880
+ }
881
 
882
+ if (obj === null) {
883
+ if (strictNullHandling) {
884
+ return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key') : prefix;
885
+ }
886
 
887
+ obj = '';
888
+ }
889
 
890
+ if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
891
+ if (encoder) {
892
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key');
893
+ return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value'))];
894
+ }
895
+ return [formatter(prefix) + '=' + formatter(String(obj))];
896
+ }
 
897
 
898
+ var values = [];
899
 
900
+ if (typeof obj === 'undefined') {
901
+ return values;
902
+ }
903
 
904
+ var objKeys;
905
+ if (isArray(filter)) {
906
+ objKeys = filter;
907
+ } else {
908
+ var keys = Object.keys(obj);
909
+ objKeys = sort ? keys.sort(sort) : keys;
910
+ }
911
 
912
+ for (var i = 0; i < objKeys.length; ++i) {
913
+ var key = objKeys[i];
 
 
 
914
 
915
+ if (skipNulls && obj[key] === null) {
916
+ continue;
917
+ }
918
 
919
+ if (isArray(obj)) {
920
+ pushToArray(values, stringify(
921
+ obj[key],
922
+ typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix,
923
+ generateArrayPrefix,
924
+ strictNullHandling,
925
+ skipNulls,
926
+ encoder,
927
+ filter,
928
+ sort,
929
+ allowDots,
930
+ serializeDate,
931
+ formatter,
932
+ encodeValuesOnly,
933
+ charset
934
+ ));
935
+ } else {
936
+ pushToArray(values, stringify(
937
+ obj[key],
938
+ prefix + (allowDots ? '.' + key : '[' + key + ']'),
939
+ generateArrayPrefix,
940
+ strictNullHandling,
941
+ skipNulls,
942
+ encoder,
943
+ filter,
944
+ sort,
945
+ allowDots,
946
+ serializeDate,
947
+ formatter,
948
+ encodeValuesOnly,
949
+ charset
950
+ ));
951
+ }
952
+ }
953
 
954
+ return values;
955
+ };
956
 
957
+ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
958
+ if (!opts) {
959
+ return defaults;
960
+ }
961
 
962
+ if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
963
+ throw new TypeError('Encoder has to be a function.');
964
+ }
965
 
966
+ var charset = opts.charset || defaults.charset;
967
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
968
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
969
+ }
970
 
971
+ var format = formats['default'];
972
+ if (typeof opts.format !== 'undefined') {
973
+ if (!has.call(formats.formatters, opts.format)) {
974
+ throw new TypeError('Unknown format option provided.');
975
+ }
976
+ format = opts.format;
977
+ }
978
+ var formatter = formats.formatters[format];
 
 
 
979
 
980
+ var filter = defaults.filter;
981
+ if (typeof opts.filter === 'function' || isArray(opts.filter)) {
982
+ filter = opts.filter;
983
+ }
984
 
985
+ return {
986
+ addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
987
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
988
+ charset: charset,
989
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
990
+ delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
991
+ encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
992
+ encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
993
+ encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
994
+ filter: filter,
995
+ formatter: formatter,
996
+ serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
997
+ skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
998
+ sort: typeof opts.sort === 'function' ? opts.sort : null,
999
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
1000
+ };
1001
+ };
1002
 
1003
+ module.exports = function (object, opts) {
1004
+ var obj = object;
1005
+ var options = normalizeStringifyOptions(opts);
1006
 
1007
+ var objKeys;
1008
+ var filter;
 
1009
 
1010
+ if (typeof options.filter === 'function') {
1011
+ filter = options.filter;
1012
+ obj = filter('', obj);
1013
+ } else if (isArray(options.filter)) {
1014
+ filter = options.filter;
1015
+ objKeys = filter;
1016
+ }
1017
 
1018
+ var keys = [];
 
 
1019
 
1020
+ if (typeof obj !== 'object' || obj === null) {
1021
+ return '';
1022
+ }
 
 
 
 
 
1023
 
1024
+ var arrayFormat;
1025
+ if (opts && opts.arrayFormat in arrayPrefixGenerators) {
1026
+ arrayFormat = opts.arrayFormat;
1027
+ } else if (opts && 'indices' in opts) {
1028
+ arrayFormat = opts.indices ? 'indices' : 'repeat';
1029
+ } else {
1030
+ arrayFormat = 'indices';
1031
+ }
1032
 
1033
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
 
 
1034
 
1035
+ if (!objKeys) {
1036
+ objKeys = Object.keys(obj);
1037
+ }
 
 
 
 
 
1038
 
1039
+ if (options.sort) {
1040
+ objKeys.sort(options.sort);
1041
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1042
 
1043
+ for (var i = 0; i < objKeys.length; ++i) {
1044
+ var key = objKeys[i];
 
 
 
 
 
1045
 
1046
+ if (options.skipNulls && obj[key] === null) {
1047
+ continue;
1048
+ }
1049
+ pushToArray(keys, stringify(
1050
+ obj[key],
1051
+ key,
1052
+ generateArrayPrefix,
1053
+ options.strictNullHandling,
1054
+ options.skipNulls,
1055
+ options.encode ? options.encoder : null,
1056
+ options.filter,
1057
+ options.sort,
1058
+ options.allowDots,
1059
+ options.serializeDate,
1060
+ options.formatter,
1061
+ options.encodeValuesOnly,
1062
+ options.charset
1063
+ ));
1064
+ }
1065
 
1066
+ var joined = keys.join(options.delimiter);
1067
+ var prefix = options.addQueryPrefix === true ? '?' : '';
 
1068
 
1069
+ if (options.charsetSentinel) {
1070
+ if (options.charset === 'iso-8859-1') {
1071
+ // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
1072
+ prefix += 'utf8=%26%2310003%3B&';
1073
+ } else {
1074
+ // encodeURIComponent('✓')
1075
+ prefix += 'utf8=%E2%9C%93&';
1076
+ }
1077
+ }
1078
 
1079
+ return joined.length > 0 ? prefix + joined : '';
 
 
 
 
 
1080
  };
1081
 
1082
 
1083
  /***/ }),
 
 
1084
 
1085
+ /***/ 116:
1086
+ /***/ (function(module, exports, __webpack_require__) {
 
 
 
1087
 
1088
+ "use strict";
1089
 
1090
 
1091
+ var utils = __webpack_require__(73);
 
 
1092
 
1093
+ var has = Object.prototype.hasOwnProperty;
1094
+ var isArray = Array.isArray;
 
 
 
 
 
 
 
 
1095
 
1096
+ var defaults = {
1097
+ allowDots: false,
1098
+ allowPrototypes: false,
1099
+ arrayLimit: 20,
1100
+ charset: 'utf-8',
1101
+ charsetSentinel: false,
1102
+ comma: false,
1103
+ decoder: utils.decode,
1104
+ delimiter: '&',
1105
+ depth: 5,
1106
+ ignoreQueryPrefix: false,
1107
+ interpretNumericEntities: false,
1108
+ parameterLimit: 1000,
1109
+ parseArrays: true,
1110
+ plainObjects: false,
1111
+ strictNullHandling: false
1112
+ };
1113
 
1114
+ var interpretNumericEntities = function (str) {
1115
+ return str.replace(/&#(\d+);/g, function ($0, numberStr) {
1116
+ return String.fromCharCode(parseInt(numberStr, 10));
1117
+ });
1118
+ };
1119
 
1120
+ var parseArrayValue = function (val, options) {
1121
+ if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
1122
+ return val.split(',');
1123
+ }
 
 
 
 
 
 
 
 
 
 
 
1124
 
1125
+ return val;
1126
+ };
1127
 
1128
+ var maybeMap = function maybeMap(val, fn) {
1129
+ if (isArray(val)) {
1130
+ var mapped = [];
1131
+ for (var i = 0; i < val.length; i += 1) {
1132
+ mapped.push(fn(val[i]));
1133
+ }
1134
+ return mapped;
1135
+ }
1136
+ return fn(val);
1137
+ };
1138
 
1139
+ // This is what browsers will submit when the ✓ character occurs in an
1140
+ // application/x-www-form-urlencoded body and the encoding of the page containing
1141
+ // the form is iso-8859-1, or when the submitted form has an accept-charset
1142
+ // attribute of iso-8859-1. Presumably also with other charsets that do not contain
1143
+ // the ✓ character, such as us-ascii.
1144
+ var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
1145
 
1146
+ // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
1147
+ var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
 
1148
 
1149
+ var parseValues = function parseQueryStringValues(str, options) {
1150
+ var obj = {};
1151
+ var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
1152
+ var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
1153
+ var parts = cleanStr.split(options.delimiter, limit);
1154
+ var skipIndex = -1; // Keep track of where the utf8 sentinel was found
1155
+ var i;
1156
 
1157
+ var charset = options.charset;
1158
+ if (options.charsetSentinel) {
1159
+ for (i = 0; i < parts.length; ++i) {
1160
+ if (parts[i].indexOf('utf8=') === 0) {
1161
+ if (parts[i] === charsetSentinel) {
1162
+ charset = 'utf-8';
1163
+ } else if (parts[i] === isoSentinel) {
1164
+ charset = 'iso-8859-1';
1165
+ }
1166
+ skipIndex = i;
1167
+ i = parts.length; // The eslint settings do not allow break;
1168
+ }
1169
+ }
1170
+ }
1171
 
1172
+ for (i = 0; i < parts.length; ++i) {
1173
+ if (i === skipIndex) {
1174
+ continue;
1175
+ }
1176
+ var part = parts[i];
1177
 
1178
+ var bracketEqualsPos = part.indexOf(']=');
1179
+ var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
 
 
 
 
 
 
1180
 
1181
+ var key, val;
1182
+ if (pos === -1) {
1183
+ key = options.decoder(part, defaults.decoder, charset, 'key');
1184
+ val = options.strictNullHandling ? null : '';
1185
+ } else {
1186
+ key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
1187
+ val = maybeMap(
1188
+ parseArrayValue(part.slice(pos + 1), options),
1189
+ function (encodedVal) {
1190
+ return options.decoder(encodedVal, defaults.decoder, charset, 'value');
1191
+ }
1192
+ );
1193
+ }
1194
 
1195
+ if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
1196
+ val = interpretNumericEntities(val);
1197
+ }
1198
 
1199
+ if (part.indexOf('[]=') > -1) {
1200
+ val = isArray(val) ? [val] : val;
1201
+ }
1202
 
1203
+ if (has.call(obj, key)) {
1204
+ obj[key] = utils.combine(obj[key], val);
1205
+ } else {
1206
+ obj[key] = val;
1207
+ }
1208
+ }
1209
 
1210
+ return obj;
 
1211
  };
1212
 
1213
+ var parseObject = function (chain, val, options, valuesParsed) {
1214
+ var leaf = valuesParsed ? val : parseArrayValue(val, options);
1215
 
1216
+ for (var i = chain.length - 1; i >= 0; --i) {
1217
+ var obj;
1218
+ var root = chain[i];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1219
 
1220
+ if (root === '[]' && options.parseArrays) {
1221
+ obj = [].concat(leaf);
1222
+ } else {
1223
+ obj = options.plainObjects ? Object.create(null) : {};
1224
+ var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
1225
+ var index = parseInt(cleanRoot, 10);
1226
+ if (!options.parseArrays && cleanRoot === '') {
1227
+ obj = { 0: leaf };
1228
+ } else if (
1229
+ !isNaN(index)
1230
+ && root !== cleanRoot
1231
+ && String(index) === cleanRoot
1232
+ && index >= 0
1233
+ && (options.parseArrays && index <= options.arrayLimit)
1234
+ ) {
1235
+ obj = [];
1236
+ obj[index] = leaf;
1237
+ } else {
1238
+ obj[cleanRoot] = leaf;
1239
+ }
1240
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1241
 
1242
+ leaf = obj; // eslint-disable-line no-param-reassign
 
 
 
 
 
 
1243
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1244
 
1245
+ return leaf;
1246
+ };
 
1247
 
1248
+ var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
1249
+ if (!givenKey) {
1250
+ return;
 
 
 
 
 
 
 
1251
  }
 
 
1252
 
1253
+ // Transform dot notation to bracket notation
1254
+ var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
 
1255
 
1256
+ // The regex chunks
 
 
1257
 
1258
+ var brackets = /(\[[^[\]]*])/;
1259
+ var child = /(\[[^[\]]*])/g;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1260
 
1261
+ // Get the parent
 
 
 
 
 
 
 
 
 
 
 
 
 
1262
 
1263
+ var segment = options.depth > 0 && brackets.exec(key);
1264
+ var parent = segment ? key.slice(0, segment.index) : key;
 
 
 
 
 
 
1265
 
1266
+ // Stash the parent if it exists
 
 
 
 
 
 
1267
 
1268
+ var keys = [];
1269
+ if (parent) {
1270
+ // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
1271
+ if (!options.plainObjects && has.call(Object.prototype, parent)) {
1272
+ if (!options.allowPrototypes) {
1273
+ return;
1274
+ }
1275
+ }
 
 
 
 
1276
 
1277
+ keys.push(parent);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1278
  }
 
 
 
 
 
 
 
 
 
 
 
1279
 
1280
+ // Loop through children appending to the array until we hit depth
1281
 
1282
+ var i = 0;
1283
+ while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
1284
+ i += 1;
1285
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
1286
+ if (!options.allowPrototypes) {
1287
+ return;
1288
+ }
1289
+ }
1290
+ keys.push(segment[1]);
1291
+ }
1292
 
1293
+ // If there's a remainder, just add whatever is left
 
 
1294
 
1295
+ if (segment) {
1296
+ keys.push('[' + key.slice(segment.index) + ']');
1297
+ }
1298
 
1299
+ return parseObject(keys, val, options, valuesParsed);
 
 
 
1300
  };
1301
 
1302
+ var normalizeParseOptions = function normalizeParseOptions(opts) {
1303
+ if (!opts) {
1304
+ return defaults;
1305
+ }
1306
 
1307
+ if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
1308
+ throw new TypeError('Decoder has to be a function.');
1309
+ }
1310
 
1311
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
1312
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
1313
+ }
1314
+ var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
1315
 
1316
+ return {
1317
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
1318
+ allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
1319
+ arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
1320
+ charset: charset,
1321
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
1322
+ comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
1323
+ decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
1324
+ delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
1325
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
1326
+ depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
1327
+ ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
1328
+ interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
1329
+ parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
1330
+ parseArrays: opts.parseArrays !== false,
1331
+ plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
1332
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
1333
+ };
1334
  };
1335
 
1336
+ module.exports = function (str, opts) {
1337
+ var options = normalizeParseOptions(opts);
1338
 
1339
+ if (str === '' || str === null || typeof str === 'undefined') {
1340
+ return options.plainObjects ? Object.create(null) : {};
1341
+ }
1342
 
1343
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
1344
+ var obj = options.plainObjects ? Object.create(null) : {};
1345
+
1346
+ // Iterate over the keys and setup the new object
1347
 
1348
+ var keys = Object.keys(tempObj);
1349
+ for (var i = 0; i < keys.length; ++i) {
1350
+ var key = keys[i];
1351
+ var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
1352
+ obj = utils.merge(obj, newObj, options);
1353
+ }
1354
 
1355
+ return utils.compact(obj);
 
 
 
1356
  };
1357
 
1358
 
1359
  /***/ }),
 
 
1360
 
1361
+ /***/ 117:
 
 
 
 
1362
  /***/ (function(module, exports, __webpack_require__) {
1363
 
1364
+ "use strict";
 
 
 
 
 
 
 
 
 
1365
 
1366
 
1367
+ var keys = Object.keys;
 
 
1368
 
1369
+ /**
1370
+ * Returns true if the two objects are shallow equal, or false otherwise.
1371
+ *
1372
+ * @param {import('.').ComparableObject} a First object to compare.
1373
+ * @param {import('.').ComparableObject} b Second object to compare.
1374
+ *
1375
+ * @return {boolean} Whether the two objects are shallow equal.
1376
+ */
1377
+ function isShallowEqualObjects( a, b ) {
1378
+ var aKeys, bKeys, i, key, aValue;
1379
 
1380
+ if ( a === b ) {
1381
+ return true;
1382
+ }
1383
 
1384
+ aKeys = keys( a );
1385
+ bKeys = keys( b );
 
 
 
1386
 
1387
+ if ( aKeys.length !== bKeys.length ) {
1388
+ return false;
1389
+ }
1390
 
1391
+ i = 0;
1392
+
1393
+ while ( i < aKeys.length ) {
1394
+ key = aKeys[ i ];
1395
+ aValue = a[ key ];
1396
+
1397
+ if (
1398
+ // In iterating only the keys of the first object after verifying
1399
+ // equal lengths, account for the case that an explicit `undefined`
1400
+ // value in the first is implicitly undefined in the second.
1401
+ //
1402
+ // Example: isShallowEqualObjects( { a: undefined }, { b: 5 } )
1403
+ ( aValue === undefined && ! b.hasOwnProperty( key ) ) ||
1404
+ aValue !== b[ key ]
1405
+ ) {
1406
+ return false;
1407
+ }
1408
 
1409
+ i++;
1410
+ }
1411
 
1412
+ return true;
1413
+ }
 
1414
 
1415
+ module.exports = isShallowEqualObjects;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1416
 
1417
 
1418
  /***/ }),
1419
+
1420
+ /***/ 118:
1421
  /***/ (function(module, exports, __webpack_require__) {
1422
 
1423
+ "use strict";
 
 
1424
 
 
 
 
 
 
 
 
1425
 
1426
+ /**
1427
+ * Returns true if the two arrays are shallow equal, or false otherwise.
1428
+ *
1429
+ * @param {any[]} a First array to compare.
1430
+ * @param {any[]} b Second array to compare.
1431
+ *
1432
+ * @return {boolean} Whether the two arrays are shallow equal.
1433
+ */
1434
+ function isShallowEqualArrays( a, b ) {
1435
+ var i;
1436
 
1437
+ if ( a === b ) {
1438
+ return true;
1439
+ }
1440
 
1441
+ if ( a.length !== b.length ) {
1442
+ return false;
1443
+ }
1444
 
1445
+ for ( i = 0; i < a.length; i++ ) {
1446
+ if ( a[ i ] !== b[ i ] ) {
1447
+ return false;
1448
+ }
1449
+ }
1450
 
1451
+ return true;
 
 
 
 
 
 
 
 
1452
  }
1453
 
1454
+ module.exports = isShallowEqualArrays;
1455
 
1456
 
1457
  /***/ }),
1458
+
1459
+ /***/ 119:
1460
  /***/ (function(module, exports, __webpack_require__) {
1461
 
1462
+ "use strict";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1463
 
1464
 
1465
+ /**
1466
+ * This is the common logic for both the Node.js and web browser
1467
+ * implementations of `debug()`.
1468
+ */
1469
+ function setup(env) {
1470
+ createDebug.debug = createDebug;
1471
+ createDebug.default = createDebug;
1472
+ createDebug.coerce = coerce;
1473
+ createDebug.disable = disable;
1474
+ createDebug.enable = enable;
1475
+ createDebug.enabled = enabled;
1476
+ createDebug.humanize = __webpack_require__(120);
1477
+ Object.keys(env).forEach(function (key) {
1478
+ createDebug[key] = env[key];
1479
+ });
1480
+ /**
1481
+ * Active `debug` instances.
1482
+ */
1483
 
1484
+ createDebug.instances = [];
1485
+ /**
1486
+ * The currently active debug mode names, and names to skip.
1487
+ */
1488
 
1489
+ createDebug.names = [];
1490
+ createDebug.skips = [];
1491
+ /**
1492
+ * Map of special "%n" handling functions, for the debug "format" argument.
1493
+ *
1494
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
1495
+ */
1496
 
1497
+ createDebug.formatters = {};
1498
+ /**
1499
+ * Selects a color for a debug namespace
1500
+ * @param {String} namespace The namespace string for the for the debug instance to be colored
1501
+ * @return {Number|String} An ANSI color code for the given namespace
1502
+ * @api private
1503
+ */
1504
 
1505
+ function selectColor(namespace) {
1506
+ var hash = 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1507
 
1508
+ for (var i = 0; i < namespace.length; i++) {
1509
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
1510
+ hash |= 0; // Convert to 32bit integer
1511
+ }
1512
 
1513
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
1514
+ }
 
 
 
1515
 
1516
+ createDebug.selectColor = selectColor;
1517
+ /**
1518
+ * Create a debugger with the given `namespace`.
1519
+ *
1520
+ * @param {String} namespace
1521
+ * @return {Function}
1522
+ * @api public
1523
+ */
1524
+
1525
+ function createDebug(namespace) {
1526
+ var prevTime;
1527
+
1528
+ function debug() {
1529
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1530
+ args[_key] = arguments[_key];
 
 
 
 
 
 
1531
  }
 
 
 
 
 
1532
 
1533
+ // Disabled?
1534
+ if (!debug.enabled) {
1535
+ return;
1536
+ }
1537
 
1538
+ var self = debug; // Set `diff` timestamp
 
 
1539
 
1540
+ var curr = Number(new Date());
1541
+ var ms = curr - (prevTime || curr);
1542
+ self.diff = ms;
1543
+ self.prev = prevTime;
1544
+ self.curr = curr;
1545
+ prevTime = curr;
1546
+ args[0] = createDebug.coerce(args[0]);
1547
 
1548
+ if (typeof args[0] !== 'string') {
1549
+ // Anything else let's inspect with %O
1550
+ args.unshift('%O');
1551
+ } // Apply any `formatters` transformations
1552
 
 
 
 
1553
 
1554
+ var index = 0;
1555
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
1556
+ // If we encounter an escaped % then don't increase the array index
1557
+ if (match === '%%') {
1558
+ return match;
1559
+ }
1560
 
1561
+ index++;
1562
+ var formatter = createDebug.formatters[format];
 
1563
 
1564
+ if (typeof formatter === 'function') {
1565
+ var val = args[index];
1566
+ match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
1567
 
1568
+ args.splice(index, 1);
1569
+ index--;
1570
+ }
1571
 
1572
+ return match;
1573
+ }); // Apply env-specific formatting (colors, etc.)
 
 
 
 
1574
 
1575
+ createDebug.formatArgs.call(self, args);
1576
+ var logFn = self.log || createDebug.log;
1577
+ logFn.apply(self, args);
1578
+ }
1579
 
1580
+ debug.namespace = namespace;
1581
+ debug.enabled = createDebug.enabled(namespace);
1582
+ debug.useColors = createDebug.useColors();
1583
+ debug.color = selectColor(namespace);
1584
+ debug.destroy = destroy;
1585
+ debug.extend = extend; // Debug.formatArgs = formatArgs;
1586
+ // debug.rawLog = rawLog;
1587
+ // env-specific initialization logic for debug instances
1588
 
1589
+ if (typeof createDebug.init === 'function') {
1590
+ createDebug.init(debug);
1591
+ }
1592
 
1593
+ createDebug.instances.push(debug);
1594
+ return debug;
1595
+ }
 
 
 
 
1596
 
1597
+ function destroy() {
1598
+ var index = createDebug.instances.indexOf(this);
 
 
 
1599
 
1600
+ if (index !== -1) {
1601
+ createDebug.instances.splice(index, 1);
1602
+ return true;
1603
+ }
1604
 
1605
+ return false;
1606
+ }
 
1607
 
1608
+ function extend(namespace, delimiter) {
1609
+ var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
1610
+ newDebug.log = this.log;
1611
+ return newDebug;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1612
  }
1613
+ /**
1614
+ * Enables a debug mode by namespaces. This can include modes
1615
+ * separated by a colon and wildcards.
1616
+ *
1617
+ * @param {String} namespaces
1618
+ * @api public
1619
+ */
1620
+
1621
+
1622
+ function enable(namespaces) {
1623
+ createDebug.save(namespaces);
1624
+ createDebug.names = [];
1625
+ createDebug.skips = [];
1626
+ var i;
1627
+ var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
1628
+ var len = split.length;
1629
 
1630
+ for (i = 0; i < len; i++) {
1631
+ if (!split[i]) {
1632
+ // ignore empty strings
1633
+ continue;
1634
+ }
1635
 
1636
+ namespaces = split[i].replace(/\*/g, '.*?');
1637
 
1638
+ if (namespaces[0] === '-') {
1639
+ createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
1640
+ } else {
1641
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
1642
+ }
1643
+ }
1644
 
1645
+ for (i = 0; i < createDebug.instances.length; i++) {
1646
+ var instance = createDebug.instances[i];
1647
+ instance.enabled = createDebug.enabled(instance.namespace);
1648
+ }
1649
+ }
1650
+ /**
1651
+ * Disable debug output.
1652
+ *
1653
+ * @return {String} namespaces
1654
+ * @api public
1655
+ */
1656
 
 
 
 
1657
 
1658
+ function disable() {
1659
+ var namespaces = [].concat(createDebug.names.map(toNamespace), createDebug.skips.map(toNamespace).map(function (namespace) {
1660
+ return '-' + namespace;
1661
+ })).join(',');
1662
+ createDebug.enable('');
1663
+ return namespaces;
1664
+ }
1665
+ /**
1666
+ * Returns true if the given mode name is enabled, false otherwise.
1667
+ *
1668
+ * @param {String} name
1669
+ * @return {Boolean}
1670
+ * @api public
1671
+ */
1672
 
 
1673
 
1674
+ function enabled(name) {
1675
+ if (name[name.length - 1] === '*') {
1676
+ return true;
1677
+ }
1678
 
1679
+ var i;
1680
+ var len;
 
1681
 
1682
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
1683
+ if (createDebug.skips[i].test(name)) {
1684
+ return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1685
  }
1686
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1687
 
1688
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
1689
+ if (createDebug.names[i].test(name)) {
1690
+ return true;
1691
+ }
1692
+ }
1693
 
1694
+ return false;
1695
+ }
1696
+ /**
1697
+ * Convert regexp to namespace
1698
+ *
1699
+ * @param {RegExp} regxep
1700
+ * @return {String} namespace
1701
+ * @api private
1702
+ */
1703
 
1704
 
1705
+ function toNamespace(regexp) {
1706
+ return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
1707
+ }
1708
+ /**
1709
+ * Coerce `val`.
1710
+ *
1711
+ * @param {Mixed} val
1712
+ * @return {Mixed}
1713
+ * @api private
1714
+ */
1715
 
 
 
1716
 
1717
+ function coerce(val) {
1718
+ if (val instanceof Error) {
1719
+ return val.stack || val.message;
1720
+ }
1721
 
1722
+ return val;
1723
+ }
1724
 
1725
+ createDebug.enable(createDebug.load());
1726
+ return createDebug;
1727
+ }
1728
 
1729
+ module.exports = setup;
1730
 
1731
  /***/ }),
 
 
 
 
1732
 
1733
+ /***/ 12:
1734
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1735
 
1736
+ "use strict";
1737
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
 
 
1738
  function _extends() {
1739
+ _extends = Object.assign || function (target) {
1740
  for (var i = 1; i < arguments.length; i++) {
1741
  var source = arguments[i];
1742
 
1753
  return _extends.apply(this, arguments);
1754
  }
1755
 
 
 
1756
  /***/ }),
 
 
1757
 
1758
+ /***/ 120:
1759
+ /***/ (function(module, exports) {
1760
+
1761
+ /**
1762
+ * Helpers.
1763
+ */
1764
 
1765
+ var s = 1000;
1766
+ var m = s * 60;
1767
+ var h = m * 60;
1768
+ var d = h * 24;
1769
+ var w = d * 7;
1770
+ var y = d * 365.25;
1771
 
1772
+ /**
1773
+ * Parse or format the given `val`.
1774
+ *
1775
+ * Options:
1776
+ *
1777
+ * - `long` verbose formatting [false]
1778
+ *
1779
+ * @param {String|Number} val
1780
+ * @param {Object} [options]
1781
+ * @throws {Error} throw an error if val is not a non-empty string or a number
1782
+ * @return {String|Number}
1783
+ * @api public
1784
+ */
1785
 
1786
+ module.exports = function(val, options) {
1787
+ options = options || {};
1788
+ var type = typeof val;
1789
+ if (type === 'string' && val.length > 0) {
1790
+ return parse(val);
1791
+ } else if (type === 'number' && isFinite(val)) {
1792
+ return options.long ? fmtLong(val) : fmtShort(val);
1793
+ }
1794
+ throw new Error(
1795
+ 'val is not a non-empty string or a valid number. val=' +
1796
+ JSON.stringify(val)
1797
+ );
1798
+ };
1799
 
1800
+ /**
1801
+ * Parse the given `str` and return milliseconds.
1802
+ *
1803
+ * @param {String} str
1804
+ * @return {Number}
1805
+ * @api private
1806
+ */
1807
 
1808
+ function parse(str) {
1809
+ str = String(str);
1810
+ if (str.length > 100) {
1811
+ return;
1812
+ }
1813
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
1814
+ str
1815
+ );
1816
+ if (!match) {
1817
+ return;
1818
+ }
1819
+ var n = parseFloat(match[1]);
1820
+ var type = (match[2] || 'ms').toLowerCase();
1821
+ switch (type) {
1822
+ case 'years':
1823
+ case 'year':
1824
+ case 'yrs':
1825
+ case 'yr':
1826
+ case 'y':
1827
+ return n * y;
1828
+ case 'weeks':
1829
+ case 'week':
1830
+ case 'w':
1831
+ return n * w;
1832
+ case 'days':
1833
+ case 'day':
1834
+ case 'd':
1835
+ return n * d;
1836
+ case 'hours':
1837
+ case 'hour':
1838
+ case 'hrs':
1839
+ case 'hr':
1840
+ case 'h':
1841
+ return n * h;
1842
+ case 'minutes':
1843
+ case 'minute':
1844
+ case 'mins':
1845
+ case 'min':
1846
+ case 'm':
1847
+ return n * m;
1848
+ case 'seconds':
1849
+ case 'second':
1850
+ case 'secs':
1851
+ case 'sec':
1852
+ case 's':
1853
+ return n * s;
1854
+ case 'milliseconds':
1855
+ case 'millisecond':
1856
+ case 'msecs':
1857
+ case 'msec':
1858
+ case 'ms':
1859
+ return n;
1860
+ default:
1861
+ return undefined;
1862
+ }
1863
+ }
1864
 
1865
+ /**
1866
+ * Short format for `ms`.
1867
+ *
1868
+ * @param {Number} ms
1869
+ * @return {String}
1870
+ * @api private
1871
+ */
1872
 
1873
+ function fmtShort(ms) {
1874
+ var msAbs = Math.abs(ms);
1875
+ if (msAbs >= d) {
1876
+ return Math.round(ms / d) + 'd';
1877
+ }
1878
+ if (msAbs >= h) {
1879
+ return Math.round(ms / h) + 'h';
1880
+ }
1881
+ if (msAbs >= m) {
1882
+ return Math.round(ms / m) + 'm';
1883
+ }
1884
+ if (msAbs >= s) {
1885
+ return Math.round(ms / s) + 's';
1886
+ }
1887
+ return ms + 'ms';
1888
+ }
1889
 
1890
+ /**
1891
+ * Long format for `ms`.
1892
+ *
1893
+ * @param {Number} ms
1894
+ * @return {String}
1895
+ * @api private
1896
+ */
1897
 
1898
+ function fmtLong(ms) {
1899
+ var msAbs = Math.abs(ms);
1900
+ if (msAbs >= d) {
1901
+ return plural(ms, msAbs, d, 'day');
1902
+ }
1903
+ if (msAbs >= h) {
1904
+ return plural(ms, msAbs, h, 'hour');
1905
+ }
1906
+ if (msAbs >= m) {
1907
+ return plural(ms, msAbs, m, 'minute');
1908
+ }
1909
+ if (msAbs >= s) {
1910
+ return plural(ms, msAbs, s, 'second');
1911
+ }
1912
+ return ms + ' ms';
1913
+ }
1914
 
1915
+ /**
1916
+ * Pluralization helper.
1917
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1918
 
1919
+ function plural(ms, msAbs, n, name) {
1920
+ var isPlural = msAbs >= n * 1.5;
1921
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
1922
+ }
 
 
 
 
1923
 
1924
 
1925
  /***/ }),
 
 
1926
 
1927
+ /***/ 126:
1928
+ /***/ (function(module, exports) {
1929
 
1930
+ function _inheritsLoose(subClass, superClass) {
1931
+ subClass.prototype = Object.create(superClass.prototype);
1932
+ subClass.prototype.constructor = subClass;
1933
+ subClass.__proto__ = superClass;
1934
+ }
1935
 
1936
+ module.exports = _inheritsLoose;
1937
 
1938
  /***/ }),
1939
+
1940
+ /***/ 127:
1941
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1942
 
1943
  "use strict";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1944
 
1945
+ // EXPORTS
1946
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ speak; });
1947
 
1948
+ // UNUSED EXPORTS: setup
 
 
 
1949
 
1950
+ // EXTERNAL MODULE: ./node_modules/@wordpress/dom-ready/build-module/index.js
1951
+ var build_module = __webpack_require__(70);
 
 
 
 
1952
 
1953
+ // CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/add-container.js
 
 
 
 
 
 
 
 
1954
  /**
1955
+ * Build the live regions markup.
1956
  *
1957
+ * @param {string} [ariaLive] Value for the 'aria-live' attribute; default: 'polite'.
 
 
 
 
 
 
 
 
1958
  *
1959
+ * @return {HTMLDivElement} The ARIA live region HTML element.
 
1960
  */
1961
+ function addContainer() {
1962
+ var ariaLive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'polite';
1963
+ var container = document.createElement('div');
1964
+ container.id = "a11y-speak-".concat(ariaLive);
1965
+ container.className = 'a11y-speak-region';
1966
+ container.setAttribute('style', 'position: absolute;' + 'margin: -1px;' + 'padding: 0;' + 'height: 1px;' + 'width: 1px;' + 'overflow: hidden;' + 'clip: rect(1px, 1px, 1px, 1px);' + '-webkit-clip-path: inset(50%);' + 'clip-path: inset(50%);' + 'border: 0;' + 'word-wrap: normal !important;');
1967
+ container.setAttribute('aria-live', ariaLive);
1968
+ container.setAttribute('aria-relevant', 'additions text');
1969
+ container.setAttribute('aria-atomic', 'true');
1970
+ var _document = document,
1971
+ body = _document.body;
1972
+
1973
+ if (body) {
1974
+ body.appendChild(container);
1975
+ }
1976
+
1977
+ return container;
1978
+ }
1979
+ //# sourceMappingURL=add-container.js.map
1980
+ // CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/clear.js
1981
+ /**
1982
+ * Clear the a11y-speak-region elements.
1983
+ */
1984
+ function clear() {
1985
+ var regions = document.getElementsByClassName('a11y-speak-region');
1986
 
1987
+ for (var i = 0; i < regions.length; i++) {
1988
+ regions[i].textContent = '';
 
 
 
 
 
 
1989
  }
 
 
 
1990
  }
1991
+ //# sourceMappingURL=clear.js.map
1992
+ // CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/filter-message.js
1993
+ var previousMessage = '';
1994
  /**
1995
+ * Filter the message to be announced to the screenreader.
 
 
 
1996
  *
1997
+ * @param {string} message The message to be announced.
1998
  *
1999
+ * @return {string} The filtered message.
 
 
 
 
 
2000
  */
2001
 
2002
+ function filterMessage(message) {
2003
+ /*
2004
+ * Strip HTML tags (if any) from the message string. Ideally, messages should
2005
+ * be simple strings, carefully crafted for specific use with A11ySpeak.
2006
+ * When re-using already existing strings this will ensure simple HTML to be
2007
+ * stripped out and replaced with a space. Browsers will collapse multiple
2008
+ * spaces natively.
2009
+ */
2010
+ message = message.replace(/<[^<>]+>/g, ' ');
2011
 
2012
+ if (previousMessage === message) {
2013
+ message += "\xA0";
2014
  }
2015
 
2016
+ previousMessage = message;
2017
+ return message;
2018
  }
2019
+ //# sourceMappingURL=filter-message.js.map
2020
+ // CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/index.js
2021
  /**
2022
+ * WordPress dependencies
 
 
 
2023
  */
2024
 
2025
+ /**
2026
+ * Internal dependencies
2027
+ */
 
 
 
 
 
 
 
 
 
2028
 
 
 
 
 
 
 
2029
 
2030
 
 
 
 
2031
 
2032
+ /**
2033
+ * Create the live regions.
2034
+ */
2035
 
2036
+ function setup() {
2037
+ var containerAssertive = document.getElementById('a11y-speak-assertive');
2038
+ var containerPolite = document.getElementById('a11y-speak-polite');
2039
 
2040
+ if (containerAssertive === null) {
2041
+ addContainer('assertive');
2042
+ }
2043
+
2044
+ if (containerPolite === null) {
2045
+ addContainer('polite');
2046
+ }
2047
+ }
2048
+ /**
2049
+ * Run setup on domReady.
2050
+ */
2051
+
2052
+ Object(build_module["a" /* default */])(setup);
2053
+ /**
2054
+ * Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions.
2055
+ * This module is inspired by the `speak` function in `wp-a11y.js`.
2056
+ *
2057
+ * @param {string} message The message to be announced by assistive technologies.
2058
+ * @param {string} [ariaLive] The politeness level for aria-live; default: 'polite'.
2059
+ *
2060
+ * @example
2061
+ * ```js
2062
+ * import { speak } from '@wordpress/a11y';
2063
+ *
2064
+ * // For polite messages that shouldn't interrupt what screen readers are currently announcing.
2065
+ * speak( 'The message you want to send to the ARIA live region' );
2066
+ *
2067
+ * // For assertive messages that should interrupt what screen readers are currently announcing.
2068
+ * speak( 'The message you want to send to the ARIA live region', 'assertive' );
2069
+ * ```
2070
+ */
2071
+
2072
+ function speak(message, ariaLive) {
2073
+ // Clear previous messages to allow repeated strings being read out.
2074
+ clear();
2075
+ message = filterMessage(message);
2076
+ var containerAssertive = document.getElementById('a11y-speak-assertive');
2077
+ var containerPolite = document.getElementById('a11y-speak-polite');
2078
+
2079
+ if (containerAssertive && ariaLive === 'assertive') {
2080
+ containerAssertive.textContent = message;
2081
+ } else if (containerPolite) {
2082
+ containerPolite.textContent = message;
2083
+ }
2084
+ }
2085
+ //# sourceMappingURL=index.js.map
2086
 
2087
  /***/ }),
2088
+
2089
+ /***/ 129:
2090
  /***/ (function(module, exports, __webpack_require__) {
2091
 
2092
+ var objectWithoutPropertiesLoose = __webpack_require__(273);
2093
+
2094
+ function _objectWithoutProperties(source, excluded) {
2095
+ if (source == null) return {};
2096
+ var target = objectWithoutPropertiesLoose(source, excluded);
2097
+ var key, i;
2098
 
2099
+ if (Object.getOwnPropertySymbols) {
2100
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
2101
 
2102
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
2103
+ key = sourceSymbolKeys[i];
2104
+ if (excluded.indexOf(key) >= 0) continue;
2105
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
2106
+ target[key] = source[key];
2107
+ }
2108
+ }
2109
+
2110
+ return target;
2111
+ }
2112
 
2113
+ module.exports = _objectWithoutProperties;
2114
 
2115
  /***/ }),
 
 
2116
 
2117
+ /***/ 13:
2118
+ /***/ (function(module, exports) {
 
2119
 
2120
+ (function() { module.exports = this["React"]; }());
2121
 
2122
+ /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
2123
 
2124
+ /***/ 14:
2125
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2126
 
2127
+ "use strict";
2128
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
2129
+ /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46);
2130
 
2131
+ function _objectWithoutProperties(source, excluded) {
2132
+ if (source == null) return {};
2133
+ var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
2134
+ var key, i;
2135
 
2136
+ if (Object.getOwnPropertySymbols) {
2137
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
2138
 
2139
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
2140
+ key = sourceSymbolKeys[i];
2141
+ if (excluded.indexOf(key) >= 0) continue;
2142
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
2143
+ target[key] = source[key];
2144
+ }
2145
  }
 
2146
 
2147
+ return target;
2148
+ }
2149
+
2150
+ /***/ }),
2151
+
2152
+ /***/ 147:
2153
+ /***/ (function(module, exports) {
2154
+
2155
+ function _setPrototypeOf(o, p) {
2156
+ module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
2157
+ o.__proto__ = p;
2158
+ return o;
2159
+ };
2160
+
2161
+ return _setPrototypeOf(o, p);
2162
+ }
2163
+
2164
+ module.exports = _setPrototypeOf;
2165
 
2166
  /***/ }),
2167
+
2168
+ /***/ 148:
2169
  /***/ (function(module, exports, __webpack_require__) {
2170
 
2171
  "use strict";
2172
+ /**
2173
+ * Copyright (c) 2015-present, Facebook, Inc.
2174
+ *
2175
+ * This source code is licensed under the MIT license found in the
2176
+ * LICENSE file in the root directory of this source tree.
2177
+ */
2178
 
 
 
 
 
 
 
 
 
2179
 
 
2180
 
2181
+ var React = __webpack_require__(13);
 
 
 
 
 
 
2182
 
2183
+ var REACT_ELEMENT_TYPE =
2184
+ (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) ||
2185
+ 0xeac7;
2186
 
2187
+ var emptyFunction = __webpack_require__(109);
2188
+ var invariant = __webpack_require__(149);
2189
+ var warning = __webpack_require__(150);
2190
 
2191
+ var SEPARATOR = '.';
2192
+ var SUBSEPARATOR = ':';
2193
 
2194
+ var didWarnAboutMaps = false;
 
 
 
 
 
 
 
 
2195
 
2196
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
2197
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
 
 
 
2198
 
2199
+ function getIteratorFn(maybeIterable) {
2200
+ var iteratorFn =
2201
+ maybeIterable &&
2202
+ ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) ||
2203
+ maybeIterable[FAUX_ITERATOR_SYMBOL]);
2204
+ if (typeof iteratorFn === 'function') {
2205
+ return iteratorFn;
2206
+ }
2207
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2208
 
2209
+ function escape(key) {
2210
+ var escapeRegex = /[=:]/g;
2211
+ var escaperLookup = {
2212
+ '=': '=0',
2213
+ ':': '=2'
2214
  };
2215
+ var escapedString = ('' + key).replace(escapeRegex, function(match) {
2216
+ return escaperLookup[match];
2217
+ });
2218
+
2219
+ return '$' + escapedString;
2220
  }
2221
 
2222
+ function getComponentKey(component, index) {
2223
+ // Do some typechecking here since we call this blindly. We want to ensure
2224
+ // that we don't block potential future ES APIs.
2225
+ if (component && typeof component === 'object' && component.key != null) {
2226
+ // Explicit key
2227
+ return escape(component.key);
2228
+ }
2229
+ // Implicit key determined by the index in the set
2230
+ return index.toString(36);
2231
+ }
2232
 
2233
+ function traverseAllChildrenImpl(
2234
+ children,
2235
+ nameSoFar,
2236
+ callback,
2237
+ traverseContext
2238
+ ) {
2239
+ var type = typeof children;
2240
 
2241
+ if (type === 'undefined' || type === 'boolean') {
2242
+ // All of the above are perceived as null.
2243
+ children = null;
2244
+ }
2245
+
2246
+ if (
2247
+ children === null ||
2248
+ type === 'string' ||
2249
+ type === 'number' ||
2250
+ // The following is inlined from ReactElement. This means we can optimize
2251
+ // some checks. React Fiber also inlines this logic for similar purposes.
2252
+ (type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE)
2253
+ ) {
2254
+ callback(
2255
+ traverseContext,
2256
+ children,
2257
+ // If it's the only child, treat the name as if it was wrapped in an array
2258
+ // so that it's consistent if the number of children grows.
2259
+ nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar
2260
+ );
2261
+ return 1;
2262
+ }
2263
 
2264
+ var child;
2265
+ var nextName;
2266
+ var subtreeCount = 0; // Count of children found in the current subtree.
2267
+ var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
2268
 
2269
+ if (Array.isArray(children)) {
2270
+ for (var i = 0; i < children.length; i++) {
2271
+ child = children[i];
2272
+ nextName = nextNamePrefix + getComponentKey(child, i);
2273
+ subtreeCount += traverseAllChildrenImpl(
2274
+ child,
2275
+ nextName,
2276
+ callback,
2277
+ traverseContext
2278
+ );
2279
+ }
2280
+ } else {
2281
+ var iteratorFn = getIteratorFn(children);
2282
+ if (iteratorFn) {
2283
+ if (false) {}
2284
+
2285
+ var iterator = iteratorFn.call(children);
2286
+ var step;
2287
+ var ii = 0;
2288
+ while (!(step = iterator.next()).done) {
2289
+ child = step.value;
2290
+ nextName = nextNamePrefix + getComponentKey(child, ii++);
2291
+ subtreeCount += traverseAllChildrenImpl(
2292
+ child,
2293
+ nextName,
2294
+ callback,
2295
+ traverseContext
2296
+ );
2297
+ }
2298
+ } else if (type === 'object') {
2299
+ var addendum = '';
2300
+ if (false) {}
2301
+ var childrenString = '' + children;
2302
+ invariant(
2303
+ false,
2304
+ 'Objects are not valid as a React child (found: %s).%s',
2305
+ childrenString === '[object Object]'
2306
+ ? 'object with keys {' + Object.keys(children).join(', ') + '}'
2307
+ : childrenString,
2308
+ addendum
2309
+ );
2310
+ }
2311
+ }
2312
+
2313
+ return subtreeCount;
2314
+ }
2315
 
2316
+ function traverseAllChildren(children, callback, traverseContext) {
2317
+ if (children == null) {
2318
+ return 0;
2319
+ }
2320
 
2321
+ return traverseAllChildrenImpl(children, '', callback, traverseContext);
2322
+ }
 
 
2323
 
2324
+ var userProvidedKeyEscapeRegex = /\/+/g;
2325
+ function escapeUserProvidedKey(text) {
2326
+ return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
2327
+ }
2328
 
2329
+ function cloneAndReplaceKey(oldElement, newKey) {
2330
+ return React.cloneElement(
2331
+ oldElement,
2332
+ {key: newKey},
2333
+ oldElement.props !== undefined ? oldElement.props.children : undefined
2334
+ );
2335
+ }
2336
 
2337
+ var DEFAULT_POOL_SIZE = 10;
2338
+ var DEFAULT_POOLER = oneArgumentPooler;
2339
 
2340
+ var oneArgumentPooler = function(copyFieldsFrom) {
2341
+ var Klass = this;
2342
+ if (Klass.instancePool.length) {
2343
+ var instance = Klass.instancePool.pop();
2344
+ Klass.call(instance, copyFieldsFrom);
2345
+ return instance;
2346
+ } else {
2347
+ return new Klass(copyFieldsFrom);
 
 
 
 
 
 
 
 
 
2348
  }
 
 
 
2349
  };
2350
 
2351
+ var addPoolingTo = function addPoolingTo(CopyConstructor, pooler) {
2352
+ // Casting as any so that flow ignores the actual implementation and trusts
2353
+ // it to match the type we declared
2354
+ var NewKlass = CopyConstructor;
2355
+ NewKlass.instancePool = [];
2356
+ NewKlass.getPooled = pooler || DEFAULT_POOLER;
2357
+ if (!NewKlass.poolSize) {
2358
+ NewKlass.poolSize = DEFAULT_POOL_SIZE;
2359
+ }
2360
+ NewKlass.release = standardReleaser;
2361
+ return NewKlass;
2362
+ };
2363
 
2364
+ var standardReleaser = function standardReleaser(instance) {
2365
+ var Klass = this;
2366
+ invariant(
2367
+ instance instanceof Klass,
2368
+ 'Trying to release an instance into a pool of a different type.'
2369
+ );
2370
+ instance.destructor();
2371
+ if (Klass.instancePool.length < Klass.poolSize) {
2372
+ Klass.instancePool.push(instance);
2373
+ }
2374
+ };
2375
 
2376
+ var fourArgumentPooler = function fourArgumentPooler(a1, a2, a3, a4) {
2377
+ var Klass = this;
2378
+ if (Klass.instancePool.length) {
2379
+ var instance = Klass.instancePool.pop();
2380
+ Klass.call(instance, a1, a2, a3, a4);
2381
+ return instance;
2382
+ } else {
2383
+ return new Klass(a1, a2, a3, a4);
2384
+ }
2385
+ };
2386
 
2387
+ function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
2388
+ this.result = mapResult;
2389
+ this.keyPrefix = keyPrefix;
2390
+ this.func = mapFunction;
2391
+ this.context = mapContext;
2392
+ this.count = 0;
2393
+ }
2394
+ MapBookKeeping.prototype.destructor = function() {
2395
+ this.result = null;
2396
+ this.keyPrefix = null;
2397
+ this.func = null;
2398
+ this.context = null;
2399
+ this.count = 0;
2400
+ };
2401
+ addPoolingTo(MapBookKeeping, fourArgumentPooler);
2402
+
2403
+ function mapSingleChildIntoContext(bookKeeping, child, childKey) {
2404
+ var result = bookKeeping.result;
2405
+ var keyPrefix = bookKeeping.keyPrefix;
2406
+ var func = bookKeeping.func;
2407
+ var context = bookKeeping.context;
2408
+
2409
+ var mappedChild = func.call(context, child, bookKeeping.count++);
2410
+ if (Array.isArray(mappedChild)) {
2411
+ mapIntoWithKeyPrefixInternal(
2412
+ mappedChild,
2413
+ result,
2414
+ childKey,
2415
+ emptyFunction.thatReturnsArgument
2416
+ );
2417
+ } else if (mappedChild != null) {
2418
+ if (React.isValidElement(mappedChild)) {
2419
+ mappedChild = cloneAndReplaceKey(
2420
+ mappedChild,
2421
+ // Keep both the (mapped) and old keys if they differ, just as
2422
+ // traverseAllChildren used to do for objects as children
2423
+ keyPrefix +
2424
+ (mappedChild.key && (!child || child.key !== mappedChild.key)
2425
+ ? escapeUserProvidedKey(mappedChild.key) + '/'
2426
+ : '') +
2427
+ childKey
2428
+ );
2429
+ }
2430
+ result.push(mappedChild);
2431
+ }
2432
+ }
2433
 
2434
+ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
2435
+ var escapedPrefix = '';
2436
+ if (prefix != null) {
2437
+ escapedPrefix = escapeUserProvidedKey(prefix) + '/';
2438
+ }
2439
+ var traverseContext = MapBookKeeping.getPooled(
2440
+ array,
2441
+ escapedPrefix,
2442
+ func,
2443
+ context
2444
+ );
2445
+ traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
2446
+ MapBookKeeping.release(traverseContext);
2447
  }
2448
 
2449
+ var numericPropertyRegex = /^\d+$/;
 
 
2450
 
2451
+ var warnedAboutNumeric = false;
2452
 
2453
+ function createReactFragment(object) {
2454
+ if (typeof object !== 'object' || !object || Array.isArray(object)) {
2455
+ warning(
2456
+ false,
2457
+ 'React.addons.createFragment only accepts a single object. Got: %s',
2458
+ object
2459
+ );
2460
+ return object;
2461
+ }
2462
+ if (React.isValidElement(object)) {
2463
+ warning(
2464
+ false,
2465
+ 'React.addons.createFragment does not accept a ReactElement ' +
2466
+ 'without a wrapper object.'
2467
+ );
2468
+ return object;
2469
+ }
2470
 
2471
+ invariant(
2472
+ object.nodeType !== 1,
2473
+ 'React.addons.createFragment(...): Encountered an invalid child; DOM ' +
2474
+ 'elements are not valid children of React components.'
2475
+ );
2476
 
2477
+ var result = [];
2478
 
2479
+ for (var key in object) {
2480
+ if (false) {}
2481
+ mapIntoWithKeyPrefixInternal(
2482
+ object[key],
2483
+ result,
2484
+ key,
2485
+ emptyFunction.thatReturnsArgument
2486
+ );
2487
+ }
2488
 
2489
+ return result;
2490
+ }
2491
+
2492
+ module.exports = createReactFragment;
 
 
 
2493
 
2494
 
2495
  /***/ }),
2496
+
2497
+ /***/ 149:
2498
  /***/ (function(module, exports, __webpack_require__) {
2499
 
2500
+ "use strict";
2501
+ /**
2502
+ * Copyright (c) 2013-present, Facebook, Inc.
2503
+ *
2504
+ * This source code is licensed under the MIT license found in the
2505
+ * LICENSE file in the root directory of this source tree.
2506
+ *
2507
+ */
2508
 
 
2509
 
2510
 
2511
+ /**
2512
+ * Use invariant() to assert state which your program assumes to be true.
2513
+ *
2514
+ * Provide sprintf-style format (only %s is supported) and arguments
2515
+ * to provide information about what broke and what you were
2516
+ * expecting.
2517
+ *
2518
+ * The invariant message will be stripped in production, but the invariant
2519
+ * will remain to ensure logic does not differ in production.
2520
+ */
2521
 
2522
+ var validateFormat = function validateFormat(format) {};
 
 
2523
 
2524
+ if (false) {}
 
 
 
 
2525
 
2526
+ function invariant(condition, format, a, b, c, d, e, f) {
2527
+ validateFormat(format);
2528
 
2529
+ if (!condition) {
2530
+ var error;
2531
+ if (format === undefined) {
2532
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
2533
+ } else {
2534
+ var args = [a, b, c, d, e, f];
2535
+ var argIndex = 0;
2536
+ error = new Error(format.replace(/%s/g, function () {
2537
+ return args[argIndex++];
2538
+ }));
2539
+ error.name = 'Invariant Violation';
2540
+ }
2541
+
2542
+ error.framesToPop = 1; // we don't care about invariant's own frame
2543
+ throw error;
2544
+ }
2545
+ }
2546
 
2547
+ module.exports = invariant;
2548
 
2549
  /***/ }),
 
 
2550
 
2551
+ /***/ 15:
2552
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2553
 
2554
+ "use strict";
 
 
2555
 
2556
+ // EXPORTS
2557
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
 
 
 
2558
 
2559
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
2560
+ var arrayLikeToArray = __webpack_require__(30);
2561
 
2562
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
 
 
2563
 
2564
+ function _arrayWithoutHoles(arr) {
2565
+ if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
2566
+ }
2567
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
2568
+ function _iterableToArray(iter) {
2569
+ if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
2570
+ }
2571
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
2572
+ var unsupportedIterableToArray = __webpack_require__(49);
2573
 
2574
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
2575
+ function _nonIterableSpread() {
2576
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2577
+ }
2578
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
 
 
 
 
2579
 
2580
 
 
 
 
2581
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2582
 
2583
+ function _toConsumableArray(arr) {
2584
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
2585
+ }
2586
 
2587
  /***/ }),
2588
+
2589
+ /***/ 150:
2590
+ /***/ (function(module, exports, __webpack_require__) {
2591
 
2592
  "use strict";
 
 
 
 
 
 
 
 
 
2593
  /**
2594
+ * Copyright (c) 2014-present, Facebook, Inc.
2595
+ *
2596
+ * This source code is licensed under the MIT license found in the
2597
+ * LICENSE file in the root directory of this source tree.
2598
+ *
2599
  */
2600
 
 
 
 
2601
 
 
 
 
 
 
 
 
2602
 
2603
+ var emptyFunction = __webpack_require__(109);
 
 
2604
 
2605
+ /**
2606
+ * Similar to invariant but only logs a warning if the condition is not met.
2607
+ * This can be used to log issues in development environments in critical
2608
+ * paths. Removing the logging code for production environments will keep the
2609
+ * same logic and follow the same code paths.
2610
+ */
2611
 
2612
+ var warning = emptyFunction;
2613
 
2614
+ if (false) { var printWarning; }
2615
 
2616
+ module.exports = warning;
2617
 
2618
  /***/ }),
2619
+
2620
+ /***/ 151:
2621
  /***/ (function(module, exports, __webpack_require__) {
2622
 
2623
  "use strict";
2624
 
 
 
 
2625
 
2626
+ function identifyToken(item) {
2627
+ // {{/example}}
2628
+ if (item.match(/^\{\{\//)) {
2629
+ return {
2630
+ type: 'componentClose',
2631
+ value: item.replace(/\W/g, '')
2632
+ };
2633
+ }
2634
+ // {{example /}}
2635
+ if (item.match(/\/\}\}$/)) {
2636
+ return {
2637
+ type: 'componentSelfClosing',
2638
+ value: item.replace(/\W/g, '')
2639
+ };
2640
+ }
2641
+ // {{example}}
2642
+ if (item.match(/^\{\{/)) {
2643
+ return {
2644
+ type: 'componentOpen',
2645
+ value: item.replace(/\W/g, '')
2646
+ };
2647
+ }
2648
+ return {
2649
+ type: 'string',
2650
+ value: item
2651
+ };
2652
+ }
2653
 
2654
+ module.exports = function (mixedString) {
2655
+ var tokenStrings = mixedString.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g); // split to components and strings
2656
+ return tokenStrings.map(identifyToken);
2657
+ };
2658
+ //# sourceMappingURL=tokenize.js.map
2659
 
2660
  /***/ }),
 
 
2661
 
2662
+ /***/ 152:
2663
+ /***/ (function(module, exports) {
2664
 
2665
+ function _arrayLikeToArray(arr, len) {
2666
+ if (len == null || len > arr.length) len = arr.length;
2667
+
2668
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
2669
+ arr2[i] = arr[i];
 
 
 
2670
  }
2671
 
2672
+ return arr2;
2673
  }
2674
 
2675
+ module.exports = _arrayLikeToArray;
2676
 
2677
  /***/ }),
 
 
2678
 
2679
+ /***/ 16:
2680
+ /***/ (function(module, exports) {
2681
+
2682
+ (function() { module.exports = this["moment"]; }());
2683
+
2684
+ /***/ }),
2685
+
2686
+ /***/ 169:
2687
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2688
+
2689
+ "use strict";
2690
+ /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
2691
+ /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
2692
+ /**
2693
+ * External dependencies
2694
+ */
2695
+
2696
+ /**
2697
+ * Composes multiple higher-order components into a single higher-order component. Performs right-to-left function
2698
+ * composition, where each successive invocation is supplied the return value of the previous.
2699
+ *
2700
+ * @param {...Function} hocs The HOC functions to invoke.
2701
+ *
2702
+ * @return {Function} Returns the new composite function.
2703
+ */
2704
 
2705
+ /* harmony default export */ __webpack_exports__["a"] = (lodash__WEBPACK_IMPORTED_MODULE_0__["flowRight"]);
2706
+ //# sourceMappingURL=compose.js.map
2707
 
2708
  /***/ }),
2709
+
2710
+ /***/ 17:
2711
  /***/ (function(module, exports) {
2712
 
2713
+ function _defineProperty(obj, key, value) {
2714
+ if (key in obj) {
2715
+ Object.defineProperty(obj, key, {
2716
+ value: value,
2717
+ enumerable: true,
2718
+ configurable: true,
2719
+ writable: true
2720
+ });
2721
+ } else {
2722
+ obj[key] = value;
2723
+ }
2724
+
2725
+ return obj;
2726
+ }
2727
 
2728
+ module.exports = _defineProperty;
2729
 
2730
  /***/ }),
2731
+
2732
+ /***/ 170:
2733
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2734
 
2735
  "use strict";
2736
 
2737
+ // EXPORTS
2738
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ client_ApiClient; });
2739
+ __webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ MINUTE; });
2740
+ __webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ SECOND; });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2741
 
2742
+ // UNUSED EXPORTS: HOUR
 
 
 
 
2743
 
2744
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
2745
+ var regenerator = __webpack_require__(76);
2746
+ var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
 
 
 
 
 
2747
 
2748
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
2749
+ var asyncToGenerator = __webpack_require__(67);
 
 
 
 
 
 
 
 
2750
 
2751
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
2752
+ var esm_extends = __webpack_require__(12);
2753
 
2754
+ // EXTERNAL MODULE: ./node_modules/debug/src/browser.js
2755
+ var browser = __webpack_require__(87);
2756
+ var browser_default = /*#__PURE__*/__webpack_require__.n(browser);
 
 
 
2757
 
2758
+ // EXTERNAL MODULE: external "lodash"
2759
+ var external_lodash_ = __webpack_require__(2);
 
 
2760
 
2761
+ // CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/client/calculate-updates.js
2762
+ var DEFAULT_MAX_UPDATE = 30000;
2763
+ var DEFAULT_MIN_UPDATE = 500;
2764
+ /**
2765
+ * Compares requirements against current state for update information.
2766
+ * Takes a list of requirements and the current state, both keyed by resourceName,
2767
+ * and returns update information which contains an array of resourceNames that are
2768
+ * currently needed and when the next update cycle should run, in milleseconds.
2769
+ * @param {Object} requirementsByResource List of requirements keyed by resourceName.
2770
+ * @param {Object} resourceState State indexed by resourceName.
2771
+ * @param {number} [minUpdate] Minimum nextUpdate value.
2772
+ * @param {number} [maxUpdate] Maximum nextUpdate value.
2773
+ * @param {Date} [now] Current time (used for tests).
2774
+ * @return {Object} updateInfo: { nextUpdate, updates }
2775
+ * @see combineComponentRequirements
2776
+ */
2777
 
2778
+ function calculateUpdates(requirementsByResource, resourceState, minUpdate, maxUpdate, now) {
2779
+ if (minUpdate === void 0) {
2780
+ minUpdate = DEFAULT_MIN_UPDATE;
2781
+ }
2782
 
2783
+ if (maxUpdate === void 0) {
2784
+ maxUpdate = DEFAULT_MAX_UPDATE;
2785
+ }
2786
 
2787
+ if (now === void 0) {
2788
+ now = new Date();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2789
  }
2790
 
2791
+ var updateInfo = {
2792
+ updates: [],
2793
+ nextUpdate: maxUpdate
2794
+ };
2795
+ appendUpdatesForResources(updateInfo, requirementsByResource, resourceState, now);
2796
+ updateInfo.nextUpdate = Math.max(updateInfo.nextUpdate, minUpdate);
2797
+ return updateInfo;
2798
+ }
2799
+ /**
2800
+ * Iterates resources to analyze needed updates.
2801
+ * @param {Object} updateInfo Update information to be mutated by this function.
2802
+ * @param {Object} requirementsByResource List of requirements keyed by resource.
2803
+ * @param {Object} resourceState State indexed by resourceName.
2804
+ * @param {Date} [now] Current time (used for tests).
2805
+ * @see calculateUpdates
2806
+ * @see appendUpdatesForResource
2807
+ */
2808
 
2809
+ function appendUpdatesForResources(updateInfo, requirementsByResource, resourceState, now) {
2810
+ Object.keys(requirementsByResource).forEach(function (resourceName) {
2811
+ var requirements = requirementsByResource[resourceName];
2812
+ var state = resourceState[resourceName] || {};
2813
+ appendUpdatesForResource(updateInfo, resourceName, requirements, state, now);
2814
+ });
2815
+ }
2816
+ /**
2817
+ * Analyzes a resource's requirements against its current state..
2818
+ * @param {Object} updateInfo Update information to be mutated by this function.
2819
+ * @param {string} resourceName Name of the resource to be analyzed.
2820
+ * @param {Object} requirements The requirements for this level of the tree.
2821
+ * @param {Object} state The current state for this resource.
2822
+ * @param {Date} [now] Current time (used for tests).
2823
+ * @see appendUpdatesForResources
2824
+ */
2825
 
 
 
 
2826
 
2827
+ function appendUpdatesForResource(updateInfo, resourceName, requirements, state, now) {
2828
+ var lastRequested = state.lastRequested,
2829
+ lastReceived = state.lastReceived;
2830
+ var isRequested = lastRequested && (!lastReceived || lastRequested > lastReceived);
2831
+ var timeoutLeft = getTimeoutLeft(requirements.timeout, state, now);
2832
+ var freshnessLeft = getFreshnessLeft(requirements.freshness, state, now);
2833
+ var nextUpdate = isRequested && 0 >= freshnessLeft ? timeoutLeft : freshnessLeft;
2834
+ updateInfo.nextUpdate = Math.min(updateInfo.nextUpdate, nextUpdate);
2835
 
2836
+ if (nextUpdate < 0) {
2837
+ updateInfo.updates.push(resourceName);
 
 
 
 
 
 
 
 
2838
  }
2839
+ }
2840
+ /**
2841
+ * Calculates the remaining time left until a timeout is reached.
2842
+ * @param {Object} timeout The timeout requirements in milliseconds.
2843
+ * @param {Object} state The matching state for the resource.
2844
+ * @param {Date} now Current time (used for tests).
2845
+ * @return {number} Time left until timeout, or MAX_SAFE_INTEGER if not applicable.
2846
+ */
2847
 
 
 
 
2848
 
2849
+ function getTimeoutLeft(timeout, state, now) {
2850
+ var lastRequested = state.lastRequested || Number.MIN_SAFE_INTEGER;
2851
+ var lastReceived = state.lastReceived || Number.MIN_SAFE_INTEGER;
2852
 
2853
+ if (timeout && lastRequested && lastRequested > lastReceived) {
2854
+ return timeout - (now - lastRequested);
2855
+ }
2856
 
2857
+ return Number.MAX_SAFE_INTEGER;
2858
+ }
2859
+ /**
2860
+ * Calculates the time remaining until this data is considered stale.
2861
+ * @param {Object} freshness The freshness requirements in milliseconds.
2862
+ * @param {Object} state The matching state for the resource.
2863
+ * @param {Date} now Current time (used for tests).
2864
+ * @return {number} Time left until stale, or MAX_SAFE_INTEGER if not applicable.
2865
+ */
2866
 
2867
+ function getFreshnessLeft(freshness, state, now) {
2868
+ var lastReceived = state.lastReceived;
 
2869
 
2870
+ if (freshness && lastReceived) {
2871
+ return freshness - (now - lastReceived);
2872
+ }
2873
 
2874
+ return freshness ? Number.MIN_SAFE_INTEGER : Number.MAX_SAFE_INTEGER;
2875
+ }
2876
+ // CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/devinfo/components.js
2877
+ /**
2878
+ * Generates information about components that require resources.
2879
+ * @param {Object} client The client to inspect.
2880
+ * @return {Array} An array of objects that describe components and their requirements.
2881
+ */
2882
+ function components_components(client) {
2883
+ var componentSummaries = [];
2884
+ client.requirementsByComponent.forEach(function (requirements, component) {
2885
+ componentSummaries.push({
2886
+ component: component,
2887
+ requirements: requirements
2888
+ });
2889
+ });
2890
+ return componentSummaries;
2891
+ }
2892
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
2893
+ var objectWithoutPropertiesLoose = __webpack_require__(46);
2894
 
2895
+ // CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/devinfo/resources.js
 
 
 
 
 
2896
 
 
 
 
 
 
 
 
 
 
 
 
2897
 
2898
 
 
 
 
2899
 
2900
+ /**
2901
+ * Possible statuses of a resource.
2902
+ */
2903
 
2904
+ var STATUS = {
2905
+ overdue: 'overdue',
2906
+ fetching: 'fetching',
2907
+ stale: 'stale',
2908
+ fresh: 'fresh',
2909
+ notRequired: 'notRequired'
 
 
 
 
 
 
 
 
2910
  };
2911
+ /**
2912
+ * Compiles information about the resources available from a fresh-data client.
2913
+ * @param {Object} client A fresh-data client to be inspected.
2914
+ * @return {Object} A list of detailed resource info objects, keyed by resource name.
2915
+ */
2916
 
2917
+ function resources_resources(client) {
2918
+ var resourceState = client.state.resources || {};
2919
+ var requirements = client.requirementsByResource;
2920
+ var resourceNames = Object(external_lodash_["union"])(Object.keys(resourceState), Object.keys(requirements));
2921
+ return resourceNames.reduce(function (resourceInfo, resourceName) {
2922
+ var resource = resourceState[resourceName] || {};
2923
+ var data = resource.data;
2924
+ var status = getStatus(resource, requirements[resourceName]);
2925
+ var summary = getSummary(status, resource, requirements[resourceName]);
2926
+ resourceInfo[resourceName] = {
2927
+ status: status,
2928
+ summary: summary,
2929
+ data: data
2930
+ };
2931
 
2932
+ if (requirements[resourceName]) {
2933
+ var combinedRequirement = convertRequirement(requirements[resourceName]);
2934
+ var componentsRequiring = getComponentsForResource(client.requirementsByComponent, resourceName);
2935
+ resourceInfo[resourceName].combinedRequirement = combinedRequirement;
2936
+ resourceInfo[resourceName].componentsRequiring = componentsRequiring;
2937
+ }
2938
 
2939
+ return resourceInfo;
2940
+ }, {});
2941
+ }
2942
 
2943
+ function getStatus(resource, requirement) {
2944
+ if (!requirement) {
2945
+ return STATUS.notRequired;
2946
+ }
2947
 
2948
+ var freshness = requirement.freshness,
2949
+ timeout = requirement.timeout;
2950
+ var now = new Date();
2951
+ var freshnessLeft = getFreshnessLeft(freshness, resource, now);
2952
 
2953
+ if (resource && resource.lastRequested > resource.lastReceived) {
2954
+ var timeoutLeft = getTimeoutLeft(timeout, resource, now);
2955
+
2956
+ if (timeoutLeft < 0) {
2957
+ return STATUS.overdue;
2958
  }
2959
+
2960
+ return STATUS.fetching;
2961
  }
2962
 
2963
+ if (freshnessLeft < 0) {
2964
+ return STATUS.stale;
2965
+ }
2966
+
2967
+ return STATUS.fresh;
2968
  }
2969
 
2970
+ function getSummary(status, resource, requirement) {
2971
+ var now = new Date();
2972
 
2973
+ switch (status) {
2974
+ case STATUS.overdue:
2975
+ var timeout = getTimeoutLeft(requirement.timeout, resource, now);
2976
+ return "Timed out for " + millisToString(-timeout);
2977
 
2978
+ case STATUS.fetching:
2979
+ var timeoutLeft = getTimeoutLeft(requirement.timeout, resource, now);
2980
+ return millisToString(timeoutLeft) + " until timeout";
 
 
 
2981
 
2982
+ case STATUS.stale:
2983
+ var staleness = getFreshnessLeft(requirement.freshness, resource, now);
2984
+ return "Stale for " + millisToString(-staleness);
 
 
 
2985
 
2986
+ case STATUS.fresh:
2987
+ var freshnessLeft = getFreshnessLeft(requirement.freshness, resource, now);
2988
+ return "Fresh for " + millisToString(freshnessLeft);
2989
 
2990
+ case STATUS.notRequired:
2991
+ default:
2992
+ return 'Resource is not fetched directly.';
2993
+ }
2994
  }
2995
 
2996
+ function convertRequirement(requirement) {
2997
+ if (requirement === void 0) {
2998
+ requirement = {};
2999
+ }
 
 
 
3000
 
3001
+ var _requirement = requirement,
3002
+ freshness = _requirement.freshness,
3003
+ timeout = _requirement.timeout,
3004
+ other = Object(objectWithoutPropertiesLoose["a" /* default */])(_requirement, ["freshness", "timeout"]);
3005
 
3006
+ return Object(esm_extends["a" /* default */])({
3007
+ freshness: millisToString(freshness),
3008
+ timeout: millisToString(timeout)
3009
+ }, other);
 
 
 
3010
  }
3011
 
3012
+ var SECOND_IN_MILLIS = 1000;
3013
+ var MINUTE_IN_MILLIS = SECOND_IN_MILLIS * 60;
3014
+ var HOUR_IN_MILLIS = MINUTE_IN_MILLIS * 60;
3015
+
3016
+ function millisToString(millis) {
3017
+ if (!millis) {
3018
+ return '';
3019
+ }
3020
+
3021
+ var hours = Math.floor(millis / HOUR_IN_MILLIS);
3022
+ millis -= hours * HOUR_IN_MILLIS;
3023
+ var minutes = Math.floor(millis / MINUTE_IN_MILLIS);
3024
+ millis -= minutes * MINUTE_IN_MILLIS;
3025
+ var seconds = millis / SECOND_IN_MILLIS;
3026
+ var str = '';
3027
+ str = hours ? hours + " hours " : str;
3028
+ str = minutes ? "" + str + minutes + " mins " : str;
3029
+ str = seconds ? "" + str + seconds + " secs " : str;
3030
+ return str;
3031
+ }
3032
 
3033
+ function getComponentsForResource(requirementsByComponent, resourceName) {
3034
+ var components = [];
3035
+ requirementsByComponent.forEach(function (requirements, component) {
3036
+ var requirement = Object(external_lodash_["find"])(requirements, {
3037
+ resourceName: resourceName
3038
+ });
3039
 
3040
+ if (requirement) {
3041
+ components.push(component);
3042
+ }
3043
+ });
3044
+ return components.length ? components : null;
3045
+ }
3046
+ // CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/devinfo/summary.js
3047
 
 
3048
 
3049
+ /**
3050
+ * A string summary of fresh-data client resources
3051
+ * @param {Object} resources Resources generated by ./resources.js for a client.
3052
+ * @return {string} A single-line string summary.
3053
+ */
3054
 
3055
+ function summary_summary(resources) {
3056
+ var resourceNames = Object.keys(resources);
3057
+ var components = [];
3058
+ var freshCount = 0;
3059
+ var staleCount = 0;
3060
+ var timedOutCount = 0;
3061
+ var fetchingCount = 0;
3062
+ var notRequiredCount = 0;
3063
+ resourceNames.forEach(function (resourceName) {
3064
+ var resource = resources[resourceName];
3065
+ components = Object(external_lodash_["union"])(components, resource.componentsRequiring);
3066
+
3067
+ switch (resource.status) {
3068
+ case STATUS.overdue:
3069
+ timedOutCount++;
3070
+ break;
3071
 
3072
+ case STATUS.fetching:
3073
+ fetchingCount++;
3074
+ break;
 
3075
 
3076
+ case STATUS.stale:
3077
+ staleCount++;
3078
+ break;
3079
 
3080
+ case STATUS.fresh:
3081
+ freshCount++;
3082
+ break;
3083
 
3084
+ case STATUS.notRequired:
3085
+ notRequiredCount++;
3086
+ }
 
 
3087
  });
3088
+ var text = resourceNames.length + " resources, " + components.length + " components ( ";
3089
 
3090
+ if (freshCount) {
3091
+ text += freshCount + " fresh ";
3092
+ }
3093
 
3094
+ if (staleCount) {
3095
+ text += staleCount + " stale ";
3096
+ }
 
 
3097
 
3098
+ if (notRequiredCount) {
3099
+ text += notRequiredCount + " not required ";
3100
+ }
3101
 
3102
+ if (timedOutCount) {
3103
+ text += timedOutCount + " timed out ";
3104
+ }
 
 
3105
 
3106
+ if (fetchingCount) {
3107
+ text += fetchingCount + " fetching ";
3108
+ }
3109
 
3110
+ text += ')';
3111
+ return text;
3112
+ }
3113
+ // CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/devinfo/index.js
3114
 
 
3115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3116
 
3117
+ var devInfo = {};
3118
+ /**
3119
+ * Checks if devInfo is enabled and available.
3120
+ * @return {boolean} True if dev info is enabled, false if not.
3121
+ */
3122
 
3123
+ function isDevInfoEnabled() {
3124
+ return true === window.__FRESH_DATA_DEV_INFO__;
3125
+ }
3126
+ /**
3127
+ * Called by the ApiClient class to update the dev info data.
3128
+ * This is called when the client state or requirements change.
3129
+ * @param {Object} client The client which has been updated.
3130
+ */
3131
 
3132
+ function updateDevInfo(client) {
3133
+ if (isDevInfoEnabled()) {
3134
+ devInfo[client.getName()] = generateDevInfo(client);
3135
+ setDevInfoGlobal();
3136
+ }
3137
+ }
3138
+ /**
3139
+ * Generates the devInfo object for a given client.
3140
+ * @param {Object} client The client for which the info is generated.
3141
+ * @return {Object} A devInfo object with summary, resources, and components.
3142
+ */
3143
 
3144
+ function generateDevInfo(client) {
3145
+ var components = components_components(client);
3146
+ var resources = resources_resources(client);
3147
+ var summary = summary_summary(resources);
3148
+ var info = {
3149
+ summary: summary,
3150
+ resources: resources,
3151
+ components: components
3152
+ };
3153
+ return info;
3154
+ }
3155
+ /**
3156
+ * Sets the dev info to the global window context.
3157
+ * This is so it can be referenced by the JavaScript console in the browser.
3158
+ */
3159
 
 
 
3160
 
3161
+ function setDevInfoGlobal() {
3162
+ if (!window.freshData) {
3163
+ window.freshData = devInfo;
3164
  }
 
 
3165
  }
3166
+ // CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/utils/constants.js
3167
+ var SECOND = 1000;
3168
+ var MINUTE = 60 * SECOND;
3169
+ var HOUR = 60 * MINUTE;
3170
+ // CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/client/requirements.js
3171
 
 
3172
 
 
 
 
3173
 
3174
+ var DEFAULTS = {
3175
+ freshness: Number.MAX_SAFE_INTEGER,
3176
+ timeout: 20 * SECOND
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3177
  };
3178
+ /**
3179
+ * Combines component requirements into a requirements list by resourceName.
3180
+ * @param {Map} requirementsByComponent Key: Component, Value: requirements parameters with resourceName.
3181
+ * @return {Object} List of requirements by resource name.
3182
+ */
3183
 
3184
+ function combineComponentRequirements(requirementsByComponent) {
3185
+ var requirementsByResource = {};
3186
+ requirementsByComponent.forEach(function (requirements) {
3187
+ requirements.forEach(function (requirement) {
3188
+ var resourceName = requirement.resourceName,
3189
+ reqParams = Object(objectWithoutPropertiesLoose["a" /* default */])(requirement, ["resourceName"]);
 
 
3190
 
3191
+ addResourceRequirement(requirementsByResource, reqParams, resourceName);
3192
+ });
3193
+ });
3194
+ return requirementsByResource;
3195
+ }
3196
+ /**
3197
+ * Mutates the state of requirementsByResource by adding requirement parameters to it.
3198
+ * @param {Object} requirementsByResource List of requirements keyed by resourceName.
3199
+ * @param {Object} reqParams New requirement parameters ( e.g. { freshness: 30 * SECOND } )
3200
+ * @param {string} resourceName Name of resource being required.
3201
+ */
3202
 
3203
+ function addResourceRequirement(requirementsByResource, reqParams, resourceName) {
3204
+ var requirement = requirementsByResource[resourceName] || Object(esm_extends["a" /* default */])({}, DEFAULTS);
 
3205
 
3206
+ addRequirementParams(requirement, reqParams);
3207
+ requirementsByResource[resourceName] = requirement;
3208
+ }
3209
+ /**
3210
+ * Merges new requirement parameters into existing ones.
3211
+ * @param {Object} requirements Contains requirement parameters.
3212
+ * @param {Object} reqParams New requirement parameters (freshness, timeout), to be merged with existing ones.
3213
+ */
3214
 
3215
+ function addRequirementParams(requirements, reqParams) {
3216
+ var freshness = requirements.freshness || DEFAULTS.freshness;
3217
+ var timeout = requirements.timeout || DEFAULTS.timeout;
3218
+ var newFreshness = reqParams.freshness || Number.MAX_SAFE_INTEGER;
3219
+ var newTimeout = reqParams.timeout || Number.MAX_SAFE_INTEGER;
3220
+ requirements.freshness = Math.min(freshness, newFreshness);
3221
+ requirements.timeout = Math.min(timeout, newTimeout);
3222
+ }
3223
+ // CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/client/index.js
3224
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3225
 
3226
 
 
 
 
3227
 
 
3228
 
 
 
3229
 
 
 
 
 
 
 
3230
 
 
 
 
3231
 
3232
+ var DEFAULT_READ_OPERATION = 'read';
 
 
 
 
3233
 
3234
+ function _setTimer(callback, delay) {
3235
+ return window.setTimeout(callback, delay);
3236
+ }
3237
 
3238
+ function _clearTimer(id) {
3239
+ return window.clearTimeout(id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3240
  }
3241
 
3242
+ var client_ApiClient = function ApiClient(apiSpec, setTimer, clearTimer) {
3243
+ var _this = this;
3244
 
3245
+ if (setTimer === void 0) {
3246
+ setTimer = _setTimer;
3247
+ }
3248
 
3249
+ if (clearTimer === void 0) {
3250
+ clearTimer = _clearTimer;
3251
+ }
3252
 
3253
+ this.getName = function () {
3254
+ return _this.name || 'UID_' + _this.uid;
3255
+ };
3256
 
3257
+ this.mapOperations = function (apiOperations) {
3258
+ return Object.keys(apiOperations).reduce(function (operations, operationName) {
3259
+ operations[operationName] = function (resourceNames, data) {
3260
+ var apiOperation = apiOperations[operationName];
3261
+ return _this.applyOperation(apiOperation, resourceNames, data);
3262
+ };
3263
 
3264
+ return operations;
3265
+ }, {});
3266
+ };
3267
 
3268
+ this.setDataHandlers = function (_ref) {
3269
+ var dataRequested = _ref.dataRequested,
3270
+ dataReceived = _ref.dataReceived;
3271
+ _this.dataHandlers = {
3272
+ dataRequested: dataRequested,
3273
+ dataReceived: dataReceived
3274
+ };
3275
+ };
3276
 
3277
+ this.setState = function (state, now) {
3278
+ if (now === void 0) {
3279
+ now = new Date();
3280
+ }
3281
 
3282
+ if (_this.state !== state) {
3283
+ _this.state = state;
 
 
 
 
 
 
3284
 
3285
+ _this.updateTimer(now);
3286
 
3287
+ _this.subscriptionCallbacks.forEach(function (callback) {
3288
+ return callback(_this);
3289
+ });
3290
 
3291
+ updateDevInfo(_this);
3292
+ }
3293
+ };
3294
 
3295
+ this.subscribe = function (callback) {
3296
+ if (_this.subscriptionCallbacks.has(callback)) {
3297
+ _this.debug('Attempting to add a subscription callback twice:', callback);
3298
 
3299
+ return false;
3300
+ }
 
 
 
 
 
3301
 
3302
+ _this.subscriptionCallbacks.add(callback);
 
 
 
 
3303
 
3304
+ return callback;
3305
+ };
3306
 
3307
+ this.unsubscribe = function (callback) {
3308
+ if (!_this.subscriptionCallbacks.has(callback)) {
3309
+ _this.debug('Attempting to remove a callback that is not subscribed:', callback);
3310
 
3311
+ return false;
3312
+ }
 
 
 
 
 
 
3313
 
3314
+ _this.subscriptionCallbacks["delete"](callback);
 
 
 
 
 
3315
 
3316
+ return callback;
3317
+ };
 
 
 
 
3318
 
3319
+ this.getResource = function (resourceName) {
3320
+ var resources = _this.state.resources || {};
3321
+ var resource = resources[resourceName] || {};
3322
+ return resource;
3323
+ };
3324
 
3325
+ this.requireResource = function (componentRequirements) {
3326
+ return function (requirement, resourceName) {
3327
+ componentRequirements.push(Object(esm_extends["a" /* default */])({}, requirement, {
3328
+ resourceName: resourceName
3329
+ }));
3330
+ return _this.getResource(resourceName);
3331
+ };
3332
+ };
3333
 
3334
+ this.getMutations = function () {
3335
+ return _this.mutations;
3336
  };
 
3337
 
3338
+ this.getSelectors = function (componentRequirements) {
3339
+ return mapFunctions(_this.selectors, _this.getResource, _this.requireResource(componentRequirements));
3340
+ };
3341
 
3342
+ this.clearComponentRequirements = function (component, now) {
3343
+ if (now === void 0) {
3344
+ now = new Date();
3345
+ }
3346
 
3347
+ _this.requirementsByComponent["delete"](component);
3348
 
3349
+ _this.updateRequirementsByResource(now);
3350
+ };
 
 
 
 
 
 
3351
 
3352
+ this.setComponentRequirements = function (component, componentRequirements, now) {
3353
+ if (now === void 0) {
3354
+ now = new Date();
3355
+ }
3356
 
3357
+ _this.requirementsByComponent.set(component, componentRequirements);
 
 
3358
 
3359
+ _this.updateRequirementsByResource(now);
3360
+ };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3361
 
3362
+ this.setComponentData = function (component, selectorFunc, now) {
3363
+ if (now === void 0) {
3364
+ now = new Date();
3365
+ }
3366
 
3367
+ if (selectorFunc) {
3368
+ var componentRequirements = [];
3369
 
3370
+ var selectors = _this.getSelectors(componentRequirements);
 
 
 
 
 
 
 
 
3371
 
3372
+ selectorFunc(selectors);
 
3373
 
3374
+ _this.setComponentRequirements(component, componentRequirements, now);
3375
+ } else {
3376
+ _this.clearComponentRequirements(component, now);
3377
+ }
3378
+ };
3379
 
3380
+ this.updateRequirementsByResource = function (now) {
3381
+ if (now === void 0) {
3382
+ now = new Date();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3383
  }
 
 
3384
 
3385
+ // TODO: Consider using a reducer style function for resource requirements so we don't
3386
+ // have to do a deep equals check.
3387
+ var requirementsByResource = combineComponentRequirements(_this.requirementsByComponent);
3388
 
3389
+ if (!Object(external_lodash_["isEqual"])(_this.requirementsByResource, requirementsByResource)) {
3390
+ _this.requirementsByResource = requirementsByResource;
 
3391
 
3392
+ _this.updateTimer(now);
3393
+ }
3394
+ };
 
 
3395
 
3396
+ this.updateRequirementsData =
3397
+ /*#__PURE__*/
3398
+ function () {
3399
+ var _ref2 = Object(asyncToGenerator["a" /* default */])(
3400
+ /*#__PURE__*/
3401
+ regenerator_default.a.mark(function _callee(now) {
3402
+ var requirementsByComponent, requirementsByResource, state, minUpdate, maxUpdate, resourceState, componentCount, resourceCount, _calculateUpdates, nextUpdate, updates, readOperationName, readOperation;
3403
+
3404
+ return regenerator_default.a.wrap(function _callee$(_context) {
3405
+ while (1) {
3406
+ switch (_context.prev = _context.next) {
3407
+ case 0:
3408
+ requirementsByComponent = _this.requirementsByComponent, requirementsByResource = _this.requirementsByResource, state = _this.state, minUpdate = _this.minUpdate, maxUpdate = _this.maxUpdate;
3409
+ resourceState = state.resources || {};
3410
+ componentCount = requirementsByComponent.size;
3411
+ resourceCount = Object.keys(requirementsByResource).length;
3412
+
3413
+ _this.debug("Updating requirements for " + componentCount + " components and " + resourceCount + " resources.");
3414
+
3415
+ updateDevInfo(_this);
3416
+
3417
+ if (Object(external_lodash_["isEmpty"])(requirementsByResource)) {
3418
+ _context.next = 20;
3419
+ break;
3420
+ }
3421
 
3422
+ _calculateUpdates = calculateUpdates(requirementsByResource, resourceState, minUpdate, maxUpdate, now), nextUpdate = _calculateUpdates.nextUpdate, updates = _calculateUpdates.updates;
 
 
3423
 
3424
+ if (!(updates && updates.length > 0)) {
3425
+ _context.next = 15;
3426
+ break;
3427
+ }
3428
 
3429
+ readOperationName = _this.readOperationName;
3430
+ readOperation = _this.operations[readOperationName];
3431
 
3432
+ if (readOperation) {
3433
+ _context.next = 13;
3434
+ break;
3435
+ }
3436
 
3437
+ throw new Error("Operation \"" + readOperationName + "\" not found.");
 
 
 
 
3438
 
3439
+ case 13:
3440
+ _context.next = 15;
3441
+ return _this.operations[readOperationName](updates);
 
 
 
3442
 
3443
+ case 15:
3444
+ _this.debug("Scheduling next update for " + nextUpdate / 1000 + " seconds.");
 
 
 
 
3445
 
3446
+ updateDevInfo(_this);
3447
 
3448
+ _this.updateTimer(now, nextUpdate);
 
 
 
3449
 
3450
+ _context.next = 21;
3451
+ break;
3452
 
3453
+ case 20:
3454
+ if (_this.timeoutId) {
3455
+ _this.debug('Unscheduling future updates');
 
3456
 
3457
+ updateDevInfo(_this);
3458
 
3459
+ _this.updateTimer(now, null);
3460
+ }
3461
 
3462
+ case 21:
3463
+ case "end":
3464
+ return _context.stop();
3465
+ }
3466
+ }
3467
+ }, _callee);
3468
+ }));
3469
 
3470
+ return function (_x) {
3471
+ return _ref2.apply(this, arguments);
3472
+ };
3473
+ }();
3474
 
3475
+ this.updateTimer = function (now, nextUpdate) {
3476
+ if (nextUpdate === void 0) {
3477
+ nextUpdate = undefined;
3478
+ }
3479
 
3480
+ var requirementsByResource = _this.requirementsByResource,
3481
+ state = _this.state,
3482
+ minUpdate = _this.minUpdate,
3483
+ maxUpdate = _this.maxUpdate;
3484
+ var resourceState = state.resources || {};
3485
 
3486
+ if (undefined === nextUpdate) {
3487
+ nextUpdate = calculateUpdates(requirementsByResource, resourceState, minUpdate, maxUpdate, now).nextUpdate;
3488
+ }
 
3489
 
3490
+ if (_this.timeoutId) {
3491
+ _this.clearTimer(_this.timeoutId);
 
 
 
 
 
 
3492
 
3493
+ _this.timeoutId = null;
3494
+ }
3495
 
3496
+ if (nextUpdate) {
3497
+ _this.timeoutId = _this.setTimer(_this.updateRequirementsData, nextUpdate);
3498
+ }
3499
+ };
3500
 
3501
+ this.applyOperation =
3502
+ /*#__PURE__*/
3503
+ function () {
3504
+ var _ref3 = Object(asyncToGenerator["a" /* default */])(
3505
+ /*#__PURE__*/
3506
+ regenerator_default.a.mark(function _callee3(apiOperation, resourceNames, data) {
3507
+ var operationResult, values, requests;
3508
+ return regenerator_default.a.wrap(function _callee3$(_context3) {
3509
+ while (1) {
3510
+ switch (_context3.prev = _context3.next) {
3511
+ case 0:
3512
+ _context3.prev = 0;
3513
+
3514
+ _this.dataRequested(resourceNames);
3515
+
3516
+ operationResult = apiOperation(resourceNames, data) || [];
3517
+ values = Object(external_lodash_["isArray"])(operationResult) ? operationResult : [operationResult];
3518
+ requests = values.map(
3519
+ /*#__PURE__*/
3520
+ function () {
3521
+ var _ref4 = Object(asyncToGenerator["a" /* default */])(
3522
+ /*#__PURE__*/
3523
+ regenerator_default.a.mark(function _callee2(value) {
3524
+ var resources;
3525
+ return regenerator_default.a.wrap(function _callee2$(_context2) {
3526
+ while (1) {
3527
+ switch (_context2.prev = _context2.next) {
3528
+ case 0:
3529
+ _context2.next = 2;
3530
+ return value;
3531
+
3532
+ case 2:
3533
+ resources = _context2.sent;
3534
+
3535
+ _this.dataReceived(resources);
3536
+
3537
+ return _context2.abrupt("return", resources);
3538
+
3539
+ case 5:
3540
+ case "end":
3541
+ return _context2.stop();
3542
+ }
3543
+ }
3544
+ }, _callee2);
3545
+ }));
3546
+
3547
+ return function (_x5) {
3548
+ return _ref4.apply(this, arguments);
3549
+ };
3550
+ }());
3551
+ _context3.next = 7;
3552
+ return Promise.all(requests);
3553
+
3554
+ case 7:
3555
+ return _context3.abrupt("return", _context3.sent);
3556
+
3557
+ case 10:
3558
+ _context3.prev = 10;
3559
+ _context3.t0 = _context3["catch"](0);
3560
+
3561
+ _this.debug('Error caught while applying operation: ', apiOperation);
3562
+
3563
+ throw _context3.t0;
3564
+
3565
+ case 14:
3566
+ case "end":
3567
+ return _context3.stop();
3568
+ }
3569
+ }
3570
+ }, _callee3, null, [[0, 10]]);
3571
+ }));
3572
 
3573
+ return function (_x2, _x3, _x4) {
3574
+ return _ref3.apply(this, arguments);
3575
+ };
3576
+ }();
3577
 
3578
+ this.dataRequested = function (resourceNames) {
3579
+ if (!_this.dataHandlers) {
3580
+ _this.debug('Data requested before dataHandlers set. Disregarding.');
3581
 
3582
+ return;
3583
+ }
 
 
3584
 
3585
+ _this.dataHandlers.dataRequested(resourceNames);
 
 
3586
 
3587
+ return resourceNames;
3588
+ };
 
3589
 
3590
+ this.dataReceived = function (resources) {
3591
+ if (!_this.dataHandlers) {
3592
+ _this.debug('Data received before dataHandlers set. Disregarding.');
 
 
 
 
 
 
 
 
3593
 
3594
+ return;
3595
+ }
3596
 
3597
+ _this.dataHandlers.dataReceived(resources);
 
 
3598
 
3599
+ return resources;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3600
  };
 
3601
 
3602
+ var _operations = apiSpec.operations,
3603
+ mutations = apiSpec.mutations,
3604
+ _selectors = apiSpec.selectors;
3605
 
3606
+ var _readOperationName = apiSpec.readOperationName || DEFAULT_READ_OPERATION;
 
 
3607
 
3608
+ this.uid = Object(external_lodash_["uniqueId"])();
3609
+ this.name = apiSpec.name;
3610
+ this.debug = browser_default()("fresh-data:api-client[" + this.uid + "]");
3611
+ this.debug('New ApiClient for apiSpec: ', apiSpec);
3612
+ this.operations = _operations && this.mapOperations(_operations);
3613
+ this.mutations = mutations && mapFunctions(mutations, this.operations);
3614
+ this.selectors = _selectors;
3615
+ this.readOperationName = _readOperationName;
3616
+ this.dataHandlers = null;
3617
+ this.subscriptionCallbacks = new Set();
3618
+ this.requirementsByComponent = new Map();
3619
+ this.requirementsByResource = {};
3620
+ this.minUpdate = DEFAULT_MIN_UPDATE;
3621
+ this.maxUpdate = DEFAULT_MAX_UPDATE;
3622
+ this.setTimer = setTimer;
3623
+ this.clearTimer = clearTimer;
3624
+ this.timeoutId = null;
3625
+ this.state = {};
3626
+ updateDevInfo(this);
3627
+ };
3628
 
 
3629
 
 
 
 
 
 
 
3630
 
3631
+ function mapFunctions(functionsByName) {
3632
+ for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
3633
+ params[_key - 1] = arguments[_key];
3634
+ }
3635
+
3636
+ return Object.keys(functionsByName).reduce(function (mappedFunctions, functionName) {
3637
+ mappedFunctions[functionName] = functionsByName[functionName].apply(functionsByName, params);
3638
+ return mappedFunctions;
3639
+ }, {});
3640
+ }
3641
+ // CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/index.js
3642
+ /**
3643
+ * This is the public API of Fresh Data.
3644
+ * Below are the parts that can be used within your own application
3645
+ * in order to use Fresh Data with your own APIs.
3646
+ */
3647
+ // Instantiate an ApiClient with a given apiSpec.
3648
+ // Use these to express requirement times like freshness and timeout.
3649
 
 
 
 
3650
 
 
3651
 
3652
  /***/ }),
3653
+
3654
+ /***/ 172:
3655
  /***/ (function(module, exports, __webpack_require__) {
3656
 
3657
+ var arrayLikeToArray = __webpack_require__(152);
3658
+
3659
+ function _unsupportedIterableToArray(o, minLen) {
3660
+ if (!o) return;
3661
+ if (typeof o === "string") return arrayLikeToArray(o, minLen);
3662
+ var n = Object.prototype.toString.call(o).slice(8, -1);
3663
+ if (n === "Object" && o.constructor) n = o.constructor.name;
3664
+ if (n === "Map" || n === "Set") return Array.from(o);
3665
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3666
  }
3667
 
3668
+ module.exports = _unsupportedIterableToArray;
3669
 
3670
  /***/ }),
 
 
3671
 
3672
+ /***/ 176:
3673
+ /***/ (function(module, exports, __webpack_require__) {
 
 
3674
 
3675
+ "use strict";
 
3676
 
 
 
 
 
 
 
 
3677
 
3678
+ if (true) {
3679
+ module.exports = __webpack_require__(210);
3680
+ } else {}
 
 
 
3681
 
3682
 
3683
  /***/ }),
 
 
 
 
 
 
 
3684
 
3685
+ /***/ 18:
3686
+ /***/ (function(module, exports) {
 
 
 
 
3687
 
3688
+ (function() { module.exports = this["wp"]["data"]; }());
3689
 
3690
  /***/ }),
3691
+
3692
+ /***/ 19:
3693
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3694
 
3695
  "use strict";
3696
 
3697
+ // EXPORTS
3698
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
3699
 
3700
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
3701
+ function _arrayWithHoles(arr) {
3702
+ if (Array.isArray(arr)) return arr;
3703
+ }
3704
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
3705
+ function _iterableToArrayLimit(arr, i) {
3706
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
3707
+ var _arr = [];
3708
+ var _n = true;
3709
+ var _d = false;
3710
+ var _e = undefined;
3711
 
3712
+ try {
3713
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
3714
+ _arr.push(_s.value);
 
 
3715
 
3716
+ if (i && _arr.length === i) break;
3717
+ }
3718
+ } catch (err) {
3719
+ _d = true;
3720
+ _e = err;
3721
+ } finally {
3722
+ try {
3723
+ if (!_n && _i["return"] != null) _i["return"]();
3724
+ } finally {
3725
+ if (_d) throw _e;
3726
+ }
3727
+ }
3728
 
3729
+ return _arr;
3730
+ }
3731
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
3732
+ var unsupportedIterableToArray = __webpack_require__(49);
3733
 
3734
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
3735
+ function _nonIterableRest() {
3736
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3737
+ }
3738
+ // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
3739
 
 
3740
 
 
 
 
 
 
 
 
3741
 
3742
 
3743
+ function _slicedToArray(arr, i) {
3744
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || _nonIterableRest();
3745
+ }
3746
+
3747
+ /***/ }),
3748
+
3749
+ /***/ 194:
3750
  /***/ (function(module, exports, __webpack_require__) {
3751
 
3752
  "use strict";
3753
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3754
 
3755
+ var reactIs = __webpack_require__(176);
3756
 
3757
+ /**
3758
+ * Copyright 2015, Yahoo! Inc.
3759
+ * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
3760
+ */
3761
+ var REACT_STATICS = {
3762
+ childContextTypes: true,
3763
+ contextType: true,
3764
+ contextTypes: true,
3765
+ defaultProps: true,
3766
+ displayName: true,
3767
+ getDefaultProps: true,
3768
+ getDerivedStateFromError: true,
3769
+ getDerivedStateFromProps: true,
3770
+ mixins: true,
3771
+ propTypes: true,
3772
+ type: true
3773
+ };
3774
+ var KNOWN_STATICS = {
3775
+ name: true,
3776
+ length: true,
3777
+ prototype: true,
3778
+ caller: true,
3779
+ callee: true,
3780
+ arguments: true,
3781
+ arity: true
3782
+ };
3783
+ var FORWARD_REF_STATICS = {
3784
+ '$$typeof': true,
3785
+ render: true,
3786
+ defaultProps: true,
3787
+ displayName: true,
3788
+ propTypes: true
3789
+ };
3790
+ var MEMO_STATICS = {
3791
+ '$$typeof': true,
3792
+ compare: true,
3793
+ defaultProps: true,
3794
+ displayName: true,
3795
+ propTypes: true,
3796
+ type: true
3797
+ };
3798
+ var TYPE_STATICS = {};
3799
+ TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
3800
+ TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
3801
 
3802
+ function getStatics(component) {
3803
+ // React v16.11 and below
3804
+ if (reactIs.isMemo(component)) {
3805
+ return MEMO_STATICS;
3806
+ } // React v16.12 and above
3807
 
 
 
 
 
3808
 
3809
+ return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
3810
+ }
3811
 
3812
+ var defineProperty = Object.defineProperty;
3813
+ var getOwnPropertyNames = Object.getOwnPropertyNames;
3814
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
3815
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
3816
+ var getPrototypeOf = Object.getPrototypeOf;
3817
+ var objectPrototype = Object.prototype;
3818
+ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
3819
+ if (typeof sourceComponent !== 'string') {
3820
+ // don't hoist over string (html) components
3821
+ if (objectPrototype) {
3822
+ var inheritedComponent = getPrototypeOf(sourceComponent);
3823
 
3824
+ if (inheritedComponent && inheritedComponent !== objectPrototype) {
3825
+ hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
3826
+ }
3827
+ }
3828
 
3829
+ var keys = getOwnPropertyNames(sourceComponent);
 
 
 
3830
 
3831
+ if (getOwnPropertySymbols) {
3832
+ keys = keys.concat(getOwnPropertySymbols(sourceComponent));
3833
+ }
3834
 
3835
+ var targetStatics = getStatics(targetComponent);
3836
+ var sourceStatics = getStatics(sourceComponent);
 
3837
 
3838
+ for (var i = 0; i < keys.length; ++i) {
3839
+ var key = keys[i];
3840
+
3841
+ if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
3842
+ var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
3843
+
3844
+ try {
3845
+ // Avoid failures from read-only properties
3846
+ defineProperty(targetComponent, key, descriptor);
3847
+ } catch (e) {}
3848
+ }
3849
+ }
3850
  }
3851
+
3852
+ return targetComponent;
3853
+ }
3854
+
3855
+ module.exports = hoistNonReactStatics;
3856
 
3857
 
3858
  /***/ }),
 
 
3859
 
3860
+ /***/ 196:
3861
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
3862
 
3863
+ "use strict";
3864
+ /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
3865
+ /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
3866
+ /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48);
3867
+ /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);
3868
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
3869
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
3870
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23);
3871
+ /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(197);
3872
+ /**
3873
+ * External dependencies
3874
+ */
3875
 
 
 
 
 
 
 
 
 
 
 
 
 
3876
 
 
 
 
 
 
 
3877
 
3878
+ /**
3879
+ * WooCommerce dependencies
3880
+ */
 
 
 
 
 
 
 
 
 
 
 
3881
 
 
 
 
 
 
 
 
 
 
 
 
3882
 
3883
+ var manageStock = Object(_settings__WEBPACK_IMPORTED_MODULE_3__[/* getSetting */ "g"])('manageStock', 'no');
3884
+ /**
3885
+ * Internal dependencies
3886
+ */
3887
+
3888
+ var RevenueReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
3889
+ return Promise.all(/* import() | analytics-report-revenue */[__webpack_require__.e(2), __webpack_require__.e(0), __webpack_require__.e(16)]).then(__webpack_require__.bind(null, 738));
3890
+ });
3891
+ var ProductsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
3892
+ return Promise.all(/* import() | analytics-report-products */[__webpack_require__.e(2), __webpack_require__.e(0), __webpack_require__.e(5), __webpack_require__.e(15)]).then(__webpack_require__.bind(null, 739));
3893
+ });
3894
+ var OrdersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
3895
+ return Promise.all(/* import() | analytics-report-orders */[__webpack_require__.e(2), __webpack_require__.e(0), __webpack_require__.e(14)]).then(__webpack_require__.bind(null, 740));
3896
+ });
3897
+ var CategoriesReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
3898
+ return Promise.all(/* import() | analytics-report-categories */[__webpack_require__.e(2), __webpack_require__.e(0), __webpack_require__.e(5), __webpack_require__.e(10)]).then(__webpack_require__.bind(null, 736));
3899
+ });
3900
+ var CouponsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
3901
+ return Promise.all(/* import() | analytics-report-coupons */[__webpack_require__.e(2), __webpack_require__.e(0), __webpack_require__.e(11)]).then(__webpack_require__.bind(null, 741));
3902
+ });
3903
+ var TaxesReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
3904
+ return Promise.all(/* import() | analytics-report-taxes */[__webpack_require__.e(2), __webpack_require__.e(0), __webpack_require__.e(18)]).then(__webpack_require__.bind(null, 742));
3905
+ });
3906
+ var DownloadsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
3907
+ return Promise.all(/* import() | analytics-report-downloads */[__webpack_require__.e(2), __webpack_require__.e(0), __webpack_require__.e(13)]).then(__webpack_require__.bind(null, 743));
3908
+ });
3909
+ var StockReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
3910
+ return Promise.all(/* import() | analytics-report-stock */[__webpack_require__.e(0), __webpack_require__.e(17)]).then(__webpack_require__.bind(null, 735));
3911
+ });
3912
+ var CustomersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
3913
+ return Promise.all(/* import() | analytics-report-customers */[__webpack_require__.e(0), __webpack_require__.e(12)]).then(__webpack_require__.bind(null, 737));
3914
+ });
3915
+
3916
+ /* harmony default export */ __webpack_exports__["a"] = (function () {
3917
+ var reports = [{
3918
+ report: 'revenue',
3919
+ title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Revenue', 'woocommerce-admin'),
3920
+ component: RevenueReport
3921
+ }, {
3922
+ report: 'products',
3923
+ title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Products', 'woocommerce-admin'),
3924
+ component: ProductsReport
3925
+ }, {
3926
+ report: 'orders',
3927
+ title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Orders', 'woocommerce-admin'),
3928
+ component: OrdersReport
3929
+ }, {
3930
+ report: 'categories',
3931
+ title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Categories', 'woocommerce-admin'),
3932
+ component: CategoriesReport
3933
+ }, {
3934
+ report: 'coupons',
3935
+ title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Coupons', 'woocommerce-admin'),
3936
+ component: CouponsReport
3937
+ }, {
3938
+ report: 'taxes',
3939
+ title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Taxes', 'woocommerce-admin'),
3940
+ component: TaxesReport
3941
+ }, {
3942
+ report: 'downloads',
3943
+ title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Downloads', 'woocommerce-admin'),
3944
+ component: DownloadsReport
3945
+ }, manageStock === 'yes' ? {
3946
+ report: 'stock',
3947
+ title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Stock', 'woocommerce-admin'),
3948
+ component: StockReport
3949
+ } : null, {
3950
+ report: 'customers',
3951
+ title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Customers', 'woocommerce-admin'),
3952
+ component: CustomersReport
3953
+ }, {
3954
+ report: 'downloads',
3955
+ title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Downloads', 'woocommerce-admin'),
3956
+ component: DownloadsReport
3957
+ }].filter(Boolean);
3958
+ return Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__["applyFilters"])(_index__WEBPACK_IMPORTED_MODULE_4__["REPORTS_FILTER"], reports);
3959
+ });
3960
 
3961
  /***/ }),
 
 
3962
 
3963
+ /***/ 197:
3964
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
3965
 
3966
+ "use strict";
3967
+ __webpack_require__.r(__webpack_exports__);
3968
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REPORTS_FILTER", function() { return REPORTS_FILTER; });
3969
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
3970
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
3971
+ /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38);
3972
+ /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);
3973
+ /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(37);
3974
+ /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);
3975
+ /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39);
3976
+ /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__);
3977
+ /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42);
3978
+ /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);
3979
+ /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26);
3980
+ /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);
3981
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(0);
3982
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__);
3983
+ /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(169);
3984
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
3985
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__);
3986
+ /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2);
3987
+ /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);
3988
+ /* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(53);
3989
+ /* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_components__WEBPACK_IMPORTED_MODULE_10__);
3990
+ /* harmony import */ var _woocommerce_navigation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(22);
3991
+ /* harmony import */ var _woocommerce_navigation__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_11__);
3992
+ /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(439);
3993
+ /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_12__);
3994
+ /* harmony import */ var analytics_components_report_error__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(261);
3995
+ /* harmony import */ var wc_api_items_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(274);
3996
+ /* harmony import */ var wc_api_with_select__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(101);
3997
+ /* harmony import */ var lib_currency_context__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(200);
3998
+ /* harmony import */ var _get_reports__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(196);
3999
 
 
 
 
 
 
4000
 
4001
 
 
 
 
4002
 
 
 
4003
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4004
 
4005
 
 
 
 
4006
 
4007
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4008
 
4009
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
 
 
 
 
4010
 
4011
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result); }; }
 
 
4012
 
4013
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
 
 
 
4014
 
4015
+ /**
4016
+ * External dependencies
4017
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4018
 
 
 
 
 
4019
 
4020
 
 
 
 
4021
 
4022
+ /**
4023
+ * WooCommerce dependencies
4024
+ */
4025
 
 
4026
 
4027
 
4028
+ /**
4029
+ * Internal dependencies
4030
+ */
4031
 
 
4032
 
 
4033
 
 
 
 
 
 
 
 
 
 
 
4034
 
 
 
 
 
4035
 
4036
 
 
 
 
4037
 
4038
+ var REPORTS_FILTER = 'woocommerce_admin_reports_list';
4039
+ /**
4040
+ * The Customers Report will not have the `report` param supplied by the router/
4041
+ * because it no longer exists under the path `/analytics/:report`. Use `props.path`/
4042
+ * instead to determine if the Customers Report is being rendered.
4043
+ *
4044
+ * @param {Object} params -url parameters
4045
+ * @return {string} - report parameter
4046
+ */
4047
 
4048
+ var getReportParam = function getReportParam(_ref) {
4049
+ var params = _ref.params,
4050
+ path = _ref.path;
4051
+ return params.report || path.replace(/^\/+/, '');
4052
  };
4053
 
4054
+ var Report = /*#__PURE__*/function (_Component) {
4055
+ _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(Report, _Component);
4056
 
4057
+ var _super = _createSuper(Report);
 
 
 
4058
 
4059
+ function Report() {
4060
+ var _this;
4061
 
4062
+ _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Report);
4063
 
4064
+ _this = _super.apply(this, arguments);
4065
+ _this.state = {
4066
+ hasError: false
4067
+ };
4068
+ return _this;
4069
+ }
4070
 
4071
+ _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Report, [{
4072
+ key: "componentDidCatch",
4073
+ value: function componentDidCatch(error) {
4074
+ this.setState({
4075
+ hasError: true
4076
+ });
4077
+ /* eslint-disable no-console */
4078
 
4079
+ console.warn(error);
4080
+ /* eslint-enable no-console */
4081
+ }
4082
+ }, {
4083
+ key: "render",
4084
+ value: function render() {
4085
+ if (this.state.hasError) {
4086
+ return null;
4087
+ }
4088
 
4089
+ var isError = this.props.isError;
 
 
4090
 
4091
+ if (isError) {
4092
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(analytics_components_report_error__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"], {
4093
+ isError: true
4094
+ });
4095
+ }
4096
 
4097
+ var reportParam = getReportParam(this.props);
4098
+ var report = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["find"])(Object(_get_reports__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])(), {
4099
+ report: reportParam
4100
+ });
4101
 
4102
+ if (!report) {
4103
+ return null;
4104
+ }
4105
 
4106
+ var Container = report.component;
4107
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(lib_currency_context__WEBPACK_IMPORTED_MODULE_16__[/* CurrencyContext */ "a"].Provider, {
4108
+ value: Object(lib_currency_context__WEBPACK_IMPORTED_MODULE_16__[/* getFilteredCurrencyInstance */ "b"])(Object(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_11__["getQuery"])())
4109
+ }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(Container, this.props));
4110
+ }
4111
+ }]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4112
 
4113
+ return Report;
4114
+ }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]);
 
4115
 
4116
+ Report.propTypes = {
4117
+ params: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.object.isRequired
 
 
4118
  };
4119
+ /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(Object(_woocommerce_components__WEBPACK_IMPORTED_MODULE_10__["useFilters"])(REPORTS_FILTER), Object(wc_api_with_select__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(function (select, props) {
4120
+ var query = Object(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_11__["getQuery"])();
4121
+ var search = query.search;
4122
 
4123
+ if (!search) {
4124
+ return {};
4125
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4126
 
4127
+ var report = getReportParam(props);
4128
+ var searchWords = Object(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_11__["getSearchWords"])(query); // Single Category view in Categories Report uses the products endpoint, so search must also.
 
 
 
4129
 
4130
+ var mappedReport = report === 'categories' && query.filter === 'single_category' ? 'products' : report;
4131
+ var itemsResult = Object(wc_api_items_utils__WEBPACK_IMPORTED_MODULE_14__[/* searchItemsByString */ "b"])(select, mappedReport, searchWords);
4132
+ var isError = itemsResult.isError,
4133
+ isRequesting = itemsResult.isRequesting,
4134
+ items = itemsResult.items;
4135
+ var ids = Object.keys(items);
 
 
4136
 
4137
+ if (!ids.length) {
4138
+ return {
4139
+ isError: isError,
4140
+ isRequesting: isRequesting
4141
+ };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4142
  }
 
4143
 
4144
+ return {
4145
+ isError: isError,
4146
+ isRequesting: isRequesting,
4147
+ query: _objectSpread(_objectSpread({}, props.query), {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, mappedReport, ids.join(',')))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4148
  };
4149
+ }))(Report));
4150
 
4151
+ /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4152
 
4153
+ /***/ 199:
4154
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4155
 
4156
+ "use strict";
 
 
 
 
 
 
 
 
 
4157
 
4158
+ // EXPORTS
4159
+ __webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ layout_PrimaryLayout; });
4160
+ __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ PageLayout; });
4161
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ layout_EmbedLayout; });
 
 
 
4162
 
4163
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
4164
+ var helpers_extends = __webpack_require__(80);
4165
+ var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4166
 
4167
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
4168
+ var defineProperty = __webpack_require__(17);
4169
+ var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
4170
 
4171
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js
4172
+ var objectWithoutProperties = __webpack_require__(129);
4173
+ var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
4174
 
4175
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
4176
+ var classCallCheck = __webpack_require__(38);
4177
+ var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
4178
 
4179
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js
4180
+ var createClass = __webpack_require__(37);
4181
+ var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
4182
 
4183
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js
4184
+ var inherits = __webpack_require__(39);
4185
+ var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);
 
 
 
 
 
 
 
 
 
 
 
 
 
4186
 
4187
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js
4188
+ var possibleConstructorReturn = __webpack_require__(42);
4189
+ var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn);
 
 
 
 
 
 
 
 
 
 
 
 
 
4190
 
4191
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/getPrototypeOf.js
4192
+ var getPrototypeOf = __webpack_require__(26);
4193
+ var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf);
4194
 
4195
+ // EXTERNAL MODULE: external {"this":["wp","element"]}
4196
+ var external_this_wp_element_ = __webpack_require__(0);
 
4197
 
4198
+ // EXTERNAL MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/compose.js
4199
+ var compose = __webpack_require__(169);
4200
 
4201
+ // EXTERNAL MODULE: external {"this":["wp","data"]}
4202
+ var external_this_wp_data_ = __webpack_require__(18);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4203
 
4204
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
4205
+ var inheritsLoose = __webpack_require__(60);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4206
 
4207
+ // EXTERNAL MODULE: external "React"
4208
+ var external_React_ = __webpack_require__(13);
4209
+ var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_);
 
 
4210
 
4211
+ // EXTERNAL MODULE: ./node_modules/prop-types/index.js
4212
+ var prop_types = __webpack_require__(1);
4213
+ var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
 
 
4214
 
4215
+ // EXTERNAL MODULE: ./node_modules/history/esm/history.js + 2 modules
4216
+ var esm_history = __webpack_require__(98);
 
 
 
 
 
 
 
 
 
 
 
4217
 
4218
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inheritsLoose.js
4219
+ var helpers_inheritsLoose = __webpack_require__(126);
4220
+ var inheritsLoose_default = /*#__PURE__*/__webpack_require__.n(helpers_inheritsLoose);
4221
 
4222
+ // EXTERNAL MODULE: ./node_modules/gud/index.js
4223
+ var gud = __webpack_require__(411);
4224
+ var gud_default = /*#__PURE__*/__webpack_require__.n(gud);
4225
 
4226
+ // CONCATENATED MODULE: ./node_modules/mini-create-react-context/dist/esm/index.js
 
 
 
4227
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4228
 
4229
 
 
 
 
4230
 
 
4231
 
4232
 
4233
+ var MAX_SIGNED_31_BIT_INT = 1073741823;
 
4234
 
4235
+ function objectIs(x, y) {
4236
+ if (x === y) {
4237
+ return x !== 0 || 1 / x === 1 / y;
4238
+ } else {
4239
+ return x !== x && y !== y;
4240
+ }
4241
+ }
4242
 
4243
+ function createEventEmitter(value) {
4244
+ var handlers = [];
4245
+ return {
4246
+ on: function on(handler) {
4247
+ handlers.push(handler);
 
 
 
 
4248
  },
4249
+ off: function off(handler) {
4250
+ handlers = handlers.filter(function (h) {
4251
+ return h !== handler;
4252
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4253
  },
4254
+ get: function get() {
4255
+ return value;
4256
+ },
4257
+ set: function set(newValue, changedBits) {
4258
+ value = newValue;
4259
+ handlers.forEach(function (handler) {
4260
+ return handler(value, changedBits);
4261
+ });
4262
+ }
4263
+ };
4264
+ }
 
 
 
 
 
 
 
4265
 
4266
+ function onlyChild(children) {
4267
+ return Array.isArray(children) ? children[0] : children;
4268
+ }
4269
 
4270
+ function createReactContext(defaultValue, calculateChangedBits) {
4271
+ var _Provider$childContex, _Consumer$contextType;
4272
 
4273
+ var contextProp = '__create-react-context-' + gud_default()() + '__';
 
4274
 
4275
+ var Provider =
4276
+ /*#__PURE__*/
4277
+ function (_Component) {
4278
+ inheritsLoose_default()(Provider, _Component);
4279
 
4280
+ function Provider() {
4281
+ var _this;
4282
 
4283
+ _this = _Component.apply(this, arguments) || this;
4284
+ _this.emitter = createEventEmitter(_this.props.value);
4285
+ return _this;
4286
+ }
4287
 
4288
+ var _proto = Provider.prototype;
4289
 
4290
+ _proto.getChildContext = function getChildContext() {
4291
+ var _ref;
 
 
 
 
4292
 
4293
+ return _ref = {}, _ref[contextProp] = this.emitter, _ref;
4294
+ };
4295
 
4296
+ _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
4297
+ if (this.props.value !== nextProps.value) {
4298
+ var oldValue = this.props.value;
4299
+ var newValue = nextProps.value;
4300
+ var changedBits;
4301
 
4302
+ if (objectIs(oldValue, newValue)) {
4303
+ changedBits = 0;
4304
+ } else {
4305
+ changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
4306
 
4307
+ if (false) {}
 
 
 
 
 
4308
 
4309
+ changedBits |= 0;
 
4310
 
4311
+ if (changedBits !== 0) {
4312
+ this.emitter.set(nextProps.value, changedBits);
4313
+ }
4314
+ }
4315
+ }
4316
+ };
4317
 
4318
+ _proto.render = function render() {
4319
+ return this.props.children;
4320
+ };
4321
 
4322
+ return Provider;
4323
+ }(external_React_["Component"]);
 
 
 
 
 
 
 
4324
 
4325
+ Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = prop_types_default.a.object.isRequired, _Provider$childContex);
 
 
 
 
4326
 
4327
+ var Consumer =
4328
+ /*#__PURE__*/
4329
+ function (_Component2) {
4330
+ inheritsLoose_default()(Consumer, _Component2);
4331
 
4332
+ function Consumer() {
4333
+ var _this2;
 
 
4334
 
4335
+ _this2 = _Component2.apply(this, arguments) || this;
4336
+ _this2.state = {
4337
+ value: _this2.getValue()
4338
+ };
4339
 
4340
+ _this2.onUpdate = function (newValue, changedBits) {
4341
+ var observedBits = _this2.observedBits | 0;
4342
 
4343
+ if ((observedBits & changedBits) !== 0) {
4344
+ _this2.setState({
4345
+ value: _this2.getValue()
4346
+ });
4347
+ }
4348
+ };
4349
 
4350
+ return _this2;
4351
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4352
 
4353
+ var _proto2 = Consumer.prototype;
4354
 
4355
+ _proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
4356
+ var observedBits = nextProps.observedBits;
4357
+ this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
4358
+ };
4359
 
4360
+ _proto2.componentDidMount = function componentDidMount() {
4361
+ if (this.context[contextProp]) {
4362
+ this.context[contextProp].on(this.onUpdate);
4363
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4364
 
4365
+ var observedBits = this.props.observedBits;
4366
+ this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
4367
+ };
4368
 
4369
+ _proto2.componentWillUnmount = function componentWillUnmount() {
4370
+ if (this.context[contextProp]) {
4371
+ this.context[contextProp].off(this.onUpdate);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4372
  }
 
 
 
 
 
 
 
 
 
4373
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4374
 
4375
+ _proto2.getValue = function getValue() {
4376
+ if (this.context[contextProp]) {
4377
+ return this.context[contextProp].get();
4378
+ } else {
4379
+ return defaultValue;
4380
+ }
4381
+ };
4382
 
4383
+ _proto2.render = function render() {
4384
+ return onlyChild(this.props.children)(this.state.value);
4385
+ };
4386
 
4387
+ return Consumer;
4388
+ }(external_React_["Component"]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4389
 
4390
+ Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = prop_types_default.a.object, _Consumer$contextType);
4391
+ return {
4392
+ Provider: Provider,
4393
+ Consumer: Consumer
 
 
 
 
 
 
4394
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4395
  }
4396
 
4397
+ var index = external_React_default.a.createContext || createReactContext;
4398
 
4399
+ /* harmony default export */ var esm = (index);
 
 
4400
 
4401
+ // EXTERNAL MODULE: ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js
4402
+ var tiny_invariant_esm = __webpack_require__(79);
4403
 
4404
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
4405
+ var esm_extends = __webpack_require__(12);
 
4406
 
4407
+ // EXTERNAL MODULE: ./node_modules/react-router/node_modules/path-to-regexp/index.js
4408
+ var path_to_regexp = __webpack_require__(258);
4409
+ var path_to_regexp_default = /*#__PURE__*/__webpack_require__.n(path_to_regexp);
4410
 
4411
+ // EXTERNAL MODULE: ./node_modules/react-is/index.js
4412
+ var react_is = __webpack_require__(176);
 
4413
 
4414
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
4415
+ var objectWithoutPropertiesLoose = __webpack_require__(46);
 
4416
 
4417
+ // EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
4418
+ var hoist_non_react_statics_cjs = __webpack_require__(194);
4419
+ var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
4420
 
4421
+ // CONCATENATED MODULE: ./node_modules/react-router/esm/react-router.js
 
 
4422
 
 
 
 
4423
 
 
4424
 
 
 
 
4425
 
 
 
 
4426
 
 
4427
 
 
 
 
4428
 
 
 
 
 
 
 
4429
 
 
 
 
4430
 
 
 
 
 
 
 
 
 
 
 
 
 
4431
 
 
 
4432
 
 
4433
 
 
 
 
4434
 
4435
+ // TODO: Replace with React.createContext once we can assume React 16+
 
 
4436
 
4437
+ var react_router_createNamedContext = function createNamedContext(name) {
4438
+ var context = esm();
4439
+ context.displayName = name;
4440
+ return context;
4441
+ };
4442
 
4443
+ var react_router_context =
4444
+ /*#__PURE__*/
4445
+ react_router_createNamedContext("Router");
 
 
4446
 
4447
+ /**
4448
+ * The public API for putting history on context.
4449
+ */
4450
 
4451
+ var react_router_Router =
4452
+ /*#__PURE__*/
4453
+ function (_React$Component) {
4454
+ Object(inheritsLoose["a" /* default */])(Router, _React$Component);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4455
 
4456
+ Router.computeRootMatch = function computeRootMatch(pathname) {
4457
+ return {
4458
+ path: "/",
4459
+ url: "/",
4460
+ params: {},
4461
+ isExact: pathname === "/"
4462
+ };
4463
+ };
4464
 
4465
+ function Router(props) {
4466
+ var _this;
 
4467
 
4468
+ _this = _React$Component.call(this, props) || this;
4469
+ _this.state = {
4470
+ location: props.history.location
4471
+ }; // This is a bit of a hack. We have to start listening for location
4472
+ // changes here in the constructor in case there are any <Redirect>s
4473
+ // on the initial render. If there are, they will replace/push when
4474
+ // they mount and since cDM fires in children before parents, we may
4475
+ // get a new location before the <Router> is mounted.
4476
 
4477
+ _this._isMounted = false;
4478
+ _this._pendingLocation = null;
 
4479
 
4480
+ if (!props.staticContext) {
4481
+ _this.unlisten = props.history.listen(function (location) {
4482
+ if (_this._isMounted) {
4483
+ _this.setState({
4484
+ location: location
4485
+ });
4486
+ } else {
4487
+ _this._pendingLocation = location;
4488
+ }
4489
+ });
4490
+ }
4491
 
4492
+ return _this;
4493
+ }
 
 
 
 
 
 
 
 
 
4494
 
4495
+ var _proto = Router.prototype;
4496
 
4497
+ _proto.componentDidMount = function componentDidMount() {
4498
+ this._isMounted = true;
 
4499
 
4500
+ if (this._pendingLocation) {
4501
+ this.setState({
4502
+ location: this._pendingLocation
4503
+ });
4504
+ }
4505
+ };
4506
 
4507
+ _proto.componentWillUnmount = function componentWillUnmount() {
4508
+ if (this.unlisten) this.unlisten();
4509
+ };
4510
 
4511
+ _proto.render = function render() {
4512
+ return external_React_default.a.createElement(react_router_context.Provider, {
4513
+ children: this.props.children || null,
4514
+ value: {
4515
+ history: this.props.history,
4516
+ location: this.state.location,
4517
+ match: Router.computeRootMatch(this.state.location.pathname),
4518
+ staticContext: this.props.staticContext
4519
+ }
4520
+ });
4521
+ };
4522
 
4523
+ return Router;
4524
+ }(external_React_default.a.Component);
4525
 
4526
+ if (false) {}
 
 
4527
 
4528
+ /**
4529
+ * The public API for a <Router> that stores location in memory.
4530
+ */
4531
 
4532
+ var react_router_MemoryRouter =
4533
+ /*#__PURE__*/
4534
+ function (_React$Component) {
4535
+ Object(inheritsLoose["a" /* default */])(MemoryRouter, _React$Component);
4536
 
4537
+ function MemoryRouter() {
4538
+ var _this;
 
 
 
 
 
4539
 
4540
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
4541
+ args[_key] = arguments[_key];
4542
+ }
4543
 
4544
+ _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
4545
+ _this.history = Object(esm_history["c" /* createMemoryHistory */])(_this.props);
4546
+ return _this;
4547
+ }
4548
 
4549
+ var _proto = MemoryRouter.prototype;
 
 
4550
 
4551
+ _proto.render = function render() {
4552
+ return external_React_default.a.createElement(react_router_Router, {
4553
+ history: this.history,
4554
+ children: this.props.children
4555
+ });
4556
+ };
4557
 
4558
+ return MemoryRouter;
4559
+ }(external_React_default.a.Component);
4560
 
4561
+ if (false) {}
4562
 
4563
+ var react_router_Lifecycle =
4564
+ /*#__PURE__*/
4565
+ function (_React$Component) {
4566
+ Object(inheritsLoose["a" /* default */])(Lifecycle, _React$Component);
4567
 
4568
+ function Lifecycle() {
4569
+ return _React$Component.apply(this, arguments) || this;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4570
  }
 
4571
 
4572
+ var _proto = Lifecycle.prototype;
 
 
 
 
 
 
 
4573
 
4574
+ _proto.componentDidMount = function componentDidMount() {
4575
+ if (this.props.onMount) this.props.onMount.call(this, this);
4576
+ };
4577
 
4578
+ _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
4579
+ if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);
4580
+ };
4581
 
4582
+ _proto.componentWillUnmount = function componentWillUnmount() {
4583
+ if (this.props.onUnmount) this.props.onUnmount.call(this, this);
4584
+ };
4585
 
4586
+ _proto.render = function render() {
4587
+ return null;
4588
+ };
4589
 
4590
+ return Lifecycle;
4591
+ }(external_React_default.a.Component);
4592
 
4593
+ /**
4594
+ * The public API for prompting the user before navigating away from a screen.
4595
+ */
4596
 
4597
+ function Prompt(_ref) {
4598
+ var message = _ref.message,
4599
+ _ref$when = _ref.when,
4600
+ when = _ref$when === void 0 ? true : _ref$when;
4601
+ return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
4602
+ !context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
4603
+ if (!when || context.staticContext) return null;
4604
+ var method = context.history.block;
4605
+ return external_React_default.a.createElement(react_router_Lifecycle, {
4606
+ onMount: function onMount(self) {
4607
+ self.release = method(message);
4608
+ },
4609
+ onUpdate: function onUpdate(self, prevProps) {
4610
+ if (prevProps.message !== message) {
4611
+ self.release();
4612
+ self.release = method(message);
4613
+ }
4614
+ },
4615
+ onUnmount: function onUnmount(self) {
4616
+ self.release();
4617
+ },
4618
+ message: message
4619
+ });
4620
+ });
4621
+ }
4622
 
4623
+ if (false) { var messageType; }
4624
 
4625
+ var cache = {};
4626
+ var cacheLimit = 10000;
4627
+ var cacheCount = 0;
4628
 
4629
+ function compilePath(path) {
4630
+ if (cache[path]) return cache[path];
4631
+ var generator = path_to_regexp_default.a.compile(path);
4632
 
4633
+ if (cacheCount < cacheLimit) {
4634
+ cache[path] = generator;
4635
+ cacheCount++;
 
4636
  }
 
4637
 
4638
+ return generator;
4639
+ }
4640
+ /**
4641
+ * Public API for generating a URL pathname from a path and parameters.
4642
+ */
4643
 
 
 
 
4644
 
4645
+ function generatePath(path, params) {
4646
+ if (path === void 0) {
4647
+ path = "/";
 
 
4648
  }
 
4649
 
4650
+ if (params === void 0) {
4651
+ params = {};
4652
+ }
4653
 
4654
+ return path === "/" ? path : compilePath(path)(params, {
4655
+ pretty: true
4656
+ });
4657
+ }
4658
 
4659
+ /**
4660
+ * The public API for navigating programmatically with a component.
4661
+ */
4662
 
4663
+ function Redirect(_ref) {
4664
+ var computedMatch = _ref.computedMatch,
4665
+ to = _ref.to,
4666
+ _ref$push = _ref.push,
4667
+ push = _ref$push === void 0 ? false : _ref$push;
4668
+ return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
4669
+ !context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
4670
+ var history = context.history,
4671
+ staticContext = context.staticContext;
4672
+ var method = push ? history.push : history.replace;
4673
+ var location = Object(esm_history["b" /* createLocation */])(computedMatch ? typeof to === "string" ? generatePath(to, computedMatch.params) : Object(esm_extends["a" /* default */])({}, to, {
4674
+ pathname: generatePath(to.pathname, computedMatch.params)
4675
+ }) : to); // When rendering in a static context,
4676
+ // set the new location immediately.
4677
 
4678
+ if (staticContext) {
4679
+ method(location);
4680
+ return null;
4681
+ }
4682
 
4683
+ return external_React_default.a.createElement(react_router_Lifecycle, {
4684
+ onMount: function onMount() {
4685
+ method(location);
4686
+ },
4687
+ onUpdate: function onUpdate(self, prevProps) {
4688
+ var prevLocation = Object(esm_history["b" /* createLocation */])(prevProps.to);
 
4689
 
4690
+ if (!Object(esm_history["e" /* locationsAreEqual */])(prevLocation, Object(esm_extends["a" /* default */])({}, location, {
4691
+ key: prevLocation.key
4692
+ }))) {
4693
+ method(location);
4694
+ }
4695
+ },
4696
+ to: to
4697
+ });
4698
+ });
4699
+ }
4700
 
4701
+ if (false) {}
 
 
4702
 
4703
+ var cache$1 = {};
4704
+ var cacheLimit$1 = 10000;
4705
+ var cacheCount$1 = 0;
4706
 
4707
+ function compilePath$1(path, options) {
4708
+ var cacheKey = "" + options.end + options.strict + options.sensitive;
4709
+ var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});
4710
+ if (pathCache[path]) return pathCache[path];
4711
+ var keys = [];
4712
+ var regexp = path_to_regexp_default()(path, keys, options);
4713
+ var result = {
4714
+ regexp: regexp,
4715
+ keys: keys
4716
+ };
4717
 
4718
+ if (cacheCount$1 < cacheLimit$1) {
4719
+ pathCache[path] = result;
4720
+ cacheCount$1++;
4721
+ }
4722
 
4723
+ return result;
4724
+ }
4725
+ /**
4726
+ * Public API for matching a URL pathname to a path.
4727
+ */
4728
 
 
 
 
 
 
4729
 
4730
+ function matchPath(pathname, options) {
4731
+ if (options === void 0) {
4732
+ options = {};
4733
+ }
4734
 
4735
+ if (typeof options === "string" || Array.isArray(options)) {
4736
+ options = {
4737
+ path: options
4738
+ };
4739
+ }
4740
 
4741
+ var _options = options,
4742
+ path = _options.path,
4743
+ _options$exact = _options.exact,
4744
+ exact = _options$exact === void 0 ? false : _options$exact,
4745
+ _options$strict = _options.strict,
4746
+ strict = _options$strict === void 0 ? false : _options$strict,
4747
+ _options$sensitive = _options.sensitive,
4748
+ sensitive = _options$sensitive === void 0 ? false : _options$sensitive;
4749
+ var paths = [].concat(path);
4750
+ return paths.reduce(function (matched, path) {
4751
+ if (!path && path !== "") return null;
4752
+ if (matched) return matched;
4753
 
4754
+ var _compilePath = compilePath$1(path, {
4755
+ end: exact,
4756
+ strict: strict,
4757
+ sensitive: sensitive
4758
+ }),
4759
+ regexp = _compilePath.regexp,
4760
+ keys = _compilePath.keys;
4761
 
4762
+ var match = regexp.exec(pathname);
4763
+ if (!match) return null;
4764
+ var url = match[0],
4765
+ values = match.slice(1);
4766
+ var isExact = pathname === url;
4767
+ if (exact && !isExact) return null;
4768
+ return {
4769
+ path: path,
4770
+ // the path used to match
4771
+ url: path === "/" && url === "" ? "/" : url,
4772
+ // the matched portion of the URL
4773
+ isExact: isExact,
4774
+ // whether or not we matched exactly
4775
+ params: keys.reduce(function (memo, key, index) {
4776
+ memo[key.name] = values[index];
4777
+ return memo;
4778
+ }, {})
4779
+ };
4780
+ }, null);
4781
+ }
4782
 
4783
+ function isEmptyChildren(children) {
4784
+ return external_React_default.a.Children.count(children) === 0;
4785
+ }
 
 
 
 
4786
 
4787
+ function evalChildrenDev(children, props, path) {
4788
+ var value = children(props);
4789
+ false ? undefined : void 0;
4790
+ return value || null;
4791
+ }
4792
+ /**
4793
+ * The public API for matching a single path and rendering.
4794
+ */
4795
 
 
 
 
 
 
4796
 
4797
+ var react_router_Route =
4798
+ /*#__PURE__*/
4799
+ function (_React$Component) {
4800
+ Object(inheritsLoose["a" /* default */])(Route, _React$Component);
 
 
 
 
 
 
 
 
 
4801
 
4802
+ function Route() {
4803
+ return _React$Component.apply(this, arguments) || this;
4804
+ }
4805
 
4806
+ var _proto = Route.prototype;
 
 
 
4807
 
4808
+ _proto.render = function render() {
4809
+ var _this = this;
 
 
 
 
 
 
 
 
 
 
 
 
 
4810
 
4811
+ return external_React_default.a.createElement(react_router_context.Consumer, null, function (context$1) {
4812
+ !context$1 ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
4813
+ var location = _this.props.location || context$1.location;
4814
+ var match = _this.props.computedMatch ? _this.props.computedMatch // <Switch> already computed the match for us
4815
+ : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
4816
 
4817
+ var props = Object(esm_extends["a" /* default */])({}, context$1, {
4818
+ location: location,
4819
+ match: match
4820
+ });
 
 
 
 
4821
 
4822
+ var _this$props = _this.props,
4823
+ children = _this$props.children,
4824
+ component = _this$props.component,
4825
+ render = _this$props.render; // Preact uses an empty array as children by
4826
+ // default, so use null if that's the case.
 
4827
 
4828
+ if (Array.isArray(children) && children.length === 0) {
4829
+ children = null;
4830
+ }
 
 
 
 
 
 
 
 
 
 
4831
 
4832
+ return external_React_default.a.createElement(react_router_context.Provider, {
4833
+ value: props
4834
+ }, props.match ? children ? typeof children === "function" ? false ? undefined : children(props) : children : component ? external_React_default.a.createElement(component, props) : render ? render(props) : null : typeof children === "function" ? false ? undefined : children(props) : null);
4835
+ });
4836
+ };
 
4837
 
4838
+ return Route;
4839
+ }(external_React_default.a.Component);
 
 
 
 
4840
 
4841
+ if (false) {}
 
 
 
 
4842
 
4843
+ function addLeadingSlash(path) {
4844
+ return path.charAt(0) === "/" ? path : "/" + path;
4845
+ }
4846
 
4847
+ function addBasename(basename, location) {
4848
+ if (!basename) return location;
4849
+ return Object(esm_extends["a" /* default */])({}, location, {
4850
+ pathname: addLeadingSlash(basename) + location.pathname
4851
+ });
4852
+ }
 
 
 
 
 
 
 
4853
 
4854
+ function stripBasename(basename, location) {
4855
+ if (!basename) return location;
4856
+ var base = addLeadingSlash(basename);
4857
+ if (location.pathname.indexOf(base) !== 0) return location;
4858
+ return Object(esm_extends["a" /* default */])({}, location, {
4859
+ pathname: location.pathname.substr(base.length)
4860
+ });
4861
+ }
4862
 
4863
+ function createURL(location) {
4864
+ return typeof location === "string" ? location : Object(esm_history["d" /* createPath */])(location);
4865
+ }
 
4866
 
4867
+ function staticHandler(methodName) {
4868
+ return function () {
4869
+ false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) ;
4870
+ };
4871
+ }
4872
 
4873
+ function noop() {}
4874
+ /**
4875
+ * The public top-level API for a "static" <Router>, so-called because it
4876
+ * can't actually change the current location. Instead, it just records
4877
+ * location changes in a context object. Useful mainly in testing and
4878
+ * server-rendering scenarios.
4879
+ */
4880
 
 
 
4881
 
4882
+ var react_router_StaticRouter =
4883
+ /*#__PURE__*/
4884
+ function (_React$Component) {
4885
+ Object(inheritsLoose["a" /* default */])(StaticRouter, _React$Component);
4886
 
4887
+ function StaticRouter() {
4888
+ var _this;
 
4889
 
4890
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
4891
+ args[_key] = arguments[_key];
 
 
 
 
 
 
 
4892
  }
4893
 
4894
+ _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
4895
 
4896
+ _this.handlePush = function (location) {
4897
+ return _this.navigateTo(location, "PUSH");
4898
+ };
4899
 
4900
+ _this.handleReplace = function (location) {
4901
+ return _this.navigateTo(location, "REPLACE");
4902
+ };
4903
 
4904
+ _this.handleListen = function () {
4905
+ return noop;
4906
+ };
 
4907
 
4908
+ _this.handleBlock = function () {
4909
+ return noop;
4910
+ };
4911
 
4912
+ return _this;
4913
+ }
 
4914
 
4915
+ var _proto = StaticRouter.prototype;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4916
 
4917
+ _proto.navigateTo = function navigateTo(location, action) {
4918
+ var _this$props = this.props,
4919
+ _this$props$basename = _this$props.basename,
4920
+ basename = _this$props$basename === void 0 ? "" : _this$props$basename,
4921
+ _this$props$context = _this$props.context,
4922
+ context = _this$props$context === void 0 ? {} : _this$props$context;
4923
+ context.action = action;
4924
+ context.location = addBasename(basename, Object(esm_history["b" /* createLocation */])(location));
4925
+ context.url = createURL(context.location);
4926
+ };
4927
 
4928
+ _proto.render = function render() {
4929
+ var _this$props2 = this.props,
4930
+ _this$props2$basename = _this$props2.basename,
4931
+ basename = _this$props2$basename === void 0 ? "" : _this$props2$basename,
4932
+ _this$props2$context = _this$props2.context,
4933
+ context = _this$props2$context === void 0 ? {} : _this$props2$context,
4934
+ _this$props2$location = _this$props2.location,
4935
+ location = _this$props2$location === void 0 ? "/" : _this$props2$location,
4936
+ rest = Object(objectWithoutPropertiesLoose["a" /* default */])(_this$props2, ["basename", "context", "location"]);
4937
 
4938
+ var history = {
4939
+ createHref: function createHref(path) {
4940
+ return addLeadingSlash(basename + createURL(path));
4941
+ },
4942
+ action: "POP",
4943
+ location: stripBasename(basename, Object(esm_history["b" /* createLocation */])(location)),
4944
+ push: this.handlePush,
4945
+ replace: this.handleReplace,
4946
+ go: staticHandler("go"),
4947
+ goBack: staticHandler("goBack"),
4948
+ goForward: staticHandler("goForward"),
4949
+ listen: this.handleListen,
4950
+ block: this.handleBlock
4951
+ };
4952
+ return external_React_default.a.createElement(react_router_Router, Object(esm_extends["a" /* default */])({}, rest, {
4953
+ history: history,
4954
+ staticContext: context
4955
+ }));
4956
+ };
4957
 
4958
+ return StaticRouter;
4959
+ }(external_React_default.a.Component);
 
 
 
 
4960
 
4961
+ if (false) {}
4962
 
4963
+ /**
4964
+ * The public API for rendering the first <Route> that matches.
4965
+ */
4966
 
4967
+ var react_router_Switch =
4968
+ /*#__PURE__*/
4969
+ function (_React$Component) {
4970
+ Object(inheritsLoose["a" /* default */])(Switch, _React$Component);
4971
 
4972
+ function Switch() {
4973
+ return _React$Component.apply(this, arguments) || this;
 
 
4974
  }
4975
 
4976
+ var _proto = Switch.prototype;
 
4977
 
4978
+ _proto.render = function render() {
4979
+ var _this = this;
 
4980
 
4981
+ return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
4982
+ !context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
4983
+ var location = _this.props.location || context.location;
4984
+ var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()
4985
+ // here because toArray adds keys to all child elements and we do not want
4986
+ // to trigger an unmount/remount for two <Route>s that render the same
4987
+ // component at different URLs.
4988
 
4989
+ external_React_default.a.Children.forEach(_this.props.children, function (child) {
4990
+ if (match == null && external_React_default.a.isValidElement(child)) {
4991
+ element = child;
4992
+ var path = child.props.path || child.props.from;
4993
+ match = path ? matchPath(location.pathname, Object(esm_extends["a" /* default */])({}, child.props, {
4994
+ path: path
4995
+ })) : context.match;
4996
+ }
4997
+ });
4998
+ return match ? external_React_default.a.cloneElement(element, {
4999
+ location: location,
5000
+ computedMatch: match
5001
+ }) : null;
5002
+ });
5003
+ };
5004
 
5005
+ return Switch;
5006
+ }(external_React_default.a.Component);
 
 
 
 
 
 
5007
 
5008
+ if (false) {}
5009
 
5010
+ /**
5011
+ * A public higher-order component to access the imperative API
5012
+ */
 
 
 
 
5013
 
5014
+ function withRouter(Component) {
5015
+ var displayName = "withRouter(" + (Component.displayName || Component.name) + ")";
 
5016
 
5017
+ var C = function C(props) {
5018
+ var wrappedComponentRef = props.wrappedComponentRef,
5019
+ remainingProps = Object(objectWithoutPropertiesLoose["a" /* default */])(props, ["wrappedComponentRef"]);
 
 
 
 
 
 
 
5020
 
5021
+ return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
5022
+ !context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
5023
+ return external_React_default.a.createElement(Component, Object(esm_extends["a" /* default */])({}, remainingProps, context, {
5024
+ ref: wrappedComponentRef
5025
+ }));
5026
+ });
5027
+ };
5028
 
5029
+ C.displayName = displayName;
5030
+ C.WrappedComponent = Component;
 
 
 
 
5031
 
5032
+ if (false) {}
5033
 
5034
+ return hoist_non_react_statics_cjs_default()(C, Component);
5035
+ }
5036
 
5037
+ var useContext = external_React_default.a.useContext;
5038
+ function useHistory() {
5039
+ if (false) {}
5040
+
5041
+ return useContext(react_router_context).history;
5042
  }
5043
+ function useLocation() {
5044
+ if (false) {}
5045
 
5046
+ return useContext(react_router_context).location;
5047
+ }
5048
+ function useParams() {
5049
+ if (false) {}
5050
 
5051
+ var match = useContext(react_router_context).match;
5052
+ return match ? match.params : {};
 
5053
  }
5054
+ function useRouteMatch(path) {
5055
+ if (false) {}
5056
 
5057
+ return path ? matchPath(useLocation().pathname, path) : useContext(react_router_context).match;
5058
+ }
 
5059
 
5060
+ if (false) { var secondaryBuildName, initialBuildName, buildNames, react_router_key, global; }
 
5061
 
 
 
 
 
 
 
 
 
 
5062
 
5063
+ //# sourceMappingURL=react-router.js.map
 
 
5064
 
5065
+ // EXTERNAL MODULE: external "lodash"
5066
+ var external_lodash_ = __webpack_require__(2);
5067
 
5068
+ // EXTERNAL MODULE: external {"this":["wc","components"]}
5069
+ var external_this_wc_components_ = __webpack_require__(53);
 
 
5070
 
5071
+ // EXTERNAL MODULE: external {"this":["wc","navigation"]}
5072
+ var external_this_wc_navigation_ = __webpack_require__(22);
5073
 
5074
+ // EXTERNAL MODULE: ./client/settings/index.js
5075
+ var settings = __webpack_require__(23);
5076
 
5077
+ // EXTERNAL MODULE: external {"this":["wc","data"]}
5078
+ var external_this_wc_data_ = __webpack_require__(43);
5079
 
5080
+ // EXTERNAL MODULE: ./client/layout/style.scss
5081
+ var layout_style = __webpack_require__(438);
5082
 
5083
+ // EXTERNAL MODULE: ./node_modules/qs/lib/index.js
5084
+ var lib = __webpack_require__(66);
5085
 
5086
+ // EXTERNAL MODULE: external {"this":["wp","hooks"]}
5087
+ var external_this_wp_hooks_ = __webpack_require__(48);
5088
 
5089
+ // EXTERNAL MODULE: external {"this":["wp","i18n"]}
5090
+ var external_this_wp_i18n_ = __webpack_require__(3);
5091
 
5092
+ // EXTERNAL MODULE: ./client/utils/index.js
5093
+ var utils = __webpack_require__(268);
5094
 
5095
+ // EXTERNAL MODULE: ./client/analytics/report/get-reports.js
5096
+ var get_reports = __webpack_require__(196);
5097
 
5098
+ // CONCATENATED MODULE: ./client/layout/controller.js
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5099
 
 
 
 
 
5100
 
 
5101
 
 
 
 
 
5102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5103
 
 
 
5104
 
 
 
 
 
 
 
 
 
5105
 
5106
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
 
 
 
 
5107
 
5108
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
 
 
 
 
5109
 
5110
+ /**
5111
+ * External dependencies
5112
+ */
5113
 
 
 
 
 
 
 
 
 
 
5114
 
 
5115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5116
 
 
 
 
 
 
5117
 
5118
+ /**
5119
+ * WooCommerce dependencies
5120
+ */
5121
 
 
 
 
 
 
 
 
5122
 
 
 
 
 
 
 
5123
 
5124
+ /**
5125
+ * Internal dependencies
5126
+ */
 
 
 
 
 
 
 
 
 
 
 
 
5127
 
 
5128
 
5129
+ var AnalyticsReport = Object(external_this_wp_element_["lazy"])(function () {
5130
+ return Promise.resolve(/* import() */).then(__webpack_require__.bind(null, 197));
5131
+ });
5132
+ var AnalyticsSettings = Object(external_this_wp_element_["lazy"])(function () {
5133
+ return __webpack_require__.e(/* import() | analytics-settings */ 19).then(__webpack_require__.bind(null, 922));
5134
+ });
5135
+ var Dashboard = Object(external_this_wp_element_["lazy"])(function () {
5136
+ return __webpack_require__.e(/* import() | dashboard */ 25).then(__webpack_require__.bind(null, 911));
5137
+ });
5138
+ var DevDocs = Object(external_this_wp_element_["lazy"])(function () {
5139
+ return Promise.all(/* import() | devdocs */[__webpack_require__.e(1), __webpack_require__.e(47), __webpack_require__.e(29)]).then(__webpack_require__.bind(null, 924));
5140
+ });
5141
+ var Homescreen = Object(external_this_wp_element_["lazy"])(function () {
5142
+ return Promise.all(/* import() | homescreen */[__webpack_require__.e(1), __webpack_require__.e(3), __webpack_require__.e(4), __webpack_require__.e(6), __webpack_require__.e(30)]).then(__webpack_require__.bind(null, 921));
5143
+ });
5144
+ var MarketingOverview = Object(external_this_wp_element_["lazy"])(function () {
5145
+ return Promise.all(/* import() | marketing-overview */[__webpack_require__.e(1), __webpack_require__.e(48), __webpack_require__.e(34)]).then(__webpack_require__.bind(null, 923));
5146
+ });
5147
 
5148
+ var TIME_EXCLUDED_SCREENS_FILTER = 'woocommerce_admin_time_excluded_screens';
5149
+ var PAGES_FILTER = 'woocommerce_admin_pages_list';
5150
+ var controller_getPages = function getPages() {
5151
+ var pages = [];
5152
+ var initialBreadcrumbs = [['', wcSettings.woocommerceTranslation]];
5153
 
5154
+ if (window.wcAdminFeatures.devdocs) {
5155
+ pages.push({
5156
+ container: DevDocs,
5157
+ path: '/devdocs',
5158
+ breadcrumbs: function breadcrumbs(_ref) {
5159
+ var location = _ref.location;
5160
+
5161
+ var _getUrlParams = Object(utils["b" /* getUrlParams */])(location.search),
5162
+ component = _getUrlParams.component;
5163
+
5164
+ if (component) {
5165
+ return [].concat(initialBreadcrumbs, [['/devdocs', 'Documentation'], component]);
5166
+ }
5167
+
5168
+ return [].concat(initialBreadcrumbs, ['Documentation']);
5169
+ },
5170
+ wpOpenMenu: 'toplevel_page_woocommerce'
5171
+ });
5172
  }
5173
 
5174
+ if (window.wcAdminFeatures['analytics-dashboard'] && !window.wcAdminFeatures.homescreen) {
5175
+ pages.push({
5176
+ container: Dashboard,
5177
+ path: '/',
5178
+ breadcrumbs: [].concat(initialBreadcrumbs, [Object(external_this_wp_i18n_["__"])('Dashboard', 'woocommerce-admin')]),
5179
+ wpOpenMenu: 'toplevel_page_woocommerce'
5180
+ });
5181
+ }
5182
 
5183
+ if (window.wcAdminFeatures.homescreen) {
5184
+ pages.push({
5185
+ container: Homescreen,
5186
+ path: '/',
5187
+ breadcrumbs: [].concat(initialBreadcrumbs, [Object(external_this_wp_i18n_["__"])('Home', 'woocommerce-admin')]),
5188
+ wpOpenMenu: 'toplevel_page_woocommerce'
5189
  });
5190
  }
5191
 
5192
+ if (window.wcAdminFeatures.analytics) {
5193
+ if (window.wcAdminFeatures.homescreen) {
5194
+ pages.push({
5195
+ container: Dashboard,
5196
+ path: '/analytics/overview',
5197
+ breadcrumbs: [].concat(initialBreadcrumbs, [['/analytics/overview', Object(external_this_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], Object(external_this_wp_i18n_["__"])('Overview', 'woocommerce-admin')]),
5198
+ wpOpenMenu: 'toplevel_page_wc-admin-path--analytics-overview'
5199
+ });
5200
+ }
5201
 
5202
+ var ReportWpOpenMenu = "toplevel_page_wc-admin-path--analytics-".concat(window.wcAdminFeatures.homescreen ? 'overview' : 'revenue');
5203
+ pages.push({
5204
+ container: AnalyticsSettings,
5205
+ path: '/analytics/settings',
5206
+ breadcrumbs: [].concat(initialBreadcrumbs, [['/analytics/revenue', Object(external_this_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], Object(external_this_wp_i18n_["__"])('Settings', 'woocommerce-admin')]),
5207
+ wpOpenMenu: ReportWpOpenMenu
5208
+ });
5209
+ pages.push({
5210
+ container: AnalyticsReport,
5211
+ path: '/customers',
5212
+ breadcrumbs: [].concat(initialBreadcrumbs, [Object(external_this_wp_i18n_["__"])('Customers', 'woocommerce-admin')]),
5213
+ wpOpenMenu: 'toplevel_page_woocommerce'
5214
+ });
5215
+ pages.push({
5216
+ container: AnalyticsReport,
5217
+ path: '/analytics/:report',
5218
+ breadcrumbs: function breadcrumbs(_ref2) {
5219
+ var match = _ref2.match;
5220
+ var report = Object(external_lodash_["find"])(Object(get_reports["a" /* default */])(), {
5221
+ report: match.params.report
5222
+ });
5223
 
5224
+ if (!report) {
5225
+ return [];
5226
+ }
 
 
 
 
 
 
5227
 
5228
+ return [].concat(initialBreadcrumbs, [['/analytics/revenue', Object(external_this_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], report.title]);
5229
+ },
5230
+ wpOpenMenu: ReportWpOpenMenu
5231
+ });
5232
+ }
 
5233
 
5234
+ if (window.wcAdminFeatures.marketing) {
5235
+ pages.push({
5236
+ container: MarketingOverview,
5237
+ path: '/marketing',
5238
+ breadcrumbs: [].concat(initialBreadcrumbs, [['/marketing', Object(external_this_wp_i18n_["__"])('Marketing', 'woocommerce-admin')], Object(external_this_wp_i18n_["__"])('Overview', 'woocommerce-admin')]),
5239
+ wpOpenMenu: 'toplevel_page_woocommerce-marketing'
5240
+ });
5241
+ }
5242
 
5243
+ return Object(external_this_wp_hooks_["applyFilters"])(PAGES_FILTER, pages);
5244
+ };
5245
+ var controller_Controller = /*#__PURE__*/function (_Component) {
5246
+ inherits_default()(Controller, _Component);
5247
 
5248
+ var _super = _createSuper(Controller);
 
5249
 
5250
+ function Controller() {
5251
+ classCallCheck_default()(this, Controller);
5252
+
5253
+ return _super.apply(this, arguments);
 
 
 
5254
  }
 
 
 
 
 
5255
 
5256
+ createClass_default()(Controller, [{
5257
+ key: "componentDidMount",
5258
+ value: function componentDidMount() {
5259
+ window.document.documentElement.scrollTop = 0;
5260
+ }
5261
+ }, {
5262
+ key: "componentDidUpdate",
5263
+ value: function componentDidUpdate(prevProps) {
5264
+ var prevQuery = this.getQuery(prevProps.location.search);
5265
+ var prevBaseQuery = Object(external_lodash_["omit"])(this.getQuery(prevProps.location.search), 'chartType', 'filter', 'paged');
5266
+ var baseQuery = Object(external_lodash_["omit"])(this.getQuery(this.props.location.search), 'chartType', 'filter', 'paged');
5267
 
5268
+ if (prevQuery.paged > 1 && !Object(external_lodash_["isEqual"])(prevBaseQuery, baseQuery)) {
5269
+ Object(external_this_wc_navigation_["getHistory"])().replace(Object(external_this_wc_navigation_["getNewPath"])({
5270
+ paged: 1
5271
+ }));
5272
+ }
5273
 
5274
+ if (prevProps.match.url !== this.props.match.url) {
5275
+ window.document.documentElement.scrollTop = 0;
5276
+ }
5277
+ }
5278
+ }, {
5279
+ key: "getQuery",
5280
+ value: function getQuery(searchString) {
5281
+ if (!searchString) {
5282
+ return {};
5283
+ }
 
 
5284
 
5285
+ var search = searchString.substring(1);
5286
+ return Object(lib["parse"])(search);
5287
+ }
5288
+ }, {
5289
+ key: "render",
5290
+ value: function render() {
5291
+ var _this$props = this.props,
5292
+ page = _this$props.page,
5293
+ match = _this$props.match,
5294
+ location = _this$props.location;
5295
+ var url = match.url,
5296
+ params = match.params;
5297
+ var query = this.getQuery(location.search);
5298
+ window.wpNavMenuUrlUpdate(query);
5299
+ window.wpNavMenuClassChange(page, url);
5300
+ return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Suspense"], {
5301
+ fallback: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Spinner"], null)
5302
+ }, Object(external_this_wp_element_["createElement"])(page.container, {
5303
+ params: params,
5304
+ path: url,
5305
+ pathMatch: page.path,
5306
+ query: query
5307
+ }));
5308
+ }
5309
+ }]);
5310
 
5311
+ return Controller;
5312
+ }(external_this_wp_element_["Component"]);
5313
+ /**
5314
+ * Update an anchor's link in sidebar to include persisted queries. Leave excluded screens
5315
+ * as is.
5316
+ *
5317
+ * @param {HTMLElement} item - Sidebar anchor link.
5318
+ * @param {Object} nextQuery - A query object to be added to updated hrefs.
5319
+ * @param {Array} excludedScreens - wc-admin screens to avoid updating.
5320
+ */
5321
 
5322
+ function updateLinkHref(item, nextQuery, excludedScreens) {
5323
+ var isWCAdmin = /admin.php\?page=wc-admin/.test(item.href);
 
5324
 
5325
+ if (isWCAdmin) {
5326
+ var search = Object(external_lodash_["last"])(item.href.split('?'));
5327
+ var query = Object(lib["parse"])(search);
5328
+ var defaultPath = window.wcAdminFeatures.homescreen ? 'homescreen' : 'dashboard';
5329
+ var path = query.path || defaultPath;
5330
+ var screen = path.replace('/analytics', '').replace('/', '');
5331
+ var isExcludedScreen = excludedScreens.includes(screen);
5332
+ var href = 'admin.php?' + Object(lib["stringify"])(Object.assign(query, isExcludedScreen ? {} : nextQuery)); // Replace the href so you can see the url on hover.
5333
 
5334
+ item.href = href;
 
5335
 
5336
+ item.onclick = function (e) {
5337
+ e.preventDefault();
5338
+ Object(external_this_wc_navigation_["getHistory"])().push(href);
5339
+ };
5340
  }
5341
+ } // Update's wc-admin links in wp-admin menu
5342
 
5343
+ window.wpNavMenuUrlUpdate = function (query) {
5344
+ var excludedScreens = Object(external_this_wp_hooks_["applyFilters"])(TIME_EXCLUDED_SCREENS_FILTER, ['devdocs', 'stock', 'settings', 'customers', 'homescreen']);
5345
+ var nextQuery = Object(external_this_wc_navigation_["getPersistedQuery"])(query);
5346
+ Array.from(document.querySelectorAll('#adminmenu a')).forEach(function (item) {
5347
+ return updateLinkHref(item, nextQuery, excludedScreens);
5348
+ });
5349
+ }; // When the route changes, we need to update wp-admin's menu with the correct section & current link
5350
 
 
 
 
5351
 
5352
+ window.wpNavMenuClassChange = function (page, url) {
5353
+ Array.from(document.getElementsByClassName('current')).forEach(function (item) {
5354
+ item.classList.remove('current');
5355
+ });
5356
+ var submenu = Array.from(document.querySelectorAll('.wp-has-current-submenu'));
5357
+ submenu.forEach(function (element) {
5358
+ element.classList.remove('wp-has-current-submenu');
5359
+ element.classList.remove('wp-menu-open');
5360
+ element.classList.remove('selected');
5361
+ element.classList.add('wp-not-current-submenu');
5362
+ element.classList.add('menu-top');
5363
+ });
5364
+ var pageUrl = url === '/' ? 'admin.php?page=wc-admin' : 'admin.php?page=wc-admin&path=' + encodeURIComponent(url);
5365
+ var currentItemsSelector = url === '/' ? "li > a[href$=\"".concat(pageUrl, "\"], li > a[href*=\"").concat(pageUrl, "?\"]") : "li > a[href*=\"".concat(pageUrl, "\"]");
5366
+ var currentItems = document.querySelectorAll(currentItemsSelector);
5367
+ Array.from(currentItems).forEach(function (item) {
5368
+ item.parentElement.classList.add('current');
5369
+ });
5370
 
5371
+ if (page.wpOpenMenu) {
5372
+ var currentMenu = document.querySelector('#' + page.wpOpenMenu);
5373
+
5374
+ if (currentMenu) {
5375
+ currentMenu.classList.remove('wp-not-current-submenu');
5376
+ currentMenu.classList.add('wp-has-current-submenu');
5377
+ currentMenu.classList.add('wp-menu-open');
5378
+ currentMenu.classList.add('current');
 
 
 
 
 
 
 
 
5379
  }
5380
  }
5381
 
5382
+ var wpWrap = document.querySelector('#wpwrap');
5383
+ wpWrap.classList.remove('wp-responsive-open');
5384
+ };
5385
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/assertThisInitialized.js
5386
+ var assertThisInitialized = __webpack_require__(62);
5387
+ var assertThisInitialized_default = /*#__PURE__*/__webpack_require__.n(assertThisInitialized);
5388
 
5389
+ // EXTERNAL MODULE: ./node_modules/classnames/index.js
5390
+ var classnames = __webpack_require__(8);
5391
+ var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
 
 
5392
 
5393
+ // EXTERNAL MODULE: external {"this":["wp","htmlEntities"]}
5394
+ var external_this_wp_htmlEntities_ = __webpack_require__(72);
 
 
 
5395
 
5396
+ // EXTERNAL MODULE: ./client/header/style.scss
5397
+ var header_style = __webpack_require__(440);
5398
 
5399
+ // EXTERNAL MODULE: ./node_modules/react-click-outside/dist/index.js
5400
+ var dist = __webpack_require__(406);
5401
+ var dist_default = /*#__PURE__*/__webpack_require__.n(dist);
5402
 
5403
+ // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/button/index.js
5404
+ var build_module_button = __webpack_require__(68);
 
 
 
 
 
 
 
5405
 
5406
+ // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/navigable-container/menu.js + 1 modules
5407
+ var menu = __webpack_require__(418);
 
 
 
5408
 
5409
+ // EXTERNAL MODULE: ./node_modules/gridicons/dist/pages.js
5410
+ var dist_pages = __webpack_require__(407);
5411
+ var pages_default = /*#__PURE__*/__webpack_require__.n(dist_pages);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5412
 
5413
+ // EXTERNAL MODULE: ./node_modules/gridicons/dist/cross-small.js
5414
+ var cross_small = __webpack_require__(408);
5415
+ var cross_small_default = /*#__PURE__*/__webpack_require__.n(cross_small);
 
 
 
 
 
 
5416
 
5417
+ // EXTERNAL MODULE: ./client/header/activity-panel/style.scss
5418
+ var activity_panel_style = __webpack_require__(442);
 
 
 
5419
 
5420
+ // CONCATENATED MODULE: ./client/header/activity-panel/toggle-bubble.js
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5421
 
 
 
 
5422
 
5423
+ /**
5424
+ * External dependencies
5425
+ */
5426
 
 
 
 
5427
 
 
5428
 
5429
+ var toggle_bubble_ActivityPanelToggleBubble = function ActivityPanelToggleBubble(_ref) {
5430
+ var _ref$height = _ref.height,
5431
+ height = _ref$height === void 0 ? 24 : _ref$height,
5432
+ _ref$width = _ref.width,
5433
+ width = _ref$width === void 0 ? 24 : _ref$width,
5434
+ _ref$hasUnread = _ref.hasUnread,
5435
+ hasUnread = _ref$hasUnread === void 0 ? false : _ref$hasUnread;
5436
+ var classes = classnames_default()('woocommerce-layout__activity-panel-toggle-bubble', {
5437
+ 'has-unread': hasUnread
5438
+ });
5439
+ /* eslint-disable max-len */
5440
 
5441
+ return Object(external_this_wp_element_["createElement"])("div", {
5442
+ className: classes
5443
+ }, Object(external_this_wp_element_["createElement"])("svg", {
5444
+ height: height,
5445
+ width: width,
5446
+ viewBox: "0 0 24 24"
5447
+ }, Object(external_this_wp_element_["createElement"])("path", {
5448
+ d: "M18.9 2H5.1C3.4 2 2 3.4 2 5.1v10.7C2 17.6 3.4 19 5.1 19H9l6 3-1-3h4.9c1.7 0 3.1-1.4 3.1-3.1V5.1C22 3.4 20.6 2 18.9 2zm-1.5 4.5c-.4.8-.8 2.1-1 3.9-.3 1.8-.4 3.1-.3 4.1 0 .3 0 .5-.1.7-.1.2-.3.4-.6.4s-.6-.1-.9-.4c-1-1-1.8-2.6-2.4-4.6-.7 1.4-1.2 2.4-1.6 3.1-.6 1.2-1.2 1.8-1.6 1.9-.3 0-.5-.2-.8-.7-.5-1.4-1.1-4.2-1.7-8.2 0-.3 0-.5.2-.7.1-.2.4-.3.7-.4.5 0 .9.2.9.8.3 2.3.7 4.2 1.1 5.7l2.4-4.5c.2-.4.4-.6.8-.6.5 0 .8.3.9.9.3 1.4.6 2.6 1 3.7.3-2.7.8-4.7 1.4-5.9.2-.3.4-.5.7-.5.2 0 .5.1.7.2.2.2.3.4.3.6 0 .2 0 .4-.1.5z"
5449
+ })));
5450
+ /* eslint-enable max-len */
5451
+ };
5452
 
5453
+ toggle_bubble_ActivityPanelToggleBubble.propTypes = {
5454
+ height: prop_types_default.a.number,
5455
+ width: prop_types_default.a.number,
5456
+ hasUnread: prop_types_default.a.bool
5457
+ };
5458
+ /* harmony default export */ var toggle_bubble = (toggle_bubble_ActivityPanelToggleBubble);
5459
+ // EXTERNAL MODULE: ./client/analytics/settings/config.js + 1 modules
5460
+ var config = __webpack_require__(271);
5461
 
5462
+ // EXTERNAL MODULE: ./client/wc-api/constants.js
5463
+ var constants = __webpack_require__(33);
 
 
5464
 
5465
+ // CONCATENATED MODULE: ./client/header/activity-panel/unread-indicators.js
5466
+ /**
5467
+ * WooCommerce dependencies
5468
+ */
5469
 
5470
+ /**
5471
+ * Internal dependencies
5472
+ */
 
5473
 
 
 
 
 
 
5474
 
 
 
 
5475
 
 
 
 
 
 
 
 
 
5476
 
5477
+ function getUnreadNotes(select) {
5478
+ var _select = select('wc-api'),
5479
+ getNotes = _select.getNotes,
5480
+ getNotesError = _select.getNotesError,
5481
+ isGetNotesRequesting = _select.isGetNotesRequesting;
 
 
 
 
 
 
 
 
 
 
5482
 
5483
+ var _select2 = select(external_this_wc_data_["USER_STORE_NAME"]),
5484
+ getCurrentUser = _select2.getCurrentUser;
5485
+
5486
+ var userData = getCurrentUser();
5487
+ var lastRead = parseInt(userData && userData.woocommerce_meta && userData.woocommerce_meta.activity_panel_inbox_last_read, 10);
5488
+
5489
+ if (!lastRead) {
5490
+ return null;
 
 
 
 
 
 
 
 
 
5491
  }
 
5492
 
5493
+ var notesQuery = {
5494
+ page: 1,
5495
+ per_page: 1,
5496
+ type: constants["d" /* QUERY_DEFAULTS */].noteTypes,
5497
+ orderby: 'date',
5498
+ order: 'desc'
5499
+ }; // Disable eslint rule requiring `latestNote` to be defined below because the next two statements
5500
+ // depend on `getNotes` to have been called.
5501
+ // eslint-disable-next-line @wordpress/no-unused-vars-before-return
5502
 
5503
+ var latestNote = getNotes(notesQuery);
5504
+ var isError = Boolean(getNotesError(notesQuery));
5505
+ var isRequesting = isGetNotesRequesting(notesQuery);
 
 
 
 
5506
 
5507
+ if (isError || isRequesting) {
5508
+ return null;
5509
+ }
5510
 
5511
+ return latestNote[0] && new Date(latestNote[0].date_created_gmt + 'Z').getTime() > lastRead;
 
5512
  }
5513
+ function getUnreadOrders(select) {
5514
+ var _select3 = select('wc-api'),
5515
+ getItems = _select3.getItems,
5516
+ getItemsTotalCount = _select3.getItemsTotalCount,
5517
+ getItemsError = _select3.getItemsError,
5518
+ isGetItemsRequesting = _select3.isGetItemsRequesting;
5519
 
5520
+ var _select4 = select(external_this_wc_data_["SETTINGS_STORE_NAME"]),
5521
+ getMutableSetting = _select4.getSetting;
 
 
5522
 
5523
+ var _getMutableSetting = getMutableSetting('wc_admin', 'wcAdminSettings', {}),
5524
+ _getMutableSetting$wo = _getMutableSetting.woocommerce_actionable_order_statuses,
5525
+ orderStatuses = _getMutableSetting$wo === void 0 ? config["a" /* DEFAULT_ACTIONABLE_STATUSES */] : _getMutableSetting$wo;
 
 
 
 
 
 
 
 
 
5526
 
5527
+ if (!orderStatuses.length) {
5528
+ return false;
 
 
 
5529
  }
5530
 
5531
+ var ordersQuery = {
5532
+ page: 1,
5533
+ per_page: 1,
5534
+ // Core endpoint requires per_page > 0.
5535
+ status: orderStatuses,
5536
+ _fields: ['id']
5537
+ };
5538
+ getItems('orders', ordersQuery); // Disable eslint rule requiring `latestNote` to be defined below because the next two statements
5539
+ // depend on `getItemsTotalCount` to have been called.
5540
+ // eslint-disable-next-line @wordpress/no-unused-vars-before-return
5541
 
5542
+ var totalOrders = getItemsTotalCount('orders', ordersQuery);
5543
+ var isError = Boolean(getItemsError('orders', ordersQuery));
5544
+ var isRequesting = isGetItemsRequesting('orders', ordersQuery);
5545
 
5546
+ if (isError || isRequesting) {
5547
+ return null;
5548
  }
5549
 
5550
+ return totalOrders > 0;
5551
+ }
5552
+ function getUnapprovedReviews(select) {
5553
+ var _select5 = select('wc-api'),
5554
+ getReviewsTotalCount = _select5.getReviewsTotalCount,
5555
+ getReviewsError = _select5.getReviewsError,
5556
+ isGetReviewsRequesting = _select5.isGetReviewsRequesting;
5557
+
5558
+ var reviewsEnabled = Object(settings["g" /* getSetting */])('reviewsEnabled');
5559
+
5560
+ if (reviewsEnabled === 'yes') {
5561
+ var actionableReviewsQuery = {
5562
+ page: 1,
5563
+ // @todo we are not using this review, so when the endpoint supports it,
5564
+ // it could be replaced with `per_page: 0`
5565
+ per_page: 1,
5566
+ status: 'hold'
5567
+ };
5568
+ var totalActionableReviews = getReviewsTotalCount(actionableReviewsQuery);
5569
+ var isActionableReviewsError = Boolean(getReviewsError(actionableReviewsQuery));
5570
+ var isActionableReviewsRequesting = isGetReviewsRequesting(actionableReviewsQuery);
5571
 
5572
+ if (!isActionableReviewsError && !isActionableReviewsRequesting) {
5573
+ return totalActionableReviews > 0;
5574
+ }
5575
  }
5576
 
5577
+ return false;
5578
+ }
5579
+ function getUnreadStock() {
5580
+ return Object(settings["g" /* getSetting */])('hasLowStock', false);
5581
+ }
5582
+ // EXTERNAL MODULE: ./client/lib/tracks.js
5583
+ var tracks = __webpack_require__(63);
5584
 
5585
+ // EXTERNAL MODULE: ./client/wc-api/with-select.js
5586
+ var with_select = __webpack_require__(101);
 
 
 
 
 
5587
 
5588
+ // CONCATENATED MODULE: ./client/header/activity-panel/index.js
5589
 
 
 
 
 
5590
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5591
 
 
 
 
 
5592
 
 
 
 
 
 
5593
 
 
 
 
 
 
5594
 
5595
 
 
 
 
 
 
5596
 
5597
+ function activity_panel_createSuper(Derived) { var hasNativeReflectConstruct = activity_panel_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
 
 
5598
 
5599
+ function activity_panel_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
 
 
5600
 
5601
+ /**
5602
+ * External dependencies
5603
+ */
5604
 
 
 
 
 
 
 
 
 
 
5605
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5606
 
 
 
 
 
 
 
 
 
 
5607
 
 
 
 
 
 
 
 
5608
 
 
 
 
 
 
 
 
 
5609
 
 
 
 
 
5610
 
 
 
 
5611
 
 
 
 
5612
 
 
5613
 
5614
+ /**
5615
+ * Internal dependencies
5616
+ */
 
 
 
 
 
 
 
 
5617
 
 
 
 
 
5618
 
 
5619
 
 
 
 
 
5620
 
 
 
 
 
 
5621
 
 
 
 
5622
 
5623
+ var InboxPanel = Object(external_this_wp_element_["lazy"])(function () {
5624
+ return Promise.all(/* import() | activity-panels-inbox */[__webpack_require__.e(1), __webpack_require__.e(3), __webpack_require__.e(4), __webpack_require__.e(46), __webpack_require__.e(7)]).then(__webpack_require__.bind(null, 792));
5625
+ });
5626
+ var OrdersPanel = Object(external_this_wp_element_["lazy"])(function () {
5627
+ return Promise.all(/* import() | activity-panels-orders */[__webpack_require__.e(1), __webpack_require__.e(3), __webpack_require__.e(8)]).then(__webpack_require__.bind(null, 927));
5628
+ });
5629
+ var StockPanel = Object(external_this_wp_element_["lazy"])(function () {
5630
+ return Promise.all(/* import() | activity-panels-stock */[__webpack_require__.e(1), __webpack_require__.e(3), __webpack_require__.e(9)]).then(__webpack_require__.bind(null, 928));
5631
+ });
5632
+ var ReviewsPanel = Object(external_this_wp_element_["lazy"])(function () {
5633
+ return Promise.all(/* import() | activity-panels-inbox */[__webpack_require__.e(1), __webpack_require__.e(3), __webpack_require__.e(4), __webpack_require__.e(46), __webpack_require__.e(7)]).then(__webpack_require__.bind(null, 916));
5634
+ });
5635
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5636
 
5637
+ var manageStock = Object(settings["g" /* getSetting */])('manageStock', 'no');
5638
+ var activity_panel_reviewsEnabled = Object(settings["g" /* getSetting */])('reviewsEnabled', 'no');
 
 
 
 
5639
 
5640
+ var activity_panel_ActivityPanel = /*#__PURE__*/function (_Component) {
5641
+ inherits_default()(ActivityPanel, _Component);
5642
 
5643
+ var _super = activity_panel_createSuper(ActivityPanel);
 
 
 
5644
 
5645
+ function ActivityPanel() {
5646
+ var _this;
 
 
 
 
 
 
 
5647
 
5648
+ classCallCheck_default()(this, ActivityPanel);
 
5649
 
5650
+ _this = _super.apply(this, arguments);
5651
+ _this.togglePanel = _this.togglePanel.bind(assertThisInitialized_default()(_this));
5652
+ _this.clearPanel = _this.clearPanel.bind(assertThisInitialized_default()(_this));
5653
+ _this.toggleMobile = _this.toggleMobile.bind(assertThisInitialized_default()(_this));
5654
+ _this.renderTab = _this.renderTab.bind(assertThisInitialized_default()(_this));
5655
+ _this.state = {
5656
+ isPanelOpen: false,
5657
+ mobileOpen: false,
5658
+ currentTab: '',
5659
+ isPanelSwitching: false
5660
+ };
5661
+ return _this;
5662
  }
5663
 
5664
+ createClass_default()(ActivityPanel, [{
5665
+ key: "togglePanel",
5666
+ value: function togglePanel(tabName) {
5667
+ var _this$state = this.state,
5668
+ isPanelOpen = _this$state.isPanelOpen,
5669
+ currentTab = _this$state.currentTab; // If a panel is being opened, or if an existing panel is already open and a different one is being opened, record a track.
5670
 
5671
+ if (!isPanelOpen || tabName !== currentTab) {
5672
+ Object(tracks["b" /* recordEvent */])('activity_panel_open', {
5673
+ tab: tabName
5674
+ });
5675
+ }
5676
 
5677
+ this.setState(function (state) {
5678
+ if (tabName === state.currentTab || state.currentTab === '') {
5679
+ return {
5680
+ isPanelOpen: !state.isPanelOpen,
5681
+ currentTab: tabName,
5682
+ mobileOpen: !state.isPanelOpen
5683
+ };
5684
+ }
5685
 
5686
+ return {
5687
+ currentTab: tabName,
5688
+ isPanelSwitching: true
5689
+ };
5690
+ });
5691
+ }
5692
+ }, {
5693
+ key: "clearPanel",
5694
+ value: function clearPanel() {
5695
+ this.setState(function (_ref) {
5696
+ var isPanelOpen = _ref.isPanelOpen;
5697
+ return isPanelOpen ? {
5698
+ isPanelSwitching: false
5699
+ } : {
5700
+ currentTab: ''
5701
+ };
5702
+ });
5703
+ } // On smaller screen, the panel buttons are hidden behind a toggle.
5704
 
5705
+ }, {
5706
+ key: "toggleMobile",
5707
+ value: function toggleMobile() {
5708
+ var tabs = this.getTabs();
5709
+ this.setState(function (state) {
5710
+ return {
5711
+ mobileOpen: !state.mobileOpen,
5712
+ currentTab: state.mobileOpen ? '' : tabs[0].name,
5713
+ isPanelOpen: !state.mobileOpen
5714
+ };
5715
+ });
5716
+ }
5717
+ }, {
5718
+ key: "handleClickOutside",
5719
+ value: function handleClickOutside(event) {
5720
+ var _this$state2 = this.state,
5721
+ isPanelOpen = _this$state2.isPanelOpen,
5722
+ currentTab = _this$state2.currentTab;
5723
+ var isClickOnModalOrSnackbar = event.target.closest('.woocommerce-inbox-dismiss-confirmation_modal') || event.target.closest('.components-snackbar__action');
5724
+
5725
+ if (isPanelOpen && !isClickOnModalOrSnackbar) {
5726
+ this.togglePanel(currentTab);
5727
  }
5728
+ } // @todo Pull in dynamic unread status/count
5729
 
5730
+ }, {
5731
+ key: "getTabs",
5732
+ value: function getTabs() {
5733
+ var _this$props = this.props,
5734
+ hasUnreadNotes = _this$props.hasUnreadNotes,
5735
+ hasUnreadOrders = _this$props.hasUnreadOrders,
5736
+ hasUnapprovedReviews = _this$props.hasUnapprovedReviews,
5737
+ hasUnreadStock = _this$props.hasUnreadStock,
5738
+ isEmbedded = _this$props.isEmbedded; // Don't show the inbox on the Home screen.
5739
+
5740
+ var _getHistory = Object(external_this_wc_navigation_["getHistory"])(),
5741
+ location = _getHistory.location;
5742
+
5743
+ var showInbox = isEmbedded || !window.wcAdminFeatures.homescreen || location.pathname !== '/';
5744
+ return [showInbox ? {
5745
+ name: 'inbox',
5746
+ title: Object(external_this_wp_i18n_["__"])('Inbox', 'woocommerce-admin'),
5747
+ icon: Object(external_this_wp_element_["createElement"])("i", {
5748
+ className: "material-icons-outlined"
5749
+ }, "inbox"),
5750
+ unread: hasUnreadNotes
5751
+ } : null, {
5752
+ name: 'orders',
5753
+ title: Object(external_this_wp_i18n_["__"])('Orders', 'woocommerce-admin'),
5754
+ icon: Object(external_this_wp_element_["createElement"])(pages_default.a, null),
5755
+ unread: hasUnreadOrders
5756
+ }, manageStock === 'yes' ? {
5757
+ name: 'stock',
5758
+ title: Object(external_this_wp_i18n_["__"])('Stock', 'woocommerce-admin'),
5759
+ icon: Object(external_this_wp_element_["createElement"])("i", {
5760
+ className: "material-icons-outlined"
5761
+ }, "widgets"),
5762
+ unread: hasUnreadStock
5763
+ } : null, activity_panel_reviewsEnabled === 'yes' ? {
5764
+ name: 'reviews',
5765
+ title: Object(external_this_wp_i18n_["__"])('Reviews', 'woocommerce-admin'),
5766
+ icon: Object(external_this_wp_element_["createElement"])("i", {
5767
+ className: "material-icons-outlined"
5768
+ }, "star_border"),
5769
+ unread: hasUnapprovedReviews
5770
+ } : null].filter(Boolean);
5771
+ }
5772
+ }, {
5773
+ key: "getPanelContent",
5774
+ value: function getPanelContent(tab) {
5775
+ switch (tab) {
5776
+ case 'inbox':
5777
+ return Object(external_this_wp_element_["createElement"])(InboxPanel, null);
5778
+
5779
+ case 'orders':
5780
+ var hasUnreadOrders = this.props.hasUnreadOrders;
5781
+ return Object(external_this_wp_element_["createElement"])(OrdersPanel, {
5782
+ hasActionableOrders: hasUnreadOrders
5783
+ });
5784
 
5785
+ case 'stock':
5786
+ return Object(external_this_wp_element_["createElement"])(StockPanel, null);
5787
+
5788
+ case 'reviews':
5789
+ var hasUnapprovedReviews = this.props.hasUnapprovedReviews;
5790
+ return Object(external_this_wp_element_["createElement"])(ReviewsPanel, {
5791
+ hasUnapprovedReviews: hasUnapprovedReviews
5792
+ });
5793
+
5794
+ default:
5795
+ return null;
5796
+ }
5797
+ }
5798
+ }, {
5799
+ key: "renderPanel",
5800
+ value: function renderPanel() {
5801
+ var _this$state3 = this.state,
5802
+ isPanelOpen = _this$state3.isPanelOpen,
5803
+ currentTab = _this$state3.currentTab,
5804
+ isPanelSwitching = _this$state3.isPanelSwitching;
5805
+ var tab = Object(external_lodash_["find"])(this.getTabs(), {
5806
+ name: currentTab
5807
  });
 
 
5808
 
5809
+ if (!tab) {
5810
+ return Object(external_this_wp_element_["createElement"])("div", {
5811
+ className: "woocommerce-layout__activity-panel-wrapper"
 
 
 
 
 
 
 
5812
  });
 
 
 
 
5813
  }
 
 
5814
 
5815
+ var classNames = classnames_default()('woocommerce-layout__activity-panel-wrapper', {
5816
+ 'is-open': isPanelOpen,
5817
+ 'is-switching': isPanelSwitching
5818
+ });
5819
+ return Object(external_this_wp_element_["createElement"])("div", {
5820
+ className: classNames,
5821
+ tabIndex: 0,
5822
+ role: "tabpanel",
5823
+ "aria-label": tab.title,
5824
+ onTransitionEnd: this.clearPanel,
5825
+ onAnimationEnd: this.clearPanel
5826
+ }, Object(external_this_wp_element_["createElement"])("div", {
5827
+ className: "woocommerce-layout__activity-panel-content",
5828
+ key: 'activity-panel-' + currentTab,
5829
+ id: 'activity-panel-' + currentTab
5830
+ }, Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Suspense"], {
5831
+ fallback: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Spinner"], null)
5832
+ }, this.getPanelContent(currentTab))));
5833
+ }
5834
+ }, {
5835
+ key: "renderTab",
5836
+ value: function renderTab(tab, i) {
5837
+ var _this$state4 = this.state,
5838
+ currentTab = _this$state4.currentTab,
5839
+ isPanelOpen = _this$state4.isPanelOpen;
5840
+ var className = classnames_default()('woocommerce-layout__activity-panel-tab', {
5841
+ 'is-active': isPanelOpen && tab.name === currentTab,
5842
+ 'has-unread': tab.unread
5843
+ });
5844
+ var selected = tab.name === currentTab;
5845
+ var tabIndex = -1; // Only make this item tabbable if it is the currently selected item, or the panel is closed and the item is the first item.
5846
 
5847
+ if (selected || !isPanelOpen && i === 0) {
5848
+ tabIndex = null;
5849
+ }
 
5850
 
5851
+ return Object(external_this_wp_element_["createElement"])(build_module_button["a" /* default */], {
5852
+ role: "tab",
5853
+ className: className,
5854
+ tabIndex: tabIndex,
5855
+ "aria-selected": selected,
5856
+ "aria-controls": 'activity-panel-' + tab.name,
5857
+ key: 'activity-panel-tab-' + tab.name,
5858
+ id: 'activity-panel-tab-' + tab.name,
5859
+ onClick: Object(external_lodash_["partial"])(this.togglePanel, tab.name)
5860
+ }, tab.icon, tab.title, ' ', tab.unread && Object(external_this_wp_element_["createElement"])("span", {
5861
+ className: "screen-reader-text"
5862
+ }, Object(external_this_wp_i18n_["__"])('unread activity', 'woocommerce-admin')));
5863
  }
5864
+ }, {
5865
+ key: "render",
5866
+ value: function render() {
5867
+ var tabs = this.getTabs();
5868
+ var mobileOpen = this.state.mobileOpen;
5869
+ var headerId = Object(external_lodash_["uniqueId"])('activity-panel-header_');
5870
+ var panelClasses = classnames_default()('woocommerce-layout__activity-panel', {
5871
+ 'is-mobile-open': this.state.mobileOpen
5872
+ });
5873
+ var hasUnread = tabs.some(function (tab) {
5874
+ return tab.unread;
5875
+ });
5876
+ var viewLabel = hasUnread ? Object(external_this_wp_i18n_["__"])('View Activity Panel, you have unread activity', 'woocommerce-admin') : Object(external_this_wp_i18n_["__"])('View Activity Panel', 'woocommerce-admin');
5877
+ return Object(external_this_wp_element_["createElement"])("div", null, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["H"], {
5878
+ id: headerId,
5879
+ className: "screen-reader-text"
5880
+ }, Object(external_this_wp_i18n_["__"])('Store Activity', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Section"], {
5881
+ component: "aside",
5882
+ id: "woocommerce-activity-panel",
5883
+ "aria-labelledby": headerId
5884
+ }, Object(external_this_wp_element_["createElement"])(build_module_button["a" /* default */], {
5885
+ onClick: this.toggleMobile,
5886
+ label: mobileOpen ? Object(external_this_wp_i18n_["__"])('Close Activity Panel', 'woocommerce-admin') : viewLabel,
5887
+ "aria-expanded": mobileOpen,
5888
+ className: "woocommerce-layout__activity-panel-mobile-toggle"
5889
+ }, mobileOpen ? Object(external_this_wp_element_["createElement"])(cross_small_default.a, null) : Object(external_this_wp_element_["createElement"])(toggle_bubble, {
5890
+ hasUnread: hasUnread
5891
+ })), Object(external_this_wp_element_["createElement"])("div", {
5892
+ className: panelClasses
5893
+ }, Object(external_this_wp_element_["createElement"])(menu["a" /* default */], {
5894
+ role: "tablist",
5895
+ orientation: "horizontal",
5896
+ className: "woocommerce-layout__activity-panel-tabs"
5897
+ }, tabs && tabs.map(this.renderTab)), this.renderPanel())));
5898
+ }
5899
+ }]);
5900
 
5901
+ return ActivityPanel;
5902
+ }(external_this_wp_element_["Component"]);
 
 
 
 
5903
 
5904
+ /* harmony default export */ var activity_panel = (Object(compose["a" /* default */])(Object(with_select["a" /* default */])(function (select) {
5905
+ var hasUnreadNotes = getUnreadNotes(select);
5906
+ var hasUnreadOrders = getUnreadOrders(select);
5907
+ var hasUnreadStock = getUnreadStock();
5908
+ var hasUnapprovedReviews = getUnapprovedReviews(select);
5909
+ return {
5910
+ hasUnreadNotes: hasUnreadNotes,
5911
+ hasUnreadOrders: hasUnreadOrders,
5912
+ hasUnreadStock: hasUnreadStock,
5913
+ hasUnapprovedReviews: hasUnapprovedReviews
 
 
 
 
 
5914
  };
5915
+ }), dist_default.a)(activity_panel_ActivityPanel));
5916
+ // CONCATENATED MODULE: ./client/header/index.js
5917
 
5918
 
5919
 
5920
 
 
 
 
5921
 
 
5922
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5923
 
5924
 
5925
+ function header_createSuper(Derived) { var hasNativeReflectConstruct = header_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
 
 
5926
 
5927
+ function header_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
 
 
 
 
5928
 
5929
+ /**
5930
+ * External dependencies
5931
+ */
5932
 
 
5933
 
 
 
 
5934
 
 
 
 
 
 
 
5935
 
 
 
5936
 
5937
+ /**
5938
+ * WooCommerce dependencies
5939
+ */
5940
 
 
 
 
 
 
 
5941
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5942
 
 
 
 
 
 
 
 
 
 
 
 
5943
 
5944
+ /**
5945
+ * Internal dependencies
5946
+ */
 
 
5947
 
 
 
 
 
 
 
5948
 
 
5949
 
5950
 
 
 
 
 
5951
 
5952
+ var header_Header = /*#__PURE__*/function (_Component) {
5953
+ inherits_default()(Header, _Component);
5954
 
5955
+ var _super = header_createSuper(Header);
 
 
 
 
5956
 
5957
+ function Header() {
5958
+ var _this;
5959
 
5960
+ classCallCheck_default()(this, Header);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5961
 
5962
+ _this = _super.call(this);
5963
+ _this.state = {
5964
+ isScrolled: false
5965
+ };
5966
+ _this.headerRef = Object(external_this_wp_element_["createRef"])();
5967
+ _this.onWindowScroll = _this.onWindowScroll.bind(assertThisInitialized_default()(_this));
5968
+ _this.updateIsScrolled = _this.updateIsScrolled.bind(assertThisInitialized_default()(_this));
5969
+ _this.trackLinkClick = _this.trackLinkClick.bind(assertThisInitialized_default()(_this));
5970
+ _this.updateDocumentTitle = _this.updateDocumentTitle.bind(assertThisInitialized_default()(_this));
5971
+ return _this;
5972
+ }
 
 
 
 
 
5973
 
5974
+ createClass_default()(Header, [{
5975
+ key: "componentDidMount",
5976
+ value: function componentDidMount() {
5977
+ this.threshold = this.headerRef.current.offsetTop;
5978
+ window.addEventListener('scroll', this.onWindowScroll);
5979
+ this.updateIsScrolled();
5980
+ }
5981
+ }, {
5982
+ key: "componentWillUnmount",
5983
+ value: function componentWillUnmount() {
5984
+ window.removeEventListener('scroll', this.onWindowScroll);
5985
+ window.cancelAnimationFrame(this.handle);
5986
+ }
5987
+ }, {
5988
+ key: "onWindowScroll",
5989
+ value: function onWindowScroll() {
5990
+ this.handle = window.requestAnimationFrame(this.updateIsScrolled);
5991
+ }
5992
+ }, {
5993
+ key: "updateIsScrolled",
5994
+ value: function updateIsScrolled() {
5995
+ var isScrolled = window.pageYOffset > this.threshold - 20;
5996
 
5997
+ if (isScrolled !== this.state.isScrolled) {
5998
+ this.setState({
5999
+ isScrolled: isScrolled
6000
+ });
6001
+ }
6002
+ }
6003
+ }, {
6004
+ key: "trackLinkClick",
6005
+ value: function trackLinkClick(event) {
6006
+ var href = event.target.closest('a').getAttribute('href');
6007
+ Object(tracks["b" /* recordEvent */])('navbar_breadcrumb_click', {
6008
+ href: href,
6009
+ text: event.target.innerText
6010
+ });
6011
+ }
6012
+ }, {
6013
+ key: "updateDocumentTitle",
6014
+ value: function updateDocumentTitle() {
6015
+ var _this$props = this.props,
6016
+ sections = _this$props.sections,
6017
+ isEmbedded = _this$props.isEmbedded; // Don't modify the document title on existing WooCommerce pages.
6018
 
6019
+ if (isEmbedded) {
6020
+ return;
6021
+ }
6022
 
6023
+ var _sections = Array.isArray(sections) ? sections : [sections];
 
 
 
 
 
 
6024
 
6025
+ var documentTitle = _sections.map(function (section) {
6026
+ return Array.isArray(section) ? section[1] : section;
6027
+ }).reverse().join(' &lsaquo; ');
6028
 
6029
+ document.title = Object(external_this_wp_htmlEntities_["decodeEntities"])(Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('%1$s &lsaquo; %2$s &#8212; WooCommerce', 'woocommerce-admin'), documentTitle, Object(settings["g" /* getSetting */])('siteTitle', '')));
6030
+ }
6031
+ }, {
6032
+ key: "render",
6033
+ value: function render() {
6034
+ var _this2 = this;
6035
 
6036
+ var _this$props2 = this.props,
6037
+ sections = _this$props2.sections,
6038
+ isEmbedded = _this$props2.isEmbedded;
6039
+ var isScrolled = this.state.isScrolled;
6040
 
6041
+ var _sections = Array.isArray(sections) ? sections : [sections];
6042
 
6043
+ this.updateDocumentTitle();
6044
+ var className = classnames_default()('woocommerce-layout__header', {
6045
+ 'is-scrolled': isScrolled
6046
+ });
6047
+ return Object(external_this_wp_element_["createElement"])("div", {
6048
+ className: className,
6049
+ ref: this.headerRef
6050
+ }, Object(external_this_wp_element_["createElement"])("h1", {
6051
+ className: "woocommerce-layout__header-breadcrumbs"
6052
+ }, _sections.map(function (section, i) {
6053
+ var sectionPiece = Array.isArray(section) ? Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
6054
+ href: isEmbedded ? Object(settings["f" /* getAdminLink */])(section[0]) : Object(external_this_wc_navigation_["getNewPath"])({}, section[0], {}),
6055
+ type: isEmbedded ? 'wp-admin' : 'wc-admin',
6056
+ onClick: _this2.trackLinkClick
6057
+ }, section[1]) : section;
6058
+ return Object(external_this_wp_element_["createElement"])("span", {
6059
+ key: i
6060
+ }, Object(external_this_wp_htmlEntities_["decodeEntities"])(sectionPiece));
6061
+ })), window.wcAdminFeatures['activity-panels'] && Object(external_this_wp_element_["createElement"])(activity_panel, {
6062
+ isEmbedded: isEmbedded
6063
+ }));
6064
+ }
6065
+ }]);
6066
 
6067
+ return Header;
6068
+ }(external_this_wp_element_["Component"]);
6069
 
6070
+ header_Header.propTypes = {
6071
+ sections: prop_types_default.a.node.isRequired,
6072
+ isEmbedded: prop_types_default.a.bool
 
 
 
6073
  };
6074
+ header_Header.defaultProps = {
6075
+ isEmbedded: false
 
 
 
 
 
 
 
 
 
 
6076
  };
6077
+ /* harmony default export */ var header = (header_Header);
6078
+ // CONCATENATED MODULE: ./client/layout/notices.js
6079
 
6080
 
 
 
 
 
 
6081
 
 
 
 
 
 
6082
 
6083
 
 
 
 
6084
 
 
 
 
 
 
 
6085
 
6086
+ function notices_createSuper(Derived) { var hasNativeReflectConstruct = notices_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
6087
 
6088
+ function notices_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
 
 
6089
 
 
6090
  /**
6091
+ * External dependencies
 
 
 
6092
  */
6093
 
6094
 
6095
+ var notices_Notices = /*#__PURE__*/function (_Component) {
6096
+ inherits_default()(Notices, _Component);
6097
 
6098
+ var _super = notices_createSuper(Notices);
6099
 
6100
+ function Notices() {
6101
+ classCallCheck_default()(this, Notices);
 
6102
 
6103
+ return _super.apply(this, arguments);
6104
+ }
6105
+
6106
+ createClass_default()(Notices, [{
6107
+ key: "render",
6108
+ value: function render() {
6109
+ return Object(external_this_wp_element_["createElement"])("div", {
6110
+ id: "woocommerce-layout__notice-list",
6111
+ className: "woocommerce-layout__notice-list"
6112
+ });
6113
  }
6114
+ }]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6115
 
6116
+ return Notices;
6117
+ }(external_this_wp_element_["Component"]);
 
 
 
 
 
 
 
 
 
6118
 
6119
+ /* harmony default export */ var layout_notices = (notices_Notices);
6120
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
6121
+ var regenerator = __webpack_require__(76);
6122
+ var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
6123
 
6124
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
6125
+ var asyncToGenerator = __webpack_require__(67);
6126
 
6127
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules
6128
+ var slicedToArray = __webpack_require__(19);
6129
 
6130
+ // EXTERNAL MODULE: ./node_modules/react-spring/web.cjs.js
6131
+ var web_cjs = __webpack_require__(257);
6132
 
6133
+ // EXTERNAL MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-reduced-motion/index.js
6134
+ var use_reduced_motion = __webpack_require__(749);
 
6135
 
6136
+ // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/snackbar/index.js
6137
+ var snackbar = __webpack_require__(409);
 
 
 
 
 
6138
 
6139
+ // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/snackbar/list.js
6140
 
6141
 
 
6142
 
 
6143
 
6144
 
 
 
 
 
 
 
 
6145
 
6146
+ /**
6147
+ * External dependencies
6148
+ */
6149
 
 
 
 
 
 
 
 
6150
 
 
 
6151
 
6152
+ /**
6153
+ * WordPress dependencies
6154
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6155
 
6156
 
 
 
 
 
 
6157
 
6158
+ /**
6159
+ * Internal dependencies
6160
+ */
 
 
 
 
 
 
 
 
 
 
6161
 
 
 
6162
 
6163
+ /**
6164
+ * Renders a list of notices.
6165
+ *
6166
+ * @param {Object} $0 Props passed to the component.
6167
+ * @param {Array} $0.notices Array of notices to render.
6168
+ * @param {Function} $0.onRemove Function called when a notice should be removed / dismissed.
6169
+ * @param {Object} $0.className Name of the class used by the component.
6170
+ * @param {Object} $0.children Array of children to be rendered inside the notice list.
6171
+ * @return {Object} The rendered notices list.
6172
+ */
6173
 
6174
+ function SnackbarList(_ref) {
6175
+ var notices = _ref.notices,
6176
+ className = _ref.className,
6177
+ children = _ref.children,
6178
+ _ref$onRemove = _ref.onRemove,
6179
+ onRemove = _ref$onRemove === void 0 ? external_lodash_["noop"] : _ref$onRemove;
6180
+ var isReducedMotion = Object(use_reduced_motion["a" /* default */])();
6181
 
6182
+ var _useState = Object(external_this_wp_element_["useState"])(function () {
6183
+ return new WeakMap();
6184
+ }),
6185
+ _useState2 = Object(slicedToArray["a" /* default */])(_useState, 1),
6186
+ refMap = _useState2[0];
6187
 
6188
+ var transitions = Object(web_cjs["useTransition"])(notices, function (notice) {
6189
+ return notice.id;
6190
+ }, {
6191
+ from: {
6192
+ opacity: 0,
6193
+ height: 0
6194
+ },
6195
+ enter: function enter(item) {
6196
+ return /*#__PURE__*/function () {
6197
+ var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee(next) {
6198
+ return regenerator_default.a.wrap(function _callee$(_context) {
6199
+ while (1) {
6200
+ switch (_context.prev = _context.next) {
6201
+ case 0:
6202
+ _context.next = 2;
6203
+ return next({
6204
+ opacity: 1,
6205
+ height: refMap.get(item).offsetHeight
6206
+ });
6207
 
6208
+ case 2:
6209
+ return _context.abrupt("return", _context.sent);
 
 
 
 
 
6210
 
6211
+ case 3:
6212
+ case "end":
6213
+ return _context.stop();
6214
+ }
6215
+ }
6216
+ }, _callee);
6217
+ }));
6218
 
6219
+ return function (_x) {
6220
+ return _ref2.apply(this, arguments);
6221
+ };
6222
+ }();
6223
+ },
6224
+ leave: function leave() {
6225
+ return /*#__PURE__*/function () {
6226
+ var _ref3 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee2(next) {
6227
+ return regenerator_default.a.wrap(function _callee2$(_context2) {
6228
+ while (1) {
6229
+ switch (_context2.prev = _context2.next) {
6230
+ case 0:
6231
+ _context2.next = 2;
6232
+ return next({
6233
+ opacity: 0
6234
+ });
6235
 
6236
+ case 2:
6237
+ _context2.next = 4;
6238
+ return next({
6239
+ height: 0
6240
+ });
6241
 
6242
+ case 4:
6243
+ case "end":
6244
+ return _context2.stop();
6245
+ }
6246
+ }
6247
+ }, _callee2);
6248
+ }));
6249
 
6250
+ return function (_x2) {
6251
+ return _ref3.apply(this, arguments);
6252
+ };
6253
+ }();
 
 
 
6254
  },
6255
+ immediate: isReducedMotion
6256
+ });
6257
+ className = classnames_default()('components-snackbar-list', className);
 
6258
 
6259
+ var removeNotice = function removeNotice(notice) {
6260
+ return function () {
6261
+ return onRemove(notice.id);
6262
+ };
6263
+ };
6264
 
6265
+ return Object(external_this_wp_element_["createElement"])("div", {
6266
+ className: className
6267
+ }, children, transitions.map(function (_ref4) {
6268
+ var notice = _ref4.item,
6269
+ key = _ref4.key,
6270
+ style = _ref4.props;
6271
+ return Object(external_this_wp_element_["createElement"])(web_cjs["animated"].div, {
6272
+ key: key,
6273
+ style: style
6274
+ }, Object(external_this_wp_element_["createElement"])("div", {
6275
+ className: "components-snackbar-list__notice-container",
6276
+ ref: function ref(_ref5) {
6277
+ return _ref5 && refMap.set(notice, _ref5);
6278
+ }
6279
+ }, Object(external_this_wp_element_["createElement"])(snackbar["a" /* default */], Object(esm_extends["a" /* default */])({}, Object(external_lodash_["omit"])(notice, ['content']), {
6280
+ onRemove: removeNotice(notice)
6281
+ }), notice.content)));
6282
+ }));
6283
+ }
6284
 
6285
+ /* harmony default export */ var list = (SnackbarList);
6286
+ //# sourceMappingURL=list.js.map
6287
+ // EXTERNAL MODULE: ./client/layout/transient-notices/style.scss
6288
+ var transient_notices_style = __webpack_require__(443);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6289
 
6290
+ // CONCATENATED MODULE: ./client/layout/transient-notices/index.js
 
 
 
 
 
 
6291
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6292
 
 
 
 
 
6293
 
 
 
6294
 
 
 
 
 
 
 
 
6295
 
 
6296
 
 
 
 
6297
 
6298
+ function transient_notices_createSuper(Derived) { var hasNativeReflectConstruct = transient_notices_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
 
 
 
 
 
 
 
 
 
6299
 
6300
+ function transient_notices_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
 
 
6301
 
6302
+ /**
6303
+ * External dependencies
6304
+ */
6305
 
 
 
 
6306
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6307
 
 
 
6308
 
 
 
 
 
6309
 
 
 
 
6310
 
6311
+ /**
6312
+ * Internal dependencies
6313
+ */
 
6314
 
 
 
 
 
 
 
 
 
6315
 
 
 
 
 
6316
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6317
 
6318
+ var transient_notices_TransientNotices = /*#__PURE__*/function (_Component) {
6319
+ inherits_default()(TransientNotices, _Component);
 
6320
 
6321
+ var _super = transient_notices_createSuper(TransientNotices);
 
6322
 
6323
+ function TransientNotices() {
6324
+ classCallCheck_default()(this, TransientNotices);
 
 
 
 
 
6325
 
6326
+ return _super.apply(this, arguments);
6327
+ }
6328
 
6329
+ createClass_default()(TransientNotices, [{
6330
+ key: "render",
6331
+ value: function render() {
6332
+ var _this$props = this.props,
6333
+ className = _this$props.className,
6334
+ notices = _this$props.notices,
6335
+ onRemove = _this$props.onRemove;
6336
+ var classes = classnames_default()('woocommerce-transient-notices', 'components-notices__snackbar', className);
6337
+ return Object(external_this_wp_element_["createElement"])(list, {
6338
+ notices: notices,
6339
+ className: classes,
6340
+ onRemove: onRemove
6341
+ });
6342
  }
6343
+ }]);
6344
 
6345
+ return TransientNotices;
6346
+ }(external_this_wp_element_["Component"]);
 
 
 
 
 
 
6347
 
6348
+ transient_notices_TransientNotices.propTypes = {
6349
+ /**
6350
+ * Additional class name to style the component.
6351
+ */
6352
+ className: prop_types_default.a.string,
6353
 
6354
+ /**
6355
+ * Array of notices to be displayed.
6356
+ */
6357
+ notices: prop_types_default.a.array
6358
+ };
6359
+ /* harmony default export */ var transient_notices = (Object(compose["a" /* default */])(Object(with_select["a" /* default */])(function (select) {
6360
+ var notices = select('core/notices').getNotices();
6361
+ return {
6362
+ notices: notices
6363
+ };
6364
+ }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
6365
+ return {
6366
+ onRemove: dispatch('core/notices').removeNotice
6367
+ };
6368
+ }))(transient_notices_TransientNotices));
6369
+ // EXTERNAL MODULE: ./client/analytics/report/index.js
6370
+ var analytics_report = __webpack_require__(197);
6371
 
6372
+ // CONCATENATED MODULE: ./client/layout/index.js
 
 
6373
 
 
 
6374
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6375
 
6376
 
 
 
 
6377
 
 
6378
 
6379
 
 
6380
 
 
 
6381
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6382
 
6383
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
 
 
 
 
6384
 
6385
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
 
 
 
6386
 
6387
+ function layout_createSuper(Derived) { var hasNativeReflectConstruct = layout_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
 
6388
 
6389
+ function layout_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
 
 
 
 
 
6390
 
6391
+ /**
6392
+ * External dependencies
6393
+ */
6394
 
 
 
 
 
 
 
 
6395
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6396
 
 
 
 
 
 
6397
 
 
 
6398
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6399
 
6400
+ /**
6401
+ * WooCommerce dependencies
6402
+ */
6403
 
 
 
 
6404
 
 
 
 
 
 
 
6405
 
 
 
6406
 
 
 
6407
 
6408
+ /**
6409
+ * Internal dependencies
6410
+ */
6411
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6412
 
 
 
6413
 
 
 
6414
 
 
 
 
 
6415
 
 
 
6416
 
 
6417
 
6418
+ var StoreAlerts = Object(external_this_wp_element_["lazy"])(function () {
6419
+ return Promise.all(/* import() | store-alerts */[__webpack_require__.e(4), __webpack_require__.e(43)]).then(__webpack_require__.bind(null, 926));
6420
+ });
6421
 
6422
+ var layout_PrimaryLayout = /*#__PURE__*/function (_Component) {
6423
+ inherits_default()(PrimaryLayout, _Component);
6424
 
6425
+ var _super = layout_createSuper(PrimaryLayout);
 
6426
 
6427
+ function PrimaryLayout() {
6428
+ classCallCheck_default()(this, PrimaryLayout);
6429
 
6430
+ return _super.apply(this, arguments);
6431
+ }
 
 
 
 
 
 
6432
 
6433
+ createClass_default()(PrimaryLayout, [{
6434
+ key: "render",
6435
+ value: function render() {
6436
+ var children = this.props.children;
6437
+ return Object(external_this_wp_element_["createElement"])("div", {
6438
+ className: "woocommerce-layout__primary",
6439
+ id: "woocommerce-layout__primary"
6440
+ }, window.wcAdminFeatures['store-alerts'] && Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Suspense"], {
6441
+ fallback: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Spinner"], null)
6442
+ }, Object(external_this_wp_element_["createElement"])(StoreAlerts, null)), Object(external_this_wp_element_["createElement"])(layout_notices, null), children);
6443
  }
6444
+ }]);
6445
 
6446
+ return PrimaryLayout;
6447
+ }(external_this_wp_element_["Component"]);
6448
 
6449
+ var layout_Layout = /*#__PURE__*/function (_Component2) {
6450
+ inherits_default()(_Layout, _Component2);
 
 
 
 
 
 
 
 
6451
 
6452
+ var _super2 = layout_createSuper(_Layout);
6453
 
6454
+ function _Layout() {
6455
+ classCallCheck_default()(this, _Layout);
 
6456
 
6457
+ return _super2.apply(this, arguments);
6458
+ }
6459
 
6460
+ createClass_default()(_Layout, [{
6461
+ key: "componentDidMount",
6462
+ value: function componentDidMount() {
6463
+ this.recordPageViewTrack();
6464
  }
6465
+ }, {
6466
+ key: "componentDidUpdate",
6467
+ value: function componentDidUpdate(prevProps) {
6468
+ var previousPath = Object(external_lodash_["get"])(prevProps, 'location.pathname');
6469
+ var currentPath = Object(external_lodash_["get"])(this.props, 'location.pathname');
6470
 
6471
+ if (!previousPath || !currentPath) {
6472
+ return;
6473
+ }
6474
 
6475
+ if (previousPath !== currentPath) {
6476
+ this.recordPageViewTrack();
6477
+ }
6478
  }
6479
+ }, {
6480
+ key: "recordPageViewTrack",
6481
+ value: function recordPageViewTrack() {
6482
+ var _this$props = this.props,
6483
+ activePlugins = _this$props.activePlugins,
6484
+ installedPlugins = _this$props.installedPlugins,
6485
+ isEmbedded = _this$props.isEmbedded,
6486
+ isJetpackConnected = _this$props.isJetpackConnected;
 
 
 
 
 
 
 
 
 
 
 
 
 
6487
 
6488
+ if (isEmbedded) {
6489
+ var _path = document.location.pathname + document.location.search;
6490
 
6491
+ Object(tracks["c" /* recordPageView */])(_path, {
6492
+ is_embedded: true
6493
+ });
6494
+ return;
6495
+ }
6496
 
6497
+ var pathname = Object(external_lodash_["get"])(this.props, 'location.pathname');
 
6498
 
6499
+ if (!pathname) {
6500
+ return;
6501
+ } // Remove leading slash, and camel case remaining pathname
6502
 
6503
+
6504
+ var path = pathname.substring(1).replace(/\//g, '_'); // When pathname is `/` we are on the dashboard
6505
+
6506
+ if (path.length === 0) {
6507
+ path = window.wcAdminFeatures.homescreen ? 'home_screen' : 'dashboard';
6508
+ }
6509
+
6510
+ Object(tracks["c" /* recordPageView */])(path, {
6511
+ jetpack_installed: installedPlugins.includes('jetpack'),
6512
+ jetpack_active: activePlugins.includes('jetpack'),
6513
+ jetpack_connected: isJetpackConnected
6514
+ });
6515
+ }
6516
+ }, {
6517
+ key: "render",
6518
+ value: function render() {
6519
+ var _this$props2 = this.props,
6520
+ isEmbedded = _this$props2.isEmbedded,
6521
+ restProps = objectWithoutProperties_default()(_this$props2, ["isEmbedded"]);
6522
+
6523
+ var breadcrumbs = this.props.page.breadcrumbs;
6524
+ return Object(external_this_wp_element_["createElement"])("div", {
6525
+ className: "woocommerce-layout"
6526
+ }, Object(external_this_wp_element_["createElement"])(header, {
6527
+ sections: Object(external_lodash_["isFunction"])(breadcrumbs) ? breadcrumbs(this.props) : breadcrumbs,
6528
+ isEmbedded: isEmbedded
6529
+ }), Object(external_this_wp_element_["createElement"])(transient_notices, null), !isEmbedded && Object(external_this_wp_element_["createElement"])(layout_PrimaryLayout, null, Object(external_this_wp_element_["createElement"])("div", {
6530
+ className: "woocommerce-layout__main"
6531
+ }, Object(external_this_wp_element_["createElement"])(controller_Controller, restProps))));
6532
  }
6533
+ }]);
6534
 
6535
+ return _Layout;
6536
+ }(external_this_wp_element_["Component"]);
6537
 
6538
+ layout_Layout.propTypes = {
6539
+ isEmbedded: prop_types_default.a.bool,
6540
+ page: prop_types_default.a.shape({
6541
+ container: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.object // Support React.lazy
6542
+ ]),
6543
+ path: prop_types_default.a.string,
6544
+ breadcrumbs: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.arrayOf(prop_types_default.a.oneOfType([prop_types_default.a.arrayOf(prop_types_default.a.string), prop_types_default.a.string]))]).isRequired,
6545
+ wpOpenMenu: prop_types_default.a.string
6546
+ }).isRequired
6547
+ };
6548
+ var Layout = Object(compose["a" /* default */])(Object(external_this_wc_data_["withPluginsHydration"])(_objectSpread(_objectSpread({}, window.wcSettings.plugins || {}), {}, {
6549
+ jetpackStatus: window.wcSettings.dataEndpoints && window.wcSettings.dataEndpoints.jetpackStatus || false
6550
+ })), Object(external_this_wp_data_["withSelect"])(function (select, _ref) {
6551
+ var isEmbedded = _ref.isEmbedded;
6552
 
6553
+ // Embedded pages don't send plugin info to Tracks.
6554
+ if (isEmbedded) {
6555
+ return;
6556
+ }
6557
 
6558
+ var _select = select(external_this_wc_data_["PLUGINS_STORE_NAME"]),
6559
+ getActivePlugins = _select.getActivePlugins,
6560
+ getInstalledPlugins = _select.getInstalledPlugins,
6561
+ isJetpackConnected = _select.isJetpackConnected;
6562
 
6563
+ return {
6564
+ activePlugins: getActivePlugins(),
6565
+ isJetpackConnected: isJetpackConnected(),
6566
+ installedPlugins: getInstalledPlugins()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6567
  };
6568
+ }))(layout_Layout);
6569
 
6570
+ var layout_PageLayout = /*#__PURE__*/function (_Component3) {
6571
+ inherits_default()(_PageLayout, _Component3);
 
 
 
 
6572
 
6573
+ var _super3 = layout_createSuper(_PageLayout);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6574
 
6575
+ function _PageLayout() {
6576
+ classCallCheck_default()(this, _PageLayout);
6577
+
6578
+ return _super3.apply(this, arguments);
6579
+ }
 
 
 
 
 
6580
 
6581
+ createClass_default()(_PageLayout, [{
6582
+ key: "render",
6583
+ value: function render() {
6584
+ return Object(external_this_wp_element_["createElement"])(react_router_Router, {
6585
+ history: Object(external_this_wc_navigation_["getHistory"])()
6586
+ }, Object(external_this_wp_element_["createElement"])(react_router_Switch, null, controller_getPages().map(function (page) {
6587
+ return Object(external_this_wp_element_["createElement"])(react_router_Route, {
6588
+ key: page.path,
6589
+ path: page.path,
6590
+ exact: true,
6591
+ render: function render(props) {
6592
+ return Object(external_this_wp_element_["createElement"])(Layout, extends_default()({
6593
+ page: page
6594
+ }, props));
6595
+ }
6596
+ });
6597
+ })));
6598
  }
6599
+ }]);
6600
 
6601
+ return _PageLayout;
6602
+ }(external_this_wp_element_["Component"]);
6603
 
6604
+ var PageLayout = Object(compose["a" /* default */])( // Use the useFilters HoC so PageLayout is re-rendered when filters are used to add new pages or reports
6605
+ Object(external_this_wc_components_["useFilters"])([PAGES_FILTER, analytics_report["REPORTS_FILTER"]]), window.wcSettings.preloadOptions ? Object(external_this_wc_data_["withOptionsHydration"])(_objectSpread({}, window.wcSettings.preloadOptions)) : external_lodash_["identity"])(layout_PageLayout);
6606
+ var layout_EmbedLayout = /*#__PURE__*/function (_Component4) {
6607
+ inherits_default()(EmbedLayout, _Component4);
6608
 
6609
+ var _super4 = layout_createSuper(EmbedLayout);
 
6610
 
6611
+ function EmbedLayout() {
6612
+ classCallCheck_default()(this, EmbedLayout);
6613
 
6614
+ return _super4.apply(this, arguments);
6615
+ }
6616
 
6617
+ createClass_default()(EmbedLayout, [{
6618
+ key: "render",
6619
+ value: function render() {
6620
+ return Object(external_this_wp_element_["createElement"])(Layout, {
6621
+ page: {
6622
+ breadcrumbs: Object(settings["g" /* getSetting */])('embedBreadcrumbs', [])
6623
+ },
6624
+ isEmbedded: true
6625
+ });
6626
+ }
6627
+ }]);
6628
 
6629
+ return EmbedLayout;
6630
+ }(external_this_wp_element_["Component"]);
6631
 
6632
  /***/ }),
 
 
 
6633
 
6634
+ /***/ 2:
6635
+ /***/ (function(module, exports) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6636
 
6637
+ (function() { module.exports = this["lodash"]; }());
6638
 
6639
+ /***/ }),
6640
 
6641
+ /***/ 200:
6642
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
6643
 
6644
+ "use strict";
6645
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getFilteredCurrencyInstance; });
6646
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CurrencyContext; });
6647
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
6648
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
6649
+ /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48);
6650
+ /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);
6651
+ /* harmony import */ var _woocommerce_currency__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(111);
6652
+ /* harmony import */ var _woocommerce_currency__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_currency__WEBPACK_IMPORTED_MODULE_2__);
6653
+ /* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23);
6654
+ /**
6655
+ * External dependencies
6656
+ */
6657
 
6658
 
6659
+ /**
6660
+ * WooCommerce dependencies
6661
+ */
6662
 
6663
 
6664
+ /**
6665
+ * Internal dependencies
6666
+ */
6667
 
6668
 
6669
+ var appCurrency = _woocommerce_currency__WEBPACK_IMPORTED_MODULE_2___default()(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_3__[/* CURRENCY */ "b"]);
6670
+ var getFilteredCurrencyInstance = function getFilteredCurrencyInstance(query) {
6671
+ var config = appCurrency.getCurrency();
6672
+ var filteredConfig = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__["applyFilters"])('woocommerce_admin_report_currency', config, query);
6673
+ return _woocommerce_currency__WEBPACK_IMPORTED_MODULE_2___default()(filteredConfig);
6674
+ };
6675
+ var CurrencyContext = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createContext"])(appCurrency // default value
6676
+ );
6677
 
6678
+ /***/ }),
6679
 
6680
+ /***/ 201:
6681
+ /***/ (function(module, exports) {
6682
 
6683
+ (function() { module.exports = this["wc"]["number"]; }());
6684
 
6685
+ /***/ }),
6686
 
6687
+ /***/ 208:
6688
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
6689
 
6690
+ "use strict";
6691
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
6692
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
6693
+ /* harmony import */ var _use_media_query__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88);
6694
+ /**
6695
+ * WordPress dependencies
6696
+ */
6697
 
6698
  /**
6699
+ * Internal dependencies
6700
  */
6701
 
6702
 
6703
+ /**
6704
+ * @typedef {"huge"|"wide"|"large"|"medium"|"small"|"mobile"} WPBreakpoint
6705
+ */
6706
 
6707
  /**
6708
+ * Hash of breakpoint names with pixel width at which it becomes effective.
6709
  *
6710
+ * @see _breakpoints.scss
6711
+ *
6712
+ * @type {Object<WPBreakpoint,number>}
6713
  */
6714
 
6715
+ var BREAKPOINTS = {
6716
+ huge: 1440,
6717
+ wide: 1280,
6718
+ large: 960,
6719
+ medium: 782,
6720
+ small: 600,
6721
+ mobile: 480
6722
+ };
6723
+ /**
6724
+ * @typedef {">="|"<"} WPViewportOperator
6725
+ */
 
 
 
 
 
6726
 
 
 
6727
  /**
6728
+ * Object mapping media query operators to the condition to be used.
6729
  *
6730
+ * @type {Object<WPViewportOperator,string>}
 
 
 
6731
  */
6732
 
6733
+ var CONDITIONS = {
6734
+ '>=': 'min-width',
6735
+ '<': 'max-width'
6736
+ };
 
 
 
 
 
6737
  /**
6738
+ * Object mapping media query operators to a function that given a breakpointValue and a width evaluates if the operator matches the values.
6739
  *
6740
+ * @type {Object<WPViewportOperator,Function>}
 
 
6741
  */
6742
 
6743
+ var OPERATOR_EVALUATORS = {
6744
+ '>=': function _(breakpointValue, width) {
6745
+ return width >= breakpointValue;
6746
+ },
6747
+ '<': function _(breakpointValue, width) {
6748
+ return width < breakpointValue;
6749
+ }
6750
+ };
6751
+ var ViewportMatchWidthContext = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createContext"])(null);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6752
  /**
6753
+ * Returns true if the viewport matches the given query, or false otherwise.
6754
+ *
6755
+ * @param {WPBreakpoint} breakpoint Breakpoint size name.
6756
+ * @param {WPViewportOperator} [operator=">="] Viewport operator.
6757
+ *
6758
+ * @example
6759
  *
6760
+ * ```js
6761
+ * useViewportMatch( 'huge', '<' );
6762
+ * useViewportMatch( 'medium' );
6763
+ * ```
6764
+ *
6765
+ * @return {boolean} Whether viewport matches query.
6766
  */
6767
 
6768
+ var useViewportMatch = function useViewportMatch(breakpoint) {
6769
+ var operator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '>=';
6770
+ var simulatedWidth = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["useContext"])(ViewportMatchWidthContext);
6771
+ var mediaQuery = !simulatedWidth && "(".concat(CONDITIONS[operator], ": ").concat(BREAKPOINTS[breakpoint], "px)");
6772
+ var mediaQueryResult = Object(_use_media_query__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(mediaQuery);
 
6773
 
6774
+ if (simulatedWidth) {
6775
+ return OPERATOR_EVALUATORS[operator](BREAKPOINTS[breakpoint], simulatedWidth);
6776
  }
6777
 
6778
+ return mediaQueryResult;
6779
+ };
 
 
 
 
 
 
 
6780
 
6781
+ useViewportMatch.__experimentalWidthProvider = ViewportMatchWidthContext.Provider;
6782
+ /* harmony default export */ __webpack_exports__["a"] = (useViewportMatch);
6783
+ //# sourceMappingURL=index.js.map
6784
+
6785
+ /***/ }),
6786
+
6787
+ /***/ 209:
6788
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
6789
+
6790
+ "use strict";
6791
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
6792
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
6793
+ /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32);
6794
 
 
 
 
 
 
 
 
 
6795
 
 
 
 
6796
  /**
6797
+ * WordPress dependencies
 
 
 
6798
  */
6799
 
6800
+ var close = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__[/* SVG */ "b"], {
6801
+ xmlns: "http://www.w3.org/2000/svg",
6802
+ viewBox: "0 0 24 24"
6803
+ }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__[/* Path */ "a"], {
6804
+ d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"
6805
+ }));
6806
+ /* harmony default export */ __webpack_exports__["a"] = (close);
6807
+ //# sourceMappingURL=close.js.map
6808
 
6809
  /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6810
 
6811
+ /***/ 21:
6812
+ /***/ (function(module, exports) {
6813
 
6814
+ (function() { module.exports = this["wp"]["apiFetch"]; }());
6815
 
6816
  /***/ }),
6817
+
6818
+ /***/ 210:
6819
  /***/ (function(module, exports, __webpack_require__) {
6820
 
6821
  "use strict";
6822
+ /** @license React v16.13.1
6823
+ * react-is.production.min.js
6824
+ *
6825
+ * Copyright (c) Facebook, Inc. and its affiliates.
6826
+ *
6827
+ * This source code is licensed under the MIT license found in the
6828
+ * LICENSE file in the root directory of this source tree.
6829
+ */
6830
 
6831
+ var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
6832
+ Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
6833
+ function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;
6834
+ exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};
6835
+ exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
6836
+ exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6837
 
6838
 
6839
  /***/ }),
6840
+
6841
+ /***/ 211:
6842
  /***/ (function(module, exports, __webpack_require__) {
6843
 
6844
+ var arrayLikeToArray = __webpack_require__(152);
6845
 
6846
+ function _arrayWithoutHoles(arr) {
6847
+ if (Array.isArray(arr)) return arrayLikeToArray(arr);
6848
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6849
 
6850
+ module.exports = _arrayWithoutHoles;
6851
 
6852
  /***/ }),
6853
+
6854
+ /***/ 212:
 
 
 
 
 
 
 
 
 
 
6855
  /***/ (function(module, exports) {
6856
 
6857
+ function _iterableToArray(iter) {
6858
+ if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
6859
+ }
6860
+
6861
+ module.exports = _iterableToArray;
6862
 
6863
  /***/ }),
 
 
 
 
6864
 
6865
+ /***/ 213:
6866
+ /***/ (function(module, exports) {
6867
 
6868
+ function _nonIterableSpread() {
6869
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6870
+ }
 
 
6871
 
6872
+ module.exports = _nonIterableSpread;
6873
 
6874
  /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6875
 
6876
+ /***/ 22:
6877
+ /***/ (function(module, exports) {
 
 
 
 
 
 
6878
 
6879
+ (function() { module.exports = this["wc"]["navigation"]; }());
6880
 
6881
  /***/ }),
 
 
 
 
 
6882
 
6883
+ /***/ 23:
6884
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
6885
 
6886
+ "use strict";
6887
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ADMIN_URL; });
6888
+ /* unused harmony export COUNTRIES */
6889
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CURRENCY; });
6890
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return LOCALE; });
6891
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ORDER_STATUSES; });
6892
+ /* unused harmony export SITE_TITLE */
6893
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return WC_ASSET_URL; });
6894
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getSetting; });
6895
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return setSetting; });
6896
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getAdminLink; });
6897
+ /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(35);
6898
+ /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);
6899
+ /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
6900
+ /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
6901
 
 
 
 
 
6902
 
6903
+ /**
6904
+ * External dependencies
6905
+ */
6906
+ // Remove mutable data from settings object to prevent access. Data stores should be used instead.
6907
 
6908
+ var mutableSources = ['wcAdminSettings', 'preloadSettings'];
6909
+ var settings = (typeof wcSettings === "undefined" ? "undefined" : _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(wcSettings)) === 'object' ? wcSettings : {};
6910
+ var SOURCE = Object.keys(settings).reduce(function (source, key) {
6911
+ if (!mutableSources.includes(key)) {
6912
+ source[key] = settings[key];
 
 
 
6913
  }
 
 
 
 
 
 
6914
 
6915
+ return source;
6916
+ }, {});
6917
+ var ADMIN_URL = SOURCE.adminUrl;
6918
+ var COUNTRIES = SOURCE.countries;
6919
+ var CURRENCY = SOURCE.currency;
6920
+ var LOCALE = SOURCE.locale;
6921
+ var ORDER_STATUSES = SOURCE.orderStatuses;
6922
+ var SITE_TITLE = SOURCE.siteTitle;
6923
+ var WC_ASSET_URL = SOURCE.wcAssetUrl;
6924
+ /**
6925
+ * Retrieves a setting value from the setting state.
6926
+ *
6927
+ * @export
6928
+ * @param {string} name The identifier for the setting.
6929
+ * @param {*} [fallback=false] The value to use as a fallback
6930
+ * if the setting is not in the
6931
+ * state.
6932
+ * @param {Function} [filter=( val ) => val] A callback for filtering the
6933
+ * value before it's returned.
6934
+ * Receives both the found value
6935
+ * (if it exists for the key) and
6936
+ * the provided fallback arg.
6937
+ *
6938
+ * @return {*} The value present in the settings state for the given
6939
+ * name.
6940
+ */
6941
 
6942
+ function getSetting(name) {
6943
+ var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
6944
+ var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (val) {
6945
+ return val;
6946
+ };
6947
 
6948
+ if (mutableSources.includes(name)) {
6949
+ throw new Error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Mutable settings should be accessed via data store.'));
6950
+ }
6951
 
6952
+ var value = SOURCE.hasOwnProperty(name) ? SOURCE[name] : fallback;
6953
+ return filter(value, fallback);
6954
+ }
6955
+ /**
6956
+ * Sets a value to a property on the settings state.
6957
+ *
6958
+ * NOTE: This feature is to be removed in favour of data stores when a full migration
6959
+ * is complete.
6960
+ *
6961
+ * @deprecated
6962
+ *
6963
+ * @export
6964
+ * @param {string} name The setting property key for the
6965
+ * setting being mutated.
6966
+ * @param {*} value The value to set.
6967
+ * @param {Function} [filter=( val ) => val] Allows for providing a callback
6968
+ * to sanitize the setting (eg.
6969
+ * ensure it's a number)
6970
+ */
6971
 
6972
+ function setSetting(name, value) {
6973
+ var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (val) {
6974
+ return val;
6975
+ };
6976
 
6977
+ if (mutableSources.includes(name)) {
6978
+ throw new Error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Mutable settings should be mutated via data store.'));
6979
+ }
6980
 
6981
+ SOURCE[name] = filter(value);
6982
+ }
6983
+ /**
6984
+ * Returns a string with the site's wp-admin URL appended. JS version of `admin_url`.
6985
+ *
6986
+ * @param {string} path Relative path.
6987
+ * @return {string} Full admin URL.
6988
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6989
 
6990
+ function getAdminLink(path) {
6991
+ return (ADMIN_URL || '') + path;
6992
+ }
6993
 
6994
  /***/ }),
6995
+
6996
+ /***/ 24:
 
 
 
 
 
 
6997
  /***/ (function(module, exports) {
6998
 
6999
+ (function() { module.exports = this["wc"]["date"]; }());
7000
 
7001
  /***/ }),
7002
+
7003
+ /***/ 257:
 
 
 
 
7004
  /***/ (function(module, exports, __webpack_require__) {
7005
 
7006
  "use strict";
7007
 
7008
 
7009
+ Object.defineProperty(exports, '__esModule', { value: true });
 
 
7010
 
7011
+ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
7012
 
7013
+ var _extends = _interopDefault(__webpack_require__(80));
7014
+ var _objectWithoutPropertiesLoose = _interopDefault(__webpack_require__(273));
7015
+ var React = __webpack_require__(13);
7016
+ var React__default = _interopDefault(React);
7017
+ var _inheritsLoose = _interopDefault(__webpack_require__(126));
7018
+ var _assertThisInitialized = _interopDefault(__webpack_require__(62));
 
 
 
 
 
7019
 
7020
+ var is = {
7021
+ arr: Array.isArray,
7022
+ obj: function obj(a) {
7023
+ return Object.prototype.toString.call(a) === '[object Object]';
7024
+ },
7025
+ fun: function fun(a) {
7026
+ return typeof a === 'function';
7027
+ },
7028
+ str: function str(a) {
7029
+ return typeof a === 'string';
7030
+ },
7031
+ num: function num(a) {
7032
+ return typeof a === 'number';
7033
+ },
7034
+ und: function und(a) {
7035
+ return a === void 0;
7036
+ },
7037
+ nul: function nul(a) {
7038
+ return a === null;
7039
+ },
7040
+ set: function set(a) {
7041
+ return a instanceof Set;
7042
+ },
7043
+ map: function map(a) {
7044
+ return a instanceof Map;
7045
+ },
7046
+ equ: function equ(a, b) {
7047
+ if (typeof a !== typeof b) return false;
7048
+ if (is.str(a) || is.num(a)) return a === b;
7049
+ if (is.obj(a) && is.obj(b) && Object.keys(a).length + Object.keys(b).length === 0) return true;
7050
+ var i;
7051
 
7052
+ for (i in a) {
7053
+ if (!(i in b)) return false;
7054
+ }
7055
 
7056
+ for (i in b) {
7057
+ if (a[i] !== b[i]) return false;
7058
+ }
7059
 
7060
+ return is.und(i) ? a === b : true;
7061
+ }
7062
+ };
7063
+ function merge(target, lowercase) {
7064
+ if (lowercase === void 0) {
7065
+ lowercase = true;
7066
+ }
7067
 
7068
+ return function (object) {
7069
+ return (is.arr(object) ? object : Object.keys(object)).reduce(function (acc, element) {
7070
+ var key = lowercase ? element[0].toLowerCase() + element.substring(1) : element;
7071
+ acc[key] = target(key);
7072
+ return acc;
7073
+ }, target);
7074
+ };
7075
+ }
7076
+ function useForceUpdate() {
7077
+ var _useState = React.useState(false),
7078
+ f = _useState[1];
7079
 
7080
+ var forceUpdate = React.useCallback(function () {
7081
+ return f(function (v) {
7082
+ return !v;
7083
+ });
7084
+ }, []);
7085
+ return forceUpdate;
7086
+ }
7087
+ function withDefault(value, defaultValue) {
7088
+ return is.und(value) || is.nul(value) ? defaultValue : value;
7089
+ }
7090
+ function toArray(a) {
7091
+ return !is.und(a) ? is.arr(a) ? a : [a] : [];
7092
+ }
7093
+ function callProp(obj) {
7094
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
7095
+ args[_key - 1] = arguments[_key];
7096
+ }
7097
 
7098
+ return is.fun(obj) ? obj.apply(void 0, args) : obj;
7099
+ }
7100
 
7101
+ function getForwardProps(props) {
7102
+ var to = props.to,
7103
+ from = props.from,
7104
+ config = props.config,
7105
+ onStart = props.onStart,
7106
+ onRest = props.onRest,
7107
+ onFrame = props.onFrame,
7108
+ children = props.children,
7109
+ reset = props.reset,
7110
+ reverse = props.reverse,
7111
+ force = props.force,
7112
+ immediate = props.immediate,
7113
+ delay = props.delay,
7114
+ attach = props.attach,
7115
+ destroyed = props.destroyed,
7116
+ interpolateTo = props.interpolateTo,
7117
+ ref = props.ref,
7118
+ lazy = props.lazy,
7119
+ forward = _objectWithoutPropertiesLoose(props, ["to", "from", "config", "onStart", "onRest", "onFrame", "children", "reset", "reverse", "force", "immediate", "delay", "attach", "destroyed", "interpolateTo", "ref", "lazy"]);
7120
 
7121
+ return forward;
7122
+ }
7123
 
7124
+ function interpolateTo(props) {
7125
+ var forward = getForwardProps(props);
7126
+ if (is.und(forward)) return _extends({
7127
+ to: forward
7128
+ }, props);
7129
+ var rest = Object.keys(props).reduce(function (a, k) {
7130
+ var _extends2;
7131
 
7132
+ return !is.und(forward[k]) ? a : _extends({}, a, (_extends2 = {}, _extends2[k] = props[k], _extends2));
7133
+ }, {});
7134
+ return _extends({
7135
+ to: forward
7136
+ }, rest);
7137
+ }
7138
+ function handleRef(ref, forward) {
7139
+ if (forward) {
7140
+ // If it's a function, assume it's a ref callback
7141
+ if (is.fun(forward)) forward(ref);else if (is.obj(forward)) {
7142
+ forward.current = ref;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7143
  }
7144
+ }
 
 
7145
 
7146
+ return ref;
7147
+ }
 
7148
 
7149
+ var Animated =
7150
+ /*#__PURE__*/
7151
+ function () {
7152
+ function Animated() {
7153
+ this.payload = void 0;
7154
+ this.children = [];
7155
+ }
7156
 
7157
+ var _proto = Animated.prototype;
7158
 
7159
+ _proto.getAnimatedValue = function getAnimatedValue() {
7160
+ return this.getValue();
7161
+ };
7162
 
7163
+ _proto.getPayload = function getPayload() {
7164
+ return this.payload || this;
7165
+ };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7166
 
7167
+ _proto.attach = function attach() {};
 
 
 
 
7168
 
7169
+ _proto.detach = function detach() {};
7170
 
7171
+ _proto.getChildren = function getChildren() {
7172
+ return this.children;
7173
+ };
7174
 
7175
+ _proto.addChild = function addChild(child) {
7176
+ if (this.children.length === 0) this.attach();
7177
+ this.children.push(child);
7178
+ };
 
 
 
 
 
 
 
7179
 
7180
+ _proto.removeChild = function removeChild(child) {
7181
+ var index = this.children.indexOf(child);
7182
+ this.children.splice(index, 1);
7183
+ if (this.children.length === 0) this.detach();
7184
+ };
7185
 
7186
+ return Animated;
7187
+ }();
7188
+ var AnimatedArray =
7189
+ /*#__PURE__*/
7190
+ function (_Animated) {
7191
+ _inheritsLoose(AnimatedArray, _Animated);
7192
 
7193
+ function AnimatedArray() {
7194
+ var _this;
7195
+
7196
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7197
+ args[_key] = arguments[_key];
7198
  }
7199
 
7200
+ _this = _Animated.call.apply(_Animated, [this].concat(args)) || this;
7201
+ _this.payload = [];
7202
 
7203
+ _this.attach = function () {
7204
+ return _this.payload.forEach(function (p) {
7205
+ return p instanceof Animated && p.addChild(_assertThisInitialized(_this));
7206
+ });
7207
+ };
7208
 
7209
+ _this.detach = function () {
7210
+ return _this.payload.forEach(function (p) {
7211
+ return p instanceof Animated && p.removeChild(_assertThisInitialized(_this));
7212
+ });
7213
+ };
7214
 
7215
+ return _this;
 
 
 
 
 
7216
  }
7217
 
7218
+ return AnimatedArray;
7219
+ }(Animated);
7220
+ var AnimatedObject =
7221
+ /*#__PURE__*/
7222
+ function (_Animated2) {
7223
+ _inheritsLoose(AnimatedObject, _Animated2);
7224
 
7225
+ function AnimatedObject() {
7226
+ var _this2;
 
7227
 
7228
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
7229
+ args[_key3] = arguments[_key3];
7230
+ }
7231
 
7232
+ _this2 = _Animated2.call.apply(_Animated2, [this].concat(args)) || this;
7233
+ _this2.payload = {};
 
7234
 
7235
+ _this2.attach = function () {
7236
+ return Object.values(_this2.payload).forEach(function (s) {
7237
+ return s instanceof Animated && s.addChild(_assertThisInitialized(_this2));
7238
+ });
7239
+ };
7240
 
7241
+ _this2.detach = function () {
7242
+ return Object.values(_this2.payload).forEach(function (s) {
7243
+ return s instanceof Animated && s.removeChild(_assertThisInitialized(_this2));
7244
+ });
7245
+ };
 
 
 
 
 
 
 
 
 
 
 
7246
 
7247
+ return _this2;
7248
+ }
7249
 
7250
+ var _proto2 = AnimatedObject.prototype;
 
7251
 
7252
+ _proto2.getValue = function getValue(animated) {
7253
+ if (animated === void 0) {
7254
+ animated = false;
7255
+ }
7256
 
7257
+ var payload = {};
 
 
7258
 
7259
+ for (var _key4 in this.payload) {
7260
+ var value = this.payload[_key4];
7261
+ if (animated && !(value instanceof Animated)) continue;
7262
+ payload[_key4] = value instanceof Animated ? value[animated ? 'getAnimatedValue' : 'getValue']() : value;
7263
+ }
7264
 
7265
+ return payload;
7266
+ };
 
7267
 
7268
+ _proto2.getAnimatedValue = function getAnimatedValue() {
7269
+ return this.getValue(true);
7270
+ };
7271
 
7272
+ return AnimatedObject;
7273
+ }(Animated);
 
7274
 
7275
+ var applyAnimatedValues;
7276
+ function injectApplyAnimatedValues(fn, transform) {
7277
+ applyAnimatedValues = {
7278
+ fn: fn,
7279
+ transform: transform
7280
+ };
7281
+ }
7282
+ var colorNames;
7283
+ function injectColorNames(names) {
7284
+ colorNames = names;
7285
+ }
7286
+ var requestFrame = function requestFrame(cb) {
7287
+ return typeof window !== 'undefined' ? window.requestAnimationFrame(cb) : -1;
7288
+ };
7289
+ var cancelFrame = function cancelFrame(id) {
7290
+ typeof window !== 'undefined' && window.cancelAnimationFrame(id);
7291
+ };
7292
+ function injectFrame(raf, caf) {
7293
+ requestFrame = raf;
7294
+ cancelFrame = caf;
7295
+ }
7296
+ var interpolation;
7297
+ function injectStringInterpolator(fn) {
7298
+ interpolation = fn;
7299
+ }
7300
+ var now = function now() {
7301
+ return Date.now();
7302
+ };
7303
+ function injectNow(nowFn) {
7304
+ now = nowFn;
7305
+ }
7306
+ var defaultElement;
7307
+ function injectDefaultElement(el) {
7308
+ defaultElement = el;
7309
+ }
7310
+ var animatedApi = function animatedApi(node) {
7311
+ return node.current;
7312
+ };
7313
+ function injectAnimatedApi(fn) {
7314
+ animatedApi = fn;
7315
+ }
7316
+ var createAnimatedStyle;
7317
+ function injectCreateAnimatedStyle(factory) {
7318
+ createAnimatedStyle = factory;
7319
+ }
7320
+ var manualFrameloop;
7321
+ function injectManualFrameloop(callback) {
7322
+ manualFrameloop = callback;
7323
+ }
7324
 
7325
+ var Globals = /*#__PURE__*/Object.freeze({
7326
+ get applyAnimatedValues () { return applyAnimatedValues; },
7327
+ injectApplyAnimatedValues: injectApplyAnimatedValues,
7328
+ get colorNames () { return colorNames; },
7329
+ injectColorNames: injectColorNames,
7330
+ get requestFrame () { return requestFrame; },
7331
+ get cancelFrame () { return cancelFrame; },
7332
+ injectFrame: injectFrame,
7333
+ get interpolation () { return interpolation; },
7334
+ injectStringInterpolator: injectStringInterpolator,
7335
+ get now () { return now; },
7336
+ injectNow: injectNow,
7337
+ get defaultElement () { return defaultElement; },
7338
+ injectDefaultElement: injectDefaultElement,
7339
+ get animatedApi () { return animatedApi; },
7340
+ injectAnimatedApi: injectAnimatedApi,
7341
+ get createAnimatedStyle () { return createAnimatedStyle; },
7342
+ injectCreateAnimatedStyle: injectCreateAnimatedStyle,
7343
+ get manualFrameloop () { return manualFrameloop; },
7344
+ injectManualFrameloop: injectManualFrameloop
7345
+ });
7346
 
7347
+ /**
7348
+ * Wraps the `style` property with `AnimatedStyle`.
7349
+ */
7350
 
7351
+ var AnimatedProps =
7352
+ /*#__PURE__*/
7353
+ function (_AnimatedObject) {
7354
+ _inheritsLoose(AnimatedProps, _AnimatedObject);
7355
 
7356
+ function AnimatedProps(props, callback) {
7357
+ var _this;
7358
 
7359
+ _this = _AnimatedObject.call(this) || this;
7360
+ _this.update = void 0;
7361
+ _this.payload = !props.style ? props : _extends({}, props, {
7362
+ style: createAnimatedStyle(props.style)
7363
+ });
7364
+ _this.update = callback;
7365
 
7366
+ _this.attach();
 
7367
 
7368
+ return _this;
7369
+ }
7370
 
7371
+ return AnimatedProps;
7372
+ }(AnimatedObject);
7373
 
7374
+ var isFunctionComponent = function isFunctionComponent(val) {
7375
+ return is.fun(val) && !(val.prototype instanceof React__default.Component);
7376
+ };
7377
 
7378
+ var createAnimatedComponent = function createAnimatedComponent(Component) {
7379
+ var AnimatedComponent = React.forwardRef(function (props, ref) {
7380
+ var forceUpdate = useForceUpdate();
7381
+ var mounted = React.useRef(true);
7382
+ var propsAnimated = React.useRef(null);
7383
+ var node = React.useRef(null);
7384
+ var attachProps = React.useCallback(function (props) {
7385
+ var oldPropsAnimated = propsAnimated.current;
7386
 
7387
+ var callback = function callback() {
7388
+ var didUpdate = false;
7389
 
7390
+ if (node.current) {
7391
+ didUpdate = applyAnimatedValues.fn(node.current, propsAnimated.current.getAnimatedValue());
7392
+ }
7393
 
7394
+ if (!node.current || didUpdate === false) {
7395
+ // If no referenced node has been found, or the update target didn't have a
7396
+ // native-responder, then forceUpdate the animation ...
7397
+ forceUpdate();
7398
+ }
7399
+ };
7400
 
7401
+ propsAnimated.current = new AnimatedProps(props, callback);
7402
+ oldPropsAnimated && oldPropsAnimated.detach();
7403
+ }, []);
7404
+ React.useEffect(function () {
7405
+ return function () {
7406
+ mounted.current = false;
7407
+ propsAnimated.current && propsAnimated.current.detach();
7408
+ };
7409
+ }, []);
7410
+ React.useImperativeHandle(ref, function () {
7411
+ return animatedApi(node, mounted, forceUpdate);
7412
+ });
7413
+ attachProps(props);
7414
 
7415
+ var _getValue = propsAnimated.current.getValue(),
7416
+ scrollTop = _getValue.scrollTop,
7417
+ scrollLeft = _getValue.scrollLeft,
7418
+ animatedProps = _objectWithoutPropertiesLoose(_getValue, ["scrollTop", "scrollLeft"]); // Functions cannot have refs, see:
7419
+ // See: https://github.com/react-spring/react-spring/issues/569
7420
 
 
 
7421
 
7422
+ var refFn = isFunctionComponent(Component) ? undefined : function (childRef) {
7423
+ return node.current = handleRef(childRef, ref);
7424
+ };
7425
+ return React__default.createElement(Component, _extends({}, animatedProps, {
7426
+ ref: refFn
7427
+ }));
7428
+ });
7429
+ return AnimatedComponent;
7430
+ };
7431
 
7432
+ var active = false;
7433
+ var controllers = new Set();
 
7434
 
7435
+ var update = function update() {
7436
+ if (!active) return false;
7437
+ var time = now();
7438
 
7439
+ for (var _iterator = controllers, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
7440
+ var _ref;
7441
 
7442
+ if (_isArray) {
7443
+ if (_i >= _iterator.length) break;
7444
+ _ref = _iterator[_i++];
7445
+ } else {
7446
+ _i = _iterator.next();
7447
+ if (_i.done) break;
7448
+ _ref = _i.value;
7449
+ }
7450
 
7451
+ var controller = _ref;
7452
+ var isActive = false;
7453
 
7454
+ for (var configIdx = 0; configIdx < controller.configs.length; configIdx++) {
7455
+ var config = controller.configs[configIdx];
7456
+ var endOfAnimation = void 0,
7457
+ lastTime = void 0;
7458
 
7459
+ for (var valIdx = 0; valIdx < config.animatedValues.length; valIdx++) {
7460
+ var animation = config.animatedValues[valIdx]; // If an animation is done, skip, until all of them conclude
 
7461
 
7462
+ if (animation.done) continue;
7463
+ var from = config.fromValues[valIdx];
7464
+ var to = config.toValues[valIdx];
7465
+ var position = animation.lastPosition;
7466
+ var isAnimated = to instanceof Animated;
7467
+ var velocity = Array.isArray(config.initialVelocity) ? config.initialVelocity[valIdx] : config.initialVelocity;
7468
+ if (isAnimated) to = to.getValue(); // Conclude animation if it's either immediate, or from-values match end-state
 
 
 
 
7469
 
7470
+ if (config.immediate) {
7471
+ animation.setValue(to);
7472
+ animation.done = true;
7473
+ continue;
7474
+ } // Break animation when string values are involved
7475
 
7476
 
7477
+ if (typeof from === 'string' || typeof to === 'string') {
7478
+ animation.setValue(to);
7479
+ animation.done = true;
7480
+ continue;
7481
+ }
7482
 
7483
+ if (config.duration !== void 0) {
7484
+ /** Duration easing */
7485
+ position = from + config.easing((time - animation.startTime) / config.duration) * (to - from);
7486
+ endOfAnimation = time >= animation.startTime + config.duration;
7487
+ } else if (config.decay) {
7488
+ /** Decay easing */
7489
+ position = from + velocity / (1 - 0.998) * (1 - Math.exp(-(1 - 0.998) * (time - animation.startTime)));
7490
+ endOfAnimation = Math.abs(animation.lastPosition - position) < 0.1;
7491
+ if (endOfAnimation) to = position;
7492
+ } else {
7493
+ /** Spring easing */
7494
+ lastTime = animation.lastTime !== void 0 ? animation.lastTime : time;
7495
+ velocity = animation.lastVelocity !== void 0 ? animation.lastVelocity : config.initialVelocity; // If we lost a lot of frames just jump to the end.
7496
 
7497
+ if (time > lastTime + 64) lastTime = time; // http://gafferongames.com/game-physics/fix-your-timestep/
7498
 
7499
+ var numSteps = Math.floor(time - lastTime);
7500
 
7501
+ for (var i = 0; i < numSteps; ++i) {
7502
+ var force = -config.tension * (position - to);
7503
+ var damping = -config.friction * velocity;
7504
+ var acceleration = (force + damping) / config.mass;
7505
+ velocity = velocity + acceleration * 1 / 1000;
7506
+ position = position + velocity * 1 / 1000;
7507
+ } // Conditions for stopping the spring animation
7508
 
7509
 
7510
+ var isOvershooting = config.clamp && config.tension !== 0 ? from < to ? position > to : position < to : false;
7511
+ var isVelocity = Math.abs(velocity) <= config.precision;
7512
+ var isDisplacement = config.tension !== 0 ? Math.abs(to - position) <= config.precision : true;
7513
+ endOfAnimation = isOvershooting || isVelocity && isDisplacement;
7514
+ animation.lastVelocity = velocity;
7515
+ animation.lastTime = time;
7516
+ } // Trails aren't done until their parents conclude
7517
 
7518
 
7519
+ if (isAnimated && !config.toValues[valIdx].done) endOfAnimation = false;
7520
 
7521
+ if (endOfAnimation) {
7522
+ // Ensure that we end up with a round value
7523
+ if (animation.value !== to) position = to;
7524
+ animation.done = true;
7525
+ } else isActive = true;
7526
 
7527
+ animation.setValue(position);
7528
+ animation.lastPosition = position;
7529
+ } // Keep track of updated values only when necessary
7530
 
 
 
 
 
 
7531
 
7532
+ if (controller.props.onFrame) controller.values[config.name] = config.interpolation.getValue();
7533
+ } // Update callbacks in the end of the frame
 
7534
 
 
7535
 
7536
+ if (controller.props.onFrame) controller.props.onFrame(controller.values); // Either call onEnd or next frame
 
 
 
 
7537
 
7538
+ if (!isActive) {
7539
+ controllers.delete(controller);
7540
+ controller.stop(true);
7541
+ }
7542
+ } // Loop over as long as there are controllers ...
7543
 
 
 
 
7544
 
7545
+ if (controllers.size) {
7546
+ if (manualFrameloop) manualFrameloop();else requestFrame(update);
7547
+ } else {
7548
+ active = false;
7549
+ }
7550
 
7551
+ return active;
7552
+ };
 
 
 
 
 
 
7553
 
7554
+ var start = function start(controller) {
7555
+ if (!controllers.has(controller)) controllers.add(controller);
7556
 
7557
+ if (!active) {
7558
+ active = true;
7559
+ if (manualFrameloop) requestFrame(manualFrameloop);else requestFrame(update);
7560
+ }
7561
+ };
 
 
 
7562
 
7563
+ var stop = function stop(controller) {
7564
+ if (controllers.has(controller)) controllers.delete(controller);
7565
+ };
7566
 
7567
+ function createInterpolator(range, output, extrapolate) {
7568
+ if (typeof range === 'function') {
7569
+ return range;
7570
+ }
 
 
 
 
 
 
 
7571
 
7572
+ if (Array.isArray(range)) {
7573
+ return createInterpolator({
7574
+ range: range,
7575
+ output: output,
7576
+ extrapolate: extrapolate
7577
+ });
7578
  }
7579
 
7580
+ if (interpolation && typeof range.output[0] === 'string') {
7581
+ return interpolation(range);
7582
+ }
7583
 
7584
+ var config = range;
7585
+ var outputRange = config.output;
7586
+ var inputRange = config.range || [0, 1];
7587
+ var extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend';
7588
+ var extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend';
7589
 
7590
+ var easing = config.easing || function (t) {
7591
+ return t;
 
 
 
7592
  };
7593
 
7594
+ return function (input) {
7595
+ var range = findRange(input, inputRange);
7596
+ return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map);
7597
  };
7598
+ }
7599
 
7600
+ function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
7601
+ var result = map ? map(input) : input; // Extrapolate
 
 
 
 
 
 
 
 
 
 
 
7602
 
7603
+ if (result < inputMin) {
7604
+ if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin;
7605
+ }
7606
 
7607
+ if (result > inputMax) {
7608
+ if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax;
7609
+ }
7610
 
7611
+ if (outputMin === outputMax) return outputMin;
7612
+ if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax; // Input Range
 
7613
 
7614
+ if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin); // Easing
 
 
 
7615
 
7616
+ result = easing(result); // Output Range
 
7617
 
7618
+ if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin;
7619
+ return result;
7620
+ }
7621
 
7622
+ function findRange(input, inputRange) {
7623
+ for (var i = 1; i < inputRange.length - 1; ++i) {
7624
+ if (inputRange[i] >= input) break;
7625
  }
7626
 
7627
+ return i - 1;
7628
+ }
 
 
 
 
 
 
 
 
 
 
 
7629
 
7630
+ var AnimatedInterpolation =
7631
  /*#__PURE__*/
7632
+ function (_AnimatedArray) {
7633
+ _inheritsLoose(AnimatedInterpolation, _AnimatedArray);
7634
 
7635
+ function AnimatedInterpolation(parents, range, output, extrapolate) {
7636
+ var _this;
 
7637
 
7638
+ _this = _AnimatedArray.call(this) || this;
7639
+ _this.calc = void 0;
7640
+ _this.payload = parents instanceof AnimatedArray && !(parents instanceof AnimatedInterpolation) ? parents.getPayload() : Array.isArray(parents) ? parents : [parents];
7641
+ _this.calc = createInterpolator(range, output, extrapolate);
7642
+ return _this;
7643
+ }
7644
 
7645
+ var _proto = AnimatedInterpolation.prototype;
 
 
7646
 
7647
+ _proto.getValue = function getValue() {
7648
+ return this.calc.apply(this, this.payload.map(function (value) {
7649
+ return value.getValue();
7650
+ }));
7651
  };
7652
 
7653
+ _proto.updateConfig = function updateConfig(range, output, extrapolate) {
7654
+ this.calc = createInterpolator(range, output, extrapolate);
7655
  };
7656
 
7657
+ _proto.interpolate = function interpolate(range, output, extrapolate) {
7658
+ return new AnimatedInterpolation(this, range, output, extrapolate);
7659
  };
7660
 
7661
+ return AnimatedInterpolation;
7662
+ }(AnimatedArray);
7663
 
7664
+ var interpolate$1 = function interpolate(parents, range, output) {
7665
+ return parents && new AnimatedInterpolation(parents, range, output);
7666
+ };
7667
 
7668
+ var config = {
7669
+ default: {
7670
+ tension: 170,
7671
+ friction: 26
7672
+ },
7673
+ gentle: {
7674
+ tension: 120,
7675
+ friction: 14
7676
+ },
7677
+ wobbly: {
7678
+ tension: 180,
7679
+ friction: 12
7680
+ },
7681
+ stiff: {
7682
+ tension: 210,
7683
+ friction: 20
7684
+ },
7685
+ slow: {
7686
+ tension: 280,
7687
+ friction: 60
7688
+ },
7689
+ molasses: {
7690
+ tension: 280,
7691
+ friction: 120
7692
+ }
7693
+ };
7694
 
7695
+ /** API
7696
+ * useChain(references, timeSteps, timeFrame)
7697
+ */
7698
 
7699
+ function useChain(refs, timeSteps, timeFrame) {
7700
+ if (timeFrame === void 0) {
7701
+ timeFrame = 1000;
7702
+ }
7703
 
7704
+ var previous = React.useRef();
7705
+ React.useEffect(function () {
7706
+ if (is.equ(refs, previous.current)) refs.forEach(function (_ref) {
7707
+ var current = _ref.current;
7708
+ return current && current.start();
7709
+ });else if (timeSteps) {
7710
+ refs.forEach(function (_ref2, index) {
7711
+ var current = _ref2.current;
7712
 
7713
+ if (current) {
7714
+ var ctrls = current.controllers;
 
 
7715
 
7716
+ if (ctrls.length) {
7717
+ var t = timeFrame * timeSteps[index];
7718
+ ctrls.forEach(function (ctrl) {
7719
+ ctrl.queue = ctrl.queue.map(function (e) {
7720
+ return _extends({}, e, {
7721
+ delay: e.delay + t
7722
+ });
7723
+ });
7724
+ ctrl.start();
7725
+ });
7726
+ }
7727
+ }
7728
+ });
7729
+ } else refs.reduce(function (q, _ref3, rI) {
7730
+ var current = _ref3.current;
7731
+ return q = q.then(function () {
7732
+ return current.start();
7733
+ });
7734
+ }, Promise.resolve());
7735
+ previous.current = refs;
7736
+ });
7737
  }
7738
+
7739
  /**
7740
+ * Animated works by building a directed acyclic graph of dependencies
7741
+ * transparently when you render your Animated components.
7742
+ *
7743
+ * new Animated.Value(0)
7744
+ * .interpolate() .interpolate() new Animated.Value(1)
7745
+ * opacity translateY scale
7746
+ * style transform
7747
+ * View#234 style
7748
+ * View#123
7749
+ *
7750
+ * A) Top Down phase
7751
+ * When an AnimatedValue is updated, we recursively go down through this
7752
+ * graph in order to find leaf nodes: the views that we flag as needing
7753
+ * an update.
7754
+ *
7755
+ * B) Bottom Up phase
7756
+ * When a view is flagged as needing an update, we recursively go back up
7757
+ * in order to build the new value that it needs. The reason why we need
7758
+ * this two-phases process is to deal with composite props such as
7759
+ * transform which can receive values from multiple parents.
7760
  */
7761
+ function addAnimatedStyles(node, styles) {
7762
+ if ('update' in node) {
7763
+ styles.add(node);
7764
+ } else {
7765
+ node.getChildren().forEach(function (child) {
7766
+ return addAnimatedStyles(child, styles);
7767
+ });
7768
+ }
7769
+ }
7770
 
7771
+ var AnimatedValue =
7772
+ /*#__PURE__*/
7773
+ function (_Animated) {
7774
+ _inheritsLoose(AnimatedValue, _Animated);
7775
 
7776
+ function AnimatedValue(_value) {
7777
+ var _this;
 
 
7778
 
7779
+ _this = _Animated.call(this) || this;
7780
+ _this.animatedStyles = new Set();
7781
+ _this.value = void 0;
7782
+ _this.startPosition = void 0;
7783
+ _this.lastPosition = void 0;
7784
+ _this.lastVelocity = void 0;
7785
+ _this.startTime = void 0;
7786
+ _this.lastTime = void 0;
7787
+ _this.done = false;
7788
 
7789
+ _this.setValue = function (value, flush) {
7790
+ if (flush === void 0) {
7791
+ flush = true;
7792
+ }
7793
 
7794
+ _this.value = value;
7795
+ if (flush) _this.flush();
7796
+ };
7797
 
7798
+ _this.value = _value;
7799
+ _this.startPosition = _value;
7800
+ _this.lastPosition = _value;
7801
+ return _this;
7802
+ }
 
 
 
 
 
 
 
 
 
7803
 
7804
+ var _proto = AnimatedValue.prototype;
 
 
 
7805
 
7806
+ _proto.flush = function flush() {
7807
+ if (this.animatedStyles.size === 0) {
7808
+ addAnimatedStyles(this, this.animatedStyles);
7809
+ }
 
 
7810
 
7811
+ this.animatedStyles.forEach(function (animatedStyle) {
7812
+ return animatedStyle.update();
 
 
 
 
 
7813
  });
7814
+ };
 
7815
 
7816
+ _proto.clearStyles = function clearStyles() {
7817
+ this.animatedStyles.clear();
7818
+ };
7819
 
7820
+ _proto.getValue = function getValue() {
7821
+ return this.value;
7822
+ };
7823
 
7824
+ _proto.interpolate = function interpolate(range, output, extrapolate) {
7825
+ return new AnimatedInterpolation(this, range, output, extrapolate);
 
 
 
 
 
 
 
7826
  };
7827
 
7828
+ return AnimatedValue;
7829
+ }(Animated);
 
 
7830
 
7831
+ var AnimatedValueArray =
7832
+ /*#__PURE__*/
7833
+ function (_AnimatedArray) {
7834
+ _inheritsLoose(AnimatedValueArray, _AnimatedArray);
 
7835
 
7836
+ function AnimatedValueArray(values) {
7837
+ var _this;
7838
 
7839
+ _this = _AnimatedArray.call(this) || this;
7840
+ _this.payload = values.map(function (n) {
7841
+ return new AnimatedValue(n);
7842
+ });
7843
+ return _this;
7844
  }
7845
 
7846
+ var _proto = AnimatedValueArray.prototype;
 
 
 
 
7847
 
7848
+ _proto.setValue = function setValue(value, flush) {
7849
+ var _this2 = this;
 
 
 
 
 
 
 
 
 
 
7850
 
7851
+ if (flush === void 0) {
7852
+ flush = true;
7853
+ }
 
 
 
 
7854
 
7855
+ if (Array.isArray(value)) {
7856
+ if (value.length === this.payload.length) {
7857
+ value.forEach(function (v, i) {
7858
+ return _this2.payload[i].setValue(v, flush);
7859
+ });
7860
+ }
7861
+ } else {
7862
+ this.payload.forEach(function (p) {
7863
+ return p.setValue(value, flush);
7864
+ });
7865
+ }
7866
+ };
 
 
 
 
 
 
 
 
7867
 
7868
+ _proto.getValue = function getValue() {
7869
+ return this.payload.map(function (v) {
7870
+ return v.getValue();
7871
+ });
7872
+ };
7873
 
7874
+ _proto.interpolate = function interpolate(range, output) {
7875
+ return new AnimatedInterpolation(this, range, output);
7876
+ };
 
 
 
 
 
7877
 
7878
+ return AnimatedValueArray;
7879
+ }(AnimatedArray);
7880
 
7881
+ var G = 0;
7882
+
7883
+ var Controller =
7884
  /*#__PURE__*/
7885
+ function () {
7886
+ function Controller() {
7887
+ var _this = this;
7888
 
7889
+ this.id = void 0;
7890
+ this.idle = true;
7891
+ this.hasChanged = false;
7892
+ this.guid = 0;
7893
+ this.local = 0;
7894
+ this.props = {};
7895
+ this.merged = {};
7896
+ this.animations = {};
7897
+ this.interpolations = {};
7898
+ this.values = {};
7899
+ this.configs = [];
7900
+ this.listeners = [];
7901
+ this.queue = [];
7902
+ this.localQueue = void 0;
7903
+
7904
+ this.getValues = function () {
7905
+ return _this.interpolations;
7906
+ };
7907
+
7908
+ this.id = G++;
7909
  }
7910
+ /** update(props)
7911
+ * This function filters input props and creates an array of tasks which are executed in .start()
7912
+ * Each task is allowed to carry a delay, which means it can execute asnychroneously */
7913
 
 
7914
 
7915
+ var _proto = Controller.prototype;
 
7916
 
7917
+ _proto.update = function update$$1(args) {
7918
+ //this._id = n + this.id
7919
+ if (!args) return this; // Extract delay and the to-prop from props
 
 
7920
 
7921
+ var _ref = interpolateTo(args),
7922
+ _ref$delay = _ref.delay,
7923
+ delay = _ref$delay === void 0 ? 0 : _ref$delay,
7924
+ to = _ref.to,
7925
+ props = _objectWithoutPropertiesLoose(_ref, ["delay", "to"]);
7926
 
7927
+ if (is.arr(to) || is.fun(to)) {
7928
+ // If config is either a function or an array queue it up as is
7929
+ this.queue.push(_extends({}, props, {
7930
+ delay: delay,
7931
+ to: to
7932
+ }));
7933
+ } else if (to) {
7934
+ // Otherwise go through each key since it could be delayed individually
7935
+ var ops = {};
7936
+ Object.entries(to).forEach(function (_ref2) {
7937
+ var _to;
7938
 
7939
+ var k = _ref2[0],
7940
+ v = _ref2[1];
 
7941
 
7942
+ // Fetch delay and create an entry, consisting of the to-props, the delay, and basic props
7943
+ var entry = _extends({
7944
+ to: (_to = {}, _to[k] = v, _to),
7945
+ delay: callProp(delay, k)
7946
+ }, props);
7947
 
7948
+ var previous = ops[entry.delay] && ops[entry.delay].to;
7949
+ ops[entry.delay] = _extends({}, ops[entry.delay], entry, {
7950
+ to: _extends({}, previous, entry.to)
7951
+ });
7952
+ });
7953
+ this.queue = Object.values(ops);
7954
+ } // Sort queue, so that async calls go last
7955
 
 
7956
 
7957
+ this.queue = this.queue.sort(function (a, b) {
7958
+ return a.delay - b.delay;
7959
+ }); // Diff the reduced props immediately (they'll contain the from-prop and some config)
7960
 
7961
+ this.diff(props);
7962
+ return this;
7963
+ }
7964
+ /** start(onEnd)
7965
+ * This function either executes a queue, if present, or starts the frameloop, which animates */
7966
+ ;
7967
 
7968
+ _proto.start = function start$$1(onEnd) {
7969
+ var _this2 = this;
 
 
 
 
 
 
7970
 
7971
+ // If a queue is present we must excecute it
7972
+ if (this.queue.length) {
7973
+ this.idle = false; // Updates can interrupt trailing queues, in that case we just merge values
7974
 
7975
+ if (this.localQueue) {
7976
+ this.localQueue.forEach(function (_ref3) {
7977
+ var _ref3$from = _ref3.from,
7978
+ from = _ref3$from === void 0 ? {} : _ref3$from,
7979
+ _ref3$to = _ref3.to,
7980
+ to = _ref3$to === void 0 ? {} : _ref3$to;
7981
+ if (is.obj(from)) _this2.merged = _extends({}, from, _this2.merged);
7982
+ if (is.obj(to)) _this2.merged = _extends({}, _this2.merged, to);
7983
+ });
7984
+ } // The guid helps us tracking frames, a new queue over an old one means an override
7985
+ // We discard async calls in that caseÍ
7986
 
 
 
 
 
 
 
 
7987
 
7988
+ var local = this.local = ++this.guid;
7989
+ var queue = this.localQueue = this.queue;
7990
+ this.queue = []; // Go through each entry and execute it
7991
 
7992
+ queue.forEach(function (_ref4, index) {
7993
+ var delay = _ref4.delay,
7994
+ props = _objectWithoutPropertiesLoose(_ref4, ["delay"]);
 
7995
 
7996
+ var cb = function cb(finished) {
7997
+ if (index === queue.length - 1 && local === _this2.guid && finished) {
7998
+ _this2.idle = true;
7999
+ if (_this2.props.onRest) _this2.props.onRest(_this2.merged);
8000
+ }
8001
 
8002
+ if (onEnd) onEnd();
8003
+ }; // Entries can be delayed, ansyc or immediate
 
8004
 
 
8005
 
8006
+ var async = is.arr(props.to) || is.fun(props.to);
 
 
8007
 
8008
+ if (delay) {
8009
+ setTimeout(function () {
8010
+ if (local === _this2.guid) {
8011
+ if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
8012
+ }
8013
+ }, delay);
8014
+ } else if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
8015
+ });
8016
+ } // Otherwise we kick of the frameloop
8017
+ else {
8018
+ if (is.fun(onEnd)) this.listeners.push(onEnd);
8019
+ if (this.props.onStart) this.props.onStart();
8020
 
8021
+ start(this);
8022
+ }
 
8023
 
8024
+ return this;
8025
+ };
 
8026
 
8027
+ _proto.stop = function stop$$1(finished) {
8028
+ this.listeners.forEach(function (onEnd) {
8029
+ return onEnd(finished);
8030
+ });
8031
+ this.listeners = [];
8032
+ return this;
8033
  }
8034
+ /** Pause sets onEnd listeners free, but also removes the controller from the frameloop */
8035
+ ;
8036
 
8037
+ _proto.pause = function pause(finished) {
8038
+ this.stop(true);
8039
+ if (finished) stop(this);
8040
+ return this;
 
 
 
 
 
 
 
8041
  };
8042
 
8043
+ _proto.runAsync = function runAsync(_ref5, onEnd) {
8044
+ var _this3 = this;
 
 
 
 
 
 
 
8045
 
8046
+ var delay = _ref5.delay,
8047
+ props = _objectWithoutPropertiesLoose(_ref5, ["delay"]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8048
 
8049
+ var local = this.local; // If "to" is either a function or an array it will be processed async, therefor "to" should be empty right now
8050
+ // If the view relies on certain values "from" has to be present
8051
 
8052
+ var queue = Promise.resolve(undefined);
8053
 
8054
+ if (is.arr(props.to)) {
8055
+ var _loop = function _loop(i) {
8056
+ var index = i;
8057
 
8058
+ var fresh = _extends({}, props, interpolateTo(props.to[index]));
 
 
 
8059
 
8060
+ if (is.arr(fresh.config)) fresh.config = fresh.config[index];
8061
+ queue = queue.then(function () {
8062
+ //this.stop()
8063
+ if (local === _this3.guid) return new Promise(function (r) {
8064
+ return _this3.diff(fresh).start(r);
8065
+ });
8066
+ });
8067
+ };
8068
 
8069
+ for (var i = 0; i < props.to.length; i++) {
8070
+ _loop(i);
8071
+ }
8072
+ } else if (is.fun(props.to)) {
8073
+ var index = 0;
8074
+ var last;
8075
+ queue = queue.then(function () {
8076
+ return props.to( // next(props)
8077
+ function (p) {
8078
+ var fresh = _extends({}, props, interpolateTo(p));
8079
 
8080
+ if (is.arr(fresh.config)) fresh.config = fresh.config[index];
8081
+ index++; //this.stop()
8082
 
8083
+ if (local === _this3.guid) return last = new Promise(function (r) {
8084
+ return _this3.diff(fresh).start(r);
8085
+ });
8086
+ return;
8087
+ }, // cancel()
8088
+ function (finished) {
8089
+ if (finished === void 0) {
8090
+ finished = true;
8091
+ }
8092
 
8093
+ return _this3.stop(finished);
8094
+ }).then(function () {
8095
+ return last;
8096
+ });
 
 
 
 
8097
  });
8098
+ }
8099
+
8100
+ queue.then(onEnd);
 
 
8101
  };
8102
 
8103
+ _proto.diff = function diff(props) {
8104
+ var _this4 = this;
8105
 
8106
+ this.props = _extends({}, this.props, props);
8107
+ var _this$props = this.props,
8108
+ _this$props$from = _this$props.from,
8109
+ from = _this$props$from === void 0 ? {} : _this$props$from,
8110
+ _this$props$to = _this$props.to,
8111
+ to = _this$props$to === void 0 ? {} : _this$props$to,
8112
+ _this$props$config = _this$props.config,
8113
+ config = _this$props$config === void 0 ? {} : _this$props$config,
8114
+ reverse = _this$props.reverse,
8115
+ attach = _this$props.attach,
8116
+ reset = _this$props.reset,
8117
+ immediate = _this$props.immediate; // Reverse values when requested
8118
 
8119
+ if (reverse) {
8120
+ var _ref6 = [to, from];
8121
+ from = _ref6[0];
8122
+ to = _ref6[1];
8123
+ } // This will collect all props that were ever set, reset merged props when necessary
8124
 
 
 
8125
 
8126
+ this.merged = _extends({}, from, this.merged, to);
8127
+ this.hasChanged = false; // Attachment handling, trailed springs can "attach" themselves to a previous spring
 
8128
 
8129
+ var target = attach && attach(this); // Reduces input { name: value } pairs into animated values
 
 
 
 
 
 
8130
 
8131
+ this.animations = Object.entries(this.merged).reduce(function (acc, _ref7) {
8132
+ var name = _ref7[0],
8133
+ value = _ref7[1];
8134
+ // Issue cached entries, except on reset
8135
+ var entry = acc[name] || {}; // Figure out what the value is supposed to be
8136
 
8137
+ var isNumber = is.num(value);
8138
+ var isString = is.str(value) && !value.startsWith('#') && !/\d/.test(value) && !colorNames[value];
8139
+ var isArray = is.arr(value);
8140
+ var isInterpolation = !isNumber && !isArray && !isString;
8141
+ var fromValue = !is.und(from[name]) ? from[name] : value;
8142
+ var toValue = isNumber || isArray ? value : isString ? value : 1;
8143
+ var toConfig = callProp(config, name);
8144
+ if (target) toValue = target.animations[name].parent;
8145
+ var parent = entry.parent,
8146
+ interpolation$$1 = entry.interpolation,
8147
+ toValues = toArray(target ? toValue.getPayload() : toValue),
8148
+ animatedValues;
8149
+ var newValue = value;
8150
+ if (isInterpolation) newValue = interpolation({
8151
+ range: [0, 1],
8152
+ output: [value, value]
8153
+ })(1);
8154
+ var currentValue = interpolation$$1 && interpolation$$1.getValue(); // Change detection flags
8155
 
8156
+ var isFirst = is.und(parent);
8157
+ var isActive = !isFirst && entry.animatedValues.some(function (v) {
8158
+ return !v.done;
8159
+ });
8160
+ var currentValueDiffersFromGoal = !is.equ(newValue, currentValue);
8161
+ var hasNewGoal = !is.equ(newValue, entry.previous);
8162
+ var hasNewConfig = !is.equ(toConfig, entry.config); // Change animation props when props indicate a new goal (new value differs from previous one)
8163
+ // and current values differ from it. Config changes trigger a new update as well (though probably shouldn't?)
8164
 
8165
+ if (reset || hasNewGoal && currentValueDiffersFromGoal || hasNewConfig) {
8166
+ var _extends2;
 
8167
 
8168
+ // Convert regular values into animated values, ALWAYS re-use if possible
8169
+ if (isNumber || isString) parent = interpolation$$1 = entry.parent || new AnimatedValue(fromValue);else if (isArray) parent = interpolation$$1 = entry.parent || new AnimatedValueArray(fromValue);else if (isInterpolation) {
8170
+ var prev = entry.interpolation && entry.interpolation.calc(entry.parent.value);
8171
+ prev = prev !== void 0 && !reset ? prev : fromValue;
8172
 
8173
+ if (entry.parent) {
8174
+ parent = entry.parent;
8175
+ parent.setValue(0, false);
8176
+ } else parent = new AnimatedValue(0);
 
 
 
 
 
 
 
 
 
 
 
 
 
8177
 
8178
+ var range = {
8179
+ output: [prev, value]
8180
+ };
8181
 
8182
+ if (entry.interpolation) {
8183
+ interpolation$$1 = entry.interpolation;
8184
+ entry.interpolation.updateConfig(range);
8185
+ } else interpolation$$1 = parent.interpolate(range);
8186
+ }
8187
+ toValues = toArray(target ? toValue.getPayload() : toValue);
8188
+ animatedValues = toArray(parent.getPayload());
8189
+ if (reset && !isInterpolation) parent.setValue(fromValue, false);
8190
+ _this4.hasChanged = true; // Reset animated values
8191
 
8192
+ animatedValues.forEach(function (value) {
8193
+ value.startPosition = value.value;
8194
+ value.lastPosition = value.value;
8195
+ value.lastVelocity = isActive ? value.lastVelocity : undefined;
8196
+ value.lastTime = isActive ? value.lastTime : undefined;
8197
+ value.startTime = now();
8198
+ value.done = false;
8199
+ value.animatedStyles.clear();
8200
+ }); // Set immediate values
8201
 
8202
+ if (callProp(immediate, name)) {
8203
+ parent.setValue(isInterpolation ? toValue : value, false);
8204
+ }
8205
 
8206
+ return _extends({}, acc, (_extends2 = {}, _extends2[name] = _extends({}, entry, {
8207
+ name: name,
8208
+ parent: parent,
8209
+ interpolation: interpolation$$1,
8210
+ animatedValues: animatedValues,
8211
+ toValues: toValues,
8212
+ previous: newValue,
8213
+ config: toConfig,
8214
+ fromValues: toArray(parent.getValue()),
8215
+ immediate: callProp(immediate, name),
8216
+ initialVelocity: withDefault(toConfig.velocity, 0),
8217
+ clamp: withDefault(toConfig.clamp, false),
8218
+ precision: withDefault(toConfig.precision, 0.01),
8219
+ tension: withDefault(toConfig.tension, 170),
8220
+ friction: withDefault(toConfig.friction, 26),
8221
+ mass: withDefault(toConfig.mass, 1),
8222
+ duration: toConfig.duration,
8223
+ easing: withDefault(toConfig.easing, function (t) {
8224
+ return t;
8225
+ }),
8226
+ decay: toConfig.decay
8227
+ }), _extends2));
8228
+ } else {
8229
+ if (!currentValueDiffersFromGoal) {
8230
+ var _extends3;
8231
 
8232
+ // So ... the current target value (newValue) appears to be different from the previous value,
8233
+ // which normally constitutes an update, but the actual value (currentValue) matches the target!
8234
+ // In order to resolve this without causing an animation update we silently flag the animation as done,
8235
+ // which it technically is. Interpolations also needs a config update with their target set to 1.
8236
+ if (isInterpolation) {
8237
+ parent.setValue(1, false);
8238
+ interpolation$$1.updateConfig({
8239
+ output: [newValue, newValue]
8240
+ });
8241
+ }
8242
 
8243
+ parent.done = true;
8244
+ _this4.hasChanged = true;
8245
+ return _extends({}, acc, (_extends3 = {}, _extends3[name] = _extends({}, acc[name], {
8246
+ previous: newValue
8247
+ }), _extends3));
8248
+ }
8249
 
8250
+ return acc;
8251
+ }
8252
+ }, this.animations);
8253
 
8254
+ if (this.hasChanged) {
8255
+ // Make animations available to frameloop
8256
+ this.configs = Object.values(this.animations);
8257
+ this.values = {};
8258
+ this.interpolations = {};
8259
 
8260
+ for (var key in this.animations) {
8261
+ this.interpolations[key] = this.animations[key].interpolation;
8262
+ this.values[key] = this.animations[key].interpolation.getValue();
8263
+ }
8264
+ }
8265
 
8266
+ return this;
8267
+ };
8268
 
8269
+ _proto.destroy = function destroy() {
8270
+ this.stop();
8271
+ this.props = {};
8272
+ this.merged = {};
8273
+ this.animations = {};
8274
+ this.interpolations = {};
8275
+ this.values = {};
8276
+ this.configs = [];
8277
+ this.local = 0;
8278
+ };
8279
 
8280
+ return Controller;
8281
+ }();
8282
 
8283
+ /** API
8284
+ * const props = useSprings(number, [{ ... }, { ... }, ...])
8285
+ * const [props, set] = useSprings(number, (i, controller) => ({ ... }))
8286
+ */
8287
 
8288
+ var useSprings = function useSprings(length, props) {
8289
+ var mounted = React.useRef(false);
8290
+ var ctrl = React.useRef();
8291
+ var isFn = is.fun(props); // The controller maintains the animation values, starts and stops animations
8292
 
8293
+ var _useMemo = React.useMemo(function () {
8294
+ // Remove old controllers
8295
+ if (ctrl.current) {
8296
+ ctrl.current.map(function (c) {
8297
+ return c.destroy();
8298
+ });
8299
+ ctrl.current = undefined;
8300
+ }
8301
 
8302
+ var ref;
8303
+ return [new Array(length).fill().map(function (_, i) {
8304
+ var ctrl = new Controller();
8305
+ var newProps = isFn ? callProp(props, i, ctrl) : props[i];
8306
+ if (i === 0) ref = newProps.ref;
8307
+ ctrl.update(newProps);
8308
+ if (!ref) ctrl.start();
8309
+ return ctrl;
8310
+ }), ref];
8311
+ }, [length]),
8312
+ controllers = _useMemo[0],
8313
+ ref = _useMemo[1];
8314
 
8315
+ ctrl.current = controllers; // The hooks reference api gets defined here ...
 
8316
 
8317
+ var api = React.useImperativeHandle(ref, function () {
8318
+ return {
8319
+ start: function start() {
8320
+ return Promise.all(ctrl.current.map(function (c) {
8321
+ return new Promise(function (r) {
8322
+ return c.start(r);
8323
+ });
8324
+ }));
8325
+ },
8326
+ stop: function stop(finished) {
8327
+ return ctrl.current.forEach(function (c) {
8328
+ return c.stop(finished);
8329
+ });
8330
+ },
8331
 
8332
+ get controllers() {
8333
+ return ctrl.current;
8334
+ }
8335
 
8336
+ };
8337
+ }); // This function updates the controllers
8338
 
8339
+ var updateCtrl = React.useMemo(function () {
8340
+ return function (updateProps) {
8341
+ return ctrl.current.map(function (c, i) {
8342
+ c.update(isFn ? callProp(updateProps, i, c) : updateProps[i]);
8343
+ if (!ref) c.start();
8344
+ });
8345
+ };
8346
+ }, [length]); // Update controller if props aren't functional
8347
 
8348
+ React.useEffect(function () {
8349
+ if (mounted.current) {
8350
+ if (!isFn) updateCtrl(props);
8351
+ } else if (!ref) ctrl.current.forEach(function (c) {
8352
+ return c.start();
8353
+ });
8354
+ }); // Update mounted flag and destroy controller on unmount
8355
 
8356
+ React.useEffect(function () {
8357
+ return mounted.current = true, function () {
8358
+ return ctrl.current.forEach(function (c) {
8359
+ return c.destroy();
8360
+ });
8361
+ };
8362
+ }, []); // Return animated props, or, anim-props + the update-setter above
8363
 
8364
+ var propValues = ctrl.current.map(function (c) {
8365
+ return c.getValues();
8366
+ });
8367
+ return isFn ? [propValues, updateCtrl, function (finished) {
8368
+ return ctrl.current.forEach(function (c) {
8369
+ return c.pause(finished);
8370
+ });
8371
+ }] : propValues;
8372
+ };
8373
 
8374
+ /** API
8375
+ * const props = useSpring({ ... })
8376
+ * const [props, set] = useSpring(() => ({ ... }))
8377
+ */
8378
 
8379
+ var useSpring = function useSpring(props) {
8380
+ var isFn = is.fun(props);
8381
 
8382
+ var _useSprings = useSprings(1, isFn ? props : [props]),
8383
+ result = _useSprings[0],
8384
+ set = _useSprings[1],
8385
+ pause = _useSprings[2];
8386
 
8387
+ return isFn ? [result[0], set, pause] : result;
8388
+ };
8389
 
8390
+ /** API
8391
+ * const trails = useTrail(number, { ... })
8392
+ * const [trails, set] = useTrail(number, () => ({ ... }))
8393
+ */
8394
 
8395
+ var useTrail = function useTrail(length, props) {
8396
+ var mounted = React.useRef(false);
8397
+ var isFn = is.fun(props);
8398
+ var updateProps = callProp(props);
8399
+ var instances = React.useRef();
8400
 
8401
+ var _useSprings = useSprings(length, function (i, ctrl) {
8402
+ if (i === 0) instances.current = [];
8403
+ instances.current.push(ctrl);
8404
+ return _extends({}, updateProps, {
8405
+ config: callProp(updateProps.config, i),
8406
+ attach: i > 0 && function () {
8407
+ return instances.current[i - 1];
8408
+ }
8409
+ });
8410
+ }),
8411
+ result = _useSprings[0],
8412
+ set = _useSprings[1],
8413
+ pause = _useSprings[2]; // Set up function to update controller
8414
 
8415
 
8416
+ var updateCtrl = React.useMemo(function () {
8417
+ return function (props) {
8418
+ return set(function (i, ctrl) {
8419
+ var last = props.reverse ? i === 0 : length - 1 === i;
8420
+ var attachIdx = props.reverse ? i + 1 : i - 1;
8421
+ var attachController = instances.current[attachIdx];
8422
+ return _extends({}, props, {
8423
+ config: callProp(props.config || updateProps.config, i),
8424
+ attach: attachController && function () {
8425
+ return attachController;
8426
+ }
8427
+ });
8428
+ });
8429
+ };
8430
+ }, [length, updateProps.reverse]); // Update controller if props aren't functional
8431
 
8432
+ React.useEffect(function () {
8433
+ return void (mounted.current && !isFn && updateCtrl(props));
8434
+ }); // Update mounted flag and destroy controller on unmount
8435
 
8436
+ React.useEffect(function () {
8437
+ return void (mounted.current = true);
8438
+ }, []);
8439
+ return isFn ? [result, updateCtrl, pause] : result;
8440
+ };
8441
 
8442
+ /** API
8443
+ * const transitions = useTransition(items, itemKeys, { ... })
8444
+ * const [transitions, update] = useTransition(items, itemKeys, () => ({ ... }))
8445
+ */
8446
 
8447
+ var guid = 0;
8448
+ var ENTER = 'enter';
8449
+ var LEAVE = 'leave';
8450
+ var UPDATE = 'update';
8451
 
8452
+ var mapKeys = function mapKeys(items, keys) {
8453
+ return (typeof keys === 'function' ? items.map(keys) : toArray(keys)).map(String);
8454
+ };
8455
 
8456
+ var get = function get(props) {
8457
+ var items = props.items,
8458
+ _props$keys = props.keys,
8459
+ keys = _props$keys === void 0 ? function (item) {
8460
+ return item;
8461
+ } : _props$keys,
8462
+ rest = _objectWithoutPropertiesLoose(props, ["items", "keys"]);
8463
 
8464
+ items = toArray(items !== void 0 ? items : null);
8465
+ return _extends({
8466
+ items: items,
8467
+ keys: mapKeys(items, keys)
8468
+ }, rest);
8469
+ };
8470
 
8471
+ function useTransition(input, keyTransform, config) {
8472
+ var props = _extends({
8473
+ items: input,
8474
+ keys: keyTransform || function (i) {
8475
+ return i;
8476
+ }
8477
+ }, config);
8478
 
8479
+ var _get = get(props),
8480
+ _get$lazy = _get.lazy,
8481
+ lazy = _get$lazy === void 0 ? false : _get$lazy,
8482
+ _get$unique = _get.unique,
8483
+ _get$reset = _get.reset,
8484
+ reset = _get$reset === void 0 ? false : _get$reset,
8485
+ enter = _get.enter,
8486
+ leave = _get.leave,
8487
+ update = _get.update,
8488
+ onDestroyed = _get.onDestroyed,
8489
+ keys = _get.keys,
8490
+ items = _get.items,
8491
+ onFrame = _get.onFrame,
8492
+ _onRest = _get.onRest,
8493
+ onStart = _get.onStart,
8494
+ ref = _get.ref,
8495
+ extra = _objectWithoutPropertiesLoose(_get, ["lazy", "unique", "reset", "enter", "leave", "update", "onDestroyed", "keys", "items", "onFrame", "onRest", "onStart", "ref"]);
8496
 
8497
+ var forceUpdate = useForceUpdate();
8498
+ var mounted = React.useRef(false);
8499
+ var state = React.useRef({
8500
+ mounted: false,
8501
+ first: true,
8502
+ deleted: [],
8503
+ current: {},
8504
+ transitions: [],
8505
+ prevProps: {},
8506
+ paused: !!props.ref,
8507
+ instances: !mounted.current && new Map(),
8508
+ forceUpdate: forceUpdate
8509
+ });
8510
+ React.useImperativeHandle(props.ref, function () {
8511
+ return {
8512
+ start: function start() {
8513
+ return Promise.all(Array.from(state.current.instances).map(function (_ref) {
8514
+ var c = _ref[1];
8515
+ return new Promise(function (r) {
8516
+ return c.start(r);
8517
+ });
8518
+ }));
8519
+ },
8520
+ stop: function stop(finished) {
8521
+ return Array.from(state.current.instances).forEach(function (_ref2) {
8522
+ var c = _ref2[1];
8523
+ return c.stop(finished);
8524
+ });
8525
+ },
8526
 
8527
+ get controllers() {
8528
+ return Array.from(state.current.instances).map(function (_ref3) {
8529
+ var c = _ref3[1];
8530
+ return c;
8531
+ });
8532
+ }
8533
 
8534
+ };
8535
+ }); // Update state
8536
 
8537
+ state.current = diffItems(state.current, props);
8538
 
8539
+ if (state.current.changed) {
8540
+ // Update state
8541
+ state.current.transitions.forEach(function (transition) {
8542
+ var slot = transition.slot,
8543
+ from = transition.from,
8544
+ to = transition.to,
8545
+ config = transition.config,
8546
+ trail = transition.trail,
8547
+ key = transition.key,
8548
+ item = transition.item;
8549
+ if (!state.current.instances.has(key)) state.current.instances.set(key, new Controller()); // update the map object
 
 
 
8550
 
8551
+ var ctrl = state.current.instances.get(key);
8552
 
8553
+ var newProps = _extends({}, extra, {
8554
+ to: to,
8555
+ from: from,
8556
+ config: config,
8557
+ ref: ref,
8558
+ onRest: function onRest(values) {
8559
+ if (state.current.mounted) {
8560
+ if (transition.destroyed) {
8561
+ // If no ref is given delete destroyed items immediately
8562
+ if (!ref && !lazy) cleanUp(state, key);
8563
+ if (onDestroyed) onDestroyed(item);
8564
+ } // A transition comes to rest once all its springs conclude
8565
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8566
 
8567
+ var curInstances = Array.from(state.current.instances);
8568
+ var active = curInstances.some(function (_ref4) {
8569
+ var c = _ref4[1];
8570
+ return !c.idle;
8571
+ });
8572
+ if (!active && (ref || lazy) && state.current.deleted.length > 0) cleanUp(state);
8573
+ if (_onRest) _onRest(item, slot, values);
8574
+ }
8575
+ },
8576
+ onStart: onStart && function () {
8577
+ return onStart(item, slot);
8578
+ },
8579
+ onFrame: onFrame && function (values) {
8580
+ return onFrame(item, slot, values);
8581
+ },
8582
+ delay: trail,
8583
+ reset: reset && slot === ENTER // Update controller
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8584
 
8585
+ });
 
 
8586
 
8587
+ ctrl.update(newProps);
8588
+ if (!state.current.paused) ctrl.start();
 
 
8589
  });
8590
  }
8591
 
8592
+ React.useEffect(function () {
8593
+ state.current.mounted = mounted.current = true;
8594
+ return function () {
8595
+ state.current.mounted = mounted.current = false;
8596
+ Array.from(state.current.instances).map(function (_ref5) {
8597
+ var c = _ref5[1];
8598
+ return c.destroy();
8599
+ });
8600
+ state.current.instances.clear();
8601
+ };
8602
+ }, []);
8603
+ return state.current.transitions.map(function (_ref6) {
8604
+ var item = _ref6.item,
8605
+ slot = _ref6.slot,
8606
+ key = _ref6.key;
8607
+ return {
8608
+ item: item,
8609
+ key: key,
8610
+ state: slot,
8611
+ props: state.current.instances.get(key).getValues()
8612
+ };
8613
+ });
8614
+ }
8615
 
8616
+ function cleanUp(state, filterKey) {
8617
+ var deleted = state.current.deleted;
 
 
 
 
 
 
8618
 
8619
+ var _loop = function _loop() {
8620
+ if (_isArray) {
8621
+ if (_i >= _iterator.length) return "break";
8622
+ _ref8 = _iterator[_i++];
8623
+ } else {
8624
+ _i = _iterator.next();
8625
+ if (_i.done) return "break";
8626
+ _ref8 = _i.value;
8627
+ }
8628
 
8629
+ var _ref7 = _ref8;
8630
+ var key = _ref7.key;
 
8631
 
8632
+ var filter = function filter(t) {
8633
+ return t.key !== key;
8634
+ };
 
 
 
8635
 
8636
+ if (is.und(filterKey) || filterKey === key) {
8637
+ state.current.instances.delete(key);
8638
+ state.current.transitions = state.current.transitions.filter(filter);
8639
+ state.current.deleted = state.current.deleted.filter(filter);
8640
+ }
8641
+ };
8642
 
8643
+ for (var _iterator = deleted, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
8644
+ var _ref8;
8645
 
8646
+ var _ret = _loop();
 
8647
 
8648
+ if (_ret === "break") break;
8649
  }
8650
 
8651
+ state.current.forceUpdate();
8652
+ }
 
 
 
 
 
 
 
 
 
8653
 
8654
+ function diffItems(_ref9, props) {
8655
+ var first = _ref9.first,
8656
+ prevProps = _ref9.prevProps,
8657
+ state = _objectWithoutPropertiesLoose(_ref9, ["first", "prevProps"]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8658
 
8659
+ var _get2 = get(props),
8660
+ items = _get2.items,
8661
+ keys = _get2.keys,
8662
+ initial = _get2.initial,
8663
+ from = _get2.from,
8664
+ enter = _get2.enter,
8665
+ leave = _get2.leave,
8666
+ update = _get2.update,
8667
+ _get2$trail = _get2.trail,
8668
+ trail = _get2$trail === void 0 ? 0 : _get2$trail,
8669
+ unique = _get2.unique,
8670
+ config = _get2.config,
8671
+ _get2$order = _get2.order,
8672
+ order = _get2$order === void 0 ? [ENTER, LEAVE, UPDATE] : _get2$order;
8673
 
8674
+ var _get3 = get(prevProps),
8675
+ _keys = _get3.keys,
8676
+ _items = _get3.items;
 
 
 
8677
 
8678
+ var current = _extends({}, state.current);
 
 
 
 
 
 
8679
 
8680
+ var deleted = [].concat(state.deleted); // Compare next keys with current keys
8681
 
8682
+ var currentKeys = Object.keys(current);
8683
+ var currentSet = new Set(currentKeys);
8684
+ var nextSet = new Set(keys);
8685
+ var added = keys.filter(function (item) {
8686
+ return !currentSet.has(item);
8687
  });
8688
+ var removed = state.transitions.filter(function (item) {
8689
+ return !item.destroyed && !nextSet.has(item.originalKey);
8690
+ }).map(function (i) {
8691
+ return i.originalKey;
 
 
 
8692
  });
8693
+ var updated = keys.filter(function (item) {
8694
+ return currentSet.has(item);
 
 
 
8695
  });
8696
+ var delay = -trail;
8697
 
8698
+ while (order.length) {
8699
+ var changeType = order.shift();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8700
 
8701
+ switch (changeType) {
8702
+ case ENTER:
8703
+ {
8704
+ added.forEach(function (key, index) {
8705
+ // In unique mode, remove fading out transitions if their key comes in again
8706
+ if (unique && deleted.find(function (d) {
8707
+ return d.originalKey === key;
8708
+ })) deleted = deleted.filter(function (t) {
8709
+ return t.originalKey !== key;
8710
+ });
8711
+ var keyIndex = keys.indexOf(key);
8712
+ var item = items[keyIndex];
8713
+ var slot = first && initial !== void 0 ? 'initial' : ENTER;
8714
+ current[key] = {
8715
+ slot: slot,
8716
+ originalKey: key,
8717
+ key: unique ? String(key) : guid++,
8718
+ item: item,
8719
+ trail: delay = delay + trail,
8720
+ config: callProp(config, item, slot),
8721
+ from: callProp(first ? initial !== void 0 ? initial || {} : from : from, item),
8722
+ to: callProp(enter, item)
8723
+ };
8724
+ });
8725
+ break;
8726
+ }
8727
 
8728
+ case LEAVE:
8729
+ {
8730
+ removed.forEach(function (key) {
8731
+ var keyIndex = _keys.indexOf(key);
8732
 
8733
+ var item = _items[keyIndex];
8734
+ var slot = LEAVE;
8735
+ deleted.unshift(_extends({}, current[key], {
8736
+ slot: slot,
8737
+ destroyed: true,
8738
+ left: _keys[Math.max(0, keyIndex - 1)],
8739
+ right: _keys[Math.min(_keys.length, keyIndex + 1)],
8740
+ trail: delay = delay + trail,
8741
+ config: callProp(config, item, slot),
8742
+ to: callProp(leave, item)
8743
+ }));
8744
+ delete current[key];
8745
+ });
8746
+ break;
8747
+ }
8748
 
8749
+ case UPDATE:
8750
+ {
8751
+ updated.forEach(function (key) {
8752
+ var keyIndex = keys.indexOf(key);
8753
+ var item = items[keyIndex];
8754
+ var slot = UPDATE;
8755
+ current[key] = _extends({}, current[key], {
8756
+ item: item,
8757
+ slot: slot,
8758
+ trail: delay = delay + trail,
8759
+ config: callProp(config, item, slot),
8760
+ to: callProp(update, item)
8761
+ });
8762
+ });
8763
+ break;
8764
+ }
8765
+ }
8766
+ }
8767
 
8768
+ var out = keys.map(function (key) {
8769
+ return current[key];
8770
+ }); // This tries to restore order for deleted items by finding their last known siblings
8771
+ // only using the left sibling to keep order placement consistent for all deleted items
8772
 
8773
+ deleted.forEach(function (_ref10) {
8774
+ var left = _ref10.left,
8775
+ right = _ref10.right,
8776
+ item = _objectWithoutPropertiesLoose(_ref10, ["left", "right"]);
8777
 
8778
+ var pos; // Was it the element on the left, if yes, move there ...
 
 
 
 
 
 
 
 
 
 
8779
 
8780
+ if ((pos = out.findIndex(function (t) {
8781
+ return t.originalKey === left;
8782
+ })) !== -1) pos += 1; // And if nothing else helps, move it to the start ¯\_(ツ)_/¯
8783
 
8784
+ pos = Math.max(0, pos);
8785
+ out = [].concat(out.slice(0, pos), [item], out.slice(pos));
8786
+ });
8787
+ return _extends({}, state, {
8788
+ changed: added.length || removed.length || updated.length,
8789
+ first: first && added.length === 0,
8790
+ transitions: out,
8791
+ current: current,
8792
+ deleted: deleted,
8793
+ prevProps: props
8794
+ });
8795
+ }
8796
 
8797
+ var AnimatedStyle =
8798
+ /*#__PURE__*/
8799
+ function (_AnimatedObject) {
8800
+ _inheritsLoose(AnimatedStyle, _AnimatedObject);
 
 
 
 
 
 
8801
 
8802
+ function AnimatedStyle(style) {
8803
+ var _this;
8804
 
8805
+ if (style === void 0) {
8806
+ style = {};
8807
+ }
8808
 
8809
+ _this = _AnimatedObject.call(this) || this;
 
 
 
8810
 
8811
+ if (style.transform && !(style.transform instanceof Animated)) {
8812
+ style = applyAnimatedValues.transform(style);
8813
+ }
8814
 
8815
+ _this.payload = style;
8816
+ return _this;
8817
+ }
8818
 
8819
+ return AnimatedStyle;
8820
+ }(AnimatedObject);
8821
 
8822
+ // http://www.w3.org/TR/css3-color/#svg-color
8823
+ var colors = {
8824
+ transparent: 0x00000000,
8825
+ aliceblue: 0xf0f8ffff,
8826
+ antiquewhite: 0xfaebd7ff,
8827
+ aqua: 0x00ffffff,
8828
+ aquamarine: 0x7fffd4ff,
8829
+ azure: 0xf0ffffff,
8830
+ beige: 0xf5f5dcff,
8831
+ bisque: 0xffe4c4ff,
8832
+ black: 0x000000ff,
8833
+ blanchedalmond: 0xffebcdff,
8834
+ blue: 0x0000ffff,
8835
+ blueviolet: 0x8a2be2ff,
8836
+ brown: 0xa52a2aff,
8837
+ burlywood: 0xdeb887ff,
8838
+ burntsienna: 0xea7e5dff,
8839
+ cadetblue: 0x5f9ea0ff,
8840
+ chartreuse: 0x7fff00ff,
8841
+ chocolate: 0xd2691eff,
8842
+ coral: 0xff7f50ff,
8843
+ cornflowerblue: 0x6495edff,
8844
+ cornsilk: 0xfff8dcff,
8845
+ crimson: 0xdc143cff,
8846
+ cyan: 0x00ffffff,
8847
+ darkblue: 0x00008bff,
8848
+ darkcyan: 0x008b8bff,
8849
+ darkgoldenrod: 0xb8860bff,
8850
+ darkgray: 0xa9a9a9ff,
8851
+ darkgreen: 0x006400ff,
8852
+ darkgrey: 0xa9a9a9ff,
8853
+ darkkhaki: 0xbdb76bff,
8854
+ darkmagenta: 0x8b008bff,
8855
+ darkolivegreen: 0x556b2fff,
8856
+ darkorange: 0xff8c00ff,
8857
+ darkorchid: 0x9932ccff,
8858
+ darkred: 0x8b0000ff,
8859
+ darksalmon: 0xe9967aff,
8860
+ darkseagreen: 0x8fbc8fff,
8861
+ darkslateblue: 0x483d8bff,
8862
+ darkslategray: 0x2f4f4fff,
8863
+ darkslategrey: 0x2f4f4fff,
8864
+ darkturquoise: 0x00ced1ff,
8865
+ darkviolet: 0x9400d3ff,
8866
+ deeppink: 0xff1493ff,
8867
+ deepskyblue: 0x00bfffff,
8868
+ dimgray: 0x696969ff,
8869
+ dimgrey: 0x696969ff,
8870
+ dodgerblue: 0x1e90ffff,
8871
+ firebrick: 0xb22222ff,
8872
+ floralwhite: 0xfffaf0ff,
8873
+ forestgreen: 0x228b22ff,
8874
+ fuchsia: 0xff00ffff,
8875
+ gainsboro: 0xdcdcdcff,
8876
+ ghostwhite: 0xf8f8ffff,
8877
+ gold: 0xffd700ff,
8878
+ goldenrod: 0xdaa520ff,
8879
+ gray: 0x808080ff,
8880
+ green: 0x008000ff,
8881
+ greenyellow: 0xadff2fff,
8882
+ grey: 0x808080ff,
8883
+ honeydew: 0xf0fff0ff,
8884
+ hotpink: 0xff69b4ff,
8885
+ indianred: 0xcd5c5cff,
8886
+ indigo: 0x4b0082ff,
8887
+ ivory: 0xfffff0ff,
8888
+ khaki: 0xf0e68cff,
8889
+ lavender: 0xe6e6faff,
8890
+ lavenderblush: 0xfff0f5ff,
8891
+ lawngreen: 0x7cfc00ff,
8892
+ lemonchiffon: 0xfffacdff,
8893
+ lightblue: 0xadd8e6ff,
8894
+ lightcoral: 0xf08080ff,
8895
+ lightcyan: 0xe0ffffff,
8896
+ lightgoldenrodyellow: 0xfafad2ff,
8897
+ lightgray: 0xd3d3d3ff,
8898
+ lightgreen: 0x90ee90ff,
8899
+ lightgrey: 0xd3d3d3ff,
8900
+ lightpink: 0xffb6c1ff,
8901
+ lightsalmon: 0xffa07aff,
8902
+ lightseagreen: 0x20b2aaff,
8903
+ lightskyblue: 0x87cefaff,
8904
+ lightslategray: 0x778899ff,
8905
+ lightslategrey: 0x778899ff,
8906
+ lightsteelblue: 0xb0c4deff,
8907
+ lightyellow: 0xffffe0ff,
8908
+ lime: 0x00ff00ff,
8909
+ limegreen: 0x32cd32ff,
8910
+ linen: 0xfaf0e6ff,
8911
+ magenta: 0xff00ffff,
8912
+ maroon: 0x800000ff,
8913
+ mediumaquamarine: 0x66cdaaff,
8914
+ mediumblue: 0x0000cdff,
8915
+ mediumorchid: 0xba55d3ff,
8916
+ mediumpurple: 0x9370dbff,
8917
+ mediumseagreen: 0x3cb371ff,
8918
+ mediumslateblue: 0x7b68eeff,
8919
+ mediumspringgreen: 0x00fa9aff,
8920
+ mediumturquoise: 0x48d1ccff,
8921
+ mediumvioletred: 0xc71585ff,
8922
+ midnightblue: 0x191970ff,
8923
+ mintcream: 0xf5fffaff,
8924
+ mistyrose: 0xffe4e1ff,
8925
+ moccasin: 0xffe4b5ff,
8926
+ navajowhite: 0xffdeadff,
8927
+ navy: 0x000080ff,
8928
+ oldlace: 0xfdf5e6ff,
8929
+ olive: 0x808000ff,
8930
+ olivedrab: 0x6b8e23ff,
8931
+ orange: 0xffa500ff,
8932
+ orangered: 0xff4500ff,
8933
+ orchid: 0xda70d6ff,
8934
+ palegoldenrod: 0xeee8aaff,
8935
+ palegreen: 0x98fb98ff,
8936
+ paleturquoise: 0xafeeeeff,
8937
+ palevioletred: 0xdb7093ff,
8938
+ papayawhip: 0xffefd5ff,
8939
+ peachpuff: 0xffdab9ff,
8940
+ peru: 0xcd853fff,
8941
+ pink: 0xffc0cbff,
8942
+ plum: 0xdda0ddff,
8943
+ powderblue: 0xb0e0e6ff,
8944
+ purple: 0x800080ff,
8945
+ rebeccapurple: 0x663399ff,
8946
+ red: 0xff0000ff,
8947
+ rosybrown: 0xbc8f8fff,
8948
+ royalblue: 0x4169e1ff,
8949
+ saddlebrown: 0x8b4513ff,
8950
+ salmon: 0xfa8072ff,
8951
+ sandybrown: 0xf4a460ff,
8952
+ seagreen: 0x2e8b57ff,
8953
+ seashell: 0xfff5eeff,
8954
+ sienna: 0xa0522dff,
8955
+ silver: 0xc0c0c0ff,
8956
+ skyblue: 0x87ceebff,
8957
+ slateblue: 0x6a5acdff,
8958
+ slategray: 0x708090ff,
8959
+ slategrey: 0x708090ff,
8960
+ snow: 0xfffafaff,
8961
+ springgreen: 0x00ff7fff,
8962
+ steelblue: 0x4682b4ff,
8963
+ tan: 0xd2b48cff,
8964
+ teal: 0x008080ff,
8965
+ thistle: 0xd8bfd8ff,
8966
+ tomato: 0xff6347ff,
8967
+ turquoise: 0x40e0d0ff,
8968
+ violet: 0xee82eeff,
8969
+ wheat: 0xf5deb3ff,
8970
+ white: 0xffffffff,
8971
+ whitesmoke: 0xf5f5f5ff,
8972
+ yellow: 0xffff00ff,
8973
+ yellowgreen: 0x9acd32ff
8974
  };
 
 
 
 
 
 
 
 
 
 
 
8975
 
8976
+ // const INTEGER = '[-+]?\\d+';
8977
+ var NUMBER = '[-+]?\\d*\\.?\\d+';
8978
+ var PERCENTAGE = NUMBER + '%';
 
 
 
 
8979
 
8980
+ function call() {
8981
+ for (var _len = arguments.length, parts = new Array(_len), _key = 0; _key < _len; _key++) {
8982
+ parts[_key] = arguments[_key];
8983
  }
8984
 
8985
+ return '\\(\\s*(' + parts.join(')\\s*,\\s*(') + ')\\s*\\)';
 
 
 
 
 
8986
  }
 
 
 
 
 
 
 
8987
 
8988
+ var rgb = new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER));
8989
+ var rgba = new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER));
8990
+ var hsl = new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE));
8991
+ var hsla = new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
8992
+ var hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
8993
+ var hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
8994
+ var hex6 = /^#([0-9a-fA-F]{6})$/;
8995
+ var hex8 = /^#([0-9a-fA-F]{8})$/;
8996
 
8997
+ /*
8998
+ https://github.com/react-community/normalize-css-color
8999
 
9000
+ BSD 3-Clause License
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9001
 
9002
+ Copyright (c) 2016, React Community
9003
+ All rights reserved.
9004
 
9005
+ Redistribution and use in source and binary forms, with or without
9006
+ modification, are permitted provided that the following conditions are met:
9007
 
9008
+ * Redistributions of source code must retain the above copyright notice, this
9009
+ list of conditions and the following disclaimer.
9010
 
9011
+ * Redistributions in binary form must reproduce the above copyright notice,
9012
+ this list of conditions and the following disclaimer in the documentation
9013
+ and/or other materials provided with the distribution.
9014
 
9015
+ * Neither the name of the copyright holder nor the names of its
9016
+ contributors may be used to endorse or promote products derived from
9017
+ this software without specific prior written permission.
9018
 
9019
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
9020
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9021
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
9022
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
9023
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9024
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
9025
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
9026
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
9027
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9028
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9029
+ */
9030
+ function normalizeColor(color) {
9031
+ var match;
9032
 
9033
+ if (typeof color === 'number') {
9034
+ return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null;
9035
+ } // Ordered based on occurrences on Facebook codebase
9036
 
9037
 
9038
+ if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0;
9039
+ if (colors.hasOwnProperty(color)) return colors[color];
 
9040
 
9041
+ if (match = rgb.exec(color)) {
9042
+ return (parse255(match[1]) << 24 | // r
9043
+ parse255(match[2]) << 16 | // g
9044
+ parse255(match[3]) << 8 | // b
9045
+ 0x000000ff) >>> // a
9046
+ 0;
9047
+ }
9048
 
9049
+ if (match = rgba.exec(color)) {
9050
+ return (parse255(match[1]) << 24 | // r
9051
+ parse255(match[2]) << 16 | // g
9052
+ parse255(match[3]) << 8 | // b
9053
+ parse1(match[4])) >>> // a
9054
+ 0;
9055
+ }
9056
 
9057
+ if (match = hex3.exec(color)) {
9058
+ return parseInt(match[1] + match[1] + // r
9059
+ match[2] + match[2] + // g
9060
+ match[3] + match[3] + // b
9061
+ 'ff', // a
9062
+ 16) >>> 0;
9063
+ } // https://drafts.csswg.org/css-color-4/#hex-notation
 
 
9064
 
9065
 
9066
+ if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9067
 
9068
+ if (match = hex4.exec(color)) {
9069
+ return parseInt(match[1] + match[1] + // r
9070
+ match[2] + match[2] + // g
9071
+ match[3] + match[3] + // b
9072
+ match[4] + match[4], // a
9073
+ 16) >>> 0;
9074
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9075
 
9076
+ if (match = hsl.exec(color)) {
9077
+ return (hslToRgb(parse360(match[1]), // h
9078
+ parsePercentage(match[2]), // s
9079
+ parsePercentage(match[3]) // l
9080
+ ) | 0x000000ff) >>> // a
9081
+ 0;
9082
+ }
9083
 
9084
+ if (match = hsla.exec(color)) {
9085
+ return (hslToRgb(parse360(match[1]), // h
9086
+ parsePercentage(match[2]), // s
9087
+ parsePercentage(match[3]) // l
9088
+ ) | parse1(match[4])) >>> // a
9089
+ 0;
9090
+ }
9091
 
9092
+ return null;
9093
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9094
 
9095
+ function hue2rgb(p, q, t) {
9096
+ if (t < 0) t += 1;
9097
+ if (t > 1) t -= 1;
9098
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
9099
+ if (t < 1 / 2) return q;
9100
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
9101
+ return p;
9102
+ }
9103
 
9104
+ function hslToRgb(h, s, l) {
9105
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
9106
+ var p = 2 * l - q;
9107
+ var r = hue2rgb(p, q, h + 1 / 3);
9108
+ var g = hue2rgb(p, q, h);
9109
+ var b = hue2rgb(p, q, h - 1 / 3);
9110
+ return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
9111
+ }
9112
 
9113
+ function parse255(str) {
9114
+ var int = parseInt(str, 10);
9115
+ if (int < 0) return 0;
9116
+ if (int > 255) return 255;
9117
+ return int;
9118
+ }
9119
 
9120
+ function parse360(str) {
9121
+ var int = parseFloat(str);
9122
+ return (int % 360 + 360) % 360 / 360;
9123
+ }
9124
 
9125
+ function parse1(str) {
9126
+ var num = parseFloat(str);
9127
+ if (num < 0) return 0;
9128
+ if (num > 1) return 255;
9129
+ return Math.round(num * 255);
9130
+ }
9131
 
9132
+ function parsePercentage(str) {
9133
+ // parseFloat conveniently ignores the final %
9134
+ var int = parseFloat(str);
9135
+ if (int < 0) return 0;
9136
+ if (int > 100) return 1;
9137
+ return int / 100;
9138
+ }
9139
 
9140
+ function colorToRgba(input) {
9141
+ var int32Color = normalizeColor(input);
9142
+ if (int32Color === null) return input;
9143
+ int32Color = int32Color || 0;
9144
+ var r = (int32Color & 0xff000000) >>> 24;
9145
+ var g = (int32Color & 0x00ff0000) >>> 16;
9146
+ var b = (int32Color & 0x0000ff00) >>> 8;
9147
+ var a = (int32Color & 0x000000ff) / 255;
9148
+ return "rgba(" + r + ", " + g + ", " + b + ", " + a + ")";
9149
+ } // Problem: https://github.com/animatedjs/animated/pull/102
9150
+ // Solution: https://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly/658662
9151
 
9152
 
9153
+ var stringShapeRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; // Covers rgb, rgba, hsl, hsla
9154
+ // Taken from https://gist.github.com/olmokramer/82ccce673f86db7cda5e
9155
 
9156
+ var colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi; // Covers color names (transparent, blue, etc.)
9157
 
9158
+ var colorNamesRegex = new RegExp("(" + Object.keys(colors).join('|') + ")", 'g');
9159
+ /**
9160
+ * Supports string shapes by extracting numbers so new values can be computed,
9161
+ * and recombines those values into new strings of the same shape. Supports
9162
+ * things like:
9163
+ *
9164
+ * rgba(123, 42, 99, 0.36) // colors
9165
+ * -45deg // values with units
9166
+ * 0 2px 2px 0px rgba(0, 0, 0, 0.12) // box shadows
9167
+ */
 
9168
 
9169
+ var createStringInterpolator = function createStringInterpolator(config) {
9170
+ // Replace colors with rgba
9171
+ var outputRange = config.output.map(function (rangeValue) {
9172
+ return rangeValue.replace(colorRegex, colorToRgba);
9173
+ }).map(function (rangeValue) {
9174
+ return rangeValue.replace(colorNamesRegex, colorToRgba);
9175
  });
9176
+ var outputRanges = outputRange[0].match(stringShapeRegex).map(function () {
9177
+ return [];
9178
+ });
9179
+ outputRange.forEach(function (value) {
9180
+ value.match(stringShapeRegex).forEach(function (number, i) {
9181
+ return outputRanges[i].push(+number);
9182
+ });
9183
+ });
9184
+ var interpolations = outputRange[0].match(stringShapeRegex).map(function (_value, i) {
9185
+ return createInterpolator(_extends({}, config, {
9186
+ output: outputRanges[i]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9187
  }));
9188
  });
9189
+ return function (input) {
9190
+ var i = 0;
9191
+ return outputRange[0] // 'rgba(0, 100, 200, 0)'
9192
+ // ->
9193
+ // 'rgba(${interpolations[0](input)}, ${interpolations[1](input)}, ...'
9194
+ .replace(stringShapeRegex, function () {
9195
+ return interpolations[i++](input);
9196
+ }) // rgba requires that the r,g,b are integers.... so we want to round them, but we *dont* want to
9197
+ // round the opacity (4th column).
9198
+ .replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi, function (_, p1, p2, p3, p4) {
9199
+ return "rgba(" + Math.round(p1) + ", " + Math.round(p2) + ", " + Math.round(p3) + ", " + p4 + ")";
9200
+ });
9201
+ };
9202
  };
 
 
 
 
 
 
 
 
9203
 
9204
+ var isUnitlessNumber = {
9205
+ animationIterationCount: true,
9206
+ borderImageOutset: true,
9207
+ borderImageSlice: true,
9208
+ borderImageWidth: true,
9209
+ boxFlex: true,
9210
+ boxFlexGroup: true,
9211
+ boxOrdinalGroup: true,
9212
+ columnCount: true,
9213
+ columns: true,
9214
+ flex: true,
9215
+ flexGrow: true,
9216
+ flexPositive: true,
9217
+ flexShrink: true,
9218
+ flexNegative: true,
9219
+ flexOrder: true,
9220
+ gridRow: true,
9221
+ gridRowEnd: true,
9222
+ gridRowSpan: true,
9223
+ gridRowStart: true,
9224
+ gridColumn: true,
9225
+ gridColumnEnd: true,
9226
+ gridColumnSpan: true,
9227
+ gridColumnStart: true,
9228
+ fontWeight: true,
9229
+ lineClamp: true,
9230
+ lineHeight: true,
9231
+ opacity: true,
9232
+ order: true,
9233
+ orphans: true,
9234
+ tabSize: true,
9235
+ widows: true,
9236
+ zIndex: true,
9237
+ zoom: true,
9238
+ // SVG-related properties
9239
+ fillOpacity: true,
9240
+ floodOpacity: true,
9241
+ stopOpacity: true,
9242
+ strokeDasharray: true,
9243
+ strokeDashoffset: true,
9244
+ strokeMiterlimit: true,
9245
+ strokeOpacity: true,
9246
+ strokeWidth: true
9247
+ };
9248
 
9249
+ var prefixKey = function prefixKey(prefix, key) {
9250
+ return prefix + key.charAt(0).toUpperCase() + key.substring(1);
9251
+ };
9252
 
9253
+ var prefixes = ['Webkit', 'Ms', 'Moz', 'O'];
9254
+ isUnitlessNumber = Object.keys(isUnitlessNumber).reduce(function (acc, prop) {
9255
+ prefixes.forEach(function (prefix) {
9256
+ return acc[prefixKey(prefix, prop)] = acc[prop];
9257
+ });
9258
+ return acc;
9259
+ }, isUnitlessNumber);
9260
 
9261
+ function dangerousStyleValue(name, value, isCustomProperty) {
9262
+ if (value == null || typeof value === 'boolean' || value === '') return '';
9263
+ if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
9264
 
9265
+ return ('' + value).trim();
9266
+ }
9267
 
9268
+ var attributeCache = {};
9269
+ injectCreateAnimatedStyle(function (style) {
9270
+ return new AnimatedStyle(style);
9271
+ });
9272
+ injectDefaultElement('div');
9273
+ injectStringInterpolator(createStringInterpolator);
9274
+ injectColorNames(colors);
9275
+ injectApplyAnimatedValues(function (instance, props) {
9276
+ if (instance.nodeType && instance.setAttribute !== undefined) {
9277
+ var style = props.style,
9278
+ children = props.children,
9279
+ scrollTop = props.scrollTop,
9280
+ scrollLeft = props.scrollLeft,
9281
+ attributes = _objectWithoutPropertiesLoose(props, ["style", "children", "scrollTop", "scrollLeft"]);
9282
 
9283
+ var filter = instance.nodeName === 'filter' || instance.parentNode && instance.parentNode.nodeName === 'filter';
9284
+ if (scrollTop !== void 0) instance.scrollTop = scrollTop;
9285
+ if (scrollLeft !== void 0) instance.scrollLeft = scrollLeft; // Set textContent, if children is an animatable value
9286
 
9287
+ if (children !== void 0) instance.textContent = children; // Set styles ...
 
 
9288
 
9289
+ for (var styleName in style) {
9290
+ if (!style.hasOwnProperty(styleName)) continue;
9291
+ var isCustomProperty = styleName.indexOf('--') === 0;
9292
+ var styleValue = dangerousStyleValue(styleName, style[styleName], isCustomProperty);
9293
+ if (styleName === 'float') styleName = 'cssFloat';
9294
+ if (isCustomProperty) instance.style.setProperty(styleName, styleValue);else instance.style[styleName] = styleValue;
9295
+ } // Set attributes ...
9296
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9297
 
9298
+ for (var name in attributes) {
9299
+ // Attributes are written in dash case
9300
+ var dashCase = filter ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, function (n) {
9301
+ return '-' + n.toLowerCase();
9302
+ }));
9303
+ if (typeof instance.getAttribute(dashCase) !== 'undefined') instance.setAttribute(dashCase, attributes[name]);
9304
  }
9305
 
9306
+ return;
9307
+ } else return false;
9308
+ }, function (style) {
9309
+ return style;
9310
+ });
9311
 
9312
+ var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
9313
+ 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
9314
+ // Extend animated with all the available THREE elements
9315
+ var apply = merge(createAnimatedComponent, false);
9316
+ var extendedAnimated = apply(domElements);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9317
 
9318
+ exports.apply = apply;
9319
+ exports.config = config;
9320
+ exports.update = update;
9321
+ exports.animated = extendedAnimated;
9322
+ exports.a = extendedAnimated;
9323
+ exports.interpolate = interpolate$1;
9324
+ exports.Globals = Globals;
9325
+ exports.useSpring = useSpring;
9326
+ exports.useTrail = useTrail;
9327
+ exports.useTransition = useTransition;
9328
+ exports.useChain = useChain;
9329
+ exports.useSprings = useSprings;
9330
 
 
 
9331
 
9332
+ /***/ }),
 
9333
 
9334
+ /***/ 258:
9335
+ /***/ (function(module, exports, __webpack_require__) {
9336
 
9337
+ var isarray = __webpack_require__(444)
9338
 
9339
  /**
9340
+ * Expose `pathToRegexp`.
 
 
 
9341
  */
9342
+ module.exports = pathToRegexp
9343
+ module.exports.parse = parse
9344
+ module.exports.compile = compile
9345
+ module.exports.tokensToFunction = tokensToFunction
9346
+ module.exports.tokensToRegExp = tokensToRegExp
9347
 
9348
  /**
9349
+ * The main path matching regexp utility.
9350
+ *
9351
+ * @type {RegExp}
9352
  */
9353
+ var PATH_REGEXP = new RegExp([
9354
+ // Match escaped characters that would otherwise appear in future matches.
9355
+ // This allows the user to escape special characters that won't transform.
9356
+ '(\\\\.)',
9357
+ // Match Express-style parameters and un-named parameters with a prefix
9358
+ // and optional suffixes. Matches appear as:
9359
+ //
9360
+ // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
9361
+ // "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
9362
+ // "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
9363
+ '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
9364
+ ].join('|'), 'g')
9365
 
9366
  /**
9367
+ * Parse a string for the raw tokens.
 
 
 
9368
  *
9369
+ * @param {string} str
9370
+ * @param {Object=} options
9371
+ * @return {!Array}
 
 
 
 
 
 
 
 
 
 
 
9372
  */
9373
+ function parse (str, options) {
9374
+ var tokens = []
9375
+ var key = 0
9376
+ var index = 0
9377
+ var path = ''
9378
+ var defaultDelimiter = options && options.delimiter || '/'
9379
+ var res
9380
 
9381
+ while ((res = PATH_REGEXP.exec(str)) != null) {
9382
+ var m = res[0]
9383
+ var escaped = res[1]
9384
+ var offset = res.index
9385
+ path += str.slice(index, offset)
9386
+ index = offset + m.length
 
 
 
 
9387
 
9388
+ // Ignore already escaped sequences.
9389
+ if (escaped) {
9390
+ path += escaped[1]
9391
+ continue
9392
  }
9393
 
9394
+ var next = str[index]
9395
+ var prefix = res[2]
9396
+ var name = res[3]
9397
+ var capture = res[4]
9398
+ var group = res[5]
9399
+ var modifier = res[6]
9400
+ var asterisk = res[7]
9401
 
9402
+ // Push the current path onto the tokens.
9403
+ if (path) {
9404
+ tokens.push(path)
9405
+ path = ''
9406
  }
9407
 
9408
+ var partial = prefix != null && next != null && next !== prefix
9409
+ var repeat = modifier === '+' || modifier === '*'
9410
+ var optional = modifier === '?' || modifier === '*'
9411
+ var delimiter = res[2] || defaultDelimiter
9412
+ var pattern = capture || group
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9413
 
9414
+ tokens.push({
9415
+ name: name || key++,
9416
+ prefix: prefix || '',
9417
+ delimiter: delimiter,
9418
+ optional: optional,
9419
+ repeat: repeat,
9420
+ partial: partial,
9421
+ asterisk: !!asterisk,
9422
+ pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
9423
+ })
9424
  }
9425
 
9426
+ // Match any characters still remaining.
9427
+ if (index < str.length) {
9428
+ path += str.substr(index)
9429
+ }
9430
 
9431
+ // If the path exists, push it onto the end.
9432
+ if (path) {
9433
+ tokens.push(path)
 
9434
  }
9435
 
9436
+ return tokens
9437
  }
 
9438
 
9439
  /**
9440
+ * Compile a string to a template function for the path.
9441
+ *
9442
+ * @param {string} str
9443
+ * @param {Object=} options
9444
+ * @return {!function(Object=, Object=)}
9445
  */
9446
+ function compile (str, options) {
9447
+ return tokensToFunction(parse(str, options), options)
9448
+ }
9449
 
9450
  /**
9451
+ * Prettier encoding of URI path segments.
9452
+ *
9453
+ * @param {string}
9454
+ * @return {string}
9455
  */
9456
+ function encodeURIComponentPretty (str) {
9457
+ return encodeURI(str).replace(/[\/?#]/g, function (c) {
9458
+ return '%' + c.charCodeAt(0).toString(16).toUpperCase()
9459
+ })
9460
+ }
9461
 
9462
  /**
9463
+ * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
9464
+ *
9465
+ * @param {string}
9466
+ * @return {string}
9467
  */
9468
+ function encodeAsterisk (str) {
9469
+ return encodeURI(str).replace(/[?#]/g, function (c) {
9470
+ return '%' + c.charCodeAt(0).toString(16).toUpperCase()
9471
+ })
9472
+ }
9473
 
9474
  /**
9475
+ * Expose a method for transforming tokens into the path function.
9476
  */
9477
+ function tokensToFunction (tokens, options) {
9478
+ // Compile all the tokens into regexps.
9479
+ var matches = new Array(tokens.length)
9480
 
9481
+ // Compile all the patterns before compilation.
9482
+ for (var i = 0; i < tokens.length; i++) {
9483
+ if (typeof tokens[i] === 'object') {
9484
+ matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))
9485
+ }
9486
+ }
 
 
 
9487
 
9488
+ return function (obj, opts) {
9489
+ var path = ''
9490
+ var data = obj || {}
9491
+ var options = opts || {}
9492
+ var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
 
 
 
 
 
 
9493
 
9494
+ for (var i = 0; i < tokens.length; i++) {
9495
+ var token = tokens[i]
9496
 
9497
+ if (typeof token === 'string') {
9498
+ path += token
 
 
 
 
 
 
 
9499
 
9500
+ continue
9501
+ }
 
 
9502
 
9503
+ var value = data[token.name]
9504
+ var segment
 
9505
 
9506
+ if (value == null) {
9507
+ if (token.optional) {
9508
+ // Prepend partial segment prefixes.
9509
+ if (token.partial) {
9510
+ path += token.prefix
9511
+ }
9512
 
9513
+ continue
9514
+ } else {
9515
+ throw new TypeError('Expected "' + token.name + '" to be defined')
9516
+ }
9517
+ }
 
 
 
 
 
 
 
 
 
 
 
9518
 
9519
+ if (isarray(value)) {
9520
+ if (!token.repeat) {
9521
+ throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
9522
+ }
9523
 
9524
+ if (value.length === 0) {
9525
+ if (token.optional) {
9526
+ continue
9527
+ } else {
9528
+ throw new TypeError('Expected "' + token.name + '" to not be empty')
9529
+ }
9530
+ }
 
 
 
 
 
 
 
 
9531
 
9532
+ for (var j = 0; j < value.length; j++) {
9533
+ segment = encode(value[j])
 
 
9534
 
9535
+ if (!matches[i].test(segment)) {
9536
+ throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
9537
+ }
9538
 
9539
+ path += (j === 0 ? token.prefix : token.delimiter) + segment
9540
+ }
9541
+
9542
+ continue
 
 
 
 
9543
  }
9544
 
9545
+ segment = token.asterisk ? encodeAsterisk(value) : encode(value)
9546
+
9547
+ if (!matches[i].test(segment)) {
9548
+ throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
9549
  }
 
 
 
 
 
 
 
 
 
 
 
 
9550
 
9551
+ path += token.prefix + segment
9552
+ }
9553
 
9554
+ return path
9555
+ }
9556
+ }
9557
 
9558
  /**
9559
+ * Escape a regular expression string.
9560
+ *
9561
+ * @param {string} str
9562
+ * @return {string}
9563
  */
9564
+ function escapeString (str) {
9565
+ return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
9566
+ }
9567
 
9568
  /**
9569
+ * Escape the capturing group by escaping special characters and meaning.
9570
+ *
9571
+ * @param {string} group
9572
+ * @return {string}
9573
  */
9574
+ function escapeGroup (group) {
9575
+ return group.replace(/([=!:$\/()])/g, '\\$1')
9576
+ }
9577
 
9578
+ /**
9579
+ * Attach the keys as a property of the regexp.
9580
+ *
9581
+ * @param {!RegExp} re
9582
+ * @param {Array} keys
9583
+ * @return {!RegExp}
9584
+ */
9585
+ function attachKeys (re, keys) {
9586
+ re.keys = keys
9587
+ return re
9588
+ }
9589
 
9590
+ /**
9591
+ * Get the flags for a regexp from the options.
9592
+ *
9593
+ * @param {Object} options
9594
+ * @return {string}
9595
+ */
9596
+ function flags (options) {
9597
+ return options && options.sensitive ? '' : 'i'
9598
+ }
9599
 
9600
+ /**
9601
+ * Pull out keys from a regexp.
9602
+ *
9603
+ * @param {!RegExp} path
9604
+ * @param {!Array} keys
9605
+ * @return {!RegExp}
9606
+ */
9607
+ function regexpToRegexp (path, keys) {
9608
+ // Use a negative lookahead to match only capturing groups.
9609
+ var groups = path.source.match(/\((?!\?)/g)
 
 
9610
 
9611
+ if (groups) {
9612
+ for (var i = 0; i < groups.length; i++) {
9613
+ keys.push({
9614
+ name: i,
9615
+ prefix: null,
9616
+ delimiter: null,
9617
+ optional: false,
9618
+ repeat: false,
9619
+ partial: false,
9620
+ asterisk: false,
9621
+ pattern: null
9622
+ })
9623
  }
9624
+ }
9625
 
9626
+ return attachKeys(path, keys)
9627
+ }
 
 
9628
 
9629
+ /**
9630
+ * Transform an array into a regexp.
9631
+ *
9632
+ * @param {!Array} path
9633
+ * @param {Array} keys
9634
+ * @param {!Object} options
9635
+ * @return {!RegExp}
9636
+ */
9637
+ function arrayToRegexp (path, keys, options) {
9638
+ var parts = []
9639
 
9640
+ for (var i = 0; i < path.length; i++) {
9641
+ parts.push(pathToRegexp(path[i], keys, options).source)
9642
+ }
 
 
 
9643
 
9644
+ var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
 
 
 
 
 
 
9645
 
9646
+ return attachKeys(regexp, keys)
9647
+ }
 
 
 
9648
 
9649
+ /**
9650
+ * Create a path regexp from string input.
9651
+ *
9652
+ * @param {string} path
9653
+ * @param {!Array} keys
9654
+ * @param {!Object} options
9655
+ * @return {!RegExp}
9656
+ */
9657
+ function stringToRegexp (path, keys, options) {
9658
+ return tokensToRegExp(parse(path, options), keys, options)
9659
+ }
9660
+
9661
+ /**
9662
+ * Expose a function for taking tokens and returning a RegExp.
9663
+ *
9664
+ * @param {!Array} tokens
9665
+ * @param {(Array|Object)=} keys
9666
+ * @param {Object=} options
9667
+ * @return {!RegExp}
9668
+ */
9669
+ function tokensToRegExp (tokens, keys, options) {
9670
+ if (!isarray(keys)) {
9671
+ options = /** @type {!Object} */ (keys || options)
9672
+ keys = []
9673
  }
9674
 
9675
+ options = options || {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9676
 
9677
+ var strict = options.strict
9678
+ var end = options.end !== false
9679
+ var route = ''
9680
 
9681
+ // Iterate over the tokens and create our regexp string.
9682
+ for (var i = 0; i < tokens.length; i++) {
9683
+ var token = tokens[i]
9684
 
9685
+ if (typeof token === 'string') {
9686
+ route += escapeString(token)
9687
+ } else {
9688
+ var prefix = escapeString(token.prefix)
9689
+ var capture = '(?:' + token.pattern + ')'
9690
 
9691
+ keys.push(token)
9692
 
9693
+ if (token.repeat) {
9694
+ capture += '(?:' + prefix + capture + ')*'
9695
+ }
9696
 
9697
+ if (token.optional) {
9698
+ if (!token.partial) {
9699
+ capture = '(?:' + prefix + '(' + capture + '))?'
9700
+ } else {
9701
+ capture = prefix + '(' + capture + ')?'
9702
+ }
9703
+ } else {
9704
+ capture = prefix + '(' + capture + ')'
9705
+ }
9706
 
9707
+ route += capture
9708
+ }
9709
+ }
9710
 
9711
+ var delimiter = escapeString(options.delimiter || '/')
9712
+ var endsWithDelimiter = route.slice(-delimiter.length) === delimiter
9713
 
9714
+ // In non-strict mode we allow a slash at the end of match. If the path to
9715
+ // match already ends with a slash, we remove it for consistency. The slash
9716
+ // is valid at the end of a path match, not in the middle. This is important
9717
+ // in non-ending mode, where "/test/" shouldn't match "/test//route".
9718
+ if (!strict) {
9719
+ route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'
9720
+ }
9721
 
9722
+ if (end) {
9723
+ route += '$'
9724
+ } else {
9725
+ // In non-ending mode, we need the capturing groups to match as much as
9726
+ // possible by using a positive lookahead to the end or next path segment.
9727
+ route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'
9728
+ }
9729
 
9730
+ return attachKeys(new RegExp('^' + route, flags(options)), keys)
9731
+ }
9732
 
9733
  /**
9734
+ * Normalize the given path string, returning a regular expression.
9735
+ *
9736
+ * An empty array can be passed in for the keys, which will hold the
9737
+ * placeholder key descriptions. For example, using `/user/:id`, `keys` will
9738
+ * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
9739
+ *
9740
+ * @param {(string|RegExp|Array)} path
9741
+ * @param {(Array|Object)=} keys
9742
+ * @param {Object=} options
9743
+ * @return {!RegExp}
9744
  */
9745
+ function pathToRegexp (path, keys, options) {
9746
+ if (!isarray(keys)) {
9747
+ options = /** @type {!Object} */ (keys || options)
9748
+ keys = []
9749
+ }
9750
 
9751
+ options = options || {}
9752
 
9753
+ if (path instanceof RegExp) {
9754
+ return regexpToRegexp(path, /** @type {!Array} */ (keys))
9755
+ }
9756
 
9757
+ if (isarray(path)) {
9758
+ return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
9759
+ }
9760
 
9761
+ return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
9762
+ }
9763
 
9764
 
9765
+ /***/ }),
9766
 
9767
+ /***/ 259:
9768
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
9769
 
9770
+ "use strict";
9771
+ /* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(413);
9772
+ /* global window */
9773
 
9774
 
9775
+ var root;
 
 
9776
 
9777
+ if (typeof self !== 'undefined') {
9778
+ root = self;
9779
+ } else if (typeof window !== 'undefined') {
9780
+ root = window;
9781
+ } else if (typeof global !== 'undefined') {
9782
+ root = global;
9783
+ } else if (true) {
9784
+ root = module;
9785
+ } else {}
9786
 
9787
+ var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(root);
9788
+ /* harmony default export */ __webpack_exports__["a"] = (result);
9789
 
9790
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(56), __webpack_require__(446)(module)))
9791
 
9792
+ /***/ }),
9793
 
9794
+ /***/ 26:
9795
+ /***/ (function(module, exports) {
9796
 
9797
+ function _getPrototypeOf(o) {
9798
+ module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
9799
+ return o.__proto__ || Object.getPrototypeOf(o);
9800
+ };
9801
+ return _getPrototypeOf(o);
9802
+ }
9803
 
9804
+ module.exports = _getPrototypeOf;
9805
 
9806
+ /***/ }),
9807
 
9808
+ /***/ 261:
9809
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9810
 
9811
+ "use strict";
9812
+ /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
9813
+ /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);
9814
+ /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37);
9815
+ /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);
9816
+ /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39);
9817
+ /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__);
9818
+ /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
9819
+ /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);
9820
+ /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26);
9821
+ /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);
9822
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);
9823
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);
9824
+ /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
9825
+ /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__);
9826
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1);
9827
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__);
9828
+ /* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(53);
9829
+ /* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_components__WEBPACK_IMPORTED_MODULE_8__);
9830
+ /* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23);
9831
 
 
 
9832
 
 
 
9833
 
 
 
 
9834
 
 
 
 
9835
 
 
 
 
 
9836
 
 
 
 
 
9837
 
9838
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, result); }; }
 
 
 
 
 
 
9839
 
9840
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
 
 
9841
 
9842
+ /**
9843
+ * External dependencies
9844
+ */
9845
 
9846
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9847
 
9848
+ /**
9849
+ * WooCommerce dependencies
9850
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9851
 
 
 
9852
 
 
 
 
9853
 
9854
+ /**
9855
+ * Component to render when there is an error in a report component due to data
9856
+ * not being loaded or being invalid.
9857
+ */
9858
 
9859
+ var ReportError = /*#__PURE__*/function (_Component) {
9860
+ _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default()(ReportError, _Component);
 
 
9861
 
9862
+ var _super = _createSuper(ReportError);
 
 
 
 
 
 
9863
 
9864
+ function ReportError() {
9865
+ _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ReportError);
9866
 
9867
+ return _super.apply(this, arguments);
9868
+ }
 
 
 
 
9869
 
9870
+ _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(ReportError, [{
9871
+ key: "render",
9872
+ value: function render() {
9873
+ var _this$props = this.props,
9874
+ className = _this$props.className,
9875
+ isError = _this$props.isError,
9876
+ isEmpty = _this$props.isEmpty;
9877
+ var title, actionLabel, actionURL, actionCallback;
9878
+
9879
+ if (isError) {
9880
+ title = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('There was an error getting your stats. Please try again.', 'woocommerce-admin');
9881
+ actionLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Reload', 'woocommerce-admin');
9882
+
9883
+ actionCallback = function actionCallback() {
9884
+ // @todo Add tracking for how often an error is displayed, and the reload action is clicked.
9885
+ window.location.reload();
9886
+ };
9887
+ } else if (isEmpty) {
9888
+ title = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('No results could be found for this date range.', 'woocommerce-admin');
9889
+ actionLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('View Orders', 'woocommerce-admin');
9890
+ actionURL = Object(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_9__[/* getAdminLink */ "f"])('edit.php?post_type=shop_order');
9891
+ }
9892
 
9893
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_woocommerce_components__WEBPACK_IMPORTED_MODULE_8__["EmptyContent"], {
9894
+ className: className,
9895
+ title: title,
9896
+ actionLabel: actionLabel,
9897
+ actionURL: actionURL,
9898
+ actionCallback: actionCallback
9899
+ });
9900
  }
9901
+ }]);
9902
 
9903
+ return ReportError;
9904
+ }(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Component"]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9905
 
9906
+ ReportError.propTypes = {
9907
+ /**
9908
+ * Additional class name to style the component.
9909
+ */
9910
+ className: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9911
 
9912
+ /**
9913
+ * Boolean representing whether there was an error.
9914
+ */
9915
+ isError: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,
 
 
9916
 
9917
+ /**
9918
+ * Boolean representing whether the issue is that there is no data.
9919
+ */
9920
+ isEmpty: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool
9921
  };
9922
+ ReportError.defaultProps = {
9923
+ className: ''
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9924
  };
9925
+ /* harmony default export */ __webpack_exports__["a"] = (ReportError);
 
 
 
 
 
 
 
 
 
9926
 
9927
+ /***/ }),
9928
 
9929
+ /***/ 268:
9930
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
9931
 
9932
+ "use strict";
9933
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getUrlParams; });
9934
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getScreenName; });
9935
  /**
9936
+ * Get the URL params.
9937
+ *
9938
+ * @param {string} locationSearch - Querystring part of a URL, including the question mark (?).
9939
+ * @return {Object} - URL params.
9940
  */
9941
+ function getUrlParams(locationSearch) {
9942
+ if (locationSearch) {
9943
+ return locationSearch.substr(1).split('&').reduce(function (params, query) {
9944
+ var chunks = query.split('=');
9945
+ var key = chunks[0];
9946
+ var value = decodeURIComponent(chunks[1]);
9947
+ value = isNaN(Number(value)) ? value : Number(value);
9948
+ return params[key] = value, params;
9949
+ }, {});
9950
+ }
9951
+
9952
+ return {};
9953
+ }
9954
  /**
9955
+ * Get the current screen name.
9956
+ *
9957
+ * @return {string} - Screen name.
9958
  */
9959
 
9960
+ function getScreenName() {
9961
+ var screenName = '';
9962
 
9963
+ var _getUrlParams = getUrlParams(window.location.search),
9964
+ page = _getUrlParams.page,
9965
+ path = _getUrlParams.path,
9966
+ postType = _getUrlParams.post_type;
9967
 
9968
+ if (page) {
9969
+ var currentPage = page === 'wc-admin' ? 'home_screen' : page;
9970
+ screenName = path ? path.replace(/\//g, '_').substring(1) : currentPage;
9971
+ } else if (postType) {
9972
+ screenName = postType;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9973
  }
9974
 
9975
+ return screenName;
9976
+ }
 
 
9977
 
9978
+ /***/ }),
 
 
9979
 
9980
+ /***/ 27:
9981
+ /***/ (function(module, exports) {
 
 
 
9982
 
9983
+ (function() { module.exports = this["wp"]["url"]; }());
 
 
 
 
9984
 
9985
+ /***/ }),
 
 
9986
 
9987
+ /***/ 271:
9988
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
 
9989
 
9990
+ "use strict";
 
9991
 
9992
+ // EXPORTS
9993
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ DEFAULT_ACTIONABLE_STATUSES; });
9994
+ __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ config; });
9995
 
9996
+ // UNUSED EXPORTS: DEFAULT_ORDER_STATUSES, DEFAULT_DATE_RANGE
 
9997
 
9998
+ // EXTERNAL MODULE: external {"this":["wp","element"]}
9999
+ var external_this_wp_element_ = __webpack_require__(0);
10000
 
10001
+ // EXTERNAL MODULE: external {"this":["wp","i18n"]}
10002
+ var external_this_wp_i18n_ = __webpack_require__(3);
10003
 
10004
+ // EXTERNAL MODULE: external {"this":["wp","hooks"]}
10005
+ var external_this_wp_hooks_ = __webpack_require__(48);
10006
 
10007
+ // EXTERNAL MODULE: ./node_modules/interpolate-components/lib/index.js
10008
+ var lib = __webpack_require__(36);
10009
+ var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
10010
 
10011
+ // EXTERNAL MODULE: ./client/settings/index.js
10012
+ var settings = __webpack_require__(23);
10013
 
10014
+ // EXTERNAL MODULE: ./node_modules/qs/lib/index.js
10015
+ var qs_lib = __webpack_require__(66);
10016
 
10017
+ // EXTERNAL MODULE: ./client/lib/date.js
10018
+ var date = __webpack_require__(108);
10019
 
10020
+ // EXTERNAL MODULE: external {"this":["wc","components"]}
10021
+ var external_this_wc_components_ = __webpack_require__(53);
10022
 
10023
+ // EXTERNAL MODULE: external {"this":["wc","data"]}
10024
+ var external_this_wc_data_ = __webpack_require__(43);
10025
 
10026
+ // CONCATENATED MODULE: ./client/analytics/settings/default-date.js
10027
 
10028
 
10029
+ /**
10030
+ * External dependencies
10031
+ */
10032
 
10033
+ /**
10034
+ * Internal dependencies
10035
+ */
10036
 
10037
 
10038
+ /**
10039
+ * WooCommerce dependencies
10040
+ */
10041
 
10042
 
10043
 
10044
 
10045
+ var default_date_DefaultDate = function DefaultDate(_ref) {
10046
+ var value = _ref.value,
10047
+ onChange = _ref.onChange;
10048
 
10049
+ var _useSettings = Object(external_this_wc_data_["useSettings"])('wc_admin', ['wcAdminSettings']),
10050
+ wcAdminSettings = _useSettings.wcAdminSettings;
10051
 
10052
+ var defaultDateRange = wcAdminSettings.woocommerce_default_date_range;
10053
 
10054
+ var change = function change(query) {
10055
+ onChange({
10056
+ target: {
10057
+ name: 'woocommerce_default_date_range',
10058
+ value: Object(qs_lib["stringify"])(query)
10059
+ }
10060
+ });
10061
+ };
10062
 
10063
+ var query = Object(qs_lib["parse"])(value.replace(/&amp;/g, '&'));
10064
+
10065
+ var _getDateParamsFromQue = Object(date["h" /* getDateParamsFromQuery */])(query, defaultDateRange),
10066
+ period = _getDateParamsFromQue.period,
10067
+ compare = _getDateParamsFromQue.compare,
10068
+ before = _getDateParamsFromQue.before,
10069
+ after = _getDateParamsFromQue.after;
10070
+
10071
+ var _getCurrentDates = Object(date["f" /* getCurrentDates */])(query, defaultDateRange),
10072
+ primaryDate = _getCurrentDates.primary,
10073
+ secondaryDate = _getCurrentDates.secondary;
10074
+
10075
+ var dateQuery = {
10076
+ period: period,
10077
+ compare: compare,
10078
+ before: before,
10079
+ after: after,
10080
+ primaryDate: primaryDate,
10081
+ secondaryDate: secondaryDate
10082
+ };
10083
+ return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["DateRangeFilterPicker"], {
10084
+ query: query,
10085
+ onRangeSelect: change,
10086
+ dateQuery: dateQuery,
10087
+ isoDateFormat: date["k" /* isoDateFormat */]
10088
+ });
10089
+ };
10090
 
10091
+ /* harmony default export */ var default_date = (default_date_DefaultDate);
10092
+ // CONCATENATED MODULE: ./client/analytics/settings/config.js
10093
 
10094
 
10095
  /**
10097
  */
10098
 
10099
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10100
 
 
 
 
 
 
10101
 
 
 
 
 
 
 
10102
  /**
10103
+ * Internal dependencies
10104
  */
10105
 
 
 
10106
 
10107
+ var SETTINGS_FILTER = 'woocommerce_admin_analytics_settings';
10108
+ var DEFAULT_ACTIONABLE_STATUSES = ['processing', 'on-hold'];
10109
+ var DEFAULT_ORDER_STATUSES = ['completed', 'processing', 'refunded', 'cancelled', 'failed', 'pending', 'on-hold'];
10110
+ var DEFAULT_DATE_RANGE = 'period=month&compare=previous_year';
10111
+ var filteredOrderStatuses = Object.keys(settings["d" /* ORDER_STATUSES */]).filter(function (status) {
10112
+ return status !== 'refunded';
10113
+ }).map(function (key) {
10114
+ return {
10115
+ value: key,
10116
+ label: settings["d" /* ORDER_STATUSES */][key],
10117
+ description: Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('Exclude the %s status from reports', 'woocommerce-admin'), settings["d" /* ORDER_STATUSES */][key])
10118
+ };
10119
+ });
10120
+ var unregisteredOrderStatuses = Object(settings["g" /* getSetting */])('unregisteredOrderStatuses', {});
10121
+ var orderStatusOptions = [{
10122
+ key: 'defaultStatuses',
10123
+ options: filteredOrderStatuses.filter(function (status) {
10124
+ return DEFAULT_ORDER_STATUSES.includes(status.value);
10125
+ })
10126
+ }, {
10127
+ key: 'customStatuses',
10128
+ label: Object(external_this_wp_i18n_["__"])('Custom Statuses', 'woocommerce-admin'),
10129
+ options: filteredOrderStatuses.filter(function (status) {
10130
+ return !DEFAULT_ORDER_STATUSES.includes(status.value);
10131
+ })
10132
+ }, {
10133
+ key: 'unregisteredStatuses',
10134
+ label: Object(external_this_wp_i18n_["__"])('Unregistered Statuses', 'woocommerce-admin'),
10135
+ options: Object.keys(unregisteredOrderStatuses).map(function (key) {
10136
+ return {
10137
+ value: key,
10138
+ label: key,
10139
+ description: Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('Exclude the %s status from reports', 'woocommerce-admin'), key)
10140
+ };
10141
+ })
10142
+ }];
10143
+ var config = Object(external_this_wp_hooks_["applyFilters"])(SETTINGS_FILTER, {
10144
+ woocommerce_excluded_report_order_statuses: {
10145
+ label: Object(external_this_wp_i18n_["__"])('Excluded Statuses:', 'woocommerce-admin'),
10146
+ inputType: 'checkboxGroup',
10147
+ options: orderStatusOptions,
10148
+ helpText: lib_default()({
10149
+ mixedString: Object(external_this_wp_i18n_["__"])('Orders with these statuses are excluded from the totals in your reports. ' + 'The {{strong}}Refunded{{/strong}} status can not be excluded.', 'woocommerce-admin'),
10150
+ components: {
10151
+ strong: Object(external_this_wp_element_["createElement"])("strong", null)
10152
+ }
10153
+ }),
10154
+ defaultValue: ['pending', 'cancelled', 'failed']
10155
+ },
10156
+ woocommerce_actionable_order_statuses: {
10157
+ label: Object(external_this_wp_i18n_["__"])('Actionable Statuses:', 'woocommerce-admin'),
10158
+ inputType: 'checkboxGroup',
10159
+ options: orderStatusOptions,
10160
+ helpText: Object(external_this_wp_i18n_["__"])('Orders with these statuses require action on behalf of the store admin.' + 'These orders will show up in the Orders tab under the activity panel.', 'woocommerce-admin'),
10161
+ defaultValue: DEFAULT_ACTIONABLE_STATUSES
10162
+ },
10163
+ woocommerce_default_date_range: {
10164
+ name: 'woocommerce_default_date_range',
10165
+ label: Object(external_this_wp_i18n_["__"])('Default Date Range:', 'woocommerce-admin'),
10166
+ inputType: 'component',
10167
+ component: default_date,
10168
+ helpText: Object(external_this_wp_i18n_["__"])('Select a default date range. When no range is selected, reports will be viewed by ' + 'the default date range.', 'woocommerce-admin'),
10169
+ defaultValue: DEFAULT_DATE_RANGE
10170
  }
10171
+ });
10172
 
10173
+ /***/ }),
10174
+
10175
+ /***/ 273:
10176
+ /***/ (function(module, exports) {
10177
+
10178
+ function _objectWithoutPropertiesLoose(source, excluded) {
10179
+ if (source == null) return {};
10180
+ var target = {};
10181
+ var sourceKeys = Object.keys(source);
10182
+ var key, i;
10183
 
10184
+ for (i = 0; i < sourceKeys.length; i++) {
10185
+ key = sourceKeys[i];
10186
+ if (excluded.indexOf(key) >= 0) continue;
10187
+ target[key] = source[key];
10188
  }
10189
 
10190
+ return target;
10191
+ }
 
 
10192
 
10193
+ module.exports = _objectWithoutPropertiesLoose;
 
 
 
 
 
 
 
 
 
 
 
 
10194
 
10195
+ /***/ }),
 
 
 
 
10196
 
10197
+ /***/ 274:
10198
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
10199
 
10200
+ "use strict";
10201
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getLeaderboard; });
10202
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return searchItemsByString; });
10203
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
10204
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
10205
+ /* harmony import */ var lib_date__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(108);
10206
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10207
 
10208
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
10209
+
10210
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
 
 
10211
 
 
 
 
 
 
 
 
10212
  /**
10213
+ * External dependencies
10214
  */
10215
 
 
 
10216
  /**
10217
+ * WooCommerce dependencies
10218
  */
10219
+
 
 
 
 
 
 
 
 
 
 
10220
  /**
10221
+ * Returns leaderboard data to render a leaderboard table.
10222
  *
10223
+ * @param {Object} options arguments
10224
+ * @param {string} options.id Leaderboard ID
10225
+ * @param {number} options.per_page Per page limit
10226
+ * @param {Object} options.persisted_query Persisted query passed to endpoint
10227
+ * @param {Object} options.query Query parameters in the url
10228
+ * @param {Object} options.select Instance of @wordpress/select
10229
+ * @param {string} options.defaultDateRange User specified default date range.
10230
+ * @return {Object} Object containing leaderboard responses.
10231
  */
10232
 
10233
+ function getLeaderboard(options) {
10234
+ var endpoint = 'leaderboards';
10235
+ var perPage = options.per_page,
10236
+ persistedQuery = options.persisted_query,
10237
+ query = options.query,
10238
+ select = options.select;
10239
+
10240
+ var _select = select('wc-api'),
10241
+ getItems = _select.getItems,
10242
+ getItemsError = _select.getItemsError,
10243
+ isGetItemsRequesting = _select.isGetItemsRequesting;
10244
+
10245
+ var response = {
10246
+ isRequesting: false,
10247
+ isError: false,
10248
+ rows: []
10249
+ };
10250
+ var datesFromQuery = Object(lib_date__WEBPACK_IMPORTED_MODULE_1__[/* getCurrentDates */ "f"])(query, options.defaultDateRange);
10251
+ var leaderboardQuery = {
10252
+ after: Object(lib_date__WEBPACK_IMPORTED_MODULE_1__[/* appendTimestamp */ "a"])(datesFromQuery.primary.after, 'start'),
10253
+ before: Object(lib_date__WEBPACK_IMPORTED_MODULE_1__[/* appendTimestamp */ "a"])(datesFromQuery.primary.before, 'end'),
10254
+ per_page: perPage,
10255
+ persisted_query: JSON.stringify(persistedQuery)
10256
+ }; // Disable eslint rule requiring `getItems` to be defined below because the next two statements
10257
+ // depend on `getItems` to have been called.
10258
+ // eslint-disable-next-line @wordpress/no-unused-vars-before-return
10259
+
10260
+ var leaderboards = getItems(endpoint, leaderboardQuery);
10261
+
10262
+ if (isGetItemsRequesting(endpoint, leaderboardQuery)) {
10263
+ return _objectSpread(_objectSpread({}, response), {}, {
10264
+ isRequesting: true
10265
+ });
10266
+ } else if (getItemsError(endpoint, leaderboardQuery)) {
10267
+ return _objectSpread(_objectSpread({}, response), {}, {
10268
+ isError: true
10269
+ });
10270
+ }
10271
 
10272
+ var leaderboard = leaderboards.get(options.id);
10273
+ return _objectSpread(_objectSpread({}, response), {}, {
10274
+ rows: leaderboard.rows
10275
  });
10276
+ }
10277
  /**
10278
+ * Returns items based on a search query.
10279
  *
10280
+ * @param {Object} select Instance of @wordpress/select
10281
+ * @param {string} endpoint Report API Endpoint
10282
+ * @param {string[]} search Array of search strings.
10283
+ * @return {Object} Object containing API request information and the matching items.
10284
  */
10285
 
10286
+ function searchItemsByString(select, endpoint, search) {
10287
+ var _select2 = select('wc-api'),
10288
+ getItems = _select2.getItems,
10289
+ getItemsError = _select2.getItemsError,
10290
+ isGetItemsRequesting = _select2.isGetItemsRequesting;
10291
+
10292
+ var items = {};
10293
+ var isRequesting = false;
10294
+ var isError = false;
10295
+ search.forEach(function (searchWord) {
10296
+ var query = {
10297
+ search: searchWord,
10298
+ per_page: 10
10299
+ };
10300
+ var newItems = getItems(endpoint, query);
10301
+ newItems.forEach(function (item, id) {
10302
+ items[id] = item;
10303
+ });
 
 
 
 
10304
 
10305
+ if (isGetItemsRequesting(endpoint, query)) {
10306
+ isRequesting = true;
10307
  }
10308
 
10309
+ if (getItemsError(endpoint, query)) {
10310
+ isError = true;
 
 
10311
  }
10312
+ });
 
 
10313
  return {
10314
  items: items,
10315
+ isRequesting: isRequesting,
10316
+ isError: isError
10317
  };
10318
+ }
 
 
10319
 
10320
+ /***/ }),
 
 
10321
 
10322
+ /***/ 29:
10323
+ /***/ (function(module, exports) {
 
 
 
 
 
 
 
10324
 
10325
+ (function() { module.exports = this["wp"]["dataControls"]; }());
10326
 
10327
+ /***/ }),
10328
 
10329
+ /***/ 3:
10330
+ /***/ (function(module, exports) {
 
10331
 
10332
+ (function() { module.exports = this["wp"]["i18n"]; }());
10333
 
10334
+ /***/ }),
10335
 
10336
+ /***/ 30:
10337
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
10338
 
10339
+ "use strict";
10340
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
10341
+ function _arrayLikeToArray(arr, len) {
10342
+ if (len == null || len > arr.length) len = arr.length;
10343
 
10344
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
10345
+ arr2[i] = arr[i];
10346
+ }
10347
 
10348
+ return arr2;
10349
+ }
10350
 
10351
+ /***/ }),
10352
 
10353
+ /***/ 31:
10354
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
10355
 
10356
+ "use strict";
 
 
10357
 
10358
+ // EXPORTS
10359
+ __webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ TAB; });
10360
+ __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ ESCAPE; });
10361
+ __webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ LEFT; });
10362
+ __webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ UP; });
10363
+ __webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ RIGHT; });
10364
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ DOWN; });
10365
 
10366
+ // UNUSED EXPORTS: BACKSPACE, ENTER, SPACE, DELETE, F10, ALT, CTRL, COMMAND, SHIFT, ZERO, modifiers, rawShortcut, displayShortcutList, displayShortcut, shortcutAriaLabel, isKeyboardEvent
10367
 
10368
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
10369
+ var defineProperty = __webpack_require__(6);
10370
 
10371
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules
10372
+ var toConsumableArray = __webpack_require__(15);
 
 
10373
 
10374
+ // EXTERNAL MODULE: external "lodash"
10375
+ var external_lodash_ = __webpack_require__(2);
 
 
10376
 
10377
+ // EXTERNAL MODULE: external {"this":["wp","i18n"]}
10378
+ var external_this_wp_i18n_ = __webpack_require__(3);
 
 
10379
 
10380
+ // CONCATENATED MODULE: ./node_modules/@wordpress/components/node_modules/@wordpress/keycodes/build-module/platform.js
10381
+ /**
10382
+ * External dependencies
10383
+ */
 
10384
 
10385
+ /**
10386
+ * Return true if platform is MacOS.
10387
+ *
10388
+ * @param {Object} _window window object by default; used for DI testing.
10389
+ *
10390
+ * @return {boolean} True if MacOS; false otherwise.
10391
+ */
10392
 
10393
+ function isAppleOS() {
10394
+ var _window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
 
 
 
 
 
10395
 
10396
+ var platform = _window.navigator.platform;
10397
+ return platform.indexOf('Mac') !== -1 || Object(external_lodash_["includes"])(['iPad', 'iPhone'], platform);
10398
+ }
10399
+ //# sourceMappingURL=platform.js.map
10400
+ // CONCATENATED MODULE: ./node_modules/@wordpress/components/node_modules/@wordpress/keycodes/build-module/index.js
10401
 
 
 
 
 
 
 
10402
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10403
 
10404
+ /**
10405
+ * Note: The order of the modifier keys in many of the [foo]Shortcut()
10406
+ * functions in this file are intentional and should not be changed. They're
10407
+ * designed to fit with the standard menu keyboard shortcuts shown in the
10408
+ * user's platform.
10409
+ *
10410
+ * For example, on MacOS menu shortcuts will place Shift before Command, but
10411
+ * on Windows Control will usually come first. So don't provide your own
10412
+ * shortcut combos directly to keyboardShortcut().
10413
+ */
10414
 
10415
+ /**
10416
+ * External dependencies
10417
+ */
 
 
 
 
 
10418
 
10419
+ /**
10420
+ * WordPress dependencies
10421
+ */
10422
 
 
 
10423
 
10424
+ /**
10425
+ * Internal dependencies
10426
+ */
 
 
 
 
 
10427
 
 
 
 
 
 
 
 
 
10428
 
10429
+ /**
10430
+ * @typedef {'primary'|'primaryShift'|'primaryAlt'|'secondary'|'access'|'ctrl'|'alt'|'ctrlShift'|'shift'|'shiftAlt'} WPKeycodeModifier
10431
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10432
 
10433
+ /**
10434
+ * An object of handler functions for each of the possible modifier
10435
+ * combinations. A handler will return a value for a given key.
10436
+ *
10437
+ * @typedef {Record<WPKeycodeModifier, (key:string)=>any>} WPKeycodeHandlerByModifier
10438
+ */
10439
 
10440
+ /**
10441
+ * Keycode for BACKSPACE key.
10442
+ */
10443
 
10444
+ var BACKSPACE = 8;
10445
+ /**
10446
+ * Keycode for TAB key.
10447
+ */
10448
 
10449
+ var TAB = 9;
10450
+ /**
10451
+ * Keycode for ENTER key.
10452
+ */
10453
 
10454
+ var ENTER = 13;
10455
+ /**
10456
+ * Keycode for ESCAPE key.
10457
+ */
10458
 
10459
+ var ESCAPE = 27;
10460
+ /**
10461
+ * Keycode for SPACE key.
10462
+ */
10463
 
10464
+ var SPACE = 32;
10465
  /**
10466
+ * Keycode for LEFT key.
10467
  */
10468
 
10469
+ var LEFT = 37;
10470
+ /**
10471
+ * Keycode for UP key.
10472
+ */
10473
 
10474
+ var UP = 38;
10475
+ /**
10476
+ * Keycode for RIGHT key.
10477
+ */
10478
 
10479
+ var RIGHT = 39;
10480
+ /**
10481
+ * Keycode for DOWN key.
10482
+ */
10483
 
10484
+ var DOWN = 40;
10485
+ /**
10486
+ * Keycode for DELETE key.
10487
+ */
10488
 
10489
+ var DELETE = 46;
10490
  /**
10491
+ * Keycode for F10 key.
10492
  */
10493
 
10494
+ var F10 = 121;
10495
+ /**
10496
+ * Keycode for ALT key.
10497
+ */
10498
 
10499
+ var ALT = 'alt';
10500
+ /**
10501
+ * Keycode for CTRL key.
10502
+ */
10503
 
10504
+ var CTRL = 'ctrl';
10505
+ /**
10506
+ * Keycode for COMMAND/META key.
10507
+ */
 
 
 
 
10508
 
10509
+ var COMMAND = 'meta';
10510
+ /**
10511
+ * Keycode for SHIFT key.
10512
+ */
10513
 
10514
+ var SHIFT = 'shift';
10515
+ /**
10516
+ * Keycode for ZERO key.
10517
+ */
10518
 
10519
+ var ZERO = 48;
10520
+ /**
10521
+ * Object that contains functions that return the available modifier
10522
+ * depending on platform.
10523
+ *
10524
+ * - `primary`: takes a isApple function as a parameter.
10525
+ * - `primaryShift`: takes a isApple function as a parameter.
10526
+ * - `primaryAlt`: takes a isApple function as a parameter.
10527
+ * - `secondary`: takes a isApple function as a parameter.
10528
+ * - `access`: takes a isApple function as a parameter.
10529
+ * - `ctrl`
10530
+ * - `alt`
10531
+ * - `ctrlShift`
10532
+ * - `shift`
10533
+ * - `shiftAlt`
10534
+ */
10535
 
10536
+ var modifiers = {
10537
+ primary: function primary(_isApple) {
10538
+ return _isApple() ? [COMMAND] : [CTRL];
10539
+ },
10540
+ primaryShift: function primaryShift(_isApple) {
10541
+ return _isApple() ? [SHIFT, COMMAND] : [CTRL, SHIFT];
10542
+ },
10543
+ primaryAlt: function primaryAlt(_isApple) {
10544
+ return _isApple() ? [ALT, COMMAND] : [CTRL, ALT];
10545
+ },
10546
+ secondary: function secondary(_isApple) {
10547
+ return _isApple() ? [SHIFT, ALT, COMMAND] : [CTRL, SHIFT, ALT];
10548
+ },
10549
+ access: function access(_isApple) {
10550
+ return _isApple() ? [CTRL, ALT] : [SHIFT, ALT];
10551
+ },
10552
+ ctrl: function ctrl() {
10553
+ return [CTRL];
10554
+ },
10555
+ alt: function alt() {
10556
+ return [ALT];
10557
+ },
10558
+ ctrlShift: function ctrlShift() {
10559
+ return [CTRL, SHIFT];
10560
+ },
10561
+ shift: function shift() {
10562
+ return [SHIFT];
10563
+ },
10564
+ shiftAlt: function shiftAlt() {
10565
+ return [SHIFT, ALT];
10566
  }
 
 
 
 
 
 
 
 
 
10567
  };
 
 
 
 
 
10568
  /**
10569
+ * An object that contains functions to get raw shortcuts.
10570
+ * E.g. rawShortcut.primary( 'm' ) will return 'meta+m' on Mac.
10571
+ * These are intended for user with the KeyboardShortcuts component or TinyMCE.
10572
+ *
10573
+ * @type {WPKeycodeHandlerByModifier} Keyed map of functions to raw shortcuts.
10574
  */
10575
 
10576
+ var rawShortcut = Object(external_lodash_["mapValues"])(modifiers, function (modifier) {
10577
+ return function (character) {
10578
+ var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS;
10579
 
10580
+ return [].concat(Object(toConsumableArray["a" /* default */])(modifier(_isApple)), [character.toLowerCase()]).join('+');
10581
+ };
10582
+ });
10583
  /**
10584
+ * Return an array of the parts of a keyboard shortcut chord for display
10585
+ * E.g displayShortcutList.primary( 'm' ) will return [ '⌘', 'M' ] on Mac.
10586
+ *
10587
+ * @type {WPKeycodeHandlerByModifier} Keyed map of functions to shortcut
10588
+ * sequences.
10589
  */
10590
 
10591
+ var displayShortcutList = Object(external_lodash_["mapValues"])(modifiers, function (modifier) {
10592
+ return function (character) {
10593
+ var _replacementKeyMap;
10594
 
10595
+ var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10596
 
10597
+ var isApple = _isApple();
 
 
 
 
 
 
 
 
 
 
 
 
 
10598
 
10599
+ var replacementKeyMap = (_replacementKeyMap = {}, Object(defineProperty["a" /* default */])(_replacementKeyMap, ALT, isApple ? '⌥' : 'Alt'), Object(defineProperty["a" /* default */])(_replacementKeyMap, CTRL, isApple ? '^' : 'Ctrl'), Object(defineProperty["a" /* default */])(_replacementKeyMap, COMMAND, '⌘'), Object(defineProperty["a" /* default */])(_replacementKeyMap, SHIFT, isApple ? '⇧' : 'Shift'), _replacementKeyMap);
10600
+ var modifierKeys = modifier(_isApple).reduce(function (accumulator, key) {
10601
+ var replacementKey = Object(external_lodash_["get"])(replacementKeyMap, key, key); // If on the Mac, adhere to platform convention and don't show plus between keys.
10602
 
10603
+ if (isApple) {
10604
+ return [].concat(Object(toConsumableArray["a" /* default */])(accumulator), [replacementKey]);
10605
+ }
10606
 
10607
+ return [].concat(Object(toConsumableArray["a" /* default */])(accumulator), [replacementKey, '+']);
10608
+ }, []);
10609
+ var capitalizedCharacter = Object(external_lodash_["capitalize"])(character);
10610
+ return [].concat(Object(toConsumableArray["a" /* default */])(modifierKeys), [capitalizedCharacter]);
10611
+ };
10612
+ });
10613
  /**
10614
+ * An object that contains functions to display shortcuts.
10615
+ * E.g. displayShortcut.primary( 'm' ) will return '⌘M' on Mac.
10616
+ *
10617
+ * @type {WPKeycodeHandlerByModifier} Keyed map of functions to display
10618
+ * shortcuts.
10619
  */
10620
 
10621
+ var displayShortcut = Object(external_lodash_["mapValues"])(displayShortcutList, function (shortcutList) {
10622
+ return function (character) {
10623
+ var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS;
10624
 
10625
+ return shortcutList(character, _isApple).join('');
10626
+ };
10627
+ });
10628
+ /**
10629
+ * An object that contains functions to return an aria label for a keyboard shortcut.
10630
+ * E.g. shortcutAriaLabel.primary( '.' ) will return 'Command + Period' on Mac.
10631
+ *
10632
+ * @type {WPKeycodeHandlerByModifier} Keyed map of functions to shortcut ARIA
10633
+ * labels.
10634
+ */
10635
 
10636
+ var shortcutAriaLabel = Object(external_lodash_["mapValues"])(modifiers, function (modifier) {
10637
+ return function (character) {
10638
+ var _replacementKeyMap2;
 
 
 
10639
 
10640
+ var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS;
 
 
 
 
 
 
 
 
10641
 
10642
+ var isApple = _isApple();
 
 
 
 
 
10643
 
10644
+ var replacementKeyMap = (_replacementKeyMap2 = {}, Object(defineProperty["a" /* default */])(_replacementKeyMap2, SHIFT, 'Shift'), Object(defineProperty["a" /* default */])(_replacementKeyMap2, COMMAND, isApple ? 'Command' : 'Control'), Object(defineProperty["a" /* default */])(_replacementKeyMap2, CTRL, 'Control'), Object(defineProperty["a" /* default */])(_replacementKeyMap2, ALT, isApple ? 'Option' : 'Alt'), Object(defineProperty["a" /* default */])(_replacementKeyMap2, ',', Object(external_this_wp_i18n_["__"])('Comma')), Object(defineProperty["a" /* default */])(_replacementKeyMap2, '.', Object(external_this_wp_i18n_["__"])('Period')), Object(defineProperty["a" /* default */])(_replacementKeyMap2, '`', Object(external_this_wp_i18n_["__"])('Backtick')), _replacementKeyMap2);
10645
+ return [].concat(Object(toConsumableArray["a" /* default */])(modifier(_isApple)), [character]).map(function (key) {
10646
+ return Object(external_lodash_["capitalize"])(Object(external_lodash_["get"])(replacementKeyMap, key, key));
10647
+ }).join(isApple ? ' ' : ' + ');
10648
+ };
10649
+ });
10650
+ /**
10651
+ * From a given KeyboardEvent, returns an array of active modifier constants for
10652
+ * the event.
10653
+ *
10654
+ * @param {KeyboardEvent} event Keyboard event.
10655
+ *
10656
+ * @return {Array<ALT|CTRL|COMMAND|SHIFT>} Active modifier constants.
10657
+ */
10658
 
10659
+ function getEventModifiers(event) {
10660
+ return [ALT, CTRL, COMMAND, SHIFT].filter(function (key) {
10661
+ return event["".concat(key, "Key")];
10662
+ });
10663
+ }
10664
  /**
10665
+ * An object that contains functions to check if a keyboard event matches a
10666
+ * predefined shortcut combination.
10667
+ * E.g. isKeyboardEvent.primary( event, 'm' ) will return true if the event
10668
+ * signals pressing ⌘M.
10669
+ *
10670
+ * @type {WPKeycodeHandlerByModifier} Keyed map of functions to match events.
10671
  */
10672
 
10673
 
10674
+ var isKeyboardEvent = Object(external_lodash_["mapValues"])(modifiers, function (getModifiers) {
10675
+ return function (event, character) {
10676
+ var _isApple = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : isAppleOS;
10677
 
10678
+ var mods = getModifiers(_isApple);
10679
+ var eventMods = getEventModifiers(event);
10680
 
10681
+ if (Object(external_lodash_["xor"])(mods, eventMods).length) {
10682
+ return false;
10683
+ }
 
10684
 
10685
+ if (!character) {
10686
+ return Object(external_lodash_["includes"])(mods, event.key.toLowerCase());
10687
+ }
 
 
 
10688
 
10689
+ return event.key === character;
10690
+ };
10691
+ });
10692
+ //# sourceMappingURL=index.js.map
10693
 
10694
+ /***/ }),
10695
+
10696
+ /***/ 32:
10697
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
10698
+
10699
+ "use strict";
10700
+ /* unused harmony export Circle */
10701
+ /* unused harmony export G */
10702
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Path; });
10703
+ /* unused harmony export Polygon */
10704
+ /* unused harmony export Rect */
10705
+ /* unused harmony export Defs */
10706
+ /* unused harmony export RadialGradient */
10707
+ /* unused harmony export LinearGradient */
10708
+ /* unused harmony export Stop */
10709
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SVG; });
10710
+ /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
10711
+ /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14);
10712
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8);
10713
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
10714
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
10715
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
10716
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10717
 
 
 
10718
 
10719
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
10720
 
10721
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
10722
 
10723
  /**
10724
  * External dependencies
10725
  */
10726
 
 
 
10727
  /**
10728
+ * WordPress dependencies
10729
  */
10730
 
10731
+ // Disable reason: JSDoc linter doesn't seem to parse the union (`&`) correctly.
10732
 
10733
+ /* eslint-disable jsdoc/valid-types */
10734
 
10735
+ /** @typedef {{isPressed?: boolean} & import('react').ComponentPropsWithoutRef<'svg'>} SVGProps */
 
 
 
 
10736
 
10737
+ /* eslint-enable jsdoc/valid-types */
 
 
10738
 
10739
+ /**
10740
+ * @param {import('react').ComponentPropsWithoutRef<'circle'>} props
10741
+ *
10742
+ * @return {JSX.Element} Circle component
10743
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10744
 
10745
+ var Circle = function Circle(props) {
10746
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('circle', props);
10747
+ };
10748
+ /**
10749
+ * @param {import('react').ComponentPropsWithoutRef<'g'>} props
10750
+ *
10751
+ * @return {JSX.Element} G component
10752
+ */
10753
 
10754
+ var G = function G(props) {
10755
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('g', props);
10756
+ };
10757
+ /**
10758
+ * @param {import('react').ComponentPropsWithoutRef<'path'>} props
10759
+ *
10760
+ * @return {JSX.Element} Path component
10761
+ */
10762
 
10763
+ var Path = function Path(props) {
10764
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('path', props);
10765
+ };
10766
  /**
10767
+ * @param {import('react').ComponentPropsWithoutRef<'polygon'>} props
10768
+ *
10769
+ * @return {JSX.Element} Polygon component
10770
  */
10771
 
10772
+ var Polygon = function Polygon(props) {
10773
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('polygon', props);
10774
+ };
10775
  /**
10776
+ * @param {import('react').ComponentPropsWithoutRef<'rect'>} props
10777
+ *
10778
+ * @return {JSX.Element} Rect component
10779
  */
10780
 
10781
+ var Rect = function Rect(props) {
10782
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('rect', props);
10783
+ };
10784
+ /**
10785
+ * @param {import('react').ComponentPropsWithoutRef<'defs'>} props
10786
+ *
10787
+ * @return {JSX.Element} Defs component
10788
+ */
10789
 
10790
+ var Defs = function Defs(props) {
10791
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('defs', props);
10792
+ };
10793
+ /**
10794
+ * @param {import('react').ComponentPropsWithoutRef<'radialGradient'>} props
10795
+ *
10796
+ * @return {JSX.Element} RadialGradient component
10797
+ */
10798
 
10799
+ var RadialGradient = function RadialGradient(props) {
10800
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('radialGradient', props);
10801
+ };
10802
+ /**
10803
+ * @param {import('react').ComponentPropsWithoutRef<'linearGradient'>} props
10804
+ *
10805
+ * @return {JSX.Element} LinearGradient component
10806
+ */
10807
 
10808
+ var LinearGradient = function LinearGradient(props) {
10809
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('linearGradient', props);
10810
+ };
10811
+ /**
10812
+ * @param {import('react').ComponentPropsWithoutRef<'stop'>} props
10813
+ *
10814
+ * @return {JSX.Element} Stop component
10815
+ */
10816
 
10817
+ var Stop = function Stop(props) {
10818
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])('stop', props);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10819
  };
10820
+ /**
10821
+ *
10822
+ * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.
10823
+ * Other props will be passed through to svg component.
10824
+ *
10825
+ * @return {JSX.Element} Stop component
10826
+ */
10827
 
10828
+ var SVG = function SVG(_ref) {
10829
+ var className = _ref.className,
10830
+ isPressed = _ref.isPressed,
10831
+ props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["className", "isPressed"]);
10832
 
10833
+ var appliedProps = _objectSpread({}, props, {
10834
+ className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(className, {
10835
+ 'is-pressed': isPressed
10836
+ }) || undefined,
10837
+ role: 'img',
10838
+ 'aria-hidden': true,
10839
+ focusable: false
10840
+ }); // Disable reason: We need to have a way to render HTML tag for web.
10841
+ // eslint-disable-next-line react/forbid-elements
10842
 
10843
 
10844
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])("svg", appliedProps);
10845
+ };
10846
+ //# sourceMappingURL=index.js.map
10847
 
10848
+ /***/ }),
10849
 
10850
+ /***/ 33:
10851
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
10852
 
10853
+ "use strict";
10854
+ /* unused harmony export JETPACK_NAMESPACE */
10855
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return NAMESPACE; });
10856
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return WC_ADMIN_NAMESPACE; });
10857
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return WCS_NAMESPACE; });
10858
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DEFAULT_REQUIREMENT; });
10859
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MAX_PER_PAGE; });
10860
+ /* unused harmony export DEFAULT_ACTIONABLE_STATUSES */
10861
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return QUERY_DEFAULTS; });
10862
+ /* harmony import */ var _fresh_data_framework__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
10863
  /**
10864
  * External dependencies
10865
  */
10866
 
10867
+ var JETPACK_NAMESPACE = '/jetpack/v4';
10868
+ var NAMESPACE = '/wc-analytics';
10869
+ var WC_ADMIN_NAMESPACE = '/wc-admin';
10870
+ var WCS_NAMESPACE = '/wc/v1'; // WCS endpoints like Stripe are not avaiable on later /wc versions
10871
 
10872
+ var DEFAULT_REQUIREMENT = {
10873
+ timeout: 1 * _fresh_data_framework__WEBPACK_IMPORTED_MODULE_0__[/* MINUTE */ "b"],
10874
+ freshness: 30 * _fresh_data_framework__WEBPACK_IMPORTED_MODULE_0__[/* MINUTE */ "b"]
10875
+ }; // WordPress & WooCommerce both set a hard limit of 100 for the per_page parameter
10876
 
10877
+ var MAX_PER_PAGE = 100;
10878
+ var DEFAULT_ACTIONABLE_STATUSES = ['processing', 'on-hold'];
10879
+ var QUERY_DEFAULTS = {
10880
+ pageSize: 25,
10881
+ period: 'month',
10882
+ compare: 'previous_year',
10883
+ noteTypes: 'info,warning,marketing'
10884
+ };
10885
 
10886
+ /***/ }),
10887
 
10888
+ /***/ 35:
10889
+ /***/ (function(module, exports) {
10890
 
10891
+ function _typeof(obj) {
10892
+ "@babel/helpers - typeof";
 
 
 
 
 
 
10893
 
10894
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
10895
+ module.exports = _typeof = function _typeof(obj) {
10896
+ return typeof obj;
 
10897
  };
10898
+ } else {
10899
+ module.exports = _typeof = function _typeof(obj) {
10900
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10901
+ };
10902
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10903
 
10904
+ return _typeof(obj);
10905
+ }
10906
 
10907
+ module.exports = _typeof;
 
 
 
 
10908
 
10909
+ /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10910
 
10911
+ /***/ 36:
10912
+ /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10913
 
10914
+ "use strict";
 
10915
 
10916
 
10917
+ Object.defineProperty(exports, "__esModule", {
10918
+ value: true
10919
+ });
10920
 
10921
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
10922
+ * External Dependencies
10923
+ */
10924
 
10925
 
10926
  /**
10927
+ * Internal Dependencies
10928
  */
10929
 
10930
 
10931
+ var _react = __webpack_require__(13);
10932
 
10933
+ var _react2 = _interopRequireDefault(_react);
10934
 
10935
+ var _reactAddonsCreateFragment = __webpack_require__(148);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10936
 
10937
+ var _reactAddonsCreateFragment2 = _interopRequireDefault(_reactAddonsCreateFragment);
10938
 
10939
+ var _tokenize = __webpack_require__(151);
10940
 
10941
+ var _tokenize2 = _interopRequireDefault(_tokenize);
10942
 
10943
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10944
 
10945
+ var currentMixedString = void 0;
10946
 
10947
+ function getCloseIndex(openIndex, tokens) {
10948
+ var openToken = tokens[openIndex],
10949
+ nestLevel = 0,
10950
+ token,
10951
+ i;
10952
+ for (i = openIndex + 1; i < tokens.length; i++) {
10953
+ token = tokens[i];
10954
+ if (token.value === openToken.value) {
10955
+ if (token.type === 'componentOpen') {
10956
+ nestLevel++;
10957
+ continue;
10958
+ }
10959
+ if (token.type === 'componentClose') {
10960
+ if (nestLevel === 0) {
10961
+ return i;
10962
+ }
10963
+ nestLevel--;
10964
+ }
10965
+ }
10966
+ }
10967
+ // if we get this far, there was no matching close token
10968
+ throw new Error('Missing closing component token `' + openToken.value + '`');
10969
+ }
10970
 
10971
+ function buildChildren(tokens, components) {
10972
+ var children = [],
10973
+ childrenObject = {},
10974
+ openComponent,
10975
+ clonedOpenComponent,
10976
+ openIndex,
10977
+ closeIndex,
10978
+ token,
10979
+ i,
10980
+ grandChildTokens,
10981
+ grandChildren,
10982
+ siblingTokens,
10983
+ siblings;
10984
+
10985
+ for (i = 0; i < tokens.length; i++) {
10986
+ token = tokens[i];
10987
+ if (token.type === 'string') {
10988
+ children.push(token.value);
10989
+ continue;
10990
+ }
10991
+ // component node should at least be set
10992
+ if (!components.hasOwnProperty(token.value) || typeof components[token.value] === 'undefined') {
10993
+ throw new Error('Invalid interpolation, missing component node: `' + token.value + '`');
10994
+ }
10995
+ // should be either ReactElement or null (both type "object"), all other types deprecated
10996
+ if (_typeof(components[token.value]) !== 'object') {
10997
+ throw new Error('Invalid interpolation, component node must be a ReactElement or null: `' + token.value + '`', '\n> ' + currentMixedString);
10998
+ }
10999
+ // we should never see a componentClose token in this loop
11000
+ if (token.type === 'componentClose') {
11001
+ throw new Error('Missing opening component token: `' + token.value + '`');
11002
+ }
11003
+ if (token.type === 'componentOpen') {
11004
+ openComponent = components[token.value];
11005
+ openIndex = i;
11006
+ break;
11007
+ }
11008
+ // componentSelfClosing token
11009
+ children.push(components[token.value]);
11010
+ continue;
11011
+ }
11012
 
11013
+ if (openComponent) {
11014
+ closeIndex = getCloseIndex(openIndex, tokens);
11015
+ grandChildTokens = tokens.slice(openIndex + 1, closeIndex);
11016
+ grandChildren = buildChildren(grandChildTokens, components);
11017
+ clonedOpenComponent = _react2.default.cloneElement(openComponent, {}, grandChildren);
11018
+ children.push(clonedOpenComponent);
11019
+
11020
+ if (closeIndex < tokens.length - 1) {
11021
+ siblingTokens = tokens.slice(closeIndex + 1);
11022
+ siblings = buildChildren(siblingTokens, components);
11023
+ children = children.concat(siblings);
11024
+ }
11025
+ }
11026
 
11027
+ if (children.length === 1) {
11028
+ return children[0];
11029
+ }
11030
 
11031
+ children.forEach(function (child, index) {
11032
+ if (child) {
11033
+ childrenObject['interpolation-child-' + index] = child;
11034
+ }
11035
+ });
11036
 
11037
+ return (0, _reactAddonsCreateFragment2.default)(childrenObject);
11038
+ }
11039
 
11040
+ function interpolate(options) {
11041
+ var mixedString = options.mixedString,
11042
+ components = options.components,
11043
+ throwErrors = options.throwErrors;
11044
 
 
 
 
11045
 
11046
+ currentMixedString = mixedString;
11047
 
11048
+ if (!components) {
11049
+ return mixedString;
11050
+ }
11051
 
11052
+ if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) !== 'object') {
11053
+ if (throwErrors) {
11054
+ throw new Error('Interpolation Error: unable to process `' + mixedString + '` because components is not an object');
11055
+ }
11056
 
11057
+ return mixedString;
11058
+ }
11059
 
11060
+ var tokens = (0, _tokenize2.default)(mixedString);
11061
 
11062
+ try {
11063
+ return buildChildren(tokens, components);
11064
+ } catch (error) {
11065
+ if (throwErrors) {
11066
+ throw new Error('Interpolation Error: unable to process `' + mixedString + '` because of error `' + error.message + '`');
11067
+ }
11068
 
11069
+ return mixedString;
11070
+ }
11071
+ };
11072
 
11073
+ exports.default = interpolate;
11074
+ //# sourceMappingURL=index.js.map
11075
 
11076
+ /***/ }),
11077
 
11078
+ /***/ 37:
11079
+ /***/ (function(module, exports) {
11080
 
11081
+ function _defineProperties(target, props) {
11082
+ for (var i = 0; i < props.length; i++) {
11083
+ var descriptor = props[i];
11084
+ descriptor.enumerable = descriptor.enumerable || false;
11085
+ descriptor.configurable = true;
11086
+ if ("value" in descriptor) descriptor.writable = true;
11087
+ Object.defineProperty(target, descriptor.key, descriptor);
11088
+ }
11089
+ }
11090
 
11091
+ function _createClass(Constructor, protoProps, staticProps) {
11092
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
11093
+ if (staticProps) _defineProperties(Constructor, staticProps);
11094
+ return Constructor;
11095
+ }
11096
 
11097
+ module.exports = _createClass;
11098
 
11099
+ /***/ }),
11100
 
11101
+ /***/ 38:
11102
+ /***/ (function(module, exports) {
11103
 
11104
+ function _classCallCheck(instance, Constructor) {
11105
+ if (!(instance instanceof Constructor)) {
11106
+ throw new TypeError("Cannot call a class as a function");
11107
+ }
11108
+ }
11109
 
11110
+ module.exports = _classCallCheck;
11111
 
11112
+ /***/ }),
11113
 
11114
+ /***/ 39:
11115
+ /***/ (function(module, exports, __webpack_require__) {
 
11116
 
11117
+ var setPrototypeOf = __webpack_require__(147);
 
11118
 
11119
+ function _inherits(subClass, superClass) {
11120
+ if (typeof superClass !== "function" && superClass !== null) {
11121
+ throw new TypeError("Super expression must either be null or a function");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11122
  }
11123
 
11124
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
11125
+ constructor: {
11126
+ value: subClass,
11127
+ writable: true,
11128
+ configurable: true
11129
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11130
  });
11131
+ if (superClass) setPrototypeOf(subClass, superClass);
11132
+ }
 
 
 
 
 
 
 
 
11133
 
11134
+ module.exports = _inherits;
 
 
11135
 
11136
+ /***/ }),
 
 
 
11137
 
11138
+ /***/ 4:
11139
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
11140
 
11141
+ "use strict";
11142
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
11143
+ function _getPrototypeOf(o) {
11144
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
11145
+ return o.__proto__ || Object.getPrototypeOf(o);
11146
  };
11147
+ return _getPrototypeOf(o);
11148
+ }
11149
 
11150
+ /***/ }),
 
 
 
 
 
 
 
11151
 
11152
+ /***/ 40:
11153
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
11154
 
11155
+ "use strict";
11156
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
11157
+ function _typeof(obj) {
11158
+ "@babel/helpers - typeof";
 
11159
 
11160
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
11161
+ _typeof = function _typeof(obj) {
11162
+ return typeof obj;
11163
+ };
11164
+ } else {
11165
+ _typeof = function _typeof(obj) {
11166
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
11167
+ };
11168
+ }
11169
+
11170
+ return _typeof(obj);
11171
+ }
 
 
 
 
 
 
 
 
 
 
 
11172
 
11173
+ /***/ }),
11174
 
11175
+ /***/ 406:
11176
+ /***/ (function(module, exports, __webpack_require__) {
11177
 
11178
+ "use strict";
11179
 
11180
 
11181
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
11182
 
11183
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
11184
 
11185
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
11186
 
11187
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
11188
 
11189
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
11190
 
11191
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
11192
 
11193
+ var hoistNonReactStatic = __webpack_require__(441);
11194
+ var React = __webpack_require__(13);
11195
+ var ReactDOM = __webpack_require__(78);
11196
 
11197
+ module.exports = function enhanceWithClickOutside(WrappedComponent) {
11198
+ var componentName = WrappedComponent.displayName || WrappedComponent.name;
11199
 
11200
+ var EnhancedComponent = function (_React$Component) {
11201
+ _inherits(EnhancedComponent, _React$Component);
11202
 
11203
+ function EnhancedComponent(props) {
11204
+ _classCallCheck(this, EnhancedComponent);
11205
 
11206
+ var _this = _possibleConstructorReturn(this, (EnhancedComponent.__proto__ || Object.getPrototypeOf(EnhancedComponent)).call(this, props));
 
11207
 
11208
+ _this.handleClickOutside = _this.handleClickOutside.bind(_this);
11209
+ return _this;
 
 
 
 
 
11210
  }
 
11211
 
11212
+ _createClass(EnhancedComponent, [{
11213
+ key: 'componentDidMount',
11214
+ value: function componentDidMount() {
11215
+ document.addEventListener('click', this.handleClickOutside, true);
11216
+ }
11217
+ }, {
11218
+ key: 'componentWillUnmount',
11219
+ value: function componentWillUnmount() {
11220
+ document.removeEventListener('click', this.handleClickOutside, true);
11221
+ }
11222
+ }, {
11223
+ key: 'handleClickOutside',
11224
+ value: function handleClickOutside(e) {
11225
+ var domNode = this.__domNode;
11226
+ if ((!domNode || !domNode.contains(e.target)) && this.__wrappedInstance && typeof this.__wrappedInstance.handleClickOutside === 'function') {
11227
+ this.__wrappedInstance.handleClickOutside(e);
11228
+ }
11229
+ }
11230
+ }, {
11231
+ key: 'render',
11232
+ value: function render() {
11233
+ var _this2 = this;
11234
+
11235
+ var _props = this.props,
11236
+ wrappedRef = _props.wrappedRef,
11237
+ rest = _objectWithoutProperties(_props, ['wrappedRef']);
11238
+
11239
+ return React.createElement(WrappedComponent, _extends({}, rest, {
11240
+ ref: function ref(c) {
11241
+ _this2.__wrappedInstance = c;
11242
+ _this2.__domNode = ReactDOM.findDOMNode(c);
11243
+ wrappedRef && wrappedRef(c);
11244
+ }
11245
+ }));
11246
+ }
11247
+ }]);
11248
 
11249
+ return EnhancedComponent;
11250
+ }(React.Component);
 
 
11251
 
11252
+ EnhancedComponent.displayName = 'clickOutside(' + componentName + ')';
 
 
11253
 
11254
+ return hoistNonReactStatic(EnhancedComponent, WrappedComponent);
11255
+ };
11256
 
11257
+ /***/ }),
 
11258
 
11259
+ /***/ 407:
11260
+ /***/ (function(module, exports, __webpack_require__) {
11261
 
11262
+ "use strict";
11263
+ var _extends=Object.assign||function(a){for(var c,b=1;b<arguments.length;b++)for(var d in c=arguments[b],c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d]);return a};Object.defineProperty(exports,'__esModule',{value:!0});exports.default=function(a){var b=a.size,c=b===void 0?24:b,d=a.onClick,e=a.icon,f=a.className,g=_objectWithoutProperties(a,['size','onClick','icon','className']),j=['gridicon','gridicons-pages',f,!1,!1,!1].filter(Boolean).join(' ');return _react2.default.createElement('svg',_extends({className:j,height:c,width:c,onClick:d},g,{xmlns:'http://www.w3.org/2000/svg',viewBox:'0 0 24 24'}),_react2.default.createElement('g',null,_react2.default.createElement('path',{d:'M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z'})))};var _react=__webpack_require__(13),_react2=_interopRequireDefault(_react);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _objectWithoutProperties(a,b){var d={};for(var c in a)0<=b.indexOf(c)||Object.prototype.hasOwnProperty.call(a,c)&&(d[c]=a[c]);return d}module.exports=exports['default'];
11264
 
11265
 
11266
+ /***/ }),
11267
 
11268
+ /***/ 408:
11269
+ /***/ (function(module, exports, __webpack_require__) {
11270
 
11271
+ "use strict";
11272
+ var _extends=Object.assign||function(a){for(var c,b=1;b<arguments.length;b++)for(var d in c=arguments[b],c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d]);return a};Object.defineProperty(exports,'__esModule',{value:!0});exports.default=function(a){var b=a.size,c=b===void 0?24:b,d=a.onClick,e=a.icon,f=a.className,g=_objectWithoutProperties(a,['size','onClick','icon','className']),j=['gridicon','gridicons-cross-small',f,!1,!1,!1].filter(Boolean).join(' ');return _react2.default.createElement('svg',_extends({className:j,height:c,width:c,onClick:d},g,{xmlns:'http://www.w3.org/2000/svg',viewBox:'0 0 24 24'}),_react2.default.createElement('g',null,_react2.default.createElement('path',{d:'M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z'})))};var _react=__webpack_require__(13),_react2=_interopRequireDefault(_react);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _objectWithoutProperties(a,b){var d={};for(var c in a)0<=b.indexOf(c)||Object.prototype.hasOwnProperty.call(a,c)&&(d[c]=a[c]);return d}module.exports=exports['default'];
11273
 
11274
 
11275
+ /***/ }),
11276
 
11277
+ /***/ 409:
11278
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
11279
 
11280
+ "use strict";
11281
+ /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
11282
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
11283
+ /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
11284
+ /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
11285
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8);
11286
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
11287
+ /* harmony import */ var _wordpress_a11y__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(127);
11288
+ /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
11289
+ /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
11290
+ /* harmony import */ var _wordpress_warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(410);
11291
+ /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(68);
11292
 
11293
 
11294
+ /**
11295
+ * External dependencies
11296
+ */
11297
 
11298
 
11299
  /**
11300
+ * WordPress dependencies
11301
  */
11302
 
11303
 
11309
  */
11310
 
11311
 
11312
+ var NOTICE_TIMEOUT = 10000;
11313
+ /** @typedef {import('@wordpress/element').WPElement} WPElement */
11314
+
11315
  /**
11316
+ * Custom hook which announces the message with the given politeness, if a
11317
+ * valid message is provided.
11318
  *
11319
+ * @param {string|WPElement} [message] Message to announce.
11320
+ * @param {'polite'|'assertive'} politeness Politeness to announce.
 
 
 
 
 
11321
  */
11322
 
11323
+ function useSpokenMessage(message, politeness) {
11324
+ var spokenMessage = typeof message === 'string' ? message : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["renderToString"])(message);
11325
+ Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
11326
+ if (spokenMessage) {
11327
+ Object(_wordpress_a11y__WEBPACK_IMPORTED_MODULE_3__[/* speak */ "a"])(spokenMessage, politeness);
11328
+ }
11329
+ }, [spokenMessage, politeness]);
11330
+ }
11331
+
11332
+ function Snackbar(_ref, ref) {
11333
+ var className = _ref.className,
11334
  children = _ref.children,
11335
+ _ref$spokenMessage = _ref.spokenMessage,
11336
+ spokenMessage = _ref$spokenMessage === void 0 ? children : _ref$spokenMessage,
11337
+ _ref$politeness = _ref.politeness,
11338
+ politeness = _ref$politeness === void 0 ? 'polite' : _ref$politeness,
11339
+ _ref$actions = _ref.actions,
11340
+ actions = _ref$actions === void 0 ? [] : _ref$actions,
11341
  _ref$onRemove = _ref.onRemove,
11342
+ onRemove = _ref$onRemove === void 0 ? lodash__WEBPACK_IMPORTED_MODULE_1__["noop"] : _ref$onRemove;
11343
+ useSpokenMessage(spokenMessage, politeness);
11344
+ Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
11345
+ var timeoutHandle = setTimeout(function () {
11346
+ onRemove();
11347
+ }, NOTICE_TIMEOUT);
11348
+ return function () {
11349
+ return clearTimeout(timeoutHandle);
11350
+ };
11351
+ }, []);
11352
+ var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()(className, 'components-snackbar');
11353
 
11354
+ if (actions && actions.length > 1) {
11355
+ // we need to inform developers that snackbar only accepts 1 action
11356
+ typeof process !== "undefined" && process.env && "production" !== "production" ? Object(_wordpress_warning__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])('Snackbar can only have 1 action, use Notice if your message require many messages') : void 0; // return first element only while keeping it inside an array
 
 
11357
 
11358
+ actions = [actions[0]];
11359
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11360
 
11361
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
11362
+ ref: ref,
11363
+ className: classes,
11364
+ onClick: onRemove,
11365
+ tabIndex: "0",
11366
+ role: "button",
11367
+ onKeyPress: onRemove,
11368
+ "aria-label": Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Dismiss this notice')
11369
+ }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
11370
+ className: "components-snackbar__content"
11371
+ }, children, actions.map(function (_ref2, index) {
11372
+ var label = _ref2.label,
11373
+ _onClick = _ref2.onClick,
11374
+ url = _ref2.url;
11375
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(___WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], {
11376
+ key: index,
11377
+ href: url,
11378
+ isTertiary: true,
11379
+ onClick: function onClick(event) {
11380
+ event.stopPropagation();
11381
 
11382
+ if (_onClick) {
11383
+ _onClick(event);
11384
+ }
11385
+ },
11386
+ className: "components-snackbar__action"
11387
+ }, label);
11388
+ })));
11389
+ }
11390
 
11391
+ /* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(Snackbar));
11392
+ //# sourceMappingURL=index.js.map
11393
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(47)))
 
 
 
 
 
 
 
 
 
 
 
 
 
11394
 
11395
+ /***/ }),
 
 
 
 
11396
 
11397
+ /***/ 41:
11398
+ /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
11399
 
11400
+ var arrayWithoutHoles = __webpack_require__(211);
 
 
 
 
 
 
 
11401
 
11402
+ var iterableToArray = __webpack_require__(212);
 
 
11403
 
11404
+ var unsupportedIterableToArray = __webpack_require__(172);
 
 
11405
 
11406
+ var nonIterableSpread = __webpack_require__(213);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11407
 
11408
+ function _toConsumableArray(arr) {
11409
+ return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
11410
+ }
11411
 
11412
+ module.exports = _toConsumableArray;
11413
 
11414
+ /***/ }),
11415
 
11416
+ /***/ 410:
11417
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
11418
 
11419
+ "use strict";
11420
+ /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return warning; });
11421
+ function isDev() {
11422
+ return typeof process !== 'undefined' && process.env && "production" !== 'production';
11423
+ }
11424
  /**
11425
+ * Shows a warning with `message` if environment is not `production`.
11426
+ *
11427
+ * @param {string} message Message to show in the warning.
11428
+ *
11429
+ * @example
11430
+ * ```js
11431
+ * import warning from '@wordpress/warning';
11432
+ *
11433
+ * function MyComponent( props ) {
11434
+ * if ( ! props.title ) {
11435
+ * warning( '`props.title` was not passed' );
11436
+ * }
11437
+ * ...
11438
+ * }
11439
+ * ```
11440
  */
11441
 
11442
 
11443
+ function warning(message) {
11444
+ if (!isDev()) {
11445
+ return;
11446
+ } // eslint-disable-next-line no-console
 
11447
 
11448
 
11449
+ console.warn(message); // Throwing an error and catching it immediately to improve debugging
11450
+ // A consumer can use 'pause on caught exceptions'
11451
+ // https://github.com/facebook/react/issues/4216
11452
 
11453
+ try {
11454
+ throw Error(message);
11455
+ } catch (x) {// do nothing
11456
+ }
11457
+ }
11458
+ //# sourceMappingURL=index.js.map
11459
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(47)))
11460
 
11461
+ /***/ }),
 
11462
 
11463
+ /***/ 411:
11464
+ /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
11465
 
11466
+ "use strict";
11467
+ /* WEBPACK VAR INJECTION */(function(global) {// @flow
 
 
 
 
11468
 
 
 
 
 
 
 
 
 
 
 
11469
 
11470
+ var key = '__global_unique_id__';
 
 
 
 
11471
 
11472
+ module.exports = function() {
11473
+ return global[key] = (global[key] || 0) + 1;
 
 
11474
  };
 
 
 
 
 
11475
 
11476
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(56)))
11477
 
11478
+ /***/ }),
11479
 
11480
+ /***/ 412:
11481
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
11482
 
11483
+ "use strict";
11484
+ /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
11485
+ /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);
11486
+ /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37);
11487
+ /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);
11488
+ /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39);
11489
+ /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__);
11490
+ /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
11491
+ /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);
11492
+ /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26);
11493
+ /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);
11494
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);
11495
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);
11496
+ /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18);
11497
+ /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__);
11498
+ /* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(43);
11499
+ /* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_7__);
11500
+ /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(445);
11501
+ /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_8__);
11502
 
11503
 
11504
 
11506
 
11507
 
11508
 
11509
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, result); }; }
11510
 
11511
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
11512
 
11513
  /**
11514
  * External dependencies
11515
  */
11516
 
11517
 
11518
+ /**
11519
+ * WooCommerce dependencies
11520
+ */
11521
 
11522
 
11523
  /**
11526
 
11527
 
11528
 
11529
+ var Navigation = /*#__PURE__*/function (_Component) {
11530
+ _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default()(Navigation, _Component);
11531
 
11532
+ var _super = _createSuper(Navigation);
11533
 
11534
+ function Navigation() {
11535
+ _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Navigation);
11536
 
11537
+ return _super.apply(this, arguments);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11538
  }
11539
 
11540
+ _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Navigation, [{
11541
+ key: "renderMenuItem",
11542
+ value: function renderMenuItem(item) {
11543
+ var _this = this;
11544
+
11545
+ var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
11546
+ var slug = item.slug,
11547
+ title = item.title,
11548
+ url = item.url;
11549
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("li", {
11550
+ key: slug,
11551
+ className: "woocommerce-navigation__menu-item woocommerce-navigation__menu-item-depth-".concat(depth)
11552
+ }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("a", {
11553
+ href: url
11554
+ }, title), item.children && item.children.length && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("ul", {
11555
+ className: "woocommerce-navigation__submenu"
11556
+ }, item.children.map(function (childItem) {
11557
+ return _this.renderMenuItem(childItem, depth + 1);
11558
+ })));
11559
+ }
11560
+ }, {
11561
+ key: "render",
11562
+ value: function render() {
11563
+ var _this2 = this;
11564
+
11565
+ var items = this.props.items;
11566
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("div", {
11567
+ className: "woocommerce-navigation"
11568
+ }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("ul", {
11569
+ className: "woocommerce-navigation__menu"
11570
+ }, items.map(function (item) {
11571
+ return _this2.renderMenuItem(item);
11572
+ })));
11573
  }
11574
+ }]);
11575
 
11576
+ return Navigation;
11577
+ }(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Component"]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11578
 
11579
+ /* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withSelect"])(function (select) {
11580
+ var items = select(_woocommerce_data__WEBPACK_IMPORTED_MODULE_7__["SETTINGS_STORE_NAME"]).getSetting('wc_admin', 'wcNavigation');
11581
+ return {
11582
+ items: items
11583
+ };
11584
+ })(Navigation));
11585
+
11586
+ /***/ }),
11587
 
11588
+ /***/ 413:
11589
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
11590
 
11591
+ "use strict";
11592
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return symbolObservablePonyfill; });
11593
+ function symbolObservablePonyfill(root) {
11594
+ var result;
11595
+ var Symbol = root.Symbol;
11596
+
11597
+ if (typeof Symbol === 'function') {
11598
+ if (Symbol.observable) {
11599
+ result = Symbol.observable;
11600
+ } else {
11601
+ result = Symbol('observable');
11602
+ Symbol.observable = result;
11603
+ }
11604
+ } else {
11605
+ result = '@@observable';
11606
+ }
11607
 
11608
+ return result;
11609
+ };
11610
 
11611
 
11612
+ /***/ }),
11613
 
11614
+ /***/ 418:
11615
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
11616
 
11617
+ "use strict";
11618
 
11619
+ // UNUSED EXPORTS: NavigableMenu
11620
 
11621
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
11622
+ var esm_extends = __webpack_require__(12);
11623
 
11624
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
11625
+ var objectWithoutProperties = __webpack_require__(14);
11626
 
11627
+ // EXTERNAL MODULE: external {"this":["wp","element"]}
11628
+ var external_this_wp_element_ = __webpack_require__(0);
11629
 
11630
+ // EXTERNAL MODULE: external "lodash"
11631
+ var external_lodash_ = __webpack_require__(2);
11632
 
11633
+ // EXTERNAL MODULE: ./node_modules/@wordpress/components/node_modules/@wordpress/keycodes/build-module/index.js + 1 modules
11634
+ var build_module = __webpack_require__(31);
11635
 
11636
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
11637
+ var classCallCheck = __webpack_require__(9);
11638
 
11639
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
11640
+ var createClass = __webpack_require__(7);
11641
 
11642
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
11643
+ var assertThisInitialized = __webpack_require__(5);
11644
 
11645
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
11646
+ var possibleConstructorReturn = __webpack_require__(11);
11647
 
11648
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
11649
+ var getPrototypeOf = __webpack_require__(4);
11650
 
11651
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
11652
+ var inherits = __webpack_require__(10);
11653
 
11654
+ // EXTERNAL MODULE: ./node_modules/@wordpress/dom/build-module/index.js + 2 modules
11655
+ var dom_build_module = __webpack_require__(45);
11656
 
11657
+ // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigable-container/container.js
11658
 
11659
 
11660
 
11665
 
11666
 
11667
 
11668
+ function _createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
11669
 
11670
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
11671
 
11672
  /**
11673
  * External dependencies
11674
  */
11675
 
11676
+ /**
11677
+ * WordPress dependencies
11678
+ */
11679
 
11680
 
11681
 
11682
 
11683
+ function cycleValue(value, total, offset) {
11684
+ var nextValue = value + offset;
11685
 
11686
+ if (nextValue < 0) {
11687
+ return total + nextValue;
11688
+ } else if (nextValue >= total) {
11689
+ return nextValue - total;
11690
+ }
11691
 
11692
+ return nextValue;
11693
+ }
11694
 
11695
+ var container_NavigableContainer = /*#__PURE__*/function (_Component) {
11696
+ Object(inherits["a" /* default */])(NavigableContainer, _Component);
11697
 
11698
+ var _super = _createSuper(NavigableContainer);
11699
 
11700
+ function NavigableContainer() {
11701
+ var _this;
11702
 
11703
+ Object(classCallCheck["a" /* default */])(this, NavigableContainer);
11704
 
11705
+ _this = _super.apply(this, arguments);
11706
+ _this.onKeyDown = _this.onKeyDown.bind(Object(assertThisInitialized["a" /* default */])(_this));
11707
+ _this.bindContainer = _this.bindContainer.bind(Object(assertThisInitialized["a" /* default */])(_this));
11708
+ _this.getFocusableContext = _this.getFocusableContext.bind(Object(assertThisInitialized["a" /* default */])(_this));
11709
+ _this.getFocusableIndex = _this.getFocusableIndex.bind(Object(assertThisInitialized["a" /* default */])(_this));
11710
+ return _this;
11711
+ }
11712
 
11713
+ Object(createClass["a" /* default */])(NavigableContainer, [{
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11714
  key: "componentDidMount",
11715
  value: function componentDidMount() {
11716
+ // We use DOM event listeners instead of React event listeners
11717
+ // because we want to catch events from the underlying DOM tree
11718
+ // The React Tree can be different from the DOM tree when using
11719
+ // portals. Block Toolbars for instance are rendered in a separate
11720
+ // React Trees.
11721
+ this.container.addEventListener('keydown', this.onKeyDown);
11722
+ this.container.addEventListener('focus', this.onFocus);
11723
  }
11724
  }, {
11725
+ key: "componentWillUnmount",
11726
+ value: function componentWillUnmount() {
11727
+ this.container.removeEventListener('keydown', this.onKeyDown);
11728
+ this.container.removeEventListener('focus', this.onFocus);
11729
+ }
11730
+ }, {
11731
+ key: "bindContainer",
11732
+ value: function bindContainer(ref) {
11733
+ var forwardedRef = this.props.forwardedRef;
11734
+ this.container = ref;
11735
+
11736
+ if (Object(external_lodash_["isFunction"])(forwardedRef)) {
11737
+ forwardedRef(ref);
11738
+ } else if (forwardedRef && 'current' in forwardedRef) {
11739
+ forwardedRef.current = ref;
11740
+ }
11741
+ }
11742
+ }, {
11743
+ key: "getFocusableContext",
11744
+ value: function getFocusableContext(target) {
11745
+ var onlyBrowserTabstops = this.props.onlyBrowserTabstops;
11746
+ var finder = onlyBrowserTabstops ? dom_build_module["a" /* focus */].tabbable : dom_build_module["a" /* focus */].focusable;
11747
+ var focusables = finder.find(this.container);
11748
+ var index = this.getFocusableIndex(focusables, target);
11749
+
11750
+ if (index > -1 && target) {
11751
+ return {
11752
+ index: index,
11753
+ target: target,
11754
+ focusables: focusables
11755
+ };
11756
  }
11757
 
11758
+ return null;
11759
+ }
11760
+ }, {
11761
+ key: "getFocusableIndex",
11762
+ value: function getFocusableIndex(focusables, target) {
11763
+ var directIndex = focusables.indexOf(target);
11764
+
11765
+ if (directIndex !== -1) {
11766
+ return directIndex;
11767
  }
11768
  }
11769
  }, {
11770
+ key: "onKeyDown",
11771
+ value: function onKeyDown(event) {
11772
+ if (this.props.onKeyDown) {
11773
+ this.props.onKeyDown(event);
11774
+ }
 
 
 
 
 
11775
 
11776
+ var getFocusableContext = this.getFocusableContext;
11777
+ var _this$props = this.props,
11778
+ _this$props$cycle = _this$props.cycle,
11779
+ cycle = _this$props$cycle === void 0 ? true : _this$props$cycle,
11780
+ eventToOffset = _this$props.eventToOffset,
11781
+ _this$props$onNavigat = _this$props.onNavigate,
11782
+ onNavigate = _this$props$onNavigat === void 0 ? external_lodash_["noop"] : _this$props$onNavigat,
11783
+ stopNavigationEvents = _this$props.stopNavigationEvents;
11784
+ var offset = eventToOffset(event); // eventToOffset returns undefined if the event is not handled by the component
11785
+
11786
+ if (offset !== undefined && stopNavigationEvents) {
11787
+ // Prevents arrow key handlers bound to the document directly interfering
11788
+ event.stopImmediatePropagation(); // When navigating a collection of items, prevent scroll containers
11789
+ // from scrolling.
11790
+
11791
+ if (event.target.getAttribute('role') === 'menuitem') {
11792
+ event.preventDefault();
11793
+ }
11794
+ }
11795
 
11796
+ if (!offset) {
 
 
11797
  return;
11798
  }
11799
 
11800
+ var context = getFocusableContext(document.activeElement);
11801
 
11802
+ if (!context) {
11803
  return;
 
 
 
 
 
 
 
11804
  }
11805
 
11806
+ var index = context.index,
11807
+ focusables = context.focusables;
11808
+ var nextIndex = cycle ? cycleValue(index, focusables.length, offset) : index + offset;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11809
 
11810
+ if (nextIndex >= 0 && nextIndex < focusables.length) {
11811
+ focusables[nextIndex].focus();
11812
+ onNavigate(nextIndex, focusables[nextIndex]);
11813
+ }
11814
  }
11815
  }, {
11816
  key: "render",
11817
  value: function render() {
11818
  var _this$props2 = this.props,
11819
+ children = _this$props2.children,
11820
+ props = Object(objectWithoutProperties["a" /* default */])(_this$props2, ["children"]);
11821
 
11822
+ return Object(external_this_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
11823
+ ref: this.bindContainer
11824
+ }, Object(external_lodash_["omit"])(props, ['stopNavigationEvents', 'eventToOffset', 'onNavigate', 'onKeyDown', 'cycle', 'onlyBrowserTabstops', 'forwardedRef'])), children);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11825
  }
11826
  }]);
11827
 
11828
+ return NavigableContainer;
11829
+ }(external_this_wp_element_["Component"]);
11830
 
11831
+ var container_forwardedNavigableContainer = function forwardedNavigableContainer(props, ref) {
11832
+ return Object(external_this_wp_element_["createElement"])(container_NavigableContainer, Object(esm_extends["a" /* default */])({}, props, {
11833
+ forwardedRef: ref
11834
+ }));
 
 
 
 
 
11835
  };
 
 
 
 
11836
 
11837
+ container_forwardedNavigableContainer.displayName = 'NavigableContainer';
11838
+ /* harmony default export */ var container = (Object(external_this_wp_element_["forwardRef"])(container_forwardedNavigableContainer));
11839
+ //# sourceMappingURL=container.js.map
11840
+ // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigable-container/menu.js
11841
 
 
 
 
 
11842
 
 
 
 
 
 
 
11843
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11844
 
11845
+ /**
11846
+ * External dependencies
11847
+ */
11848
 
11849
+ /**
11850
+ * WordPress dependencies
11851
+ */
 
 
 
 
 
11852
 
 
11853
 
 
 
 
11854
 
11855
+ /**
11856
+ * Internal dependencies
11857
+ */
11858
 
 
 
 
 
11859
 
11860
+ function NavigableMenu(_ref, ref) {
11861
+ var _ref$role = _ref.role,
11862
+ role = _ref$role === void 0 ? 'menu' : _ref$role,
11863
+ _ref$orientation = _ref.orientation,
11864
+ orientation = _ref$orientation === void 0 ? 'vertical' : _ref$orientation,
11865
+ rest = Object(objectWithoutProperties["a" /* default */])(_ref, ["role", "orientation"]);
11866
 
11867
+ var eventToOffset = function eventToOffset(evt) {
11868
+ var keyCode = evt.keyCode;
11869
+ var next = [build_module["a" /* DOWN */]];
11870
+ var previous = [build_module["f" /* UP */]];
11871
 
11872
+ if (orientation === 'horizontal') {
11873
+ next = [build_module["d" /* RIGHT */]];
11874
+ previous = [build_module["c" /* LEFT */]];
11875
+ }
 
11876
 
11877
+ if (orientation === 'both') {
11878
+ next = [build_module["d" /* RIGHT */], build_module["a" /* DOWN */]];
11879
+ previous = [build_module["c" /* LEFT */], build_module["f" /* UP */]];
11880
+ }
11881
+
11882
+ if (Object(external_lodash_["includes"])(next, keyCode)) {
11883
+ return 1;
11884
+ } else if (Object(external_lodash_["includes"])(previous, keyCode)) {
11885
+ return -1;
11886
+ }
11887
+ };
11888
+
11889
+ return Object(external_this_wp_element_["createElement"])(container, Object(esm_extends["a" /* default */])({
11890
+ ref: ref,
11891
+ stopNavigationEvents: true,
11892
+ onlyBrowserTabstops: false,
11893
+ role: role,
11894
+ "aria-orientation": role === 'presentation' ? null : orientation,
11895
+ eventToOffset: eventToOffset
11896
+ }, rest));
11897
+ }
11898
+ /* harmony default export */ var menu = __webpack_exports__["a"] = (Object(external_this_wp_element_["forwardRef"])(NavigableMenu));
11899
+ //# sourceMappingURL=menu.js.map
11900
 
11901
  /***/ }),
11902
+
11903
+ /***/ 42:
11904
  /***/ (function(module, exports, __webpack_require__) {
11905
 
11906
+ var _typeof = __webpack_require__(35);
 
11907
 
11908
+ var assertThisInitialized = __webpack_require__(62);
11909
+
11910
+ function _possibleConstructorReturn(self, call) {
11911
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
11912
+ return call;
11913
  }
 
11914
 
11915
+ return assertThisInitialized(self);
11916
+ }
11917
+
11918
+ module.exports = _possibleConstructorReturn;
11919
 
11920
  /***/ }),
 
 
 
11921
 
11922
+ /***/ 43:
11923
+ /***/ (function(module, exports) {
11924
 
11925
+ (function() { module.exports = this["wc"]["data"]; }());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11926
 
11927
+ /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11928
 
11929
+ /***/ 434:
11930
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
11931
 
11932
+ "use strict";
11933
+ __webpack_require__.r(__webpack_exports__);
11934
+ /* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
11935
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
11936
+ /* harmony import */ var _wordpress_notices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(716);
11937
+ /* harmony import */ var _stylesheets_index_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(437);
11938
+ /* harmony import */ var _stylesheets_index_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_stylesheets_index_scss__WEBPACK_IMPORTED_MODULE_2__);
11939
+ /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(199);
11940
+ /* harmony import */ var _navigation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(412);
11941
+ /* harmony import */ var wc_api_wp_data_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(715);
11942
+ /* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(43);
11943
+ /* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_6__);
11944
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11945
 
11946
+ /**
11947
+ * External dependencies
11948
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11949
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11950
 
11951
+ /**
11952
+ * Internal dependencies
11953
+ */
 
 
 
 
 
 
 
11954
 
 
 
 
 
11955
 
 
 
 
 
 
 
 
 
11956
 
 
 
 
11957
 
 
 
 
11958
 
11959
+ // Modify webpack pubilcPath at runtime based on location of WordPress Plugin.
11960
+ // eslint-disable-next-line no-undef,camelcase
 
11961
 
11962
+ __webpack_require__.p = global.wcAdminAssets.path;
11963
+ var appRoot = document.getElementById('root');
11964
+ var navigationRoot = document.getElementById('woocommerce-embedded-navigation');
11965
+ var settingsGroup = 'wc_admin';
11966
+ var hydrateUser = window.wcSettings.currentUserData;
11967
 
11968
+ if (navigationRoot) {
11969
+ var HydratedNavigation = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_6__["withSettingsHydration"])(settingsGroup, window.wcSettings)(_navigation__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]);
 
 
 
 
 
11970
 
11971
+ if (hydrateUser) {
11972
+ HydratedNavigation = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_6__["withCurrentUserHydration"])(hydrateUser)(HydratedNavigation);
 
 
 
11973
  }
 
11974
 
11975
+ Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(HydratedNavigation, null), navigationRoot); // Collapse the WP Menu.
 
 
11976
 
11977
+ var adminMenu = document.getElementById('adminmenumain');
11978
+ adminMenu.classList.add('folded');
11979
+ }
 
11980
 
11981
+ if (appRoot) {
11982
+ var HydratedPageLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_6__["withSettingsHydration"])(settingsGroup, window.wcSettings)(_layout__WEBPACK_IMPORTED_MODULE_3__[/* PageLayout */ "b"]);
11983
+ var hydrateSettings = window.wcSettings.preloadSettings && window.wcSettings.preloadSettings.general;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11984
 
11985
+ if (hydrateSettings) {
11986
+ HydratedPageLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_6__["withSettingsHydration"])('general', {
11987
+ general: window.wcSettings.preloadSettings.general
11988
+ })(HydratedPageLayout);
11989
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11990
 
11991
+ if (hydrateUser) {
11992
+ HydratedPageLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_6__["withCurrentUserHydration"])(hydrateUser)(HydratedPageLayout);
11993
+ }
 
 
 
 
 
 
 
 
 
 
11994
 
11995
+ Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(HydratedPageLayout, null), appRoot);
11996
+ } else {
11997
+ var embeddedRoot = document.getElementById('woocommerce-embedded-root');
11998
+ var HydratedEmbedLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_6__["withSettingsHydration"])(settingsGroup, window.wcSettings)(_layout__WEBPACK_IMPORTED_MODULE_3__[/* EmbedLayout */ "a"]);
 
 
 
 
11999
 
12000
+ if (hydrateUser) {
12001
+ HydratedEmbedLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_6__["withCurrentUserHydration"])(hydrateUser)(HydratedEmbedLayout);
12002
+ } // Render the header.
 
 
 
 
 
12003
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12004
 
12005
+ Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(HydratedEmbedLayout, null), embeddedRoot);
12006
+ embeddedRoot.classList.remove('is-embed-loading'); // Render notices just above the WP content div.
 
 
 
 
 
 
 
 
 
 
 
12007
 
12008
+ var wpBody = document.getElementById('wpbody-content');
12009
+ var wrap = wpBody.querySelector('.wrap.woocommerce') || wpBody.querySelector('[class="wrap"]');
12010
+ var noticeContainer = document.createElement('div');
12011
+ Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
12012
+ className: "woocommerce-layout"
12013
+ }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_layout__WEBPACK_IMPORTED_MODULE_3__[/* PrimaryLayout */ "c"], null)), wpBody.insertBefore(noticeContainer, wrap));
12014
+ }
12015
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(56)))
12016
 
12017
+ /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12018
 
12019
+ /***/ 436:
12020
+ /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12021
 
12022
+ /**
12023
+ * Copyright (c) 2014-present, Facebook, Inc.
12024
+ *
12025
+ * This source code is licensed under the MIT license found in the
12026
+ * LICENSE file in the root directory of this source tree.
12027
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12028
 
12029
+ var runtime = (function (exports) {
12030
+ "use strict";
12031
+
12032
+ var Op = Object.prototype;
12033
+ var hasOwn = Op.hasOwnProperty;
12034
+ var undefined; // More compressible than void 0.
12035
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
12036
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
12037
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
12038
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
12039
+
12040
+ function wrap(innerFn, outerFn, self, tryLocsList) {
12041
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
12042
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
12043
+ var generator = Object.create(protoGenerator.prototype);
12044
+ var context = new Context(tryLocsList || []);
12045
+
12046
+ // The ._invoke method unifies the implementations of the .next,
12047
+ // .throw, and .return methods.
12048
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
12049
+
12050
+ return generator;
12051
+ }
12052
+ exports.wrap = wrap;
12053
+
12054
+ // Try/catch helper to minimize deoptimizations. Returns a completion
12055
+ // record like context.tryEntries[i].completion. This interface could
12056
+ // have been (and was previously) designed to take a closure to be
12057
+ // invoked without arguments, but in all the cases we care about we
12058
+ // already have an existing method we want to call, so there's no need
12059
+ // to create a new function object. We can even get away with assuming
12060
+ // the method takes exactly one argument, since that happens to be true
12061
+ // in every case, so we don't have to touch the arguments object. The
12062
+ // only additional allocation required is the completion record, which
12063
+ // has a stable shape and so hopefully should be cheap to allocate.
12064
+ function tryCatch(fn, obj, arg) {
12065
+ try {
12066
+ return { type: "normal", arg: fn.call(obj, arg) };
12067
+ } catch (err) {
12068
+ return { type: "throw", arg: err };
12069
+ }
12070
+ }
12071
 
12072
+ var GenStateSuspendedStart = "suspendedStart";
12073
+ var GenStateSuspendedYield = "suspendedYield";
12074
+ var GenStateExecuting = "executing";
12075
+ var GenStateCompleted = "completed";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12076
 
12077
+ // Returning this object from the innerFn has the same effect as
12078
+ // breaking out of the dispatch switch statement.
12079
+ var ContinueSentinel = {};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12080
 
12081
+ // Dummy constructor functions that we use as the .constructor and
12082
+ // .constructor.prototype properties for functions that return Generator
12083
+ // objects. For full spec compliance, you may wish to configure your
12084
+ // minifier not to mangle the names of these two functions.
12085
+ function Generator() {}
12086
+ function GeneratorFunction() {}
12087
+ function GeneratorFunctionPrototype() {}
12088
 
12089
+ // This is a polyfill for %IteratorPrototype% for environments that
12090
+ // don't natively support it.
12091
+ var IteratorPrototype = {};
12092
+ IteratorPrototype[iteratorSymbol] = function () {
12093
+ return this;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12094
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12095
 
12096
+ var getProto = Object.getPrototypeOf;
12097
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
12098
+ if (NativeIteratorPrototype &&
12099
+ NativeIteratorPrototype !== Op &&
12100
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
12101
+ // This environment has a native %IteratorPrototype%; use it instead
12102
+ // of the polyfill.
12103
+ IteratorPrototype = NativeIteratorPrototype;
12104
+ }
12105
+
12106
+ var Gp = GeneratorFunctionPrototype.prototype =
12107
+ Generator.prototype = Object.create(IteratorPrototype);
12108
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
12109
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
12110
+ GeneratorFunctionPrototype[toStringTagSymbol] =
12111
+ GeneratorFunction.displayName = "GeneratorFunction";
12112
+
12113
+ // Helper for defining the .next, .throw, and .return methods of the
12114
+ // Iterator interface in terms of a single ._invoke method.
12115
+ function defineIteratorMethods(prototype) {
12116
+ ["next", "throw", "return"].forEach(function(method) {
12117
+ prototype[method] = function(arg) {
12118
+ return this._invoke(method, arg);
12119
+ };
12120
+ });
12121
  }
 
 
 
12122
 
12123
+ exports.isGeneratorFunction = function(genFun) {
12124
+ var ctor = typeof genFun === "function" && genFun.constructor;
12125
+ return ctor
12126
+ ? ctor === GeneratorFunction ||
12127
+ // For the native GeneratorFunction constructor, the best we can
12128
+ // do is to check its .name property.
12129
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
12130
+ : false;
12131
+ };
12132
 
12133
+ exports.mark = function(genFun) {
12134
+ if (Object.setPrototypeOf) {
12135
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
12136
+ } else {
12137
+ genFun.__proto__ = GeneratorFunctionPrototype;
12138
+ if (!(toStringTagSymbol in genFun)) {
12139
+ genFun[toStringTagSymbol] = "GeneratorFunction";
12140
+ }
12141
+ }
12142
+ genFun.prototype = Object.create(Gp);
12143
+ return genFun;
12144
+ };
12145
 
12146
+ // Within the body of any async function, `await x` is transformed to
12147
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
12148
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
12149
+ // meant to be awaited.
12150
+ exports.awrap = function(arg) {
12151
+ return { __await: arg };
12152
+ };
12153
 
12154
+ function AsyncIterator(generator, PromiseImpl) {
12155
+ function invoke(method, arg, resolve, reject) {
12156
+ var record = tryCatch(generator[method], generator, arg);
12157
+ if (record.type === "throw") {
12158
+ reject(record.arg);
12159
+ } else {
12160
+ var result = record.arg;
12161
+ var value = result.value;
12162
+ if (value &&
12163
+ typeof value === "object" &&
12164
+ hasOwn.call(value, "__await")) {
12165
+ return PromiseImpl.resolve(value.__await).then(function(value) {
12166
+ invoke("next", value, resolve, reject);
12167
+ }, function(err) {
12168
+ invoke("throw", err, resolve, reject);
12169
+ });
12170
+ }
12171
 
12172
+ return PromiseImpl.resolve(value).then(function(unwrapped) {
12173
+ // When a yielded Promise is resolved, its final value becomes
12174
+ // the .value of the Promise<{value,done}> result for the
12175
+ // current iteration.
12176
+ result.value = unwrapped;
12177
+ resolve(result);
12178
+ }, function(error) {
12179
+ // If a rejected Promise was yielded, throw the rejection back
12180
+ // into the async generator function so it can be handled there.
12181
+ return invoke("throw", error, resolve, reject);
12182
+ });
12183
+ }
12184
+ }
12185
 
12186
+ var previousPromise;
 
 
 
12187
 
12188
+ function enqueue(method, arg) {
12189
+ function callInvokeWithMethodAndArg() {
12190
+ return new PromiseImpl(function(resolve, reject) {
12191
+ invoke(method, arg, resolve, reject);
12192
+ });
12193
+ }
12194
 
12195
+ return previousPromise =
12196
+ // If enqueue has been called before, then we want to wait until
12197
+ // all previous Promises have been resolved before calling invoke,
12198
+ // so that results are always delivered in the correct order. If
12199
+ // enqueue has not been called before, then it is important to
12200
+ // call invoke immediately, without waiting on a callback to fire,
12201
+ // so that the async generator function has the opportunity to do
12202
+ // any necessary setup in a predictable way. This predictability
12203
+ // is why the Promise constructor synchronously invokes its
12204
+ // executor callback, and why async functions synchronously
12205
+ // execute code before the first await. Since we implement simple
12206
+ // async functions in terms of async generators, it is especially
12207
+ // important to get this right, even though it requires care.
12208
+ previousPromise ? previousPromise.then(
12209
+ callInvokeWithMethodAndArg,
12210
+ // Avoid propagating failures to Promises returned by later
12211
+ // invocations of the iterator.
12212
+ callInvokeWithMethodAndArg
12213
+ ) : callInvokeWithMethodAndArg();
12214
+ }
12215
+
12216
+ // Define the unified helper method that is used to implement .next,
12217
+ // .throw, and .return (see defineIteratorMethods).
12218
+ this._invoke = enqueue;
12219
+ }
12220
+
12221
+ defineIteratorMethods(AsyncIterator.prototype);
12222
+ AsyncIterator.prototype[asyncIteratorSymbol] = function () {
12223
+ return this;
12224
+ };
12225
+ exports.AsyncIterator = AsyncIterator;
12226
 
12227
+ // Note that simple async functions are implemented on top of
12228
+ // AsyncIterator objects; they just return a Promise for the value of
12229
+ // the final result produced by the iterator.
12230
+ exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
12231
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
12232
 
12233
+ var iter = new AsyncIterator(
12234
+ wrap(innerFn, outerFn, self, tryLocsList),
12235
+ PromiseImpl
12236
+ );
12237
 
12238
+ return exports.isGeneratorFunction(outerFn)
12239
+ ? iter // If outerFn is a generator, return the full iterator.
12240
+ : iter.next().then(function(result) {
12241
+ return result.done ? result.value : iter.next();
12242
+ });
12243
+ };
12244
 
12245
+ function makeInvokeMethod(innerFn, self, context) {
12246
+ var state = GenStateSuspendedStart;
12247
+
12248
+ return function invoke(method, arg) {
12249
+ if (state === GenStateExecuting) {
12250
+ throw new Error("Generator is already running");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12251
  }
12252
+
12253
+ if (state === GenStateCompleted) {
12254
+ if (method === "throw") {
12255
+ throw arg;
12256
+ }
12257
+
12258
+ // Be forgiving, per 25.3.3.3.3 of the spec:
12259
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
12260
+ return doneResult();
 
 
 
 
12261
  }
 
 
 
 
 
 
12262
 
12263
+ context.method = method;
12264
+ context.arg = arg;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12265
 
12266
+ while (true) {
12267
+ var delegate = context.delegate;
12268
+ if (delegate) {
12269
+ var delegateResult = maybeInvokeDelegate(delegate, context);
12270
+ if (delegateResult) {
12271
+ if (delegateResult === ContinueSentinel) continue;
12272
+ return delegateResult;
12273
+ }
12274
+ }
12275
 
12276
+ if (context.method === "next") {
12277
+ // Setting context._sent for legacy support of Babel's
12278
+ // function.sent implementation.
12279
+ context.sent = context._sent = context.arg;
12280
 
12281
+ } else if (context.method === "throw") {
12282
+ if (state === GenStateSuspendedStart) {
12283
+ state = GenStateCompleted;
12284
+ throw context.arg;
12285
+ }
12286
 
12287
+ context.dispatchException(context.arg);
 
 
 
 
 
 
 
12288
 
12289
+ } else if (context.method === "return") {
12290
+ context.abrupt("return", context.arg);
12291
+ }
12292
 
12293
+ state = GenStateExecuting;
 
 
12294
 
12295
+ var record = tryCatch(innerFn, self, context);
12296
+ if (record.type === "normal") {
12297
+ // If an exception is thrown from innerFn, we leave state ===
12298
+ // GenStateExecuting and loop back for another invocation.
12299
+ state = context.done
12300
+ ? GenStateCompleted
12301
+ : GenStateSuspendedYield;
12302
 
12303
+ if (record.arg === ContinueSentinel) {
12304
+ continue;
12305
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12306
 
12307
+ return {
12308
+ value: record.arg,
12309
+ done: context.done
12310
+ };
 
 
 
 
12311
 
12312
+ } else if (record.type === "throw") {
12313
+ state = GenStateCompleted;
12314
+ // Dispatch the exception by looping back around to the
12315
+ // context.dispatchException(context.arg) call above.
12316
+ context.method = "throw";
12317
+ context.arg = record.arg;
12318
+ }
12319
+ }
12320
+ };
 
12321
  }
 
 
12322
 
12323
+ // Call delegate.iterator[context.method](context.arg) and handle the
12324
+ // result, either by returning a { value, done } result from the
12325
+ // delegate iterator, or by modifying context.method and context.arg,
12326
+ // setting context.delegate to null, and returning the ContinueSentinel.
12327
+ function maybeInvokeDelegate(delegate, context) {
12328
+ var method = delegate.iterator[context.method];
12329
+ if (method === undefined) {
12330
+ // A .throw or .return when the delegate iterator has no .throw
12331
+ // method always terminates the yield* loop.
12332
+ context.delegate = null;
12333
+
12334
+ if (context.method === "throw") {
12335
+ // Note: ["return"] must be used for ES3 parsing compatibility.
12336
+ if (delegate.iterator["return"]) {
12337
+ // If the delegate iterator has a return method, give it a
12338
+ // chance to clean up.
12339
+ context.method = "return";
12340
+ context.arg = undefined;
12341
+ maybeInvokeDelegate(delegate, context);
12342
+
12343
+ if (context.method === "throw") {
12344
+ // If maybeInvokeDelegate(context) changed context.method from
12345
+ // "return" to "throw", let that override the TypeError below.
12346
+ return ContinueSentinel;
12347
+ }
12348
+ }
12349
 
12350
+ context.method = "throw";
12351
+ context.arg = new TypeError(
12352
+ "The iterator does not provide a 'throw' method");
12353
+ }
12354
 
12355
+ return ContinueSentinel;
12356
+ }
12357
 
12358
+ var record = tryCatch(method, delegate.iterator, context.arg);
 
 
 
 
12359
 
12360
+ if (record.type === "throw") {
12361
+ context.method = "throw";
12362
+ context.arg = record.arg;
12363
+ context.delegate = null;
12364
+ return ContinueSentinel;
12365
  }
 
 
 
 
12366
 
12367
+ var info = record.arg;
 
 
 
12368
 
12369
+ if (! info) {
12370
+ context.method = "throw";
12371
+ context.arg = new TypeError("iterator result is not an object");
12372
+ context.delegate = null;
12373
+ return ContinueSentinel;
 
 
 
 
12374
  }
12375
 
12376
+ if (info.done) {
12377
+ // Assign the result of the finished delegate to the temporary
12378
+ // variable specified by delegate.resultName (see delegateYield).
12379
+ context[delegate.resultName] = info.value;
 
12380
 
12381
+ // Resume execution at the desired location (see delegateYield).
12382
+ context.next = delegate.nextLoc;
12383
 
12384
+ // If context.method was "throw" but the delegate handled the
12385
+ // exception, let the outer generator proceed normally. If
12386
+ // context.method was "next", forget context.arg since it has been
12387
+ // "consumed" by the delegate iterator. If context.method was
12388
+ // "return", allow the original .return call to continue in the
12389
+ // outer generator.
12390
+ if (context.method !== "return") {
12391
+ context.method = "next";
12392
+ context.arg = undefined;
12393
  }
 
 
 
 
 
 
 
 
 
 
 
12394
 
12395
+ } else {
12396
+ // Re-yield the result returned by the delegate method.
12397
+ return info;
 
 
12398
  }
12399
 
12400
+ // The delegate iterator is finished, so forget it and continue with
12401
+ // the outer generator.
12402
+ context.delegate = null;
12403
+ return ContinueSentinel;
12404
  }
 
 
12405
 
12406
+ // Define Generator.prototype.{next,throw,return} in terms of the
12407
+ // unified ._invoke helper method.
12408
+ defineIteratorMethods(Gp);
 
 
 
 
 
 
 
12409
 
12410
+ Gp[toStringTagSymbol] = "Generator";
12411
 
12412
+ // A Generator should always return itself as the iterator object when the
12413
+ // @@iterator function is called on it. Some browsers' implementations of the
12414
+ // iterator prototype chain incorrectly implement this, causing the Generator
12415
+ // object to not be returned from this call. This ensures that doesn't happen.
12416
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
12417
+ Gp[iteratorSymbol] = function() {
12418
+ return this;
12419
+ };
12420
 
12421
+ Gp.toString = function() {
12422
+ return "[object Generator]";
12423
+ };
12424
 
12425
+ function pushTryEntry(locs) {
12426
+ var entry = { tryLoc: locs[0] };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12427
 
12428
+ if (1 in locs) {
12429
+ entry.catchLoc = locs[1];
12430
+ }
 
 
 
 
12431
 
12432
+ if (2 in locs) {
12433
+ entry.finallyLoc = locs[2];
12434
+ entry.afterLoc = locs[3];
 
 
 
 
 
12435
  }
12436
+
12437
+ this.tryEntries.push(entry);
12438
  }
 
12439
 
12440
+ function resetTryEntry(entry) {
12441
+ var record = entry.completion || {};
12442
+ record.type = "normal";
12443
+ delete record.arg;
12444
+ entry.completion = record;
12445
+ }
12446
 
12447
+ function Context(tryLocsList) {
12448
+ // The root entry object (effectively a try statement without a catch
12449
+ // or a finally block) gives us a place to store values thrown from
12450
+ // locations where there is no enclosing try statement.
12451
+ this.tryEntries = [{ tryLoc: "root" }];
12452
+ tryLocsList.forEach(pushTryEntry, this);
12453
+ this.reset(true);
12454
+ }
12455
 
12456
+ exports.keys = function(object) {
12457
+ var keys = [];
12458
+ for (var key in object) {
12459
+ keys.push(key);
12460
+ }
12461
+ keys.reverse();
12462
+
12463
+ // Rather than returning an object with a next method, we keep
12464
+ // things simple and return the next function itself.
12465
+ return function next() {
12466
+ while (keys.length) {
12467
+ var key = keys.pop();
12468
+ if (key in object) {
12469
+ next.value = key;
12470
+ next.done = false;
12471
+ return next;
12472
+ }
12473
+ }
12474
 
12475
+ // To avoid creating an additional object, we just hang the .value
12476
+ // and .done properties off the next function object itself. This
12477
+ // also ensures that the minifier will not anonymize the function.
12478
+ next.done = true;
12479
+ return next;
12480
+ };
12481
+ };
12482
 
12483
+ function values(iterable) {
12484
+ if (iterable) {
12485
+ var iteratorMethod = iterable[iteratorSymbol];
12486
+ if (iteratorMethod) {
12487
+ return iteratorMethod.call(iterable);
 
 
 
 
 
 
 
 
12488
  }
 
 
 
12489
 
12490
+ if (typeof iterable.next === "function") {
12491
+ return iterable;
12492
+ }
 
12493
 
12494
+ if (!isNaN(iterable.length)) {
12495
+ var i = -1, next = function next() {
12496
+ while (++i < iterable.length) {
12497
+ if (hasOwn.call(iterable, i)) {
12498
+ next.value = iterable[i];
12499
+ next.done = false;
12500
+ return next;
12501
+ }
12502
+ }
12503
 
12504
+ next.value = undefined;
12505
+ next.done = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
12506
 
12507
+ return next;
12508
+ };
 
 
 
 
 
 
 
 
 
 
 
 
 
12509
 
12510
+ return next.next = next;
12511
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12512
  }
 
 
12513
 
12514
+ // Return an iterator with no values.
12515
+ return { next: doneResult };
12516
+ }
12517
+ exports.values = values;
12518
 
12519
+ function doneResult() {
12520
+ return { value: undefined, done: true };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12521
  }
 
12522
 
12523
+ Context.prototype = {
12524
+ constructor: Context,
12525
 
12526
+ reset: function(skipTempReset) {
12527
+ this.prev = 0;
12528
+ this.next = 0;
12529
+ // Resetting context._sent for legacy support of Babel's
12530
+ // function.sent implementation.
12531
+ this.sent = this._sent = undefined;
12532
+ this.done = false;
12533
+ this.delegate = null;
 
 
 
 
12534
 
12535
+ this.method = "next";
12536
+ this.arg = undefined;
12537
 
12538
+ this.tryEntries.forEach(resetTryEntry);
 
 
12539
 
12540
+ if (!skipTempReset) {
12541
+ for (var name in this) {
12542
+ // Not sure about the optimal order of these conditions:
12543
+ if (name.charAt(0) === "t" &&
12544
+ hasOwn.call(this, name) &&
12545
+ !isNaN(+name.slice(1))) {
12546
+ this[name] = undefined;
 
 
 
 
 
 
 
 
 
 
 
 
 
12547
  }
12548
  }
12549
+ }
12550
+ },
 
 
 
12551
 
12552
+ stop: function() {
12553
+ this.done = true;
 
 
12554
 
12555
+ var rootEntry = this.tryEntries[0];
12556
+ var rootRecord = rootEntry.completion;
12557
+ if (rootRecord.type === "throw") {
12558
+ throw rootRecord.arg;
12559
+ }
12560
 
12561
+ return this.rval;
12562
+ },
 
12563
 
12564
+ dispatchException: function(exception) {
12565
+ if (this.done) {
12566
+ throw exception;
12567
+ }
12568
 
12569
+ var context = this;
12570
+ function handle(loc, caught) {
12571
+ record.type = "throw";
12572
+ record.arg = exception;
12573
+ context.next = loc;
12574
+
12575
+ if (caught) {
12576
+ // If the dispatched exception was caught by a catch block,
12577
+ // then let that catch block handle the exception normally.
12578
+ context.method = "next";
12579
+ context.arg = undefined;
12580
+ }
12581
 
12582
+ return !! caught;
12583
+ }
12584
 
12585
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
12586
+ var entry = this.tryEntries[i];
12587
+ var record = entry.completion;
12588
 
12589
+ if (entry.tryLoc === "root") {
12590
+ // Exception thrown outside of any try block that could handle
12591
+ // it, so set the completion value of the entire function to
12592
+ // throw the exception.
12593
+ return handle("end");
12594
+ }
12595
 
12596
+ if (entry.tryLoc <= this.prev) {
12597
+ var hasCatch = hasOwn.call(entry, "catchLoc");
12598
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
 
12599
 
12600
+ if (hasCatch && hasFinally) {
12601
+ if (this.prev < entry.catchLoc) {
12602
+ return handle(entry.catchLoc, true);
12603
+ } else if (this.prev < entry.finallyLoc) {
12604
+ return handle(entry.finallyLoc);
12605
+ }
12606
 
12607
+ } else if (hasCatch) {
12608
+ if (this.prev < entry.catchLoc) {
12609
+ return handle(entry.catchLoc, true);
12610
+ }
12611
+
12612
+ } else if (hasFinally) {
12613
+ if (this.prev < entry.finallyLoc) {
12614
+ return handle(entry.finallyLoc);
12615
+ }
12616
+
12617
+ } else {
12618
+ throw new Error("try statement without catch or finally");
12619
+ }
 
 
 
 
 
 
 
 
12620
  }
12621
+ }
12622
+ },
12623
+
12624
+ abrupt: function(type, arg) {
12625
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
12626
+ var entry = this.tryEntries[i];
12627
+ if (entry.tryLoc <= this.prev &&
12628
+ hasOwn.call(entry, "finallyLoc") &&
12629
+ this.prev < entry.finallyLoc) {
12630
+ var finallyEntry = entry;
12631
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
12632
  }
12633
+ }
12634
 
12635
+ if (finallyEntry &&
12636
+ (type === "break" ||
12637
+ type === "continue") &&
12638
+ finallyEntry.tryLoc <= arg &&
12639
+ arg <= finallyEntry.finallyLoc) {
12640
+ // Ignore the finally entry if control is not jumping to a
12641
+ // location outside the try/catch block.
12642
+ finallyEntry = null;
12643
+ }
12644
 
12645
+ var record = finallyEntry ? finallyEntry.completion : {};
12646
+ record.type = type;
12647
+ record.arg = arg;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12648
 
12649
+ if (finallyEntry) {
12650
+ this.method = "next";
12651
+ this.next = finallyEntry.finallyLoc;
12652
+ return ContinueSentinel;
12653
+ }
12654
 
12655
+ return this.complete(record);
12656
+ },
12657
 
12658
+ complete: function(record, afterLoc) {
12659
+ if (record.type === "throw") {
12660
+ throw record.arg;
12661
+ }
 
12662
 
12663
+ if (record.type === "break" ||
12664
+ record.type === "continue") {
12665
+ this.next = record.arg;
12666
+ } else if (record.type === "return") {
12667
+ this.rval = this.arg = record.arg;
12668
+ this.method = "return";
12669
+ this.next = "end";
12670
+ } else if (record.type === "normal" && afterLoc) {
12671
+ this.next = afterLoc;
12672
+ }
 
 
 
 
12673
 
12674
+ return ContinueSentinel;
12675
+ },
 
 
 
 
12676
 
12677
+ finish: function(finallyLoc) {
12678
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
12679
+ var entry = this.tryEntries[i];
12680
+ if (entry.finallyLoc === finallyLoc) {
12681
+ this.complete(entry.completion, entry.afterLoc);
12682
+ resetTryEntry(entry);
12683
+ return ContinueSentinel;
 
12684
  }
12685
+ }
12686
+ },
 
 
 
 
 
12687
 
12688
+ "catch": function(tryLoc) {
12689
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
12690
+ var entry = this.tryEntries[i];
12691
+ if (entry.tryLoc === tryLoc) {
12692
+ var record = entry.completion;
12693
+ if (record.type === "throw") {
12694
+ var thrown = record.arg;
12695
+ resetTryEntry(entry);
12696
+ }
12697
+ return thrown;
12698
  }
12699
+ }
12700
+
12701
+ // The context.catch method must only be called with a location
12702
+ // argument that corresponds to a known catch block.
12703
+ throw new Error("illegal catch attempt");
12704
+ },
12705
+
12706
+ delegateYield: function(iterable, resultName, nextLoc) {
12707
+ this.delegate = {
12708
+ iterator: values(iterable),
12709
+ resultName: resultName,
12710
+ nextLoc: nextLoc
12711
+ };
12712
+
12713
+ if (this.method === "next") {
12714
+ // Deliberately forget the last sent value so that we don't
12715
+ // accidentally pass it on to the delegate.
12716
+ this.arg = undefined;
12717
+ }
12718
+
12719
+ return ContinueSentinel;
12720
  }
12721
+ };
 
 
 
 
12722
 
12723
+ // Regardless of whether this script is executing as a CommonJS module
12724
+ // or not, return the runtime object so that we can declare the variable
12725
+ // regeneratorRuntime in the outer scope, which allows this module to be
12726
+ // injected easily by `bin/regenerator --include-runtime script.js`.
12727
+ return exports;
12728
+
12729
+ }(
12730
+ // If this script is executing as a CommonJS module, use module.exports
12731
+ // as the regeneratorRuntime namespace. Otherwise create a new empty
12732
+ // object. Either way, the resulting object will be used to initialize
12733
+ // the regeneratorRuntime variable at the top of this file.
12734
+ true ? module.exports : undefined
12735
+ ));
12736
+
12737
+ try {
12738
+ regeneratorRuntime = runtime;
12739
+ } catch (accidentalStrictMode) {
12740
+ // This module should not be running in strict mode, so the above
12741
+ // assignment should always work unless something is misconfigured. Just
12742
+ // in case runtime.js accidentally runs in strict mode, we can escape
12743
+ // strict mode using a global Function call. This could conceivably fail
12744
+ // if a Content Security Policy forbids using Function, but in that case
12745
+ // the proper solution is to fix the accidental strict mode problem. If
12746
+ // you've misconfigured your bundler to force strict mode and applied a
12747
+ // CSP to forbid Function, and you're not willing to fix either of those
12748
+ // problems, please detail your unique predicament in a GitHub issue.
12749
+ Function("r", "regeneratorRuntime = r")(runtime);
12750
  }
 
 
 
 
 
 
 
 
 
12751
 
 
12752
 
12753
+ /***/ }),
 
 
 
 
 
 
 
 
12754
 
12755
+ /***/ 437:
12756
+ /***/ (function(module, exports, __webpack_require__) {
12757
 
12758
+ // extracted by mini-css-extract-plugin
 
 
12759
 
12760
+ /***/ }),
 
 
 
 
12761
 
12762
+ /***/ 438:
12763
+ /***/ (function(module, exports, __webpack_require__) {
12764
+
12765
+ // extracted by mini-css-extract-plugin
12766
 
12767
  /***/ }),
12768
+
12769
+ /***/ 439:
12770
  /***/ (function(module, exports, __webpack_require__) {
12771
 
12772
+ // extracted by mini-css-extract-plugin
 
 
 
 
 
 
 
 
12773
 
12774
+ /***/ }),
12775
+
12776
+ /***/ 440:
12777
+ /***/ (function(module, exports, __webpack_require__) {
 
 
12778
 
12779
+ // extracted by mini-css-extract-plugin
12780
 
12781
  /***/ }),
12782
+
12783
+ /***/ 441:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12784
  /***/ (function(module, exports, __webpack_require__) {
12785
 
12786
  "use strict";
12787
 
12788
 
12789
+ /**
12790
+ * Copyright 2015, Yahoo! Inc.
12791
+ * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
12792
+ */
12793
+ var REACT_STATICS = {
12794
+ childContextTypes: true,
12795
+ contextTypes: true,
12796
+ defaultProps: true,
12797
+ displayName: true,
12798
+ getDefaultProps: true,
12799
+ getDerivedStateFromProps: true,
12800
+ mixins: true,
12801
+ propTypes: true,
12802
+ type: true
12803
+ };
12804
 
12805
+ var KNOWN_STATICS = {
12806
+ name: true,
12807
+ length: true,
12808
+ prototype: true,
12809
+ caller: true,
12810
+ callee: true,
12811
+ arguments: true,
12812
+ arity: true
12813
+ };
12814
 
12815
+ var defineProperty = Object.defineProperty;
12816
+ var getOwnPropertyNames = Object.getOwnPropertyNames;
12817
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
12818
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
12819
+ var getPrototypeOf = Object.getPrototypeOf;
12820
+ var objectPrototype = getPrototypeOf && getPrototypeOf(Object);
12821
 
12822
+ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
12823
+ if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12824
 
12825
+ if (objectPrototype) {
12826
+ var inheritedComponent = getPrototypeOf(sourceComponent);
12827
+ if (inheritedComponent && inheritedComponent !== objectPrototype) {
12828
+ hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
12829
+ }
12830
+ }
12831
 
12832
+ var keys = getOwnPropertyNames(sourceComponent);
 
 
12833
 
12834
+ if (getOwnPropertySymbols) {
12835
+ keys = keys.concat(getOwnPropertySymbols(sourceComponent));
12836
+ }
 
 
 
 
12837
 
12838
+ for (var i = 0; i < keys.length; ++i) {
12839
+ var key = keys[i];
12840
+ if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
12841
+ var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
12842
+ try { // Avoid failures from read-only properties
12843
+ defineProperty(targetComponent, key, descriptor);
12844
+ } catch (e) {}
12845
+ }
12846
+ }
 
 
12847
 
12848
+ return targetComponent;
12849
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12850
 
12851
+ return targetComponent;
12852
  }
12853
 
12854
+ module.exports = hoistNonReactStatics;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12855
 
 
 
12856
 
12857
+ /***/ }),
 
 
 
 
 
 
12858
 
12859
+ /***/ 442:
12860
+ /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
12861
 
12862
+ // extracted by mini-css-extract-plugin
 
12863
 
12864
+ /***/ }),
 
 
 
 
 
 
12865
 
12866
+ /***/ 443:
12867
+ /***/ (function(module, exports, __webpack_require__) {
12868
 
12869
+ // extracted by mini-css-extract-plugin
 
 
12870
 
12871
+ /***/ }),
 
 
12872
 
12873
+ /***/ 444:
12874
+ /***/ (function(module, exports) {
12875
 
12876
+ module.exports = Array.isArray || function (arr) {
12877
+ return Object.prototype.toString.call(arr) == '[object Array]';
12878
+ };
12879
 
 
 
 
12880
 
12881
+ /***/ }),
 
 
 
12882
 
12883
+ /***/ 445:
12884
+ /***/ (function(module, exports, __webpack_require__) {
 
 
 
12885
 
12886
+ // extracted by mini-css-extract-plugin
 
 
 
 
 
12887
 
12888
+ /***/ }),
 
12889
 
12890
+ /***/ 446:
12891
+ /***/ (function(module, exports) {
 
12892
 
12893
+ module.exports = function(originalModule) {
12894
+ if (!originalModule.webpackPolyfill) {
12895
+ var module = Object.create(originalModule);
12896
+ // module.parent = undefined by default
12897
+ if (!module.children) module.children = [];
12898
+ Object.defineProperty(module, "loaded", {
12899
+ enumerable: true,
12900
+ get: function() {
12901
+ return module.l;
12902
+ }
12903
+ });
12904
+ Object.defineProperty(module, "id", {
12905
+ enumerable: true,
12906
+ get: function() {
12907
+ return module.i;
12908
+ }
12909
+ });
12910
+ Object.defineProperty(module, "exports", {
12911
+ enumerable: true
12912
+ });
12913
+ module.webpackPolyfill = 1;
12914
+ }
12915
+ return module;
12916
+ };
12917
 
 
 
 
 
 
12918
 
12919
+ /***/ }),
 
 
 
 
12920
 
12921
+ /***/ 45:
12922
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
12923
 
12924
+ "use strict";
 
 
 
 
 
12925
 
12926
+ // EXPORTS
12927
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ build_module_focus; });
12928
 
12929
+ // UNUSED EXPORTS: isHorizontalEdge, isVerticalEdge, getRectangleFromRange, computeCaretRect, placeCaretAtHorizontalEdge, placeCaretAtVerticalEdge, isTextField, isNumberInput, documentHasSelection, isEntirelySelected, getScrollContainer, getOffsetParent, replace, remove, insertAfter, unwrap, replaceTag, wrap, __unstableStripHTML
 
 
12930
 
12931
+ // NAMESPACE OBJECT: ./node_modules/@wordpress/dom/build-module/focusable.js
12932
+ var focusable_namespaceObject = {};
12933
+ __webpack_require__.r(focusable_namespaceObject);
12934
+ __webpack_require__.d(focusable_namespaceObject, "find", function() { return find; });
12935
 
12936
+ // NAMESPACE OBJECT: ./node_modules/@wordpress/dom/build-module/tabbable.js
12937
+ var tabbable_namespaceObject = {};
12938
+ __webpack_require__.r(tabbable_namespaceObject);
12939
+ __webpack_require__.d(tabbable_namespaceObject, "isTabbableIndex", function() { return isTabbableIndex; });
12940
+ __webpack_require__.d(tabbable_namespaceObject, "find", function() { return tabbable_find; });
12941
+ __webpack_require__.d(tabbable_namespaceObject, "findPrevious", function() { return findPrevious; });
12942
+ __webpack_require__.d(tabbable_namespaceObject, "findNext", function() { return findNext; });
12943
 
12944
+ // CONCATENATED MODULE: ./node_modules/@wordpress/dom/build-module/focusable.js
12945
+ /**
12946
+ * References:
12947
+ *
12948
+ * Focusable:
12949
+ * - https://www.w3.org/TR/html5/editing.html#focus-management
12950
+ *
12951
+ * Sequential focus navigation:
12952
+ * - https://www.w3.org/TR/html5/editing.html#sequential-focus-navigation-and-the-tabindex-attribute
12953
+ *
12954
+ * Disabled elements:
12955
+ * - https://www.w3.org/TR/html5/disabled-elements.html#disabled-elements
12956
+ *
12957
+ * getClientRects algorithm (requiring layout box):
12958
+ * - https://www.w3.org/TR/cssom-view-1/#extension-to-the-element-interface
12959
+ *
12960
+ * AREA elements associated with an IMG:
12961
+ * - https://w3c.github.io/html/editing.html#data-model
12962
+ */
12963
+ var SELECTOR = ['[tabindex]', 'a[href]', 'button:not([disabled])', 'input:not([type="hidden"]):not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'iframe', 'object', 'embed', 'area[href]', '[contenteditable]:not([contenteditable=false])'].join(',');
12964
+ /**
12965
+ * Returns true if the specified element is visible (i.e. neither display: none
12966
+ * nor visibility: hidden).
12967
+ *
12968
+ * @param {Element} element DOM element to test.
12969
+ *
12970
+ * @return {boolean} Whether element is visible.
12971
+ */
12972
 
12973
+ function isVisible(element) {
12974
+ return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0;
12975
+ }
12976
+ /**
12977
+ * Returns true if the specified area element is a valid focusable element, or
12978
+ * false otherwise. Area is only focusable if within a map where a named map
12979
+ * referenced by an image somewhere in the document.
12980
+ *
12981
+ * @param {Element} element DOM area element to test.
12982
+ *
12983
+ * @return {boolean} Whether area element is valid for focus.
12984
+ */
12985
+
12986
+
12987
+ function isValidFocusableArea(element) {
12988
+ var map = element.closest('map[name]');
12989
+
12990
+ if (!map) {
12991
+ return false;
12992
  }
12993
 
12994
+ var img = document.querySelector('img[usemap="#' + map.name + '"]');
12995
+ return !!img && isVisible(img);
12996
+ }
12997
+ /**
12998
+ * Returns all focusable elements within a given context.
12999
+ *
13000
+ * @param {Element} context Element in which to search.
13001
+ *
13002
+ * @return {Element[]} Focusable elements.
13003
+ */
13004
 
13005
+
13006
+ function find(context) {
13007
+ var elements = context.querySelectorAll(SELECTOR);
13008
+ return Array.from(elements).filter(function (element) {
13009
+ if (!isVisible(element)) {
13010
+ return false;
13011
  }
13012
 
13013
+ var nodeName = element.nodeName;
13014
 
13015
+ if ('AREA' === nodeName) {
13016
+ return isValidFocusableArea(element);
 
 
13017
  }
13018
 
13019
+ return true;
13020
+ });
13021
+ }
13022
+ //# sourceMappingURL=focusable.js.map
13023
+ // EXTERNAL MODULE: external "lodash"
13024
+ var external_lodash_ = __webpack_require__(2);
13025
 
13026
+ // CONCATENATED MODULE: ./node_modules/@wordpress/dom/build-module/tabbable.js
13027
+ /**
13028
+ * External dependencies
13029
+ */
13030
 
13031
+ /**
13032
+ * Internal dependencies
13033
+ */
13034
 
13035
+
13036
+ /**
13037
+ * Returns the tab index of the given element. In contrast with the tabIndex
13038
+ * property, this normalizes the default (0) to avoid browser inconsistencies,
13039
+ * operating under the assumption that this function is only ever called with a
13040
+ * focusable node.
13041
+ *
13042
+ * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1190261
13043
+ *
13044
+ * @param {Element} element Element from which to retrieve.
13045
+ *
13046
+ * @return {?number} Tab index of element (default 0).
13047
+ */
13048
+
13049
+ function getTabIndex(element) {
13050
+ var tabIndex = element.getAttribute('tabindex');
13051
+ return tabIndex === null ? 0 : parseInt(tabIndex, 10);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13052
  }
13053
+ /**
13054
+ * Returns true if the specified element is tabbable, or false otherwise.
13055
+ *
13056
+ * @param {Element} element Element to test.
13057
+ *
13058
+ * @return {boolean} Whether element is tabbable.
13059
+ */
13060
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13061
 
13062
+ function isTabbableIndex(element) {
13063
+ return getTabIndex(element) !== -1;
13064
+ }
13065
  /**
13066
+ * Returns a stateful reducer function which constructs a filtered array of
13067
+ * tabbable elements, where at most one radio input is selected for a given
13068
+ * name, giving priority to checked input, falling back to the first
13069
+ * encountered.
13070
+ *
13071
+ * @return {Function} Radio group collapse reducer.
13072
  */
13073
 
13074
+ function createStatefulCollapseRadioGroup() {
13075
+ var CHOSEN_RADIO_BY_NAME = {};
13076
+ return function collapseRadioGroup(result, element) {
13077
+ var nodeName = element.nodeName,
13078
+ type = element.type,
13079
+ checked = element.checked,
13080
+ name = element.name; // For all non-radio tabbables, construct to array by concatenating.
13081
 
13082
+ if (nodeName !== 'INPUT' || type !== 'radio' || !name) {
13083
+ return result.concat(element);
13084
+ }
13085
 
13086
+ var hasChosen = CHOSEN_RADIO_BY_NAME.hasOwnProperty(name); // Omit by skipping concatenation if the radio element is not chosen.
 
 
 
 
 
13087
 
13088
+ var isChosen = checked || !hasChosen;
13089
 
13090
+ if (!isChosen) {
13091
+ return result;
13092
+ } // At this point, if there had been a chosen element, the current
13093
+ // element is checked and should take priority. Retroactively remove
13094
+ // the element which had previously been considered the chosen one.
13095
 
 
 
13096
 
13097
+ if (hasChosen) {
13098
+ var hadChosenElement = CHOSEN_RADIO_BY_NAME[name];
13099
+ result = Object(external_lodash_["without"])(result, hadChosenElement);
13100
+ }
13101
 
13102
+ CHOSEN_RADIO_BY_NAME[name] = element;
13103
+ return result.concat(element);
13104
+ };
13105
+ }
13106
+ /**
13107
+ * An array map callback, returning an object with the element value and its
13108
+ * array index location as properties. This is used to emulate a proper stable
13109
+ * sort where equal tabIndex should be left in order of their occurrence in the
13110
+ * document.
13111
+ *
13112
+ * @param {Element} element Element.
13113
+ * @param {number} index Array index of element.
13114
+ *
13115
+ * @return {Object} Mapped object with element, index.
13116
+ */
13117
 
 
 
13118
 
13119
+ function mapElementToObjectTabbable(element, index) {
13120
+ return {
13121
+ element: element,
13122
+ index: index
13123
+ };
13124
+ }
13125
+ /**
13126
+ * An array map callback, returning an element of the given mapped object's
13127
+ * element value.
13128
+ *
13129
+ * @param {Object} object Mapped object with index.
13130
+ *
13131
+ * @return {Element} Mapped object element.
13132
+ */
13133
 
 
 
 
 
 
 
13134
 
13135
+ function mapObjectTabbableToElement(object) {
13136
+ return object.element;
13137
+ }
13138
+ /**
13139
+ * A sort comparator function used in comparing two objects of mapped elements.
13140
+ *
13141
+ * @see mapElementToObjectTabbable
13142
+ *
13143
+ * @param {Object} a First object to compare.
13144
+ * @param {Object} b Second object to compare.
13145
+ *
13146
+ * @return {number} Comparator result.
13147
+ */
13148
 
 
 
 
 
 
13149
 
13150
+ function compareObjectTabbables(a, b) {
13151
+ var aTabIndex = getTabIndex(a.element);
13152
+ var bTabIndex = getTabIndex(b.element);
13153
 
13154
+ if (aTabIndex === bTabIndex) {
13155
+ return a.index - b.index;
13156
+ }
 
 
 
 
 
 
13157
 
13158
+ return aTabIndex - bTabIndex;
13159
+ }
13160
+ /**
13161
+ * Givin focusable elements, filters out tabbable element.
13162
+ *
13163
+ * @param {Array} focusables Focusable elements to filter.
13164
+ *
13165
+ * @return {Array} Tabbable elements.
13166
+ */
13167
 
 
 
 
13168
 
13169
+ function filterTabbable(focusables) {
13170
+ return focusables.filter(isTabbableIndex).map(mapElementToObjectTabbable).sort(compareObjectTabbables).map(mapObjectTabbableToElement).reduce(createStatefulCollapseRadioGroup(), []);
13171
+ }
13172
 
13173
+ function tabbable_find(context) {
13174
+ return filterTabbable(find(context));
13175
+ }
13176
+ /**
13177
+ * Given a focusable element, find the preceding tabbable element.
13178
+ *
13179
+ * @param {Element} element The focusable element before which to look. Defaults
13180
+ * to the active element.
13181
+ */
13182
 
13183
+ function findPrevious() {
13184
+ var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.activeElement;
13185
+ var focusables = find(document.body);
13186
+ var index = focusables.indexOf(element); // Remove all focusables after and including `element`.
13187
 
13188
+ focusables.length = index;
13189
+ return Object(external_lodash_["last"])(filterTabbable(focusables));
13190
+ }
13191
+ /**
13192
+ * Given a focusable element, find the next tabbable element.
13193
+ *
13194
+ * @param {Element} element The focusable element after which to look. Defaults
13195
+ * to the active element.
13196
+ */
13197
 
13198
+ function findNext() {
13199
+ var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.activeElement;
13200
+ var focusables = find(document.body);
13201
+ var index = focusables.indexOf(element); // Remove all focusables before and inside `element`.
13202
 
13203
+ var remaining = focusables.slice(index + 1).filter(function (node) {
13204
+ return !element.contains(node);
13205
+ });
13206
+ return Object(external_lodash_["first"])(filterTabbable(remaining));
13207
+ }
13208
+ //# sourceMappingURL=tabbable.js.map
13209
+ // CONCATENATED MODULE: ./node_modules/@wordpress/dom/build-module/index.js
13210
+ /**
13211
+ * Internal dependencies
13212
+ */
13213
 
 
 
 
 
 
13214
 
13215
+ /**
13216
+ * Object grouping `focusable` and `tabbable` utils
13217
+ * under the keys with the same name.
13218
+ */
13219
 
13220
+ var build_module_focus = {
13221
+ focusable: focusable_namespaceObject,
13222
+ tabbable: tabbable_namespaceObject
13223
+ };
 
13224
 
13225
+ //# sourceMappingURL=index.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13226
 
13227
+ /***/ }),
13228
 
13229
+ /***/ 46:
13230
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
13231
 
13232
+ "use strict";
13233
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
13234
+ function _objectWithoutPropertiesLoose(source, excluded) {
13235
+ if (source == null) return {};
13236
+ var target = {};
13237
+ var sourceKeys = Object.keys(source);
13238
+ var key, i;
13239
 
13240
+ for (i = 0; i < sourceKeys.length; i++) {
13241
+ key = sourceKeys[i];
13242
+ if (excluded.indexOf(key) >= 0) continue;
13243
+ target[key] = source[key];
13244
+ }
 
 
13245
 
13246
+ return target;
13247
+ }
13248
 
13249
+ /***/ }),
13250
 
13251
+ /***/ 47:
13252
+ /***/ (function(module, exports) {
 
 
 
13253
 
13254
+ // shim for using process in browser
13255
+ var process = module.exports = {};
 
13256
 
13257
+ // cached from whatever global is present so that test runners that stub it
13258
+ // don't break things. But we need to wrap it in a try catch in case it is
13259
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
13260
+ // function because try/catches deoptimize in certain engines.
13261
 
13262
+ var cachedSetTimeout;
13263
+ var cachedClearTimeout;
13264
 
13265
+ function defaultSetTimout() {
13266
+ throw new Error('setTimeout has not been defined');
13267
+ }
13268
+ function defaultClearTimeout () {
13269
+ throw new Error('clearTimeout has not been defined');
13270
+ }
13271
+ (function () {
13272
+ try {
13273
+ if (typeof setTimeout === 'function') {
13274
+ cachedSetTimeout = setTimeout;
13275
+ } else {
13276
+ cachedSetTimeout = defaultSetTimout;
13277
+ }
13278
+ } catch (e) {
13279
+ cachedSetTimeout = defaultSetTimout;
13280
+ }
13281
+ try {
13282
+ if (typeof clearTimeout === 'function') {
13283
+ cachedClearTimeout = clearTimeout;
13284
+ } else {
13285
+ cachedClearTimeout = defaultClearTimeout;
13286
+ }
13287
+ } catch (e) {
13288
+ cachedClearTimeout = defaultClearTimeout;
13289
+ }
13290
+ } ())
13291
+ function runTimeout(fun) {
13292
+ if (cachedSetTimeout === setTimeout) {
13293
+ //normal enviroments in sane situations
13294
+ return setTimeout(fun, 0);
13295
+ }
13296
+ // if setTimeout wasn't available but was latter defined
13297
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
13298
+ cachedSetTimeout = setTimeout;
13299
+ return setTimeout(fun, 0);
13300
+ }
13301
+ try {
13302
+ // when when somebody has screwed with setTimeout but no I.E. maddness
13303
+ return cachedSetTimeout(fun, 0);
13304
+ } catch(e){
13305
+ try {
13306
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
13307
+ return cachedSetTimeout.call(null, fun, 0);
13308
+ } catch(e){
13309
+ // 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
13310
+ return cachedSetTimeout.call(this, fun, 0);
13311
+ }
13312
+ }
13313
 
 
13314
 
13315
+ }
13316
+ function runClearTimeout(marker) {
13317
+ if (cachedClearTimeout === clearTimeout) {
13318
+ //normal enviroments in sane situations
13319
+ return clearTimeout(marker);
13320
+ }
13321
+ // if clearTimeout wasn't available but was latter defined
13322
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
13323
+ cachedClearTimeout = clearTimeout;
13324
+ return clearTimeout(marker);
13325
+ }
13326
+ try {
13327
+ // when when somebody has screwed with setTimeout but no I.E. maddness
13328
+ return cachedClearTimeout(marker);
13329
+ } catch (e){
13330
+ try {
13331
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
13332
+ return cachedClearTimeout.call(null, marker);
13333
+ } catch (e){
13334
+ // 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.
13335
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
13336
+ return cachedClearTimeout.call(this, marker);
13337
+ }
13338
  }
 
13339
 
13340
 
 
 
 
 
 
13341
 
13342
+ }
13343
+ var queue = [];
13344
+ var draining = false;
13345
+ var currentQueue;
13346
+ var queueIndex = -1;
13347
 
13348
+ function cleanUpNextTick() {
13349
+ if (!draining || !currentQueue) {
13350
+ return;
13351
+ }
13352
+ draining = false;
13353
+ if (currentQueue.length) {
13354
+ queue = currentQueue.concat(queue);
13355
+ } else {
13356
+ queueIndex = -1;
13357
+ }
13358
+ if (queue.length) {
13359
+ drainQueue();
13360
+ }
13361
+ }
13362
 
13363
+ function drainQueue() {
13364
+ if (draining) {
13365
+ return;
13366
+ }
13367
+ var timeout = runTimeout(cleanUpNextTick);
13368
+ draining = true;
13369
 
13370
+ var len = queue.length;
13371
+ while(len) {
13372
+ currentQueue = queue;
13373
+ queue = [];
13374
+ while (++queueIndex < len) {
13375
+ if (currentQueue) {
13376
+ currentQueue[queueIndex].run();
13377
+ }
13378
+ }
13379
+ queueIndex = -1;
13380
+ len = queue.length;
13381
+ }
13382
+ currentQueue = null;
13383
+ draining = false;
13384
+ runClearTimeout(timeout);
13385
+ }
13386
+
13387
+ process.nextTick = function (fun) {
13388
+ var args = new Array(arguments.length - 1);
13389
+ if (arguments.length > 1) {
13390
+ for (var i = 1; i < arguments.length; i++) {
13391
+ args[i - 1] = arguments[i];
13392
+ }
13393
+ }
13394
+ queue.push(new Item(fun, args));
13395
+ if (queue.length === 1 && !draining) {
13396
+ runTimeout(drainQueue);
13397
+ }
13398
  };
13399
 
13400
+ // v8 likes predictible objects
13401
+ function Item(fun, array) {
13402
+ this.fun = fun;
13403
+ this.array = array;
13404
+ }
13405
+ Item.prototype.run = function () {
13406
+ this.fun.apply(null, this.array);
13407
+ };
13408
+ process.title = 'browser';
13409
+ process.browser = true;
13410
+ process.env = {};
13411
+ process.argv = [];
13412
+ process.version = ''; // empty string to avoid regexp issues
13413
+ process.versions = {};
13414
 
13415
+ function noop() {}
 
 
 
 
 
 
13416
 
13417
+ process.on = noop;
13418
+ process.addListener = noop;
13419
+ process.once = noop;
13420
+ process.off = noop;
13421
+ process.removeListener = noop;
13422
+ process.removeAllListeners = noop;
13423
+ process.emit = noop;
13424
+ process.prependListener = noop;
13425
+ process.prependOnceListener = noop;
13426
 
13427
+ process.listeners = function (name) { return [] }
 
 
 
 
13428
 
13429
+ process.binding = function (name) {
13430
+ throw new Error('process.binding is not supported');
13431
+ };
13432
 
13433
+ process.cwd = function () { return '/' };
13434
+ process.chdir = function (dir) {
13435
+ throw new Error('process.chdir is not supported');
13436
+ };
13437
+ process.umask = function() { return 0; };
13438
 
 
 
13439
 
13440
+ /***/ }),
 
 
13441
 
13442
+ /***/ 48:
13443
+ /***/ (function(module, exports) {
 
13444
 
13445
+ (function() { module.exports = this["wp"]["hooks"]; }());
 
13446
 
13447
+ /***/ }),
13448
 
13449
+ /***/ 49:
13450
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
13451
 
13452
+ "use strict";
13453
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
13454
+ /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30);
13455
+
13456
+ function _unsupportedIterableToArray(o, minLen) {
13457
+ if (!o) return;
13458
+ if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
13459
+ var n = Object.prototype.toString.call(o).slice(8, -1);
13460
+ if (n === "Object" && o.constructor) n = o.constructor.name;
13461
+ if (n === "Map" || n === "Set") return Array.from(o);
13462
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
13463
  }
13464
 
13465
+ /***/ }),
13466
+
13467
+ /***/ 5:
13468
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
13469
+
13470
+ "use strict";
13471
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
13472
+ function _assertThisInitialized(self) {
13473
+ if (self === void 0) {
13474
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
13475
  }
13476
 
13477
+ return self;
13478
  }
13479
 
13480
+ /***/ }),
 
 
 
13481
 
13482
+ /***/ 51:
13483
+ /***/ (function(module, exports) {
13484
 
13485
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
13486
+ try {
13487
+ var info = gen[key](arg);
13488
+ var value = info.value;
13489
+ } catch (error) {
13490
+ reject(error);
13491
+ return;
13492
  }
13493
 
13494
+ if (info.done) {
13495
+ resolve(value);
13496
+ } else {
13497
+ Promise.resolve(value).then(_next, _throw);
13498
+ }
13499
+ }
13500
 
13501
+ function _asyncToGenerator(fn) {
13502
+ return function () {
13503
+ var self = this,
13504
+ args = arguments;
13505
+ return new Promise(function (resolve, reject) {
13506
+ var gen = fn.apply(self, args);
13507
 
13508
+ function _next(value) {
13509
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
13510
+ }
13511
 
13512
+ function _throw(err) {
13513
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
13514
+ }
13515
 
13516
+ _next(undefined);
13517
+ });
13518
+ };
13519
+ }
13520
 
13521
+ module.exports = _asyncToGenerator;
 
 
13522
 
13523
+ /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13524
 
13525
+ /***/ 53:
13526
+ /***/ (function(module, exports) {
 
13527
 
13528
+ (function() { module.exports = this["wc"]["components"]; }());
 
 
 
13529
 
13530
+ /***/ }),
 
 
 
 
 
 
 
13531
 
13532
+ /***/ 54:
13533
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
13534
 
13535
+ "use strict";
13536
+ /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
13537
+ /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
13538
+ /**
13539
+ * External dependencies
13540
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13541
 
13542
  /**
13543
+ * Given a function mapping a component to an enhanced component and modifier
13544
+ * name, returns the enhanced component augmented with a generated displayName.
 
 
 
 
 
 
 
13545
  *
13546
+ * @param {Function} mapComponentToEnhancedComponent Function mapping component
13547
+ * to enhanced component.
13548
+ * @param {string} modifierName Seed name from which to
13549
+ * generated display name.
13550
  *
13551
+ * @return {WPComponent} Component class with generated display name assigned.
 
 
 
 
13552
  */
13553
+
13554
+ function createHigherOrderComponent(mapComponentToEnhancedComponent, modifierName) {
13555
+ return function (OriginalComponent) {
13556
+ var EnhancedComponent = mapComponentToEnhancedComponent(OriginalComponent);
13557
+ var _OriginalComponent$di = OriginalComponent.displayName,
13558
+ displayName = _OriginalComponent$di === void 0 ? OriginalComponent.name || 'Component' : _OriginalComponent$di;
13559
+ EnhancedComponent.displayName = "".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["upperFirst"])(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["camelCase"])(modifierName)), "(").concat(displayName, ")");
13560
+ return EnhancedComponent;
13561
+ };
13562
  }
13563
 
13564
+ /* harmony default export */ __webpack_exports__["a"] = (createHigherOrderComponent);
13565
+ //# sourceMappingURL=index.js.map
 
 
13566
 
13567
+ /***/ }),
 
13568
 
13569
+ /***/ 55:
13570
+ /***/ (function(module, exports) {
 
 
 
 
 
 
 
13571
 
13572
+ function _interopRequireDefault(obj) {
13573
+ return obj && obj.__esModule ? obj : {
13574
+ "default": obj
13575
+ };
13576
+ }
13577
 
13578
+ module.exports = _interopRequireDefault;
 
 
13579
 
13580
+ /***/ }),
 
 
 
 
13581
 
13582
+ /***/ 56:
13583
+ /***/ (function(module, exports) {
13584
 
13585
+ var g;
 
 
 
13586
 
13587
+ // This works in non-strict mode
13588
+ g = (function() {
13589
+ return this;
13590
+ })();
13591
 
13592
+ try {
13593
+ // This works if eval is allowed (see CSP)
13594
+ g = g || new Function("return this")();
13595
+ } catch (e) {
13596
+ // This works if the window reference is available
13597
+ if (typeof window === "object") g = window;
13598
+ }
13599
 
13600
+ // g can still be undefined, but nothing to do about it...
13601
+ // We return undefined, instead of nothing here, so it's
13602
+ // easier to handle this case. if(!global) { ...}
13603
 
13604
+ module.exports = g;
 
 
13605
 
 
 
13606
 
13607
+ /***/ }),
 
 
 
13608
 
13609
+ /***/ 59:
13610
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
13611
 
13612
+ "use strict";
13613
+ /* unused harmony export logged */
13614
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return deprecated; });
13615
+ /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(48);
13616
+ /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);
13617
+ /**
13618
+ * WordPress dependencies
13619
+ */
13620
+
13621
+ /**
13622
+ * Object map tracking messages which have been logged, for use in ensuring a
13623
+ * message is only logged once.
13624
+ *
13625
+ * @type {Object}
13626
+ */
13627
+
13628
+ var logged = Object.create(null);
13629
+ /**
13630
+ * Logs a message to notify developers about a deprecated feature.
13631
+ *
13632
+ * @param {string} feature Name of the deprecated feature.
13633
+ * @param {?Object} options Personalisation options
13634
+ * @param {?string} options.version Version in which the feature will be removed.
13635
+ * @param {?string} options.alternative Feature to use instead
13636
+ * @param {?string} options.plugin Plugin name if it's a plugin feature
13637
+ * @param {?string} options.link Link to documentation
13638
+ * @param {?string} options.hint Additional message to help transition away from the deprecated feature.
13639
+ *
13640
+ * @example
13641
+ * ```js
13642
+ * import deprecated from '@wordpress/deprecated';
13643
+ *
13644
+ * deprecated( 'Eating meat', {
13645
+ * version: 'the future',
13646
+ * alternative: 'vegetables',
13647
+ * plugin: 'the earth',
13648
+ * hint: 'You may find it beneficial to transition gradually.',
13649
+ * } );
13650
+ *
13651
+ * // Logs: 'Eating meat is deprecated and will be removed from the earth in the future. Please use vegetables instead. Note: You may find it beneficial to transition gradually.'
13652
+ * ```
13653
+ */
13654
+
13655
+ function deprecated(feature) {
13656
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13657
+ var version = options.version,
13658
+ alternative = options.alternative,
13659
+ plugin = options.plugin,
13660
+ link = options.link,
13661
+ hint = options.hint;
13662
+ var pluginMessage = plugin ? " from ".concat(plugin) : '';
13663
+ var versionMessage = version ? " and will be removed".concat(pluginMessage, " in version ").concat(version) : '';
13664
+ var useInsteadMessage = alternative ? " Please use ".concat(alternative, " instead.") : '';
13665
+ var linkMessage = link ? " See: ".concat(link) : '';
13666
+ var hintMessage = hint ? " Note: ".concat(hint) : '';
13667
+ var message = "".concat(feature, " is deprecated").concat(versionMessage, ".").concat(useInsteadMessage).concat(linkMessage).concat(hintMessage); // Skip if already logged.
13668
+
13669
+ if (message in logged) {
13670
+ return;
13671
  }
13672
+ /**
13673
+ * Fires whenever a deprecated feature is encountered
13674
+ *
13675
+ * @param {string} feature Name of the deprecated feature.
13676
+ * @param {?Object} options Personalisation options
13677
+ * @param {?string} options.version Version in which the feature will be removed.
13678
+ * @param {?string} options.alternative Feature to use instead
13679
+ * @param {?string} options.plugin Plugin name if it's a plugin feature
13680
+ * @param {?string} options.link Link to documentation
13681
+ * @param {?string} options.hint Additional message to help transition away from the deprecated feature.
13682
+ * @param {?string} message Message sent to console.warn
13683
+ */
13684
 
 
13685
 
13686
+ Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__["doAction"])('deprecated', feature, options, message); // eslint-disable-next-line no-console
 
13687
 
13688
+ console.warn(message);
13689
+ logged[message] = true;
13690
+ }
13691
+ //# sourceMappingURL=index.js.map
13692
 
13693
+ /***/ }),
 
 
 
 
 
 
 
 
 
 
 
13694
 
13695
+ /***/ 6:
13696
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
13697
+
13698
+ "use strict";
13699
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
13700
+ function _defineProperty(obj, key, value) {
13701
+ if (key in obj) {
13702
+ Object.defineProperty(obj, key, {
13703
+ value: value,
13704
+ enumerable: true,
13705
+ configurable: true,
13706
+ writable: true
13707
  });
13708
+ } else {
13709
+ obj[key] = value;
13710
+ }
13711
 
13712
+ return obj;
13713
+ }
 
13714
 
13715
+ /***/ }),
 
13716
 
13717
+ /***/ 60:
13718
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
13719
 
13720
+ "use strict";
13721
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inheritsLoose; });
13722
+ function _inheritsLoose(subClass, superClass) {
13723
+ subClass.prototype = Object.create(superClass.prototype);
13724
+ subClass.prototype.constructor = subClass;
13725
+ subClass.__proto__ = superClass;
13726
+ }
13727
 
13728
+ /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
13729
 
13730
+ /***/ 62:
13731
+ /***/ (function(module, exports) {
 
13732
 
13733
+ function _assertThisInitialized(self) {
13734
+ if (self === void 0) {
13735
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
13736
  }
 
 
 
 
13737
 
13738
+ return self;
13739
+ }
13740
 
13741
+ module.exports = _assertThisInitialized;
 
 
13742
 
13743
+ /***/ }),
 
 
 
 
13744
 
13745
+ /***/ 63:
13746
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
 
 
13747
 
13748
+ "use strict";
13749
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return recordEvent; });
13750
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return queueRecordEvent; });
13751
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return recordPageView; });
13752
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
13753
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
13754
+ /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35);
13755
+ /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__);
13756
+ /* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(87);
13757
+ /* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(debug__WEBPACK_IMPORTED_MODULE_2__);
13758
 
 
 
 
 
 
13759
 
 
 
 
 
 
 
 
13760
 
13761
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
13762
 
13763
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
 
 
13764
 
13765
+ /**
13766
+ * External dependencies
13767
+ */
 
 
 
13768
 
13769
+ /**
13770
+ * Module variables
13771
+ */
13772
 
13773
+ var tracksDebug = debug__WEBPACK_IMPORTED_MODULE_2___default()('wc-admin:tracks');
13774
+ /**
13775
+ * Record an event to Tracks
13776
+ *
13777
+ * @param {string} eventName The name of the event to record, don't include the wcadmin_ prefix
13778
+ * @param {Object} eventProperties event properties to include in the event
13779
+ */
13780
 
13781
+ function recordEvent(eventName, eventProperties) {
13782
+ tracksDebug('recordevent %s %o', 'wcadmin_' + eventName, eventProperties, {
13783
+ _tqk: window._tkq,
13784
+ shouldRecord: true && !!window._tkq && !!window.wcTracks && !!window.wcTracks.isEnabled
13785
+ });
 
 
 
 
 
 
13786
 
13787
+ if (!window.wcTracks || typeof window.wcTracks.recordEvent !== 'function' || "production" === 'development') {
13788
+ return false;
13789
+ }
13790
 
13791
+ window.wcTracks.recordEvent(eventName, eventProperties);
13792
+ }
13793
+ var tracksQueue = {
13794
+ localStorageKey: function localStorageKey() {
13795
+ return 'tracksQueue';
13796
+ },
13797
+ clear: function clear() {
13798
+ if (!window.localStorage) {
13799
+ return;
13800
+ }
13801
 
13802
+ window.localStorage.removeItem(tracksQueue.localStorageKey());
13803
+ },
13804
+ get: function get() {
13805
+ if (!window.localStorage) {
13806
+ return [];
13807
+ }
13808
 
13809
+ var items = window.localStorage.getItem(tracksQueue.localStorageKey());
13810
+ items = items ? JSON.parse(items) : [];
13811
+ items = Array.isArray(items) ? items : [];
13812
+ return items;
13813
+ },
13814
+ add: function add() {
13815
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
13816
+ args[_key] = arguments[_key];
13817
+ }
13818
 
13819
+ if (!window.localStorage) {
13820
+ // If unable to queue, run it now.
13821
+ tracksDebug('Unable to queue, running now', {
13822
+ args: args
13823
+ });
13824
+ recordEvent.apply(null, args || undefined);
13825
+ return;
13826
+ }
13827
 
13828
+ var items = tracksQueue.get();
13829
+ var newItem = {
13830
+ args: args
13831
+ };
13832
+ items.push(newItem);
13833
+ items = items.slice(-100); // Upper limit.
13834
 
13835
+ tracksDebug('Adding new item to queue.', newItem);
13836
+ window.localStorage.setItem(tracksQueue.localStorageKey(), JSON.stringify(items));
13837
+ },
13838
+ process: function process() {
13839
+ if (!window.localStorage) {
13840
+ return; // Not possible.
13841
+ }
13842
+
13843
+ var items = tracksQueue.get();
13844
+ tracksQueue.clear();
13845
+ tracksDebug('Processing items in queue.', items);
13846
+ items.forEach(function (item) {
13847
+ if (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(item) === 'object') {
13848
+ tracksDebug('Processing item in queue.', item);
13849
+ recordEvent.apply(null, item.args || undefined);
 
13850
  }
13851
+ });
13852
+ }
13853
+ };
13854
+ /**
13855
+ * Queue a tracks event.
13856
+ *
13857
+ * This allows you to delay tracks events that would otherwise cause a race condition.
13858
+ * For example, when we trigger `wcadmin_tasklist_appearance_continue_setup` we're simultaneously moving the user to a new page via
13859
+ * `window.location`. This is an example of a race condition that should be avoided by enqueueing the event,
13860
+ * and therefore running it on the next pageview.
13861
+ *
13862
+ * @param {string} eventName The name of the event to record, don't include the wcadmin_ prefix
13863
+ * @param {Object} eventProperties event properties to include in the event
13864
+ */
13865
 
13866
+ function queueRecordEvent(eventName, eventProperties) {
13867
+ tracksQueue.add(eventName, eventProperties);
13868
+ }
13869
+ /**
13870
+ * Record a page view to Tracks
13871
+ *
13872
+ * @param {string} path the page/path to record a page view for
13873
+ * @param {Object} extraProperties extra event properties to include in the event
13874
+ */
13875
 
13876
+ function recordPageView(path, extraProperties) {
13877
+ if (!path) {
13878
+ return;
 
 
 
13879
  }
 
 
13880
 
13881
+ recordEvent('page_view', _objectSpread({
13882
+ path: path
13883
+ }, extraProperties)); // Process queue.
 
 
13884
 
13885
+ tracksQueue.process();
13886
+ }
13887
 
13888
+ /***/ }),
 
13889
 
13890
+ /***/ 65:
13891
+ /***/ (function(module, exports, __webpack_require__) {
13892
 
13893
+ "use strict";
13894
 
 
 
 
13895
 
13896
+ /**
13897
+ * Internal dependencies;
13898
+ */
13899
+ var isShallowEqualObjects = __webpack_require__( 117 );
13900
+ var isShallowEqualArrays = __webpack_require__( 118 );
13901
 
13902
+ var isArray = Array.isArray;
 
 
 
 
 
 
 
13903
 
13904
+ /**
13905
+ * @typedef {Record<string, any>} ComparableObject
13906
+ */
 
 
 
 
 
 
 
13907
 
13908
+ /**
13909
+ * Returns true if the two arrays or objects are shallow equal, or false
13910
+ * otherwise.
13911
+ *
13912
+ * @param {any[]|ComparableObject} a First object or array to compare.
13913
+ * @param {any[]|ComparableObject} b Second object or array to compare.
13914
+ *
13915
+ * @return {boolean} Whether the two values are shallow equal.
13916
+ */
13917
+ function isShallowEqual( a, b ) {
13918
+ if ( a && b ) {
13919
+ if ( a.constructor === Object && b.constructor === Object ) {
13920
+ return isShallowEqualObjects( a, b );
13921
+ } else if ( isArray( a ) && isArray( b ) ) {
13922
+ return isShallowEqualArrays( a, b );
13923
+ }
13924
+ }
13925
 
13926
+ return a === b;
13927
+ }
 
 
 
 
 
 
 
13928
 
13929
+ module.exports = isShallowEqual;
13930
+ module.exports.isShallowEqualObjects = isShallowEqualObjects;
13931
+ module.exports.isShallowEqualArrays = isShallowEqualArrays;
 
 
 
13932
 
 
 
13933
 
13934
+ /***/ }),
 
13935
 
13936
+ /***/ 66:
13937
+ /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
13938
 
13939
+ "use strict";
 
 
 
 
13940
 
13941
 
13942
+ var stringify = __webpack_require__(115);
13943
+ var parse = __webpack_require__(116);
13944
+ var formats = __webpack_require__(94);
13945
 
13946
+ module.exports = {
13947
+ formats: formats,
13948
+ parse: parse,
13949
+ stringify: stringify
13950
+ };
13951
 
 
 
 
 
 
13952
 
13953
+ /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13954
 
13955
+ /***/ 67:
13956
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
13957
 
13958
+ "use strict";
13959
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
13960
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
13961
+ try {
13962
+ var info = gen[key](arg);
13963
+ var value = info.value;
13964
+ } catch (error) {
13965
+ reject(error);
13966
+ return;
13967
+ }
13968
 
13969
+ if (info.done) {
13970
+ resolve(value);
13971
+ } else {
13972
+ Promise.resolve(value).then(_next, _throw);
13973
+ }
13974
+ }
13975
 
13976
+ function _asyncToGenerator(fn) {
13977
+ return function () {
13978
+ var self = this,
13979
+ args = arguments;
13980
+ return new Promise(function (resolve, reject) {
13981
+ var gen = fn.apply(self, args);
13982
 
13983
+ function _next(value) {
13984
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
13985
+ }
13986
 
13987
+ function _throw(err) {
13988
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
13989
+ }
 
 
 
 
 
 
13990
 
13991
+ _next(undefined);
13992
+ });
13993
+ };
13994
+ }
 
 
 
 
 
13995
 
13996
+ /***/ }),
 
 
13997
 
13998
+ /***/ 68:
13999
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14000
 
14001
+ "use strict";
14002
+ /* unused harmony export Button */
14003
+ /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
14004
+ /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14);
14005
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
14006
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
14007
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8);
14008
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
14009
+ /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2);
14010
+ /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);
14011
+ /* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(59);
14012
+ /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(97);
14013
+ /* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(96);
14014
 
 
 
 
14015
 
 
 
 
 
 
14016
 
 
 
 
 
 
14017
 
14018
+ function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
 
14019
 
14020
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
 
 
 
 
 
 
 
 
 
14021
 
14022
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
 
14023
 
14024
+ /**
14025
+ * External dependencies
 
14026
  */
14027
 
 
 
 
 
14028
 
14029
+ /**
14030
+ * WordPress dependencies
14031
+ */
 
 
 
 
 
14032
 
 
 
 
 
 
 
 
 
 
 
 
 
14033
 
 
14034
 
14035
+ /**
14036
+ * Internal dependencies
14037
+ */
 
 
 
 
 
 
 
 
 
 
 
14038
 
 
 
 
14039
 
 
 
14040
 
14041
+ var disabledEventsOnDisabledButton = ['onMouseDown', 'onClick'];
14042
+ function Button(props, ref) {
14043
+ var href = props.href,
14044
+ target = props.target,
14045
+ isPrimary = props.isPrimary,
14046
+ isLarge = props.isLarge,
14047
+ isSmall = props.isSmall,
14048
+ isTertiary = props.isTertiary,
14049
+ isPressed = props.isPressed,
14050
+ isBusy = props.isBusy,
14051
+ isDefault = props.isDefault,
14052
+ isSecondary = props.isSecondary,
14053
+ isLink = props.isLink,
14054
+ isDestructive = props.isDestructive,
14055
+ className = props.className,
14056
+ disabled = props.disabled,
14057
+ icon = props.icon,
14058
+ iconSize = props.iconSize,
14059
+ showTooltip = props.showTooltip,
14060
+ tooltipPosition = props.tooltipPosition,
14061
+ shortcut = props.shortcut,
14062
+ label = props.label,
14063
+ children = props.children,
14064
+ isFocusable = props.__experimentalIsFocusable,
14065
+ additionalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(props, ["href", "target", "isPrimary", "isLarge", "isSmall", "isTertiary", "isPressed", "isBusy", "isDefault", "isSecondary", "isLink", "isDestructive", "className", "disabled", "icon", "iconSize", "showTooltip", "tooltipPosition", "shortcut", "label", "children", "__experimentalIsFocusable"]);
14066
 
14067
+ if (isDefault) {
14068
+ Object(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])('Button isDefault prop', {
14069
+ alternative: 'isSecondary'
 
 
14070
  });
14071
+ }
 
 
 
 
 
 
 
 
14072
 
14073
+ var classes = classnames__WEBPACK_IMPORTED_MODULE_3___default()('components-button', className, {
14074
+ 'is-secondary': isDefault || isSecondary,
14075
+ 'is-primary': isPrimary,
14076
+ 'is-large': isLarge,
14077
+ 'is-small': isSmall,
14078
+ 'is-tertiary': isTertiary,
14079
+ 'is-pressed': isPressed,
14080
+ 'is-busy': isBusy,
14081
+ 'is-link': isLink,
14082
+ 'is-destructive': isDestructive,
14083
+ 'has-text': !!icon && !!children,
14084
+ 'has-icon': !!icon
14085
  });
14086
+ var trulyDisabled = disabled && !isFocusable;
14087
+ var Tag = href !== undefined && !trulyDisabled ? 'a' : 'button';
14088
+ var tagProps = Tag === 'a' ? {
14089
+ href: href,
14090
+ target: target
14091
+ } : {
14092
+ type: 'button',
14093
+ disabled: trulyDisabled,
14094
+ 'aria-pressed': isPressed
14095
+ };
14096
 
14097
+ if (disabled && isFocusable) {
14098
+ // In this case, the button will be disabled, but still focusable and
14099
+ // perceivable by screen reader users.
14100
+ tagProps['aria-disabled'] = true;
14101
 
14102
+ var _iterator = _createForOfIteratorHelper(disabledEventsOnDisabledButton),
14103
+ _step;
14104
 
14105
+ try {
14106
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
14107
+ var disabledEvent = _step.value;
 
14108
 
14109
+ additionalProps[disabledEvent] = function (event) {
14110
+ event.stopPropagation();
14111
+ event.preventDefault();
14112
+ };
14113
+ }
14114
+ } catch (err) {
14115
+ _iterator.e(err);
14116
+ } finally {
14117
+ _iterator.f();
14118
+ }
14119
+ } // Should show the tooltip if...
14120
 
 
 
 
 
14121
 
14122
+ var shouldShowTooltip = !trulyDisabled && ( // an explicit tooltip is passed or...
14123
+ showTooltip && label || // there's a shortcut or...
14124
+ shortcut || // there's a label and...
14125
+ !!label && ( // the children are empty and...
14126
+ !children || Object(lodash__WEBPACK_IMPORTED_MODULE_4__["isArray"])(children) && !children.length) && // the tooltip is not explicitly disabled.
14127
+ false !== showTooltip);
14128
+ var element = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(Tag, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, tagProps, additionalProps, {
14129
+ className: classes,
14130
+ "aria-label": additionalProps['aria-label'] || label,
14131
+ ref: ref
14132
+ }), icon && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_icon__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], {
14133
+ icon: icon,
14134
+ size: iconSize
14135
+ }), children);
14136
+
14137
+ if (!shouldShowTooltip) {
14138
+ return element;
14139
+ }
14140
+
14141
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_tooltip__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], {
14142
+ text: label,
14143
+ shortcut: shortcut,
14144
+ position: tooltipPosition
14145
+ }, element);
14146
+ }
14147
+ /* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["forwardRef"])(Button));
14148
+ //# sourceMappingURL=index.js.map
14149
 
14150
+ /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
14151
 
14152
+ /***/ 7:
14153
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
14154
 
14155
+ "use strict";
14156
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
14157
+ function _defineProperties(target, props) {
14158
+ for (var i = 0; i < props.length; i++) {
14159
+ var descriptor = props[i];
14160
+ descriptor.enumerable = descriptor.enumerable || false;
14161
+ descriptor.configurable = true;
14162
+ if ("value" in descriptor) descriptor.writable = true;
14163
+ Object.defineProperty(target, descriptor.key, descriptor);
14164
+ }
14165
+ }
 
 
 
 
14166
 
14167
+ function _createClass(Constructor, protoProps, staticProps) {
14168
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
14169
+ if (staticProps) _defineProperties(Constructor, staticProps);
14170
+ return Constructor;
14171
+ }
14172
 
14173
+ /***/ }),
 
 
 
 
14174
 
14175
+ /***/ 70:
14176
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
14177
+
14178
+ "use strict";
14179
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return domReady; });
14180
+ /**
14181
+ * @typedef {() => void} Callback
14182
+ *
14183
+ * TODO: Remove this typedef and inline `() => void` type.
14184
+ *
14185
+ * This typedef is used so that a descriptive type is provided in our
14186
+ * automatically generated documentation.
14187
+ *
14188
+ * An in-line type `() => void` would be preferable, but the generated
14189
+ * documentation is `null` in that case.
14190
+ *
14191
+ * @see https://github.com/WordPress/gutenberg/issues/18045
14192
  */
14193
 
14194
+ /**
14195
+ * Specify a function to execute when the DOM is fully loaded.
14196
+ *
14197
+ * @param {Callback} callback A function to execute after the DOM is ready.
14198
+ *
14199
+ * @example
14200
+ * ```js
14201
+ * import domReady from '@wordpress/dom-ready';
14202
+ *
14203
+ * domReady( function() {
14204
+ * //do something after DOM loads.
14205
+ * } );
14206
+ * ```
14207
+ *
14208
+ * @return {void}
14209
+ */
14210
+ function domReady(callback) {
14211
+ if (document.readyState === 'complete' || // DOMContentLoaded + Images/Styles/etc loaded, so we call directly.
14212
+ document.readyState === 'interactive' // DOMContentLoaded fires at this point, so we call directly.
14213
+ ) {
14214
+ return void callback();
14215
+ } // DOMContentLoaded has not fired yet, delay callback until then.
14216
 
 
 
 
14217
 
14218
+ document.addEventListener('DOMContentLoaded', callback);
14219
+ }
14220
+ //# sourceMappingURL=index.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14221
 
14222
+ /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14223
 
14224
+ /***/ 715:
14225
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14226
 
14227
+ "use strict";
 
 
 
 
 
14228
 
14229
+ // EXTERNAL MODULE: external {"this":["wp","data"]}
14230
+ var external_this_wp_data_ = __webpack_require__(18);
14231
 
14232
+ // EXTERNAL MODULE: ./node_modules/@fresh-data/framework/es/index.js + 8 modules
14233
+ var es = __webpack_require__(170);
14234
 
14235
+ // EXTERNAL MODULE: ./node_modules/symbol-observable/es/index.js
14236
+ var symbol_observable_es = __webpack_require__(259);
 
 
 
 
 
 
 
 
 
14237
 
14238
+ // CONCATENATED MODULE: ./node_modules/redux/es/redux.js
14239
 
 
 
 
 
 
 
 
 
 
 
 
 
14240
 
14241
+ /**
14242
+ * These are private action types reserved by Redux.
14243
+ * For any unknown actions, you must return the current state.
14244
+ * If the current state is undefined, you must return the initial state.
14245
+ * Do not reference these action types directly in your code.
14246
+ */
14247
+ var randomString = function randomString() {
14248
+ return Math.random().toString(36).substring(7).split('').join('.');
14249
+ };
14250
 
14251
+ var ActionTypes = {
14252
+ INIT: "@@redux/INIT" + randomString(),
14253
+ REPLACE: "@@redux/REPLACE" + randomString(),
14254
+ PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
14255
+ return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
14256
+ }
14257
+ };
 
 
 
 
 
 
 
 
 
 
14258
 
14259
+ /**
14260
+ * @param {any} obj The object to inspect.
14261
+ * @returns {boolean} True if the argument appears to be a plain object.
14262
+ */
14263
+ function isPlainObject(obj) {
14264
+ if (typeof obj !== 'object' || obj === null) return false;
14265
+ var proto = obj;
14266
 
14267
+ while (Object.getPrototypeOf(proto) !== null) {
14268
+ proto = Object.getPrototypeOf(proto);
 
14269
  }
14270
 
14271
+ return Object.getPrototypeOf(obj) === proto;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14272
  }
14273
 
14274
+ /**
14275
+ * Creates a Redux store that holds the state tree.
14276
+ * The only way to change the data in the store is to call `dispatch()` on it.
14277
+ *
14278
+ * There should only be a single store in your app. To specify how different
14279
+ * parts of the state tree respond to actions, you may combine several reducers
14280
+ * into a single reducer function by using `combineReducers`.
14281
+ *
14282
+ * @param {Function} reducer A function that returns the next state tree, given
14283
+ * the current state tree and the action to handle.
14284
+ *
14285
+ * @param {any} [preloadedState] The initial state. You may optionally specify it
14286
+ * to hydrate the state from the server in universal apps, or to restore a
14287
+ * previously serialized user session.
14288
+ * If you use `combineReducers` to produce the root reducer function, this must be
14289
+ * an object with the same shape as `combineReducers` keys.
14290
+ *
14291
+ * @param {Function} [enhancer] The store enhancer. You may optionally specify it
14292
+ * to enhance the store with third-party capabilities such as middleware,
14293
+ * time travel, persistence, etc. The only store enhancer that ships with Redux
14294
+ * is `applyMiddleware()`.
14295
+ *
14296
+ * @returns {Store} A Redux store that lets you read the state, dispatch actions
14297
+ * and subscribe to changes.
14298
+ */
14299
 
14300
+ function createStore(reducer, preloadedState, enhancer) {
14301
+ var _ref2;
 
 
 
 
 
 
 
14302
 
14303
+ if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
14304
+ throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function.');
14305
+ }
14306
 
14307
+ if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
14308
+ enhancer = preloadedState;
14309
+ preloadedState = undefined;
14310
+ }
14311
 
14312
+ if (typeof enhancer !== 'undefined') {
14313
+ if (typeof enhancer !== 'function') {
14314
+ throw new Error('Expected the enhancer to be a function.');
 
14315
  }
 
14316
 
14317
+ return enhancer(createStore)(reducer, preloadedState);
14318
+ }
14319
 
14320
+ if (typeof reducer !== 'function') {
14321
+ throw new Error('Expected the reducer to be a function.');
14322
+ }
14323
 
14324
+ var currentReducer = reducer;
14325
+ var currentState = preloadedState;
14326
+ var currentListeners = [];
14327
+ var nextListeners = currentListeners;
14328
+ var isDispatching = false;
14329
+ /**
14330
+ * This makes a shallow copy of currentListeners so we can use
14331
+ * nextListeners as a temporary list while dispatching.
14332
+ *
14333
+ * This prevents any bugs around consumers calling
14334
+ * subscribe/unsubscribe in the middle of a dispatch.
14335
+ */
14336
+
14337
+ function ensureCanMutateNextListeners() {
14338
+ if (nextListeners === currentListeners) {
14339
+ nextListeners = currentListeners.slice();
14340
+ }
14341
  }
14342
+ /**
14343
+ * Reads the state tree managed by the store.
14344
+ *
14345
+ * @returns {any} The current state tree of your application.
14346
+ */
14347
 
 
 
14348
 
14349
+ function getState() {
14350
+ if (isDispatching) {
14351
+ throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
14352
+ }
14353
 
14354
+ return currentState;
14355
+ }
14356
+ /**
14357
+ * Adds a change listener. It will be called any time an action is dispatched,
14358
+ * and some part of the state tree may potentially have changed. You may then
14359
+ * call `getState()` to read the current state tree inside the callback.
14360
+ *
14361
+ * You may call `dispatch()` from a change listener, with the following
14362
+ * caveats:
14363
+ *
14364
+ * 1. The subscriptions are snapshotted just before every `dispatch()` call.
14365
+ * If you subscribe or unsubscribe while the listeners are being invoked, this
14366
+ * will not have any effect on the `dispatch()` that is currently in progress.
14367
+ * However, the next `dispatch()` call, whether nested or not, will use a more
14368
+ * recent snapshot of the subscription list.
14369
+ *
14370
+ * 2. The listener should not expect to see all state changes, as the state
14371
+ * might have been updated multiple times during a nested `dispatch()` before
14372
+ * the listener is called. It is, however, guaranteed that all subscribers
14373
+ * registered before the `dispatch()` started will be called with the latest
14374
+ * state by the time it exits.
14375
+ *
14376
+ * @param {Function} listener A callback to be invoked on every dispatch.
14377
+ * @returns {Function} A function to remove this change listener.
14378
+ */
14379
 
 
 
 
14380
 
14381
+ function subscribe(listener) {
14382
+ if (typeof listener !== 'function') {
14383
+ throw new Error('Expected the listener to be a function.');
14384
+ }
14385
 
14386
+ if (isDispatching) {
14387
+ throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');
14388
+ }
14389
 
14390
+ var isSubscribed = true;
14391
+ ensureCanMutateNextListeners();
14392
+ nextListeners.push(listener);
14393
+ return function unsubscribe() {
14394
+ if (!isSubscribed) {
14395
+ return;
14396
+ }
 
 
 
 
 
 
 
 
14397
 
14398
+ if (isDispatching) {
14399
+ throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');
14400
+ }
14401
 
14402
+ isSubscribed = false;
14403
+ ensureCanMutateNextListeners();
14404
+ var index = nextListeners.indexOf(listener);
14405
+ nextListeners.splice(index, 1);
14406
+ currentListeners = null;
14407
+ };
14408
+ }
14409
+ /**
14410
+ * Dispatches an action. It is the only way to trigger a state change.
14411
+ *
14412
+ * The `reducer` function, used to create the store, will be called with the
14413
+ * current state tree and the given `action`. Its return value will
14414
+ * be considered the **next** state of the tree, and the change listeners
14415
+ * will be notified.
14416
+ *
14417
+ * The base implementation only supports plain object actions. If you want to
14418
+ * dispatch a Promise, an Observable, a thunk, or something else, you need to
14419
+ * wrap your store creating function into the corresponding middleware. For
14420
+ * example, see the documentation for the `redux-thunk` package. Even the
14421
+ * middleware will eventually dispatch plain object actions using this method.
14422
+ *
14423
+ * @param {Object} action A plain object representing “what changed”. It is
14424
+ * a good idea to keep actions serializable so you can record and replay user
14425
+ * sessions, or use the time travelling `redux-devtools`. An action must have
14426
+ * a `type` property which may not be `undefined`. It is a good idea to use
14427
+ * string constants for action types.
14428
+ *
14429
+ * @returns {Object} For convenience, the same action object you dispatched.
14430
+ *
14431
+ * Note that, if you use a custom middleware, it may wrap `dispatch()` to
14432
+ * return something else (for example, a Promise you can await).
14433
+ */
14434
 
 
 
 
 
14435
 
14436
+ function dispatch(action) {
14437
+ if (!isPlainObject(action)) {
14438
+ throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
14439
+ }
14440
+
14441
+ if (typeof action.type === 'undefined') {
14442
+ throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
14443
+ }
14444
+
14445
+ if (isDispatching) {
14446
+ throw new Error('Reducers may not dispatch actions.');
14447
+ }
14448
+
14449
+ try {
14450
+ isDispatching = true;
14451
+ currentState = currentReducer(currentState, action);
14452
+ } finally {
14453
+ isDispatching = false;
14454
+ }
14455
+
14456
+ var listeners = currentListeners = nextListeners;
14457
+
14458
+ for (var i = 0; i < listeners.length; i++) {
14459
+ var listener = listeners[i];
14460
+ listener();
14461
+ }
14462
+
14463
+ return action;
14464
+ }
14465
+ /**
14466
+ * Replaces the reducer currently used by the store to calculate the state.
14467
+ *
14468
+ * You might need this if your app implements code splitting and you want to
14469
+ * load some of the reducers dynamically. You might also need this if you
14470
+ * implement a hot reloading mechanism for Redux.
14471
+ *
14472
+ * @param {Function} nextReducer The reducer for the store to use instead.
14473
+ * @returns {void}
14474
+ */
14475
+
14476
+
14477
+ function replaceReducer(nextReducer) {
14478
+ if (typeof nextReducer !== 'function') {
14479
+ throw new Error('Expected the nextReducer to be a function.');
14480
+ }
14481
+
14482
+ currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
14483
+ // Any reducers that existed in both the new and old rootReducer
14484
+ // will receive the previous state. This effectively populates
14485
+ // the new state tree with any relevant data from the old one.
14486
+
14487
+ dispatch({
14488
+ type: ActionTypes.REPLACE
14489
+ });
14490
+ }
14491
+ /**
14492
+ * Interoperability point for observable/reactive libraries.
14493
+ * @returns {observable} A minimal observable of state changes.
14494
+ * For more information, see the observable proposal:
14495
+ * https://github.com/tc39/proposal-observable
14496
+ */
14497
+
14498
+
14499
+ function observable() {
14500
+ var _ref;
14501
+
14502
+ var outerSubscribe = subscribe;
14503
+ return _ref = {
14504
+ /**
14505
+ * The minimal observable subscription method.
14506
+ * @param {Object} observer Any object that can be used as an observer.
14507
+ * The observer object should have a `next` method.
14508
+ * @returns {subscription} An object with an `unsubscribe` method that can
14509
+ * be used to unsubscribe the observable from the store, and prevent further
14510
+ * emission of values from the observable.
14511
+ */
14512
+ subscribe: function subscribe(observer) {
14513
+ if (typeof observer !== 'object' || observer === null) {
14514
+ throw new TypeError('Expected the observer to be an object.');
14515
  }
14516
 
14517
+ function observeState() {
14518
+ if (observer.next) {
14519
+ observer.next(getState());
14520
+ }
 
 
 
 
 
 
 
 
 
 
 
14521
  }
14522
+
14523
+ observeState();
14524
+ var unsubscribe = outerSubscribe(observeState);
14525
+ return {
14526
+ unsubscribe: unsubscribe
14527
+ };
14528
+ }
14529
+ }, _ref[symbol_observable_es["a" /* default */]] = function () {
14530
+ return this;
14531
+ }, _ref;
14532
+ } // When a store is created, an "INIT" action is dispatched so that every
14533
+ // reducer returns their initial state. This effectively populates
14534
+ // the initial state tree.
14535
+
14536
+
14537
+ dispatch({
14538
+ type: ActionTypes.INIT
14539
+ });
14540
+ return _ref2 = {
14541
+ dispatch: dispatch,
14542
+ subscribe: subscribe,
14543
+ getState: getState,
14544
+ replaceReducer: replaceReducer
14545
+ }, _ref2[symbol_observable_es["a" /* default */]] = observable, _ref2;
14546
+ }
14547
+
14548
+ /**
14549
+ * Prints a warning in the console if it exists.
14550
+ *
14551
+ * @param {String} message The warning message.
14552
+ * @returns {void}
14553
+ */
14554
+ function warning(message) {
14555
+ /* eslint-disable no-console */
14556
+ if (typeof console !== 'undefined' && typeof console.error === 'function') {
14557
+ console.error(message);
14558
  }
14559
+ /* eslint-enable no-console */
14560
 
 
 
 
 
14561
 
14562
+ try {
14563
+ // This error was thrown as a convenience so that if you enable
14564
+ // "break on all exceptions" in your console,
14565
+ // it would pause the execution at this line.
14566
+ throw new Error(message);
14567
+ } catch (e) {} // eslint-disable-line no-empty
14568
 
14569
+ }
14570
 
14571
+ function getUndefinedStateErrorMessage(key, action) {
14572
+ var actionType = action && action.type;
14573
+ var actionDescription = actionType && "action \"" + String(actionType) + "\"" || 'an action';
14574
+ return "Given " + actionDescription + ", reducer \"" + key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.";
14575
+ }
14576
 
14577
+ function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
14578
+ var reducerKeys = Object.keys(reducers);
14579
+ var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
14580
+
14581
+ if (reducerKeys.length === 0) {
14582
+ return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
14583
+ }
14584
+
14585
+ if (!isPlainObject(inputState)) {
14586
+ return "The " + argumentName + " has unexpected type of \"" + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
14587
+ }
14588
+
14589
+ var unexpectedKeys = Object.keys(inputState).filter(function (key) {
14590
+ return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
14591
  });
14592
+ unexpectedKeys.forEach(function (key) {
14593
+ unexpectedKeyCache[key] = true;
 
 
 
 
 
14594
  });
14595
+ if (action && action.type === ActionTypes.REPLACE) return;
14596
+
14597
+ if (unexpectedKeys.length > 0) {
14598
+ return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored.");
14599
+ }
14600
  }
14601
 
14602
+ function assertReducerShape(reducers) {
14603
+ Object.keys(reducers).forEach(function (key) {
14604
+ var reducer = reducers[key];
14605
+ var initialState = reducer(undefined, {
14606
+ type: ActionTypes.INIT
14607
+ });
14608
 
14609
+ if (typeof initialState === 'undefined') {
14610
+ throw new Error("Reducer \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined.");
14611
+ }
14612
 
14613
+ if (typeof reducer(undefined, {
14614
+ type: ActionTypes.PROBE_UNKNOWN_ACTION()
14615
+ }) === 'undefined') {
14616
+ throw new Error("Reducer \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle " + ActionTypes.INIT + " or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null.");
14617
  }
14618
+ });
14619
+ }
14620
+ /**
14621
+ * Turns an object whose values are different reducer functions, into a single
14622
+ * reducer function. It will call every child reducer, and gather their results
14623
+ * into a single state object, whose keys correspond to the keys of the passed
14624
+ * reducer functions.
14625
+ *
14626
+ * @param {Object} reducers An object whose values correspond to different
14627
+ * reducer functions that need to be combined into one. One handy way to obtain
14628
+ * it is to use ES6 `import * as reducers` syntax. The reducers may never return
14629
+ * undefined for any action. Instead, they should return their initial state
14630
+ * if the state passed to them was undefined, and the current state for any
14631
+ * unrecognized action.
14632
+ *
14633
+ * @returns {Function} A reducer function that invokes every reducer inside the
14634
+ * passed object, and builds a state object with the same shape.
14635
+ */
14636
 
 
14637
 
14638
+ function combineReducers(reducers) {
14639
+ var reducerKeys = Object.keys(reducers);
14640
+ var finalReducers = {};
14641
+
14642
+ for (var i = 0; i < reducerKeys.length; i++) {
14643
+ var key = reducerKeys[i];
14644
+
14645
+ if (false) {}
14646
+
14647
+ if (typeof reducers[key] === 'function') {
14648
+ finalReducers[key] = reducers[key];
14649
  }
14650
+ }
14651
 
14652
+ var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same
14653
+ // keys multiple times.
14654
+
14655
+ var unexpectedKeyCache;
14656
+
14657
+ if (false) {}
14658
+
14659
+ var shapeAssertionError;
14660
+
14661
+ try {
14662
+ assertReducerShape(finalReducers);
14663
+ } catch (e) {
14664
+ shapeAssertionError = e;
14665
  }
14666
 
14667
+ return function combination(state, action) {
14668
+ if (state === void 0) {
14669
+ state = {};
14670
+ }
14671
 
14672
+ if (shapeAssertionError) {
14673
+ throw shapeAssertionError;
14674
+ }
14675
+
14676
+ if (false) { var warningMessage; }
14677
+
14678
+ var hasChanged = false;
14679
+ var nextState = {};
14680
+
14681
+ for (var _i = 0; _i < finalReducerKeys.length; _i++) {
14682
+ var _key = finalReducerKeys[_i];
14683
+ var reducer = finalReducers[_key];
14684
+ var previousStateForKey = state[_key];
14685
+ var nextStateForKey = reducer(previousStateForKey, action);
14686
+
14687
+ if (typeof nextStateForKey === 'undefined') {
14688
+ var errorMessage = getUndefinedStateErrorMessage(_key, action);
14689
+ throw new Error(errorMessage);
14690
+ }
14691
+
14692
+ nextState[_key] = nextStateForKey;
14693
+ hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
14694
+ }
14695
+
14696
+ hasChanged = hasChanged || finalRed