rmt-fileupload 0.2.6 → 0.2.11

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.
@@ -6634,7 +6634,7 @@ exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
6634
6634
 
6635
6635
  /***/ }),
6636
6636
 
6637
- /***/ 4710:
6637
+ /***/ 1957:
6638
6638
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
6639
6639
 
6640
6640
  "use strict";
@@ -65790,931 +65790,931 @@ module.exports = normalizeWheel;
65790
65790
 
65791
65791
  "use strict";
65792
65792
  __webpack_require__.r(__webpack_exports__);
65793
- /**
65794
- * A collection of shims that provide minimal functionality of the ES6 collections.
65795
- *
65796
- * These implementations are not meant to be used outside of the ResizeObserver
65797
- * modules as they cover only a limited range of use cases.
65798
- */
65799
- /* eslint-disable require-jsdoc, valid-jsdoc */
65800
- var MapShim = (function () {
65801
- if (typeof Map !== 'undefined') {
65802
- return Map;
65803
- }
65804
- /**
65805
- * Returns index in provided array that matches the specified key.
65806
- *
65807
- * @param {Array<Array>} arr
65808
- * @param {*} key
65809
- * @returns {number}
65810
- */
65811
- function getIndex(arr, key) {
65812
- var result = -1;
65813
- arr.some(function (entry, index) {
65814
- if (entry[0] === key) {
65815
- result = index;
65816
- return true;
65817
- }
65818
- return false;
65819
- });
65820
- return result;
65821
- }
65822
- return /** @class */ (function () {
65823
- function class_1() {
65824
- this.__entries__ = [];
65825
- }
65826
- Object.defineProperty(class_1.prototype, "size", {
65827
- /**
65828
- * @returns {boolean}
65829
- */
65830
- get: function () {
65831
- return this.__entries__.length;
65832
- },
65833
- enumerable: true,
65834
- configurable: true
65835
- });
65836
- /**
65837
- * @param {*} key
65838
- * @returns {*}
65839
- */
65840
- class_1.prototype.get = function (key) {
65841
- var index = getIndex(this.__entries__, key);
65842
- var entry = this.__entries__[index];
65843
- return entry && entry[1];
65844
- };
65845
- /**
65846
- * @param {*} key
65847
- * @param {*} value
65848
- * @returns {void}
65849
- */
65850
- class_1.prototype.set = function (key, value) {
65851
- var index = getIndex(this.__entries__, key);
65852
- if (~index) {
65853
- this.__entries__[index][1] = value;
65854
- }
65855
- else {
65856
- this.__entries__.push([key, value]);
65857
- }
65858
- };
65859
- /**
65860
- * @param {*} key
65861
- * @returns {void}
65862
- */
65863
- class_1.prototype.delete = function (key) {
65864
- var entries = this.__entries__;
65865
- var index = getIndex(entries, key);
65866
- if (~index) {
65867
- entries.splice(index, 1);
65868
- }
65869
- };
65870
- /**
65871
- * @param {*} key
65872
- * @returns {void}
65873
- */
65874
- class_1.prototype.has = function (key) {
65875
- return !!~getIndex(this.__entries__, key);
65876
- };
65877
- /**
65878
- * @returns {void}
65879
- */
65880
- class_1.prototype.clear = function () {
65881
- this.__entries__.splice(0);
65882
- };
65883
- /**
65884
- * @param {Function} callback
65885
- * @param {*} [ctx=null]
65886
- * @returns {void}
65887
- */
65888
- class_1.prototype.forEach = function (callback, ctx) {
65889
- if (ctx === void 0) { ctx = null; }
65890
- for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
65891
- var entry = _a[_i];
65892
- callback.call(ctx, entry[1], entry[0]);
65893
- }
65894
- };
65895
- return class_1;
65896
- }());
65793
+ /**
65794
+ * A collection of shims that provide minimal functionality of the ES6 collections.
65795
+ *
65796
+ * These implementations are not meant to be used outside of the ResizeObserver
65797
+ * modules as they cover only a limited range of use cases.
65798
+ */
65799
+ /* eslint-disable require-jsdoc, valid-jsdoc */
65800
+ var MapShim = (function () {
65801
+ if (typeof Map !== 'undefined') {
65802
+ return Map;
65803
+ }
65804
+ /**
65805
+ * Returns index in provided array that matches the specified key.
65806
+ *
65807
+ * @param {Array<Array>} arr
65808
+ * @param {*} key
65809
+ * @returns {number}
65810
+ */
65811
+ function getIndex(arr, key) {
65812
+ var result = -1;
65813
+ arr.some(function (entry, index) {
65814
+ if (entry[0] === key) {
65815
+ result = index;
65816
+ return true;
65817
+ }
65818
+ return false;
65819
+ });
65820
+ return result;
65821
+ }
65822
+ return /** @class */ (function () {
65823
+ function class_1() {
65824
+ this.__entries__ = [];
65825
+ }
65826
+ Object.defineProperty(class_1.prototype, "size", {
65827
+ /**
65828
+ * @returns {boolean}
65829
+ */
65830
+ get: function () {
65831
+ return this.__entries__.length;
65832
+ },
65833
+ enumerable: true,
65834
+ configurable: true
65835
+ });
65836
+ /**
65837
+ * @param {*} key
65838
+ * @returns {*}
65839
+ */
65840
+ class_1.prototype.get = function (key) {
65841
+ var index = getIndex(this.__entries__, key);
65842
+ var entry = this.__entries__[index];
65843
+ return entry && entry[1];
65844
+ };
65845
+ /**
65846
+ * @param {*} key
65847
+ * @param {*} value
65848
+ * @returns {void}
65849
+ */
65850
+ class_1.prototype.set = function (key, value) {
65851
+ var index = getIndex(this.__entries__, key);
65852
+ if (~index) {
65853
+ this.__entries__[index][1] = value;
65854
+ }
65855
+ else {
65856
+ this.__entries__.push([key, value]);
65857
+ }
65858
+ };
65859
+ /**
65860
+ * @param {*} key
65861
+ * @returns {void}
65862
+ */
65863
+ class_1.prototype.delete = function (key) {
65864
+ var entries = this.__entries__;
65865
+ var index = getIndex(entries, key);
65866
+ if (~index) {
65867
+ entries.splice(index, 1);
65868
+ }
65869
+ };
65870
+ /**
65871
+ * @param {*} key
65872
+ * @returns {void}
65873
+ */
65874
+ class_1.prototype.has = function (key) {
65875
+ return !!~getIndex(this.__entries__, key);
65876
+ };
65877
+ /**
65878
+ * @returns {void}
65879
+ */
65880
+ class_1.prototype.clear = function () {
65881
+ this.__entries__.splice(0);
65882
+ };
65883
+ /**
65884
+ * @param {Function} callback
65885
+ * @param {*} [ctx=null]
65886
+ * @returns {void}
65887
+ */
65888
+ class_1.prototype.forEach = function (callback, ctx) {
65889
+ if (ctx === void 0) { ctx = null; }
65890
+ for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
65891
+ var entry = _a[_i];
65892
+ callback.call(ctx, entry[1], entry[0]);
65893
+ }
65894
+ };
65895
+ return class_1;
65896
+ }());
65897
65897
  })();
65898
65898
 
65899
- /**
65900
- * Detects whether window and document objects are available in current environment.
65901
- */
65899
+ /**
65900
+ * Detects whether window and document objects are available in current environment.
65901
+ */
65902
65902
  var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
65903
65903
 
65904
- // Returns global object of a current environment.
65905
- var global$1 = (function () {
65906
- if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.Math === Math) {
65907
- return __webpack_require__.g;
65908
- }
65909
- if (typeof self !== 'undefined' && self.Math === Math) {
65910
- return self;
65911
- }
65912
- if (typeof window !== 'undefined' && window.Math === Math) {
65913
- return window;
65914
- }
65915
- // eslint-disable-next-line no-new-func
65916
- return Function('return this')();
65904
+ // Returns global object of a current environment.
65905
+ var global$1 = (function () {
65906
+ if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.Math === Math) {
65907
+ return __webpack_require__.g;
65908
+ }
65909
+ if (typeof self !== 'undefined' && self.Math === Math) {
65910
+ return self;
65911
+ }
65912
+ if (typeof window !== 'undefined' && window.Math === Math) {
65913
+ return window;
65914
+ }
65915
+ // eslint-disable-next-line no-new-func
65916
+ return Function('return this')();
65917
65917
  })();
65918
65918
 
