@luminati-io/uikit 1.7.28-beta.2 → 1.7.28-beta.3

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/uikit.umd.js CHANGED
@@ -19004,21 +19004,20 @@ __webpack_require__.r(__webpack_exports__);
19004
19004
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19005
19005
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
19006
19006
  /* harmony export */ });
19007
- /* harmony import */ var react_sizeme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-sizeme */ "./node_modules/react-sizeme/dist/react-sizeme.js");
19008
- /* harmony import */ var react_sizeme__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_sizeme__WEBPACK_IMPORTED_MODULE_0__);
19009
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types");
19010
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
19011
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
19012
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
19013
- /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! styled-components */ "styled-components");
19014
- /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_3__);
19015
- /* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
19016
- /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
19017
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
19018
- /* harmony import */ var _error_boundary__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./error_boundary */ "./src/chart/error_boundary.js");
19019
- /* harmony import */ var _legend__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./legend */ "./src/chart/legend.js");
19020
- /* harmony import */ var _loading__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./loading */ "./src/chart/loading.js");
19021
- /* harmony import */ var _no_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./no_data */ "./src/chart/no_data.js");
19007
+ /* harmony import */ var _visx_responsive_lib_components_ParentSize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @visx/responsive/lib/components/ParentSize */ "./node_modules/@visx/responsive/lib/components/ParentSize.js");
19008
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "prop-types");
19009
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
19010
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
19011
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
19012
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
19013
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
19014
+ /* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
19015
+ /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
19016
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
19017
+ /* harmony import */ var _error_boundary__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./error_boundary */ "./src/chart/error_boundary.js");
19018
+ /* harmony import */ var _legend__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./legend */ "./src/chart/legend.js");
19019
+ /* harmony import */ var _loading__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./loading */ "./src/chart/loading.js");
19020
+ /* harmony import */ var _no_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./no_data */ "./src/chart/no_data.js");
19022
19021
  // LICENSE_CODE ZON
19023
19022
 
19024
19023
 
@@ -19052,23 +19051,24 @@ var ChartContainer = function ChartContainer(props) {
19052
19051
  var outerWidth = props.width ? Math.max(410, props.width) : undefined;
19053
19052
  var outerHeight = Math.max(176, props.height || 0);
19054
19053
  var noData = !(data && data.length);
19055
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ChartContainerWrapper, _extends({}, rest, {
19054
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ChartContainerWrapper, _extends({}, rest, {
19056
19055
  width: outerWidth,
19057
19056
  height: outerHeight
19058
- }), !!header && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(HeaderWrapper, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_5__.Header, {
19057
+ }), !!header && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(HeaderWrapper, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_4__.Header, {
19059
19058
  color: "gray_11_75"
19060
- }, header), !!description && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_5__.Label, {
19059
+ }, header), !!description && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_4__.Label, {
19061
19060
  variant: "sm",
19062
19061
  color: "gray_11_75"
19063
- }, description)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ChartWrapper, null, !!actions && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement("div", null, actions), !!loading && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_loading__WEBPACK_IMPORTED_MODULE_9__["default"], null), !loading && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement((react__WEBPACK_IMPORTED_MODULE_2___default().Fragment), null, noData && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_no_data__WEBPACK_IMPORTED_MODULE_10__["default"], null), !noData && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_error_boundary__WEBPACK_IMPORTED_MODULE_7__["default"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(SvgWrapper, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(react_sizeme__WEBPACK_IMPORTED_MODULE_0__.SizeMe, null, function (_ref) {
19064
- var size = _ref.size;
19065
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Chart, _extends({}, chartProps, {
19062
+ }, description)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ChartWrapper, null, !!actions && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", null, actions), !!loading && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_loading__WEBPACK_IMPORTED_MODULE_8__["default"], null), !loading && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, noData && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_no_data__WEBPACK_IMPORTED_MODULE_9__["default"], null), !noData && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_error_boundary__WEBPACK_IMPORTED_MODULE_6__["default"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(SvgWrapper, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_visx_responsive_lib_components_ParentSize__WEBPACK_IMPORTED_MODULE_10__["default"], null, function (_ref) {
19063
+ var width = _ref.width,
19064
+ height = _ref.height;
19065
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Chart, _extends({}, chartProps, {
19066
19066
  data: data,
19067
19067
  palette: palette,
19068
- width: size.width,
19069
- height: size.height
19068
+ width: width,
19069
+ height: height
19070
19070
  }));
19071
- })), !hideLegend && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_legend__WEBPACK_IMPORTED_MODULE_8__["default"], {
19071
+ })), !hideLegend && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_legend__WEBPACK_IMPORTED_MODULE_7__["default"], {
19072
19072
  data: data,
19073
19073
  palette: palette
19074
19074
  })))));
@@ -19079,40 +19079,40 @@ ChartContainer.defaultProps = {
19079
19079
  variant: 'default'
19080
19080
  };
19081
19081
  ChartContainer.propTypes = {
19082
- header: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
19083
- description: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
19084
- actions: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
19085
- width: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number),
19086
- height: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number.isRequired),
19087
- palette: prop_types__WEBPACK_IMPORTED_MODULE_1___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)),
19088
- loading: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
19089
- variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['default', 'ghost']),
19090
- hideLegend: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool)
19091
- };
19092
- var ChartContainerWrapper = styled_components__WEBPACK_IMPORTED_MODULE_3___default().div.withConfig({
19082
+ header: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
19083
+ description: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
19084
+ actions: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
19085
+ width: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
19086
+ height: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number.isRequired),
19087
+ palette: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)),
19088
+ loading: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
19089
+ variant: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['default', 'ghost']),
19090
+ hideLegend: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)
19091
+ };
19092
+ var ChartContainerWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
19093
19093
  displayName: "ChartContainerWrapper",
19094
19094
  componentId: "sc-13xkdxv-0"
19095
- })(["display:flex;flex-direction:column;gap:", ";", " height:", ";", ""], _theme__WEBPACK_IMPORTED_MODULE_4__["default"].spacing["06"], function (props) {
19096
- return props.width ? "width: ".concat((0,_utils__WEBPACK_IMPORTED_MODULE_6__.toPixel)(props.width), ";") : undefined;
19095
+ })(["display:flex;flex-direction:column;gap:", ";", " height:", ";", ""], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].spacing["06"], function (props) {
19096
+ return props.width ? "width: ".concat((0,_utils__WEBPACK_IMPORTED_MODULE_5__.toPixel)(props.width), ";") : undefined;
19097
19097
  }, function (props) {
19098
- return (0,_utils__WEBPACK_IMPORTED_MODULE_6__.toPixel)(props.height);
19098
+ return (0,_utils__WEBPACK_IMPORTED_MODULE_5__.toPixel)(props.height);
19099
19099
  }, function (props) {
19100
19100
  if (props.variant != 'ghost') {
19101
- return (0,styled_components__WEBPACK_IMPORTED_MODULE_3__.css)(["padding:", ";border-radius:8px;border:1px solid ", ";"], _theme__WEBPACK_IMPORTED_MODULE_4__["default"].spacing["06"], _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_5);
19101
+ return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["padding:", ";border-radius:8px;border:1px solid ", ";"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].spacing["06"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_5);
19102
19102
  }
19103
19103
  });
19104
- var HeaderWrapper = styled_components__WEBPACK_IMPORTED_MODULE_3___default().div.withConfig({
19104
+ var HeaderWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
19105
19105
  displayName: "HeaderWrapper",
19106
19106
  componentId: "sc-13xkdxv-1"
19107
- })(["display:flex;flex-direction:column;gap:", ";"], _theme__WEBPACK_IMPORTED_MODULE_4__["default"].spacing["03"]);
19108
- var ChartWrapper = styled_components__WEBPACK_IMPORTED_MODULE_3___default().div.withConfig({
19107
+ })(["display:flex;flex-direction:column;gap:", ";"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].spacing["03"]);
19108
+ var ChartWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
19109
19109
  displayName: "ChartWrapper",
19110
19110
  componentId: "sc-13xkdxv-2"
19111
- })(["flex-grow:1;display:flex;flex-direction:column;gap:", ";"], _theme__WEBPACK_IMPORTED_MODULE_4__["default"].spacing["05"]);
19112
- var SvgWrapper = styled_components__WEBPACK_IMPORTED_MODULE_3___default().div.withConfig({
19111
+ })(["flex-grow:1;display:flex;flex-direction:column;gap:", ";"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].spacing["05"]);
19112
+ var SvgWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
19113
19113
  displayName: "SvgWrapper",
19114
19114
  componentId: "sc-13xkdxv-3"
19115
- })(["flex-grow:1;overflow:hidden;svg{display:block;padding:0;margin:0;}"]);
19115
+ })(["flex-grow:1;overflow:hidden;position:relative;svg{position:absolute;top:0;left:0;display:block;padding:0;margin:0;}"]);
19116
19116
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChartContainer);
19117
19117
 
19118
19118
  /***/ }),
@@ -27770,181 +27770,6 @@ function range(a, b, str) {
27770
27770
  }
27771
27771
 
27772
27772
 
27773
- /***/ }),
27774
-
27775
- /***/ "./node_modules/batch-processor/src/batch-processor.js":
27776
- /*!*************************************************************!*\
27777
- !*** ./node_modules/batch-processor/src/batch-processor.js ***!
27778
- \*************************************************************/
27779
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
27780
-
27781
- "use strict";
27782
-
27783
-
27784
- var utils = __webpack_require__(/*! ./utils */ "./node_modules/batch-processor/src/utils.js");
27785
-
27786
- module.exports = function batchProcessorMaker(options) {
27787
- options = options || {};
27788
- var reporter = options.reporter;
27789
- var asyncProcess = utils.getOption(options, "async", true);
27790
- var autoProcess = utils.getOption(options, "auto", true);
27791
-
27792
- if(autoProcess && !asyncProcess) {
27793
- reporter && reporter.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true.");
27794
- asyncProcess = true;
27795
- }
27796
-
27797
- var batch = Batch();
27798
- var asyncFrameHandler;
27799
- var isProcessing = false;
27800
-
27801
- function addFunction(level, fn) {
27802
- if(!isProcessing && autoProcess && asyncProcess && batch.size() === 0) {
27803
- // Since this is async, it is guaranteed to be executed after that the fn is added to the batch.
27804
- // This needs to be done before, since we're checking the size of the batch to be 0.
27805
- processBatchAsync();
27806
- }
27807
-
27808
- batch.add(level, fn);
27809
- }
27810
-
27811
- function processBatch() {
27812
- // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch.
27813
- // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on).
27814
- isProcessing = true;
27815
- while (batch.size()) {
27816
- var processingBatch = batch;
27817
- batch = Batch();
27818
- processingBatch.process();
27819
- }
27820
- isProcessing = false;
27821
- }
27822
-
27823
- function forceProcessBatch(localAsyncProcess) {
27824
- if (isProcessing) {
27825
- return;
27826
- }
27827
-
27828
- if(localAsyncProcess === undefined) {
27829
- localAsyncProcess = asyncProcess;
27830
- }
27831
-
27832
- if(asyncFrameHandler) {
27833
- cancelFrame(asyncFrameHandler);
27834
- asyncFrameHandler = null;
27835
- }
27836
-
27837
- if(localAsyncProcess) {
27838
- processBatchAsync();
27839
- } else {
27840
- processBatch();
27841
- }
27842
- }
27843
-
27844
- function processBatchAsync() {
27845
- asyncFrameHandler = requestFrame(processBatch);
27846
- }
27847
-
27848
- function clearBatch() {
27849
- batch = {};
27850
- batchSize = 0;
27851
- topLevel = 0;
27852
- bottomLevel = 0;
27853
- }
27854
-
27855
- function cancelFrame(listener) {
27856
- // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;
27857
- var cancel = clearTimeout;
27858
- return cancel(listener);
27859
- }
27860
-
27861
- function requestFrame(callback) {
27862
- // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); };
27863
- var raf = function(fn) { return setTimeout(fn, 0); };
27864
- return raf(callback);
27865
- }
27866
-
27867
- return {
27868
- add: addFunction,
27869
- force: forceProcessBatch
27870
- };
27871
- };
27872
-
27873
- function Batch() {
27874
- var batch = {};
27875
- var size = 0;
27876
- var topLevel = 0;
27877
- var bottomLevel = 0;
27878
-
27879
- function add(level, fn) {
27880
- if(!fn) {
27881
- fn = level;
27882
- level = 0;
27883
- }
27884
-
27885
- if(level > topLevel) {
27886
- topLevel = level;
27887
- } else if(level < bottomLevel) {
27888
- bottomLevel = level;
27889
- }
27890
-
27891
- if(!batch[level]) {
27892
- batch[level] = [];
27893
- }
27894
-
27895
- batch[level].push(fn);
27896
- size++;
27897
- }
27898
-
27899
- function process() {
27900
- for(var level = bottomLevel; level <= topLevel; level++) {
27901
- var fns = batch[level];
27902
-
27903
- for(var i = 0; i < fns.length; i++) {
27904
- var fn = fns[i];
27905
- fn();
27906
- }
27907
- }
27908
- }
27909
-
27910
- function getSize() {
27911
- return size;
27912
- }
27913
-
27914
- return {
27915
- add: add,
27916
- process: process,
27917
- size: getSize
27918
- };
27919
- }
27920
-
27921
-
27922
- /***/ }),
27923
-
27924
- /***/ "./node_modules/batch-processor/src/utils.js":
27925
- /*!***************************************************!*\
27926
- !*** ./node_modules/batch-processor/src/utils.js ***!
27927
- \***************************************************/
27928
- /***/ ((module) => {
27929
-
27930
- "use strict";
27931
-
27932
-
27933
- var utils = module.exports = {};
27934
-
27935
- utils.getOption = getOption;
27936
-
27937
- function getOption(options, name, defaultValue) {
27938
- var value = options[name];
27939
-
27940
- if((value === undefined || value === null) && defaultValue !== undefined) {
27941
- return defaultValue;
27942
- }
27943
-
27944
- return value;
27945
- }
27946
-
27947
-
27948
27773
  /***/ }),
