@nulogy/components 7.2.1 → 7.3.0
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/dist/main.js +335 -2155
- package/dist/main.module.js +373 -2199
- package/dist/src/BrandedNavBar/BrandLogoContainer.d.ts +10 -0
- package/dist/src/BrandedNavBar/DesktopMenu.d.ts +3 -3
- package/dist/src/BrandedNavBar/EnvironmentBanner.d.ts +1 -1
- package/dist/src/BrandedNavBar/NavBarBackground.d.ts +8 -0
- package/dist/src/BrandedNavBar/SmallNavBar.d.ts +24 -0
- package/dist/src/BrandedNavBar/index.d.ts +12 -0
- package/dist/src/Button/IconicButton.d.ts +3 -6
- package/dist/src/StyledProps/index.d.ts +2 -2
- package/dist/src/index.d.ts +2 -1
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/withMenuState.d.ts +6 -0
- package/package.json +2 -2
package/dist/main.module.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { useContext, useState, useRef, useEffect, useMemo, createElement, createContext, useLayoutEffect, useCallback, forwardRef, Fragment, Component as Component$1, cloneElement, Children, isValidElement,
|
|
2
|
+
import React__default, { useContext, useState, useRef, useEffect, useMemo, createElement, createContext, useLayoutEffect, useCallback, forwardRef, Fragment, Component as Component$1, cloneElement, Children, isValidElement, useImperativeHandle, PureComponent } from 'react';
|
|
3
3
|
import styled, { createGlobalStyle, ThemeProvider, useTheme, ThemeContext as ThemeContext$1 } from 'styled-components';
|
|
4
|
-
import _typeof$
|
|
5
|
-
import _classCallCheck$
|
|
6
|
-
import _createClass$
|
|
7
|
-
import _defineProperty$
|
|
4
|
+
import _typeof$1 from '@babel/runtime/helpers/typeof';
|
|
5
|
+
import _classCallCheck$1 from '@babel/runtime/helpers/classCallCheck';
|
|
6
|
+
import _createClass$1 from '@babel/runtime/helpers/createClass';
|
|
7
|
+
import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
|
|
8
8
|
import assign$1 from 'object-assign';
|
|
9
9
|
import icons from '@nulogy/icons';
|
|
10
10
|
import _extends$4 from '@babel/runtime/helpers/extends';
|
|
11
|
-
import _assertThisInitialized$
|
|
11
|
+
import _assertThisInitialized$2 from '@babel/runtime/helpers/assertThisInitialized';
|
|
12
12
|
import _inheritsLoose$2 from '@babel/runtime/helpers/inheritsLoose';
|
|
13
|
-
import PropTypes
|
|
13
|
+
import PropTypes from 'prop-types';
|
|
14
14
|
import isEqual$2 from 'react-fast-compare';
|
|
15
15
|
import warning$1 from 'warning';
|
|
16
16
|
import _slicedToArray$1 from '@babel/runtime/helpers/slicedToArray';
|
|
17
17
|
import _objectWithoutPropertiesLoose$2 from '@babel/runtime/helpers/objectWithoutPropertiesLoose';
|
|
18
18
|
import deepEqual from 'deep-equal';
|
|
19
19
|
import createContext$1 from 'create-react-context';
|
|
20
|
-
import
|
|
20
|
+
import ReactResizeDetector from 'react-resize-detector';
|
|
21
21
|
import WindowedSelect, { components as components$1 } from 'react-windowed-select';
|
|
22
|
+
import reactDom, { findDOMNode, createPortal } from 'react-dom';
|
|
22
23
|
import exenv from 'exenv';
|
|
23
24
|
import smoothscroll from 'smoothscroll-polyfill';
|
|
24
25
|
import t from 'classnames';
|
|
@@ -42,12 +43,12 @@ function getDefaults() {
|
|
|
42
43
|
}
|
|
43
44
|
var ReportNamespaces = function () {
|
|
44
45
|
function ReportNamespaces() {
|
|
45
|
-
_classCallCheck$
|
|
46
|
+
_classCallCheck$1(this, ReportNamespaces);
|
|
46
47
|
|
|
47
48
|
this.usedNamespaces = {};
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
_createClass$
|
|
51
|
+
_createClass$1(ReportNamespaces, [{
|
|
51
52
|
key: "addUsedNamespaces",
|
|
52
53
|
value: function addUsedNamespaces(namespaces) {
|
|
53
54
|
var _this = this;
|
|
@@ -135,7 +136,7 @@ function hasLoadedNamespace(ns, i18n) {
|
|
|
135
136
|
|
|
136
137
|
function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
137
138
|
|
|
138
|
-
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$5(Object(source), true).forEach(function (key) { _defineProperty$
|
|
139
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$5(Object(source), true).forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
139
140
|
function useTranslation(ns) {
|
|
140
141
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
141
142
|
var i18nFromProps = props.i18n;
|
|
@@ -451,23 +452,23 @@ var Theme = {
|
|
|
451
452
|
}
|
|
452
453
|
};
|
|
453
454
|
|
|
454
|
-
function _typeof
|
|
455
|
+
function _typeof(obj) {
|
|
455
456
|
"@babel/helpers - typeof";
|
|
456
457
|
|
|
457
458
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
458
|
-
_typeof
|
|
459
|
+
_typeof = function _typeof(obj) {
|
|
459
460
|
return typeof obj;
|
|
460
461
|
};
|
|
461
462
|
} else {
|
|
462
|
-
_typeof
|
|
463
|
+
_typeof = function _typeof(obj) {
|
|
463
464
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
464
465
|
};
|
|
465
466
|
}
|
|
466
467
|
|
|
467
|
-
return _typeof
|
|
468
|
+
return _typeof(obj);
|
|
468
469
|
}
|
|
469
470
|
|
|
470
|
-
function _defineProperty
|
|
471
|
+
function _defineProperty(obj, key, value) {
|
|
471
472
|
if (key in obj) {
|
|
472
473
|
Object.defineProperty(obj, key, {
|
|
473
474
|
value: value,
|
|
@@ -494,20 +495,20 @@ function _objectSpread$5(target) {
|
|
|
494
495
|
}
|
|
495
496
|
|
|
496
497
|
ownKeys.forEach(function (key) {
|
|
497
|
-
_defineProperty
|
|
498
|
+
_defineProperty(target, key, source[key]);
|
|
498
499
|
});
|
|
499
500
|
}
|
|
500
501
|
|
|
501
502
|
return target;
|
|
502
503
|
}
|
|
503
504
|
|
|
504
|
-
function _classCallCheck
|
|
505
|
+
function _classCallCheck(instance, Constructor) {
|
|
505
506
|
if (!(instance instanceof Constructor)) {
|
|
506
507
|
throw new TypeError("Cannot call a class as a function");
|
|
507
508
|
}
|
|
508
509
|
}
|
|
509
510
|
|
|
510
|
-
function _defineProperties
|
|
511
|
+
function _defineProperties(target, props) {
|
|
511
512
|
for (var i = 0; i < props.length; i++) {
|
|
512
513
|
var descriptor = props[i];
|
|
513
514
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -517,13 +518,13 @@ function _defineProperties$2(target, props) {
|
|
|
517
518
|
}
|
|
518
519
|
}
|
|
519
520
|
|
|
520
|
-
function _createClass
|
|
521
|
-
if (protoProps) _defineProperties
|
|
522
|
-
if (staticProps) _defineProperties
|
|
521
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
522
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
523
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
523
524
|
return Constructor;
|
|
524
525
|
}
|
|
525
526
|
|
|
526
|
-
function _assertThisInitialized$
|
|
527
|
+
function _assertThisInitialized$1(self) {
|
|
527
528
|
if (self === void 0) {
|
|
528
529
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
529
530
|
}
|
|
@@ -531,31 +532,31 @@ function _assertThisInitialized$3(self) {
|
|
|
531
532
|
return self;
|
|
532
533
|
}
|
|
533
534
|
|
|
534
|
-
function _possibleConstructorReturn
|
|
535
|
-
if (call && (_typeof$
|
|
535
|
+
function _possibleConstructorReturn(self, call) {
|
|
536
|
+
if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
|
|
536
537
|
return call;
|
|
537
538
|
}
|
|
538
539
|
|
|
539
|
-
return _assertThisInitialized$
|
|
540
|
+
return _assertThisInitialized$1(self);
|
|
540
541
|
}
|
|
541
542
|
|
|
542
|
-
function _getPrototypeOf
|
|
543
|
-
_getPrototypeOf
|
|
543
|
+
function _getPrototypeOf(o) {
|
|
544
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
544
545
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
545
546
|
};
|
|
546
|
-
return _getPrototypeOf
|
|
547
|
+
return _getPrototypeOf(o);
|
|
547
548
|
}
|
|
548
549
|
|
|
549
|
-
function _setPrototypeOf$
|
|
550
|
-
_setPrototypeOf$
|
|
550
|
+
function _setPrototypeOf$1(o, p) {
|
|
551
|
+
_setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
551
552
|
o.__proto__ = p;
|
|
552
553
|
return o;
|
|
553
554
|
};
|
|
554
555
|
|
|
555
|
-
return _setPrototypeOf$
|
|
556
|
+
return _setPrototypeOf$1(o, p);
|
|
556
557
|
}
|
|
557
558
|
|
|
558
|
-
function _inherits
|
|
559
|
+
function _inherits(subClass, superClass) {
|
|
559
560
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
560
561
|
throw new TypeError("Super expression must either be null or a function");
|
|
561
562
|
}
|
|
@@ -567,7 +568,7 @@ function _inherits$2(subClass, superClass) {
|
|
|
567
568
|
configurable: true
|
|
568
569
|
}
|
|
569
570
|
});
|
|
570
|
-
if (superClass) _setPrototypeOf$
|
|
571
|
+
if (superClass) _setPrototypeOf$1(subClass, superClass);
|
|
571
572
|
}
|
|
572
573
|
|
|
573
574
|
var consoleLogger = {
|
|
@@ -590,12 +591,12 @@ var Logger = function () {
|
|
|
590
591
|
function Logger(concreteLogger) {
|
|
591
592
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
592
593
|
|
|
593
|
-
_classCallCheck
|
|
594
|
+
_classCallCheck(this, Logger);
|
|
594
595
|
|
|
595
596
|
this.init(concreteLogger, options);
|
|
596
597
|
}
|
|
597
598
|
|
|
598
|
-
_createClass
|
|
599
|
+
_createClass(Logger, [{
|
|
599
600
|
key: "init",
|
|
600
601
|
value: function init(concreteLogger) {
|
|
601
602
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -668,12 +669,12 @@ var baseLogger = new Logger();
|
|
|
668
669
|
|
|
669
670
|
var EventEmitter = function () {
|
|
670
671
|
function EventEmitter() {
|
|
671
|
-
_classCallCheck
|
|
672
|
+
_classCallCheck(this, EventEmitter);
|
|
672
673
|
|
|
673
674
|
this.observers = {};
|
|
674
675
|
}
|
|
675
676
|
|
|
676
|
-
_createClass
|
|
677
|
+
_createClass(EventEmitter, [{
|
|
677
678
|
key: "on",
|
|
678
679
|
value: function on(events, listener) {
|
|
679
680
|
var _this = this;
|
|
@@ -850,7 +851,7 @@ function escape(data) {
|
|
|
850
851
|
var isIE10$1 = typeof window !== 'undefined' && window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf('MSIE') > -1;
|
|
851
852
|
|
|
852
853
|
var ResourceStore = function (_EventEmitter) {
|
|
853
|
-
_inherits
|
|
854
|
+
_inherits(ResourceStore, _EventEmitter);
|
|
854
855
|
|
|
855
856
|
function ResourceStore(data) {
|
|
856
857
|
var _this;
|
|
@@ -860,12 +861,12 @@ var ResourceStore = function (_EventEmitter) {
|
|
|
860
861
|
defaultNS: 'translation'
|
|
861
862
|
};
|
|
862
863
|
|
|
863
|
-
_classCallCheck
|
|
864
|
+
_classCallCheck(this, ResourceStore);
|
|
864
865
|
|
|
865
|
-
_this = _possibleConstructorReturn
|
|
866
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(ResourceStore).call(this));
|
|
866
867
|
|
|
867
868
|
if (isIE10$1) {
|
|
868
|
-
EventEmitter.call(_assertThisInitialized$
|
|
869
|
+
EventEmitter.call(_assertThisInitialized$1(_this));
|
|
869
870
|
}
|
|
870
871
|
|
|
871
872
|
_this.data = data || {};
|
|
@@ -878,7 +879,7 @@ var ResourceStore = function (_EventEmitter) {
|
|
|
878
879
|
return _this;
|
|
879
880
|
}
|
|
880
881
|
|
|
881
|
-
_createClass
|
|
882
|
+
_createClass(ResourceStore, [{
|
|
882
883
|
key: "addNamespaces",
|
|
883
884
|
value: function addNamespaces(ns) {
|
|
884
885
|
if (this.options.ns.indexOf(ns) < 0) {
|
|
@@ -1027,22 +1028,22 @@ var postProcessor = {
|
|
|
1027
1028
|
var checkedLoadedFor = {};
|
|
1028
1029
|
|
|
1029
1030
|
var Translator = function (_EventEmitter) {
|
|
1030
|
-
_inherits
|
|
1031
|
+
_inherits(Translator, _EventEmitter);
|
|
1031
1032
|
|
|
1032
1033
|
function Translator(services) {
|
|
1033
1034
|
var _this;
|
|
1034
1035
|
|
|
1035
1036
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1036
1037
|
|
|
1037
|
-
_classCallCheck
|
|
1038
|
+
_classCallCheck(this, Translator);
|
|
1038
1039
|
|
|
1039
|
-
_this = _possibleConstructorReturn
|
|
1040
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(Translator).call(this));
|
|
1040
1041
|
|
|
1041
1042
|
if (isIE10$1) {
|
|
1042
|
-
EventEmitter.call(_assertThisInitialized$
|
|
1043
|
+
EventEmitter.call(_assertThisInitialized$1(_this));
|
|
1043
1044
|
}
|
|
1044
1045
|
|
|
1045
|
-
copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, _assertThisInitialized$
|
|
1046
|
+
copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, _assertThisInitialized$1(_this));
|
|
1046
1047
|
_this.options = options;
|
|
1047
1048
|
|
|
1048
1049
|
if (_this.options.keySeparator === undefined) {
|
|
@@ -1053,7 +1054,7 @@ var Translator = function (_EventEmitter) {
|
|
|
1053
1054
|
return _this;
|
|
1054
1055
|
}
|
|
1055
1056
|
|
|
1056
|
-
_createClass
|
|
1057
|
+
_createClass(Translator, [{
|
|
1057
1058
|
key: "changeLanguage",
|
|
1058
1059
|
value: function changeLanguage(lng) {
|
|
1059
1060
|
if (lng) this.language = lng;
|
|
@@ -1101,7 +1102,7 @@ var Translator = function (_EventEmitter) {
|
|
|
1101
1102
|
value: function translate(keys, options, lastKey) {
|
|
1102
1103
|
var _this2 = this;
|
|
1103
1104
|
|
|
1104
|
-
if (_typeof
|
|
1105
|
+
if (_typeof(options) !== 'object' && this.options.overloadTranslationOptionHandler) {
|
|
1105
1106
|
options = this.options.overloadTranslationOptionHandler(arguments);
|
|
1106
1107
|
}
|
|
1107
1108
|
|
|
@@ -1400,7 +1401,7 @@ function capitalize(string) {
|
|
|
1400
1401
|
|
|
1401
1402
|
var LanguageUtil = function () {
|
|
1402
1403
|
function LanguageUtil(options) {
|
|
1403
|
-
_classCallCheck
|
|
1404
|
+
_classCallCheck(this, LanguageUtil);
|
|
1404
1405
|
|
|
1405
1406
|
this.options = options;
|
|
1406
1407
|
this.whitelist = this.options.supportedLngs || false;
|
|
@@ -1408,7 +1409,7 @@ var LanguageUtil = function () {
|
|
|
1408
1409
|
this.logger = baseLogger.create('languageUtils');
|
|
1409
1410
|
}
|
|
1410
1411
|
|
|
1411
|
-
_createClass
|
|
1412
|
+
_createClass(LanguageUtil, [{
|
|
1412
1413
|
key: "getScriptPartFromCode",
|
|
1413
1414
|
value: function getScriptPartFromCode(code) {
|
|
1414
1415
|
if (!code || code.indexOf('-') < 0) return null;
|
|
@@ -1729,7 +1730,7 @@ var PluralResolver = function () {
|
|
|
1729
1730
|
function PluralResolver(languageUtils) {
|
|
1730
1731
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1731
1732
|
|
|
1732
|
-
_classCallCheck
|
|
1733
|
+
_classCallCheck(this, PluralResolver);
|
|
1733
1734
|
|
|
1734
1735
|
this.languageUtils = languageUtils;
|
|
1735
1736
|
this.options = options;
|
|
@@ -1737,7 +1738,7 @@ var PluralResolver = function () {
|
|
|
1737
1738
|
this.rules = createRules();
|
|
1738
1739
|
}
|
|
1739
1740
|
|
|
1740
|
-
_createClass
|
|
1741
|
+
_createClass(PluralResolver, [{
|
|
1741
1742
|
key: "addRule",
|
|
1742
1743
|
value: function addRule(lng, obj) {
|
|
1743
1744
|
this.rules[lng] = obj;
|
|
@@ -1823,7 +1824,7 @@ var Interpolator = function () {
|
|
|
1823
1824
|
function Interpolator() {
|
|
1824
1825
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1825
1826
|
|
|
1826
|
-
_classCallCheck
|
|
1827
|
+
_classCallCheck(this, Interpolator);
|
|
1827
1828
|
|
|
1828
1829
|
this.logger = baseLogger.create('interpolator');
|
|
1829
1830
|
this.options = options;
|
|
@@ -1835,7 +1836,7 @@ var Interpolator = function () {
|
|
|
1835
1836
|
this.init(options);
|
|
1836
1837
|
}
|
|
1837
1838
|
|
|
1838
|
-
_createClass
|
|
1839
|
+
_createClass(Interpolator, [{
|
|
1839
1840
|
key: "init",
|
|
1840
1841
|
value: function init() {
|
|
1841
1842
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -2030,19 +2031,19 @@ function remove(arr, what) {
|
|
|
2030
2031
|
}
|
|
2031
2032
|
|
|
2032
2033
|
var Connector = function (_EventEmitter) {
|
|
2033
|
-
_inherits
|
|
2034
|
+
_inherits(Connector, _EventEmitter);
|
|
2034
2035
|
|
|
2035
2036
|
function Connector(backend, store, services) {
|
|
2036
2037
|
var _this;
|
|
2037
2038
|
|
|
2038
2039
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
2039
2040
|
|
|
2040
|
-
_classCallCheck
|
|
2041
|
+
_classCallCheck(this, Connector);
|
|
2041
2042
|
|
|
2042
|
-
_this = _possibleConstructorReturn
|
|
2043
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(Connector).call(this));
|
|
2043
2044
|
|
|
2044
2045
|
if (isIE10$1) {
|
|
2045
|
-
EventEmitter.call(_assertThisInitialized$
|
|
2046
|
+
EventEmitter.call(_assertThisInitialized$1(_this));
|
|
2046
2047
|
}
|
|
2047
2048
|
|
|
2048
2049
|
_this.backend = backend;
|
|
@@ -2061,7 +2062,7 @@ var Connector = function (_EventEmitter) {
|
|
|
2061
2062
|
return _this;
|
|
2062
2063
|
}
|
|
2063
2064
|
|
|
2064
|
-
_createClass
|
|
2065
|
+
_createClass(Connector, [{
|
|
2065
2066
|
key: "queueLoad",
|
|
2066
2067
|
value: function queueLoad(languages, namespaces, options, callback) {
|
|
2067
2068
|
var _this2 = this;
|
|
@@ -2287,11 +2288,11 @@ function get$2() {
|
|
|
2287
2288
|
appendNamespaceToCIMode: false,
|
|
2288
2289
|
overloadTranslationOptionHandler: function handle(args) {
|
|
2289
2290
|
var ret = {};
|
|
2290
|
-
if (_typeof
|
|
2291
|
+
if (_typeof(args[1]) === 'object') ret = args[1];
|
|
2291
2292
|
if (typeof args[1] === 'string') ret.defaultValue = args[1];
|
|
2292
2293
|
if (typeof args[2] === 'string') ret.tDescription = args[2];
|
|
2293
2294
|
|
|
2294
|
-
if (_typeof
|
|
2295
|
+
if (_typeof(args[2]) === 'object' || _typeof(args[3]) === 'object') {
|
|
2295
2296
|
var options = args[3] || args[2];
|
|
2296
2297
|
Object.keys(options).forEach(function (key) {
|
|
2297
2298
|
ret[key] = options[key];
|
|
@@ -2344,7 +2345,7 @@ function transformOptions(options) {
|
|
|
2344
2345
|
function noop$2() {}
|
|
2345
2346
|
|
|
2346
2347
|
var I18n = function (_EventEmitter) {
|
|
2347
|
-
_inherits
|
|
2348
|
+
_inherits(I18n, _EventEmitter);
|
|
2348
2349
|
|
|
2349
2350
|
function I18n() {
|
|
2350
2351
|
var _this;
|
|
@@ -2352,12 +2353,12 @@ var I18n = function (_EventEmitter) {
|
|
|
2352
2353
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2353
2354
|
var callback = arguments.length > 1 ? arguments[1] : undefined;
|
|
2354
2355
|
|
|
2355
|
-
_classCallCheck
|
|
2356
|
+
_classCallCheck(this, I18n);
|
|
2356
2357
|
|
|
2357
|
-
_this = _possibleConstructorReturn
|
|
2358
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(I18n).call(this));
|
|
2358
2359
|
|
|
2359
2360
|
if (isIE10$1) {
|
|
2360
|
-
EventEmitter.call(_assertThisInitialized$
|
|
2361
|
+
EventEmitter.call(_assertThisInitialized$1(_this));
|
|
2361
2362
|
}
|
|
2362
2363
|
|
|
2363
2364
|
_this.options = transformOptions(options);
|
|
@@ -2371,7 +2372,7 @@ var I18n = function (_EventEmitter) {
|
|
|
2371
2372
|
if (!_this.options.initImmediate) {
|
|
2372
2373
|
_this.init(options, callback);
|
|
2373
2374
|
|
|
2374
|
-
return _possibleConstructorReturn
|
|
2375
|
+
return _possibleConstructorReturn(_this, _assertThisInitialized$1(_this));
|
|
2375
2376
|
}
|
|
2376
2377
|
|
|
2377
2378
|
setTimeout(function () {
|
|
@@ -2382,7 +2383,7 @@ var I18n = function (_EventEmitter) {
|
|
|
2382
2383
|
return _this;
|
|
2383
2384
|
}
|
|
2384
2385
|
|
|
2385
|
-
_createClass
|
|
2386
|
+
_createClass(I18n, [{
|
|
2386
2387
|
key: "init",
|
|
2387
2388
|
value: function init() {
|
|
2388
2389
|
var _this2 = this;
|
|
@@ -2679,7 +2680,7 @@ var I18n = function (_EventEmitter) {
|
|
|
2679
2680
|
var fixedT = function fixedT(key, opts) {
|
|
2680
2681
|
var options;
|
|
2681
2682
|
|
|
2682
|
-
if (_typeof
|
|
2683
|
+
if (_typeof(opts) !== 'object') {
|
|
2683
2684
|
for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
|
|
2684
2685
|
rest[_key3 - 2] = arguments[_key3];
|
|
2685
2686
|
}
|
|
@@ -3630,8 +3631,8 @@ function useVisualElementContext() {
|
|
|
3630
3631
|
return useContext(MotionContext).visualElement;
|
|
3631
3632
|
}
|
|
3632
3633
|
|
|
3633
|
-
var isBrowser$
|
|
3634
|
-
var useIsomorphicLayoutEffect$2 = isBrowser$
|
|
3634
|
+
var isBrowser$5 = typeof window !== "undefined";
|
|
3635
|
+
var useIsomorphicLayoutEffect$2 = isBrowser$5 ? useLayoutEffect : useEffect;
|
|
3635
3636
|
|
|
3636
3637
|
function useSnapshotOnUnmount(visualElement) {
|
|
3637
3638
|
var syncLayout = useContext(SharedLayoutContext);
|
|
@@ -5179,16 +5180,16 @@ var wrapHandler = function (handler, shouldFilterPrimaryPointer) {
|
|
|
5179
5180
|
: listener;
|
|
5180
5181
|
};
|
|
5181
5182
|
|
|
5182
|
-
var isBrowser$
|
|
5183
|
+
var isBrowser$4 = typeof window !== "undefined";
|
|
5183
5184
|
// We check for event support via functions in case they've been mocked by a testing suite.
|
|
5184
5185
|
var supportsPointerEvents = function () {
|
|
5185
|
-
return isBrowser$
|
|
5186
|
+
return isBrowser$4 && window.onpointerdown === null;
|
|
5186
5187
|
};
|
|
5187
5188
|
var supportsTouchEvents = function () {
|
|
5188
|
-
return isBrowser$
|
|
5189
|
+
return isBrowser$4 && window.ontouchstart === null;
|
|
5189
5190
|
};
|
|
5190
5191
|
var supportsMouseEvents = function () {
|
|
5191
|
-
return isBrowser$
|
|
5192
|
+
return isBrowser$4 && window.onmousedown === null;
|
|
5192
5193
|
};
|
|
5193
5194
|
|
|
5194
5195
|
var mouseEventNames = {
|
|
@@ -11882,7 +11883,7 @@ var textOverflow = system({
|
|
|
11882
11883
|
textOverflow: true
|
|
11883
11884
|
});
|
|
11884
11885
|
|
|
11885
|
-
var addStyledProps = compose(border, shadow, color, cursor$1, layout, overflow, space, textOverflow, transform, transition, typography, visibility);
|
|
11886
|
+
var addStyledProps = compose(border, shadow, color, cursor$1, layout, overflow, space, textOverflow, transform, transition, typography, visibility, flexbox);
|
|
11886
11887
|
|
|
11887
11888
|
var getAttrs = function getAttrs(inline) {
|
|
11888
11889
|
return inline ? {
|
|
@@ -11980,7 +11981,7 @@ var WindowDimensions = /*#__PURE__*/function (_React$Component) {
|
|
|
11980
11981
|
width: 0,
|
|
11981
11982
|
height: 0
|
|
11982
11983
|
};
|
|
11983
|
-
_this.updateWindowDimensions = _this.updateWindowDimensions.bind(_assertThisInitialized$
|
|
11984
|
+
_this.updateWindowDimensions = _this.updateWindowDimensions.bind(_assertThisInitialized$2(_this));
|
|
11984
11985
|
return _this;
|
|
11985
11986
|
}
|
|
11986
11987
|
|
|
@@ -12027,7 +12028,7 @@ var DetectOutsideClick = /*#__PURE__*/function (_React$Component) {
|
|
|
12027
12028
|
var _this;
|
|
12028
12029
|
|
|
12029
12030
|
_this = _React$Component.call(this, props) || this;
|
|
12030
|
-
_this.handleOutsideClick = _this.handleOutsideClick.bind(_assertThisInitialized$
|
|
12031
|
+
_this.handleOutsideClick = _this.handleOutsideClick.bind(_assertThisInitialized$2(_this));
|
|
12031
12032
|
return _this;
|
|
12032
12033
|
}
|
|
12033
12034
|
|
|
@@ -12304,7 +12305,7 @@ var ScrollIndicators = /*#__PURE__*/function (_React$Component) {
|
|
|
12304
12305
|
scrollTop: 0
|
|
12305
12306
|
};
|
|
12306
12307
|
_this.menuRef = /*#__PURE__*/React__default.createRef();
|
|
12307
|
-
_this.handleScroll = _this.handleScroll.bind(_assertThisInitialized$
|
|
12308
|
+
_this.handleScroll = _this.handleScroll.bind(_assertThisInitialized$2(_this));
|
|
12308
12309
|
_this.offsetHeight = null;
|
|
12309
12310
|
_this.scrollHeight = null;
|
|
12310
12311
|
return _this;
|
|
@@ -12389,10 +12390,10 @@ var MenuState = /*#__PURE__*/function (_MenuStateInt) {
|
|
|
12389
12390
|
_this.state = {
|
|
12390
12391
|
isOpen: defaultOpen
|
|
12391
12392
|
};
|
|
12392
|
-
_this.handleKeyDown = _this.handleKeyDown.bind(_assertThisInitialized$
|
|
12393
|
-
_this.toggleMenu = _this.toggleMenu.bind(_assertThisInitialized$
|
|
12394
|
-
_this.openMenu = _this.openMenu.bind(_assertThisInitialized$
|
|
12395
|
-
_this.closeMenu = _this.closeMenu.bind(_assertThisInitialized$
|
|
12393
|
+
_this.handleKeyDown = _this.handleKeyDown.bind(_assertThisInitialized$2(_this));
|
|
12394
|
+
_this.toggleMenu = _this.toggleMenu.bind(_assertThisInitialized$2(_this));
|
|
12395
|
+
_this.openMenu = _this.openMenu.bind(_assertThisInitialized$2(_this));
|
|
12396
|
+
_this.closeMenu = _this.closeMenu.bind(_assertThisInitialized$2(_this));
|
|
12396
12397
|
return _this;
|
|
12397
12398
|
}
|
|
12398
12399
|
|
|
@@ -12924,14 +12925,14 @@ function _extends$2() {
|
|
|
12924
12925
|
function _inheritsLoose$1(subClass, superClass) {
|
|
12925
12926
|
subClass.prototype = Object.create(superClass.prototype);
|
|
12926
12927
|
subClass.prototype.constructor = subClass;
|
|
12927
|
-
_setPrototypeOf$
|
|
12928
|
+
_setPrototypeOf$1(subClass, superClass);
|
|
12928
12929
|
}
|
|
12929
12930
|
|
|
12930
12931
|
function _isNativeFunction(fn) {
|
|
12931
12932
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
12932
12933
|
}
|
|
12933
12934
|
|
|
12934
|
-
function _isNativeReflectConstruct$
|
|
12935
|
+
function _isNativeReflectConstruct$6() {
|
|
12935
12936
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
12936
12937
|
if (Reflect.construct.sham) return false;
|
|
12937
12938
|
if (typeof Proxy === "function") return true;
|
|
@@ -12945,7 +12946,7 @@ function _isNativeReflectConstruct$8() {
|
|
|
12945
12946
|
}
|
|
12946
12947
|
|
|
12947
12948
|
function _construct(Parent, args, Class) {
|
|
12948
|
-
if (_isNativeReflectConstruct$
|
|
12949
|
+
if (_isNativeReflectConstruct$6()) {
|
|
12949
12950
|
_construct = Reflect.construct;
|
|
12950
12951
|
} else {
|
|
12951
12952
|
_construct = function _construct(Parent, args, Class) {
|
|
@@ -12953,7 +12954,7 @@ function _construct(Parent, args, Class) {
|
|
|
12953
12954
|
a.push.apply(a, args);
|
|
12954
12955
|
var Constructor = Function.bind.apply(Parent, a);
|
|
12955
12956
|
var instance = new Constructor();
|
|
12956
|
-
if (Class) _setPrototypeOf$
|
|
12957
|
+
if (Class) _setPrototypeOf$1(instance, Class.prototype);
|
|
12957
12958
|
return instance;
|
|
12958
12959
|
};
|
|
12959
12960
|
}
|
|
@@ -12978,7 +12979,7 @@ function _wrapNativeSuper(Class) {
|
|
|
12978
12979
|
}
|
|
12979
12980
|
|
|
12980
12981
|
function Wrapper() {
|
|
12981
|
-
return _construct(Class, arguments, _getPrototypeOf
|
|
12982
|
+
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
|
12982
12983
|
}
|
|
12983
12984
|
|
|
12984
12985
|
Wrapper.prototype = Object.create(Class.prototype, {
|
|
@@ -12989,7 +12990,7 @@ function _wrapNativeSuper(Class) {
|
|
|
12989
12990
|
configurable: true
|
|
12990
12991
|
}
|
|
12991
12992
|
});
|
|
12992
|
-
return _setPrototypeOf$
|
|
12993
|
+
return _setPrototypeOf$1(Wrapper, Class);
|
|
12993
12994
|
};
|
|
12994
12995
|
|
|
12995
12996
|
return _wrapNativeSuper(Class);
|
|
@@ -13123,7 +13124,7 @@ function (_Error) {
|
|
|
13123
13124
|
_this = _Error.call(this, format$3.apply(void 0, [ERRORS[code]].concat(args))) || this;
|
|
13124
13125
|
}
|
|
13125
13126
|
|
|
13126
|
-
return _assertThisInitialized$
|
|
13127
|
+
return _assertThisInitialized$1(_this);
|
|
13127
13128
|
}
|
|
13128
13129
|
|
|
13129
13130
|
return PolishedError;
|
|
@@ -15540,7 +15541,7 @@ function orderModifiers(modifiers) {
|
|
|
15540
15541
|
}, []);
|
|
15541
15542
|
}
|
|
15542
15543
|
|
|
15543
|
-
function debounce$
|
|
15544
|
+
function debounce$2(fn) {
|
|
15544
15545
|
var pending;
|
|
15545
15546
|
return function () {
|
|
15546
15547
|
if (!pending) {
|
|
@@ -15847,7 +15848,7 @@ function popperGenerator(generatorOptions) {
|
|
|
15847
15848
|
},
|
|
15848
15849
|
// Async and optimistically optimized update – it will not be executed if
|
|
15849
15850
|
// not necessary (debounced to run at most once-per-tick)
|
|
15850
|
-
update: debounce$
|
|
15851
|
+
update: debounce$2(function () {
|
|
15851
15852
|
return new Promise(function (resolve) {
|
|
15852
15853
|
instance.forceUpdate();
|
|
15853
15854
|
resolve(state);
|
|
@@ -16556,6 +16557,7 @@ var CloseButton = function CloseButton(_ref) {
|
|
|
16556
16557
|
ml: "x2"
|
|
16557
16558
|
}, /*#__PURE__*/React__default.createElement(Link, {
|
|
16558
16559
|
as: "button",
|
|
16560
|
+
type: "button",
|
|
16559
16561
|
color: "darkGrey",
|
|
16560
16562
|
lineHeight: "0",
|
|
16561
16563
|
hover: "blue",
|
|
@@ -16966,12 +16968,12 @@ var DropdownMenuContainer = styled(Box).withConfig({
|
|
|
16966
16968
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16967
16969
|
* SOFTWARE.
|
|
16968
16970
|
*/
|
|
16969
|
-
var isBrowser$
|
|
16971
|
+
var isBrowser$3 = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';
|
|
16970
16972
|
|
|
16971
16973
|
var timeoutDuration = function () {
|
|
16972
16974
|
var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
|
|
16973
16975
|
for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
|
|
16974
|
-
if (isBrowser$
|
|
16976
|
+
if (isBrowser$3 && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
|
|
16975
16977
|
return 1;
|
|
16976
16978
|
}
|
|
16977
16979
|
}
|
|
@@ -17005,7 +17007,7 @@ function taskDebounce(fn) {
|
|
|
17005
17007
|
};
|
|
17006
17008
|
}
|
|
17007
17009
|
|
|
17008
|
-
var supportsMicroTasks = isBrowser$
|
|
17010
|
+
var supportsMicroTasks = isBrowser$3 && window.Promise;
|
|
17009
17011
|
|
|
17010
17012
|
/**
|
|
17011
17013
|
* Create a debounced version of a method, that's asynchronously deferred
|
|
@@ -17016,7 +17018,7 @@ var supportsMicroTasks = isBrowser$4 && window.Promise;
|
|
|
17016
17018
|
* @argument {Function} fn
|
|
17017
17019
|
* @returns {Function}
|
|
17018
17020
|
*/
|
|
17019
|
-
var debounce$
|
|
17021
|
+
var debounce$1 = supportsMicroTasks ? microtaskDebounce : taskDebounce;
|
|
17020
17022
|
|
|
17021
17023
|
/**
|
|
17022
17024
|
* Check if the given variable is a function
|
|
@@ -17025,7 +17027,7 @@ var debounce$2 = supportsMicroTasks ? microtaskDebounce : taskDebounce;
|
|
|
17025
17027
|
* @argument {Any} functionToCheck - variable to check
|
|
17026
17028
|
* @returns {Boolean} answer to: is a function?
|
|
17027
17029
|
*/
|
|
17028
|
-
function isFunction
|
|
17030
|
+
function isFunction(functionToCheck) {
|
|
17029
17031
|
var getType = {};
|
|
17030
17032
|
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
|
17031
17033
|
}
|
|
@@ -17107,8 +17109,8 @@ function getReferenceNode(reference) {
|
|
|
17107
17109
|
return reference && reference.referenceNode ? reference.referenceNode : reference;
|
|
17108
17110
|
}
|
|
17109
17111
|
|
|
17110
|
-
var isIE11 = isBrowser$
|
|
17111
|
-
var isIE10 = isBrowser$
|
|
17112
|
+
var isIE11 = isBrowser$3 && !!(window.MSInputMethodContext && document.documentMode);
|
|
17113
|
+
var isIE10 = isBrowser$3 && /MSIE 10/.test(navigator.userAgent);
|
|
17112
17114
|
|
|
17113
17115
|
/**
|
|
17114
17116
|
* Determines if the browser is Internet Explorer
|
|
@@ -17286,7 +17288,7 @@ function includeScroll(rect, element) {
|
|
|
17286
17288
|
* @return {number} borders - The borders size of the given axis
|
|
17287
17289
|
*/
|
|
17288
17290
|
|
|
17289
|
-
function getBordersSize
|
|
17291
|
+
function getBordersSize(styles, axis) {
|
|
17290
17292
|
var sideA = axis === 'x' ? 'Left' : 'Top';
|
|
17291
17293
|
var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
|
|
17292
17294
|
|
|
@@ -17425,8 +17427,8 @@ function getBoundingClientRect(element) {
|
|
|
17425
17427
|
// we make this check conditional for performance reasons
|
|
17426
17428
|
if (horizScrollbar || vertScrollbar) {
|
|
17427
17429
|
var styles = getStyleComputedProperty(element);
|
|
17428
|
-
horizScrollbar -= getBordersSize
|
|
17429
|
-
vertScrollbar -= getBordersSize
|
|
17430
|
+
horizScrollbar -= getBordersSize(styles, 'x');
|
|
17431
|
+
vertScrollbar -= getBordersSize(styles, 'y');
|
|
17430
17432
|
|
|
17431
17433
|
result.width -= horizScrollbar;
|
|
17432
17434
|
result.height -= vertScrollbar;
|
|
@@ -17834,7 +17836,7 @@ function runModifiers(modifiers, data, ends) {
|
|
|
17834
17836
|
console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
|
|
17835
17837
|
}
|
|
17836
17838
|
var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
|
|
17837
|
-
if (modifier.enabled && isFunction
|
|
17839
|
+
if (modifier.enabled && isFunction(fn)) {
|
|
17838
17840
|
// Add properties to offsets to make them a complete clientRect object
|
|
17839
17841
|
// we do this before each modifier to make sure the previous one doesn't
|
|
17840
17842
|
// mess with these values
|
|
@@ -18210,7 +18212,7 @@ function getRoundedOffsets(data, shouldRound) {
|
|
|
18210
18212
|
};
|
|
18211
18213
|
}
|
|
18212
18214
|
|
|
18213
|
-
var isFirefox = isBrowser$
|
|
18215
|
+
var isFirefox = isBrowser$3 && /Firefox/i.test(navigator.userAgent);
|
|
18214
18216
|
|
|
18215
18217
|
/**
|
|
18216
18218
|
* @function
|
|
@@ -19423,7 +19425,7 @@ var Popper$3 = function () {
|
|
|
19423
19425
|
};
|
|
19424
19426
|
|
|
19425
19427
|
// make update() debounced, so that it only runs at most once-per-tick
|
|
19426
|
-
this.update = debounce$
|
|
19428
|
+
this.update = debounce$1(this.update.bind(this));
|
|
19427
19429
|
|
|
19428
19430
|
// with {} we create a new object with the options inside it
|
|
19429
19431
|
this.options = _extends$1({}, Popper.Defaults, options);
|
|
@@ -19461,7 +19463,7 @@ var Popper$3 = function () {
|
|
|
19461
19463
|
// they could add new properties to their options configuration
|
|
19462
19464
|
// BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
|
|
19463
19465
|
this.modifiers.forEach(function (modifierOptions) {
|
|
19464
|
-
if (modifierOptions.enabled && isFunction
|
|
19466
|
+
if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
|
|
19465
19467
|
modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
|
|
19466
19468
|
}
|
|
19467
19469
|
});
|
|
@@ -19573,9 +19575,9 @@ function (_React$Component) {
|
|
|
19573
19575
|
|
|
19574
19576
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
19575
19577
|
|
|
19576
|
-
_defineProperty$
|
|
19578
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "referenceNode", void 0);
|
|
19577
19579
|
|
|
19578
|
-
_defineProperty$
|
|
19580
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "setReferenceNode", function (newReferenceNode) {
|
|
19579
19581
|
if (newReferenceNode && _this.referenceNode !== newReferenceNode) {
|
|
19580
19582
|
_this.referenceNode = newReferenceNode;
|
|
19581
19583
|
|
|
@@ -19683,18 +19685,18 @@ function (_React$Component) {
|
|
|
19683
19685
|
|
|
19684
19686
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
19685
19687
|
|
|
19686
|
-
_defineProperty$
|
|
19688
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "state", {
|
|
19687
19689
|
data: undefined,
|
|
19688
19690
|
placement: undefined
|
|
19689
19691
|
});
|
|
19690
19692
|
|
|
19691
|
-
_defineProperty$
|
|
19693
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "popperInstance", void 0);
|
|
19692
19694
|
|
|
19693
|
-
_defineProperty$
|
|
19695
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "popperNode", null);
|
|
19694
19696
|
|
|
19695
|
-
_defineProperty$
|
|
19697
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "arrowNode", null);
|
|
19696
19698
|
|
|
19697
|
-
_defineProperty$
|
|
19699
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "setPopperNode", function (popperNode) {
|
|
19698
19700
|
if (!popperNode || _this.popperNode === popperNode) return;
|
|
19699
19701
|
setRef$1(_this.props.innerRef, popperNode);
|
|
19700
19702
|
_this.popperNode = popperNode;
|
|
@@ -19702,11 +19704,11 @@ function (_React$Component) {
|
|
|
19702
19704
|
_this.updatePopperInstance();
|
|
19703
19705
|
});
|
|
19704
19706
|
|
|
19705
|
-
_defineProperty$
|
|
19707
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "setArrowNode", function (arrowNode) {
|
|
19706
19708
|
_this.arrowNode = arrowNode;
|
|
19707
19709
|
});
|
|
19708
19710
|
|
|
19709
|
-
_defineProperty$
|
|
19711
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "updateStateModifier", {
|
|
19710
19712
|
enabled: true,
|
|
19711
19713
|
order: 900,
|
|
19712
19714
|
fn: function fn(data) {
|
|
@@ -19721,7 +19723,7 @@ function (_React$Component) {
|
|
|
19721
19723
|
}
|
|
19722
19724
|
});
|
|
19723
19725
|
|
|
19724
|
-
_defineProperty$
|
|
19726
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "getOptions", function () {
|
|
19725
19727
|
return {
|
|
19726
19728
|
placement: _this.props.placement,
|
|
19727
19729
|
eventsEnabled: _this.props.eventsEnabled,
|
|
@@ -19739,25 +19741,25 @@ function (_React$Component) {
|
|
|
19739
19741
|
};
|
|
19740
19742
|
});
|
|
19741
19743
|
|
|
19742
|
-
_defineProperty$
|
|
19744
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "getPopperStyle", function () {
|
|
19743
19745
|
return !_this.popperNode || !_this.state.data ? initialStyle : _extends$4({
|
|
19744
19746
|
position: _this.state.data.offsets.popper.position
|
|
19745
19747
|
}, _this.state.data.styles);
|
|
19746
19748
|
});
|
|
19747
19749
|
|
|
19748
|
-
_defineProperty$
|
|
19750
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "getPopperPlacement", function () {
|
|
19749
19751
|
return !_this.state.data ? undefined : _this.state.placement;
|
|
19750
19752
|
});
|
|
19751
19753
|
|
|
19752
|
-
_defineProperty$
|
|
19754
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "getArrowStyle", function () {
|
|
19753
19755
|
return !_this.arrowNode || !_this.state.data ? initialArrowStyle : _this.state.data.arrowStyles;
|
|
19754
19756
|
});
|
|
19755
19757
|
|
|
19756
|
-
_defineProperty$
|
|
19758
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "getOutOfBoundariesState", function () {
|
|
19757
19759
|
return _this.state.data ? _this.state.data.hide : undefined;
|
|
19758
19760
|
});
|
|
19759
19761
|
|
|
19760
|
-
_defineProperty$
|
|
19762
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "destroyPopperInstance", function () {
|
|
19761
19763
|
if (!_this.popperInstance) return;
|
|
19762
19764
|
|
|
19763
19765
|
_this.popperInstance.destroy();
|
|
@@ -19765,10 +19767,10 @@ function (_React$Component) {
|
|
|
19765
19767
|
_this.popperInstance = null;
|
|
19766
19768
|
});
|
|
19767
19769
|
|
|
19768
|
-
_defineProperty$
|
|
19770
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "updatePopperInstance", function () {
|
|
19769
19771
|
_this.destroyPopperInstance();
|
|
19770
19772
|
|
|
19771
|
-
var _assertThisInitialize = _assertThisInitialized$
|
|
19773
|
+
var _assertThisInitialize = _assertThisInitialized$2(_this),
|
|
19772
19774
|
popperNode = _assertThisInitialize.popperNode;
|
|
19773
19775
|
|
|
19774
19776
|
var referenceElement = _this.props.referenceElement;
|
|
@@ -19776,7 +19778,7 @@ function (_React$Component) {
|
|
|
19776
19778
|
_this.popperInstance = new Popper$3(referenceElement, popperNode, _this.getOptions());
|
|
19777
19779
|
});
|
|
19778
19780
|
|
|
19779
|
-
_defineProperty$
|
|
19781
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "scheduleUpdate", function () {
|
|
19780
19782
|
if (_this.popperInstance) {
|
|
19781
19783
|
_this.popperInstance.scheduleUpdate();
|
|
19782
19784
|
}
|
|
@@ -19835,7 +19837,7 @@ function (_React$Component) {
|
|
|
19835
19837
|
return InnerPopper;
|
|
19836
19838
|
}(React.Component);
|
|
19837
19839
|
|
|
19838
|
-
_defineProperty$
|
|
19840
|
+
_defineProperty$1(InnerPopper, "defaultProps", {
|
|
19839
19841
|
placement: 'bottom',
|
|
19840
19842
|
eventsEnabled: true,
|
|
19841
19843
|
referenceElement: undefined,
|
|
@@ -19866,7 +19868,7 @@ function (_React$Component) {
|
|
|
19866
19868
|
|
|
19867
19869
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
19868
19870
|
|
|
19869
|
-
_defineProperty$
|
|
19871
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "refHandler", function (node) {
|
|
19870
19872
|
setRef$1(_this.props.innerRef, node);
|
|
19871
19873
|
safeInvoke$1(_this.props.setReferenceNode, node);
|
|
19872
19874
|
});
|
|
@@ -20749,1841 +20751,6 @@ var Input$1 = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
20749
20751
|
}));
|
|
20750
20752
|
});
|
|
20751
20753
|
|
|
20752
|
-
/**
|
|
20753
|
-
* A collection of shims that provide minimal functionality of the ES6 collections.
|
|
20754
|
-
*
|
|
20755
|
-
* These implementations are not meant to be used outside of the ResizeObserver
|
|
20756
|
-
* modules as they cover only a limited range of use cases.
|
|
20757
|
-
*/
|
|
20758
|
-
/* eslint-disable require-jsdoc, valid-jsdoc */
|
|
20759
|
-
var MapShim = (function () {
|
|
20760
|
-
if (typeof Map !== 'undefined') {
|
|
20761
|
-
return Map;
|
|
20762
|
-
}
|
|
20763
|
-
/**
|
|
20764
|
-
* Returns index in provided array that matches the specified key.
|
|
20765
|
-
*
|
|
20766
|
-
* @param {Array<Array>} arr
|
|
20767
|
-
* @param {*} key
|
|
20768
|
-
* @returns {number}
|
|
20769
|
-
*/
|
|
20770
|
-
function getIndex(arr, key) {
|
|
20771
|
-
var result = -1;
|
|
20772
|
-
arr.some(function (entry, index) {
|
|
20773
|
-
if (entry[0] === key) {
|
|
20774
|
-
result = index;
|
|
20775
|
-
return true;
|
|
20776
|
-
}
|
|
20777
|
-
return false;
|
|
20778
|
-
});
|
|
20779
|
-
return result;
|
|
20780
|
-
}
|
|
20781
|
-
return /** @class */ (function () {
|
|
20782
|
-
function class_1() {
|
|
20783
|
-
this.__entries__ = [];
|
|
20784
|
-
}
|
|
20785
|
-
Object.defineProperty(class_1.prototype, "size", {
|
|
20786
|
-
/**
|
|
20787
|
-
* @returns {boolean}
|
|
20788
|
-
*/
|
|
20789
|
-
get: function () {
|
|
20790
|
-
return this.__entries__.length;
|
|
20791
|
-
},
|
|
20792
|
-
enumerable: true,
|
|
20793
|
-
configurable: true
|
|
20794
|
-
});
|
|
20795
|
-
/**
|
|
20796
|
-
* @param {*} key
|
|
20797
|
-
* @returns {*}
|
|
20798
|
-
*/
|
|
20799
|
-
class_1.prototype.get = function (key) {
|
|
20800
|
-
var index = getIndex(this.__entries__, key);
|
|
20801
|
-
var entry = this.__entries__[index];
|
|
20802
|
-
return entry && entry[1];
|
|
20803
|
-
};
|
|
20804
|
-
/**
|
|
20805
|
-
* @param {*} key
|
|
20806
|
-
* @param {*} value
|
|
20807
|
-
* @returns {void}
|
|
20808
|
-
*/
|
|
20809
|
-
class_1.prototype.set = function (key, value) {
|
|
20810
|
-
var index = getIndex(this.__entries__, key);
|
|
20811
|
-
if (~index) {
|
|
20812
|
-
this.__entries__[index][1] = value;
|
|
20813
|
-
}
|
|
20814
|
-
else {
|
|
20815
|
-
this.__entries__.push([key, value]);
|
|
20816
|
-
}
|
|
20817
|
-
};
|
|
20818
|
-
/**
|
|
20819
|
-
* @param {*} key
|
|
20820
|
-
* @returns {void}
|
|
20821
|
-
*/
|
|
20822
|
-
class_1.prototype.delete = function (key) {
|
|
20823
|
-
var entries = this.__entries__;
|
|
20824
|
-
var index = getIndex(entries, key);
|
|
20825
|
-
if (~index) {
|
|
20826
|
-
entries.splice(index, 1);
|
|
20827
|
-
}
|
|
20828
|
-
};
|
|
20829
|
-
/**
|
|
20830
|
-
* @param {*} key
|
|
20831
|
-
* @returns {void}
|
|
20832
|
-
*/
|
|
20833
|
-
class_1.prototype.has = function (key) {
|
|
20834
|
-
return !!~getIndex(this.__entries__, key);
|
|
20835
|
-
};
|
|
20836
|
-
/**
|
|
20837
|
-
* @returns {void}
|
|
20838
|
-
*/
|
|
20839
|
-
class_1.prototype.clear = function () {
|
|
20840
|
-
this.__entries__.splice(0);
|
|
20841
|
-
};
|
|
20842
|
-
/**
|
|
20843
|
-
* @param {Function} callback
|
|
20844
|
-
* @param {*} [ctx=null]
|
|
20845
|
-
* @returns {void}
|
|
20846
|
-
*/
|
|
20847
|
-
class_1.prototype.forEach = function (callback, ctx) {
|
|
20848
|
-
if (ctx === void 0) { ctx = null; }
|
|
20849
|
-
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
|
|
20850
|
-
var entry = _a[_i];
|
|
20851
|
-
callback.call(ctx, entry[1], entry[0]);
|
|
20852
|
-
}
|
|
20853
|
-
};
|
|
20854
|
-
return class_1;
|
|
20855
|
-
}());
|
|
20856
|
-
})();
|
|
20857
|
-
|
|
20858
|
-
/**
|
|
20859
|
-
* Detects whether window and document objects are available in current environment.
|
|
20860
|
-
*/
|
|
20861
|
-
var isBrowser$3 = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
|
|
20862
|
-
|
|
20863
|
-
// Returns global object of a current environment.
|
|
20864
|
-
var global$1 = (function () {
|
|
20865
|
-
if (typeof global !== 'undefined' && global.Math === Math) {
|
|
20866
|
-
return global;
|
|
20867
|
-
}
|
|
20868
|
-
if (typeof self !== 'undefined' && self.Math === Math) {
|
|
20869
|
-
return self;
|
|
20870
|
-
}
|
|
20871
|
-
if (typeof window !== 'undefined' && window.Math === Math) {
|
|
20872
|
-
return window;
|
|
20873
|
-
}
|
|
20874
|
-
// eslint-disable-next-line no-new-func
|
|
20875
|
-
return Function('return this')();
|
|
20876
|
-
})();
|
|
20877
|
-
|
|
20878
|
-
/**
|
|
20879
|
-
* A shim for the requestAnimationFrame which falls back to the setTimeout if
|
|
20880
|
-
* first one is not supported.
|
|
20881
|
-
*
|
|
20882
|
-
* @returns {number} Requests' identifier.
|
|
20883
|
-
*/
|
|
20884
|
-
var requestAnimationFrame$1 = (function () {
|
|
20885
|
-
if (typeof requestAnimationFrame === 'function') {
|
|
20886
|
-
// It's required to use a bounded function because IE sometimes throws
|
|
20887
|
-
// an "Invalid calling object" error if rAF is invoked without the global
|
|
20888
|
-
// object on the left hand side.
|
|
20889
|
-
return requestAnimationFrame.bind(global$1);
|
|
20890
|
-
}
|
|
20891
|
-
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
|
|
20892
|
-
})();
|
|
20893
|
-
|
|
20894
|
-
// Defines minimum timeout before adding a trailing call.
|
|
20895
|
-
var trailingTimeout = 2;
|
|
20896
|
-
/**
|
|
20897
|
-
* Creates a wrapper function which ensures that provided callback will be
|
|
20898
|
-
* invoked only once during the specified delay period.
|
|
20899
|
-
*
|
|
20900
|
-
* @param {Function} callback - Function to be invoked after the delay period.
|
|
20901
|
-
* @param {number} delay - Delay after which to invoke callback.
|
|
20902
|
-
* @returns {Function}
|
|
20903
|
-
*/
|
|
20904
|
-
function throttle$1 (callback, delay) {
|
|
20905
|
-
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
|
20906
|
-
/**
|
|
20907
|
-
* Invokes the original callback function and schedules new invocation if
|
|
20908
|
-
* the "proxy" was called during current request.
|
|
20909
|
-
*
|
|
20910
|
-
* @returns {void}
|
|
20911
|
-
*/
|
|
20912
|
-
function resolvePending() {
|
|
20913
|
-
if (leadingCall) {
|
|
20914
|
-
leadingCall = false;
|
|
20915
|
-
callback();
|
|
20916
|
-
}
|
|
20917
|
-
if (trailingCall) {
|
|
20918
|
-
proxy();
|
|
20919
|
-
}
|
|
20920
|
-
}
|
|
20921
|
-
/**
|
|
20922
|
-
* Callback invoked after the specified delay. It will further postpone
|
|
20923
|
-
* invocation of the original function delegating it to the
|
|
20924
|
-
* requestAnimationFrame.
|
|
20925
|
-
*
|
|
20926
|
-
* @returns {void}
|
|
20927
|
-
*/
|
|
20928
|
-
function timeoutCallback() {
|
|
20929
|
-
requestAnimationFrame$1(resolvePending);
|
|
20930
|
-
}
|
|
20931
|
-
/**
|
|
20932
|
-
* Schedules invocation of the original function.
|
|
20933
|
-
*
|
|
20934
|
-
* @returns {void}
|
|
20935
|
-
*/
|
|
20936
|
-
function proxy() {
|
|
20937
|
-
var timeStamp = Date.now();
|
|
20938
|
-
if (leadingCall) {
|
|
20939
|
-
// Reject immediately following calls.
|
|
20940
|
-
if (timeStamp - lastCallTime < trailingTimeout) {
|
|
20941
|
-
return;
|
|
20942
|
-
}
|
|
20943
|
-
// Schedule new call to be in invoked when the pending one is resolved.
|
|
20944
|
-
// This is important for "transitions" which never actually start
|
|
20945
|
-
// immediately so there is a chance that we might miss one if change
|
|
20946
|
-
// happens amids the pending invocation.
|
|
20947
|
-
trailingCall = true;
|
|
20948
|
-
}
|
|
20949
|
-
else {
|
|
20950
|
-
leadingCall = true;
|
|
20951
|
-
trailingCall = false;
|
|
20952
|
-
setTimeout(timeoutCallback, delay);
|
|
20953
|
-
}
|
|
20954
|
-
lastCallTime = timeStamp;
|
|
20955
|
-
}
|
|
20956
|
-
return proxy;
|
|
20957
|
-
}
|
|
20958
|
-
|
|
20959
|
-
// Minimum delay before invoking the update of observers.
|
|
20960
|
-
var REFRESH_DELAY = 20;
|
|
20961
|
-
// A list of substrings of CSS properties used to find transition events that
|
|
20962
|
-
// might affect dimensions of observed elements.
|
|
20963
|
-
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
|
|
20964
|
-
// Check if MutationObserver is available.
|
|
20965
|
-
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
|
|
20966
|
-
/**
|
|
20967
|
-
* Singleton controller class which handles updates of ResizeObserver instances.
|
|
20968
|
-
*/
|
|
20969
|
-
var ResizeObserverController = /** @class */ (function () {
|
|
20970
|
-
/**
|
|
20971
|
-
* Creates a new instance of ResizeObserverController.
|
|
20972
|
-
*
|
|
20973
|
-
* @private
|
|
20974
|
-
*/
|
|
20975
|
-
function ResizeObserverController() {
|
|
20976
|
-
/**
|
|
20977
|
-
* Indicates whether DOM listeners have been added.
|
|
20978
|
-
*
|
|
20979
|
-
* @private {boolean}
|
|
20980
|
-
*/
|
|
20981
|
-
this.connected_ = false;
|
|
20982
|
-
/**
|
|
20983
|
-
* Tells that controller has subscribed for Mutation Events.
|
|
20984
|
-
*
|
|
20985
|
-
* @private {boolean}
|
|
20986
|
-
*/
|
|
20987
|
-
this.mutationEventsAdded_ = false;
|
|
20988
|
-
/**
|
|
20989
|
-
* Keeps reference to the instance of MutationObserver.
|
|
20990
|
-
*
|
|
20991
|
-
* @private {MutationObserver}
|
|
20992
|
-
*/
|
|
20993
|
-
this.mutationsObserver_ = null;
|
|
20994
|
-
/**
|
|
20995
|
-
* A list of connected observers.
|
|
20996
|
-
*
|
|
20997
|
-
* @private {Array<ResizeObserverSPI>}
|
|
20998
|
-
*/
|
|
20999
|
-
this.observers_ = [];
|
|
21000
|
-
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
|
21001
|
-
this.refresh = throttle$1(this.refresh.bind(this), REFRESH_DELAY);
|
|
21002
|
-
}
|
|
21003
|
-
/**
|
|
21004
|
-
* Adds observer to observers list.
|
|
21005
|
-
*
|
|
21006
|
-
* @param {ResizeObserverSPI} observer - Observer to be added.
|
|
21007
|
-
* @returns {void}
|
|
21008
|
-
*/
|
|
21009
|
-
ResizeObserverController.prototype.addObserver = function (observer) {
|
|
21010
|
-
if (!~this.observers_.indexOf(observer)) {
|
|
21011
|
-
this.observers_.push(observer);
|
|
21012
|
-
}
|
|
21013
|
-
// Add listeners if they haven't been added yet.
|
|
21014
|
-
if (!this.connected_) {
|
|
21015
|
-
this.connect_();
|
|
21016
|
-
}
|
|
21017
|
-
};
|
|
21018
|
-
/**
|
|
21019
|
-
* Removes observer from observers list.
|
|
21020
|
-
*
|
|
21021
|
-
* @param {ResizeObserverSPI} observer - Observer to be removed.
|
|
21022
|
-
* @returns {void}
|
|
21023
|
-
*/
|
|
21024
|
-
ResizeObserverController.prototype.removeObserver = function (observer) {
|
|
21025
|
-
var observers = this.observers_;
|
|
21026
|
-
var index = observers.indexOf(observer);
|
|
21027
|
-
// Remove observer if it's present in registry.
|
|
21028
|
-
if (~index) {
|
|
21029
|
-
observers.splice(index, 1);
|
|
21030
|
-
}
|
|
21031
|
-
// Remove listeners if controller has no connected observers.
|
|
21032
|
-
if (!observers.length && this.connected_) {
|
|
21033
|
-
this.disconnect_();
|
|
21034
|
-
}
|
|
21035
|
-
};
|
|
21036
|
-
/**
|
|
21037
|
-
* Invokes the update of observers. It will continue running updates insofar
|
|
21038
|
-
* it detects changes.
|
|
21039
|
-
*
|
|
21040
|
-
* @returns {void}
|
|
21041
|
-
*/
|
|
21042
|
-
ResizeObserverController.prototype.refresh = function () {
|
|
21043
|
-
var changesDetected = this.updateObservers_();
|
|
21044
|
-
// Continue running updates if changes have been detected as there might
|
|
21045
|
-
// be future ones caused by CSS transitions.
|
|
21046
|
-
if (changesDetected) {
|
|
21047
|
-
this.refresh();
|
|
21048
|
-
}
|
|
21049
|
-
};
|
|
21050
|
-
/**
|
|
21051
|
-
* Updates every observer from observers list and notifies them of queued
|
|
21052
|
-
* entries.
|
|
21053
|
-
*
|
|
21054
|
-
* @private
|
|
21055
|
-
* @returns {boolean} Returns "true" if any observer has detected changes in
|
|
21056
|
-
* dimensions of it's elements.
|
|
21057
|
-
*/
|
|
21058
|
-
ResizeObserverController.prototype.updateObservers_ = function () {
|
|
21059
|
-
// Collect observers that have active observations.
|
|
21060
|
-
var activeObservers = this.observers_.filter(function (observer) {
|
|
21061
|
-
return observer.gatherActive(), observer.hasActive();
|
|
21062
|
-
});
|
|
21063
|
-
// Deliver notifications in a separate cycle in order to avoid any
|
|
21064
|
-
// collisions between observers, e.g. when multiple instances of
|
|
21065
|
-
// ResizeObserver are tracking the same element and the callback of one
|
|
21066
|
-
// of them changes content dimensions of the observed target. Sometimes
|
|
21067
|
-
// this may result in notifications being blocked for the rest of observers.
|
|
21068
|
-
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
|
|
21069
|
-
return activeObservers.length > 0;
|
|
21070
|
-
};
|
|
21071
|
-
/**
|
|
21072
|
-
* Initializes DOM listeners.
|
|
21073
|
-
*
|
|
21074
|
-
* @private
|
|
21075
|
-
* @returns {void}
|
|
21076
|
-
*/
|
|
21077
|
-
ResizeObserverController.prototype.connect_ = function () {
|
|
21078
|
-
// Do nothing if running in a non-browser environment or if listeners
|
|
21079
|
-
// have been already added.
|
|
21080
|
-
if (!isBrowser$3 || this.connected_) {
|
|
21081
|
-
return;
|
|
21082
|
-
}
|
|
21083
|
-
// Subscription to the "Transitionend" event is used as a workaround for
|
|
21084
|
-
// delayed transitions. This way it's possible to capture at least the
|
|
21085
|
-
// final state of an element.
|
|
21086
|
-
document.addEventListener('transitionend', this.onTransitionEnd_);
|
|
21087
|
-
window.addEventListener('resize', this.refresh);
|
|
21088
|
-
if (mutationObserverSupported) {
|
|
21089
|
-
this.mutationsObserver_ = new MutationObserver(this.refresh);
|
|
21090
|
-
this.mutationsObserver_.observe(document, {
|
|
21091
|
-
attributes: true,
|
|
21092
|
-
childList: true,
|
|
21093
|
-
characterData: true,
|
|
21094
|
-
subtree: true
|
|
21095
|
-
});
|
|
21096
|
-
}
|
|
21097
|
-
else {
|
|
21098
|
-
document.addEventListener('DOMSubtreeModified', this.refresh);
|
|
21099
|
-
this.mutationEventsAdded_ = true;
|
|
21100
|
-
}
|
|
21101
|
-
this.connected_ = true;
|
|
21102
|
-
};
|
|
21103
|
-
/**
|
|
21104
|
-
* Removes DOM listeners.
|
|
21105
|
-
*
|
|
21106
|
-
* @private
|
|
21107
|
-
* @returns {void}
|
|
21108
|
-
*/
|
|
21109
|
-
ResizeObserverController.prototype.disconnect_ = function () {
|
|
21110
|
-
// Do nothing if running in a non-browser environment or if listeners
|
|
21111
|
-
// have been already removed.
|
|
21112
|
-
if (!isBrowser$3 || !this.connected_) {
|
|
21113
|
-
return;
|
|
21114
|
-
}
|
|
21115
|
-
document.removeEventListener('transitionend', this.onTransitionEnd_);
|
|
21116
|
-
window.removeEventListener('resize', this.refresh);
|
|
21117
|
-
if (this.mutationsObserver_) {
|
|
21118
|
-
this.mutationsObserver_.disconnect();
|
|
21119
|
-
}
|
|
21120
|
-
if (this.mutationEventsAdded_) {
|
|
21121
|
-
document.removeEventListener('DOMSubtreeModified', this.refresh);
|
|
21122
|
-
}
|
|
21123
|
-
this.mutationsObserver_ = null;
|
|
21124
|
-
this.mutationEventsAdded_ = false;
|
|
21125
|
-
this.connected_ = false;
|
|
21126
|
-
};
|
|
21127
|
-
/**
|
|
21128
|
-
* "Transitionend" event handler.
|
|
21129
|
-
*
|
|
21130
|
-
* @private
|
|
21131
|
-
* @param {TransitionEvent} event
|
|
21132
|
-
* @returns {void}
|
|
21133
|
-
*/
|
|
21134
|
-
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
|
|
21135
|
-
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
|
|
21136
|
-
// Detect whether transition may affect dimensions of an element.
|
|
21137
|
-
var isReflowProperty = transitionKeys.some(function (key) {
|
|
21138
|
-
return !!~propertyName.indexOf(key);
|
|
21139
|
-
});
|
|
21140
|
-
if (isReflowProperty) {
|
|
21141
|
-
this.refresh();
|
|
21142
|
-
}
|
|
21143
|
-
};
|
|
21144
|
-
/**
|
|
21145
|
-
* Returns instance of the ResizeObserverController.
|
|
21146
|
-
*
|
|
21147
|
-
* @returns {ResizeObserverController}
|
|
21148
|
-
*/
|
|
21149
|
-
ResizeObserverController.getInstance = function () {
|
|
21150
|
-
if (!this.instance_) {
|
|
21151
|
-
this.instance_ = new ResizeObserverController();
|
|
21152
|
-
}
|
|
21153
|
-
return this.instance_;
|
|
21154
|
-
};
|
|
21155
|
-
/**
|
|
21156
|
-
* Holds reference to the controller's instance.
|
|
21157
|
-
*
|
|
21158
|
-
* @private {ResizeObserverController}
|
|
21159
|
-
*/
|
|
21160
|
-
ResizeObserverController.instance_ = null;
|
|
21161
|
-
return ResizeObserverController;
|
|
21162
|
-
}());
|
|
21163
|
-
|
|
21164
|
-
/**
|
|
21165
|
-
* Defines non-writable/enumerable properties of the provided target object.
|
|
21166
|
-
*
|
|
21167
|
-
* @param {Object} target - Object for which to define properties.
|
|
21168
|
-
* @param {Object} props - Properties to be defined.
|
|
21169
|
-
* @returns {Object} Target object.
|
|
21170
|
-
*/
|
|
21171
|
-
var defineConfigurable = (function (target, props) {
|
|
21172
|
-
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
|
21173
|
-
var key = _a[_i];
|
|
21174
|
-
Object.defineProperty(target, key, {
|
|
21175
|
-
value: props[key],
|
|
21176
|
-
enumerable: false,
|
|
21177
|
-
writable: false,
|
|
21178
|
-
configurable: true
|
|
21179
|
-
});
|
|
21180
|
-
}
|
|
21181
|
-
return target;
|
|
21182
|
-
});
|
|
21183
|
-
|
|
21184
|
-
/**
|
|
21185
|
-
* Returns the global object associated with provided element.
|
|
21186
|
-
*
|
|
21187
|
-
* @param {Object} target
|
|
21188
|
-
* @returns {Object}
|
|
21189
|
-
*/
|
|
21190
|
-
var getWindowOf = (function (target) {
|
|
21191
|
-
// Assume that the element is an instance of Node, which means that it
|
|
21192
|
-
// has the "ownerDocument" property from which we can retrieve a
|
|
21193
|
-
// corresponding global object.
|
|
21194
|
-
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
|
|
21195
|
-
// Return the local global object if it's not possible extract one from
|
|
21196
|
-
// provided element.
|
|
21197
|
-
return ownerGlobal || global$1;
|
|
21198
|
-
});
|
|
21199
|
-
|
|
21200
|
-
// Placeholder of an empty content rectangle.
|
|
21201
|
-
var emptyRect = createRectInit(0, 0, 0, 0);
|
|
21202
|
-
/**
|
|
21203
|
-
* Converts provided string to a number.
|
|
21204
|
-
*
|
|
21205
|
-
* @param {number|string} value
|
|
21206
|
-
* @returns {number}
|
|
21207
|
-
*/
|
|
21208
|
-
function toFloat(value) {
|
|
21209
|
-
return parseFloat(value) || 0;
|
|
21210
|
-
}
|
|
21211
|
-
/**
|
|
21212
|
-
* Extracts borders size from provided styles.
|
|
21213
|
-
*
|
|
21214
|
-
* @param {CSSStyleDeclaration} styles
|
|
21215
|
-
* @param {...string} positions - Borders positions (top, right, ...)
|
|
21216
|
-
* @returns {number}
|
|
21217
|
-
*/
|
|
21218
|
-
function getBordersSize(styles) {
|
|
21219
|
-
var positions = [];
|
|
21220
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
21221
|
-
positions[_i - 1] = arguments[_i];
|
|
21222
|
-
}
|
|
21223
|
-
return positions.reduce(function (size, position) {
|
|
21224
|
-
var value = styles['border-' + position + '-width'];
|
|
21225
|
-
return size + toFloat(value);
|
|
21226
|
-
}, 0);
|
|
21227
|
-
}
|
|
21228
|
-
/**
|
|
21229
|
-
* Extracts paddings sizes from provided styles.
|
|
21230
|
-
*
|
|
21231
|
-
* @param {CSSStyleDeclaration} styles
|
|
21232
|
-
* @returns {Object} Paddings box.
|
|
21233
|
-
*/
|
|
21234
|
-
function getPaddings(styles) {
|
|
21235
|
-
var positions = ['top', 'right', 'bottom', 'left'];
|
|
21236
|
-
var paddings = {};
|
|
21237
|
-
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
|
21238
|
-
var position = positions_1[_i];
|
|
21239
|
-
var value = styles['padding-' + position];
|
|
21240
|
-
paddings[position] = toFloat(value);
|
|
21241
|
-
}
|
|
21242
|
-
return paddings;
|
|
21243
|
-
}
|
|
21244
|
-
/**
|
|
21245
|
-
* Calculates content rectangle of provided SVG element.
|
|
21246
|
-
*
|
|
21247
|
-
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
|
|
21248
|
-
* to be calculated.
|
|
21249
|
-
* @returns {DOMRectInit}
|
|
21250
|
-
*/
|
|
21251
|
-
function getSVGContentRect(target) {
|
|
21252
|
-
var bbox = target.getBBox();
|
|
21253
|
-
return createRectInit(0, 0, bbox.width, bbox.height);
|
|
21254
|
-
}
|
|
21255
|
-
/**
|
|
21256
|
-
* Calculates content rectangle of provided HTMLElement.
|
|
21257
|
-
*
|
|
21258
|
-
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
|
|
21259
|
-
* @returns {DOMRectInit}
|
|
21260
|
-
*/
|
|
21261
|
-
function getHTMLElementContentRect(target) {
|
|
21262
|
-
// Client width & height properties can't be
|
|
21263
|
-
// used exclusively as they provide rounded values.
|
|
21264
|
-
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
|
|
21265
|
-
// By this condition we can catch all non-replaced inline, hidden and
|
|
21266
|
-
// detached elements. Though elements with width & height properties less
|
|
21267
|
-
// than 0.5 will be discarded as well.
|
|
21268
|
-
//
|
|
21269
|
-
// Without it we would need to implement separate methods for each of
|
|
21270
|
-
// those cases and it's not possible to perform a precise and performance
|
|
21271
|
-
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
|
|
21272
|
-
// gives wrong results for elements with width & height less than 0.5.
|
|
21273
|
-
if (!clientWidth && !clientHeight) {
|
|
21274
|
-
return emptyRect;
|
|
21275
|
-
}
|
|
21276
|
-
var styles = getWindowOf(target).getComputedStyle(target);
|
|
21277
|
-
var paddings = getPaddings(styles);
|
|
21278
|
-
var horizPad = paddings.left + paddings.right;
|
|
21279
|
-
var vertPad = paddings.top + paddings.bottom;
|
|
21280
|
-
// Computed styles of width & height are being used because they are the
|
|
21281
|
-
// only dimensions available to JS that contain non-rounded values. It could
|
|
21282
|
-
// be possible to utilize the getBoundingClientRect if only it's data wasn't
|
|
21283
|
-
// affected by CSS transformations let alone paddings, borders and scroll bars.
|
|
21284
|
-
var width = toFloat(styles.width), height = toFloat(styles.height);
|
|
21285
|
-
// Width & height include paddings and borders when the 'border-box' box
|
|
21286
|
-
// model is applied (except for IE).
|
|
21287
|
-
if (styles.boxSizing === 'border-box') {
|
|
21288
|
-
// Following conditions are required to handle Internet Explorer which
|
|
21289
|
-
// doesn't include paddings and borders to computed CSS dimensions.
|
|
21290
|
-
//
|
|
21291
|
-
// We can say that if CSS dimensions + paddings are equal to the "client"
|
|
21292
|
-
// properties then it's either IE, and thus we don't need to subtract
|
|
21293
|
-
// anything, or an element merely doesn't have paddings/borders styles.
|
|
21294
|
-
if (Math.round(width + horizPad) !== clientWidth) {
|
|
21295
|
-
width -= getBordersSize(styles, 'left', 'right') + horizPad;
|
|
21296
|
-
}
|
|
21297
|
-
if (Math.round(height + vertPad) !== clientHeight) {
|
|
21298
|
-
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
|
|
21299
|
-
}
|
|
21300
|
-
}
|
|
21301
|
-
// Following steps can't be applied to the document's root element as its
|
|
21302
|
-
// client[Width/Height] properties represent viewport area of the window.
|
|
21303
|
-
// Besides, it's as well not necessary as the <html> itself neither has
|
|
21304
|
-
// rendered scroll bars nor it can be clipped.
|
|
21305
|
-
if (!isDocumentElement$1(target)) {
|
|
21306
|
-
// In some browsers (only in Firefox, actually) CSS width & height
|
|
21307
|
-
// include scroll bars size which can be removed at this step as scroll
|
|
21308
|
-
// bars are the only difference between rounded dimensions + paddings
|
|
21309
|
-
// and "client" properties, though that is not always true in Chrome.
|
|
21310
|
-
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
|
|
21311
|
-
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
|
|
21312
|
-
// Chrome has a rather weird rounding of "client" properties.
|
|
21313
|
-
// E.g. for an element with content width of 314.2px it sometimes gives
|
|
21314
|
-
// the client width of 315px and for the width of 314.7px it may give
|
|
21315
|
-
// 314px. And it doesn't happen all the time. So just ignore this delta
|
|
21316
|
-
// as a non-relevant.
|
|
21317
|
-
if (Math.abs(vertScrollbar) !== 1) {
|
|
21318
|
-
width -= vertScrollbar;
|
|
21319
|
-
}
|
|
21320
|
-
if (Math.abs(horizScrollbar) !== 1) {
|
|
21321
|
-
height -= horizScrollbar;
|
|
21322
|
-
}
|
|
21323
|
-
}
|
|
21324
|
-
return createRectInit(paddings.left, paddings.top, width, height);
|
|
21325
|
-
}
|
|
21326
|
-
/**
|
|
21327
|
-
* Checks whether provided element is an instance of the SVGGraphicsElement.
|
|
21328
|
-
*
|
|
21329
|
-
* @param {Element} target - Element to be checked.
|
|
21330
|
-
* @returns {boolean}
|
|
21331
|
-
*/
|
|
21332
|
-
var isSVGGraphicsElement = (function () {
|
|
21333
|
-
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
|
|
21334
|
-
// interface.
|
|
21335
|
-
if (typeof SVGGraphicsElement !== 'undefined') {
|
|
21336
|
-
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
|
|
21337
|
-
}
|
|
21338
|
-
// If it's so, then check that element is at least an instance of the
|
|
21339
|
-
// SVGElement and that it has the "getBBox" method.
|
|
21340
|
-
// eslint-disable-next-line no-extra-parens
|
|
21341
|
-
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
|
|
21342
|
-
typeof target.getBBox === 'function'); };
|
|
21343
|
-
})();
|
|
21344
|
-
/**
|
|
21345
|
-
* Checks whether provided element is a document element (<html>).
|
|
21346
|
-
*
|
|
21347
|
-
* @param {Element} target - Element to be checked.
|
|
21348
|
-
* @returns {boolean}
|
|
21349
|
-
*/
|
|
21350
|
-
function isDocumentElement$1(target) {
|
|
21351
|
-
return target === getWindowOf(target).document.documentElement;
|
|
21352
|
-
}
|
|
21353
|
-
/**
|
|
21354
|
-
* Calculates an appropriate content rectangle for provided html or svg element.
|
|
21355
|
-
*
|
|
21356
|
-
* @param {Element} target - Element content rectangle of which needs to be calculated.
|
|
21357
|
-
* @returns {DOMRectInit}
|
|
21358
|
-
*/
|
|
21359
|
-
function getContentRect(target) {
|
|
21360
|
-
if (!isBrowser$3) {
|
|
21361
|
-
return emptyRect;
|
|
21362
|
-
}
|
|
21363
|
-
if (isSVGGraphicsElement(target)) {
|
|
21364
|
-
return getSVGContentRect(target);
|
|
21365
|
-
}
|
|
21366
|
-
return getHTMLElementContentRect(target);
|
|
21367
|
-
}
|
|
21368
|
-
/**
|
|
21369
|
-
* Creates rectangle with an interface of the DOMRectReadOnly.
|
|
21370
|
-
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
|
|
21371
|
-
*
|
|
21372
|
-
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
|
|
21373
|
-
* @returns {DOMRectReadOnly}
|
|
21374
|
-
*/
|
|
21375
|
-
function createReadOnlyRect(_a) {
|
|
21376
|
-
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
|
21377
|
-
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
|
|
21378
|
-
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
|
|
21379
|
-
var rect = Object.create(Constr.prototype);
|
|
21380
|
-
// Rectangle's properties are not writable and non-enumerable.
|
|
21381
|
-
defineConfigurable(rect, {
|
|
21382
|
-
x: x, y: y, width: width, height: height,
|
|
21383
|
-
top: y,
|
|
21384
|
-
right: x + width,
|
|
21385
|
-
bottom: height + y,
|
|
21386
|
-
left: x
|
|
21387
|
-
});
|
|
21388
|
-
return rect;
|
|
21389
|
-
}
|
|
21390
|
-
/**
|
|
21391
|
-
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
|
|
21392
|
-
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
|
|
21393
|
-
*
|
|
21394
|
-
* @param {number} x - X coordinate.
|
|
21395
|
-
* @param {number} y - Y coordinate.
|
|
21396
|
-
* @param {number} width - Rectangle's width.
|
|
21397
|
-
* @param {number} height - Rectangle's height.
|
|
21398
|
-
* @returns {DOMRectInit}
|
|
21399
|
-
*/
|
|
21400
|
-
function createRectInit(x, y, width, height) {
|
|
21401
|
-
return { x: x, y: y, width: width, height: height };
|
|
21402
|
-
}
|
|
21403
|
-
|
|
21404
|
-
/**
|
|
21405
|
-
* Class that is responsible for computations of the content rectangle of
|
|
21406
|
-
* provided DOM element and for keeping track of it's changes.
|
|
21407
|
-
*/
|
|
21408
|
-
var ResizeObservation = /** @class */ (function () {
|
|
21409
|
-
/**
|
|
21410
|
-
* Creates an instance of ResizeObservation.
|
|
21411
|
-
*
|
|
21412
|
-
* @param {Element} target - Element to be observed.
|
|
21413
|
-
*/
|
|
21414
|
-
function ResizeObservation(target) {
|
|
21415
|
-
/**
|
|
21416
|
-
* Broadcasted width of content rectangle.
|
|
21417
|
-
*
|
|
21418
|
-
* @type {number}
|
|
21419
|
-
*/
|
|
21420
|
-
this.broadcastWidth = 0;
|
|
21421
|
-
/**
|
|
21422
|
-
* Broadcasted height of content rectangle.
|
|
21423
|
-
*
|
|
21424
|
-
* @type {number}
|
|
21425
|
-
*/
|
|
21426
|
-
this.broadcastHeight = 0;
|
|
21427
|
-
/**
|
|
21428
|
-
* Reference to the last observed content rectangle.
|
|
21429
|
-
*
|
|
21430
|
-
* @private {DOMRectInit}
|
|
21431
|
-
*/
|
|
21432
|
-
this.contentRect_ = createRectInit(0, 0, 0, 0);
|
|
21433
|
-
this.target = target;
|
|
21434
|
-
}
|
|
21435
|
-
/**
|
|
21436
|
-
* Updates content rectangle and tells whether it's width or height properties
|
|
21437
|
-
* have changed since the last broadcast.
|
|
21438
|
-
*
|
|
21439
|
-
* @returns {boolean}
|
|
21440
|
-
*/
|
|
21441
|
-
ResizeObservation.prototype.isActive = function () {
|
|
21442
|
-
var rect = getContentRect(this.target);
|
|
21443
|
-
this.contentRect_ = rect;
|
|
21444
|
-
return (rect.width !== this.broadcastWidth ||
|
|
21445
|
-
rect.height !== this.broadcastHeight);
|
|
21446
|
-
};
|
|
21447
|
-
/**
|
|
21448
|
-
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
|
|
21449
|
-
* from the corresponding properties of the last observed content rectangle.
|
|
21450
|
-
*
|
|
21451
|
-
* @returns {DOMRectInit} Last observed content rectangle.
|
|
21452
|
-
*/
|
|
21453
|
-
ResizeObservation.prototype.broadcastRect = function () {
|
|
21454
|
-
var rect = this.contentRect_;
|
|
21455
|
-
this.broadcastWidth = rect.width;
|
|
21456
|
-
this.broadcastHeight = rect.height;
|
|
21457
|
-
return rect;
|
|
21458
|
-
};
|
|
21459
|
-
return ResizeObservation;
|
|
21460
|
-
}());
|
|
21461
|
-
|
|
21462
|
-
var ResizeObserverEntry = /** @class */ (function () {
|
|
21463
|
-
/**
|
|
21464
|
-
* Creates an instance of ResizeObserverEntry.
|
|
21465
|
-
*
|
|
21466
|
-
* @param {Element} target - Element that is being observed.
|
|
21467
|
-
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
|
|
21468
|
-
*/
|
|
21469
|
-
function ResizeObserverEntry(target, rectInit) {
|
|
21470
|
-
var contentRect = createReadOnlyRect(rectInit);
|
|
21471
|
-
// According to the specification following properties are not writable
|
|
21472
|
-
// and are also not enumerable in the native implementation.
|
|
21473
|
-
//
|
|
21474
|
-
// Property accessors are not being used as they'd require to define a
|
|
21475
|
-
// private WeakMap storage which may cause memory leaks in browsers that
|
|
21476
|
-
// don't support this type of collections.
|
|
21477
|
-
defineConfigurable(this, { target: target, contentRect: contentRect });
|
|
21478
|
-
}
|
|
21479
|
-
return ResizeObserverEntry;
|
|
21480
|
-
}());
|
|
21481
|
-
|
|
21482
|
-
var ResizeObserverSPI = /** @class */ (function () {
|
|
21483
|
-
/**
|
|
21484
|
-
* Creates a new instance of ResizeObserver.
|
|
21485
|
-
*
|
|
21486
|
-
* @param {ResizeObserverCallback} callback - Callback function that is invoked
|
|
21487
|
-
* when one of the observed elements changes it's content dimensions.
|
|
21488
|
-
* @param {ResizeObserverController} controller - Controller instance which
|
|
21489
|
-
* is responsible for the updates of observer.
|
|
21490
|
-
* @param {ResizeObserver} callbackCtx - Reference to the public
|
|
21491
|
-
* ResizeObserver instance which will be passed to callback function.
|
|
21492
|
-
*/
|
|
21493
|
-
function ResizeObserverSPI(callback, controller, callbackCtx) {
|
|
21494
|
-
/**
|
|
21495
|
-
* Collection of resize observations that have detected changes in dimensions
|
|
21496
|
-
* of elements.
|
|
21497
|
-
*
|
|
21498
|
-
* @private {Array<ResizeObservation>}
|
|
21499
|
-
*/
|
|
21500
|
-
this.activeObservations_ = [];
|
|
21501
|
-
/**
|
|
21502
|
-
* Registry of the ResizeObservation instances.
|
|
21503
|
-
*
|
|
21504
|
-
* @private {Map<Element, ResizeObservation>}
|
|
21505
|
-
*/
|
|
21506
|
-
this.observations_ = new MapShim();
|
|
21507
|
-
if (typeof callback !== 'function') {
|
|
21508
|
-
throw new TypeError('The callback provided as parameter 1 is not a function.');
|
|
21509
|
-
}
|
|
21510
|
-
this.callback_ = callback;
|
|
21511
|
-
this.controller_ = controller;
|
|
21512
|
-
this.callbackCtx_ = callbackCtx;
|
|
21513
|
-
}
|
|
21514
|
-
/**
|
|
21515
|
-
* Starts observing provided element.
|
|
21516
|
-
*
|
|
21517
|
-
* @param {Element} target - Element to be observed.
|
|
21518
|
-
* @returns {void}
|
|
21519
|
-
*/
|
|
21520
|
-
ResizeObserverSPI.prototype.observe = function (target) {
|
|
21521
|
-
if (!arguments.length) {
|
|
21522
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
21523
|
-
}
|
|
21524
|
-
// Do nothing if current environment doesn't have the Element interface.
|
|
21525
|
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
|
21526
|
-
return;
|
|
21527
|
-
}
|
|
21528
|
-
if (!(target instanceof getWindowOf(target).Element)) {
|
|
21529
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
21530
|
-
}
|
|
21531
|
-
var observations = this.observations_;
|
|
21532
|
-
// Do nothing if element is already being observed.
|
|
21533
|
-
if (observations.has(target)) {
|
|
21534
|
-
return;
|
|
21535
|
-
}
|
|
21536
|
-
observations.set(target, new ResizeObservation(target));
|
|
21537
|
-
this.controller_.addObserver(this);
|
|
21538
|
-
// Force the update of observations.
|
|
21539
|
-
this.controller_.refresh();
|
|
21540
|
-
};
|
|
21541
|
-
/**
|
|
21542
|
-
* Stops observing provided element.
|
|
21543
|
-
*
|
|
21544
|
-
* @param {Element} target - Element to stop observing.
|
|
21545
|
-
* @returns {void}
|
|
21546
|
-
*/
|
|
21547
|
-
ResizeObserverSPI.prototype.unobserve = function (target) {
|
|
21548
|
-
if (!arguments.length) {
|
|
21549
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
21550
|
-
}
|
|
21551
|
-
// Do nothing if current environment doesn't have the Element interface.
|
|
21552
|
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
|
21553
|
-
return;
|
|
21554
|
-
}
|
|
21555
|
-
if (!(target instanceof getWindowOf(target).Element)) {
|
|
21556
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
21557
|
-
}
|
|
21558
|
-
var observations = this.observations_;
|
|
21559
|
-
// Do nothing if element is not being observed.
|
|
21560
|
-
if (!observations.has(target)) {
|
|
21561
|
-
return;
|
|
21562
|
-
}
|
|
21563
|
-
observations.delete(target);
|
|
21564
|
-
if (!observations.size) {
|
|
21565
|
-
this.controller_.removeObserver(this);
|
|
21566
|
-
}
|
|
21567
|
-
};
|
|
21568
|
-
/**
|
|
21569
|
-
* Stops observing all elements.
|
|
21570
|
-
*
|
|
21571
|
-
* @returns {void}
|
|
21572
|
-
*/
|
|
21573
|
-
ResizeObserverSPI.prototype.disconnect = function () {
|
|
21574
|
-
this.clearActive();
|
|
21575
|
-
this.observations_.clear();
|
|
21576
|
-
this.controller_.removeObserver(this);
|
|
21577
|
-
};
|
|
21578
|
-
/**
|
|
21579
|
-
* Collects observation instances the associated element of which has changed
|
|
21580
|
-
* it's content rectangle.
|
|
21581
|
-
*
|
|
21582
|
-
* @returns {void}
|
|
21583
|
-
*/
|
|
21584
|
-
ResizeObserverSPI.prototype.gatherActive = function () {
|
|
21585
|
-
var _this = this;
|
|
21586
|
-
this.clearActive();
|
|
21587
|
-
this.observations_.forEach(function (observation) {
|
|
21588
|
-
if (observation.isActive()) {
|
|
21589
|
-
_this.activeObservations_.push(observation);
|
|
21590
|
-
}
|
|
21591
|
-
});
|
|
21592
|
-
};
|
|
21593
|
-
/**
|
|
21594
|
-
* Invokes initial callback function with a list of ResizeObserverEntry
|
|
21595
|
-
* instances collected from active resize observations.
|
|
21596
|
-
*
|
|
21597
|
-
* @returns {void}
|
|
21598
|
-
*/
|
|
21599
|
-
ResizeObserverSPI.prototype.broadcastActive = function () {
|
|
21600
|
-
// Do nothing if observer doesn't have active observations.
|
|
21601
|
-
if (!this.hasActive()) {
|
|
21602
|
-
return;
|
|
21603
|
-
}
|
|
21604
|
-
var ctx = this.callbackCtx_;
|
|
21605
|
-
// Create ResizeObserverEntry instance for every active observation.
|
|
21606
|
-
var entries = this.activeObservations_.map(function (observation) {
|
|
21607
|
-
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
|
|
21608
|
-
});
|
|
21609
|
-
this.callback_.call(ctx, entries, ctx);
|
|
21610
|
-
this.clearActive();
|
|
21611
|
-
};
|
|
21612
|
-
/**
|
|
21613
|
-
* Clears the collection of active observations.
|
|
21614
|
-
*
|
|
21615
|
-
* @returns {void}
|
|
21616
|
-
*/
|
|
21617
|
-
ResizeObserverSPI.prototype.clearActive = function () {
|
|
21618
|
-
this.activeObservations_.splice(0);
|
|
21619
|
-
};
|
|
21620
|
-
/**
|
|
21621
|
-
* Tells whether observer has active observations.
|
|
21622
|
-
*
|
|
21623
|
-
* @returns {boolean}
|
|
21624
|
-
*/
|
|
21625
|
-
ResizeObserverSPI.prototype.hasActive = function () {
|
|
21626
|
-
return this.activeObservations_.length > 0;
|
|
21627
|
-
};
|
|
21628
|
-
return ResizeObserverSPI;
|
|
21629
|
-
}());
|
|
21630
|
-
|
|
21631
|
-
// Registry of internal observers. If WeakMap is not available use current shim
|
|
21632
|
-
// for the Map collection as it has all required methods and because WeakMap
|
|
21633
|
-
// can't be fully polyfilled anyway.
|
|
21634
|
-
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
|
|
21635
|
-
/**
|
|
21636
|
-
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
|
|
21637
|
-
* exposing only those methods and properties that are defined in the spec.
|
|
21638
|
-
*/
|
|
21639
|
-
var ResizeObserver = /** @class */ (function () {
|
|
21640
|
-
/**
|
|
21641
|
-
* Creates a new instance of ResizeObserver.
|
|
21642
|
-
*
|
|
21643
|
-
* @param {ResizeObserverCallback} callback - Callback that is invoked when
|
|
21644
|
-
* dimensions of the observed elements change.
|
|
21645
|
-
*/
|
|
21646
|
-
function ResizeObserver(callback) {
|
|
21647
|
-
if (!(this instanceof ResizeObserver)) {
|
|
21648
|
-
throw new TypeError('Cannot call a class as a function.');
|
|
21649
|
-
}
|
|
21650
|
-
if (!arguments.length) {
|
|
21651
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
21652
|
-
}
|
|
21653
|
-
var controller = ResizeObserverController.getInstance();
|
|
21654
|
-
var observer = new ResizeObserverSPI(callback, controller, this);
|
|
21655
|
-
observers.set(this, observer);
|
|
21656
|
-
}
|
|
21657
|
-
return ResizeObserver;
|
|
21658
|
-
}());
|
|
21659
|
-
// Expose public methods of ResizeObserver.
|
|
21660
|
-
[
|
|
21661
|
-
'observe',
|
|
21662
|
-
'unobserve',
|
|
21663
|
-
'disconnect'
|
|
21664
|
-
].forEach(function (method) {
|
|
21665
|
-
ResizeObserver.prototype[method] = function () {
|
|
21666
|
-
var _a;
|
|
21667
|
-
return (_a = observers.get(this))[method].apply(_a, arguments);
|
|
21668
|
-
};
|
|
21669
|
-
});
|
|
21670
|
-
|
|
21671
|
-
var index = (function () {
|
|
21672
|
-
// Export existing implementation if available.
|
|
21673
|
-
if (typeof global$1.ResizeObserver !== 'undefined') {
|
|
21674
|
-
return global$1.ResizeObserver;
|
|
21675
|
-
}
|
|
21676
|
-
return ResizeObserver;
|
|
21677
|
-
})();
|
|
21678
|
-
|
|
21679
|
-
var rafSchd = function rafSchd(fn) {
|
|
21680
|
-
var lastArgs = [];
|
|
21681
|
-
var frameId = null;
|
|
21682
|
-
|
|
21683
|
-
var wrapperFn = function wrapperFn() {
|
|
21684
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21685
|
-
args[_key] = arguments[_key];
|
|
21686
|
-
}
|
|
21687
|
-
|
|
21688
|
-
lastArgs = args;
|
|
21689
|
-
|
|
21690
|
-
if (frameId) {
|
|
21691
|
-
return;
|
|
21692
|
-
}
|
|
21693
|
-
|
|
21694
|
-
frameId = requestAnimationFrame(function () {
|
|
21695
|
-
frameId = null;
|
|
21696
|
-
fn.apply(void 0, lastArgs);
|
|
21697
|
-
});
|
|
21698
|
-
};
|
|
21699
|
-
|
|
21700
|
-
wrapperFn.cancel = function () {
|
|
21701
|
-
if (!frameId) {
|
|
21702
|
-
return;
|
|
21703
|
-
}
|
|
21704
|
-
|
|
21705
|
-
cancelAnimationFrame(frameId);
|
|
21706
|
-
frameId = null;
|
|
21707
|
-
};
|
|
21708
|
-
|
|
21709
|
-
return wrapperFn;
|
|
21710
|
-
};
|
|
21711
|
-
|
|
21712
|
-
/**
|
|
21713
|
-
* Checks if `value` is the
|
|
21714
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
21715
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
21716
|
-
*
|
|
21717
|
-
* @static
|
|
21718
|
-
* @memberOf _
|
|
21719
|
-
* @since 0.1.0
|
|
21720
|
-
* @category Lang
|
|
21721
|
-
* @param {*} value The value to check.
|
|
21722
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
21723
|
-
* @example
|
|
21724
|
-
*
|
|
21725
|
-
* _.isObject({});
|
|
21726
|
-
* // => true
|
|
21727
|
-
*
|
|
21728
|
-
* _.isObject([1, 2, 3]);
|
|
21729
|
-
* // => true
|
|
21730
|
-
*
|
|
21731
|
-
* _.isObject(_.noop);
|
|
21732
|
-
* // => true
|
|
21733
|
-
*
|
|
21734
|
-
* _.isObject(null);
|
|
21735
|
-
* // => false
|
|
21736
|
-
*/
|
|
21737
|
-
function isObject(value) {
|
|
21738
|
-
var type = typeof value;
|
|
21739
|
-
return value != null && (type == 'object' || type == 'function');
|
|
21740
|
-
}
|
|
21741
|
-
|
|
21742
|
-
/** Detect free variable `global` from Node.js. */
|
|
21743
|
-
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
21744
|
-
|
|
21745
|
-
/** Detect free variable `self`. */
|
|
21746
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
21747
|
-
|
|
21748
|
-
/** Used as a reference to the global object. */
|
|
21749
|
-
var root = freeGlobal || freeSelf || Function('return this')();
|
|
21750
|
-
|
|
21751
|
-
/**
|
|
21752
|
-
* Gets the timestamp of the number of milliseconds that have elapsed since
|
|
21753
|
-
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
|
21754
|
-
*
|
|
21755
|
-
* @static
|
|
21756
|
-
* @memberOf _
|
|
21757
|
-
* @since 2.4.0
|
|
21758
|
-
* @category Date
|
|
21759
|
-
* @returns {number} Returns the timestamp.
|
|
21760
|
-
* @example
|
|
21761
|
-
*
|
|
21762
|
-
* _.defer(function(stamp) {
|
|
21763
|
-
* console.log(_.now() - stamp);
|
|
21764
|
-
* }, _.now());
|
|
21765
|
-
* // => Logs the number of milliseconds it took for the deferred invocation.
|
|
21766
|
-
*/
|
|
21767
|
-
var now = function() {
|
|
21768
|
-
return root.Date.now();
|
|
21769
|
-
};
|
|
21770
|
-
|
|
21771
|
-
/** Used to match a single whitespace character. */
|
|
21772
|
-
var reWhitespace = /\s/;
|
|
21773
|
-
|
|
21774
|
-
/**
|
|
21775
|
-
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
|
21776
|
-
* character of `string`.
|
|
21777
|
-
*
|
|
21778
|
-
* @private
|
|
21779
|
-
* @param {string} string The string to inspect.
|
|
21780
|
-
* @returns {number} Returns the index of the last non-whitespace character.
|
|
21781
|
-
*/
|
|
21782
|
-
function trimmedEndIndex(string) {
|
|
21783
|
-
var index = string.length;
|
|
21784
|
-
|
|
21785
|
-
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
|
21786
|
-
return index;
|
|
21787
|
-
}
|
|
21788
|
-
|
|
21789
|
-
/** Used to match leading whitespace. */
|
|
21790
|
-
var reTrimStart = /^\s+/;
|
|
21791
|
-
|
|
21792
|
-
/**
|
|
21793
|
-
* The base implementation of `_.trim`.
|
|
21794
|
-
*
|
|
21795
|
-
* @private
|
|
21796
|
-
* @param {string} string The string to trim.
|
|
21797
|
-
* @returns {string} Returns the trimmed string.
|
|
21798
|
-
*/
|
|
21799
|
-
function baseTrim(string) {
|
|
21800
|
-
return string
|
|
21801
|
-
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
|
|
21802
|
-
: string;
|
|
21803
|
-
}
|
|
21804
|
-
|
|
21805
|
-
/** Built-in value references. */
|
|
21806
|
-
var Symbol$1 = root.Symbol;
|
|
21807
|
-
|
|
21808
|
-
/** Used for built-in method references. */
|
|
21809
|
-
var objectProto$1 = Object.prototype;
|
|
21810
|
-
|
|
21811
|
-
/** Used to check objects for own properties. */
|
|
21812
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
21813
|
-
|
|
21814
|
-
/**
|
|
21815
|
-
* Used to resolve the
|
|
21816
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
21817
|
-
* of values.
|
|
21818
|
-
*/
|
|
21819
|
-
var nativeObjectToString$1 = objectProto$1.toString;
|
|
21820
|
-
|
|
21821
|
-
/** Built-in value references. */
|
|
21822
|
-
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
21823
|
-
|
|
21824
|
-
/**
|
|
21825
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
21826
|
-
*
|
|
21827
|
-
* @private
|
|
21828
|
-
* @param {*} value The value to query.
|
|
21829
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
21830
|
-
*/
|
|
21831
|
-
function getRawTag(value) {
|
|
21832
|
-
var isOwn = hasOwnProperty$1.call(value, symToStringTag$1),
|
|
21833
|
-
tag = value[symToStringTag$1];
|
|
21834
|
-
|
|
21835
|
-
try {
|
|
21836
|
-
value[symToStringTag$1] = undefined;
|
|
21837
|
-
var unmasked = true;
|
|
21838
|
-
} catch (e) {}
|
|
21839
|
-
|
|
21840
|
-
var result = nativeObjectToString$1.call(value);
|
|
21841
|
-
if (unmasked) {
|
|
21842
|
-
if (isOwn) {
|
|
21843
|
-
value[symToStringTag$1] = tag;
|
|
21844
|
-
} else {
|
|
21845
|
-
delete value[symToStringTag$1];
|
|
21846
|
-
}
|
|
21847
|
-
}
|
|
21848
|
-
return result;
|
|
21849
|
-
}
|
|
21850
|
-
|
|
21851
|
-
/** Used for built-in method references. */
|
|
21852
|
-
var objectProto = Object.prototype;
|
|
21853
|
-
|
|
21854
|
-
/**
|
|
21855
|
-
* Used to resolve the
|
|
21856
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
21857
|
-
* of values.
|
|
21858
|
-
*/
|
|
21859
|
-
var nativeObjectToString = objectProto.toString;
|
|
21860
|
-
|
|
21861
|
-
/**
|
|
21862
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
21863
|
-
*
|
|
21864
|
-
* @private
|
|
21865
|
-
* @param {*} value The value to convert.
|
|
21866
|
-
* @returns {string} Returns the converted string.
|
|
21867
|
-
*/
|
|
21868
|
-
function objectToString(value) {
|
|
21869
|
-
return nativeObjectToString.call(value);
|
|
21870
|
-
}
|
|
21871
|
-
|
|
21872
|
-
/** `Object#toString` result references. */
|
|
21873
|
-
var nullTag = '[object Null]',
|
|
21874
|
-
undefinedTag = '[object Undefined]';
|
|
21875
|
-
|
|
21876
|
-
/** Built-in value references. */
|
|
21877
|
-
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
21878
|
-
|
|
21879
|
-
/**
|
|
21880
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
21881
|
-
*
|
|
21882
|
-
* @private
|
|
21883
|
-
* @param {*} value The value to query.
|
|
21884
|
-
* @returns {string} Returns the `toStringTag`.
|
|
21885
|
-
*/
|
|
21886
|
-
function baseGetTag(value) {
|
|
21887
|
-
if (value == null) {
|
|
21888
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
21889
|
-
}
|
|
21890
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
21891
|
-
? getRawTag(value)
|
|
21892
|
-
: objectToString(value);
|
|
21893
|
-
}
|
|
21894
|
-
|
|
21895
|
-
/**
|
|
21896
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
21897
|
-
* and has a `typeof` result of "object".
|
|
21898
|
-
*
|
|
21899
|
-
* @static
|
|
21900
|
-
* @memberOf _
|
|
21901
|
-
* @since 4.0.0
|
|
21902
|
-
* @category Lang
|
|
21903
|
-
* @param {*} value The value to check.
|
|
21904
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
21905
|
-
* @example
|
|
21906
|
-
*
|
|
21907
|
-
* _.isObjectLike({});
|
|
21908
|
-
* // => true
|
|
21909
|
-
*
|
|
21910
|
-
* _.isObjectLike([1, 2, 3]);
|
|
21911
|
-
* // => true
|
|
21912
|
-
*
|
|
21913
|
-
* _.isObjectLike(_.noop);
|
|
21914
|
-
* // => false
|
|
21915
|
-
*
|
|
21916
|
-
* _.isObjectLike(null);
|
|
21917
|
-
* // => false
|
|
21918
|
-
*/
|
|
21919
|
-
function isObjectLike(value) {
|
|
21920
|
-
return value != null && typeof value == 'object';
|
|
21921
|
-
}
|
|
21922
|
-
|
|
21923
|
-
/** `Object#toString` result references. */
|
|
21924
|
-
var symbolTag = '[object Symbol]';
|
|
21925
|
-
|
|
21926
|
-
/**
|
|
21927
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
21928
|
-
*
|
|
21929
|
-
* @static
|
|
21930
|
-
* @memberOf _
|
|
21931
|
-
* @since 4.0.0
|
|
21932
|
-
* @category Lang
|
|
21933
|
-
* @param {*} value The value to check.
|
|
21934
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
21935
|
-
* @example
|
|
21936
|
-
*
|
|
21937
|
-
* _.isSymbol(Symbol.iterator);
|
|
21938
|
-
* // => true
|
|
21939
|
-
*
|
|
21940
|
-
* _.isSymbol('abc');
|
|
21941
|
-
* // => false
|
|
21942
|
-
*/
|
|
21943
|
-
function isSymbol(value) {
|
|
21944
|
-
return typeof value == 'symbol' ||
|
|
21945
|
-
(isObjectLike(value) && baseGetTag(value) == symbolTag);
|
|
21946
|
-
}
|
|
21947
|
-
|
|
21948
|
-
/** Used as references for various `Number` constants. */
|
|
21949
|
-
var NAN = 0 / 0;
|
|
21950
|
-
|
|
21951
|
-
/** Used to detect bad signed hexadecimal string values. */
|
|
21952
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
21953
|
-
|
|
21954
|
-
/** Used to detect binary string values. */
|
|
21955
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
21956
|
-
|
|
21957
|
-
/** Used to detect octal string values. */
|
|
21958
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
21959
|
-
|
|
21960
|
-
/** Built-in method references without a dependency on `root`. */
|
|
21961
|
-
var freeParseInt = parseInt;
|
|
21962
|
-
|
|
21963
|
-
/**
|
|
21964
|
-
* Converts `value` to a number.
|
|
21965
|
-
*
|
|
21966
|
-
* @static
|
|
21967
|
-
* @memberOf _
|
|
21968
|
-
* @since 4.0.0
|
|
21969
|
-
* @category Lang
|
|
21970
|
-
* @param {*} value The value to process.
|
|
21971
|
-
* @returns {number} Returns the number.
|
|
21972
|
-
* @example
|
|
21973
|
-
*
|
|
21974
|
-
* _.toNumber(3.2);
|
|
21975
|
-
* // => 3.2
|
|
21976
|
-
*
|
|
21977
|
-
* _.toNumber(Number.MIN_VALUE);
|
|
21978
|
-
* // => 5e-324
|
|
21979
|
-
*
|
|
21980
|
-
* _.toNumber(Infinity);
|
|
21981
|
-
* // => Infinity
|
|
21982
|
-
*
|
|
21983
|
-
* _.toNumber('3.2');
|
|
21984
|
-
* // => 3.2
|
|
21985
|
-
*/
|
|
21986
|
-
function toNumber(value) {
|
|
21987
|
-
if (typeof value == 'number') {
|
|
21988
|
-
return value;
|
|
21989
|
-
}
|
|
21990
|
-
if (isSymbol(value)) {
|
|
21991
|
-
return NAN;
|
|
21992
|
-
}
|
|
21993
|
-
if (isObject(value)) {
|
|
21994
|
-
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
21995
|
-
value = isObject(other) ? (other + '') : other;
|
|
21996
|
-
}
|
|
21997
|
-
if (typeof value != 'string') {
|
|
21998
|
-
return value === 0 ? value : +value;
|
|
21999
|
-
}
|
|
22000
|
-
value = baseTrim(value);
|
|
22001
|
-
var isBinary = reIsBinary.test(value);
|
|
22002
|
-
return (isBinary || reIsOctal.test(value))
|
|
22003
|
-
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
|
22004
|
-
: (reIsBadHex.test(value) ? NAN : +value);
|
|
22005
|
-
}
|
|
22006
|
-
|
|
22007
|
-
/** Error message constants. */
|
|
22008
|
-
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
|
22009
|
-
|
|
22010
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
22011
|
-
var nativeMax = Math.max,
|
|
22012
|
-
nativeMin = Math.min;
|
|
22013
|
-
|
|
22014
|
-
/**
|
|
22015
|
-
* Creates a debounced function that delays invoking `func` until after `wait`
|
|
22016
|
-
* milliseconds have elapsed since the last time the debounced function was
|
|
22017
|
-
* invoked. The debounced function comes with a `cancel` method to cancel
|
|
22018
|
-
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
|
22019
|
-
* Provide `options` to indicate whether `func` should be invoked on the
|
|
22020
|
-
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
|
22021
|
-
* with the last arguments provided to the debounced function. Subsequent
|
|
22022
|
-
* calls to the debounced function return the result of the last `func`
|
|
22023
|
-
* invocation.
|
|
22024
|
-
*
|
|
22025
|
-
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
22026
|
-
* invoked on the trailing edge of the timeout only if the debounced function
|
|
22027
|
-
* is invoked more than once during the `wait` timeout.
|
|
22028
|
-
*
|
|
22029
|
-
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
22030
|
-
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
22031
|
-
*
|
|
22032
|
-
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
22033
|
-
* for details over the differences between `_.debounce` and `_.throttle`.
|
|
22034
|
-
*
|
|
22035
|
-
* @static
|
|
22036
|
-
* @memberOf _
|
|
22037
|
-
* @since 0.1.0
|
|
22038
|
-
* @category Function
|
|
22039
|
-
* @param {Function} func The function to debounce.
|
|
22040
|
-
* @param {number} [wait=0] The number of milliseconds to delay.
|
|
22041
|
-
* @param {Object} [options={}] The options object.
|
|
22042
|
-
* @param {boolean} [options.leading=false]
|
|
22043
|
-
* Specify invoking on the leading edge of the timeout.
|
|
22044
|
-
* @param {number} [options.maxWait]
|
|
22045
|
-
* The maximum time `func` is allowed to be delayed before it's invoked.
|
|
22046
|
-
* @param {boolean} [options.trailing=true]
|
|
22047
|
-
* Specify invoking on the trailing edge of the timeout.
|
|
22048
|
-
* @returns {Function} Returns the new debounced function.
|
|
22049
|
-
* @example
|
|
22050
|
-
*
|
|
22051
|
-
* // Avoid costly calculations while the window size is in flux.
|
|
22052
|
-
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
|
22053
|
-
*
|
|
22054
|
-
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
|
22055
|
-
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
|
22056
|
-
* 'leading': true,
|
|
22057
|
-
* 'trailing': false
|
|
22058
|
-
* }));
|
|
22059
|
-
*
|
|
22060
|
-
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
|
22061
|
-
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
|
22062
|
-
* var source = new EventSource('/stream');
|
|
22063
|
-
* jQuery(source).on('message', debounced);
|
|
22064
|
-
*
|
|
22065
|
-
* // Cancel the trailing debounced invocation.
|
|
22066
|
-
* jQuery(window).on('popstate', debounced.cancel);
|
|
22067
|
-
*/
|
|
22068
|
-
function debounce$1(func, wait, options) {
|
|
22069
|
-
var lastArgs,
|
|
22070
|
-
lastThis,
|
|
22071
|
-
maxWait,
|
|
22072
|
-
result,
|
|
22073
|
-
timerId,
|
|
22074
|
-
lastCallTime,
|
|
22075
|
-
lastInvokeTime = 0,
|
|
22076
|
-
leading = false,
|
|
22077
|
-
maxing = false,
|
|
22078
|
-
trailing = true;
|
|
22079
|
-
|
|
22080
|
-
if (typeof func != 'function') {
|
|
22081
|
-
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
22082
|
-
}
|
|
22083
|
-
wait = toNumber(wait) || 0;
|
|
22084
|
-
if (isObject(options)) {
|
|
22085
|
-
leading = !!options.leading;
|
|
22086
|
-
maxing = 'maxWait' in options;
|
|
22087
|
-
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
22088
|
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
22089
|
-
}
|
|
22090
|
-
|
|
22091
|
-
function invokeFunc(time) {
|
|
22092
|
-
var args = lastArgs,
|
|
22093
|
-
thisArg = lastThis;
|
|
22094
|
-
|
|
22095
|
-
lastArgs = lastThis = undefined;
|
|
22096
|
-
lastInvokeTime = time;
|
|
22097
|
-
result = func.apply(thisArg, args);
|
|
22098
|
-
return result;
|
|
22099
|
-
}
|
|
22100
|
-
|
|
22101
|
-
function leadingEdge(time) {
|
|
22102
|
-
// Reset any `maxWait` timer.
|
|
22103
|
-
lastInvokeTime = time;
|
|
22104
|
-
// Start the timer for the trailing edge.
|
|
22105
|
-
timerId = setTimeout(timerExpired, wait);
|
|
22106
|
-
// Invoke the leading edge.
|
|
22107
|
-
return leading ? invokeFunc(time) : result;
|
|
22108
|
-
}
|
|
22109
|
-
|
|
22110
|
-
function remainingWait(time) {
|
|
22111
|
-
var timeSinceLastCall = time - lastCallTime,
|
|
22112
|
-
timeSinceLastInvoke = time - lastInvokeTime,
|
|
22113
|
-
timeWaiting = wait - timeSinceLastCall;
|
|
22114
|
-
|
|
22115
|
-
return maxing
|
|
22116
|
-
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
|
|
22117
|
-
: timeWaiting;
|
|
22118
|
-
}
|
|
22119
|
-
|
|
22120
|
-
function shouldInvoke(time) {
|
|
22121
|
-
var timeSinceLastCall = time - lastCallTime,
|
|
22122
|
-
timeSinceLastInvoke = time - lastInvokeTime;
|
|
22123
|
-
|
|
22124
|
-
// Either this is the first call, activity has stopped and we're at the
|
|
22125
|
-
// trailing edge, the system time has gone backwards and we're treating
|
|
22126
|
-
// it as the trailing edge, or we've hit the `maxWait` limit.
|
|
22127
|
-
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
|
22128
|
-
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
|
22129
|
-
}
|
|
22130
|
-
|
|
22131
|
-
function timerExpired() {
|
|
22132
|
-
var time = now();
|
|
22133
|
-
if (shouldInvoke(time)) {
|
|
22134
|
-
return trailingEdge(time);
|
|
22135
|
-
}
|
|
22136
|
-
// Restart the timer.
|
|
22137
|
-
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
22138
|
-
}
|
|
22139
|
-
|
|
22140
|
-
function trailingEdge(time) {
|
|
22141
|
-
timerId = undefined;
|
|
22142
|
-
|
|
22143
|
-
// Only invoke if we have `lastArgs` which means `func` has been
|
|
22144
|
-
// debounced at least once.
|
|
22145
|
-
if (trailing && lastArgs) {
|
|
22146
|
-
return invokeFunc(time);
|
|
22147
|
-
}
|
|
22148
|
-
lastArgs = lastThis = undefined;
|
|
22149
|
-
return result;
|
|
22150
|
-
}
|
|
22151
|
-
|
|
22152
|
-
function cancel() {
|
|
22153
|
-
if (timerId !== undefined) {
|
|
22154
|
-
clearTimeout(timerId);
|
|
22155
|
-
}
|
|
22156
|
-
lastInvokeTime = 0;
|
|
22157
|
-
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
|
22158
|
-
}
|
|
22159
|
-
|
|
22160
|
-
function flush() {
|
|
22161
|
-
return timerId === undefined ? result : trailingEdge(now());
|
|
22162
|
-
}
|
|
22163
|
-
|
|
22164
|
-
function debounced() {
|
|
22165
|
-
var time = now(),
|
|
22166
|
-
isInvoking = shouldInvoke(time);
|
|
22167
|
-
|
|
22168
|
-
lastArgs = arguments;
|
|
22169
|
-
lastThis = this;
|
|
22170
|
-
lastCallTime = time;
|
|
22171
|
-
|
|
22172
|
-
if (isInvoking) {
|
|
22173
|
-
if (timerId === undefined) {
|
|
22174
|
-
return leadingEdge(lastCallTime);
|
|
22175
|
-
}
|
|
22176
|
-
if (maxing) {
|
|
22177
|
-
// Handle invocations in a tight loop.
|
|
22178
|
-
clearTimeout(timerId);
|
|
22179
|
-
timerId = setTimeout(timerExpired, wait);
|
|
22180
|
-
return invokeFunc(lastCallTime);
|
|
22181
|
-
}
|
|
22182
|
-
}
|
|
22183
|
-
if (timerId === undefined) {
|
|
22184
|
-
timerId = setTimeout(timerExpired, wait);
|
|
22185
|
-
}
|
|
22186
|
-
return result;
|
|
22187
|
-
}
|
|
22188
|
-
debounced.cancel = cancel;
|
|
22189
|
-
debounced.flush = flush;
|
|
22190
|
-
return debounced;
|
|
22191
|
-
}
|
|
22192
|
-
|
|
22193
|
-
/** Error message constants. */
|
|
22194
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
22195
|
-
|
|
22196
|
-
/**
|
|
22197
|
-
* Creates a throttled function that only invokes `func` at most once per
|
|
22198
|
-
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
|
22199
|
-
* method to cancel delayed `func` invocations and a `flush` method to
|
|
22200
|
-
* immediately invoke them. Provide `options` to indicate whether `func`
|
|
22201
|
-
* should be invoked on the leading and/or trailing edge of the `wait`
|
|
22202
|
-
* timeout. The `func` is invoked with the last arguments provided to the
|
|
22203
|
-
* throttled function. Subsequent calls to the throttled function return the
|
|
22204
|
-
* result of the last `func` invocation.
|
|
22205
|
-
*
|
|
22206
|
-
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
22207
|
-
* invoked on the trailing edge of the timeout only if the throttled function
|
|
22208
|
-
* is invoked more than once during the `wait` timeout.
|
|
22209
|
-
*
|
|
22210
|
-
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
22211
|
-
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
22212
|
-
*
|
|
22213
|
-
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
22214
|
-
* for details over the differences between `_.throttle` and `_.debounce`.
|
|
22215
|
-
*
|
|
22216
|
-
* @static
|
|
22217
|
-
* @memberOf _
|
|
22218
|
-
* @since 0.1.0
|
|
22219
|
-
* @category Function
|
|
22220
|
-
* @param {Function} func The function to throttle.
|
|
22221
|
-
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
|
|
22222
|
-
* @param {Object} [options={}] The options object.
|
|
22223
|
-
* @param {boolean} [options.leading=true]
|
|
22224
|
-
* Specify invoking on the leading edge of the timeout.
|
|
22225
|
-
* @param {boolean} [options.trailing=true]
|
|
22226
|
-
* Specify invoking on the trailing edge of the timeout.
|
|
22227
|
-
* @returns {Function} Returns the new throttled function.
|
|
22228
|
-
* @example
|
|
22229
|
-
*
|
|
22230
|
-
* // Avoid excessively updating the position while scrolling.
|
|
22231
|
-
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
|
|
22232
|
-
*
|
|
22233
|
-
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
|
|
22234
|
-
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
|
|
22235
|
-
* jQuery(element).on('click', throttled);
|
|
22236
|
-
*
|
|
22237
|
-
* // Cancel the trailing throttled invocation.
|
|
22238
|
-
* jQuery(window).on('popstate', throttled.cancel);
|
|
22239
|
-
*/
|
|
22240
|
-
function throttle(func, wait, options) {
|
|
22241
|
-
var leading = true,
|
|
22242
|
-
trailing = true;
|
|
22243
|
-
|
|
22244
|
-
if (typeof func != 'function') {
|
|
22245
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
22246
|
-
}
|
|
22247
|
-
if (isObject(options)) {
|
|
22248
|
-
leading = 'leading' in options ? !!options.leading : leading;
|
|
22249
|
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
22250
|
-
}
|
|
22251
|
-
return debounce$1(func, wait, {
|
|
22252
|
-
'leading': leading,
|
|
22253
|
-
'maxWait': wait,
|
|
22254
|
-
'trailing': trailing
|
|
22255
|
-
});
|
|
22256
|
-
}
|
|
22257
|
-
|
|
22258
|
-
var listHandle = {
|
|
22259
|
-
debounce: debounce$1,
|
|
22260
|
-
throttle: throttle
|
|
22261
|
-
};
|
|
22262
|
-
var getHandle = function getHandle(type) {
|
|
22263
|
-
return listHandle[type];
|
|
22264
|
-
};
|
|
22265
|
-
var isFunction = function isFunction(fn) {
|
|
22266
|
-
return typeof fn === 'function';
|
|
22267
|
-
};
|
|
22268
|
-
var isSSR = function isSSR() {
|
|
22269
|
-
return typeof window === 'undefined';
|
|
22270
|
-
};
|
|
22271
|
-
var isDOMElement = function isDOMElement(element) {
|
|
22272
|
-
return element instanceof Element || element instanceof HTMLDocument;
|
|
22273
|
-
};
|
|
22274
|
-
|
|
22275
|
-
function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
|
|
22276
|
-
|
|
22277
|
-
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
22278
|
-
|
|
22279
|
-
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
22280
|
-
|
|
22281
|
-
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
22282
|
-
|
|
22283
|
-
function _inherits$1(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$2(subClass, superClass); }
|
|
22284
|
-
|
|
22285
|
-
function _setPrototypeOf$2(o, p) { _setPrototypeOf$2 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$2(o, p); }
|
|
22286
|
-
|
|
22287
|
-
function _createSuper$7(Derived) { return function () { var Super = _getPrototypeOf$1(Derived), result; if (_isNativeReflectConstruct$7()) { var NewTarget = _getPrototypeOf$1(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$1(this, result); }; }
|
|
22288
|
-
|
|
22289
|
-
function _possibleConstructorReturn$1(self, call) { if (call && (_typeof$1(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized$2(self); }
|
|
22290
|
-
|
|
22291
|
-
function _assertThisInitialized$2(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22292
|
-
|
|
22293
|
-
function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
22294
|
-
|
|
22295
|
-
function _getPrototypeOf$1(o) { _getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$1(o); }
|
|
22296
|
-
|
|
22297
|
-
var ChildWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
22298
|
-
_inherits$1(ChildWrapper, _PureComponent);
|
|
22299
|
-
|
|
22300
|
-
var _super = _createSuper$7(ChildWrapper);
|
|
22301
|
-
|
|
22302
|
-
function ChildWrapper() {
|
|
22303
|
-
_classCallCheck$1(this, ChildWrapper);
|
|
22304
|
-
|
|
22305
|
-
return _super.apply(this, arguments);
|
|
22306
|
-
}
|
|
22307
|
-
|
|
22308
|
-
_createClass$1(ChildWrapper, [{
|
|
22309
|
-
key: "render",
|
|
22310
|
-
value: function render() {
|
|
22311
|
-
// eslint-disable-next-line react/prop-types
|
|
22312
|
-
return this.props.children;
|
|
22313
|
-
}
|
|
22314
|
-
}]);
|
|
22315
|
-
|
|
22316
|
-
return ChildWrapper;
|
|
22317
|
-
}(PureComponent);
|
|
22318
|
-
|
|
22319
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
22320
|
-
|
|
22321
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
22322
|
-
|
|
22323
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
22324
|
-
|
|
22325
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
22326
|
-
|
|
22327
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$1(subClass, superClass); }
|
|
22328
|
-
|
|
22329
|
-
function _setPrototypeOf$1(o, p) { _setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$1(o, p); }
|
|
22330
|
-
|
|
22331
|
-
function _createSuper$6(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct$6()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
22332
|
-
|
|
22333
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized$1(self); }
|
|
22334
|
-
|
|
22335
|
-
function _assertThisInitialized$1(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22336
|
-
|
|
22337
|
-
function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
22338
|
-
|
|
22339
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22340
|
-
|
|
22341
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
22342
|
-
|
|
22343
|
-
var ResizeDetector = /*#__PURE__*/function (_PureComponent) {
|
|
22344
|
-
_inherits(ResizeDetector, _PureComponent);
|
|
22345
|
-
|
|
22346
|
-
var _super = _createSuper$6(ResizeDetector);
|
|
22347
|
-
|
|
22348
|
-
function ResizeDetector(props) {
|
|
22349
|
-
var _this;
|
|
22350
|
-
|
|
22351
|
-
_classCallCheck(this, ResizeDetector);
|
|
22352
|
-
|
|
22353
|
-
_this = _super.call(this, props);
|
|
22354
|
-
|
|
22355
|
-
_defineProperty(_assertThisInitialized$1(_this), "cancelHandler", function () {
|
|
22356
|
-
if (_this.resizeHandler && _this.resizeHandler.cancel) {
|
|
22357
|
-
// cancel debounced handler
|
|
22358
|
-
_this.resizeHandler.cancel();
|
|
22359
|
-
|
|
22360
|
-
_this.resizeHandler = null;
|
|
22361
|
-
}
|
|
22362
|
-
});
|
|
22363
|
-
|
|
22364
|
-
_defineProperty(_assertThisInitialized$1(_this), "rafClean", function () {
|
|
22365
|
-
if (_this.raf && _this.raf.cancel) {
|
|
22366
|
-
_this.raf.cancel();
|
|
22367
|
-
|
|
22368
|
-
_this.raf = null;
|
|
22369
|
-
}
|
|
22370
|
-
});
|
|
22371
|
-
|
|
22372
|
-
_defineProperty(_assertThisInitialized$1(_this), "toggleObserver", function (type) {
|
|
22373
|
-
var element = _this.getElement();
|
|
22374
|
-
|
|
22375
|
-
if (!element || !_this.resizeObserver[type]) return;
|
|
22376
|
-
|
|
22377
|
-
_this.resizeObserver[type](element);
|
|
22378
|
-
});
|
|
22379
|
-
|
|
22380
|
-
_defineProperty(_assertThisInitialized$1(_this), "getElement", function () {
|
|
22381
|
-
var _this$props = _this.props,
|
|
22382
|
-
querySelector = _this$props.querySelector,
|
|
22383
|
-
targetDomEl = _this$props.targetDomEl;
|
|
22384
|
-
if (isSSR()) return undefined;
|
|
22385
|
-
if (querySelector) return document.querySelector(querySelector);
|
|
22386
|
-
if (targetDomEl && isDOMElement(targetDomEl)) return targetDomEl; // eslint-disable-next-line react/no-find-dom-node
|
|
22387
|
-
|
|
22388
|
-
var currentElement = _this.element && findDOMNode(_this.element);
|
|
22389
|
-
if (!currentElement) return undefined;
|
|
22390
|
-
return currentElement.parentElement;
|
|
22391
|
-
});
|
|
22392
|
-
|
|
22393
|
-
_defineProperty(_assertThisInitialized$1(_this), "createUpdater", function () {
|
|
22394
|
-
_this.rafClean();
|
|
22395
|
-
|
|
22396
|
-
_this.raf = rafSchd(function (_ref) {
|
|
22397
|
-
var width = _ref.width,
|
|
22398
|
-
height = _ref.height;
|
|
22399
|
-
var onResize = _this.props.onResize;
|
|
22400
|
-
|
|
22401
|
-
if (isFunction(onResize)) {
|
|
22402
|
-
onResize(width, height);
|
|
22403
|
-
}
|
|
22404
|
-
|
|
22405
|
-
_this.setState({
|
|
22406
|
-
width: width,
|
|
22407
|
-
height: height
|
|
22408
|
-
});
|
|
22409
|
-
});
|
|
22410
|
-
return _this.raf;
|
|
22411
|
-
});
|
|
22412
|
-
|
|
22413
|
-
_defineProperty(_assertThisInitialized$1(_this), "createResizeHandler", function (entries) {
|
|
22414
|
-
var _this$state = _this.state,
|
|
22415
|
-
widthCurrent = _this$state.width,
|
|
22416
|
-
heightCurrent = _this$state.height;
|
|
22417
|
-
var _this$props2 = _this.props,
|
|
22418
|
-
handleWidth = _this$props2.handleWidth,
|
|
22419
|
-
handleHeight = _this$props2.handleHeight;
|
|
22420
|
-
if (!handleWidth && !handleHeight) return;
|
|
22421
|
-
|
|
22422
|
-
var updater = _this.createUpdater();
|
|
22423
|
-
|
|
22424
|
-
entries.forEach(function (entry) {
|
|
22425
|
-
var _ref2 = entry && entry.contentRect || {},
|
|
22426
|
-
width = _ref2.width,
|
|
22427
|
-
height = _ref2.height;
|
|
22428
|
-
|
|
22429
|
-
var isWidthChanged = handleWidth && widthCurrent !== width;
|
|
22430
|
-
var isHeightChanged = handleHeight && heightCurrent !== height;
|
|
22431
|
-
var isSizeChanged = isWidthChanged || isHeightChanged;
|
|
22432
|
-
var shouldSetSize = !_this.skipOnMount && isSizeChanged && !isSSR();
|
|
22433
|
-
|
|
22434
|
-
if (shouldSetSize) {
|
|
22435
|
-
updater({
|
|
22436
|
-
width: width,
|
|
22437
|
-
height: height
|
|
22438
|
-
});
|
|
22439
|
-
}
|
|
22440
|
-
|
|
22441
|
-
_this.skipOnMount = false;
|
|
22442
|
-
});
|
|
22443
|
-
});
|
|
22444
|
-
|
|
22445
|
-
_defineProperty(_assertThisInitialized$1(_this), "onRef", function (el) {
|
|
22446
|
-
_this.element = el;
|
|
22447
|
-
});
|
|
22448
|
-
|
|
22449
|
-
_defineProperty(_assertThisInitialized$1(_this), "getRenderType", function () {
|
|
22450
|
-
var _this$props3 = _this.props,
|
|
22451
|
-
render = _this$props3.render,
|
|
22452
|
-
children = _this$props3.children;
|
|
22453
|
-
|
|
22454
|
-
if (isFunction(render)) {
|
|
22455
|
-
return 'renderProp';
|
|
22456
|
-
}
|
|
22457
|
-
|
|
22458
|
-
if (isFunction(children)) {
|
|
22459
|
-
return 'childFunction';
|
|
22460
|
-
}
|
|
22461
|
-
|
|
22462
|
-
if (isValidElement(children)) {
|
|
22463
|
-
return 'child';
|
|
22464
|
-
}
|
|
22465
|
-
|
|
22466
|
-
if (Array.isArray(children)) {
|
|
22467
|
-
return 'childArray';
|
|
22468
|
-
}
|
|
22469
|
-
|
|
22470
|
-
return 'parent';
|
|
22471
|
-
});
|
|
22472
|
-
|
|
22473
|
-
_defineProperty(_assertThisInitialized$1(_this), "getTargetComponent", function () {
|
|
22474
|
-
var _this$props4 = _this.props,
|
|
22475
|
-
render = _this$props4.render,
|
|
22476
|
-
children = _this$props4.children,
|
|
22477
|
-
nodeType = _this$props4.nodeType;
|
|
22478
|
-
var _this$state2 = _this.state,
|
|
22479
|
-
width = _this$state2.width,
|
|
22480
|
-
height = _this$state2.height;
|
|
22481
|
-
var childProps = {
|
|
22482
|
-
width: width,
|
|
22483
|
-
height: height
|
|
22484
|
-
};
|
|
22485
|
-
|
|
22486
|
-
var renderType = _this.getRenderType();
|
|
22487
|
-
|
|
22488
|
-
switch (renderType) {
|
|
22489
|
-
case 'renderProp':
|
|
22490
|
-
return cloneElement(render(childProps), {
|
|
22491
|
-
key: 'resize-detector'
|
|
22492
|
-
});
|
|
22493
|
-
|
|
22494
|
-
case 'childFunction':
|
|
22495
|
-
return cloneElement(children(childProps));
|
|
22496
|
-
|
|
22497
|
-
case 'child':
|
|
22498
|
-
return cloneElement(children, childProps);
|
|
22499
|
-
|
|
22500
|
-
case 'childArray':
|
|
22501
|
-
return children.map(function (el) {
|
|
22502
|
-
return !!el && cloneElement(el, childProps);
|
|
22503
|
-
});
|
|
22504
|
-
|
|
22505
|
-
default:
|
|
22506
|
-
return createElement(nodeType);
|
|
22507
|
-
}
|
|
22508
|
-
});
|
|
22509
|
-
|
|
22510
|
-
var skipOnMount = props.skipOnMount,
|
|
22511
|
-
refreshMode = props.refreshMode,
|
|
22512
|
-
refreshRate = props.refreshRate,
|
|
22513
|
-
refreshOptions = props.refreshOptions;
|
|
22514
|
-
_this.state = {
|
|
22515
|
-
width: undefined,
|
|
22516
|
-
height: undefined
|
|
22517
|
-
};
|
|
22518
|
-
_this.skipOnMount = skipOnMount;
|
|
22519
|
-
_this.raf = null;
|
|
22520
|
-
_this.element = null;
|
|
22521
|
-
_this.unmounted = false;
|
|
22522
|
-
var handle = getHandle(refreshMode);
|
|
22523
|
-
_this.resizeHandler = handle ? handle(_this.createResizeHandler, refreshRate, refreshOptions) : _this.createResizeHandler;
|
|
22524
|
-
_this.resizeObserver = new index(_this.resizeHandler);
|
|
22525
|
-
return _this;
|
|
22526
|
-
}
|
|
22527
|
-
|
|
22528
|
-
_createClass(ResizeDetector, [{
|
|
22529
|
-
key: "componentDidMount",
|
|
22530
|
-
value: function componentDidMount() {
|
|
22531
|
-
this.toggleObserver('observe');
|
|
22532
|
-
}
|
|
22533
|
-
}, {
|
|
22534
|
-
key: "componentWillUnmount",
|
|
22535
|
-
value: function componentWillUnmount() {
|
|
22536
|
-
this.toggleObserver('unobserve');
|
|
22537
|
-
this.rafClean();
|
|
22538
|
-
this.cancelHandler();
|
|
22539
|
-
this.unmounted = true;
|
|
22540
|
-
}
|
|
22541
|
-
}, {
|
|
22542
|
-
key: "render",
|
|
22543
|
-
value: function render() {
|
|
22544
|
-
return /*#__PURE__*/React__default.createElement(ChildWrapper, {
|
|
22545
|
-
ref: this.onRef
|
|
22546
|
-
}, this.getTargetComponent());
|
|
22547
|
-
}
|
|
22548
|
-
}]);
|
|
22549
|
-
|
|
22550
|
-
return ResizeDetector;
|
|
22551
|
-
}(PureComponent);
|
|
22552
|
-
|
|
22553
|
-
ResizeDetector.propTypes = {
|
|
22554
|
-
handleWidth: bool,
|
|
22555
|
-
handleHeight: bool,
|
|
22556
|
-
skipOnMount: bool,
|
|
22557
|
-
refreshRate: number$1,
|
|
22558
|
-
refreshMode: string,
|
|
22559
|
-
refreshOptions: shape({
|
|
22560
|
-
leading: bool,
|
|
22561
|
-
trailing: bool
|
|
22562
|
-
}),
|
|
22563
|
-
querySelector: string,
|
|
22564
|
-
targetDomEl: any,
|
|
22565
|
-
// eslint-disable-line react/forbid-prop-types
|
|
22566
|
-
onResize: func,
|
|
22567
|
-
render: func,
|
|
22568
|
-
children: any,
|
|
22569
|
-
// eslint-disable-line react/forbid-prop-types
|
|
22570
|
-
nodeType: node
|
|
22571
|
-
};
|
|
22572
|
-
ResizeDetector.defaultProps = {
|
|
22573
|
-
handleWidth: false,
|
|
22574
|
-
handleHeight: false,
|
|
22575
|
-
skipOnMount: false,
|
|
22576
|
-
refreshRate: 1000,
|
|
22577
|
-
refreshMode: undefined,
|
|
22578
|
-
refreshOptions: undefined,
|
|
22579
|
-
querySelector: null,
|
|
22580
|
-
targetDomEl: null,
|
|
22581
|
-
onResize: null,
|
|
22582
|
-
render: undefined,
|
|
22583
|
-
children: null,
|
|
22584
|
-
nodeType: 'div'
|
|
22585
|
-
};
|
|
22586
|
-
|
|
22587
20754
|
var _excluded = ["name", "onSubmit"];
|
|
22588
20755
|
|
|
22589
20756
|
var BaseNavBarSearch = function BaseNavBarSearch(_ref) {
|
|
@@ -22683,9 +20850,9 @@ var StatelessNavBarDropdownMenu$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
22683
20850
|
var _this;
|
|
22684
20851
|
|
|
22685
20852
|
_this = _React$Component.call(this, props) || this;
|
|
22686
|
-
_this.handleOutsideClick = _this.handleOutsideClick.bind(_assertThisInitialized$
|
|
22687
|
-
_this.setMenuRef = _this.setMenuRef.bind(_assertThisInitialized$
|
|
22688
|
-
_this.setTriggerRef = _this.setTriggerRef.bind(_assertThisInitialized$
|
|
20853
|
+
_this.handleOutsideClick = _this.handleOutsideClick.bind(_assertThisInitialized$2(_this));
|
|
20854
|
+
_this.setMenuRef = _this.setMenuRef.bind(_assertThisInitialized$2(_this));
|
|
20855
|
+
_this.setTriggerRef = _this.setTriggerRef.bind(_assertThisInitialized$2(_this));
|
|
22689
20856
|
return _this;
|
|
22690
20857
|
}
|
|
22691
20858
|
|
|
@@ -24032,7 +22199,7 @@ var SelectNavBarBasedOnWidth$1 = function SelectNavBarBasedOnWidth(_a) {
|
|
|
24032
22199
|
};
|
|
24033
22200
|
|
|
24034
22201
|
var NavBar$1 = function NavBar(props) {
|
|
24035
|
-
return /*#__PURE__*/React__default.createElement(
|
|
22202
|
+
return /*#__PURE__*/React__default.createElement(ReactResizeDetector, {
|
|
24036
22203
|
handleWidth: true
|
|
24037
22204
|
}, /*#__PURE__*/React__default.createElement(SelectNavBarBasedOnWidth$1, Object.assign({}, props)));
|
|
24038
22205
|
};
|
|
@@ -27696,12 +25863,12 @@ var TabScrollIndicators = /*#__PURE__*/function (_React$Component) {
|
|
|
27696
25863
|
contentHiddenLeft: _this.contentHiddenLeft(),
|
|
27697
25864
|
contentHiddenRight: _this.contentHiddenRight()
|
|
27698
25865
|
};
|
|
27699
|
-
_this.handleIndicatorClick = _this.handleIndicatorClick.bind(_assertThisInitialized$
|
|
27700
|
-
_this.getScrollLeftValueByTabIndex = _this.getScrollLeftValueByTabIndex.bind(_assertThisInitialized$
|
|
27701
|
-
_this.contentHiddenLeft = _this.contentHiddenLeft.bind(_assertThisInitialized$
|
|
27702
|
-
_this.contentHiddenRight = _this.contentHiddenRight.bind(_assertThisInitialized$
|
|
27703
|
-
_this.handleScroll = _this.handleScroll.bind(_assertThisInitialized$
|
|
27704
|
-
_this.handleResize = _this.handleResize.bind(_assertThisInitialized$
|
|
25866
|
+
_this.handleIndicatorClick = _this.handleIndicatorClick.bind(_assertThisInitialized$2(_this));
|
|
25867
|
+
_this.getScrollLeftValueByTabIndex = _this.getScrollLeftValueByTabIndex.bind(_assertThisInitialized$2(_this));
|
|
25868
|
+
_this.contentHiddenLeft = _this.contentHiddenLeft.bind(_assertThisInitialized$2(_this));
|
|
25869
|
+
_this.contentHiddenRight = _this.contentHiddenRight.bind(_assertThisInitialized$2(_this));
|
|
25870
|
+
_this.handleScroll = _this.handleScroll.bind(_assertThisInitialized$2(_this));
|
|
25871
|
+
_this.handleResize = _this.handleResize.bind(_assertThisInitialized$2(_this));
|
|
27705
25872
|
return _this;
|
|
27706
25873
|
}
|
|
27707
25874
|
|
|
@@ -27896,8 +26063,8 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
27896
26063
|
_this.tabContent = [];
|
|
27897
26064
|
_this.tabContainerRef = /*#__PURE__*/React__default.createRef();
|
|
27898
26065
|
_this.tabRefs = [];
|
|
27899
|
-
_this.handleTabClick = _this.handleTabClick.bind(_assertThisInitialized$
|
|
27900
|
-
_this.getTabs = _this.getTabs.bind(_assertThisInitialized$
|
|
26066
|
+
_this.handleTabClick = _this.handleTabClick.bind(_assertThisInitialized$2(_this));
|
|
26067
|
+
_this.getTabs = _this.getTabs.bind(_assertThisInitialized$2(_this));
|
|
27901
26068
|
return _this;
|
|
27902
26069
|
}
|
|
27903
26070
|
|
|
@@ -28006,7 +26173,7 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
28006
26173
|
role: "tablist",
|
|
28007
26174
|
onScroll: handleScroll,
|
|
28008
26175
|
ref: _this3.tabContainerRef
|
|
28009
|
-
}, spaceProps), /*#__PURE__*/React__default.createElement(
|
|
26176
|
+
}, spaceProps), /*#__PURE__*/React__default.createElement(ReactResizeDetector, {
|
|
28010
26177
|
handleWidth: true,
|
|
28011
26178
|
onResize: handleResize
|
|
28012
26179
|
}), _this3.getTabs(setFocusedIndex, focusedIndex, handleArrowNavigation));
|
|
@@ -44407,9 +42574,9 @@ var StatelessNavBarDropdownMenu = /*#__PURE__*/function (_StatelessNavBarDropd)
|
|
|
44407
42574
|
var _this;
|
|
44408
42575
|
|
|
44409
42576
|
_this = _StatelessNavBarDropd.call(this, props) || this;
|
|
44410
|
-
_this.handleOutsideClick = _this.handleOutsideClick.bind(_assertThisInitialized$
|
|
44411
|
-
_this.setMenuRef = _this.setMenuRef.bind(_assertThisInitialized$
|
|
44412
|
-
_this.setTriggerRef = _this.setTriggerRef.bind(_assertThisInitialized$
|
|
42577
|
+
_this.handleOutsideClick = _this.handleOutsideClick.bind(_assertThisInitialized$2(_this));
|
|
42578
|
+
_this.setMenuRef = _this.setMenuRef.bind(_assertThisInitialized$2(_this));
|
|
42579
|
+
_this.setTriggerRef = _this.setTriggerRef.bind(_assertThisInitialized$2(_this));
|
|
44413
42580
|
return _this;
|
|
44414
42581
|
}
|
|
44415
42582
|
|
|
@@ -44997,16 +43164,17 @@ var renderMenuItem = function renderMenuItem(menuItem, themeColorObject, layer)
|
|
|
44997
43164
|
return getRenderFunction$1(menuItem)(menuItem, themeColorObject, layer);
|
|
44998
43165
|
};
|
|
44999
43166
|
|
|
45000
|
-
var BaseDesktopMenu = function
|
|
43167
|
+
var BaseDesktopMenu = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
|
|
45001
43168
|
var menuData = _a.menuData,
|
|
45002
43169
|
themeColorObject = _a.themeColorObject,
|
|
45003
43170
|
props = __rest(_a, ["menuData", "themeColorObject"]);
|
|
45004
43171
|
|
|
45005
|
-
return /*#__PURE__*/React__default.createElement(Nav$1, Object.assign({}, props
|
|
43172
|
+
return /*#__PURE__*/React__default.createElement(Nav$1, Object.assign({}, props, {
|
|
43173
|
+
ref: ref
|
|
43174
|
+
}), menuData.map(function (menuItem) {
|
|
45006
43175
|
return renderMenuItem(menuItem, themeColorObject, 0);
|
|
45007
43176
|
}));
|
|
45008
|
-
};
|
|
45009
|
-
|
|
43177
|
+
});
|
|
45010
43178
|
var DesktopMenu = styled(BaseDesktopMenu).withConfig({
|
|
45011
43179
|
displayName: "DesktopMenu",
|
|
45012
43180
|
componentId: "sc-8mrjkc-3"
|
|
@@ -45072,6 +43240,83 @@ var NulogyLogo = function NulogyLogo() {
|
|
|
45072
43240
|
};
|
|
45073
43241
|
|
|
45074
43242
|
var borderStyle$1 = "1px solid #e4e7eb";
|
|
43243
|
+
var NulogyLogoContainer = function NulogyLogoContainer(_ref) {
|
|
43244
|
+
var subText = _ref.subText,
|
|
43245
|
+
height = _ref.height;
|
|
43246
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
43247
|
+
px: "x1",
|
|
43248
|
+
py: "half",
|
|
43249
|
+
alignItems: "center",
|
|
43250
|
+
// boxShadow="small"
|
|
43251
|
+
justifyContent: "center",
|
|
43252
|
+
flexDirection: subText ? "column" : "row",
|
|
43253
|
+
height: height,
|
|
43254
|
+
borderLeft: borderStyle$1,
|
|
43255
|
+
borderRight: borderStyle$1
|
|
43256
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
43257
|
+
width: "76px",
|
|
43258
|
+
height: "18px"
|
|
43259
|
+
}, /*#__PURE__*/React__default.createElement(NulogyLogo, null)), subText && /*#__PURE__*/React__default.createElement(Text, {
|
|
43260
|
+
fontSize: "8px",
|
|
43261
|
+
lineHeight: "10px",
|
|
43262
|
+
color: "darkGrey",
|
|
43263
|
+
fontWeight: "medium",
|
|
43264
|
+
textTransform: "uppercase",
|
|
43265
|
+
letterSpacing: ".5px"
|
|
43266
|
+
}, subText));
|
|
43267
|
+
};
|
|
43268
|
+
|
|
43269
|
+
var EnvironmentBanner = function EnvironmentBanner(_ref) {
|
|
43270
|
+
var children = _ref.children;
|
|
43271
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
43272
|
+
bg: "darkBlue",
|
|
43273
|
+
textAlign: "center"
|
|
43274
|
+
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
43275
|
+
fontSize: "10px",
|
|
43276
|
+
letterSpacing: "0.5px",
|
|
43277
|
+
fontWeight: "bold",
|
|
43278
|
+
color: "white",
|
|
43279
|
+
textTransform: "uppercase",
|
|
43280
|
+
py: "2px"
|
|
43281
|
+
}, children));
|
|
43282
|
+
};
|
|
43283
|
+
|
|
43284
|
+
var MAX_LOGO_WIDTH = "184px";
|
|
43285
|
+
var MAX_LOGO_HEIGHT = "36px";
|
|
43286
|
+
|
|
43287
|
+
var BrandLogoContainer = function BrandLogoContainer(_ref) {
|
|
43288
|
+
var logoSrc = _ref.logoSrc,
|
|
43289
|
+
brandingLinkHref = _ref.brandingLinkHref,
|
|
43290
|
+
brandingLinkTo = _ref.brandingLinkTo,
|
|
43291
|
+
brandingLinkComponent = _ref.brandingLinkComponent,
|
|
43292
|
+
subtext = _ref.subtext;
|
|
43293
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
43294
|
+
maxWidth: MAX_LOGO_WIDTH,
|
|
43295
|
+
maxHeight: MAX_LOGO_HEIGHT
|
|
43296
|
+
}, /*#__PURE__*/React__default.createElement(Link, {
|
|
43297
|
+
"aria-label": "Home",
|
|
43298
|
+
href: brandingLinkHref,
|
|
43299
|
+
to: brandingLinkTo,
|
|
43300
|
+
as: brandingLinkComponent,
|
|
43301
|
+
underline: false,
|
|
43302
|
+
style: {
|
|
43303
|
+
display: "block"
|
|
43304
|
+
}
|
|
43305
|
+
}, logoSrc && /*#__PURE__*/React__default.createElement("img", {
|
|
43306
|
+
src: logoSrc,
|
|
43307
|
+
style: {
|
|
43308
|
+
maxWidth: MAX_LOGO_WIDTH,
|
|
43309
|
+
maxHeight: MAX_LOGO_HEIGHT
|
|
43310
|
+
},
|
|
43311
|
+
alt: ""
|
|
43312
|
+
}), !logoSrc && /*#__PURE__*/React__default.createElement(Branding, {
|
|
43313
|
+
size: subtext ? "small" : "medium",
|
|
43314
|
+
logoColor: "blue",
|
|
43315
|
+
subtext: subtext
|
|
43316
|
+
})));
|
|
43317
|
+
};
|
|
43318
|
+
|
|
43319
|
+
var borderStyle = "1px solid #e4e7eb";
|
|
45075
43320
|
var BrandingWrap = styled.div.withConfig({
|
|
45076
43321
|
displayName: "MobileMenu__BrandingWrap",
|
|
45077
43322
|
componentId: "sc-18t6zrc-0"
|
|
@@ -45298,7 +43543,7 @@ var BaseMobileMenu = function BaseMobileMenu(_a) {
|
|
|
45298
43543
|
logoColor: themeColorObject && themeColorObject.logoColor
|
|
45299
43544
|
})), /*#__PURE__*/React__default.createElement(Menu$1, null, menuData.primaryMenu && renderTopLayerMenuItems(menuData.primaryMenu, closeMenu, themeColorObject), menuData.secondaryMenu && renderTopLayerMenuItems(menuData.secondaryMenu, closeMenu, themeColorObject)), logoSrc && /*#__PURE__*/React__default.createElement(Flex, {
|
|
45300
43545
|
textAlign: "center",
|
|
45301
|
-
borderTop: borderStyle
|
|
43546
|
+
borderTop: borderStyle,
|
|
45302
43547
|
height: "40px",
|
|
45303
43548
|
alignItems: "center",
|
|
45304
43549
|
justifyContent: "center"
|
|
@@ -45317,163 +43562,28 @@ var MobileMenu = styled(BaseMobileMenu).withConfig({
|
|
|
45317
43562
|
componentId: "sc-18t6zrc-6"
|
|
45318
43563
|
})(display);
|
|
45319
43564
|
|
|
45320
|
-
var borderStyle = "1px solid #e4e7eb";
|
|
45321
|
-
var NulogyLogoContainer = function NulogyLogoContainer(_ref) {
|
|
45322
|
-
var subText = _ref.subText,
|
|
45323
|
-
height = _ref.height;
|
|
45324
|
-
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
45325
|
-
px: "x1",
|
|
45326
|
-
py: "half",
|
|
45327
|
-
alignItems: "center",
|
|
45328
|
-
// boxShadow="small"
|
|
45329
|
-
justifyContent: "center",
|
|
45330
|
-
flexDirection: subText ? "column" : "row",
|
|
45331
|
-
height: height,
|
|
45332
|
-
borderLeft: borderStyle,
|
|
45333
|
-
borderRight: borderStyle
|
|
45334
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
45335
|
-
width: "76px",
|
|
45336
|
-
height: "18px"
|
|
45337
|
-
}, /*#__PURE__*/React__default.createElement(NulogyLogo, null)), subText && /*#__PURE__*/React__default.createElement(Text, {
|
|
45338
|
-
fontSize: "8px",
|
|
45339
|
-
lineHeight: "10px",
|
|
45340
|
-
color: "darkGrey",
|
|
45341
|
-
fontWeight: "medium",
|
|
45342
|
-
textTransform: "uppercase",
|
|
45343
|
-
letterSpacing: ".5px"
|
|
45344
|
-
}, subText));
|
|
45345
|
-
};
|
|
45346
|
-
|
|
45347
|
-
var EnvironmentBanner = function EnvironmentBanner(_ref) {
|
|
45348
|
-
var children = _ref.children;
|
|
45349
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
45350
|
-
bg: "darkBlue",
|
|
45351
|
-
textAlign: "center"
|
|
45352
|
-
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
45353
|
-
fontSize: "10px",
|
|
45354
|
-
letterSpacing: "0.5px",
|
|
45355
|
-
fontWeight: "bold",
|
|
45356
|
-
color: "white",
|
|
45357
|
-
textTransform: "uppercase",
|
|
45358
|
-
py: "2px"
|
|
45359
|
-
}, children));
|
|
45360
|
-
};
|
|
45361
|
-
|
|
45362
|
-
var MAX_LOGO_WIDTH = "184px";
|
|
45363
|
-
var MAX_LOGO_HEIGHT = "36px";
|
|
45364
|
-
var NAVBAR_HEIGHT = "56px";
|
|
45365
|
-
var themeColorObject = {
|
|
45366
|
-
color: "darkBlue",
|
|
45367
|
-
hoverColor: "blackBlue",
|
|
45368
|
-
background: "white",
|
|
45369
|
-
hoverBackground: "whiteGrey",
|
|
45370
|
-
textColor: "blackBlue",
|
|
45371
|
-
logoColor: "blue"
|
|
45372
|
-
};
|
|
45373
43565
|
var NavBarBackground = styled(Flex).withConfig({
|
|
45374
|
-
displayName: "
|
|
45375
|
-
componentId: "
|
|
43566
|
+
displayName: "NavBarBackground",
|
|
43567
|
+
componentId: "sc-1g75y9j-0"
|
|
45376
43568
|
})(function (_ref) {
|
|
45377
|
-
var
|
|
45378
|
-
theme = _ref.theme;
|
|
43569
|
+
var theme = _ref.theme;
|
|
45379
43570
|
return {
|
|
45380
|
-
background: backgroundColor,
|
|
45381
43571
|
padding: "0 " + theme.space.x3,
|
|
45382
43572
|
borderBottom: "1px solid " + theme.colors.lightGrey,
|
|
45383
43573
|
alignItems: "center",
|
|
45384
|
-
height: NAVBAR_HEIGHT,
|
|
45385
43574
|
zIndex: theme.zIndices.navBar,
|
|
45386
43575
|
position: "relative"
|
|
45387
43576
|
};
|
|
45388
|
-
});
|
|
45389
|
-
|
|
45390
|
-
var BrandLogoContainer = function BrandLogoContainer(_ref2) {
|
|
45391
|
-
var logoSrc = _ref2.logoSrc,
|
|
45392
|
-
brandingLinkHref = _ref2.brandingLinkHref,
|
|
45393
|
-
brandingLinkTo = _ref2.brandingLinkTo,
|
|
45394
|
-
brandingLinkComponent = _ref2.brandingLinkComponent,
|
|
45395
|
-
subtext = _ref2.subtext;
|
|
45396
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
45397
|
-
maxWidth: MAX_LOGO_WIDTH,
|
|
45398
|
-
maxHeight: MAX_LOGO_HEIGHT
|
|
45399
|
-
}, /*#__PURE__*/React__default.createElement(Link, {
|
|
45400
|
-
"aria-label": "Home",
|
|
45401
|
-
href: brandingLinkHref,
|
|
45402
|
-
to: brandingLinkTo,
|
|
45403
|
-
as: brandingLinkComponent,
|
|
45404
|
-
underline: false,
|
|
45405
|
-
style: {
|
|
45406
|
-
display: "block"
|
|
45407
|
-
}
|
|
45408
|
-
}, logoSrc && /*#__PURE__*/React__default.createElement("img", {
|
|
45409
|
-
src: logoSrc,
|
|
45410
|
-
style: {
|
|
45411
|
-
maxWidth: MAX_LOGO_WIDTH,
|
|
45412
|
-
maxHeight: MAX_LOGO_HEIGHT
|
|
45413
|
-
},
|
|
45414
|
-
alt: ""
|
|
45415
|
-
}), !logoSrc && /*#__PURE__*/React__default.createElement(Branding, {
|
|
45416
|
-
size: subtext ? "small" : "medium",
|
|
45417
|
-
logoColor: "blue",
|
|
45418
|
-
subtext: subtext
|
|
45419
|
-
})));
|
|
45420
|
-
};
|
|
45421
|
-
|
|
45422
|
-
var MediumNavBar = function MediumNavBar(_a) {
|
|
45423
|
-
var menuData = _a.menuData,
|
|
45424
|
-
subtext = _a.subtext,
|
|
45425
|
-
environment = _a.environment,
|
|
45426
|
-
logoSrc = _a.logoSrc,
|
|
45427
|
-
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
45428
|
-
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
45429
|
-
brandingLinkTo = _a.brandingLinkTo,
|
|
45430
|
-
brandingLinkComponent = _a.brandingLinkComponent,
|
|
45431
|
-
props = __rest(_a, ["menuData", "subtext", "environment", "logoSrc", "brandingLinkHref", "brandingLinkTo", "brandingLinkComponent"]);
|
|
45432
|
-
|
|
45433
|
-
var _useTranslation = useTranslation(),
|
|
45434
|
-
t = _useTranslation.t;
|
|
45435
|
-
|
|
45436
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, environment && /*#__PURE__*/React__default.createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default.createElement("header", Object.assign({}, props), /*#__PURE__*/React__default.createElement(NavBarBackground, {
|
|
45437
|
-
backgroundColor: "white"
|
|
45438
|
-
}, /*#__PURE__*/React__default.createElement(BrandLogoContainer, {
|
|
45439
|
-
logoSrc: logoSrc,
|
|
45440
|
-
brandingLinkHref: brandingLinkHref,
|
|
45441
|
-
brandingLinkTo: brandingLinkTo,
|
|
45442
|
-
brandingLinkComponent: brandingLinkComponent,
|
|
45443
|
-
subtext: subtext
|
|
45444
|
-
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
45445
|
-
justifyContent: "space-between",
|
|
45446
|
-
alignContent: "flex-end",
|
|
45447
|
-
flexGrow: 1,
|
|
45448
|
-
ml: "x3",
|
|
45449
|
-
alignItems: "center"
|
|
45450
|
-
}, menuData.primaryMenu && /*#__PURE__*/React__default.createElement(DesktopMenu, {
|
|
45451
|
-
themeColorObject: themeColorObject,
|
|
45452
|
-
"aria-label": t("primary navigation"),
|
|
45453
|
-
menuData: menuData.primaryMenu
|
|
45454
|
-
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
45455
|
-
justifySelf: "flex-end",
|
|
45456
|
-
alignItems: "center"
|
|
45457
|
-
}, menuData.secondaryMenu && /*#__PURE__*/React__default.createElement(DesktopMenu, {
|
|
45458
|
-
themeColorObject: themeColorObject,
|
|
45459
|
-
"aria-label": t("secondary navigation"),
|
|
45460
|
-
menuData: menuData.secondaryMenu
|
|
45461
|
-
}), logoSrc && /*#__PURE__*/React__default.createElement(Box, {
|
|
45462
|
-
pl: "x3"
|
|
45463
|
-
}, /*#__PURE__*/React__default.createElement(NulogyLogoContainer, {
|
|
45464
|
-
height: NAVBAR_HEIGHT,
|
|
45465
|
-
subText: subtext
|
|
45466
|
-
})))))));
|
|
45467
|
-
};
|
|
43577
|
+
}, addStyledProps);
|
|
45468
43578
|
|
|
45469
43579
|
var MobileMenuTrigger = styled.button.withConfig({
|
|
45470
|
-
displayName: "
|
|
45471
|
-
componentId: "
|
|
45472
|
-
})(function (
|
|
45473
|
-
var color =
|
|
45474
|
-
hoverColor =
|
|
45475
|
-
hoverBackground =
|
|
45476
|
-
theme =
|
|
43580
|
+
displayName: "SmallNavBar__MobileMenuTrigger",
|
|
43581
|
+
componentId: "ykabay-0"
|
|
43582
|
+
})(function (_ref) {
|
|
43583
|
+
var color = _ref.color,
|
|
43584
|
+
hoverColor = _ref.hoverColor,
|
|
43585
|
+
hoverBackground = _ref.hoverBackground,
|
|
43586
|
+
theme = _ref.theme;
|
|
45477
43587
|
return {
|
|
45478
43588
|
color: theme.colors[color] || color,
|
|
45479
43589
|
background: "none",
|
|
@@ -45495,11 +43605,11 @@ var MobileMenuTrigger = styled.button.withConfig({
|
|
|
45495
43605
|
};
|
|
45496
43606
|
});
|
|
45497
43607
|
var SmallHeader = styled.header.withConfig({
|
|
45498
|
-
displayName: "
|
|
45499
|
-
componentId: "
|
|
45500
|
-
})(function (
|
|
45501
|
-
var isOpen =
|
|
45502
|
-
theme =
|
|
43608
|
+
displayName: "SmallNavBar__SmallHeader",
|
|
43609
|
+
componentId: "ykabay-1"
|
|
43610
|
+
})(function (_ref2) {
|
|
43611
|
+
var isOpen = _ref2.isOpen,
|
|
43612
|
+
theme = _ref2.theme;
|
|
45503
43613
|
return isOpen ? {
|
|
45504
43614
|
position: "fixed",
|
|
45505
43615
|
width: "100%",
|
|
@@ -45514,15 +43624,11 @@ var SmallHeader = styled.header.withConfig({
|
|
|
45514
43624
|
} : null;
|
|
45515
43625
|
});
|
|
45516
43626
|
|
|
45517
|
-
var
|
|
45518
|
-
|
|
45519
|
-
};
|
|
45520
|
-
|
|
45521
|
-
var MenuIcon = function MenuIcon(_ref5) {
|
|
45522
|
-
var isOpen = _ref5.isOpen;
|
|
43627
|
+
var MenuIcon = function MenuIcon(_ref3) {
|
|
43628
|
+
var isOpen = _ref3.isOpen;
|
|
45523
43629
|
|
|
45524
|
-
var
|
|
45525
|
-
t =
|
|
43630
|
+
var _useTranslation = useTranslation(),
|
|
43631
|
+
t = _useTranslation.t;
|
|
45526
43632
|
|
|
45527
43633
|
var icon = isOpen ? "close" : "menu";
|
|
45528
43634
|
var title = isOpen ? t("close menu") : t("open menu");
|
|
@@ -45541,14 +43647,16 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
45541
43647
|
toggleMenu = _a$menuState.toggleMenu,
|
|
45542
43648
|
closeMenu = _a$menuState.closeMenu,
|
|
45543
43649
|
subtext = _a.subtext,
|
|
45544
|
-
_a$
|
|
45545
|
-
brandingLinkHref = _a$
|
|
43650
|
+
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43651
|
+
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
45546
43652
|
brandingLinkTo = _a.brandingLinkTo,
|
|
45547
43653
|
environment = _a.environment,
|
|
45548
43654
|
logoSrc = _a.logoSrc,
|
|
45549
43655
|
_a$breakpointLower = _a.breakpointLower,
|
|
45550
43656
|
breakpointLower = _a$breakpointLower === void 0 ? "small" : _a$breakpointLower,
|
|
45551
|
-
|
|
43657
|
+
themeColorObject = _a.themeColorObject,
|
|
43658
|
+
navBarHeight = _a.navBarHeight,
|
|
43659
|
+
props = __rest(_a, ["menuData", "menuState", "subtext", "brandingLinkHref", "brandingLinkTo", "environment", "logoSrc", "breakpointLower", "themeColorObject", "navBarHeight"]);
|
|
45552
43660
|
|
|
45553
43661
|
var navRef = React__default.useRef(null);
|
|
45554
43662
|
useEffect(function () {
|
|
@@ -45565,7 +43673,8 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
45565
43673
|
isOpen: isOpen,
|
|
45566
43674
|
breakpointLower: breakpoints ? breakpoints[breakpointLower] : breakpointLower
|
|
45567
43675
|
}, props), environment && /*#__PURE__*/React__default.createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default.createElement(NavBarBackground, {
|
|
45568
|
-
backgroundColor: "white"
|
|
43676
|
+
backgroundColor: "white",
|
|
43677
|
+
height: navBarHeight
|
|
45569
43678
|
}, /*#__PURE__*/React__default.createElement(BrandLogoContainer, {
|
|
45570
43679
|
logoSrc: logoSrc,
|
|
45571
43680
|
brandingLinkHref: brandingLinkHref,
|
|
@@ -45597,6 +43706,68 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
45597
43706
|
|
|
45598
43707
|
var SmallNavBar = withMenuState(SmallNavBarNoState);
|
|
45599
43708
|
|
|
43709
|
+
var NAVBAR_HEIGHT = "56px";
|
|
43710
|
+
var themeColorObject = {
|
|
43711
|
+
color: "darkBlue",
|
|
43712
|
+
hoverColor: "blackBlue",
|
|
43713
|
+
background: "white",
|
|
43714
|
+
hoverBackground: "whiteGrey",
|
|
43715
|
+
textColor: "blackBlue",
|
|
43716
|
+
logoColor: "blue"
|
|
43717
|
+
};
|
|
43718
|
+
|
|
43719
|
+
var MediumNavBar = function MediumNavBar(_a) {
|
|
43720
|
+
var menuData = _a.menuData,
|
|
43721
|
+
subtext = _a.subtext,
|
|
43722
|
+
environment = _a.environment,
|
|
43723
|
+
logoSrc = _a.logoSrc,
|
|
43724
|
+
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43725
|
+
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
43726
|
+
brandingLinkTo = _a.brandingLinkTo,
|
|
43727
|
+
brandingLinkComponent = _a.brandingLinkComponent,
|
|
43728
|
+
props = __rest(_a, ["menuData", "subtext", "environment", "logoSrc", "brandingLinkHref", "brandingLinkTo", "brandingLinkComponent"]);
|
|
43729
|
+
|
|
43730
|
+
var _useTranslation = useTranslation(),
|
|
43731
|
+
t = _useTranslation.t;
|
|
43732
|
+
|
|
43733
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, environment && /*#__PURE__*/React__default.createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default.createElement("header", Object.assign({}, props), /*#__PURE__*/React__default.createElement(NavBarBackground, {
|
|
43734
|
+
backgroundColor: "white",
|
|
43735
|
+
height: NAVBAR_HEIGHT
|
|
43736
|
+
}, /*#__PURE__*/React__default.createElement(BrandLogoContainer, {
|
|
43737
|
+
logoSrc: logoSrc,
|
|
43738
|
+
brandingLinkHref: brandingLinkHref,
|
|
43739
|
+
brandingLinkTo: brandingLinkTo,
|
|
43740
|
+
brandingLinkComponent: brandingLinkComponent,
|
|
43741
|
+
subtext: subtext
|
|
43742
|
+
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
43743
|
+
justifyContent: "space-between",
|
|
43744
|
+
alignContent: "flex-end",
|
|
43745
|
+
flexGrow: 1,
|
|
43746
|
+
ml: "x3",
|
|
43747
|
+
alignItems: "center"
|
|
43748
|
+
}, menuData.primaryMenu && /*#__PURE__*/React__default.createElement(DesktopMenu, {
|
|
43749
|
+
themeColorObject: themeColorObject,
|
|
43750
|
+
"aria-label": t("primary navigation"),
|
|
43751
|
+
menuData: menuData.primaryMenu
|
|
43752
|
+
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
43753
|
+
justifySelf: "flex-end",
|
|
43754
|
+
alignItems: "center"
|
|
43755
|
+
}, menuData.secondaryMenu && /*#__PURE__*/React__default.createElement(DesktopMenu, {
|
|
43756
|
+
themeColorObject: themeColorObject,
|
|
43757
|
+
"aria-label": t("secondary navigation"),
|
|
43758
|
+
menuData: menuData.secondaryMenu
|
|
43759
|
+
}), logoSrc && /*#__PURE__*/React__default.createElement(Box, {
|
|
43760
|
+
pl: "x3"
|
|
43761
|
+
}, /*#__PURE__*/React__default.createElement(NulogyLogoContainer, {
|
|
43762
|
+
height: NAVBAR_HEIGHT,
|
|
43763
|
+
subText: subtext
|
|
43764
|
+
})))))));
|
|
43765
|
+
};
|
|
43766
|
+
|
|
43767
|
+
var pixelDigitsFrom = function pixelDigitsFrom(pixelString) {
|
|
43768
|
+
return parseInt(pixelString, 10);
|
|
43769
|
+
};
|
|
43770
|
+
|
|
45600
43771
|
var SelectNavBarBasedOnWidth = function SelectNavBarBasedOnWidth(_a) {
|
|
45601
43772
|
var width = _a.width,
|
|
45602
43773
|
defaultOpen = _a.defaultOpen,
|
|
@@ -45610,7 +43781,9 @@ var SelectNavBarBasedOnWidth = function SelectNavBarBasedOnWidth(_a) {
|
|
|
45610
43781
|
} else {
|
|
45611
43782
|
return /*#__PURE__*/React__default.createElement(SmallNavBar, Object.assign({}, props, {
|
|
45612
43783
|
width: currentWidth,
|
|
45613
|
-
defaultOpen: defaultOpen
|
|
43784
|
+
defaultOpen: defaultOpen,
|
|
43785
|
+
themeColorObject: themeColorObject,
|
|
43786
|
+
navBarHeight: NAVBAR_HEIGHT
|
|
45614
43787
|
}));
|
|
45615
43788
|
}
|
|
45616
43789
|
};
|
|
@@ -45621,10 +43794,10 @@ var BaseNavBar = function BaseNavBar(_a) {
|
|
|
45621
43794
|
breakpointUpper = _a$breakpointUpper === void 0 ? "medium" : _a$breakpointUpper,
|
|
45622
43795
|
props = __rest(_a, ["environment", "breakpointUpper"]);
|
|
45623
43796
|
|
|
45624
|
-
var
|
|
45625
|
-
breakpoints =
|
|
43797
|
+
var _useTheme = useTheme(),
|
|
43798
|
+
breakpoints = _useTheme.breakpoints;
|
|
45626
43799
|
|
|
45627
|
-
return /*#__PURE__*/React__default.createElement(
|
|
43800
|
+
return /*#__PURE__*/React__default.createElement(ReactResizeDetector, {
|
|
45628
43801
|
handleWidth: true
|
|
45629
43802
|
}, /*#__PURE__*/React__default.createElement(SelectNavBarBasedOnWidth, Object.assign({
|
|
45630
43803
|
breakpointUpper: breakpoints[breakpointUpper] || breakpointUpper
|
|
@@ -45635,7 +43808,7 @@ var BaseNavBar = function BaseNavBar(_a) {
|
|
|
45635
43808
|
|
|
45636
43809
|
var NavBar = styled(BaseNavBar).withConfig({
|
|
45637
43810
|
displayName: "NavBar",
|
|
45638
|
-
componentId: "cszq6w-
|
|
43811
|
+
componentId: "cszq6w-0"
|
|
45639
43812
|
})({});
|
|
45640
43813
|
|
|
45641
43814
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -47659,7 +45832,7 @@ function classNames(prefix, state, className) {
|
|
|
47659
45832
|
|
|
47660
45833
|
var cleanValue = function cleanValue(value) {
|
|
47661
45834
|
if (Array.isArray(value)) return value.filter(Boolean);
|
|
47662
|
-
if (_typeof
|
|
45835
|
+
if (_typeof(value) === 'object' && value !== null) return [value];
|
|
47663
45836
|
return [];
|
|
47664
45837
|
}; // ==============================
|
|
47665
45838
|
// Handle Input Change
|
|
@@ -47808,9 +45981,9 @@ function isMobileDevice() {
|
|
|
47808
45981
|
|
|
47809
45982
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
47810
45983
|
|
|
47811
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty
|
|
45984
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
47812
45985
|
|
|
47813
|
-
function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
45986
|
+
function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
47814
45987
|
|
|
47815
45988
|
function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
47816
45989
|
function getMenuPlacement(_ref) {
|
|
@@ -47999,21 +46172,21 @@ var menuCSS = function menuCSS(_ref2) {
|
|
|
47999
46172
|
colors = _ref2$theme.colors;
|
|
48000
46173
|
return _ref3 = {
|
|
48001
46174
|
label: 'menu'
|
|
48002
|
-
}, _defineProperty
|
|
46175
|
+
}, _defineProperty(_ref3, alignToControl(placement), '100%'), _defineProperty(_ref3, "backgroundColor", colors.neutral0), _defineProperty(_ref3, "borderRadius", borderRadius), _defineProperty(_ref3, "boxShadow", '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)'), _defineProperty(_ref3, "marginBottom", spacing.menuGutter), _defineProperty(_ref3, "marginTop", spacing.menuGutter), _defineProperty(_ref3, "position", 'absolute'), _defineProperty(_ref3, "width", '100%'), _defineProperty(_ref3, "zIndex", 1), _ref3;
|
|
48003
46176
|
};
|
|
48004
46177
|
var PortalPlacementContext = /*#__PURE__*/createContext({
|
|
48005
46178
|
getPortalPlacement: null
|
|
48006
46179
|
}); // NOTE: internal only
|
|
48007
46180
|
|
|
48008
46181
|
var MenuPlacer = /*#__PURE__*/function (_Component) {
|
|
48009
|
-
_inherits
|
|
46182
|
+
_inherits(MenuPlacer, _Component);
|
|
48010
46183
|
|
|
48011
46184
|
var _super = _createSuper$5(MenuPlacer);
|
|
48012
46185
|
|
|
48013
46186
|
function MenuPlacer() {
|
|
48014
46187
|
var _this;
|
|
48015
46188
|
|
|
48016
|
-
_classCallCheck
|
|
46189
|
+
_classCallCheck(this, MenuPlacer);
|
|
48017
46190
|
|
|
48018
46191
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
48019
46192
|
args[_key] = arguments[_key];
|
|
@@ -48064,7 +46237,7 @@ var MenuPlacer = /*#__PURE__*/function (_Component) {
|
|
|
48064
46237
|
return _this;
|
|
48065
46238
|
}
|
|
48066
46239
|
|
|
48067
|
-
_createClass
|
|
46240
|
+
_createClass(MenuPlacer, [{
|
|
48068
46241
|
key: "render",
|
|
48069
46242
|
value: function render() {
|
|
48070
46243
|
var children = this.props.children;
|
|
@@ -48194,14 +46367,14 @@ var menuPortalCSS = function menuPortalCSS(_ref6) {
|
|
|
48194
46367
|
};
|
|
48195
46368
|
};
|
|
48196
46369
|
var MenuPortal = /*#__PURE__*/function (_Component2) {
|
|
48197
|
-
_inherits
|
|
46370
|
+
_inherits(MenuPortal, _Component2);
|
|
48198
46371
|
|
|
48199
46372
|
var _super2 = _createSuper$5(MenuPortal);
|
|
48200
46373
|
|
|
48201
46374
|
function MenuPortal() {
|
|
48202
46375
|
var _this2;
|
|
48203
46376
|
|
|
48204
|
-
_classCallCheck
|
|
46377
|
+
_classCallCheck(this, MenuPortal);
|
|
48205
46378
|
|
|
48206
46379
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
48207
46380
|
args[_key2] = arguments[_key2];
|
|
@@ -48226,7 +46399,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
|
|
|
48226
46399
|
return _this2;
|
|
48227
46400
|
}
|
|
48228
46401
|
|
|
48229
|
-
_createClass
|
|
46402
|
+
_createClass(MenuPortal, [{
|
|
48230
46403
|
key: "render",
|
|
48231
46404
|
value: function render() {
|
|
48232
46405
|
var _this$props2 = this.props,
|
|
@@ -48274,7 +46447,7 @@ function equal(a, b) {
|
|
|
48274
46447
|
// fast-deep-equal index.js 2.0.1
|
|
48275
46448
|
if (a === b) return true;
|
|
48276
46449
|
|
|
48277
|
-
if (a && b && _typeof
|
|
46450
|
+
if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') {
|
|
48278
46451
|
var arrA = isArray(a),
|
|
48279
46452
|
arrB = isArray(b),
|
|
48280
46453
|
i,
|
|
@@ -48694,7 +46867,7 @@ var Control = function Control(props) {
|
|
|
48694
46867
|
|
|
48695
46868
|
function ownKeys$1$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
48696
46869
|
|
|
48697
|
-
function _objectSpread$1$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1$1(Object(source), true).forEach(function (key) { _defineProperty
|
|
46870
|
+
function _objectSpread$1$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
48698
46871
|
var groupCSS = function groupCSS(_ref) {
|
|
48699
46872
|
var spacing = _ref.theme.spacing;
|
|
48700
46873
|
return {
|
|
@@ -48761,7 +46934,7 @@ var GroupHeading = function GroupHeading(props) {
|
|
|
48761
46934
|
|
|
48762
46935
|
function ownKeys$2$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
48763
46936
|
|
|
48764
|
-
function _objectSpread$2$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2$1(Object(source), true).forEach(function (key) { _defineProperty
|
|
46937
|
+
function _objectSpread$2$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
48765
46938
|
var inputCSS = function inputCSS(_ref) {
|
|
48766
46939
|
var isDisabled = _ref.isDisabled,
|
|
48767
46940
|
_ref$theme = _ref.theme,
|
|
@@ -48816,7 +46989,7 @@ var Input = function Input(_ref2) {
|
|
|
48816
46989
|
|
|
48817
46990
|
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
48818
46991
|
|
|
48819
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(Object(source), true).forEach(function (key) { _defineProperty
|
|
46992
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
48820
46993
|
var multiValueCSS = function multiValueCSS(_ref) {
|
|
48821
46994
|
var _ref$theme = _ref.theme,
|
|
48822
46995
|
spacing = _ref$theme.spacing,
|
|
@@ -49046,7 +47219,7 @@ var SingleValue = function SingleValue(props) {
|
|
|
49046
47219
|
|
|
49047
47220
|
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
49048
47221
|
|
|
49049
|
-
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$4(Object(source), true).forEach(function (key) { _defineProperty
|
|
47222
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$4(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
49050
47223
|
var components = {
|
|
49051
47224
|
ClearIndicator: ClearIndicator,
|
|
49052
47225
|
Control: Control,
|
|
@@ -49429,7 +47602,7 @@ var stripDiacritics = function stripDiacritics(str) {
|
|
|
49429
47602
|
|
|
49430
47603
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
49431
47604
|
|
|
49432
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty
|
|
47605
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
49433
47606
|
|
|
49434
47607
|
var trimString = function trimString(str) {
|
|
49435
47608
|
return str.replace(/^\s+|\s+$/g, '');
|
|
@@ -49524,22 +47697,22 @@ function DummyInput(_ref) {
|
|
|
49524
47697
|
}));
|
|
49525
47698
|
}
|
|
49526
47699
|
|
|
49527
|
-
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
47700
|
+
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49528
47701
|
|
|
49529
47702
|
function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
49530
47703
|
|
|
49531
47704
|
var NodeResolver = /*#__PURE__*/function (_Component) {
|
|
49532
|
-
_inherits
|
|
47705
|
+
_inherits(NodeResolver, _Component);
|
|
49533
47706
|
|
|
49534
47707
|
var _super = _createSuper$2(NodeResolver);
|
|
49535
47708
|
|
|
49536
47709
|
function NodeResolver() {
|
|
49537
|
-
_classCallCheck
|
|
47710
|
+
_classCallCheck(this, NodeResolver);
|
|
49538
47711
|
|
|
49539
47712
|
return _super.apply(this, arguments);
|
|
49540
47713
|
}
|
|
49541
47714
|
|
|
49542
|
-
_createClass
|
|
47715
|
+
_createClass(NodeResolver, [{
|
|
49543
47716
|
key: "componentDidMount",
|
|
49544
47717
|
value: function componentDidMount() {
|
|
49545
47718
|
this.props.innerRef(findDOMNode(this));
|
|
@@ -49591,21 +47764,21 @@ function isTouchDevice() {
|
|
|
49591
47764
|
return 'ontouchstart' in window || navigator.maxTouchPoints;
|
|
49592
47765
|
}
|
|
49593
47766
|
|
|
49594
|
-
function _createSuper$1$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1$1(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
47767
|
+
function _createSuper$1$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49595
47768
|
|
|
49596
47769
|
function _isNativeReflectConstruct$1$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
49597
47770
|
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
49598
47771
|
var activeScrollLocks = 0;
|
|
49599
47772
|
|
|
49600
47773
|
var ScrollLock = /*#__PURE__*/function (_Component) {
|
|
49601
|
-
_inherits
|
|
47774
|
+
_inherits(ScrollLock, _Component);
|
|
49602
47775
|
|
|
49603
47776
|
var _super = _createSuper$1$1(ScrollLock);
|
|
49604
47777
|
|
|
49605
47778
|
function ScrollLock() {
|
|
49606
47779
|
var _this;
|
|
49607
47780
|
|
|
49608
|
-
_classCallCheck
|
|
47781
|
+
_classCallCheck(this, ScrollLock);
|
|
49609
47782
|
|
|
49610
47783
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
49611
47784
|
args[_key] = arguments[_key];
|
|
@@ -49620,7 +47793,7 @@ var ScrollLock = /*#__PURE__*/function (_Component) {
|
|
|
49620
47793
|
return _this;
|
|
49621
47794
|
}
|
|
49622
47795
|
|
|
49623
|
-
_createClass
|
|
47796
|
+
_createClass(ScrollLock, [{
|
|
49624
47797
|
key: "componentDidMount",
|
|
49625
47798
|
value: function componentDidMount() {
|
|
49626
47799
|
var _this2 = this;
|
|
@@ -49722,7 +47895,7 @@ ScrollLock.defaultProps = {
|
|
|
49722
47895
|
|
|
49723
47896
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$1() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
49724
47897
|
|
|
49725
|
-
function _createSuper$2$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2$1(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
47898
|
+
function _createSuper$2$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49726
47899
|
|
|
49727
47900
|
function _isNativeReflectConstruct$2$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
49728
47901
|
|
|
@@ -49741,14 +47914,14 @@ var _ref$1 = process.env.NODE_ENV === "production" ? {
|
|
|
49741
47914
|
// - createRef() https://reactjs.org/docs/react-api.html#reactcreateref
|
|
49742
47915
|
// - forwardRef() https://reactjs.org/docs/react-api.html#reactforwardref
|
|
49743
47916
|
var ScrollBlock = /*#__PURE__*/function (_PureComponent) {
|
|
49744
|
-
_inherits
|
|
47917
|
+
_inherits(ScrollBlock, _PureComponent);
|
|
49745
47918
|
|
|
49746
47919
|
var _super = _createSuper$2$1(ScrollBlock);
|
|
49747
47920
|
|
|
49748
47921
|
function ScrollBlock() {
|
|
49749
47922
|
var _this;
|
|
49750
47923
|
|
|
49751
|
-
_classCallCheck
|
|
47924
|
+
_classCallCheck(this, ScrollBlock);
|
|
49752
47925
|
|
|
49753
47926
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
49754
47927
|
args[_key] = arguments[_key];
|
|
@@ -49776,7 +47949,7 @@ var ScrollBlock = /*#__PURE__*/function (_PureComponent) {
|
|
|
49776
47949
|
return _this;
|
|
49777
47950
|
}
|
|
49778
47951
|
|
|
49779
|
-
_createClass
|
|
47952
|
+
_createClass(ScrollBlock, [{
|
|
49780
47953
|
key: "render",
|
|
49781
47954
|
value: function render() {
|
|
49782
47955
|
var _this$props = this.props,
|
|
@@ -49812,19 +47985,19 @@ var ScrollBlock = /*#__PURE__*/function (_PureComponent) {
|
|
|
49812
47985
|
return ScrollBlock;
|
|
49813
47986
|
}(PureComponent);
|
|
49814
47987
|
|
|
49815
|
-
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
47988
|
+
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49816
47989
|
|
|
49817
47990
|
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
49818
47991
|
|
|
49819
47992
|
var ScrollCaptor = /*#__PURE__*/function (_Component) {
|
|
49820
|
-
_inherits
|
|
47993
|
+
_inherits(ScrollCaptor, _Component);
|
|
49821
47994
|
|
|
49822
47995
|
var _super = _createSuper$3(ScrollCaptor);
|
|
49823
47996
|
|
|
49824
47997
|
function ScrollCaptor() {
|
|
49825
47998
|
var _this;
|
|
49826
47999
|
|
|
49827
|
-
_classCallCheck
|
|
48000
|
+
_classCallCheck(this, ScrollCaptor);
|
|
49828
48001
|
|
|
49829
48002
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
49830
48003
|
args[_key] = arguments[_key];
|
|
@@ -49913,7 +48086,7 @@ var ScrollCaptor = /*#__PURE__*/function (_Component) {
|
|
|
49913
48086
|
return _this;
|
|
49914
48087
|
}
|
|
49915
48088
|
|
|
49916
|
-
_createClass
|
|
48089
|
+
_createClass(ScrollCaptor, [{
|
|
49917
48090
|
key: "componentDidMount",
|
|
49918
48091
|
value: function componentDidMount() {
|
|
49919
48092
|
this.startListening(this.scrollTarget);
|
|
@@ -50106,9 +48279,9 @@ var defaultTheme = {
|
|
|
50106
48279
|
|
|
50107
48280
|
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
50108
48281
|
|
|
50109
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty
|
|
48282
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
50110
48283
|
|
|
50111
|
-
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
48284
|
+
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
50112
48285
|
|
|
50113
48286
|
function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
50114
48287
|
var defaultProps$2 = {
|
|
@@ -50159,7 +48332,7 @@ var defaultProps$2 = {
|
|
|
50159
48332
|
var instanceId = 1;
|
|
50160
48333
|
|
|
50161
48334
|
var Select = /*#__PURE__*/function (_Component) {
|
|
50162
|
-
_inherits
|
|
48335
|
+
_inherits(Select, _Component);
|
|
50163
48336
|
|
|
50164
48337
|
var _super = _createSuper$4(Select);
|
|
50165
48338
|
|
|
@@ -50173,7 +48346,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
50173
48346
|
function Select(_props) {
|
|
50174
48347
|
var _this;
|
|
50175
48348
|
|
|
50176
|
-
_classCallCheck
|
|
48349
|
+
_classCallCheck(this, Select);
|
|
50177
48350
|
|
|
50178
48351
|
_this = _super.call(this, _props);
|
|
50179
48352
|
_this.state = {
|
|
@@ -50960,7 +49133,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
50960
49133
|
};
|
|
50961
49134
|
|
|
50962
49135
|
var _value = _props.value;
|
|
50963
|
-
_this.cacheComponents = memoizeOne(_this.cacheComponents, exportedEqual).bind(_assertThisInitialized$
|
|
49136
|
+
_this.cacheComponents = memoizeOne(_this.cacheComponents, exportedEqual).bind(_assertThisInitialized$1(_this));
|
|
50964
49137
|
|
|
50965
49138
|
_this.cacheComponents(_props.components);
|
|
50966
49139
|
|
|
@@ -50980,7 +49153,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
50980
49153
|
lastSelectValue = _ref9[1];
|
|
50981
49154
|
|
|
50982
49155
|
return newSelectValue === lastSelectValue && newProps.inputValue === lastProps.inputValue && newProps.options === lastProps.options;
|
|
50983
|
-
}).bind(_assertThisInitialized$
|
|
49156
|
+
}).bind(_assertThisInitialized$1(_this));
|
|
50984
49157
|
|
|
50985
49158
|
var _menuOptions = _props.menuIsOpen ? _this.buildMenuOptions(_props, _selectValue) : {
|
|
50986
49159
|
render: [],
|
|
@@ -50992,7 +49165,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
50992
49165
|
return _this;
|
|
50993
49166
|
}
|
|
50994
49167
|
|
|
50995
|
-
_createClass
|
|
49168
|
+
_createClass(Select, [{
|
|
50996
49169
|
key: "componentDidMount",
|
|
50997
49170
|
value: function componentDidMount() {
|
|
50998
49171
|
this.startListeningComposition();
|
|
@@ -51961,7 +50134,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
51961
50134
|
|
|
51962
50135
|
Select.defaultProps = defaultProps$2;
|
|
51963
50136
|
|
|
51964
|
-
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
50137
|
+
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
51965
50138
|
|
|
51966
50139
|
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
51967
50140
|
var defaultProps$1 = {
|
|
@@ -51974,14 +50147,14 @@ var manageState = function manageState(SelectComponent) {
|
|
|
51974
50147
|
var _class, _temp;
|
|
51975
50148
|
|
|
51976
50149
|
return _temp = _class = /*#__PURE__*/function (_Component) {
|
|
51977
|
-
_inherits
|
|
50150
|
+
_inherits(StateManager, _Component);
|
|
51978
50151
|
|
|
51979
50152
|
var _super = _createSuper$1(StateManager);
|
|
51980
50153
|
|
|
51981
50154
|
function StateManager() {
|
|
51982
50155
|
var _this;
|
|
51983
50156
|
|
|
51984
|
-
_classCallCheck
|
|
50157
|
+
_classCallCheck(this, StateManager);
|
|
51985
50158
|
|
|
51986
50159
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51987
50160
|
args[_key] = arguments[_key];
|
|
@@ -52032,7 +50205,7 @@ var manageState = function manageState(SelectComponent) {
|
|
|
52032
50205
|
return _this;
|
|
52033
50206
|
}
|
|
52034
50207
|
|
|
52035
|
-
_createClass
|
|
50208
|
+
_createClass(StateManager, [{
|
|
52036
50209
|
key: "focus",
|
|
52037
50210
|
value: function focus() {
|
|
52038
50211
|
this.select.focus();
|
|
@@ -52092,7 +50265,7 @@ var manageState = function manageState(SelectComponent) {
|
|
|
52092
50265
|
}(Component$1), _class.defaultProps = defaultProps$1, _temp;
|
|
52093
50266
|
};
|
|
52094
50267
|
|
|
52095
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
50268
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
52096
50269
|
|
|
52097
50270
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
52098
50271
|
var defaultProps = {
|
|
@@ -52105,14 +50278,14 @@ var makeAsyncSelect = function makeAsyncSelect(SelectComponent) {
|
|
|
52105
50278
|
var _class, _temp;
|
|
52106
50279
|
|
|
52107
50280
|
return _temp = _class = /*#__PURE__*/function (_Component) {
|
|
52108
|
-
_inherits
|
|
50281
|
+
_inherits(Async, _Component);
|
|
52109
50282
|
|
|
52110
50283
|
var _super = _createSuper(Async);
|
|
52111
50284
|
|
|
52112
50285
|
function Async(props) {
|
|
52113
50286
|
var _this;
|
|
52114
50287
|
|
|
52115
|
-
_classCallCheck
|
|
50288
|
+
_classCallCheck(this, Async);
|
|
52116
50289
|
|
|
52117
50290
|
_this = _super.call(this);
|
|
52118
50291
|
_this.select = void 0;
|
|
@@ -52190,7 +50363,7 @@ var makeAsyncSelect = function makeAsyncSelect(SelectComponent) {
|
|
|
52190
50363
|
return _this;
|
|
52191
50364
|
}
|
|
52192
50365
|
|
|
52193
|
-
_createClass
|
|
50366
|
+
_createClass(Async, [{
|
|
52194
50367
|
key: "componentDidMount",
|
|
52195
50368
|
value: function componentDidMount() {
|
|
52196
50369
|
var _this2 = this;
|
|
@@ -52611,6 +50784,7 @@ var Sidebar = function Sidebar(_a) {
|
|
|
52611
50784
|
}, title)), !hideCloseButton && /*#__PURE__*/React__default.createElement(Box, {
|
|
52612
50785
|
marginLeft: "x2"
|
|
52613
50786
|
}, /*#__PURE__*/React__default.createElement(IconicButton, {
|
|
50787
|
+
type: "button",
|
|
52614
50788
|
ref: closeButton,
|
|
52615
50789
|
icon: "close",
|
|
52616
50790
|
onClick: onClose,
|
|
@@ -52731,4 +50905,4 @@ var SortingTable = function SortingTable(_a) {
|
|
|
52731
50905
|
}, props));
|
|
52732
50906
|
};
|
|
52733
50907
|
|
|
52734
|
-
export { ALL_NDS_LOCALES, Alert, AnimatedBox, ApplicationFrame, AsyncSelect, Box, NavBar as BrandedNavBar, Branding, Breadcrumbs, Button, ButtonGroup, Card, CardSet, Checkbox, CheckboxGroup, ControlIcon, DangerButton, DatePicker, DateRange, Divider, DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText, Field, FieldLabel, Fieldset, Flex, Form, FormSection, Heading1, Heading2, Heading3, Heading4, HelpText, Icon, IconicButton, InlineIcon, InlineValidation, Input$1 as Input, Link, List, ListItem, LoadingAnimation, Modal, NDSProvider, NavBar$1 as NavBar, Overlay, Page, Pagination, PrimaryButton, QuietButton, Radio, RadioGroup, RangeContainer, RequirementText, ReactSelect as Select, SelectClearIndicator, SelectContainer$1 as SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption, Sidebar, SortingTable, StatusIndicator, Switch, Switcher, Tab, Table, Tabs, Text, Textarea, TimePicker, TimeRange, Toast, ToggleComponent as Toggle, Tooltip, TruncatedText, addStyledProps, Theme as theme, useWindowDimensions };
|
|
50908
|
+
export { ALL_NDS_LOCALES, Alert, AnimatedBox, ApplicationFrame, AsyncSelect, Box, BrandLogoContainer, NavBar as BrandedNavBar, Branding, Breadcrumbs, Button, ButtonGroup, Card, CardSet, Checkbox, CheckboxGroup, ControlIcon, DangerButton, DatePicker, DateRange, DesktopMenu, Divider, DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText, EnvironmentBanner, Field, FieldLabel, Fieldset, Flex, Form, FormSection, Heading1, Heading2, Heading3, Heading4, HelpText, Icon, IconicButton, InlineIcon, InlineValidation, Input$1 as Input, Link, List, ListItem, LoadingAnimation, MenuTrigger, Modal, NDSProvider, NavBar$1 as NavBar, NavBarBackground, Overlay, Page, Pagination, PrimaryButton, QuietButton, Radio, RadioGroup, RangeContainer, RequirementText, ReactSelect as Select, SelectClearIndicator, SelectContainer$1 as SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption, Sidebar, SmallNavBar, SortingTable, StatusIndicator, Switch, Switcher, Tab, Table, Tabs, Text, Textarea, TimePicker, TimeRange, Toast, ToggleComponent as Toggle, Tooltip, TruncatedText, addStyledProps, Theme as theme, useWindowDimensions };
|