Files
klz-cables.com/.pnpm-store/v10/files/f8/7a7fe1fc79fb9717efdfb8cb5bbba924d55cde163d9d7283a1d9d17b24d4300bf5b2437cbf0a352058e0818519e92fb32b37eb73f07e3bbf99d1087c224a32
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

61 lines
2.4 KiB
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/* eslint-disable jsdoc/require-jsdoc */
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
class LayoutShiftManager {constructor() { LayoutShiftManager.prototype.__init.call(this);LayoutShiftManager.prototype.__init2.call(this); }
// eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
// eslint-disable-next-line @sentry-internal/sdk/no-class-field-initializers, @typescript-eslint/explicit-member-accessibility
__init() {this._sessionValue = 0;}
// eslint-disable-next-line @sentry-internal/sdk/no-class-field-initializers, @typescript-eslint/explicit-member-accessibility
__init2() {this._sessionEntries = [];}
// eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
_processEntry(entry) {
// Only count layout shifts without recent user input.
if (entry.hadRecentInput) return;
const firstSessionEntry = this._sessionEntries[0];
// This previously used `this._sessionEntries.at(-1)` but that is ES2022. We support ES2021 and earlier.
const lastSessionEntry = this._sessionEntries[this._sessionEntries.length - 1];
// If the entry occurred less than 1 second after the previous entry
// and less than 5 seconds after the first entry in the session,
// include the entry in the current session. Otherwise, start a new
// session.
if (
this._sessionValue &&
firstSessionEntry &&
lastSessionEntry &&
entry.startTime - lastSessionEntry.startTime < 1000 &&
entry.startTime - firstSessionEntry.startTime < 5000
) {
this._sessionValue += entry.value;
this._sessionEntries.push(entry);
} else {
this._sessionValue = entry.value;
this._sessionEntries = [entry];
}
this._onAfterProcessingUnexpectedShift?.(entry);
}
}
exports.LayoutShiftManager = LayoutShiftManager;
//# sourceMappingURL=LayoutShiftManager.js.map