27949
27774
 
27950
27775
  /***/ "./node_modules/classnames/index.js":
@@ -42827,1673 +42652,6 @@ debounce.debounce = debounce;
42827
42652
  module.exports = debounce;
42828
42653
 
42829
42654
 
42830
- /***/ }),
42831
-
42832
- /***/ "./node_modules/element-resize-detector/src/browser-detector.js":
42833
- /*!**********************************************************************!*\
42834
- !*** ./node_modules/element-resize-detector/src/browser-detector.js ***!
42835
- \**********************************************************************/
42836
- /***/ ((module) => {
42837
-
42838
- "use strict";
42839
-
42840
-
42841
- var detector = module.exports = {};
42842
-
42843
- detector.isIE = function(version) {
42844
- function isAnyIeVersion() {
42845
- var agent = navigator.userAgent.toLowerCase();
42846
- return agent.indexOf("msie") !== -1 || agent.indexOf("trident") !== -1 || agent.indexOf(" edge/") !== -1;
42847
- }
42848
-
42849
- if(!isAnyIeVersion()) {
42850
- return false;
42851
- }
42852
-
42853
- if(!version) {
42854
- return true;
42855
- }
42856
-
42857
- //Shamelessly stolen from https://gist.github.com/padolsey/527683
42858
- var ieVersion = (function(){
42859
- var undef,
42860
- v = 3,
42861
- div = document.createElement("div"),
42862
- all = div.getElementsByTagName("i");
42863
-
42864
- do {
42865
- div.innerHTML = "<!--[if gt IE " + (++v) + "]><i></i><![endif]-->";
42866
- }
42867
- while (all[0]);
42868
-
42869
- return v > 4 ? v : undef;
42870
- }());
42871
-
42872
- return version === ieVersion;
42873
- };
42874
-
42875
- detector.isLegacyOpera = function() {
42876
- return !!window.opera;
42877
- };
42878
-
42879
-
42880
- /***/ }),
42881
-
42882
- /***/ "./node_modules/element-resize-detector/src/collection-utils.js":
42883
- /*!**********************************************************************!*\
42884
- !*** ./node_modules/element-resize-detector/src/collection-utils.js ***!
42885
- \**********************************************************************/
42886
- /***/ ((module) => {
42887
-
42888
- "use strict";
42889
-
42890
-
42891
- var utils = module.exports = {};
42892
-
42893
- /**
42894
- * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value.
42895
- * @public
42896
- * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1.
42897
- * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned.
42898
- * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing.
42899
- */
42900
- utils.forEach = function(collection, callback) {
42901
- for(var i = 0; i < collection.length; i++) {
42902
- var result = callback(collection[i]);
42903
- if(result) {
42904
- return result;
42905
- }
42906
- }
42907
- };
42908
-
42909
-
42910
- /***/ }),
42911
-
42912
- /***/ "./node_modules/element-resize-detector/src/detection-strategy/object.js":
42913
- /*!*******************************************************************************!*\
42914
- !*** ./node_modules/element-resize-detector/src/detection-strategy/object.js ***!
42915
- \*******************************************************************************/
42916
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
42917
-
42918
- "use strict";
42919
- /**
42920
- * Resize detection strategy that injects objects to elements in order to detect resize events.
42921
- * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
42922
- */
42923
-
42924
-
42925
-
42926
- var browserDetector = __webpack_require__(/*! ../browser-detector */ "./node_modules/element-resize-detector/src/browser-detector.js");
42927
-
42928
- module.exports = function(options) {
42929
- options = options || {};
42930
- var reporter = options.reporter;
42931
- var batchProcessor = options.batchProcessor;
42932
- var getState = options.stateHandler.getState;
42933
-
42934
- if(!reporter) {
42935
- throw new Error("Missing required dependency: reporter.");
42936
- }
42937
-
42938
- /**
42939
- * Adds a resize event listener to the element.
42940
- * @public
42941
- * @param {element} element The element that should have the listener added.
42942
- * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.
42943
- */
42944
- function addListener(element, listener) {
42945
- function listenerProxy() {
42946
- listener(element);
42947
- }
42948
-
42949
- if(browserDetector.isIE(8)) {
42950
- //IE 8 does not support object, but supports the resize event directly on elements.
42951
- getState(element).object = {
42952
- proxy: listenerProxy
42953
- };
42954
- element.attachEvent("onresize", listenerProxy);
42955
- } else {
42956
- var object = getObject(element);
42957
-
42958
- if(!object) {
42959
- throw new Error("Element is not detectable by this strategy.");
42960
- }
42961
-
42962
- object.contentDocument.defaultView.addEventListener("resize", listenerProxy);
42963
- }
42964
- }
42965
-
42966
- function buildCssTextString(rules) {
42967
- var seperator = options.important ? " !important; " : "; ";
42968
-
42969
- return (rules.join(seperator) + seperator).trim();
42970
- }
42971
-
42972
- /**
42973
- * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.
42974
- * @private
42975
- * @param {object} options Optional options object.
42976
- * @param {element} element The element to make detectable
42977
- * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.
42978
- */
42979
- function makeDetectable(options, element, callback) {
42980
- if (!callback) {
42981
- callback = element;
42982
- element = options;
42983
- options = null;
42984
- }
42985
-
42986
- options = options || {};
42987
- var debug = options.debug;
42988
-
42989
- function injectObject(element, callback) {
42990
- var OBJECT_STYLE = buildCssTextString(["display: block", "position: absolute", "top: 0", "left: 0", "width: 100%", "height: 100%", "border: none", "padding: 0", "margin: 0", "opacity: 0", "z-index: -1000", "pointer-events: none"]);
42991
-
42992
- //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element.
42993
-
42994
- // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not.
42995
- var positionCheckPerformed = false;
42996
-
42997
- // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers.
42998
- // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM.
42999
- var style = window.getComputedStyle(element);
43000
- var width = element.offsetWidth;
43001
- var height = element.offsetHeight;
43002
-
43003
- getState(element).startSize = {
43004
- width: width,
43005
- height: height
43006
- };
43007
-
43008
- function mutateDom() {
43009
- function alterPositionStyles() {
43010
- if(style.position === "static") {
43011
- element.style.setProperty("position", "relative", options.important ? "important" : "");
43012
-
43013
- var removeRelativeStyles = function(reporter, element, style, property) {
43014
- function getNumericalValue(value) {
43015
- return value.replace(/[^-\d\.]/g, "");
43016
- }
43017
-
43018
- var value = style[property];
43019
-
43020
- if(value !== "auto" && getNumericalValue(value) !== "0") {
43021
- reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element);
43022
- element.style.setProperty(property, "0", options.important ? "important" : "");
43023
- }
43024
- };
43025
-
43026
- //Check so that there are no accidental styles that will make the element styled differently now that is is relative.
43027
- //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).
43028
- removeRelativeStyles(reporter, element, style, "top");
43029
- removeRelativeStyles(reporter, element, style, "right");
43030
- removeRelativeStyles(reporter, element, style, "bottom");
43031
- removeRelativeStyles(reporter, element, style, "left");
43032
- }
43033
- }
43034
-
43035
- function onObjectLoad() {
43036
- // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM.
43037
- if (!positionCheckPerformed) {
43038
- alterPositionStyles();
43039
- }
43040
-
43041
- /*jshint validthis: true */
43042
-
43043
- function getDocument(element, callback) {
43044
- //Opera 12 seem to call the object.onload before the actual document has been created.
43045
- //So if it is not present, poll it with an timeout until it is present.
43046
- //TODO: Could maybe be handled better with object.onreadystatechange or similar.
43047
- if(!element.contentDocument) {
43048
- var state = getState(element);
43049
- if (state.checkForObjectDocumentTimeoutId) {
43050
- window.clearTimeout(state.checkForObjectDocumentTimeoutId);
43051
- }
43052
- state.checkForObjectDocumentTimeoutId = setTimeout(function checkForObjectDocument() {
43053
- state.checkForObjectDocumentTimeoutId = 0;
43054
- getDocument(element, callback);
43055
- }, 100);
43056
-
43057
- return;
43058
- }
43059
-
43060
- callback(element.contentDocument);
43061
- }
43062
-
43063
- //Mutating the object element here seems to fire another load event.
43064
- //Mutating the inner document of the object element is fine though.
43065
- var objectElement = this;
43066
-
43067
- //Create the style element to be added to the object.
43068
- getDocument(objectElement, function onObjectDocumentReady(objectDocument) {
43069
- //Notify that the element is ready to be listened to.
43070
- callback(element);
43071
- });
43072
- }
43073
-
43074
- // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements.
43075
- // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible.
43076
- if (style.position !== "") {
43077
- alterPositionStyles(style);
43078
- positionCheckPerformed = true;
43079
- }
43080
-
43081
- //Add an object element as a child to the target element that will be listened to for resize events.
43082
- var object = document.createElement("object");
43083
- object.style.cssText = OBJECT_STYLE;
43084
- object.tabIndex = -1;
43085
- object.type = "text/html";
43086
- object.setAttribute("aria-hidden", "true");
43087
- object.onload = onObjectLoad;
43088
-
43089
- //Safari: This must occur before adding the object to the DOM.
43090
- //IE: Does not like that this happens before, even if it is also added after.
43091
- if(!browserDetector.isIE()) {
43092
- object.data = "about:blank";
43093
- }
43094
-
43095
- if (!getState(element)) {
43096
- // The element has been uninstalled before the actual loading happened.
43097
- return;
43098
- }
43099
-
43100
- element.appendChild(object);
43101
- getState(element).object = object;
43102
-
43103
- //IE: This must occur after adding the object to the DOM.
43104
- if(browserDetector.isIE()) {
43105
- object.data = "about:blank";
43106
- }
43107
- }
43108
-
43109
- if(batchProcessor) {
43110
- batchProcessor.add(mutateDom);
43111
- } else {
43112
- mutateDom();
43113
- }
43114
- }
43115
-
43116
- if(browserDetector.isIE(8)) {
43117
- //IE 8 does not support objects properly. Luckily they do support the resize event.
43118
- //So do not inject the object and notify that the element is already ready to be listened to.
43119
- //The event handler for the resize event is attached in the utils.addListener instead.
43120
- callback(element);
43121
- } else {
43122
- injectObject(element, callback);
43123
- }
43124
- }
43125
-
43126
- /**
43127
- * Returns the child object of the target element.
43128
- * @private
43129
- * @param {element} element The target element.
43130
- * @returns The object element of the target.
43131
- */
43132
- function getObject(element) {
43133
- return getState(element).object;
43134
- }
43135
-
43136
- function uninstall(element) {
43137
- if (!getState(element)) {
43138
- return;
43139
- }
43140
-
43141
- var object = getObject(element);
43142
-
43143
- if (!object) {
43144
- return;
43145
- }
43146
-
43147
- if (browserDetector.isIE(8)) {
43148
- element.detachEvent("onresize", object.proxy);
43149
- } else {
43150
- element.removeChild(object);
43151
- }
43152
-
43153
- if (getState(element).checkForObjectDocumentTimeoutId) {
43154
- window.clearTimeout(getState(element).checkForObjectDocumentTimeoutId);
43155
- }
43156
-
43157
- delete getState(element).object;
43158
- }
43159
-
43160
- return {
43161
- makeDetectable: makeDetectable,
43162
- addListener: addListener,
43163
- uninstall: uninstall
43164
- };
43165
- };
43166
-
43167
-
43168
- /***/ }),
43169
-
43170
- /***/ "./node_modules/element-resize-detector/src/detection-strategy/scroll.js":
43171
- /*!*******************************************************************************!*\
43172
- !*** ./node_modules/element-resize-detector/src/detection-strategy/scroll.js ***!
43173
- \*******************************************************************************/
43174
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
43175
-
43176
- "use strict";
43177
- /**
43178
- * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events.
43179
- * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js
43180
- */
43181
-
43182
-
43183
-
43184
- var forEach = (__webpack_require__(/*! ../collection-utils */ "./node_modules/element-resize-detector/src/collection-utils.js").forEach);
43185
-
43186
- module.exports = function(options) {
43187
- options = options || {};
43188
- var reporter = options.reporter;
43189
- var batchProcessor = options.batchProcessor;
43190
- var getState = options.stateHandler.getState;
43191
- var hasState = options.stateHandler.hasState;
43192
- var idHandler = options.idHandler;
43193
-
43194
- if (!batchProcessor) {
43195
- throw new Error("Missing required dependency: batchProcessor");
43196
- }
43197
-
43198
- if (!reporter) {
43199
- throw new Error("Missing required dependency: reporter.");
43200
- }
43201
-
43202
- //TODO: Could this perhaps be done at installation time?
43203
- var scrollbarSizes = getScrollbarSizes();
43204
-
43205
- var styleId = "erd_scroll_detection_scrollbar_style";
43206
- var detectionContainerClass = "erd_scroll_detection_container";
43207
-
43208
- function initDocument(targetDocument) {
43209
- // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome.
43210
- // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements).
43211
- injectScrollStyle(targetDocument, styleId, detectionContainerClass);
43212
- }
43213
-
43214
- initDocument(window.document);
43215
-
43216
- function buildCssTextString(rules) {
43217
- var seperator = options.important ? " !important; " : "; ";
43218
-
43219
- return (rules.join(seperator) + seperator).trim();
43220
- }
43221
-
43222
- function getScrollbarSizes() {
43223
- var width = 500;
43224
- var height = 500;
43225
-
43226
- var child = document.createElement("div");
43227
- child.style.cssText = buildCssTextString(["position: absolute", "width: " + width*2 + "px", "height: " + height*2 + "px", "visibility: hidden", "margin: 0", "padding: 0"]);
43228
-
43229
- var container = document.createElement("div");
43230
- container.style.cssText = buildCssTextString(["position: absolute", "width: " + width + "px", "height: " + height + "px", "overflow: scroll", "visibility: none", "top: " + -width*3 + "px", "left: " + -height*3 + "px", "visibility: hidden", "margin: 0", "padding: 0"]);
43231
-
43232
- container.appendChild(child);
43233
-
43234
- document.body.insertBefore(container, document.body.firstChild);
43235
-
43236
- var widthSize = width - container.clientWidth;
43237
- var heightSize = height - container.clientHeight;
43238
-
43239
- document.body.removeChild(container);
43240
-
43241
- return {
43242
- width: widthSize,
43243
- height: heightSize
43244
- };
43245
- }
43246
-
43247
- function injectScrollStyle(targetDocument, styleId, containerClass) {
43248
- function injectStyle(style, method) {
43249
- method = method || function (element) {
43250
- targetDocument.head.appendChild(element);
43251
- };
43252
-
43253
- var styleElement = targetDocument.createElement("style");
43254
- styleElement.innerHTML = style;
43255
- styleElement.id = styleId;
43256
- method(styleElement);
43257
- return styleElement;
43258
- }
43259
-
43260
- if (!targetDocument.getElementById(styleId)) {
43261
- var containerAnimationClass = containerClass + "_animation";
43262
- var containerAnimationActiveClass = containerClass + "_animation_active";
43263
- var style = "/* Created by the element-resize-detector library. */\n";
43264
- style += "." + containerClass + " > div::-webkit-scrollbar { " + buildCssTextString(["display: none"]) + " }\n\n";
43265
- style += "." + containerAnimationActiveClass + " { " + buildCssTextString(["-webkit-animation-duration: 0.1s", "animation-duration: 0.1s", "-webkit-animation-name: " + containerAnimationClass, "animation-name: " + containerAnimationClass]) + " }\n";
43266
- style += "@-webkit-keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n";
43267
- style += "@keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }";
43268
- injectStyle(style);
43269
- }
43270
- }
43271
-
43272
- function addAnimationClass(element) {
43273
- element.className += " " + detectionContainerClass + "_animation_active";
43274
- }
43275
-
43276
- function addEvent(el, name, cb) {
43277
- if (el.addEventListener) {
43278
- el.addEventListener(name, cb);
43279
- } else if(el.attachEvent) {
43280
- el.attachEvent("on" + name, cb);
43281
- } else {
43282
- return reporter.error("[scroll] Don't know how to add event listeners.");
43283
- }
43284
- }
43285
-
43286
- function removeEvent(el, name, cb) {
43287
- if (el.removeEventListener) {
43288
- el.removeEventListener(name, cb);
43289
- } else if(el.detachEvent) {
43290
- el.detachEvent("on" + name, cb);
43291
- } else {
43292
- return reporter.error("[scroll] Don't know how to remove event listeners.");
43293
- }
43294
- }
43295
-
43296
- function getExpandElement(element) {
43297
- return getState(element).container.childNodes[0].childNodes[0].childNodes[0];
43298
- }
43299
-
43300
- function getShrinkElement(element) {
43301
- return getState(element).container.childNodes[0].childNodes[0].childNodes[1];
43302
- }
43303
-
43304
- /**
43305
- * Adds a resize event listener to the element.
43306
- * @public
43307
- * @param {element} element The element that should have the listener added.
43308
- * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.
43309
- */
43310
- function addListener(element, listener) {
43311
- var listeners = getState(element).listeners;
43312
-
43313
- if (!listeners.push) {
43314
- throw new Error("Cannot add listener to an element that is not detectable.");
43315
- }
43316
-
43317
- getState(element).listeners.push(listener);
43318
- }
43319
-
43320
- /**
43321
- * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.
43322
- * @private
43323
- * @param {object} options Optional options object.
43324
- * @param {element} element The element to make detectable
43325
- * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.
43326
- */
43327
- function makeDetectable(options, element, callback) {
43328
- if (!callback) {
43329
- callback = element;
43330
- element = options;
43331
- options = null;
43332
- }
43333
-
43334
- options = options || {};
43335
-
43336
- function debug() {
43337
- if (options.debug) {
43338
- var args = Array.prototype.slice.call(arguments);
43339
- args.unshift(idHandler.get(element), "Scroll: ");
43340
- if (reporter.log.apply) {
43341
- reporter.log.apply(null, args);
43342
- } else {
43343
- for (var i = 0; i < args.length; i++) {
43344
- reporter.log(args[i]);
43345
- }
43346
- }
43347
- }
43348
- }
43349
-
43350
- function isDetached(element) {
43351
- function isInDocument(element) {
43352
- var isInShadowRoot = element.getRootNode && element.getRootNode().contains(element);
43353
- return element === element.ownerDocument.body || element.ownerDocument.body.contains(element) || isInShadowRoot;
43354
- }
43355
-
43356
- if (!isInDocument(element)) {
43357
- return true;
43358
- }
43359
-
43360
- // FireFox returns null style in hidden iframes. See https://github.com/wnr/element-resize-detector/issues/68 and https://bugzilla.mozilla.org/show_bug.cgi?id=795520
43361
- if (window.getComputedStyle(element) === null) {
43362
- return true;
43363
- }
43364
-
43365
- return false;
43366
- }
43367
-
43368
- function isUnrendered(element) {
43369
- // Check the absolute positioned container since the top level container is display: inline.
43370
- var container = getState(element).container.childNodes[0];
43371
- var style = window.getComputedStyle(container);
43372
- return !style.width || style.width.indexOf("px") === -1; //Can only compute pixel value when rendered.
43373
- }
43374
-
43375
- function getStyle() {
43376
- // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here,
43377
- // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching).
43378
- var elementStyle = window.getComputedStyle(element);
43379
- var style = {};
43380
- style.position = elementStyle.position;
43381
- style.width = element.offsetWidth;
43382
- style.height = element.offsetHeight;
43383
- style.top = elementStyle.top;
43384
- style.right = elementStyle.right;
43385
- style.bottom = elementStyle.bottom;
43386
- style.left = elementStyle.left;
43387
- style.widthCSS = elementStyle.width;
43388
- style.heightCSS = elementStyle.height;
43389
- return style;
43390
- }
43391
-
43392
- function storeStartSize() {
43393
- var style = getStyle();
43394
- getState(element).startSize = {
43395
- width: style.width,
43396
- height: style.height
43397
- };
43398
- debug("Element start size", getState(element).startSize);
43399
- }
43400
-
43401
- function initListeners() {
43402
- getState(element).listeners = [];
43403
- }
43404
-
43405
- function storeStyle() {
43406
- debug("storeStyle invoked.");
43407
- if (!getState(element)) {
43408
- debug("Aborting because element has been uninstalled");
43409
- return;
43410
- }
43411
-
43412
- var style = getStyle();
43413
- getState(element).style = style;
43414
- }
43415
-
43416
- function storeCurrentSize(element, width, height) {
43417
- getState(element).lastWidth = width;
43418
- getState(element).lastHeight = height;
43419
- }
43420
-
43421
- function getExpandChildElement(element) {
43422
- return getExpandElement(element).childNodes[0];
43423
- }
43424
-
43425
- function getWidthOffset() {
43426
- return 2 * scrollbarSizes.width + 1;
43427
- }
43428
-
43429
- function getHeightOffset() {
43430
- return 2 * scrollbarSizes.height + 1;
43431
- }
43432
-
43433
- function getExpandWidth(width) {
43434
- return width + 10 + getWidthOffset();
43435
- }
43436
-
43437
- function getExpandHeight(height) {
43438
- return height + 10 + getHeightOffset();
43439
- }
43440
-
43441
- function getShrinkWidth(width) {
43442
- return width * 2 + getWidthOffset();
43443
- }
43444
-
43445
- function getShrinkHeight(height) {
43446
- return height * 2 + getHeightOffset();
43447
- }
43448
-
43449
- function positionScrollbars(element, width, height) {
43450
- var expand = getExpandElement(element);
43451
- var shrink = getShrinkElement(element);
43452
- var expandWidth = getExpandWidth(width);
43453
- var expandHeight = getExpandHeight(height);
43454
- var shrinkWidth = getShrinkWidth(width);
43455
- var shrinkHeight = getShrinkHeight(height);
43456
- expand.scrollLeft = expandWidth;
43457
- expand.scrollTop = expandHeight;
43458
- shrink.scrollLeft = shrinkWidth;
43459
- shrink.scrollTop = shrinkHeight;
43460
- }
43461
-
43462
- function injectContainerElement() {
43463
- var container = getState(element).container;
43464
-
43465
- if (!container) {
43466
- container = document.createElement("div");
43467
- container.className = detectionContainerClass;
43468
- container.style.cssText = buildCssTextString(["visibility: hidden", "display: inline", "width: 0px", "height: 0px", "z-index: -1", "overflow: hidden", "margin: 0", "padding: 0"]);
43469
- getState(element).container = container;
43470
- addAnimationClass(container);
43471
- element.appendChild(container);
43472
-
43473
- var onAnimationStart = function () {
43474
- getState(element).onRendered && getState(element).onRendered();
43475
- };
43476
-
43477
- addEvent(container, "animationstart", onAnimationStart);
43478
-
43479
- // Store the event handler here so that they may be removed when uninstall is called.
43480
- // See uninstall function for an explanation why it is needed.
43481
- getState(element).onAnimationStart = onAnimationStart;
43482
- }
43483
-
43484
- return container;
43485
- }
43486
-
43487
- function injectScrollElements() {
43488
- function alterPositionStyles() {
43489
- var style = getState(element).style;
43490
-
43491
- if(style.position === "static") {
43492
- element.style.setProperty("position", "relative",options.important ? "important" : "");
43493
-
43494
- var removeRelativeStyles = function(reporter, element, style, property) {
43495
- function getNumericalValue(value) {
43496
- return value.replace(/[^-\d\.]/g, "");
43497
- }
43498
-
43499
- var value = style[property];
43500
-
43501
- if(value !== "auto" && getNumericalValue(value) !== "0") {
43502
- reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element);
43503
- element.style[property] = 0;
43504
- }
43505
- };
43506
-
43507
- //Check so that there are no accidental styles that will make the element styled differently now that is is relative.
43508
- //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).
43509
- removeRelativeStyles(reporter, element, style, "top");
43510
- removeRelativeStyles(reporter, element, style, "right");
43511
- removeRelativeStyles(reporter, element, style, "bottom");
43512
- removeRelativeStyles(reporter, element, style, "left");
43513
- }
43514
- }
43515
-
43516
- function getLeftTopBottomRightCssText(left, top, bottom, right) {
43517
- left = (!left ? "0" : (left + "px"));
43518
- top = (!top ? "0" : (top + "px"));
43519
- bottom = (!bottom ? "0" : (bottom + "px"));
43520
- right = (!right ? "0" : (right + "px"));
43521
-
43522
- return ["left: " + left, "top: " + top, "right: " + right, "bottom: " + bottom];
43523
- }
43524
-
43525
- debug("Injecting elements");
43526
-
43527
- if (!getState(element)) {
43528
- debug("Aborting because element has been uninstalled");
43529
- return;
43530
- }
43531
-
43532
- alterPositionStyles();
43533
-
43534
- var rootContainer = getState(element).container;
43535
-
43536
- if (!rootContainer) {
43537
- rootContainer = injectContainerElement();
43538
- }
43539
-
43540
- // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari),
43541
- // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than
43542
- // the targeted element.
43543
- // When the bug is resolved, "containerContainer" may be removed.
43544
-
43545
- // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980).
43546
- // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px.
43547
-
43548
- var scrollbarWidth = scrollbarSizes.width;
43549
- var scrollbarHeight = scrollbarSizes.height;
43550
- var containerContainerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%", "left: 0px", "top: 0px"]);
43551
- var containerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden"].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth)));
43552
- var expandStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]);
43553
- var shrinkStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]);
43554
- var expandChildStyle = buildCssTextString(["position: absolute", "left: 0", "top: 0"]);
43555
- var shrinkChildStyle = buildCssTextString(["position: absolute", "width: 200%", "height: 200%"]);
43556
-
43557
- var containerContainer = document.createElement("div");
43558
- var container = document.createElement("div");
43559
- var expand = document.createElement("div");
43560
- var expandChild = document.createElement("div");
43561
- var shrink = document.createElement("div");
43562
- var shrinkChild = document.createElement("div");
43563
-
43564
- // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56
43565
- // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers.
43566
- containerContainer.dir = "ltr";
43567
-
43568
- containerContainer.style.cssText = containerContainerStyle;
43569
- containerContainer.className = detectionContainerClass;
43570
- container.className = detectionContainerClass;
43571
- container.style.cssText = containerStyle;
43572
- expand.style.cssText = expandStyle;
43573
- expandChild.style.cssText = expandChildStyle;
43574
- shrink.style.cssText = shrinkStyle;
43575
- shrinkChild.style.cssText = shrinkChildStyle;
43576
-
43577
- expand.appendChild(expandChild);
43578
- shrink.appendChild(shrinkChild);
43579
- container.appendChild(expand);
43580
- container.appendChild(shrink);
43581
- containerContainer.appendChild(container);
43582
- rootContainer.appendChild(containerContainer);
43583
-
43584
- function onExpandScroll() {
43585
- var state = getState(element);
43586
- if (state && state.onExpand) {
43587
- state.onExpand();
43588
- } else {
43589
- debug("Aborting expand scroll handler: element has been uninstalled");
43590
- }
43591
- }
43592
-
43593
- function onShrinkScroll() {
43594
- var state = getState(element);
43595
- if (state && state.onShrink) {
43596
- state.onShrink();
43597
- } else {
43598
- debug("Aborting shrink scroll handler: element has been uninstalled");
43599
- }
43600
- }
43601
-
43602
- addEvent(expand, "scroll", onExpandScroll);
43603
- addEvent(shrink, "scroll", onShrinkScroll);
43604
-
43605
- // Store the event handlers here so that they may be removed when uninstall is called.
43606
- // See uninstall function for an explanation why it is needed.
43607
- getState(element).onExpandScroll = onExpandScroll;
43608
- getState(element).onShrinkScroll = onShrinkScroll;
43609
- }
43610
-
43611
- function registerListenersAndPositionElements() {
43612
- function updateChildSizes(element, width, height) {
43613
- var expandChild = getExpandChildElement(element);
43614
- var expandWidth = getExpandWidth(width);
43615
- var expandHeight = getExpandHeight(height);
43616
- expandChild.style.setProperty("width", expandWidth + "px", options.important ? "important" : "");
43617
- expandChild.style.setProperty("height", expandHeight + "px", options.important ? "important" : "");
43618
- }
43619
-
43620
- function updateDetectorElements(done) {
43621
- var width = element.offsetWidth;
43622
- var height = element.offsetHeight;
43623
-
43624
- // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped.
43625
- var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight;
43626
-
43627
- debug("Storing current size", width, height);
43628
-
43629
- // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners.
43630
- // Otherwise the if-check in handleScroll is useless.
43631
- storeCurrentSize(element, width, height);
43632
-
43633
- // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute.
43634
- // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch.
43635
-
43636
- batchProcessor.add(0, function performUpdateChildSizes() {
43637
- if (!sizeChanged) {
43638
- return;
43639
- }
43640
-
43641
- if (!getState(element)) {
43642
- debug("Aborting because element has been uninstalled");
43643
- return;
43644
- }
43645
-
43646
- if (!areElementsInjected()) {
43647
- debug("Aborting because element container has not been initialized");
43648
- return;
43649
- }
43650
-
43651
- if (options.debug) {
43652
- var w = element.offsetWidth;
43653
- var h = element.offsetHeight;
43654
-
43655
- if (w !== width || h !== height) {
43656
- reporter.warn(idHandler.get(element), "Scroll: Size changed before updating detector elements.");
43657
- }
43658
- }
43659
-
43660
- updateChildSizes(element, width, height);
43661
- });
43662
-
43663
- batchProcessor.add(1, function updateScrollbars() {
43664
- // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then
43665
- // been restored to the original size, which will have changed the scrollbar positions.
43666
-
43667
- if (!getState(element)) {
43668
- debug("Aborting because element has been uninstalled");
43669
- return;
43670
- }
43671
-
43672
- if (!areElementsInjected()) {
43673
- debug("Aborting because element container has not been initialized");
43674
- return;
43675
- }
43676
-
43677
- positionScrollbars(element, width, height);
43678
- });
43679
-
43680
- if (sizeChanged && done) {
43681
- batchProcessor.add(2, function () {
43682
- if (!getState(element)) {
43683
- debug("Aborting because element has been uninstalled");
43684
- return;
43685
- }
43686
-
43687
- if (!areElementsInjected()) {
43688
- debug("Aborting because element container has not been initialized");
43689
- return;
43690
- }
43691
-
43692
- done();
43693
- });
43694
- }
43695
- }
43696
-
43697
- function areElementsInjected() {
43698
- return !!getState(element).container;
43699
- }
43700
-
43701
- function notifyListenersIfNeeded() {
43702
- function isFirstNotify() {
43703
- return getState(element).lastNotifiedWidth === undefined;
43704
- }
43705
-
43706
- debug("notifyListenersIfNeeded invoked");
43707
-
43708
- var state = getState(element);
43709
-
43710
- // Don't notify if the current size is the start size, and this is the first notification.
43711
- if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) {
43712
- return debug("Not notifying: Size is the same as the start size, and there has been no notification yet.");
43713
- }
43714
-
43715
- // Don't notify if the size already has been notified.
43716
- if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) {
43717
- return debug("Not notifying: Size already notified");
43718
- }
43719
-
43720
-
43721
- debug("Current size not notified, notifying...");
43722
- state.lastNotifiedWidth = state.lastWidth;
43723
- state.lastNotifiedHeight = state.lastHeight;
43724
- forEach(getState(element).listeners, function (listener) {
43725
- listener(element);
43726
- });
43727
- }
43728
-
43729
- function handleRender() {
43730
- debug("startanimation triggered.");
43731
-
43732
- if (isUnrendered(element)) {
43733
- debug("Ignoring since element is still unrendered...");
43734
- return;
43735
- }
43736
-
43737
- debug("Element rendered.");
43738
- var expand = getExpandElement(element);
43739
- var shrink = getShrinkElement(element);
43740
- if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) {
43741
- debug("Scrollbars out of sync. Updating detector elements...");
43742
- updateDetectorElements(notifyListenersIfNeeded);
43743
- }
43744
- }
43745
-
43746
- function handleScroll() {
43747
- debug("Scroll detected.");
43748
-
43749
- if (isUnrendered(element)) {
43750
- // Element is still unrendered. Skip this scroll event.
43751
- debug("Scroll event fired while unrendered. Ignoring...");
43752
- return;
43753
- }
43754
-
43755
- updateDetectorElements(notifyListenersIfNeeded);
43756
- }
43757
-
43758
- debug("registerListenersAndPositionElements invoked.");
43759
-
43760
- if (!getState(element)) {
43761
- debug("Aborting because element has been uninstalled");
43762
- return;
43763
- }
43764
-
43765
- getState(element).onRendered = handleRender;
43766
- getState(element).onExpand = handleScroll;
43767
- getState(element).onShrink = handleScroll;
43768
-
43769
- var style = getState(element).style;
43770
- updateChildSizes(element, style.width, style.height);
43771
- }
43772
-
43773
- function finalizeDomMutation() {
43774
- debug("finalizeDomMutation invoked.");
43775
-
43776
- if (!getState(element)) {
43777
- debug("Aborting because element has been uninstalled");
43778
- return;
43779
- }
43780
-
43781
- var style = getState(element).style;
43782
- storeCurrentSize(element, style.width, style.height);
43783
- positionScrollbars(element, style.width, style.height);
43784
- }
43785
-
43786
- function ready() {
43787
- callback(element);
43788
- }
43789
-
43790
- function install() {
43791
- debug("Installing...");
43792
- initListeners();
43793
- storeStartSize();
43794
-
43795
- batchProcessor.add(0, storeStyle);
43796
- batchProcessor.add(1, injectScrollElements);
43797
- batchProcessor.add(2, registerListenersAndPositionElements);
43798
- batchProcessor.add(3, finalizeDomMutation);
43799
- batchProcessor.add(4, ready);
43800
- }
43801
-
43802
- debug("Making detectable...");
43803
-
43804
- if (isDetached(element)) {
43805
- debug("Element is detached");
43806
-
43807
- injectContainerElement();
43808
-
43809
- debug("Waiting until element is attached...");
43810
-
43811
- getState(element).onRendered = function () {
43812
- debug("Element is now attached");
43813
- install();
43814
- };
43815
- } else {
43816
- install();
43817
- }
43818
- }
43819
-
43820
- function uninstall(element) {
43821
- var state = getState(element);
43822
-
43823
- if (!state) {
43824
- // Uninstall has been called on a non-erd element.
43825
- return;
43826
- }
43827
-
43828
- // Uninstall may have been called in the following scenarios:
43829
- // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected).
43830
- // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected).
43831
- // (3) After the installation process (here, state.busy = false and all the stuff has been injected).
43832
- // So to be on the safe side, let's check for each thing before removing.
43833
-
43834
- // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element.
43835
- state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll);
43836
- state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll);
43837
- state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart);
43838
-
43839
- state.container && element.removeChild(state.container);
43840
- }
43841
-
43842
- return {
43843
- makeDetectable: makeDetectable,
43844
- addListener: addListener,
43845
- uninstall: uninstall,
43846
- initDocument: initDocument
43847
- };
43848
- };
43849
-
43850
-
43851
- /***/ }),
43852
-
43853
- /***/ "./node_modules/element-resize-detector/src/element-resize-detector.js":
43854
- /*!*****************************************************************************!*\
43855
- !*** ./node_modules/element-resize-detector/src/element-resize-detector.js ***!
43856
- \*****************************************************************************/
43857
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
43858
-
43859
- "use strict";
43860
-
43861
-
43862
- var forEach = (__webpack_require__(/*! ./collection-utils */ "./node_modules/element-resize-detector/src/collection-utils.js").forEach);
43863
- var elementUtilsMaker = __webpack_require__(/*! ./element-utils */ "./node_modules/element-resize-detector/src/element-utils.js");
43864
- var listenerHandlerMaker = __webpack_require__(/*! ./listener-handler */ "./node_modules/element-resize-detector/src/listener-handler.js");
43865
- var idGeneratorMaker = __webpack_require__(/*! ./id-generator */ "./node_modules/element-resize-detector/src/id-generator.js");
43866
- var idHandlerMaker = __webpack_require__(/*! ./id-handler */ "./node_modules/element-resize-detector/src/id-handler.js");
43867
- var reporterMaker = __webpack_require__(/*! ./reporter */ "./node_modules/element-resize-detector/src/reporter.js");
43868
- var browserDetector = __webpack_require__(/*! ./browser-detector */ "./node_modules/element-resize-detector/src/browser-detector.js");
43869
- var batchProcessorMaker = __webpack_require__(/*! batch-processor */ "./node_modules/batch-processor/src/batch-processor.js");
43870
- var stateHandler = __webpack_require__(/*! ./state-handler */ "./node_modules/element-resize-detector/src/state-handler.js");
43871
-
43872
- //Detection strategies.
43873
- var objectStrategyMaker = __webpack_require__(/*! ./detection-strategy/object.js */ "./node_modules/element-resize-detector/src/detection-strategy/object.js");
43874
- var scrollStrategyMaker = __webpack_require__(/*! ./detection-strategy/scroll.js */ "./node_modules/element-resize-detector/src/detection-strategy/scroll.js");
43875
-
43876
- function isCollection(obj) {
43877
- return Array.isArray(obj) || obj.length !== undefined;
43878
- }
43879
-
43880
- function toArray(collection) {
43881
- if (!Array.isArray(collection)) {
43882
- var array = [];
43883
- forEach(collection, function (obj) {
43884
- array.push(obj);
43885
- });
43886
- return array;
43887
- } else {
43888
- return collection;
43889
- }
43890
- }
43891
-
43892
- function isElement(obj) {
43893
- return obj && obj.nodeType === 1;
43894
- }
43895
-
43896
- /**
43897
- * @typedef idHandler
43898
- * @type {object}
43899
- * @property {function} get Gets the resize detector id of the element.
43900
- * @property {function} set Generate and sets the resize detector id of the element.
43901
- */
43902
-
43903
- /**
43904
- * @typedef Options
43905
- * @type {object}
43906
- * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added.
43907
- Default is true. If true, the listener is guaranteed to be called when it has been added.
43908
- If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called).
43909
- * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements.
43910
- If not provided, a default id handler will be used.
43911
- * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors.
43912
- If not provided, a default id handler will be used.
43913
- If set to false, then nothing will be reported.
43914
- * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method.
43915
- */
43916
-
43917
- /**
43918
- * Creates an element resize detector instance.
43919
- * @public
43920
- * @param {Options?} options Optional global options object that will decide how this instance will work.
43921
- */
43922
- module.exports = function(options) {
43923
- options = options || {};
43924
-
43925
- //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions.
43926
- var idHandler;
43927
-
43928
- if (options.idHandler) {
43929
- // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler
43930
- // so that readonly flag always is true when it's used here. This may be removed next major version bump.
43931
- idHandler = {
43932
- get: function (element) { return options.idHandler.get(element, true); },
43933
- set: options.idHandler.set
43934
- };
43935
- } else {
43936
- var idGenerator = idGeneratorMaker();
43937
- var defaultIdHandler = idHandlerMaker({
43938
- idGenerator: idGenerator,
43939
- stateHandler: stateHandler
43940
- });
43941
- idHandler = defaultIdHandler;
43942
- }
43943
-
43944
- //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions.
43945
- var reporter = options.reporter;
43946
-
43947
- if(!reporter) {
43948
- //If options.reporter is false, then the reporter should be quiet.
43949
- var quiet = reporter === false;
43950
- reporter = reporterMaker(quiet);
43951
- }
43952
-
43953
- //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions.
43954
- var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({ reporter: reporter }));
43955
-
43956
- //Options to be used as default for the listenTo function.
43957
- var globalOptions = {};
43958
- globalOptions.callOnAdd = !!getOption(options, "callOnAdd", true);
43959
- globalOptions.debug = !!getOption(options, "debug", false);
43960
-
43961
- var eventListenerHandler = listenerHandlerMaker(idHandler);
43962
- var elementUtils = elementUtilsMaker({
43963
- stateHandler: stateHandler
43964
- });
43965
-
43966
- //The detection strategy to be used.
43967
- var detectionStrategy;
43968
- var desiredStrategy = getOption(options, "strategy", "object");
43969
- var importantCssRules = getOption(options, "important", false);
43970
- var strategyOptions = {
43971
- reporter: reporter,
43972
- batchProcessor: batchProcessor,
43973
- stateHandler: stateHandler,
43974
- idHandler: idHandler,
43975
- important: importantCssRules
43976
- };
43977
-
43978
- if(desiredStrategy === "scroll") {
43979
- if (browserDetector.isLegacyOpera()) {
43980
- reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy.");
43981
- desiredStrategy = "object";
43982
- } else if (browserDetector.isIE(9)) {
43983
- reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy.");
43984
- desiredStrategy = "object";
43985
- }
43986
- }
43987
-
43988
- if(desiredStrategy === "scroll") {
43989
- detectionStrategy = scrollStrategyMaker(strategyOptions);
43990
- } else if(desiredStrategy === "object") {
43991
- detectionStrategy = objectStrategyMaker(strategyOptions);
43992
- } else {
43993
- throw new Error("Invalid strategy name: " + desiredStrategy);
43994
- }
43995
-
43996
- //Calls can be made to listenTo with elements that are still being installed.
43997
- //Also, same elements can occur in the elements list in the listenTo function.
43998
- //With this map, the ready callbacks can be synchronized between the calls
43999
- //so that the ready callback can always be called when an element is ready - even if
44000
- //it wasn't installed from the function itself.
44001
- var onReadyCallbacks = {};
44002
-
44003
- /**
44004
- * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element.
44005
- * @public
44006
- * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler.
44007
- * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid.
44008
- * @param {function} listener The callback to be executed for each resize event for each element.
44009
- */
44010
- function listenTo(options, elements, listener) {
44011
- function onResizeCallback(element) {
44012
- var listeners = eventListenerHandler.get(element);
44013
- forEach(listeners, function callListenerProxy(listener) {
44014
- listener(element);
44015
- });
44016
- }
44017
-
44018
- function addListener(callOnAdd, element, listener) {
44019
- eventListenerHandler.add(element, listener);
44020
-
44021
- if(callOnAdd) {
44022
- listener(element);
44023
- }
44024
- }
44025
-
44026
- //Options object may be omitted.
44027
- if(!listener) {
44028
- listener = elements;
44029
- elements = options;
44030
- options = {};
44031
- }
44032
-
44033
- if(!elements) {
44034
- throw new Error("At least one element required.");
44035
- }
44036
-
44037
- if(!listener) {
44038
- throw new Error("Listener required.");
44039
- }
44040
-
44041
- if (isElement(elements)) {
44042
- // A single element has been passed in.
44043
- elements = [elements];
44044
- } else if (isCollection(elements)) {
44045
- // Convert collection to array for plugins.
44046
- // TODO: May want to check so that all the elements in the collection are valid elements.
44047
- elements = toArray(elements);
44048
- } else {
44049
- return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
44050
- }
44051
-
44052
- var elementsReady = 0;
44053
-
44054
- var callOnAdd = getOption(options, "callOnAdd", globalOptions.callOnAdd);
44055
- var onReadyCallback = getOption(options, "onReady", function noop() {});
44056
- var debug = getOption(options, "debug", globalOptions.debug);
44057
-
44058
- forEach(elements, function attachListenerToElement(element) {
44059
- if (!stateHandler.getState(element)) {
44060
- stateHandler.initState(element);
44061
- idHandler.set(element);
44062
- }
44063
-
44064
- var id = idHandler.get(element);
44065
-
44066
- debug && reporter.log("Attaching listener to element", id, element);
44067
-
44068
- if(!elementUtils.isDetectable(element)) {
44069
- debug && reporter.log(id, "Not detectable.");
44070
- if(elementUtils.isBusy(element)) {
44071
- debug && reporter.log(id, "System busy making it detectable");
44072
-
44073
- //The element is being prepared to be detectable. Do not make it detectable.
44074
- //Just add the listener, because the element will soon be detectable.
44075
- addListener(callOnAdd, element, listener);
44076
- onReadyCallbacks[id] = onReadyCallbacks[id] || [];
44077
- onReadyCallbacks[id].push(function onReady() {
44078
- elementsReady++;
44079
-
44080
- if(elementsReady === elements.length) {
44081
- onReadyCallback();
44082
- }
44083
- });
44084
- return;
44085
- }
44086
-
44087
- debug && reporter.log(id, "Making detectable...");
44088
- //The element is not prepared to be detectable, so do prepare it and add a listener to it.
44089
- elementUtils.markBusy(element, true);
44090
- return detectionStrategy.makeDetectable({ debug: debug, important: importantCssRules }, element, function onElementDetectable(element) {
44091
- debug && reporter.log(id, "onElementDetectable");
44092
-
44093
- if (stateHandler.getState(element)) {
44094
- elementUtils.markAsDetectable(element);
44095
- elementUtils.markBusy(element, false);
44096
- detectionStrategy.addListener(element, onResizeCallback);
44097
- addListener(callOnAdd, element, listener);
44098
-
44099
- // Since the element size might have changed since the call to "listenTo", we need to check for this change,
44100
- // so that a resize event may be emitted.
44101
- // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before.
44102
- // Also, check the state existance before since the element may have been uninstalled in the installation process.
44103
- var state = stateHandler.getState(element);
44104
- if (state && state.startSize) {
44105
- var width = element.offsetWidth;
44106
- var height = element.offsetHeight;
44107
- if (state.startSize.width !== width || state.startSize.height !== height) {
44108
- onResizeCallback(element);
44109
- }
44110
- }
44111
-
44112
- if(onReadyCallbacks[id]) {
44113
- forEach(onReadyCallbacks[id], function(callback) {
44114
- callback();
44115
- });
44116
- }
44117
- } else {
44118
- // The element has been unisntalled before being detectable.
44119
- debug && reporter.log(id, "Element uninstalled before being detectable.");
44120
- }
44121
-
44122
- delete onReadyCallbacks[id];
44123
-
44124
- elementsReady++;
44125
- if(elementsReady === elements.length) {
44126
- onReadyCallback();
44127
- }
44128
- });
44129
- }
44130
-
44131
- debug && reporter.log(id, "Already detecable, adding listener.");
44132
-
44133
- //The element has been prepared to be detectable and is ready to be listened to.
44134
- addListener(callOnAdd, element, listener);
44135
- elementsReady++;
44136
- });
44137
-
44138
- if(elementsReady === elements.length) {
44139
- onReadyCallback();
44140
- }
44141
- }
44142
-
44143
- function uninstall(elements) {
44144
- if(!elements) {
44145
- return reporter.error("At least one element is required.");
44146
- }
44147
-
44148
- if (isElement(elements)) {
44149
- // A single element has been passed in.
44150
- elements = [elements];
44151
- } else if (isCollection(elements)) {
44152
- // Convert collection to array for plugins.
44153
- // TODO: May want to check so that all the elements in the collection are valid elements.
44154
- elements = toArray(elements);
44155
- } else {
44156
- return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
44157
- }
44158
-
44159
- forEach(elements, function (element) {
44160
- eventListenerHandler.removeAllListeners(element);
44161
- detectionStrategy.uninstall(element);
44162
- stateHandler.cleanState(element);
44163
- });
44164
- }
44165
-
44166
- function initDocument(targetDocument) {
44167
- detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument);
44168
- }
44169
-
44170
- return {
44171
- listenTo: listenTo,
44172
- removeListener: eventListenerHandler.removeListener,
44173
- removeAllListeners: eventListenerHandler.removeAllListeners,
44174
- uninstall: uninstall,
44175
- initDocument: initDocument
44176
- };
44177
- };
44178
-
44179
- function getOption(options, name, defaultValue) {
44180
- var value = options[name];
44181
-
44182
- if((value === undefined || value === null) && defaultValue !== undefined) {
44183
- return defaultValue;
44184
- }
44185
-
44186
- return value;
44187
- }
44188
-
44189
-
44190
- /***/ }),
44191
-
44192
- /***/ "./node_modules/element-resize-detector/src/element-utils.js":
44193
- /*!*******************************************************************!*\
44194
- !*** ./node_modules/element-resize-detector/src/element-utils.js ***!
44195
- \*******************************************************************/
44196
- /***/ ((module) => {
44197
-
44198
- "use strict";
44199
-
44200
-
44201
- module.exports = function(options) {
44202
- var getState = options.stateHandler.getState;
44203
-
44204
- /**
44205
- * Tells if the element has been made detectable and ready to be listened for resize events.
44206
- * @public
44207
- * @param {element} The element to check.
44208
- * @returns {boolean} True or false depending on if the element is detectable or not.
44209
- */
44210
- function isDetectable(element) {
44211
- var state = getState(element);
44212
- return state && !!state.isDetectable;
44213
- }
44214
-
44215
- /**
44216
- * Marks the element that it has been made detectable and ready to be listened for resize events.
44217
- * @public
44218
- * @param {element} The element to mark.
44219
- */
44220
- function markAsDetectable(element) {
44221
- getState(element).isDetectable = true;
44222
- }
44223
-
44224
- /**
44225
- * Tells if the element is busy or not.
44226
- * @public
44227
- * @param {element} The element to check.
44228
- * @returns {boolean} True or false depending on if the element is busy or not.
44229
- */
44230
- function isBusy(element) {
44231
- return !!getState(element).busy;
44232
- }
44233
-
44234
- /**
44235
- * Marks the object is busy and should not be made detectable.
44236
- * @public
44237
- * @param {element} element The element to mark.
44238
- * @param {boolean} busy If the element is busy or not.
44239
- */
44240
- function markBusy(element, busy) {
44241
- getState(element).busy = !!busy;
44242
- }
44243
-
44244
- return {
44245
- isDetectable: isDetectable,
44246
- markAsDetectable: markAsDetectable,
44247
- isBusy: isBusy,
44248
- markBusy: markBusy
44249
- };
44250
- };
44251
-
44252
-
44253
- /***/ }),
44254
-
44255
- /***/ "./node_modules/element-resize-detector/src/id-generator.js":
44256
- /*!******************************************************************!*\
44257
- !*** ./node_modules/element-resize-detector/src/id-generator.js ***!
44258
- \******************************************************************/
44259
- /***/ ((module) => {
44260
-
44261
- "use strict";
44262
-
44263
-
44264
- module.exports = function() {
44265
- var idCount = 1;
44266
-
44267
- /**
44268
- * Generates a new unique id in the context.
44269
- * @public
44270
- * @returns {number} A unique id in the context.
44271
- */
44272
- function generate() {
44273
- return idCount++;
44274
- }
44275
-
44276
- return {
44277
- generate: generate
44278
- };
44279
- };
44280
-
44281
-
44282
- /***/ }),
44283
-
44284
- /***/ "./node_modules/element-resize-detector/src/id-handler.js":
44285
- /*!****************************************************************!*\
44286
- !*** ./node_modules/element-resize-detector/src/id-handler.js ***!
44287
- \****************************************************************/
44288
- /***/ ((module) => {
44289
-
44290
- "use strict";
44291
-
44292
-
44293
- module.exports = function(options) {
44294
- var idGenerator = options.idGenerator;
44295
- var getState = options.stateHandler.getState;
44296
-
44297
- /**
44298
- * Gets the resize detector id of the element.
44299
- * @public
44300
- * @param {element} element The target element to get the id of.
44301
- * @returns {string|number|null} The id of the element. Null if it has no id.
44302
- */
44303
- function getId(element) {
44304
- var state = getState(element);
44305
-
44306
- if (state && state.id !== undefined) {
44307
- return state.id;
44308
- }
44309
-
44310
- return null;
44311
- }
44312
-
44313
- /**
44314
- * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized.
44315
- * @public
44316
- * @param {element} element The target element to set the id of.
44317
- * @returns {string|number|null} The id of the element.
44318
- */
44319
- function setId(element) {
44320
- var state = getState(element);
44321
-
44322
- if (!state) {
44323
- throw new Error("setId required the element to have a resize detection state.");
44324
- }
44325
-
44326
- var id = idGenerator.generate();
44327
-
44328
- state.id = id;
44329
-
44330
- return id;
44331
- }
44332
-
44333
- return {
44334
- get: getId,
44335
- set: setId
44336
- };
44337
- };
44338
-
44339
-
44340
- /***/ }),
44341
-
44342
- /***/ "./node_modules/element-resize-detector/src/listener-handler.js":
44343
- /*!**********************************************************************!*\
44344
- !*** ./node_modules/element-resize-detector/src/listener-handler.js ***!
44345
- \**********************************************************************/
44346
- /***/ ((module) => {
44347
-
44348
- "use strict";
44349
-
44350
-
44351
- module.exports = function(idHandler) {
44352
- var eventListeners = {};
44353
-
44354
- /**
44355
- * Gets all listeners for the given element.
44356
- * @public
44357
- * @param {element} element The element to get all listeners for.
44358
- * @returns All listeners for the given element.
44359
- */
44360
- function getListeners(element) {
44361
- var id = idHandler.get(element);
44362
-
44363
- if (id === undefined) {
44364
- return [];
44365
- }
44366
-
44367
- return eventListeners[id] || [];
44368
- }
44369
-
44370
- /**
44371
- * Stores the given listener for the given element. Will not actually add the listener to the element.
44372
- * @public
44373
- * @param {element} element The element that should have the listener added.
44374
- * @param {function} listener The callback that the element has added.
44375
- */
44376
- function addListener(element, listener) {
44377
- var id = idHandler.get(element);
44378
-
44379
- if(!eventListeners[id]) {
44380
- eventListeners[id] = [];
44381
- }
44382
-
44383
- eventListeners[id].push(listener);
44384
- }
44385
-
44386
- function removeListener(element, listener) {
44387
- var listeners = getListeners(element);
44388
- for (var i = 0, len = listeners.length; i < len; ++i) {
44389
- if (listeners[i] === listener) {
44390
- listeners.splice(i, 1);
44391
- break;
44392
- }
44393
- }
44394
- }
44395
-
44396
- function removeAllListeners(element) {
44397
- var listeners = getListeners(element);
44398
- if (!listeners) { return; }
44399
- listeners.length = 0;
44400
- }
44401
-
44402
- return {
44403
- get: getListeners,
44404
- add: addListener,
44405
- removeListener: removeListener,
44406
- removeAllListeners: removeAllListeners
44407
- };
44408
- };
44409
-
44410
-
44411
- /***/ }),
44412
-
44413
- /***/ "./node_modules/element-resize-detector/src/reporter.js":
44414
- /*!**************************************************************!*\
44415
- !*** ./node_modules/element-resize-detector/src/reporter.js ***!
44416
- \**************************************************************/
44417
- /***/ ((module) => {
44418
-
44419
- "use strict";
44420
-
44421
-
44422
- /* global console: false */
44423
-
44424
- /**
44425
- * Reporter that handles the reporting of logs, warnings and errors.
44426
- * @public
44427
- * @param {boolean} quiet Tells if the reporter should be quiet or not.
44428
- */
44429
- module.exports = function(quiet) {
44430
- function noop() {
44431
- //Does nothing.
44432
- }
44433
-
44434
- var reporter = {
44435
- log: noop,
44436
- warn: noop,
44437
- error: noop
44438
- };
44439
-
44440
- if(!quiet && window.console) {
44441
- var attachFunction = function(reporter, name) {
44442
- //The proxy is needed to be able to call the method with the console context,
44443
- //since we cannot use bind.
44444
- reporter[name] = function reporterProxy() {
44445
- var f = console[name];
44446
- if (f.apply) { //IE9 does not support console.log.apply :)
44447
- f.apply(console, arguments);
44448
- } else {
44449
- for (var i = 0; i < arguments.length; i++) {
44450
- f(arguments[i]);
44451
- }
44452
- }
44453
- };
44454
- };
44455
-
44456
- attachFunction(reporter, "log");
44457
- attachFunction(reporter, "warn");
44458
- attachFunction(reporter, "error");
44459
- }
44460
-
44461
- return reporter;
44462
- };
44463
-
44464
- /***/ }),
44465
-
44466
- /***/ "./node_modules/element-resize-detector/src/state-handler.js":
44467
- /*!*******************************************************************!*\
44468
- !*** ./node_modules/element-resize-detector/src/state-handler.js ***!
44469
- \*******************************************************************/
44470
- /***/ ((module) => {
44471
-
44472
- "use strict";
44473
-
44474
-
44475
- var prop = "_erd";
44476
-
44477
- function initState(element) {
44478
- element[prop] = {};
44479
- return getState(element);
44480
- }
44481
-
44482
- function getState(element) {
44483
- return element[prop];
44484
- }
44485
-
44486
- function cleanState(element) {
44487
- delete element[prop];
44488
- }
44489
-
44490
- module.exports = {
44491
- initState: initState,
44492
- getState: getState,
44493
- cleanState: cleanState
44494
- };
44495
-
44496
-
44497
42655
  /***/ }),