65919
- /**
65920
- * A shim for the requestAnimationFrame which falls back to the setTimeout if
65921
- * first one is not supported.
65922
- *
65923
- * @returns {number} Requests' identifier.
65924
- */
65925
- var requestAnimationFrame$1 = (function () {
65926
- if (typeof requestAnimationFrame === 'function') {
65927
- // It's required to use a bounded function because IE sometimes throws
65928
- // an "Invalid calling object" error if rAF is invoked without the global
65929
- // object on the left hand side.
65930
- return requestAnimationFrame.bind(global$1);
65931
- }
65932
- return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
65919
+ /**
65920
+ * A shim for the requestAnimationFrame which falls back to the setTimeout if
65921
+ * first one is not supported.
65922
+ *
65923
+ * @returns {number} Requests' identifier.
65924
+ */
65925
+ var requestAnimationFrame$1 = (function () {
65926
+ if (typeof requestAnimationFrame === 'function') {
65927
+ // It's required to use a bounded function because IE sometimes throws
65928
+ // an "Invalid calling object" error if rAF is invoked without the global
65929
+ // object on the left hand side.
65930
+ return requestAnimationFrame.bind(global$1);
65931
+ }
65932
+ return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
65933
65933
  })();
65934
65934
 
65935
- // Defines minimum timeout before adding a trailing call.
65936
- var trailingTimeout = 2;
65937
- /**
65938
- * Creates a wrapper function which ensures that provided callback will be
65939
- * invoked only once during the specified delay period.
65940
- *
65941
- * @param {Function} callback - Function to be invoked after the delay period.
65942
- * @param {number} delay - Delay after which to invoke callback.
65943
- * @returns {Function}
65944
- */
65945
- function throttle (callback, delay) {
65946
- var leadingCall = false, trailingCall = false, lastCallTime = 0;
65947
- /**
65948
- * Invokes the original callback function and schedules new invocation if
65949
- * the "proxy" was called during current request.
65950
- *
65951
- * @returns {void}
65952
- */
65953
- function resolvePending() {
65954
- if (leadingCall) {
65955
- leadingCall = false;
65956
- callback();
65957
- }
65958
- if (trailingCall) {
65959
- proxy();
65960
- }
65961
- }
65962
- /**
65963
- * Callback invoked after the specified delay. It will further postpone
65964
- * invocation of the original function delegating it to the
65965
- * requestAnimationFrame.
65966
- *
65967
- * @returns {void}
65968
- */
65969
- function timeoutCallback() {
65970
- requestAnimationFrame$1(resolvePending);
65971
- }
65972
- /**
65973
- * Schedules invocation of the original function.
65974
- *
65975
- * @returns {void}
65976
- */
65977
- function proxy() {
65978
- var timeStamp = Date.now();
65979
- if (leadingCall) {
65980
- // Reject immediately following calls.
65981
- if (timeStamp - lastCallTime < trailingTimeout) {
65982
- return;
65983
- }
65984
- // Schedule new call to be in invoked when the pending one is resolved.
65985
- // This is important for "transitions" which never actually start
65986
- // immediately so there is a chance that we might miss one if change
65987
- // happens amids the pending invocation.
65988
- trailingCall = true;
65989
- }
65990
- else {
65991
- leadingCall = true;
65992
- trailingCall = false;
65993
- setTimeout(timeoutCallback, delay);
65994
- }
65995
- lastCallTime = timeStamp;
65996
- }
65997
- return proxy;
65935
+ // Defines minimum timeout before adding a trailing call.
65936
+ var trailingTimeout = 2;
65937
+ /**
65938
+ * Creates a wrapper function which ensures that provided callback will be
65939
+ * invoked only once during the specified delay period.
65940
+ *
65941
+ * @param {Function} callback - Function to be invoked after the delay period.
65942
+ * @param {number} delay - Delay after which to invoke callback.
65943
+ * @returns {Function}
65944
+ */
65945
+ function throttle (callback, delay) {
65946
+ var leadingCall = false, trailingCall = false, lastCallTime = 0;
65947
+ /**
65948
+ * Invokes the original callback function and schedules new invocation if
65949
+ * the "proxy" was called during current request.
65950
+ *
65951
+ * @returns {void}
65952
+ */
65953
+ function resolvePending() {
65954
+ if (leadingCall) {
65955
+ leadingCall = false;
65956
+ callback();
65957
+ }
65958
+ if (trailingCall) {
65959
+ proxy();
65960
+ }
65961
+ }
65962
+ /**
65963
+ * Callback invoked after the specified delay. It will further postpone
65964
+ * invocation of the original function delegating it to the
65965
+ * requestAnimationFrame.
65966
+ *
65967
+ * @returns {void}
65968
+ */
65969
+ function timeoutCallback() {
65970
+ requestAnimationFrame$1(resolvePending);
65971
+ }
65972
+ /**
65973
+ * Schedules invocation of the original function.
65974
+ *
65975
+ * @returns {void}
65976
+ */
65977
+ function proxy() {
65978
+ var timeStamp = Date.now();
65979
+ if (leadingCall) {
65980
+ // Reject immediately following calls.
65981
+ if (timeStamp - lastCallTime < trailingTimeout) {
65982
+ return;
65983
+ }
65984
+ // Schedule new call to be in invoked when the pending one is resolved.
65985
+ // This is important for "transitions" which never actually start
65986
+ // immediately so there is a chance that we might miss one if change
65987
+ // happens amids the pending invocation.
65988
+ trailingCall = true;
65989
+ }
65990
+ else {
65991
+ leadingCall = true;
65992
+ trailingCall = false;
65993
+ setTimeout(timeoutCallback, delay);
65994
+ }
65995
+ lastCallTime = timeStamp;
65996
+ }
65997
+ return proxy;
65998
65998
  }
65999
65999
 
66000
- // Minimum delay before invoking the update of observers.
66001
- var REFRESH_DELAY = 20;
66002
- // A list of substrings of CSS properties used to find transition events that
66003
- // might affect dimensions of observed elements.
66004
- var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
66005
- // Check if MutationObserver is available.
66006
- var mutationObserverSupported = typeof MutationObserver !== 'undefined';
66007
- /**
66008
- * Singleton controller class which handles updates of ResizeObserver instances.
66009
- */
66010
- var ResizeObserverController = /** @class */ (function () {
66011
- /**
66012
- * Creates a new instance of ResizeObserverController.
66013
- *
66014
- * @private
66015
- */
66016
- function ResizeObserverController() {
66017
- /**
66018
- * Indicates whether DOM listeners have been added.
66019
- *
66020
- * @private {boolean}
66021
- */
66022
- this.connected_ = false;
66023
- /**
66024
- * Tells that controller has subscribed for Mutation Events.
66025
- *
66026
- * @private {boolean}
66027
- */
66028
- this.mutationEventsAdded_ = false;
66029
- /**
66030
- * Keeps reference to the instance of MutationObserver.
66031
- *
66032
- * @private {MutationObserver}
66033
- */
66034
- this.mutationsObserver_ = null;
66035
- /**
66036
- * A list of connected observers.
66037
- *
66038
- * @private {Array<ResizeObserverSPI>}
66039
- */
66040
- this.observers_ = [];
66041
- this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
66042
- this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
66043
- }
66044
- /**
66045
- * Adds observer to observers list.
66046
- *
66047
- * @param {ResizeObserverSPI} observer - Observer to be added.
66048
- * @returns {void}
66049
- */
66050
- ResizeObserverController.prototype.addObserver = function (observer) {
66051
- if (!~this.observers_.indexOf(observer)) {
66052
- this.observers_.push(observer);
66053
- }
66054
- // Add listeners if they haven't been added yet.
66055
- if (!this.connected_) {
66056
- this.connect_();
66057
- }
66058
- };
66059
- /**
66060
- * Removes observer from observers list.
66061
- *
66062
- * @param {ResizeObserverSPI} observer - Observer to be removed.
66063
- * @returns {void}
66064
- */
66065
- ResizeObserverController.prototype.removeObserver = function (observer) {
66066
- var observers = this.observers_;
66067
- var index = observers.indexOf(observer);
66068
- // Remove observer if it's present in registry.
66069
- if (~index) {
66070
- observers.splice(index, 1);
66071
- }
66072
- // Remove listeners if controller has no connected observers.
66073
- if (!observers.length && this.connected_) {
66074
- this.disconnect_();
66075
- }
66076
- };
66077
- /**
66078
- * Invokes the update of observers. It will continue running updates insofar
66079
- * it detects changes.
66080
- *
66081
- * @returns {void}
66082
- */
66083
- ResizeObserverController.prototype.refresh = function () {
66084
- var changesDetected = this.updateObservers_();
66085
- // Continue running updates if changes have been detected as there might
66086
- // be future ones caused by CSS transitions.
66087
- if (changesDetected) {
66088
- this.refresh();
66089
- }
66090
- };
66091
- /**
66092
- * Updates every observer from observers list and notifies them of queued
66093
- * entries.
66094
- *
66095
- * @private
66096
- * @returns {boolean} Returns "true" if any observer has detected changes in
66097
- * dimensions of it's elements.
66098
- */
66099
- ResizeObserverController.prototype.updateObservers_ = function () {
66100
- // Collect observers that have active observations.
66101
- var activeObservers = this.observers_.filter(function (observer) {
66102
- return observer.gatherActive(), observer.hasActive();
66103
- });
66104
- // Deliver notifications in a separate cycle in order to avoid any
66105
- // collisions between observers, e.g. when multiple instances of
66106
- // ResizeObserver are tracking the same element and the callback of one
66107
- // of them changes content dimensions of the observed target. Sometimes
66108
- // this may result in notifications being blocked for the rest of observers.
66109
- activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
66110
- return activeObservers.length > 0;
66111
- };
66112
- /**
66113
- * Initializes DOM listeners.
66114
- *
66115
- * @private
66116
- * @returns {void}
66117
- */
66118
- ResizeObserverController.prototype.connect_ = function () {
66119
- // Do nothing if running in a non-browser environment or if listeners
66120
- // have been already added.
66121
- if (!isBrowser || this.connected_) {
66122
- return;
66123
- }
66124
- // Subscription to the "Transitionend" event is used as a workaround for
66125
- // delayed transitions. This way it's possible to capture at least the
66126
- // final state of an element.
66127
- document.addEventListener('transitionend', this.onTransitionEnd_);
66128
- window.addEventListener('resize', this.refresh);
66129
- if (mutationObserverSupported) {
66130
- this.mutationsObserver_ = new MutationObserver(this.refresh);
66131
- this.mutationsObserver_.observe(document, {
66132
- attributes: true,
66133
- childList: true,
66134
- characterData: true,
66135
- subtree: true
66136
- });
66137
- }
66138
- else {
66139
- document.addEventListener('DOMSubtreeModified', this.refresh);
66140
- this.mutationEventsAdded_ = true;
66141
- }
66142
- this.connected_ = true;
66143
- };
66144
- /**
66145
- * Removes DOM listeners.
66146
- *
66147
- * @private
66148
- * @returns {void}
66149
- */
66150
- ResizeObserverController.prototype.disconnect_ = function () {
66151
- // Do nothing if running in a non-browser environment or if listeners
66152
- // have been already removed.
66153
- if (!isBrowser || !this.connected_) {
66154
- return;
66155
- }
66156
- document.removeEventListener('transitionend', this.onTransitionEnd_);
66157
- window.removeEventListener('resize', this.refresh);
66158
- if (this.mutationsObserver_) {
66159
- this.mutationsObserver_.disconnect();
66160
- }
66161
- if (this.mutationEventsAdded_) {
66162
- document.removeEventListener('DOMSubtreeModified', this.refresh);
66163
- }
66164
- this.mutationsObserver_ = null;
66165
- this.mutationEventsAdded_ = false;
66166
- this.connected_ = false;
66167
- };
66168
- /**
66169
- * "Transitionend" event handler.
66170
- *
66171
- * @private
66172
- * @param {TransitionEvent} event
66173
- * @returns {void}
66174
- */
66175
- ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
66176
- var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
66177
- // Detect whether transition may affect dimensions of an element.
66178
- var isReflowProperty = transitionKeys.some(function (key) {
66179
- return !!~propertyName.indexOf(key);
66180
- });
66181
- if (isReflowProperty) {
66182
- this.refresh();
66183
- }
66184
- };
66185
- /**
66186
- * Returns instance of the ResizeObserverController.
66187
- *
66188
- * @returns {ResizeObserverController}
66189
- */
66190
- ResizeObserverController.getInstance = function () {
66191
- if (!this.instance_) {
66192
- this.instance_ = new ResizeObserverController();
66193
- }
66194
- return this.instance_;
66195
- };
66196
- /**
66197
- * Holds reference to the controller's instance.
66198
- *
66199
- * @private {ResizeObserverController}
66200
- */
66201
- ResizeObserverController.instance_ = null;
66202
- return ResizeObserverController;
66000
+ // Minimum delay before invoking the update of observers.
66001
+ var REFRESH_DELAY = 20;
66002
+ // A list of substrings of CSS properties used to find transition events that
66003
+ // might affect dimensions of observed elements.
66004
+ var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
66005
+ // Check if MutationObserver is available.
66006
+ var mutationObserverSupported = typeof MutationObserver !== 'undefined';
66007
+ /**
66008
+ * Singleton controller class which handles updates of ResizeObserver instances.
66009
+ */
66010
+ var ResizeObserverController = /** @class */ (function () {
66011
+ /**
66012
+ * Creates a new instance of ResizeObserverController.
66013
+ *
66014
+ * @private
66015
+ */
66016
+ function ResizeObserverController() {
66017
+ /**
66018
+ * Indicates whether DOM listeners have been added.
66019
+ *
66020
+ * @private {boolean}
66021
+ */
66022
+ this.connected_ = false;
66023
+ /**
66024
+ * Tells that controller has subscribed for Mutation Events.
66025
+ *
66026
+ * @private {boolean}
66027
+ */
66028
+ this.mutationEventsAdded_ = false;
66029
+ /**
66030
+ * Keeps reference to the instance of MutationObserver.
66031
+ *
66032
+ * @private {MutationObserver}
66033
+ */
66034
+ this.mutationsObserver_ = null;
66035
+ /**
66036
+ * A list of connected observers.
66037
+ *
66038
+ * @private {Array<ResizeObserverSPI>}
66039
+ */
66040
+ this.observers_ = [];
66041
+ this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
66042
+ this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
66043
+ }
66044
+ /**
66045
+ * Adds observer to observers list.
66046
+ *
66047
+ * @param {ResizeObserverSPI} observer - Observer to be added.
66048
+ * @returns {void}
66049
+ */
66050
+ ResizeObserverController.prototype.addObserver = function (observer) {
66051
+ if (!~this.observers_.indexOf(observer)) {
66052
+ this.observers_.push(observer);
66053
+ }
66054
+ // Add listeners if they haven't been added yet.
66055
+ if (!this.connected_) {
66056
+ this.connect_();
66057
+ }
66058
+ };
66059
+ /**
66060
+ * Removes observer from observers list.
66061
+ *
66062
+ * @param {ResizeObserverSPI} observer - Observer to be removed.
66063
+ * @returns {void}
66064
+ */
66065
+ ResizeObserverController.prototype.removeObserver = function (observer) {
66066
+ var observers = this.observers_;
66067
+ var index = observers.indexOf(observer);
66068
+ // Remove observer if it's present in registry.
66069
+ if (~index) {
66070
+ observers.splice(index, 1);
66071
+ }
66072
+ // Remove listeners if controller has no connected observers.
66073
+ if (!observers.length && this.connected_) {
66074
+ this.disconnect_();
66075
+ }
66076
+ };
66077
+ /**
66078
+ * Invokes the update of observers. It will continue running updates insofar
66079
+ * it detects changes.
66080
+ *
66081
+ * @returns {void}
66082
+ */
66083
+ ResizeObserverController.prototype.refresh = function () {
66084
+ var changesDetected = this.updateObservers_();
66085
+ // Continue running updates if changes have been detected as there might
66086
+ // be future ones caused by CSS transitions.
66087
+ if (changesDetected) {
66088
+ this.refresh();
66089
+ }
66090
+ };
66091
+ /**
66092
+ * Updates every observer from observers list and notifies them of queued
66093
+ * entries.
66094
+ *
66095
+ * @private
66096
+ * @returns {boolean} Returns "true" if any observer has detected changes in
66097
+ * dimensions of it's elements.
66098
+ */
66099
+ ResizeObserverController.prototype.updateObservers_ = function () {
66100
+ // Collect observers that have active observations.
66101
+ var activeObservers = this.observers_.filter(function (observer) {
66102
+ return observer.gatherActive(), observer.hasActive();
66103
+ });
66104
+ // Deliver notifications in a separate cycle in order to avoid any
66105
+ // collisions between observers, e.g. when multiple instances of
66106
+ // ResizeObserver are tracking the same element and the callback of one
66107
+ // of them changes content dimensions of the observed target. Sometimes
66108
+ // this may result in notifications being blocked for the rest of observers.
66109
+ activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
66110
+ return activeObservers.length > 0;
66111
+ };
66112
+ /**
66113
+ * Initializes DOM listeners.
66114
+ *
66115
+ * @private
66116
+ * @returns {void}
66117
+ */
66118
+ ResizeObserverController.prototype.connect_ = function () {
66119
+ // Do nothing if running in a non-browser environment or if listeners
66120
+ // have been already added.
66121
+ if (!isBrowser || this.connected_) {
66122
+ return;
66123
+ }
66124
+ // Subscription to the "Transitionend" event is used as a workaround for
66125
+ // delayed transitions. This way it's possible to capture at least the
66126
+ // final state of an element.
66127
+ document.addEventListener('transitionend', this.onTransitionEnd_);
66128
+ window.addEventListener('resize', this.refresh);
66129
+ if (mutationObserverSupported) {
66130
+ this.mutationsObserver_ = new MutationObserver(this.refresh);
66131
+ this.mutationsObserver_.observe(document, {
66132
+ attributes: true,
66133
+ childList: true,
66134
+ characterData: true,
66135
+ subtree: true
66136
+ });
66137
+ }
66138
+ else {
66139
+ document.addEventListener('DOMSubtreeModified', this.refresh);
66140
+ this.mutationEventsAdded_ = true;
66141
+ }
66142
+ this.connected_ = true;
66143
+ };
66144
+ /**
66145
+ * Removes DOM listeners.
66146
+ *
66147
+ * @private
66148
+ * @returns {void}
66149
+ */
66150
+ ResizeObserverController.prototype.disconnect_ = function () {
66151
+ // Do nothing if running in a non-browser environment or if listeners
66152
+ // have been already removed.
66153
+ if (!isBrowser || !this.connected_) {
66154
+ return;
66155
+ }
66156
+ document.removeEventListener('transitionend', this.onTransitionEnd_);
66157
+ window.removeEventListener('resize', this.refresh);
66158
+ if (this.mutationsObserver_) {
66159
+ this.mutationsObserver_.disconnect();
66160
+ }
66161
+ if (this.mutationEventsAdded_) {
66162
+ document.removeEventListener('DOMSubtreeModified', this.refresh);
66163
+ }
66164
+ this.mutationsObserver_ = null;
66165
+ this.mutationEventsAdded_ = false;
66166
+ this.connected_ = false;
66167
+ };
66168
+ /**
66169
+ * "Transitionend" event handler.
66170
+ *
66171
+ * @private
66172
+ * @param {TransitionEvent} event
66173
+ * @returns {void}
66174
+ */
66175
+ ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
66176
+ var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
66177
+ // Detect whether transition may affect dimensions of an element.
66178
+ var isReflowProperty = transitionKeys.some(function (key) {
66179
+ return !!~propertyName.indexOf(key);
66180
+ });
66181
+ if (isReflowProperty) {
66182
+ this.refresh();
66183
+ }
66184
+ };
66185
+ /**
66186
+ * Returns instance of the ResizeObserverController.
66187
+ *
66188
+ * @returns {ResizeObserverController}
66189
+ */
66190
+ ResizeObserverController.getInstance = function () {
66191
+ if (!this.instance_) {
66192
+ this.instance_ = new ResizeObserverController();
66193
+ }
66194
+ return this.instance_;
66195
+ };
66196
+ /**
66197
+ * Holds reference to the controller's instance.
66198
+ *
66199
+ * @private {ResizeObserverController}
66200
+ */
66201
+ ResizeObserverController.instance_ = null;
66202
+ return ResizeObserverController;
66203
66203
  }());
66204
66204
 
66205
- /**
66206
- * Defines non-writable/enumerable properties of the provided target object.
66207
- *
66208
- * @param {Object} target - Object for which to define properties.
66209
- * @param {Object} props - Properties to be defined.
66210
- * @returns {Object} Target object.
66211
- */
66212
- var defineConfigurable = (function (target, props) {
66213
- for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
66214
- var key = _a[_i];
66215
- Object.defineProperty(target, key, {
66216
- value: props[key],
66217
- enumerable: false,
66218
- writable: false,
66219
- configurable: true
66220
- });
66221
- }
66222
- return target;
66205
+ /**
66206
+ * Defines non-writable/enumerable properties of the provided target object.
66207
+ *
66208
+ * @param {Object} target - Object for which to define properties.
66209
+ * @param {Object} props - Properties to be defined.
66210
+ * @returns {Object} Target object.
66211
+ */
66212
+ var defineConfigurable = (function (target, props) {
66213
+ for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
66214
+ var key = _a[_i];
66215
+ Object.defineProperty(target, key, {
66216
+ value: props[key],
66217
+ enumerable: false,
66218
+ writable: false,
66219
+ configurable: true
66220
+ });
66221
+ }
66222
+ return target;
66223
66223
  });
66224
66224
 
66225
- /**
66226
- * Returns the global object associated with provided element.
66227
- *
66228
- * @param {Object} target
66229
- * @returns {Object}
66230
- */
66231
- var getWindowOf = (function (target) {
66232
- // Assume that the element is an instance of Node, which means that it
66233
- // has the "ownerDocument" property from which we can retrieve a
66234
- // corresponding global object.
66235
- var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
66236
- // Return the local global object if it's not possible extract one from
66237
- // provided element.
66238
- return ownerGlobal || global$1;
66225
+ /**
66226
+ * Returns the global object associated with provided element.
66227
+ *
66228
+ * @param {Object} target
66229
+ * @returns {Object}
66230
+ */
66231
+ var getWindowOf = (function (target) {
66232
+ // Assume that the element is an instance of Node, which means that it
66233
+ // has the "ownerDocument" property from which we can retrieve a
66234
+ // corresponding global object.
66235
+ var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
66236
+ // Return the local global object if it's not possible extract one from
66237
+ // provided element.
66238
+ return ownerGlobal || global$1;
66239
66239
  });
66240
66240
 
66241
- // Placeholder of an empty content rectangle.
66242
- var emptyRect = createRectInit(0, 0, 0, 0);
66243
- /**
66244
- * Converts provided string to a number.
66245
- *
66246
- * @param {number|string} value
66247
- * @returns {number}
66248
- */
66249
- function toFloat(value) {
66250
- return parseFloat(value) || 0;
66251
- }
66252
- /**
66253
- * Extracts borders size from provided styles.
66254
- *
66255
- * @param {CSSStyleDeclaration} styles
66256
- * @param {...string} positions - Borders positions (top, right, ...)
66257
- * @returns {number}
66258
- */
66259
- function getBordersSize(styles) {
66260
- var positions = [];
66261
- for (var _i = 1; _i < arguments.length; _i++) {
66262
- positions[_i - 1] = arguments[_i];
66263
- }
66264
- return positions.reduce(function (size, position) {
66265
- var value = styles['border-' + position + '-width'];
66266
- return size + toFloat(value);
66267
- }, 0);
66268
- }
66269
- /**
66270
- * Extracts paddings sizes from provided styles.
66271
- *
66272
- * @param {CSSStyleDeclaration} styles
66273
- * @returns {Object} Paddings box.
66274
- */
66275
- function getPaddings(styles) {
66276
- var positions = ['top', 'right', 'bottom', 'left'];
66277
- var paddings = {};
66278
- for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
66279
- var position = positions_1[_i];
66280
- var value = styles['padding-' + position];
66281
- paddings[position] = toFloat(value);
66282
- }
66283
- return paddings;
66284
- }
66285
- /**
66286
- * Calculates content rectangle of provided SVG element.
66287
- *
66288
- * @param {SVGGraphicsElement} target - Element content rectangle of which needs
66289
- * to be calculated.
66290
- * @returns {DOMRectInit}
66291
- */
66292
- function getSVGContentRect(target) {
66293
- var bbox = target.getBBox();
66294
- return createRectInit(0, 0, bbox.width, bbox.height);
66295
- }
66296
- /**
66297
- * Calculates content rectangle of provided HTMLElement.
66298
- *
66299
- * @param {HTMLElement} target - Element for which to calculate the content rectangle.
66300
- * @returns {DOMRectInit}
66301
- */
66302
- function getHTMLElementContentRect(target) {
66303
- // Client width & height properties can't be
66304
- // used exclusively as they provide rounded values.
66305
- var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
66306
- // By this condition we can catch all non-replaced inline, hidden and
66307
- // detached elements. Though elements with width & height properties less
66308
- // than 0.5 will be discarded as well.
66309
- //
66310
- // Without it we would need to implement separate methods for each of
66311
- // those cases and it's not possible to perform a precise and performance
66312
- // effective test for hidden elements. E.g. even jQuery's ':visible' filter
66313
- // gives wrong results for elements with width & height less than 0.5.
66314
- if (!clientWidth && !clientHeight) {
66315
- return emptyRect;
66316
- }
66317
- var styles = getWindowOf(target).getComputedStyle(target);
66318
- var paddings = getPaddings(styles);
66319
- var horizPad = paddings.left + paddings.right;
66320
- var vertPad = paddings.top + paddings.bottom;
66321
- // Computed styles of width & height are being used because they are the
66322
- // only dimensions available to JS that contain non-rounded values. It could
66323
- // be possible to utilize the getBoundingClientRect if only it's data wasn't
66324
- // affected by CSS transformations let alone paddings, borders and scroll bars.
66325
- var width = toFloat(styles.width), height = toFloat(styles.height);
66326
- // Width & height include paddings and borders when the 'border-box' box
66327
- // model is applied (except for IE).
66328
- if (styles.boxSizing === 'border-box') {
66329
- // Following conditions are required to handle Internet Explorer which
66330
- // doesn't include paddings and borders to computed CSS dimensions.
66331
- //
66332
- // We can say that if CSS dimensions + paddings are equal to the "client"
66333
- // properties then it's either IE, and thus we don't need to subtract
66334
- // anything, or an element merely doesn't have paddings/borders styles.
66335
- if (Math.round(width + horizPad) !== clientWidth) {
66336
- width -= getBordersSize(styles, 'left', 'right') + horizPad;
66337
- }
66338
- if (Math.round(height + vertPad) !== clientHeight) {
66339
- height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
66340
- }
66341
- }
66342
- // Following steps can't be applied to the document's root element as its
66343
- // client[Width/Height] properties represent viewport area of the window.
66344
- // Besides, it's as well not necessary as the <html> itself neither has
66345
- // rendered scroll bars nor it can be clipped.
66346
- if (!isDocumentElement(target)) {
66347
- // In some browsers (only in Firefox, actually) CSS width & height
66348
- // include scroll bars size which can be removed at this step as scroll
66349
- // bars are the only difference between rounded dimensions + paddings
66350
- // and "client" properties, though that is not always true in Chrome.
66351
- var vertScrollbar = Math.round(width + horizPad) - clientWidth;
66352
- var horizScrollbar = Math.round(height + vertPad) - clientHeight;
66353
- // Chrome has a rather weird rounding of "client" properties.
66354
- // E.g. for an element with content width of 314.2px it sometimes gives
66355
- // the client width of 315px and for the width of 314.7px it may give
66356
- // 314px. And it doesn't happen all the time. So just ignore this delta
66357
- // as a non-relevant.
66358
- if (Math.abs(vertScrollbar) !== 1) {
66359
- width -= vertScrollbar;
66360
- }
66361
- if (Math.abs(horizScrollbar) !== 1) {
66362
- height -= horizScrollbar;
66363
- }
66364
- }
66365
- return createRectInit(paddings.left, paddings.top, width, height);
66366
- }
66367
- /**
66368
- * Checks whether provided element is an instance of the SVGGraphicsElement.
66369
- *
66370
- * @param {Element} target - Element to be checked.
66371
- * @returns {boolean}
66372
- */
66373
- var isSVGGraphicsElement = (function () {
66374
- // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
66375
- // interface.
66376
- if (typeof SVGGraphicsElement !== 'undefined') {
66377
- return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
66378
- }
66379
- // If it's so, then check that element is at least an instance of the
66380
- // SVGElement and that it has the "getBBox" method.
66381
- // eslint-disable-next-line no-extra-parens
66382
- return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
66383
- typeof target.getBBox === 'function'); };
66384
- })();
66385
- /**
66386
- * Checks whether provided element is a document element (<html>).
66387
- *
66388
- * @param {Element} target - Element to be checked.
66389
- * @returns {boolean}
66390
- */
66391
- function isDocumentElement(target) {
66392
- return target === getWindowOf(target).document.documentElement;
66393
- }
66394
- /**
66395
- * Calculates an appropriate content rectangle for provided html or svg element.
66396
- *
66397
- * @param {Element} target - Element content rectangle of which needs to be calculated.
66398
- * @returns {DOMRectInit}
66399
- */
66400
- function getContentRect(target) {
66401
- if (!isBrowser) {
66402
- return emptyRect;
66403
- }
66404
- if (isSVGGraphicsElement(target)) {
66405
- return getSVGContentRect(target);
66406
- }
66407
- return getHTMLElementContentRect(target);
66408
- }
66409
- /**
66410
- * Creates rectangle with an interface of the DOMRectReadOnly.
66411
- * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
66412
- *
66413
- * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
66414
- * @returns {DOMRectReadOnly}
66415
- */
66416
- function createReadOnlyRect(_a) {
66417
- var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
66418
- // If DOMRectReadOnly is available use it as a prototype for the rectangle.
66419
- var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
66420
- var rect = Object.create(Constr.prototype);
66421
- // Rectangle's properties are not writable and non-enumerable.
66422
- defineConfigurable(rect, {
66423
- x: x, y: y, width: width, height: height,
66424
- top: y,
66425
- right: x + width,
66426
- bottom: height + y,
66427
- left: x
66428
- });
66429
- return rect;
66430
- }
66431
- /**
66432
- * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
66433
- * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
66434
- *
66435
- * @param {number} x - X coordinate.
66436
- * @param {number} y - Y coordinate.
66437
- * @param {number} width - Rectangle's width.
66438
- * @param {number} height - Rectangle's height.
66439
- * @returns {DOMRectInit}
66440
- */
66441
- function createRectInit(x, y, width, height) {
66442
- return { x: x, y: y, width: width, height: height };
66241
+ // Placeholder of an empty content rectangle.
66242
+ var emptyRect = createRectInit(0, 0, 0, 0);
66243
+ /**
66244
+ * Converts provided string to a number.
66245
+ *
66246
+ * @param {number|string} value
66247
+ * @returns {number}
66248
+ */
66249
+ function toFloat(value) {
66250
+ return parseFloat(value) || 0;
66251
+ }
66252
+ /**
66253
+ * Extracts borders size from provided styles.
66254
+ *
66255
+ * @param {CSSStyleDeclaration} styles
66256
+ * @param {...string} positions - Borders positions (top, right, ...)
66257
+ * @returns {number}
66258
+ */
66259
+ function getBordersSize(styles) {
66260
+ var positions = [];
66261
+ for (var _i = 1; _i < arguments.length; _i++) {
66262
+ positions[_i - 1] = arguments[_i];
66263
+ }
66264
+ return positions.reduce(function (size, position) {
66265
+ var value = styles['border-' + position + '-width'];
66266
+ return size + toFloat(value);
66267
+ }, 0);
66268
+ }
66269
+ /**
66270
+ * Extracts paddings sizes from provided styles.
66271
+ *
66272
+ * @param {CSSStyleDeclaration} styles
66273
+ * @returns {Object} Paddings box.
66274
+ */
66275
+ function getPaddings(styles) {
66276
+ var positions = ['top', 'right', 'bottom', 'left'];
66277
+ var paddings = {};
66278
+ for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
66279
+ var position = positions_1[_i];
66280
+ var value = styles['padding-' + position];
66281
+ paddings[position] = toFloat(value);
66282
+ }
66283
+ return paddings;
66284
+ }
66285
+ /**
66286
+ * Calculates content rectangle of provided SVG element.
66287
+ *
66288
+ * @param {SVGGraphicsElement} target - Element content rectangle of which needs
66289
+ * to be calculated.
66290
+ * @returns {DOMRectInit}
66291
+ */
66292
+ function getSVGContentRect(target) {
66293
+ var bbox = target.getBBox();
66294
+ return createRectInit(0, 0, bbox.width, bbox.height);
66295
+ }
66296
+ /**
66297
+ * Calculates content rectangle of provided HTMLElement.
66298
+ *
66299
+ * @param {HTMLElement} target - Element for which to calculate the content rectangle.
66300
+ * @returns {DOMRectInit}
66301
+ */
66302
+ function getHTMLElementContentRect(target) {
66303
+ // Client width & height properties can't be
66304
+ // used exclusively as they provide rounded values.
66305
+ var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
66306
+ // By this condition we can catch all non-replaced inline, hidden and
66307
+ // detached elements. Though elements with width & height properties less
66308
+ // than 0.5 will be discarded as well.
66309
+ //
66310
+ // Without it we would need to implement separate methods for each of
66311
+ // those cases and it's not possible to perform a precise and performance
66312
+ // effective test for hidden elements. E.g. even jQuery's ':visible' filter
66313
+ // gives wrong results for elements with width & height less than 0.5.
66314
+ if (!clientWidth && !clientHeight) {
66315
+ return emptyRect;
66316
+ }
66317
+ var styles = getWindowOf(target).getComputedStyle(target);
66318
+ var paddings = getPaddings(styles);
66319
+ var horizPad = paddings.left + paddings.right;
66320
+ var vertPad = paddings.top + paddings.bottom;
66321
+ // Computed styles of width & height are being used because they are the
66322
+ // only dimensions available to JS that contain non-rounded values. It could
66323
+ // be possible to utilize the getBoundingClientRect if only it's data wasn't
66324
+ // affected by CSS transformations let alone paddings, borders and scroll bars.
66325
+ var width = toFloat(styles.width), height = toFloat(styles.height);
66326
+ // Width & height include paddings and borders when the 'border-box' box
66327
+ // model is applied (except for IE).
66328
+ if (styles.boxSizing === 'border-box') {
66329
+ // Following conditions are required to handle Internet Explorer which
66330
+ // doesn't include paddings and borders to computed CSS dimensions.
66331
+ //
66332
+ // We can say that if CSS dimensions + paddings are equal to the "client"
66333
+ // properties then it's either IE, and thus we don't need to subtract
66334
+ // anything, or an element merely doesn't have paddings/borders styles.
66335
+ if (Math.round(width + horizPad) !== clientWidth) {
66336
+ width -= getBordersSize(styles, 'left', 'right') + horizPad;
66337
+ }
66338
+ if (Math.round(height + vertPad) !== clientHeight) {
66339
+ height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
66340
+ }
66341
+ }
66342
+ // Following steps can't be applied to the document's root element as its
66343
+ // client[Width/Height] properties represent viewport area of the window.
66344
+ // Besides, it's as well not necessary as the <html> itself neither has
66345
+ // rendered scroll bars nor it can be clipped.
66346
+ if (!isDocumentElement(target)) {
66347
+ // In some browsers (only in Firefox, actually) CSS width & height
66348
+ // include scroll bars size which can be removed at this step as scroll
66349
+ // bars are the only difference between rounded dimensions + paddings
66350
+ // and "client" properties, though that is not always true in Chrome.
66351
+ var vertScrollbar = Math.round(width + horizPad) - clientWidth;
66352
+ var horizScrollbar = Math.round(height + vertPad) - clientHeight;
66353
+ // Chrome has a rather weird rounding of "client" properties.
66354
+ // E.g. for an element with content width of 314.2px it sometimes gives
66355
+ // the client width of 315px and for the width of 314.7px it may give
66356
+ // 314px. And it doesn't happen all the time. So just ignore this delta
66357
+ // as a non-relevant.
66358
+ if (Math.abs(vertScrollbar) !== 1) {
66359
+ width -= vertScrollbar;
66360
+ }
66361
+ if (Math.abs(horizScrollbar) !== 1) {
66362
+ height -= horizScrollbar;
66363
+ }
66364
+ }
66365
+ return createRectInit(paddings.left, paddings.top, width, height);
66366
+ }
66367
+ /**
66368
+ * Checks whether provided element is an instance of the SVGGraphicsElement.
66369
+ *
66370
+ * @param {Element} target - Element to be checked.
66371
+ * @returns {boolean}
66372
+ */
66373
+ var isSVGGraphicsElement = (function () {
66374
+ // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
66375
+ // interface.
66376
+ if (typeof SVGGraphicsElement !== 'undefined') {
66377
+ return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
66378
+ }
66379
+ // If it's so, then check that element is at least an instance of the
66380
+ // SVGElement and that it has the "getBBox" method.
66381
+ // eslint-disable-next-line no-extra-parens
66382
+ return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
66383
+ typeof target.getBBox === 'function'); };
66384
+ })();
66385
+ /**
66386
+ * Checks whether provided element is a document element (<html>).
66387
+ *
66388
+ * @param {Element} target - Element to be checked.
66389
+ * @returns {boolean}
66390
+ */
66391
+ function isDocumentElement(target) {
66392
+ return target === getWindowOf(target).document.documentElement;
66393
+ }
66394
+ /**
66395
+ * Calculates an appropriate content rectangle for provided html or svg element.
66396
+ *
66397
+ * @param {Element} target - Element content rectangle of which needs to be calculated.
66398
+ * @returns {DOMRectInit}
66399
+ */
66400
+ function getContentRect(target) {
66401
+ if (!isBrowser) {
66402
+ return emptyRect;
66403
+ }
66404
+ if (isSVGGraphicsElement(target)) {
66405
+ return getSVGContentRect(target);
66406
+ }
66407
+ return getHTMLElementContentRect(target);
66408
+ }
66409
+ /**
66410
+ * Creates rectangle with an interface of the DOMRectReadOnly.
66411
+ * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
66412
+ *
66413
+ * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
66414
+ * @returns {DOMRectReadOnly}
66415
+ */
66416
+ function createReadOnlyRect(_a) {
66417
+ var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
66418
+ // If DOMRectReadOnly is available use it as a prototype for the rectangle.
66419
+ var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
66420
+ var rect = Object.create(Constr.prototype);
66421
+ // Rectangle's properties are not writable and non-enumerable.
66422
+ defineConfigurable(rect, {
66423
+ x: x, y: y, width: width, height: height,
66424
+ top: y,
66425
+ right: x + width,
66426
+ bottom: height + y,
66427
+ left: x
66428
+ });
66429
+ return rect;
66430
+ }
66431
+ /**
66432
+ * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
66433
+ * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
66434
+ *
66435
+ * @param {number} x - X coordinate.
66436
+ * @param {number} y - Y coordinate.
66437
+ * @param {number} width - Rectangle's width.
66438
+ * @param {number} height - Rectangle's height.
66439
+ * @returns {DOMRectInit}
66440
+ */
66441
+ function createRectInit(x, y, width, height) {
66442
+ return { x: x, y: y, width: width, height: height };
66443
66443
  }
