willba-component-library 0.0.55 → 0.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.esm.js +64 -4585
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +64 -4585
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +64 -4585
- package/lib/index.umd.js.map +1 -1
- package/package.json +3 -2
- package/src/components/FilterBar/components/submit-button/SubmitButton.tsx +10 -3
package/lib/index.esm.js
CHANGED
|
@@ -380,4604 +380,81 @@ function SelectButton(_a) {
|
|
|
380
380
|
return (React__default__default.createElement("button", { className: "will-filter-bar-select-button", onClick: onClick, style: style }, label));
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
390
|
-
})), keys.push.apply(keys, symbols);
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
return keys;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
function _objectSpread2$1(target) {
|
|
397
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
398
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
399
|
-
i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {
|
|
400
|
-
_defineProperty$1(target, key, source[key]);
|
|
401
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) {
|
|
402
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
return target;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
function _typeof$2(obj) {
|
|
410
|
-
"@babel/helpers - typeof";
|
|
411
|
-
|
|
412
|
-
return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
413
|
-
return typeof obj;
|
|
414
|
-
} : function (obj) {
|
|
415
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
416
|
-
}, _typeof$2(obj);
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
function _classCallCheck(instance, Constructor) {
|
|
420
|
-
if (!(instance instanceof Constructor)) {
|
|
421
|
-
throw new TypeError("Cannot call a class as a function");
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
function _defineProperties(target, props) {
|
|
426
|
-
for (var i = 0; i < props.length; i++) {
|
|
427
|
-
var descriptor = props[i];
|
|
428
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
429
|
-
descriptor.configurable = true;
|
|
430
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
431
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
436
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
437
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
438
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
439
|
-
writable: false
|
|
440
|
-
});
|
|
441
|
-
return Constructor;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
function _defineProperty$1(obj, key, value) {
|
|
445
|
-
if (key in obj) {
|
|
446
|
-
Object.defineProperty(obj, key, {
|
|
447
|
-
value: value,
|
|
448
|
-
enumerable: true,
|
|
449
|
-
configurable: true,
|
|
450
|
-
writable: true
|
|
451
|
-
});
|
|
452
|
-
} else {
|
|
453
|
-
obj[key] = value;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
return obj;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
function _slicedToArray(arr, i) {
|
|
460
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest();
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
function _toConsumableArray$1(arr) {
|
|
464
|
-
return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread$1();
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
function _arrayWithoutHoles$1(arr) {
|
|
468
|
-
if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
function _arrayWithHoles(arr) {
|
|
472
|
-
if (Array.isArray(arr)) return arr;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
function _iterableToArray$1(iter) {
|
|
476
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
function _iterableToArrayLimit(arr, i) {
|
|
480
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
481
|
-
|
|
482
|
-
if (_i == null) return;
|
|
483
|
-
var _arr = [];
|
|
484
|
-
var _n = true;
|
|
485
|
-
var _d = false;
|
|
486
|
-
|
|
487
|
-
var _s, _e;
|
|
488
|
-
|
|
489
|
-
try {
|
|
490
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
491
|
-
_arr.push(_s.value);
|
|
492
|
-
|
|
493
|
-
if (i && _arr.length === i) break;
|
|
494
|
-
}
|
|
495
|
-
} catch (err) {
|
|
496
|
-
_d = true;
|
|
497
|
-
_e = err;
|
|
498
|
-
} finally {
|
|
499
|
-
try {
|
|
500
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
501
|
-
} finally {
|
|
502
|
-
if (_d) throw _e;
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
return _arr;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
function _unsupportedIterableToArray$1(o, minLen) {
|
|
510
|
-
if (!o) return;
|
|
511
|
-
if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
|
|
512
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
513
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
514
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
515
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
function _arrayLikeToArray$1(arr, len) {
|
|
519
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
520
|
-
|
|
521
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
522
|
-
|
|
523
|
-
return arr2;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
function _nonIterableSpread$1() {
|
|
527
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
function _nonIterableRest() {
|
|
531
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
var noop$1 = function noop() {};
|
|
535
|
-
|
|
536
|
-
var _WINDOW = {};
|
|
537
|
-
var _DOCUMENT = {};
|
|
538
|
-
var _MUTATION_OBSERVER = null;
|
|
539
|
-
var _PERFORMANCE = {
|
|
540
|
-
mark: noop$1,
|
|
541
|
-
measure: noop$1
|
|
542
|
-
};
|
|
543
|
-
|
|
544
|
-
try {
|
|
545
|
-
if (typeof window !== 'undefined') _WINDOW = window;
|
|
546
|
-
if (typeof document !== 'undefined') _DOCUMENT = document;
|
|
547
|
-
if (typeof MutationObserver !== 'undefined') _MUTATION_OBSERVER = MutationObserver;
|
|
548
|
-
if (typeof performance !== 'undefined') _PERFORMANCE = performance;
|
|
549
|
-
} catch (e) {}
|
|
550
|
-
|
|
551
|
-
var _ref = _WINDOW.navigator || {},
|
|
552
|
-
_ref$userAgent = _ref.userAgent,
|
|
553
|
-
userAgent = _ref$userAgent === void 0 ? '' : _ref$userAgent;
|
|
554
|
-
var WINDOW = _WINDOW;
|
|
555
|
-
var DOCUMENT = _DOCUMENT;
|
|
556
|
-
var MUTATION_OBSERVER = _MUTATION_OBSERVER;
|
|
557
|
-
var PERFORMANCE = _PERFORMANCE;
|
|
558
|
-
!!WINDOW.document;
|
|
559
|
-
var IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function';
|
|
560
|
-
var IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/');
|
|
561
|
-
|
|
562
|
-
var _familyProxy, _familyProxy2, _familyProxy3, _familyProxy4, _familyProxy5;
|
|
563
|
-
|
|
564
|
-
var NAMESPACE_IDENTIFIER = '___FONT_AWESOME___';
|
|
565
|
-
var UNITS_IN_GRID = 16;
|
|
566
|
-
var DEFAULT_CSS_PREFIX = 'fa';
|
|
567
|
-
var DEFAULT_REPLACEMENT_CLASS = 'svg-inline--fa';
|
|
568
|
-
var DATA_FA_I2SVG = 'data-fa-i2svg';
|
|
569
|
-
var DATA_FA_PSEUDO_ELEMENT = 'data-fa-pseudo-element';
|
|
570
|
-
var DATA_FA_PSEUDO_ELEMENT_PENDING = 'data-fa-pseudo-element-pending';
|
|
571
|
-
var DATA_PREFIX = 'data-prefix';
|
|
572
|
-
var DATA_ICON = 'data-icon';
|
|
573
|
-
var HTML_CLASS_I2SVG_BASE_CLASS = 'fontawesome-i2svg';
|
|
574
|
-
var MUTATION_APPROACH_ASYNC = 'async';
|
|
575
|
-
var TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS = ['HTML', 'HEAD', 'STYLE', 'SCRIPT'];
|
|
576
|
-
var PRODUCTION$1 = function () {
|
|
577
|
-
try {
|
|
578
|
-
return process.env.NODE_ENV === 'production';
|
|
579
|
-
} catch (e) {
|
|
580
|
-
return false;
|
|
581
|
-
}
|
|
582
|
-
}();
|
|
583
|
-
var FAMILY_CLASSIC = 'classic';
|
|
584
|
-
var FAMILY_SHARP = 'sharp';
|
|
585
|
-
var FAMILIES = [FAMILY_CLASSIC, FAMILY_SHARP];
|
|
586
|
-
|
|
587
|
-
function familyProxy(obj) {
|
|
588
|
-
// Defaults to the classic family if family is not available
|
|
589
|
-
return new Proxy(obj, {
|
|
590
|
-
get: function get(target, prop) {
|
|
591
|
-
return prop in target ? target[prop] : target[FAMILY_CLASSIC];
|
|
592
|
-
}
|
|
593
|
-
});
|
|
594
|
-
}
|
|
595
|
-
var PREFIX_TO_STYLE = familyProxy((_familyProxy = {}, _defineProperty$1(_familyProxy, FAMILY_CLASSIC, {
|
|
596
|
-
'fa': 'solid',
|
|
597
|
-
'fas': 'solid',
|
|
598
|
-
'fa-solid': 'solid',
|
|
599
|
-
'far': 'regular',
|
|
600
|
-
'fa-regular': 'regular',
|
|
601
|
-
'fal': 'light',
|
|
602
|
-
'fa-light': 'light',
|
|
603
|
-
'fat': 'thin',
|
|
604
|
-
'fa-thin': 'thin',
|
|
605
|
-
'fad': 'duotone',
|
|
606
|
-
'fa-duotone': 'duotone',
|
|
607
|
-
'fab': 'brands',
|
|
608
|
-
'fa-brands': 'brands',
|
|
609
|
-
'fak': 'kit',
|
|
610
|
-
'fa-kit': 'kit'
|
|
611
|
-
}), _defineProperty$1(_familyProxy, FAMILY_SHARP, {
|
|
612
|
-
'fa': 'solid',
|
|
613
|
-
'fass': 'solid',
|
|
614
|
-
'fa-solid': 'solid',
|
|
615
|
-
'fasr': 'regular',
|
|
616
|
-
'fa-regular': 'regular',
|
|
617
|
-
'fasl': 'light',
|
|
618
|
-
'fa-light': 'light'
|
|
619
|
-
}), _familyProxy));
|
|
620
|
-
var STYLE_TO_PREFIX = familyProxy((_familyProxy2 = {}, _defineProperty$1(_familyProxy2, FAMILY_CLASSIC, {
|
|
621
|
-
'solid': 'fas',
|
|
622
|
-
'regular': 'far',
|
|
623
|
-
'light': 'fal',
|
|
624
|
-
'thin': 'fat',
|
|
625
|
-
'duotone': 'fad',
|
|
626
|
-
'brands': 'fab',
|
|
627
|
-
'kit': 'fak'
|
|
628
|
-
}), _defineProperty$1(_familyProxy2, FAMILY_SHARP, {
|
|
629
|
-
'solid': 'fass',
|
|
630
|
-
'regular': 'fasr',
|
|
631
|
-
'light': 'fasl'
|
|
632
|
-
}), _familyProxy2));
|
|
633
|
-
var PREFIX_TO_LONG_STYLE = familyProxy((_familyProxy3 = {}, _defineProperty$1(_familyProxy3, FAMILY_CLASSIC, {
|
|
634
|
-
'fab': 'fa-brands',
|
|
635
|
-
'fad': 'fa-duotone',
|
|
636
|
-
'fak': 'fa-kit',
|
|
637
|
-
'fal': 'fa-light',
|
|
638
|
-
'far': 'fa-regular',
|
|
639
|
-
'fas': 'fa-solid',
|
|
640
|
-
'fat': 'fa-thin'
|
|
641
|
-
}), _defineProperty$1(_familyProxy3, FAMILY_SHARP, {
|
|
642
|
-
'fass': 'fa-solid',
|
|
643
|
-
'fasr': 'fa-regular',
|
|
644
|
-
'fasl': 'fa-light'
|
|
645
|
-
}), _familyProxy3));
|
|
646
|
-
var LONG_STYLE_TO_PREFIX = familyProxy((_familyProxy4 = {}, _defineProperty$1(_familyProxy4, FAMILY_CLASSIC, {
|
|
647
|
-
'fa-brands': 'fab',
|
|
648
|
-
'fa-duotone': 'fad',
|
|
649
|
-
'fa-kit': 'fak',
|
|
650
|
-
'fa-light': 'fal',
|
|
651
|
-
'fa-regular': 'far',
|
|
652
|
-
'fa-solid': 'fas',
|
|
653
|
-
'fa-thin': 'fat'
|
|
654
|
-
}), _defineProperty$1(_familyProxy4, FAMILY_SHARP, {
|
|
655
|
-
'fa-solid': 'fass',
|
|
656
|
-
'fa-regular': 'fasr',
|
|
657
|
-
'fa-light': 'fasl'
|
|
658
|
-
}), _familyProxy4));
|
|
659
|
-
var ICON_SELECTION_SYNTAX_PATTERN = /fa(s|r|l|t|d|b|k|ss|sr|sl)?[\-\ ]/; // eslint-disable-line no-useless-escape
|
|
660
|
-
|
|
661
|
-
var LAYERS_TEXT_CLASSNAME = 'fa-layers-text';
|
|
662
|
-
var FONT_FAMILY_PATTERN = /Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i;
|
|
663
|
-
var FONT_WEIGHT_TO_PREFIX = familyProxy((_familyProxy5 = {}, _defineProperty$1(_familyProxy5, FAMILY_CLASSIC, {
|
|
664
|
-
'900': 'fas',
|
|
665
|
-
'400': 'far',
|
|
666
|
-
'normal': 'far',
|
|
667
|
-
'300': 'fal',
|
|
668
|
-
'100': 'fat'
|
|
669
|
-
}), _defineProperty$1(_familyProxy5, FAMILY_SHARP, {
|
|
670
|
-
'900': 'fass',
|
|
671
|
-
'400': 'fasr',
|
|
672
|
-
'300': 'fasl'
|
|
673
|
-
}), _familyProxy5));
|
|
674
|
-
var oneToTen = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
675
|
-
var oneToTwenty = oneToTen.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]);
|
|
676
|
-
var ATTRIBUTES_WATCHED_FOR_MUTATION = ['class', 'data-prefix', 'data-icon', 'data-fa-transform', 'data-fa-mask'];
|
|
677
|
-
var DUOTONE_CLASSES = {
|
|
678
|
-
GROUP: 'duotone-group',
|
|
679
|
-
SWAP_OPACITY: 'swap-opacity',
|
|
680
|
-
PRIMARY: 'primary',
|
|
681
|
-
SECONDARY: 'secondary'
|
|
383
|
+
var DefaultContext = {
|
|
384
|
+
color: undefined,
|
|
385
|
+
size: undefined,
|
|
386
|
+
className: undefined,
|
|
387
|
+
style: undefined,
|
|
388
|
+
attr: undefined
|
|
682
389
|
};
|
|
683
|
-
var
|
|
684
|
-
Object.keys(STYLE_TO_PREFIX[FAMILY_CLASSIC]).map(prefixes.add.bind(prefixes));
|
|
685
|
-
Object.keys(STYLE_TO_PREFIX[FAMILY_SHARP]).map(prefixes.add.bind(prefixes));
|
|
686
|
-
var RESERVED_CLASSES = [].concat(FAMILIES, _toConsumableArray$1(prefixes), ['2xs', 'xs', 'sm', 'lg', 'xl', '2xl', 'beat', 'border', 'fade', 'beat-fade', 'bounce', 'flip-both', 'flip-horizontal', 'flip-vertical', 'flip', 'fw', 'inverse', 'layers-counter', 'layers-text', 'layers', 'li', 'pull-left', 'pull-right', 'pulse', 'rotate-180', 'rotate-270', 'rotate-90', 'rotate-by', 'shake', 'spin-pulse', 'spin-reverse', 'spin', 'stack-1x', 'stack-2x', 'stack', 'ul', DUOTONE_CLASSES.GROUP, DUOTONE_CLASSES.SWAP_OPACITY, DUOTONE_CLASSES.PRIMARY, DUOTONE_CLASSES.SECONDARY]).concat(oneToTen.map(function (n) {
|
|
687
|
-
return "".concat(n, "x");
|
|
688
|
-
})).concat(oneToTwenty.map(function (n) {
|
|
689
|
-
return "w-".concat(n);
|
|
690
|
-
}));
|
|
691
|
-
|
|
692
|
-
var initial = WINDOW.FontAwesomeConfig || {};
|
|
693
|
-
|
|
694
|
-
function getAttrConfig(attr) {
|
|
695
|
-
var element = DOCUMENT.querySelector('script[' + attr + ']');
|
|
696
|
-
|
|
697
|
-
if (element) {
|
|
698
|
-
return element.getAttribute(attr);
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
function coerce(val) {
|
|
703
|
-
// Getting an empty string will occur if the attribute is set on the HTML tag but without a value
|
|
704
|
-
// We'll assume that this is an indication that it should be toggled to true
|
|
705
|
-
if (val === '') return true;
|
|
706
|
-
if (val === 'false') return false;
|
|
707
|
-
if (val === 'true') return true;
|
|
708
|
-
return val;
|
|
709
|
-
}
|
|
390
|
+
var IconContext = React__default__default.createContext && React__default__default.createContext(DefaultContext);
|
|
710
391
|
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
key = _ref2[1];
|
|
717
|
-
|
|
718
|
-
var val = coerce(getAttrConfig(attr));
|
|
719
|
-
|
|
720
|
-
if (val !== undefined && val !== null) {
|
|
721
|
-
initial[key] = val;
|
|
722
|
-
}
|
|
723
|
-
});
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
var _default = {
|
|
727
|
-
styleDefault: 'solid',
|
|
728
|
-
familyDefault: 'classic',
|
|
729
|
-
cssPrefix: DEFAULT_CSS_PREFIX,
|
|
730
|
-
replacementClass: DEFAULT_REPLACEMENT_CLASS,
|
|
731
|
-
autoReplaceSvg: true,
|
|
732
|
-
autoAddCss: true,
|
|
733
|
-
autoA11y: true,
|
|
734
|
-
searchPseudoElements: false,
|
|
735
|
-
observeMutations: true,
|
|
736
|
-
mutateApproach: 'async',
|
|
737
|
-
keepOriginalSource: true,
|
|
738
|
-
measurePerformance: false,
|
|
739
|
-
showMissingIcons: true
|
|
740
|
-
}; // familyPrefix is deprecated but we must still support it if present
|
|
741
|
-
|
|
742
|
-
if (initial.familyPrefix) {
|
|
743
|
-
initial.cssPrefix = initial.familyPrefix;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
var _config = _objectSpread2$1(_objectSpread2$1({}, _default), initial);
|
|
747
|
-
|
|
748
|
-
if (!_config.autoReplaceSvg) _config.observeMutations = false;
|
|
749
|
-
var config = {};
|
|
750
|
-
Object.keys(_default).forEach(function (key) {
|
|
751
|
-
Object.defineProperty(config, key, {
|
|
752
|
-
enumerable: true,
|
|
753
|
-
set: function set(val) {
|
|
754
|
-
_config[key] = val;
|
|
755
|
-
|
|
756
|
-
_onChangeCb.forEach(function (cb) {
|
|
757
|
-
return cb(config);
|
|
758
|
-
});
|
|
759
|
-
},
|
|
760
|
-
get: function get() {
|
|
761
|
-
return _config[key];
|
|
392
|
+
var __assign$1 = undefined && undefined.__assign || function () {
|
|
393
|
+
__assign$1 = Object.assign || function (t) {
|
|
394
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
395
|
+
s = arguments[i];
|
|
396
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
762
397
|
}
|
|
763
|
-
|
|
764
|
-
}); // familyPrefix is deprecated as of 6.2.0 and should be removed in 7.0.0
|
|
765
|
-
|
|
766
|
-
Object.defineProperty(config, 'familyPrefix', {
|
|
767
|
-
enumerable: true,
|
|
768
|
-
set: function set(val) {
|
|
769
|
-
_config.cssPrefix = val;
|
|
770
|
-
|
|
771
|
-
_onChangeCb.forEach(function (cb) {
|
|
772
|
-
return cb(config);
|
|
773
|
-
});
|
|
774
|
-
},
|
|
775
|
-
get: function get() {
|
|
776
|
-
return _config.cssPrefix;
|
|
777
|
-
}
|
|
778
|
-
});
|
|
779
|
-
WINDOW.FontAwesomeConfig = config;
|
|
780
|
-
var _onChangeCb = [];
|
|
781
|
-
function onChange(cb) {
|
|
782
|
-
_onChangeCb.push(cb);
|
|
783
|
-
|
|
784
|
-
return function () {
|
|
785
|
-
_onChangeCb.splice(_onChangeCb.indexOf(cb), 1);
|
|
398
|
+
return t;
|
|
786
399
|
};
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
var d = UNITS_IN_GRID;
|
|
790
|
-
var meaninglessTransform = {
|
|
791
|
-
size: 16,
|
|
792
|
-
x: 0,
|
|
793
|
-
y: 0,
|
|
794
|
-
rotate: 0,
|
|
795
|
-
flipX: false,
|
|
796
|
-
flipY: false
|
|
400
|
+
return __assign$1.apply(this, arguments);
|
|
797
401
|
};
|
|
798
|
-
function
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
var style = DOCUMENT.createElement('style');
|
|
804
|
-
style.setAttribute('type', 'text/css');
|
|
805
|
-
style.innerHTML = css;
|
|
806
|
-
var headChildren = DOCUMENT.head.childNodes;
|
|
807
|
-
var beforeChild = null;
|
|
808
|
-
|
|
809
|
-
for (var i = headChildren.length - 1; i > -1; i--) {
|
|
810
|
-
var child = headChildren[i];
|
|
811
|
-
var tagName = (child.tagName || '').toUpperCase();
|
|
812
|
-
|
|
813
|
-
if (['STYLE', 'LINK'].indexOf(tagName) > -1) {
|
|
814
|
-
beforeChild = child;
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
DOCUMENT.head.insertBefore(style, beforeChild);
|
|
819
|
-
return css;
|
|
820
|
-
}
|
|
821
|
-
var idPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
822
|
-
function nextUniqueId() {
|
|
823
|
-
var size = 12;
|
|
824
|
-
var id = '';
|
|
825
|
-
|
|
826
|
-
while (size-- > 0) {
|
|
827
|
-
id += idPool[Math.random() * 62 | 0];
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
return id;
|
|
831
|
-
}
|
|
832
|
-
function toArray(obj) {
|
|
833
|
-
var array = [];
|
|
834
|
-
|
|
835
|
-
for (var i = (obj || []).length >>> 0; i--;) {
|
|
836
|
-
array[i] = obj[i];
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
return array;
|
|
840
|
-
}
|
|
841
|
-
function classArray(node) {
|
|
842
|
-
if (node.classList) {
|
|
843
|
-
return toArray(node.classList);
|
|
844
|
-
} else {
|
|
845
|
-
return (node.getAttribute('class') || '').split(' ').filter(function (i) {
|
|
846
|
-
return i;
|
|
847
|
-
});
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
function htmlEscape(str) {
|
|
851
|
-
return "".concat(str).replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(/</g, '<').replace(/>/g, '>');
|
|
852
|
-
}
|
|
853
|
-
function joinAttributes(attributes) {
|
|
854
|
-
return Object.keys(attributes || {}).reduce(function (acc, attributeName) {
|
|
855
|
-
return acc + "".concat(attributeName, "=\"").concat(htmlEscape(attributes[attributeName]), "\" ");
|
|
856
|
-
}, '').trim();
|
|
857
|
-
}
|
|
858
|
-
function joinStyles(styles) {
|
|
859
|
-
return Object.keys(styles || {}).reduce(function (acc, styleName) {
|
|
860
|
-
return acc + "".concat(styleName, ": ").concat(styles[styleName].trim(), ";");
|
|
861
|
-
}, '');
|
|
862
|
-
}
|
|
863
|
-
function transformIsMeaningful(transform) {
|
|
864
|
-
return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;
|
|
865
|
-
}
|
|
866
|
-
function transformForSvg(_ref) {
|
|
867
|
-
var transform = _ref.transform,
|
|
868
|
-
containerWidth = _ref.containerWidth,
|
|
869
|
-
iconWidth = _ref.iconWidth;
|
|
870
|
-
var outer = {
|
|
871
|
-
transform: "translate(".concat(containerWidth / 2, " 256)")
|
|
872
|
-
};
|
|
873
|
-
var innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
|
|
874
|
-
var innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
|
|
875
|
-
var innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
|
|
876
|
-
var inner = {
|
|
877
|
-
transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
|
|
878
|
-
};
|
|
879
|
-
var path = {
|
|
880
|
-
transform: "translate(".concat(iconWidth / 2 * -1, " -256)")
|
|
881
|
-
};
|
|
882
|
-
return {
|
|
883
|
-
outer: outer,
|
|
884
|
-
inner: inner,
|
|
885
|
-
path: path
|
|
886
|
-
};
|
|
887
|
-
}
|
|
888
|
-
function transformForCss(_ref2) {
|
|
889
|
-
var transform = _ref2.transform,
|
|
890
|
-
_ref2$width = _ref2.width,
|
|
891
|
-
width = _ref2$width === void 0 ? UNITS_IN_GRID : _ref2$width,
|
|
892
|
-
_ref2$height = _ref2.height,
|
|
893
|
-
height = _ref2$height === void 0 ? UNITS_IN_GRID : _ref2$height,
|
|
894
|
-
_ref2$startCentered = _ref2.startCentered,
|
|
895
|
-
startCentered = _ref2$startCentered === void 0 ? false : _ref2$startCentered;
|
|
896
|
-
var val = '';
|
|
897
|
-
|
|
898
|
-
if (startCentered && IS_IE) {
|
|
899
|
-
val += "translate(".concat(transform.x / d - width / 2, "em, ").concat(transform.y / d - height / 2, "em) ");
|
|
900
|
-
} else if (startCentered) {
|
|
901
|
-
val += "translate(calc(-50% + ".concat(transform.x / d, "em), calc(-50% + ").concat(transform.y / d, "em)) ");
|
|
902
|
-
} else {
|
|
903
|
-
val += "translate(".concat(transform.x / d, "em, ").concat(transform.y / d, "em) ");
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
val += "scale(".concat(transform.size / d * (transform.flipX ? -1 : 1), ", ").concat(transform.size / d * (transform.flipY ? -1 : 1), ") ");
|
|
907
|
-
val += "rotate(".concat(transform.rotate, "deg) ");
|
|
908
|
-
return val;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
var baseStyles = ":root, :host {\n --fa-font-solid: normal 900 1em/1 \"Font Awesome 6 Solid\";\n --fa-font-regular: normal 400 1em/1 \"Font Awesome 6 Regular\";\n --fa-font-light: normal 300 1em/1 \"Font Awesome 6 Light\";\n --fa-font-thin: normal 100 1em/1 \"Font Awesome 6 Thin\";\n --fa-font-duotone: normal 900 1em/1 \"Font Awesome 6 Duotone\";\n --fa-font-sharp-solid: normal 900 1em/1 \"Font Awesome 6 Sharp\";\n --fa-font-sharp-regular: normal 400 1em/1 \"Font Awesome 6 Sharp\";\n --fa-font-sharp-light: normal 300 1em/1 \"Font Awesome 6 Sharp\";\n --fa-font-brands: normal 400 1em/1 \"Font Awesome 6 Brands\";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-counter-scale, 0.25));\n transform: scale(var(--fa-counter-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(var(--fa-li-width, 2em) * -1);\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n -webkit-animation-name: fa-beat;\n animation-name: fa-beat;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n -webkit-animation-name: fa-bounce;\n animation-name: fa-bounce;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n -webkit-animation-name: fa-fade;\n animation-name: fa-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n -webkit-animation-name: fa-beat-fade;\n animation-name: fa-beat-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n -webkit-animation-name: fa-flip;\n animation-name: fa-flip;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n -webkit-animation-name: fa-shake;\n animation-name: fa-shake;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 2s);\n animation-duration: var(--fa-animation-duration, 2s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n -webkit-animation-delay: -1ms;\n animation-delay: -1ms;\n -webkit-animation-duration: 1ms;\n animation-duration: 1ms;\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n@-webkit-keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@-webkit-keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@-webkit-keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@-webkit-keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@-webkit-keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@-webkit-keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n -webkit-transform: rotate(var(--fa-rotate-angle, none));\n transform: rotate(var(--fa-rotate-angle, none));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse,\n.fa-duotone.fa-inverse {\n color: var(--fa-inverse, #fff);\n}";
|
|
912
|
-
|
|
913
|
-
function css() {
|
|
914
|
-
var dcp = DEFAULT_CSS_PREFIX;
|
|
915
|
-
var drc = DEFAULT_REPLACEMENT_CLASS;
|
|
916
|
-
var fp = config.cssPrefix;
|
|
917
|
-
var rc = config.replacementClass;
|
|
918
|
-
var s = baseStyles;
|
|
919
|
-
|
|
920
|
-
if (fp !== dcp || rc !== drc) {
|
|
921
|
-
var dPatt = new RegExp("\\.".concat(dcp, "\\-"), 'g');
|
|
922
|
-
var customPropPatt = new RegExp("\\--".concat(dcp, "\\-"), 'g');
|
|
923
|
-
var rPatt = new RegExp("\\.".concat(drc), 'g');
|
|
924
|
-
s = s.replace(dPatt, ".".concat(fp, "-")).replace(customPropPatt, "--".concat(fp, "-")).replace(rPatt, ".".concat(rc));
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
return s;
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
var _cssInserted = false;
|
|
931
|
-
|
|
932
|
-
function ensureCss() {
|
|
933
|
-
if (config.autoAddCss && !_cssInserted) {
|
|
934
|
-
insertCss(css());
|
|
935
|
-
_cssInserted = true;
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
var InjectCSS = {
|
|
940
|
-
mixout: function mixout() {
|
|
941
|
-
return {
|
|
942
|
-
dom: {
|
|
943
|
-
css: css,
|
|
944
|
-
insertCss: ensureCss
|
|
945
|
-
}
|
|
946
|
-
};
|
|
947
|
-
},
|
|
948
|
-
hooks: function hooks() {
|
|
949
|
-
return {
|
|
950
|
-
beforeDOMElementCreation: function beforeDOMElementCreation() {
|
|
951
|
-
ensureCss();
|
|
952
|
-
},
|
|
953
|
-
beforeI2svg: function beforeI2svg() {
|
|
954
|
-
ensureCss();
|
|
955
|
-
}
|
|
956
|
-
};
|
|
402
|
+
var __rest$1 = undefined && undefined.__rest || function (s, e) {
|
|
403
|
+
var t = {};
|
|
404
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
405
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
406
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
957
407
|
}
|
|
408
|
+
return t;
|
|
958
409
|
};
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];
|
|
965
|
-
var namespace = w[NAMESPACE_IDENTIFIER];
|
|
966
|
-
|
|
967
|
-
var functions = [];
|
|
968
|
-
|
|
969
|
-
var listener = function listener() {
|
|
970
|
-
DOCUMENT.removeEventListener('DOMContentLoaded', listener);
|
|
971
|
-
loaded = 1;
|
|
972
|
-
functions.map(function (fn) {
|
|
973
|
-
return fn();
|
|
410
|
+
function Tree2Element(tree) {
|
|
411
|
+
return tree && tree.map(function (node, i) {
|
|
412
|
+
return React__default__default.createElement(node.tag, __assign$1({
|
|
413
|
+
key: i
|
|
414
|
+
}, node.attr), Tree2Element(node.child));
|
|
974
415
|
});
|
|
975
|
-
};
|
|
976
|
-
|
|
977
|
-
var loaded = false;
|
|
978
|
-
|
|
979
|
-
if (IS_DOM) {
|
|
980
|
-
loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);
|
|
981
|
-
if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener);
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
function domready (fn) {
|
|
985
|
-
if (!IS_DOM) return;
|
|
986
|
-
loaded ? setTimeout(fn, 0) : functions.push(fn);
|
|
987
416
|
}
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
children = _abstractNodes$childr === void 0 ? [] : _abstractNodes$childr;
|
|
995
|
-
|
|
996
|
-
if (typeof abstractNodes === 'string') {
|
|
997
|
-
return htmlEscape(abstractNodes);
|
|
998
|
-
} else {
|
|
999
|
-
return "<".concat(tag, " ").concat(joinAttributes(attributes), ">").concat(children.map(toHtml).join(''), "</").concat(tag, ">");
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
function iconFromMapping(mapping, prefix, iconName) {
|
|
1004
|
-
if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
|
|
1005
|
-
return {
|
|
1006
|
-
prefix: prefix,
|
|
1007
|
-
iconName: iconName,
|
|
1008
|
-
icon: mapping[prefix][iconName]
|
|
1009
|
-
};
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
/**
|
|
1014
|
-
* Internal helper to bind a function known to have 4 arguments
|
|
1015
|
-
* to a given context.
|
|
1016
|
-
*/
|
|
1017
|
-
|
|
1018
|
-
var bindInternal4 = function bindInternal4(func, thisContext) {
|
|
1019
|
-
return function (a, b, c, d) {
|
|
1020
|
-
return func.call(thisContext, a, b, c, d);
|
|
417
|
+
function GenIcon(data) {
|
|
418
|
+
// eslint-disable-next-line react/display-name
|
|
419
|
+
return function (props) {
|
|
420
|
+
return React__default__default.createElement(IconBase, __assign$1({
|
|
421
|
+
attr: __assign$1({}, data.attr)
|
|
422
|
+
}, props), Tree2Element(data.child));
|
|
1021
423
|
};
|
|
1022
|
-
};
|
|
1023
|
-
|
|
1024
|
-
/**
|
|
1025
|
-
* # Reduce
|
|
1026
|
-
*
|
|
1027
|
-
* A fast object `.reduce()` implementation.
|
|
1028
|
-
*
|
|
1029
|
-
* @param {Object} subject The object to reduce over.
|
|
1030
|
-
* @param {Function} fn The reducer function.
|
|
1031
|
-
* @param {mixed} initialValue The initial value for the reducer, defaults to subject[0].
|
|
1032
|
-
* @param {Object} thisContext The context for the reducer.
|
|
1033
|
-
* @return {mixed} The final result.
|
|
1034
|
-
*/
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
var reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {
|
|
1038
|
-
var keys = Object.keys(subject),
|
|
1039
|
-
length = keys.length,
|
|
1040
|
-
iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,
|
|
1041
|
-
i,
|
|
1042
|
-
key,
|
|
1043
|
-
result;
|
|
1044
|
-
|
|
1045
|
-
if (initialValue === undefined) {
|
|
1046
|
-
i = 1;
|
|
1047
|
-
result = subject[keys[0]];
|
|
1048
|
-
} else {
|
|
1049
|
-
i = 0;
|
|
1050
|
-
result = initialValue;
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
for (; i < length; i++) {
|
|
1054
|
-
key = keys[i];
|
|
1055
|
-
result = iterator(result, subject[key], key, subject);
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
return result;
|
|
1059
|
-
};
|
|
1060
|
-
|
|
1061
|
-
/**
|
|
1062
|
-
* ucs2decode() and codePointAt() are both works of Mathias Bynens and licensed under MIT
|
|
1063
|
-
*
|
|
1064
|
-
* Copyright Mathias Bynens <https://mathiasbynens.be/>
|
|
1065
|
-
|
|
1066
|
-
* Permission is hereby granted, free of charge, to any person obtaining
|
|
1067
|
-
* a copy of this software and associated documentation files (the
|
|
1068
|
-
* "Software"), to deal in the Software without restriction, including
|
|
1069
|
-
* without limitation the rights to use, copy, modify, merge, publish,
|
|
1070
|
-
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
1071
|
-
* permit persons to whom the Software is furnished to do so, subject to
|
|
1072
|
-
* the following conditions:
|
|
1073
|
-
|
|
1074
|
-
* The above copyright notice and this permission notice shall be
|
|
1075
|
-
* included in all copies or substantial portions of the Software.
|
|
1076
|
-
|
|
1077
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
1078
|
-
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
1079
|
-
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
1080
|
-
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
1081
|
-
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
1082
|
-
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
1083
|
-
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1084
|
-
*/
|
|
1085
|
-
function ucs2decode(string) {
|
|
1086
|
-
var output = [];
|
|
1087
|
-
var counter = 0;
|
|
1088
|
-
var length = string.length;
|
|
1089
|
-
|
|
1090
|
-
while (counter < length) {
|
|
1091
|
-
var value = string.charCodeAt(counter++);
|
|
1092
|
-
|
|
1093
|
-
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
|
1094
|
-
var extra = string.charCodeAt(counter++);
|
|
1095
|
-
|
|
1096
|
-
if ((extra & 0xFC00) == 0xDC00) {
|
|
1097
|
-
// eslint-disable-line eqeqeq
|
|
1098
|
-
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
|
1099
|
-
} else {
|
|
1100
|
-
output.push(value);
|
|
1101
|
-
counter--;
|
|
1102
|
-
}
|
|
1103
|
-
} else {
|
|
1104
|
-
output.push(value);
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
return output;
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
function toHex(unicode) {
|
|
1112
|
-
var decoded = ucs2decode(unicode);
|
|
1113
|
-
return decoded.length === 1 ? decoded[0].toString(16) : null;
|
|
1114
|
-
}
|
|
1115
|
-
function codePointAt(string, index) {
|
|
1116
|
-
var size = string.length;
|
|
1117
|
-
var first = string.charCodeAt(index);
|
|
1118
|
-
var second;
|
|
1119
|
-
|
|
1120
|
-
if (first >= 0xD800 && first <= 0xDBFF && size > index + 1) {
|
|
1121
|
-
second = string.charCodeAt(index + 1);
|
|
1122
|
-
|
|
1123
|
-
if (second >= 0xDC00 && second <= 0xDFFF) {
|
|
1124
|
-
return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
return first;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
function normalizeIcons(icons) {
|
|
1132
|
-
return Object.keys(icons).reduce(function (acc, iconName) {
|
|
1133
|
-
var icon = icons[iconName];
|
|
1134
|
-
var expanded = !!icon.icon;
|
|
1135
|
-
|
|
1136
|
-
if (expanded) {
|
|
1137
|
-
acc[icon.iconName] = icon.icon;
|
|
1138
|
-
} else {
|
|
1139
|
-
acc[iconName] = icon;
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
return acc;
|
|
1143
|
-
}, {});
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
function defineIcons(prefix, icons) {
|
|
1147
|
-
var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1148
|
-
var _params$skipHooks = params.skipHooks,
|
|
1149
|
-
skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks;
|
|
1150
|
-
var normalized = normalizeIcons(icons);
|
|
1151
|
-
|
|
1152
|
-
if (typeof namespace.hooks.addPack === 'function' && !skipHooks) {
|
|
1153
|
-
namespace.hooks.addPack(prefix, normalizeIcons(icons));
|
|
1154
|
-
} else {
|
|
1155
|
-
namespace.styles[prefix] = _objectSpread2$1(_objectSpread2$1({}, namespace.styles[prefix] || {}), normalized);
|
|
1156
|
-
}
|
|
1157
|
-
/**
|
|
1158
|
-
* Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
|
|
1159
|
-
* of new styles we needed to differentiate between them. Prefix `fa` is now an alias
|
|
1160
|
-
* for `fas` so we'll ease the upgrade process for our users by automatically defining
|
|
1161
|
-
* this as well.
|
|
1162
|
-
*/
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
if (prefix === 'fas') {
|
|
1166
|
-
defineIcons('fa', icons);
|
|
1167
|
-
}
|
|
1168
424
|
}
|
|
1169
|
-
|
|
1170
|
-
var
|
|
1171
|
-
var
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
var
|
|
1176
|
-
var
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
425
|
+
function IconBase(props) {
|
|
426
|
+
var elem = function (conf) {
|
|
427
|
+
var attr = props.attr,
|
|
428
|
+
size = props.size,
|
|
429
|
+
title = props.title,
|
|
430
|
+
svgProps = __rest$1(props, ["attr", "size", "title"]);
|
|
431
|
+
var computedSize = size || conf.size || "1em";
|
|
432
|
+
var className;
|
|
433
|
+
if (conf.className) className = conf.className;
|
|
434
|
+
if (props.className) className = (className ? className + " " : "") + props.className;
|
|
435
|
+
return React__default__default.createElement("svg", __assign$1({
|
|
436
|
+
stroke: "currentColor",
|
|
437
|
+
fill: "currentColor",
|
|
438
|
+
strokeWidth: "0"
|
|
439
|
+
}, conf.attr, attr, svgProps, {
|
|
440
|
+
className: className,
|
|
441
|
+
style: __assign$1(__assign$1({
|
|
442
|
+
color: props.color || conf.color
|
|
443
|
+
}, conf.style), props.style),
|
|
444
|
+
height: computedSize,
|
|
445
|
+
width: computedSize,
|
|
446
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
447
|
+
}), title && React__default__default.createElement("title", null, title), props.children);
|
|
448
|
+
};
|
|
449
|
+
return IconContext !== undefined ? React__default__default.createElement(IconContext.Consumer, null, function (conf) {
|
|
450
|
+
return elem(conf);
|
|
451
|
+
}) : elem(DefaultContext);
|
|
1184
452
|
}
|
|
1185
453
|
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
var iconName = parts.slice(1).join('-');
|
|
1190
|
-
|
|
1191
|
-
if (prefix === cssPrefix && iconName !== '' && !isReserved(iconName)) {
|
|
1192
|
-
return iconName;
|
|
1193
|
-
} else {
|
|
1194
|
-
return null;
|
|
1195
|
-
}
|
|
454
|
+
// THIS FILE IS AUTO GENERATED
|
|
455
|
+
function FaFolder (props) {
|
|
456
|
+
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z"}}]})(props);
|
|
1196
457
|
}
|
|
1197
|
-
var build = function build() {
|
|
1198
|
-
var lookup = function lookup(reducer) {
|
|
1199
|
-
return reduce(styles, function (o, style, prefix) {
|
|
1200
|
-
o[prefix] = reduce(style, reducer, {});
|
|
1201
|
-
return o;
|
|
1202
|
-
}, {});
|
|
1203
|
-
};
|
|
1204
|
-
|
|
1205
|
-
_byUnicode = lookup(function (acc, icon, iconName) {
|
|
1206
|
-
if (icon[3]) {
|
|
1207
|
-
acc[icon[3]] = iconName;
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
if (icon[2]) {
|
|
1211
|
-
var aliases = icon[2].filter(function (a) {
|
|
1212
|
-
return typeof a === 'number';
|
|
1213
|
-
});
|
|
1214
|
-
aliases.forEach(function (alias) {
|
|
1215
|
-
acc[alias.toString(16)] = iconName;
|
|
1216
|
-
});
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
return acc;
|
|
1220
|
-
});
|
|
1221
|
-
_byLigature = lookup(function (acc, icon, iconName) {
|
|
1222
|
-
acc[iconName] = iconName;
|
|
1223
|
-
|
|
1224
|
-
if (icon[2]) {
|
|
1225
|
-
var aliases = icon[2].filter(function (a) {
|
|
1226
|
-
return typeof a === 'string';
|
|
1227
|
-
});
|
|
1228
|
-
aliases.forEach(function (alias) {
|
|
1229
|
-
acc[alias] = iconName;
|
|
1230
|
-
});
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
return acc;
|
|
1234
|
-
});
|
|
1235
|
-
_byAlias = lookup(function (acc, icon, iconName) {
|
|
1236
|
-
var aliases = icon[2];
|
|
1237
|
-
acc[iconName] = iconName;
|
|
1238
|
-
aliases.forEach(function (alias) {
|
|
1239
|
-
acc[alias] = iconName;
|
|
1240
|
-
});
|
|
1241
|
-
return acc;
|
|
1242
|
-
}); // If we have a Kit, we can't determine if regular is available since we
|
|
1243
|
-
// could be auto-fetching it. We'll have to assume that it is available.
|
|
1244
|
-
|
|
1245
|
-
var hasRegular = 'far' in styles || config.autoFetchSvg;
|
|
1246
|
-
var shimLookups = reduce(shims, function (acc, shim) {
|
|
1247
|
-
var maybeNameMaybeUnicode = shim[0];
|
|
1248
|
-
var prefix = shim[1];
|
|
1249
|
-
var iconName = shim[2];
|
|
1250
|
-
|
|
1251
|
-
if (prefix === 'far' && !hasRegular) {
|
|
1252
|
-
prefix = 'fas';
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
if (typeof maybeNameMaybeUnicode === 'string') {
|
|
1256
|
-
acc.names[maybeNameMaybeUnicode] = {
|
|
1257
|
-
prefix: prefix,
|
|
1258
|
-
iconName: iconName
|
|
1259
|
-
};
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
if (typeof maybeNameMaybeUnicode === 'number') {
|
|
1263
|
-
acc.unicodes[maybeNameMaybeUnicode.toString(16)] = {
|
|
1264
|
-
prefix: prefix,
|
|
1265
|
-
iconName: iconName
|
|
1266
|
-
};
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
return acc;
|
|
1270
|
-
}, {
|
|
1271
|
-
names: {},
|
|
1272
|
-
unicodes: {}
|
|
1273
|
-
});
|
|
1274
|
-
_byOldName = shimLookups.names;
|
|
1275
|
-
_byOldUnicode = shimLookups.unicodes;
|
|
1276
|
-
_defaultUsablePrefix = getCanonicalPrefix(config.styleDefault, {
|
|
1277
|
-
family: config.familyDefault
|
|
1278
|
-
});
|
|
1279
|
-
};
|
|
1280
|
-
onChange(function (c) {
|
|
1281
|
-
_defaultUsablePrefix = getCanonicalPrefix(c.styleDefault, {
|
|
1282
|
-
family: config.familyDefault
|
|
1283
|
-
});
|
|
1284
|
-
});
|
|
1285
|
-
build();
|
|
1286
|
-
function byUnicode(prefix, unicode) {
|
|
1287
|
-
return (_byUnicode[prefix] || {})[unicode];
|
|
1288
|
-
}
|
|
1289
|
-
function byLigature(prefix, ligature) {
|
|
1290
|
-
return (_byLigature[prefix] || {})[ligature];
|
|
1291
|
-
}
|
|
1292
|
-
function byAlias(prefix, alias) {
|
|
1293
|
-
return (_byAlias[prefix] || {})[alias];
|
|
1294
|
-
}
|
|
1295
|
-
function byOldName(name) {
|
|
1296
|
-
return _byOldName[name] || {
|
|
1297
|
-
prefix: null,
|
|
1298
|
-
iconName: null
|
|
1299
|
-
};
|
|
1300
|
-
}
|
|
1301
|
-
function byOldUnicode(unicode) {
|
|
1302
|
-
var oldUnicode = _byOldUnicode[unicode];
|
|
1303
|
-
var newUnicode = byUnicode('fas', unicode);
|
|
1304
|
-
return oldUnicode || (newUnicode ? {
|
|
1305
|
-
prefix: 'fas',
|
|
1306
|
-
iconName: newUnicode
|
|
1307
|
-
} : null) || {
|
|
1308
|
-
prefix: null,
|
|
1309
|
-
iconName: null
|
|
1310
|
-
};
|
|
1311
|
-
}
|
|
1312
|
-
function getDefaultUsablePrefix() {
|
|
1313
|
-
return _defaultUsablePrefix;
|
|
1314
|
-
}
|
|
1315
|
-
var emptyCanonicalIcon = function emptyCanonicalIcon() {
|
|
1316
|
-
return {
|
|
1317
|
-
prefix: null,
|
|
1318
|
-
iconName: null,
|
|
1319
|
-
rest: []
|
|
1320
|
-
};
|
|
1321
|
-
};
|
|
1322
|
-
function getCanonicalPrefix(styleOrPrefix) {
|
|
1323
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1324
|
-
var _params$family = params.family,
|
|
1325
|
-
family = _params$family === void 0 ? FAMILY_CLASSIC : _params$family;
|
|
1326
|
-
var style = PREFIX_TO_STYLE[family][styleOrPrefix];
|
|
1327
|
-
var prefix = STYLE_TO_PREFIX[family][styleOrPrefix] || STYLE_TO_PREFIX[family][style];
|
|
1328
|
-
var defined = styleOrPrefix in namespace.styles ? styleOrPrefix : null;
|
|
1329
|
-
return prefix || defined || null;
|
|
1330
|
-
}
|
|
1331
|
-
var PREFIXES_FOR_FAMILY = (_PREFIXES_FOR_FAMILY = {}, _defineProperty$1(_PREFIXES_FOR_FAMILY, FAMILY_CLASSIC, Object.keys(PREFIX_TO_LONG_STYLE[FAMILY_CLASSIC])), _defineProperty$1(_PREFIXES_FOR_FAMILY, FAMILY_SHARP, Object.keys(PREFIX_TO_LONG_STYLE[FAMILY_SHARP])), _PREFIXES_FOR_FAMILY);
|
|
1332
|
-
function getCanonicalIcon(values) {
|
|
1333
|
-
var _famProps;
|
|
1334
|
-
|
|
1335
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1336
|
-
var _params$skipLookups = params.skipLookups,
|
|
1337
|
-
skipLookups = _params$skipLookups === void 0 ? false : _params$skipLookups;
|
|
1338
|
-
var famProps = (_famProps = {}, _defineProperty$1(_famProps, FAMILY_CLASSIC, "".concat(config.cssPrefix, "-").concat(FAMILY_CLASSIC)), _defineProperty$1(_famProps, FAMILY_SHARP, "".concat(config.cssPrefix, "-").concat(FAMILY_SHARP)), _famProps);
|
|
1339
|
-
var givenPrefix = null;
|
|
1340
|
-
var family = FAMILY_CLASSIC;
|
|
1341
|
-
|
|
1342
|
-
if (values.includes(famProps[FAMILY_CLASSIC]) || values.some(function (v) {
|
|
1343
|
-
return PREFIXES_FOR_FAMILY[FAMILY_CLASSIC].includes(v);
|
|
1344
|
-
})) {
|
|
1345
|
-
family = FAMILY_CLASSIC;
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
if (values.includes(famProps[FAMILY_SHARP]) || values.some(function (v) {
|
|
1349
|
-
return PREFIXES_FOR_FAMILY[FAMILY_SHARP].includes(v);
|
|
1350
|
-
})) {
|
|
1351
|
-
family = FAMILY_SHARP;
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
var canonical = values.reduce(function (acc, cls) {
|
|
1355
|
-
var iconName = getIconName(config.cssPrefix, cls);
|
|
1356
|
-
|
|
1357
|
-
if (styles[cls]) {
|
|
1358
|
-
cls = LONG_STYLE[family].includes(cls) ? LONG_STYLE_TO_PREFIX[family][cls] : cls;
|
|
1359
|
-
givenPrefix = cls;
|
|
1360
|
-
acc.prefix = cls;
|
|
1361
|
-
} else if (PREFIXES[family].indexOf(cls) > -1) {
|
|
1362
|
-
givenPrefix = cls;
|
|
1363
|
-
acc.prefix = getCanonicalPrefix(cls, {
|
|
1364
|
-
family: family
|
|
1365
|
-
});
|
|
1366
|
-
} else if (iconName) {
|
|
1367
|
-
acc.iconName = iconName;
|
|
1368
|
-
} else if (cls !== config.replacementClass && cls !== famProps[FAMILY_CLASSIC] && cls !== famProps[FAMILY_SHARP]) {
|
|
1369
|
-
acc.rest.push(cls);
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
if (!skipLookups && acc.prefix && acc.iconName) {
|
|
1373
|
-
var shim = givenPrefix === 'fa' ? byOldName(acc.iconName) : {};
|
|
1374
|
-
var aliasIconName = byAlias(acc.prefix, acc.iconName);
|
|
1375
|
-
|
|
1376
|
-
if (shim.prefix) {
|
|
1377
|
-
givenPrefix = null;
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
acc.iconName = shim.iconName || aliasIconName || acc.iconName;
|
|
1381
|
-
acc.prefix = shim.prefix || acc.prefix;
|
|
1382
|
-
|
|
1383
|
-
if (acc.prefix === 'far' && !styles['far'] && styles['fas'] && !config.autoFetchSvg) {
|
|
1384
|
-
// Allow a fallback from the regular style to solid if regular is not available
|
|
1385
|
-
// but only if we aren't auto-fetching SVGs
|
|
1386
|
-
acc.prefix = 'fas';
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
return acc;
|
|
1391
|
-
}, emptyCanonicalIcon());
|
|
1392
|
-
|
|
1393
|
-
if (values.includes('fa-brands') || values.includes('fab')) {
|
|
1394
|
-
canonical.prefix = 'fab';
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
if (values.includes('fa-duotone') || values.includes('fad')) {
|
|
1398
|
-
canonical.prefix = 'fad';
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
if (!canonical.prefix && family === FAMILY_SHARP && (styles['fass'] || config.autoFetchSvg)) {
|
|
1402
|
-
canonical.prefix = 'fass';
|
|
1403
|
-
canonical.iconName = byAlias(canonical.prefix, canonical.iconName) || canonical.iconName;
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
if (canonical.prefix === 'fa' || givenPrefix === 'fa') {
|
|
1407
|
-
// The fa prefix is not canonical. So if it has made it through until this point
|
|
1408
|
-
// we will shift it to the correct prefix.
|
|
1409
|
-
canonical.prefix = getDefaultUsablePrefix() || 'fas';
|
|
1410
|
-
}
|
|
1411
|
-
|
|
1412
|
-
return canonical;
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
var Library = /*#__PURE__*/function () {
|
|
1416
|
-
function Library() {
|
|
1417
|
-
_classCallCheck(this, Library);
|
|
1418
|
-
|
|
1419
|
-
this.definitions = {};
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
_createClass(Library, [{
|
|
1423
|
-
key: "add",
|
|
1424
|
-
value: function add() {
|
|
1425
|
-
var _this = this;
|
|
1426
|
-
|
|
1427
|
-
for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1428
|
-
definitions[_key] = arguments[_key];
|
|
1429
|
-
}
|
|
1430
|
-
|
|
1431
|
-
var additions = definitions.reduce(this._pullDefinitions, {});
|
|
1432
|
-
Object.keys(additions).forEach(function (key) {
|
|
1433
|
-
_this.definitions[key] = _objectSpread2$1(_objectSpread2$1({}, _this.definitions[key] || {}), additions[key]);
|
|
1434
|
-
defineIcons(key, additions[key]); // TODO can we stop doing this? We can't get the icons by 'fa-solid' any longer so this probably needs to change
|
|
1435
|
-
|
|
1436
|
-
var longPrefix = PREFIX_TO_LONG_STYLE[FAMILY_CLASSIC][key];
|
|
1437
|
-
if (longPrefix) defineIcons(longPrefix, additions[key]);
|
|
1438
|
-
build();
|
|
1439
|
-
});
|
|
1440
|
-
}
|
|
1441
|
-
}, {
|
|
1442
|
-
key: "reset",
|
|
1443
|
-
value: function reset() {
|
|
1444
|
-
this.definitions = {};
|
|
1445
|
-
}
|
|
1446
|
-
}, {
|
|
1447
|
-
key: "_pullDefinitions",
|
|
1448
|
-
value: function _pullDefinitions(additions, definition) {
|
|
1449
|
-
var normalized = definition.prefix && definition.iconName && definition.icon ? {
|
|
1450
|
-
0: definition
|
|
1451
|
-
} : definition;
|
|
1452
|
-
Object.keys(normalized).map(function (key) {
|
|
1453
|
-
var _normalized$key = normalized[key],
|
|
1454
|
-
prefix = _normalized$key.prefix,
|
|
1455
|
-
iconName = _normalized$key.iconName,
|
|
1456
|
-
icon = _normalized$key.icon;
|
|
1457
|
-
var aliases = icon[2];
|
|
1458
|
-
if (!additions[prefix]) additions[prefix] = {};
|
|
1459
|
-
|
|
1460
|
-
if (aliases.length > 0) {
|
|
1461
|
-
aliases.forEach(function (alias) {
|
|
1462
|
-
if (typeof alias === 'string') {
|
|
1463
|
-
additions[prefix][alias] = icon;
|
|
1464
|
-
}
|
|
1465
|
-
});
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
additions[prefix][iconName] = icon;
|
|
1469
|
-
});
|
|
1470
|
-
return additions;
|
|
1471
|
-
}
|
|
1472
|
-
}]);
|
|
1473
|
-
|
|
1474
|
-
return Library;
|
|
1475
|
-
}();
|
|
1476
|
-
|
|
1477
|
-
var _plugins = [];
|
|
1478
|
-
var _hooks = {};
|
|
1479
|
-
var providers = {};
|
|
1480
|
-
var defaultProviderKeys = Object.keys(providers);
|
|
1481
|
-
function registerPlugins(nextPlugins, _ref) {
|
|
1482
|
-
var obj = _ref.mixoutsTo;
|
|
1483
|
-
_plugins = nextPlugins;
|
|
1484
|
-
_hooks = {};
|
|
1485
|
-
Object.keys(providers).forEach(function (k) {
|
|
1486
|
-
if (defaultProviderKeys.indexOf(k) === -1) {
|
|
1487
|
-
delete providers[k];
|
|
1488
|
-
}
|
|
1489
|
-
});
|
|
1490
|
-
|
|
1491
|
-
_plugins.forEach(function (plugin) {
|
|
1492
|
-
var mixout = plugin.mixout ? plugin.mixout() : {};
|
|
1493
|
-
Object.keys(mixout).forEach(function (tk) {
|
|
1494
|
-
if (typeof mixout[tk] === 'function') {
|
|
1495
|
-
obj[tk] = mixout[tk];
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
if (_typeof$2(mixout[tk]) === 'object') {
|
|
1499
|
-
Object.keys(mixout[tk]).forEach(function (sk) {
|
|
1500
|
-
if (!obj[tk]) {
|
|
1501
|
-
obj[tk] = {};
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
obj[tk][sk] = mixout[tk][sk];
|
|
1505
|
-
});
|
|
1506
|
-
}
|
|
1507
|
-
});
|
|
1508
|
-
|
|
1509
|
-
if (plugin.hooks) {
|
|
1510
|
-
var hooks = plugin.hooks();
|
|
1511
|
-
Object.keys(hooks).forEach(function (hook) {
|
|
1512
|
-
if (!_hooks[hook]) {
|
|
1513
|
-
_hooks[hook] = [];
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
_hooks[hook].push(hooks[hook]);
|
|
1517
|
-
});
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
if (plugin.provides) {
|
|
1521
|
-
plugin.provides(providers);
|
|
1522
|
-
}
|
|
1523
|
-
});
|
|
1524
|
-
|
|
1525
|
-
return obj;
|
|
1526
|
-
}
|
|
1527
|
-
function chainHooks(hook, accumulator) {
|
|
1528
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
1529
|
-
args[_key - 2] = arguments[_key];
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
var hookFns = _hooks[hook] || [];
|
|
1533
|
-
hookFns.forEach(function (hookFn) {
|
|
1534
|
-
accumulator = hookFn.apply(null, [accumulator].concat(args)); // eslint-disable-line no-useless-call
|
|
1535
|
-
});
|
|
1536
|
-
return accumulator;
|
|
1537
|
-
}
|
|
1538
|
-
function callHooks(hook) {
|
|
1539
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
1540
|
-
args[_key2 - 1] = arguments[_key2];
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
var hookFns = _hooks[hook] || [];
|
|
1544
|
-
hookFns.forEach(function (hookFn) {
|
|
1545
|
-
hookFn.apply(null, args);
|
|
1546
|
-
});
|
|
1547
|
-
return undefined;
|
|
1548
|
-
}
|
|
1549
|
-
function callProvided() {
|
|
1550
|
-
var hook = arguments[0];
|
|
1551
|
-
var args = Array.prototype.slice.call(arguments, 1);
|
|
1552
|
-
return providers[hook] ? providers[hook].apply(null, args) : undefined;
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
function findIconDefinition(iconLookup) {
|
|
1556
|
-
if (iconLookup.prefix === 'fa') {
|
|
1557
|
-
iconLookup.prefix = 'fas';
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
var iconName = iconLookup.iconName;
|
|
1561
|
-
var prefix = iconLookup.prefix || getDefaultUsablePrefix();
|
|
1562
|
-
if (!iconName) return;
|
|
1563
|
-
iconName = byAlias(prefix, iconName) || iconName;
|
|
1564
|
-
return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);
|
|
1565
|
-
}
|
|
1566
|
-
var library = new Library();
|
|
1567
|
-
var noAuto = function noAuto() {
|
|
1568
|
-
config.autoReplaceSvg = false;
|
|
1569
|
-
config.observeMutations = false;
|
|
1570
|
-
callHooks('noAuto');
|
|
1571
|
-
};
|
|
1572
|
-
var dom = {
|
|
1573
|
-
i2svg: function i2svg() {
|
|
1574
|
-
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1575
|
-
|
|
1576
|
-
if (IS_DOM) {
|
|
1577
|
-
callHooks('beforeI2svg', params);
|
|
1578
|
-
callProvided('pseudoElements2svg', params);
|
|
1579
|
-
return callProvided('i2svg', params);
|
|
1580
|
-
} else {
|
|
1581
|
-
return Promise.reject('Operation requires a DOM of some kind.');
|
|
1582
|
-
}
|
|
1583
|
-
},
|
|
1584
|
-
watch: function watch() {
|
|
1585
|
-
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1586
|
-
var autoReplaceSvgRoot = params.autoReplaceSvgRoot;
|
|
1587
|
-
|
|
1588
|
-
if (config.autoReplaceSvg === false) {
|
|
1589
|
-
config.autoReplaceSvg = true;
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
config.observeMutations = true;
|
|
1593
|
-
domready(function () {
|
|
1594
|
-
autoReplace({
|
|
1595
|
-
autoReplaceSvgRoot: autoReplaceSvgRoot
|
|
1596
|
-
});
|
|
1597
|
-
callHooks('watch', params);
|
|
1598
|
-
});
|
|
1599
|
-
}
|
|
1600
|
-
};
|
|
1601
|
-
var parse = {
|
|
1602
|
-
icon: function icon(_icon) {
|
|
1603
|
-
if (_icon === null) {
|
|
1604
|
-
return null;
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
if (_typeof$2(_icon) === 'object' && _icon.prefix && _icon.iconName) {
|
|
1608
|
-
return {
|
|
1609
|
-
prefix: _icon.prefix,
|
|
1610
|
-
iconName: byAlias(_icon.prefix, _icon.iconName) || _icon.iconName
|
|
1611
|
-
};
|
|
1612
|
-
}
|
|
1613
|
-
|
|
1614
|
-
if (Array.isArray(_icon) && _icon.length === 2) {
|
|
1615
|
-
var iconName = _icon[1].indexOf('fa-') === 0 ? _icon[1].slice(3) : _icon[1];
|
|
1616
|
-
var prefix = getCanonicalPrefix(_icon[0]);
|
|
1617
|
-
return {
|
|
1618
|
-
prefix: prefix,
|
|
1619
|
-
iconName: byAlias(prefix, iconName) || iconName
|
|
1620
|
-
};
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
if (typeof _icon === 'string' && (_icon.indexOf("".concat(config.cssPrefix, "-")) > -1 || _icon.match(ICON_SELECTION_SYNTAX_PATTERN))) {
|
|
1624
|
-
var canonicalIcon = getCanonicalIcon(_icon.split(' '), {
|
|
1625
|
-
skipLookups: true
|
|
1626
|
-
});
|
|
1627
|
-
return {
|
|
1628
|
-
prefix: canonicalIcon.prefix || getDefaultUsablePrefix(),
|
|
1629
|
-
iconName: byAlias(canonicalIcon.prefix, canonicalIcon.iconName) || canonicalIcon.iconName
|
|
1630
|
-
};
|
|
1631
|
-
}
|
|
1632
|
-
|
|
1633
|
-
if (typeof _icon === 'string') {
|
|
1634
|
-
var _prefix = getDefaultUsablePrefix();
|
|
1635
|
-
|
|
1636
|
-
return {
|
|
1637
|
-
prefix: _prefix,
|
|
1638
|
-
iconName: byAlias(_prefix, _icon) || _icon
|
|
1639
|
-
};
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
};
|
|
1643
|
-
var api = {
|
|
1644
|
-
noAuto: noAuto,
|
|
1645
|
-
config: config,
|
|
1646
|
-
dom: dom,
|
|
1647
|
-
parse: parse,
|
|
1648
|
-
library: library,
|
|
1649
|
-
findIconDefinition: findIconDefinition,
|
|
1650
|
-
toHtml: toHtml
|
|
1651
|
-
};
|
|
1652
|
-
|
|
1653
|
-
var autoReplace = function autoReplace() {
|
|
1654
|
-
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1655
|
-
var _params$autoReplaceSv = params.autoReplaceSvgRoot,
|
|
1656
|
-
autoReplaceSvgRoot = _params$autoReplaceSv === void 0 ? DOCUMENT : _params$autoReplaceSv;
|
|
1657
|
-
if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg) api.dom.i2svg({
|
|
1658
|
-
node: autoReplaceSvgRoot
|
|
1659
|
-
});
|
|
1660
|
-
};
|
|
1661
|
-
|
|
1662
|
-
function domVariants(val, abstractCreator) {
|
|
1663
|
-
Object.defineProperty(val, 'abstract', {
|
|
1664
|
-
get: abstractCreator
|
|
1665
|
-
});
|
|
1666
|
-
Object.defineProperty(val, 'html', {
|
|
1667
|
-
get: function get() {
|
|
1668
|
-
return val.abstract.map(function (a) {
|
|
1669
|
-
return toHtml(a);
|
|
1670
|
-
});
|
|
1671
|
-
}
|
|
1672
|
-
});
|
|
1673
|
-
Object.defineProperty(val, 'node', {
|
|
1674
|
-
get: function get() {
|
|
1675
|
-
if (!IS_DOM) return;
|
|
1676
|
-
var container = DOCUMENT.createElement('div');
|
|
1677
|
-
container.innerHTML = val.html;
|
|
1678
|
-
return container.children;
|
|
1679
|
-
}
|
|
1680
|
-
});
|
|
1681
|
-
return val;
|
|
1682
|
-
}
|
|
1683
|
-
|
|
1684
|
-
function asIcon (_ref) {
|
|
1685
|
-
var children = _ref.children,
|
|
1686
|
-
main = _ref.main,
|
|
1687
|
-
mask = _ref.mask,
|
|
1688
|
-
attributes = _ref.attributes,
|
|
1689
|
-
styles = _ref.styles,
|
|
1690
|
-
transform = _ref.transform;
|
|
1691
|
-
|
|
1692
|
-
if (transformIsMeaningful(transform) && main.found && !mask.found) {
|
|
1693
|
-
var width = main.width,
|
|
1694
|
-
height = main.height;
|
|
1695
|
-
var offset = {
|
|
1696
|
-
x: width / height / 2,
|
|
1697
|
-
y: 0.5
|
|
1698
|
-
};
|
|
1699
|
-
attributes['style'] = joinStyles(_objectSpread2$1(_objectSpread2$1({}, styles), {}, {
|
|
1700
|
-
'transform-origin': "".concat(offset.x + transform.x / 16, "em ").concat(offset.y + transform.y / 16, "em")
|
|
1701
|
-
}));
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
return [{
|
|
1705
|
-
tag: 'svg',
|
|
1706
|
-
attributes: attributes,
|
|
1707
|
-
children: children
|
|
1708
|
-
}];
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
function asSymbol (_ref) {
|
|
1712
|
-
var prefix = _ref.prefix,
|
|
1713
|
-
iconName = _ref.iconName,
|
|
1714
|
-
children = _ref.children,
|
|
1715
|
-
attributes = _ref.attributes,
|
|
1716
|
-
symbol = _ref.symbol;
|
|
1717
|
-
var id = symbol === true ? "".concat(prefix, "-").concat(config.cssPrefix, "-").concat(iconName) : symbol;
|
|
1718
|
-
return [{
|
|
1719
|
-
tag: 'svg',
|
|
1720
|
-
attributes: {
|
|
1721
|
-
style: 'display: none;'
|
|
1722
|
-
},
|
|
1723
|
-
children: [{
|
|
1724
|
-
tag: 'symbol',
|
|
1725
|
-
attributes: _objectSpread2$1(_objectSpread2$1({}, attributes), {}, {
|
|
1726
|
-
id: id
|
|
1727
|
-
}),
|
|
1728
|
-
children: children
|
|
1729
|
-
}]
|
|
1730
|
-
}];
|
|
1731
|
-
}
|
|
1732
|
-
|
|
1733
|
-
function makeInlineSvgAbstract(params) {
|
|
1734
|
-
var _params$icons = params.icons,
|
|
1735
|
-
main = _params$icons.main,
|
|
1736
|
-
mask = _params$icons.mask,
|
|
1737
|
-
prefix = params.prefix,
|
|
1738
|
-
iconName = params.iconName,
|
|
1739
|
-
transform = params.transform,
|
|
1740
|
-
symbol = params.symbol,
|
|
1741
|
-
title = params.title,
|
|
1742
|
-
maskId = params.maskId,
|
|
1743
|
-
titleId = params.titleId,
|
|
1744
|
-
extra = params.extra,
|
|
1745
|
-
_params$watchable = params.watchable,
|
|
1746
|
-
watchable = _params$watchable === void 0 ? false : _params$watchable;
|
|
1747
|
-
|
|
1748
|
-
var _ref = mask.found ? mask : main,
|
|
1749
|
-
width = _ref.width,
|
|
1750
|
-
height = _ref.height;
|
|
1751
|
-
|
|
1752
|
-
var isUploadedIcon = prefix === 'fak';
|
|
1753
|
-
var attrClass = [config.replacementClass, iconName ? "".concat(config.cssPrefix, "-").concat(iconName) : ''].filter(function (c) {
|
|
1754
|
-
return extra.classes.indexOf(c) === -1;
|
|
1755
|
-
}).filter(function (c) {
|
|
1756
|
-
return c !== '' || !!c;
|
|
1757
|
-
}).concat(extra.classes).join(' ');
|
|
1758
|
-
var content = {
|
|
1759
|
-
children: [],
|
|
1760
|
-
attributes: _objectSpread2$1(_objectSpread2$1({}, extra.attributes), {}, {
|
|
1761
|
-
'data-prefix': prefix,
|
|
1762
|
-
'data-icon': iconName,
|
|
1763
|
-
'class': attrClass,
|
|
1764
|
-
'role': extra.attributes.role || 'img',
|
|
1765
|
-
'xmlns': 'http://www.w3.org/2000/svg',
|
|
1766
|
-
'viewBox': "0 0 ".concat(width, " ").concat(height)
|
|
1767
|
-
})
|
|
1768
|
-
};
|
|
1769
|
-
var uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf('fa-fw') ? {
|
|
1770
|
-
width: "".concat(width / height * 16 * 0.0625, "em")
|
|
1771
|
-
} : {};
|
|
1772
|
-
|
|
1773
|
-
if (watchable) {
|
|
1774
|
-
content.attributes[DATA_FA_I2SVG] = '';
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
if (title) {
|
|
1778
|
-
content.children.push({
|
|
1779
|
-
tag: 'title',
|
|
1780
|
-
attributes: {
|
|
1781
|
-
id: content.attributes['aria-labelledby'] || "title-".concat(titleId || nextUniqueId())
|
|
1782
|
-
},
|
|
1783
|
-
children: [title]
|
|
1784
|
-
});
|
|
1785
|
-
delete content.attributes.title;
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
var args = _objectSpread2$1(_objectSpread2$1({}, content), {}, {
|
|
1789
|
-
prefix: prefix,
|
|
1790
|
-
iconName: iconName,
|
|
1791
|
-
main: main,
|
|
1792
|
-
mask: mask,
|
|
1793
|
-
maskId: maskId,
|
|
1794
|
-
transform: transform,
|
|
1795
|
-
symbol: symbol,
|
|
1796
|
-
styles: _objectSpread2$1(_objectSpread2$1({}, uploadedIconWidthStyle), extra.styles)
|
|
1797
|
-
});
|
|
1798
|
-
|
|
1799
|
-
var _ref2 = mask.found && main.found ? callProvided('generateAbstractMask', args) || {
|
|
1800
|
-
children: [],
|
|
1801
|
-
attributes: {}
|
|
1802
|
-
} : callProvided('generateAbstractIcon', args) || {
|
|
1803
|
-
children: [],
|
|
1804
|
-
attributes: {}
|
|
1805
|
-
},
|
|
1806
|
-
children = _ref2.children,
|
|
1807
|
-
attributes = _ref2.attributes;
|
|
1808
|
-
|
|
1809
|
-
args.children = children;
|
|
1810
|
-
args.attributes = attributes;
|
|
1811
|
-
|
|
1812
|
-
if (symbol) {
|
|
1813
|
-
return asSymbol(args);
|
|
1814
|
-
} else {
|
|
1815
|
-
return asIcon(args);
|
|
1816
|
-
}
|
|
1817
|
-
}
|
|
1818
|
-
function makeLayersTextAbstract(params) {
|
|
1819
|
-
var content = params.content,
|
|
1820
|
-
width = params.width,
|
|
1821
|
-
height = params.height,
|
|
1822
|
-
transform = params.transform,
|
|
1823
|
-
title = params.title,
|
|
1824
|
-
extra = params.extra,
|
|
1825
|
-
_params$watchable2 = params.watchable,
|
|
1826
|
-
watchable = _params$watchable2 === void 0 ? false : _params$watchable2;
|
|
1827
|
-
|
|
1828
|
-
var attributes = _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, extra.attributes), title ? {
|
|
1829
|
-
'title': title
|
|
1830
|
-
} : {}), {}, {
|
|
1831
|
-
'class': extra.classes.join(' ')
|
|
1832
|
-
});
|
|
1833
|
-
|
|
1834
|
-
if (watchable) {
|
|
1835
|
-
attributes[DATA_FA_I2SVG] = '';
|
|
1836
|
-
}
|
|
1837
|
-
|
|
1838
|
-
var styles = _objectSpread2$1({}, extra.styles);
|
|
1839
|
-
|
|
1840
|
-
if (transformIsMeaningful(transform)) {
|
|
1841
|
-
styles['transform'] = transformForCss({
|
|
1842
|
-
transform: transform,
|
|
1843
|
-
startCentered: true,
|
|
1844
|
-
width: width,
|
|
1845
|
-
height: height
|
|
1846
|
-
});
|
|
1847
|
-
styles['-webkit-transform'] = styles['transform'];
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
|
-
var styleString = joinStyles(styles);
|
|
1851
|
-
|
|
1852
|
-
if (styleString.length > 0) {
|
|
1853
|
-
attributes['style'] = styleString;
|
|
1854
|
-
}
|
|
1855
|
-
|
|
1856
|
-
var val = [];
|
|
1857
|
-
val.push({
|
|
1858
|
-
tag: 'span',
|
|
1859
|
-
attributes: attributes,
|
|
1860
|
-
children: [content]
|
|
1861
|
-
});
|
|
1862
|
-
|
|
1863
|
-
if (title) {
|
|
1864
|
-
val.push({
|
|
1865
|
-
tag: 'span',
|
|
1866
|
-
attributes: {
|
|
1867
|
-
class: 'sr-only'
|
|
1868
|
-
},
|
|
1869
|
-
children: [title]
|
|
1870
|
-
});
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
|
-
return val;
|
|
1874
|
-
}
|
|
1875
|
-
function makeLayersCounterAbstract(params) {
|
|
1876
|
-
var content = params.content,
|
|
1877
|
-
title = params.title,
|
|
1878
|
-
extra = params.extra;
|
|
1879
|
-
|
|
1880
|
-
var attributes = _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, extra.attributes), title ? {
|
|
1881
|
-
'title': title
|
|
1882
|
-
} : {}), {}, {
|
|
1883
|
-
'class': extra.classes.join(' ')
|
|
1884
|
-
});
|
|
1885
|
-
|
|
1886
|
-
var styleString = joinStyles(extra.styles);
|
|
1887
|
-
|
|
1888
|
-
if (styleString.length > 0) {
|
|
1889
|
-
attributes['style'] = styleString;
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
|
-
var val = [];
|
|
1893
|
-
val.push({
|
|
1894
|
-
tag: 'span',
|
|
1895
|
-
attributes: attributes,
|
|
1896
|
-
children: [content]
|
|
1897
|
-
});
|
|
1898
|
-
|
|
1899
|
-
if (title) {
|
|
1900
|
-
val.push({
|
|
1901
|
-
tag: 'span',
|
|
1902
|
-
attributes: {
|
|
1903
|
-
class: 'sr-only'
|
|
1904
|
-
},
|
|
1905
|
-
children: [title]
|
|
1906
|
-
});
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
return val;
|
|
1910
|
-
}
|
|
1911
|
-
|
|
1912
|
-
var styles$1 = namespace.styles;
|
|
1913
|
-
function asFoundIcon(icon) {
|
|
1914
|
-
var width = icon[0];
|
|
1915
|
-
var height = icon[1];
|
|
1916
|
-
|
|
1917
|
-
var _icon$slice = icon.slice(4),
|
|
1918
|
-
_icon$slice2 = _slicedToArray(_icon$slice, 1),
|
|
1919
|
-
vectorData = _icon$slice2[0];
|
|
1920
|
-
|
|
1921
|
-
var element = null;
|
|
1922
|
-
|
|
1923
|
-
if (Array.isArray(vectorData)) {
|
|
1924
|
-
element = {
|
|
1925
|
-
tag: 'g',
|
|
1926
|
-
attributes: {
|
|
1927
|
-
class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.GROUP)
|
|
1928
|
-
},
|
|
1929
|
-
children: [{
|
|
1930
|
-
tag: 'path',
|
|
1931
|
-
attributes: {
|
|
1932
|
-
class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.SECONDARY),
|
|
1933
|
-
fill: 'currentColor',
|
|
1934
|
-
d: vectorData[0]
|
|
1935
|
-
}
|
|
1936
|
-
}, {
|
|
1937
|
-
tag: 'path',
|
|
1938
|
-
attributes: {
|
|
1939
|
-
class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.PRIMARY),
|
|
1940
|
-
fill: 'currentColor',
|
|
1941
|
-
d: vectorData[1]
|
|
1942
|
-
}
|
|
1943
|
-
}]
|
|
1944
|
-
};
|
|
1945
|
-
} else {
|
|
1946
|
-
element = {
|
|
1947
|
-
tag: 'path',
|
|
1948
|
-
attributes: {
|
|
1949
|
-
fill: 'currentColor',
|
|
1950
|
-
d: vectorData
|
|
1951
|
-
}
|
|
1952
|
-
};
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
|
-
return {
|
|
1956
|
-
found: true,
|
|
1957
|
-
width: width,
|
|
1958
|
-
height: height,
|
|
1959
|
-
icon: element
|
|
1960
|
-
};
|
|
1961
|
-
}
|
|
1962
|
-
var missingIconResolutionMixin = {
|
|
1963
|
-
found: false,
|
|
1964
|
-
width: 512,
|
|
1965
|
-
height: 512
|
|
1966
|
-
};
|
|
1967
|
-
|
|
1968
|
-
function maybeNotifyMissing(iconName, prefix) {
|
|
1969
|
-
if (!PRODUCTION$1 && !config.showMissingIcons && iconName) {
|
|
1970
|
-
console.error("Icon with name \"".concat(iconName, "\" and prefix \"").concat(prefix, "\" is missing."));
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
function findIcon(iconName, prefix) {
|
|
1975
|
-
var givenPrefix = prefix;
|
|
1976
|
-
|
|
1977
|
-
if (prefix === 'fa' && config.styleDefault !== null) {
|
|
1978
|
-
prefix = getDefaultUsablePrefix();
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
|
-
return new Promise(function (resolve, reject) {
|
|
1982
|
-
({
|
|
1983
|
-
found: false,
|
|
1984
|
-
width: 512,
|
|
1985
|
-
height: 512,
|
|
1986
|
-
icon: callProvided('missingIconAbstract') || {}
|
|
1987
|
-
});
|
|
1988
|
-
|
|
1989
|
-
if (givenPrefix === 'fa') {
|
|
1990
|
-
var shim = byOldName(iconName) || {};
|
|
1991
|
-
iconName = shim.iconName || iconName;
|
|
1992
|
-
prefix = shim.prefix || prefix;
|
|
1993
|
-
}
|
|
1994
|
-
|
|
1995
|
-
if (iconName && prefix && styles$1[prefix] && styles$1[prefix][iconName]) {
|
|
1996
|
-
var icon = styles$1[prefix][iconName];
|
|
1997
|
-
return resolve(asFoundIcon(icon));
|
|
1998
|
-
}
|
|
1999
|
-
|
|
2000
|
-
maybeNotifyMissing(iconName, prefix);
|
|
2001
|
-
resolve(_objectSpread2$1(_objectSpread2$1({}, missingIconResolutionMixin), {}, {
|
|
2002
|
-
icon: config.showMissingIcons && iconName ? callProvided('missingIconAbstract') || {} : {}
|
|
2003
|
-
}));
|
|
2004
|
-
});
|
|
2005
|
-
}
|
|
2006
|
-
|
|
2007
|
-
var noop$1$1 = function noop() {};
|
|
2008
|
-
|
|
2009
|
-
var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {
|
|
2010
|
-
mark: noop$1$1,
|
|
2011
|
-
measure: noop$1$1
|
|
2012
|
-
};
|
|
2013
|
-
var preamble = "FA \"6.4.2\"";
|
|
2014
|
-
|
|
2015
|
-
var begin = function begin(name) {
|
|
2016
|
-
p.mark("".concat(preamble, " ").concat(name, " begins"));
|
|
2017
|
-
return function () {
|
|
2018
|
-
return end(name);
|
|
2019
|
-
};
|
|
2020
|
-
};
|
|
2021
|
-
|
|
2022
|
-
var end = function end(name) {
|
|
2023
|
-
p.mark("".concat(preamble, " ").concat(name, " ends"));
|
|
2024
|
-
p.measure("".concat(preamble, " ").concat(name), "".concat(preamble, " ").concat(name, " begins"), "".concat(preamble, " ").concat(name, " ends"));
|
|
2025
|
-
};
|
|
2026
|
-
|
|
2027
|
-
var perf = {
|
|
2028
|
-
begin: begin,
|
|
2029
|
-
end: end
|
|
2030
|
-
};
|
|
2031
|
-
|
|
2032
|
-
var noop$2 = function noop() {};
|
|
2033
|
-
|
|
2034
|
-
function isWatched(node) {
|
|
2035
|
-
var i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;
|
|
2036
|
-
return typeof i2svg === 'string';
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
|
-
function hasPrefixAndIcon(node) {
|
|
2040
|
-
var prefix = node.getAttribute ? node.getAttribute(DATA_PREFIX) : null;
|
|
2041
|
-
var icon = node.getAttribute ? node.getAttribute(DATA_ICON) : null;
|
|
2042
|
-
return prefix && icon;
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
function hasBeenReplaced(node) {
|
|
2046
|
-
return node && node.classList && node.classList.contains && node.classList.contains(config.replacementClass);
|
|
2047
|
-
}
|
|
2048
|
-
|
|
2049
|
-
function getMutator() {
|
|
2050
|
-
if (config.autoReplaceSvg === true) {
|
|
2051
|
-
return mutators.replace;
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
|
-
var mutator = mutators[config.autoReplaceSvg];
|
|
2055
|
-
return mutator || mutators.replace;
|
|
2056
|
-
}
|
|
2057
|
-
|
|
2058
|
-
function createElementNS(tag) {
|
|
2059
|
-
return DOCUMENT.createElementNS('http://www.w3.org/2000/svg', tag);
|
|
2060
|
-
}
|
|
2061
|
-
|
|
2062
|
-
function createElement(tag) {
|
|
2063
|
-
return DOCUMENT.createElement(tag);
|
|
2064
|
-
}
|
|
2065
|
-
|
|
2066
|
-
function convertSVG(abstractObj) {
|
|
2067
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2068
|
-
var _params$ceFn = params.ceFn,
|
|
2069
|
-
ceFn = _params$ceFn === void 0 ? abstractObj.tag === 'svg' ? createElementNS : createElement : _params$ceFn;
|
|
2070
|
-
|
|
2071
|
-
if (typeof abstractObj === 'string') {
|
|
2072
|
-
return DOCUMENT.createTextNode(abstractObj);
|
|
2073
|
-
}
|
|
2074
|
-
|
|
2075
|
-
var tag = ceFn(abstractObj.tag);
|
|
2076
|
-
Object.keys(abstractObj.attributes || []).forEach(function (key) {
|
|
2077
|
-
tag.setAttribute(key, abstractObj.attributes[key]);
|
|
2078
|
-
});
|
|
2079
|
-
var children = abstractObj.children || [];
|
|
2080
|
-
children.forEach(function (child) {
|
|
2081
|
-
tag.appendChild(convertSVG(child, {
|
|
2082
|
-
ceFn: ceFn
|
|
2083
|
-
}));
|
|
2084
|
-
});
|
|
2085
|
-
return tag;
|
|
2086
|
-
}
|
|
2087
|
-
|
|
2088
|
-
function nodeAsComment(node) {
|
|
2089
|
-
var comment = " ".concat(node.outerHTML, " ");
|
|
2090
|
-
/* BEGIN.ATTRIBUTION */
|
|
2091
|
-
|
|
2092
|
-
comment = "".concat(comment, "Font Awesome fontawesome.com ");
|
|
2093
|
-
/* END.ATTRIBUTION */
|
|
2094
|
-
|
|
2095
|
-
return comment;
|
|
2096
|
-
}
|
|
2097
|
-
|
|
2098
|
-
var mutators = {
|
|
2099
|
-
replace: function replace(mutation) {
|
|
2100
|
-
var node = mutation[0];
|
|
2101
|
-
|
|
2102
|
-
if (node.parentNode) {
|
|
2103
|
-
mutation[1].forEach(function (_abstract) {
|
|
2104
|
-
node.parentNode.insertBefore(convertSVG(_abstract), node);
|
|
2105
|
-
});
|
|
2106
|
-
|
|
2107
|
-
if (node.getAttribute(DATA_FA_I2SVG) === null && config.keepOriginalSource) {
|
|
2108
|
-
var comment = DOCUMENT.createComment(nodeAsComment(node));
|
|
2109
|
-
node.parentNode.replaceChild(comment, node);
|
|
2110
|
-
} else {
|
|
2111
|
-
node.remove();
|
|
2112
|
-
}
|
|
2113
|
-
}
|
|
2114
|
-
},
|
|
2115
|
-
nest: function nest(mutation) {
|
|
2116
|
-
var node = mutation[0];
|
|
2117
|
-
var _abstract2 = mutation[1]; // If we already have a replaced node we do not want to continue nesting within it.
|
|
2118
|
-
// Short-circuit to the standard replacement
|
|
2119
|
-
|
|
2120
|
-
if (~classArray(node).indexOf(config.replacementClass)) {
|
|
2121
|
-
return mutators.replace(mutation);
|
|
2122
|
-
}
|
|
2123
|
-
|
|
2124
|
-
var forSvg = new RegExp("".concat(config.cssPrefix, "-.*"));
|
|
2125
|
-
delete _abstract2[0].attributes.id;
|
|
2126
|
-
|
|
2127
|
-
if (_abstract2[0].attributes.class) {
|
|
2128
|
-
var splitClasses = _abstract2[0].attributes.class.split(' ').reduce(function (acc, cls) {
|
|
2129
|
-
if (cls === config.replacementClass || cls.match(forSvg)) {
|
|
2130
|
-
acc.toSvg.push(cls);
|
|
2131
|
-
} else {
|
|
2132
|
-
acc.toNode.push(cls);
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
return acc;
|
|
2136
|
-
}, {
|
|
2137
|
-
toNode: [],
|
|
2138
|
-
toSvg: []
|
|
2139
|
-
});
|
|
2140
|
-
|
|
2141
|
-
_abstract2[0].attributes.class = splitClasses.toSvg.join(' ');
|
|
2142
|
-
|
|
2143
|
-
if (splitClasses.toNode.length === 0) {
|
|
2144
|
-
node.removeAttribute('class');
|
|
2145
|
-
} else {
|
|
2146
|
-
node.setAttribute('class', splitClasses.toNode.join(' '));
|
|
2147
|
-
}
|
|
2148
|
-
}
|
|
2149
|
-
|
|
2150
|
-
var newInnerHTML = _abstract2.map(function (a) {
|
|
2151
|
-
return toHtml(a);
|
|
2152
|
-
}).join('\n');
|
|
2153
|
-
|
|
2154
|
-
node.setAttribute(DATA_FA_I2SVG, '');
|
|
2155
|
-
node.innerHTML = newInnerHTML;
|
|
2156
|
-
}
|
|
2157
|
-
};
|
|
2158
|
-
|
|
2159
|
-
function performOperationSync(op) {
|
|
2160
|
-
op();
|
|
2161
|
-
}
|
|
2162
|
-
|
|
2163
|
-
function perform(mutations, callback) {
|
|
2164
|
-
var callbackFunction = typeof callback === 'function' ? callback : noop$2;
|
|
2165
|
-
|
|
2166
|
-
if (mutations.length === 0) {
|
|
2167
|
-
callbackFunction();
|
|
2168
|
-
} else {
|
|
2169
|
-
var frame = performOperationSync;
|
|
2170
|
-
|
|
2171
|
-
if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {
|
|
2172
|
-
frame = WINDOW.requestAnimationFrame || performOperationSync;
|
|
2173
|
-
}
|
|
2174
|
-
|
|
2175
|
-
frame(function () {
|
|
2176
|
-
var mutator = getMutator();
|
|
2177
|
-
var mark = perf.begin('mutate');
|
|
2178
|
-
mutations.map(mutator);
|
|
2179
|
-
mark();
|
|
2180
|
-
callbackFunction();
|
|
2181
|
-
});
|
|
2182
|
-
}
|
|
2183
|
-
}
|
|
2184
|
-
var disabled = false;
|
|
2185
|
-
function disableObservation() {
|
|
2186
|
-
disabled = true;
|
|
2187
|
-
}
|
|
2188
|
-
function enableObservation() {
|
|
2189
|
-
disabled = false;
|
|
2190
|
-
}
|
|
2191
|
-
var mo = null;
|
|
2192
|
-
function observe(options) {
|
|
2193
|
-
if (!MUTATION_OBSERVER) {
|
|
2194
|
-
return;
|
|
2195
|
-
}
|
|
2196
|
-
|
|
2197
|
-
if (!config.observeMutations) {
|
|
2198
|
-
return;
|
|
2199
|
-
}
|
|
2200
|
-
|
|
2201
|
-
var _options$treeCallback = options.treeCallback,
|
|
2202
|
-
treeCallback = _options$treeCallback === void 0 ? noop$2 : _options$treeCallback,
|
|
2203
|
-
_options$nodeCallback = options.nodeCallback,
|
|
2204
|
-
nodeCallback = _options$nodeCallback === void 0 ? noop$2 : _options$nodeCallback,
|
|
2205
|
-
_options$pseudoElemen = options.pseudoElementsCallback,
|
|
2206
|
-
pseudoElementsCallback = _options$pseudoElemen === void 0 ? noop$2 : _options$pseudoElemen,
|
|
2207
|
-
_options$observeMutat = options.observeMutationsRoot,
|
|
2208
|
-
observeMutationsRoot = _options$observeMutat === void 0 ? DOCUMENT : _options$observeMutat;
|
|
2209
|
-
mo = new MUTATION_OBSERVER(function (objects) {
|
|
2210
|
-
if (disabled) return;
|
|
2211
|
-
var defaultPrefix = getDefaultUsablePrefix();
|
|
2212
|
-
toArray(objects).forEach(function (mutationRecord) {
|
|
2213
|
-
if (mutationRecord.type === 'childList' && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {
|
|
2214
|
-
if (config.searchPseudoElements) {
|
|
2215
|
-
pseudoElementsCallback(mutationRecord.target);
|
|
2216
|
-
}
|
|
2217
|
-
|
|
2218
|
-
treeCallback(mutationRecord.target);
|
|
2219
|
-
}
|
|
2220
|
-
|
|
2221
|
-
if (mutationRecord.type === 'attributes' && mutationRecord.target.parentNode && config.searchPseudoElements) {
|
|
2222
|
-
pseudoElementsCallback(mutationRecord.target.parentNode);
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
if (mutationRecord.type === 'attributes' && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {
|
|
2226
|
-
if (mutationRecord.attributeName === 'class' && hasPrefixAndIcon(mutationRecord.target)) {
|
|
2227
|
-
var _getCanonicalIcon = getCanonicalIcon(classArray(mutationRecord.target)),
|
|
2228
|
-
prefix = _getCanonicalIcon.prefix,
|
|
2229
|
-
iconName = _getCanonicalIcon.iconName;
|
|
2230
|
-
|
|
2231
|
-
mutationRecord.target.setAttribute(DATA_PREFIX, prefix || defaultPrefix);
|
|
2232
|
-
if (iconName) mutationRecord.target.setAttribute(DATA_ICON, iconName);
|
|
2233
|
-
} else if (hasBeenReplaced(mutationRecord.target)) {
|
|
2234
|
-
nodeCallback(mutationRecord.target);
|
|
2235
|
-
}
|
|
2236
|
-
}
|
|
2237
|
-
});
|
|
2238
|
-
});
|
|
2239
|
-
if (!IS_DOM) return;
|
|
2240
|
-
mo.observe(observeMutationsRoot, {
|
|
2241
|
-
childList: true,
|
|
2242
|
-
attributes: true,
|
|
2243
|
-
characterData: true,
|
|
2244
|
-
subtree: true
|
|
2245
|
-
});
|
|
2246
|
-
}
|
|
2247
|
-
function disconnect() {
|
|
2248
|
-
if (!mo) return;
|
|
2249
|
-
mo.disconnect();
|
|
2250
|
-
}
|
|
2251
|
-
|
|
2252
|
-
function styleParser (node) {
|
|
2253
|
-
var style = node.getAttribute('style');
|
|
2254
|
-
var val = [];
|
|
2255
|
-
|
|
2256
|
-
if (style) {
|
|
2257
|
-
val = style.split(';').reduce(function (acc, style) {
|
|
2258
|
-
var styles = style.split(':');
|
|
2259
|
-
var prop = styles[0];
|
|
2260
|
-
var value = styles.slice(1);
|
|
2261
|
-
|
|
2262
|
-
if (prop && value.length > 0) {
|
|
2263
|
-
acc[prop] = value.join(':').trim();
|
|
2264
|
-
}
|
|
2265
|
-
|
|
2266
|
-
return acc;
|
|
2267
|
-
}, {});
|
|
2268
|
-
}
|
|
2269
|
-
|
|
2270
|
-
return val;
|
|
2271
|
-
}
|
|
2272
|
-
|
|
2273
|
-
function classParser (node) {
|
|
2274
|
-
var existingPrefix = node.getAttribute('data-prefix');
|
|
2275
|
-
var existingIconName = node.getAttribute('data-icon');
|
|
2276
|
-
var innerText = node.innerText !== undefined ? node.innerText.trim() : '';
|
|
2277
|
-
var val = getCanonicalIcon(classArray(node));
|
|
2278
|
-
|
|
2279
|
-
if (!val.prefix) {
|
|
2280
|
-
val.prefix = getDefaultUsablePrefix();
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2283
|
-
if (existingPrefix && existingIconName) {
|
|
2284
|
-
val.prefix = existingPrefix;
|
|
2285
|
-
val.iconName = existingIconName;
|
|
2286
|
-
}
|
|
2287
|
-
|
|
2288
|
-
if (val.iconName && val.prefix) {
|
|
2289
|
-
return val;
|
|
2290
|
-
}
|
|
2291
|
-
|
|
2292
|
-
if (val.prefix && innerText.length > 0) {
|
|
2293
|
-
val.iconName = byLigature(val.prefix, node.innerText) || byUnicode(val.prefix, toHex(node.innerText));
|
|
2294
|
-
}
|
|
2295
|
-
|
|
2296
|
-
if (!val.iconName && config.autoFetchSvg && node.firstChild && node.firstChild.nodeType === Node.TEXT_NODE) {
|
|
2297
|
-
val.iconName = node.firstChild.data;
|
|
2298
|
-
}
|
|
2299
|
-
|
|
2300
|
-
return val;
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2303
|
-
function attributesParser (node) {
|
|
2304
|
-
var extraAttributes = toArray(node.attributes).reduce(function (acc, attr) {
|
|
2305
|
-
if (acc.name !== 'class' && acc.name !== 'style') {
|
|
2306
|
-
acc[attr.name] = attr.value;
|
|
2307
|
-
}
|
|
2308
|
-
|
|
2309
|
-
return acc;
|
|
2310
|
-
}, {});
|
|
2311
|
-
var title = node.getAttribute('title');
|
|
2312
|
-
var titleId = node.getAttribute('data-fa-title-id');
|
|
2313
|
-
|
|
2314
|
-
if (config.autoA11y) {
|
|
2315
|
-
if (title) {
|
|
2316
|
-
extraAttributes['aria-labelledby'] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
|
|
2317
|
-
} else {
|
|
2318
|
-
extraAttributes['aria-hidden'] = 'true';
|
|
2319
|
-
extraAttributes['focusable'] = 'false';
|
|
2320
|
-
}
|
|
2321
|
-
}
|
|
2322
|
-
|
|
2323
|
-
return extraAttributes;
|
|
2324
|
-
}
|
|
2325
|
-
|
|
2326
|
-
function blankMeta() {
|
|
2327
|
-
return {
|
|
2328
|
-
iconName: null,
|
|
2329
|
-
title: null,
|
|
2330
|
-
titleId: null,
|
|
2331
|
-
prefix: null,
|
|
2332
|
-
transform: meaninglessTransform,
|
|
2333
|
-
symbol: false,
|
|
2334
|
-
mask: {
|
|
2335
|
-
iconName: null,
|
|
2336
|
-
prefix: null,
|
|
2337
|
-
rest: []
|
|
2338
|
-
},
|
|
2339
|
-
maskId: null,
|
|
2340
|
-
extra: {
|
|
2341
|
-
classes: [],
|
|
2342
|
-
styles: {},
|
|
2343
|
-
attributes: {}
|
|
2344
|
-
}
|
|
2345
|
-
};
|
|
2346
|
-
}
|
|
2347
|
-
function parseMeta(node) {
|
|
2348
|
-
var parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
2349
|
-
styleParser: true
|
|
2350
|
-
};
|
|
2351
|
-
|
|
2352
|
-
var _classParser = classParser(node),
|
|
2353
|
-
iconName = _classParser.iconName,
|
|
2354
|
-
prefix = _classParser.prefix,
|
|
2355
|
-
extraClasses = _classParser.rest;
|
|
2356
|
-
|
|
2357
|
-
var extraAttributes = attributesParser(node);
|
|
2358
|
-
var pluginMeta = chainHooks('parseNodeAttributes', {}, node);
|
|
2359
|
-
var extraStyles = parser.styleParser ? styleParser(node) : [];
|
|
2360
|
-
return _objectSpread2$1({
|
|
2361
|
-
iconName: iconName,
|
|
2362
|
-
title: node.getAttribute('title'),
|
|
2363
|
-
titleId: node.getAttribute('data-fa-title-id'),
|
|
2364
|
-
prefix: prefix,
|
|
2365
|
-
transform: meaninglessTransform,
|
|
2366
|
-
mask: {
|
|
2367
|
-
iconName: null,
|
|
2368
|
-
prefix: null,
|
|
2369
|
-
rest: []
|
|
2370
|
-
},
|
|
2371
|
-
maskId: null,
|
|
2372
|
-
symbol: false,
|
|
2373
|
-
extra: {
|
|
2374
|
-
classes: extraClasses,
|
|
2375
|
-
styles: extraStyles,
|
|
2376
|
-
attributes: extraAttributes
|
|
2377
|
-
}
|
|
2378
|
-
}, pluginMeta);
|
|
2379
|
-
}
|
|
2380
|
-
|
|
2381
|
-
var styles$2 = namespace.styles;
|
|
2382
|
-
|
|
2383
|
-
function generateMutation(node) {
|
|
2384
|
-
var nodeMeta = config.autoReplaceSvg === 'nest' ? parseMeta(node, {
|
|
2385
|
-
styleParser: false
|
|
2386
|
-
}) : parseMeta(node);
|
|
2387
|
-
|
|
2388
|
-
if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {
|
|
2389
|
-
return callProvided('generateLayersText', node, nodeMeta);
|
|
2390
|
-
} else {
|
|
2391
|
-
return callProvided('generateSvgReplacementMutation', node, nodeMeta);
|
|
2392
|
-
}
|
|
2393
|
-
}
|
|
2394
|
-
|
|
2395
|
-
var knownPrefixes = new Set();
|
|
2396
|
-
FAMILIES.map(function (family) {
|
|
2397
|
-
knownPrefixes.add("fa-".concat(family));
|
|
2398
|
-
});
|
|
2399
|
-
Object.keys(PREFIX_TO_STYLE[FAMILY_CLASSIC]).map(knownPrefixes.add.bind(knownPrefixes));
|
|
2400
|
-
Object.keys(PREFIX_TO_STYLE[FAMILY_SHARP]).map(knownPrefixes.add.bind(knownPrefixes));
|
|
2401
|
-
knownPrefixes = _toConsumableArray$1(knownPrefixes);
|
|
2402
|
-
|
|
2403
|
-
function onTree(root) {
|
|
2404
|
-
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
2405
|
-
if (!IS_DOM) return Promise.resolve();
|
|
2406
|
-
var htmlClassList = DOCUMENT.documentElement.classList;
|
|
2407
|
-
|
|
2408
|
-
var hclAdd = function hclAdd(suffix) {
|
|
2409
|
-
return htmlClassList.add("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
|
|
2410
|
-
};
|
|
2411
|
-
|
|
2412
|
-
var hclRemove = function hclRemove(suffix) {
|
|
2413
|
-
return htmlClassList.remove("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
|
|
2414
|
-
};
|
|
2415
|
-
|
|
2416
|
-
var prefixes = config.autoFetchSvg ? knownPrefixes : FAMILIES.map(function (f) {
|
|
2417
|
-
return "fa-".concat(f);
|
|
2418
|
-
}).concat(Object.keys(styles$2));
|
|
2419
|
-
|
|
2420
|
-
if (!prefixes.includes('fa')) {
|
|
2421
|
-
prefixes.push('fa');
|
|
2422
|
-
}
|
|
2423
|
-
|
|
2424
|
-
var prefixesDomQuery = [".".concat(LAYERS_TEXT_CLASSNAME, ":not([").concat(DATA_FA_I2SVG, "])")].concat(prefixes.map(function (p) {
|
|
2425
|
-
return ".".concat(p, ":not([").concat(DATA_FA_I2SVG, "])");
|
|
2426
|
-
})).join(', ');
|
|
2427
|
-
|
|
2428
|
-
if (prefixesDomQuery.length === 0) {
|
|
2429
|
-
return Promise.resolve();
|
|
2430
|
-
}
|
|
2431
|
-
|
|
2432
|
-
var candidates = [];
|
|
2433
|
-
|
|
2434
|
-
try {
|
|
2435
|
-
candidates = toArray(root.querySelectorAll(prefixesDomQuery));
|
|
2436
|
-
} catch (e) {// noop
|
|
2437
|
-
}
|
|
2438
|
-
|
|
2439
|
-
if (candidates.length > 0) {
|
|
2440
|
-
hclAdd('pending');
|
|
2441
|
-
hclRemove('complete');
|
|
2442
|
-
} else {
|
|
2443
|
-
return Promise.resolve();
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2446
|
-
var mark = perf.begin('onTree');
|
|
2447
|
-
var mutations = candidates.reduce(function (acc, node) {
|
|
2448
|
-
try {
|
|
2449
|
-
var mutation = generateMutation(node);
|
|
2450
|
-
|
|
2451
|
-
if (mutation) {
|
|
2452
|
-
acc.push(mutation);
|
|
2453
|
-
}
|
|
2454
|
-
} catch (e) {
|
|
2455
|
-
if (!PRODUCTION$1) {
|
|
2456
|
-
if (e.name === 'MissingIcon') {
|
|
2457
|
-
console.error(e);
|
|
2458
|
-
}
|
|
2459
|
-
}
|
|
2460
|
-
}
|
|
2461
|
-
|
|
2462
|
-
return acc;
|
|
2463
|
-
}, []);
|
|
2464
|
-
return new Promise(function (resolve, reject) {
|
|
2465
|
-
Promise.all(mutations).then(function (resolvedMutations) {
|
|
2466
|
-
perform(resolvedMutations, function () {
|
|
2467
|
-
hclAdd('active');
|
|
2468
|
-
hclAdd('complete');
|
|
2469
|
-
hclRemove('pending');
|
|
2470
|
-
if (typeof callback === 'function') callback();
|
|
2471
|
-
mark();
|
|
2472
|
-
resolve();
|
|
2473
|
-
});
|
|
2474
|
-
}).catch(function (e) {
|
|
2475
|
-
mark();
|
|
2476
|
-
reject(e);
|
|
2477
|
-
});
|
|
2478
|
-
});
|
|
2479
|
-
}
|
|
2480
|
-
|
|
2481
|
-
function onNode(node) {
|
|
2482
|
-
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
2483
|
-
generateMutation(node).then(function (mutation) {
|
|
2484
|
-
if (mutation) {
|
|
2485
|
-
perform([mutation], callback);
|
|
2486
|
-
}
|
|
2487
|
-
});
|
|
2488
|
-
}
|
|
2489
|
-
|
|
2490
|
-
function resolveIcons(next) {
|
|
2491
|
-
return function (maybeIconDefinition) {
|
|
2492
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2493
|
-
var iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});
|
|
2494
|
-
var mask = params.mask;
|
|
2495
|
-
|
|
2496
|
-
if (mask) {
|
|
2497
|
-
mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});
|
|
2498
|
-
}
|
|
2499
|
-
|
|
2500
|
-
return next(iconDefinition, _objectSpread2$1(_objectSpread2$1({}, params), {}, {
|
|
2501
|
-
mask: mask
|
|
2502
|
-
}));
|
|
2503
|
-
};
|
|
2504
|
-
}
|
|
2505
|
-
|
|
2506
|
-
var render = function render(iconDefinition) {
|
|
2507
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2508
|
-
var _params$transform = params.transform,
|
|
2509
|
-
transform = _params$transform === void 0 ? meaninglessTransform : _params$transform,
|
|
2510
|
-
_params$symbol = params.symbol,
|
|
2511
|
-
symbol = _params$symbol === void 0 ? false : _params$symbol,
|
|
2512
|
-
_params$mask = params.mask,
|
|
2513
|
-
mask = _params$mask === void 0 ? null : _params$mask,
|
|
2514
|
-
_params$maskId = params.maskId,
|
|
2515
|
-
maskId = _params$maskId === void 0 ? null : _params$maskId,
|
|
2516
|
-
_params$title = params.title,
|
|
2517
|
-
title = _params$title === void 0 ? null : _params$title,
|
|
2518
|
-
_params$titleId = params.titleId,
|
|
2519
|
-
titleId = _params$titleId === void 0 ? null : _params$titleId,
|
|
2520
|
-
_params$classes = params.classes,
|
|
2521
|
-
classes = _params$classes === void 0 ? [] : _params$classes,
|
|
2522
|
-
_params$attributes = params.attributes,
|
|
2523
|
-
attributes = _params$attributes === void 0 ? {} : _params$attributes,
|
|
2524
|
-
_params$styles = params.styles,
|
|
2525
|
-
styles = _params$styles === void 0 ? {} : _params$styles;
|
|
2526
|
-
if (!iconDefinition) return;
|
|
2527
|
-
var prefix = iconDefinition.prefix,
|
|
2528
|
-
iconName = iconDefinition.iconName,
|
|
2529
|
-
icon = iconDefinition.icon;
|
|
2530
|
-
return domVariants(_objectSpread2$1({
|
|
2531
|
-
type: 'icon'
|
|
2532
|
-
}, iconDefinition), function () {
|
|
2533
|
-
callHooks('beforeDOMElementCreation', {
|
|
2534
|
-
iconDefinition: iconDefinition,
|
|
2535
|
-
params: params
|
|
2536
|
-
});
|
|
2537
|
-
|
|
2538
|
-
if (config.autoA11y) {
|
|
2539
|
-
if (title) {
|
|
2540
|
-
attributes['aria-labelledby'] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
|
|
2541
|
-
} else {
|
|
2542
|
-
attributes['aria-hidden'] = 'true';
|
|
2543
|
-
attributes['focusable'] = 'false';
|
|
2544
|
-
}
|
|
2545
|
-
}
|
|
2546
|
-
|
|
2547
|
-
return makeInlineSvgAbstract({
|
|
2548
|
-
icons: {
|
|
2549
|
-
main: asFoundIcon(icon),
|
|
2550
|
-
mask: mask ? asFoundIcon(mask.icon) : {
|
|
2551
|
-
found: false,
|
|
2552
|
-
width: null,
|
|
2553
|
-
height: null,
|
|
2554
|
-
icon: {}
|
|
2555
|
-
}
|
|
2556
|
-
},
|
|
2557
|
-
prefix: prefix,
|
|
2558
|
-
iconName: iconName,
|
|
2559
|
-
transform: _objectSpread2$1(_objectSpread2$1({}, meaninglessTransform), transform),
|
|
2560
|
-
symbol: symbol,
|
|
2561
|
-
title: title,
|
|
2562
|
-
maskId: maskId,
|
|
2563
|
-
titleId: titleId,
|
|
2564
|
-
extra: {
|
|
2565
|
-
attributes: attributes,
|
|
2566
|
-
styles: styles,
|
|
2567
|
-
classes: classes
|
|
2568
|
-
}
|
|
2569
|
-
});
|
|
2570
|
-
});
|
|
2571
|
-
};
|
|
2572
|
-
var ReplaceElements = {
|
|
2573
|
-
mixout: function mixout() {
|
|
2574
|
-
return {
|
|
2575
|
-
icon: resolveIcons(render)
|
|
2576
|
-
};
|
|
2577
|
-
},
|
|
2578
|
-
hooks: function hooks() {
|
|
2579
|
-
return {
|
|
2580
|
-
mutationObserverCallbacks: function mutationObserverCallbacks(accumulator) {
|
|
2581
|
-
accumulator.treeCallback = onTree;
|
|
2582
|
-
accumulator.nodeCallback = onNode;
|
|
2583
|
-
return accumulator;
|
|
2584
|
-
}
|
|
2585
|
-
};
|
|
2586
|
-
},
|
|
2587
|
-
provides: function provides(providers$$1) {
|
|
2588
|
-
providers$$1.i2svg = function (params) {
|
|
2589
|
-
var _params$node = params.node,
|
|
2590
|
-
node = _params$node === void 0 ? DOCUMENT : _params$node,
|
|
2591
|
-
_params$callback = params.callback,
|
|
2592
|
-
callback = _params$callback === void 0 ? function () {} : _params$callback;
|
|
2593
|
-
return onTree(node, callback);
|
|
2594
|
-
};
|
|
2595
|
-
|
|
2596
|
-
providers$$1.generateSvgReplacementMutation = function (node, nodeMeta) {
|
|
2597
|
-
var iconName = nodeMeta.iconName,
|
|
2598
|
-
title = nodeMeta.title,
|
|
2599
|
-
titleId = nodeMeta.titleId,
|
|
2600
|
-
prefix = nodeMeta.prefix,
|
|
2601
|
-
transform = nodeMeta.transform,
|
|
2602
|
-
symbol = nodeMeta.symbol,
|
|
2603
|
-
mask = nodeMeta.mask,
|
|
2604
|
-
maskId = nodeMeta.maskId,
|
|
2605
|
-
extra = nodeMeta.extra;
|
|
2606
|
-
return new Promise(function (resolve, reject) {
|
|
2607
|
-
Promise.all([findIcon(iconName, prefix), mask.iconName ? findIcon(mask.iconName, mask.prefix) : Promise.resolve({
|
|
2608
|
-
found: false,
|
|
2609
|
-
width: 512,
|
|
2610
|
-
height: 512,
|
|
2611
|
-
icon: {}
|
|
2612
|
-
})]).then(function (_ref) {
|
|
2613
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
2614
|
-
main = _ref2[0],
|
|
2615
|
-
mask = _ref2[1];
|
|
2616
|
-
|
|
2617
|
-
resolve([node, makeInlineSvgAbstract({
|
|
2618
|
-
icons: {
|
|
2619
|
-
main: main,
|
|
2620
|
-
mask: mask
|
|
2621
|
-
},
|
|
2622
|
-
prefix: prefix,
|
|
2623
|
-
iconName: iconName,
|
|
2624
|
-
transform: transform,
|
|
2625
|
-
symbol: symbol,
|
|
2626
|
-
maskId: maskId,
|
|
2627
|
-
title: title,
|
|
2628
|
-
titleId: titleId,
|
|
2629
|
-
extra: extra,
|
|
2630
|
-
watchable: true
|
|
2631
|
-
})]);
|
|
2632
|
-
}).catch(reject);
|
|
2633
|
-
});
|
|
2634
|
-
};
|
|
2635
|
-
|
|
2636
|
-
providers$$1.generateAbstractIcon = function (_ref3) {
|
|
2637
|
-
var children = _ref3.children,
|
|
2638
|
-
attributes = _ref3.attributes,
|
|
2639
|
-
main = _ref3.main,
|
|
2640
|
-
transform = _ref3.transform,
|
|
2641
|
-
styles = _ref3.styles;
|
|
2642
|
-
var styleString = joinStyles(styles);
|
|
2643
|
-
|
|
2644
|
-
if (styleString.length > 0) {
|
|
2645
|
-
attributes['style'] = styleString;
|
|
2646
|
-
}
|
|
2647
|
-
|
|
2648
|
-
var nextChild;
|
|
2649
|
-
|
|
2650
|
-
if (transformIsMeaningful(transform)) {
|
|
2651
|
-
nextChild = callProvided('generateAbstractTransformGrouping', {
|
|
2652
|
-
main: main,
|
|
2653
|
-
transform: transform,
|
|
2654
|
-
containerWidth: main.width,
|
|
2655
|
-
iconWidth: main.width
|
|
2656
|
-
});
|
|
2657
|
-
}
|
|
2658
|
-
|
|
2659
|
-
children.push(nextChild || main.icon);
|
|
2660
|
-
return {
|
|
2661
|
-
children: children,
|
|
2662
|
-
attributes: attributes
|
|
2663
|
-
};
|
|
2664
|
-
};
|
|
2665
|
-
}
|
|
2666
|
-
};
|
|
2667
|
-
|
|
2668
|
-
var Layers = {
|
|
2669
|
-
mixout: function mixout() {
|
|
2670
|
-
return {
|
|
2671
|
-
layer: function layer(assembler) {
|
|
2672
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2673
|
-
var _params$classes = params.classes,
|
|
2674
|
-
classes = _params$classes === void 0 ? [] : _params$classes;
|
|
2675
|
-
return domVariants({
|
|
2676
|
-
type: 'layer'
|
|
2677
|
-
}, function () {
|
|
2678
|
-
callHooks('beforeDOMElementCreation', {
|
|
2679
|
-
assembler: assembler,
|
|
2680
|
-
params: params
|
|
2681
|
-
});
|
|
2682
|
-
var children = [];
|
|
2683
|
-
assembler(function (args) {
|
|
2684
|
-
Array.isArray(args) ? args.map(function (a) {
|
|
2685
|
-
children = children.concat(a.abstract);
|
|
2686
|
-
}) : children = children.concat(args.abstract);
|
|
2687
|
-
});
|
|
2688
|
-
return [{
|
|
2689
|
-
tag: 'span',
|
|
2690
|
-
attributes: {
|
|
2691
|
-
class: ["".concat(config.cssPrefix, "-layers")].concat(_toConsumableArray$1(classes)).join(' ')
|
|
2692
|
-
},
|
|
2693
|
-
children: children
|
|
2694
|
-
}];
|
|
2695
|
-
});
|
|
2696
|
-
}
|
|
2697
|
-
};
|
|
2698
|
-
}
|
|
2699
|
-
};
|
|
2700
|
-
|
|
2701
|
-
var LayersCounter = {
|
|
2702
|
-
mixout: function mixout() {
|
|
2703
|
-
return {
|
|
2704
|
-
counter: function counter(content) {
|
|
2705
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2706
|
-
var _params$title = params.title,
|
|
2707
|
-
title = _params$title === void 0 ? null : _params$title,
|
|
2708
|
-
_params$classes = params.classes,
|
|
2709
|
-
classes = _params$classes === void 0 ? [] : _params$classes,
|
|
2710
|
-
_params$attributes = params.attributes,
|
|
2711
|
-
attributes = _params$attributes === void 0 ? {} : _params$attributes,
|
|
2712
|
-
_params$styles = params.styles,
|
|
2713
|
-
styles = _params$styles === void 0 ? {} : _params$styles;
|
|
2714
|
-
return domVariants({
|
|
2715
|
-
type: 'counter',
|
|
2716
|
-
content: content
|
|
2717
|
-
}, function () {
|
|
2718
|
-
callHooks('beforeDOMElementCreation', {
|
|
2719
|
-
content: content,
|
|
2720
|
-
params: params
|
|
2721
|
-
});
|
|
2722
|
-
return makeLayersCounterAbstract({
|
|
2723
|
-
content: content.toString(),
|
|
2724
|
-
title: title,
|
|
2725
|
-
extra: {
|
|
2726
|
-
attributes: attributes,
|
|
2727
|
-
styles: styles,
|
|
2728
|
-
classes: ["".concat(config.cssPrefix, "-layers-counter")].concat(_toConsumableArray$1(classes))
|
|
2729
|
-
}
|
|
2730
|
-
});
|
|
2731
|
-
});
|
|
2732
|
-
}
|
|
2733
|
-
};
|
|
2734
|
-
}
|
|
2735
|
-
};
|
|
2736
|
-
|
|
2737
|
-
var LayersText = {
|
|
2738
|
-
mixout: function mixout() {
|
|
2739
|
-
return {
|
|
2740
|
-
text: function text(content) {
|
|
2741
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2742
|
-
var _params$transform = params.transform,
|
|
2743
|
-
transform = _params$transform === void 0 ? meaninglessTransform : _params$transform,
|
|
2744
|
-
_params$title = params.title,
|
|
2745
|
-
title = _params$title === void 0 ? null : _params$title,
|
|
2746
|
-
_params$classes = params.classes,
|
|
2747
|
-
classes = _params$classes === void 0 ? [] : _params$classes,
|
|
2748
|
-
_params$attributes = params.attributes,
|
|
2749
|
-
attributes = _params$attributes === void 0 ? {} : _params$attributes,
|
|
2750
|
-
_params$styles = params.styles,
|
|
2751
|
-
styles = _params$styles === void 0 ? {} : _params$styles;
|
|
2752
|
-
return domVariants({
|
|
2753
|
-
type: 'text',
|
|
2754
|
-
content: content
|
|
2755
|
-
}, function () {
|
|
2756
|
-
callHooks('beforeDOMElementCreation', {
|
|
2757
|
-
content: content,
|
|
2758
|
-
params: params
|
|
2759
|
-
});
|
|
2760
|
-
return makeLayersTextAbstract({
|
|
2761
|
-
content: content,
|
|
2762
|
-
transform: _objectSpread2$1(_objectSpread2$1({}, meaninglessTransform), transform),
|
|
2763
|
-
title: title,
|
|
2764
|
-
extra: {
|
|
2765
|
-
attributes: attributes,
|
|
2766
|
-
styles: styles,
|
|
2767
|
-
classes: ["".concat(config.cssPrefix, "-layers-text")].concat(_toConsumableArray$1(classes))
|
|
2768
|
-
}
|
|
2769
|
-
});
|
|
2770
|
-
});
|
|
2771
|
-
}
|
|
2772
|
-
};
|
|
2773
|
-
},
|
|
2774
|
-
provides: function provides(providers$$1) {
|
|
2775
|
-
providers$$1.generateLayersText = function (node, nodeMeta) {
|
|
2776
|
-
var title = nodeMeta.title,
|
|
2777
|
-
transform = nodeMeta.transform,
|
|
2778
|
-
extra = nodeMeta.extra;
|
|
2779
|
-
var width = null;
|
|
2780
|
-
var height = null;
|
|
2781
|
-
|
|
2782
|
-
if (IS_IE) {
|
|
2783
|
-
var computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);
|
|
2784
|
-
var boundingClientRect = node.getBoundingClientRect();
|
|
2785
|
-
width = boundingClientRect.width / computedFontSize;
|
|
2786
|
-
height = boundingClientRect.height / computedFontSize;
|
|
2787
|
-
}
|
|
2788
|
-
|
|
2789
|
-
if (config.autoA11y && !title) {
|
|
2790
|
-
extra.attributes['aria-hidden'] = 'true';
|
|
2791
|
-
}
|
|
2792
|
-
|
|
2793
|
-
return Promise.resolve([node, makeLayersTextAbstract({
|
|
2794
|
-
content: node.innerHTML,
|
|
2795
|
-
width: width,
|
|
2796
|
-
height: height,
|
|
2797
|
-
transform: transform,
|
|
2798
|
-
title: title,
|
|
2799
|
-
extra: extra,
|
|
2800
|
-
watchable: true
|
|
2801
|
-
})]);
|
|
2802
|
-
};
|
|
2803
|
-
}
|
|
2804
|
-
};
|
|
2805
|
-
|
|
2806
|
-
var CLEAN_CONTENT_PATTERN = new RegExp("\"", 'ug');
|
|
2807
|
-
var SECONDARY_UNICODE_RANGE = [1105920, 1112319];
|
|
2808
|
-
function hexValueFromContent(content) {
|
|
2809
|
-
var cleaned = content.replace(CLEAN_CONTENT_PATTERN, '');
|
|
2810
|
-
var codePoint = codePointAt(cleaned, 0);
|
|
2811
|
-
var isPrependTen = codePoint >= SECONDARY_UNICODE_RANGE[0] && codePoint <= SECONDARY_UNICODE_RANGE[1];
|
|
2812
|
-
var isDoubled = cleaned.length === 2 ? cleaned[0] === cleaned[1] : false;
|
|
2813
|
-
return {
|
|
2814
|
-
value: isDoubled ? toHex(cleaned[0]) : toHex(cleaned),
|
|
2815
|
-
isSecondary: isPrependTen || isDoubled
|
|
2816
|
-
};
|
|
2817
|
-
}
|
|
2818
|
-
|
|
2819
|
-
function replaceForPosition(node, position) {
|
|
2820
|
-
var pendingAttribute = "".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(':', '-'));
|
|
2821
|
-
return new Promise(function (resolve, reject) {
|
|
2822
|
-
if (node.getAttribute(pendingAttribute) !== null) {
|
|
2823
|
-
// This node is already being processed
|
|
2824
|
-
return resolve();
|
|
2825
|
-
}
|
|
2826
|
-
|
|
2827
|
-
var children = toArray(node.children);
|
|
2828
|
-
var alreadyProcessedPseudoElement = children.filter(function (c) {
|
|
2829
|
-
return c.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position;
|
|
2830
|
-
})[0];
|
|
2831
|
-
var styles = WINDOW.getComputedStyle(node, position);
|
|
2832
|
-
var fontFamily = styles.getPropertyValue('font-family').match(FONT_FAMILY_PATTERN);
|
|
2833
|
-
var fontWeight = styles.getPropertyValue('font-weight');
|
|
2834
|
-
var content = styles.getPropertyValue('content');
|
|
2835
|
-
|
|
2836
|
-
if (alreadyProcessedPseudoElement && !fontFamily) {
|
|
2837
|
-
// If we've already processed it but the current computed style does not result in a font-family,
|
|
2838
|
-
// that probably means that a class name that was previously present to make the icon has been
|
|
2839
|
-
// removed. So we now should delete the icon.
|
|
2840
|
-
node.removeChild(alreadyProcessedPseudoElement);
|
|
2841
|
-
return resolve();
|
|
2842
|
-
} else if (fontFamily && content !== 'none' && content !== '') {
|
|
2843
|
-
var _content = styles.getPropertyValue('content');
|
|
2844
|
-
|
|
2845
|
-
var family = ~['Sharp'].indexOf(fontFamily[2]) ? FAMILY_SHARP : FAMILY_CLASSIC;
|
|
2846
|
-
var prefix = ~['Solid', 'Regular', 'Light', 'Thin', 'Duotone', 'Brands', 'Kit'].indexOf(fontFamily[2]) ? STYLE_TO_PREFIX[family][fontFamily[2].toLowerCase()] : FONT_WEIGHT_TO_PREFIX[family][fontWeight];
|
|
2847
|
-
|
|
2848
|
-
var _hexValueFromContent = hexValueFromContent(_content),
|
|
2849
|
-
hexValue = _hexValueFromContent.value,
|
|
2850
|
-
isSecondary = _hexValueFromContent.isSecondary;
|
|
2851
|
-
|
|
2852
|
-
var isV4 = fontFamily[0].startsWith('FontAwesome');
|
|
2853
|
-
var iconName = byUnicode(prefix, hexValue);
|
|
2854
|
-
var iconIdentifier = iconName;
|
|
2855
|
-
|
|
2856
|
-
if (isV4) {
|
|
2857
|
-
var iconName4 = byOldUnicode(hexValue);
|
|
2858
|
-
|
|
2859
|
-
if (iconName4.iconName && iconName4.prefix) {
|
|
2860
|
-
iconName = iconName4.iconName;
|
|
2861
|
-
prefix = iconName4.prefix;
|
|
2862
|
-
}
|
|
2863
|
-
} // Only convert the pseudo element in this ::before/::after position into an icon if we haven't
|
|
2864
|
-
// already done so with the same prefix and iconName
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
if (iconName && !isSecondary && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) {
|
|
2868
|
-
node.setAttribute(pendingAttribute, iconIdentifier);
|
|
2869
|
-
|
|
2870
|
-
if (alreadyProcessedPseudoElement) {
|
|
2871
|
-
// Delete the old one, since we're replacing it with a new one
|
|
2872
|
-
node.removeChild(alreadyProcessedPseudoElement);
|
|
2873
|
-
}
|
|
2874
|
-
|
|
2875
|
-
var meta = blankMeta();
|
|
2876
|
-
var extra = meta.extra;
|
|
2877
|
-
extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position;
|
|
2878
|
-
findIcon(iconName, prefix).then(function (main) {
|
|
2879
|
-
var _abstract = makeInlineSvgAbstract(_objectSpread2$1(_objectSpread2$1({}, meta), {}, {
|
|
2880
|
-
icons: {
|
|
2881
|
-
main: main,
|
|
2882
|
-
mask: emptyCanonicalIcon()
|
|
2883
|
-
},
|
|
2884
|
-
prefix: prefix,
|
|
2885
|
-
iconName: iconIdentifier,
|
|
2886
|
-
extra: extra,
|
|
2887
|
-
watchable: true
|
|
2888
|
-
}));
|
|
2889
|
-
|
|
2890
|
-
var element = DOCUMENT.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
2891
|
-
|
|
2892
|
-
if (position === '::before') {
|
|
2893
|
-
node.insertBefore(element, node.firstChild);
|
|
2894
|
-
} else {
|
|
2895
|
-
node.appendChild(element);
|
|
2896
|
-
}
|
|
2897
|
-
|
|
2898
|
-
element.outerHTML = _abstract.map(function (a) {
|
|
2899
|
-
return toHtml(a);
|
|
2900
|
-
}).join('\n');
|
|
2901
|
-
node.removeAttribute(pendingAttribute);
|
|
2902
|
-
resolve();
|
|
2903
|
-
}).catch(reject);
|
|
2904
|
-
} else {
|
|
2905
|
-
resolve();
|
|
2906
|
-
}
|
|
2907
|
-
} else {
|
|
2908
|
-
resolve();
|
|
2909
|
-
}
|
|
2910
|
-
});
|
|
2911
|
-
}
|
|
2912
|
-
|
|
2913
|
-
function replace(node) {
|
|
2914
|
-
return Promise.all([replaceForPosition(node, '::before'), replaceForPosition(node, '::after')]);
|
|
2915
|
-
}
|
|
2916
|
-
|
|
2917
|
-
function processable(node) {
|
|
2918
|
-
return node.parentNode !== document.head && !~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(node.tagName.toUpperCase()) && !node.getAttribute(DATA_FA_PSEUDO_ELEMENT) && (!node.parentNode || node.parentNode.tagName !== 'svg');
|
|
2919
|
-
}
|
|
2920
|
-
|
|
2921
|
-
function searchPseudoElements(root) {
|
|
2922
|
-
if (!IS_DOM) return;
|
|
2923
|
-
return new Promise(function (resolve, reject) {
|
|
2924
|
-
var operations = toArray(root.querySelectorAll('*')).filter(processable).map(replace);
|
|
2925
|
-
var end = perf.begin('searchPseudoElements');
|
|
2926
|
-
disableObservation();
|
|
2927
|
-
Promise.all(operations).then(function () {
|
|
2928
|
-
end();
|
|
2929
|
-
enableObservation();
|
|
2930
|
-
resolve();
|
|
2931
|
-
}).catch(function () {
|
|
2932
|
-
end();
|
|
2933
|
-
enableObservation();
|
|
2934
|
-
reject();
|
|
2935
|
-
});
|
|
2936
|
-
});
|
|
2937
|
-
}
|
|
2938
|
-
|
|
2939
|
-
var PseudoElements = {
|
|
2940
|
-
hooks: function hooks() {
|
|
2941
|
-
return {
|
|
2942
|
-
mutationObserverCallbacks: function mutationObserverCallbacks(accumulator) {
|
|
2943
|
-
accumulator.pseudoElementsCallback = searchPseudoElements;
|
|
2944
|
-
return accumulator;
|
|
2945
|
-
}
|
|
2946
|
-
};
|
|
2947
|
-
},
|
|
2948
|
-
provides: function provides(providers$$1) {
|
|
2949
|
-
providers$$1.pseudoElements2svg = function (params) {
|
|
2950
|
-
var _params$node = params.node,
|
|
2951
|
-
node = _params$node === void 0 ? DOCUMENT : _params$node;
|
|
2952
|
-
|
|
2953
|
-
if (config.searchPseudoElements) {
|
|
2954
|
-
searchPseudoElements(node);
|
|
2955
|
-
}
|
|
2956
|
-
};
|
|
2957
|
-
}
|
|
2958
|
-
};
|
|
2959
|
-
|
|
2960
|
-
var _unwatched = false;
|
|
2961
|
-
var MutationObserver$1 = {
|
|
2962
|
-
mixout: function mixout() {
|
|
2963
|
-
return {
|
|
2964
|
-
dom: {
|
|
2965
|
-
unwatch: function unwatch() {
|
|
2966
|
-
disableObservation();
|
|
2967
|
-
_unwatched = true;
|
|
2968
|
-
}
|
|
2969
|
-
}
|
|
2970
|
-
};
|
|
2971
|
-
},
|
|
2972
|
-
hooks: function hooks() {
|
|
2973
|
-
return {
|
|
2974
|
-
bootstrap: function bootstrap() {
|
|
2975
|
-
observe(chainHooks('mutationObserverCallbacks', {}));
|
|
2976
|
-
},
|
|
2977
|
-
noAuto: function noAuto() {
|
|
2978
|
-
disconnect();
|
|
2979
|
-
},
|
|
2980
|
-
watch: function watch(params) {
|
|
2981
|
-
var observeMutationsRoot = params.observeMutationsRoot;
|
|
2982
|
-
|
|
2983
|
-
if (_unwatched) {
|
|
2984
|
-
enableObservation();
|
|
2985
|
-
} else {
|
|
2986
|
-
observe(chainHooks('mutationObserverCallbacks', {
|
|
2987
|
-
observeMutationsRoot: observeMutationsRoot
|
|
2988
|
-
}));
|
|
2989
|
-
}
|
|
2990
|
-
}
|
|
2991
|
-
};
|
|
2992
|
-
}
|
|
2993
|
-
};
|
|
2994
|
-
|
|
2995
|
-
var parseTransformString = function parseTransformString(transformString) {
|
|
2996
|
-
var transform = {
|
|
2997
|
-
size: 16,
|
|
2998
|
-
x: 0,
|
|
2999
|
-
y: 0,
|
|
3000
|
-
flipX: false,
|
|
3001
|
-
flipY: false,
|
|
3002
|
-
rotate: 0
|
|
3003
|
-
};
|
|
3004
|
-
return transformString.toLowerCase().split(' ').reduce(function (acc, n) {
|
|
3005
|
-
var parts = n.toLowerCase().split('-');
|
|
3006
|
-
var first = parts[0];
|
|
3007
|
-
var rest = parts.slice(1).join('-');
|
|
3008
|
-
|
|
3009
|
-
if (first && rest === 'h') {
|
|
3010
|
-
acc.flipX = true;
|
|
3011
|
-
return acc;
|
|
3012
|
-
}
|
|
3013
|
-
|
|
3014
|
-
if (first && rest === 'v') {
|
|
3015
|
-
acc.flipY = true;
|
|
3016
|
-
return acc;
|
|
3017
|
-
}
|
|
3018
|
-
|
|
3019
|
-
rest = parseFloat(rest);
|
|
3020
|
-
|
|
3021
|
-
if (isNaN(rest)) {
|
|
3022
|
-
return acc;
|
|
3023
|
-
}
|
|
3024
|
-
|
|
3025
|
-
switch (first) {
|
|
3026
|
-
case 'grow':
|
|
3027
|
-
acc.size = acc.size + rest;
|
|
3028
|
-
break;
|
|
3029
|
-
|
|
3030
|
-
case 'shrink':
|
|
3031
|
-
acc.size = acc.size - rest;
|
|
3032
|
-
break;
|
|
3033
|
-
|
|
3034
|
-
case 'left':
|
|
3035
|
-
acc.x = acc.x - rest;
|
|
3036
|
-
break;
|
|
3037
|
-
|
|
3038
|
-
case 'right':
|
|
3039
|
-
acc.x = acc.x + rest;
|
|
3040
|
-
break;
|
|
3041
|
-
|
|
3042
|
-
case 'up':
|
|
3043
|
-
acc.y = acc.y - rest;
|
|
3044
|
-
break;
|
|
3045
|
-
|
|
3046
|
-
case 'down':
|
|
3047
|
-
acc.y = acc.y + rest;
|
|
3048
|
-
break;
|
|
3049
|
-
|
|
3050
|
-
case 'rotate':
|
|
3051
|
-
acc.rotate = acc.rotate + rest;
|
|
3052
|
-
break;
|
|
3053
|
-
}
|
|
3054
|
-
|
|
3055
|
-
return acc;
|
|
3056
|
-
}, transform);
|
|
3057
|
-
};
|
|
3058
|
-
var PowerTransforms = {
|
|
3059
|
-
mixout: function mixout() {
|
|
3060
|
-
return {
|
|
3061
|
-
parse: {
|
|
3062
|
-
transform: function transform(transformString) {
|
|
3063
|
-
return parseTransformString(transformString);
|
|
3064
|
-
}
|
|
3065
|
-
}
|
|
3066
|
-
};
|
|
3067
|
-
},
|
|
3068
|
-
hooks: function hooks() {
|
|
3069
|
-
return {
|
|
3070
|
-
parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
|
|
3071
|
-
var transformString = node.getAttribute('data-fa-transform');
|
|
3072
|
-
|
|
3073
|
-
if (transformString) {
|
|
3074
|
-
accumulator.transform = parseTransformString(transformString);
|
|
3075
|
-
}
|
|
3076
|
-
|
|
3077
|
-
return accumulator;
|
|
3078
|
-
}
|
|
3079
|
-
};
|
|
3080
|
-
},
|
|
3081
|
-
provides: function provides(providers) {
|
|
3082
|
-
providers.generateAbstractTransformGrouping = function (_ref) {
|
|
3083
|
-
var main = _ref.main,
|
|
3084
|
-
transform = _ref.transform,
|
|
3085
|
-
containerWidth = _ref.containerWidth,
|
|
3086
|
-
iconWidth = _ref.iconWidth;
|
|
3087
|
-
var outer = {
|
|
3088
|
-
transform: "translate(".concat(containerWidth / 2, " 256)")
|
|
3089
|
-
};
|
|
3090
|
-
var innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
|
|
3091
|
-
var innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
|
|
3092
|
-
var innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
|
|
3093
|
-
var inner = {
|
|
3094
|
-
transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
|
|
3095
|
-
};
|
|
3096
|
-
var path = {
|
|
3097
|
-
transform: "translate(".concat(iconWidth / 2 * -1, " -256)")
|
|
3098
|
-
};
|
|
3099
|
-
var operations = {
|
|
3100
|
-
outer: outer,
|
|
3101
|
-
inner: inner,
|
|
3102
|
-
path: path
|
|
3103
|
-
};
|
|
3104
|
-
return {
|
|
3105
|
-
tag: 'g',
|
|
3106
|
-
attributes: _objectSpread2$1({}, operations.outer),
|
|
3107
|
-
children: [{
|
|
3108
|
-
tag: 'g',
|
|
3109
|
-
attributes: _objectSpread2$1({}, operations.inner),
|
|
3110
|
-
children: [{
|
|
3111
|
-
tag: main.icon.tag,
|
|
3112
|
-
children: main.icon.children,
|
|
3113
|
-
attributes: _objectSpread2$1(_objectSpread2$1({}, main.icon.attributes), operations.path)
|
|
3114
|
-
}]
|
|
3115
|
-
}]
|
|
3116
|
-
};
|
|
3117
|
-
};
|
|
3118
|
-
}
|
|
3119
|
-
};
|
|
3120
|
-
|
|
3121
|
-
var ALL_SPACE = {
|
|
3122
|
-
x: 0,
|
|
3123
|
-
y: 0,
|
|
3124
|
-
width: '100%',
|
|
3125
|
-
height: '100%'
|
|
3126
|
-
};
|
|
3127
|
-
|
|
3128
|
-
function fillBlack(_abstract) {
|
|
3129
|
-
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
3130
|
-
|
|
3131
|
-
if (_abstract.attributes && (_abstract.attributes.fill || force)) {
|
|
3132
|
-
_abstract.attributes.fill = 'black';
|
|
3133
|
-
}
|
|
3134
|
-
|
|
3135
|
-
return _abstract;
|
|
3136
|
-
}
|
|
3137
|
-
|
|
3138
|
-
function deGroup(_abstract2) {
|
|
3139
|
-
if (_abstract2.tag === 'g') {
|
|
3140
|
-
return _abstract2.children;
|
|
3141
|
-
} else {
|
|
3142
|
-
return [_abstract2];
|
|
3143
|
-
}
|
|
3144
|
-
}
|
|
3145
|
-
|
|
3146
|
-
var Masks = {
|
|
3147
|
-
hooks: function hooks() {
|
|
3148
|
-
return {
|
|
3149
|
-
parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
|
|
3150
|
-
var maskData = node.getAttribute('data-fa-mask');
|
|
3151
|
-
var mask = !maskData ? emptyCanonicalIcon() : getCanonicalIcon(maskData.split(' ').map(function (i) {
|
|
3152
|
-
return i.trim();
|
|
3153
|
-
}));
|
|
3154
|
-
|
|
3155
|
-
if (!mask.prefix) {
|
|
3156
|
-
mask.prefix = getDefaultUsablePrefix();
|
|
3157
|
-
}
|
|
3158
|
-
|
|
3159
|
-
accumulator.mask = mask;
|
|
3160
|
-
accumulator.maskId = node.getAttribute('data-fa-mask-id');
|
|
3161
|
-
return accumulator;
|
|
3162
|
-
}
|
|
3163
|
-
};
|
|
3164
|
-
},
|
|
3165
|
-
provides: function provides(providers) {
|
|
3166
|
-
providers.generateAbstractMask = function (_ref) {
|
|
3167
|
-
var children = _ref.children,
|
|
3168
|
-
attributes = _ref.attributes,
|
|
3169
|
-
main = _ref.main,
|
|
3170
|
-
mask = _ref.mask,
|
|
3171
|
-
explicitMaskId = _ref.maskId,
|
|
3172
|
-
transform = _ref.transform;
|
|
3173
|
-
var mainWidth = main.width,
|
|
3174
|
-
mainPath = main.icon;
|
|
3175
|
-
var maskWidth = mask.width,
|
|
3176
|
-
maskPath = mask.icon;
|
|
3177
|
-
var trans = transformForSvg({
|
|
3178
|
-
transform: transform,
|
|
3179
|
-
containerWidth: maskWidth,
|
|
3180
|
-
iconWidth: mainWidth
|
|
3181
|
-
});
|
|
3182
|
-
var maskRect = {
|
|
3183
|
-
tag: 'rect',
|
|
3184
|
-
attributes: _objectSpread2$1(_objectSpread2$1({}, ALL_SPACE), {}, {
|
|
3185
|
-
fill: 'white'
|
|
3186
|
-
})
|
|
3187
|
-
};
|
|
3188
|
-
var maskInnerGroupChildrenMixin = mainPath.children ? {
|
|
3189
|
-
children: mainPath.children.map(fillBlack)
|
|
3190
|
-
} : {};
|
|
3191
|
-
var maskInnerGroup = {
|
|
3192
|
-
tag: 'g',
|
|
3193
|
-
attributes: _objectSpread2$1({}, trans.inner),
|
|
3194
|
-
children: [fillBlack(_objectSpread2$1({
|
|
3195
|
-
tag: mainPath.tag,
|
|
3196
|
-
attributes: _objectSpread2$1(_objectSpread2$1({}, mainPath.attributes), trans.path)
|
|
3197
|
-
}, maskInnerGroupChildrenMixin))]
|
|
3198
|
-
};
|
|
3199
|
-
var maskOuterGroup = {
|
|
3200
|
-
tag: 'g',
|
|
3201
|
-
attributes: _objectSpread2$1({}, trans.outer),
|
|
3202
|
-
children: [maskInnerGroup]
|
|
3203
|
-
};
|
|
3204
|
-
var maskId = "mask-".concat(explicitMaskId || nextUniqueId());
|
|
3205
|
-
var clipId = "clip-".concat(explicitMaskId || nextUniqueId());
|
|
3206
|
-
var maskTag = {
|
|
3207
|
-
tag: 'mask',
|
|
3208
|
-
attributes: _objectSpread2$1(_objectSpread2$1({}, ALL_SPACE), {}, {
|
|
3209
|
-
id: maskId,
|
|
3210
|
-
maskUnits: 'userSpaceOnUse',
|
|
3211
|
-
maskContentUnits: 'userSpaceOnUse'
|
|
3212
|
-
}),
|
|
3213
|
-
children: [maskRect, maskOuterGroup]
|
|
3214
|
-
};
|
|
3215
|
-
var defs = {
|
|
3216
|
-
tag: 'defs',
|
|
3217
|
-
children: [{
|
|
3218
|
-
tag: 'clipPath',
|
|
3219
|
-
attributes: {
|
|
3220
|
-
id: clipId
|
|
3221
|
-
},
|
|
3222
|
-
children: deGroup(maskPath)
|
|
3223
|
-
}, maskTag]
|
|
3224
|
-
};
|
|
3225
|
-
children.push(defs, {
|
|
3226
|
-
tag: 'rect',
|
|
3227
|
-
attributes: _objectSpread2$1({
|
|
3228
|
-
fill: 'currentColor',
|
|
3229
|
-
'clip-path': "url(#".concat(clipId, ")"),
|
|
3230
|
-
mask: "url(#".concat(maskId, ")")
|
|
3231
|
-
}, ALL_SPACE)
|
|
3232
|
-
});
|
|
3233
|
-
return {
|
|
3234
|
-
children: children,
|
|
3235
|
-
attributes: attributes
|
|
3236
|
-
};
|
|
3237
|
-
};
|
|
3238
|
-
}
|
|
3239
|
-
};
|
|
3240
|
-
|
|
3241
|
-
var MissingIconIndicator = {
|
|
3242
|
-
provides: function provides(providers) {
|
|
3243
|
-
var reduceMotion = false;
|
|
3244
|
-
|
|
3245
|
-
if (WINDOW.matchMedia) {
|
|
3246
|
-
reduceMotion = WINDOW.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
3247
|
-
}
|
|
3248
|
-
|
|
3249
|
-
providers.missingIconAbstract = function () {
|
|
3250
|
-
var gChildren = [];
|
|
3251
|
-
var FILL = {
|
|
3252
|
-
fill: 'currentColor'
|
|
3253
|
-
};
|
|
3254
|
-
var ANIMATION_BASE = {
|
|
3255
|
-
attributeType: 'XML',
|
|
3256
|
-
repeatCount: 'indefinite',
|
|
3257
|
-
dur: '2s'
|
|
3258
|
-
}; // Ring
|
|
3259
|
-
|
|
3260
|
-
gChildren.push({
|
|
3261
|
-
tag: 'path',
|
|
3262
|
-
attributes: _objectSpread2$1(_objectSpread2$1({}, FILL), {}, {
|
|
3263
|
-
d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z'
|
|
3264
|
-
})
|
|
3265
|
-
});
|
|
3266
|
-
|
|
3267
|
-
var OPACITY_ANIMATE = _objectSpread2$1(_objectSpread2$1({}, ANIMATION_BASE), {}, {
|
|
3268
|
-
attributeName: 'opacity'
|
|
3269
|
-
});
|
|
3270
|
-
|
|
3271
|
-
var dot = {
|
|
3272
|
-
tag: 'circle',
|
|
3273
|
-
attributes: _objectSpread2$1(_objectSpread2$1({}, FILL), {}, {
|
|
3274
|
-
cx: '256',
|
|
3275
|
-
cy: '364',
|
|
3276
|
-
r: '28'
|
|
3277
|
-
}),
|
|
3278
|
-
children: []
|
|
3279
|
-
};
|
|
3280
|
-
|
|
3281
|
-
if (!reduceMotion) {
|
|
3282
|
-
dot.children.push({
|
|
3283
|
-
tag: 'animate',
|
|
3284
|
-
attributes: _objectSpread2$1(_objectSpread2$1({}, ANIMATION_BASE), {}, {
|
|
3285
|
-
attributeName: 'r',
|
|
3286
|
-
values: '28;14;28;28;14;28;'
|
|
3287
|
-
})
|
|
3288
|
-
}, {
|
|
3289
|
-
tag: 'animate',
|
|
3290
|
-
attributes: _objectSpread2$1(_objectSpread2$1({}, OPACITY_ANIMATE), {}, {
|
|
3291
|
-
values: '1;0;1;1;0;1;'
|
|
3292
|
-
})
|
|
3293
|
-
});
|
|
3294
|
-
}
|
|
3295
|
-
|
|
3296
|
-
gChildren.push(dot);
|
|
3297
|
-
gChildren.push({
|
|
3298
|
-
tag: 'path',
|
|
3299
|
-
attributes: _objectSpread2$1(_objectSpread2$1({}, FILL), {}, {
|
|
3300
|
-
opacity: '1',
|
|
3301
|
-
d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z'
|
|
3302
|
-
}),
|
|
3303
|
-
children: reduceMotion ? [] : [{
|
|
3304
|
-
tag: 'animate',
|
|
3305
|
-
attributes: _objectSpread2$1(_objectSpread2$1({}, OPACITY_ANIMATE), {}, {
|
|
3306
|
-
values: '1;0;0;0;0;1;'
|
|
3307
|
-
})
|
|
3308
|
-
}]
|
|
3309
|
-
});
|
|
3310
|
-
|
|
3311
|
-
if (!reduceMotion) {
|
|
3312
|
-
// Exclamation
|
|
3313
|
-
gChildren.push({
|
|
3314
|
-
tag: 'path',
|
|
3315
|
-
attributes: _objectSpread2$1(_objectSpread2$1({}, FILL), {}, {
|
|
3316
|
-
opacity: '0',
|
|
3317
|
-
d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z'
|
|
3318
|
-
}),
|
|
3319
|
-
children: [{
|
|
3320
|
-
tag: 'animate',
|
|
3321
|
-
attributes: _objectSpread2$1(_objectSpread2$1({}, OPACITY_ANIMATE), {}, {
|
|
3322
|
-
values: '0;0;1;1;0;0;'
|
|
3323
|
-
})
|
|
3324
|
-
}]
|
|
3325
|
-
});
|
|
3326
|
-
}
|
|
3327
|
-
|
|
3328
|
-
return {
|
|
3329
|
-
tag: 'g',
|
|
3330
|
-
attributes: {
|
|
3331
|
-
'class': 'missing'
|
|
3332
|
-
},
|
|
3333
|
-
children: gChildren
|
|
3334
|
-
};
|
|
3335
|
-
};
|
|
3336
|
-
}
|
|
3337
|
-
};
|
|
3338
|
-
|
|
3339
|
-
var SvgSymbols = {
|
|
3340
|
-
hooks: function hooks() {
|
|
3341
|
-
return {
|
|
3342
|
-
parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
|
|
3343
|
-
var symbolData = node.getAttribute('data-fa-symbol');
|
|
3344
|
-
var symbol = symbolData === null ? false : symbolData === '' ? true : symbolData;
|
|
3345
|
-
accumulator['symbol'] = symbol;
|
|
3346
|
-
return accumulator;
|
|
3347
|
-
}
|
|
3348
|
-
};
|
|
3349
|
-
}
|
|
3350
|
-
};
|
|
3351
|
-
|
|
3352
|
-
var plugins = [InjectCSS, ReplaceElements, Layers, LayersCounter, LayersText, PseudoElements, MutationObserver$1, PowerTransforms, Masks, MissingIconIndicator, SvgSymbols];
|
|
3353
|
-
|
|
3354
|
-
registerPlugins(plugins, {
|
|
3355
|
-
mixoutsTo: api
|
|
3356
|
-
});
|
|
3357
|
-
api.noAuto;
|
|
3358
|
-
api.config;
|
|
3359
|
-
api.library;
|
|
3360
|
-
api.dom;
|
|
3361
|
-
var parse$1 = api.parse;
|
|
3362
|
-
api.findIconDefinition;
|
|
3363
|
-
api.toHtml;
|
|
3364
|
-
var icon = api.icon;
|
|
3365
|
-
api.layer;
|
|
3366
|
-
api.text;
|
|
3367
|
-
api.counter;
|
|
3368
|
-
|
|
3369
|
-
var propTypes = {exports: {}};
|
|
3370
|
-
|
|
3371
|
-
var reactIs = {exports: {}};
|
|
3372
|
-
|
|
3373
|
-
var reactIs_production_min = {};
|
|
3374
|
-
|
|
3375
|
-
/** @license React v16.13.1
|
|
3376
|
-
* react-is.production.min.js
|
|
3377
|
-
*
|
|
3378
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3379
|
-
*
|
|
3380
|
-
* This source code is licensed under the MIT license found in the
|
|
3381
|
-
* LICENSE file in the root directory of this source tree.
|
|
3382
|
-
*/
|
|
3383
|
-
|
|
3384
|
-
var hasRequiredReactIs_production_min;
|
|
3385
|
-
|
|
3386
|
-
function requireReactIs_production_min () {
|
|
3387
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
3388
|
-
hasRequiredReactIs_production_min = 1;
|
|
3389
|
-
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?
|
|
3390
|
-
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;
|
|
3391
|
-
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}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
|
|
3392
|
-
reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
|
|
3393
|
-
reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
|
|
3394
|
-
reactIs_production_min.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)};reactIs_production_min.typeOf=z;
|
|
3395
|
-
return reactIs_production_min;
|
|
3396
|
-
}
|
|
3397
|
-
|
|
3398
|
-
var reactIs_development = {};
|
|
3399
|
-
|
|
3400
|
-
/** @license React v16.13.1
|
|
3401
|
-
* react-is.development.js
|
|
3402
|
-
*
|
|
3403
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3404
|
-
*
|
|
3405
|
-
* This source code is licensed under the MIT license found in the
|
|
3406
|
-
* LICENSE file in the root directory of this source tree.
|
|
3407
|
-
*/
|
|
3408
|
-
|
|
3409
|
-
var hasRequiredReactIs_development;
|
|
3410
|
-
|
|
3411
|
-
function requireReactIs_development () {
|
|
3412
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
|
3413
|
-
hasRequiredReactIs_development = 1;
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3418
|
-
(function() {
|
|
3419
|
-
|
|
3420
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
3421
|
-
// nor polyfill, then a plain number is used for performance.
|
|
3422
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
3423
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
3424
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
3425
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
3426
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
3427
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
3428
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
3429
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
3430
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
3431
|
-
|
|
3432
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
3433
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
3434
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
3435
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
3436
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
3437
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
3438
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
3439
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
3440
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
3441
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
3442
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
3443
|
-
|
|
3444
|
-
function isValidElementType(type) {
|
|
3445
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
3446
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
3447
|
-
}
|
|
3448
|
-
|
|
3449
|
-
function typeOf(object) {
|
|
3450
|
-
if (typeof object === 'object' && object !== null) {
|
|
3451
|
-
var $$typeof = object.$$typeof;
|
|
3452
|
-
|
|
3453
|
-
switch ($$typeof) {
|
|
3454
|
-
case REACT_ELEMENT_TYPE:
|
|
3455
|
-
var type = object.type;
|
|
3456
|
-
|
|
3457
|
-
switch (type) {
|
|
3458
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
3459
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
3460
|
-
case REACT_FRAGMENT_TYPE:
|
|
3461
|
-
case REACT_PROFILER_TYPE:
|
|
3462
|
-
case REACT_STRICT_MODE_TYPE:
|
|
3463
|
-
case REACT_SUSPENSE_TYPE:
|
|
3464
|
-
return type;
|
|
3465
|
-
|
|
3466
|
-
default:
|
|
3467
|
-
var $$typeofType = type && type.$$typeof;
|
|
3468
|
-
|
|
3469
|
-
switch ($$typeofType) {
|
|
3470
|
-
case REACT_CONTEXT_TYPE:
|
|
3471
|
-
case REACT_FORWARD_REF_TYPE:
|
|
3472
|
-
case REACT_LAZY_TYPE:
|
|
3473
|
-
case REACT_MEMO_TYPE:
|
|
3474
|
-
case REACT_PROVIDER_TYPE:
|
|
3475
|
-
return $$typeofType;
|
|
3476
|
-
|
|
3477
|
-
default:
|
|
3478
|
-
return $$typeof;
|
|
3479
|
-
}
|
|
3480
|
-
|
|
3481
|
-
}
|
|
3482
|
-
|
|
3483
|
-
case REACT_PORTAL_TYPE:
|
|
3484
|
-
return $$typeof;
|
|
3485
|
-
}
|
|
3486
|
-
}
|
|
3487
|
-
|
|
3488
|
-
return undefined;
|
|
3489
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
3490
|
-
|
|
3491
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
3492
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
3493
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
3494
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
3495
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
3496
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
3497
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
3498
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
3499
|
-
var Memo = REACT_MEMO_TYPE;
|
|
3500
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
3501
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
3502
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
3503
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
3504
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
3505
|
-
|
|
3506
|
-
function isAsyncMode(object) {
|
|
3507
|
-
{
|
|
3508
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
3509
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
3510
|
-
|
|
3511
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
3512
|
-
}
|
|
3513
|
-
}
|
|
3514
|
-
|
|
3515
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
3516
|
-
}
|
|
3517
|
-
function isConcurrentMode(object) {
|
|
3518
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
3519
|
-
}
|
|
3520
|
-
function isContextConsumer(object) {
|
|
3521
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
3522
|
-
}
|
|
3523
|
-
function isContextProvider(object) {
|
|
3524
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
3525
|
-
}
|
|
3526
|
-
function isElement(object) {
|
|
3527
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
3528
|
-
}
|
|
3529
|
-
function isForwardRef(object) {
|
|
3530
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
3531
|
-
}
|
|
3532
|
-
function isFragment(object) {
|
|
3533
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
3534
|
-
}
|
|
3535
|
-
function isLazy(object) {
|
|
3536
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
3537
|
-
}
|
|
3538
|
-
function isMemo(object) {
|
|
3539
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
3540
|
-
}
|
|
3541
|
-
function isPortal(object) {
|
|
3542
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
3543
|
-
}
|
|
3544
|
-
function isProfiler(object) {
|
|
3545
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
3546
|
-
}
|
|
3547
|
-
function isStrictMode(object) {
|
|
3548
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
3549
|
-
}
|
|
3550
|
-
function isSuspense(object) {
|
|
3551
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
3552
|
-
}
|
|
3553
|
-
|
|
3554
|
-
reactIs_development.AsyncMode = AsyncMode;
|
|
3555
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
3556
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
3557
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
3558
|
-
reactIs_development.Element = Element;
|
|
3559
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
3560
|
-
reactIs_development.Fragment = Fragment;
|
|
3561
|
-
reactIs_development.Lazy = Lazy;
|
|
3562
|
-
reactIs_development.Memo = Memo;
|
|
3563
|
-
reactIs_development.Portal = Portal;
|
|
3564
|
-
reactIs_development.Profiler = Profiler;
|
|
3565
|
-
reactIs_development.StrictMode = StrictMode;
|
|
3566
|
-
reactIs_development.Suspense = Suspense;
|
|
3567
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
3568
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
3569
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
3570
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
3571
|
-
reactIs_development.isElement = isElement;
|
|
3572
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
3573
|
-
reactIs_development.isFragment = isFragment;
|
|
3574
|
-
reactIs_development.isLazy = isLazy;
|
|
3575
|
-
reactIs_development.isMemo = isMemo;
|
|
3576
|
-
reactIs_development.isPortal = isPortal;
|
|
3577
|
-
reactIs_development.isProfiler = isProfiler;
|
|
3578
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
3579
|
-
reactIs_development.isSuspense = isSuspense;
|
|
3580
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
3581
|
-
reactIs_development.typeOf = typeOf;
|
|
3582
|
-
})();
|
|
3583
|
-
}
|
|
3584
|
-
return reactIs_development;
|
|
3585
|
-
}
|
|
3586
|
-
|
|
3587
|
-
var hasRequiredReactIs;
|
|
3588
|
-
|
|
3589
|
-
function requireReactIs () {
|
|
3590
|
-
if (hasRequiredReactIs) return reactIs.exports;
|
|
3591
|
-
hasRequiredReactIs = 1;
|
|
3592
|
-
|
|
3593
|
-
if (process.env.NODE_ENV === 'production') {
|
|
3594
|
-
reactIs.exports = requireReactIs_production_min();
|
|
3595
|
-
} else {
|
|
3596
|
-
reactIs.exports = requireReactIs_development();
|
|
3597
|
-
}
|
|
3598
|
-
return reactIs.exports;
|
|
3599
|
-
}
|
|
3600
|
-
|
|
3601
|
-
/*
|
|
3602
|
-
object-assign
|
|
3603
|
-
(c) Sindre Sorhus
|
|
3604
|
-
@license MIT
|
|
3605
|
-
*/
|
|
3606
|
-
|
|
3607
|
-
var objectAssign;
|
|
3608
|
-
var hasRequiredObjectAssign;
|
|
3609
|
-
|
|
3610
|
-
function requireObjectAssign () {
|
|
3611
|
-
if (hasRequiredObjectAssign) return objectAssign;
|
|
3612
|
-
hasRequiredObjectAssign = 1;
|
|
3613
|
-
/* eslint-disable no-unused-vars */
|
|
3614
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
3615
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
3616
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
3617
|
-
|
|
3618
|
-
function toObject(val) {
|
|
3619
|
-
if (val === null || val === undefined) {
|
|
3620
|
-
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
3621
|
-
}
|
|
3622
|
-
|
|
3623
|
-
return Object(val);
|
|
3624
|
-
}
|
|
3625
|
-
|
|
3626
|
-
function shouldUseNative() {
|
|
3627
|
-
try {
|
|
3628
|
-
if (!Object.assign) {
|
|
3629
|
-
return false;
|
|
3630
|
-
}
|
|
3631
|
-
|
|
3632
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
3633
|
-
|
|
3634
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
3635
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
3636
|
-
test1[5] = 'de';
|
|
3637
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
3638
|
-
return false;
|
|
3639
|
-
}
|
|
3640
|
-
|
|
3641
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
3642
|
-
var test2 = {};
|
|
3643
|
-
for (var i = 0; i < 10; i++) {
|
|
3644
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
3645
|
-
}
|
|
3646
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
3647
|
-
return test2[n];
|
|
3648
|
-
});
|
|
3649
|
-
if (order2.join('') !== '0123456789') {
|
|
3650
|
-
return false;
|
|
3651
|
-
}
|
|
3652
|
-
|
|
3653
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
3654
|
-
var test3 = {};
|
|
3655
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
3656
|
-
test3[letter] = letter;
|
|
3657
|
-
});
|
|
3658
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
3659
|
-
'abcdefghijklmnopqrst') {
|
|
3660
|
-
return false;
|
|
3661
|
-
}
|
|
3662
|
-
|
|
3663
|
-
return true;
|
|
3664
|
-
} catch (err) {
|
|
3665
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
3666
|
-
return false;
|
|
3667
|
-
}
|
|
3668
|
-
}
|
|
3669
|
-
|
|
3670
|
-
objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
3671
|
-
var from;
|
|
3672
|
-
var to = toObject(target);
|
|
3673
|
-
var symbols;
|
|
3674
|
-
|
|
3675
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
3676
|
-
from = Object(arguments[s]);
|
|
3677
|
-
|
|
3678
|
-
for (var key in from) {
|
|
3679
|
-
if (hasOwnProperty.call(from, key)) {
|
|
3680
|
-
to[key] = from[key];
|
|
3681
|
-
}
|
|
3682
|
-
}
|
|
3683
|
-
|
|
3684
|
-
if (getOwnPropertySymbols) {
|
|
3685
|
-
symbols = getOwnPropertySymbols(from);
|
|
3686
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
3687
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
3688
|
-
to[symbols[i]] = from[symbols[i]];
|
|
3689
|
-
}
|
|
3690
|
-
}
|
|
3691
|
-
}
|
|
3692
|
-
}
|
|
3693
|
-
|
|
3694
|
-
return to;
|
|
3695
|
-
};
|
|
3696
|
-
return objectAssign;
|
|
3697
|
-
}
|
|
3698
|
-
|
|
3699
|
-
/**
|
|
3700
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3701
|
-
*
|
|
3702
|
-
* This source code is licensed under the MIT license found in the
|
|
3703
|
-
* LICENSE file in the root directory of this source tree.
|
|
3704
|
-
*/
|
|
3705
|
-
|
|
3706
|
-
var ReactPropTypesSecret_1;
|
|
3707
|
-
var hasRequiredReactPropTypesSecret;
|
|
3708
|
-
|
|
3709
|
-
function requireReactPropTypesSecret () {
|
|
3710
|
-
if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
|
|
3711
|
-
hasRequiredReactPropTypesSecret = 1;
|
|
3712
|
-
|
|
3713
|
-
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
3714
|
-
|
|
3715
|
-
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
3716
|
-
return ReactPropTypesSecret_1;
|
|
3717
|
-
}
|
|
3718
|
-
|
|
3719
|
-
var has;
|
|
3720
|
-
var hasRequiredHas;
|
|
3721
|
-
|
|
3722
|
-
function requireHas () {
|
|
3723
|
-
if (hasRequiredHas) return has;
|
|
3724
|
-
hasRequiredHas = 1;
|
|
3725
|
-
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
3726
|
-
return has;
|
|
3727
|
-
}
|
|
3728
|
-
|
|
3729
|
-
/**
|
|
3730
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3731
|
-
*
|
|
3732
|
-
* This source code is licensed under the MIT license found in the
|
|
3733
|
-
* LICENSE file in the root directory of this source tree.
|
|
3734
|
-
*/
|
|
3735
|
-
|
|
3736
|
-
var checkPropTypes_1;
|
|
3737
|
-
var hasRequiredCheckPropTypes;
|
|
3738
|
-
|
|
3739
|
-
function requireCheckPropTypes () {
|
|
3740
|
-
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
3741
|
-
hasRequiredCheckPropTypes = 1;
|
|
3742
|
-
|
|
3743
|
-
var printWarning = function() {};
|
|
3744
|
-
|
|
3745
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3746
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
3747
|
-
var loggedTypeFailures = {};
|
|
3748
|
-
var has = requireHas();
|
|
3749
|
-
|
|
3750
|
-
printWarning = function(text) {
|
|
3751
|
-
var message = 'Warning: ' + text;
|
|
3752
|
-
if (typeof console !== 'undefined') {
|
|
3753
|
-
console.error(message);
|
|
3754
|
-
}
|
|
3755
|
-
try {
|
|
3756
|
-
// --- Welcome to debugging React ---
|
|
3757
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
3758
|
-
// to find the callsite that caused this warning to fire.
|
|
3759
|
-
throw new Error(message);
|
|
3760
|
-
} catch (x) { /**/ }
|
|
3761
|
-
};
|
|
3762
|
-
}
|
|
3763
|
-
|
|
3764
|
-
/**
|
|
3765
|
-
* Assert that the values match with the type specs.
|
|
3766
|
-
* Error messages are memorized and will only be shown once.
|
|
3767
|
-
*
|
|
3768
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
3769
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
3770
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
3771
|
-
* @param {string} componentName Name of the component for error messages.
|
|
3772
|
-
* @param {?Function} getStack Returns the component stack.
|
|
3773
|
-
* @private
|
|
3774
|
-
*/
|
|
3775
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
3776
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3777
|
-
for (var typeSpecName in typeSpecs) {
|
|
3778
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
3779
|
-
var error;
|
|
3780
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
3781
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
3782
|
-
// After these have been cleaned up, we'll let them throw.
|
|
3783
|
-
try {
|
|
3784
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
3785
|
-
// behavior as without this statement except with a better message.
|
|
3786
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
3787
|
-
var err = Error(
|
|
3788
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
3789
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
3790
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
3791
|
-
);
|
|
3792
|
-
err.name = 'Invariant Violation';
|
|
3793
|
-
throw err;
|
|
3794
|
-
}
|
|
3795
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
3796
|
-
} catch (ex) {
|
|
3797
|
-
error = ex;
|
|
3798
|
-
}
|
|
3799
|
-
if (error && !(error instanceof Error)) {
|
|
3800
|
-
printWarning(
|
|
3801
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
3802
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
3803
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
3804
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
3805
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
3806
|
-
'shape all require an argument).'
|
|
3807
|
-
);
|
|
3808
|
-
}
|
|
3809
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
3810
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
3811
|
-
// same error.
|
|
3812
|
-
loggedTypeFailures[error.message] = true;
|
|
3813
|
-
|
|
3814
|
-
var stack = getStack ? getStack() : '';
|
|
3815
|
-
|
|
3816
|
-
printWarning(
|
|
3817
|
-
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
3818
|
-
);
|
|
3819
|
-
}
|
|
3820
|
-
}
|
|
3821
|
-
}
|
|
3822
|
-
}
|
|
3823
|
-
}
|
|
3824
|
-
|
|
3825
|
-
/**
|
|
3826
|
-
* Resets warning cache when testing.
|
|
3827
|
-
*
|
|
3828
|
-
* @private
|
|
3829
|
-
*/
|
|
3830
|
-
checkPropTypes.resetWarningCache = function() {
|
|
3831
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3832
|
-
loggedTypeFailures = {};
|
|
3833
|
-
}
|
|
3834
|
-
};
|
|
3835
|
-
|
|
3836
|
-
checkPropTypes_1 = checkPropTypes;
|
|
3837
|
-
return checkPropTypes_1;
|
|
3838
|
-
}
|
|
3839
|
-
|
|
3840
|
-
/**
|
|
3841
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3842
|
-
*
|
|
3843
|
-
* This source code is licensed under the MIT license found in the
|
|
3844
|
-
* LICENSE file in the root directory of this source tree.
|
|
3845
|
-
*/
|
|
3846
|
-
|
|
3847
|
-
var factoryWithTypeCheckers;
|
|
3848
|
-
var hasRequiredFactoryWithTypeCheckers;
|
|
3849
|
-
|
|
3850
|
-
function requireFactoryWithTypeCheckers () {
|
|
3851
|
-
if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
|
|
3852
|
-
hasRequiredFactoryWithTypeCheckers = 1;
|
|
3853
|
-
|
|
3854
|
-
var ReactIs = requireReactIs();
|
|
3855
|
-
var assign = requireObjectAssign();
|
|
3856
|
-
|
|
3857
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
3858
|
-
var has = requireHas();
|
|
3859
|
-
var checkPropTypes = requireCheckPropTypes();
|
|
3860
|
-
|
|
3861
|
-
var printWarning = function() {};
|
|
3862
|
-
|
|
3863
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3864
|
-
printWarning = function(text) {
|
|
3865
|
-
var message = 'Warning: ' + text;
|
|
3866
|
-
if (typeof console !== 'undefined') {
|
|
3867
|
-
console.error(message);
|
|
3868
|
-
}
|
|
3869
|
-
try {
|
|
3870
|
-
// --- Welcome to debugging React ---
|
|
3871
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
3872
|
-
// to find the callsite that caused this warning to fire.
|
|
3873
|
-
throw new Error(message);
|
|
3874
|
-
} catch (x) {}
|
|
3875
|
-
};
|
|
3876
|
-
}
|
|
3877
|
-
|
|
3878
|
-
function emptyFunctionThatReturnsNull() {
|
|
3879
|
-
return null;
|
|
3880
|
-
}
|
|
3881
|
-
|
|
3882
|
-
factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
3883
|
-
/* global Symbol */
|
|
3884
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
3885
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
3886
|
-
|
|
3887
|
-
/**
|
|
3888
|
-
* Returns the iterator method function contained on the iterable object.
|
|
3889
|
-
*
|
|
3890
|
-
* Be sure to invoke the function with the iterable as context:
|
|
3891
|
-
*
|
|
3892
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
3893
|
-
* if (iteratorFn) {
|
|
3894
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
3895
|
-
* ...
|
|
3896
|
-
* }
|
|
3897
|
-
*
|
|
3898
|
-
* @param {?object} maybeIterable
|
|
3899
|
-
* @return {?function}
|
|
3900
|
-
*/
|
|
3901
|
-
function getIteratorFn(maybeIterable) {
|
|
3902
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
3903
|
-
if (typeof iteratorFn === 'function') {
|
|
3904
|
-
return iteratorFn;
|
|
3905
|
-
}
|
|
3906
|
-
}
|
|
3907
|
-
|
|
3908
|
-
/**
|
|
3909
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
3910
|
-
* supplied to React components. Example usage:
|
|
3911
|
-
*
|
|
3912
|
-
* var Props = require('ReactPropTypes');
|
|
3913
|
-
* var MyArticle = React.createClass({
|
|
3914
|
-
* propTypes: {
|
|
3915
|
-
* // An optional string prop named "description".
|
|
3916
|
-
* description: Props.string,
|
|
3917
|
-
*
|
|
3918
|
-
* // A required enum prop named "category".
|
|
3919
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
3920
|
-
*
|
|
3921
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
3922
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
3923
|
-
* },
|
|
3924
|
-
* render: function() { ... }
|
|
3925
|
-
* });
|
|
3926
|
-
*
|
|
3927
|
-
* A more formal specification of how these methods are used:
|
|
3928
|
-
*
|
|
3929
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
3930
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
3931
|
-
*
|
|
3932
|
-
* Each and every declaration produces a function with the same signature. This
|
|
3933
|
-
* allows the creation of custom validation functions. For example:
|
|
3934
|
-
*
|
|
3935
|
-
* var MyLink = React.createClass({
|
|
3936
|
-
* propTypes: {
|
|
3937
|
-
* // An optional string or URI prop named "href".
|
|
3938
|
-
* href: function(props, propName, componentName) {
|
|
3939
|
-
* var propValue = props[propName];
|
|
3940
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
3941
|
-
* !(propValue instanceof URI)) {
|
|
3942
|
-
* return new Error(
|
|
3943
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
3944
|
-
* componentName
|
|
3945
|
-
* );
|
|
3946
|
-
* }
|
|
3947
|
-
* }
|
|
3948
|
-
* },
|
|
3949
|
-
* render: function() {...}
|
|
3950
|
-
* });
|
|
3951
|
-
*
|
|
3952
|
-
* @internal
|
|
3953
|
-
*/
|
|
3954
|
-
|
|
3955
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
3956
|
-
|
|
3957
|
-
// Important!
|
|
3958
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
3959
|
-
var ReactPropTypes = {
|
|
3960
|
-
array: createPrimitiveTypeChecker('array'),
|
|
3961
|
-
bigint: createPrimitiveTypeChecker('bigint'),
|
|
3962
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
3963
|
-
func: createPrimitiveTypeChecker('function'),
|
|
3964
|
-
number: createPrimitiveTypeChecker('number'),
|
|
3965
|
-
object: createPrimitiveTypeChecker('object'),
|
|
3966
|
-
string: createPrimitiveTypeChecker('string'),
|
|
3967
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
3968
|
-
|
|
3969
|
-
any: createAnyTypeChecker(),
|
|
3970
|
-
arrayOf: createArrayOfTypeChecker,
|
|
3971
|
-
element: createElementTypeChecker(),
|
|
3972
|
-
elementType: createElementTypeTypeChecker(),
|
|
3973
|
-
instanceOf: createInstanceTypeChecker,
|
|
3974
|
-
node: createNodeChecker(),
|
|
3975
|
-
objectOf: createObjectOfTypeChecker,
|
|
3976
|
-
oneOf: createEnumTypeChecker,
|
|
3977
|
-
oneOfType: createUnionTypeChecker,
|
|
3978
|
-
shape: createShapeTypeChecker,
|
|
3979
|
-
exact: createStrictShapeTypeChecker,
|
|
3980
|
-
};
|
|
3981
|
-
|
|
3982
|
-
/**
|
|
3983
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
3984
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
3985
|
-
*/
|
|
3986
|
-
/*eslint-disable no-self-compare*/
|
|
3987
|
-
function is(x, y) {
|
|
3988
|
-
// SameValue algorithm
|
|
3989
|
-
if (x === y) {
|
|
3990
|
-
// Steps 1-5, 7-10
|
|
3991
|
-
// Steps 6.b-6.e: +0 != -0
|
|
3992
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
3993
|
-
} else {
|
|
3994
|
-
// Step 6.a: NaN == NaN
|
|
3995
|
-
return x !== x && y !== y;
|
|
3996
|
-
}
|
|
3997
|
-
}
|
|
3998
|
-
/*eslint-enable no-self-compare*/
|
|
3999
|
-
|
|
4000
|
-
/**
|
|
4001
|
-
* We use an Error-like object for backward compatibility as people may call
|
|
4002
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
4003
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
4004
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
4005
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
4006
|
-
*/
|
|
4007
|
-
function PropTypeError(message, data) {
|
|
4008
|
-
this.message = message;
|
|
4009
|
-
this.data = data && typeof data === 'object' ? data: {};
|
|
4010
|
-
this.stack = '';
|
|
4011
|
-
}
|
|
4012
|
-
// Make `instanceof Error` still work for returned errors.
|
|
4013
|
-
PropTypeError.prototype = Error.prototype;
|
|
4014
|
-
|
|
4015
|
-
function createChainableTypeChecker(validate) {
|
|
4016
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
4017
|
-
var manualPropTypeCallCache = {};
|
|
4018
|
-
var manualPropTypeWarningCount = 0;
|
|
4019
|
-
}
|
|
4020
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
4021
|
-
componentName = componentName || ANONYMOUS;
|
|
4022
|
-
propFullName = propFullName || propName;
|
|
4023
|
-
|
|
4024
|
-
if (secret !== ReactPropTypesSecret) {
|
|
4025
|
-
if (throwOnDirectAccess) {
|
|
4026
|
-
// New behavior only for users of `prop-types` package
|
|
4027
|
-
var err = new Error(
|
|
4028
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
4029
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
4030
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
4031
|
-
);
|
|
4032
|
-
err.name = 'Invariant Violation';
|
|
4033
|
-
throw err;
|
|
4034
|
-
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
4035
|
-
// Old behavior for people using React.PropTypes
|
|
4036
|
-
var cacheKey = componentName + ':' + propName;
|
|
4037
|
-
if (
|
|
4038
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
4039
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
4040
|
-
manualPropTypeWarningCount < 3
|
|
4041
|
-
) {
|
|
4042
|
-
printWarning(
|
|
4043
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
4044
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
4045
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
4046
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
4047
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
4048
|
-
);
|
|
4049
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
4050
|
-
manualPropTypeWarningCount++;
|
|
4051
|
-
}
|
|
4052
|
-
}
|
|
4053
|
-
}
|
|
4054
|
-
if (props[propName] == null) {
|
|
4055
|
-
if (isRequired) {
|
|
4056
|
-
if (props[propName] === null) {
|
|
4057
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
4058
|
-
}
|
|
4059
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
4060
|
-
}
|
|
4061
|
-
return null;
|
|
4062
|
-
} else {
|
|
4063
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
4064
|
-
}
|
|
4065
|
-
}
|
|
4066
|
-
|
|
4067
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
4068
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
4069
|
-
|
|
4070
|
-
return chainedCheckType;
|
|
4071
|
-
}
|
|
4072
|
-
|
|
4073
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
4074
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
4075
|
-
var propValue = props[propName];
|
|
4076
|
-
var propType = getPropType(propValue);
|
|
4077
|
-
if (propType !== expectedType) {
|
|
4078
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
4079
|
-
// check, but we can offer a more precise error message here rather than
|
|
4080
|
-
// 'of type `object`'.
|
|
4081
|
-
var preciseType = getPreciseType(propValue);
|
|
4082
|
-
|
|
4083
|
-
return new PropTypeError(
|
|
4084
|
-
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
4085
|
-
{expectedType: expectedType}
|
|
4086
|
-
);
|
|
4087
|
-
}
|
|
4088
|
-
return null;
|
|
4089
|
-
}
|
|
4090
|
-
return createChainableTypeChecker(validate);
|
|
4091
|
-
}
|
|
4092
|
-
|
|
4093
|
-
function createAnyTypeChecker() {
|
|
4094
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
4095
|
-
}
|
|
4096
|
-
|
|
4097
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
4098
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
4099
|
-
if (typeof typeChecker !== 'function') {
|
|
4100
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
4101
|
-
}
|
|
4102
|
-
var propValue = props[propName];
|
|
4103
|
-
if (!Array.isArray(propValue)) {
|
|
4104
|
-
var propType = getPropType(propValue);
|
|
4105
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
4106
|
-
}
|
|
4107
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
4108
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
4109
|
-
if (error instanceof Error) {
|
|
4110
|
-
return error;
|
|
4111
|
-
}
|
|
4112
|
-
}
|
|
4113
|
-
return null;
|
|
4114
|
-
}
|
|
4115
|
-
return createChainableTypeChecker(validate);
|
|
4116
|
-
}
|
|
4117
|
-
|
|
4118
|
-
function createElementTypeChecker() {
|
|
4119
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
4120
|
-
var propValue = props[propName];
|
|
4121
|
-
if (!isValidElement(propValue)) {
|
|
4122
|
-
var propType = getPropType(propValue);
|
|
4123
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
4124
|
-
}
|
|
4125
|
-
return null;
|
|
4126
|
-
}
|
|
4127
|
-
return createChainableTypeChecker(validate);
|
|
4128
|
-
}
|
|
4129
|
-
|
|
4130
|
-
function createElementTypeTypeChecker() {
|
|
4131
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
4132
|
-
var propValue = props[propName];
|
|
4133
|
-
if (!ReactIs.isValidElementType(propValue)) {
|
|
4134
|
-
var propType = getPropType(propValue);
|
|
4135
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
4136
|
-
}
|
|
4137
|
-
return null;
|
|
4138
|
-
}
|
|
4139
|
-
return createChainableTypeChecker(validate);
|
|
4140
|
-
}
|
|
4141
|
-
|
|
4142
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
4143
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
4144
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
4145
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
4146
|
-
var actualClassName = getClassName(props[propName]);
|
|
4147
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
4148
|
-
}
|
|
4149
|
-
return null;
|
|
4150
|
-
}
|
|
4151
|
-
return createChainableTypeChecker(validate);
|
|
4152
|
-
}
|
|
4153
|
-
|
|
4154
|
-
function createEnumTypeChecker(expectedValues) {
|
|
4155
|
-
if (!Array.isArray(expectedValues)) {
|
|
4156
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
4157
|
-
if (arguments.length > 1) {
|
|
4158
|
-
printWarning(
|
|
4159
|
-
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
4160
|
-
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
4161
|
-
);
|
|
4162
|
-
} else {
|
|
4163
|
-
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
4164
|
-
}
|
|
4165
|
-
}
|
|
4166
|
-
return emptyFunctionThatReturnsNull;
|
|
4167
|
-
}
|
|
4168
|
-
|
|
4169
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
4170
|
-
var propValue = props[propName];
|
|
4171
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
4172
|
-
if (is(propValue, expectedValues[i])) {
|
|
4173
|
-
return null;
|
|
4174
|
-
}
|
|
4175
|
-
}
|
|
4176
|
-
|
|
4177
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
4178
|
-
var type = getPreciseType(value);
|
|
4179
|
-
if (type === 'symbol') {
|
|
4180
|
-
return String(value);
|
|
4181
|
-
}
|
|
4182
|
-
return value;
|
|
4183
|
-
});
|
|
4184
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
4185
|
-
}
|
|
4186
|
-
return createChainableTypeChecker(validate);
|
|
4187
|
-
}
|
|
4188
|
-
|
|
4189
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
4190
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
4191
|
-
if (typeof typeChecker !== 'function') {
|
|
4192
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
4193
|
-
}
|
|
4194
|
-
var propValue = props[propName];
|
|
4195
|
-
var propType = getPropType(propValue);
|
|
4196
|
-
if (propType !== 'object') {
|
|
4197
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
4198
|
-
}
|
|
4199
|
-
for (var key in propValue) {
|
|
4200
|
-
if (has(propValue, key)) {
|
|
4201
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
4202
|
-
if (error instanceof Error) {
|
|
4203
|
-
return error;
|
|
4204
|
-
}
|
|
4205
|
-
}
|
|
4206
|
-
}
|
|
4207
|
-
return null;
|
|
4208
|
-
}
|
|
4209
|
-
return createChainableTypeChecker(validate);
|
|
4210
|
-
}
|
|
4211
|
-
|
|
4212
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
4213
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
4214
|
-
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
4215
|
-
return emptyFunctionThatReturnsNull;
|
|
4216
|
-
}
|
|
4217
|
-
|
|
4218
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
4219
|
-
var checker = arrayOfTypeCheckers[i];
|
|
4220
|
-
if (typeof checker !== 'function') {
|
|
4221
|
-
printWarning(
|
|
4222
|
-
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
4223
|
-
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
4224
|
-
);
|
|
4225
|
-
return emptyFunctionThatReturnsNull;
|
|
4226
|
-
}
|
|
4227
|
-
}
|
|
4228
|
-
|
|
4229
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
4230
|
-
var expectedTypes = [];
|
|
4231
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
4232
|
-
var checker = arrayOfTypeCheckers[i];
|
|
4233
|
-
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
4234
|
-
if (checkerResult == null) {
|
|
4235
|
-
return null;
|
|
4236
|
-
}
|
|
4237
|
-
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
4238
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
4239
|
-
}
|
|
4240
|
-
}
|
|
4241
|
-
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
|
4242
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
4243
|
-
}
|
|
4244
|
-
return createChainableTypeChecker(validate);
|
|
4245
|
-
}
|
|
4246
|
-
|
|
4247
|
-
function createNodeChecker() {
|
|
4248
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
4249
|
-
if (!isNode(props[propName])) {
|
|
4250
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
4251
|
-
}
|
|
4252
|
-
return null;
|
|
4253
|
-
}
|
|
4254
|
-
return createChainableTypeChecker(validate);
|
|
4255
|
-
}
|
|
4256
|
-
|
|
4257
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
4258
|
-
return new PropTypeError(
|
|
4259
|
-
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
4260
|
-
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
4261
|
-
);
|
|
4262
|
-
}
|
|
4263
|
-
|
|
4264
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
4265
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
4266
|
-
var propValue = props[propName];
|
|
4267
|
-
var propType = getPropType(propValue);
|
|
4268
|
-
if (propType !== 'object') {
|
|
4269
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
4270
|
-
}
|
|
4271
|
-
for (var key in shapeTypes) {
|
|
4272
|
-
var checker = shapeTypes[key];
|
|
4273
|
-
if (typeof checker !== 'function') {
|
|
4274
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
4275
|
-
}
|
|
4276
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
4277
|
-
if (error) {
|
|
4278
|
-
return error;
|
|
4279
|
-
}
|
|
4280
|
-
}
|
|
4281
|
-
return null;
|
|
4282
|
-
}
|
|
4283
|
-
return createChainableTypeChecker(validate);
|
|
4284
|
-
}
|
|
4285
|
-
|
|
4286
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
4287
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
4288
|
-
var propValue = props[propName];
|
|
4289
|
-
var propType = getPropType(propValue);
|
|
4290
|
-
if (propType !== 'object') {
|
|
4291
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
4292
|
-
}
|
|
4293
|
-
// We need to check all keys in case some are required but missing from props.
|
|
4294
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
|
4295
|
-
for (var key in allKeys) {
|
|
4296
|
-
var checker = shapeTypes[key];
|
|
4297
|
-
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
4298
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
4299
|
-
}
|
|
4300
|
-
if (!checker) {
|
|
4301
|
-
return new PropTypeError(
|
|
4302
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
4303
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
4304
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
4305
|
-
);
|
|
4306
|
-
}
|
|
4307
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
4308
|
-
if (error) {
|
|
4309
|
-
return error;
|
|
4310
|
-
}
|
|
4311
|
-
}
|
|
4312
|
-
return null;
|
|
4313
|
-
}
|
|
4314
|
-
|
|
4315
|
-
return createChainableTypeChecker(validate);
|
|
4316
|
-
}
|
|
4317
|
-
|
|
4318
|
-
function isNode(propValue) {
|
|
4319
|
-
switch (typeof propValue) {
|
|
4320
|
-
case 'number':
|
|
4321
|
-
case 'string':
|
|
4322
|
-
case 'undefined':
|
|
4323
|
-
return true;
|
|
4324
|
-
case 'boolean':
|
|
4325
|
-
return !propValue;
|
|
4326
|
-
case 'object':
|
|
4327
|
-
if (Array.isArray(propValue)) {
|
|
4328
|
-
return propValue.every(isNode);
|
|
4329
|
-
}
|
|
4330
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
4331
|
-
return true;
|
|
4332
|
-
}
|
|
4333
|
-
|
|
4334
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
4335
|
-
if (iteratorFn) {
|
|
4336
|
-
var iterator = iteratorFn.call(propValue);
|
|
4337
|
-
var step;
|
|
4338
|
-
if (iteratorFn !== propValue.entries) {
|
|
4339
|
-
while (!(step = iterator.next()).done) {
|
|
4340
|
-
if (!isNode(step.value)) {
|
|
4341
|
-
return false;
|
|
4342
|
-
}
|
|
4343
|
-
}
|
|
4344
|
-
} else {
|
|
4345
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
4346
|
-
while (!(step = iterator.next()).done) {
|
|
4347
|
-
var entry = step.value;
|
|
4348
|
-
if (entry) {
|
|
4349
|
-
if (!isNode(entry[1])) {
|
|
4350
|
-
return false;
|
|
4351
|
-
}
|
|
4352
|
-
}
|
|
4353
|
-
}
|
|
4354
|
-
}
|
|
4355
|
-
} else {
|
|
4356
|
-
return false;
|
|
4357
|
-
}
|
|
4358
|
-
|
|
4359
|
-
return true;
|
|
4360
|
-
default:
|
|
4361
|
-
return false;
|
|
4362
|
-
}
|
|
4363
|
-
}
|
|
4364
|
-
|
|
4365
|
-
function isSymbol(propType, propValue) {
|
|
4366
|
-
// Native Symbol.
|
|
4367
|
-
if (propType === 'symbol') {
|
|
4368
|
-
return true;
|
|
4369
|
-
}
|
|
4370
|
-
|
|
4371
|
-
// falsy value can't be a Symbol
|
|
4372
|
-
if (!propValue) {
|
|
4373
|
-
return false;
|
|
4374
|
-
}
|
|
4375
|
-
|
|
4376
|
-
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
4377
|
-
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
4378
|
-
return true;
|
|
4379
|
-
}
|
|
4380
|
-
|
|
4381
|
-
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
4382
|
-
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
4383
|
-
return true;
|
|
4384
|
-
}
|
|
4385
|
-
|
|
4386
|
-
return false;
|
|
4387
|
-
}
|
|
4388
|
-
|
|
4389
|
-
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
4390
|
-
function getPropType(propValue) {
|
|
4391
|
-
var propType = typeof propValue;
|
|
4392
|
-
if (Array.isArray(propValue)) {
|
|
4393
|
-
return 'array';
|
|
4394
|
-
}
|
|
4395
|
-
if (propValue instanceof RegExp) {
|
|
4396
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
4397
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
4398
|
-
// passes PropTypes.object.
|
|
4399
|
-
return 'object';
|
|
4400
|
-
}
|
|
4401
|
-
if (isSymbol(propType, propValue)) {
|
|
4402
|
-
return 'symbol';
|
|
4403
|
-
}
|
|
4404
|
-
return propType;
|
|
4405
|
-
}
|
|
4406
|
-
|
|
4407
|
-
// This handles more types than `getPropType`. Only used for error messages.
|
|
4408
|
-
// See `createPrimitiveTypeChecker`.
|
|
4409
|
-
function getPreciseType(propValue) {
|
|
4410
|
-
if (typeof propValue === 'undefined' || propValue === null) {
|
|
4411
|
-
return '' + propValue;
|
|
4412
|
-
}
|
|
4413
|
-
var propType = getPropType(propValue);
|
|
4414
|
-
if (propType === 'object') {
|
|
4415
|
-
if (propValue instanceof Date) {
|
|
4416
|
-
return 'date';
|
|
4417
|
-
} else if (propValue instanceof RegExp) {
|
|
4418
|
-
return 'regexp';
|
|
4419
|
-
}
|
|
4420
|
-
}
|
|
4421
|
-
return propType;
|
|
4422
|
-
}
|
|
4423
|
-
|
|
4424
|
-
// Returns a string that is postfixed to a warning about an invalid type.
|
|
4425
|
-
// For example, "undefined" or "of type array"
|
|
4426
|
-
function getPostfixForTypeWarning(value) {
|
|
4427
|
-
var type = getPreciseType(value);
|
|
4428
|
-
switch (type) {
|
|
4429
|
-
case 'array':
|
|
4430
|
-
case 'object':
|
|
4431
|
-
return 'an ' + type;
|
|
4432
|
-
case 'boolean':
|
|
4433
|
-
case 'date':
|
|
4434
|
-
case 'regexp':
|
|
4435
|
-
return 'a ' + type;
|
|
4436
|
-
default:
|
|
4437
|
-
return type;
|
|
4438
|
-
}
|
|
4439
|
-
}
|
|
4440
|
-
|
|
4441
|
-
// Returns class name of the object, if any.
|
|
4442
|
-
function getClassName(propValue) {
|
|
4443
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
4444
|
-
return ANONYMOUS;
|
|
4445
|
-
}
|
|
4446
|
-
return propValue.constructor.name;
|
|
4447
|
-
}
|
|
4448
|
-
|
|
4449
|
-
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
4450
|
-
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
4451
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
4452
|
-
|
|
4453
|
-
return ReactPropTypes;
|
|
4454
|
-
};
|
|
4455
|
-
return factoryWithTypeCheckers;
|
|
4456
|
-
}
|
|
4457
|
-
|
|
4458
|
-
/**
|
|
4459
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4460
|
-
*
|
|
4461
|
-
* This source code is licensed under the MIT license found in the
|
|
4462
|
-
* LICENSE file in the root directory of this source tree.
|
|
4463
|
-
*/
|
|
4464
|
-
|
|
4465
|
-
var factoryWithThrowingShims;
|
|
4466
|
-
var hasRequiredFactoryWithThrowingShims;
|
|
4467
|
-
|
|
4468
|
-
function requireFactoryWithThrowingShims () {
|
|
4469
|
-
if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
|
|
4470
|
-
hasRequiredFactoryWithThrowingShims = 1;
|
|
4471
|
-
|
|
4472
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
4473
|
-
|
|
4474
|
-
function emptyFunction() {}
|
|
4475
|
-
function emptyFunctionWithReset() {}
|
|
4476
|
-
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
4477
|
-
|
|
4478
|
-
factoryWithThrowingShims = function() {
|
|
4479
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
4480
|
-
if (secret === ReactPropTypesSecret) {
|
|
4481
|
-
// It is still safe when called from React.
|
|
4482
|
-
return;
|
|
4483
|
-
}
|
|
4484
|
-
var err = new Error(
|
|
4485
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
4486
|
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
4487
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
4488
|
-
);
|
|
4489
|
-
err.name = 'Invariant Violation';
|
|
4490
|
-
throw err;
|
|
4491
|
-
} shim.isRequired = shim;
|
|
4492
|
-
function getShim() {
|
|
4493
|
-
return shim;
|
|
4494
|
-
} // Important!
|
|
4495
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
4496
|
-
var ReactPropTypes = {
|
|
4497
|
-
array: shim,
|
|
4498
|
-
bigint: shim,
|
|
4499
|
-
bool: shim,
|
|
4500
|
-
func: shim,
|
|
4501
|
-
number: shim,
|
|
4502
|
-
object: shim,
|
|
4503
|
-
string: shim,
|
|
4504
|
-
symbol: shim,
|
|
4505
|
-
|
|
4506
|
-
any: shim,
|
|
4507
|
-
arrayOf: getShim,
|
|
4508
|
-
element: shim,
|
|
4509
|
-
elementType: shim,
|
|
4510
|
-
instanceOf: getShim,
|
|
4511
|
-
node: shim,
|
|
4512
|
-
objectOf: getShim,
|
|
4513
|
-
oneOf: getShim,
|
|
4514
|
-
oneOfType: getShim,
|
|
4515
|
-
shape: getShim,
|
|
4516
|
-
exact: getShim,
|
|
4517
|
-
|
|
4518
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
4519
|
-
resetWarningCache: emptyFunction
|
|
4520
|
-
};
|
|
4521
|
-
|
|
4522
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
4523
|
-
|
|
4524
|
-
return ReactPropTypes;
|
|
4525
|
-
};
|
|
4526
|
-
return factoryWithThrowingShims;
|
|
4527
|
-
}
|
|
4528
|
-
|
|
4529
|
-
/**
|
|
4530
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4531
|
-
*
|
|
4532
|
-
* This source code is licensed under the MIT license found in the
|
|
4533
|
-
* LICENSE file in the root directory of this source tree.
|
|
4534
|
-
*/
|
|
4535
|
-
|
|
4536
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
4537
|
-
var ReactIs = requireReactIs();
|
|
4538
|
-
|
|
4539
|
-
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
4540
|
-
// http://fb.me/prop-types-in-prod
|
|
4541
|
-
var throwOnDirectAccess = true;
|
|
4542
|
-
propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
4543
|
-
} else {
|
|
4544
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
4545
|
-
// http://fb.me/prop-types-in-prod
|
|
4546
|
-
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
4547
|
-
}
|
|
4548
|
-
|
|
4549
|
-
var propTypesExports = propTypes.exports;
|
|
4550
|
-
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
4551
|
-
|
|
4552
|
-
function ownKeys(object, enumerableOnly) {
|
|
4553
|
-
var keys = Object.keys(object);
|
|
4554
|
-
|
|
4555
|
-
if (Object.getOwnPropertySymbols) {
|
|
4556
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
4557
|
-
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
4558
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
4559
|
-
})), keys.push.apply(keys, symbols);
|
|
4560
|
-
}
|
|
4561
|
-
|
|
4562
|
-
return keys;
|
|
4563
|
-
}
|
|
4564
|
-
|
|
4565
|
-
function _objectSpread2(target) {
|
|
4566
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
4567
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
4568
|
-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
4569
|
-
_defineProperty(target, key, source[key]);
|
|
4570
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
4571
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
4572
|
-
});
|
|
4573
|
-
}
|
|
4574
|
-
|
|
4575
|
-
return target;
|
|
4576
|
-
}
|
|
4577
|
-
|
|
4578
|
-
function _typeof$1(obj) {
|
|
4579
|
-
"@babel/helpers - typeof";
|
|
4580
|
-
|
|
4581
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
4582
|
-
return typeof obj;
|
|
4583
|
-
} : function (obj) {
|
|
4584
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
4585
|
-
}, _typeof$1(obj);
|
|
4586
|
-
}
|
|
4587
|
-
|
|
4588
|
-
function _defineProperty(obj, key, value) {
|
|
4589
|
-
if (key in obj) {
|
|
4590
|
-
Object.defineProperty(obj, key, {
|
|
4591
|
-
value: value,
|
|
4592
|
-
enumerable: true,
|
|
4593
|
-
configurable: true,
|
|
4594
|
-
writable: true
|
|
4595
|
-
});
|
|
4596
|
-
} else {
|
|
4597
|
-
obj[key] = value;
|
|
4598
|
-
}
|
|
4599
|
-
|
|
4600
|
-
return obj;
|
|
4601
|
-
}
|
|
4602
|
-
|
|
4603
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
4604
|
-
if (source == null) return {};
|
|
4605
|
-
var target = {};
|
|
4606
|
-
var sourceKeys = Object.keys(source);
|
|
4607
|
-
var key, i;
|
|
4608
|
-
|
|
4609
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
4610
|
-
key = sourceKeys[i];
|
|
4611
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
4612
|
-
target[key] = source[key];
|
|
4613
|
-
}
|
|
4614
|
-
|
|
4615
|
-
return target;
|
|
4616
|
-
}
|
|
4617
|
-
|
|
4618
|
-
function _objectWithoutProperties(source, excluded) {
|
|
4619
|
-
if (source == null) return {};
|
|
4620
|
-
|
|
4621
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
4622
|
-
|
|
4623
|
-
var key, i;
|
|
4624
|
-
|
|
4625
|
-
if (Object.getOwnPropertySymbols) {
|
|
4626
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
4627
|
-
|
|
4628
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
4629
|
-
key = sourceSymbolKeys[i];
|
|
4630
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
4631
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
4632
|
-
target[key] = source[key];
|
|
4633
|
-
}
|
|
4634
|
-
}
|
|
4635
|
-
|
|
4636
|
-
return target;
|
|
4637
|
-
}
|
|
4638
|
-
|
|
4639
|
-
function _toConsumableArray(arr) {
|
|
4640
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
4641
|
-
}
|
|
4642
|
-
|
|
4643
|
-
function _arrayWithoutHoles(arr) {
|
|
4644
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
4645
|
-
}
|
|
4646
|
-
|
|
4647
|
-
function _iterableToArray(iter) {
|
|
4648
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
4649
|
-
}
|
|
4650
|
-
|
|
4651
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
4652
|
-
if (!o) return;
|
|
4653
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
4654
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
4655
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
4656
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
4657
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
4658
|
-
}
|
|
4659
|
-
|
|
4660
|
-
function _arrayLikeToArray(arr, len) {
|
|
4661
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
4662
|
-
|
|
4663
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
4664
|
-
|
|
4665
|
-
return arr2;
|
|
4666
|
-
}
|
|
4667
|
-
|
|
4668
|
-
function _nonIterableSpread() {
|
|
4669
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
4670
|
-
}
|
|
4671
|
-
|
|
4672
|
-
// Get CSS class list from a props object
|
|
4673
|
-
function classList(props) {
|
|
4674
|
-
var _classes;
|
|
4675
|
-
|
|
4676
|
-
var beat = props.beat,
|
|
4677
|
-
fade = props.fade,
|
|
4678
|
-
beatFade = props.beatFade,
|
|
4679
|
-
bounce = props.bounce,
|
|
4680
|
-
shake = props.shake,
|
|
4681
|
-
flash = props.flash,
|
|
4682
|
-
spin = props.spin,
|
|
4683
|
-
spinPulse = props.spinPulse,
|
|
4684
|
-
spinReverse = props.spinReverse,
|
|
4685
|
-
pulse = props.pulse,
|
|
4686
|
-
fixedWidth = props.fixedWidth,
|
|
4687
|
-
inverse = props.inverse,
|
|
4688
|
-
border = props.border,
|
|
4689
|
-
listItem = props.listItem,
|
|
4690
|
-
flip = props.flip,
|
|
4691
|
-
size = props.size,
|
|
4692
|
-
rotation = props.rotation,
|
|
4693
|
-
pull = props.pull; // map of CSS class names to properties
|
|
4694
|
-
|
|
4695
|
-
var classes = (_classes = {
|
|
4696
|
-
'fa-beat': beat,
|
|
4697
|
-
'fa-fade': fade,
|
|
4698
|
-
'fa-beat-fade': beatFade,
|
|
4699
|
-
'fa-bounce': bounce,
|
|
4700
|
-
'fa-shake': shake,
|
|
4701
|
-
'fa-flash': flash,
|
|
4702
|
-
'fa-spin': spin,
|
|
4703
|
-
'fa-spin-reverse': spinReverse,
|
|
4704
|
-
'fa-spin-pulse': spinPulse,
|
|
4705
|
-
'fa-pulse': pulse,
|
|
4706
|
-
'fa-fw': fixedWidth,
|
|
4707
|
-
'fa-inverse': inverse,
|
|
4708
|
-
'fa-border': border,
|
|
4709
|
-
'fa-li': listItem,
|
|
4710
|
-
'fa-flip': flip === true,
|
|
4711
|
-
'fa-flip-horizontal': flip === 'horizontal' || flip === 'both',
|
|
4712
|
-
'fa-flip-vertical': flip === 'vertical' || flip === 'both'
|
|
4713
|
-
}, _defineProperty(_classes, "fa-".concat(size), typeof size !== 'undefined' && size !== null), _defineProperty(_classes, "fa-rotate-".concat(rotation), typeof rotation !== 'undefined' && rotation !== null && rotation !== 0), _defineProperty(_classes, "fa-pull-".concat(pull), typeof pull !== 'undefined' && pull !== null), _defineProperty(_classes, 'fa-swap-opacity', props.swapOpacity), _classes); // map over all the keys in the classes object
|
|
4714
|
-
// return an array of the keys where the value for the key is not null
|
|
4715
|
-
|
|
4716
|
-
return Object.keys(classes).map(function (key) {
|
|
4717
|
-
return classes[key] ? key : null;
|
|
4718
|
-
}).filter(function (key) {
|
|
4719
|
-
return key;
|
|
4720
|
-
});
|
|
4721
|
-
}
|
|
4722
|
-
|
|
4723
|
-
// Camelize taken from humps
|
|
4724
|
-
// humps is copyright © 2012+ Dom Christie
|
|
4725
|
-
// Released under the MIT license.
|
|
4726
|
-
// Performant way to determine if object coerces to a number
|
|
4727
|
-
function _isNumerical(obj) {
|
|
4728
|
-
obj = obj - 0; // eslint-disable-next-line no-self-compare
|
|
4729
|
-
|
|
4730
|
-
return obj === obj;
|
|
4731
|
-
}
|
|
4732
|
-
|
|
4733
|
-
function camelize(string) {
|
|
4734
|
-
if (_isNumerical(string)) {
|
|
4735
|
-
return string;
|
|
4736
|
-
} // eslint-disable-next-line no-useless-escape
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
string = string.replace(/[\-_\s]+(.)?/g, function (match, chr) {
|
|
4740
|
-
return chr ? chr.toUpperCase() : '';
|
|
4741
|
-
}); // Ensure 1st char is always lowercase
|
|
4742
|
-
|
|
4743
|
-
return string.substr(0, 1).toLowerCase() + string.substr(1);
|
|
4744
|
-
}
|
|
4745
|
-
|
|
4746
|
-
var _excluded = ["style"];
|
|
4747
|
-
|
|
4748
|
-
function capitalize$1(val) {
|
|
4749
|
-
return val.charAt(0).toUpperCase() + val.slice(1);
|
|
4750
|
-
}
|
|
4751
|
-
|
|
4752
|
-
function styleToObject(style) {
|
|
4753
|
-
return style.split(';').map(function (s) {
|
|
4754
|
-
return s.trim();
|
|
4755
|
-
}).filter(function (s) {
|
|
4756
|
-
return s;
|
|
4757
|
-
}).reduce(function (acc, pair) {
|
|
4758
|
-
var i = pair.indexOf(':');
|
|
4759
|
-
var prop = camelize(pair.slice(0, i));
|
|
4760
|
-
var value = pair.slice(i + 1).trim();
|
|
4761
|
-
prop.startsWith('webkit') ? acc[capitalize$1(prop)] = value : acc[prop] = value;
|
|
4762
|
-
return acc;
|
|
4763
|
-
}, {});
|
|
4764
|
-
}
|
|
4765
|
-
|
|
4766
|
-
function convert(createElement, element) {
|
|
4767
|
-
var extraProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
4768
|
-
|
|
4769
|
-
if (typeof element === 'string') {
|
|
4770
|
-
return element;
|
|
4771
|
-
}
|
|
4772
|
-
|
|
4773
|
-
var children = (element.children || []).map(function (child) {
|
|
4774
|
-
return convert(createElement, child);
|
|
4775
|
-
});
|
|
4776
|
-
/* eslint-disable dot-notation */
|
|
4777
|
-
|
|
4778
|
-
var mixins = Object.keys(element.attributes || {}).reduce(function (acc, key) {
|
|
4779
|
-
var val = element.attributes[key];
|
|
4780
|
-
|
|
4781
|
-
switch (key) {
|
|
4782
|
-
case 'class':
|
|
4783
|
-
acc.attrs['className'] = val;
|
|
4784
|
-
delete element.attributes['class'];
|
|
4785
|
-
break;
|
|
4786
|
-
|
|
4787
|
-
case 'style':
|
|
4788
|
-
acc.attrs['style'] = styleToObject(val);
|
|
4789
|
-
break;
|
|
4790
|
-
|
|
4791
|
-
default:
|
|
4792
|
-
if (key.indexOf('aria-') === 0 || key.indexOf('data-') === 0) {
|
|
4793
|
-
acc.attrs[key.toLowerCase()] = val;
|
|
4794
|
-
} else {
|
|
4795
|
-
acc.attrs[camelize(key)] = val;
|
|
4796
|
-
}
|
|
4797
|
-
|
|
4798
|
-
}
|
|
4799
|
-
|
|
4800
|
-
return acc;
|
|
4801
|
-
}, {
|
|
4802
|
-
attrs: {}
|
|
4803
|
-
});
|
|
4804
|
-
|
|
4805
|
-
var _extraProps$style = extraProps.style,
|
|
4806
|
-
existingStyle = _extraProps$style === void 0 ? {} : _extraProps$style,
|
|
4807
|
-
remaining = _objectWithoutProperties(extraProps, _excluded);
|
|
4808
|
-
|
|
4809
|
-
mixins.attrs['style'] = _objectSpread2(_objectSpread2({}, mixins.attrs['style']), existingStyle);
|
|
4810
|
-
/* eslint-enable */
|
|
4811
|
-
|
|
4812
|
-
return createElement.apply(void 0, [element.tag, _objectSpread2(_objectSpread2({}, mixins.attrs), remaining)].concat(_toConsumableArray(children)));
|
|
4813
|
-
}
|
|
4814
|
-
|
|
4815
|
-
var PRODUCTION = false;
|
|
4816
|
-
|
|
4817
|
-
try {
|
|
4818
|
-
PRODUCTION = process.env.NODE_ENV === 'production';
|
|
4819
|
-
} catch (e) {}
|
|
4820
|
-
|
|
4821
|
-
function log () {
|
|
4822
|
-
if (!PRODUCTION && console && typeof console.error === 'function') {
|
|
4823
|
-
var _console;
|
|
4824
|
-
|
|
4825
|
-
(_console = console).error.apply(_console, arguments);
|
|
4826
|
-
}
|
|
4827
|
-
}
|
|
4828
|
-
|
|
4829
|
-
function normalizeIconArgs(icon) {
|
|
4830
|
-
// this has everything that it needs to be rendered which means it was probably imported
|
|
4831
|
-
// directly from an icon svg package
|
|
4832
|
-
if (icon && _typeof$1(icon) === 'object' && icon.prefix && icon.iconName && icon.icon) {
|
|
4833
|
-
return icon;
|
|
4834
|
-
}
|
|
4835
|
-
|
|
4836
|
-
if (parse$1.icon) {
|
|
4837
|
-
return parse$1.icon(icon);
|
|
4838
|
-
} // if the icon is null, there's nothing to do
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
if (icon === null) {
|
|
4842
|
-
return null;
|
|
4843
|
-
} // if the icon is an object and has a prefix and an icon name, return it
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
if (icon && _typeof$1(icon) === 'object' && icon.prefix && icon.iconName) {
|
|
4847
|
-
return icon;
|
|
4848
|
-
} // if it's an array with length of two
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
if (Array.isArray(icon) && icon.length === 2) {
|
|
4852
|
-
// use the first item as prefix, second as icon name
|
|
4853
|
-
return {
|
|
4854
|
-
prefix: icon[0],
|
|
4855
|
-
iconName: icon[1]
|
|
4856
|
-
};
|
|
4857
|
-
} // if it's a string, use it as the icon name
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
if (typeof icon === 'string') {
|
|
4861
|
-
return {
|
|
4862
|
-
prefix: 'fas',
|
|
4863
|
-
iconName: icon
|
|
4864
|
-
};
|
|
4865
|
-
}
|
|
4866
|
-
}
|
|
4867
|
-
|
|
4868
|
-
// creates an object with a key of key
|
|
4869
|
-
// and a value of value
|
|
4870
|
-
// if certain conditions are met
|
|
4871
|
-
function objectWithKey(key, value) {
|
|
4872
|
-
// if the value is a non-empty array
|
|
4873
|
-
// or it's not an array but it is truthy
|
|
4874
|
-
// then create the object with the key and the value
|
|
4875
|
-
// if not, return an empty array
|
|
4876
|
-
return Array.isArray(value) && value.length > 0 || !Array.isArray(value) && value ? _defineProperty({}, key, value) : {};
|
|
4877
|
-
}
|
|
4878
|
-
|
|
4879
|
-
var FontAwesomeIcon = /*#__PURE__*/React__default__default.forwardRef(function (props, ref) {
|
|
4880
|
-
var iconArgs = props.icon,
|
|
4881
|
-
maskArgs = props.mask,
|
|
4882
|
-
symbol = props.symbol,
|
|
4883
|
-
className = props.className,
|
|
4884
|
-
title = props.title,
|
|
4885
|
-
titleId = props.titleId,
|
|
4886
|
-
maskId = props.maskId;
|
|
4887
|
-
var iconLookup = normalizeIconArgs(iconArgs);
|
|
4888
|
-
var classes = objectWithKey('classes', [].concat(_toConsumableArray(classList(props)), _toConsumableArray(className.split(' '))));
|
|
4889
|
-
var transform = objectWithKey('transform', typeof props.transform === 'string' ? parse$1.transform(props.transform) : props.transform);
|
|
4890
|
-
var mask = objectWithKey('mask', normalizeIconArgs(maskArgs));
|
|
4891
|
-
var renderedIcon = icon(iconLookup, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, classes), transform), mask), {}, {
|
|
4892
|
-
symbol: symbol,
|
|
4893
|
-
title: title,
|
|
4894
|
-
titleId: titleId,
|
|
4895
|
-
maskId: maskId
|
|
4896
|
-
}));
|
|
4897
|
-
|
|
4898
|
-
if (!renderedIcon) {
|
|
4899
|
-
log('Could not find icon', iconLookup);
|
|
4900
|
-
return null;
|
|
4901
|
-
}
|
|
4902
|
-
|
|
4903
|
-
var abstract = renderedIcon.abstract;
|
|
4904
|
-
var extraProps = {
|
|
4905
|
-
ref: ref
|
|
4906
|
-
};
|
|
4907
|
-
Object.keys(props).forEach(function (key) {
|
|
4908
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
4909
|
-
if (!FontAwesomeIcon.defaultProps.hasOwnProperty(key)) {
|
|
4910
|
-
extraProps[key] = props[key];
|
|
4911
|
-
}
|
|
4912
|
-
});
|
|
4913
|
-
return convertCurry(abstract[0], extraProps);
|
|
4914
|
-
});
|
|
4915
|
-
FontAwesomeIcon.displayName = 'FontAwesomeIcon';
|
|
4916
|
-
FontAwesomeIcon.propTypes = {
|
|
4917
|
-
beat: PropTypes.bool,
|
|
4918
|
-
border: PropTypes.bool,
|
|
4919
|
-
beatFade: PropTypes.bool,
|
|
4920
|
-
bounce: PropTypes.bool,
|
|
4921
|
-
className: PropTypes.string,
|
|
4922
|
-
fade: PropTypes.bool,
|
|
4923
|
-
flash: PropTypes.bool,
|
|
4924
|
-
mask: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.string]),
|
|
4925
|
-
maskId: PropTypes.string,
|
|
4926
|
-
fixedWidth: PropTypes.bool,
|
|
4927
|
-
inverse: PropTypes.bool,
|
|
4928
|
-
flip: PropTypes.oneOf([true, false, 'horizontal', 'vertical', 'both']),
|
|
4929
|
-
icon: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.string]),
|
|
4930
|
-
listItem: PropTypes.bool,
|
|
4931
|
-
pull: PropTypes.oneOf(['right', 'left']),
|
|
4932
|
-
pulse: PropTypes.bool,
|
|
4933
|
-
rotation: PropTypes.oneOf([0, 90, 180, 270]),
|
|
4934
|
-
shake: PropTypes.bool,
|
|
4935
|
-
size: PropTypes.oneOf(['2xs', 'xs', 'sm', 'lg', 'xl', '2xl', '1x', '2x', '3x', '4x', '5x', '6x', '7x', '8x', '9x', '10x']),
|
|
4936
|
-
spin: PropTypes.bool,
|
|
4937
|
-
spinPulse: PropTypes.bool,
|
|
4938
|
-
spinReverse: PropTypes.bool,
|
|
4939
|
-
symbol: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
4940
|
-
title: PropTypes.string,
|
|
4941
|
-
titleId: PropTypes.string,
|
|
4942
|
-
transform: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
|
4943
|
-
swapOpacity: PropTypes.bool
|
|
4944
|
-
};
|
|
4945
|
-
FontAwesomeIcon.defaultProps = {
|
|
4946
|
-
border: false,
|
|
4947
|
-
className: '',
|
|
4948
|
-
mask: null,
|
|
4949
|
-
maskId: null,
|
|
4950
|
-
fixedWidth: false,
|
|
4951
|
-
inverse: false,
|
|
4952
|
-
flip: false,
|
|
4953
|
-
icon: null,
|
|
4954
|
-
listItem: false,
|
|
4955
|
-
pull: null,
|
|
4956
|
-
pulse: false,
|
|
4957
|
-
rotation: null,
|
|
4958
|
-
size: null,
|
|
4959
|
-
spin: false,
|
|
4960
|
-
spinPulse: false,
|
|
4961
|
-
spinReverse: false,
|
|
4962
|
-
beat: false,
|
|
4963
|
-
fade: false,
|
|
4964
|
-
beatFade: false,
|
|
4965
|
-
bounce: false,
|
|
4966
|
-
shake: false,
|
|
4967
|
-
symbol: false,
|
|
4968
|
-
title: '',
|
|
4969
|
-
titleId: null,
|
|
4970
|
-
transform: null,
|
|
4971
|
-
swapOpacity: false
|
|
4972
|
-
};
|
|
4973
|
-
var convertCurry = convert.bind(null, React__default__default.createElement);
|
|
4974
|
-
|
|
4975
|
-
var faMagnifyingGlass = {
|
|
4976
|
-
prefix: 'fas',
|
|
4977
|
-
iconName: 'magnifying-glass',
|
|
4978
|
-
icon: [512, 512, [128269, "search"], "f002", "M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]
|
|
4979
|
-
};
|
|
4980
|
-
var faSearch = faMagnifyingGlass;
|
|
4981
458
|
|
|
4982
459
|
var css_248z$6 = ".will-filter-bar-submit-button {\n width: auto;\n height: auto;\n background-color: var(--will-primary);\n color: var(--will-white);\n padding: 10px 20px;\n border-radius: 20px;\n cursor: pointer;\n border: none;\n white-space: nowrap;\n text-transform: uppercase;\n font-size: 12px;\n display: flex;\n align-items: center;\n}\n\n.will-filter-bar-submit-button span {\n margin-right: 10px;\n}";
|
|
4983
460
|
styleInject(css_248z$6);
|
|
@@ -4987,7 +464,9 @@ function SubmitButton(_a) {
|
|
|
4987
464
|
var t = useTranslation('filterBar').t;
|
|
4988
465
|
return (React__default__default.createElement("button", { className: "will-filter-bar-submit-button", onClick: onClick },
|
|
4989
466
|
React__default__default.createElement("span", null,
|
|
4990
|
-
React__default__default.createElement(
|
|
467
|
+
React__default__default.createElement(IconContext.Provider, { value: { color: 'blue', className: 'global-class-name' } },
|
|
468
|
+
" ",
|
|
469
|
+
React__default__default.createElement(FaFolder, null))),
|
|
4991
470
|
t('submit.label')));
|
|
4992
471
|
}
|
|
4993
472
|
|