44498
42656
 
44499
42657
  /***/ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":
@@ -44608,66 +42766,6 @@ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
44608
42766
  module.exports = hoistNonReactStatics;
44609
42767
 
44610
42768
 
44611
- /***/ }),
44612
-
44613
- /***/ "./node_modules/invariant/browser.js":
44614
- /*!*******************************************!*\
44615
- !*** ./node_modules/invariant/browser.js ***!
44616
- \*******************************************/
44617
- /***/ ((module) => {
44618
-
44619
- "use strict";
44620
- /**
44621
- * Copyright (c) 2013-present, Facebook, Inc.
44622
- *
44623
- * This source code is licensed under the MIT license found in the
44624
- * LICENSE file in the root directory of this source tree.
44625
- */
44626
-
44627
-
44628
-
44629
- /**
44630
- * Use invariant() to assert state which your program assumes to be true.
44631
- *
44632
- * Provide sprintf-style format (only %s is supported) and arguments
44633
- * to provide information about what broke and what you were
44634
- * expecting.
44635
- *
44636
- * The invariant message will be stripped in production, but the invariant
44637
- * will remain to ensure logic does not differ in production.
44638
- */
44639
-
44640
- var invariant = function(condition, format, a, b, c, d, e, f) {
44641
- if (true) {
44642
- if (format === undefined) {
44643
- throw new Error('invariant requires an error message argument');
44644
- }
44645
- }
44646
-
44647
- if (!condition) {
44648
- var error;
44649
- if (format === undefined) {
44650
- error = new Error(
44651
- 'Minified exception occurred; use the non-minified dev environment ' +
44652
- 'for the full error message and additional helpful warnings.'
44653
- );
44654
- } else {
44655
- var args = [a, b, c, d, e, f];
44656
- var argIndex = 0;
44657
- error = new Error(
44658
- format.replace(/%s/g, function() { return args[argIndex++]; })
44659
- );
44660
- error.name = 'Invariant Violation';
44661
- }
44662
-
44663
- error.framesToPop = 1; // we don't care about invariant's own frame
44664
- throw error;
44665
- }
44666
- };
44667
-
44668
- module.exports = invariant;
44669
-
44670
-
44671
42769
  /***/ }),