66444
66444
 
66445
- /**
66446
- * Class that is responsible for computations of the content rectangle of
66447
- * provided DOM element and for keeping track of it's changes.
66448
- */
66449
- var ResizeObservation = /** @class */ (function () {
66450
- /**
66451
- * Creates an instance of ResizeObservation.
66452
- *
66453
- * @param {Element} target - Element to be observed.
66454
- */
66455
- function ResizeObservation(target) {
66456
- /**
66457
- * Broadcasted width of content rectangle.
66458
- *
66459
- * @type {number}
66460
- */
66461
- this.broadcastWidth = 0;
66462
- /**
66463
- * Broadcasted height of content rectangle.
66464
- *
66465
- * @type {number}
66466
- */
66467
- this.broadcastHeight = 0;
66468
- /**
66469
- * Reference to the last observed content rectangle.
66470
- *
66471
- * @private {DOMRectInit}
66472
- */
66473
- this.contentRect_ = createRectInit(0, 0, 0, 0);
66474
- this.target = target;
66475
- }
66476
- /**
66477
- * Updates content rectangle and tells whether it's width or height properties
66478
- * have changed since the last broadcast.
66479
- *
66480
- * @returns {boolean}
66481
- */
66482
- ResizeObservation.prototype.isActive = function () {
66483
- var rect = getContentRect(this.target);
66484
- this.contentRect_ = rect;
66485
- return (rect.width !== this.broadcastWidth ||
66486
- rect.height !== this.broadcastHeight);
66487
- };
66488
- /**
66489
- * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
66490
- * from the corresponding properties of the last observed content rectangle.
66491
- *
66492
- * @returns {DOMRectInit} Last observed content rectangle.
66493
- */
66494
- ResizeObservation.prototype.broadcastRect = function () {
66495
- var rect = this.contentRect_;
66496
- this.broadcastWidth = rect.width;
66497
- this.broadcastHeight = rect.height;
66498
- return rect;
66499
- };
66500
- return ResizeObservation;
66445
+ /**
66446
+ * Class that is responsible for computations of the content rectangle of
66447
+ * provided DOM element and for keeping track of it's changes.
66448
+ */
66449
+ var ResizeObservation = /** @class */ (function () {
66450
+ /**
66451
+ * Creates an instance of ResizeObservation.
66452
+ *
66453
+ * @param {Element} target - Element to be observed.
66454
+ */
66455
+ function ResizeObservation(target) {
66456
+ /**
66457
+ * Broadcasted width of content rectangle.
66458
+ *
66459
+ * @type {number}
66460
+ */
66461
+ this.broadcastWidth = 0;
66462
+ /**
66463
+ * Broadcasted height of content rectangle.
66464
+ *
66465
+ * @type {number}
66466
+ */
66467
+ this.broadcastHeight = 0;
66468
+ /**
66469
+ * Reference to the last observed content rectangle.
66470
+ *
66471
+ * @private {DOMRectInit}
66472
+ */
66473
+ this.contentRect_ = createRectInit(0, 0, 0, 0);
66474
+ this.target = target;
66475
+ }
66476
+ /**
66477
+ * Updates content rectangle and tells whether it's width or height properties
66478
+ * have changed since the last broadcast.
66479
+ *
66480
+ * @returns {boolean}
66481
+ */
66482
+ ResizeObservation.prototype.isActive = function () {
66483
+ var rect = getContentRect(this.target);
66484
+ this.contentRect_ = rect;
66485
+ return (rect.width !== this.broadcastWidth ||
66486
+ rect.height !== this.broadcastHeight);
66487
+ };
66488
+ /**
66489
+ * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
66490
+ * from the corresponding properties of the last observed content rectangle.
66491
+ *
66492
+ * @returns {DOMRectInit} Last observed content rectangle.
66493
+ */
66494
+ ResizeObservation.prototype.broadcastRect = function () {
66495
+ var rect = this.contentRect_;
66496
+ this.broadcastWidth = rect.width;
66497
+ this.broadcastHeight = rect.height;
66498
+ return rect;
66499
+ };
66500
+ return ResizeObservation;
66501
66501
  }());
66502
66502
 
66503
- var ResizeObserverEntry = /** @class */ (function () {
66504
- /**
66505
- * Creates an instance of ResizeObserverEntry.
66506
- *
66507
- * @param {Element} target - Element that is being observed.
66508
- * @param {DOMRectInit} rectInit - Data of the element's content rectangle.
66509
- */
66510
- function ResizeObserverEntry(target, rectInit) {
66511
- var contentRect = createReadOnlyRect(rectInit);
66512
- // According to the specification following properties are not writable
66513
- // and are also not enumerable in the native implementation.
66514
- //
66515
- // Property accessors are not being used as they'd require to define a
66516
- // private WeakMap storage which may cause memory leaks in browsers that
66517
- // don't support this type of collections.
66518
- defineConfigurable(this, { target: target, contentRect: contentRect });
66519
- }
66520
- return ResizeObserverEntry;
66503
+ var ResizeObserverEntry = /** @class */ (function () {
66504
+ /**
66505
+ * Creates an instance of ResizeObserverEntry.
66506
+ *
66507
+ * @param {Element} target - Element that is being observed.
66508
+ * @param {DOMRectInit} rectInit - Data of the element's content rectangle.
66509
+ */
66510
+ function ResizeObserverEntry(target, rectInit) {
66511
+ var contentRect = createReadOnlyRect(rectInit);
66512
+ // According to the specification following properties are not writable
66513
+ // and are also not enumerable in the native implementation.
66514
+ //
66515
+ // Property accessors are not being used as they'd require to define a
66516
+ // private WeakMap storage which may cause memory leaks in browsers that
66517
+ // don't support this type of collections.
66518
+ defineConfigurable(this, { target: target, contentRect: contentRect });
66519
+ }
66520
+ return ResizeObserverEntry;
66521
66521
  }());
66522
66522
 
66523
- var ResizeObserverSPI = /** @class */ (function () {
66524
- /**
66525
- * Creates a new instance of ResizeObserver.
66526
- *
66527
- * @param {ResizeObserverCallback} callback - Callback function that is invoked
66528
- * when one of the observed elements changes it's content dimensions.
66529
- * @param {ResizeObserverController} controller - Controller instance which
66530
- * is responsible for the updates of observer.
66531
- * @param {ResizeObserver} callbackCtx - Reference to the public
66532
- * ResizeObserver instance which will be passed to callback function.
66533
- */
66534
- function ResizeObserverSPI(callback, controller, callbackCtx) {
66535
- /**
66536
- * Collection of resize observations that have detected changes in dimensions
66537
- * of elements.
66538
- *
66539
- * @private {Array<ResizeObservation>}
66540
- */
66541
- this.activeObservations_ = [];
66542
- /**
66543
- * Registry of the ResizeObservation instances.
66544
- *
66545
- * @private {Map<Element, ResizeObservation>}
66546
- */
66547
- this.observations_ = new MapShim();
66548
- if (typeof callback !== 'function') {
66549
- throw new TypeError('The callback provided as parameter 1 is not a function.');
66550
- }
66551
- this.callback_ = callback;
66552
- this.controller_ = controller;
66553
- this.callbackCtx_ = callbackCtx;
66554
- }
66555
- /**
66556
- * Starts observing provided element.
66557
- *
66558
- * @param {Element} target - Element to be observed.
66559
- * @returns {void}
66560
- */
66561
- ResizeObserverSPI.prototype.observe = function (target) {
66562
- if (!arguments.length) {
66563
- throw new TypeError('1 argument required, but only 0 present.');
66564
- }
66565
- // Do nothing if current environment doesn't have the Element interface.
66566
- if (typeof Element === 'undefined' || !(Element instanceof Object)) {
66567
- return;
66568
- }
66569
- if (!(target instanceof getWindowOf(target).Element)) {
66570
- throw new TypeError('parameter 1 is not of type "Element".');
66571
- }
66572
- var observations = this.observations_;
66573
- // Do nothing if element is already being observed.
66574
- if (observations.has(target)) {
66575
- return;
66576
- }
66577
- observations.set(target, new ResizeObservation(target));
66578
- this.controller_.addObserver(this);
66579
- // Force the update of observations.
66580
- this.controller_.refresh();
66581
- };
66582
- /**
66583
- * Stops observing provided element.
66584
- *
66585
- * @param {Element} target - Element to stop observing.
66586
- * @returns {void}
66587
- */
66588
- ResizeObserverSPI.prototype.unobserve = function (target) {
66589
- if (!arguments.length) {
66590
- throw new TypeError('1 argument required, but only 0 present.');
66591
- }
66592
- // Do nothing if current environment doesn't have the Element interface.
66593
- if (typeof Element === 'undefined' || !(Element instanceof Object)) {
66594
- return;
66595
- }
66596
- if (!(target instanceof getWindowOf(target).Element)) {
66597
- throw new TypeError('parameter 1 is not of type "Element".');
66598
- }
66599
- var observations = this.observations_;
66600
- // Do nothing if element is not being observed.
66601
- if (!observations.has(target)) {
66602
- return;
66603
- }
66604
- observations.delete(target);
66605
- if (!observations.size) {
66606
- this.controller_.removeObserver(this);
66607
- }
66608
- };
66609
- /**
66610
- * Stops observing all elements.
66611
- *
66612
- * @returns {void}
66613
- */
66614
- ResizeObserverSPI.prototype.disconnect = function () {
66615
- this.clearActive();
66616
- this.observations_.clear();
66617
- this.controller_.removeObserver(this);
66618
- };
66619
- /**
66620
- * Collects observation instances the associated element of which has changed
66621
- * it's content rectangle.
66622
- *
66623
- * @returns {void}
66624
- */
66625
- ResizeObserverSPI.prototype.gatherActive = function () {
66626
- var _this = this;
66627
- this.clearActive();
66628
- this.observations_.forEach(function (observation) {
66629
- if (observation.isActive()) {
66630
- _this.activeObservations_.push(observation);
66631
- }
66632
- });
66633
- };
66634
- /**
66635
- * Invokes initial callback function with a list of ResizeObserverEntry
66636
- * instances collected from active resize observations.
66637
- *
66638
- * @returns {void}
66639
- */
66640
- ResizeObserverSPI.prototype.broadcastActive = function () {
66641
- // Do nothing if observer doesn't have active observations.
66642
- if (!this.hasActive()) {
66643
- return;
66644
- }
66645
- var ctx = this.callbackCtx_;
66646
- // Create ResizeObserverEntry instance for every active observation.
66647
- var entries = this.activeObservations_.map(function (observation) {
66648
- return new ResizeObserverEntry(observation.target, observation.broadcastRect());
66649
- });
66650
- this.callback_.call(ctx, entries, ctx);
66651
- this.clearActive();
66652
- };
66653
- /**
66654
- * Clears the collection of active observations.
66655
- *
66656
- * @returns {void}
66657
- */
66658
- ResizeObserverSPI.prototype.clearActive = function () {
66659
- this.activeObservations_.splice(0);
66660
- };
66661
- /**
66662
- * Tells whether observer has active observations.
66663
- *
66664
- * @returns {boolean}
66665
- */
66666
- ResizeObserverSPI.prototype.hasActive = function () {
66667
- return this.activeObservations_.length > 0;
66668
- };
66669
- return ResizeObserverSPI;
66523
+ var ResizeObserverSPI = /** @class */ (function () {
66524
+ /**
66525
+ * Creates a new instance of ResizeObserver.
66526
+ *
66527
+ * @param {ResizeObserverCallback} callback - Callback function that is invoked
66528
+ * when one of the observed elements changes it's content dimensions.
66529
+ * @param {ResizeObserverController} controller - Controller instance which
66530
+ * is responsible for the updates of observer.
66531
+ * @param {ResizeObserver} callbackCtx - Reference to the public
66532
+ * ResizeObserver instance which will be passed to callback function.
66533
+ */
66534
+ function ResizeObserverSPI(callback, controller, callbackCtx) {
66535
+ /**
66536
+ * Collection of resize observations that have detected changes in dimensions
66537
+ * of elements.
66538
+ *
66539
+ * @private {Array<ResizeObservation>}
66540
+ */
66541
+ this.activeObservations_ = [];
66542
+ /**
66543
+ * Registry of the ResizeObservation instances.
66544
+ *
66545
+ * @private {Map<Element, ResizeObservation>}
66546
+ */
66547
+ this.observations_ = new MapShim();
66548
+ if (typeof callback !== 'function') {
66549
+ throw new TypeError('The callback provided as parameter 1 is not a function.');
66550
+ }
66551
+ this.callback_ = callback;
66552
+ this.controller_ = controller;
66553
+ this.callbackCtx_ = callbackCtx;
66554
+ }
66555
+ /**
66556
+ * Starts observing provided element.
66557
+ *
66558
+ * @param {Element} target - Element to be observed.
66559
+ * @returns {void}
66560
+ */
66561
+ ResizeObserverSPI.prototype.observe = function (target) {
66562
+ if (!arguments.length) {
66563
+ throw new TypeError('1 argument required, but only 0 present.');
66564
+ }
66565
+ // Do nothing if current environment doesn't have the Element interface.
66566
+ if (typeof Element === 'undefined' || !(Element instanceof Object)) {
66567
+ return;
66568
+ }
66569
+ if (!(target instanceof getWindowOf(target).Element)) {
66570
+ throw new TypeError('parameter 1 is not of type "Element".');
66571
+ }
66572
+ var observations = this.observations_;
66573
+ // Do nothing if element is already being observed.
66574
+ if (observations.has(target)) {
66575
+ return;
66576
+ }
66577
+ observations.set(target, new ResizeObservation(target));
66578
+ this.controller_.addObserver(this);
66579
+ // Force the update of observations.
66580
+ this.controller_.refresh();
66581
+ };
66582
+ /**
66583
+ * Stops observing provided element.
66584
+ *
66585
+ * @param {Element} target - Element to stop observing.
66586
+ * @returns {void}
66587
+ */
66588
+ ResizeObserverSPI.prototype.unobserve = function (target) {
66589
+ if (!arguments.length) {
66590
+ throw new TypeError('1 argument required, but only 0 present.');
66591
+ }
66592
+ // Do nothing if current environment doesn't have the Element interface.
66593
+ if (typeof Element === 'undefined' || !(Element instanceof Object)) {
66594
+ return;
66595
+ }
66596
+ if (!(target instanceof getWindowOf(target).Element)) {
66597
+ throw new TypeError('parameter 1 is not of type "Element".');
66598
+ }
66599
+ var observations = this.observations_;
66600
+ // Do nothing if element is not being observed.
66601
+ if (!observations.has(target)) {
66602
+ return;
66603
+ }
66604
+ observations.delete(target);
66605
+ if (!observations.size) {
66606
+ this.controller_.removeObserver(this);
66607
+ }
66608
+ };
66609
+ /**
66610
+ * Stops observing all elements.
66611
+ *
66612
+ * @returns {void}
66613
+ */
66614
+ ResizeObserverSPI.prototype.disconnect = function () {
66615
+ this.clearActive();
66616
+ this.observations_.clear();
66617
+ this.controller_.removeObserver(this);
66618
+ };
66619
+ /**
66620
+ * Collects observation instances the associated element of which has changed
66621
+ * it's content rectangle.
66622
+ *
66623
+ * @returns {void}
66624
+ */
66625
+ ResizeObserverSPI.prototype.gatherActive = function () {
66626
+ var _this = this;
66627
+ this.clearActive();
66628
+ this.observations_.forEach(function (observation) {
66629
+ if (observation.isActive()) {
66630
+ _this.activeObservations_.push(observation);
66631
+ }
66632
+ });
66633
+ };
66634
+ /**
66635
+ * Invokes initial callback function with a list of ResizeObserverEntry
66636
+ * instances collected from active resize observations.
66637
+ *
66638
+ * @returns {void}
66639
+ */
66640
+ ResizeObserverSPI.prototype.broadcastActive = function () {
66641
+ // Do nothing if observer doesn't have active observations.
66642
+ if (!this.hasActive()) {
66643
+ return;
66644
+ }
66645
+ var ctx = this.callbackCtx_;
66646
+ // Create ResizeObserverEntry instance for every active observation.
66647
+ var entries = this.activeObservations_.map(function (observation) {
66648
+ return new ResizeObserverEntry(observation.target, observation.broadcastRect());
66649
+ });
66650
+ this.callback_.call(ctx, entries, ctx);
66651
+ this.clearActive();
66652
+ };
66653
+ /**
66654
+ * Clears the collection of active observations.
66655
+ *
66656
+ * @returns {void}
66657
+ */
66658
+ ResizeObserverSPI.prototype.clearActive = function () {
66659
+ this.activeObservations_.splice(0);
66660
+ };
66661
+ /**
66662
+ * Tells whether observer has active observations.
66663
+ *
66664
+ * @returns {boolean}
66665
+ */
66666
+ ResizeObserverSPI.prototype.hasActive = function () {
66667
+ return this.activeObservations_.length > 0;
66668
+ };
66669
+ return ResizeObserverSPI;
66670
66670
  }());
66671
66671
 
66672
- // Registry of internal observers. If WeakMap is not available use current shim
66673
- // for the Map collection as it has all required methods and because WeakMap
66674
- // can't be fully polyfilled anyway.
66675
- var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
66676
- /**
66677
- * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
66678
- * exposing only those methods and properties that are defined in the spec.
66679
- */
66680
- var ResizeObserver = /** @class */ (function () {
66681
- /**
66682
- * Creates a new instance of ResizeObserver.
66683
- *
66684
- * @param {ResizeObserverCallback} callback - Callback that is invoked when
66685
- * dimensions of the observed elements change.
66686
- */
66687
- function ResizeObserver(callback) {
66688
- if (!(this instanceof ResizeObserver)) {
66689
- throw new TypeError('Cannot call a class as a function.');
66690
- }
66691
- if (!arguments.length) {
66692
- throw new TypeError('1 argument required, but only 0 present.');
66693
- }
66694
- var controller = ResizeObserverController.getInstance();
66695
- var observer = new ResizeObserverSPI(callback, controller, this);
66696
- observers.set(this, observer);
66697
- }
66698
- return ResizeObserver;
66699
- }());
66700
- // Expose public methods of ResizeObserver.
66701
- [
66702
- 'observe',
66703
- 'unobserve',
66704
- 'disconnect'
66705
- ].forEach(function (method) {
66706
- ResizeObserver.prototype[method] = function () {
66707
- var _a;
66708
- return (_a = observers.get(this))[method].apply(_a, arguments);
66709
- };
66672
+ // Registry of internal observers. If WeakMap is not available use current shim
66673
+ // for the Map collection as it has all required methods and because WeakMap
66674
+ // can't be fully polyfilled anyway.
66675
+ var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
66676
+ /**
66677
+ * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
66678
+ * exposing only those methods and properties that are defined in the spec.
66679
+ */
66680
+ var ResizeObserver = /** @class */ (function () {
66681
+ /**
66682
+ * Creates a new instance of ResizeObserver.
66683
+ *
66684
+ * @param {ResizeObserverCallback} callback - Callback that is invoked when
66685
+ * dimensions of the observed elements change.
66686
+ */
66687
+ function ResizeObserver(callback) {
66688
+ if (!(this instanceof ResizeObserver)) {
66689
+ throw new TypeError('Cannot call a class as a function.');
66690
+ }
66691
+ if (!arguments.length) {
66692
+ throw new TypeError('1 argument required, but only 0 present.');
66693
+ }
66694
+ var controller = ResizeObserverController.getInstance();
66695
+ var observer = new ResizeObserverSPI(callback, controller, this);
66696
+ observers.set(this, observer);
66697
+ }
66698
+ return ResizeObserver;
66699
+ }());
66700
+ // Expose public methods of ResizeObserver.
66701
+ [
66702
+ 'observe',
66703
+ 'unobserve',
66704
+ 'disconnect'
66705
+ ].forEach(function (method) {
66706
+ ResizeObserver.prototype[method] = function () {
66707
+ var _a;
66708
+ return (_a = observers.get(this))[method].apply(_a, arguments);
66709
+ };
66710
66710
  });
66711
66711
 
66712
- var index = (function () {
66713
- // Export existing implementation if available.
66714
- if (typeof global$1.ResizeObserver !== 'undefined') {
66715
- return global$1.ResizeObserver;
66716
- }
66717
- return ResizeObserver;
66712
+ var index = (function () {
66713
+ // Export existing implementation if available.
66714
+ if (typeof global$1.ResizeObserver !== 'undefined') {
66715
+ return global$1.ResizeObserver;
66716
+ }
66717
+ return ResizeObserver;
66718
66718
  })();
66719
66719
 
66720
66720
  /* harmony default export */ __webpack_exports__["default"] = (index);
@@ -66862,19 +66862,19 @@ module.exports = function ( delay, noTrailing, callback, debounceMode ) {
66862
66862
 
66863
66863
  /***/ }),
66864
66864
 
66865
- /***/ 1956:
66865
+ /***/ 2580:
66866
66866
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
66867
66867
 
66868
66868
  // style-loader: Adds some css to the DOM by adding a <style> tag
66869
66869
 
66870
66870
  // load the styles
66871
- var content = __webpack_require__(4710);
66871
+ var content = __webpack_require__(1957);
66872
66872
  if(content.__esModule) content = content.default;
66873
66873
  if(typeof content === 'string') content = [[module.id, content, '']];
66874
66874
  if(content.locals) module.exports = content.locals;
66875
66875
  // add the styles to the DOM
66876
66876
  var add = (__webpack_require__(4402)/* ["default"] */ .Z)
66877
- var update = add("57bcdeaf", content, true, {"sourceMap":false,"shadowMode":false});
66877
+ var update = add("37f09422", content, true, {"sourceMap":false,"shadowMode":false});
66878
66878
 
66879
66879
  /***/ }),
66880
66880
 
@@ -67378,7 +67378,7 @@ if (typeof window !== 'undefined') {
67378
67378
  // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
67379
67379
  var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(7203);
67380
67380
  var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
67381
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=template&id=0dab12a8&scoped=true&
67381
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=template&id=09d51dff&scoped=true&
67382
67382
  var render = function render() {
67383
67383
  var _vm = this,
67384
67384
  _c = _vm._self._c;
@@ -67398,7 +67398,8 @@ var render = function render() {
67398
67398
  "on-exceed": _vm.handleExceed,
67399
67399
  "on-success": _vm.handleUploadSuccess,
67400
67400
  "show-file-list": false,
67401
- "headers": _vm.headers
67401
+ "headers": _vm.headers,
67402
+ "data": _vm.data
67402
67403
  }
67403
67404
  }, [_c('el-button', {
67404
67405
  attrs: {
@@ -67428,7 +67429,7 @@ var render = function render() {
67428
67429
  staticClass: "el-upload-list__item ele-upload-list__item-content"
67429
67430
  }, [_c('el-link', {
67430
67431
  attrs: {
67431
- "href": `${_vm.baseUrl}${file.url}`,
67432
+ "href": `${file.url}`,
67432
67433
  "underline": false,
67433
67434
  "target": "_blank"
67434
67435
  }
@@ -67538,7 +67539,28 @@ var render = function render() {
67538
67539
  staticStyle: {
67539
67540
  "color": "#f56c6c"
67540
67541
  }
67541
- }, [_vm._v(_vm._s(_vm.fileType.join("/")))])] : _vm._e(), _vm._v(" 的文件 ")], 2) : _vm._e()], 1)]) : _vm._e()]);
67542
+ }, [_vm._v(_vm._s(_vm.fileType.join("/")))])] : _vm._e(), _vm._v(" 的文件 ")], 2) : _vm._e()], 1)]) : _vm._e(), _vm.type === 'igw-media' ? _c('div', [_c('el-upload', {
67543
+ ref: "upload",
67544
+ staticClass: "upload-file-uploader",
67545
+ attrs: {
67546
+ "multiple": "",
67547
+ "action": _vm.uploadDomain + _vm.uploadFileUrl,
67548
+ "before-upload": _vm.handleBeforeUpload,
67549
+ "file-list": _vm.fileList,
67550
+ "limit": _vm.limit,
67551
+ "on-error": _vm.handleUploadError,
67552
+ "on-exceed": _vm.handleExceed,
67553
+ "on-success": _vm.handleUploadSuccess,
67554
+ "show-file-list": false,
67555
+ "headers": _vm.headers,
67556
+ "data": _vm.data
67557
+ }
67558
+ }, _vm._l(_vm.mechanismList, function (item, index) {
67559
+ return _c('div', {
67560
+ key: index,
67561
+ staticClass: "mechanism-item"
67562
+ }, [_vm._v(_vm._s(item))]);
67563
+ }), 0)], 1) : _vm._e()]);
67542
67564
  };
