47 lines
1.5 KiB
JavaScript
47 lines
1.5 KiB
JavaScript
// Metro module 1050 (f1051).
|
|
import * as _classCallCheck from "./_classCallCheck";
|
|
import * as __createClass from "./_createClass";
|
|
let env858 = {};
|
|
Object.defineProperty(exports, Symbol.toStringTag, {
|
|
value: "Module"
|
|
});
|
|
const LayoutShiftManager = function LayoutShiftManager() {
|
|
"use strict";
|
|
_classCallCheck(this, LayoutShiftManager);
|
|
LayoutShiftManager.prototype.__init.call(this);
|
|
LayoutShiftManager.prototype.__init2.call(this);
|
|
};
|
|
exports.LayoutShiftManager = __createClass(LayoutShiftManager, [{
|
|
key: "__init",
|
|
value: function __init() {
|
|
"use strict";
|
|
this._sessionValue = 0;
|
|
}
|
|
}, {
|
|
key: "__init2",
|
|
value: function __init2() {
|
|
"use strict";
|
|
this._sessionEntries = [];
|
|
}
|
|
}, {
|
|
key: "_processEntry",
|
|
value: function _processEntry(a0) {
|
|
"use strict";
|
|
if (!a0.hadRecentInput) {
|
|
const r8 = this._sessionEntries[0];
|
|
const r11 = this._sessionEntries[this._sessionEntries.length - 1];
|
|
if (this._sessionValue && (r8 && (r11 && (a0.startTime - r11.startTime < 1000 && a0.startTime - r8.startTime < 5000)))) {
|
|
this._sessionValue = this._sessionValue + a0.value;
|
|
this._sessionEntries.push(a0);
|
|
} else {
|
|
this._sessionValue = a0.value;
|
|
this._sessionEntries = [a0];
|
|
}
|
|
const _onAfterProcessingUnexpectedShift = this._onAfterProcessingUnexpectedShift;
|
|
if (_onAfterProcessingUnexpectedShift != null) {
|
|
_onAfterProcessingUnexpectedShift.call(this, a0);
|
|
}
|
|
}
|
|
}
|
|
}]);
|