44672
42770
 
44673
42771
  /***/ "./node_modules/lodash/_MapCache.js":
@@ -57666,677 +55764,6 @@ function useStateManager(_ref) {
57666
55764
 
57667
55765
 
57668
55766
 
57669
- /***/ }),
57670
-
57671
- /***/ "./node_modules/react-sizeme/dist/react-sizeme.js":
57672
- /*!********************************************************!*\
57673
- !*** ./node_modules/react-sizeme/dist/react-sizeme.js ***!
57674
- \********************************************************/
57675
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
57676
-
57677
- "use strict";
57678
-
57679
-
57680
- var React = __webpack_require__(/*! react */ "react");
57681
- var ReactDOM = __webpack_require__(/*! react-dom */ "react-dom");
57682
- var invariant = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
57683
- var throttleDebounce = __webpack_require__(/*! throttle-debounce */ "./node_modules/throttle-debounce/cjs/index.js");
57684
- var createResizeDetector = __webpack_require__(/*! element-resize-detector */ "./node_modules/element-resize-detector/src/element-resize-detector.js");
57685
- var isShallowEqual = __webpack_require__(/*! shallowequal */ "./node_modules/shallowequal/index.js");
57686
-
57687
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
57688
-
57689
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
57690
- var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
57691
- var invariant__default = /*#__PURE__*/_interopDefaultLegacy(invariant);
57692
- var createResizeDetector__default = /*#__PURE__*/_interopDefaultLegacy(createResizeDetector);
57693
- var isShallowEqual__default = /*#__PURE__*/_interopDefaultLegacy(isShallowEqual);
57694
-
57695
- function ownKeys(object, enumerableOnly) {
57696
- var keys = Object.keys(object);
57697
-
57698
- if (Object.getOwnPropertySymbols) {
57699
- var symbols = Object.getOwnPropertySymbols(object);
57700
-
57701
- if (enumerableOnly) {
57702
- symbols = symbols.filter(function (sym) {
57703
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
57704
- });
57705
- }
57706
-
57707
- keys.push.apply(keys, symbols);
57708
- }
57709
-
57710
- return keys;
57711
- }
57712
-
57713
- function _objectSpread2(target) {
57714
- for (var i = 1; i < arguments.length; i++) {
57715
- var source = arguments[i] != null ? arguments[i] : {};
57716
-
57717
- if (i % 2) {
57718
- ownKeys(Object(source), true).forEach(function (key) {
57719
- _defineProperty(target, key, source[key]);
57720
- });
57721
- } else if (Object.getOwnPropertyDescriptors) {
57722
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
57723
- } else {
57724
- ownKeys(Object(source)).forEach(function (key) {
57725
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
57726
- });
57727
- }
57728
- }
57729
-
57730
- return target;
57731
- }
57732
-
57733
- function _classCallCheck(instance, Constructor) {
57734
- if (!(instance instanceof Constructor)) {
57735
- throw new TypeError("Cannot call a class as a function");
57736
- }
57737
- }
57738
-
57739
- function _defineProperties(target, props) {
57740
- for (var i = 0; i < props.length; i++) {
57741
- var descriptor = props[i];
57742
- descriptor.enumerable = descriptor.enumerable || false;
57743
- descriptor.configurable = true;
57744
- if ("value" in descriptor) descriptor.writable = true;
57745
- Object.defineProperty(target, descriptor.key, descriptor);
57746
- }
57747
- }
57748
-
57749
- function _createClass(Constructor, protoProps, staticProps) {
57750
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
57751
- if (staticProps) _defineProperties(Constructor, staticProps);
57752
- return Constructor;
57753
- }
57754
-
57755
- function _defineProperty(obj, key, value) {
57756
- if (key in obj) {
57757
- Object.defineProperty(obj, key, {
57758
- value: value,
57759
- enumerable: true,
57760
- configurable: true,
57761
- writable: true
57762
- });
57763
- } else {
57764
- obj[key] = value;
57765
- }
57766
-
57767
- return obj;
57768
- }
57769
-
57770
- function _extends() {
57771
- _extends = Object.assign || function (target) {
57772
- for (var i = 1; i < arguments.length; i++) {
57773
- var source = arguments[i];
57774
-
57775
- for (var key in source) {
57776
- if (Object.prototype.hasOwnProperty.call(source, key)) {
57777
- target[key] = source[key];
57778
- }
57779
- }
57780
- }
57781
-
57782
- return target;
57783
- };
57784
-
57785
- return _extends.apply(this, arguments);
57786
- }
57787
-
57788
- function _inherits(subClass, superClass) {
57789
- if (typeof superClass !== "function" && superClass !== null) {
57790
- throw new TypeError("Super expression must either be null or a function");
57791
- }
57792
-
57793
- subClass.prototype = Object.create(superClass && superClass.prototype, {
57794
- constructor: {
57795
- value: subClass,
57796
- writable: true,
57797
- configurable: true
57798
- }
57799
- });
57800
- if (superClass) _setPrototypeOf(subClass, superClass);
57801
- }
57802
-
57803
- function _getPrototypeOf(o) {
57804
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
57805
- return o.__proto__ || Object.getPrototypeOf(o);
57806
- };
57807
- return _getPrototypeOf(o);
57808
- }
57809
-
57810
- function _setPrototypeOf(o, p) {
57811
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
57812
- o.__proto__ = p;
57813
- return o;
57814
- };
57815
-
57816
- return _setPrototypeOf(o, p);
57817
- }
57818
-
57819
- function _isNativeReflectConstruct() {
57820
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
57821
- if (Reflect.construct.sham) return false;
57822
- if (typeof Proxy === "function") return true;
57823
-
57824
- try {
57825
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
57826
- return true;
57827
- } catch (e) {
57828
- return false;
57829
- }
57830
- }
57831
-
57832
- function _objectWithoutPropertiesLoose(source, excluded) {
57833
- if (source == null) return {};
57834
- var target = {};
57835
- var sourceKeys = Object.keys(source);
57836
- var key, i;
57837
-
57838
- for (i = 0; i < sourceKeys.length; i++) {
57839
- key = sourceKeys[i];
57840
- if (excluded.indexOf(key) >= 0) continue;
57841
- target[key] = source[key];
57842
- }
57843
-
57844
- return target;
57845
- }
57846
-
57847
- function _objectWithoutProperties(source, excluded) {
57848
- if (source == null) return {};
57849
-
57850
- var target = _objectWithoutPropertiesLoose(source, excluded);
57851
-
57852
- var key, i;
57853
-
57854
- if (Object.getOwnPropertySymbols) {
57855
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
57856
-
57857
- for (i = 0; i < sourceSymbolKeys.length; i++) {
57858
- key = sourceSymbolKeys[i];
57859
- if (excluded.indexOf(key) >= 0) continue;
57860
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
57861
- target[key] = source[key];
57862
- }
57863
- }
57864
-
57865
- return target;
57866
- }
57867
-
57868
- function _assertThisInitialized(self) {
57869
- if (self === void 0) {
57870
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
57871
- }
57872
-
57873
- return self;
57874
- }
57875
-
57876
- function _possibleConstructorReturn(self, call) {
57877
- if (call && (typeof call === "object" || typeof call === "function")) {
57878
- return call;
57879
- } else if (call !== void 0) {
57880
- throw new TypeError("Derived constructors may only return object or undefined");
57881
- }
57882
-
57883
- return _assertThisInitialized(self);
57884
- }
57885
-
57886
- function _createSuper(Derived) {
57887
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
57888
-
57889
- return function _createSuperInternal() {
57890
- var Super = _getPrototypeOf(Derived),
57891
- result;
57892
-
57893
- if (hasNativeReflectConstruct) {
57894
- var NewTarget = _getPrototypeOf(this).constructor;
57895
-
57896
- result = Reflect.construct(Super, arguments, NewTarget);
57897
- } else {
57898
- result = Super.apply(this, arguments);
57899
- }
57900
-
57901
- return _possibleConstructorReturn(this, result);
57902
- };
57903
- }
57904
-
57905
- var instances = {}; // Lazily require to not cause bug
57906
- // https://github.com/ctrlplusb/react-sizeme/issues/6
57907
-
57908
- function resizeDetector() {
57909
- var strategy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'scroll';
57910
-
57911
- if (!instances[strategy]) {
57912
- instances[strategy] = createResizeDetector__default['default']({
57913
- strategy: strategy
57914
- });
57915
- }
57916
-
57917
- return instances[strategy];
57918
- }
57919
-
57920
- var _excluded$1 = ["explicitRef", "className", "style", "size", "disablePlaceholder", "onSize"];
57921
- var errMsg = 'react-sizeme: an error occurred whilst stopping to listen to node size changes';
57922
- var defaultConfig = {
57923
- monitorWidth: true,
57924
- monitorHeight: false,
57925
- refreshRate: 16,
57926
- refreshMode: 'throttle',
57927
- noPlaceholder: false,
57928
- resizeDetectorStrategy: 'scroll'
57929
- };
57930
-
57931
- function getDisplayName(WrappedComponent) {
57932
- return WrappedComponent.displayName || WrappedComponent.name || 'Component';
57933
- }
57934
- /**
57935
- * This is a utility wrapper component that will allow our higher order
57936
- * component to get a ref handle on our wrapped components html.
57937
- * @see https://gist.github.com/jimfb/32b587ee6177665fb4cf
57938
- */
57939
-
57940
-
57941
- var ReferenceWrapper = /*#__PURE__*/function (_Component) {
57942
- _inherits(ReferenceWrapper, _Component);
57943
-
57944
- var _super = _createSuper(ReferenceWrapper);
57945
-
57946
- function ReferenceWrapper() {
57947
- _classCallCheck(this, ReferenceWrapper);
57948
-
57949
- return _super.apply(this, arguments);
57950
- }
57951
-
57952
- _createClass(ReferenceWrapper, [{
57953
- key: "render",
57954
- value: function render() {
57955
- return React.Children.only(this.props.children);
57956
- }
57957
- }]);
57958
-
57959
- return ReferenceWrapper;
57960
- }(React.Component);
57961
-
57962
- _defineProperty(ReferenceWrapper, "displayName", 'SizeMeReferenceWrapper');
57963
-
57964
- function Placeholder(_ref) {
57965
- var className = _ref.className,
57966
- style = _ref.style;
57967
- // Lets create the props for the temp element.
57968
- var phProps = {}; // We will use any provided className/style or else make the temp
57969
- // container take the full available space.
57970
-
57971
- if (!className && !style) {
57972
- phProps.style = {
57973
- width: '100%',
57974
- height: '100%'
57975
- };
57976
- } else {
57977
- if (className) {
57978
- phProps.className = className;
57979
- }
57980
-
57981
- if (style) {
57982
- phProps.style = style;
57983
- }
57984
- }
57985
-
57986
- return /*#__PURE__*/React__default['default'].createElement("div", phProps);
57987
- }
57988
-
57989
- Placeholder.displayName = 'SizeMePlaceholder';
57990
- /**
57991
- * As we need to maintain a ref on the root node that is rendered within our
57992
- * SizeMe component we need to wrap our entire render in a sub component.
57993
- * Without this, we lose the DOM ref after the placeholder is removed from
57994
- * the render and the actual component is rendered.
57995
- * It took me forever to figure this out, so tread extra careful on this one!
57996
- */
57997
-
57998
- var renderWrapper = function renderWrapper(WrappedComponent) {
57999
- function SizeMeRenderer(props) {
58000
- var explicitRef = props.explicitRef,
58001
- className = props.className,
58002
- style = props.style,
58003
- size = props.size,
58004
- disablePlaceholder = props.disablePlaceholder;
58005
- props.onSize;
58006
- var restProps = _objectWithoutProperties(props, _excluded$1);
58007
-
58008
- var noSizeData = size == null || size.width == null && size.height == null;
58009
- var renderPlaceholder = noSizeData && !disablePlaceholder;
58010
- var renderProps = {
58011
- className: className,
58012
- style: style
58013
- };
58014
-
58015
- if (size != null) {
58016
- renderProps.size = size;
58017
- }
58018
-
58019
- var toRender = renderPlaceholder ? /*#__PURE__*/React__default['default'].createElement(Placeholder, {
58020
- className: className,
58021
- style: style
58022
- }) : /*#__PURE__*/React__default['default'].createElement(WrappedComponent, _extends({}, renderProps, restProps));
58023
- return /*#__PURE__*/React__default['default'].createElement(ReferenceWrapper, {
58024
- ref: explicitRef
58025
- }, toRender);
58026
- }
58027
-
58028
- SizeMeRenderer.displayName = "SizeMeRenderer(".concat(getDisplayName(WrappedComponent), ")");
58029
- return SizeMeRenderer;
58030
- };
58031
- /**
58032
- * :: config -> Component -> WrappedComponent
58033
- *
58034
- * Higher order component that allows the wrapped component to become aware
58035
- * of it's size, by receiving it as an object within it's props.
58036
- *
58037
- * @param monitorWidth
58038
- * Default true, whether changes in the element's width should be monitored,
58039
- * causing a size property to be broadcast.
58040
- * @param monitorHeight
58041
- * Default false, whether changes in the element's height should be monitored,
58042
- * causing a size property to be broadcast.
58043
- *
58044
- * @return The wrapped component.
58045
- */
58046
-
58047
-
58048
- function withSize() {
58049
- var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultConfig;
58050
- var _config$monitorWidth = config.monitorWidth,
58051
- monitorWidth = _config$monitorWidth === void 0 ? defaultConfig.monitorWidth : _config$monitorWidth,
58052
- _config$monitorHeight = config.monitorHeight,
58053
- monitorHeight = _config$monitorHeight === void 0 ? defaultConfig.monitorHeight : _config$monitorHeight,
58054
- _config$refreshRate = config.refreshRate,
58055
- refreshRate = _config$refreshRate === void 0 ? defaultConfig.refreshRate : _config$refreshRate,
58056
- _config$refreshMode = config.refreshMode,
58057
- refreshMode = _config$refreshMode === void 0 ? defaultConfig.refreshMode : _config$refreshMode,
58058
- _config$noPlaceholder = config.noPlaceholder,
58059
- noPlaceholder = _config$noPlaceholder === void 0 ? defaultConfig.noPlaceholder : _config$noPlaceholder,
58060
- _config$resizeDetecto = config.resizeDetectorStrategy,
58061
- resizeDetectorStrategy = _config$resizeDetecto === void 0 ? defaultConfig.resizeDetectorStrategy : _config$resizeDetecto;
58062
- invariant__default['default'](monitorWidth || monitorHeight, 'You have to monitor at least one of the width or height when using "sizeMe"');
58063
- invariant__default['default'](refreshRate >= 16, "It is highly recommended that you don't put your refreshRate lower than " + '16 as this may cause layout thrashing.');
58064
- invariant__default['default'](refreshMode === 'throttle' || refreshMode === 'debounce', 'The refreshMode should have a value of "throttle" or "debounce"');
58065
- var refreshDelayStrategy = refreshMode === 'throttle' ? throttleDebounce.throttle : throttleDebounce.debounce;
58066
- return function WrapComponent(WrappedComponent) {
58067
- var SizeMeRenderWrapper = renderWrapper(WrappedComponent);
58068
-
58069
- var SizeAwareComponent = /*#__PURE__*/function (_React$Component) {
58070
- _inherits(SizeAwareComponent, _React$Component);
58071
-
58072
- var _super2 = _createSuper(SizeAwareComponent);
58073
-
58074
- function SizeAwareComponent() {
58075
- var _this;
58076
-
58077
- _classCallCheck(this, SizeAwareComponent);
58078
-
58079
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
58080
- args[_key] = arguments[_key];
58081
- }
58082
-
58083
- _this = _super2.call.apply(_super2, [this].concat(args));
58084
-
58085
- _defineProperty(_assertThisInitialized(_this), "domEl", null);
58086
-
58087
- _defineProperty(_assertThisInitialized(_this), "state", {
58088
- width: undefined,
58089
- height: undefined
58090
- });
58091
-
58092
- _defineProperty(_assertThisInitialized(_this), "uninstall", function () {
58093
- if (_this.domEl) {
58094
- try {
58095
- _this.detector.uninstall(_this.domEl);
58096
- } catch (err) {
58097
- // eslint-disable-next-line no-console
58098
- console.warn(errMsg);
58099
- }
58100
-
58101
- _this.domEl = null;
58102
- }
58103
- });
58104
-
58105
- _defineProperty(_assertThisInitialized(_this), "determineStrategy", function (props) {
58106
- if (props.onSize) {
58107
- if (!_this.callbackState) {
58108
- _this.callbackState = _objectSpread2({}, _this.state);
58109
- }
58110
-
58111
- _this.strategy = 'callback';
58112
- } else {
58113
- _this.strategy = 'render';
58114
- }
58115
- });
58116
-
58117
- _defineProperty(_assertThisInitialized(_this), "strategisedSetState", function (state) {
58118
- if (_this.strategy === 'callback') {
58119
- _this.callbackState = state;
58120
-
58121
- _this.props.onSize(state);
58122
- }
58123
-
58124
- _this.setState(state);
58125
- });
58126
-
58127
- _defineProperty(_assertThisInitialized(_this), "strategisedGetState", function () {
58128
- return _this.strategy === 'callback' ? _this.callbackState : _this.state;
58129
- });
58130
-
58131
- _defineProperty(_assertThisInitialized(_this), "refCallback", function (element) {
58132
- _this.element = element;
58133
- });
58134
-
58135
- _defineProperty(_assertThisInitialized(_this), "hasSizeChanged", function (current, next) {
58136
- var c = current;
58137
- var n = next;
58138
- return monitorWidth && c.width !== n.width || monitorHeight && c.height !== n.height;
58139
- });
58140
-
58141
- _defineProperty(_assertThisInitialized(_this), "checkIfSizeChanged", refreshDelayStrategy(refreshRate, function (el) {
58142
- var _el$getBoundingClient = el.getBoundingClientRect(),
58143
- width = _el$getBoundingClient.width,
58144
- height = _el$getBoundingClient.height;
58145
-
58146
- var next = {
58147
- width: monitorWidth ? width : null,
58148
- height: monitorHeight ? height : null
58149
- };
58150
-
58151
- if (_this.hasSizeChanged(_this.strategisedGetState(), next)) {
58152
- _this.strategisedSetState(next);
58153
- }
58154
- }));
58155
-
58156
- return _this;
58157
- }
58158
-
58159
- _createClass(SizeAwareComponent, [{
58160
- key: "componentDidMount",
58161
- value: function componentDidMount() {
58162
- this.detector = resizeDetector(resizeDetectorStrategy);
58163
- this.determineStrategy(this.props);
58164
- this.handleDOMNode();
58165
- }
58166
- }, {
58167
- key: "componentDidUpdate",
58168
- value: function componentDidUpdate() {
58169
- this.determineStrategy(this.props);
58170
- this.handleDOMNode();
58171
- }
58172
- }, {
58173
- key: "componentWillUnmount",
58174
- value: function componentWillUnmount() {
58175
- // Change our size checker to a noop just in case we have some
58176
- // late running events.
58177
- this.hasSizeChanged = function () {
58178
- return undefined;
58179
- };
58180
-
58181
- this.checkIfSizeChanged = function () {
58182
- return undefined;
58183
- };
58184
-
58185
- this.uninstall();
58186
- }
58187
- }, {
58188
- key: "handleDOMNode",
58189
- value: function handleDOMNode() {
58190
- var found = this.element && ReactDOM__default['default'].findDOMNode(this.element);
58191
-
58192
- if (!found) {
58193
- // If we previously had a dom node then we need to ensure that
58194
- // we remove any existing listeners to avoid memory leaks.
58195
- this.uninstall();
58196
- return;
58197
- }
58198
-
58199
- if (!this.domEl) {
58200
- this.domEl = found;
58201
- this.detector.listenTo(this.domEl, this.checkIfSizeChanged);
58202
- } else if (this.domEl.isSameNode && !this.domEl.isSameNode(found) || this.domEl !== found) {
58203
- this.uninstall();
58204
- this.domEl = found;
58205
- this.detector.listenTo(this.domEl, this.checkIfSizeChanged);
58206
- } else ;
58207
- }
58208
- }, {
58209
- key: "render",
58210
- value: function render() {
58211
- var disablePlaceholder = withSize.enableSSRBehaviour || withSize.noPlaceholders || noPlaceholder || this.strategy === 'callback';
58212
-
58213
- var size = _objectSpread2({}, this.state);
58214
-
58215
- return /*#__PURE__*/React__default['default'].createElement(SizeMeRenderWrapper, _extends({
58216
- explicitRef: this.refCallback,
58217
- size: this.strategy === 'callback' ? null : size,
58218
- disablePlaceholder: disablePlaceholder
58219
- }, this.props));
58220
- }
58221
- }]);
58222
-
58223
- return SizeAwareComponent;
58224
- }(React__default['default'].Component);
58225
-
58226
- _defineProperty(SizeAwareComponent, "displayName", "SizeMe(".concat(getDisplayName(WrappedComponent), ")"));
58227
-
58228
- SizeAwareComponent.WrappedComponent = WrappedComponent;
58229
- return SizeAwareComponent;
58230
- };
58231
- }
58232
- /**
58233
- * Allow SizeMe to run within SSR environments. This is a "global" behaviour
58234
- * flag that should be set within the initialisation phase of your application.
58235
- *
58236
- * Warning: don't set this flag unless you need to as using it may cause
58237
- * extra render cycles to happen within your components depending on the logic
58238
- * contained within them around the usage of the `size` data.
58239
- *
58240
- * DEPRECATED: Please use the global noPlaceholders
58241
- */
58242
-
58243
-
58244
- withSize.enableSSRBehaviour = false;
58245
- /**
58246
- * Global configuration allowing to disable placeholder rendering for all
58247
- * sizeMe components.
58248
- */
58249
-
58250
- withSize.noPlaceholders = false;
58251
-
58252
- var _excluded = ["children", "render"],
58253
- _excluded2 = ["children", "render"],
58254
- _excluded3 = ["children", "render"];
58255
-
58256
- var SizeMe = /*#__PURE__*/function (_Component) {
58257
- _inherits(SizeMe, _Component);
58258
-
58259
- var _super = _createSuper(SizeMe);
58260
-
58261
- function SizeMe(props) {
58262
- var _this;
58263
-
58264
- _classCallCheck(this, SizeMe);
58265
-
58266
- _this = _super.call(this, props);
58267
-
58268
- _defineProperty(_assertThisInitialized(_this), "createComponent", function (config) {
58269
- _this.SizeAware = withSize(config)(function (_ref) {
58270
- var children = _ref.children;
58271
- return children;
58272
- });
58273
- });
58274
-
58275
- _defineProperty(_assertThisInitialized(_this), "onSize", function (size) {
58276
- return _this.setState({
58277
- size: size
58278
- });
58279
- });
58280
-
58281
- props.children;
58282
- props.render;
58283
- var sizeMeConfig = _objectWithoutProperties(props, _excluded);
58284
-
58285
- _this.createComponent(sizeMeConfig);
58286
-
58287
- _this.state = {
58288
- size: {
58289
- width: undefined,
58290
- height: undefined
58291
- }
58292
- };
58293
- return _this;
58294
- }
58295
-
58296
- _createClass(SizeMe, [{
58297
- key: "componentDidUpdate",
58298
- value: function componentDidUpdate(prevProps) {
58299
- var _this$props = this.props;
58300
- _this$props.children;
58301
- _this$props.render;
58302
- var currentSizeMeConfig = _objectWithoutProperties(_this$props, _excluded2);
58303
-
58304
- prevProps.children;
58305
- prevProps.render;
58306
- var prevSizeMeConfig = _objectWithoutProperties(prevProps, _excluded3);
58307
-
58308
- if (!isShallowEqual__default['default'](currentSizeMeConfig, prevSizeMeConfig)) {
58309
- this.createComponent(currentSizeMeConfig);
58310
- }
58311
- }
58312
- }, {
58313
- key: "render",
58314
- value: function render() {
58315
- var SizeAware = this.SizeAware;
58316
- var render = this.props.children || this.props.render;
58317
- return /*#__PURE__*/React__default['default'].createElement(SizeAware, {
58318
- onSize: this.onSize
58319
- }, render({
58320
- size: this.state.size
58321
- }));
58322
- }
58323
- }]);
58324
-
58325
- return SizeMe;
58326
- }(React.Component);
58327
-
58328
- _defineProperty(SizeMe, "defaultProps", {
58329
- children: undefined,
58330
- render: undefined
58331
- });
58332
-
58333
- withSize.SizeMe = SizeMe;
58334
- withSize.withSize = withSize;
58335
-
58336
- module.exports = withSize;
58337
- //# sourceMappingURL=react-sizeme.js.map
58338
-
58339
-
58340
55767
  /***/ }),