67543
67565
 
67544
67566
  var staticRenderFns = [];
@@ -68231,7 +68253,7 @@ function download(url, params, filename) {
68231
68253
  downloadLoadingInstance.close();
68232
68254
  });
68233
68255
  }
68234
- /* harmony default export */ var utils_request = (service);
68256
+ /* harmony default export */ var request = (service);
68235
68257
  ;// CONCATENATED MODULE: ./packages/rmtFileUpload/api/rmtFileUploadSdk.js
68236
68258
  // import attachmentRequest from '../../utils/attachmentRequest'
68237
68259
 
@@ -68240,6 +68262,7 @@ let headers = {
68240
68262
  'X-Key': '',
68241
68263
  'X-Token': ''
68242
68264
  };
68265
+
68243
68266
  function getCookies(_name, _data) {
68244
68267
  if (_data) {
68245
68268
  let storeData = typeof _data === 'object' ? JSON.stringify(_data) : _data;
@@ -68248,9 +68271,10 @@ function getCookies(_name, _data) {
68248
68271
  return js_cookie.get(_name);
68249
68272
  }
68250
68273
  }
68274
+
68251
68275
  function getUpToken(_fun) {
68252
68276
  getCookies('isUpToken', 'loading');
68253
- utils_request({
68277
+ request({
68254
68278
  url: '/attachment/getAttachmentInfo',
68255
68279
  method: 'get'
68256
68280
  }).then(response => {
@@ -68279,6 +68303,7 @@ function getUpToken(_fun) {
68279
68303
  });
68280
68304
  } // Token是否过期
68281
68305
 
68306
+
68282
68307
  function isTokenExpired(_fun) {
68283
68308
  let expiresAt = getCookies('expiresAt');
68284
68309
 
@@ -68306,34 +68331,35 @@ function isTokenExpired(_fun) {
68306
68331
  * @param {string} params
68307
68332
  * @returns
68308
68333
  */
68334
+ // function uploadFile(params) {
68335
+ // // 判断token是否过期
68336
+ // isTokenExpired();
68337
+ // return request({
68338
+ // baseURL: 'https://attachment.pengbei.tech',
68339
+ // headers: {
68340
+ // 'accept': '*/*',
68341
+ // 'X-Client': 'WEB',
68342
+ // 'X-Key': getCookies('X-Key'),
68343
+ // 'X-Token': getCookies('X-Token')
68344
+ // },
68345
+ // url: '/upload/upload',
68346
+ // method: 'post',
68347
+ // data: params
68348
+ // })
68349
+ // }
68309
68350
 
68310
- function uploadFile(params) {
68311
- // 判断token是否过期
68312
- isTokenExpired();
68313
- return request({
68314
- baseURL: 'https://attachment.pengbei.tech',
68315
- headers: {
68316
- 'accept': '*/*',
68317
- 'X-Client': 'WEB',
68318
- 'X-Key': getCookies('X-Key'),
68319
- 'X-Token': getCookies('X-Token')
68320
- },
68321
- url: '/upload/upload',
68322
- method: 'post',
68323
- data: params
68324
- });
68325
- }
68326
68351
  /**
68327
68352
  * 通过后台转存网络图片
68328
68353
  * @param {string} params
68329
68354
  * @returns
68330
68355
  */
68331
68356
 
68357
+
68332
68358
  function uploadNetworkImg(params) {
68333
68359
  // 判断token是否过期
68334
68360
  isTokenExpired();
68335
- return utils_request({
68336
- baseURL: 'https://attachment.pengbei.tech',
68361
+ return request({
68362
+ baseURL: params.domain,
68337
68363
  headers: {
68338
68364
  'accept': '*/*',
68339
68365
  'X-Client': 'WEB',
@@ -68353,6 +68379,15 @@ function uploadNetworkImg(params) {
68353
68379
  // export function removeToken() {
68354
68380
  // return Cookies.remove(TokenKey)
68355
68381
  // }
68382
+
68383
+
68384
+ /* harmony default export */ var rmtFileUploadSdk = ({
68385
+ getCookies,
68386
+ getUpToken,
68387
+ isTokenExpired,
68388
+ uploadNetworkImg // uploadFile
68389
+
68390
+ });
68356
68391
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=script&lang=js&
68357
68392
 
68358
68393
  // import { rmtFileUpload } from "./index.js";
@@ -68377,7 +68412,8 @@ function uploadNetworkImg(params) {
68377
68412
  type: Object,
68378
68413
  default: function () {
68379
68414
  return {
68380
- 'type': 'img'
68415
+ 'type': 'img',
68416
+ 'removeOrientation': true
68381
68417
  };
68382
68418
  }
68383
68419
  },
@@ -68428,15 +68464,34 @@ function uploadNetworkImg(params) {
68428
68464
  type: String,
68429
68465
  default: "/service-api"
68430
68466
  },
68467
+ // 上传的图片服务器地址
68431
68468
  uploadFileUrl: {
68432
68469
  type: String,
68433
- default: "/upload/upload" // 上传的图片服务器地址
68434
-
68470
+ default: "/upload/upload"
68435
68471
  },
68472
+ // 上传的图片服务器地址
68436
68473
  uploadDomain: {
68437
68474
  type: String,
68438
- default: 'https://attachment.pengbei.tech' // 上传的图片服务器地址
68439
-
68475
+ default: 'https://attachment.pengbei.tech'
68476
+ },
68477
+ // 请求前回调函数
68478
+ beforeFun: {
68479
+ type: Function,
68480
+ default: null
68481
+ },
68482
+ // 请求成功回调函数
68483
+ successFun: {
68484
+ type: Function,
68485
+ default: null
68486
+ },
68487
+ // 请求失败回调函数
68488
+ errorFun: {
68489
+ type: Function,
68490
+ default: null
68491
+ },
68492
+ mechanismList: {
68493
+ type: Array,
68494
+ default: null
68440
68495
  }
68441
68496
  },
68442
68497
 
@@ -68446,8 +68501,8 @@ function uploadNetworkImg(params) {
68446
68501
  uploadList: [],
68447
68502
  headers: {
68448
68503
  // Authorization: "Bearer " + getToken(),
68449
- // 'X-Key': getCookies('X-Key'),
68450
- // 'X-Token': getCookies('X-Token'),
68504
+ // 'X-Key': rmtFileUploadSdk.getCookies('X-Key'),
68505
+ // 'X-Token': rmtFileUploadSdk.getCookies('X-Token'),
68451
68506
  'X-Key': '',
68452
68507
  'X-Token': '',
68453
68508
  'X-Client': 'WEB'
@@ -68485,6 +68540,8 @@ function uploadNetworkImg(params) {
68485
68540
  return item;
68486
68541
  });
68487
68542
  } else {
68543
+ this.imageUrl = "";
68544
+ this.hasUpload = false;
68488
68545
  this.fileList = [];
68489
68546
  return [];
68490
68547
  }
@@ -68496,9 +68553,9 @@ function uploadNetworkImg(params) {
68496
68553
  },
68497
68554
 
68498
68555
  created() {
68499
- isTokenExpired(() => {
68500
- this.headers['X-Key'] = getCookies('X-Key');
68501
- this.headers['X-Token'] = getCookies('X-Token');
68556
+ rmtFileUploadSdk.isTokenExpired(() => {
68557
+ this.headers['X-Key'] = rmtFileUploadSdk.getCookies('X-Key');
68558
+ this.headers['X-Token'] = rmtFileUploadSdk.getCookies('X-Token');
68502
68559
  });
68503
68560
  },
68504
68561
 
@@ -68512,7 +68569,12 @@ function uploadNetworkImg(params) {
68512
68569
  methods: {
68513
68570
  // 上传前校检格式和大小
68514
68571
  async handleBeforeUpload(file) {
68515
- var that = this; // 校检文件类型
68572
+ var that = this;
68573
+
68574
+ if (typeof that.beforeFun == 'function') {
68575
+ that.beforeFun(file);
68576
+ } // 校检文件类型
68577
+
68516
68578
 
68517
68579
  if (that.fileType) {
68518
68580
  let fileExtension = "";
@@ -68547,9 +68609,9 @@ function uploadNetworkImg(params) {
68547
68609
 
68548
68610
  var isTokenOk = function () {
68549
68611
  return new Promise((resolve, reject) => {
68550
- isTokenExpired(() => {
68551
- that.headers['X-Key'] = getCookies('X-Key');
68552
- that.headers['X-Token'] = getCookies('X-Token');
68612
+ rmtFileUploadSdk.isTokenExpired(() => {
68613
+ that.headers['X-Key'] = rmtFileUploadSdk.getCookies('X-Key');
68614
+ that.headers['X-Token'] = rmtFileUploadSdk.getCookies('X-Token');
68553
68615
 
68554
68616
  if (that.headers['X-Key']) {
68555
68617
  console.log("token ok");
@@ -68583,10 +68645,14 @@ function uploadNetworkImg(params) {
68583
68645
  },
68584
68646
 
68585
68647
  // 上传失败
68586
- handleUploadError() {
68648
+ handleUploadError(res) {
68587
68649
  var that = this;
68588
68650
  that.$message.error("上传失败,请重试");
68589
68651
  that.$modal.closeLoading();
68652
+
68653
+ if (typeof that.errorFun == 'function') {
68654
+ that.errorFun(res);
68655
+ }
68590
68656
  },
68591
68657
 
68592
68658
  // 上传成功回调
@@ -68606,8 +68672,16 @@ function uploadNetworkImg(params) {
68606
68672
  that.number = 0;
68607
68673
  that.$emit("input", that.listToString(that.fileList));
68608
68674
  }
68675
+
68676
+ if (typeof that.successFun == 'function') {
68677
+ that.successFun(res);
68678
+ }
68609
68679
  } else {
68610
68680
  that.$message.error(res.message || "上传失败");
68681
+
68682
+ if (typeof that.errorFun == 'function') {
68683
+ that.errorFun(res);
68684
+ }
68611
68685
  }
68612
68686
 
68613
68687
  that.$modal.closeLoading();
@@ -68649,7 +68723,6 @@ function uploadNetworkImg(params) {
68649
68723
  var that = this;
68650
68724
 
68651
68725
  if (res.data && res.data.url) {
68652
- console.log(res);
68653
68726
  that.$message.success("上传成功");
68654
68727
  that.uploadList = [{
68655
68728
  FileName: res.data.originalFileName,
@@ -68664,14 +68737,23 @@ function uploadNetworkImg(params) {
68664
68737
  that.imageUrl = res.data.url;
68665
68738
  that.$emit("input", that.listToString(that.uploadList));
68666
68739
  that.hasUpload = true; // that.$emit("input", res.data.url);
68740
+
68741
+ if (typeof that.successFun == 'function') {
68742
+ that.successFun(res);
68743
+ }
68667
68744
  } else {
68668
- that.$message.error("上传失败");
68745
+ this.$message.error("上传失败");
68746
+
68747
+ if (typeof that.errorFun == 'function') {
68748
+ that.errorFun(res);
68749
+ }
68669
68750
  }
68670
68751
 
68671
68752
  that.$modal.closeLoading();
68672
68753
  },
68673
68754
 
68674
68755
  uploadNetworkImg() {
68756
+ var that = this;
68675
68757
  this.$prompt("请输入完整的图片网址", "请输入", {
68676
68758
  inputValidator: v => {
68677
68759
  console.log(v);
@@ -68691,11 +68773,12 @@ function uploadNetworkImg(params) {
68691
68773
 
68692
68774
  if (v.value) {
68693
68775
  const url = v.value.trim();
68694
- const p = await uploadNetworkImg({
68776
+ const p = await rmtFileUploadSdk.uploadNetworkImg({
68695
68777
  group: "cms",
68696
68778
  urls: [{
68697
68779
  url: url
68698
- }]
68780
+ }],
68781
+ domain: that.uploadDomain
68699
68782
  }).then(response => {
68700
68783
  this.imageUrl = response.data[0].transferUrl;
68701
68784
  this.$emit("input", response.data[0].transferUrl);
@@ -68707,33 +68790,28 @@ function uploadNetworkImg(params) {
68707
68790
  }
68708
68791
  }
68709
68792
  });
68710
- },
68711
-
68712
- isTokenExpired() {
68713
- let expiresAt = getCookies('expiresAt');
68714
-
68715
- let _expiresAt = new Date(expiresAt);
68793
+ } // rmtFileUploadSdk.isTokenExpired() {
68794
+ // let expiresAt = rmtFileUploadSdk.getCookies('expiresAt');
68795
+ // let _expiresAt = new Date(expiresAt);
68796
+ // let _nowTime = Date.now();
68797
+ // let _timeNum = _expiresAt - _nowTime;
68798
+ // if (typeof expiresAt == 'undefined') {
68799
+ // return true
68800
+ // } else if (_timeNum > 0 && _timeNum <= 1000 * 60 * 30) {
68801
+ // return true
68802
+ // } else {
68803
+ // return false
68804
+ // }
68805
+ // }
68716
68806
 
68717
- let _nowTime = Date.now();
68718
-
68719
- let _timeNum = _expiresAt - _nowTime;
68720
-
68721
- if (typeof expiresAt == 'undefined') {
68722
- return true;
68723
- } else if (_timeNum > 0 && _timeNum <= 1000 * 60 * 30) {
68724
- return true;
68725
- } else {
68726
- return false;
68727
- }
68728
- }
68729
68807
 
68730
68808
  }
68731
68809
  });
68732
68810
  ;// CONCATENATED MODULE: ./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=script&lang=js&
68733
68811
  /* harmony default export */ var rmtFileUpload_rmtFileUploadvue_type_script_lang_js_ = (rmtFileUploadvue_type_script_lang_js_);
68734
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=style&index=0&id=0dab12a8&prod&scoped=true&lang=scss&
68735
- var rmtFileUploadvue_type_style_index_0_id_0dab12a8_prod_scoped_true_lang_scss_ = __webpack_require__(1956);
68736
- ;// CONCATENATED MODULE: ./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=style&index=0&id=0dab12a8&prod&scoped=true&lang=scss&
68812
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=style&index=0&id=09d51dff&prod&scoped=true&lang=scss&
68813
+ var rmtFileUploadvue_type_style_index_0_id_09d51dff_prod_scoped_true_lang_scss_ = __webpack_require__(2580);
68814
+ ;// CONCATENATED MODULE: ./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=style&index=0&id=09d51dff&prod&scoped=true&lang=scss&
68737
68815
 
68738
68816
  ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
68739
68817
  /* globals __VUE_SSR_CONTEXT__ */
@@ -68848,7 +68926,7 @@ var component = normalizeComponent(
68848
68926
  staticRenderFns,
68849
68927
  false,
68850
68928
  null,
68851
- "0dab12a8",
68929
+ "09d51dff",
68852
68930
  null
68853
68931
 
68854
68932
  )