58341
55768
 
58342
55769
  /***/ "./node_modules/react-use-measure/dist/web.js":
@@ -58854,62 +56281,6 @@ function evalFunctionCall (string, functionIdentifier, callback, call, functionR
58854
56281
  }
58855
56282
 
58856
56283
 
58857
- /***/ }),
58858
-
58859
- /***/ "./node_modules/shallowequal/index.js":
58860
- /*!********************************************!*\
58861
- !*** ./node_modules/shallowequal/index.js ***!
58862
- \********************************************/
58863
- /***/ ((module) => {
58864
-
58865
- //
58866
-
58867
- module.exports = function shallowEqual(objA, objB, compare, compareContext) {
58868
- var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
58869
-
58870
- if (ret !== void 0) {
58871
- return !!ret;
58872
- }
58873
-
58874
- if (objA === objB) {
58875
- return true;
58876
- }
58877
-
58878
- if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) {
58879
- return false;
58880
- }
58881
-
58882
- var keysA = Object.keys(objA);
58883
- var keysB = Object.keys(objB);
58884
-
58885
- if (keysA.length !== keysB.length) {
58886
- return false;
58887
- }
58888
-
58889
- var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
58890
-
58891
- // Test for A's keys different from B.
58892
- for (var idx = 0; idx < keysA.length; idx++) {
58893
- var key = keysA[idx];
58894
-
58895
- if (!bHasOwnProperty(key)) {
58896
- return false;
58897
- }
58898
-
58899
- var valueA = objA[key];
58900
- var valueB = objB[key];
58901
-
58902
- ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
58903
-
58904
- if (ret === false || (ret === void 0 && valueA !== valueB)) {
58905
- return false;
58906
- }
58907
- }
58908
-
58909
- return true;
58910
- };
58911
-
58912
-
58913
56284
  /***/ }),
58914
56285
 
58915
56286
  /***/ "./node_modules/svg-baker-runtime/browser-symbol.js":
@@ -66497,162 +63868,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_react_table__;
66497
63868
  "use strict";
66498
63869
  module.exports = __WEBPACK_EXTERNAL_MODULE_styled_components__;
66499
63870
 
66500
- /***/ }),
66501
-
66502
- /***/ "./node_modules/throttle-debounce/cjs/index.js":
66503
- /*!*****************************************************!*\
66504
- !*** ./node_modules/throttle-debounce/cjs/index.js ***!
66505
- \*****************************************************/
66506
- /***/ ((__unused_webpack_module, exports) => {
66507
-
66508
- "use strict";
66509
-
66510
-
66511
- Object.defineProperty(exports, "__esModule", ({ value: true }));
66512
-
66513
- /* eslint-disable no-undefined,no-param-reassign,no-shadow */
66514
-
66515
- /**
66516
- * Throttle execution of a function. Especially useful for rate limiting
66517
- * execution of handlers on events like resize and scroll.
66518
- *
66519
- * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
66520
- * @param {boolean} [noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the
66521
- * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time
66522
- * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,
66523
- * the internal counter is reset).
66524
- * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
66525
- * to `callback` when the throttled-function is executed.
66526
- * @param {boolean} [debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),
66527
- * schedule `callback` to execute after `delay` ms.
66528
- *
66529
- * @returns {Function} A new, throttled, function.
66530
- */
66531
- function throttle (delay, noTrailing, callback, debounceMode) {
66532
- /*
66533
- * After wrapper has stopped being called, this timeout ensures that
66534
- * `callback` is executed at the proper times in `throttle` and `end`
66535
- * debounce modes.
66536
- */
66537
- var timeoutID;
66538
- var cancelled = false; // Keep track of the last time `callback` was executed.
66539
-
66540
- var lastExec = 0; // Function to clear existing timeout
66541
-
66542
- function clearExistingTimeout() {
66543
- if (timeoutID) {
66544
- clearTimeout(timeoutID);
66545
- }
66546
- } // Function to cancel next exec
66547
-
66548
-
66549
- function cancel() {
66550
- clearExistingTimeout();
66551
- cancelled = true;
66552
- } // `noTrailing` defaults to falsy.
66553
-
66554
-
66555
- if (typeof noTrailing !== 'boolean') {
66556
- debounceMode = callback;
66557
- callback = noTrailing;
66558
- noTrailing = undefined;
66559
- }
66560
- /*
66561
- * The `wrapper` function encapsulates all of the throttling / debouncing
66562
- * functionality and when executed will limit the rate at which `callback`
66563
- * is executed.
66564
- */
66565
-
66566
-
66567
- function wrapper() {
66568
- for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
66569
- arguments_[_key] = arguments[_key];
66570
- }
66571
-
66572
- var self = this;
66573
- var elapsed = Date.now() - lastExec;
66574
-
66575
- if (cancelled) {
66576
- return;
66577
- } // Execute `callback` and update the `lastExec` timestamp.
66578
-
66579
-
66580
- function exec() {
66581
- lastExec = Date.now();
66582
- callback.apply(self, arguments_);
66583
- }
66584
- /*
66585
- * If `debounceMode` is true (at begin) this is used to clear the flag
66586
- * to allow future `callback` executions.
66587
- */
66588
-
66589
-
66590
- function clear() {
66591
- timeoutID = undefined;
66592
- }
66593
-
66594
- if (debounceMode && !timeoutID) {
66595
- /*
66596
- * Since `wrapper` is being called for the first time and
66597
- * `debounceMode` is true (at begin), execute `callback`.
66598
- */
66599
- exec();
66600
- }
66601
-
66602
- clearExistingTimeout();
66603
-
66604
- if (debounceMode === undefined && elapsed > delay) {
66605
- /*
66606
- * In throttle mode, if `delay` time has been exceeded, execute
66607
- * `callback`.
66608
- */
66609
- exec();
66610
- } else if (noTrailing !== true) {
66611
- /*
66612
- * In trailing throttle mode, since `delay` time has not been
66613
- * exceeded, schedule `callback` to execute `delay` ms after most
66614
- * recent execution.
66615
- *
66616
- * If `debounceMode` is true (at begin), schedule `clear` to execute
66617
- * after `delay` ms.
66618
- *
66619
- * If `debounceMode` is false (at end), schedule `callback` to
66620
- * execute after `delay` ms.
66621
- */
66622
- timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
66623
- }
66624
- }
66625
-
66626
- wrapper.cancel = cancel; // Return the wrapper function.
66627
-
66628
- return wrapper;
66629
- }
66630
-
66631
- /* eslint-disable no-undefined */
66632
- /**
66633
- * Debounce execution of a function. Debouncing, unlike throttling,
66634
- * guarantees that a function is only executed a single time, either at the
66635
- * very beginning of a series of calls, or at the very end.
66636
- *
66637
- * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
66638
- * @param {boolean} [atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
66639
- * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
66640
- * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
66641
- * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
66642
- * to `callback` when the debounced-function is executed.
66643
- *
66644
- * @returns {Function} A new, debounced function.
66645
- */
66646
-
66647
- function debounce (delay, atBegin, callback) {
66648
- return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);
66649
- }
66650
-
66651
- exports.debounce = debounce;
66652
- exports.throttle = throttle;
66653
- //# sourceMappingURL=index.js.map
66654
-
66655
-
66656
63871
  /***/ }),
66657
63872
 
66658
63873
  /***/ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":