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ACAA,OAAApB,iBAAA,yBACAo4G,MACK,GAEE,MAkBAI,EAAAD,IACP,wBAAAn3G,OACA,SAGA,GAAAA,QAAAA,OAAAq3G,WAAAr3G,OAAAq3G,UAAAF,QACA,QAAAn3G,OAAAq3G,UAAAF,QAAAA,GAIA,MA5BO,EAAAG,EAAAH,KACP,IAAAG,EACA,SAGA,UAAAA,EACA,SAEA,IACA,MAAAC,EAAAv7F,KAAAkJ,MAAAoyF,EAAA9uG,QAAA,YACAA,QAAA,UACAA,QAAA,gCAAyB,YACzB,OAAA+uG,KAAAA,EAAAJ,EACA,CACA,MAAAvnG,GACA,QACA,GAYA4nG,CAD0Bt5G,EAAOP,IAAA,iBACjCw5G,ICxDA,MAAMM,EAA2BC,IAC/B,IAAKA,EACH,MAAM3xG,MAAM,6BAKHgxG,EAAUY,ECVvB33G,OAAOpB,iBAAiB,0BAA2B,KDWzB84G,MCVnB13G,OAAO43G,oBAEZ/B,EAAWn1G,KAAK,CACd6qC,cAAe,uCACfnB,YAAa,sCACbvgC,KAAM,gBACNrC,QAAS,oBACTD,IAAKvH,OAAO43G,mBACZt6G,QAAS0C,OAAO63G,eAChB/qE,kBAAmB9sC,OAAO83G,kBAC1BzqE,wBAAyB,EACzBqB,uBAAuB,EACvBS,oBAAqB,kBACrBj+B,iBDHsBwmG,ECGKX,EAAQgB,WDFrCN,EAAwBC,GACjBM,EAAiBN,GCC2B9mG,EAAAA,EAAgBC,QAAUD,EAAAA,EAAgBE","sources":["webpack://market-storefront/./node_modules/@datadog/browser-core/esm/boot/init.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/browser/addEventListener.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/browser/fetch.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/browser/pageMayExitObservable.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/browser/runOnReadyState.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/connectivity/connectivity.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/error/error.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/error/error.types.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/intakeSites.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/session/sessionConstants.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/tags.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/telemetry/rawTelemetryEvent.types.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/telemetry/telemetry.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/trackingConsent.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/abstractHooks.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/catchUserErrors.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/display.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/encoder.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/experimentalFeatures.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/getZoneJsOriginalValue.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/globalObject.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/instrumentMethod.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/mergeInto.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/mockable.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/monitor.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/queueMicrotask.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/observable.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/requestIdleCallback.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/sendToExtension.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/serialisation/jsonStringify.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/serialisation/sanitize.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/stackTrace/computeStackTrace.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/stackTrace/handlingStack.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/timer.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/utils/arrayUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/utils/browserDetection.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/utils/byteUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/utils/numberUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/utils/objectUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/utils/responseUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/utils/typeUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/utils/urlPolyfill.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/valueHistory.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/transport/batch.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/transport/eventBridge.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/transport/flushController.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/transport/sendWithRetryStrategy.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/transport/httpRequest.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/error/trackRuntimeError.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/context/defineContextMethod.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/context/contextConstants.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/utils/stringUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/boot/displayAlreadyInitializedError.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/rawRumEvent.types.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/vital/vitalCollection.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/plugins.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/context/storeContextManager.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/context/contextManager.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/context/contextUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/contexts/globalContext.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/contexts/userContext.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/contexts/accountContext.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/browser/fetchObservable.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/readBytesFromStream.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/browser/cookie.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/synthetics/syntheticsWorkerValues.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/hooks.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/session/sessionStateValidation.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/session/sessionState.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInCookie.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/session/oldCookiesMigration.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInLocalStorage.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/session/sessionStoreOperations.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInMemory.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/session/sessionStore.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/matchOption.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/extension/extensionUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/allowedTrackingOrigins.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/configuration/endpointBuilder.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/configuration/transportConfiguration.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/configuration/configuration.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/configuration/configuration.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/extractRegexMatch.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/configuration/jsonPathParser.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/configuration/remoteConfiguration.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/boot/preStartRum.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/boundedBuffer.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/contexts/tabContext.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/browser/domMutationObservable.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/lifeCycle.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/abstractLifeCycle.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/contexts/viewHistory.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/browser/xhrObservable.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/resourceUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/resource/resourceUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/sampler/sampler.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/tracing/identifier.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/tracing/tracer.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/resource/graphql.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/requestCollection.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/discardNegativeDuration.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/browser/htmlDomUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/browser/firstInputPolyfill.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/browser/performanceObservable.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/waitPageActivityEnd.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/action/actionNameConstants.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/getSelectorFromElement.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/privacyConstants.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/privacy.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/trackEventCounts.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/eventTracker.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/getComposedPathSelector.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/action/clickChain.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/action/getActionNameFromElement.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/action/listenActionEvents.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/action/computeFrustration.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/action/interactionSelectorCache.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/action/isActionChildEvent.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/action/trackClickActions.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/action/actionCollection.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/action/trackManualActions.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/console/consoleObservable.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/report/reportObservable.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/error/errorCollection.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/error/trackConsoleError.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/error/trackReportError.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/taskQueue.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/resource/matchRequestResourceEntry.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/tracing/getDocumentTraceId.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/browser/performanceUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/resource/retrieveInitialDocumentResourceTiming.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/resource/resourceCollection.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/resource/requestRegistry.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/resource/trackManualResources.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/tools/utils/timezone.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackNavigationTimings.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackLargestContentfulPaint.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackFirstHidden.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackInitialViewMetrics.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackFirstContentfulPaint.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackFirstInput.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/getClsAttributionImpactedArea.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackCumulativeLayoutShift.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/interactionCountPolyfill.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackInteractionToNextPaint.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/browser/scroll.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/browser/viewportObservable.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackScrollMetrics.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackCommonViewMetrics.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackLoadingTime.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackBfcacheMetrics.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/trackViews.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/trackViewEventCounts.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/bfCacheSupport.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewCollection.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/session/sessionManager.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/rumSessionManager.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/contexts/urlContexts.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/browser/locationChangeObservable.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/contexts/featureFlagContext.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/startCustomerDataTelemetry.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/contexts/pageStateHistory.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/browser/cookieObservable.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/contexts/ciVisibilityContext.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/longTask/longTaskCollection.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/eventRateLimiter/createEventRateLimiter.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/limitModification.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/assembly.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/event/eventCollection.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/contexts/sourceCodeContext.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/boot/startRum.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/transport/startRumEventBridge.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/transport/startRumBatch.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/contexts/trackingConsentContext.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/startInitialViewMetricsTelemetry.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/browser/windowOpenObservable.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/contexts/defaultContext.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/contexts/sessionContext.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/contexts/connectivityContext.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/contexts/displayContext.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/contexts/syntheticsContext.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/contexts/internalContext.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/boot/rumPublicApi.js","webpack://market-storefront/./node_modules/@datadog/browser-core/esm/domain/bufferedData.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/domain/getSessionReplayUrl.js","webpack://market-storefront/./node_modules/@datadog/browser-rum-core/esm/transport/formDataTransport.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/types/sessionReplayConstants.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/experimentalFeatures.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializationUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeStyleSheets.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeAttribute.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeAttributes.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeNode.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializationStats.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializationTransaction.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/changeEncoder.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeFullSnapshot.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeNodeAsChange.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/insertionCursor.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeFullSnapshotAsChange.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/assembly.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeMutations.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeMutationsAsChange.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/viewports.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/startFullSnapshots.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/eventsUtils.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackMove.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackMouseInteraction.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackScroll.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackViewportResize.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackMediaInteraction.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackStyleSheet.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackFocus.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackViewEnd.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackInput.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackMutation.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/mutationBatch.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/itemIds.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/recordingScope.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/record.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/shadowRootsController.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/record/elementsScrollPositions.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/segmentCollection/segment.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/segmentCollection/segmentCollection.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/segmentCollection/buildReplayPayload.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/segmentCollection/startSegmentTelemetry.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/boot/startRecording.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/startRecordBridge.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/profiling/utils/getDefaultViewName.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/profiling/utils/getCustomOrDefaultViewName.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/profiling/transport/buildProfileEventAttributes.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/profiling/transport/assembly.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/profiling/longTaskHistory.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/profiling/actionHistory.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/profiling/vitalHistory.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/profiling/profiler.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/profiling/utils/getNumberOfSamples.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/replayStats.js","webpack://market-storefront/webpack/bootstrap","webpack://market-storefront/webpack/runtime/define property getters","webpack://market-storefront/webpack/runtime/hasOwnProperty shorthand","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/deflate/deflateEncoder.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/scriptLoadingError.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/deflate/deflateWorker.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/boot/isBrowserSupported.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/getSessionReplayLink.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/boot/lazyLoadRecorder.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/boot/postStartStrategy.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/startRecorderInitTelemetry.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/boot/lazyLoadProfiler.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/entries/main.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/boot/recorderApi.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/boot/preStartStrategy.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/boot/profilerApi.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/profiling/profilingContext.js","webpack://market-storefront/./node_modules/@datadog/browser-rum/esm/domain/profiling/profilingSupported.js","webpack://market-storefront/./node_modules/@envato/cookiebot-wrapper/node_modules/js-cookie/dist/js.cookie.mjs","webpack://market-storefront/./node_modules/@envato/cookiebot-wrapper/dist/consentGeo.js","webpack://market-storefront/./node_modules/@envato/cookiebot-wrapper/dist/index.js","webpack://market-storefront/./app/javascript/utils/consent.js","webpack://market-storefront/./app/javascript/packs/datadog.js"],"sourcesContent":["import { catchUserErrors } from '../tools/catchUserErrors';\nimport { setDebugMode } from '../tools/monitor';\nimport { display } from '../tools/display';\nexport function makePublicApi(stub) {\n    const publicApi = {\n        version: \"6.33.0\",\n        // This API method is intentionally not monitored, since the only thing executed is the\n        // user-provided 'callback'.  All SDK usages executed in the callback should be monitored, and\n        // we don't want to interfere with the user uncaught exceptions.\n        onReady(callback) {\n            callback();\n        },\n        ...stub,\n    };\n    // Add a \"hidden\" property to set debug mode. We define it that way to hide it\n    // as much as possible but of course it's not a real protection.\n    Object.defineProperty(publicApi, '_setDebug', {\n        get() {\n            return setDebugMode;\n        },\n        enumerable: false,\n    });\n    return publicApi;\n}\nexport function defineGlobal(global, name, api) {\n    const existingGlobalVariable = global[name];\n    if (existingGlobalVariable && !existingGlobalVariable.q && existingGlobalVariable.version) {\n        display.warn('SDK is loaded more than once. This is unsupported and might have unexpected behavior.');\n    }\n    global[name] = api;\n    if (existingGlobalVariable && existingGlobalVariable.q) {\n        existingGlobalVariable.q.forEach((fn) => catchUserErrors(fn, 'onReady callback threw an error:')());\n    }\n}\n//# sourceMappingURL=init.js.map","import { monitor } from '../tools/monitor';\nimport { getZoneJsOriginalValue } from '../tools/getZoneJsOriginalValue';\n/**\n * Add an event listener to an event target object (Window, Element, mock object...).  This provides\n * a few conveniences compared to using `element.addEventListener` directly:\n *\n * * supports IE11 by: using an option object only if needed and emulating the `once` option\n *\n * * wraps the listener with a `monitor` function\n *\n * * returns a `stop` function to remove the listener\n */\nexport function addEventListener(configuration, eventTarget, eventName, listener, options) {\n    return addEventListeners(configuration, eventTarget, [eventName], listener, options);\n}\n/**\n * Add event listeners to an event target object (Window, Element, mock object...).  This provides\n * a few conveniences compared to using `element.addEventListener` directly:\n *\n * * supports IE11 by: using an option object only if needed and emulating the `once` option\n *\n * * wraps the listener with a `monitor` function\n *\n * * returns a `stop` function to remove the listener\n *\n * * with `once: true`, the listener will be called at most once, even if different events are listened\n */\nexport function addEventListeners(configuration, eventTarget, eventNames, listener, { once, capture, passive } = {}) {\n    const listenerWithMonitor = monitor((event) => {\n        if (!event.isTrusted && !event.__ddIsTrusted && !configuration.allowUntrustedEvents) {\n            return;\n        }\n        if (once) {\n            stop();\n        }\n        listener(event);\n    });\n    const options = passive ? { capture, passive } : capture;\n    // Use the window.EventTarget.prototype when possible to avoid wrong overrides (e.g: https://github.com/salesforce/lwc/issues/1824)\n    const listenerTarget = window.EventTarget && eventTarget instanceof EventTarget ? window.EventTarget.prototype : eventTarget;\n    const add = getZoneJsOriginalValue(listenerTarget, 'addEventListener');\n    eventNames.forEach((eventName) => add.call(eventTarget, eventName, listenerWithMonitor, options));\n    function stop() {\n        const remove = getZoneJsOriginalValue(listenerTarget, 'removeEventListener');\n        eventNames.forEach((eventName) => remove.call(eventTarget, eventName, listenerWithMonitor, options));\n    }\n    return {\n        stop,\n    };\n}\n//# sourceMappingURL=addEventListener.js.map","import { getZoneJsOriginalValue } from '../tools/getZoneJsOriginalValue';\nimport { getGlobalObject } from '../tools/globalObject';\n/**\n * Make a fetch request using the native implementation, bypassing Zone.js patching.\n * This prevents unnecessary Angular change detection cycles.\n *\n * @param input - The resource to fetch (URL or Request object)\n * @param init - Optional fetch options\n * @returns A Promise that resolves to the Response\n */\nexport function fetch(input, init) {\n    return getZoneJsOriginalValue(getGlobalObject(), 'fetch')(input, init);\n}\n//# sourceMappingURL=fetch.js.map","import { Observable } from '../tools/observable';\nimport { objectValues } from '../tools/utils/polyfills';\nimport { isWorkerEnvironment } from '../tools/globalObject';\nimport { addEventListeners, addEventListener } from './addEventListener';\nexport const PageExitReason = {\n    HIDDEN: 'visibility_hidden',\n    UNLOADING: 'before_unload',\n    PAGEHIDE: 'page_hide',\n    FROZEN: 'page_frozen',\n};\nexport function createPageMayExitObservable(configuration) {\n    return new Observable((observable) => {\n        if (isWorkerEnvironment) {\n            // Page exit is not observable in worker environments (no window/document events)\n            return;\n        }\n        const { stop: stopListeners } = addEventListeners(configuration, window, [\"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */, \"freeze\" /* DOM_EVENT.FREEZE */], (event) => {\n            if (event.type === \"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */ && document.visibilityState === 'hidden') {\n                /**\n                 * Only event that guarantee to fire on mobile devices when the page transitions to background state\n                 * (e.g. when user switches to a different application, goes to homescreen, etc), or is being unloaded.\n                 */\n                observable.notify({ reason: PageExitReason.HIDDEN });\n            }\n            else if (event.type === \"freeze\" /* DOM_EVENT.FREEZE */) {\n                /**\n                 * After transitioning in background a tab can be freezed to preserve resources. (cf: https://developer.chrome.com/blog/page-lifecycle-api)\n                 * Allow to collect events happening between hidden and frozen state.\n                 */\n                observable.notify({ reason: PageExitReason.FROZEN });\n            }\n        }, { capture: true });\n        const stopBeforeUnloadListener = addEventListener(configuration, window, \"beforeunload\" /* DOM_EVENT.BEFORE_UNLOAD */, () => {\n            observable.notify({ reason: PageExitReason.UNLOADING });\n        }).stop;\n        return () => {\n            stopListeners();\n            stopBeforeUnloadListener();\n        };\n    });\n}\nexport function isPageExitReason(reason) {\n    return objectValues(PageExitReason).includes(reason);\n}\n//# sourceMappingURL=pageMayExitObservable.js.map","import { noop } from '../tools/utils/functionUtils';\nimport { addEventListener } from './addEventListener';\nexport function runOnReadyState(configuration, expectedReadyState, callback) {\n    if (document.readyState === expectedReadyState || document.readyState === 'complete') {\n        callback();\n        return { stop: noop };\n    }\n    const eventName = expectedReadyState === 'complete' ? \"load\" /* DOM_EVENT.LOAD */ : \"DOMContentLoaded\" /* DOM_EVENT.DOM_CONTENT_LOADED */;\n    return addEventListener(configuration, window, eventName, callback, { once: true });\n}\nexport function asyncRunOnReadyState(configuration, expectedReadyState) {\n    return new Promise((resolve) => {\n        runOnReadyState(configuration, expectedReadyState, resolve);\n    });\n}\n//# sourceMappingURL=runOnReadyState.js.map","import { globalObject } from '../../tools/globalObject';\nexport function getConnectivity() {\n    var _a;\n    const navigator = globalObject.navigator;\n    return {\n        status: navigator.onLine ? 'connected' : 'not_connected',\n        interfaces: navigator.connection && navigator.connection.type ? [navigator.connection.type] : undefined,\n        effective_type: (_a = navigator.connection) === null || _a === void 0 ? void 0 : _a.effectiveType,\n    };\n}\n//# sourceMappingURL=connectivity.js.map","import { sanitize } from '../../tools/serialisation/sanitize';\nimport { jsonStringify } from '../../tools/serialisation/jsonStringify';\nimport { computeStackTrace } from '../../tools/stackTrace/computeStackTrace';\nimport { toStackTraceString } from '../../tools/stackTrace/handlingStack';\nimport { isIndexableObject } from '../../tools/utils/typeUtils';\nexport const NO_ERROR_STACK_PRESENT_MESSAGE = 'No stack, consider using an instance of Error';\nfunction computeErrorBase({ originalError, stackTrace, source, useFallbackStack = true, nonErrorPrefix, }) {\n    const isErrorInstance = isError(originalError);\n    if (!stackTrace && isErrorInstance) {\n        stackTrace = computeStackTrace(originalError);\n    }\n    return {\n        source,\n        type: stackTrace ? stackTrace.name : undefined,\n        message: computeMessage(stackTrace, isErrorInstance, nonErrorPrefix, originalError),\n        stack: stackTrace ? toStackTraceString(stackTrace) : useFallbackStack ? NO_ERROR_STACK_PRESENT_MESSAGE : undefined,\n    };\n}\nexport function computeRawError({ stackTrace, originalError, handlingStack, componentStack, startClocks, nonErrorPrefix, useFallbackStack = true, source, handling, }) {\n    const errorBase = computeErrorBase({ originalError, stackTrace, source, useFallbackStack, nonErrorPrefix });\n    return {\n        startClocks,\n        handling,\n        handlingStack,\n        componentStack,\n        originalError,\n        ...errorBase,\n        causes: isError(originalError) ? flattenErrorCauses(originalError, source) : undefined,\n        fingerprint: tryToGetFingerprint(originalError),\n        context: tryToGetErrorContext(originalError),\n    };\n}\nfunction computeMessage(stackTrace, isErrorInstance, nonErrorPrefix, originalError) {\n    // Favor stackTrace message only if tracekit has really been able to extract something meaningful (message + name)\n    // TODO rework tracekit integration to avoid scattering error building logic\n    return (stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.message) && (stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.name)\n        ? stackTrace.message\n        : !isErrorInstance\n            ? nonErrorPrefix\n                ? `${nonErrorPrefix} ${jsonStringify(sanitize(originalError))}`\n                : jsonStringify(sanitize(originalError))\n            : 'Empty message';\n}\nexport function tryToGetFingerprint(originalError) {\n    return isError(originalError) && 'dd_fingerprint' in originalError ? String(originalError.dd_fingerprint) : undefined;\n}\nexport function tryToGetErrorContext(originalError) {\n    if (isIndexableObject(originalError)) {\n        return originalError.dd_context;\n    }\n}\nexport function getFileFromStackTraceString(stack) {\n    var _a;\n    return (_a = /@ (.+)/.exec(stack)) === null || _a === void 0 ? void 0 : _a[1];\n}\nexport function isError(error) {\n    return error instanceof Error || Object.prototype.toString.call(error) === '[object Error]';\n}\nexport function flattenErrorCauses(error, parentSource) {\n    const causes = [];\n    let currentCause = error.cause;\n    while (currentCause !== undefined && currentCause !== null && causes.length < 10) {\n        const causeBase = computeErrorBase({\n            originalError: currentCause,\n            source: parentSource,\n            useFallbackStack: false,\n        });\n        causes.push(causeBase);\n        currentCause = isError(currentCause) ? currentCause.cause : undefined;\n    }\n    return causes.length ? causes : undefined;\n}\n//# sourceMappingURL=error.js.map","export const ErrorSource = {\n    AGENT: 'agent',\n    CONSOLE: 'console',\n    CUSTOM: 'custom',\n    LOGGER: 'logger',\n    NETWORK: 'network',\n    SOURCE: 'source',\n    REPORT: 'report',\n};\n//# sourceMappingURL=error.types.js.map","export const INTAKE_SITE_STAGING = 'datad0g.com';\nexport const INTAKE_SITE_FED_STAGING = 'dd0g-gov.com';\nexport const INTAKE_SITE_US1 = 'datadoghq.com';\nexport const INTAKE_SITE_EU1 = 'datadoghq.eu';\nexport const INTAKE_SITE_US1_FED = 'ddog-gov.com';\nexport const INTAKE_SITE_US2_FED = 'us2.ddog-gov.com';\nexport const PCI_INTAKE_HOST_US1 = 'pci.browser-intake-datadoghq.com';\nexport const INTAKE_URL_PARAMETERS = ['ddsource', 'dd-api-key', 'dd-request-id'];\n//# sourceMappingURL=intakeSites.js.map","import { ONE_HOUR, ONE_MINUTE, ONE_YEAR } from '../../tools/utils/timeUtils';\nexport const SESSION_TIME_OUT_DELAY = 4 * ONE_HOUR;\nexport const SESSION_EXPIRATION_DELAY = 15 * ONE_MINUTE;\nexport const SESSION_COOKIE_EXPIRATION_DELAY = ONE_YEAR;\nexport const SESSION_NOT_TRACKED = '0';\n/**\n * @internal\n */\nexport const SessionPersistence = {\n    COOKIE: 'cookie',\n    MEMORY: 'memory',\n    LOCAL_STORAGE: 'local-storage',\n};\n//# sourceMappingURL=sessionConstants.js.map","import { DOCS_ORIGIN, MORE_DETAILS, display } from '../tools/display';\nexport const TAG_SIZE_LIMIT = 200;\nexport function buildTags(configuration) {\n    const { env, service, version, datacenter, sdkVersion, variant } = configuration;\n    const tags = [buildTag('sdk_version', sdkVersion !== null && sdkVersion !== void 0 ? sdkVersion : \"6.33.0\")];\n    if (env) {\n        tags.push(buildTag('env', env));\n    }\n    if (service) {\n        tags.push(buildTag('service', service));\n    }\n    if (version) {\n        tags.push(buildTag('version', version));\n    }\n    if (datacenter) {\n        tags.push(buildTag('datacenter', datacenter));\n    }\n    if (variant) {\n        tags.push(buildTag('variant', variant));\n    }\n    return tags;\n}\nexport function buildTag(key, rawValue) {\n    // See https://docs.datadoghq.com/getting_started/tagging/#defining-tags for tags syntax. Note\n    // that the backend may not follow the exact same rules, so we only want to display an informal\n    // warning.\n    const tag = rawValue ? `${key}:${rawValue}` : key;\n    if (tag.length > TAG_SIZE_LIMIT || hasForbiddenCharacters(tag)) {\n        display.warn(`Tag ${tag} doesn't meet tag requirements and will be sanitized. ${MORE_DETAILS} ${DOCS_ORIGIN}/getting_started/tagging/#defining-tags`);\n    }\n    // Let the backend do most of the sanitization, but still make sure multiple tags can't be crafted\n    // by forging a value containing commas.\n    return sanitizeTag(tag);\n}\nexport function sanitizeTag(tag) {\n    return tag.replace(/,/g, '_');\n}\nfunction hasForbiddenCharacters(rawValue) {\n    // Unicode property escapes is not supported in all browsers, so we use a try/catch.\n    // Todo: Remove the try/catch when dropping support for Chrome 63 and Firefox 67\n    // see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape#browser_compatibility\n    if (!supportUnicodePropertyEscapes()) {\n        return false;\n    }\n    // We use the Unicode property escapes to match any character that is a letter including other languages like Chinese, Japanese, etc.\n    // p{Ll} matches a lowercase letter.\n    // p{Lo} matches a letter that is neither uppercase nor lowercase (ex: Japanese characters).\n    // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape#unicode_property_escapes_vs._character_classes\n    return new RegExp('[^\\\\p{Ll}\\\\p{Lo}0-9_:./-]', 'u').test(rawValue);\n}\nexport function supportUnicodePropertyEscapes() {\n    try {\n        new RegExp('[\\\\p{Ll}]', 'u');\n        return true;\n    }\n    catch (_a) {\n        return false;\n    }\n}\n//# sourceMappingURL=tags.js.map","export const TelemetryType = {\n    LOG: 'log',\n    CONFIGURATION: 'configuration',\n    USAGE: 'usage',\n};\n//# sourceMappingURL=rawTelemetryEvent.types.js.map","import { ConsoleApiName } from '../../tools/display';\nimport { NO_ERROR_STACK_PRESENT_MESSAGE, isError } from '../error/error';\nimport { toStackTraceString } from '../../tools/stackTrace/handlingStack';\nimport { getExperimentalFeatures } from '../../tools/experimentalFeatures';\nimport { buildTags } from '../tags';\nimport { INTAKE_SITE_STAGING, INTAKE_SITE_US1_FED, INTAKE_SITE_US2_FED } from '../intakeSites';\nimport { BufferedObservable, Observable } from '../../tools/observable';\nimport { clocksNow } from '../../tools/utils/timeUtils';\nimport { displayIfDebugEnabled, startMonitorErrorCollection } from '../../tools/monitor';\nimport { sendToExtension } from '../../tools/sendToExtension';\nimport { performDraw } from '../../tools/utils/numberUtils';\nimport { jsonStringify } from '../../tools/serialisation/jsonStringify';\nimport { combine } from '../../tools/mergeInto';\nimport { computeStackTrace } from '../../tools/stackTrace/computeStackTrace';\nimport { getConnectivity } from '../connectivity';\nimport { canUseEventBridge, createFlushController, createHttpRequest, getEventBridge, createBatch, } from '../../transport';\nimport { createIdentityEncoder } from '../../tools/encoder';\nimport { createPageMayExitObservable } from '../../browser/pageMayExitObservable';\nimport { DISCARDED } from '../../tools/abstractHooks';\nimport { globalObject, isWorkerEnvironment } from '../../tools/globalObject';\nimport { noop } from '../../tools/utils/functionUtils';\nimport { TelemetryType } from './rawTelemetryEvent.types';\nconst ALLOWED_FRAME_URLS = [\n    'https://www.datadoghq-browser-agent.com',\n    'https://www.datad0g-browser-agent.com',\n    'https://d3uc069fcn7uxw.cloudfront.net',\n    'https://d20xtzwzcl0ceb.cloudfront.net',\n    'http://localhost',\n    '<anonymous>',\n];\nconst METRIC_SAMPLE_RATE = 1;\nconst TELEMETRY_EXCLUDED_SITES = [INTAKE_SITE_US1_FED, INTAKE_SITE_US2_FED];\nconst MAX_TELEMETRY_EVENTS_PER_PAGE = 15;\nlet telemetryObservable;\nexport function getTelemetryObservable() {\n    if (!telemetryObservable) {\n        telemetryObservable = new BufferedObservable(100);\n    }\n    return telemetryObservable;\n}\nexport function startTelemetry(telemetryService, configuration, hooks) {\n    const observable = new Observable();\n    const { enabled, metricsEnabled } = startTelemetryCollection(telemetryService, configuration, hooks, observable);\n    const { stop } = startTelemetryTransport(configuration, observable);\n    return {\n        stop,\n        enabled,\n        metricsEnabled,\n    };\n}\nexport function startTelemetryCollection(telemetryService, configuration, hooks, observable, metricSampleRate = METRIC_SAMPLE_RATE, maxTelemetryEventsPerPage = MAX_TELEMETRY_EVENTS_PER_PAGE) {\n    const alreadySentEventsByKind = {};\n    const telemetryEnabled = !TELEMETRY_EXCLUDED_SITES.includes(configuration.site) && performDraw(configuration.telemetrySampleRate);\n    const telemetryEnabledPerType = {\n        [TelemetryType.LOG]: telemetryEnabled,\n        [TelemetryType.CONFIGURATION]: telemetryEnabled && performDraw(configuration.telemetryConfigurationSampleRate),\n        [TelemetryType.USAGE]: telemetryEnabled && performDraw(configuration.telemetryUsageSampleRate),\n        // not an actual \"type\" but using a single draw for all metrics\n        metric: telemetryEnabled && performDraw(metricSampleRate),\n    };\n    const runtimeEnvInfo = getRuntimeEnvInfo();\n    const telemetryObservable = getTelemetryObservable();\n    telemetryObservable.subscribe(({ rawEvent, metricName }) => {\n        if ((metricName && !telemetryEnabledPerType['metric']) || !telemetryEnabledPerType[rawEvent.type]) {\n            return;\n        }\n        const kind = metricName || rawEvent.status || rawEvent.type;\n        let alreadySentEvents = alreadySentEventsByKind[kind];\n        if (!alreadySentEvents) {\n            alreadySentEvents = alreadySentEventsByKind[kind] = new Set();\n        }\n        if (alreadySentEvents.size >= maxTelemetryEventsPerPage) {\n            return;\n        }\n        const stringifiedEvent = jsonStringify(rawEvent);\n        if (alreadySentEvents.has(stringifiedEvent)) {\n            return;\n        }\n        const defaultTelemetryEventAttributes = hooks.triggerHook(1 /* HookNames.AssembleTelemetry */, {\n            startTime: clocksNow().relative,\n        });\n        if (defaultTelemetryEventAttributes === DISCARDED) {\n            return;\n        }\n        const event = toTelemetryEvent(defaultTelemetryEventAttributes, telemetryService, rawEvent, runtimeEnvInfo);\n        observable.notify(event);\n        sendToExtension('telemetry', event);\n        alreadySentEvents.add(stringifiedEvent);\n    });\n    telemetryObservable.unbuffer();\n    startMonitorErrorCollection(addTelemetryError);\n    return {\n        enabled: telemetryEnabled,\n        metricsEnabled: telemetryEnabledPerType['metric'],\n    };\n    function toTelemetryEvent(defaultTelemetryEventAttributes, telemetryService, rawEvent, runtimeEnvInfo) {\n        const clockNow = clocksNow();\n        const event = {\n            type: 'telemetry',\n            date: clockNow.timeStamp,\n            service: telemetryService,\n            version: \"6.33.0\",\n            source: 'browser',\n            _dd: {\n                format_version: 2,\n            },\n            telemetry: combine(rawEvent, {\n                runtime_env: runtimeEnvInfo,\n                connectivity: getConnectivity(),\n                sdk_setup: \"npm\",\n            }),\n            ddtags: buildTags(configuration).join(','),\n            experimental_features: Array.from(getExperimentalFeatures()),\n        };\n        return combine(event, defaultTelemetryEventAttributes);\n    }\n}\nexport function startTelemetryTransport(configuration, telemetryObservable) {\n    const cleanupTasks = [];\n    if (canUseEventBridge()) {\n        const bridge = getEventBridge();\n        const telemetrySubscription = telemetryObservable.subscribe((event) => bridge.send('internal_telemetry', event));\n        cleanupTasks.push(telemetrySubscription.unsubscribe);\n    }\n    else {\n        const endpoints = [configuration.rumEndpointBuilder];\n        if (configuration.replica && isTelemetryReplicationAllowed(configuration)) {\n            endpoints.push(configuration.replica.rumEndpointBuilder);\n        }\n        const telemetryBatch = createBatch({\n            encoder: createIdentityEncoder(),\n            request: createHttpRequest(endpoints, \n            // Ignore transport errors for telemetry\n            noop),\n            flushController: createFlushController({\n                pageMayExitObservable: createPageMayExitObservable(configuration),\n                // We don't use an actual session expire observable here, to make telemetry collection\n                // independent of the session. This allows to start and send telemetry events earlier.\n                sessionExpireObservable: new Observable(),\n            }),\n        });\n        cleanupTasks.push(telemetryBatch.stop);\n        const telemetrySubscription = telemetryObservable.subscribe(telemetryBatch.add);\n        cleanupTasks.push(telemetrySubscription.unsubscribe);\n    }\n    return {\n        stop: () => cleanupTasks.forEach((task) => task()),\n    };\n}\nfunction getRuntimeEnvInfo() {\n    var _a;\n    return {\n        is_local_file: ((_a = globalObject.location) === null || _a === void 0 ? void 0 : _a.protocol) === 'file:',\n        is_worker: isWorkerEnvironment,\n    };\n}\nexport function resetTelemetry() {\n    telemetryObservable = undefined;\n}\n/**\n * Avoid mixing telemetry events from different data centers\n * but keep replicating staging events for reliability\n */\nfunction isTelemetryReplicationAllowed(configuration) {\n    return configuration.site === INTAKE_SITE_STAGING;\n}\nexport function addTelemetryDebug(message, context) {\n    displayIfDebugEnabled(ConsoleApiName.debug, message, context);\n    getTelemetryObservable().notify({\n        rawEvent: {\n            type: TelemetryType.LOG,\n            message,\n            status: \"debug\" /* StatusType.debug */,\n            ...context,\n        },\n    });\n}\nexport function addTelemetryError(e, context) {\n    getTelemetryObservable().notify({\n        rawEvent: {\n            type: TelemetryType.LOG,\n            status: \"error\" /* StatusType.error */,\n            ...formatError(e),\n            ...context,\n        },\n    });\n}\nexport function addTelemetryConfiguration(configuration) {\n    getTelemetryObservable().notify({\n        rawEvent: {\n            type: TelemetryType.CONFIGURATION,\n            configuration,\n        },\n    });\n}\nexport function addTelemetryMetrics(metricName, context) {\n    getTelemetryObservable().notify({\n        rawEvent: {\n            type: TelemetryType.LOG,\n            message: metricName,\n            status: \"debug\" /* StatusType.debug */,\n            ...context,\n        },\n        metricName,\n    });\n}\nexport function addTelemetryUsage(usage) {\n    getTelemetryObservable().notify({\n        rawEvent: {\n            type: TelemetryType.USAGE,\n            usage,\n        },\n    });\n}\nexport function formatError(e) {\n    if (isError(e)) {\n        const stackTrace = computeStackTrace(e);\n        return {\n            error: {\n                kind: stackTrace.name,\n                stack: toStackTraceString(scrubCustomerFrames(stackTrace)),\n            },\n            message: stackTrace.message,\n        };\n    }\n    return {\n        error: {\n            stack: NO_ERROR_STACK_PRESENT_MESSAGE,\n        },\n        message: `${\"Uncaught\" /* NonErrorPrefix.UNCAUGHT */} ${jsonStringify(e)}`,\n    };\n}\nexport function scrubCustomerFrames(stackTrace) {\n    stackTrace.stack = stackTrace.stack.filter((frame) => !frame.url || ALLOWED_FRAME_URLS.some((allowedFrameUrl) => frame.url.startsWith(allowedFrameUrl)));\n    return stackTrace;\n}\n//# sourceMappingURL=telemetry.js.map","import { Observable } from '../tools/observable';\nexport const TrackingConsent = {\n    GRANTED: 'granted',\n    NOT_GRANTED: 'not-granted',\n};\nexport function createTrackingConsentState(currentConsent) {\n    const observable = new Observable();\n    return {\n        tryToInit(trackingConsent) {\n            if (!currentConsent) {\n                currentConsent = trackingConsent;\n            }\n        },\n        update(trackingConsent) {\n            currentConsent = trackingConsent;\n            observable.notify();\n        },\n        isGranted() {\n            return currentConsent === TrackingConsent.GRANTED;\n        },\n        observable,\n    };\n}\n//# sourceMappingURL=trackingConsent.js.map","import { combine } from './mergeInto';\n// Discards the event from being sent\nexport const DISCARDED = 'DISCARDED';\n// Skips from the assembly of the event\nexport const SKIPPED = 'SKIPPED';\nexport function abstractHooks() {\n    const callbacks = {};\n    return {\n        register(hookName, callback) {\n            if (!callbacks[hookName]) {\n                callbacks[hookName] = [];\n            }\n            callbacks[hookName].push(callback);\n            return {\n                unregister: () => {\n                    callbacks[hookName] = callbacks[hookName].filter((cb) => cb !== callback);\n                },\n            };\n        },\n        triggerHook(hookName, param) {\n            const hookCallbacks = callbacks[hookName] || [];\n            const results = [];\n            for (const callback of hookCallbacks) {\n                const result = callback(param);\n                if (result === DISCARDED) {\n                    return DISCARDED;\n                }\n                if (result === SKIPPED) {\n                    continue;\n                }\n                results.push(result);\n            }\n            return combine(...results);\n        },\n    };\n}\n//# sourceMappingURL=abstractHooks.js.map","import { display } from './display';\nexport function catchUserErrors(fn, errorMsg) {\n    return (...args) => {\n        try {\n            return fn(...args);\n        }\n        catch (err) {\n            display.error(errorMsg, err);\n        }\n    };\n}\n//# sourceMappingURL=catchUserErrors.js.map","/* eslint-disable local-rules/disallow-side-effects */\n/**\n * Keep references on console methods to avoid triggering patched behaviors\n *\n * NB: in some setup, console could already be patched by another SDK.\n * In this case, some display messages can be sent by the other SDK\n * but we should be safe from infinite loop nonetheless.\n */\nexport const ConsoleApiName = {\n    log: 'log',\n    debug: 'debug',\n    info: 'info',\n    warn: 'warn',\n    error: 'error',\n};\n/**\n * When building JS bundles, some users might use a plugin[1] or configuration[2] to remove\n * \"console.*\" references. This causes some issue as we expect `console.*` to be defined.\n * As a workaround, let's use a variable alias, so those expressions won't be taken into account by\n * simple static analysis.\n *\n * [1]: https://babeljs.io/docs/babel-plugin-transform-remove-console/\n * [2]: https://github.com/terser/terser#compress-options (look for drop_console)\n */\nexport const globalConsole = console;\nexport const originalConsoleMethods = {};\nObject.keys(ConsoleApiName).forEach((name) => {\n    originalConsoleMethods[name] = globalConsole[name];\n});\nconst PREFIX = 'Datadog Browser SDK:';\nexport const display = {\n    debug: originalConsoleMethods.debug.bind(globalConsole, PREFIX),\n    log: originalConsoleMethods.log.bind(globalConsole, PREFIX),\n    info: originalConsoleMethods.info.bind(globalConsole, PREFIX),\n    warn: originalConsoleMethods.warn.bind(globalConsole, PREFIX),\n    error: originalConsoleMethods.error.bind(globalConsole, PREFIX),\n};\nexport const DOCS_ORIGIN = 'https://docs.datadoghq.com';\nexport const DOCS_TROUBLESHOOTING = `${DOCS_ORIGIN}/real_user_monitoring/browser/troubleshooting`;\nexport const MORE_DETAILS = 'More details:';\n//# sourceMappingURL=display.js.map","import { computeBytesCount } from './utils/byteUtils';\nexport function createIdentityEncoder() {\n    let output = '';\n    let outputBytesCount = 0;\n    return {\n        isAsync: false,\n        get isEmpty() {\n            return !output;\n        },\n        write(data, callback) {\n            const additionalEncodedBytesCount = computeBytesCount(data);\n            outputBytesCount += additionalEncodedBytesCount;\n            output += data;\n            if (callback) {\n                callback(additionalEncodedBytesCount);\n            }\n        },\n        finish(callback) {\n            callback(this.finishSync());\n        },\n        finishSync() {\n            const result = {\n                output,\n                outputBytesCount,\n                rawBytesCount: outputBytesCount,\n                pendingData: '',\n            };\n            output = '';\n            outputBytesCount = 0;\n            return result;\n        },\n        estimateEncodedBytesCount(data) {\n            return data.length;\n        },\n    };\n}\n//# sourceMappingURL=encoder.js.map","/**\n * LIMITATION:\n * For NPM setup, this feature flag singleton is shared between RUM and Logs product.\n * This means that an experimental flag set on the RUM product will be set on the Logs product.\n * So keep in mind that in certain configurations, your experimental feature flag may affect other products.\n *\n * FORMAT:\n * All feature flags should be snake_cased\n */\n// We want to use a real enum (i.e. not a const enum) here, to be able to check whether an arbitrary\n// string is an expected feature flag\nimport { objectHasValue } from './utils/objectUtils';\n// eslint-disable-next-line no-restricted-syntax\nexport var ExperimentalFeature;\n(function (ExperimentalFeature) {\n    ExperimentalFeature[\"TRACK_INTAKE_REQUESTS\"] = \"track_intake_requests\";\n    ExperimentalFeature[\"USE_TREE_WALKER_FOR_ACTION_NAME\"] = \"use_tree_walker_for_action_name\";\n    ExperimentalFeature[\"FEATURE_OPERATION_VITAL\"] = \"feature_operation_vital\";\n    ExperimentalFeature[\"START_STOP_ACTION\"] = \"start_stop_action\";\n    ExperimentalFeature[\"START_STOP_RESOURCE\"] = \"start_stop_resource\";\n    ExperimentalFeature[\"USE_CHANGE_RECORDS\"] = \"use_change_records\";\n    ExperimentalFeature[\"USE_INCREMENTAL_CHANGE_RECORDS\"] = \"use_incremental_change_records\";\n    ExperimentalFeature[\"TOO_MANY_REQUESTS_INVESTIGATION\"] = \"too_many_requests_investigation\";\n    ExperimentalFeature[\"TRACK_RESOURCE_HEADERS\"] = \"track_resource_headers\";\n})(ExperimentalFeature || (ExperimentalFeature = {}));\nconst enabledExperimentalFeatures = new Set();\nexport function initFeatureFlags(enableExperimentalFeatures) {\n    if (Array.isArray(enableExperimentalFeatures)) {\n        addExperimentalFeatures(enableExperimentalFeatures.filter((flag) => objectHasValue(ExperimentalFeature, flag)));\n    }\n}\nexport function addExperimentalFeatures(enabledFeatures) {\n    enabledFeatures.forEach((flag) => {\n        enabledExperimentalFeatures.add(flag);\n    });\n}\nexport function isExperimentalFeatureEnabled(featureName) {\n    return enabledExperimentalFeatures.has(featureName);\n}\nexport function resetExperimentalFeatures() {\n    enabledExperimentalFeatures.clear();\n}\nexport function getExperimentalFeatures() {\n    return enabledExperimentalFeatures;\n}\n//# sourceMappingURL=experimentalFeatures.js.map","import { getGlobalObject } from './globalObject';\n/**\n * Gets the original value for a DOM API that was potentially patched by Zone.js.\n *\n * Zone.js[1] is a library that patches a bunch of JS and DOM APIs. It usually stores the original\n * value of the patched functions/constructors/methods in a hidden property prefixed by\n * __zone_symbol__.\n *\n * In multiple occasions, we observed that Zone.js is the culprit of important issues leading to\n * browser resource exhaustion (memory leak, high CPU usage). This method is used as a workaround to\n * use the original DOM API instead of the one patched by Zone.js.\n *\n * [1]: https://github.com/angular/angular/tree/main/packages/zone.js\n */\nexport function getZoneJsOriginalValue(target, name) {\n    const browserWindow = getGlobalObject();\n    let original;\n    if (browserWindow.Zone && typeof browserWindow.Zone.__symbol__ === 'function') {\n        original = target[browserWindow.Zone.__symbol__(name)];\n    }\n    if (!original) {\n        original = target[name];\n    }\n    return original;\n}\n//# sourceMappingURL=getZoneJsOriginalValue.js.map","/**\n * inspired by https://mathiasbynens.be/notes/globalthis\n */\nexport function getGlobalObject() {\n    if (typeof globalThis === 'object') {\n        return globalThis;\n    }\n    Object.defineProperty(Object.prototype, '_dd_temp_', {\n        get() {\n            return this;\n        },\n        configurable: true,\n    });\n    // @ts-ignore _dd_temp is defined using defineProperty\n    let globalObject = _dd_temp_;\n    // @ts-ignore _dd_temp is defined using defineProperty\n    delete Object.prototype._dd_temp_;\n    if (typeof globalObject !== 'object') {\n        // on safari _dd_temp_ is available on window but not globally\n        // fallback on other browser globals check\n        if (typeof self === 'object') {\n            globalObject = self;\n        }\n        else if (typeof window === 'object') {\n            globalObject = window;\n        }\n        else {\n            globalObject = {};\n        }\n    }\n    return globalObject;\n}\n/**\n * Cached reference to the global object so it can be imported and re-used without\n * re-evaluating the heavyweight fallback logic in `getGlobalObject()`.\n */\n// eslint-disable-next-line local-rules/disallow-side-effects\nexport const globalObject = getGlobalObject();\nexport const isWorkerEnvironment = 'WorkerGlobalScope' in globalObject;\n//# sourceMappingURL=globalObject.js.map","import { setTimeout } from './timer';\nimport { callMonitored } from './monitor';\nimport { noop } from './utils/functionUtils';\nimport { createHandlingStack } from './stackTrace/handlingStack';\n/**\n * Instruments a method on a object, calling the given callback before the original method is\n * invoked. The callback receives an object with information about the method call.\n *\n * This function makes sure that we are \"good citizens\" regarding third party instrumentations: when\n * removing the instrumentation, the original method is usually restored, but if a third party\n * instrumentation was set after ours, we keep it in place and just replace our instrumentation with\n * a noop.\n *\n * Note: it is generally better to instrument methods that are \"owned\" by the object instead of ones\n * that are inherited from the prototype chain. Example:\n * * do:    `instrumentMethod(Array.prototype, 'push', ...)`\n * * don't: `instrumentMethod([], 'push', ...)`\n *\n * This method is also used to set event handler properties (ex: window.onerror = ...), as it has\n * the same requirements as instrumenting a method:\n * * if the event handler is already set by a third party, we need to call it and not just blindly\n * override it.\n * * if the event handler is set by a third party after us, we need to keep it in place when\n * removing ours.\n *\n * @example\n *\n *  instrumentMethod(window, 'fetch', ({ target, parameters, onPostCall }) => {\n *    console.log('Before calling fetch on', target, 'with parameters', parameters)\n *\n *    onPostCall((result) => {\n *      console.log('After fetch calling on', target, 'with parameters', parameters, 'and result', result)\n *    })\n *  })\n */\nexport function instrumentMethod(targetPrototype, method, onPreCall, { computeHandlingStack } = {}) {\n    let original = targetPrototype[method];\n    if (typeof original !== 'function') {\n        if (method in targetPrototype && typeof method === 'string' && method.startsWith('on')) {\n            original = noop;\n        }\n        else {\n            return { stop: noop };\n        }\n    }\n    let stopped = false;\n    const instrumentation = function () {\n        if (stopped) {\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call\n            return original.apply(this, arguments);\n        }\n        const parameters = Array.from(arguments);\n        let postCallCallback;\n        callMonitored(onPreCall, null, [\n            {\n                target: this,\n                parameters,\n                onPostCall: (callback) => {\n                    postCallCallback = callback;\n                },\n                handlingStack: computeHandlingStack ? createHandlingStack('instrumented method') : undefined,\n            },\n        ]);\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n        const result = original.apply(this, parameters);\n        if (postCallCallback) {\n            callMonitored(postCallCallback, null, [result]);\n        }\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n        return result;\n    };\n    targetPrototype[method] = instrumentation;\n    return {\n        stop: () => {\n            stopped = true;\n            // If the instrumentation has been removed by a third party, keep the last one\n            if (targetPrototype[method] === instrumentation) {\n                targetPrototype[method] = original;\n            }\n        },\n    };\n}\nexport function instrumentSetter(targetPrototype, property, after) {\n    const originalDescriptor = Object.getOwnPropertyDescriptor(targetPrototype, property);\n    if (!originalDescriptor || !originalDescriptor.set || !originalDescriptor.configurable) {\n        return { stop: noop };\n    }\n    const stoppedInstrumentation = noop;\n    let instrumentation = (target, value) => {\n        // put hooked setter into event loop to avoid of set latency\n        setTimeout(() => {\n            if (instrumentation !== stoppedInstrumentation) {\n                after(target, value);\n            }\n        }, 0);\n    };\n    const instrumentationWrapper = function (value) {\n        originalDescriptor.set.call(this, value);\n        instrumentation(this, value);\n    };\n    Object.defineProperty(targetPrototype, property, {\n        set: instrumentationWrapper,\n    });\n    return {\n        stop: () => {\n            var _a;\n            if (((_a = Object.getOwnPropertyDescriptor(targetPrototype, property)) === null || _a === void 0 ? void 0 : _a.set) === instrumentationWrapper) {\n                Object.defineProperty(targetPrototype, property, originalDescriptor);\n            }\n            instrumentation = stoppedInstrumentation;\n        },\n    };\n}\n//# sourceMappingURL=instrumentMethod.js.map","import { getType } from './utils/typeUtils';\n/**\n * Iterate over source and affect its sub values into destination, recursively.\n * If the source and destination can't be merged, return source.\n */\nexport function mergeInto(destination, source, circularReferenceChecker = createCircularReferenceChecker()) {\n    // ignore the source if it is undefined\n    if (source === undefined) {\n        return destination;\n    }\n    if (typeof source !== 'object' || source === null) {\n        // primitive values - just return source\n        return source;\n    }\n    else if (source instanceof Date) {\n        return new Date(source.getTime());\n    }\n    else if (source instanceof RegExp) {\n        const flags = source.flags ||\n            // old browsers compatibility\n            [\n                source.global ? 'g' : '',\n                source.ignoreCase ? 'i' : '',\n                source.multiline ? 'm' : '',\n                source.sticky ? 'y' : '',\n                source.unicode ? 'u' : '',\n            ].join('');\n        return new RegExp(source.source, flags);\n    }\n    if (circularReferenceChecker.hasAlreadyBeenSeen(source)) {\n        // remove circular references\n        return undefined;\n    }\n    else if (Array.isArray(source)) {\n        const merged = Array.isArray(destination) ? destination : [];\n        for (let i = 0; i < source.length; ++i) {\n            merged[i] = mergeInto(merged[i], source[i], circularReferenceChecker);\n        }\n        return merged;\n    }\n    const merged = getType(destination) === 'object' ? destination : {};\n    for (const key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n            merged[key] = mergeInto(merged[key], source[key], circularReferenceChecker);\n        }\n    }\n    return merged;\n}\n/**\n * A simplistic implementation of a deep clone algorithm.\n * Caveats:\n * - It doesn't maintain prototype chains - don't use with instances of custom classes.\n * - It doesn't handle Map and Set\n */\nexport function deepClone(value) {\n    return mergeInto(undefined, value);\n}\nexport function combine(...sources) {\n    let destination;\n    for (const source of sources) {\n        // Ignore any undefined or null sources.\n        if (source === undefined || source === null) {\n            continue;\n        }\n        destination = mergeInto(destination, source);\n    }\n    return destination;\n}\nfunction createCircularReferenceChecker() {\n    if (typeof WeakSet !== 'undefined') {\n        const set = new WeakSet();\n        return {\n            hasAlreadyBeenSeen(value) {\n                const has = set.has(value);\n                if (!has) {\n                    set.add(value);\n                }\n                return has;\n            },\n        };\n    }\n    const array = [];\n    return {\n        hasAlreadyBeenSeen(value) {\n            const has = array.indexOf(value) >= 0;\n            if (!has) {\n                array.push(value);\n            }\n            return has;\n        },\n    };\n}\n//# sourceMappingURL=mergeInto.js.map","export const mockableReplacements = new Map();\n/**\n * Wraps a value to make it mockable in tests. In production builds, this is a no-op\n * that returns the value as-is. In test builds, it checks if a mock replacement has\n * been registered and returns that instead.\n *\n * @example\n * // In source file:\n * import { mockable } from '../tools/mockable'\n * export function formatNavigationEntry(): string {\n *   const navigationEntry = mockable(getNavigationEntry)()\n *   ...\n * }\n *\n * // In test file:\n * import { replaceMockable } from '@datadog/browser-core/test'\n * it('...', () => {\n *   replaceMockable(getNavigationEntry, () => FAKE_NAVIGATION_ENTRY)\n *   expect(formatNavigationEntry()).toEqual(...)\n * })\n */\nexport function mockable(value) {\n    // In test builds, return a wrapper that checks for mocks at call time\n    if (\"6.33.0\" === 'test' && mockableReplacements.has(value)) {\n        return mockableReplacements.get(value);\n    }\n    // In production, return the value as-is\n    return value;\n}\n//# sourceMappingURL=mockable.js.map","import { display } from './display';\nlet onMonitorErrorCollected;\nlet debugMode = false;\nexport function startMonitorErrorCollection(newOnMonitorErrorCollected) {\n    onMonitorErrorCollected = newOnMonitorErrorCollected;\n}\nexport function setDebugMode(newDebugMode) {\n    debugMode = newDebugMode;\n}\nexport function resetMonitor() {\n    onMonitorErrorCollected = undefined;\n    debugMode = false;\n}\nexport function monitored(_, __, descriptor) {\n    const originalMethod = descriptor.value;\n    descriptor.value = function (...args) {\n        const decorated = onMonitorErrorCollected ? monitor(originalMethod) : originalMethod;\n        return decorated.apply(this, args);\n    };\n}\nexport function monitor(fn) {\n    return function (...args) {\n        return callMonitored(fn, this, args);\n    }; // consider output type has input type\n}\nexport function callMonitored(fn, context, args) {\n    try {\n        return fn.apply(context, args);\n    }\n    catch (e) {\n        monitorError(e);\n    }\n}\nexport function monitorError(e) {\n    displayIfDebugEnabled(e);\n    if (onMonitorErrorCollected) {\n        try {\n            onMonitorErrorCollected(e);\n        }\n        catch (e) {\n            displayIfDebugEnabled(e);\n        }\n    }\n}\nexport function displayIfDebugEnabled(...args) {\n    if (debugMode) {\n        display.error('[MONITOR]', ...args);\n    }\n}\n//# sourceMappingURL=monitor.js.map","import { monitor } from './monitor';\nimport { globalObject } from './globalObject';\nexport function queueMicrotask(callback) {\n    // Intentionally avoid .bind(globalObject): in some environments (e.g. Selenium GeckoDriver's\n    // executeScript), globalThis is not a proper global object, so calling the bound function throws\n    // 'queueMicrotask called on an object that does not implement interface Window'. Calling it as an\n    // unbound method is fine, as the proper global object will be used implicitly.\n    // See https://github.com/mozilla/geckodriver/issues/1798\n    // eslint-disable-next-line @typescript-eslint/unbound-method\n    const nativeImplementation = globalObject.queueMicrotask;\n    if (typeof nativeImplementation === 'function') {\n        nativeImplementation(monitor(callback));\n    }\n    else {\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises -- the callback is monitored, so it'll never throw\n        Promise.resolve().then(monitor(callback));\n    }\n}\n//# sourceMappingURL=queueMicrotask.js.map","import { queueMicrotask } from './queueMicrotask';\n// eslint-disable-next-line no-restricted-syntax\nexport class Observable {\n    constructor(onFirstSubscribe) {\n        this.onFirstSubscribe = onFirstSubscribe;\n        this.observers = [];\n    }\n    subscribe(observer) {\n        this.addObserver(observer);\n        return {\n            unsubscribe: () => this.removeObserver(observer),\n        };\n    }\n    notify(data) {\n        this.observers.forEach((observer) => observer(data));\n    }\n    addObserver(observer) {\n        this.observers.push(observer);\n        if (this.observers.length === 1 && this.onFirstSubscribe) {\n            this.onLastUnsubscribe = this.onFirstSubscribe(this) || undefined;\n        }\n    }\n    removeObserver(observer) {\n        this.observers = this.observers.filter((other) => observer !== other);\n        if (!this.observers.length && this.onLastUnsubscribe) {\n            this.onLastUnsubscribe();\n        }\n    }\n}\nexport function mergeObservables(...observables) {\n    return new Observable((globalObservable) => {\n        const subscriptions = observables.map((observable) => observable.subscribe((data) => globalObservable.notify(data)));\n        return () => subscriptions.forEach((subscription) => subscription.unsubscribe());\n    });\n}\n// eslint-disable-next-line no-restricted-syntax\nexport class BufferedObservable extends Observable {\n    constructor(maxBufferSize) {\n        super();\n        this.maxBufferSize = maxBufferSize;\n        this.buffer = [];\n    }\n    notify(data) {\n        this.buffer.push(data);\n        if (this.buffer.length > this.maxBufferSize) {\n            this.buffer.shift();\n        }\n        super.notify(data);\n    }\n    subscribe(observer) {\n        let closed = false;\n        const subscription = {\n            unsubscribe: () => {\n                closed = true;\n                this.removeObserver(observer);\n            },\n        };\n        queueMicrotask(() => {\n            for (const data of this.buffer) {\n                if (closed) {\n                    return;\n                }\n                observer(data);\n            }\n            if (!closed) {\n                this.addObserver(observer);\n            }\n        });\n        return subscription;\n    }\n    /**\n     * Drop buffered data and don't buffer future data. This is to avoid leaking memory when it's not\n     * needed anymore. This can be seen as a performance optimization, and things will work probably\n     * even if this method isn't called, but still useful to clarify our intent and lowering our\n     * memory impact.\n     */\n    unbuffer() {\n        queueMicrotask(() => {\n            this.maxBufferSize = this.buffer.length = 0;\n        });\n    }\n}\n//# sourceMappingURL=observable.js.map","import { setTimeout, clearTimeout } from './timer';\nimport { monitor } from './monitor';\nimport { dateNow } from './utils/timeUtils';\n/**\n * 'requestIdleCallback' with a shim.\n */\nexport function requestIdleCallback(callback, opts) {\n    // Note: check both 'requestIdleCallback' and 'cancelIdleCallback' existence because some polyfills only implement 'requestIdleCallback'.\n    if (window.requestIdleCallback && window.cancelIdleCallback) {\n        const id = window.requestIdleCallback(monitor(callback), opts);\n        return () => window.cancelIdleCallback(id);\n    }\n    return requestIdleCallbackShim(callback);\n}\nexport const MAX_TASK_TIME = 50;\n/*\n * Shim from https://developer.chrome.com/blog/using-requestidlecallback#checking_for_requestidlecallback\n * Note: there is no simple way to support the \"timeout\" option, so we ignore it.\n */\nexport function requestIdleCallbackShim(callback) {\n    const start = dateNow();\n    const timeoutId = setTimeout(() => {\n        callback({\n            didTimeout: false,\n            timeRemaining: () => Math.max(0, MAX_TASK_TIME - (dateNow() - start)),\n        });\n    }, 0);\n    return () => clearTimeout(timeoutId);\n}\n//# sourceMappingURL=requestIdleCallback.js.map","import { globalObject } from './globalObject';\nexport function sendToExtension(type, payload) {\n    const callback = globalObject.__ddBrowserSdkExtensionCallback;\n    if (callback) {\n        callback({ type, payload });\n    }\n}\n//# sourceMappingURL=sendToExtension.js.map","import { noop } from '../utils/functionUtils';\n/**\n * Custom implementation of JSON.stringify that ignores some toJSON methods. We need to do that\n * because some sites badly override toJSON on certain objects. Removing all toJSON methods from\n * nested values would be too costly, so we just detach them from the root value, and native classes\n * used to build JSON values (Array and Object).\n *\n * Note: this still assumes that JSON.stringify is correct.\n */\nexport function jsonStringify(value, replacer, space) {\n    if (typeof value !== 'object' || value === null) {\n        return JSON.stringify(value);\n    }\n    // Note: The order matter here. We need to detach toJSON methods on parent classes before their\n    // subclasses.\n    const restoreObjectPrototypeToJson = detachToJsonMethod(Object.prototype);\n    const restoreArrayPrototypeToJson = detachToJsonMethod(Array.prototype);\n    const restoreValuePrototypeToJson = detachToJsonMethod(Object.getPrototypeOf(value));\n    const restoreValueToJson = detachToJsonMethod(value);\n    try {\n        return JSON.stringify(value, replacer, space);\n    }\n    catch (_a) {\n        return '<error: unable to serialize object>';\n    }\n    finally {\n        restoreObjectPrototypeToJson();\n        restoreArrayPrototypeToJson();\n        restoreValuePrototypeToJson();\n        restoreValueToJson();\n    }\n}\nexport function detachToJsonMethod(value) {\n    const object = value;\n    const objectToJson = object.toJSON;\n    if (objectToJson) {\n        delete object.toJSON;\n        return () => {\n            object.toJSON = objectToJson;\n        };\n    }\n    return noop;\n}\n//# sourceMappingURL=jsonStringify.js.map","import { display } from '../display';\nimport { ONE_KIBI_BYTE } from '../utils/byteUtils';\nimport { detachToJsonMethod } from './jsonStringify';\n// The maximum size of a single event is 256KiB. By default, we ensure that user-provided data\n// going through sanitize fits inside our events, while leaving room for other contexts, metadata, ...\nexport const SANITIZE_DEFAULT_MAX_CHARACTER_COUNT = 220 * ONE_KIBI_BYTE;\n// Symbol for the root element of the JSONPath used for visited objects\nconst JSON_PATH_ROOT_ELEMENT = '$';\n// When serializing (using JSON.stringify) a key of an object, { key: 42 } gets wrapped in quotes as \"key\".\n// With the separator (:), we need to add 3 characters to the count.\nconst KEY_DECORATION_LENGTH = 3;\nexport function sanitize(source, maxCharacterCount = SANITIZE_DEFAULT_MAX_CHARACTER_COUNT) {\n    // Unbind any toJSON function we may have on [] or {} prototypes\n    const restoreObjectPrototypeToJson = detachToJsonMethod(Object.prototype);\n    const restoreArrayPrototypeToJson = detachToJsonMethod(Array.prototype);\n    // Initial call to sanitizeProcessor - will populate containerQueue if source is an Array or a plain Object\n    const containerQueue = [];\n    const visitedObjectsWithPath = new WeakMap();\n    const sanitizedData = sanitizeProcessor(source, JSON_PATH_ROOT_ELEMENT, undefined, containerQueue, visitedObjectsWithPath);\n    const serializedSanitizedData = JSON.stringify(sanitizedData);\n    let accumulatedCharacterCount = serializedSanitizedData ? serializedSanitizedData.length : 0;\n    if (accumulatedCharacterCount > maxCharacterCount) {\n        warnOverCharacterLimit(maxCharacterCount, 'discarded', source);\n        return undefined;\n    }\n    while (containerQueue.length > 0 && accumulatedCharacterCount < maxCharacterCount) {\n        const containerToProcess = containerQueue.shift();\n        let separatorLength = 0; // 0 for the first element, 1 for subsequent elements\n        // Arrays and Objects have to be handled distinctly to ensure\n        // we do not pick up non-numerical properties from Arrays\n        if (Array.isArray(containerToProcess.source)) {\n            for (let key = 0; key < containerToProcess.source.length; key++) {\n                const targetData = sanitizeProcessor(containerToProcess.source[key], containerToProcess.path, key, containerQueue, visitedObjectsWithPath);\n                if (targetData !== undefined) {\n                    accumulatedCharacterCount += JSON.stringify(targetData).length;\n                }\n                else {\n                    // When an element of an Array (targetData) is undefined, it is serialized as null:\n                    // JSON.stringify([undefined]) => '[null]' - This accounts for 4 characters\n                    accumulatedCharacterCount += 4;\n                }\n                accumulatedCharacterCount += separatorLength;\n                separatorLength = 1;\n                if (accumulatedCharacterCount > maxCharacterCount) {\n                    warnOverCharacterLimit(maxCharacterCount, 'truncated', source);\n                    break;\n                }\n                ;\n                containerToProcess.target[key] = targetData;\n            }\n        }\n        else {\n            for (const key in containerToProcess.source) {\n                if (Object.prototype.hasOwnProperty.call(containerToProcess.source, key)) {\n                    const targetData = sanitizeProcessor(containerToProcess.source[key], containerToProcess.path, key, containerQueue, visitedObjectsWithPath);\n                    // When a property of an object has an undefined value, it will be dropped during serialization:\n                    // JSON.stringify({a:undefined}) => '{}'\n                    if (targetData !== undefined) {\n                        accumulatedCharacterCount +=\n                            JSON.stringify(targetData).length + separatorLength + key.length + KEY_DECORATION_LENGTH;\n                        separatorLength = 1;\n                    }\n                    if (accumulatedCharacterCount > maxCharacterCount) {\n                        warnOverCharacterLimit(maxCharacterCount, 'truncated', source);\n                        break;\n                    }\n                    ;\n                    containerToProcess.target[key] = targetData;\n                }\n            }\n        }\n    }\n    // Rebind detached toJSON functions\n    restoreObjectPrototypeToJson();\n    restoreArrayPrototypeToJson();\n    return sanitizedData;\n}\n/**\n * Internal function to factorize the process common to the\n * initial call to sanitize, and iterations for Arrays and Objects\n *\n */\nfunction sanitizeProcessor(source, parentPath, key, queue, visitedObjectsWithPath) {\n    // Start by handling toJSON, as we want to sanitize its output\n    const sourceToSanitize = tryToApplyToJSON(source);\n    if (!sourceToSanitize || typeof sourceToSanitize !== 'object') {\n        return sanitizePrimitivesAndFunctions(sourceToSanitize);\n    }\n    const sanitizedSource = sanitizeObjects(sourceToSanitize);\n    if (sanitizedSource !== '[Object]' && sanitizedSource !== '[Array]' && sanitizedSource !== '[Error]') {\n        return sanitizedSource;\n    }\n    // Handle potential cyclic references\n    // We need to use source as sourceToSanitize could be a reference to a new object\n    // At this stage, we know the source is an object type\n    const sourceAsObject = source;\n    if (visitedObjectsWithPath.has(sourceAsObject)) {\n        return `[Reference seen at ${visitedObjectsWithPath.get(sourceAsObject)}]`;\n    }\n    // Add processed source to queue\n    const currentPath = key !== undefined ? `${parentPath}.${key}` : parentPath;\n    const target = Array.isArray(sourceToSanitize) ? [] : {};\n    visitedObjectsWithPath.set(sourceAsObject, currentPath);\n    queue.push({ source: sourceToSanitize, target, path: currentPath });\n    return target;\n}\n/**\n * Handles sanitization of simple, non-object types\n *\n */\nfunction sanitizePrimitivesAndFunctions(value) {\n    // BigInt cannot be serialized by JSON.stringify(), convert it to a string representation\n    if (typeof value === 'bigint') {\n        return `[BigInt] ${value.toString()}`;\n    }\n    // Functions cannot be serialized by JSON.stringify(). Moreover, if a faulty toJSON is present, it needs to be converted\n    // so it won't prevent stringify from serializing later\n    if (typeof value === 'function') {\n        return `[Function] ${value.name || 'unknown'}`;\n    }\n    // JSON.stringify() does not serialize symbols.\n    if (typeof value === 'symbol') {\n        return `[Symbol] ${value.description || value.toString()}`;\n    }\n    return value;\n}\n/**\n * Handles sanitization of object types\n *\n * LIMITATIONS\n * - If a class defines a toStringTag Symbol, it will fall in the catch-all method and prevent enumeration of properties.\n * To avoid this, a toJSON method can be defined.\n */\nfunction sanitizeObjects(value) {\n    try {\n        if (value instanceof Event) {\n            return sanitizeEvent(value);\n        }\n        if (value instanceof RegExp) {\n            return `[RegExp] ${value.toString()}`;\n        }\n        // Handle all remaining object types in a generic way\n        const result = Object.prototype.toString.call(value);\n        const match = result.match(/\\[object (.*)\\]/);\n        if (match && match[1]) {\n            return `[${match[1]}]`;\n        }\n    }\n    catch (_a) {\n        // If the previous serialization attempts failed, and we cannot convert using\n        // Object.prototype.toString, declare the value unserializable\n    }\n    return '[Unserializable]';\n}\nfunction sanitizeEvent(event) {\n    return {\n        type: event.type,\n        isTrusted: event.isTrusted,\n        currentTarget: event.currentTarget ? sanitizeObjects(event.currentTarget) : null,\n        target: event.target ? sanitizeObjects(event.target) : null,\n    };\n}\n/**\n * Checks if a toJSON function exists and tries to execute it\n *\n */\nfunction tryToApplyToJSON(value) {\n    const object = value;\n    if (object && typeof object.toJSON === 'function') {\n        try {\n            return object.toJSON();\n        }\n        catch (_a) {\n            // If toJSON fails, we continue by trying to serialize the value manually\n        }\n    }\n    return value;\n}\n/**\n * Helper function to display the warning when the accumulated character count is over the limit\n */\nfunction warnOverCharacterLimit(maxCharacterCount, changeType, source) {\n    display.warn(`The data provided has been ${changeType} as it is over the limit of ${maxCharacterCount} characters:`, source);\n}\n//# sourceMappingURL=sanitize.js.map","/**\n * Cross-browser stack trace computation.\n *\n * Reference implementation: https://github.com/csnover/TraceKit/blob/04530298073c3823de72deb0b97e7b38ca7bcb59/tracekit.js\n */\nimport { isIndexableObject } from '../utils/typeUtils';\nconst UNKNOWN_FUNCTION = '?';\nexport function computeStackTrace(ex) {\n    var _a, _b;\n    const stack = [];\n    let stackProperty = tryToGetString(ex, 'stack');\n    const exString = String(ex);\n    if (stackProperty && stackProperty.startsWith(exString)) {\n        stackProperty = stackProperty.slice(exString.length);\n    }\n    if (stackProperty) {\n        stackProperty.split('\\n').forEach((line) => {\n            const stackFrame = parseChromeLine(line) || parseChromeAnonymousLine(line) || parseWinLine(line) || parseGeckoLine(line);\n            if (stackFrame) {\n                if (!stackFrame.func && stackFrame.line) {\n                    stackFrame.func = UNKNOWN_FUNCTION;\n                }\n                stack.push(stackFrame);\n            }\n        });\n    }\n    if (stack.length > 0 && isWronglyReportingCustomErrors() && ex instanceof Error) {\n        // if we are wrongly reporting custom errors\n        const constructors = [];\n        // go through each inherited constructor\n        let currentPrototype = ex;\n        while ((currentPrototype = Object.getPrototypeOf(currentPrototype)) &&\n            isNonNativeClassPrototype(currentPrototype)) {\n            const constructorName = ((_a = currentPrototype.constructor) === null || _a === void 0 ? void 0 : _a.name) || UNKNOWN_FUNCTION;\n            constructors.push(constructorName);\n        }\n        // traverse the stacktrace in reverse order because the stacktrace starts with the last inherited constructor\n        // we check constructor names to ensure we remove the correct frame (and there isn't a weird unsupported environment behavior)\n        for (let i = constructors.length - 1; i >= 0 && ((_b = stack[0]) === null || _b === void 0 ? void 0 : _b.func) === constructors[i]; i--) {\n            // if the first stack frame is the custom error constructor\n            // null stack frames may represent frames that failed to be parsed because the error class did not have a constructor\n            stack.shift(); // remove it\n        }\n    }\n    return {\n        message: tryToGetString(ex, 'message'),\n        name: tryToGetString(ex, 'name'),\n        stack,\n    };\n}\nconst fileUrl = '((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\\\w+\\\\.|\\\\/).*?)';\nconst filePosition = '(?::(\\\\d+))';\nconst CHROME_LINE_RE = new RegExp(`^\\\\s*at (.*?) ?\\\\(${fileUrl}${filePosition}?${filePosition}?\\\\)?\\\\s*$`, 'i');\nconst CHROME_EVAL_RE = new RegExp(`\\\\((\\\\S*)${filePosition}${filePosition}\\\\)`);\nfunction parseChromeLine(line) {\n    const parts = CHROME_LINE_RE.exec(line);\n    if (!parts) {\n        return;\n    }\n    const isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n    const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n    const submatch = CHROME_EVAL_RE.exec(parts[2]);\n    if (isEval && submatch) {\n        // throw out eval line/column and use top-most line/column number\n        parts[2] = submatch[1]; // url\n        parts[3] = submatch[2]; // line\n        parts[4] = submatch[3]; // column\n    }\n    return {\n        args: isNative ? [parts[2]] : [],\n        column: parts[4] ? +parts[4] : undefined,\n        func: parts[1] || UNKNOWN_FUNCTION,\n        line: parts[3] ? +parts[3] : undefined,\n        url: !isNative ? parts[2] : undefined,\n    };\n}\nconst htmlAnonymousPart = '(?:(.*)?(?: @))';\nconst CHROME_ANONYMOUS_FUNCTION_RE = new RegExp(`^\\\\s*at\\\\s*${htmlAnonymousPart}?\\\\s*${fileUrl}${filePosition}?${filePosition}??\\\\s*$`, 'i');\nfunction parseChromeAnonymousLine(line) {\n    const parts = CHROME_ANONYMOUS_FUNCTION_RE.exec(line);\n    if (!parts) {\n        return;\n    }\n    return {\n        args: [],\n        column: parts[4] ? +parts[4] : undefined,\n        func: parts[1] || UNKNOWN_FUNCTION,\n        line: parts[3] ? +parts[3] : undefined,\n        url: parts[2],\n    };\n}\nconst WINJS_LINE_RE = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nfunction parseWinLine(line) {\n    const parts = WINJS_LINE_RE.exec(line);\n    if (!parts) {\n        return;\n    }\n    return {\n        args: [],\n        column: parts[4] ? +parts[4] : undefined,\n        func: parts[1] || UNKNOWN_FUNCTION,\n        line: +parts[3],\n        url: parts[2],\n    };\n}\nconst GECKO_LINE_RE = /^\\s*(.*?)(?:\\((.*?)\\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\\[native).*?|[^@]*bundle|\\[wasm code\\])(?::(\\d+))?(?::(\\d+))?)|@)\\s*$/i;\nconst GECKO_EVAL_RE = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nfunction parseGeckoLine(line) {\n    const parts = GECKO_LINE_RE.exec(line);\n    if (!parts) {\n        return;\n    }\n    const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n    const submatch = GECKO_EVAL_RE.exec(parts[3]);\n    if (isEval && submatch) {\n        // throw out eval line/column and use top-most line number\n        parts[3] = submatch[1];\n        parts[4] = submatch[2];\n        parts[5] = undefined; // no column when eval\n    }\n    return {\n        args: parts[2] ? parts[2].split(',') : [],\n        column: parts[5] ? +parts[5] : undefined,\n        func: parts[1] || UNKNOWN_FUNCTION,\n        line: parts[4] ? +parts[4] : undefined,\n        url: parts[3],\n    };\n}\nfunction tryToGetString(candidate, property) {\n    return isIndexableObject(candidate) && typeof candidate[property] === 'string' ? candidate[property] : undefined;\n}\nexport function computeStackTraceFromOnErrorMessage(messageObj, url, line, column) {\n    if (url === undefined) {\n        return;\n    }\n    const { name, message } = tryToParseMessage(messageObj);\n    return {\n        name,\n        message,\n        stack: [{ url, column, line }],\n    };\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types\nconst ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\\s\\S]*)$/;\nfunction tryToParseMessage(messageObj) {\n    let name;\n    let message;\n    if ({}.toString.call(messageObj) === '[object String]') {\n        ;\n        [, name, message] = ERROR_TYPES_RE.exec(messageObj);\n    }\n    return { name, message };\n}\n// Custom error stacktrace fix\n// Some browsers (safari/firefox) add the error constructor as a frame in the stacktrace\n// In order to normalize the stacktrace, we need to remove it\nfunction isNonNativeClassPrototype(prototype) {\n    return String(prototype.constructor).startsWith('class ');\n}\nlet isWronglyReportingCustomErrorsCache;\nfunction isWronglyReportingCustomErrors() {\n    if (isWronglyReportingCustomErrorsCache !== undefined) {\n        return isWronglyReportingCustomErrorsCache;\n    }\n    /* eslint-disable no-restricted-syntax */\n    class DatadogTestCustomError extends Error {\n        constructor() {\n            super();\n            this.name = 'Error'; // set name to Error so that no browser would default to the constructor name\n        }\n    }\n    const [customError, nativeError] = [DatadogTestCustomError, Error].map((errConstructor) => new errConstructor()); // so that both errors should exactly have the same stacktrace\n    isWronglyReportingCustomErrorsCache =\n        // If customError is not a class, it means that this was built with ES5 as target, converting the class to a normal object.\n        // Thus, error constructors will be reported on all browsers, which is the expected behavior.\n        isNonNativeClassPrototype(Object.getPrototypeOf(customError)) &&\n            // If the browser is correctly reporting the stacktrace, the normal error stacktrace should be the same as the custom error stacktrace\n            nativeError.stack !== customError.stack;\n    return isWronglyReportingCustomErrorsCache;\n}\n//# sourceMappingURL=computeStackTrace.js.map","import { callMonitored } from '../monitor';\nimport { computeStackTrace } from './computeStackTrace';\n/**\n * Creates a stacktrace without SDK internal frames.\n * Constraints:\n * - Has to be called at the utmost position of the call stack.\n * - No monitored function should encapsulate it, that is why we need to use callMonitored inside it.\n */\nexport function createHandlingStack(type) {\n    /**\n     * Skip the two internal frames:\n     * - SDK API (console.error, ...)\n     * - this function\n     * in order to keep only the user calls\n     */\n    const internalFramesToSkip = 2;\n    const error = new Error(type);\n    error.name = 'HandlingStack';\n    let formattedStack;\n    callMonitored(() => {\n        const stackTrace = computeStackTrace(error);\n        stackTrace.stack = stackTrace.stack.slice(internalFramesToSkip);\n        formattedStack = toStackTraceString(stackTrace);\n    });\n    return formattedStack;\n}\nexport function toStackTraceString(stack) {\n    let result = formatErrorMessage(stack);\n    stack.stack.forEach((frame) => {\n        const func = frame.func === '?' ? '<anonymous>' : frame.func;\n        const args = frame.args && frame.args.length > 0 ? `(${frame.args.join(', ')})` : '';\n        const line = frame.line ? `:${frame.line}` : '';\n        const column = frame.line && frame.column ? `:${frame.column}` : '';\n        result += `\\n  at ${func}${args} @ ${frame.url}${line}${column}`;\n    });\n    return result;\n}\nexport function formatErrorMessage(stack) {\n    return `${stack.name || 'Error'}: ${stack.message}`;\n}\n//# sourceMappingURL=handlingStack.js.map","import { getZoneJsOriginalValue } from './getZoneJsOriginalValue';\nimport { monitor } from './monitor';\nimport { getGlobalObject } from './globalObject';\nexport function setTimeout(callback, delay) {\n    return getZoneJsOriginalValue(getGlobalObject(), 'setTimeout')(monitor(callback), delay);\n}\nexport function clearTimeout(timeoutId) {\n    getZoneJsOriginalValue(getGlobalObject(), 'clearTimeout')(timeoutId);\n}\nexport function setInterval(callback, delay) {\n    return getZoneJsOriginalValue(getGlobalObject(), 'setInterval')(monitor(callback), delay);\n}\nexport function clearInterval(timeoutId) {\n    getZoneJsOriginalValue(getGlobalObject(), 'clearInterval')(timeoutId);\n}\n//# sourceMappingURL=timer.js.map","export function removeDuplicates(array) {\n    const set = new Set();\n    array.forEach((item) => set.add(item));\n    return Array.from(set);\n}\nexport function removeItem(array, item) {\n    const index = array.indexOf(item);\n    if (index >= 0) {\n        array.splice(index, 1);\n    }\n}\nexport function isNonEmptyArray(value) {\n    return Array.isArray(value) && value.length > 0;\n}\n//# sourceMappingURL=arrayUtils.js.map","export function isChromium() {\n    return detectBrowserCached() === 0 /* Browser.CHROMIUM */;\n}\nexport function isSafari() {\n    return detectBrowserCached() === 1 /* Browser.SAFARI */;\n}\nlet browserCache;\nfunction detectBrowserCached() {\n    return browserCache !== null && browserCache !== void 0 ? browserCache : (browserCache = detectBrowser());\n}\n// Exported only for tests\nexport function detectBrowser(browserWindow = window) {\n    var _a;\n    const userAgent = browserWindow.navigator.userAgent;\n    if (browserWindow.chrome || /HeadlessChrome/.test(userAgent)) {\n        return 0 /* Browser.CHROMIUM */;\n    }\n    if (\n    // navigator.vendor is deprecated, but it is the most resilient way we found to detect\n    // \"Apple maintained browsers\" (AKA Safari). If one day it gets removed, we still have the\n    // useragent test as a semi-working fallback.\n    ((_a = browserWindow.navigator.vendor) === null || _a === void 0 ? void 0 : _a.indexOf('Apple')) === 0 ||\n        (/safari/i.test(userAgent) && !/chrome|android/i.test(userAgent))) {\n        return 1 /* Browser.SAFARI */;\n    }\n    return 2 /* Browser.OTHER */;\n}\n//# sourceMappingURL=browserDetection.js.map","export const ONE_KIBI_BYTE = 1024;\nexport const ONE_MEBI_BYTE = 1024 * ONE_KIBI_BYTE;\n// eslint-disable-next-line no-control-regex\nconst HAS_MULTI_BYTES_CHARACTERS = /[^\\u0000-\\u007F]/;\nexport function computeBytesCount(candidate) {\n    // Accurate bytes count computations can degrade performances when there is a lot of events to process\n    if (!HAS_MULTI_BYTES_CHARACTERS.test(candidate)) {\n        return candidate.length;\n    }\n    if (window.TextEncoder !== undefined) {\n        return new TextEncoder().encode(candidate).length;\n    }\n    return new Blob([candidate]).size;\n}\nexport function concatBuffers(buffers) {\n    // Optimization: if there is a single buffer, no need to copy it\n    if (buffers.length === 1) {\n        return buffers[0];\n    }\n    const length = buffers.reduce((total, buffer) => total + buffer.length, 0);\n    const result = new Uint8Array(length);\n    let offset = 0;\n    for (const buffer of buffers) {\n        result.set(buffer, offset);\n        offset += buffer.length;\n    }\n    return result;\n}\n//# sourceMappingURL=byteUtils.js.map","import { setTimeout, clearTimeout } from '../timer';\n// use lodash API\nexport function throttle(fn, wait, options) {\n    const needLeadingExecution = options && options.leading !== undefined ? options.leading : true;\n    const needTrailingExecution = options && options.trailing !== undefined ? options.trailing : true;\n    let inWaitPeriod = false;\n    let pendingExecutionWithParameters;\n    let pendingTimeoutId;\n    return {\n        throttled: (...parameters) => {\n            if (inWaitPeriod) {\n                pendingExecutionWithParameters = parameters;\n                return;\n            }\n            if (needLeadingExecution) {\n                fn(...parameters);\n            }\n            else {\n                pendingExecutionWithParameters = parameters;\n            }\n            inWaitPeriod = true;\n            pendingTimeoutId = setTimeout(() => {\n                if (needTrailingExecution && pendingExecutionWithParameters) {\n                    fn(...pendingExecutionWithParameters);\n                }\n                inWaitPeriod = false;\n                pendingExecutionWithParameters = undefined;\n            }, wait);\n        },\n        cancel: () => {\n            clearTimeout(pendingTimeoutId);\n            inWaitPeriod = false;\n            pendingExecutionWithParameters = undefined;\n        },\n    };\n}\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport function noop() { }\n//# sourceMappingURL=functionUtils.js.map","/**\n * Return true if the draw is successful\n *\n * @param threshold - Threshold between 0 and 100\n */\nexport function performDraw(threshold) {\n    return threshold !== 0 && Math.random() * 100 <= threshold;\n}\nexport function round(num, decimals) {\n    return +num.toFixed(decimals);\n}\nexport function isPercentage(value) {\n    return isNumber(value) && value >= 0 && value <= 100;\n}\nexport function isNumber(value) {\n    return typeof value === 'number';\n}\n//# sourceMappingURL=numberUtils.js.map","export function tryJsonParse(text) {\n    try {\n        return JSON.parse(text);\n    }\n    catch (_a) {\n        // ignore\n    }\n}\nexport function shallowClone(object) {\n    return { ...object };\n}\nexport function objectHasValue(object, value) {\n    return Object.keys(object).some((key) => object[key] === value);\n}\nexport function isEmptyObject(object) {\n    return Object.keys(object).length === 0;\n}\nexport function mapValues(object, fn) {\n    const newObject = {};\n    for (const key of Object.keys(object)) {\n        newObject[key] = fn(object[key]);\n    }\n    return newObject;\n}\n//# sourceMappingURL=objectUtils.js.map","export function findLast(array, predicate) {\n    for (let i = array.length - 1; i >= 0; i -= 1) {\n        const item = array[i];\n        if (predicate(item, i, array)) {\n            return item;\n        }\n    }\n    return undefined;\n}\n// Keep the following wrapper functions as it can be mangled and will result in smaller bundle size that using\n// the native Object.values and Object.entries directly\nexport function objectValues(object) {\n    return Object.values(object);\n}\nexport function objectEntries(object) {\n    return Object.entries(object);\n}\n//# sourceMappingURL=polyfills.js.map","export function isServerError(status) {\n    return status >= 500;\n}\nexport function tryToClone(response) {\n    try {\n        return response.clone();\n    }\n    catch (_a) {\n        // clone can throw if the response has already been used by another instrumentation or is disturbed\n        return;\n    }\n}\n//# sourceMappingURL=responseUtils.js.map","import { isNumber, round } from './numberUtils';\nexport const ONE_SECOND = 1000;\nexport const ONE_MINUTE = 60 * ONE_SECOND;\nexport const ONE_HOUR = 60 * ONE_MINUTE;\nexport const ONE_DAY = 24 * ONE_HOUR;\nexport const ONE_YEAR = 365 * ONE_DAY;\nexport function relativeToClocks(relative) {\n    return { relative, timeStamp: getCorrectedTimeStamp(relative) };\n}\nexport function timeStampToClocks(timeStamp) {\n    return { relative: getRelativeTime(timeStamp), timeStamp };\n}\nfunction getCorrectedTimeStamp(relativeTime) {\n    const correctedOrigin = (dateNow() - performance.now());\n    // apply correction only for positive drift\n    if (correctedOrigin > getNavigationStart()) {\n        return Math.round(addDuration(correctedOrigin, relativeTime));\n    }\n    return getTimeStamp(relativeTime);\n}\nexport function currentDrift() {\n    return Math.round(dateNow() - addDuration(getNavigationStart(), performance.now()));\n}\nexport function toServerDuration(duration) {\n    if (!isNumber(duration)) {\n        return duration;\n    }\n    return round(duration * 1e6, 0);\n}\nexport function dateNow() {\n    // Do not use `Date.now` because sometimes websites are wrongly \"polyfilling\" it. For example, we\n    // had some users using a very old version of `datejs`, which patched `Date.now` to return a Date\n    // instance instead of a timestamp[1]. Those users are unlikely to fix this, so let's handle this\n    // case ourselves.\n    // [1]: https://github.com/datejs/Datejs/blob/97f5c7c58c5bc5accdab8aa7602b6ac56462d778/src/core-debug.js#L14-L16\n    return new Date().getTime();\n}\nexport function timeStampNow() {\n    return dateNow();\n}\nexport function relativeNow() {\n    return performance.now();\n}\nexport function clocksNow() {\n    return { relative: relativeNow(), timeStamp: timeStampNow() };\n}\nexport function clocksOrigin() {\n    return { relative: 0, timeStamp: getNavigationStart() };\n}\nexport function elapsed(start, end) {\n    return (end - start);\n}\nexport function addDuration(a, b) {\n    return a + b;\n}\n// Get the time since the navigation was started.\nexport function getRelativeTime(timestamp) {\n    return (timestamp - getNavigationStart());\n}\nexport function getTimeStamp(relativeTime) {\n    return Math.round(addDuration(getNavigationStart(), relativeTime));\n}\nexport function looksLikeRelativeTime(time) {\n    return time < ONE_YEAR;\n}\n/**\n * Navigation start slightly change on some rare cases\n */\nlet navigationStart;\n/**\n * Notes: this does not use `performance.timeOrigin` because:\n * - It doesn't seem to reflect the actual time on which the navigation has started: it may be much farther in the past,\n * at least in Firefox 71. (see: https://bugzilla.mozilla.org/show_bug.cgi?id=1429926)\n * - It is not supported in Safari <15\n */\nfunction getNavigationStart() {\n    var _a, _b;\n    if (navigationStart === undefined) {\n        // ServiceWorkers do not support navigationStart (it's deprecated), so we fallback to timeOrigin\n        navigationStart = ((_b = (_a = performance.timing) === null || _a === void 0 ? void 0 : _a.navigationStart) !== null && _b !== void 0 ? _b : performance.timeOrigin);\n    }\n    return navigationStart;\n}\n//# sourceMappingURL=timeUtils.js.map","/**\n * Similar to `typeof`, but distinguish plain objects from `null` and arrays\n */\nexport function getType(value) {\n    if (value === null) {\n        return 'null';\n    }\n    if (Array.isArray(value)) {\n        return 'array';\n    }\n    return typeof value;\n}\n/**\n * Checks whether a value can have properties. Use this when you have an unknown value and you want\n * to access its properties as unknown. This is a friendly solution for dealing with unknown objects\n * in TypeScript.\n *\n * This function is intended to be used on values that will be used as \"plain objects\", i.e. not\n * Array, Date, RegExp or other class instances. But it's safe to use on any value.\n *\n * @example\n * ```\n * // Before:\n * if (typeof value === 'object' && value !== null && 'property' in value && typeof value.property === 'string') {\n *   // use value.property\n * }\n * // After:\n * if (isIndexableObject(value) && typeof value.property === 'string') {\n *   // use value.property\n * }\n * ```\n */\nexport function isIndexableObject(value) {\n    return getType(value) === 'object';\n}\n//# sourceMappingURL=typeUtils.js.map","import { globalObject } from '../globalObject';\nexport function normalizeUrl(url) {\n    return buildUrl(url, location.href).href;\n}\nexport function isValidUrl(url) {\n    try {\n        return !!buildUrl(url);\n    }\n    catch (_a) {\n        return false;\n    }\n}\nexport function getPathName(url) {\n    const pathname = buildUrl(url).pathname;\n    return pathname[0] === '/' ? pathname : `/${pathname}`;\n}\nexport function buildUrl(url, base) {\n    const { URL } = getPristineWindow();\n    try {\n        return base !== undefined ? new URL(url, base) : new URL(url);\n    }\n    catch (error) {\n        throw new Error(`Failed to construct URL: ${String(error)}`);\n    }\n}\n/**\n * Get native URL constructor from a clean iframe\n * This avoids polyfill issues by getting the native implementation from a fresh iframe context\n * Falls back to the original URL constructor if iframe approach fails\n */\nlet getPristineGlobalObjectCache;\nexport function getPristineWindow() {\n    var _a;\n    if (!getPristineGlobalObjectCache) {\n        let iframe;\n        let pristineWindow;\n        try {\n            iframe = document.createElement('iframe');\n            iframe.style.display = 'none';\n            document.body.appendChild(iframe);\n            pristineWindow = ((_a = iframe.contentWindow) !== null && _a !== void 0 ? _a : globalObject);\n        }\n        catch (_b) {\n            pristineWindow = globalObject;\n        }\n        getPristineGlobalObjectCache = {\n            URL: pristineWindow.URL,\n        };\n        iframe === null || iframe === void 0 ? void 0 : iframe.remove();\n    }\n    return getPristineGlobalObjectCache;\n}\n//# sourceMappingURL=urlPolyfill.js.map","import { setInterval, clearInterval } from './timer';\nimport { removeItem } from './utils/arrayUtils';\nimport { addDuration, relativeNow, ONE_MINUTE } from './utils/timeUtils';\nconst END_OF_TIMES = Infinity;\nexport const CLEAR_OLD_VALUES_INTERVAL = ONE_MINUTE;\nlet cleanupHistoriesInterval;\nconst cleanupTasks = new Set();\nfunction cleanupHistories() {\n    cleanupTasks.forEach((task) => task());\n}\nexport function createValueHistory({ expireDelay, maxEntries, }) {\n    let entries = [];\n    if (!cleanupHistoriesInterval) {\n        cleanupHistoriesInterval = setInterval(() => cleanupHistories(), CLEAR_OLD_VALUES_INTERVAL);\n    }\n    const clearExpiredValues = () => {\n        const oldTimeThreshold = relativeNow() - expireDelay;\n        while (entries.length > 0 && entries[entries.length - 1].endTime < oldTimeThreshold) {\n            entries.pop();\n        }\n    };\n    cleanupTasks.add(clearExpiredValues);\n    /**\n     * Add a value to the history associated with a start time. Returns a reference to this newly\n     * added entry that can be removed or closed.\n     */\n    function add(value, startTime) {\n        const entry = {\n            value,\n            startTime,\n            endTime: END_OF_TIMES,\n            remove: () => {\n                removeItem(entries, entry);\n            },\n            close: (endTime) => {\n                entry.endTime = endTime;\n            },\n        };\n        if (maxEntries && entries.length >= maxEntries) {\n            entries.pop();\n        }\n        entries.unshift(entry);\n        return entry;\n    }\n    /**\n     * Return the latest value that was active during `startTime`, or the currently active value\n     * if no `startTime` is provided. This method assumes that entries are not overlapping.\n     *\n     * If `option.returnInactive` is true, returns the value at `startTime` (active or not).\n     */\n    function find(startTime = END_OF_TIMES, options = { returnInactive: false }) {\n        for (const entry of entries) {\n            if (entry.startTime <= startTime) {\n                if (options.returnInactive || startTime <= entry.endTime) {\n                    return entry.value;\n                }\n                break;\n            }\n        }\n    }\n    /**\n     * Helper function to close the currently active value, if any. This method assumes that entries\n     * are not overlapping.\n     */\n    function closeActive(endTime) {\n        const latestEntry = entries[0];\n        if (latestEntry && latestEntry.endTime === END_OF_TIMES) {\n            latestEntry.close(endTime);\n        }\n    }\n    /**\n     * Return all values with an active period overlapping with the duration,\n     * or all values that were active during `startTime` if no duration is provided,\n     * or all currently active values if no `startTime` is provided.\n     */\n    function findAll(startTime = END_OF_TIMES, duration = 0) {\n        const endTime = addDuration(startTime, duration);\n        return entries\n            .filter((entry) => entry.startTime <= endTime && startTime <= entry.endTime)\n            .map((entry) => entry.value);\n    }\n    /**\n     * Return all the entries whose start time is equal to the given startTime.\n     */\n    function getEntries(startTime) {\n        return entries.filter((entry) => entry.startTime === startTime);\n    }\n    /**\n     * Remove all entries from this collection.\n     */\n    function reset() {\n        entries = [];\n    }\n    /**\n     * Stop internal garbage collection of past entries.\n     */\n    function stop() {\n        cleanupTasks.delete(clearExpiredValues);\n        if (cleanupTasks.size === 0 && cleanupHistoriesInterval) {\n            clearInterval(cleanupHistoriesInterval);\n            cleanupHistoriesInterval = undefined;\n        }\n    }\n    return { add, find, closeActive, findAll, getEntries, reset, stop };\n}\n/**\n * Reset all global state. This is useful for testing to ensure clean state between tests.\n *\n * @internal\n */\nexport function resetValueHistoryGlobals() {\n    cleanupTasks.clear();\n    clearInterval(cleanupHistoriesInterval);\n    cleanupHistoriesInterval = undefined;\n}\n//# sourceMappingURL=valueHistory.js.map","import { DOCS_TROUBLESHOOTING, MORE_DETAILS, display } from '../tools/display';\nimport { objectValues } from '../tools/utils/polyfills';\nimport { isPageExitReason } from '../browser/pageMayExitObservable';\nimport { jsonStringify } from '../tools/serialisation/jsonStringify';\nimport { computeBytesCount, ONE_KIBI_BYTE } from '../tools/utils/byteUtils';\nexport const MESSAGE_BYTES_LIMIT = 256 * ONE_KIBI_BYTE;\nexport function createBatch({ encoder, request, flushController, }) {\n    let upsertBuffer = {};\n    const flushSubscription = flushController.flushObservable.subscribe((event) => flush(event));\n    function push(serializedMessage, estimatedMessageBytesCount, key) {\n        flushController.notifyBeforeAddMessage(estimatedMessageBytesCount);\n        if (key !== undefined) {\n            upsertBuffer[key] = serializedMessage;\n            flushController.notifyAfterAddMessage();\n        }\n        else {\n            encoder.write(encoder.isEmpty ? serializedMessage : `\\n${serializedMessage}`, (realMessageBytesCount) => {\n                flushController.notifyAfterAddMessage(realMessageBytesCount - estimatedMessageBytesCount);\n            });\n        }\n    }\n    function hasMessageFor(key) {\n        return key !== undefined && upsertBuffer[key] !== undefined;\n    }\n    function remove(key) {\n        const removedMessage = upsertBuffer[key];\n        delete upsertBuffer[key];\n        const messageBytesCount = encoder.estimateEncodedBytesCount(removedMessage);\n        flushController.notifyAfterRemoveMessage(messageBytesCount);\n    }\n    function addOrUpdate(message, key) {\n        const serializedMessage = jsonStringify(message);\n        const estimatedMessageBytesCount = encoder.estimateEncodedBytesCount(serializedMessage);\n        if (estimatedMessageBytesCount >= MESSAGE_BYTES_LIMIT) {\n            display.warn(`Discarded a message whose size was bigger than the maximum allowed size ${MESSAGE_BYTES_LIMIT / ONE_KIBI_BYTE}KiB. ${MORE_DETAILS} ${DOCS_TROUBLESHOOTING}/#technical-limitations`);\n            return;\n        }\n        if (hasMessageFor(key)) {\n            remove(key);\n        }\n        push(serializedMessage, estimatedMessageBytesCount, key);\n    }\n    function flush(event) {\n        const upsertMessages = objectValues(upsertBuffer).join('\\n');\n        upsertBuffer = {};\n        const pageMightExit = isPageExitReason(event.reason);\n        const send = pageMightExit ? request.sendOnExit : request.send;\n        if (pageMightExit &&\n            // Note: checking that the encoder is async is not strictly needed, but it's an optimization:\n            // if the encoder is async we need to send two requests in some cases (one for encoded data\n            // and the other for non-encoded data). But if it's not async, we don't have to worry about\n            // it and always send a single request.\n            encoder.isAsync) {\n            const encoderResult = encoder.finishSync();\n            // Send encoded messages\n            if (encoderResult.outputBytesCount) {\n                send(formatPayloadFromEncoder(encoderResult));\n            }\n            // Send messages that are not yet encoded at this point\n            const pendingMessages = [encoderResult.pendingData, upsertMessages].filter(Boolean).join('\\n');\n            if (pendingMessages) {\n                send({\n                    data: pendingMessages,\n                    bytesCount: computeBytesCount(pendingMessages),\n                });\n            }\n        }\n        else {\n            if (upsertMessages) {\n                encoder.write(encoder.isEmpty ? upsertMessages : `\\n${upsertMessages}`);\n            }\n            encoder.finish((encoderResult) => {\n                send(formatPayloadFromEncoder(encoderResult));\n            });\n        }\n    }\n    return {\n        flushController,\n        add: addOrUpdate,\n        upsert: addOrUpdate,\n        stop: flushSubscription.unsubscribe,\n    };\n}\nfunction formatPayloadFromEncoder(encoderResult) {\n    let data;\n    if (typeof encoderResult.output === 'string') {\n        data = encoderResult.output;\n    }\n    else {\n        data = new Blob([encoderResult.output], {\n            // This will set the 'Content-Type: text/plain' header. Reasoning:\n            // * The intake rejects the request if there is no content type.\n            // * The browser will issue CORS preflight requests if we set it to 'application/json', which\n            // could induce higher intake load (and maybe has other impacts).\n            // * Also it's not quite JSON, since we are concatenating multiple JSON objects separated by\n            // new lines.\n            type: 'text/plain',\n        });\n    }\n    return {\n        data,\n        bytesCount: encoderResult.outputBytesCount,\n        encoding: encoderResult.encoding,\n    };\n}\n//# sourceMappingURL=batch.js.map","import { getGlobalObject } from '../tools/globalObject';\nexport function getEventBridge() {\n    const eventBridgeGlobal = getEventBridgeGlobal();\n    if (!eventBridgeGlobal) {\n        return;\n    }\n    return {\n        getCapabilities() {\n            var _a;\n            return JSON.parse(((_a = eventBridgeGlobal.getCapabilities) === null || _a === void 0 ? void 0 : _a.call(eventBridgeGlobal)) || '[]');\n        },\n        getPrivacyLevel() {\n            var _a;\n            return (_a = eventBridgeGlobal.getPrivacyLevel) === null || _a === void 0 ? void 0 : _a.call(eventBridgeGlobal);\n        },\n        getAllowedWebViewHosts() {\n            return JSON.parse(eventBridgeGlobal.getAllowedWebViewHosts());\n        },\n        send(eventType, event, viewId) {\n            const view = viewId ? { id: viewId } : undefined;\n            eventBridgeGlobal.send(JSON.stringify({ eventType, event, view }));\n        },\n    };\n}\nexport function bridgeSupports(capability) {\n    const bridge = getEventBridge();\n    return !!bridge && bridge.getCapabilities().includes(capability);\n}\nexport function canUseEventBridge(currentHost) {\n    var _a;\n    if (currentHost === void 0) { currentHost = (_a = getGlobalObject().location) === null || _a === void 0 ? void 0 : _a.hostname; }\n    const bridge = getEventBridge();\n    return (!!bridge &&\n        bridge\n            .getAllowedWebViewHosts()\n            .some((allowedHost) => currentHost === allowedHost || currentHost.endsWith(`.${allowedHost}`)));\n}\nfunction getEventBridgeGlobal() {\n    return getGlobalObject().DatadogEventBridge;\n}\n//# sourceMappingURL=eventBridge.js.map","import { isWorkerEnvironment } from '../tools/globalObject';\nimport { Observable } from '../tools/observable';\nimport { clearTimeout, setTimeout } from '../tools/timer';\nimport { ONE_SECOND } from '../tools/utils/timeUtils';\nimport { RECOMMENDED_REQUEST_BYTES_LIMIT } from './httpRequest';\n/**\n * flush automatically, aim to be lower than ALB connection timeout\n * to maximize connection reuse.\n */\nexport const FLUSH_DURATION_LIMIT = (30 * ONE_SECOND);\n/**\n * When using the SDK in a Worker Environment, we limit the batch size to 1 to ensure it can be sent\n * in a single event.\n */\nexport const MESSAGES_LIMIT = isWorkerEnvironment ? 1 : 50;\n/**\n * Returns a \"flush controller\", responsible of notifying when flushing a pool of pending data needs\n * to happen. The implementation is designed to support both synchronous and asynchronous usages,\n * but relies on invariants described in each method documentation to keep a coherent state.\n */\nexport function createFlushController({ pageMayExitObservable, sessionExpireObservable }) {\n    let forcedFlushReason;\n    const preparePageExitFlushObservable = new Observable();\n    const pageMayExitSubscription = pageMayExitObservable.subscribe((event) => {\n        forcedFlushReason = event.reason;\n        try {\n            preparePageExitFlushObservable.notify(event.reason);\n        }\n        finally {\n            forcedFlushReason = undefined;\n        }\n        flush(event.reason);\n    });\n    const sessionExpireSubscription = sessionExpireObservable.subscribe(() => flush('session_expire'));\n    const flushObservable = new Observable(() => () => {\n        pageMayExitSubscription.unsubscribe();\n        sessionExpireSubscription.unsubscribe();\n    });\n    let currentBytesCount = 0;\n    let currentMessagesCount = 0;\n    function flush(flushReason) {\n        if (currentMessagesCount === 0) {\n            return;\n        }\n        const messagesCount = currentMessagesCount;\n        const bytesCount = currentBytesCount;\n        currentMessagesCount = 0;\n        currentBytesCount = 0;\n        cancelDurationLimitTimeout();\n        flushObservable.notify({\n            reason: flushReason,\n            messagesCount,\n            bytesCount,\n        });\n    }\n    let durationLimitTimeoutId;\n    function scheduleDurationLimitTimeout() {\n        if (durationLimitTimeoutId === undefined) {\n            durationLimitTimeoutId = setTimeout(() => {\n                flush('duration_limit');\n            }, FLUSH_DURATION_LIMIT);\n        }\n    }\n    function cancelDurationLimitTimeout() {\n        clearTimeout(durationLimitTimeoutId);\n        durationLimitTimeoutId = undefined;\n    }\n    return {\n        flushObservable,\n        preparePageExitFlushObservable,\n        get messagesCount() {\n            return currentMessagesCount;\n        },\n        /**\n         * Notifies that a message will be added to a pool of pending messages waiting to be flushed.\n         *\n         * This function needs to be called synchronously, right before adding the message, so no flush\n         * event can happen after `notifyBeforeAddMessage` and before adding the message.\n         *\n         * @param estimatedMessageBytesCount - an estimation of the message bytes count once it is\n         * actually added.\n         */\n        notifyBeforeAddMessage(estimatedMessageBytesCount) {\n            if (currentBytesCount + estimatedMessageBytesCount >= RECOMMENDED_REQUEST_BYTES_LIMIT) {\n                flush(forcedFlushReason !== null && forcedFlushReason !== void 0 ? forcedFlushReason : 'bytes_limit');\n            }\n            // Consider the message to be added now rather than in `notifyAfterAddMessage`, because if no\n            // message was added yet and `notifyAfterAddMessage` is called asynchronously, we still want\n            // to notify when a flush is needed (for example on page exit).\n            currentMessagesCount += 1;\n            currentBytesCount += estimatedMessageBytesCount;\n            scheduleDurationLimitTimeout();\n        },\n        /**\n         * Notifies that a message *was* added to a pool of pending messages waiting to be flushed.\n         *\n         * This function can be called asynchronously after the message was added, but in this case it\n         * should not be called if a flush event occurred in between.\n         *\n         * @param messageBytesCountDiff - the difference between the estimated message bytes count and\n         * its actual bytes count once added to the pool.\n         */\n        notifyAfterAddMessage(messageBytesCountDiff = 0) {\n            currentBytesCount += messageBytesCountDiff;\n            if (currentMessagesCount >= MESSAGES_LIMIT) {\n                flush(forcedFlushReason !== null && forcedFlushReason !== void 0 ? forcedFlushReason : 'messages_limit');\n            }\n            else if (currentBytesCount >= RECOMMENDED_REQUEST_BYTES_LIMIT) {\n                flush(forcedFlushReason !== null && forcedFlushReason !== void 0 ? forcedFlushReason : 'bytes_limit');\n            }\n        },\n        /**\n         * Notifies that a message was removed from a pool of pending messages waiting to be flushed.\n         *\n         * This function needs to be called synchronously, right after removing the message, so no flush\n         * event can happen after removing the message and before `notifyAfterRemoveMessage`.\n         *\n         * @param messageBytesCount - the message bytes count that was added to the pool. Should\n         * correspond to the sum of bytes counts passed to `notifyBeforeAddMessage` and\n         * `notifyAfterAddMessage`.\n         */\n        notifyAfterRemoveMessage(messageBytesCount) {\n            currentBytesCount -= messageBytesCount;\n            currentMessagesCount -= 1;\n            if (currentMessagesCount === 0) {\n                cancelDurationLimitTimeout();\n            }\n        },\n    };\n}\n//# sourceMappingURL=flushController.js.map","import { setTimeout } from '../tools/timer';\nimport { clocksNow, ONE_MINUTE, ONE_SECOND } from '../tools/utils/timeUtils';\nimport { ONE_MEBI_BYTE, ONE_KIBI_BYTE } from '../tools/utils/byteUtils';\nimport { isServerError } from '../tools/utils/responseUtils';\nimport { ErrorSource } from '../domain/error/error.types';\nexport const MAX_ONGOING_BYTES_COUNT = 80 * ONE_KIBI_BYTE;\nexport const MAX_ONGOING_REQUESTS = 32;\nexport const MAX_QUEUE_BYTES_COUNT = 20 * ONE_MEBI_BYTE;\nexport const MAX_BACKOFF_TIME = ONE_MINUTE;\nexport const INITIAL_BACKOFF_TIME = ONE_SECOND;\nexport function sendWithRetryStrategy(payload, state, sendStrategy, trackType, reportError, requestObservable) {\n    if (state.transportStatus === 0 /* TransportStatus.UP */ &&\n        state.queuedPayloads.size() === 0 &&\n        state.bandwidthMonitor.canHandle(payload)) {\n        send(payload, state, sendStrategy, requestObservable, {\n            onSuccess: () => retryQueuedPayloads(0 /* RetryReason.AFTER_SUCCESS */, state, sendStrategy, trackType, reportError, requestObservable),\n            onFailure: () => {\n                if (!state.queuedPayloads.enqueue(payload)) {\n                    requestObservable.notify({ type: 'queue-full', bandwidth: state.bandwidthMonitor.stats(), payload });\n                }\n                scheduleRetry(state, sendStrategy, trackType, reportError, requestObservable);\n            },\n        });\n    }\n    else {\n        if (!state.queuedPayloads.enqueue(payload)) {\n            requestObservable.notify({ type: 'queue-full', bandwidth: state.bandwidthMonitor.stats(), payload });\n        }\n    }\n}\nfunction scheduleRetry(state, sendStrategy, trackType, reportError, requestObservable) {\n    if (state.transportStatus !== 2 /* TransportStatus.DOWN */) {\n        return;\n    }\n    setTimeout(() => {\n        const payload = state.queuedPayloads.first();\n        send(payload, state, sendStrategy, requestObservable, {\n            onSuccess: () => {\n                state.queuedPayloads.dequeue();\n                state.currentBackoffTime = INITIAL_BACKOFF_TIME;\n                retryQueuedPayloads(1 /* RetryReason.AFTER_RESUME */, state, sendStrategy, trackType, reportError, requestObservable);\n            },\n            onFailure: () => {\n                state.currentBackoffTime = Math.min(MAX_BACKOFF_TIME, state.currentBackoffTime * 2);\n                scheduleRetry(state, sendStrategy, trackType, reportError, requestObservable);\n            },\n        });\n    }, state.currentBackoffTime);\n}\nfunction send(payload, state, sendStrategy, requestObservable, { onSuccess, onFailure }) {\n    state.bandwidthMonitor.add(payload);\n    sendStrategy(payload, (response) => {\n        state.bandwidthMonitor.remove(payload);\n        if (!shouldRetryRequest(response)) {\n            state.transportStatus = 0 /* TransportStatus.UP */;\n            requestObservable.notify({ type: 'success', bandwidth: state.bandwidthMonitor.stats(), payload });\n            onSuccess();\n        }\n        else {\n            // do not consider transport down if another ongoing request could succeed\n            state.transportStatus =\n                state.bandwidthMonitor.ongoingRequestCount > 0 ? 1 /* TransportStatus.FAILURE_DETECTED */ : 2 /* TransportStatus.DOWN */;\n            payload.retry = {\n                count: payload.retry ? payload.retry.count + 1 : 1,\n                lastFailureStatus: response.status,\n            };\n            requestObservable.notify({ type: 'failure', bandwidth: state.bandwidthMonitor.stats(), payload });\n            onFailure();\n        }\n    });\n}\nfunction retryQueuedPayloads(reason, state, sendStrategy, trackType, reportError, requestObservable) {\n    if (reason === 0 /* RetryReason.AFTER_SUCCESS */ && state.queuedPayloads.isFull() && !state.queueFullReported) {\n        reportError({\n            message: `Reached max ${trackType} events size queued for upload: ${MAX_QUEUE_BYTES_COUNT / ONE_MEBI_BYTE}MiB`,\n            source: ErrorSource.AGENT,\n            startClocks: clocksNow(),\n        });\n        state.queueFullReported = true;\n    }\n    const previousQueue = state.queuedPayloads;\n    state.queuedPayloads = newPayloadQueue();\n    while (previousQueue.size() > 0) {\n        sendWithRetryStrategy(previousQueue.dequeue(), state, sendStrategy, trackType, reportError, requestObservable);\n    }\n}\nfunction shouldRetryRequest(response) {\n    return (response.type !== 'opaque' &&\n        ((response.status === 0 && !navigator.onLine) ||\n            response.status === 408 ||\n            response.status === 429 ||\n            isServerError(response.status)));\n}\nexport function newRetryState() {\n    return {\n        transportStatus: 0 /* TransportStatus.UP */,\n        currentBackoffTime: INITIAL_BACKOFF_TIME,\n        bandwidthMonitor: newBandwidthMonitor(),\n        queuedPayloads: newPayloadQueue(),\n        queueFullReported: false,\n    };\n}\nfunction newPayloadQueue() {\n    const queue = [];\n    return {\n        bytesCount: 0,\n        enqueue(payload) {\n            if (this.isFull()) {\n                return false;\n            }\n            queue.push(payload);\n            this.bytesCount += payload.bytesCount;\n            return true;\n        },\n        first() {\n            return queue[0];\n        },\n        dequeue() {\n            const payload = queue.shift();\n            if (payload) {\n                this.bytesCount -= payload.bytesCount;\n            }\n            return payload;\n        },\n        size() {\n            return queue.length;\n        },\n        isFull() {\n            return this.bytesCount >= MAX_QUEUE_BYTES_COUNT;\n        },\n    };\n}\nfunction newBandwidthMonitor() {\n    return {\n        ongoingRequestCount: 0,\n        ongoingByteCount: 0,\n        canHandle(payload) {\n            return (this.ongoingRequestCount === 0 ||\n                (this.ongoingByteCount + payload.bytesCount <= MAX_ONGOING_BYTES_COUNT &&\n                    this.ongoingRequestCount < MAX_ONGOING_REQUESTS));\n        },\n        add(payload) {\n            this.ongoingRequestCount += 1;\n            this.ongoingByteCount += payload.bytesCount;\n        },\n        remove(payload) {\n            this.ongoingRequestCount -= 1;\n            this.ongoingByteCount -= payload.bytesCount;\n        },\n        stats() {\n            return {\n                ongoingByteCount: this.ongoingByteCount,\n                ongoingRequestCount: this.ongoingRequestCount,\n            };\n        },\n    };\n}\n//# sourceMappingURL=sendWithRetryStrategy.js.map","import { fetch } from '../browser/fetch';\nimport { monitor, monitorError } from '../tools/monitor';\nimport { Observable } from '../tools/observable';\nimport { ONE_KIBI_BYTE } from '../tools/utils/byteUtils';\nimport { newRetryState, sendWithRetryStrategy } from './sendWithRetryStrategy';\n/**\n * beacon payload max queue size implementation is 64kb\n * ensure that we leave room for logs, rum and potential other users\n */\nexport const RECOMMENDED_REQUEST_BYTES_LIMIT = 16 * ONE_KIBI_BYTE;\nexport function createHttpRequest(endpointBuilders, reportError, bytesLimit = RECOMMENDED_REQUEST_BYTES_LIMIT) {\n    const observable = new Observable();\n    const retryState = newRetryState();\n    return {\n        observable,\n        send: (payload) => {\n            for (const endpointBuilder of endpointBuilders) {\n                sendWithRetryStrategy(payload, retryState, (payload, onResponse) => {\n                    fetchStrategy(endpointBuilder, payload, onResponse);\n                }, endpointBuilder.trackType, reportError, observable);\n            }\n        },\n        /**\n         * Since fetch keepalive behaves like regular fetch on Firefox,\n         * keep using sendBeaconStrategy on exit\n         */\n        sendOnExit: (payload) => {\n            for (const endpointBuilder of endpointBuilders) {\n                sendBeaconStrategy(endpointBuilder, bytesLimit, payload);\n            }\n        },\n    };\n}\nfunction sendBeaconStrategy(endpointBuilder, bytesLimit, payload) {\n    const canUseBeacon = !!navigator.sendBeacon && payload.bytesCount < bytesLimit;\n    if (canUseBeacon) {\n        try {\n            const beaconUrl = endpointBuilder.build('beacon', payload);\n            const isQueued = navigator.sendBeacon(beaconUrl, payload.data);\n            if (isQueued) {\n                return;\n            }\n        }\n        catch (e) {\n            reportBeaconError(e);\n        }\n    }\n    fetchStrategy(endpointBuilder, payload);\n}\nlet hasReportedBeaconError = false;\nfunction reportBeaconError(e) {\n    if (!hasReportedBeaconError) {\n        hasReportedBeaconError = true;\n        monitorError(e);\n    }\n}\nexport function fetchStrategy(endpointBuilder, payload, onResponse) {\n    const fetchUrl = endpointBuilder.build('fetch', payload);\n    fetch(fetchUrl, { method: 'POST', body: payload.data, mode: 'cors' })\n        .then(monitor((response) => onResponse === null || onResponse === void 0 ? void 0 : onResponse({ status: response.status, type: response.type })))\n        .catch(monitor(() => onResponse === null || onResponse === void 0 ? void 0 : onResponse({ status: 0 })));\n}\n//# sourceMappingURL=httpRequest.js.map","import { instrumentMethod } from '../../tools/instrumentMethod';\nimport { Observable } from '../../tools/observable';\nimport { clocksNow } from '../../tools/utils/timeUtils';\nimport { computeStackTraceFromOnErrorMessage } from '../../tools/stackTrace/computeStackTrace';\nimport { getGlobalObject } from '../../tools/globalObject';\nimport { computeRawError, isError } from './error';\nimport { ErrorSource } from './error.types';\nexport function trackRuntimeError() {\n    return new Observable((observer) => {\n        const handleRuntimeError = (originalError, stackTrace) => {\n            const rawError = computeRawError({\n                stackTrace,\n                originalError,\n                startClocks: clocksNow(),\n                nonErrorPrefix: \"Uncaught\" /* NonErrorPrefix.UNCAUGHT */,\n                source: ErrorSource.SOURCE,\n                handling: \"unhandled\" /* ErrorHandling.UNHANDLED */,\n            });\n            observer.notify(rawError);\n        };\n        const { stop: stopInstrumentingOnError } = instrumentOnError(handleRuntimeError);\n        const { stop: stopInstrumentingOnUnhandledRejection } = instrumentUnhandledRejection(handleRuntimeError);\n        return () => {\n            stopInstrumentingOnError();\n            stopInstrumentingOnUnhandledRejection();\n        };\n    });\n}\nexport function instrumentOnError(callback) {\n    return instrumentMethod(getGlobalObject(), 'onerror', ({ parameters: [messageObj, url, line, column, errorObj] }) => {\n        let stackTrace;\n        if (!isError(errorObj)) {\n            stackTrace = computeStackTraceFromOnErrorMessage(messageObj, url, line, column);\n        }\n        callback(errorObj !== null && errorObj !== void 0 ? errorObj : messageObj, stackTrace);\n    });\n}\nexport function instrumentUnhandledRejection(callback) {\n    return instrumentMethod(getGlobalObject(), 'onunhandledrejection', ({ parameters: [e] }) => {\n        callback(e.reason || 'Empty reason');\n    });\n}\n//# sourceMappingURL=trackRuntimeError.js.map","import { addTelemetryUsage } from '../telemetry';\nimport { monitor } from '../../tools/monitor';\nexport function defineContextMethod(getStrategy, contextName, methodName, usage) {\n    return monitor((...args) => {\n        if (usage) {\n            addTelemetryUsage({ feature: usage });\n        }\n        return getStrategy()[contextName][methodName](...args);\n    });\n}\nexport function bufferContextCalls(preStartContextManager, name, bufferApiCalls) {\n    preStartContextManager.changeObservable.subscribe(() => {\n        const context = preStartContextManager.getContext();\n        bufferApiCalls.add((startResult) => startResult[name].setContext(context));\n    });\n}\n//# sourceMappingURL=defineContextMethod.js.map","// Use a const instead of const enum to avoid inlining the enum values in the bundle and save bytes\nexport const CustomerContextKey = {\n    userContext: 'userContext',\n    globalContext: 'globalContext',\n    accountContext: 'accountContext',\n};\n// Use a const instead of const enum to avoid inlining the enum values in the bundle and save bytes\nexport const ContextManagerMethod = {\n    getContext: 'getContext',\n    setContext: 'setContext',\n    setContextProperty: 'setContextProperty',\n    removeContextProperty: 'removeContextProperty',\n    clearContext: 'clearContext',\n};\n//# sourceMappingURL=contextConstants.js.map","/**\n * UUID v4\n * from https://gist.github.com/jed/982883\n */\nexport function generateUUID(placeholder) {\n    return placeholder\n        ? // eslint-disable-next-line  no-bitwise\n            (parseInt(placeholder, 10) ^ ((Math.random() * 16) >> (parseInt(placeholder, 10) / 4))).toString(16)\n        : `${1e7}-${1e3}-${4e3}-${8e3}-${1e11}`.replace(/[018]/g, generateUUID);\n}\n// Assuming input string is following the HTTP Cookie format defined in\n// https://www.ietf.org/rfc/rfc2616.txt and https://www.ietf.org/rfc/rfc6265.txt, we don't need to\n// be too strict with this regex.\nconst COMMA_SEPARATED_KEY_VALUE = /(\\S+?)\\s*=\\s*(.+?)(?:;|$)/g;\n/**\n * Returns the value of the key with the given name\n * If there are multiple values with the same key, returns the first one\n */\nexport function findCommaSeparatedValue(rawString, name) {\n    COMMA_SEPARATED_KEY_VALUE.lastIndex = 0;\n    while (true) {\n        const match = COMMA_SEPARATED_KEY_VALUE.exec(rawString);\n        if (match) {\n            if (match[1] === name) {\n                return match[2];\n            }\n        }\n        else {\n            break;\n        }\n    }\n}\n/**\n * Returns a map of all the values with the given key\n * If there are multiple values with the same key, returns all the values\n */\nexport function findAllCommaSeparatedValues(rawString) {\n    const result = new Map();\n    COMMA_SEPARATED_KEY_VALUE.lastIndex = 0;\n    while (true) {\n        const match = COMMA_SEPARATED_KEY_VALUE.exec(rawString);\n        if (match) {\n            const key = match[1];\n            const value = match[2];\n            if (result.has(key)) {\n                result.get(key).push(value);\n            }\n            else {\n                result.set(key, [value]);\n            }\n        }\n        else {\n            break;\n        }\n    }\n    return result;\n}\n/**\n * Returns a map of the values with the given key\n * ⚠️ If there are multiple values with the same key, returns the LAST one\n *\n * @deprecated use `findAllCommaSeparatedValues()` instead\n */\nexport function findCommaSeparatedValues(rawString) {\n    const result = new Map();\n    COMMA_SEPARATED_KEY_VALUE.lastIndex = 0;\n    while (true) {\n        const match = COMMA_SEPARATED_KEY_VALUE.exec(rawString);\n        if (match) {\n            result.set(match[1], match[2]);\n        }\n        else {\n            break;\n        }\n    }\n    return result;\n}\nexport function safeTruncate(candidate, length, suffix = '') {\n    const lastChar = candidate.charCodeAt(length - 1);\n    const isLastCharSurrogatePair = lastChar >= 0xd800 && lastChar <= 0xdbff;\n    const correctedLength = isLastCharSurrogatePair ? length + 1 : length;\n    if (candidate.length <= correctedLength) {\n        return candidate;\n    }\n    return `${candidate.slice(0, correctedLength)}${suffix}`;\n}\n//# sourceMappingURL=stringUtils.js.map","import { display } from '../tools/display';\nexport function displayAlreadyInitializedError(sdkName, initConfiguration) {\n    if (!initConfiguration.silentMultipleInit) {\n        display.error(`${sdkName} is already initialized.`);\n    }\n}\n//# sourceMappingURL=displayAlreadyInitializedError.js.map","export const RumEventType = {\n    ACTION: 'action',\n    ERROR: 'error',\n    LONG_TASK: 'long_task',\n    VIEW: 'view',\n    RESOURCE: 'resource',\n    VITAL: 'vital',\n};\nexport const RumLongTaskEntryType = {\n    LONG_TASK: 'long-task',\n    LONG_ANIMATION_FRAME: 'long-animation-frame',\n};\nexport const ViewLoadingType = {\n    INITIAL_LOAD: 'initial_load',\n    ROUTE_CHANGE: 'route_change',\n    BF_CACHE: 'bf_cache',\n};\nexport const ActionType = {\n    CLICK: 'click',\n    CUSTOM: 'custom',\n    TAP: 'tap',\n    SCROLL: 'scroll',\n    SWIPE: 'swipe',\n    APPLICATION_START: 'application_start',\n    BACK: 'back',\n};\nexport const FrustrationType = {\n    RAGE_CLICK: 'rage_click',\n    ERROR_CLICK: 'error_click',\n    DEAD_CLICK: 'dead_click',\n};\nexport const VitalType = {\n    DURATION: 'duration',\n    OPERATION_STEP: 'operation_step',\n};\n//# sourceMappingURL=rawRumEvent.types.js.map","import { clocksNow, combine, elapsed, ExperimentalFeature, generateUUID, isExperimentalFeatureEnabled, sanitize, toServerDuration, } from '@datadog/browser-core';\nimport { RumEventType, VitalType } from '../../rawRumEvent.types';\nexport function createCustomVitalsState() {\n    const vitalsByName = new Map();\n    const vitalsByReference = new WeakMap();\n    return { vitalsByName, vitalsByReference };\n}\nexport function startVitalCollection(lifeCycle, pageStateHistory, customVitalsState) {\n    function isValid(vital) {\n        return !pageStateHistory.wasInPageStateDuringPeriod(\"frozen\" /* PageState.FROZEN */, vital.startClocks.relative, vital.duration);\n    }\n    function addDurationVital(vital) {\n        if (isValid(vital)) {\n            lifeCycle.notify(12 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, processVital(vital));\n        }\n    }\n    function addOperationStepVital(name, stepType, options, failureReason) {\n        if (!isExperimentalFeatureEnabled(ExperimentalFeature.FEATURE_OPERATION_VITAL)) {\n            return;\n        }\n        const { operationKey, context, description, handlingStack } = options || {};\n        const vital = {\n            name,\n            type: VitalType.OPERATION_STEP,\n            operationKey,\n            failureReason,\n            stepType,\n            startClocks: clocksNow(),\n            context: sanitize(context),\n            description,\n            handlingStack,\n        };\n        lifeCycle.notify(12 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, processVital(vital));\n    }\n    return {\n        addOperationStepVital,\n        addDurationVital,\n        startDurationVital: (name, options = {}) => {\n            const ref = startDurationVital(customVitalsState, name, options);\n            const vitalState = customVitalsState.vitalsByReference.get(ref);\n            if (vitalState) {\n                lifeCycle.notify(16 /* LifeCycleEventType.VITAL_STARTED */, vitalState);\n            }\n            return ref;\n        },\n        stopDurationVital: (nameOrRef, options = {}) => {\n            stopDurationVital(addDurationVital, customVitalsState, nameOrRef, options);\n        },\n    };\n}\nexport function startDurationVital({ vitalsByName, vitalsByReference }, name, options = {}) {\n    const vital = {\n        id: generateUUID(),\n        name,\n        startClocks: clocksNow(),\n        ...options,\n    };\n    // To avoid leaking implementation details of the vital, we return a reference to it.\n    const reference = { __dd_vital_reference: true };\n    vitalsByName.set(name, vital);\n    // To avoid memory leaks caused by the creation of numerous references (e.g., from improper useEffect implementations), we use a WeakMap.\n    vitalsByReference.set(reference, vital);\n    return reference;\n}\nexport function stopDurationVital(stopCallback, { vitalsByName, vitalsByReference }, nameOrRef, options = {}) {\n    const vitalStart = typeof nameOrRef === 'string' ? vitalsByName.get(nameOrRef) : vitalsByReference.get(nameOrRef);\n    if (!vitalStart) {\n        return;\n    }\n    stopCallback(buildDurationVital(vitalStart, vitalStart.startClocks, options, clocksNow()));\n    if (typeof nameOrRef === 'string') {\n        vitalsByName.delete(nameOrRef);\n    }\n    else {\n        vitalsByReference.delete(nameOrRef);\n    }\n}\nfunction buildDurationVital(vitalStart, startClocks, stopOptions, stopClocks) {\n    var _a;\n    return {\n        id: vitalStart.id,\n        name: vitalStart.name,\n        type: VitalType.DURATION,\n        startClocks,\n        duration: elapsed(startClocks.timeStamp, stopClocks.timeStamp),\n        context: combine(vitalStart.context, stopOptions.context),\n        description: (_a = stopOptions.description) !== null && _a !== void 0 ? _a : vitalStart.description,\n        handlingStack: vitalStart.handlingStack,\n    };\n}\nfunction processVital(vital) {\n    const { startClocks, type, name, description, context, handlingStack } = vital;\n    const vitalId = vital.type === VitalType.DURATION ? vital.id : undefined;\n    const vitalData = {\n        id: vitalId !== null && vitalId !== void 0 ? vitalId : generateUUID(),\n        type,\n        name,\n        description,\n        ...(type === VitalType.DURATION\n            ? { duration: toServerDuration(vital.duration) }\n            : {\n                step_type: vital.stepType,\n                operation_key: vital.operationKey,\n                failure_reason: vital.failureReason,\n            }),\n    };\n    return {\n        rawRumEvent: {\n            date: startClocks.timeStamp,\n            vital: vitalData,\n            type: RumEventType.VITAL,\n            context,\n        },\n        startClocks,\n        duration: type === VitalType.DURATION ? vital.duration : undefined,\n        domainContext: handlingStack ? { handlingStack } : {},\n    };\n}\n//# sourceMappingURL=vitalCollection.js.map","export function callPluginsMethod(plugins, methodName, parameter) {\n    if (!plugins) {\n        return;\n    }\n    for (const plugin of plugins) {\n        const method = plugin[methodName];\n        if (method) {\n            method(parameter);\n        }\n    }\n}\n//# sourceMappingURL=plugins.js.map","import { addEventListener } from '../../browser/addEventListener';\nimport { combine } from '../../tools/mergeInto';\nimport { isEmptyObject } from '../../tools/utils/objectUtils';\nconst CONTEXT_STORE_KEY_PREFIX = '_dd_c';\nconst storageListeners = [];\nexport function storeContextManager(configuration, contextManager, productKey, customerDataType) {\n    const storageKey = buildStorageKey(productKey, customerDataType);\n    storageListeners.push(addEventListener(configuration, window, \"storage\" /* DOM_EVENT.STORAGE */, ({ key }) => {\n        if (storageKey === key) {\n            synchronizeWithStorage();\n        }\n    }));\n    contextManager.changeObservable.subscribe(dumpToStorage);\n    const contextFromStorage = combine(getFromStorage(), contextManager.getContext());\n    if (!isEmptyObject(contextFromStorage)) {\n        contextManager.setContext(contextFromStorage);\n    }\n    function synchronizeWithStorage() {\n        contextManager.setContext(getFromStorage());\n    }\n    function dumpToStorage() {\n        localStorage.setItem(storageKey, JSON.stringify(contextManager.getContext()));\n    }\n    function getFromStorage() {\n        const rawContext = localStorage.getItem(storageKey);\n        return rawContext ? JSON.parse(rawContext) : {};\n    }\n}\nexport function buildStorageKey(productKey, customerDataType) {\n    return `${CONTEXT_STORE_KEY_PREFIX}_${productKey}_${customerDataType}`;\n}\nexport function removeStorageListeners() {\n    storageListeners.map((listener) => listener.stop());\n}\n//# sourceMappingURL=storeContextManager.js.map","import { deepClone } from '../../tools/mergeInto';\nimport { sanitize } from '../../tools/serialisation/sanitize';\nimport { Observable } from '../../tools/observable';\nimport { display } from '../../tools/display';\nimport { checkContext } from './contextUtils';\nfunction ensureProperties(context, propertiesConfig, name) {\n    const newContext = { ...context };\n    for (const [key, { required, type }] of Object.entries(propertiesConfig)) {\n        /**\n         * Ensure specified properties are strings as defined here:\n         * https://docs.datadoghq.com/logs/log_configuration/attributes_naming_convention/#user-related-attributes\n         */\n        if (type === 'string' && !isDefined(newContext[key])) {\n            /* eslint-disable @typescript-eslint/no-base-to-string */\n            newContext[key] = String(newContext[key]);\n        }\n        if (required && isDefined(newContext[key])) {\n            display.warn(`The property ${key} of ${name} is required; context will not be sent to the intake.`);\n        }\n    }\n    return newContext;\n}\nfunction isDefined(value) {\n    return value === undefined || value === null || value === '';\n}\nexport function createContextManager(name = '', { propertiesConfig = {}, } = {}) {\n    let context = {};\n    const changeObservable = new Observable();\n    const contextManager = {\n        getContext: () => deepClone(context),\n        setContext: (newContext) => {\n            if (checkContext(newContext)) {\n                context = sanitize(ensureProperties(newContext, propertiesConfig, name));\n            }\n            else {\n                contextManager.clearContext();\n            }\n            changeObservable.notify();\n        },\n        setContextProperty: (key, property) => {\n            context = sanitize(ensureProperties({ ...context, [key]: property }, propertiesConfig, name));\n            changeObservable.notify();\n        },\n        removeContextProperty: (key) => {\n            delete context[key];\n            ensureProperties(context, propertiesConfig, name);\n            changeObservable.notify();\n        },\n        clearContext: () => {\n            context = {};\n            changeObservable.notify();\n        },\n        changeObservable,\n    };\n    return contextManager;\n}\n//# sourceMappingURL=contextManager.js.map","import { display } from '../../tools/display';\nimport { getType } from '../../tools/utils/typeUtils';\n/**\n * Simple check to ensure an object is a valid context\n */\nexport function checkContext(maybeContext) {\n    const isValid = getType(maybeContext) === 'object';\n    if (!isValid) {\n        display.error('Unsupported context:', maybeContext);\n    }\n    return isValid;\n}\n//# sourceMappingURL=contextUtils.js.map","import { storeContextManager } from '../context/storeContextManager';\nimport { createContextManager } from '../context/contextManager';\nexport function startGlobalContext(hooks, configuration, productKey, useContextNamespace) {\n    const globalContextManager = buildGlobalContextManager();\n    if (configuration.storeContextsAcrossPages) {\n        storeContextManager(configuration, globalContextManager, productKey, 2 /* CustomerDataType.GlobalContext */);\n    }\n    hooks.register(0 /* HookNames.Assemble */, () => {\n        const context = globalContextManager.getContext();\n        return useContextNamespace ? { context } : context;\n    });\n    return globalContextManager;\n}\nexport function buildGlobalContextManager() {\n    return createContextManager('global context');\n}\n//# sourceMappingURL=globalContext.js.map","import { storeContextManager } from '../context/storeContextManager';\nimport { SKIPPED } from '../../tools/abstractHooks';\nimport { createContextManager } from '../context/contextManager';\nimport { isEmptyObject } from '../../tools/utils/objectUtils';\nexport function startUserContext(hooks, configuration, sessionManager, productKey) {\n    const userContextManager = buildUserContextManager();\n    if (configuration.storeContextsAcrossPages) {\n        storeContextManager(configuration, userContextManager, productKey, 1 /* CustomerDataType.User */);\n    }\n    hooks.register(0 /* HookNames.Assemble */, ({ eventType, startTime }) => {\n        const user = userContextManager.getContext();\n        const session = sessionManager.findTrackedSession(startTime);\n        if (session && session.anonymousId && !user.anonymous_id && !!configuration.trackAnonymousUser) {\n            user.anonymous_id = session.anonymousId;\n        }\n        if (isEmptyObject(user)) {\n            return SKIPPED;\n        }\n        return {\n            type: eventType,\n            usr: user,\n        };\n    });\n    hooks.register(1 /* HookNames.AssembleTelemetry */, ({ startTime }) => {\n        var _a;\n        return ({\n            anonymous_id: (_a = sessionManager.findTrackedSession(startTime)) === null || _a === void 0 ? void 0 : _a.anonymousId,\n        });\n    });\n    return userContextManager;\n}\nexport function buildUserContextManager() {\n    return createContextManager('user', {\n        propertiesConfig: {\n            id: { type: 'string' },\n            name: { type: 'string' },\n            email: { type: 'string' },\n        },\n    });\n}\n//# sourceMappingURL=userContext.js.map","import { storeContextManager } from '../context/storeContextManager';\nimport { SKIPPED } from '../../tools/abstractHooks';\nimport { isEmptyObject } from '../../tools/utils/objectUtils';\nimport { createContextManager } from '../context/contextManager';\nexport function startAccountContext(hooks, configuration, productKey) {\n    const accountContextManager = buildAccountContextManager();\n    if (configuration.storeContextsAcrossPages) {\n        storeContextManager(configuration, accountContextManager, productKey, 4 /* CustomerDataType.Account */);\n    }\n    hooks.register(0 /* HookNames.Assemble */, () => {\n        const account = accountContextManager.getContext();\n        if (isEmptyObject(account) || !account.id) {\n            return SKIPPED;\n        }\n        return {\n            account,\n        };\n    });\n    return accountContextManager;\n}\nexport function buildAccountContextManager() {\n    return createContextManager('account', {\n        propertiesConfig: {\n            id: { type: 'string', required: true },\n            name: { type: 'string' },\n        },\n    });\n}\n//# sourceMappingURL=accountContext.js.map","import { instrumentMethod } from '../tools/instrumentMethod';\nimport { monitorError } from '../tools/monitor';\nimport { Observable } from '../tools/observable';\nimport { clocksNow } from '../tools/utils/timeUtils';\nimport { normalizeUrl } from '../tools/utils/urlPolyfill';\nimport { globalObject } from '../tools/globalObject';\nimport { readBytesFromStream } from '../tools/readBytesFromStream';\nimport { tryToClone } from '../tools/utils/responseUtils';\nlet fetchObservable;\nconst responseBodyActionGetters = [];\nexport function initFetchObservable({ responseBodyAction } = {}) {\n    if (responseBodyAction) {\n        responseBodyActionGetters.push(responseBodyAction);\n    }\n    if (!fetchObservable) {\n        fetchObservable = createFetchObservable();\n    }\n    return fetchObservable;\n}\nexport function resetFetchObservable() {\n    fetchObservable = undefined;\n    responseBodyActionGetters.length = 0;\n}\nfunction createFetchObservable() {\n    return new Observable((observable) => {\n        // eslint-disable-next-line local-rules/disallow-zone-js-patched-values\n        if (!globalObject.fetch) {\n            return;\n        }\n        const { stop } = instrumentMethod(globalObject, 'fetch', (call) => beforeSend(call, observable), {\n            computeHandlingStack: true,\n        });\n        return stop;\n    });\n}\nfunction beforeSend({ parameters, onPostCall, handlingStack }, observable) {\n    var _a, _b;\n    const [input, init] = parameters;\n    let methodFromParams = init && init.method;\n    if (methodFromParams === undefined && input instanceof Request) {\n        methodFromParams = input.method;\n    }\n    const method = methodFromParams !== undefined ? String(methodFromParams).toUpperCase() : 'GET';\n    const url = input instanceof Request ? input.url : normalizeUrl(String(input));\n    const startClocks = clocksNow();\n    const context = {\n        state: 'start',\n        init,\n        input,\n        method,\n        startClocks,\n        url,\n        handlingStack,\n        isAbortedOnStart: (input instanceof Request && ((_a = input.signal) === null || _a === void 0 ? void 0 : _a.aborted)) || ((_b = init === null || init === void 0 ? void 0 : init.signal) === null || _b === void 0 ? void 0 : _b.aborted) || false,\n    };\n    observable.notify(context);\n    // Those properties can be changed by observable subscribers\n    parameters[0] = context.input;\n    parameters[1] = context.init;\n    onPostCall((responsePromise) => {\n        afterSend(observable, responsePromise, context).catch(monitorError);\n    });\n}\nasync function afterSend(observable, responsePromise, startContext) {\n    var _a, _b;\n    const context = startContext;\n    context.state = 'resolve';\n    let response;\n    try {\n        response = await responsePromise;\n    }\n    catch (error) {\n        context.status = 0;\n        context.isAborted =\n            ((_b = (_a = context.init) === null || _a === void 0 ? void 0 : _a.signal) === null || _b === void 0 ? void 0 : _b.aborted) || (error instanceof DOMException && error.code === DOMException.ABORT_ERR);\n        context.error = error;\n        observable.notify(context);\n        return;\n    }\n    context.response = response;\n    context.status = response.status;\n    context.responseType = response.type;\n    context.isAborted = false;\n    const responseBodyCondition = responseBodyActionGetters.reduce((action, getter) => Math.max(action, getter(context)), 0 /* ResponseBodyAction.IGNORE */);\n    if (responseBodyCondition !== 0 /* ResponseBodyAction.IGNORE */) {\n        const clonedResponse = tryToClone(response);\n        if (clonedResponse && clonedResponse.body) {\n            try {\n                const bytes = await readBytesFromStream(clonedResponse.body, {\n                    collectStreamBody: responseBodyCondition === 2 /* ResponseBodyAction.COLLECT */,\n                });\n                context.responseBody = bytes && new TextDecoder().decode(bytes);\n            }\n            catch (_c) {\n                // Ignore errors when reading the response body (e.g., stream aborted, network errors)\n                // This is not critical and should not be reported as an SDK error\n            }\n        }\n    }\n    observable.notify(context);\n}\n//# sourceMappingURL=fetchObservable.js.map","import { concatBuffers } from './utils/byteUtils';\nimport { noop } from './utils/functionUtils';\n/**\n * Read bytes from a ReadableStream until the end of the stream.\n * Returns the bytes if collectStreamBody is true, otherwise returns undefined.\n */\nexport async function readBytesFromStream(stream, options) {\n    const reader = stream.getReader();\n    const chunks = [];\n    while (true) {\n        const result = await reader.read();\n        if (result.done) {\n            break;\n        }\n        if (options.collectStreamBody) {\n            chunks.push(result.value);\n        }\n    }\n    reader.cancel().catch(\n    // we don't care if cancel fails, but we still need to catch the error to avoid reporting it\n    // as an unhandled rejection\n    noop);\n    return options.collectStreamBody ? concatBuffers(chunks) : undefined;\n}\n//# sourceMappingURL=readBytesFromStream.js.map","import { display } from '../tools/display';\nimport { ONE_MINUTE, ONE_SECOND } from '../tools/utils/timeUtils';\nimport { findAllCommaSeparatedValues, findCommaSeparatedValue, findCommaSeparatedValues, generateUUID, } from '../tools/utils/stringUtils';\nimport { buildUrl } from '../tools/utils/urlPolyfill';\nexport function setCookie(name, value, expireDelay = 0, options) {\n    const date = new Date();\n    date.setTime(date.getTime() + expireDelay);\n    const expires = `expires=${date.toUTCString()}`;\n    const sameSite = options && options.crossSite ? 'none' : 'strict';\n    const domain = options && options.domain ? `;domain=${options.domain}` : '';\n    const secure = options && options.secure ? ';secure' : '';\n    const partitioned = options && options.partitioned ? ';partitioned' : '';\n    document.cookie = `${name}=${value};${expires};path=/;samesite=${sameSite}${domain}${secure}${partitioned}`;\n}\n/**\n * Returns the value of the cookie with the given name\n * If there are multiple cookies with the same name, returns the first one\n */\nexport function getCookie(name) {\n    return findCommaSeparatedValue(document.cookie, name);\n}\n/**\n * Returns all the values of the cookies with the given name\n */\nexport function getCookies(name) {\n    return findAllCommaSeparatedValues(document.cookie).get(name) || [];\n}\nlet initCookieParsed;\n/**\n * Returns a cached value of the cookie. Use this during SDK initialization (and whenever possible)\n * to avoid accessing document.cookie multiple times.\n *\n * ⚠️ If there are multiple cookies with the same name, returns the LAST one (unlike `getCookie()`)\n */\nexport function getInitCookie(name) {\n    if (!initCookieParsed) {\n        initCookieParsed = findCommaSeparatedValues(document.cookie);\n    }\n    return initCookieParsed.get(name);\n}\nexport function resetInitCookies() {\n    initCookieParsed = undefined;\n}\nexport function deleteCookie(name, options) {\n    setCookie(name, '', 0, options);\n}\nexport function areCookiesAuthorized(options) {\n    if (document.cookie === undefined || document.cookie === null) {\n        return false;\n    }\n    try {\n        // Use a unique cookie name to avoid issues when the SDK is initialized multiple times during\n        // the test cookie lifetime\n        const testCookieName = `dd_cookie_test_${generateUUID()}`;\n        const testCookieValue = 'test';\n        setCookie(testCookieName, testCookieValue, ONE_MINUTE, options);\n        const isCookieCorrectlySet = getCookie(testCookieName) === testCookieValue;\n        deleteCookie(testCookieName, options);\n        return isCookieCorrectlySet;\n    }\n    catch (error) {\n        display.error(error);\n        return false;\n    }\n}\n/**\n * No API to retrieve it, number of levels for subdomain and suffix are unknown\n * strategy: find the minimal domain on which cookies are allowed to be set\n * https://web.dev/same-site-same-origin/#site\n */\nlet getCurrentSiteCache;\nexport function getCurrentSite(hostname = location.hostname, referrer = document.referrer) {\n    if (getCurrentSiteCache === undefined) {\n        const defaultHostName = getCookieDefaultHostName(hostname, referrer);\n        if (defaultHostName) {\n            // Use a unique cookie name to avoid issues when the SDK is initialized multiple times during\n            // the test cookie lifetime\n            const testCookieName = `dd_site_test_${generateUUID()}`;\n            const testCookieValue = 'test';\n            const domainLevels = defaultHostName.split('.');\n            let candidateDomain = domainLevels.pop();\n            while (domainLevels.length && !getCookie(testCookieName)) {\n                candidateDomain = `${domainLevels.pop()}.${candidateDomain}`;\n                setCookie(testCookieName, testCookieValue, ONE_SECOND, { domain: candidateDomain });\n            }\n            deleteCookie(testCookieName, { domain: candidateDomain });\n            getCurrentSiteCache = candidateDomain;\n        }\n    }\n    return getCurrentSiteCache;\n}\nfunction getCookieDefaultHostName(hostname, referrer) {\n    try {\n        return hostname || buildUrl(referrer).hostname;\n    }\n    catch (_a) {\n        // Ignore\n    }\n}\nexport function resetGetCurrentSite() {\n    getCurrentSiteCache = undefined;\n}\n//# sourceMappingURL=cookie.js.map","import { getInitCookie } from '../../browser/cookie';\nimport { globalObject, isWorkerEnvironment } from '../../tools/globalObject';\nimport { tryJsonParse } from '../../tools/utils/objectUtils';\nconst cookieNamePrefix = 'datadog-synthetics-';\nexport const SYNTHETICS_TEST_ID_COOKIE_NAME = `${cookieNamePrefix}public-id`;\nexport const SYNTHETICS_RESULT_ID_COOKIE_NAME = `${cookieNamePrefix}result-id`;\nexport const SYNTHETICS_INJECTS_RUM_COOKIE_NAME = `${cookieNamePrefix}injects-rum`;\nexport const SYNTHETICS_CONTEXT_COOKIE_NAME = `${cookieNamePrefix}rum-context`;\nexport function willSyntheticsInjectRum() {\n    if (isWorkerEnvironment) {\n        // We don't expect to run synthetics tests in a worker environment\n        return false;\n    }\n    return Boolean(globalObject._DATADOG_SYNTHETICS_INJECTS_RUM || getInitCookie(SYNTHETICS_INJECTS_RUM_COOKIE_NAME));\n}\nexport function getSyntheticsContext() {\n    const raw = getRawSyntheticsContext();\n    return isValidSyntheticsContext(raw) ? raw : undefined;\n}\nexport function isSyntheticsTest() {\n    return Boolean(getSyntheticsContext());\n}\nfunction getRawSyntheticsContext() {\n    const rawGlobal = globalObject._DATADOG_SYNTHETICS_RUM_CONTEXT;\n    if (rawGlobal) {\n        return rawGlobal;\n    }\n    const rawCookie = getInitCookie(SYNTHETICS_CONTEXT_COOKIE_NAME);\n    if (rawCookie) {\n        return tryJsonParse(decodeURIComponent(rawCookie));\n    }\n    return {\n        test_id: window._DATADOG_SYNTHETICS_PUBLIC_ID || getInitCookie(SYNTHETICS_TEST_ID_COOKIE_NAME),\n        result_id: window._DATADOG_SYNTHETICS_RESULT_ID || getInitCookie(SYNTHETICS_RESULT_ID_COOKIE_NAME),\n    };\n}\nfunction isValidSyntheticsContext(value) {\n    return (typeof value === 'object' &&\n        value !== null &&\n        typeof value.test_id === 'string' &&\n        typeof value.result_id === 'string');\n}\n//# sourceMappingURL=syntheticsWorkerValues.js.map","import { abstractHooks } from '@datadog/browser-core';\nexport const createHooks = (abstractHooks);\n//# sourceMappingURL=hooks.js.map","export const SESSION_ENTRY_REGEXP = /^([a-zA-Z]+)=([a-z0-9-]+)$/;\nexport const SESSION_ENTRY_SEPARATOR = '&';\nexport function isValidSessionString(sessionString) {\n    return (!!sessionString &&\n        (sessionString.indexOf(SESSION_ENTRY_SEPARATOR) !== -1 || SESSION_ENTRY_REGEXP.test(sessionString)));\n}\n//# sourceMappingURL=sessionStateValidation.js.map","import { isEmptyObject } from '../../tools/utils/objectUtils';\nimport { objectEntries } from '../../tools/utils/polyfills';\nimport { dateNow } from '../../tools/utils/timeUtils';\nimport { SESSION_EXPIRATION_DELAY, SESSION_TIME_OUT_DELAY } from './sessionConstants';\nimport { isValidSessionString, SESSION_ENTRY_REGEXP, SESSION_ENTRY_SEPARATOR } from './sessionStateValidation';\nexport const EXPIRED = '1';\nexport function getExpiredSessionState(previousSessionState, configuration) {\n    const expiredSessionState = {\n        isExpired: EXPIRED,\n    };\n    if (configuration.trackAnonymousUser && (previousSessionState === null || previousSessionState === void 0 ? void 0 : previousSessionState.anonymousId)) {\n        expiredSessionState.anonymousId = previousSessionState === null || previousSessionState === void 0 ? void 0 : previousSessionState.anonymousId;\n    }\n    return expiredSessionState;\n}\nexport function isSessionInNotStartedState(session) {\n    return isEmptyObject(session);\n}\nexport function isSessionStarted(session) {\n    return !isSessionInNotStartedState(session);\n}\nexport function isSessionInExpiredState(session) {\n    return session.isExpired !== undefined || !isActiveSession(session);\n}\n// An active session is a session in either `Tracked` or `NotTracked` state\nfunction isActiveSession(sessionState) {\n    // created and expire can be undefined for versions which was not storing them\n    // these checks could be removed when older versions will not be available/live anymore\n    return ((sessionState.created === undefined || dateNow() - Number(sessionState.created) < SESSION_TIME_OUT_DELAY) &&\n        (sessionState.expire === undefined || dateNow() < Number(sessionState.expire)));\n}\nexport function expandSessionState(session) {\n    session.expire = String(dateNow() + SESSION_EXPIRATION_DELAY);\n}\nexport function toSessionString(session) {\n    return (objectEntries(session)\n        // we use `aid` as a key for anonymousId\n        .map(([key, value]) => (key === 'anonymousId' ? `aid=${value}` : `${key}=${value}`))\n        .join(SESSION_ENTRY_SEPARATOR));\n}\nexport function toSessionState(sessionString) {\n    const session = {};\n    if (isValidSessionString(sessionString)) {\n        sessionString.split(SESSION_ENTRY_SEPARATOR).forEach((entry) => {\n            const matches = SESSION_ENTRY_REGEXP.exec(entry);\n            if (matches !== null) {\n                const [, key, value] = matches;\n                if (key === 'aid') {\n                    // we use `aid` as a key for anonymousId\n                    session.anonymousId = value;\n                }\n                else {\n                    session[key] = value;\n                }\n            }\n        });\n    }\n    return session;\n}\n//# sourceMappingURL=sessionState.js.map","import { isEmptyObject } from '../../../tools/utils/objectUtils';\nimport { isChromium } from '../../../tools/utils/browserDetection';\nimport { getCurrentSite, areCookiesAuthorized, getCookies, setCookie, getCookie } from '../../../browser/cookie';\nimport { tryOldCookiesMigration } from '../oldCookiesMigration';\nimport { SESSION_COOKIE_EXPIRATION_DELAY, SESSION_EXPIRATION_DELAY, SESSION_TIME_OUT_DELAY, SessionPersistence, } from '../sessionConstants';\nimport { toSessionString, toSessionState, getExpiredSessionState } from '../sessionState';\nimport { SESSION_STORE_KEY } from './sessionStoreStrategy';\nconst SESSION_COOKIE_VERSION = 0;\nexport function selectCookieStrategy(initConfiguration) {\n    const cookieOptions = buildCookieOptions(initConfiguration);\n    return cookieOptions && areCookiesAuthorized(cookieOptions)\n        ? { type: SessionPersistence.COOKIE, cookieOptions }\n        : undefined;\n}\nexport function initCookieStrategy(configuration, cookieOptions) {\n    const cookieStore = {\n        /**\n         * Lock strategy allows mitigating issues due to concurrent access to cookie.\n         * This issue concerns only chromium browsers and enabling this on firefox increases cookie write failures.\n         */\n        isLockEnabled: isChromium(),\n        persistSession: (sessionState) => storeSessionCookie(cookieOptions, configuration, sessionState, SESSION_EXPIRATION_DELAY),\n        retrieveSession: () => retrieveSessionCookie(cookieOptions, configuration),\n        expireSession: (sessionState) => storeSessionCookie(cookieOptions, configuration, getExpiredSessionState(sessionState, configuration), SESSION_TIME_OUT_DELAY),\n    };\n    tryOldCookiesMigration(cookieStore);\n    return cookieStore;\n}\nfunction storeSessionCookie(options, configuration, sessionState, defaultTimeout) {\n    let sessionStateString = toSessionString(sessionState);\n    if (configuration.betaEncodeCookieOptions) {\n        sessionStateString = toSessionString({\n            ...sessionState,\n            // deleting a cookie is writing a new cookie with an empty value\n            // we don't want to store the cookie options in this case otherwise the cookie will not be deleted\n            ...(!isEmptyObject(sessionState) ? { c: encodeCookieOptions(options) } : {}),\n        });\n    }\n    setCookie(SESSION_STORE_KEY, sessionStateString, configuration.trackAnonymousUser ? SESSION_COOKIE_EXPIRATION_DELAY : defaultTimeout, options);\n}\n/**\n * Retrieve the session state from the cookie that was set with the same cookie options\n * If there is no match, return the first cookie, because that's how `getCookie()` works\n */\nexport function retrieveSessionCookie(cookieOptions, configuration) {\n    if (configuration.betaEncodeCookieOptions) {\n        return retrieveSessionCookieFromEncodedCookie(cookieOptions);\n    }\n    const sessionString = getCookie(SESSION_STORE_KEY);\n    const sessionState = toSessionState(sessionString);\n    return sessionState;\n}\nexport function buildCookieOptions(initConfiguration) {\n    const cookieOptions = {};\n    cookieOptions.secure =\n        !!initConfiguration.useSecureSessionCookie || !!initConfiguration.usePartitionedCrossSiteSessionCookie;\n    cookieOptions.crossSite = !!initConfiguration.usePartitionedCrossSiteSessionCookie;\n    cookieOptions.partitioned = !!initConfiguration.usePartitionedCrossSiteSessionCookie;\n    if (initConfiguration.trackSessionAcrossSubdomains) {\n        const currentSite = getCurrentSite();\n        if (!currentSite) {\n            return;\n        }\n        cookieOptions.domain = currentSite;\n    }\n    return cookieOptions;\n}\nfunction encodeCookieOptions(cookieOptions) {\n    const domainCount = cookieOptions.domain ? cookieOptions.domain.split('.').length - 1 : 0;\n    /* eslint-disable no-bitwise */\n    let byte = 0;\n    byte |= SESSION_COOKIE_VERSION << 5; // Store version in upper 3 bits\n    byte |= domainCount << 1; // Store domain count in next 4 bits\n    byte |= cookieOptions.crossSite ? 1 : 0; // Store useCrossSiteScripting in next bit\n    /* eslint-enable no-bitwise */\n    return byte.toString(16); // Convert to hex string\n}\n/**\n * Retrieve the session state from the cookie that was set with the same cookie options.\n * If there is no match, fallback to the first cookie, (because that's how `getCookie()` works)\n * and this allows to keep the current session id when we release this feature.\n */\nfunction retrieveSessionCookieFromEncodedCookie(cookieOptions) {\n    const cookies = getCookies(SESSION_STORE_KEY);\n    const opts = encodeCookieOptions(cookieOptions);\n    let sessionState;\n    // reverse the cookies so that if there is no match, the cookie returned is the first one\n    for (const cookie of cookies.reverse()) {\n        sessionState = toSessionState(cookie);\n        if (sessionState.c === opts) {\n            break;\n        }\n    }\n    // remove the cookie options from the session state as this is not part of the session state\n    sessionState === null || sessionState === void 0 ? true : delete sessionState.c;\n    return sessionState !== null && sessionState !== void 0 ? sessionState : {};\n}\n//# sourceMappingURL=sessionInCookie.js.map","import { getInitCookie } from '../../browser/cookie';\nimport { SESSION_STORE_KEY } from './storeStrategies/sessionStoreStrategy';\nimport { expandSessionState, isSessionStarted } from './sessionState';\nexport const OLD_SESSION_COOKIE_NAME = '_dd';\nexport const OLD_RUM_COOKIE_NAME = '_dd_r';\nexport const OLD_LOGS_COOKIE_NAME = '_dd_l';\n// duplicate values to avoid dependency issues\nexport const RUM_SESSION_KEY = 'rum';\nexport const LOGS_SESSION_KEY = 'logs';\n/**\n * This migration should remain in the codebase as long as older versions are available/live\n * to allow older sdk versions to be upgraded to newer versions without compatibility issues.\n */\nexport function tryOldCookiesMigration(cookieStoreStrategy) {\n    const sessionString = getInitCookie(SESSION_STORE_KEY);\n    if (!sessionString) {\n        const oldSessionId = getInitCookie(OLD_SESSION_COOKIE_NAME);\n        const oldRumType = getInitCookie(OLD_RUM_COOKIE_NAME);\n        const oldLogsType = getInitCookie(OLD_LOGS_COOKIE_NAME);\n        const session = {};\n        if (oldSessionId) {\n            session.id = oldSessionId;\n        }\n        if (oldLogsType && /^[01]$/.test(oldLogsType)) {\n            session[LOGS_SESSION_KEY] = oldLogsType;\n        }\n        if (oldRumType && /^[012]$/.test(oldRumType)) {\n            session[RUM_SESSION_KEY] = oldRumType;\n        }\n        if (isSessionStarted(session)) {\n            expandSessionState(session);\n            cookieStoreStrategy.persistSession(session);\n        }\n    }\n}\n//# sourceMappingURL=oldCookiesMigration.js.map","import { generateUUID } from '../../../tools/utils/stringUtils';\nimport { SessionPersistence } from '../sessionConstants';\nimport { toSessionString, toSessionState, getExpiredSessionState } from '../sessionState';\nimport { SESSION_STORE_KEY } from './sessionStoreStrategy';\nconst LOCAL_STORAGE_TEST_KEY = '_dd_test_';\nexport function selectLocalStorageStrategy() {\n    try {\n        const id = generateUUID();\n        const testKey = `${LOCAL_STORAGE_TEST_KEY}${id}`;\n        localStorage.setItem(testKey, id);\n        const retrievedId = localStorage.getItem(testKey);\n        localStorage.removeItem(testKey);\n        return id === retrievedId ? { type: SessionPersistence.LOCAL_STORAGE } : undefined;\n    }\n    catch (_a) {\n        return undefined;\n    }\n}\nexport function initLocalStorageStrategy(configuration) {\n    return {\n        isLockEnabled: false,\n        persistSession: persistInLocalStorage,\n        retrieveSession: retrieveSessionFromLocalStorage,\n        expireSession: (sessionState) => expireSessionFromLocalStorage(sessionState, configuration),\n    };\n}\nfunction persistInLocalStorage(sessionState) {\n    localStorage.setItem(SESSION_STORE_KEY, toSessionString(sessionState));\n}\nexport function retrieveSessionFromLocalStorage() {\n    const sessionString = localStorage.getItem(SESSION_STORE_KEY);\n    return toSessionState(sessionString);\n}\nfunction expireSessionFromLocalStorage(previousSessionState, configuration) {\n    persistInLocalStorage(getExpiredSessionState(previousSessionState, configuration));\n}\n//# sourceMappingURL=sessionInLocalStorage.js.map","import { setTimeout } from '../../tools/timer';\nimport { generateUUID } from '../../tools/utils/stringUtils';\nimport { elapsed, ONE_SECOND, timeStampNow } from '../../tools/utils/timeUtils';\nimport { expandSessionState, isSessionInExpiredState } from './sessionState';\nexport const LOCK_RETRY_DELAY = 10;\nexport const LOCK_MAX_TRIES = 100;\n// Locks should be hold for a few milliseconds top, just the time it takes to read and write a\n// cookie. Using one second should be enough in most situations.\nexport const LOCK_EXPIRATION_DELAY = ONE_SECOND;\nconst LOCK_SEPARATOR = '--';\nconst bufferedOperations = [];\nlet ongoingOperations;\nexport function processSessionStoreOperations(operations, sessionStoreStrategy, numberOfRetries = 0) {\n    var _a;\n    const { isLockEnabled, persistSession, expireSession } = sessionStoreStrategy;\n    const persistWithLock = (session) => persistSession({ ...session, lock: currentLock });\n    const retrieveStore = () => {\n        const { lock, ...session } = sessionStoreStrategy.retrieveSession();\n        return {\n            session,\n            lock: lock && !isLockExpired(lock) ? lock : undefined,\n        };\n    };\n    if (!ongoingOperations) {\n        ongoingOperations = operations;\n    }\n    if (operations !== ongoingOperations) {\n        bufferedOperations.push(operations);\n        return;\n    }\n    if (isLockEnabled && numberOfRetries >= LOCK_MAX_TRIES) {\n        next(sessionStoreStrategy);\n        return;\n    }\n    let currentLock;\n    let currentStore = retrieveStore();\n    if (isLockEnabled) {\n        // if someone has lock, retry later\n        if (currentStore.lock) {\n            retryLater(operations, sessionStoreStrategy, numberOfRetries);\n            return;\n        }\n        // acquire lock\n        currentLock = createLock();\n        persistWithLock(currentStore.session);\n        // if lock is not acquired, retry later\n        currentStore = retrieveStore();\n        if (currentStore.lock !== currentLock) {\n            retryLater(operations, sessionStoreStrategy, numberOfRetries);\n            return;\n        }\n    }\n    let processedSession = operations.process(currentStore.session);\n    if (isLockEnabled) {\n        // if lock corrupted after process, retry later\n        currentStore = retrieveStore();\n        if (currentStore.lock !== currentLock) {\n            retryLater(operations, sessionStoreStrategy, numberOfRetries);\n            return;\n        }\n    }\n    if (processedSession) {\n        if (isSessionInExpiredState(processedSession)) {\n            expireSession(processedSession);\n        }\n        else {\n            expandSessionState(processedSession);\n            if (isLockEnabled) {\n                persistWithLock(processedSession);\n            }\n            else {\n                persistSession(processedSession);\n            }\n        }\n    }\n    if (isLockEnabled) {\n        // correctly handle lock around expiration would require to handle this case properly at several levels\n        // since we don't have evidence of lock issues around expiration, let's just not do the corruption check for it\n        if (!(processedSession && isSessionInExpiredState(processedSession))) {\n            // if lock corrupted after persist, retry later\n            currentStore = retrieveStore();\n            if (currentStore.lock !== currentLock) {\n                retryLater(operations, sessionStoreStrategy, numberOfRetries);\n                return;\n            }\n            persistSession(currentStore.session);\n            processedSession = currentStore.session;\n        }\n    }\n    // call after even if session is not persisted in order to perform operations on\n    // up-to-date session state value => the value could have been modified by another tab\n    (_a = operations.after) === null || _a === void 0 ? void 0 : _a.call(operations, processedSession || currentStore.session);\n    next(sessionStoreStrategy);\n}\nfunction retryLater(operations, sessionStore, currentNumberOfRetries) {\n    setTimeout(() => {\n        processSessionStoreOperations(operations, sessionStore, currentNumberOfRetries + 1);\n    }, LOCK_RETRY_DELAY);\n}\nfunction next(sessionStore) {\n    ongoingOperations = undefined;\n    const nextOperations = bufferedOperations.shift();\n    if (nextOperations) {\n        processSessionStoreOperations(nextOperations, sessionStore);\n    }\n}\nexport function createLock() {\n    return generateUUID() + LOCK_SEPARATOR + timeStampNow();\n}\nfunction isLockExpired(lock) {\n    const [, timeStamp] = lock.split(LOCK_SEPARATOR);\n    return !timeStamp || elapsed(Number(timeStamp), timeStampNow()) > LOCK_EXPIRATION_DELAY;\n}\n//# sourceMappingURL=sessionStoreOperations.js.map","import { getGlobalObject } from '../../../tools/globalObject';\nimport { SessionPersistence } from '../sessionConstants';\nimport { getExpiredSessionState } from '../sessionState';\nimport { shallowClone } from '../../../tools/utils/objectUtils';\n/**\n * Key used to store session state in the global object.\n * This allows RUM and Logs SDKs to share the same session when using memory storage.\n */\nexport const MEMORY_SESSION_STORE_KEY = '_DD_SESSION';\nexport function selectMemorySessionStoreStrategy() {\n    return { type: SessionPersistence.MEMORY };\n}\nexport function initMemorySessionStoreStrategy(configuration) {\n    return {\n        expireSession: (sessionState) => expireSessionFromMemory(sessionState, configuration),\n        isLockEnabled: false,\n        persistSession: persistInMemory,\n        retrieveSession: retrieveFromMemory,\n    };\n}\nfunction retrieveFromMemory() {\n    const globalObject = getGlobalObject();\n    if (!globalObject[MEMORY_SESSION_STORE_KEY]) {\n        globalObject[MEMORY_SESSION_STORE_KEY] = {};\n    }\n    return shallowClone(globalObject[MEMORY_SESSION_STORE_KEY]);\n}\nfunction persistInMemory(state) {\n    const globalObject = getGlobalObject();\n    globalObject[MEMORY_SESSION_STORE_KEY] = shallowClone(state);\n}\nfunction expireSessionFromMemory(previousSessionState, configuration) {\n    persistInMemory(getExpiredSessionState(previousSessionState, configuration));\n}\n//# sourceMappingURL=sessionInMemory.js.map","import { clearInterval, setInterval } from '../../tools/timer';\nimport { Observable } from '../../tools/observable';\nimport { ONE_SECOND, dateNow } from '../../tools/utils/timeUtils';\nimport { throttle } from '../../tools/utils/functionUtils';\nimport { generateUUID } from '../../tools/utils/stringUtils';\nimport { display } from '../../tools/display';\nimport { selectCookieStrategy, initCookieStrategy } from './storeStrategies/sessionInCookie';\nimport { getExpiredSessionState, isSessionInExpiredState, isSessionInNotStartedState, isSessionStarted, } from './sessionState';\nimport { initLocalStorageStrategy, selectLocalStorageStrategy } from './storeStrategies/sessionInLocalStorage';\nimport { processSessionStoreOperations } from './sessionStoreOperations';\nimport { SESSION_NOT_TRACKED, SessionPersistence } from './sessionConstants';\nimport { initMemorySessionStoreStrategy, selectMemorySessionStoreStrategy } from './storeStrategies/sessionInMemory';\n/**\n * Every second, the storage will be polled to check for any change that can occur\n * to the session state in another browser tab, or another window.\n * This value has been determined from our previous cookie-only implementation.\n */\nexport const STORAGE_POLL_DELAY = ONE_SECOND;\n/**\n * Selects the correct session store strategy type based on the configuration and storage\n * availability. When an array is provided, tries each persistence type in order until one\n * successfully initializes.\n */\nexport function selectSessionStoreStrategyType(initConfiguration) {\n    const { sessionPersistence } = initConfiguration;\n    const persistenceList = normalizePersistenceList(sessionPersistence, initConfiguration);\n    for (const persistence of persistenceList) {\n        const strategyType = selectStrategyForPersistence(persistence, initConfiguration);\n        if (strategyType !== undefined) {\n            return strategyType;\n        }\n    }\n    return undefined;\n}\nfunction normalizePersistenceList(sessionPersistence, initConfiguration) {\n    if (Array.isArray(sessionPersistence)) {\n        return sessionPersistence;\n    }\n    if (sessionPersistence !== undefined) {\n        return [sessionPersistence];\n    }\n    // Legacy default behavior: cookie first, with optional localStorage fallback\n    return initConfiguration.allowFallbackToLocalStorage\n        ? [SessionPersistence.COOKIE, SessionPersistence.LOCAL_STORAGE]\n        : [SessionPersistence.COOKIE];\n}\nfunction selectStrategyForPersistence(persistence, initConfiguration) {\n    switch (persistence) {\n        case SessionPersistence.COOKIE:\n            return selectCookieStrategy(initConfiguration);\n        case SessionPersistence.LOCAL_STORAGE:\n            return selectLocalStorageStrategy();\n        case SessionPersistence.MEMORY:\n            return selectMemorySessionStoreStrategy();\n        default:\n            display.error(`Invalid session persistence '${String(persistence)}'`);\n            return undefined;\n    }\n}\nexport function getSessionStoreStrategy(sessionStoreStrategyType, configuration) {\n    return sessionStoreStrategyType.type === SessionPersistence.COOKIE\n        ? initCookieStrategy(configuration, sessionStoreStrategyType.cookieOptions)\n        : sessionStoreStrategyType.type === SessionPersistence.LOCAL_STORAGE\n            ? initLocalStorageStrategy(configuration)\n            : initMemorySessionStoreStrategy(configuration);\n}\n/**\n * Different session concepts:\n * - tracked, the session has an id and is updated along the user navigation\n * - not tracked, the session does not have an id but it is updated along the user navigation\n * - inactive, no session in store or session expired, waiting for a renew session\n */\nexport function startSessionStore(sessionStoreStrategyType, configuration, productKey, computeTrackingType, sessionStoreStrategy = getSessionStoreStrategy(sessionStoreStrategyType, configuration)) {\n    const renewObservable = new Observable();\n    const expireObservable = new Observable();\n    const sessionStateUpdateObservable = new Observable();\n    const watchSessionTimeoutId = setInterval(watchSession, STORAGE_POLL_DELAY);\n    let sessionCache;\n    startSession();\n    const { throttled: throttledExpandOrRenewSession, cancel: cancelExpandOrRenewSession } = throttle(() => {\n        processSessionStoreOperations({\n            process: (sessionState) => {\n                if (isSessionInNotStartedState(sessionState)) {\n                    return;\n                }\n                const synchronizedSession = synchronizeSession(sessionState);\n                expandOrRenewSessionState(synchronizedSession);\n                return synchronizedSession;\n            },\n            after: (sessionState) => {\n                if (isSessionStarted(sessionState) && !hasSessionInCache()) {\n                    renewSessionInCache(sessionState);\n                }\n                sessionCache = sessionState;\n            },\n        }, sessionStoreStrategy);\n    }, STORAGE_POLL_DELAY);\n    function expandSession() {\n        processSessionStoreOperations({\n            process: (sessionState) => (hasSessionInCache() ? synchronizeSession(sessionState) : undefined),\n        }, sessionStoreStrategy);\n    }\n    /**\n     * allows two behaviors:\n     * - if the session is active, synchronize the session cache without updating the session store\n     * - if the session is not active, clear the session store and expire the session cache\n     */\n    function watchSession() {\n        const sessionState = sessionStoreStrategy.retrieveSession();\n        if (isSessionInExpiredState(sessionState)) {\n            processSessionStoreOperations({\n                process: (sessionState) => isSessionInExpiredState(sessionState) ? getExpiredSessionState(sessionState, configuration) : undefined,\n                after: synchronizeSession,\n            }, sessionStoreStrategy);\n        }\n        else {\n            synchronizeSession(sessionState);\n        }\n    }\n    function synchronizeSession(sessionState) {\n        if (isSessionInExpiredState(sessionState)) {\n            sessionState = getExpiredSessionState(sessionState, configuration);\n        }\n        if (hasSessionInCache()) {\n            if (isSessionInCacheOutdated(sessionState)) {\n                expireSessionInCache();\n            }\n            else {\n                sessionStateUpdateObservable.notify({ previousState: sessionCache, newState: sessionState });\n                sessionCache = sessionState;\n            }\n        }\n        return sessionState;\n    }\n    function startSession() {\n        processSessionStoreOperations({\n            process: (sessionState) => {\n                if (isSessionInNotStartedState(sessionState)) {\n                    sessionState.anonymousId = generateUUID();\n                    return getExpiredSessionState(sessionState, configuration);\n                }\n            },\n            after: (sessionState) => {\n                sessionCache = sessionState;\n            },\n        }, sessionStoreStrategy);\n    }\n    function expandOrRenewSessionState(sessionState) {\n        if (isSessionInNotStartedState(sessionState)) {\n            return false;\n        }\n        const trackingType = computeTrackingType(sessionState[productKey]);\n        sessionState[productKey] = trackingType;\n        delete sessionState.isExpired;\n        if (trackingType !== SESSION_NOT_TRACKED && !sessionState.id) {\n            sessionState.id = generateUUID();\n            sessionState.created = String(dateNow());\n        }\n        if (configuration.trackAnonymousUser && !sessionState.anonymousId) {\n            sessionState.anonymousId = generateUUID();\n        }\n    }\n    function hasSessionInCache() {\n        return (sessionCache === null || sessionCache === void 0 ? void 0 : sessionCache[productKey]) !== undefined;\n    }\n    function isSessionInCacheOutdated(sessionState) {\n        return sessionCache.id !== sessionState.id || sessionCache[productKey] !== sessionState[productKey];\n    }\n    function expireSessionInCache() {\n        sessionCache = getExpiredSessionState(sessionCache, configuration);\n        expireObservable.notify();\n    }\n    function renewSessionInCache(sessionState) {\n        sessionCache = sessionState;\n        renewObservable.notify();\n    }\n    function updateSessionState(partialSessionState) {\n        processSessionStoreOperations({\n            process: (sessionState) => ({ ...sessionState, ...partialSessionState }),\n            after: synchronizeSession,\n        }, sessionStoreStrategy);\n    }\n    return {\n        expandOrRenewSession: throttledExpandOrRenewSession,\n        expandSession,\n        getSession: () => sessionCache,\n        renewObservable,\n        expireObservable,\n        sessionStateUpdateObservable,\n        restartSession: startSession,\n        expire: (hasConsent) => {\n            cancelExpandOrRenewSession();\n            if (hasConsent === false && sessionCache) {\n                delete sessionCache.anonymousId;\n            }\n            sessionStoreStrategy.expireSession(sessionCache);\n            synchronizeSession(getExpiredSessionState(sessionCache, configuration));\n        },\n        stop: () => {\n            clearInterval(watchSessionTimeoutId);\n        },\n        updateSessionState,\n    };\n}\n//# sourceMappingURL=sessionStore.js.map","import { display } from './display';\nimport { getType } from './utils/typeUtils';\nexport function isMatchOption(item) {\n    const itemType = getType(item);\n    return itemType === 'string' || itemType === 'function' || item instanceof RegExp;\n}\n/**\n * Returns true if value can be matched by at least one of the provided MatchOptions.\n * When comparing strings, setting useStartsWith to true will compare the value with the start of\n * the option, instead of requiring an exact match.\n */\nexport function matchList(list, value, useStartsWith = false) {\n    return list.some((item) => {\n        try {\n            if (typeof item === 'function') {\n                return item(value);\n            }\n            else if (item instanceof RegExp) {\n                // Prevent stateful matching\n                item.lastIndex = 0;\n                return item.test(value);\n            }\n            else if (typeof item === 'string') {\n                return useStartsWith ? value.startsWith(item) : item === value;\n            }\n        }\n        catch (e) {\n            display.error(e);\n        }\n        return false;\n    });\n}\n//# sourceMappingURL=matchOption.js.map","export const EXTENSION_PREFIXES = ['chrome-extension://', 'moz-extension://'];\nexport function containsExtensionUrl(str) {\n    return EXTENSION_PREFIXES.some((prefix) => str.includes(prefix));\n}\n/**\n * Utility function to detect if the SDK is being initialized in an unsupported browser extension environment.\n *\n * @param windowLocation - The current window location to check\n * @param stack - The error stack to check for extension URLs\n * @returns true if running in an unsupported browser extension environment\n */\nexport function isUnsupportedExtensionEnvironment(windowLocation, stack = '') {\n    // If the page itself is an extension page.\n    if (containsExtensionUrl(windowLocation)) {\n        return false;\n    }\n    // Since we generate the error on the init, we check the 2nd frame line.\n    const frameLines = stack.split('\\n').filter((line) => {\n        const trimmedLine = line.trim();\n        return trimmedLine.length && /^at\\s+|@/.test(trimmedLine);\n    });\n    const target = frameLines[1] || '';\n    return containsExtensionUrl(target);\n}\n//# sourceMappingURL=extensionUtils.js.map","import { display } from '../tools/display';\nimport { getGlobalObject } from '../tools/globalObject';\nimport { matchList } from '../tools/matchOption';\nimport { mockable } from '../tools/mockable';\nimport { isUnsupportedExtensionEnvironment } from './extension/extensionUtils';\nexport const ERROR_DOES_NOT_HAVE_ALLOWED_TRACKING_ORIGIN = 'Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided.';\nexport const ERROR_NOT_ALLOWED_TRACKING_ORIGIN = 'SDK initialized on a non-allowed domain.';\nexport function isAllowedTrackingOrigins(configuration, errorStack) {\n    const location = mockable(getGlobalObject().location);\n    const windowOrigin = location ? location.origin : '';\n    const allowedTrackingOrigins = configuration.allowedTrackingOrigins;\n    if (!allowedTrackingOrigins) {\n        if (isUnsupportedExtensionEnvironment(windowOrigin, errorStack)) {\n            display.error(ERROR_DOES_NOT_HAVE_ALLOWED_TRACKING_ORIGIN);\n            return false;\n        }\n        return true;\n    }\n    const isAllowed = matchList(allowedTrackingOrigins, windowOrigin);\n    if (!isAllowed) {\n        display.error(ERROR_NOT_ALLOWED_TRACKING_ORIGIN);\n    }\n    return isAllowed;\n}\n//# sourceMappingURL=allowedTrackingOrigins.js.map","import { timeStampNow } from '../../tools/utils/timeUtils';\nimport { normalizeUrl } from '../../tools/utils/urlPolyfill';\nimport { generateUUID } from '../../tools/utils/stringUtils';\nimport { INTAKE_SITE_FED_STAGING, INTAKE_SITE_US1, PCI_INTAKE_HOST_US1 } from '../intakeSites';\nexport function createEndpointBuilder(initConfiguration, trackType, extraParameters) {\n    const buildUrlWithParameters = createEndpointUrlWithParametersBuilder(initConfiguration, trackType);\n    return {\n        build(api, payload) {\n            const parameters = buildEndpointParameters(initConfiguration, trackType, api, payload, extraParameters);\n            return buildUrlWithParameters(parameters);\n        },\n        trackType,\n    };\n}\n/**\n * Create a function used to build a full endpoint url from provided parameters. The goal of this\n * function is to pre-compute some parts of the URL to avoid re-computing everything on every\n * request, as only parameters are changing.\n */\nfunction createEndpointUrlWithParametersBuilder(initConfiguration, trackType) {\n    const path = `/api/v2/${trackType}`;\n    const proxy = initConfiguration.proxy;\n    if (typeof proxy === 'string') {\n        const normalizedProxyUrl = normalizeUrl(proxy);\n        return (parameters) => `${normalizedProxyUrl}?ddforward=${encodeURIComponent(`${path}?${parameters}`)}`;\n    }\n    if (typeof proxy === 'function') {\n        return (parameters) => proxy({ path, parameters });\n    }\n    const host = buildEndpointHost(trackType, initConfiguration);\n    return (parameters) => `https://${host}${path}?${parameters}`;\n}\nexport function buildEndpointHost(trackType, initConfiguration) {\n    const { site = INTAKE_SITE_US1, internalAnalyticsSubdomain } = initConfiguration;\n    if (trackType === 'logs' && initConfiguration.usePciIntake && site === INTAKE_SITE_US1) {\n        return PCI_INTAKE_HOST_US1;\n    }\n    if (internalAnalyticsSubdomain && site === INTAKE_SITE_US1) {\n        return `${internalAnalyticsSubdomain}.${INTAKE_SITE_US1}`;\n    }\n    if (site === INTAKE_SITE_FED_STAGING) {\n        return `http-intake.logs.${site}`;\n    }\n    const domainParts = site.split('.');\n    const extension = domainParts.pop();\n    return `browser-intake-${domainParts.join('-')}.${extension}`;\n}\n/**\n * Build parameters to be used for an intake request. Parameters should be re-built for each\n * request, as they change randomly.\n */\nfunction buildEndpointParameters({ clientToken, internalAnalyticsSubdomain, source = 'browser' }, trackType, api, { retry, encoding }, extraParameters = []) {\n    const parameters = [\n        `ddsource=${source}`,\n        `dd-api-key=${clientToken}`,\n        `dd-evp-origin-version=${encodeURIComponent(\"6.33.0\")}`,\n        'dd-evp-origin=browser',\n        `dd-request-id=${generateUUID()}`,\n    ].concat(extraParameters);\n    if (encoding) {\n        parameters.push(`dd-evp-encoding=${encoding}`);\n    }\n    if (trackType === 'rum') {\n        parameters.push(`batch_time=${timeStampNow()}`, `_dd.api=${api}`);\n        if (retry) {\n            parameters.push(`_dd.retry_count=${retry.count}`, `_dd.retry_after=${retry.lastFailureStatus}`);\n        }\n    }\n    if (internalAnalyticsSubdomain) {\n        parameters.reverse();\n    }\n    return parameters.join('&');\n}\n//# sourceMappingURL=endpointBuilder.js.map","import { INTAKE_SITE_US1, INTAKE_URL_PARAMETERS } from '../intakeSites';\nimport { createEndpointBuilder } from './endpointBuilder';\nexport function computeTransportConfiguration(initConfiguration) {\n    const site = initConfiguration.site || INTAKE_SITE_US1;\n    const source = validateSource(initConfiguration.source);\n    const endpointBuilders = computeEndpointBuilders({ ...initConfiguration, site, source });\n    const replicaConfiguration = computeReplicaConfiguration({ ...initConfiguration, site, source });\n    return {\n        replica: replicaConfiguration,\n        site,\n        source,\n        ...endpointBuilders,\n    };\n}\nfunction validateSource(source) {\n    if (source === 'flutter' || source === 'unity') {\n        return source;\n    }\n    return 'browser';\n}\nfunction computeEndpointBuilders(initConfiguration) {\n    return {\n        logsEndpointBuilder: createEndpointBuilder(initConfiguration, 'logs'),\n        rumEndpointBuilder: createEndpointBuilder(initConfiguration, 'rum'),\n        profilingEndpointBuilder: createEndpointBuilder(initConfiguration, 'profile'),\n        sessionReplayEndpointBuilder: createEndpointBuilder(initConfiguration, 'replay'),\n        exposuresEndpointBuilder: createEndpointBuilder(initConfiguration, 'exposures'),\n        flagEvaluationEndpointBuilder: createEndpointBuilder(initConfiguration, 'flagevaluation'),\n    };\n}\nfunction computeReplicaConfiguration(initConfiguration) {\n    if (!initConfiguration.replica) {\n        return;\n    }\n    const replicaConfiguration = {\n        ...initConfiguration,\n        site: INTAKE_SITE_US1,\n        clientToken: initConfiguration.replica.clientToken,\n    };\n    return {\n        logsEndpointBuilder: createEndpointBuilder(replicaConfiguration, 'logs'),\n        rumEndpointBuilder: createEndpointBuilder(replicaConfiguration, 'rum', [\n            `application.id=${initConfiguration.replica.applicationId}`,\n        ]),\n    };\n}\nexport function isIntakeUrl(url) {\n    // check if tags is present in the query string\n    return INTAKE_URL_PARAMETERS.every((param) => url.includes(param));\n}\n//# sourceMappingURL=transportConfiguration.js.map","import { catchUserErrors } from '../../tools/catchUserErrors';\nimport { DOCS_ORIGIN, MORE_DETAILS, display } from '../../tools/display';\nimport { isPercentage } from '../../tools/utils/numberUtils';\nimport { objectHasValue } from '../../tools/utils/objectUtils';\nimport { selectSessionStoreStrategyType } from '../session/sessionStore';\nimport { TrackingConsent } from '../trackingConsent';\nimport { isAllowedTrackingOrigins } from '../allowedTrackingOrigins';\nimport { isWorkerEnvironment } from '../../tools/globalObject';\nimport { computeTransportConfiguration } from './transportConfiguration';\n/**\n * Default privacy level for the browser SDK.\n *\n * [Replay Privacy Options](https://docs.datadoghq.com/real_user_monitoring/session_replay/browser/privacy_options) for further information.\n */\nexport const DefaultPrivacyLevel = {\n    ALLOW: 'allow',\n    MASK: 'mask',\n    MASK_USER_INPUT: 'mask-user-input',\n    MASK_UNLESS_ALLOWLISTED: 'mask-unless-allowlisted',\n};\n/**\n * Trace context injection option.\n *\n * See [Connect RUM and Traces](https://docs.datadoghq.com/real_user_monitoring/platform/connect_rum_and_traces/?tab=browserrum) for further information.\n */\nexport const TraceContextInjection = {\n    ALL: 'all',\n    SAMPLED: 'sampled',\n};\nfunction isString(tag, tagName) {\n    if (tag !== undefined && tag !== null && typeof tag !== 'string') {\n        display.error(`${tagName} must be defined as a string`);\n        return false;\n    }\n    return true;\n}\nfunction isDatadogSite(site) {\n    if (site && typeof site === 'string' && !/(datadog|ddog|datad0g|dd0g)/.test(site)) {\n        display.error(`Site should be a valid Datadog site. ${MORE_DETAILS} ${DOCS_ORIGIN}/getting_started/site/.`);\n        return false;\n    }\n    return true;\n}\nexport function isSampleRate(sampleRate, name) {\n    if (sampleRate !== undefined && !isPercentage(sampleRate)) {\n        display.error(`${name} Sample Rate should be a number between 0 and 100`);\n        return false;\n    }\n    return true;\n}\nexport function validateAndBuildConfiguration(initConfiguration, errorStack) {\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n    if (!initConfiguration || !initConfiguration.clientToken) {\n        display.error('Client Token is not configured, we will not send any data.');\n        return;\n    }\n    if (initConfiguration.allowedTrackingOrigins !== undefined &&\n        !Array.isArray(initConfiguration.allowedTrackingOrigins)) {\n        display.error('Allowed Tracking Origins must be an array');\n        return;\n    }\n    if (!isDatadogSite(initConfiguration.site) ||\n        !isSampleRate(initConfiguration.sessionSampleRate, 'Session') ||\n        !isSampleRate(initConfiguration.telemetrySampleRate, 'Telemetry') ||\n        !isSampleRate(initConfiguration.telemetryConfigurationSampleRate, 'Telemetry Configuration') ||\n        !isSampleRate(initConfiguration.telemetryUsageSampleRate, 'Telemetry Usage') ||\n        !isString(initConfiguration.version, 'Version') ||\n        !isString(initConfiguration.env, 'Env') ||\n        !isString(initConfiguration.service, 'Service') ||\n        !isAllowedTrackingOrigins(initConfiguration, errorStack !== null && errorStack !== void 0 ? errorStack : '')) {\n        return;\n    }\n    if (initConfiguration.trackingConsent !== undefined &&\n        !objectHasValue(TrackingConsent, initConfiguration.trackingConsent)) {\n        display.error('Tracking Consent should be either \"granted\" or \"not-granted\"');\n        return;\n    }\n    return {\n        beforeSend: initConfiguration.beforeSend && catchUserErrors(initConfiguration.beforeSend, 'beforeSend threw an error:'),\n        sessionStoreStrategyType: isWorkerEnvironment ? undefined : selectSessionStoreStrategyType(initConfiguration),\n        sessionSampleRate: (_a = initConfiguration.sessionSampleRate) !== null && _a !== void 0 ? _a : 100,\n        telemetrySampleRate: (_b = initConfiguration.telemetrySampleRate) !== null && _b !== void 0 ? _b : 20,\n        telemetryConfigurationSampleRate: (_c = initConfiguration.telemetryConfigurationSampleRate) !== null && _c !== void 0 ? _c : 5,\n        telemetryUsageSampleRate: (_d = initConfiguration.telemetryUsageSampleRate) !== null && _d !== void 0 ? _d : 5,\n        service: (_e = initConfiguration.service) !== null && _e !== void 0 ? _e : undefined,\n        env: (_f = initConfiguration.env) !== null && _f !== void 0 ? _f : undefined,\n        version: (_g = initConfiguration.version) !== null && _g !== void 0 ? _g : undefined,\n        datacenter: (_h = initConfiguration.datacenter) !== null && _h !== void 0 ? _h : undefined,\n        silentMultipleInit: !!initConfiguration.silentMultipleInit,\n        allowUntrustedEvents: !!initConfiguration.allowUntrustedEvents,\n        trackingConsent: (_j = initConfiguration.trackingConsent) !== null && _j !== void 0 ? _j : TrackingConsent.GRANTED,\n        trackAnonymousUser: (_k = initConfiguration.trackAnonymousUser) !== null && _k !== void 0 ? _k : true,\n        storeContextsAcrossPages: !!initConfiguration.storeContextsAcrossPages,\n        betaEncodeCookieOptions: !!initConfiguration.betaEncodeCookieOptions,\n        /**\n         * The source of the SDK, used for support plugins purposes.\n         */\n        variant: initConfiguration.variant,\n        sdkVersion: initConfiguration.sdkVersion,\n        ...computeTransportConfiguration(initConfiguration),\n    };\n}\nexport function serializeConfiguration(initConfiguration) {\n    return {\n        session_sample_rate: initConfiguration.sessionSampleRate,\n        telemetry_sample_rate: initConfiguration.telemetrySampleRate,\n        telemetry_configuration_sample_rate: initConfiguration.telemetryConfigurationSampleRate,\n        telemetry_usage_sample_rate: initConfiguration.telemetryUsageSampleRate,\n        use_before_send: !!initConfiguration.beforeSend,\n        use_partitioned_cross_site_session_cookie: initConfiguration.usePartitionedCrossSiteSessionCookie,\n        use_secure_session_cookie: initConfiguration.useSecureSessionCookie,\n        use_proxy: !!initConfiguration.proxy,\n        silent_multiple_init: initConfiguration.silentMultipleInit,\n        track_session_across_subdomains: initConfiguration.trackSessionAcrossSubdomains,\n        track_anonymous_user: initConfiguration.trackAnonymousUser,\n        session_persistence: Array.isArray(initConfiguration.sessionPersistence)\n            ? initConfiguration.sessionPersistence[0]\n            : initConfiguration.sessionPersistence,\n        allow_fallback_to_local_storage: !!initConfiguration.allowFallbackToLocalStorage,\n        store_contexts_across_pages: !!initConfiguration.storeContextsAcrossPages,\n        allow_untrusted_events: !!initConfiguration.allowUntrustedEvents,\n        tracking_consent: initConfiguration.trackingConsent,\n        use_allowed_tracking_origins: Array.isArray(initConfiguration.allowedTrackingOrigins),\n        beta_encode_cookie_options: initConfiguration.betaEncodeCookieOptions,\n        source: initConfiguration.source,\n        sdk_version: initConfiguration.sdkVersion,\n        variant: initConfiguration.variant,\n    };\n}\n//# sourceMappingURL=configuration.js.map","import { isMatchOption, serializeConfiguration, DefaultPrivacyLevel, TraceContextInjection, display, objectHasValue, validateAndBuildConfiguration, isSampleRate, isNumber, isNonEmptyArray, isIndexableObject, } from '@datadog/browser-core';\nexport const DEFAULT_PROPAGATOR_TYPES = ['tracecontext', 'datadog'];\nexport const DEFAULT_TRACKED_RESOURCE_HEADERS = [\n    'cache-control',\n    'etag',\n    'age',\n    'expires',\n    'content-type',\n    'content-encoding',\n    'vary',\n    'content-length',\n    'server-timing',\n    'x-cache',\n];\nexport function validateAndBuildRumConfiguration(initConfiguration, errorStack) {\n    var _a, _b, _c, _d, _e, _f, _g;\n    if (initConfiguration.trackFeatureFlagsForEvents !== undefined &&\n        !Array.isArray(initConfiguration.trackFeatureFlagsForEvents)) {\n        display.warn('trackFeatureFlagsForEvents should be an array');\n    }\n    if (!initConfiguration.applicationId) {\n        display.error('Application ID is not configured, no RUM data will be collected.');\n        return;\n    }\n    if (!isSampleRate(initConfiguration.sessionReplaySampleRate, 'Session Replay') ||\n        !isSampleRate(initConfiguration.traceSampleRate, 'Trace')) {\n        return;\n    }\n    if (initConfiguration.excludedActivityUrls !== undefined && !Array.isArray(initConfiguration.excludedActivityUrls)) {\n        display.error('Excluded Activity Urls should be an array');\n        return;\n    }\n    const allowedTracingUrls = validateAndBuildTracingOptions(initConfiguration);\n    if (!allowedTracingUrls) {\n        return;\n    }\n    const baseConfiguration = validateAndBuildConfiguration(initConfiguration, errorStack);\n    const allowedGraphQlUrls = validateAndBuildGraphQlOptions(initConfiguration);\n    if (!baseConfiguration) {\n        return;\n    }\n    const sessionReplaySampleRate = (_a = initConfiguration.sessionReplaySampleRate) !== null && _a !== void 0 ? _a : 0;\n    return {\n        applicationId: initConfiguration.applicationId,\n        actionNameAttribute: initConfiguration.actionNameAttribute,\n        betaTrackActionsInShadowDom: !!initConfiguration.betaTrackActionsInShadowDom,\n        sessionReplaySampleRate,\n        startSessionReplayRecordingManually: initConfiguration.startSessionReplayRecordingManually !== undefined\n            ? !!initConfiguration.startSessionReplayRecordingManually\n            : sessionReplaySampleRate === 0,\n        traceSampleRate: (_b = initConfiguration.traceSampleRate) !== null && _b !== void 0 ? _b : 100,\n        rulePsr: isNumber(initConfiguration.traceSampleRate) ? initConfiguration.traceSampleRate / 100 : undefined,\n        allowedTracingUrls,\n        excludedActivityUrls: (_c = initConfiguration.excludedActivityUrls) !== null && _c !== void 0 ? _c : [],\n        workerUrl: initConfiguration.workerUrl,\n        compressIntakeRequests: !!initConfiguration.compressIntakeRequests,\n        trackUserInteractions: !!((_d = initConfiguration.trackUserInteractions) !== null && _d !== void 0 ? _d : true),\n        trackViewsManually: !!initConfiguration.trackViewsManually,\n        trackResources: !!((_e = initConfiguration.trackResources) !== null && _e !== void 0 ? _e : true),\n        trackResourceHeaders: validateAndBuildTrackResourceHeaders(initConfiguration),\n        trackLongTasks: !!((_f = initConfiguration.trackLongTasks) !== null && _f !== void 0 ? _f : true),\n        trackBfcacheViews: !!initConfiguration.trackBfcacheViews,\n        trackEarlyRequests: !!initConfiguration.trackEarlyRequests,\n        subdomain: initConfiguration.subdomain,\n        defaultPrivacyLevel: objectHasValue(DefaultPrivacyLevel, initConfiguration.defaultPrivacyLevel)\n            ? initConfiguration.defaultPrivacyLevel\n            : DefaultPrivacyLevel.MASK,\n        enablePrivacyForActionName: !!initConfiguration.enablePrivacyForActionName,\n        traceContextInjection: objectHasValue(TraceContextInjection, initConfiguration.traceContextInjection)\n            ? initConfiguration.traceContextInjection\n            : TraceContextInjection.SAMPLED,\n        plugins: initConfiguration.plugins || [],\n        trackFeatureFlagsForEvents: initConfiguration.trackFeatureFlagsForEvents || [],\n        profilingSampleRate: (_g = initConfiguration.profilingSampleRate) !== null && _g !== void 0 ? _g : 0,\n        propagateTraceBaggage: !!initConfiguration.propagateTraceBaggage,\n        allowedGraphQlUrls,\n        ...baseConfiguration,\n    };\n}\n/**\n * Validates allowedTracingUrls and converts match options to tracing options\n */\nfunction validateAndBuildTracingOptions(initConfiguration) {\n    if (initConfiguration.allowedTracingUrls === undefined) {\n        return [];\n    }\n    if (!Array.isArray(initConfiguration.allowedTracingUrls)) {\n        display.error('Allowed Tracing URLs should be an array');\n        return;\n    }\n    if (initConfiguration.allowedTracingUrls.length !== 0 && initConfiguration.service === undefined) {\n        display.error('Service needs to be configured when tracing is enabled');\n        return;\n    }\n    // Convert from (MatchOption | TracingOption) to TracingOption, remove unknown properties\n    const tracingOptions = [];\n    initConfiguration.allowedTracingUrls.forEach((option) => {\n        const normalizedOption = normalizeTracingOption(option);\n        if (normalizedOption) {\n            tracingOptions.push(normalizedOption);\n        }\n        else {\n            display.warn('Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter', option);\n        }\n    });\n    return tracingOptions;\n}\n/**\n * Combines the selected tracing propagators from the different options in allowedTracingUrls\n */\nfunction getSelectedTracingPropagators(configuration) {\n    const usedTracingPropagators = new Set();\n    if (isNonEmptyArray(configuration.allowedTracingUrls)) {\n        configuration.allowedTracingUrls.forEach((option) => {\n            var _a;\n            (_a = normalizeTracingOption(option)) === null || _a === void 0 ? void 0 : _a.propagatorTypes.forEach((propagatorType) => usedTracingPropagators.add(propagatorType));\n        });\n    }\n    return Array.from(usedTracingPropagators);\n}\nfunction normalizeTracingOption(option) {\n    if (isMatchOption(option)) {\n        return { match: option, propagatorTypes: DEFAULT_PROPAGATOR_TYPES };\n    }\n    if (isIndexableObject(option) &&\n        isMatchOption(option.match) &&\n        (option.propagatorTypes === null || option.propagatorTypes === undefined || Array.isArray(option.propagatorTypes))) {\n        return {\n            match: option.match,\n            propagatorTypes: option.propagatorTypes || DEFAULT_PROPAGATOR_TYPES,\n        };\n    }\n}\n/**\n * Build GraphQL options from configuration\n */\nfunction validateAndBuildGraphQlOptions(initConfiguration) {\n    if (!initConfiguration.allowedGraphQlUrls) {\n        return [];\n    }\n    if (!Array.isArray(initConfiguration.allowedGraphQlUrls)) {\n        display.warn('allowedGraphQlUrls should be an array');\n        return [];\n    }\n    const graphQlOptions = [];\n    initConfiguration.allowedGraphQlUrls.forEach((option) => {\n        if (isMatchOption(option)) {\n            graphQlOptions.push({ match: option, trackPayload: false, trackResponseErrors: false });\n        }\n        else if (isIndexableObject(option) && isMatchOption(option.match)) {\n            graphQlOptions.push({\n                match: option.match,\n                trackPayload: !!option.trackPayload,\n                trackResponseErrors: !!option.trackResponseErrors,\n            });\n        }\n    });\n    return graphQlOptions;\n}\nconst VALID_HEADER_LOCATIONS = ['request', 'response', 'any'];\nfunction validateAndBuildTrackResourceHeaders(initConfiguration) {\n    const option = initConfiguration.trackResourceHeaders;\n    if (option === undefined || option === false) {\n        return [];\n    }\n    if (option === true) {\n        return DEFAULT_TRACKED_RESOURCE_HEADERS.map((name) => ({ name }));\n    }\n    if (!Array.isArray(option)) {\n        display.warn('trackResourceHeaders should be true or an array of MatchHeader');\n        return [];\n    }\n    if (option.length === 0) {\n        display.warn('trackResourceHeaders is an empty array, no headers will be captured');\n        return [];\n    }\n    const result = [];\n    option.forEach((item, index) => {\n        if (!isIndexableObject(item) || !isMatchOption(item.name)) {\n            display.warn(`trackResourceHeaders[${index}] should be a MatchHeader object with a 'name' property`);\n            return;\n        }\n        if (item.url !== undefined && !isMatchOption(item.url)) {\n            display.warn(`trackResourceHeaders[${index}].url should be a MatchOption`);\n            return;\n        }\n        if (item.extractor !== undefined && !(item.extractor instanceof RegExp)) {\n            display.warn(`trackResourceHeaders[${index}].extractor should be a RegExp`);\n            return;\n        }\n        if (item.location !== undefined && !VALID_HEADER_LOCATIONS.includes(item.location)) {\n            display.warn(`trackResourceHeaders[${index}].location should be 'request', 'response', or 'any'`);\n            return;\n        }\n        result.push({\n            ...item,\n            name: typeof item.name === 'string' ? item.name.toLowerCase() : item.name,\n        });\n    });\n    return result;\n}\nfunction hasGraphQlPayloadTracking(allowedGraphQlUrls) {\n    return (isNonEmptyArray(allowedGraphQlUrls) &&\n        allowedGraphQlUrls.some((option) => isIndexableObject(option) && option.trackPayload));\n}\nfunction hasGraphQlResponseErrorsTracking(allowedGraphQlUrls) {\n    return (isNonEmptyArray(allowedGraphQlUrls) &&\n        allowedGraphQlUrls.some((option) => isIndexableObject(option) && option.trackResponseErrors));\n}\nfunction getTrackResourceHeadersTelemetryValue(trackResourceHeaders) {\n    if (trackResourceHeaders === true) {\n        return 'default_headers';\n    }\n    if (Array.isArray(trackResourceHeaders)) {\n        return 'custom';\n    }\n}\nexport function serializeRumConfiguration(configuration) {\n    var _a;\n    const baseSerializedConfiguration = serializeConfiguration(configuration);\n    // `use_` prefix is for telemetry options that track usage of a configuration option as a boolean to avoid capturing customer data\n    return {\n        session_replay_sample_rate: configuration.sessionReplaySampleRate,\n        start_session_replay_recording_manually: configuration.startSessionReplayRecordingManually,\n        trace_sample_rate: configuration.traceSampleRate,\n        trace_context_injection: configuration.traceContextInjection,\n        propagate_trace_baggage: configuration.propagateTraceBaggage,\n        action_name_attribute: configuration.actionNameAttribute,\n        use_allowed_tracing_urls: isNonEmptyArray(configuration.allowedTracingUrls),\n        use_allowed_graph_ql_urls: isNonEmptyArray(configuration.allowedGraphQlUrls),\n        use_track_graph_ql_payload: hasGraphQlPayloadTracking(configuration.allowedGraphQlUrls),\n        use_track_graph_ql_response_errors: hasGraphQlResponseErrorsTracking(configuration.allowedGraphQlUrls),\n        selected_tracing_propagators: getSelectedTracingPropagators(configuration),\n        default_privacy_level: configuration.defaultPrivacyLevel,\n        enable_privacy_for_action_name: configuration.enablePrivacyForActionName,\n        use_excluded_activity_urls: isNonEmptyArray(configuration.excludedActivityUrls),\n        use_worker_url: !!configuration.workerUrl,\n        compress_intake_requests: configuration.compressIntakeRequests,\n        track_views_manually: configuration.trackViewsManually,\n        track_user_interactions: configuration.trackUserInteractions,\n        track_resources: configuration.trackResources,\n        track_long_task: configuration.trackLongTasks,\n        track_bfcache_views: configuration.trackBfcacheViews,\n        track_early_requests: configuration.trackEarlyRequests,\n        plugins: (_a = configuration.plugins) === null || _a === void 0 ? void 0 : _a.map((plugin) => {\n            var _a;\n            return ({\n                name: plugin.name,\n                ...(_a = plugin.getConfigurationTelemetry) === null || _a === void 0 ? void 0 : _a.call(plugin),\n            });\n        }),\n        track_feature_flags_for_events: configuration.trackFeatureFlagsForEvents,\n        remote_configuration_id: configuration.remoteConfigurationId,\n        profiling_sample_rate: configuration.profilingSampleRate,\n        use_remote_configuration_proxy: !!configuration.remoteConfigurationProxy,\n        track_resource_headers: getTrackResourceHeadersTelemetryValue(configuration.trackResourceHeaders),\n        ...baseSerializedConfiguration,\n    };\n}\n//# sourceMappingURL=configuration.js.map","/**\n * Executes a RegExp against a string and returns the first capture group, or the full match if\n * there is no capture group. Returns undefined when the pattern does not match.\n */\nexport function extractRegexMatch(candidate, extractor) {\n    // Prevent stateful matching when the RegExp has the global or sticky flag\n    extractor.lastIndex = 0;\n    const regexResult = extractor.exec(candidate);\n    if (!regexResult) {\n        return undefined;\n    }\n    const [match, capture] = regexResult;\n    return capture ? capture : match;\n}\n//# sourceMappingURL=extractRegexMatch.js.map","/**\n * Terminology inspired from https://www.rfc-editor.org/rfc/rfc9535.html\n *\n * jsonpath-query      = segment*\n * segment             = .name-shorthand / bracketed-selection\n * bracketed-selection = ['name-selector'] / [\"name-selector\"] / [index-selector]\n *\n * Useful references:\n * - https://goessner.net/articles/JsonPath/\n * - https://jsonpath.com/\n * - https://github.com/jsonpath-standard\n */\n/**\n * Extract selectors from a simple JSON path expression, return [] for an invalid path\n *\n * Supports:\n * - Dot notation: `foo.bar.baz`\n * - Bracket notation: `['foo'][\"bar\"]`\n * - Array indices: `items[0]`, `data['users'][1]`\n *\n * Examples:\n * parseJsonPath(\"['foo'].bar[12]\")\n * => ['foo', 'bar', '12']\n *\n * parseJsonPath(\"['foo\")\n * => []\n */\nexport function parseJsonPath(path) {\n    const selectors = [];\n    let previousToken = 0 /* Token.START */;\n    let currentToken;\n    const parsingContext = { quote: undefined, escapeSequence: undefined };\n    let currentSelector = '';\n    for (const char of path) {\n        // find which kind of token is this char\n        currentToken = ALLOWED_NEXT_TOKENS[previousToken].find((token) => TOKEN_PREDICATE[token](char, parsingContext));\n        if (!currentToken) {\n            return [];\n        }\n        if (parsingContext.escapeSequence !== undefined && currentToken !== 12 /* Token.ESCAPE_SEQUENCE_CHAR */) {\n            if (!isValidEscapeSequence(parsingContext.escapeSequence)) {\n                return [];\n            }\n            currentSelector += resolveEscapeSequence(parsingContext.escapeSequence);\n            parsingContext.escapeSequence = undefined;\n        }\n        if (ALLOWED_SELECTOR_TOKENS.includes(currentToken)) {\n            // buffer the char if it belongs to the selector\n            // ex: foo['bar']\n            //      ^    ^\n            currentSelector += char;\n        }\n        else if (ALLOWED_SELECTOR_DELIMITER_TOKENS.includes(currentToken) && currentSelector !== '') {\n            // close the current path part if we have reach a path part delimiter\n            // ex: foo.bar['qux']\n            //        ^   ^     ^\n            selectors.push(currentSelector);\n            currentSelector = '';\n        }\n        else if (currentToken === 12 /* Token.ESCAPE_SEQUENCE_CHAR */) {\n            parsingContext.escapeSequence = parsingContext.escapeSequence ? `${parsingContext.escapeSequence}${char}` : char;\n        }\n        else if (currentToken === 8 /* Token.QUOTE_START */) {\n            parsingContext.quote = char;\n        }\n        else if (currentToken === 9 /* Token.QUOTE_END */) {\n            parsingContext.quote = undefined;\n        }\n        previousToken = currentToken;\n    }\n    if (!ALLOWED_NEXT_TOKENS[previousToken].includes(1 /* Token.END */)) {\n        return [];\n    }\n    if (currentSelector !== '') {\n        selectors.push(currentSelector);\n    }\n    return selectors;\n}\nconst NAME_SHORTHAND_FIRST_CHAR_REGEX = /[a-zA-Z_$]/;\nconst NAME_SHORTHAND_CHAR_REGEX = /[a-zA-Z0-9_$]/;\nconst DIGIT_REGEX = /[0-9]/;\nconst UNICODE_CHAR_REGEX = /[a-fA-F0-9]/;\nconst QUOTE_CHARS = '\\'\"';\nconst TOKEN_PREDICATE = {\n    // no char should match to START or END\n    [0 /* Token.START */]: () => false,\n    [1 /* Token.END */]: () => false,\n    [2 /* Token.NAME_SHORTHAND_FIRST_CHAR */]: (char) => NAME_SHORTHAND_FIRST_CHAR_REGEX.test(char),\n    [3 /* Token.NAME_SHORTHAND_CHAR */]: (char) => NAME_SHORTHAND_CHAR_REGEX.test(char),\n    [4 /* Token.DOT */]: (char) => char === '.',\n    [5 /* Token.BRACKET_START */]: (char) => char === '[',\n    [6 /* Token.BRACKET_END */]: (char) => char === ']',\n    [7 /* Token.DIGIT */]: (char) => DIGIT_REGEX.test(char),\n    [8 /* Token.QUOTE_START */]: (char) => QUOTE_CHARS.includes(char),\n    [9 /* Token.QUOTE_END */]: (char, parsingContext) => char === parsingContext.quote,\n    [10 /* Token.NAME_SELECTOR_CHAR */]: () => true, // any char can be used in name selector\n    [11 /* Token.ESCAPE */]: (char) => char === '\\\\',\n    [12 /* Token.ESCAPE_SEQUENCE_CHAR */]: (char, parsingContext) => {\n        if (parsingContext.escapeSequence === undefined) {\n            // see https://www.rfc-editor.org/rfc/rfc9535.html#name-semantics-3\n            return `${parsingContext.quote}/\\\\bfnrtu`.includes(char);\n        }\n        else if (parsingContext.escapeSequence.startsWith('u') && parsingContext.escapeSequence.length < 5) {\n            return UNICODE_CHAR_REGEX.test(char);\n        }\n        return false;\n    },\n};\nconst ALLOWED_NEXT_TOKENS = {\n    [0 /* Token.START */]: [2 /* Token.NAME_SHORTHAND_FIRST_CHAR */, 5 /* Token.BRACKET_START */],\n    [1 /* Token.END */]: [],\n    [2 /* Token.NAME_SHORTHAND_FIRST_CHAR */]: [3 /* Token.NAME_SHORTHAND_CHAR */, 4 /* Token.DOT */, 5 /* Token.BRACKET_START */, 1 /* Token.END */],\n    [3 /* Token.NAME_SHORTHAND_CHAR */]: [3 /* Token.NAME_SHORTHAND_CHAR */, 4 /* Token.DOT */, 5 /* Token.BRACKET_START */, 1 /* Token.END */],\n    [4 /* Token.DOT */]: [2 /* Token.NAME_SHORTHAND_FIRST_CHAR */],\n    [5 /* Token.BRACKET_START */]: [8 /* Token.QUOTE_START */, 7 /* Token.DIGIT */],\n    [6 /* Token.BRACKET_END */]: [4 /* Token.DOT */, 5 /* Token.BRACKET_START */, 1 /* Token.END */],\n    [7 /* Token.DIGIT */]: [7 /* Token.DIGIT */, 6 /* Token.BRACKET_END */],\n    [8 /* Token.QUOTE_START */]: [11 /* Token.ESCAPE */, 9 /* Token.QUOTE_END */, 10 /* Token.NAME_SELECTOR_CHAR */],\n    [9 /* Token.QUOTE_END */]: [6 /* Token.BRACKET_END */],\n    [10 /* Token.NAME_SELECTOR_CHAR */]: [11 /* Token.ESCAPE */, 9 /* Token.QUOTE_END */, 10 /* Token.NAME_SELECTOR_CHAR */],\n    [11 /* Token.ESCAPE */]: [12 /* Token.ESCAPE_SEQUENCE_CHAR */],\n    [12 /* Token.ESCAPE_SEQUENCE_CHAR */]: [12 /* Token.ESCAPE_SEQUENCE_CHAR */, 11 /* Token.ESCAPE */, 9 /* Token.QUOTE_END */, 10 /* Token.NAME_SELECTOR_CHAR */],\n};\n// foo['bar\\n'][12]\n// ^^    ^ ^^   ^\nconst ALLOWED_SELECTOR_TOKENS = [\n    2 /* Token.NAME_SHORTHAND_FIRST_CHAR */,\n    3 /* Token.NAME_SHORTHAND_CHAR */,\n    7 /* Token.DIGIT */,\n    10 /* Token.NAME_SELECTOR_CHAR */,\n];\n// foo.bar['qux']\n//    ^   ^     ^\nconst ALLOWED_SELECTOR_DELIMITER_TOKENS = [4 /* Token.DOT */, 5 /* Token.BRACKET_START */, 6 /* Token.BRACKET_END */];\nfunction isValidEscapeSequence(escapeSequence) {\n    return '\"\\'/\\\\bfnrt'.includes(escapeSequence) || (escapeSequence.startsWith('u') && escapeSequence.length === 5);\n}\nconst ESCAPED_CHARS = {\n    '\"': '\"',\n    \"'\": \"'\",\n    '/': '/',\n    '\\\\': '\\\\',\n    b: '\\b',\n    f: '\\f',\n    n: '\\n',\n    r: '\\r',\n    t: '\\t',\n};\nfunction resolveEscapeSequence(escapeSequence) {\n    if (escapeSequence.startsWith('u')) {\n        // build Unicode char from code\n        return String.fromCharCode(parseInt(escapeSequence.slice(1), 16));\n    }\n    return ESCAPED_CHARS[escapeSequence];\n}\n//# sourceMappingURL=jsonPathParser.js.map","import { display, buildEndpointHost, mapValues, getCookie, addTelemetryMetrics, isIndexableObject, fetch, } from '@datadog/browser-core';\nimport { extractRegexMatch } from '../extractRegexMatch';\nimport { parseJsonPath } from './jsonPathParser';\nconst REMOTE_CONFIGURATION_VERSION = 'v1';\nconst SUPPORTED_FIELDS = [\n    'applicationId',\n    'service',\n    'env',\n    'version',\n    'sessionSampleRate',\n    'sessionReplaySampleRate',\n    'defaultPrivacyLevel',\n    'enablePrivacyForActionName',\n    'traceSampleRate',\n    'trackSessionAcrossSubdomains',\n    'allowedTracingUrls',\n    'allowedTrackingOrigins',\n];\nexport async function fetchAndApplyRemoteConfiguration(initConfiguration, supportedContextManagers) {\n    let rumInitConfiguration;\n    const metrics = initMetrics();\n    const fetchResult = await fetchRemoteConfiguration(initConfiguration);\n    if (!fetchResult.ok) {\n        metrics.increment('fetch', 'failure');\n        display.error(fetchResult.error);\n    }\n    else {\n        metrics.increment('fetch', 'success');\n        rumInitConfiguration = applyRemoteConfiguration(initConfiguration, fetchResult.value, supportedContextManagers, metrics);\n    }\n    // monitor-until: forever\n    addTelemetryMetrics(\"remote configuration metrics\" /* TelemetryMetrics.REMOTE_CONFIGURATION_METRIC_NAME */, { metrics: metrics.get() });\n    return rumInitConfiguration;\n}\nexport function applyRemoteConfiguration(initConfiguration, rumRemoteConfiguration, supportedContextManagers, metrics) {\n    // intents:\n    // - explicitly set each supported field to limit risk in case an attacker can create configurations\n    // - check the existence in the remote config to avoid clearing a provided init field\n    const appliedConfiguration = { ...initConfiguration };\n    SUPPORTED_FIELDS.forEach((option) => {\n        if (option in rumRemoteConfiguration) {\n            appliedConfiguration[option] = resolveConfigurationProperty(rumRemoteConfiguration[option]);\n        }\n    });\n    Object.keys(supportedContextManagers).forEach((context) => {\n        if (rumRemoteConfiguration[context] !== undefined) {\n            resolveContextProperty(supportedContextManagers[context], rumRemoteConfiguration[context]);\n        }\n    });\n    return appliedConfiguration;\n    // share context to access metrics\n    function resolveConfigurationProperty(property) {\n        if (Array.isArray(property)) {\n            return property.map(resolveConfigurationProperty);\n        }\n        if (isIndexableObject(property)) {\n            if (isSerializedOption(property)) {\n                const type = property.rcSerializedType;\n                switch (type) {\n                    case 'string':\n                        return property.value;\n                    case 'regex':\n                        return resolveRegex(property.value);\n                    case 'dynamic':\n                        return resolveDynamicOption(property);\n                    default:\n                        display.error(`Unsupported remote configuration: \"rcSerializedType\": \"${type}\"`);\n                        return;\n                }\n            }\n            return mapValues(property, resolveConfigurationProperty);\n        }\n        return property;\n    }\n    function resolveContextProperty(contextManager, contextItems) {\n        contextItems.forEach(({ key, value }) => {\n            contextManager.setContextProperty(key, resolveConfigurationProperty(value));\n        });\n    }\n    function resolveDynamicOption(property) {\n        const strategy = property.strategy;\n        let resolvedValue;\n        switch (strategy) {\n            case 'cookie':\n                resolvedValue = resolveCookieValue(property);\n                break;\n            case 'dom':\n                resolvedValue = resolveDomValue(property);\n                break;\n            case 'js':\n                resolvedValue = resolveJsValue(property);\n                break;\n            case 'localStorage':\n                resolvedValue = resolveLocalStorageValue(property);\n                break;\n            default:\n                display.error(`Unsupported remote configuration: \"strategy\": \"${strategy}\"`);\n                return;\n        }\n        const extractor = property.extractor;\n        if (extractor !== undefined && typeof resolvedValue === 'string') {\n            return extractValue(extractor, resolvedValue);\n        }\n        return resolvedValue;\n    }\n    function resolveCookieValue({ name }) {\n        const value = getCookie(name);\n        metrics.increment('cookie', value !== undefined ? 'success' : 'missing');\n        return value;\n    }\n    function resolveLocalStorageValue({ key }) {\n        let value;\n        try {\n            value = localStorage.getItem(key);\n        }\n        catch (_a) {\n            metrics.increment('localStorage', 'failure');\n            return;\n        }\n        metrics.increment('localStorage', value !== null ? 'success' : 'missing');\n        return value !== null && value !== void 0 ? value : undefined;\n    }\n    function resolveDomValue({ selector, attribute }) {\n        let element;\n        try {\n            element = document.querySelector(selector);\n        }\n        catch (_a) {\n            display.error(`Invalid selector in the remote configuration: '${selector}'`);\n            metrics.increment('dom', 'failure');\n            return;\n        }\n        if (!element) {\n            metrics.increment('dom', 'missing');\n            return;\n        }\n        if (isForbidden(element, attribute)) {\n            display.error(`Forbidden element selected by the remote configuration: '${selector}'`);\n            metrics.increment('dom', 'failure');\n            return;\n        }\n        const domValue = attribute !== undefined ? element.getAttribute(attribute) : element.textContent;\n        if (domValue === null) {\n            metrics.increment('dom', 'missing');\n            return;\n        }\n        metrics.increment('dom', 'success');\n        return domValue;\n    }\n    function isForbidden(element, attribute) {\n        return element.getAttribute('type') === 'password' && attribute === 'value';\n    }\n    function resolveJsValue({ path }) {\n        let current = window;\n        const pathParts = parseJsonPath(path);\n        if (pathParts.length === 0) {\n            display.error(`Invalid JSON path in the remote configuration: '${path}'`);\n            metrics.increment('js', 'failure');\n            return;\n        }\n        for (const pathPart of pathParts) {\n            if (!(pathPart in current)) {\n                metrics.increment('js', 'missing');\n                return;\n            }\n            try {\n                current = current[pathPart];\n            }\n            catch (e) {\n                display.error(`Error accessing: '${path}'`, e);\n                metrics.increment('js', 'failure');\n                return;\n            }\n        }\n        metrics.increment('js', 'success');\n        return current;\n    }\n}\nexport function initMetrics() {\n    const metrics = { fetch: {} };\n    return {\n        get: () => metrics,\n        increment: (metricName, type) => {\n            if (!metrics[metricName]) {\n                metrics[metricName] = {};\n            }\n            if (!metrics[metricName][type]) {\n                metrics[metricName][type] = 0;\n            }\n            metrics[metricName][type] = metrics[metricName][type] + 1;\n        },\n    };\n}\nfunction isSerializedOption(value) {\n    return 'rcSerializedType' in value;\n}\nfunction resolveRegex(pattern) {\n    try {\n        return new RegExp(pattern);\n    }\n    catch (_a) {\n        display.error(`Invalid regex in the remote configuration: '${pattern}'`);\n    }\n}\nfunction extractValue(extractor, candidate) {\n    const resolvedExtractor = resolveRegex(extractor.value);\n    if (resolvedExtractor === undefined) {\n        return;\n    }\n    return extractRegexMatch(candidate, resolvedExtractor);\n}\nexport async function fetchRemoteConfiguration(configuration) {\n    let response;\n    try {\n        response = await fetch(buildEndpoint(configuration));\n    }\n    catch (_a) {\n        response = undefined;\n    }\n    if (!response || !response.ok) {\n        return {\n            ok: false,\n            error: new Error('Error fetching the remote configuration.'),\n        };\n    }\n    const remoteConfiguration = await response.json();\n    if (remoteConfiguration.rum) {\n        return {\n            ok: true,\n            value: remoteConfiguration.rum,\n        };\n    }\n    return {\n        ok: false,\n        error: new Error('No remote configuration for RUM.'),\n    };\n}\nexport function buildEndpoint(configuration) {\n    if (configuration.remoteConfigurationProxy) {\n        return configuration.remoteConfigurationProxy;\n    }\n    return `https://sdk-configuration.${buildEndpointHost('rum', configuration)}/${REMOTE_CONFIGURATION_VERSION}/${encodeURIComponent(configuration.remoteConfigurationId)}.json`;\n}\n//# sourceMappingURL=remoteConfiguration.js.map","import { createBoundedBuffer, display, canUseEventBridge, displayAlreadyInitializedError, willSyntheticsInjectRum, noop, timeStampNow, clocksNow, getEventBridge, initFeatureFlags, addTelemetryConfiguration, initFetchObservable, CustomerContextKey, buildAccountContextManager, buildGlobalContextManager, buildUserContextManager, monitorError, sanitize, startTelemetry, mockable, } from '@datadog/browser-core';\nimport { createHooks } from '../domain/hooks';\nimport { validateAndBuildRumConfiguration, fetchAndApplyRemoteConfiguration, serializeRumConfiguration, } from '../domain/configuration';\nimport { startDurationVital, stopDurationVital } from '../domain/vital/vitalCollection';\nimport { callPluginsMethod } from '../domain/plugins';\nexport function createPreStartStrategy({ ignoreInitIfSyntheticsWillInjectRum = true, startDeflateWorker }, trackingConsentState, customVitalsState, doStartRum) {\n    const bufferApiCalls = createBoundedBuffer();\n    // TODO next major: remove the globalContextManager, userContextManager and accountContextManager from preStartStrategy and use an empty context instead\n    const globalContext = buildGlobalContextManager();\n    bufferContextCalls(globalContext, CustomerContextKey.globalContext, bufferApiCalls);\n    const userContext = buildUserContextManager();\n    bufferContextCalls(userContext, CustomerContextKey.userContext, bufferApiCalls);\n    const accountContext = buildAccountContextManager();\n    bufferContextCalls(accountContext, CustomerContextKey.accountContext, bufferApiCalls);\n    let firstStartViewCall;\n    let deflateWorker;\n    let cachedInitConfiguration;\n    let cachedConfiguration;\n    let telemetry;\n    const hooks = createHooks();\n    const trackingConsentStateSubscription = trackingConsentState.observable.subscribe(tryStartRum);\n    const emptyContext = {};\n    function tryStartRum() {\n        if (!cachedInitConfiguration || !cachedConfiguration || !trackingConsentState.isGranted()) {\n            return;\n        }\n        // Start telemetry only once, when we have consent and configuration\n        if (!telemetry) {\n            telemetry = mockable(startTelemetry)(\"browser-rum-sdk\" /* TelemetryService.RUM */, cachedConfiguration, hooks);\n        }\n        trackingConsentStateSubscription.unsubscribe();\n        let initialViewOptions;\n        if (cachedConfiguration.trackViewsManually) {\n            if (!firstStartViewCall) {\n                return;\n            }\n            // An initial view is always created when starting RUM.\n            // When tracking views automatically, any startView call before RUM start creates an extra\n            // view.\n            // When tracking views manually, we use the ViewOptions from the first startView call as the\n            // initial view options, and we remove the actual startView call so we don't create an extra\n            // view.\n            bufferApiCalls.remove(firstStartViewCall.callback);\n            initialViewOptions = firstStartViewCall.options;\n        }\n        const startRumResult = doStartRum(cachedConfiguration, deflateWorker, initialViewOptions, telemetry, hooks);\n        bufferApiCalls.drain(startRumResult);\n    }\n    function doInit(initConfiguration, errorStack) {\n        const eventBridgeAvailable = canUseEventBridge();\n        if (eventBridgeAvailable) {\n            initConfiguration = overrideInitConfigurationForBridge(initConfiguration);\n        }\n        // Update the exposed initConfiguration to reflect the bridge and remote configuration overrides\n        cachedInitConfiguration = initConfiguration;\n        addTelemetryConfiguration(serializeRumConfiguration(initConfiguration));\n        if (cachedConfiguration) {\n            displayAlreadyInitializedError('DD_RUM', initConfiguration);\n            return;\n        }\n        const configuration = validateAndBuildRumConfiguration(initConfiguration, errorStack);\n        if (!configuration) {\n            return;\n        }\n        if (!eventBridgeAvailable && !configuration.sessionStoreStrategyType) {\n            display.warn('No storage available for session. We will not send any data.');\n            return;\n        }\n        if (configuration.compressIntakeRequests && !eventBridgeAvailable && startDeflateWorker) {\n            deflateWorker = startDeflateWorker(configuration, 'Datadog RUM', \n            // Worker initialization can fail asynchronously, especially in Firefox where even CSP\n            // issues are reported asynchronously. For now, the SDK will continue its execution even if\n            // data won't be sent to Datadog. We could improve this behavior in the future.\n            noop);\n            if (!deflateWorker) {\n                // `startDeflateWorker` should have logged an error message explaining the issue\n                return;\n            }\n        }\n        cachedConfiguration = configuration;\n        // Instrument fetch to track network requests\n        // This is needed in case the consent is not granted and some customer\n        // library (Apollo Client) is storing uninstrumented fetch to be used later\n        // The subscription is needed so that the instrumentation process is completed\n        initFetchObservable().subscribe(noop);\n        trackingConsentState.tryToInit(configuration.trackingConsent);\n        tryStartRum();\n    }\n    const addDurationVital = (vital) => {\n        bufferApiCalls.add((startRumResult) => startRumResult.addDurationVital(vital));\n    };\n    const addOperationStepVital = (name, stepType, options, failureReason) => {\n        bufferApiCalls.add((startRumResult) => startRumResult.addOperationStepVital(sanitize(name), stepType, sanitize(options), sanitize(failureReason)));\n    };\n    const strategy = {\n        init(initConfiguration, publicApi, errorStack) {\n            if (!initConfiguration) {\n                display.error('Missing configuration');\n                return;\n            }\n            // Set the experimental feature flags as early as possible, so we can use them in most places\n            initFeatureFlags(initConfiguration.enableExperimentalFeatures);\n            // Expose the initial configuration regardless of initialization success.\n            cachedInitConfiguration = initConfiguration;\n            // If we are in a Synthetics test configured to automatically inject a RUM instance, we want\n            // to completely discard the customer application RUM instance by ignoring their init() call.\n            // But, we should not ignore the init() call from the Synthetics-injected RUM instance, so the\n            // internal `ignoreInitIfSyntheticsWillInjectRum` option is here to bypass this condition.\n            if (ignoreInitIfSyntheticsWillInjectRum && willSyntheticsInjectRum()) {\n                return;\n            }\n            callPluginsMethod(initConfiguration.plugins, 'onInit', { initConfiguration, publicApi });\n            if (initConfiguration.remoteConfigurationId) {\n                fetchAndApplyRemoteConfiguration(initConfiguration, { user: userContext, context: globalContext })\n                    .then((initConfiguration) => {\n                    if (initConfiguration) {\n                        doInit(initConfiguration, errorStack);\n                    }\n                })\n                    .catch(monitorError);\n            }\n            else {\n                doInit(initConfiguration, errorStack);\n            }\n        },\n        get initConfiguration() {\n            return cachedInitConfiguration;\n        },\n        getInternalContext: noop,\n        stopSession: noop,\n        addTiming(name, time = timeStampNow()) {\n            bufferApiCalls.add((startRumResult) => startRumResult.addTiming(name, time));\n        },\n        setLoadingTime: ((callTimestamp) => {\n            bufferApiCalls.add((startRumResult) => startRumResult.setLoadingTime(callTimestamp));\n        }),\n        startView(options, startClocks = clocksNow()) {\n            const callback = (startRumResult) => {\n                startRumResult.startView(options, startClocks);\n            };\n            bufferApiCalls.add(callback);\n            if (!firstStartViewCall) {\n                firstStartViewCall = { options, callback };\n                tryStartRum();\n            }\n        },\n        setViewName(name) {\n            bufferApiCalls.add((startRumResult) => startRumResult.setViewName(name));\n        },\n        // View context APIs\n        setViewContext(context) {\n            bufferApiCalls.add((startRumResult) => startRumResult.setViewContext(context));\n        },\n        setViewContextProperty(key, value) {\n            bufferApiCalls.add((startRumResult) => startRumResult.setViewContextProperty(key, value));\n        },\n        getViewContext: () => emptyContext,\n        globalContext,\n        userContext,\n        accountContext,\n        addAction(action) {\n            bufferApiCalls.add((startRumResult) => startRumResult.addAction(action));\n        },\n        startAction(name, options) {\n            const startClocks = clocksNow();\n            bufferApiCalls.add((startRumResult) => startRumResult.startAction(name, options, startClocks));\n        },\n        stopAction(name, options) {\n            const stopClocks = clocksNow();\n            bufferApiCalls.add((startRumResult) => startRumResult.stopAction(name, options, stopClocks));\n        },\n        startResource(url, options) {\n            const startClocks = clocksNow();\n            bufferApiCalls.add((startRumResult) => startRumResult.startResource(url, options, startClocks));\n        },\n        stopResource(url, options) {\n            const stopClocks = clocksNow();\n            bufferApiCalls.add((startRumResult) => startRumResult.stopResource(url, options, stopClocks));\n        },\n        addError(providedError) {\n            bufferApiCalls.add((startRumResult) => startRumResult.addError(providedError));\n        },\n        addFeatureFlagEvaluation(key, value) {\n            bufferApiCalls.add((startRumResult) => startRumResult.addFeatureFlagEvaluation(key, value));\n        },\n        startDurationVital(name, options) {\n            return startDurationVital(customVitalsState, name, options);\n        },\n        stopDurationVital(name, options) {\n            stopDurationVital(addDurationVital, customVitalsState, name, options);\n        },\n        addDurationVital,\n        addOperationStepVital,\n    };\n    return strategy;\n}\nfunction overrideInitConfigurationForBridge(initConfiguration) {\n    var _a, _b;\n    return {\n        ...initConfiguration,\n        applicationId: '00000000-aaaa-0000-aaaa-000000000000',\n        clientToken: 'empty',\n        sessionSampleRate: 100,\n        defaultPrivacyLevel: (_a = initConfiguration.defaultPrivacyLevel) !== null && _a !== void 0 ? _a : (_b = getEventBridge()) === null || _b === void 0 ? void 0 : _b.getPrivacyLevel(),\n    };\n}\nfunction bufferContextCalls(preStartContextManager, name, bufferApiCalls) {\n    preStartContextManager.changeObservable.subscribe(() => {\n        const context = preStartContextManager.getContext();\n        bufferApiCalls.add((startRumResult) => startRumResult[name].setContext(context));\n    });\n}\n//# sourceMappingURL=preStartRum.js.map","import { removeItem } from './utils/arrayUtils';\nconst BUFFER_LIMIT = 500;\n/**\n * createBoundedBuffer creates a BoundedBuffer.\n *\n * @deprecated Use `BufferedObservable` instead.\n */\nexport function createBoundedBuffer() {\n    const buffer = [];\n    const add = (callback) => {\n        const length = buffer.push(callback);\n        if (length > BUFFER_LIMIT) {\n            buffer.splice(0, 1);\n        }\n    };\n    const remove = (callback) => {\n        removeItem(buffer, callback);\n    };\n    const drain = (arg) => {\n        buffer.forEach((callback) => callback(arg));\n        buffer.length = 0;\n    };\n    return {\n        add,\n        remove,\n        drain,\n    };\n}\n//# sourceMappingURL=boundedBuffer.js.map","import { generateUUID } from '../../tools/utils/stringUtils';\nexport const TAB_ID_STORAGE_KEY = '_dd_tab_id';\nlet cachedTabId;\n// Exported for test cleanup only — allows specs to reset the in-memory cache between tests.\nexport function resetCachedTabId() {\n    cachedTabId = undefined;\n}\nexport function startTabContext(hooks) {\n    const tabId = retrieveOrCreateTabId();\n    hooks.register(0 /* HookNames.Assemble */, () => ({\n        tab: {\n            id: tabId,\n        },\n    }));\n}\nfunction retrieveOrCreateTabId() {\n    var _a;\n    if (!cachedTabId) {\n        cachedTabId = (_a = getOrCreateIdInSessionStorage()) !== null && _a !== void 0 ? _a : generateUUID();\n    }\n    return cachedTabId;\n}\nfunction getOrCreateIdInSessionStorage() {\n    try {\n        const existingId = sessionStorage.getItem(TAB_ID_STORAGE_KEY);\n        if (existingId) {\n            return existingId;\n        }\n        const newId = generateUUID();\n        sessionStorage.setItem(TAB_ID_STORAGE_KEY, newId);\n        return newId;\n    }\n    catch (_a) {\n        // sessionStorage unavailable (e.g. Web Worker, sandboxed iframe, quota exceeded)\n        return undefined;\n    }\n}\n//# sourceMappingURL=tabContext.js.map","import { monitor, noop, Observable, getZoneJsOriginalValue } from '@datadog/browser-core';\nexport function createDOMMutationObservable() {\n    const MutationObserver = getMutationObserverConstructor();\n    return new Observable((observable) => {\n        if (!MutationObserver) {\n            return;\n        }\n        const observer = new MutationObserver(monitor((records) => observable.notify(records)));\n        observer.observe(document, {\n            attributes: true,\n            characterData: true,\n            childList: true,\n            subtree: true,\n        });\n        return () => observer.disconnect();\n    });\n}\nexport function getMutationObserverConstructor() {\n    let constructor;\n    const browserWindow = window;\n    // Angular uses Zone.js to provide a context persisting across async tasks.  Zone.js replaces the\n    // global MutationObserver constructor with a patched version to support the context propagation.\n    // There is an ongoing issue[1][2] with this setup when using a MutationObserver within a Angular\n    // component: on some occasions, the callback is being called in an infinite loop, causing the\n    // page to freeze (even if the callback is completely empty).\n    //\n    // To work around this issue, we try to get the original MutationObserver constructor stored by\n    // Zone.js.\n    //\n    // [1] https://github.com/angular/angular/issues/26948\n    // [2] https://github.com/angular/angular/issues/31712\n    if (browserWindow.Zone) {\n        // Zone.js 0.8.6+ is storing original class constructors into the browser 'window' object[3].\n        //\n        // [3] https://github.com/angular/angular/blob/6375fa79875c0fe7b815efc45940a6e6f5c9c9eb/packages/zone.js/lib/common/utils.ts#L288\n        constructor = getZoneJsOriginalValue(browserWindow, 'MutationObserver');\n        if (browserWindow.MutationObserver && constructor === browserWindow.MutationObserver) {\n            // Anterior Zone.js versions (used in Angular 2) does not expose the original MutationObserver\n            // in the 'window' object. Luckily, the patched MutationObserver class is storing an original\n            // instance in its properties[4]. Let's get the original MutationObserver constructor from\n            // there.\n            //\n            // [4] https://github.com/angular/zone.js/blob/v0.8.5/lib/common/utils.ts#L412\n            const patchedInstance = new browserWindow.MutationObserver(noop);\n            const originalInstance = getZoneJsOriginalValue(patchedInstance, 'originalInstance');\n            constructor = originalInstance && originalInstance.constructor;\n        }\n    }\n    if (!constructor) {\n        constructor = browserWindow.MutationObserver;\n    }\n    return constructor;\n}\n//# sourceMappingURL=domMutationObservable.js.map","import { AbstractLifeCycle } from '@datadog/browser-core';\nexport const LifeCycle = (AbstractLifeCycle);\n//# sourceMappingURL=lifeCycle.js.map","// eslint-disable-next-line no-restricted-syntax\nexport class AbstractLifeCycle {\n    constructor() {\n        this.callbacks = {};\n    }\n    notify(eventType, data) {\n        const eventCallbacks = this.callbacks[eventType];\n        if (eventCallbacks) {\n            eventCallbacks.forEach((callback) => callback(data));\n        }\n    }\n    subscribe(eventType, callback) {\n        if (!this.callbacks[eventType]) {\n            this.callbacks[eventType] = [];\n        }\n        this.callbacks[eventType].push(callback);\n        return {\n            unsubscribe: () => {\n                this.callbacks[eventType] = this.callbacks[eventType].filter((other) => callback !== other);\n            },\n        };\n    }\n}\n//# sourceMappingURL=abstractLifeCycle.js.map","import { SESSION_TIME_OUT_DELAY, createValueHistory } from '@datadog/browser-core';\nexport const VIEW_CONTEXT_TIME_OUT_DELAY = SESSION_TIME_OUT_DELAY;\nexport function startViewHistory(lifeCycle) {\n    const viewValueHistory = createValueHistory({ expireDelay: VIEW_CONTEXT_TIME_OUT_DELAY });\n    lifeCycle.subscribe(1 /* LifeCycleEventType.BEFORE_VIEW_CREATED */, (view) => {\n        viewValueHistory.add(buildViewHistoryEntry(view), view.startClocks.relative);\n    });\n    lifeCycle.subscribe(6 /* LifeCycleEventType.AFTER_VIEW_ENDED */, ({ endClocks }) => {\n        viewValueHistory.closeActive(endClocks.relative);\n    });\n    lifeCycle.subscribe(3 /* LifeCycleEventType.BEFORE_VIEW_UPDATED */, (viewUpdate) => {\n        const currentView = viewValueHistory.find(viewUpdate.startClocks.relative);\n        if (!currentView) {\n            return;\n        }\n        if (viewUpdate.name) {\n            currentView.name = viewUpdate.name;\n        }\n        if (viewUpdate.context) {\n            currentView.context = viewUpdate.context;\n        }\n        currentView.sessionIsActive = viewUpdate.sessionIsActive;\n    });\n    lifeCycle.subscribe(10 /* LifeCycleEventType.SESSION_RENEWED */, () => {\n        viewValueHistory.reset();\n    });\n    function buildViewHistoryEntry(view) {\n        return {\n            service: view.service,\n            version: view.version,\n            context: view.context,\n            id: view.id,\n            name: view.name,\n            startClocks: view.startClocks,\n        };\n    }\n    return {\n        findView: (startTime) => viewValueHistory.find(startTime),\n        stop: () => {\n            viewValueHistory.stop();\n        },\n    };\n}\n//# sourceMappingURL=viewHistory.js.map","import { instrumentMethod } from '../tools/instrumentMethod';\nimport { Observable } from '../tools/observable';\nimport { elapsed, clocksNow, timeStampNow } from '../tools/utils/timeUtils';\nimport { normalizeUrl } from '../tools/utils/urlPolyfill';\nimport { shallowClone } from '../tools/utils/objectUtils';\nimport { addEventListener } from './addEventListener';\nlet xhrObservable;\nconst xhrContexts = new WeakMap();\nexport function initXhrObservable(configuration) {\n    if (!xhrObservable) {\n        xhrObservable = createXhrObservable(configuration);\n    }\n    return xhrObservable;\n}\nfunction createXhrObservable(configuration) {\n    return new Observable((observable) => {\n        const { stop: stopInstrumentingStart } = instrumentMethod(XMLHttpRequest.prototype, 'open', openXhr);\n        const { stop: stopInstrumentingSend } = instrumentMethod(XMLHttpRequest.prototype, 'send', (call) => {\n            sendXhr(call, configuration, observable);\n        }, { computeHandlingStack: true });\n        const { stop: stopInstrumentingAbort } = instrumentMethod(XMLHttpRequest.prototype, 'abort', abortXhr);\n        return () => {\n            stopInstrumentingStart();\n            stopInstrumentingSend();\n            stopInstrumentingAbort();\n        };\n    });\n}\nfunction openXhr({ target: xhr, parameters: [method, url] }) {\n    xhrContexts.set(xhr, {\n        state: 'open',\n        method: String(method).toUpperCase(),\n        url: normalizeUrl(String(url)),\n    });\n}\nfunction sendXhr({ target: xhr, parameters: [body], handlingStack }, configuration, observable) {\n    const context = xhrContexts.get(xhr);\n    if (!context) {\n        return;\n    }\n    const startContext = context;\n    startContext.state = 'start';\n    startContext.startClocks = clocksNow();\n    startContext.isAborted = false;\n    startContext.xhr = xhr;\n    startContext.handlingStack = handlingStack;\n    startContext.requestBody = body;\n    let hasBeenReported = false;\n    const { stop: stopInstrumentingOnReadyStateChange } = instrumentMethod(xhr, 'onreadystatechange', () => {\n        if (xhr.readyState === XMLHttpRequest.DONE) {\n            // Try to report the XHR as soon as possible, because the XHR may be mutated by the\n            // application during a future event. For example, Angular is calling .abort() on\n            // completed requests during an onreadystatechange event, so the status becomes '0'\n            // before the request is collected.\n            onEnd();\n        }\n    });\n    const onEnd = () => {\n        unsubscribeLoadEndListener();\n        stopInstrumentingOnReadyStateChange();\n        if (hasBeenReported) {\n            return;\n        }\n        hasBeenReported = true;\n        const completeContext = context;\n        completeContext.state = 'complete';\n        completeContext.duration = elapsed(startContext.startClocks.timeStamp, timeStampNow());\n        completeContext.status = xhr.status;\n        if (typeof xhr.response === 'string') {\n            completeContext.responseBody = xhr.response;\n        }\n        observable.notify(shallowClone(completeContext));\n    };\n    const { stop: unsubscribeLoadEndListener } = addEventListener(configuration, xhr, 'loadend', onEnd);\n    observable.notify(startContext);\n}\nfunction abortXhr({ target: xhr }) {\n    const context = xhrContexts.get(xhr);\n    if (context) {\n        context.isAborted = true;\n    }\n}\n/**\n * Reset the XHR observable global state. This is useful for testing to ensure clean state between tests.\n *\n * @internal\n */\nexport function resetXhrObservable() {\n    xhrObservable = undefined;\n}\n//# sourceMappingURL=xhrObservable.js.map","export const ResourceType = {\n    DOCUMENT: 'document',\n    XHR: 'xhr',\n    BEACON: 'beacon',\n    FETCH: 'fetch',\n    CSS: 'css',\n    JS: 'js',\n    IMAGE: 'image',\n    FONT: 'font',\n    MEDIA: 'media',\n    OTHER: 'other',\n};\nexport const RequestType = {\n    FETCH: ResourceType.FETCH,\n    XHR: ResourceType.XHR,\n};\n//# sourceMappingURL=resourceUtils.js.map","import { elapsed, getPathName, isValidUrl, ResourceType, toServerDuration, isIntakeUrl, isExperimentalFeatureEnabled, ExperimentalFeature, } from '@datadog/browser-core';\nexport const FAKE_INITIAL_DOCUMENT = 'initial_document';\nconst RESOURCE_TYPES = [\n    [ResourceType.DOCUMENT, (initiatorType) => FAKE_INITIAL_DOCUMENT === initiatorType],\n    [ResourceType.XHR, (initiatorType) => 'xmlhttprequest' === initiatorType],\n    [ResourceType.FETCH, (initiatorType) => 'fetch' === initiatorType],\n    [ResourceType.BEACON, (initiatorType) => 'beacon' === initiatorType],\n    [ResourceType.CSS, (_, path) => /\\.css$/i.test(path)],\n    [ResourceType.JS, (_, path) => /\\.js$/i.test(path)],\n    [\n        ResourceType.IMAGE,\n        (initiatorType, path) => ['image', 'img', 'icon'].includes(initiatorType) || /\\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(path) !== null,\n    ],\n    [ResourceType.FONT, (_, path) => /\\.(woff|eot|woff2|ttf)$/i.exec(path) !== null],\n    [\n        ResourceType.MEDIA,\n        (initiatorType, path) => ['audio', 'video'].includes(initiatorType) || /\\.(mp3|mp4)$/i.exec(path) !== null,\n    ],\n];\nexport function computeResourceEntryType(entry) {\n    const url = entry.name;\n    if (!isValidUrl(url)) {\n        return ResourceType.OTHER;\n    }\n    const path = getPathName(url);\n    for (const [type, isType] of RESOURCE_TYPES) {\n        if (isType(entry.initiatorType, path)) {\n            return type;\n        }\n    }\n    return ResourceType.OTHER;\n}\nfunction areInOrder(...numbers) {\n    for (let i = 1; i < numbers.length; i += 1) {\n        if (numbers[i - 1] > numbers[i]) {\n            return false;\n        }\n    }\n    return true;\n}\nexport function isResourceEntryRequestType(entry) {\n    return entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch';\n}\nexport function computeResourceEntryDuration(entry) {\n    const { duration, startTime, responseEnd } = entry;\n    // Safari duration is always 0 on timings blocked by cross origin policies.\n    if (duration === 0 && startTime < responseEnd) {\n        return elapsed(startTime, responseEnd);\n    }\n    return duration;\n}\nexport function computeResourceEntryDetails(entry) {\n    if (!hasValidResourceEntryTimings(entry)) {\n        return undefined;\n    }\n    const { startTime, fetchStart, workerStart, redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, secureConnectionStart, connectEnd, requestStart, responseStart, responseEnd, } = entry;\n    const details = {\n        download: formatTiming(startTime, responseStart, responseEnd),\n        first_byte: formatTiming(startTime, requestStart, responseStart),\n    };\n    // Make sure a worker processing time is recorded\n    if (0 < workerStart && workerStart < fetchStart) {\n        details.worker = formatTiming(startTime, workerStart, fetchStart);\n    }\n    // Make sure a connection occurred\n    if (fetchStart < connectEnd) {\n        details.connect = formatTiming(startTime, connectStart, connectEnd);\n        // Make sure a secure connection occurred\n        if (connectStart <= secureConnectionStart && secureConnectionStart <= connectEnd) {\n            details.ssl = formatTiming(startTime, secureConnectionStart, connectEnd);\n        }\n    }\n    // Make sure a domain lookup occurred\n    if (fetchStart < domainLookupEnd) {\n        details.dns = formatTiming(startTime, domainLookupStart, domainLookupEnd);\n    }\n    // Make sure a redirection occurred\n    if (startTime < redirectEnd) {\n        details.redirect = formatTiming(startTime, redirectStart, redirectEnd);\n    }\n    return details;\n}\n/**\n * Entries with negative duration are unexpected and should be dismissed. The intake will ignore RUM\n * Resource events with negative durations anyway.\n * Since Chromium 128, more entries have unexpected negative durations, see\n * https://issues.chromium.org/issues/363031537\n */\nexport function hasValidResourceEntryDuration(entry) {\n    return entry.duration >= 0;\n}\nexport function hasValidResourceEntryTimings(entry) {\n    // Ensure timings are in the right order. On top of filtering out potential invalid\n    // RumPerformanceResourceTiming, it will ignore entries from requests where timings cannot be\n    // collected, for example cross origin requests without a \"Timing-Allow-Origin\" header allowing\n    // it.\n    const areCommonTimingsInOrder = areInOrder(entry.startTime, entry.fetchStart, entry.domainLookupStart, entry.domainLookupEnd, entry.connectStart, entry.connectEnd, entry.requestStart, entry.responseStart, entry.responseEnd);\n    const areRedirectionTimingsInOrder = hasRedirection(entry)\n        ? areInOrder(entry.startTime, entry.redirectStart, entry.redirectEnd, entry.fetchStart)\n        : true;\n    return areCommonTimingsInOrder && areRedirectionTimingsInOrder;\n}\nfunction hasRedirection(entry) {\n    return entry.redirectEnd > entry.startTime;\n}\nfunction formatTiming(origin, start, end) {\n    if (origin <= start && start <= end) {\n        return {\n            duration: toServerDuration(elapsed(start, end)),\n            start: toServerDuration(elapsed(origin, start)),\n        };\n    }\n}\n/**\n * The 'nextHopProtocol' is an empty string for cross-origin resources without CORS headers,\n * meaning the protocol is unknown, and we shouldn't report it.\n * https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/nextHopProtocol#cross-origin_resources\n */\nexport function computeResourceEntryProtocol(entry) {\n    return entry.nextHopProtocol === '' ? undefined : entry.nextHopProtocol;\n}\n/**\n * Handles the 'deliveryType' property to distinguish between supported values ('cache', 'navigational-prefetch'),\n * undefined (unsupported in some browsers), and other cases ('other' for unknown or unrecognized values).\n * see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/deliveryType\n */\nexport function computeResourceEntryDeliveryType(entry) {\n    return entry.deliveryType === '' ? 'other' : entry.deliveryType;\n}\nexport function computeResourceEntrySize(entry) {\n    // Make sure a request actually occurred\n    if (entry.startTime < entry.responseStart) {\n        const { encodedBodySize, decodedBodySize, transferSize } = entry;\n        return {\n            size: decodedBodySize,\n            encoded_body_size: encodedBodySize,\n            decoded_body_size: decodedBodySize,\n            transfer_size: transferSize,\n        };\n    }\n    return {\n        size: undefined,\n        encoded_body_size: undefined,\n        decoded_body_size: undefined,\n        transfer_size: undefined,\n    };\n}\nexport function isAllowedRequestUrl(url) {\n    return url && (!isIntakeUrl(url) || isExperimentalFeatureEnabled(ExperimentalFeature.TRACK_INTAKE_REQUESTS));\n}\nconst DATA_URL_REGEX = /data:(.+)?(;base64)?,/g;\nexport const MAX_RESOURCE_VALUE_CHAR_LENGTH = 24000;\nexport function sanitizeIfLongDataUrl(url, lengthLimit = MAX_RESOURCE_VALUE_CHAR_LENGTH) {\n    if (url.length <= lengthLimit || !url.startsWith('data:')) {\n        return url;\n    }\n    // truncate url first to a random length to prevent match error when the url is too long\n    const dataUrlMatchArray = url.substring(0, 100).match(DATA_URL_REGEX);\n    if (!dataUrlMatchArray) {\n        return url;\n    }\n    return `${dataUrlMatchArray[0]}[...]`;\n}\n//# sourceMappingURL=resourceUtils.js.map","import { performDraw } from '@datadog/browser-core';\nconst sampleDecisionCache = new Map();\nexport function isSampled(sessionId, sampleRate) {\n    // Shortcuts for common cases. This is not strictly necessary, but it makes the code faster for\n    // customers willing to ingest all traces.\n    if (sampleRate === 100) {\n        return true;\n    }\n    if (sampleRate === 0) {\n        return false;\n    }\n    const cachedDecision = sampleDecisionCache.get(sampleRate);\n    if (cachedDecision && sessionId === cachedDecision.sessionId) {\n        return cachedDecision.decision;\n    }\n    let decision;\n    // @ts-expect-error BigInt might not be defined in every browser we support\n    if (window.BigInt) {\n        decision = sampleUsingKnuthFactor(BigInt(`0x${sessionId.split('-')[4]}`), sampleRate);\n    }\n    else {\n        // For simplicity, we don't use consistent sampling for browser without BigInt support\n        // TODO: remove this when all browser we support have BigInt support\n        decision = performDraw(sampleRate);\n    }\n    sampleDecisionCache.set(sampleRate, { sessionId, decision });\n    return decision;\n}\n// Exported for tests\nexport function resetSampleDecisionCache() {\n    sampleDecisionCache.clear();\n}\n/**\n * Perform sampling using the Knuth factor method. This method offer consistent sampling result\n * based on the provided identifier.\n *\n * @param identifier - The identifier to use for sampling.\n * @param sampleRate - The sample rate in percentage between 0 and 100.\n */\nexport function sampleUsingKnuthFactor(identifier, sampleRate) {\n    // The formula is:\n    //\n    //   (identifier * knuthFactor) % 2^64 < sampleRate * 2^64\n    //\n    // Because JavaScript numbers are 64-bit floats, we can't represent 64-bit integers, and the\n    // modulo would be incorrect. Thus, we are using BigInts here.\n    //\n    // Implementation in other languages:\n    // * Go     https://github.com/DataDog/dd-trace-go/blob/ec6fbb1f2d517b7b8e69961052adf7136f3af773/ddtrace/tracer/sampler.go#L86-L91\n    // * Python https://github.com/DataDog/dd-trace-py/blob/0cee2f066fb6e79aa15947c1514c0f406dea47c5/ddtrace/sampling_rule.py#L197\n    // * Ruby   https://github.com/DataDog/dd-trace-rb/blob/1a6e255cdcb7e7e22235ea5955f90f6dfa91045d/lib/datadog/tracing/sampling/rate_sampler.rb#L42\n    // * C++    https://github.com/DataDog/dd-trace-cpp/blob/159629edc438ae45f2bb318eb7bd51abd05e94b5/src/datadog/trace_sampler.cpp#L58\n    // * Java   https://github.com/DataDog/dd-trace-java/blob/896dd6b380533216e0bdee59614606c8272d313e/dd-trace-core/src/main/java/datadog/trace/common/sampling/DeterministicSampler.java#L48\n    //\n    // Note: All implementations have slight variations. Some of them use '<=' instead of '<', and\n    // use `sampleRate * 2^64 - 1` instead of `sampleRate * 2^64`. The following implementation\n    // should adhere to the spec and is a bit simpler than using a 2^64-1 limit as there are less\n    // BigInt arithmetic to write. In practice this does not matter, as we are using floating point\n    // numbers in the end, and Number(2n**64n-1n) === Number(2n**64n).\n    const knuthFactor = BigInt('1111111111111111111');\n    const twoPow64 = BigInt('0x10000000000000000'); // 2n ** 64n\n    const hash = (identifier * knuthFactor) % twoPow64;\n    return Number(hash) <= (sampleRate / 100) * Number(twoPow64);\n}\n//# sourceMappingURL=sampler.js.map","export function createTraceIdentifier() {\n    return createIdentifier(64);\n}\nexport function createSpanIdentifier() {\n    return createIdentifier(63);\n}\nfunction createIdentifier(bits) {\n    const buffer = crypto.getRandomValues(new Uint32Array(2));\n    if (bits === 63) {\n        // eslint-disable-next-line no-bitwise\n        buffer[buffer.length - 1] >>>= 1; // force 63-bit\n    }\n    // The `.toString` function is intentionally similar to Number and BigInt `.toString` method.\n    //\n    // JavaScript numbers can represent integers up to 48 bits, this is why we need two of them to\n    // represent a 64 bits identifier. But BigInts don't have this limitation and can represent larger\n    // integer values.\n    //\n    // In the future, when we drop browsers without BigInts support, we could use BigInts directly\n    // represent identifiers by simply returning a BigInt from this function (as all we need is a\n    // value with a `.toString` method).\n    //\n    // Examples:\n    //   const buffer = getCrypto().getRandomValues(new Uint32Array(2))\n    //   return BigInt(buffer[0]) + BigInt(buffer[1]) << 32n\n    //\n    //   // Alternative with BigUint64Array (different Browser support than plain bigints!):\n    //   return crypto.getRandomValues(new BigUint64Array(1))[0]\n    //\n    // For now, let's keep using two plain numbers as having two different implementations (one for\n    // browsers with BigInt support and one for older browsers) don't bring much value.\n    return {\n        toString(radix = 10) {\n            let high = buffer[1];\n            let low = buffer[0];\n            let str = '';\n            do {\n                const mod = (high % radix) * 4294967296 + low;\n                high = Math.floor(high / radix);\n                low = Math.floor(mod / radix);\n                str = (mod % radix).toString(radix) + str;\n            } while (high || low);\n            return str;\n        },\n    };\n}\nexport function toPaddedHexadecimalString(id) {\n    return id.toString(16).padStart(16, '0');\n}\n//# sourceMappingURL=identifier.js.map","import { objectEntries, shallowClone, matchList, TraceContextInjection } from '@datadog/browser-core';\nimport { isSampled } from '../sampler/sampler';\nimport { createSpanIdentifier, createTraceIdentifier, toPaddedHexadecimalString } from './identifier';\n/**\n * Clear tracing information to avoid incomplete traces. Ideally, we should do it when the\n * request did not reach the server, but the browser does not expose this. So, we clear tracing\n * information if the request ended with status 0 without being aborted by the application.\n *\n * Reasoning:\n *\n * * Applications are usually aborting requests after a bit of time, for example when the user is\n * typing (autocompletion) or navigating away (in a SPA). With a performant device and good\n * network conditions, the request is likely to reach the server before being canceled.\n *\n * * Requests aborted otherwise (ex: lack of internet, CORS issue, blocked by a privacy extension)\n * are likely to finish quickly and without reaching the server.\n *\n * Of course, it might not be the case every time, but it should limit having incomplete traces a\n * bit.\n * */\nexport function clearTracingIfNeeded(context) {\n    if (context.status === 0 && !context.isAborted) {\n        context.traceId = undefined;\n        context.spanId = undefined;\n        context.traceSampled = undefined;\n    }\n}\nexport function startTracer(configuration, sessionManager, userContext, accountContext) {\n    return {\n        clearTracingIfNeeded,\n        traceFetch: (context) => injectHeadersIfTracingAllowed(configuration, context, sessionManager, userContext, accountContext, (tracingHeaders) => {\n            var _a;\n            if (context.input instanceof Request && !((_a = context.init) === null || _a === void 0 ? void 0 : _a.headers)) {\n                context.input = new Request(context.input);\n                Object.keys(tracingHeaders).forEach((key) => {\n                    ;\n                    context.input.headers.append(key, tracingHeaders[key]);\n                });\n            }\n            else {\n                context.init = shallowClone(context.init);\n                const headers = [];\n                if (context.init.headers instanceof Headers) {\n                    context.init.headers.forEach((value, key) => {\n                        headers.push([key, value]);\n                    });\n                }\n                else if (Array.isArray(context.init.headers)) {\n                    context.init.headers.forEach((header) => {\n                        headers.push(header);\n                    });\n                }\n                else if (context.init.headers) {\n                    Object.keys(context.init.headers).forEach((key) => {\n                        headers.push([key, context.init.headers[key]]);\n                    });\n                }\n                context.init.headers = headers.concat(objectEntries(tracingHeaders));\n            }\n        }),\n        traceXhr: (context, xhr) => injectHeadersIfTracingAllowed(configuration, context, sessionManager, userContext, accountContext, (tracingHeaders) => {\n            Object.keys(tracingHeaders).forEach((name) => {\n                xhr.setRequestHeader(name, tracingHeaders[name]);\n            });\n        }),\n    };\n}\nfunction injectHeadersIfTracingAllowed(configuration, context, sessionManager, userContext, accountContext, inject) {\n    const session = sessionManager.findTrackedSession();\n    if (!session) {\n        return;\n    }\n    const tracingOption = configuration.allowedTracingUrls.find((tracingOption) => matchList([tracingOption.match], context.url, true));\n    if (!tracingOption) {\n        return;\n    }\n    const traceSampled = isSampled(session.id, configuration.traceSampleRate);\n    const shouldInjectHeaders = traceSampled || configuration.traceContextInjection === TraceContextInjection.ALL;\n    if (!shouldInjectHeaders) {\n        return;\n    }\n    context.traceSampled = traceSampled;\n    context.traceId = createTraceIdentifier();\n    context.spanId = createSpanIdentifier();\n    inject(makeTracingHeaders(context.traceId, context.spanId, context.traceSampled, session.id, tracingOption.propagatorTypes, userContext, accountContext, configuration));\n}\n/**\n * When trace is not sampled, set priority to '0' instead of not adding the tracing headers\n * to prepare the implementation for sampling delegation.\n */\nfunction makeTracingHeaders(traceId, spanId, traceSampled, sessionId, propagatorTypes, userContext, accountContext, configuration) {\n    const tracingHeaders = {};\n    propagatorTypes.forEach((propagatorType) => {\n        switch (propagatorType) {\n            case 'datadog': {\n                Object.assign(tracingHeaders, {\n                    'x-datadog-origin': 'rum',\n                    'x-datadog-parent-id': spanId.toString(),\n                    'x-datadog-sampling-priority': traceSampled ? '1' : '0',\n                    'x-datadog-trace-id': traceId.toString(),\n                });\n                break;\n            }\n            // https://www.w3.org/TR/trace-context/\n            case 'tracecontext': {\n                Object.assign(tracingHeaders, {\n                    traceparent: `00-0000000000000000${toPaddedHexadecimalString(traceId)}-${toPaddedHexadecimalString(spanId)}-0${traceSampled ? '1' : '0'}`,\n                    tracestate: `dd=s:${traceSampled ? '1' : '0'};o:rum`,\n                });\n                break;\n            }\n            // https://github.com/openzipkin/b3-propagation\n            case 'b3': {\n                Object.assign(tracingHeaders, {\n                    b3: `${toPaddedHexadecimalString(traceId)}-${toPaddedHexadecimalString(spanId)}-${traceSampled ? '1' : '0'}`,\n                });\n                break;\n            }\n            case 'b3multi': {\n                Object.assign(tracingHeaders, {\n                    'X-B3-TraceId': toPaddedHexadecimalString(traceId),\n                    'X-B3-SpanId': toPaddedHexadecimalString(spanId),\n                    'X-B3-Sampled': traceSampled ? '1' : '0',\n                });\n                break;\n            }\n        }\n    });\n    if (configuration.propagateTraceBaggage) {\n        const baggageItems = {\n            'session.id': sessionId,\n        };\n        const userId = userContext.getContext().id;\n        if (typeof userId === 'string') {\n            baggageItems['user.id'] = userId;\n        }\n        const accountId = accountContext.getContext().id;\n        if (typeof accountId === 'string') {\n            baggageItems['account.id'] = accountId;\n        }\n        const baggageHeader = Object.entries(baggageItems)\n            .map(([key, value]) => `${key}=${encodeURIComponent(value)}`)\n            .join(',');\n        if (baggageHeader) {\n            tracingHeaders['baggage'] = baggageHeader;\n        }\n    }\n    return tracingHeaders;\n}\n//# sourceMappingURL=tracer.js.map","import { buildUrl, isNonEmptyArray, matchList, ONE_KIBI_BYTE, safeTruncate, tryJsonParse } from '@datadog/browser-core';\n/**\n * arbitrary value, byte precision not needed\n */\nconst GRAPHQL_PAYLOAD_LIMIT = 32 * ONE_KIBI_BYTE;\nexport function extractGraphQlMetadata(request, graphQlConfig) {\n    const metadata = extractGraphQlRequestMetadata(request, graphQlConfig.trackPayload);\n    if (!metadata) {\n        return;\n    }\n    if (graphQlConfig.trackResponseErrors && request.responseBody) {\n        const responseErrors = parseGraphQlResponse(request.responseBody);\n        if (responseErrors) {\n            metadata.error_count = responseErrors.length;\n            metadata.errors = responseErrors;\n        }\n    }\n    return metadata;\n}\nexport function parseGraphQlResponse(responseText) {\n    const response = tryJsonParse(responseText);\n    if (!response || typeof response !== 'object') {\n        return;\n    }\n    const responseObj = response;\n    if (!isNonEmptyArray(responseObj.errors)) {\n        return;\n    }\n    const errors = responseObj.errors.map((error) => {\n        var _a;\n        const graphqlError = {\n            message: error.message,\n            path: error.path,\n            locations: error.locations,\n            code: (_a = error.extensions) === null || _a === void 0 ? void 0 : _a.code,\n        };\n        return graphqlError;\n    });\n    return errors;\n}\nexport function findGraphQlConfiguration(url, configuration) {\n    return configuration.allowedGraphQlUrls.find((graphQlOption) => matchList([graphQlOption.match], url));\n}\nexport function extractGraphQlRequestMetadata(request, trackPayload = false) {\n    let rawMetadata;\n    if (request.method === 'POST') {\n        rawMetadata = extractFromBody(request.requestBody);\n    }\n    else if (request.method === 'GET') {\n        rawMetadata = extractFromUrlQueryParams(request.url);\n    }\n    if (!rawMetadata) {\n        return;\n    }\n    return sanitizeGraphQlMetadata(rawMetadata, trackPayload);\n}\nfunction extractFromBody(requestBody) {\n    if (!requestBody || typeof requestBody !== 'string') {\n        return;\n    }\n    const graphqlBody = tryJsonParse(requestBody);\n    if (!graphqlBody) {\n        return;\n    }\n    return {\n        query: graphqlBody.query,\n        operationName: graphqlBody.operationName,\n        variables: graphqlBody.variables ? JSON.stringify(graphqlBody.variables) : undefined,\n    };\n}\nfunction extractFromUrlQueryParams(url) {\n    const searchParams = buildUrl(url).searchParams;\n    const variablesParam = searchParams.get('variables');\n    const variables = variablesParam && tryJsonParse(variablesParam) !== undefined ? variablesParam : undefined;\n    return {\n        query: searchParams.get('query') || undefined,\n        operationName: searchParams.get('operationName') || undefined,\n        variables,\n    };\n}\nfunction sanitizeGraphQlMetadata(rawMetadata, trackPayload) {\n    let operationType;\n    let payload;\n    let variables;\n    if (rawMetadata.query) {\n        const trimmedQuery = rawMetadata.query.trim();\n        operationType = getOperationType(trimmedQuery);\n        if (trackPayload) {\n            payload = safeTruncate(trimmedQuery, GRAPHQL_PAYLOAD_LIMIT, '...');\n        }\n    }\n    if (rawMetadata.variables) {\n        variables = rawMetadata.variables;\n    }\n    return {\n        operationType,\n        operationName: rawMetadata.operationName,\n        variables,\n        payload,\n    };\n}\nfunction getOperationType(query) {\n    var _a;\n    return (_a = query.match(/^\\s*(query|mutation|subscription)\\b/i)) === null || _a === void 0 ? void 0 : _a[1];\n}\n//# sourceMappingURL=graphql.js.map","import { RequestType, elapsed, initFetchObservable, initXhrObservable, timeStampNow, } from '@datadog/browser-core';\nimport { isAllowedRequestUrl } from './resource/resourceUtils';\nimport { startTracer } from './tracing/tracer';\nimport { findGraphQlConfiguration } from './resource/graphql';\nlet nextRequestIndex = 1;\nexport function startRequestCollection(lifeCycle, configuration, sessionManager, userContext, accountContext) {\n    const tracer = startTracer(configuration, sessionManager, userContext, accountContext);\n    trackXhr(lifeCycle, configuration, tracer);\n    trackFetch(lifeCycle, configuration, tracer);\n}\nexport function trackXhr(lifeCycle, configuration, tracer) {\n    const subscription = initXhrObservable(configuration).subscribe((rawContext) => {\n        const context = rawContext;\n        if (!isAllowedRequestUrl(context.url)) {\n            return;\n        }\n        switch (context.state) {\n            case 'start':\n                tracer.traceXhr(context, context.xhr);\n                context.requestIndex = getNextRequestIndex();\n                lifeCycle.notify(7 /* LifeCycleEventType.REQUEST_STARTED */, {\n                    requestIndex: context.requestIndex,\n                    url: context.url,\n                });\n                break;\n            case 'complete':\n                tracer.clearTracingIfNeeded(context);\n                lifeCycle.notify(8 /* LifeCycleEventType.REQUEST_COMPLETED */, {\n                    ...context,\n                    type: RequestType.XHR,\n                    isAbortedOnStart: false,\n                });\n                break;\n        }\n    });\n    return { stop: () => subscription.unsubscribe() };\n}\nexport function trackFetch(lifeCycle, configuration, tracer) {\n    const subscription = initFetchObservable({\n        responseBodyAction: (context) => {\n            var _a;\n            if ((_a = findGraphQlConfiguration(context.url, configuration)) === null || _a === void 0 ? void 0 : _a.trackResponseErrors) {\n                return 2 /* ResponseBodyAction.COLLECT */;\n            }\n            return 1 /* ResponseBodyAction.WAIT */;\n        },\n    }).subscribe((rawContext) => {\n        var _a;\n        const context = rawContext;\n        if (!isAllowedRequestUrl(context.url)) {\n            return;\n        }\n        switch (context.state) {\n            case 'start':\n                tracer.traceFetch(context);\n                context.requestIndex = getNextRequestIndex();\n                lifeCycle.notify(7 /* LifeCycleEventType.REQUEST_STARTED */, {\n                    requestIndex: context.requestIndex,\n                    url: context.url,\n                });\n                break;\n            case 'resolve':\n                tracer.clearTracingIfNeeded(context);\n                lifeCycle.notify(8 /* LifeCycleEventType.REQUEST_COMPLETED */, {\n                    ...context,\n                    duration: elapsed(context.startClocks.timeStamp, timeStampNow()),\n                    type: RequestType.FETCH,\n                    requestBody: (_a = context.init) === null || _a === void 0 ? void 0 : _a.body,\n                });\n                break;\n        }\n    });\n    return { stop: () => subscription.unsubscribe() };\n}\nfunction getNextRequestIndex() {\n    const result = nextRequestIndex;\n    nextRequestIndex += 1;\n    return result;\n}\n//# sourceMappingURL=requestCollection.js.map","import { isNumber } from '@datadog/browser-core';\nexport function discardNegativeDuration(duration) {\n    return isNumber(duration) && duration < 0 ? undefined : duration;\n}\n//# sourceMappingURL=discardNegativeDuration.js.map","export function isTextNode(node) {\n    return node.nodeType === Node.TEXT_NODE;\n}\nexport function isCommentNode(node) {\n    return node.nodeType === Node.COMMENT_NODE;\n}\nexport function isElementNode(node) {\n    return node.nodeType === Node.ELEMENT_NODE;\n}\nexport function isNodeShadowHost(node) {\n    return isElementNode(node) && Boolean(node.shadowRoot);\n}\nexport function isNodeShadowRoot(node) {\n    const shadowRoot = node;\n    return !!shadowRoot.host && shadowRoot.nodeType === Node.DOCUMENT_FRAGMENT_NODE && isElementNode(shadowRoot.host);\n}\nexport function hasChildNodes(node) {\n    return node.childNodes.length > 0 || isNodeShadowHost(node);\n}\nexport function forEachChildNodes(node, callback) {\n    let child = node.firstChild;\n    while (child) {\n        callback(child);\n        child = child.nextSibling;\n    }\n    if (isNodeShadowHost(node)) {\n        callback(node.shadowRoot);\n    }\n}\n/**\n * Return `host` in case if the current node is a shadow root otherwise will return the `parentNode`\n */\nexport function getParentNode(node) {\n    return isNodeShadowRoot(node) ? node.host : node.parentNode;\n}\n/**\n * Return the parent element, crossing shadow DOM boundaries.\n * If the element is a direct child of a shadow root, returns the shadow host.\n */\nexport function getParentElement(element) {\n    if (element.parentElement) {\n        return element.parentElement;\n    }\n    const parentNode = element.parentNode;\n    if (parentNode && isNodeShadowRoot(parentNode)) {\n        return parentNode.host;\n    }\n    return null;\n}\n//# sourceMappingURL=htmlDomUtils.js.map","import { addEventListeners, dateNow, relativeNow } from '@datadog/browser-core';\n/**\n * first-input timing entry polyfill based on\n * https://github.com/GoogleChrome/web-vitals/blob/master/src/lib/polyfills/firstInputPolyfill.ts\n */\nexport function retrieveFirstInputTiming(configuration, callback) {\n    const startTimeStamp = dateNow();\n    let timingSent = false;\n    const { stop: removeEventListeners } = addEventListeners(configuration, window, [\"click\" /* DOM_EVENT.CLICK */, \"mousedown\" /* DOM_EVENT.MOUSE_DOWN */, \"keydown\" /* DOM_EVENT.KEY_DOWN */, \"touchstart\" /* DOM_EVENT.TOUCH_START */, \"pointerdown\" /* DOM_EVENT.POINTER_DOWN */], (evt) => {\n        // Only count cancelable events, which should trigger behavior important to the user.\n        if (!evt.cancelable) {\n            return;\n        }\n        // This timing will be used to compute the \"first Input delay\", which is the delta between\n        // when the system received the event (e.g. evt.timeStamp) and when it could run the callback\n        // (e.g. performance.now()).\n        const timing = {\n            entryType: 'first-input',\n            processingStart: relativeNow(),\n            processingEnd: relativeNow(),\n            startTime: evt.timeStamp,\n            duration: 0, // arbitrary value to avoid nullable duration and simplify INP logic\n            name: '',\n            cancelable: false,\n            target: null,\n            interactionId: 0,\n            toJSON: () => ({}),\n        };\n        if (evt.type === \"pointerdown\" /* DOM_EVENT.POINTER_DOWN */) {\n            sendTimingIfPointerIsNotCancelled(configuration, timing);\n        }\n        else {\n            sendTiming(timing);\n        }\n    }, { passive: true, capture: true });\n    return { stop: removeEventListeners };\n    /**\n     * Pointer events are a special case, because they can trigger main or compositor thread behavior.\n     * We differentiate these cases based on whether or not we see a pointercancel event, which are\n     * fired when we scroll. If we're scrolling we don't need to report input delay since FID excludes\n     * scrolling and pinch/zooming.\n     */\n    function sendTimingIfPointerIsNotCancelled(configuration, timing) {\n        addEventListeners(configuration, window, [\"pointerup\" /* DOM_EVENT.POINTER_UP */, \"pointercancel\" /* DOM_EVENT.POINTER_CANCEL */], (event) => {\n            if (event.type === \"pointerup\" /* DOM_EVENT.POINTER_UP */) {\n                sendTiming(timing);\n            }\n        }, { once: true });\n    }\n    function sendTiming(timing) {\n        if (!timingSent) {\n            timingSent = true;\n            removeEventListeners();\n            // In some cases the recorded delay is clearly wrong, e.g. it's negative or it's larger than\n            // the time between now and when the page was loaded.\n            // - https://github.com/GoogleChromeLabs/first-input-delay/issues/4\n            // - https://github.com/GoogleChromeLabs/first-input-delay/issues/6\n            // - https://github.com/GoogleChromeLabs/first-input-delay/issues/7\n            const delay = timing.processingStart - timing.startTime;\n            if (delay >= 0 && delay < dateNow() - startTimeStamp) {\n                callback(timing);\n            }\n        }\n    }\n}\n//# sourceMappingURL=firstInputPolyfill.js.map","import { addEventListener, Observable, setTimeout, clearTimeout, monitor } from '@datadog/browser-core';\nimport { hasValidResourceEntryDuration, isAllowedRequestUrl } from '../domain/resource/resourceUtils';\nimport { retrieveFirstInputTiming } from './firstInputPolyfill';\n// We want to use a real enum (i.e. not a const enum) here, to be able to check whether an arbitrary\n// string is an expected performance entry\n// eslint-disable-next-line no-restricted-syntax\nexport var RumPerformanceEntryType;\n(function (RumPerformanceEntryType) {\n    RumPerformanceEntryType[\"EVENT\"] = \"event\";\n    RumPerformanceEntryType[\"FIRST_INPUT\"] = \"first-input\";\n    RumPerformanceEntryType[\"LARGEST_CONTENTFUL_PAINT\"] = \"largest-contentful-paint\";\n    RumPerformanceEntryType[\"LAYOUT_SHIFT\"] = \"layout-shift\";\n    RumPerformanceEntryType[\"LONG_TASK\"] = \"longtask\";\n    RumPerformanceEntryType[\"LONG_ANIMATION_FRAME\"] = \"long-animation-frame\";\n    RumPerformanceEntryType[\"NAVIGATION\"] = \"navigation\";\n    RumPerformanceEntryType[\"PAINT\"] = \"paint\";\n    RumPerformanceEntryType[\"RESOURCE\"] = \"resource\";\n    RumPerformanceEntryType[\"VISIBILITY_STATE\"] = \"visibility-state\";\n})(RumPerformanceEntryType || (RumPerformanceEntryType = {}));\nexport function createPerformanceObservable(configuration, options) {\n    return new Observable((observable) => {\n        if (!window.PerformanceObserver) {\n            return;\n        }\n        const handlePerformanceEntries = (entries) => {\n            const rumPerformanceEntries = filterRumPerformanceEntries(entries);\n            if (rumPerformanceEntries.length > 0) {\n                observable.notify(rumPerformanceEntries);\n            }\n        };\n        let timeoutId;\n        let isObserverInitializing = true;\n        const observer = new PerformanceObserver(monitor((entries) => {\n            // In Safari the performance observer callback is synchronous.\n            // Because the buffered performance entry list can be quite large we delay the computation to prevent the SDK from blocking the main thread on init\n            if (isObserverInitializing) {\n                timeoutId = setTimeout(() => handlePerformanceEntries(entries.getEntries()));\n            }\n            else {\n                handlePerformanceEntries(entries.getEntries());\n            }\n        }));\n        try {\n            observer.observe(options);\n        }\n        catch (_a) {\n            // Some old browser versions (<= chrome 74 ) don't support the PerformanceObserver type and buffered options\n            // In these cases, fallback to getEntriesByType and PerformanceObserver with entryTypes\n            // TODO: remove this fallback in the next major version\n            const fallbackSupportedEntryTypes = [\n                RumPerformanceEntryType.RESOURCE,\n                RumPerformanceEntryType.NAVIGATION,\n                RumPerformanceEntryType.LONG_TASK,\n                RumPerformanceEntryType.PAINT,\n            ];\n            if (fallbackSupportedEntryTypes.includes(options.type)) {\n                if (options.buffered) {\n                    timeoutId = setTimeout(() => handlePerformanceEntries(performance.getEntriesByType(options.type)));\n                }\n                try {\n                    observer.observe({ entryTypes: [options.type] });\n                }\n                catch (_b) {\n                    // Old versions of Safari are throwing \"entryTypes contained only unsupported types\"\n                    // errors when observing only unsupported entry types.\n                    //\n                    // We could use `supportPerformanceTimingEvent` to make sure we don't invoke\n                    // `observer.observe` with an unsupported entry type, but Safari 11 and 12 don't support\n                    // `Performance.supportedEntryTypes`, so doing so would lose support for these versions\n                    // even if they do support the entry type.\n                    return;\n                }\n            }\n        }\n        isObserverInitializing = false;\n        manageResourceTimingBufferFull(configuration);\n        let stopFirstInputTiming;\n        if (!supportPerformanceTimingEvent(RumPerformanceEntryType.FIRST_INPUT) &&\n            options.type === RumPerformanceEntryType.FIRST_INPUT) {\n            ;\n            ({ stop: stopFirstInputTiming } = retrieveFirstInputTiming(configuration, (timing) => {\n                handlePerformanceEntries([timing]);\n            }));\n        }\n        return () => {\n            observer.disconnect();\n            if (stopFirstInputTiming) {\n                stopFirstInputTiming();\n            }\n            clearTimeout(timeoutId);\n        };\n    });\n}\nlet resourceTimingBufferFullListener;\nfunction manageResourceTimingBufferFull(configuration) {\n    if (!resourceTimingBufferFullListener && supportPerformanceObject() && 'addEventListener' in performance) {\n        // https://bugzilla.mozilla.org/show_bug.cgi?id=1559377\n        resourceTimingBufferFullListener = addEventListener(configuration, performance, 'resourcetimingbufferfull', () => {\n            performance.clearResourceTimings();\n        });\n    }\n}\nexport function resetManageResourceTimingBufferFull() {\n    if (resourceTimingBufferFullListener) {\n        resourceTimingBufferFullListener.stop();\n        resourceTimingBufferFullListener = undefined;\n    }\n}\nfunction supportPerformanceObject() {\n    return window.performance !== undefined && 'getEntries' in performance;\n}\nexport function supportPerformanceTimingEvent(entryType) {\n    return (window.PerformanceObserver &&\n        PerformanceObserver.supportedEntryTypes !== undefined &&\n        PerformanceObserver.supportedEntryTypes.includes(entryType));\n}\nfunction filterRumPerformanceEntries(entries) {\n    return entries.filter((entry) => !isForbiddenResource(entry));\n}\nfunction isForbiddenResource(entry) {\n    return (entry.entryType === RumPerformanceEntryType.RESOURCE &&\n        (!isAllowedRequestUrl(entry.name) || !hasValidResourceEntryDuration(entry)));\n}\n//# sourceMappingURL=performanceObservable.js.map","import { matchList, monitor, Observable, timeStampNow, setTimeout, clearTimeout, mockable } from '@datadog/browser-core';\nimport { createPerformanceObservable, RumPerformanceEntryType } from '../browser/performanceObservable';\nimport { isElementNode } from '../browser/htmlDomUtils';\n// Delay to wait for a page activity to validate the tracking process\nexport const PAGE_ACTIVITY_VALIDATION_DELAY = 100;\n// Delay to wait after a page activity to end the tracking process\nexport const PAGE_ACTIVITY_END_DELAY = 100;\nexport const EXCLUDED_MUTATIONS_ATTRIBUTE = 'data-dd-excluded-activity-mutations';\n/**\n * Wait for the page activity end\n *\n * Detection lifecycle:\n * ```\n *                        Wait page activity end\n *              .-------------------'--------------------.\n *              v                                        v\n *     [Wait for a page activity ]          [Wait for a maximum duration]\n *     [timeout: VALIDATION_DELAY]          [  timeout: maxDuration     ]\n *          /                  \\                           |\n *         v                    v                          |\n *  [No page activity]   [Page activity]                   |\n *         |                   |,----------------------.   |\n *         v                   v                       |   |\n *     (Discard)     [Wait for a page activity]        |   |\n *                   [   timeout: END_DELAY   ]        |   |\n *                       /                \\            |   |\n *                      v                  v           |   |\n *             [No page activity]    [Page activity]   |   |\n *                      |                 |            |   |\n *                      |                 '------------'   |\n *                      '-----------. ,--------------------'\n *                                   v\n *                                 (End)\n * ```\n *\n * Note: by assuming that maxDuration is greater than VALIDATION_DELAY, we are sure that if the\n * process is still alive after maxDuration, it has been validated.\n */\nexport function waitPageActivityEnd(lifeCycle, domMutationObservable, windowOpenObservable, configuration, pageActivityEndCallback, maxDuration) {\n    const pageActivityObservable = mockable(createPageActivityObservable)(lifeCycle, domMutationObservable, windowOpenObservable, configuration);\n    let pageActivityEndTimeoutId;\n    let hasCompleted = false;\n    const validationTimeoutId = setTimeout(monitor(() => complete({ hadActivity: false })), PAGE_ACTIVITY_VALIDATION_DELAY);\n    const maxDurationTimeoutId = maxDuration !== undefined\n        ? setTimeout(monitor(() => complete({ hadActivity: true, end: timeStampNow() })), maxDuration)\n        : undefined;\n    const pageActivitySubscription = pageActivityObservable.subscribe(({ isBusy }) => {\n        clearTimeout(validationTimeoutId);\n        clearTimeout(pageActivityEndTimeoutId);\n        const lastChangeTime = timeStampNow();\n        if (!isBusy) {\n            pageActivityEndTimeoutId = setTimeout(monitor(() => complete({ hadActivity: true, end: lastChangeTime })), PAGE_ACTIVITY_END_DELAY);\n        }\n    });\n    const stop = () => {\n        hasCompleted = true;\n        clearTimeout(validationTimeoutId);\n        clearTimeout(pageActivityEndTimeoutId);\n        clearTimeout(maxDurationTimeoutId);\n        pageActivitySubscription.unsubscribe();\n    };\n    function complete(event) {\n        if (hasCompleted) {\n            return;\n        }\n        stop();\n        pageActivityEndCallback(event);\n    }\n    return { stop };\n}\nexport function createPageActivityObservable(lifeCycle, domMutationObservable, windowOpenObservable, configuration) {\n    return new Observable((observable) => {\n        const subscriptions = [];\n        let firstRequestIndex;\n        let pendingRequestsCount = 0;\n        subscriptions.push(domMutationObservable.subscribe((mutations) => {\n            if (!mutations.every(isExcludedMutation)) {\n                notifyPageActivity();\n            }\n        }), windowOpenObservable.subscribe(notifyPageActivity), createPerformanceObservable(configuration, { type: RumPerformanceEntryType.RESOURCE }).subscribe((entries) => {\n            if (entries.some((entry) => !isExcludedUrl(configuration, entry.name))) {\n                notifyPageActivity();\n            }\n        }), lifeCycle.subscribe(7 /* LifeCycleEventType.REQUEST_STARTED */, (startEvent) => {\n            if (isExcludedUrl(configuration, startEvent.url)) {\n                return;\n            }\n            if (firstRequestIndex === undefined) {\n                firstRequestIndex = startEvent.requestIndex;\n            }\n            pendingRequestsCount += 1;\n            notifyPageActivity();\n        }), lifeCycle.subscribe(8 /* LifeCycleEventType.REQUEST_COMPLETED */, (request) => {\n            if (isExcludedUrl(configuration, request.url) ||\n                firstRequestIndex === undefined ||\n                // If the request started before the tracking start, ignore it\n                request.requestIndex < firstRequestIndex) {\n                return;\n            }\n            pendingRequestsCount -= 1;\n            notifyPageActivity();\n        }));\n        return () => {\n            subscriptions.forEach((s) => s.unsubscribe());\n        };\n        function notifyPageActivity() {\n            observable.notify({ isBusy: pendingRequestsCount > 0 });\n        }\n    });\n}\nfunction isExcludedUrl(configuration, requestUrl) {\n    return matchList(configuration.excludedActivityUrls, requestUrl);\n}\nfunction isExcludedMutation(mutation) {\n    const targetElement = mutation.type === 'characterData' ? mutation.target.parentElement : mutation.target;\n    return Boolean(targetElement &&\n        isElementNode(targetElement) &&\n        targetElement.matches(`[${EXCLUDED_MUTATIONS_ATTRIBUTE}], [${EXCLUDED_MUTATIONS_ATTRIBUTE}] *`));\n}\n//# sourceMappingURL=waitPageActivityEnd.js.map","/**\n * Get the action name from the attribute 'data-dd-action-name' on the element or any of its parent.\n * It can also be retrieved from a user defined attribute.\n */\nexport const DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE = 'data-dd-action-name';\nexport const ACTION_NAME_PLACEHOLDER = 'Masked Element';\nexport const ACTION_NAME_MASK = 'xxx';\n//# sourceMappingURL=actionNameConstants.js.map","import { isNodeShadowRoot } from '../browser/htmlDomUtils';\nimport { DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE } from './action/actionNameConstants';\n/**\n * Marker used to indicate shadow DOM boundaries in selectors.\n * Named after the deprecated Shadow DOM v0 '::shadow' pseudo-element which served the same\n * purpose of marking entry into a shadow root.\n * Note: This is NOT a valid CSS selector, it's an internal marker that requires custom\n * parsing logic.\n */\nexport const SHADOW_DOM_MARKER = '::shadow ';\n/**\n * Stable attributes are attributes that are commonly used to identify parts of a UI (ex:\n * component). Those attribute values should not be generated randomly (hardcoded most of the time)\n * and stay the same across deploys. They are not necessarily unique across the document.\n */\nexport const STABLE_ATTRIBUTES = [\n    DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE,\n    // Common test attributes (list provided by google recorder)\n    'data-testid',\n    'data-test',\n    'data-qa',\n    'data-cy',\n    'data-test-id',\n    'data-qa-id',\n    'data-testing',\n    // FullStory decorator attributes:\n    'data-component',\n    'data-element',\n    'data-source-file',\n];\n// Selectors to use if they target a single element on the whole document. Those selectors are\n// considered as \"stable\" and uniquely identify an element regardless of the page state. If we find\n// one, we should consider the selector \"complete\" and stop iterating over ancestors.\nconst GLOBALLY_UNIQUE_SELECTOR_GETTERS = [getStableAttributeSelector, getIDSelector];\n// Selectors to use if they target a single element among an element descendants. Those selectors\n// are more brittle than \"globally unique\" selectors and should be combined with ancestor selectors\n// to improve specificity.\nconst UNIQUE_AMONG_CHILDREN_SELECTOR_GETTERS = [\n    getStableAttributeSelector,\n    getClassSelector,\n    getTagNameSelector,\n];\nexport function getSelectorFromElement(targetElement, actionNameAttribute) {\n    if (!targetElement.isConnected) {\n        // We cannot compute a selector for a detached element, as we don't have access to all of its\n        // parents, and we cannot determine if it's unique in the document.\n        return;\n    }\n    const subtrees = getAllSubtreeTargets(targetElement);\n    const selectorParts = [];\n    for (const { rootNode, target } of subtrees) {\n        const selector = getSelectorFromElementWithinSubtree(target, rootNode, actionNameAttribute);\n        if (!selector) {\n            return undefined;\n        }\n        selectorParts.push(selector);\n    }\n    return selectorParts.join(SHADOW_DOM_MARKER);\n}\n/**\n * Returns all (rootNode, target) pairs from the document down to the element.\n */\nfunction getAllSubtreeTargets(element) {\n    const result = [];\n    let currentTarget = element;\n    while (currentTarget) {\n        const rootNode = currentTarget.getRootNode();\n        result.push({ rootNode, target: currentTarget });\n        if (isNodeShadowRoot(rootNode)) {\n            currentTarget = rootNode.host;\n        }\n        else {\n            break;\n        }\n    }\n    return result.reverse();\n}\n/**\n * Computes a CSS selector for an element within a specific subtree (document or shadow root).\n */\nfunction getSelectorFromElementWithinSubtree(targetElement, rootNode, actionNameAttribute) {\n    let currentSelector;\n    let currentElement = targetElement;\n    while (currentElement && currentElement.nodeName !== 'HTML') {\n        const globallyUniqueSelector = findSelector(currentElement, rootNode, GLOBALLY_UNIQUE_SELECTOR_GETTERS, isSelectorUniqueWithinRoot, actionNameAttribute, currentSelector);\n        if (globallyUniqueSelector) {\n            return combineSelector(globallyUniqueSelector, currentSelector);\n        }\n        const uniqueSelectorAmongChildren = findSelector(currentElement, rootNode, UNIQUE_AMONG_CHILDREN_SELECTOR_GETTERS, isSelectorUniqueAmongSiblings, actionNameAttribute, currentSelector);\n        const elementSelector = uniqueSelectorAmongChildren || getPositionSelector(currentElement);\n        currentSelector = combineSelector(elementSelector, currentSelector);\n        currentElement = currentElement.parentElement;\n    }\n    return currentSelector;\n}\nexport function isGeneratedValue(value) {\n    // To compute the \"URL path group\", the backend replaces every URL path parts as a question mark\n    // if it thinks the part is an identifier. The condition it uses is to checks whether a digit is\n    // present.\n    //\n    // Here, we use the same strategy: if the value contains a digit, we consider it generated. This\n    // strategy might be a bit naive and fail in some cases, but there are many fallbacks to generate\n    // CSS selectors so it should be fine most of the time.\n    return /[0-9]/.test(value);\n}\nexport function getIDSelector(element) {\n    if (element.id && !isGeneratedValue(element.id)) {\n        return `#${CSS.escape(element.id)}`;\n    }\n}\nfunction getClassSelector(element) {\n    if (element.tagName === 'BODY') {\n        return;\n    }\n    const classList = element.classList;\n    for (let i = 0; i < classList.length; i += 1) {\n        const className = classList[i];\n        if (isGeneratedValue(className)) {\n            continue;\n        }\n        return `${CSS.escape(element.tagName)}.${CSS.escape(className)}`;\n    }\n}\nexport function getTagNameSelector(element) {\n    return CSS.escape(element.tagName);\n}\nfunction getStableAttributeSelector(element, actionNameAttribute) {\n    if (actionNameAttribute) {\n        const selector = getAttributeSelector(actionNameAttribute);\n        if (selector) {\n            return selector;\n        }\n    }\n    for (const attributeName of STABLE_ATTRIBUTES) {\n        const selector = getAttributeSelector(attributeName);\n        if (selector) {\n            return selector;\n        }\n    }\n    function getAttributeSelector(attributeName) {\n        if (element.hasAttribute(attributeName)) {\n            return `${CSS.escape(element.tagName)}${getAttributeValueSelector(attributeName, element.getAttribute(attributeName))}`;\n        }\n    }\n}\nexport function getAttributeValueSelector(attributeName, attributeValue) {\n    return `[${attributeName}=\"${CSS.escape(attributeValue)}\"]`;\n}\nfunction getPositionSelector(element) {\n    const nthOfType = getNthOfTypeSelector(element);\n    return `${CSS.escape(element.tagName)}:nth-of-type(${nthOfType})`;\n}\nexport function getNthOfTypeSelector(element) {\n    const parent = element.parentNode;\n    let sibling = parent.firstElementChild;\n    let nthOfType = 1;\n    while (sibling && sibling !== element) {\n        if (sibling.tagName === element.tagName) {\n            nthOfType += 1;\n        }\n        sibling = sibling.nextElementSibling;\n    }\n    return nthOfType;\n}\nfunction findSelector(element, rootNode, selectorGetters, predicate, actionNameAttribute, childSelector) {\n    for (const selectorGetter of selectorGetters) {\n        const elementSelector = selectorGetter(element, actionNameAttribute);\n        if (!elementSelector) {\n            continue;\n        }\n        if (predicate(element, rootNode, elementSelector, childSelector)) {\n            return elementSelector;\n        }\n    }\n}\n/**\n * Check whether the selector is unique within the root node (document or shadow root).\n */\nfunction isSelectorUniqueWithinRoot(_element, rootNode, elementSelector, childSelector) {\n    return rootNode.querySelectorAll(combineSelector(elementSelector, childSelector)).length === 1;\n}\n/**\n * Check whether the selector is unique among the element siblings. In other words, it returns true\n * if \"ELEMENT_PARENT > CHILD_SELECTOR\" returns a single element.\n *\n * @param currentElement - the element being considered while iterating over the target\n * element ancestors.\n * @param _rootNode - the root node (document or shadow root) - unused but required for predicate signature.\n * @param currentElementSelector - a selector that matches the current element. That\n * selector is not a composed selector (i.e. it might be a single tag name, class name...).\n * @param childSelector - child selector is a selector that targets a descendant\n * of the current element. When undefined, the current element is the target element.\n *\n * # Scope selector usage\n *\n * When composed together, the final selector will be joined with `>` operators to make sure we\n * target direct descendants at each level. In this function, we'll use `querySelector` to check if\n * a selector matches descendants of the current element. But by default, the query selector match\n * elements at any level. Example:\n *\n * ```html\n * <main>\n *   <div>\n *     <span></span>\n *   </div>\n *   <marquee>\n *     <div>\n *       <span></span>\n *     </div>\n *   </marquee>\n * </main>\n * ```\n *\n * `sibling.querySelector('DIV > SPAN')` will match both span elements, so we would consider the\n * selector to be not unique, even if it is unique when we'll compose it with the parent with a `>`\n * operator (`MAIN > DIV > SPAN`).\n *\n * To avoid this, we can use the `:scope` selector to make sure the selector starts from the current\n * sibling (i.e. `sibling.querySelector('DIV:scope > SPAN')` will only match the first span).\n *\n * [1]: https://developer.mozilla.org/fr/docs/Web/CSS/:scope\n *\n * # Performance considerations\n *\n * We compute selectors in performance-critical operations (ex: during a click), so we need to make\n * sure the function is as fast as possible. We observed that naively using `querySelectorAll` to\n * check if the selector matches more than 1 element is quite expensive, so we want to avoid it.\n *\n * Because we are iterating the DOM upward and we use that function at every level, we know the\n * child selector is already unique among the current element children, so we don't need to check\n * for the current element subtree.\n *\n * Instead, we can focus on the current element siblings. If we find a single element matching the\n * selector within a sibling, we know that it's not unique. This allows us to use `querySelector`\n * (or `matches`, when the current element is the target element) instead of `querySelectorAll`.\n */\nexport function isSelectorUniqueAmongSiblings(currentElement, _rootNode, currentElementSelector, childSelector) {\n    let isSiblingMatching;\n    if (childSelector === undefined) {\n        // If the child selector is undefined (meaning `currentElement` is the target element, not one\n        // of its ancestor), we need to use `matches` to check if the sibling is matching the selector,\n        // as `querySelector` only returns a descendant of the element.\n        isSiblingMatching = (sibling) => sibling.matches(currentElementSelector);\n    }\n    else {\n        const scopedSelector = combineSelector(`${currentElementSelector}:scope`, childSelector);\n        isSiblingMatching = (sibling) => sibling.querySelector(scopedSelector) !== null;\n    }\n    // Check siblings by iterating directly through previousElementSibling and nextElementSibling.\n    // This works even when parentElement is null (e.g., when parent is a DocumentFragment).\n    // Check previous siblings\n    let sibling = currentElement.previousElementSibling;\n    while (sibling) {\n        if (isSiblingMatching(sibling)) {\n            return false;\n        }\n        sibling = sibling.previousElementSibling;\n    }\n    // Check next siblings\n    sibling = currentElement.nextElementSibling;\n    while (sibling) {\n        if (isSiblingMatching(sibling)) {\n            return false;\n        }\n        sibling = sibling.nextElementSibling;\n    }\n    return true;\n}\nfunction combineSelector(parent, child) {\n    return child ? `${parent}>${child}` : parent;\n}\n//# sourceMappingURL=getSelectorFromElement.js.map","import { DefaultPrivacyLevel } from '@datadog/browser-core';\nexport const NodePrivacyLevel = {\n    IGNORE: 'ignore',\n    HIDDEN: 'hidden',\n    ALLOW: DefaultPrivacyLevel.ALLOW,\n    MASK: DefaultPrivacyLevel.MASK,\n    MASK_USER_INPUT: DefaultPrivacyLevel.MASK_USER_INPUT,\n    MASK_UNLESS_ALLOWLISTED: DefaultPrivacyLevel.MASK_UNLESS_ALLOWLISTED,\n};\nexport const PRIVACY_ATTR_NAME = 'data-dd-privacy';\n// Privacy Attrs\nexport const PRIVACY_ATTR_VALUE_ALLOW = 'allow';\nexport const PRIVACY_ATTR_VALUE_MASK = 'mask';\nexport const PRIVACY_ATTR_VALUE_MASK_USER_INPUT = 'mask-user-input';\nexport const PRIVACY_ATTR_VALUE_MASK_UNLESS_ALLOWLISTED = 'mask-unless-allowlisted';\nexport const PRIVACY_ATTR_VALUE_HIDDEN = 'hidden';\n// Privacy Classes - not all customers can set plain HTML attributes, so support classes too\nexport const PRIVACY_CLASS_PREFIX = 'dd-privacy-';\n// Private Replacement Templates\nexport const CENSORED_STRING_MARK = '***';\nexport const CENSORED_IMG_MARK = 'data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==';\nexport const FORM_PRIVATE_TAG_NAMES = {\n    INPUT: true,\n    OUTPUT: true,\n    TEXTAREA: true,\n    SELECT: true,\n    OPTION: true,\n    DATALIST: true,\n    OPTGROUP: true,\n};\nexport const TEXT_MASKING_CHAR = 'x';\nexport function getPrivacySelector(privacyLevel) {\n    return `[${PRIVACY_ATTR_NAME}=\"${privacyLevel}\"], .${PRIVACY_CLASS_PREFIX}${privacyLevel}`;\n}\n//# sourceMappingURL=privacyConstants.js.map","import { isElementNode, getParentNode, isTextNode } from '../browser/htmlDomUtils';\nimport { NodePrivacyLevel, FORM_PRIVATE_TAG_NAMES, CENSORED_STRING_MARK, getPrivacySelector, TEXT_MASKING_CHAR, PRIVACY_ATTR_NAME, } from './privacyConstants';\nimport { STABLE_ATTRIBUTES } from './getSelectorFromElement';\n/**\n * Get node privacy level by iterating over its ancestors. When the direct parent privacy level is\n * know, it is best to use something like:\n *\n * derivePrivacyLevelGivenParent(getNodeSelfPrivacyLevel(node), parentNodePrivacyLevel)\n */\nexport function getNodePrivacyLevel(node, defaultPrivacyLevel, cache) {\n    if (cache && cache.has(node)) {\n        return cache.get(node);\n    }\n    const parentNode = getParentNode(node);\n    const parentNodePrivacyLevel = parentNode\n        ? getNodePrivacyLevel(parentNode, defaultPrivacyLevel, cache)\n        : defaultPrivacyLevel;\n    const selfNodePrivacyLevel = getNodeSelfPrivacyLevel(node);\n    const nodePrivacyLevel = reducePrivacyLevel(selfNodePrivacyLevel, parentNodePrivacyLevel);\n    if (cache) {\n        cache.set(node, nodePrivacyLevel);\n    }\n    return nodePrivacyLevel;\n}\n/**\n * Reduces the next privacy level based on self + parent privacy levels\n */\nexport function reducePrivacyLevel(childPrivacyLevel, parentNodePrivacyLevel) {\n    switch (parentNodePrivacyLevel) {\n        // These values cannot be overridden\n        case NodePrivacyLevel.HIDDEN:\n        case NodePrivacyLevel.IGNORE:\n            return parentNodePrivacyLevel;\n    }\n    switch (childPrivacyLevel) {\n        case NodePrivacyLevel.ALLOW:\n        case NodePrivacyLevel.MASK:\n        case NodePrivacyLevel.MASK_USER_INPUT:\n        case NodePrivacyLevel.MASK_UNLESS_ALLOWLISTED:\n        case NodePrivacyLevel.HIDDEN:\n        case NodePrivacyLevel.IGNORE:\n            return childPrivacyLevel;\n        default:\n            return parentNodePrivacyLevel;\n    }\n}\n/**\n * Determines the node's own privacy level without checking for ancestors.\n */\nexport function getNodeSelfPrivacyLevel(node) {\n    // Only Element types can have a privacy level set\n    if (!isElementNode(node)) {\n        return;\n    }\n    // Overrules for replay purpose\n    if (node.tagName === 'BASE') {\n        return NodePrivacyLevel.ALLOW;\n    }\n    // Overrules to enforce end-user protection\n    if (node.tagName === 'INPUT') {\n        const inputElement = node;\n        if (inputElement.type === 'password' || inputElement.type === 'email' || inputElement.type === 'tel') {\n            return NodePrivacyLevel.MASK;\n        }\n        if (inputElement.type === 'hidden') {\n            return NodePrivacyLevel.MASK;\n        }\n        const autocomplete = inputElement.getAttribute('autocomplete');\n        // Handle input[autocomplete=cc-number/cc-csc/cc-exp/cc-exp-month/cc-exp-year/new-password/current-password]\n        if (autocomplete && (autocomplete.startsWith('cc-') || autocomplete.endsWith('-password'))) {\n            return NodePrivacyLevel.MASK;\n        }\n    }\n    // Check HTML privacy attributes and classes\n    if (node.matches(getPrivacySelector(NodePrivacyLevel.HIDDEN))) {\n        return NodePrivacyLevel.HIDDEN;\n    }\n    if (node.matches(getPrivacySelector(NodePrivacyLevel.MASK))) {\n        return NodePrivacyLevel.MASK;\n    }\n    if (node.matches(getPrivacySelector(NodePrivacyLevel.MASK_UNLESS_ALLOWLISTED))) {\n        return NodePrivacyLevel.MASK_UNLESS_ALLOWLISTED;\n    }\n    if (node.matches(getPrivacySelector(NodePrivacyLevel.MASK_USER_INPUT))) {\n        return NodePrivacyLevel.MASK_USER_INPUT;\n    }\n    if (node.matches(getPrivacySelector(NodePrivacyLevel.ALLOW))) {\n        return NodePrivacyLevel.ALLOW;\n    }\n    if (shouldIgnoreElement(node)) {\n        return NodePrivacyLevel.IGNORE;\n    }\n}\n/**\n * Helper aiming to unify `mask` and `mask-user-input` privacy levels:\n *\n * In the `mask` case, it is trivial: we should mask the element.\n *\n * In the `mask-user-input` case, we should mask the element only if it is a \"form\" element or the\n * direct parent is a form element for text nodes).\n *\n * Other `shouldMaskNode` cases are edge cases that should not matter too much (ex: should we mask a\n * node if it is ignored or hidden? it doesn't matter since it won't be serialized).\n */\nexport function shouldMaskNode(node, privacyLevel) {\n    switch (privacyLevel) {\n        case NodePrivacyLevel.MASK:\n        case NodePrivacyLevel.HIDDEN:\n        case NodePrivacyLevel.IGNORE:\n            return true;\n        case NodePrivacyLevel.MASK_UNLESS_ALLOWLISTED:\n            if (isTextNode(node)) {\n                // Always return true if our parent is a form element, like MASK_USER_INPUT.\n                // Otherwise, decide whether to mask based on the allowlist.\n                return isFormElement(node.parentNode) ? true : !isAllowlisted(node.textContent || '');\n            }\n            // Always return true if we're a form element, like MASK_USER_INPUT.\n            // Otherwise, return false; MASK_UNLESS_ALLOWLISTED only directly masks text nodes.\n            return isFormElement(node);\n        case NodePrivacyLevel.MASK_USER_INPUT:\n            return isTextNode(node) ? isFormElement(node.parentNode) : isFormElement(node);\n        default:\n            return false;\n    }\n}\nexport function shouldMaskAttribute(tagName, attributeName, attributeValue, nodePrivacyLevel, configuration) {\n    if (nodePrivacyLevel !== NodePrivacyLevel.MASK && nodePrivacyLevel !== NodePrivacyLevel.MASK_UNLESS_ALLOWLISTED) {\n        return false;\n    }\n    if (attributeName === PRIVACY_ATTR_NAME ||\n        STABLE_ATTRIBUTES.includes(attributeName) ||\n        attributeName === configuration.actionNameAttribute) {\n        return false;\n    }\n    switch (attributeName) {\n        case 'title':\n        case 'alt':\n        case 'placeholder':\n        case 'aria-label':\n        case 'name':\n            return true;\n    }\n    if (tagName === 'A' && attributeName === 'href') {\n        return true;\n    }\n    if (tagName === 'IFRAME' && attributeName === 'srcdoc') {\n        return true;\n    }\n    if (attributeValue && attributeName.startsWith('data-')) {\n        return true;\n    }\n    if ((tagName === 'IMG' || tagName === 'SOURCE') && (attributeName === 'src' || attributeName === 'srcset')) {\n        return true;\n    }\n    return false;\n}\nfunction isFormElement(node) {\n    if (!node || node.nodeType !== node.ELEMENT_NODE) {\n        return false;\n    }\n    const element = node;\n    if (element.tagName === 'INPUT') {\n        switch (element.type) {\n            case 'button':\n            case 'color':\n            case 'reset':\n            case 'submit':\n                return false;\n        }\n    }\n    return !!FORM_PRIVATE_TAG_NAMES[element.tagName];\n}\n/**\n * Text censoring non-destructively maintains whitespace characters in order to preserve text shape\n * during replay.\n */\nexport function censorText(text) {\n    return text.replace(/\\S/g, TEXT_MASKING_CHAR);\n}\nexport function getTextContent(textNode, parentNodePrivacyLevel) {\n    var _a;\n    // The parent node may not be a html element which has a tagName attribute.\n    // So just let it be undefined which is ok in this use case.\n    const parentTagName = (_a = textNode.parentElement) === null || _a === void 0 ? void 0 : _a.tagName;\n    let textContent = textNode.textContent || '';\n    const shouldIgnoreWhiteSpace = parentTagName === 'HEAD';\n    if (shouldIgnoreWhiteSpace && !textContent.trim()) {\n        return;\n    }\n    const nodePrivacyLevel = parentNodePrivacyLevel;\n    const isScript = parentTagName === 'SCRIPT';\n    if (isScript) {\n        // For perf reasons, we don't record script (heuristic)\n        textContent = CENSORED_STRING_MARK;\n    }\n    else if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {\n        // Should never occur, but just in case, we set to CENSORED_MARK.\n        textContent = CENSORED_STRING_MARK;\n    }\n    else if (shouldMaskNode(textNode, nodePrivacyLevel)) {\n        if (\n        // Scrambling the child list breaks text nodes for DATALIST/SELECT/OPTGROUP\n        parentTagName === 'DATALIST' ||\n            parentTagName === 'SELECT' ||\n            parentTagName === 'OPTGROUP') {\n            if (!textContent.trim()) {\n                return;\n            }\n        }\n        else if (parentTagName === 'OPTION') {\n            // <Option> has low entropy in charset + text length, so use `CENSORED_STRING_MARK` when masked\n            textContent = CENSORED_STRING_MARK;\n        }\n        else {\n            textContent = censorText(textContent);\n        }\n    }\n    return textContent;\n}\n/**\n * TODO: Preserve CSS element order, and record the presence of the tag, just don't render\n * We don't need this logic on the recorder side.\n * For security related meta's, customer can mask themmanually given they\n * are easy to identify in the HEAD tag.\n */\nexport function shouldIgnoreElement(element) {\n    if (element.nodeName === 'SCRIPT') {\n        return true;\n    }\n    if (element.nodeName === 'LINK') {\n        const relAttribute = getLowerCaseAttribute('rel');\n        return (\n        // Link as script - Ignore only when rel=preload, modulepreload or prefetch\n        (/preload|prefetch/i.test(relAttribute) && getLowerCaseAttribute('as') === 'script') ||\n            // Favicons\n            relAttribute === 'shortcut icon' ||\n            relAttribute === 'icon');\n    }\n    if (element.nodeName === 'META') {\n        const nameAttribute = getLowerCaseAttribute('name');\n        const relAttribute = getLowerCaseAttribute('rel');\n        const propertyAttribute = getLowerCaseAttribute('property');\n        return (\n        // Favicons\n        /^msapplication-tile(image|color)$/.test(nameAttribute) ||\n            nameAttribute === 'application-name' ||\n            relAttribute === 'icon' ||\n            relAttribute === 'apple-touch-icon' ||\n            relAttribute === 'shortcut icon' ||\n            // Description\n            nameAttribute === 'keywords' ||\n            nameAttribute === 'description' ||\n            // Social\n            /^(og|twitter|fb):/.test(propertyAttribute) ||\n            /^(og|twitter):/.test(nameAttribute) ||\n            nameAttribute === 'pinterest' ||\n            // Robots\n            nameAttribute === 'robots' ||\n            nameAttribute === 'googlebot' ||\n            nameAttribute === 'bingbot' ||\n            // Http headers. Ex: X-UA-Compatible, Content-Type, Content-Language, cache-control,\n            // X-Translated-By\n            element.hasAttribute('http-equiv') ||\n            // Authorship\n            nameAttribute === 'author' ||\n            nameAttribute === 'generator' ||\n            nameAttribute === 'framework' ||\n            nameAttribute === 'publisher' ||\n            nameAttribute === 'progid' ||\n            /^article:/.test(propertyAttribute) ||\n            /^product:/.test(propertyAttribute) ||\n            // Verification\n            nameAttribute === 'google-site-verification' ||\n            nameAttribute === 'yandex-verification' ||\n            nameAttribute === 'csrf-token' ||\n            nameAttribute === 'p:domain_verify' ||\n            nameAttribute === 'verify-v1' ||\n            nameAttribute === 'verification' ||\n            nameAttribute === 'shopify-checkout-api-token');\n    }\n    function getLowerCaseAttribute(name) {\n        return (element.getAttribute(name) || '').toLowerCase();\n    }\n    return false;\n}\nexport function isAllowlisted(text) {\n    var _a;\n    if (!text || !text.trim()) {\n        return true;\n    }\n    // We are using toLocaleLowerCase when adding to the allowlist to avoid case sensitivity\n    // so we need to do the same here\n    return ((_a = window.$DD_ALLOW) === null || _a === void 0 ? void 0 : _a.has(text.toLocaleLowerCase())) || false;\n}\nexport function maskDisallowedTextContent(text, fixedMask) {\n    if (isAllowlisted(text)) {\n        return text;\n    }\n    return fixedMask || censorText(text);\n}\n//# sourceMappingURL=privacy.js.map","import { noop } from '@datadog/browser-core';\nimport { RumEventType } from '../rawRumEvent.types';\nexport function trackEventCounts({ lifeCycle, isChildEvent, onChange: callback = noop, }) {\n    const eventCounts = {\n        errorCount: 0,\n        longTaskCount: 0,\n        resourceCount: 0,\n        actionCount: 0,\n        frustrationCount: 0,\n    };\n    const subscription = lifeCycle.subscribe(13 /* LifeCycleEventType.RUM_EVENT_COLLECTED */, (event) => {\n        var _a;\n        if (event.type === 'view' || event.type === 'vital' || !isChildEvent(event)) {\n            return;\n        }\n        switch (event.type) {\n            case RumEventType.ERROR:\n                eventCounts.errorCount += 1;\n                callback();\n                break;\n            case RumEventType.ACTION:\n                eventCounts.actionCount += 1;\n                if (event.action.frustration) {\n                    eventCounts.frustrationCount += event.action.frustration.type.length;\n                }\n                callback();\n                break;\n            case RumEventType.LONG_TASK:\n                eventCounts.longTaskCount += 1;\n                callback();\n                break;\n            case RumEventType.RESOURCE:\n                if (!((_a = event._dd) === null || _a === void 0 ? void 0 : _a.discarded)) {\n                    eventCounts.resourceCount += 1;\n                    callback();\n                }\n                break;\n        }\n    });\n    return {\n        stop: () => {\n            subscription.unsubscribe();\n        },\n        eventCounts,\n    };\n}\n//# sourceMappingURL=trackEventCounts.js.map","import { ONE_MINUTE, generateUUID, createValueHistory, elapsed, combine } from '@datadog/browser-core';\nimport { trackEventCounts } from './trackEventCounts';\nexport const EVENT_CONTEXT_TIME_OUT_DELAY = 5 * ONE_MINUTE; // arbitrary\nexport function startEventTracker(lifeCycle) {\n    // Used by actions to associate events with actions.\n    const history = createValueHistory({ expireDelay: EVENT_CONTEXT_TIME_OUT_DELAY });\n    // Used by manual actions and resources that use named keys to match the start and stop calls.\n    const keyedEvents = new Map();\n    function cleanUpEvent(event) {\n        var _a;\n        keyedEvents.delete(event.key);\n        (_a = event.eventCounts) === null || _a === void 0 ? void 0 : _a.stop();\n    }\n    function discardAll() {\n        keyedEvents.forEach((event) => {\n            cleanUpEvent(event);\n        });\n        history.reset();\n    }\n    const sessionRenewalSubscription = lifeCycle.subscribe(10 /* LifeCycleEventType.SESSION_RENEWED */, discardAll);\n    function start(key, startClocks, data, options) {\n        const id = generateUUID();\n        const historyEntry = history.add(id, startClocks.relative);\n        const existing = keyedEvents.get(key);\n        if (existing) {\n            cleanUpEvent(existing);\n        }\n        const eventCounts = (options === null || options === void 0 ? void 0 : options.isChildEvent)\n            ? trackEventCounts({\n                lifeCycle,\n                isChildEvent: options.isChildEvent(id),\n            })\n            : undefined;\n        const trackedEventData = {\n            id,\n            key,\n            startClocks,\n            data,\n            historyEntry,\n            eventCounts,\n        };\n        keyedEvents.set(key, trackedEventData);\n        return trackedEventData;\n    }\n    function stop(key, stopClocks, extraData) {\n        var _a;\n        const event = keyedEvents.get(key);\n        if (!event) {\n            return undefined;\n        }\n        const finalData = extraData ? combine(event.data, extraData) : event.data;\n        event.historyEntry.close(stopClocks.relative);\n        const duration = elapsed(event.startClocks.timeStamp, stopClocks.timeStamp);\n        const counts = (_a = event.eventCounts) === null || _a === void 0 ? void 0 : _a.eventCounts;\n        cleanUpEvent(event);\n        return {\n            ...finalData,\n            id: event.id,\n            startClocks: event.startClocks,\n            duration,\n            counts,\n        };\n    }\n    function discard(key) {\n        var _a;\n        const event = keyedEvents.get(key);\n        if (!event) {\n            return undefined;\n        }\n        const counts = (_a = event.eventCounts) === null || _a === void 0 ? void 0 : _a.eventCounts;\n        cleanUpEvent(event);\n        event.historyEntry.remove();\n        return {\n            ...event.data,\n            id: event.id,\n            startClocks: event.startClocks,\n            counts,\n        };\n    }\n    function findId(startTime) {\n        return history.findAll(startTime);\n    }\n    function getCounts(key) {\n        var _a, _b;\n        return (_b = (_a = keyedEvents.get(key)) === null || _a === void 0 ? void 0 : _a.eventCounts) === null || _b === void 0 ? void 0 : _b.eventCounts;\n    }\n    function stopTracker() {\n        sessionRenewalSubscription.unsubscribe();\n        discardAll();\n        history.stop();\n    }\n    return {\n        start,\n        stop,\n        discard,\n        getCounts,\n        findId,\n        stopAll: stopTracker,\n    };\n}\n//# sourceMappingURL=eventTracker.js.map","import { safeTruncate, ONE_KIBI_BYTE } from '@datadog/browser-core';\nimport { STABLE_ATTRIBUTES, isGeneratedValue, getIDSelector, getTagNameSelector, getNthOfTypeSelector, getAttributeValueSelector, } from './getSelectorFromElement';\nconst FILTERED_TAGNAMES = ['HTML', 'BODY'];\n/**\n * arbitrary value, we want to truncate the selector if it exceeds the limit\n */\nexport const CHARACTER_LIMIT = 2 * ONE_KIBI_BYTE;\n/**\n * Safe attributes that can be collected without PII concerns.\n * These are commonly used for testing, accessibility, and UI identification.\n */\nexport const SAFE_ATTRIBUTES = STABLE_ATTRIBUTES.concat([\n    'role',\n    'type',\n    'disabled',\n    'readonly',\n    'tabindex',\n    'draggable',\n    'target',\n    'rel',\n    'download',\n    'method',\n    'action',\n    'enctype',\n    'autocomplete',\n]);\n/**\n * Extracts a selector string from a MouseEvent composedPath.\n *\n * This function:\n * 1. Filters out non-Element items (Document, Window, ShadowRoot)\n * 2. Extracts a selector string from each element\n * 3. Truncates the selector string if it exceeds the character limit\n * 4. Returns the selector string\n *\n * @param composedPath - The composedPath from a MouseEvent\n * @returns A selector string\n */\nexport function getComposedPathSelector(composedPath, actionNameAttribute) {\n    // Filter to only include Element nodes\n    const elements = composedPath.filter((el) => el instanceof Element && !FILTERED_TAGNAMES.includes(el.tagName));\n    if (elements.length === 0) {\n        return '';\n    }\n    const allowedAttributes = actionNameAttribute ? [actionNameAttribute].concat(SAFE_ATTRIBUTES) : SAFE_ATTRIBUTES;\n    let result = '';\n    for (const element of elements) {\n        const part = getSelectorStringFromElement(element, allowedAttributes);\n        result += part;\n        if (result.length >= CHARACTER_LIMIT) {\n            return safeTruncate(result, CHARACTER_LIMIT);\n        }\n    }\n    return result;\n}\n/**\n * Extracts a selector string from an element.\n */\nfunction getSelectorStringFromElement(element, allowedAttributes) {\n    const tagName = getTagNameSelector(element);\n    const id = getIDSelector(element);\n    const classes = getElementClassesString(element);\n    const attributes = extractSafeAttributesString(element, allowedAttributes);\n    const positionData = computePositionDataString(element);\n    return `${tagName}${id || ''}${attributes}${classes}${positionData};`;\n}\nfunction getElementClassesString(element) {\n    return Array.from(element.classList)\n        .filter((c) => !isGeneratedValue(c))\n        .sort()\n        .map((c) => `.${CSS.escape(c)}`)\n        .join('');\n}\n/**\n * Computes the nthChild and nthOfType positions for an element.\n *\n * @param element - The element to compute the position data for\n * @returns A string of the form \":nth-child(1):nth-of-type(1)\"\n */\nfunction computePositionDataString(element) {\n    const siblings = Array.from(element.parentNode.children);\n    if (siblings.length <= 1) {\n        return '';\n    }\n    const sameTypeSiblings = siblings.filter((sibling) => sibling.tagName === element.tagName);\n    const nthChild = siblings.indexOf(element);\n    const nthOfType = getNthOfTypeSelector(element);\n    return `:nth-child(${nthChild + 1})${sameTypeSiblings.length > 1 ? `:nth-of-type(${nthOfType})` : ''}`;\n}\n/**\n * Extracts only the safe (allowlisted) attributes from an element.\n * The attributes are sorted alphabetically by name.\n */\nfunction extractSafeAttributesString(element, allowedAttributes) {\n    const result = [];\n    const attributes = Array.from(element.attributes);\n    for (const attribute of attributes) {\n        if (allowedAttributes.includes(attribute.name)) {\n            result.push(getAttributeValueSelector(attribute.name, attribute.value));\n        }\n    }\n    return result.sort().join('');\n}\n//# sourceMappingURL=getComposedPathSelector.js.map","import { ONE_SECOND, clearTimeout, setTimeout } from '@datadog/browser-core';\nexport const MAX_DURATION_BETWEEN_CLICKS = ONE_SECOND;\nexport const MAX_DISTANCE_BETWEEN_CLICKS = 100;\nexport function createClickChain(firstClick, onFinalize) {\n    const bufferedClicks = [];\n    let status = 0 /* ClickChainStatus.WaitingForMoreClicks */;\n    let maxDurationBetweenClicksTimeoutId;\n    appendClick(firstClick);\n    function appendClick(click) {\n        click.stopObservable.subscribe(tryFinalize);\n        bufferedClicks.push(click);\n        clearTimeout(maxDurationBetweenClicksTimeoutId);\n        maxDurationBetweenClicksTimeoutId = setTimeout(dontAcceptMoreClick, MAX_DURATION_BETWEEN_CLICKS);\n    }\n    function tryFinalize() {\n        if (status === 1 /* ClickChainStatus.WaitingForClicksToStop */ && bufferedClicks.every((click) => click.isStopped())) {\n            status = 2 /* ClickChainStatus.Finalized */;\n            onFinalize(bufferedClicks);\n        }\n    }\n    function dontAcceptMoreClick() {\n        clearTimeout(maxDurationBetweenClicksTimeoutId);\n        if (status === 0 /* ClickChainStatus.WaitingForMoreClicks */) {\n            status = 1 /* ClickChainStatus.WaitingForClicksToStop */;\n            tryFinalize();\n        }\n    }\n    return {\n        tryAppend: (click) => {\n            if (status !== 0 /* ClickChainStatus.WaitingForMoreClicks */) {\n                return false;\n            }\n            if (bufferedClicks.length > 0 &&\n                !areEventsSimilar(bufferedClicks[bufferedClicks.length - 1].event, click.event)) {\n                dontAcceptMoreClick();\n                return false;\n            }\n            appendClick(click);\n            return true;\n        },\n        stop: () => {\n            dontAcceptMoreClick();\n        },\n    };\n}\n/**\n * Checks whether two events are similar by comparing their target, position and timestamp\n */\nfunction areEventsSimilar(first, second) {\n    return (first.target === second.target &&\n        mouseEventDistance(first, second) <= MAX_DISTANCE_BETWEEN_CLICKS &&\n        first.timeStamp - second.timeStamp <= MAX_DURATION_BETWEEN_CLICKS);\n}\nfunction mouseEventDistance(origin, other) {\n    return Math.sqrt(Math.pow(origin.clientX - other.clientX, 2) + Math.pow(origin.clientY - other.clientY, 2));\n}\n//# sourceMappingURL=clickChain.js.map","import { ExperimentalFeature, isExperimentalFeatureEnabled, safeTruncate } from '@datadog/browser-core';\nimport { getPrivacySelector, NodePrivacyLevel } from '../privacyConstants';\nimport { getNodePrivacyLevel, maskDisallowedTextContent, shouldMaskNode, shouldMaskAttribute } from '../privacy';\nimport { isElementNode, getParentElement } from '../../browser/htmlDomUtils';\nimport { DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE, ACTION_NAME_PLACEHOLDER, } from './actionNameConstants';\nexport function getActionNameFromElement(element, rumConfiguration, nodePrivacyLevel = NodePrivacyLevel.ALLOW) {\n    const nodePrivacyLevelCache = new Map();\n    const { actionNameAttribute: userProgrammaticAttribute } = rumConfiguration;\n    // Proceed to get the action name in two steps:\n    // * first, get the name programmatically, explicitly defined by the user.\n    // * then, if privacy is set to mask, return a placeholder for the undefined.\n    // * if privacy is not set to mask, use strategies that are known to return good results.\n    //   Those strategies will be used on the element and a few parents, but it's likely that they won't succeed at all.\n    // * if no name is found this way, use strategies returning less accurate names as a fallback.\n    //   Those are much likely to succeed.\n    const defaultActionName = getActionNameFromElementProgrammatically(element, DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE) ||\n        (userProgrammaticAttribute && getActionNameFromElementProgrammatically(element, userProgrammaticAttribute));\n    if (defaultActionName) {\n        return { name: defaultActionName, nameSource: \"custom_attribute\" /* ActionNameSource.CUSTOM_ATTRIBUTE */ };\n    }\n    else if (nodePrivacyLevel === NodePrivacyLevel.MASK) {\n        return { name: ACTION_NAME_PLACEHOLDER, nameSource: \"mask_placeholder\" /* ActionNameSource.MASK_PLACEHOLDER */ };\n    }\n    return (getActionNameFromElementForStrategies(element, priorityStrategies, rumConfiguration, nodePrivacyLevelCache) ||\n        getActionNameFromElementForStrategies(element, fallbackStrategies, rumConfiguration, nodePrivacyLevelCache) || {\n        name: '',\n        nameSource: \"blank\" /* ActionNameSource.BLANK */,\n    });\n}\nfunction getActionNameFromElementProgrammatically(targetElement, programmaticAttribute) {\n    // We don't use getActionNameFromElementForStrategies here, because we want to consider all parents,\n    // without limit. It is up to the user to declare a relevant naming strategy.\n    const elementWithAttribute = closestShadowAware(targetElement, `[${programmaticAttribute}]`);\n    if (!elementWithAttribute) {\n        return;\n    }\n    const name = elementWithAttribute.getAttribute(programmaticAttribute);\n    return truncate(normalizeWhitespace(name.trim()));\n}\nfunction closestShadowAware(element, selector) {\n    let current = element;\n    while (current) {\n        if (current.matches(selector)) {\n            return current;\n        }\n        current = getParentElement(current);\n    }\n    return null;\n}\nconst priorityStrategies = [\n    // associated LABEL text\n    (element, rumConfiguration, nodePrivacyLevelCache) => {\n        if ('labels' in element && element.labels && element.labels.length > 0) {\n            return getActionNameFromTextualContent(element.labels[0], rumConfiguration, nodePrivacyLevelCache);\n        }\n    },\n    // INPUT button (and associated) value\n    (element) => {\n        if (element.nodeName === 'INPUT') {\n            const input = element;\n            const type = input.getAttribute('type');\n            if (type === 'button' || type === 'submit' || type === 'reset') {\n                return { name: input.value, nameSource: \"text_content\" /* ActionNameSource.TEXT_CONTENT */ };\n            }\n        }\n    },\n    // BUTTON, LABEL or button-like element text\n    (element, rumConfiguration, nodePrivacyLevelCache) => {\n        if (element.nodeName === 'BUTTON' || element.nodeName === 'LABEL' || element.getAttribute('role') === 'button') {\n            return getActionNameFromTextualContent(element, rumConfiguration, nodePrivacyLevelCache);\n        }\n    },\n    (element, rumConfiguration, nodePrivacyLevelCache) => getActionNameFromStandardAttribute(element, 'aria-label', rumConfiguration, nodePrivacyLevelCache),\n    // associated element text designated by the aria-labelledby attribute\n    (element, rumConfiguration, nodePrivacyLevelCache) => {\n        const labelledByAttribute = element.getAttribute('aria-labelledby');\n        if (labelledByAttribute) {\n            return {\n                name: labelledByAttribute\n                    .split(/\\s+/)\n                    .map((id) => getElementById(element, id))\n                    .filter((label) => Boolean(label))\n                    .map((element) => getTextualContent(element, rumConfiguration, nodePrivacyLevelCache))\n                    .join(' '),\n                nameSource: \"text_content\" /* ActionNameSource.TEXT_CONTENT */,\n            };\n        }\n    },\n    (element, rumConfiguration, nodePrivacyLevelCache) => getActionNameFromStandardAttribute(element, 'alt', rumConfiguration, nodePrivacyLevelCache),\n    (element, rumConfiguration, nodePrivacyLevelCache) => getActionNameFromStandardAttribute(element, 'name', rumConfiguration, nodePrivacyLevelCache),\n    (element, rumConfiguration, nodePrivacyLevelCache) => getActionNameFromStandardAttribute(element, 'title', rumConfiguration, nodePrivacyLevelCache),\n    (element, rumConfiguration, nodePrivacyLevelCache) => getActionNameFromStandardAttribute(element, 'placeholder', rumConfiguration, nodePrivacyLevelCache),\n    // SELECT first OPTION text\n    (element, rumConfiguration, nodePrivacyLevelCache) => {\n        if ('options' in element && element.options.length > 0) {\n            return getActionNameFromTextualContent(element.options[0], rumConfiguration, nodePrivacyLevelCache);\n        }\n    },\n];\nconst fallbackStrategies = [\n    (element, rumConfiguration, nodePrivacyLevelCache) => getActionNameFromTextualContent(element, rumConfiguration, nodePrivacyLevelCache),\n];\n/**\n * Iterates over the target element and its parent, using the strategies list to get an action name.\n * Each strategies are applied on each element, stopping as soon as a non-empty value is returned.\n */\nconst MAX_PARENTS_TO_CONSIDER = 10;\nfunction getActionNameFromElementForStrategies(targetElement, strategies, rumConfiguration, nodePrivacyLevelCache) {\n    let element = targetElement;\n    let recursionCounter = 0;\n    while (recursionCounter <= MAX_PARENTS_TO_CONSIDER &&\n        element &&\n        element.nodeName !== 'BODY' &&\n        element.nodeName !== 'HTML' &&\n        element.nodeName !== 'HEAD') {\n        for (const strategy of strategies) {\n            const actionName = strategy(element, rumConfiguration, nodePrivacyLevelCache);\n            if (actionName) {\n                const { name, nameSource } = actionName;\n                const trimmedName = name && name.trim();\n                if (trimmedName) {\n                    return { name: truncate(normalizeWhitespace(trimmedName)), nameSource };\n                }\n            }\n        }\n        // Consider a FORM as a contextual limit to get the action name.  This is experimental and may\n        // be reconsidered in the future.\n        if (element.nodeName === 'FORM') {\n            break;\n        }\n        element = getParentElement(element);\n        recursionCounter += 1;\n    }\n}\nfunction normalizeWhitespace(s) {\n    return s.replace(/\\s+/g, ' ');\n}\nfunction truncate(s) {\n    return s.length > 100 ? `${safeTruncate(s, 100)} [...]` : s;\n}\nfunction getElementById(refElement, id) {\n    const rootNode = refElement.getRootNode();\n    if (rootNode instanceof ShadowRoot) {\n        const shadowElement = rootNode.getElementById(id);\n        if (shadowElement) {\n            return shadowElement;\n        }\n    }\n    // Use the element ownerDocument here, because tests are executed in an iframe, so\n    // document.getElementById won't work.\n    return refElement.ownerDocument ? refElement.ownerDocument.getElementById(id) : null;\n}\nfunction getActionNameFromStandardAttribute(element, attribute, rumConfiguration, nodePrivacyLevelCache) {\n    const { enablePrivacyForActionName, defaultPrivacyLevel } = rumConfiguration;\n    let attributeValue = element.getAttribute(attribute);\n    if (attributeValue && enablePrivacyForActionName) {\n        const nodePrivacyLevel = getNodePrivacyLevel(element, defaultPrivacyLevel, nodePrivacyLevelCache);\n        if (shouldMaskAttribute(element.tagName, attribute, attributeValue, nodePrivacyLevel, rumConfiguration)) {\n            attributeValue = maskDisallowedTextContent(attributeValue, ACTION_NAME_PLACEHOLDER);\n        }\n    }\n    else if (!attributeValue) {\n        attributeValue = '';\n    }\n    return {\n        name: attributeValue,\n        nameSource: \"standard_attribute\" /* ActionNameSource.STANDARD_ATTRIBUTE */,\n    };\n}\nfunction getActionNameFromTextualContent(element, rumConfiguration, nodePrivacyLevelCache) {\n    return {\n        name: getTextualContent(element, rumConfiguration, nodePrivacyLevelCache) || '',\n        nameSource: \"text_content\" /* ActionNameSource.TEXT_CONTENT */,\n    };\n}\nfunction getTextualContent(element, rumConfiguration, nodePrivacyLevelCache) {\n    if (element.isContentEditable) {\n        return;\n    }\n    const { enablePrivacyForActionName, actionNameAttribute: userProgrammaticAttribute, defaultPrivacyLevel, } = rumConfiguration;\n    if (isExperimentalFeatureEnabled(ExperimentalFeature.USE_TREE_WALKER_FOR_ACTION_NAME)) {\n        return getTextualContentWithTreeWalker(element, userProgrammaticAttribute, enablePrivacyForActionName, defaultPrivacyLevel, nodePrivacyLevelCache);\n    }\n    if ('innerText' in element) {\n        let text = element.innerText;\n        const removeTextFromElements = (query) => {\n            const list = element.querySelectorAll(query);\n            for (let index = 0; index < list.length; index += 1) {\n                const element = list[index];\n                if ('innerText' in element) {\n                    const textToReplace = element.innerText;\n                    if (textToReplace && textToReplace.trim().length > 0) {\n                        text = text.replace(textToReplace, '');\n                    }\n                }\n            }\n        };\n        // remove the text of elements with programmatic attribute value\n        removeTextFromElements(`[${DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE}]`);\n        if (userProgrammaticAttribute) {\n            removeTextFromElements(`[${userProgrammaticAttribute}]`);\n        }\n        if (enablePrivacyForActionName) {\n            // remove the text of elements with privacy override\n            removeTextFromElements(`${getPrivacySelector(NodePrivacyLevel.HIDDEN)}, ${getPrivacySelector(NodePrivacyLevel.MASK)}`);\n        }\n        return text;\n    }\n    return element.textContent;\n}\nfunction getTextualContentWithTreeWalker(element, userProgrammaticAttribute, privacyEnabledActionName, defaultPrivacyLevel, nodePrivacyLevelCache) {\n    const walker = document.createTreeWalker(element, \n    // eslint-disable-next-line no-bitwise\n    NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT, rejectInvisibleOrMaskedElementsFilter);\n    let text = '';\n    while (walker.nextNode()) {\n        const node = walker.currentNode;\n        if (isElementNode(node)) {\n            if (\n            // Following InnerText rendering spec https://html.spec.whatwg.org/multipage/dom.html#rendered-text-collection-steps\n            node.nodeName === 'BR' ||\n                node.nodeName === 'P' ||\n                ['block', 'flex', 'grid', 'list-item', 'table', 'table-caption'].includes(getComputedStyle(node).display)) {\n                text += ' ';\n            }\n            continue; // skip element nodes\n        }\n        text += node.textContent || '';\n    }\n    return text.replace(/\\s+/g, ' ').trim();\n    function rejectInvisibleOrMaskedElementsFilter(node) {\n        const nodeSelfPrivacyLevel = getNodePrivacyLevel(node, defaultPrivacyLevel, nodePrivacyLevelCache);\n        if (privacyEnabledActionName && nodeSelfPrivacyLevel && shouldMaskNode(node, nodeSelfPrivacyLevel)) {\n            return NodeFilter.FILTER_REJECT;\n        }\n        if (isElementNode(node)) {\n            if (node.hasAttribute(DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE) ||\n                (userProgrammaticAttribute && node.hasAttribute(userProgrammaticAttribute))) {\n                return NodeFilter.FILTER_REJECT;\n            }\n            const style = getComputedStyle(node);\n            if (style.visibility !== 'visible' ||\n                style.display === 'none' ||\n                (style.contentVisibility && style.contentVisibility !== 'visible')\n            // contentVisibility is not supported in all browsers, so we need to check it\n            ) {\n                return NodeFilter.FILTER_REJECT;\n            }\n        }\n        return NodeFilter.FILTER_ACCEPT;\n    }\n}\n//# sourceMappingURL=getActionNameFromElement.js.map","import { addEventListener } from '@datadog/browser-core';\nexport function listenActionEvents(configuration, { onPointerDown, onPointerUp }) {\n    let selectionEmptyAtPointerDown;\n    let userActivity = {\n        selection: false,\n        input: false,\n        scroll: false,\n    };\n    let clickContext;\n    const listeners = [\n        addEventListener(configuration, window, \"pointerdown\" /* DOM_EVENT.POINTER_DOWN */, (event) => {\n            if (isValidPointerEvent(event)) {\n                selectionEmptyAtPointerDown = isSelectionEmpty();\n                userActivity = {\n                    selection: false,\n                    input: false,\n                    scroll: false,\n                };\n                clickContext = onPointerDown(event);\n            }\n        }, { capture: true }),\n        addEventListener(configuration, window, \"selectionchange\" /* DOM_EVENT.SELECTION_CHANGE */, () => {\n            if (!selectionEmptyAtPointerDown || !isSelectionEmpty()) {\n                userActivity.selection = true;\n            }\n        }, { capture: true }),\n        addEventListener(configuration, window, \"scroll\" /* DOM_EVENT.SCROLL */, () => {\n            userActivity.scroll = true;\n        }, { capture: true, passive: true }),\n        addEventListener(configuration, window, \"pointerup\" /* DOM_EVENT.POINTER_UP */, (event) => {\n            if (isValidPointerEvent(event) && clickContext) {\n                // Use a scoped variable to make sure the value is not changed by other clicks\n                const localUserActivity = userActivity;\n                onPointerUp(clickContext, event, () => localUserActivity);\n                clickContext = undefined;\n            }\n        }, { capture: true }),\n        addEventListener(configuration, window, \"input\" /* DOM_EVENT.INPUT */, () => {\n            userActivity.input = true;\n        }, { capture: true }),\n    ];\n    return {\n        stop: () => {\n            listeners.forEach((listener) => listener.stop());\n        },\n    };\n}\nfunction isSelectionEmpty() {\n    const selection = window.getSelection();\n    return !selection || selection.isCollapsed;\n}\nfunction isValidPointerEvent(event) {\n    return (event.target instanceof Element &&\n        // Only consider 'primary' pointer events for now. Multi-touch support could be implemented in\n        // the future.\n        event.isPrimary !== false);\n}\n//# sourceMappingURL=listenActionEvents.js.map","import { ONE_SECOND } from '@datadog/browser-core';\nimport { FrustrationType } from '../../rawRumEvent.types';\nconst MIN_CLICKS_PER_SECOND_TO_CONSIDER_RAGE = 3;\nexport function computeFrustration(clicks, rageClick) {\n    if (isRage(clicks)) {\n        rageClick.addFrustration(FrustrationType.RAGE_CLICK);\n        if (clicks.some(isDead)) {\n            rageClick.addFrustration(FrustrationType.DEAD_CLICK);\n        }\n        if (rageClick.hasError) {\n            rageClick.addFrustration(FrustrationType.ERROR_CLICK);\n        }\n        return { isRage: true };\n    }\n    const hasSelectionChanged = clicks.some((click) => click.getUserActivity().selection);\n    clicks.forEach((click) => {\n        if (click.hasError) {\n            click.addFrustration(FrustrationType.ERROR_CLICK);\n        }\n        if (isDead(click) &&\n            // Avoid considering clicks part of a double-click or triple-click selections as dead clicks\n            !hasSelectionChanged) {\n            click.addFrustration(FrustrationType.DEAD_CLICK);\n        }\n    });\n    return { isRage: false };\n}\nexport function isRage(clicks) {\n    if (clicks.some((click) => click.getUserActivity().selection || click.getUserActivity().scroll)) {\n        return false;\n    }\n    for (let i = 0; i < clicks.length - (MIN_CLICKS_PER_SECOND_TO_CONSIDER_RAGE - 1); i += 1) {\n        if (clicks[i + MIN_CLICKS_PER_SECOND_TO_CONSIDER_RAGE - 1].event.timeStamp - clicks[i].event.timeStamp <=\n            ONE_SECOND) {\n            return true;\n        }\n    }\n    return false;\n}\nconst DEAD_CLICK_EXCLUDE_SELECTOR = \n// inputs that don't trigger a meaningful event like \"input\" when clicked, including textual\n// inputs (using a negative selector is shorter here)\n'input:not([type=\"checkbox\"]):not([type=\"radio\"]):not([type=\"button\"]):not([type=\"submit\"]):not([type=\"reset\"]):not([type=\"range\"]),' +\n    'textarea,' +\n    'select,' +\n    // contenteditable and their descendants don't always trigger meaningful changes when manipulated\n    '[contenteditable],' +\n    '[contenteditable] *,' +\n    // canvas, as there is no good way to detect activity occurring on them\n    'canvas,' +\n    // links that are interactive (have an href attribute) or any of their descendants, as they can\n    // open a new tab or navigate to a hash without triggering a meaningful event\n    'a[href],' +\n    'a[href] *';\nexport function isDead(click) {\n    if (click.hasPageActivity || click.getUserActivity().input || click.getUserActivity().scroll) {\n        return false;\n    }\n    let target = click.event.target;\n    if (target.tagName === 'LABEL' && target.hasAttribute('for')) {\n        target = document.getElementById(target.getAttribute('for'));\n    }\n    return !target || !target.matches(DEAD_CLICK_EXCLUDE_SELECTOR);\n}\n//# sourceMappingURL=computeFrustration.js.map","import { elapsed, ONE_SECOND, relativeNow } from '@datadog/browser-core';\n// Maximum duration for click actions\nexport const CLICK_ACTION_MAX_DURATION = 10 * ONE_SECOND;\nexport const interactionSelectorCache = new Map();\nexport function getInteractionSelector(relativeTimestamp) {\n    const selector = interactionSelectorCache.get(relativeTimestamp);\n    interactionSelectorCache.delete(relativeTimestamp);\n    return selector;\n}\nexport function updateInteractionSelector(relativeTimestamp, selector) {\n    interactionSelectorCache.set(relativeTimestamp, selector);\n    interactionSelectorCache.forEach((_, relativeTimestamp) => {\n        if (elapsed(relativeTimestamp, relativeNow()) > CLICK_ACTION_MAX_DURATION) {\n            interactionSelectorCache.delete(relativeTimestamp);\n        }\n    });\n}\n//# sourceMappingURL=interactionSelectorCache.js.map","export function isActionChildEvent(id) {\n    return (event) => event.action !== undefined && event.action.id !== undefined && event.action.id.includes(id);\n}\n//# sourceMappingURL=isActionChildEvent.js.map","import { timeStampNow, Observable, timeStampToClocks, relativeToClocks, generateUUID } from '@datadog/browser-core';\nimport { isNodeShadowHost } from '../../browser/htmlDomUtils';\nimport { ActionType } from '../../rawRumEvent.types';\nimport { PAGE_ACTIVITY_VALIDATION_DELAY, waitPageActivityEnd } from '../waitPageActivityEnd';\nimport { getSelectorFromElement } from '../getSelectorFromElement';\nimport { getNodePrivacyLevel } from '../privacy';\nimport { NodePrivacyLevel } from '../privacyConstants';\nimport { startEventTracker } from '../eventTracker';\nimport { getComposedPathSelector } from '../getComposedPathSelector';\nimport { createClickChain } from './clickChain';\nimport { getActionNameFromElement } from './getActionNameFromElement';\nimport { listenActionEvents } from './listenActionEvents';\nimport { computeFrustration } from './computeFrustration';\nimport { CLICK_ACTION_MAX_DURATION, updateInteractionSelector } from './interactionSelectorCache';\nimport { isActionChildEvent } from './isActionChildEvent';\nexport function trackClickActions(lifeCycle, domMutationObservable, windowOpenObservable, configuration) {\n    const actionTracker = startEventTracker(lifeCycle);\n    const stopObservable = new Observable();\n    let currentClickChain;\n    lifeCycle.subscribe(5 /* LifeCycleEventType.VIEW_ENDED */, stopClickChain);\n    lifeCycle.subscribe(11 /* LifeCycleEventType.PAGE_MAY_EXIT */, stopClickChain);\n    const { stop: stopActionEventsListener } = listenActionEvents(configuration, {\n        onPointerDown: (pointerDownEvent) => processPointerDown(configuration, lifeCycle, domMutationObservable, pointerDownEvent, windowOpenObservable),\n        onPointerUp: ({ clickActionBase, hadActivityOnPointerDown }, startEvent, getUserActivity) => {\n            startClickAction(configuration, lifeCycle, domMutationObservable, windowOpenObservable, actionTracker, stopObservable, appendClickToClickChain, clickActionBase, startEvent, getUserActivity, hadActivityOnPointerDown);\n        },\n    });\n    return {\n        stop: () => {\n            stopClickChain();\n            stopObservable.notify();\n            stopActionEventsListener();\n            actionTracker.stopAll();\n        },\n        findActionId: actionTracker.findId,\n    };\n    function appendClickToClickChain(click) {\n        if (!currentClickChain || !currentClickChain.tryAppend(click)) {\n            const rageClick = click.clone();\n            currentClickChain = createClickChain(click, (clicks) => {\n                finalizeClicks(clicks, rageClick);\n                // Clear the reference to allow garbage collection. Without this, the finalize callback\n                // retains a closure reference to the old click chain, preventing it from being cleaned up\n                // and causing a memory leak as click chains accumulate over time.\n                currentClickChain = undefined;\n            });\n        }\n    }\n    function stopClickChain() {\n        if (currentClickChain) {\n            currentClickChain.stop();\n        }\n    }\n}\nfunction processPointerDown(configuration, lifeCycle, domMutationObservable, pointerDownEvent, windowOpenObservable) {\n    const targetForPrivacy = configuration.betaTrackActionsInShadowDom\n        ? getEventTarget(pointerDownEvent)\n        : pointerDownEvent.target;\n    let nodePrivacyLevel;\n    if (configuration.enablePrivacyForActionName) {\n        nodePrivacyLevel = getNodePrivacyLevel(targetForPrivacy, configuration.defaultPrivacyLevel);\n    }\n    else {\n        nodePrivacyLevel = NodePrivacyLevel.ALLOW;\n    }\n    if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {\n        return undefined;\n    }\n    const clickActionBase = computeClickActionBase(pointerDownEvent, nodePrivacyLevel, configuration);\n    let hadActivityOnPointerDown = false;\n    waitPageActivityEnd(lifeCycle, domMutationObservable, windowOpenObservable, configuration, (pageActivityEndEvent) => {\n        hadActivityOnPointerDown = pageActivityEndEvent.hadActivity;\n    }, \n    // We don't care about the activity duration, we just want to know whether an activity did happen\n    // within the \"validation delay\" or not. Limit the duration so the callback is called sooner.\n    PAGE_ACTIVITY_VALIDATION_DELAY);\n    return { clickActionBase, hadActivityOnPointerDown: () => hadActivityOnPointerDown };\n}\nfunction startClickAction(configuration, lifeCycle, domMutationObservable, windowOpenObservable, actionTracker, stopObservable, appendClickToClickChain, clickActionBase, startEvent, getUserActivity, hadActivityOnPointerDown) {\n    var _a;\n    const click = newClick(lifeCycle, actionTracker, getUserActivity, clickActionBase, startEvent);\n    appendClickToClickChain(click);\n    const selector = (_a = clickActionBase === null || clickActionBase === void 0 ? void 0 : clickActionBase.target) === null || _a === void 0 ? void 0 : _a.selector;\n    if (selector) {\n        updateInteractionSelector(startEvent.timeStamp, selector);\n    }\n    const { stop: stopWaitPageActivityEnd } = waitPageActivityEnd(lifeCycle, domMutationObservable, windowOpenObservable, configuration, (pageActivityEndEvent) => {\n        if (pageActivityEndEvent.hadActivity && pageActivityEndEvent.end < click.startClocks.timeStamp) {\n            // If the clock is looking weird, just discard the click\n            click.discard();\n        }\n        else {\n            if (pageActivityEndEvent.hadActivity) {\n                click.stop(pageActivityEndEvent.end);\n            }\n            else if (hadActivityOnPointerDown()) {\n                click.stop(\n                // using the click start as activity end, so the click will have some activity but its\n                // duration will be 0 (as the activity started before the click start)\n                click.startClocks.timeStamp);\n            }\n            else {\n                click.stop();\n            }\n        }\n    }, CLICK_ACTION_MAX_DURATION);\n    const viewEndedSubscription = lifeCycle.subscribe(5 /* LifeCycleEventType.VIEW_ENDED */, ({ endClocks }) => {\n        click.stop(endClocks.timeStamp);\n    });\n    const pageMayExitSubscription = lifeCycle.subscribe(11 /* LifeCycleEventType.PAGE_MAY_EXIT */, () => {\n        click.stop(timeStampNow());\n    });\n    const stopSubscription = stopObservable.subscribe(() => {\n        click.stop();\n    });\n    click.stopObservable.subscribe(() => {\n        pageMayExitSubscription.unsubscribe();\n        viewEndedSubscription.unsubscribe();\n        stopWaitPageActivityEnd();\n        stopSubscription.unsubscribe();\n    });\n}\nfunction computeClickActionBase(event, nodePrivacyLevel, configuration) {\n    const target = configuration.betaTrackActionsInShadowDom ? getEventTarget(event) : event.target;\n    const rect = target.getBoundingClientRect();\n    const selector = getSelectorFromElement(target, configuration.actionNameAttribute);\n    const composedPathSelector = getComposedPathSelector(event.composedPath(), configuration.actionNameAttribute);\n    if (selector) {\n        updateInteractionSelector(event.timeStamp, selector);\n    }\n    const { name, nameSource } = getActionNameFromElement(target, configuration, nodePrivacyLevel);\n    return {\n        type: ActionType.CLICK,\n        target: {\n            width: Math.round(rect.width),\n            height: Math.round(rect.height),\n            selector,\n            composedPathSelector: composedPathSelector || undefined,\n        },\n        position: {\n            // Use clientX and Y because for SVG element offsetX and Y are relatives to the <svg> element\n            x: Math.round(event.clientX - rect.left),\n            y: Math.round(event.clientY - rect.top),\n        },\n        name,\n        nameSource,\n    };\n}\nfunction getEventTarget(event) {\n    if (event.composed && isNodeShadowHost(event.target) && typeof event.composedPath === 'function') {\n        const composedPath = event.composedPath();\n        if (composedPath.length > 0 && composedPath[0] instanceof Element) {\n            return composedPath[0];\n        }\n    }\n    return event.target;\n}\nfunction newClick(lifeCycle, actionTracker, getUserActivity, clickActionBase, startEvent) {\n    const clickKey = generateUUID();\n    const startClocks = relativeToClocks(startEvent.timeStamp);\n    const startedClickAction = actionTracker.start(clickKey, startClocks, clickActionBase, {\n        isChildEvent: isActionChildEvent,\n    });\n    lifeCycle.notify(15 /* LifeCycleEventType.ACTION_STARTED */, startedClickAction);\n    let status = 0 /* ClickStatus.ONGOING */;\n    let actionTrackerFinishedEvent;\n    const frustrationTypes = [];\n    const stopObservable = new Observable();\n    function stop(activityEndTime) {\n        if (status !== 0 /* ClickStatus.ONGOING */) {\n            return;\n        }\n        status = 1 /* ClickStatus.STOPPED */;\n        actionTrackerFinishedEvent = activityEndTime\n            ? actionTracker.stop(clickKey, timeStampToClocks(activityEndTime))\n            : actionTracker.discard(clickKey);\n        stopObservable.notify();\n    }\n    return {\n        event: startEvent,\n        stop,\n        stopObservable,\n        get hasError() {\n            var _a;\n            const currentCounts = (_a = actionTrackerFinishedEvent === null || actionTrackerFinishedEvent === void 0 ? void 0 : actionTrackerFinishedEvent.counts) !== null && _a !== void 0 ? _a : actionTracker.getCounts(clickKey);\n            return currentCounts ? currentCounts.errorCount > 0 : false;\n        },\n        get hasPageActivity() {\n            return actionTrackerFinishedEvent && 'duration' in actionTrackerFinishedEvent;\n        },\n        getUserActivity,\n        addFrustration: (frustrationType) => {\n            frustrationTypes.push(frustrationType);\n        },\n        get startClocks() {\n            return startClocks;\n        },\n        isStopped: () => status === 1 /* ClickStatus.STOPPED */ || status === 2 /* ClickStatus.FINALIZED */,\n        clone: () => newClick(lifeCycle, actionTracker, getUserActivity, clickActionBase, startEvent),\n        validate: (domEvents) => {\n            stop();\n            if (status !== 1 /* ClickStatus.STOPPED */) {\n                return;\n            }\n            if (!actionTrackerFinishedEvent) {\n                return;\n            }\n            const clickAction = {\n                frustrationTypes,\n                events: domEvents !== null && domEvents !== void 0 ? domEvents : [startEvent],\n                event: startEvent,\n                ...actionTrackerFinishedEvent,\n                counts: actionTrackerFinishedEvent.counts, // This is needed to satisfy the type checker\n            };\n            lifeCycle.notify(0 /* LifeCycleEventType.AUTO_ACTION_COMPLETED */, clickAction);\n            status = 2 /* ClickStatus.FINALIZED */;\n        },\n        discard: () => {\n            stop();\n            status = 2 /* ClickStatus.FINALIZED */;\n        },\n    };\n}\nexport function finalizeClicks(clicks, rageClick) {\n    const { isRage } = computeFrustration(clicks, rageClick);\n    if (isRage) {\n        clicks.forEach((click) => click.discard());\n        rageClick.stop(timeStampNow());\n        rageClick.validate(clicks.map((click) => click.event));\n    }\n    else {\n        rageClick.discard();\n        clicks.forEach((click) => click.validate());\n    }\n}\n//# sourceMappingURL=trackClickActions.js.map","import { noop, toServerDuration, SKIPPED, addDuration } from '@datadog/browser-core';\nimport { discardNegativeDuration } from '../discardNegativeDuration';\nimport { RumEventType } from '../../rawRumEvent.types';\nimport { trackClickActions } from './trackClickActions';\nimport { trackManualActions } from './trackManualActions';\nexport const LONG_TASK_START_TIME_CORRECTION = 1;\nexport function startActionCollection(lifeCycle, hooks, domMutationObservable, windowOpenObservable, configuration) {\n    const { unsubscribe: unsubscribeAutoAction } = lifeCycle.subscribe(0 /* LifeCycleEventType.AUTO_ACTION_COMPLETED */, (action) => {\n        lifeCycle.notify(12 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, processAction(action));\n    });\n    const stopClickActions = noop;\n    let clickActions;\n    if (configuration.trackUserInteractions) {\n        clickActions = trackClickActions(lifeCycle, domMutationObservable, windowOpenObservable, configuration);\n    }\n    const manualActions = trackManualActions(lifeCycle, (action) => {\n        lifeCycle.notify(12 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, processAction(action));\n    });\n    const actionContexts = {\n        findActionId: (startTime) => {\n            var _a;\n            const manualActionId = manualActions.findActionId(startTime);\n            const clickActionId = (_a = clickActions === null || clickActions === void 0 ? void 0 : clickActions.findActionId(startTime)) !== null && _a !== void 0 ? _a : [];\n            return manualActionId.concat(clickActionId);\n        },\n    };\n    hooks.register(0 /* HookNames.Assemble */, ({ startTime, eventType }) => {\n        if (eventType !== RumEventType.ERROR &&\n            eventType !== RumEventType.RESOURCE &&\n            eventType !== RumEventType.LONG_TASK) {\n            return SKIPPED;\n        }\n        // Long tasks triggered by interaction handlers (pointerup, click, etc.)\n        // can have a start time slightly before the interaction timestamp (long_task.start_time < action.start_time).\n        // This likely happens because the interaction timestamp is recorded during the event dispatch,\n        // not at the beginning of the rendering frame. I observed a difference of < 1 ms in my tests.\n        // Fixes flakiness in test: \"associates long tasks to interaction actions\"\n        const correctedStartTime = eventType === RumEventType.LONG_TASK ? addDuration(startTime, LONG_TASK_START_TIME_CORRECTION) : startTime;\n        const actionId = actionContexts.findActionId(correctedStartTime);\n        if (!actionId.length) {\n            return SKIPPED;\n        }\n        return {\n            type: eventType,\n            action: { id: actionId },\n        };\n    });\n    hooks.register(1 /* HookNames.AssembleTelemetry */, ({ startTime }) => ({\n        // todo: fix telemetry event type\n        action: { id: actionContexts.findActionId(startTime) },\n    }));\n    return {\n        addAction: manualActions.addAction,\n        startAction: manualActions.startAction,\n        stopAction: manualActions.stopAction,\n        actionContexts,\n        stop: () => {\n            unsubscribeAutoAction();\n            stopClickActions();\n            manualActions.stop();\n            clickActions === null || clickActions === void 0 ? void 0 : clickActions.stop();\n        },\n    };\n}\nfunction processAction(action) {\n    var _a, _b, _c, _d;\n    const isAuto = isAutoAction(action);\n    const loadingTime = discardNegativeDuration(toServerDuration(action.duration));\n    return {\n        rawRumEvent: {\n            type: RumEventType.ACTION,\n            date: action.startClocks.timeStamp,\n            action: {\n                id: action.id,\n                target: { name: action.name },\n                type: action.type,\n                ...(loadingTime !== undefined && { loading_time: loadingTime }),\n                ...(action.counts && {\n                    error: { count: action.counts.errorCount },\n                    long_task: { count: action.counts.longTaskCount },\n                    resource: { count: action.counts.resourceCount },\n                }),\n                frustration: { type: action.frustrationTypes },\n            },\n            ...(isAuto\n                ? {\n                    _dd: {\n                        action: {\n                            target: {\n                                selector: ((_a = action.target) === null || _a === void 0 ? void 0 : _a.selector) || undefined,\n                                width: ((_b = action.target) === null || _b === void 0 ? void 0 : _b.width) || undefined,\n                                height: ((_c = action.target) === null || _c === void 0 ? void 0 : _c.height) || undefined,\n                                composed_path_selector: (_d = action.target) === null || _d === void 0 ? void 0 : _d.composedPathSelector,\n                            },\n                            position: action.position,\n                            name_source: action.nameSource,\n                        },\n                    },\n                }\n                : { context: action.context }),\n        },\n        duration: action.duration,\n        startClocks: action.startClocks,\n        domainContext: isAuto ? { events: action.events } : { handlingStack: action.handlingStack },\n    };\n}\nfunction isAutoAction(action) {\n    return 'events' in action;\n}\n//# sourceMappingURL=actionCollection.js.map","import { clocksNow, generateUUID } from '@datadog/browser-core';\nimport { ActionType as ActionTypeEnum, FrustrationType as FrustrationTypeEnum } from '../../rawRumEvent.types';\nimport { startEventTracker } from '../eventTracker';\nimport { isActionChildEvent } from './isActionChildEvent';\nexport function trackManualActions(lifeCycle, onManualActionCompleted) {\n    const actionTracker = startEventTracker(lifeCycle);\n    function startManualAction(name, options = {}, startClocks = clocksNow()) {\n        var _a;\n        const lookupKey = (_a = options.actionKey) !== null && _a !== void 0 ? _a : name;\n        const startedManualAction = actionTracker.start(lookupKey, startClocks, {\n            name,\n            ...options,\n        }, { isChildEvent: isActionChildEvent });\n        lifeCycle.notify(15 /* LifeCycleEventType.ACTION_STARTED */, startedManualAction);\n    }\n    function stopManualAction(name, options = {}, stopClocks = clocksNow()) {\n        var _a;\n        const lookupKey = (_a = options.actionKey) !== null && _a !== void 0 ? _a : name;\n        const stopped = actionTracker.stop(lookupKey, stopClocks, options);\n        if (!stopped) {\n            return;\n        }\n        const frustrationTypes = [];\n        if (stopped.counts && stopped.counts.errorCount > 0) {\n            frustrationTypes.push(FrustrationTypeEnum.ERROR_CLICK);\n        }\n        const manualAction = {\n            ...stopped,\n            type: stopped.type || ActionTypeEnum.CUSTOM,\n            frustrationTypes,\n        };\n        onManualActionCompleted(manualAction);\n    }\n    function addInstantAction(action) {\n        onManualActionCompleted({ id: generateUUID(), frustrationTypes: [], ...action });\n    }\n    return {\n        addAction: addInstantAction,\n        startAction: startManualAction,\n        stopAction: stopManualAction,\n        findActionId: actionTracker.findId,\n        stop: actionTracker.stopAll,\n    };\n}\n//# sourceMappingURL=trackManualActions.js.map","import { isError, computeRawError } from '../error/error';\nimport { mergeObservables, Observable } from '../../tools/observable';\nimport { ConsoleApiName, globalConsole } from '../../tools/display';\nimport { callMonitored } from '../../tools/monitor';\nimport { sanitize } from '../../tools/serialisation/sanitize';\nimport { jsonStringify } from '../../tools/serialisation/jsonStringify';\nimport { ErrorSource } from '../error/error.types';\nimport { computeStackTrace } from '../../tools/stackTrace/computeStackTrace';\nimport { createHandlingStack, formatErrorMessage } from '../../tools/stackTrace/handlingStack';\nimport { clocksNow } from '../../tools/utils/timeUtils';\nlet consoleObservablesByApi = {};\nexport function initConsoleObservable(apis) {\n    const consoleObservables = apis.map((api) => {\n        if (!consoleObservablesByApi[api]) {\n            consoleObservablesByApi[api] = createConsoleObservable(api); // we are sure that the observable created for this api will yield the expected ConsoleLog type\n        }\n        return consoleObservablesByApi[api];\n    });\n    return mergeObservables(...consoleObservables);\n}\nexport function resetConsoleObservable() {\n    consoleObservablesByApi = {};\n}\nfunction createConsoleObservable(api) {\n    return new Observable((observable) => {\n        const originalConsoleApi = globalConsole[api];\n        globalConsole[api] = (...params) => {\n            originalConsoleApi.apply(console, params);\n            const handlingStack = createHandlingStack('console error');\n            callMonitored(() => {\n                observable.notify(buildConsoleLog(params, api, handlingStack));\n            });\n        };\n        return () => {\n            globalConsole[api] = originalConsoleApi;\n        };\n    });\n}\nfunction buildConsoleLog(params, api, handlingStack) {\n    const message = params.map((param) => formatConsoleParameters(param)).join(' ');\n    if (api === ConsoleApiName.error) {\n        const firstErrorParam = params.find(isError);\n        const rawError = computeRawError({\n            originalError: firstErrorParam,\n            handlingStack,\n            startClocks: clocksNow(),\n            source: ErrorSource.CONSOLE,\n            handling: \"handled\" /* ErrorHandling.HANDLED */,\n            nonErrorPrefix: \"Provided\" /* NonErrorPrefix.PROVIDED */,\n            // if no good stack is computed from the error, let's not use the fallback stack message\n            // advising the user to use an instance of Error, as console.error is commonly used without an\n            // Error instance.\n            useFallbackStack: false,\n        });\n        // Use the full log message as the error message instead of just the error instance message.\n        rawError.message = message;\n        return {\n            api,\n            message,\n            handlingStack,\n            error: rawError,\n        };\n    }\n    return {\n        api,\n        message,\n        error: undefined,\n        handlingStack,\n    };\n}\nfunction formatConsoleParameters(param) {\n    if (typeof param === 'string') {\n        return sanitize(param);\n    }\n    if (isError(param)) {\n        return formatErrorMessage(computeStackTrace(param));\n    }\n    return jsonStringify(sanitize(param), undefined, 2);\n}\n//# sourceMappingURL=consoleObservable.js.map","import { toStackTraceString } from '../../tools/stackTrace/handlingStack';\nimport { monitor } from '../../tools/monitor';\nimport { mergeObservables, Observable } from '../../tools/observable';\nimport { addEventListener } from '../../browser/addEventListener';\nimport { safeTruncate } from '../../tools/utils/stringUtils';\nimport { ErrorSource } from '../error/error.types';\nimport { clocksNow } from '../../tools/utils/timeUtils';\nexport const RawReportType = {\n    intervention: 'intervention',\n    deprecation: 'deprecation',\n    cspViolation: 'csp_violation',\n};\nexport function initReportObservable(configuration, apis) {\n    const observables = [];\n    if (apis.includes(RawReportType.cspViolation)) {\n        observables.push(createCspViolationReportObservable(configuration));\n    }\n    const reportTypes = apis.filter((api) => api !== RawReportType.cspViolation);\n    if (reportTypes.length) {\n        observables.push(createReportObservable(reportTypes));\n    }\n    return mergeObservables(...observables);\n}\nfunction createReportObservable(reportTypes) {\n    return new Observable((observable) => {\n        if (!window.ReportingObserver) {\n            return;\n        }\n        const handleReports = monitor((reports, _) => reports.forEach((report) => observable.notify(buildRawReportErrorFromReport(report))));\n        const observer = new window.ReportingObserver(handleReports, {\n            types: reportTypes,\n            buffered: true,\n        });\n        observer.observe();\n        return () => {\n            observer.disconnect();\n        };\n    });\n}\nfunction createCspViolationReportObservable(configuration) {\n    return new Observable((observable) => {\n        const { stop } = addEventListener(configuration, document, \"securitypolicyviolation\" /* DOM_EVENT.SECURITY_POLICY_VIOLATION */, (event) => {\n            observable.notify(buildRawReportErrorFromCspViolation(event));\n        });\n        return stop;\n    });\n}\nfunction buildRawReportErrorFromReport(report) {\n    const { type, body } = report;\n    return buildRawReportError({\n        type: body.id,\n        message: `${type}: ${body.message}`,\n        originalError: report,\n        stack: buildStack(body.id, body.message, body.sourceFile, body.lineNumber, body.columnNumber),\n    });\n}\nfunction buildRawReportErrorFromCspViolation(event) {\n    const message = `'${event.blockedURI}' blocked by '${event.effectiveDirective}' directive`;\n    return buildRawReportError({\n        type: event.effectiveDirective,\n        message: `${RawReportType.cspViolation}: ${message}`,\n        originalError: event,\n        csp: {\n            disposition: event.disposition,\n        },\n        stack: buildStack(event.effectiveDirective, event.originalPolicy\n            ? `${message} of the policy \"${safeTruncate(event.originalPolicy, 100, '...')}\"`\n            : 'no policy', event.sourceFile, event.lineNumber, event.columnNumber),\n    });\n}\nfunction buildRawReportError(partial) {\n    return {\n        startClocks: clocksNow(),\n        source: ErrorSource.REPORT,\n        handling: \"unhandled\" /* ErrorHandling.UNHANDLED */,\n        ...partial,\n    };\n}\nfunction buildStack(name, message, sourceFile, lineNumber, columnNumber) {\n    return sourceFile\n        ? toStackTraceString({\n            name,\n            message,\n            stack: [\n                {\n                    func: '?',\n                    url: sourceFile,\n                    line: lineNumber !== null && lineNumber !== void 0 ? lineNumber : undefined,\n                    column: columnNumber !== null && columnNumber !== void 0 ? columnNumber : undefined,\n                },\n            ],\n        })\n        : undefined;\n}\n//# sourceMappingURL=reportObservable.js.map","import { Observable, ErrorSource, generateUUID, computeRawError, combine, } from '@datadog/browser-core';\nimport { RumEventType } from '../../rawRumEvent.types';\nimport { trackConsoleError } from './trackConsoleError';\nimport { trackReportError } from './trackReportError';\nexport function startErrorCollection(lifeCycle, configuration, bufferedDataObservable) {\n    const errorObservable = new Observable();\n    bufferedDataObservable.subscribe((bufferedData) => {\n        if (bufferedData.type === 0 /* BufferedDataType.RUNTIME_ERROR */) {\n            errorObservable.notify(bufferedData.error);\n        }\n    });\n    trackConsoleError(errorObservable);\n    trackReportError(configuration, errorObservable);\n    errorObservable.subscribe((error) => lifeCycle.notify(14 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, { error }));\n    return doStartErrorCollection(lifeCycle);\n}\nexport function doStartErrorCollection(lifeCycle) {\n    lifeCycle.subscribe(14 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, ({ error }) => {\n        lifeCycle.notify(12 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, processError(error));\n    });\n    return {\n        addError: ({ error, handlingStack, componentStack, startClocks, context }) => {\n            const rawError = computeRawError({\n                originalError: error,\n                handlingStack,\n                componentStack,\n                startClocks,\n                nonErrorPrefix: \"Provided\" /* NonErrorPrefix.PROVIDED */,\n                source: ErrorSource.CUSTOM,\n                handling: \"handled\" /* ErrorHandling.HANDLED */,\n            });\n            rawError.context = combine(rawError.context, context);\n            lifeCycle.notify(14 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, { error: rawError });\n        },\n    };\n}\nfunction processError(error) {\n    const rawRumEvent = {\n        date: error.startClocks.timeStamp,\n        error: {\n            id: generateUUID(),\n            message: error.message,\n            source: error.source,\n            stack: error.stack,\n            handling_stack: error.handlingStack,\n            component_stack: error.componentStack,\n            type: error.type,\n            handling: error.handling,\n            causes: error.causes,\n            source_type: 'browser',\n            fingerprint: error.fingerprint,\n            csp: error.csp,\n        },\n        type: RumEventType.ERROR,\n        context: error.context,\n    };\n    const domainContext = {\n        error: error.originalError,\n        handlingStack: error.handlingStack,\n    };\n    return {\n        rawRumEvent,\n        startClocks: error.startClocks,\n        domainContext,\n    };\n}\n//# sourceMappingURL=errorCollection.js.map","import { initConsoleObservable, ConsoleApiName } from '@datadog/browser-core';\nexport function trackConsoleError(errorObservable) {\n    const subscription = initConsoleObservable([ConsoleApiName.error]).subscribe((consoleLog) => errorObservable.notify(consoleLog.error));\n    return {\n        stop: () => {\n            subscription.unsubscribe();\n        },\n    };\n}\n//# sourceMappingURL=trackConsoleError.js.map","import { initReportObservable, RawReportType } from '@datadog/browser-core';\nexport function trackReportError(configuration, errorObservable) {\n    const subscription = initReportObservable(configuration, [\n        RawReportType.cspViolation,\n        RawReportType.intervention,\n    ]).subscribe((rawError) => errorObservable.notify(rawError));\n    return {\n        stop: () => {\n            subscription.unsubscribe();\n        },\n    };\n}\n//# sourceMappingURL=trackReportError.js.map","import { ONE_SECOND } from './utils/timeUtils';\nimport { requestIdleCallback } from './requestIdleCallback';\n/**\n * Maximum delay before starting to execute tasks in the queue. We don't want to wait too long\n * before running tasks, as it might hurt reliability (ex: if the user navigates away, we might lose\n * the opportunity to send some data). We also don't want to run tasks too often, as it might hurt\n * performance.\n */\nconst IDLE_CALLBACK_TIMEOUT = ONE_SECOND;\n/**\n * Maximum amount of time allocated to running tasks when a timeout (`IDLE_CALLBACK_TIMEOUT`) is\n * reached. We should not run tasks for too long as it will hurt performance, but we should still\n * run some tasks to avoid postponing them forever.\n *\n * Rational: Running tasks for 30ms every second (IDLE_CALLBACK_TIMEOUT) should be acceptable.\n */\nexport const MAX_EXECUTION_TIME_ON_TIMEOUT = 30;\nexport function createTaskQueue() {\n    const pendingTasks = [];\n    function run(deadline) {\n        let executionTimeRemaining;\n        // `deadline` can be null when `requestIdleCallback` is replaced by a page-injected polyfill\n        // (e.g. `setTimeout(cb, 0)` in some WKWebViews) that invokes the callback with no argument.\n        if (!deadline || deadline.didTimeout) {\n            const start = performance.now();\n            executionTimeRemaining = () => MAX_EXECUTION_TIME_ON_TIMEOUT - (performance.now() - start);\n        }\n        else {\n            executionTimeRemaining = deadline.timeRemaining.bind(deadline);\n        }\n        while (executionTimeRemaining() > 0 && pendingTasks.length) {\n            pendingTasks.shift()();\n        }\n        if (pendingTasks.length) {\n            scheduleNextRun();\n        }\n    }\n    function scheduleNextRun() {\n        requestIdleCallback(run, { timeout: IDLE_CALLBACK_TIMEOUT });\n    }\n    return {\n        push(task) {\n            if (pendingTasks.push(task) === 1) {\n                scheduleNextRun();\n            }\n        },\n        stop() {\n            pendingTasks.length = 0;\n        },\n    };\n}\n//# sourceMappingURL=taskQueue.js.map","import { addDuration } from '@datadog/browser-core';\nimport { hasValidResourceEntryDuration, hasValidResourceEntryTimings } from './resourceUtils';\nconst alreadyMatchedEntries = new WeakSet();\n/**\n * Look for corresponding timing in resource timing buffer\n *\n * Observations:\n * - Timing (start, end) are nested inside the request (start, end)\n * - Some timing can be not exactly nested, being off by < 1 ms\n *\n * Strategy:\n * - from valid nested entries (with 1 ms error margin)\n * - filter out timing that were already matched to a request\n * - then, if a single timing match, return the timing\n * - otherwise we can't decide, return undefined\n */\nexport function matchRequestResourceEntry(request) {\n    if (!performance || !('getEntriesByName' in performance)) {\n        return;\n    }\n    const sameNameEntries = performance.getEntriesByName(request.url, 'resource');\n    if (!sameNameEntries.length || !('toJSON' in sameNameEntries[0])) {\n        return;\n    }\n    const candidates = sameNameEntries\n        .filter((entry) => !alreadyMatchedEntries.has(entry))\n        .filter((entry) => hasValidResourceEntryDuration(entry) && hasValidResourceEntryTimings(entry))\n        .filter((entry) => isBetween(entry, request.startClocks.relative, endTime({ startTime: request.startClocks.relative, duration: request.duration })));\n    if (candidates.length === 1) {\n        alreadyMatchedEntries.add(candidates[0]);\n        return candidates[0].toJSON();\n    }\n    return;\n}\nfunction endTime(timing) {\n    return addDuration(timing.startTime, timing.duration);\n}\nfunction isBetween(timing, start, end) {\n    const errorMargin = 1;\n    return timing.startTime >= start - errorMargin && endTime(timing) <= addDuration(end, errorMargin);\n}\n//# sourceMappingURL=matchRequestResourceEntry.js.map","import { dateNow, findCommaSeparatedValue, ONE_MINUTE } from '@datadog/browser-core';\nimport { isCommentNode, isTextNode } from '../../browser/htmlDomUtils';\nexport const INITIAL_DOCUMENT_OUTDATED_TRACE_ID_THRESHOLD = 2 * ONE_MINUTE;\nexport function getDocumentTraceId(document) {\n    const data = getDocumentTraceDataFromMeta(document) || getDocumentTraceDataFromComment(document);\n    if (!data || data.traceTime <= dateNow() - INITIAL_DOCUMENT_OUTDATED_TRACE_ID_THRESHOLD) {\n        return undefined;\n    }\n    return data.traceId;\n}\nexport function getDocumentTraceDataFromMeta(document) {\n    const traceIdMeta = document.querySelector('meta[name=dd-trace-id]');\n    const traceTimeMeta = document.querySelector('meta[name=dd-trace-time]');\n    return createDocumentTraceData(traceIdMeta && traceIdMeta.content, traceTimeMeta && traceTimeMeta.content);\n}\nexport function getDocumentTraceDataFromComment(document) {\n    const comment = findTraceComment(document);\n    if (!comment) {\n        return undefined;\n    }\n    return createDocumentTraceData(findCommaSeparatedValue(comment, 'trace-id'), findCommaSeparatedValue(comment, 'trace-time'));\n}\nexport function createDocumentTraceData(traceId, rawTraceTime) {\n    const traceTime = rawTraceTime && Number(rawTraceTime);\n    if (!traceId || !traceTime) {\n        return undefined;\n    }\n    return {\n        traceId,\n        traceTime,\n    };\n}\nexport function findTraceComment(document) {\n    // 1. Try to find the comment as a direct child of the document\n    // Note: TSLint advises to use a 'for of', but TS doesn't allow to use 'for of' if the iterated\n    // value is not an array or string (here, a NodeList).\n    for (let i = 0; i < document.childNodes.length; i += 1) {\n        const comment = getTraceCommentFromNode(document.childNodes[i]);\n        if (comment) {\n            return comment;\n        }\n    }\n    // 2. If the comment is placed after the </html> tag, but have some space or new lines before or\n    // after, the DOM parser will lift it (and the surrounding text) at the end of the <body> tag.\n    // Try to look for the comment at the end of the <body> by by iterating over its child nodes in\n    // reverse order, stopping if we come across a non-text node.\n    if (document.body) {\n        for (let i = document.body.childNodes.length - 1; i >= 0; i -= 1) {\n            const node = document.body.childNodes[i];\n            const comment = getTraceCommentFromNode(node);\n            if (comment) {\n                return comment;\n            }\n            if (!isTextNode(node)) {\n                break;\n            }\n        }\n    }\n}\nfunction getTraceCommentFromNode(node) {\n    if (node && isCommentNode(node)) {\n        const match = /^\\s*DATADOG;(.*?)\\s*$/.exec(node.data);\n        if (match) {\n            return match[1];\n        }\n    }\n}\n//# sourceMappingURL=getDocumentTraceId.js.map","import { findLast, getRelativeTime, isNumber, relativeNow } from '@datadog/browser-core';\nimport { RumPerformanceEntryType, supportPerformanceTimingEvent } from './performanceObservable';\nexport function getNavigationEntry() {\n    if (supportPerformanceTimingEvent(RumPerformanceEntryType.NAVIGATION)) {\n        const navigationEntry = performance.getEntriesByType(RumPerformanceEntryType.NAVIGATION)[0];\n        if (navigationEntry) {\n            return navigationEntry;\n        }\n    }\n    const timings = computeTimingsFromDeprecatedPerformanceTiming();\n    const entry = {\n        entryType: RumPerformanceEntryType.NAVIGATION,\n        initiatorType: 'navigation',\n        name: window.location.href,\n        startTime: 0,\n        duration: timings.loadEventEnd,\n        decodedBodySize: 0,\n        encodedBodySize: 0,\n        transferSize: 0,\n        workerStart: 0,\n        toJSON: () => ({ ...entry, toJSON: undefined }),\n        ...timings,\n    };\n    return entry;\n}\nexport function computeTimingsFromDeprecatedPerformanceTiming() {\n    const result = {};\n    const timing = performance.timing;\n    for (const key in timing) {\n        if (isNumber(timing[key])) {\n            const numberKey = key;\n            const timingElement = timing[numberKey];\n            result[numberKey] = timingElement === 0 ? 0 : getRelativeTime(timingElement);\n        }\n    }\n    return result;\n}\nexport function sanitizeFirstByte(entry) {\n    // In some cases the value reported is negative or is larger\n    // than the current page time. Ignore these cases:\n    // https://github.com/GoogleChrome/web-vitals/issues/137\n    // https://github.com/GoogleChrome/web-vitals/issues/162\n    return entry.responseStart >= 0 && entry.responseStart <= relativeNow() ? entry.responseStart : undefined;\n}\nexport function getResourceEntries() {\n    if (supportPerformanceTimingEvent(RumPerformanceEntryType.RESOURCE)) {\n        return performance.getEntriesByType(RumPerformanceEntryType.RESOURCE);\n    }\n    return undefined;\n}\n/**\n * Find the most relevant resource entry for an LCP element.\n *\n * Resource entries persist for the entire page lifetime and can include multiple requests\n * for the same URL (preloads, cache-busting reloads, SPA route changes, etc.).\n * This function returns the most recent matching entry that started before the LCP time,\n * which is most likely the one that triggered the LCP paint.\n */\nexport function findLcpResourceEntry(resourceUrl, lcpStartTime) {\n    const entries = getResourceEntries();\n    if (!entries) {\n        return undefined;\n    }\n    return findLast(entries, (entry) => entry.name === resourceUrl && entry.startTime <= lcpStartTime);\n}\n//# sourceMappingURL=performanceUtils.js.map","import { mockable, runOnReadyState } from '@datadog/browser-core';\nimport { RumPerformanceEntryType } from '../../browser/performanceObservable';\nimport { getDocumentTraceId } from '../tracing/getDocumentTraceId';\nimport { getNavigationEntry } from '../../browser/performanceUtils';\nimport { FAKE_INITIAL_DOCUMENT } from './resourceUtils';\nexport function retrieveInitialDocumentResourceTiming(configuration, callback) {\n    runOnReadyState(configuration, 'interactive', () => {\n        const navigationEntry = mockable(getNavigationEntry)();\n        const entry = Object.assign(navigationEntry.toJSON(), {\n            entryType: RumPerformanceEntryType.RESOURCE,\n            initiatorType: FAKE_INITIAL_DOCUMENT,\n            // The ResourceTiming duration entry should be `responseEnd - startTime`. With\n            // NavigationTiming entries, `startTime` is always 0, so set it to `responseEnd`.\n            duration: navigationEntry.responseEnd,\n            traceId: getDocumentTraceId(document),\n            toJSON: () => ({ ...entry, toJSON: undefined }),\n        });\n        callback(entry);\n    });\n}\n//# sourceMappingURL=retrieveInitialDocumentResourceTiming.js.map","import { combine, generateUUID, RequestType, ResourceType, toServerDuration, relativeToClocks, createTaskQueue, mockable, isExperimentalFeatureEnabled, ExperimentalFeature, matchList, safeTruncate, display, addTelemetryDebug, } from '@datadog/browser-core';\nimport { RumPerformanceEntryType, createPerformanceObservable } from '../../browser/performanceObservable';\nimport { RumEventType } from '../../rawRumEvent.types';\nimport { createSpanIdentifier } from '../tracing/identifier';\nimport { startEventTracker } from '../eventTracker';\nimport { extractRegexMatch } from '../extractRegexMatch';\nimport { matchRequestResourceEntry } from './matchRequestResourceEntry';\nimport { computeResourceEntryDetails, computeResourceEntryDuration, computeResourceEntryType, computeResourceEntrySize, computeResourceEntryProtocol, computeResourceEntryDeliveryType, isResourceEntryRequestType, sanitizeIfLongDataUrl, } from './resourceUtils';\nimport { retrieveInitialDocumentResourceTiming } from './retrieveInitialDocumentResourceTiming';\nimport { createRequestRegistry } from './requestRegistry';\nimport { extractGraphQlMetadata, findGraphQlConfiguration } from './graphql';\nimport { trackManualResources } from './trackManualResources';\nexport function startResourceCollection(lifeCycle, configuration, pageStateHistory) {\n    const taskQueue = mockable(createTaskQueue)();\n    let requestRegistry;\n    const isEarlyRequestCollectionEnabled = configuration.trackEarlyRequests;\n    if (isEarlyRequestCollectionEnabled) {\n        requestRegistry = createRequestRegistry(lifeCycle);\n    }\n    else {\n        lifeCycle.subscribe(8 /* LifeCycleEventType.REQUEST_COMPLETED */, (request) => {\n            handleResource(() => processRequest(request, configuration, pageStateHistory));\n        });\n    }\n    const performanceResourceSubscription = createPerformanceObservable(configuration, {\n        type: RumPerformanceEntryType.RESOURCE,\n        buffered: true,\n    }).subscribe((entries) => {\n        for (const entry of entries) {\n            if (isEarlyRequestCollectionEnabled || !isResourceEntryRequestType(entry)) {\n                handleResource(() => processResourceEntry(entry, configuration, pageStateHistory, requestRegistry));\n            }\n        }\n    });\n    mockable(retrieveInitialDocumentResourceTiming)(configuration, (timing) => {\n        handleResource(() => processResourceEntry(timing, configuration, pageStateHistory, requestRegistry));\n    });\n    function handleResource(computeRawEvent) {\n        taskQueue.push(() => {\n            const rawEvent = computeRawEvent();\n            if (rawEvent) {\n                lifeCycle.notify(12 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, rawEvent);\n            }\n        });\n    }\n    const resourceTracker = startEventTracker(lifeCycle);\n    const manualResources = trackManualResources(lifeCycle, resourceTracker);\n    return {\n        startResource: manualResources.startResource,\n        stopResource: manualResources.stopResource,\n        stop: () => {\n            taskQueue.stop();\n            performanceResourceSubscription.unsubscribe();\n            resourceTracker.stopAll();\n        },\n    };\n}\nfunction processRequest(request, configuration, pageStateHistory) {\n    const matchingTiming = matchRequestResourceEntry(request);\n    return assembleResource(matchingTiming, request, pageStateHistory, configuration);\n}\nfunction processResourceEntry(entry, configuration, pageStateHistory, requestRegistry) {\n    const matchingRequest = isResourceEntryRequestType(entry) && requestRegistry ? requestRegistry.getMatchingRequest(entry) : undefined;\n    return assembleResource(entry, matchingRequest, pageStateHistory, configuration);\n}\n// TODO: In the future, the `entry` parameter should be required, making things simpler.\nfunction assembleResource(entry, request, pageStateHistory, configuration) {\n    if (!entry && !request) {\n        return;\n    }\n    const tracingInfo = request\n        ? computeRequestTracingInfo(request, configuration)\n        : computeResourceEntryTracingInfo(entry, configuration);\n    if (!configuration.trackResources && !tracingInfo) {\n        return;\n    }\n    const startClocks = entry ? relativeToClocks(entry.startTime) : request.startClocks;\n    const duration = entry\n        ? computeResourceEntryDuration(entry)\n        : computeRequestDuration(pageStateHistory, startClocks, request.duration);\n    const networkHeaders = isExperimentalFeatureEnabled(ExperimentalFeature.TRACK_RESOURCE_HEADERS)\n        ? computeNetworkHeaders(request, configuration)\n        : undefined;\n    const graphql = request && computeGraphQlMetaData(request, configuration);\n    const contentTypeFromPerformanceEntry = entry && computeContentTypeFromPerformanceEntry(entry);\n    const resourceEvent = combine({\n        date: startClocks.timeStamp,\n        resource: {\n            id: generateUUID(),\n            duration: toServerDuration(duration),\n            // TODO: in the future when `entry` is required, we can probably only rely on `computeResourceEntryType`\n            type: request\n                ? request.type === RequestType.XHR\n                    ? ResourceType.XHR\n                    : ResourceType.FETCH\n                : computeResourceEntryType(entry),\n            method: request ? request.method : undefined,\n            status_code: request ? request.status : discardZeroStatus(entry.responseStatus),\n            url: request ? sanitizeIfLongDataUrl(request.url) : entry.name,\n            protocol: entry && computeResourceEntryProtocol(entry),\n            delivery_type: entry && computeResourceEntryDeliveryType(entry),\n            graphql,\n        },\n        type: RumEventType.RESOURCE,\n        _dd: {\n            discarded: !configuration.trackResources,\n        },\n    }, tracingInfo, entry && computeResourceEntryMetrics(entry), contentTypeFromPerformanceEntry, networkHeaders);\n    return {\n        startClocks,\n        duration,\n        rawRumEvent: resourceEvent,\n        domainContext: getResourceDomainContext(entry, request),\n    };\n}\nfunction computeGraphQlMetaData(request, configuration) {\n    const graphQlConfig = findGraphQlConfiguration(request.url, configuration);\n    if (!graphQlConfig) {\n        return;\n    }\n    return extractGraphQlMetadata(request, graphQlConfig);\n}\nfunction computeContentTypeFromPerformanceEntry(entry) {\n    const contentType = entry.contentType;\n    if (contentType) {\n        return {\n            resource: {\n                response: {\n                    headers: {\n                        'content-type': contentType,\n                    },\n                },\n            },\n        };\n    }\n    return undefined;\n}\nfunction getResourceDomainContext(entry, request) {\n    if (request) {\n        const baseDomainContext = {\n            performanceEntry: entry,\n            isAborted: request.isAborted,\n            handlingStack: request.handlingStack,\n        };\n        if (request.type === RequestType.XHR) {\n            return {\n                xhr: request.xhr,\n                ...baseDomainContext,\n            };\n        }\n        return {\n            requestInput: request.input,\n            requestInit: request.init,\n            response: request.response,\n            error: request.error,\n            ...baseDomainContext,\n        };\n    }\n    return {\n        // Currently, at least one of `entry` or `request` must be defined when calling this function.\n        // So `entry` is guaranteed to be defined here. In the future, when `entry` is required, we can\n        // remove the `!` assertion.\n        performanceEntry: entry,\n    };\n}\nfunction computeResourceEntryMetrics(entry) {\n    const { renderBlockingStatus } = entry;\n    return {\n        resource: {\n            render_blocking_status: renderBlockingStatus,\n            ...computeResourceEntrySize(entry),\n            ...computeResourceEntryDetails(entry),\n        },\n    };\n}\nfunction computeRequestTracingInfo(request, configuration) {\n    const hasBeenTraced = request.traceSampled && request.traceId && request.spanId;\n    if (!hasBeenTraced) {\n        return undefined;\n    }\n    return {\n        _dd: {\n            span_id: request.spanId.toString(),\n            trace_id: request.traceId.toString(),\n            rule_psr: configuration.rulePsr,\n        },\n    };\n}\nfunction computeResourceEntryTracingInfo(entry, configuration) {\n    const hasBeenTraced = entry.traceId;\n    if (!hasBeenTraced) {\n        return undefined;\n    }\n    return {\n        _dd: {\n            trace_id: entry.traceId,\n            span_id: createSpanIdentifier().toString(),\n            rule_psr: configuration.rulePsr,\n        },\n    };\n}\nfunction computeRequestDuration(pageStateHistory, startClocks, duration) {\n    return !pageStateHistory.wasInPageStateDuringPeriod(\"frozen\" /* PageState.FROZEN */, startClocks.relative, duration)\n        ? duration\n        : undefined;\n}\n/**\n * The status is 0 for cross-origin resources without CORS headers, so the status is meaningless, and we shouldn't report it\n * https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStatus#cross-origin_response_status_codes\n */\nfunction discardZeroStatus(statusCode) {\n    return statusCode === 0 ? undefined : statusCode;\n}\nfunction computeNetworkHeaders(request, configuration) {\n    const matchers = configuration.trackResourceHeaders;\n    if (matchers.length === 0 || !request) {\n        return undefined;\n    }\n    const urlMatchers = matchers.filter((m) => (m.url !== undefined ? matchList([m.url], request.url, true) : true));\n    if (urlMatchers.length === 0) {\n        return undefined;\n    }\n    const responseMatchers = urlMatchers.filter((m) => m.location === undefined || m.location === 'any' || m.location === 'response');\n    const requestMatchers = urlMatchers.filter((m) => m.location === undefined || m.location === 'any' || m.location === 'request');\n    const responseHeaders = responseMatchers.length > 0 ? getResponseHeaders(request, responseMatchers) : undefined;\n    const requestHeaders = requestMatchers.length > 0 ? getRequestHeaders(request, requestMatchers) : undefined;\n    if (!responseHeaders && !requestHeaders) {\n        return undefined;\n    }\n    return {\n        resource: {\n            request: requestHeaders ? { headers: requestHeaders } : undefined,\n            response: responseHeaders ? { headers: responseHeaders } : undefined,\n        },\n    };\n}\nfunction getResponseHeaders(request, matchers) {\n    if (request.type === RequestType.FETCH && request.response) {\n        return filterHeaders(request.response.headers, matchers);\n    }\n    if (request.type === RequestType.XHR && request.xhr) {\n        const rawXhrHeaders = request.xhr.getAllResponseHeaders();\n        if (rawXhrHeaders) {\n            try {\n                return filterHeaders(new Headers(parseRawXhrHeaders(rawXhrHeaders)), matchers);\n            }\n            catch (_a) {\n                // Ignore parsing errors\n            }\n        }\n    }\n    return undefined;\n}\nfunction getRequestHeaders(request, matchers) {\n    var _a;\n    if (request.type !== RequestType.FETCH) {\n        return undefined;\n    }\n    let headers;\n    if ((_a = request.init) === null || _a === void 0 ? void 0 : _a.headers) {\n        headers = new Headers(request.init.headers);\n    }\n    else if (request.input instanceof Request) {\n        headers = request.input.headers;\n    }\n    return headers ? filterHeaders(headers, matchers) : undefined;\n}\nconst FORBIDDEN_HEADER_PATTERN = /(token|cookie|secret|authorization|(api|secret|access|app).?key|(client|connecting|real).?ip|forwarded)/;\nconst MAX_HEADER_COUNT = 100;\nconst MAX_HEADER_VALUE_LENGTH = 128;\nfunction filterHeaders(headers, matchers) {\n    const result = {};\n    let collectedHeaderCount = 0;\n    let totalHeaderCount = 0;\n    let hasReachedMaxHeaderCount = false;\n    headers.forEach((value, name) => {\n        totalHeaderCount++;\n        if (collectedHeaderCount >= MAX_HEADER_COUNT) {\n            if (!hasReachedMaxHeaderCount) {\n                display.warn(`Maximum number of headers (${MAX_HEADER_COUNT}) has been reached. Further headers are dropped.`);\n                hasReachedMaxHeaderCount = true;\n            }\n            return;\n        }\n        const lowerName = name.toLowerCase();\n        if (FORBIDDEN_HEADER_PATTERN.test(lowerName)) {\n            return;\n        }\n        const matchHeader = matchers.find((m) => matchList([m.name], lowerName));\n        if (!matchHeader) {\n            return;\n        }\n        const { extractor } = matchHeader;\n        const capturedValue = extractor ? extractRegexMatch(value, extractor) : value;\n        if (capturedValue === undefined) {\n            return;\n        }\n        if (capturedValue.length > MAX_HEADER_VALUE_LENGTH) {\n            display.warn(`Header \"${lowerName}\" value was truncated from ${capturedValue.length} to ${MAX_HEADER_VALUE_LENGTH} characters.`);\n            // monitor-until: 2026-05-23\n            addTelemetryDebug('Resource header value was truncated', {\n                header_name: lowerName,\n                original_length: capturedValue.length,\n                limit: MAX_HEADER_VALUE_LENGTH,\n            });\n        }\n        result[lowerName] = safeTruncate(capturedValue, MAX_HEADER_VALUE_LENGTH);\n        collectedHeaderCount++;\n    });\n    if (hasReachedMaxHeaderCount) {\n        // monitor-until: 2026-05-23\n        addTelemetryDebug('Maximum number of resource headers reached', {\n            collectedHeaderCount,\n            totalHeaderCount,\n        });\n    }\n    return collectedHeaderCount > 0 ? result : undefined;\n}\n// Input:  \"content-type: application/json\\r\\ncache-control: no-cache\"\n// Output: [[\"content-type\", \"application/json\"], [\"cache-control\", \"no-cache\"]]\nfunction parseRawXhrHeaders(rawXhrheaders) {\n    const pairs = [];\n    const lines = rawXhrheaders.trim().split(/\\r\\n/);\n    for (const line of lines) {\n        const colonIndex = line.indexOf(':');\n        if (colonIndex > 0) {\n            pairs.push([line.substring(0, colonIndex).trim(), line.substring(colonIndex + 1).trim()]);\n        }\n    }\n    return pairs;\n}\n//# sourceMappingURL=resourceCollection.js.map","import { addTelemetryDebug, ExperimentalFeature, isExperimentalFeatureEnabled, RequestType, timeStampNow, } from '@datadog/browser-core';\n// Maximum number of requests to keep in the registry. Requests should be removed quite quickly in\n// general, this is just a safety limit to avoid memory leaks in case of a bug.\nexport const MAX_REQUESTS = 1000;\nexport function createRequestRegistry(lifeCycle) {\n    const requests = new Set();\n    let tooManyRequestsReported = false;\n    const subscription = lifeCycle.subscribe(8 /* LifeCycleEventType.REQUEST_COMPLETED */, (request) => {\n        requests.add(request);\n        if (requests.size > MAX_REQUESTS) {\n            const oldestRequest = requests.values().next().value;\n            if (!tooManyRequestsReported) {\n                tooManyRequestsReported = true;\n                let debugContext;\n                if (isExperimentalFeatureEnabled(ExperimentalFeature.TOO_MANY_REQUESTS_INVESTIGATION)) {\n                    let abortedCount = 0;\n                    let abortedOnStartCount = 0;\n                    let xhrCount = 0;\n                    let withoutMatchingEntryCount = 0;\n                    for (const r of requests) {\n                        if (r.isAborted) {\n                            abortedCount++;\n                        }\n                        if (r.isAbortedOnStart) {\n                            abortedOnStartCount++;\n                        }\n                        if (r.type === RequestType.XHR) {\n                            xhrCount++;\n                        }\n                        const entries = performance.getEntriesByName(r.url, 'resource');\n                        const hasMatchingEntry = entries.some((e) => e.startTime >= r.startClocks.relative);\n                        if (!hasMatchingEntry) {\n                            withoutMatchingEntryCount++;\n                        }\n                    }\n                    const oldestRequestAge = timeStampNow() - oldestRequest.startClocks.timeStamp;\n                    debugContext = {\n                        abortedCount,\n                        abortedOnStartCount,\n                        xhrCount,\n                        fetchCount: requests.size - xhrCount,\n                        oldestRequestAge,\n                        oldestRequestEndAge: oldestRequestAge - oldestRequest.duration,\n                        withoutMatchingEntryCount,\n                    };\n                }\n                // monitor-until: 2026-06-01, after early request collection is the default in v7\n                addTelemetryDebug('Too many requests', debugContext);\n            }\n            requests.delete(oldestRequest);\n        }\n    });\n    return {\n        getMatchingRequest(entry) {\n            // Returns the closest request object that happened before the entry\n            let minTimeDifference = Infinity;\n            let closestRequest;\n            for (const request of requests) {\n                const timeDifference = entry.startTime - request.startClocks.relative;\n                if (0 <= timeDifference && timeDifference < minTimeDifference && request.url === entry.name) {\n                    minTimeDifference = Math.abs(timeDifference);\n                    closestRequest = request;\n                }\n            }\n            if (closestRequest) {\n                requests.delete(closestRequest);\n            }\n            return closestRequest;\n        },\n        stop() {\n            subscription.unsubscribe();\n        },\n    };\n}\n//# sourceMappingURL=requestRegistry.js.map","import { clocksNow, elapsed, ResourceType as ResourceTypeEnum, toServerDuration } from '@datadog/browser-core';\nimport { RumEventType } from '../../rawRumEvent.types';\nimport { sanitizeIfLongDataUrl } from './resourceUtils';\nexport function trackManualResources(lifeCycle, resourceTracker) {\n    function startManualResource(url, options = {}, startClocks = clocksNow()) {\n        var _a;\n        const lookupKey = (_a = options.resourceKey) !== null && _a !== void 0 ? _a : url;\n        resourceTracker.start(lookupKey, startClocks, {\n            url,\n            ...options,\n        });\n    }\n    function stopManualResource(url, options = {}, stopClocks = clocksNow()) {\n        var _a;\n        const lookupKey = (_a = options.resourceKey) !== null && _a !== void 0 ? _a : url;\n        const stopped = resourceTracker.stop(lookupKey, stopClocks, {\n            context: options.context,\n            type: options.type,\n        });\n        if (!stopped) {\n            return;\n        }\n        const duration = elapsed(stopped.startClocks.relative, stopClocks.relative);\n        const rawRumEvent = {\n            date: stopped.startClocks.timeStamp,\n            type: RumEventType.RESOURCE,\n            resource: {\n                id: stopped.id,\n                type: stopped.type || ResourceTypeEnum.OTHER,\n                url: sanitizeIfLongDataUrl(stopped.url),\n                duration: toServerDuration(duration),\n                method: stopped.method,\n                status_code: options.statusCode,\n                size: options.size,\n            },\n            _dd: {},\n            context: stopped.context,\n        };\n        lifeCycle.notify(12 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, {\n            rawRumEvent,\n            startClocks: stopped.startClocks,\n            duration,\n            domainContext: { isManual: true },\n        });\n    }\n    return {\n        startResource: startManualResource,\n        stopResource: stopManualResource,\n    };\n}\n//# sourceMappingURL=trackManualResources.js.map","export function getTimeZone() {\n    try {\n        const intl = new Intl.DateTimeFormat();\n        return intl.resolvedOptions().timeZone;\n    }\n    catch (_a) {\n        return undefined;\n    }\n}\n//# sourceMappingURL=timezone.js.map","import { setTimeout, runOnReadyState, clearTimeout, mockable } from '@datadog/browser-core';\nimport { getNavigationEntry, sanitizeFirstByte } from '../../../browser/performanceUtils';\nexport function trackNavigationTimings(configuration, callback) {\n    return waitAfterLoadEvent(configuration, () => {\n        const entry = mockable(getNavigationEntry)();\n        if (!isIncompleteNavigation(entry)) {\n            callback(processNavigationEntry(entry));\n        }\n    });\n}\nfunction processNavigationEntry(entry) {\n    return {\n        domComplete: entry.domComplete,\n        domContentLoaded: entry.domContentLoadedEventEnd,\n        domInteractive: entry.domInteractive,\n        loadEvent: entry.loadEventEnd,\n        firstByte: sanitizeFirstByte(entry),\n    };\n}\nfunction isIncompleteNavigation(entry) {\n    return entry.loadEventEnd <= 0;\n}\nfunction waitAfterLoadEvent(configuration, callback) {\n    let timeoutId;\n    const { stop: stopOnReadyState } = runOnReadyState(configuration, 'complete', () => {\n        // Invoke the callback a bit after the actual load event, so the \"loadEventEnd\" timing is accurate\n        timeoutId = setTimeout(() => callback());\n    });\n    return {\n        stop: () => {\n            stopOnReadyState();\n            clearTimeout(timeoutId);\n        },\n    };\n}\n//# sourceMappingURL=trackNavigationTimings.js.map","import { ONE_MINUTE, addEventListeners, findLast } from '@datadog/browser-core';\nimport { createPerformanceObservable, RumPerformanceEntryType } from '../../../browser/performanceObservable';\nimport { findLcpResourceEntry, getNavigationEntry, sanitizeFirstByte } from '../../../browser/performanceUtils';\nimport { getSelectorFromElement } from '../../getSelectorFromElement';\n// Discard LCP timings above a certain delay to avoid incorrect data\n// It happens in some cases like sleep mode or some browser implementations\nexport const LCP_MAXIMUM_DELAY = 10 * ONE_MINUTE;\n/**\n * Track the largest contentful paint (LCP) occurring during the initial View.  This can yield\n * multiple values, only the most recent one should be used.\n * Documentation: https://web.dev/lcp/\n * Reference implementation: https://github.com/GoogleChrome/web-vitals/blob/master/src/onLCP.ts\n */\nexport function trackLargestContentfulPaint(configuration, firstHidden, eventTarget, callback) {\n    // Ignore entries that come after the first user interaction. According to the documentation, the\n    // browser should not send largest-contentful-paint entries after a user interact with the page,\n    // but the web-vitals reference implementation uses this as a safeguard.\n    let firstInteractionTimestamp = Infinity;\n    const { stop: stopEventListener } = addEventListeners(configuration, eventTarget, [\"pointerdown\" /* DOM_EVENT.POINTER_DOWN */, \"keydown\" /* DOM_EVENT.KEY_DOWN */], (event) => {\n        firstInteractionTimestamp = event.timeStamp;\n    }, { capture: true, once: true });\n    let biggestLcpSize = 0;\n    const performanceLcpSubscription = createPerformanceObservable(configuration, {\n        type: RumPerformanceEntryType.LARGEST_CONTENTFUL_PAINT,\n        buffered: true,\n    }).subscribe((entries) => {\n        const lcpEntry = findLast(entries, (entry) => entry.entryType === RumPerformanceEntryType.LARGEST_CONTENTFUL_PAINT &&\n            entry.startTime < firstInteractionTimestamp &&\n            entry.startTime < firstHidden.timeStamp &&\n            entry.startTime < LCP_MAXIMUM_DELAY &&\n            // Ensure to get the LCP entry with the biggest size, see\n            // https://bugs.chromium.org/p/chromium/issues/detail?id=1516655\n            entry.size > biggestLcpSize);\n        if (lcpEntry) {\n            let lcpTargetSelector;\n            if (lcpEntry.element) {\n                lcpTargetSelector = getSelectorFromElement(lcpEntry.element, configuration.actionNameAttribute);\n            }\n            const resourceUrl = computeLcpEntryUrl(lcpEntry);\n            const lcpValue = lcpEntry.startTime;\n            const subParts = computeLcpSubParts(resourceUrl, lcpValue);\n            callback({\n                value: lcpValue,\n                targetSelector: lcpTargetSelector,\n                resourceUrl,\n                subParts,\n            });\n            biggestLcpSize = lcpEntry.size;\n        }\n    });\n    return {\n        stop: () => {\n            stopEventListener();\n            performanceLcpSubscription.unsubscribe();\n        },\n    };\n}\n// The property url report an empty string if the value is not available, we shouldn't report it in this case.\nfunction computeLcpEntryUrl(entry) {\n    return entry.url === '' ? undefined : entry.url;\n}\n/**\n * Compute the LCP sub-parts breakdown (loadDelay, loadTime, renderDelay).\n * Returns undefined if navigation timing data or TTFB is unavailable.\n */\nfunction computeLcpSubParts(resourceUrl, lcpValue) {\n    const firstByte = sanitizeFirstByte(getNavigationEntry());\n    if (firstByte === undefined) {\n        return undefined;\n    }\n    const lcpResourceEntry = resourceUrl ? findLcpResourceEntry(resourceUrl, lcpValue) : undefined;\n    const lcpRequestStart = lcpResourceEntry\n        ? Math.max(firstByte, lcpResourceEntry.requestStart || lcpResourceEntry.startTime)\n        : firstByte;\n    // Cap at LCP time to handle resources that continue downloading after LCP (e.g., videos)\n    const lcpResponseEnd = Math.min(lcpValue, Math.max(lcpRequestStart, (lcpResourceEntry === null || lcpResourceEntry === void 0 ? void 0 : lcpResourceEntry.responseEnd) || 0));\n    return {\n        loadDelay: (lcpRequestStart - firstByte),\n        loadTime: (lcpResponseEnd - lcpRequestStart),\n        renderDelay: (lcpValue - lcpResponseEnd),\n    };\n}\n//# sourceMappingURL=trackLargestContentfulPaint.js.map","import { addEventListeners, noop } from '@datadog/browser-core';\nimport { supportPerformanceTimingEvent, RumPerformanceEntryType } from '../../../browser/performanceObservable';\nexport function trackFirstHidden(configuration, viewStart, eventTarget = window) {\n    if (document.visibilityState === 'hidden') {\n        return { timeStamp: 0, stop: noop };\n    }\n    if (supportPerformanceTimingEvent(RumPerformanceEntryType.VISIBILITY_STATE)) {\n        const firstHiddenEntry = performance\n            .getEntriesByType(RumPerformanceEntryType.VISIBILITY_STATE)\n            .filter((entry) => entry.name === 'hidden')\n            .find((entry) => entry.startTime >= viewStart.relative);\n        if (firstHiddenEntry) {\n            return { timeStamp: firstHiddenEntry.startTime, stop: noop };\n        }\n    }\n    let timeStamp = Infinity;\n    const { stop } = addEventListeners(configuration, eventTarget, [\"pagehide\" /* DOM_EVENT.PAGE_HIDE */, \"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */], (event) => {\n        if (event.type === \"pagehide\" /* DOM_EVENT.PAGE_HIDE */ || document.visibilityState === 'hidden') {\n            timeStamp = event.timeStamp;\n            stop();\n        }\n    }, { capture: true });\n    return {\n        get timeStamp() {\n            return timeStamp;\n        },\n        stop,\n    };\n}\n//# sourceMappingURL=trackFirstHidden.js.map","import { trackFirstContentfulPaint } from './trackFirstContentfulPaint';\nimport { trackFirstInput } from './trackFirstInput';\nimport { trackNavigationTimings } from './trackNavigationTimings';\nimport { trackLargestContentfulPaint } from './trackLargestContentfulPaint';\nimport { trackFirstHidden } from './trackFirstHidden';\nexport function trackInitialViewMetrics(configuration, viewStart, setLoadEvent, scheduleViewUpdate) {\n    const initialViewMetrics = {};\n    const { stop: stopNavigationTracking } = trackNavigationTimings(configuration, (navigationTimings) => {\n        setLoadEvent(navigationTimings.loadEvent);\n        initialViewMetrics.navigationTimings = navigationTimings;\n        scheduleViewUpdate();\n    });\n    const firstHidden = trackFirstHidden(configuration, viewStart);\n    const { stop: stopFCPTracking } = trackFirstContentfulPaint(configuration, firstHidden, (firstContentfulPaint) => {\n        initialViewMetrics.firstContentfulPaint = firstContentfulPaint;\n        scheduleViewUpdate();\n    });\n    const { stop: stopLCPTracking } = trackLargestContentfulPaint(configuration, firstHidden, window, (largestContentfulPaint) => {\n        initialViewMetrics.largestContentfulPaint = largestContentfulPaint;\n        scheduleViewUpdate();\n    });\n    const { stop: stopFIDTracking } = trackFirstInput(configuration, firstHidden, (firstInput) => {\n        initialViewMetrics.firstInput = firstInput;\n        scheduleViewUpdate();\n    });\n    function stop() {\n        stopNavigationTracking();\n        stopFCPTracking();\n        stopLCPTracking();\n        stopFIDTracking();\n        firstHidden.stop();\n    }\n    return {\n        stop,\n        initialViewMetrics,\n    };\n}\n//# sourceMappingURL=trackInitialViewMetrics.js.map","import { ONE_MINUTE, elapsed, relativeNow } from '@datadog/browser-core';\nimport { createPerformanceObservable, RumPerformanceEntryType } from '../../../browser/performanceObservable';\n// Discard FCP timings above a certain delay to avoid incorrect data\n// It happens in some cases like sleep mode or some browser implementations\nexport const FCP_MAXIMUM_DELAY = 10 * ONE_MINUTE;\nexport function trackFirstContentfulPaint(configuration, firstHidden, callback) {\n    const performanceSubscription = createPerformanceObservable(configuration, {\n        type: RumPerformanceEntryType.PAINT,\n        buffered: true,\n    }).subscribe((entries) => {\n        const fcpEntry = entries.find((entry) => entry.name === 'first-contentful-paint' &&\n            entry.startTime < firstHidden.timeStamp &&\n            entry.startTime < FCP_MAXIMUM_DELAY);\n        if (fcpEntry) {\n            callback(fcpEntry.startTime);\n        }\n    });\n    return {\n        stop: performanceSubscription.unsubscribe,\n    };\n}\n/**\n * Measure the First Contentful Paint after a BFCache restoration.\n * The DOM is restored synchronously, so we approximate the FCP with the first frame\n * rendered just after the pageshow event, using two nested requestAnimationFrame calls.\n */\nexport function trackRestoredFirstContentfulPaint(viewStartRelative, callback) {\n    requestAnimationFrame(() => {\n        requestAnimationFrame(() => {\n            callback(elapsed(viewStartRelative, relativeNow()));\n        });\n    });\n}\n//# sourceMappingURL=trackFirstContentfulPaint.js.map","import { elapsed } from '@datadog/browser-core';\nimport { isElementNode } from '../../../browser/htmlDomUtils';\nimport { createPerformanceObservable, RumPerformanceEntryType } from '../../../browser/performanceObservable';\nimport { getSelectorFromElement } from '../../getSelectorFromElement';\n/**\n * Track the first input occurring during the initial View to return:\n * - First Input Delay\n * - First Input Time\n * Callback is called at most one time.\n * Documentation: https://web.dev/fid/\n * Reference implementation: https://github.com/GoogleChrome/web-vitals/blob/master/src/getFID.ts\n */\nexport function trackFirstInput(configuration, firstHidden, callback) {\n    const performanceFirstInputSubscription = createPerformanceObservable(configuration, {\n        type: RumPerformanceEntryType.FIRST_INPUT,\n        buffered: true,\n    }).subscribe((entries) => {\n        const firstInputEntry = entries.find((entry) => entry.startTime < firstHidden.timeStamp);\n        if (firstInputEntry) {\n            const firstInputDelay = elapsed(firstInputEntry.startTime, firstInputEntry.processingStart);\n            let firstInputTargetSelector;\n            if (firstInputEntry.target && isElementNode(firstInputEntry.target)) {\n                firstInputTargetSelector = getSelectorFromElement(firstInputEntry.target, configuration.actionNameAttribute);\n            }\n            callback({\n                // Ensure firstInputDelay to be positive, see\n                // https://bugs.chromium.org/p/chromium/issues/detail?id=1185815\n                delay: firstInputDelay >= 0 ? firstInputDelay : 0,\n                time: firstInputEntry.startTime,\n                targetSelector: firstInputTargetSelector,\n            });\n        }\n    });\n    return {\n        stop: () => {\n            performanceFirstInputSubscription.unsubscribe();\n        },\n    };\n}\n//# sourceMappingURL=trackFirstInput.js.map","/**\n * Calculates the area of a rectangle given its width and height\n */\nconst calculateArea = (width, height) => width * height;\n/**\n * Calculates the intersection area between two rectangles\n */\nconst calculateIntersectionArea = (rect1, rect2) => {\n    const left = Math.max(rect1.left, rect2.left);\n    const top = Math.max(rect1.top, rect2.top);\n    const right = Math.min(rect1.right, rect2.right);\n    const bottom = Math.min(rect1.bottom, rect2.bottom);\n    if (left >= right || top >= bottom) {\n        return 0;\n    }\n    return calculateArea(right - left, bottom - top);\n};\n/**\n * Calculates the total impacted area of a layout shift source\n * This is the sum of the previous and current areas minus their intersection\n */\nexport const getClsAttributionImpactedArea = (source) => {\n    const previousArea = calculateArea(source.previousRect.width, source.previousRect.height);\n    const currentArea = calculateArea(source.currentRect.width, source.currentRect.height);\n    const intersectionArea = calculateIntersectionArea(source.previousRect, source.currentRect);\n    return previousArea + currentArea - intersectionArea;\n};\n//# sourceMappingURL=getClsAttributionImpactedArea.js.map","import { round, ONE_SECOND, noop, elapsed } from '@datadog/browser-core';\nimport { isElementNode } from '../../../browser/htmlDomUtils';\nimport { supportPerformanceTimingEvent, RumPerformanceEntryType, createPerformanceObservable, } from '../../../browser/performanceObservable';\nimport { getSelectorFromElement } from '../../getSelectorFromElement';\nimport { getClsAttributionImpactedArea } from './getClsAttributionImpactedArea';\n/**\n * Track the cumulative layout shifts (CLS).\n * Layout shifts are grouped into session windows.\n * The minimum gap between session windows is 1 second.\n * The maximum duration of a session window is 5 second.\n * The session window layout shift value is the sum of layout shifts inside it.\n * The CLS value is the max of session windows values.\n *\n * This yields a new value whenever the CLS value is updated (a higher session window value is computed).\n *\n * See isLayoutShiftSupported to check for browser support.\n *\n * Documentation:\n * https://web.dev/cls/\n * https://web.dev/evolving-cls/\n * Reference implementation: https://github.com/GoogleChrome/web-vitals/blob/master/src/getCLS.ts\n */\nexport function trackCumulativeLayoutShift(configuration, viewStart, callback) {\n    if (!isLayoutShiftSupported()) {\n        return {\n            stop: noop,\n        };\n    }\n    let maxClsValue = 0;\n    let biggestShift;\n    // if no layout shift happen the value should be reported as 0\n    callback({\n        value: 0,\n    });\n    const slidingWindow = slidingSessionWindow();\n    const performanceSubscription = createPerformanceObservable(configuration, {\n        type: RumPerformanceEntryType.LAYOUT_SHIFT,\n        buffered: true,\n    }).subscribe((entries) => {\n        var _a;\n        for (const entry of entries) {\n            if (entry.hadRecentInput || entry.startTime < viewStart) {\n                continue;\n            }\n            const { cumulatedValue, isMaxValue } = slidingWindow.update(entry);\n            if (isMaxValue) {\n                const attribution = getTopImpactedElement(entry.sources);\n                biggestShift = {\n                    target: (attribution === null || attribution === void 0 ? void 0 : attribution.node) ? new WeakRef(attribution.node) : undefined,\n                    time: elapsed(viewStart, entry.startTime),\n                    previousRect: attribution === null || attribution === void 0 ? void 0 : attribution.previousRect,\n                    currentRect: attribution === null || attribution === void 0 ? void 0 : attribution.currentRect,\n                    devicePixelRatio: window.devicePixelRatio,\n                };\n            }\n            if (cumulatedValue > maxClsValue) {\n                maxClsValue = cumulatedValue;\n                const target = (_a = biggestShift === null || biggestShift === void 0 ? void 0 : biggestShift.target) === null || _a === void 0 ? void 0 : _a.deref();\n                callback({\n                    value: round(maxClsValue, 4),\n                    targetSelector: target && getSelectorFromElement(target, configuration.actionNameAttribute),\n                    time: biggestShift === null || biggestShift === void 0 ? void 0 : biggestShift.time,\n                    previousRect: (biggestShift === null || biggestShift === void 0 ? void 0 : biggestShift.previousRect) ? asRumRect(biggestShift.previousRect) : undefined,\n                    currentRect: (biggestShift === null || biggestShift === void 0 ? void 0 : biggestShift.currentRect) ? asRumRect(biggestShift.currentRect) : undefined,\n                    devicePixelRatio: biggestShift === null || biggestShift === void 0 ? void 0 : biggestShift.devicePixelRatio,\n                });\n            }\n        }\n    });\n    return {\n        stop: () => {\n            performanceSubscription.unsubscribe();\n        },\n    };\n}\nfunction getTopImpactedElement(sources) {\n    let topImpactedSource;\n    for (const source of sources) {\n        if (source.node && isElementNode(source.node)) {\n            const currentImpactedArea = getClsAttributionImpactedArea(source);\n            if (!topImpactedSource || getClsAttributionImpactedArea(topImpactedSource) < currentImpactedArea) {\n                topImpactedSource = source;\n            }\n        }\n    }\n    return topImpactedSource;\n}\nfunction asRumRect({ x, y, width, height }) {\n    return { x, y, width, height };\n}\nexport const MAX_WINDOW_DURATION = 5 * ONE_SECOND;\nconst MAX_UPDATE_GAP = ONE_SECOND;\nfunction slidingSessionWindow() {\n    let cumulatedValue = 0;\n    let startTime;\n    let endTime;\n    let maxValue = 0;\n    return {\n        update: (entry) => {\n            const shouldCreateNewWindow = startTime === undefined ||\n                entry.startTime - endTime >= MAX_UPDATE_GAP ||\n                entry.startTime - startTime >= MAX_WINDOW_DURATION;\n            let isMaxValue;\n            if (shouldCreateNewWindow) {\n                startTime = endTime = entry.startTime;\n                maxValue = cumulatedValue = entry.value;\n                isMaxValue = true;\n            }\n            else {\n                cumulatedValue += entry.value;\n                endTime = entry.startTime;\n                isMaxValue = entry.value > maxValue;\n                if (isMaxValue) {\n                    maxValue = entry.value;\n                }\n            }\n            return {\n                cumulatedValue,\n                isMaxValue,\n            };\n        },\n    };\n}\n/**\n * Check whether `layout-shift` is supported by the browser.\n */\nexport function isLayoutShiftSupported() {\n    return supportPerformanceTimingEvent(RumPerformanceEntryType.LAYOUT_SHIFT) && 'WeakRef' in window;\n}\n//# sourceMappingURL=trackCumulativeLayoutShift.js.map","/**\n * performance.interactionCount polyfill\n *\n * The interactionCount is an integer which counts the total number of distinct user interactions,\n * for which there was a unique interactionId.\n *\n * The interactionCount polyfill is an estimate based on a convention specific to Chrome. Cf: https://github.com/GoogleChrome/web-vitals/pull/213\n * This is currently not an issue as the polyfill is only used for INP which is currently only supported on Chrome.\n * Hopefully when/if other browsers will support INP, they will also implement performance.interactionCount at the same time, so we won't need that polyfill.\n *\n * Reference implementation: https://github.com/GoogleChrome/web-vitals/blob/main/src/lib/polyfills/interactionCountPolyfill.ts\n */\nimport { monitor } from '@datadog/browser-core';\nlet observer;\nlet interactionCountEstimate = 0;\nlet minKnownInteractionId = Infinity;\nlet maxKnownInteractionId = 0;\nexport function initInteractionCountPolyfill() {\n    if ('interactionCount' in performance || observer) {\n        return;\n    }\n    observer = new window.PerformanceObserver(monitor((entries) => {\n        entries.getEntries().forEach((e) => {\n            const entry = e;\n            if (entry.interactionId) {\n                minKnownInteractionId = Math.min(minKnownInteractionId, entry.interactionId);\n                maxKnownInteractionId = Math.max(maxKnownInteractionId, entry.interactionId);\n                interactionCountEstimate = (maxKnownInteractionId - minKnownInteractionId) / 7 + 1;\n            }\n        });\n    }));\n    observer.observe({ type: 'event', buffered: true, durationThreshold: 0 });\n}\n/**\n * Returns the `interactionCount` value using the native API (if available)\n * or the polyfill estimate in this module.\n */\nexport const getInteractionCount = () => observer ? interactionCountEstimate : window.performance.interactionCount || 0;\nexport function resetInteractionCountPolyfill() {\n    if (observer) {\n        observer.disconnect();\n        observer = undefined;\n        interactionCountEstimate = 0;\n        minKnownInteractionId = Infinity;\n        maxKnownInteractionId = 0;\n    }\n}\n//# sourceMappingURL=interactionCountPolyfill.js.map","import { elapsed, noop, ONE_MINUTE } from '@datadog/browser-core';\nimport { createPerformanceObservable, RumPerformanceEntryType, supportPerformanceTimingEvent, } from '../../../browser/performanceObservable';\nimport { ViewLoadingType } from '../../../rawRumEvent.types';\nimport { getSelectorFromElement } from '../../getSelectorFromElement';\nimport { isElementNode } from '../../../browser/htmlDomUtils';\nimport { getInteractionSelector } from '../../action/interactionSelectorCache';\nimport { getInteractionCount, initInteractionCountPolyfill } from './interactionCountPolyfill';\n// Arbitrary value to prevent unnecessary memory usage on views with lots of interactions.\nconst MAX_INTERACTION_ENTRIES = 10;\n// Arbitrary value to cap INP outliers\nexport const MAX_INP_VALUE = (1 * ONE_MINUTE);\n// Event Timing API rounds duration values to the nearest 8 ms\nconst RENDER_TIME_GROUPING_THRESHOLD = 8;\n/**\n * Track the interaction to next paint (INP).\n * To avoid outliers, return the p98 worst interaction of the view.\n * Documentation: https://web.dev/inp/\n * Reference implementation: https://github.com/GoogleChrome/web-vitals/blob/main/src/onINP.ts\n */\nexport function trackInteractionToNextPaint(configuration, viewStart, viewLoadingType) {\n    if (!isInteractionToNextPaintSupported()) {\n        return {\n            getInteractionToNextPaint: () => undefined,\n            setViewEnd: noop,\n            stop: noop,\n        };\n    }\n    let viewEnd = Infinity;\n    let currentInp;\n    const { getViewInteractionCount, stopViewInteractionCount } = trackViewInteractionCount(viewLoadingType);\n    const longestInteractions = trackLongestInteractions(getViewInteractionCount);\n    const subPartsTracker = createSubPartsTracker(longestInteractions);\n    const firstInputSubscription = createPerformanceObservable(configuration, {\n        type: RumPerformanceEntryType.FIRST_INPUT,\n        buffered: true,\n    }).subscribe(handleEntries);\n    const eventSubscription = createPerformanceObservable(configuration, {\n        type: RumPerformanceEntryType.EVENT,\n        // durationThreshold only impact PerformanceEventTiming entries used for INP computation which requires a threshold at 40 (default is 104ms)\n        // cf: https://github.com/GoogleChrome/web-vitals/blob/3806160ffbc93c3c4abf210a167b81228172b31c/src/onINP.ts#L202-L210\n        durationThreshold: 40,\n        buffered: true,\n    }).subscribe(handleEntries);\n    function handleEntries(entries) {\n        for (const entry of entries) {\n            if (entry.interactionId &&\n                // Check the entry start time is inside the view bounds because some view interactions can be reported after the view end (if long duration).\n                entry.startTime >= viewStart &&\n                entry.startTime <= viewEnd) {\n                longestInteractions.process(entry);\n                subPartsTracker.process(entry);\n            }\n        }\n        subPartsTracker.pruneUntracked();\n        const candidate = longestInteractions.estimateP98Interaction();\n        if (candidate) {\n            updateCurrentInp(candidate);\n        }\n    }\n    function updateCurrentInp(candidate) {\n        const newStartTime = elapsed(viewStart, candidate.startTime);\n        // startTime catches identity changes when the p98 switches to a different interaction with the same duration,\n        // ensuring targetSelector and subParts always describe the same interaction.\n        if (!currentInp || candidate.duration !== currentInp.duration || newStartTime !== currentInp.startTime) {\n            let targetSelector = getInteractionSelector(candidate.startTime);\n            if (!targetSelector && candidate.target && isElementNode(candidate.target)) {\n                targetSelector = getSelectorFromElement(candidate.target, configuration.actionNameAttribute);\n            }\n            currentInp = {\n                duration: candidate.duration,\n                startTime: newStartTime,\n                targetSelector,\n            };\n        }\n        // Recomputed on every batch: the group for the p98 interaction may have been updated\n        // with new min/max timing even when the p98 identity (duration, startTime) is unchanged.\n        currentInp.subParts = subPartsTracker.computeSubParts(candidate, sanitizeInpValue(currentInp.duration));\n    }\n    return {\n        getInteractionToNextPaint: () => {\n            // If no INP duration where captured because of the performanceObserver 40ms threshold\n            // but the view interaction count > 0 then report 0\n            if (currentInp) {\n                return {\n                    value: sanitizeInpValue(currentInp.duration),\n                    targetSelector: currentInp.targetSelector,\n                    time: currentInp.startTime,\n                    subParts: currentInp.subParts,\n                };\n            }\n            else if (getViewInteractionCount()) {\n                return {\n                    value: 0,\n                };\n            }\n        },\n        setViewEnd: (viewEndTime) => {\n            viewEnd = viewEndTime;\n            stopViewInteractionCount();\n        },\n        stop: () => {\n            eventSubscription.unsubscribe();\n            firstInputSubscription.unsubscribe();\n            subPartsTracker.stop();\n        },\n    };\n}\n/**\n * Maintains a bounded list of the slowest interactions seen so far, used to estimate the p98\n * interaction duration without keeping every entry in memory.\n */\nfunction trackLongestInteractions(getViewInteractionCount) {\n    const longestInteractions = [];\n    function sortAndTrimLongestInteractions() {\n        longestInteractions.sort((a, b) => b.duration - a.duration).splice(MAX_INTERACTION_ENTRIES);\n    }\n    return {\n        /**\n         * Process the performance entry:\n         * - if its duration is long enough, add the performance entry to the list of worst interactions\n         * - if an entry with the same interaction id exists and its duration is lower than the new one, then replace it in the list of worst interactions\n         */\n        process(entry) {\n            const interactionIndex = longestInteractions.findIndex((interaction) => entry.interactionId === interaction.interactionId);\n            const minLongestInteraction = longestInteractions[longestInteractions.length - 1];\n            if (interactionIndex !== -1) {\n                if (entry.duration > longestInteractions[interactionIndex].duration) {\n                    longestInteractions[interactionIndex] = entry;\n                    sortAndTrimLongestInteractions();\n                }\n            }\n            else if (longestInteractions.length < MAX_INTERACTION_ENTRIES ||\n                entry.duration > minLongestInteraction.duration) {\n                longestInteractions.push(entry);\n                sortAndTrimLongestInteractions();\n            }\n        },\n        /**\n         * Compute the p98 longest interaction.\n         * For better performance the computation is based on 10 longest interactions and the interaction count of the current view.\n         */\n        estimateP98Interaction() {\n            const interactionIndex = Math.min(longestInteractions.length - 1, Math.floor(getViewInteractionCount() / 50));\n            return longestInteractions[interactionIndex];\n        },\n        isTracked(interactionId) {\n            return longestInteractions.some((i) => i.interactionId === interactionId);\n        },\n    };\n}\n/**\n * Tracks the number of interactions that occurred during the current view. Freezes the count\n * when the view ends so that the p98 estimate remains stable after `setViewEnd` is called.\n */\nexport function trackViewInteractionCount(viewLoadingType) {\n    initInteractionCountPolyfill();\n    const previousInteractionCount = viewLoadingType === ViewLoadingType.INITIAL_LOAD ? 0 : getInteractionCount();\n    let state = { stopped: false };\n    function computeViewInteractionCount() {\n        return getInteractionCount() - previousInteractionCount;\n    }\n    return {\n        getViewInteractionCount: () => {\n            if (state.stopped) {\n                return state.interactionCount;\n            }\n            return computeViewInteractionCount();\n        },\n        stopViewInteractionCount: () => {\n            state = { stopped: true, interactionCount: computeViewInteractionCount() };\n        },\n    };\n}\n/**\n * Groups performance entries by interaction and render time to compute INP subparts\n * (input delay, processing duration, presentation delay). Entries sharing the same\n * interactionId, or whose render time falls within the 8 ms Event Timing rounding window,\n * are merged into a single group so that subparts always sum to the reported INP duration.\n */\nfunction createSubPartsTracker(longestInteractions) {\n    const groupsByInteractionId = new Map();\n    function updateGroupWithEntry(group, entry) {\n        group.startTime = Math.min(entry.startTime, group.startTime);\n        // For each group, we keep the biggest interval possible between processingStart and processingEnd\n        group.processingStart = Math.min(entry.processingStart, group.processingStart);\n        group.processingEnd = Math.max(entry.processingEnd, group.processingEnd);\n    }\n    return {\n        process(entry) {\n            if (entry.interactionId === undefined || !entry.processingStart || !entry.processingEnd) {\n                return;\n            }\n            const renderTime = (entry.startTime + entry.duration);\n            const existingGroup = groupsByInteractionId.get(entry.interactionId);\n            if (existingGroup) {\n                // Update existing group with MIN/MAX values (keep original referenceRenderTime)\n                updateGroupWithEntry(existingGroup, entry);\n                return;\n            }\n            // Try to find a group within 8ms window to merge with (different interactionId, same frame)\n            for (const [, group] of groupsByInteractionId.entries()) {\n                if (Math.abs(renderTime - group.referenceRenderTime) <= RENDER_TIME_GROUPING_THRESHOLD) {\n                    updateGroupWithEntry(group, entry);\n                    // Also store under this entry's interactionId for easy lookup\n                    groupsByInteractionId.set(entry.interactionId, group);\n                    return;\n                }\n            }\n            // Create new group\n            groupsByInteractionId.set(entry.interactionId, {\n                startTime: entry.startTime,\n                processingStart: entry.processingStart,\n                processingEnd: entry.processingEnd,\n                referenceRenderTime: renderTime,\n            });\n        },\n        // Prune after all entries are grouped: groups not in longestInteractions can never affect p98 subparts.\n        // Keeps groupsByInteractionId capped at MAX_INTERACTION_ENTRIES\n        pruneUntracked() {\n            for (const [interactionId] of groupsByInteractionId) {\n                if (!longestInteractions.isTracked(interactionId)) {\n                    groupsByInteractionId.delete(interactionId);\n                }\n            }\n        },\n        computeSubParts(entry, inpDuration) {\n            if (!entry.processingStart || !entry.processingEnd || entry.interactionId === undefined) {\n                return undefined;\n            }\n            const group = groupsByInteractionId.get(entry.interactionId);\n            // Shouldn't happen since entries are grouped before p98 calculation.\n            if (!group) {\n                return undefined;\n            }\n            // Use group.startTime consistently to ensure subparts sum to inpDuration\n            // Math.max prevents nextPaintTime from being before processingStart (Chrome implementation)\n            const nextPaintTime = Math.max((group.startTime + inpDuration), group.processingStart);\n            // Clamp processingEnd to not exceed nextPaintTime\n            const processingEnd = Math.min(group.processingEnd, nextPaintTime);\n            return {\n                inputDelay: elapsed(group.startTime, group.processingStart),\n                processingDuration: elapsed(group.processingStart, processingEnd),\n                presentationDelay: elapsed(processingEnd, nextPaintTime),\n            };\n        },\n        stop() {\n            groupsByInteractionId.clear();\n        },\n    };\n}\nexport function isInteractionToNextPaintSupported() {\n    return (supportPerformanceTimingEvent(RumPerformanceEntryType.EVENT) &&\n        window.PerformanceEventTiming &&\n        'interactionId' in PerformanceEventTiming.prototype);\n}\nfunction sanitizeInpValue(inpValue) {\n    return Math.min(inpValue, MAX_INP_VALUE);\n}\n//# sourceMappingURL=trackInteractionToNextPaint.js.map","export function getScrollX() {\n    let scrollX;\n    const visual = window.visualViewport;\n    if (visual) {\n        scrollX = visual.pageLeft - visual.offsetLeft;\n    }\n    else if (window.scrollX !== undefined) {\n        scrollX = window.scrollX;\n    }\n    else {\n        scrollX = window.pageXOffset || 0;\n    }\n    return Math.round(scrollX);\n}\nexport function getScrollY() {\n    let scrollY;\n    const visual = window.visualViewport;\n    if (visual) {\n        scrollY = visual.pageTop - visual.offsetTop;\n    }\n    else if (window.scrollY !== undefined) {\n        scrollY = window.scrollY;\n    }\n    else {\n        scrollY = window.pageYOffset || 0;\n    }\n    return Math.round(scrollY);\n}\n//# sourceMappingURL=scroll.js.map","import { Observable, throttle, addEventListener } from '@datadog/browser-core';\nlet viewportObservable;\nexport function initViewportObservable(configuration) {\n    if (!viewportObservable) {\n        viewportObservable = createViewportObservable(configuration);\n    }\n    return viewportObservable;\n}\nexport function createViewportObservable(configuration) {\n    return new Observable((observable) => {\n        const { throttled: updateDimension } = throttle(() => {\n            observable.notify(getViewportDimension());\n        }, 200);\n        return addEventListener(configuration, window, \"resize\" /* DOM_EVENT.RESIZE */, updateDimension, { capture: true, passive: true })\n            .stop;\n    });\n}\n// excludes the width and height of any rendered classic scrollbar that is fixed to the visual viewport\nexport function getViewportDimension() {\n    const visual = window.visualViewport;\n    if (visual) {\n        return {\n            width: Number(visual.width * visual.scale),\n            height: Number(visual.height * visual.scale),\n        };\n    }\n    return {\n        width: Number(window.innerWidth || 0),\n        height: Number(window.innerHeight || 0),\n    };\n}\n//# sourceMappingURL=viewportObservable.js.map","import { Observable, ONE_SECOND, elapsed, relativeNow, throttle, addEventListener, monitor, } from '@datadog/browser-core';\nimport { getScrollY } from '../../../browser/scroll';\nimport { getViewportDimension } from '../../../browser/viewportObservable';\n/** Arbitrary scroll throttle duration */\nexport const THROTTLE_SCROLL_DURATION = ONE_SECOND;\nexport function trackScrollMetrics(configuration, viewStart, callback, scrollValues = createScrollValuesObservable(configuration)) {\n    let maxScrollDepth = 0;\n    let maxScrollHeight = 0;\n    let maxScrollHeightTime = 0;\n    const subscription = scrollValues.subscribe(({ scrollDepth, scrollTop, scrollHeight }) => {\n        let shouldUpdate = false;\n        if (scrollDepth > maxScrollDepth) {\n            maxScrollDepth = scrollDepth;\n            shouldUpdate = true;\n        }\n        if (scrollHeight > maxScrollHeight) {\n            maxScrollHeight = scrollHeight;\n            const now = relativeNow();\n            maxScrollHeightTime = elapsed(viewStart.relative, now);\n            shouldUpdate = true;\n        }\n        if (shouldUpdate) {\n            callback({\n                maxDepth: Math.min(maxScrollDepth, maxScrollHeight),\n                maxDepthScrollTop: scrollTop,\n                maxScrollHeight,\n                maxScrollHeightTime,\n            });\n        }\n    });\n    return {\n        stop: () => subscription.unsubscribe(),\n    };\n}\nexport function computeScrollValues() {\n    const scrollTop = getScrollY();\n    const { height } = getViewportDimension();\n    const scrollHeight = Math.round((document.scrollingElement || document.documentElement).scrollHeight);\n    const scrollDepth = Math.round(height + scrollTop);\n    return {\n        scrollHeight,\n        scrollDepth,\n        scrollTop,\n    };\n}\nexport function createScrollValuesObservable(configuration, throttleDuration = THROTTLE_SCROLL_DURATION) {\n    return new Observable((observable) => {\n        function notify() {\n            observable.notify(computeScrollValues());\n        }\n        if (window.ResizeObserver) {\n            const throttledNotify = throttle(notify, throttleDuration, {\n                leading: false,\n                trailing: true,\n            });\n            const observerTarget = document.scrollingElement || document.documentElement;\n            const resizeObserver = new ResizeObserver(monitor(throttledNotify.throttled));\n            if (observerTarget) {\n                resizeObserver.observe(observerTarget);\n            }\n            const eventListener = addEventListener(configuration, window, \"scroll\" /* DOM_EVENT.SCROLL */, throttledNotify.throttled, {\n                passive: true,\n            });\n            return () => {\n                throttledNotify.cancel();\n                resizeObserver.disconnect();\n                eventListener.stop();\n            };\n        }\n    });\n}\n//# sourceMappingURL=trackScrollMetrics.js.map","import { elapsed, timeStampNow } from '@datadog/browser-core';\nimport { trackCumulativeLayoutShift } from './trackCumulativeLayoutShift';\nimport { trackInteractionToNextPaint } from './trackInteractionToNextPaint';\nimport { trackLoadingTime } from './trackLoadingTime';\nimport { trackScrollMetrics } from './trackScrollMetrics';\nexport function trackCommonViewMetrics(lifeCycle, domMutationObservable, windowOpenObservable, configuration, scheduleViewUpdate, loadingType, viewStart) {\n    const commonViewMetrics = {};\n    let hasManualLoadingTime = false;\n    let viewEnded = false;\n    const { stop: stopLoadingTimeTracking, setLoadEvent } = trackLoadingTime(lifeCycle, domMutationObservable, windowOpenObservable, configuration, loadingType, viewStart, (newLoadingTime) => {\n        if (!hasManualLoadingTime) {\n            commonViewMetrics.loadingTime = newLoadingTime;\n            scheduleViewUpdate();\n        }\n    });\n    const { stop: stopScrollMetricsTracking } = trackScrollMetrics(configuration, viewStart, (newScrollMetrics) => {\n        commonViewMetrics.scroll = newScrollMetrics;\n    });\n    const { stop: stopCLSTracking } = trackCumulativeLayoutShift(configuration, viewStart.relative, (cumulativeLayoutShift) => {\n        commonViewMetrics.cumulativeLayoutShift = cumulativeLayoutShift;\n        scheduleViewUpdate();\n    });\n    const { stop: stopINPTracking, getInteractionToNextPaint, setViewEnd: setINPViewEnd, } = trackInteractionToNextPaint(configuration, viewStart.relative, loadingType);\n    return {\n        stop: () => {\n            stopLoadingTimeTracking();\n            stopCLSTracking();\n            stopScrollMetricsTracking();\n        },\n        stopINPTracking,\n        setLoadEvent,\n        setViewEnd: (viewEndTime) => {\n            viewEnded = true;\n            setINPViewEnd(viewEndTime);\n        },\n        getCommonViewMetrics: () => {\n            commonViewMetrics.interactionToNextPaint = getInteractionToNextPaint();\n            return commonViewMetrics;\n        },\n        setLoadingTime: (callTimestamp) => {\n            if (viewEnded) {\n                return;\n            }\n            const loadingTime = elapsed(viewStart.timeStamp, callTimestamp !== null && callTimestamp !== void 0 ? callTimestamp : timeStampNow());\n            if (!hasManualLoadingTime) {\n                stopLoadingTimeTracking();\n            }\n            hasManualLoadingTime = true;\n            commonViewMetrics.loadingTime = loadingTime;\n            scheduleViewUpdate();\n        },\n    };\n}\n//# sourceMappingURL=trackCommonViewMetrics.js.map","import { elapsed } from '@datadog/browser-core';\nimport { waitPageActivityEnd } from '../../waitPageActivityEnd';\nimport { ViewLoadingType } from '../../../rawRumEvent.types';\nimport { trackFirstHidden } from './trackFirstHidden';\n/**\n * For non-initial views (such as route changes or BFCache restores), the regular load event does not fire\n * In these cases, trackLoadingTime can only emit a loadingTime  if waitPageActivityEnd detects some post-restore activity.\n * If nothing happens after the view starts,no candidate is recorded and loadingTime stays undefined.\n */\nexport function trackLoadingTime(lifeCycle, domMutationObservable, windowOpenObservable, configuration, loadType, viewStart, callback) {\n    let isWaitingForLoadEvent = loadType === ViewLoadingType.INITIAL_LOAD;\n    let isWaitingForActivityLoadingTime = true;\n    const loadingTimeCandidates = [];\n    const firstHidden = trackFirstHidden(configuration, viewStart);\n    function invokeCallbackIfAllCandidatesAreReceived() {\n        if (!isWaitingForActivityLoadingTime && !isWaitingForLoadEvent && loadingTimeCandidates.length > 0) {\n            const loadingTime = Math.max(...loadingTimeCandidates);\n            // firstHidden is a relative time from time origin, so we use the relative start time of the view to compare with the loading time\n            if (loadingTime < firstHidden.timeStamp - viewStart.relative) {\n                callback(loadingTime);\n            }\n        }\n    }\n    const { stop } = waitPageActivityEnd(lifeCycle, domMutationObservable, windowOpenObservable, configuration, (event) => {\n        if (isWaitingForActivityLoadingTime) {\n            isWaitingForActivityLoadingTime = false;\n            if (event.hadActivity) {\n                loadingTimeCandidates.push(elapsed(viewStart.timeStamp, event.end));\n            }\n            invokeCallbackIfAllCandidatesAreReceived();\n        }\n    });\n    return {\n        stop: () => {\n            stop();\n            firstHidden.stop();\n        },\n        setLoadEvent: (loadEvent) => {\n            if (isWaitingForLoadEvent) {\n                isWaitingForLoadEvent = false;\n                loadingTimeCandidates.push(loadEvent);\n                invokeCallbackIfAllCandidatesAreReceived();\n            }\n        },\n    };\n}\n//# sourceMappingURL=trackLoadingTime.js.map","import { trackRestoredFirstContentfulPaint } from './trackFirstContentfulPaint';\n/**\n * BFCache keeps a full in-memory snapshot of the DOM. When the page is restored, nothing needs to be fetched, so the whole\n * viewport repaints in a single frame. Consequently, LCP almost always equals FCP.\n * (See: https://github.com/GoogleChrome/web-vitals/pull/87)\n */\nexport function trackBfcacheMetrics(viewStart, metrics, scheduleViewUpdate) {\n    trackRestoredFirstContentfulPaint(viewStart.relative, (paintTime) => {\n        metrics.firstContentfulPaint = paintTime;\n        metrics.largestContentfulPaint = { value: paintTime };\n        scheduleViewUpdate();\n    });\n}\n//# sourceMappingURL=trackBfcacheMetrics.js.map","import { noop, PageExitReason, shallowClone, elapsed, generateUUID, ONE_MINUTE, throttle, clocksNow, clocksOrigin, relativeToClocks, timeStampNow, display, looksLikeRelativeTime, setInterval, clearInterval, setTimeout, Observable, createContextManager, mockable, } from '@datadog/browser-core';\nimport { ViewLoadingType } from '../../rawRumEvent.types';\nimport { trackViewEventCounts } from './trackViewEventCounts';\nimport { trackInitialViewMetrics } from './viewMetrics/trackInitialViewMetrics';\nimport { trackCommonViewMetrics } from './viewMetrics/trackCommonViewMetrics';\nimport { onBFCacheRestore } from './bfCacheSupport';\nimport { trackBfcacheMetrics } from './viewMetrics/trackBfcacheMetrics';\nexport const THROTTLE_VIEW_UPDATE_PERIOD = 3000;\nexport const SESSION_KEEP_ALIVE_INTERVAL = 5 * ONE_MINUTE;\n// Some events or metrics can be captured after the end of the view. To avoid missing those;\n// an arbitrary delay is added for stopping their tracking after the view ends.\n//\n// Ideally, we would not stop and keep tracking events or metrics until the end of the session.\n// But this might have a small performance impact if there are many many views.\n// So let's have a fairly short delay improving the situation in most cases and avoid impacting performances too much.\nexport const KEEP_TRACKING_AFTER_VIEW_DELAY = 5 * ONE_MINUTE;\nexport function trackViews(lifeCycle, domMutationObservable, windowOpenObservable, configuration, locationChangeObservable, areViewsTrackedAutomatically, initialViewOptions) {\n    const activeViews = new Set();\n    let currentView = startNewView(ViewLoadingType.INITIAL_LOAD, clocksOrigin(), initialViewOptions);\n    let stopOnBFCacheRestore;\n    startViewLifeCycle();\n    let locationChangeSubscription;\n    if (areViewsTrackedAutomatically) {\n        locationChangeSubscription = renewViewOnLocationChange(locationChangeObservable);\n        if (configuration.trackBfcacheViews) {\n            stopOnBFCacheRestore = onBFCacheRestore(configuration, (pageshowEvent) => {\n                currentView.end();\n                const startClocks = relativeToClocks(pageshowEvent.timeStamp);\n                currentView = startNewView(ViewLoadingType.BF_CACHE, startClocks, undefined);\n            });\n        }\n    }\n    function startNewView(loadingType, startClocks, viewOptions) {\n        const newlyCreatedView = newView(lifeCycle, domMutationObservable, windowOpenObservable, configuration, loadingType, startClocks, viewOptions);\n        activeViews.add(newlyCreatedView);\n        newlyCreatedView.stopObservable.subscribe(() => {\n            activeViews.delete(newlyCreatedView);\n        });\n        return newlyCreatedView;\n    }\n    function startViewLifeCycle() {\n        lifeCycle.subscribe(10 /* LifeCycleEventType.SESSION_RENEWED */, () => {\n            // Renew view on session renewal\n            currentView = startNewView(ViewLoadingType.ROUTE_CHANGE, undefined, {\n                name: currentView.name,\n                service: currentView.service,\n                version: currentView.version,\n                context: currentView.contextManager.getContext(),\n            });\n        });\n        lifeCycle.subscribe(9 /* LifeCycleEventType.SESSION_EXPIRED */, () => {\n            currentView.end({ sessionIsActive: false });\n        });\n    }\n    function renewViewOnLocationChange(locationChangeObservable) {\n        return locationChangeObservable.subscribe(({ oldLocation, newLocation }) => {\n            if (areDifferentLocation(oldLocation, newLocation)) {\n                currentView.end();\n                currentView = startNewView(ViewLoadingType.ROUTE_CHANGE);\n            }\n        });\n    }\n    return {\n        addTiming: (name, time = timeStampNow()) => {\n            currentView.addTiming(name, time);\n        },\n        setLoadingTime: (callTimestamp) => currentView.setLoadingTime(callTimestamp),\n        startView: (options, startClocks) => {\n            currentView.end({ endClocks: startClocks });\n            currentView = startNewView(ViewLoadingType.ROUTE_CHANGE, startClocks, options);\n        },\n        setViewContext: (context) => {\n            currentView.contextManager.setContext(context);\n        },\n        setViewContextProperty: (key, value) => {\n            currentView.contextManager.setContextProperty(key, value);\n        },\n        setViewName: (name) => {\n            currentView.setViewName(name);\n        },\n        getViewContext: () => currentView.contextManager.getContext(),\n        stop: () => {\n            if (locationChangeSubscription) {\n                locationChangeSubscription.unsubscribe();\n            }\n            if (stopOnBFCacheRestore) {\n                stopOnBFCacheRestore();\n            }\n            currentView.end();\n            activeViews.forEach((view) => view.stop());\n        },\n    };\n}\nfunction newView(lifeCycle, domMutationObservable, windowOpenObservable, configuration, loadingType, startClocks = clocksNow(), viewOptions) {\n    // Setup initial values\n    const id = generateUUID();\n    const stopObservable = new Observable();\n    const customTimings = {};\n    let documentVersion = 0;\n    let endClocks;\n    const location = shallowClone(mockable(window.location));\n    const contextManager = createContextManager();\n    let sessionIsActive = true;\n    let name = viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.name;\n    const service = (viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.service) || configuration.service;\n    const version = (viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.version) || configuration.version;\n    const context = viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.context;\n    const handlingStack = viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.handlingStack;\n    if (context) {\n        contextManager.setContext(context);\n    }\n    const viewCreatedEvent = {\n        id,\n        name,\n        startClocks,\n        service,\n        version,\n        context,\n        url: viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.url,\n    };\n    lifeCycle.notify(1 /* LifeCycleEventType.BEFORE_VIEW_CREATED */, viewCreatedEvent);\n    lifeCycle.notify(2 /* LifeCycleEventType.VIEW_CREATED */, viewCreatedEvent);\n    // Update the view every time the measures are changing\n    const { throttled, cancel: cancelScheduleViewUpdate } = throttle(triggerViewUpdate, THROTTLE_VIEW_UPDATE_PERIOD, {\n        leading: false,\n    });\n    const { setLoadEvent, setViewEnd, stop: stopCommonViewMetricsTracking, stopINPTracking, getCommonViewMetrics, setLoadingTime, } = trackCommonViewMetrics(lifeCycle, domMutationObservable, windowOpenObservable, configuration, scheduleViewUpdate, loadingType, startClocks);\n    const { stop: stopInitialViewMetricsTracking, initialViewMetrics } = loadingType === ViewLoadingType.INITIAL_LOAD\n        ? trackInitialViewMetrics(configuration, startClocks, setLoadEvent, scheduleViewUpdate)\n        : { stop: noop, initialViewMetrics: {} };\n    // Start BFCache-specific metrics when restoring from BFCache\n    if (loadingType === ViewLoadingType.BF_CACHE) {\n        trackBfcacheMetrics(startClocks, initialViewMetrics, scheduleViewUpdate);\n    }\n    const { stop: stopEventCountsTracking, eventCounts } = trackViewEventCounts(lifeCycle, id, scheduleViewUpdate);\n    // Session keep alive\n    const keepAliveIntervalId = setInterval(triggerViewUpdate, SESSION_KEEP_ALIVE_INTERVAL);\n    const pageMayExitSubscription = lifeCycle.subscribe(11 /* LifeCycleEventType.PAGE_MAY_EXIT */, (pageMayExitEvent) => {\n        if (pageMayExitEvent.reason === PageExitReason.UNLOADING) {\n            triggerViewUpdate();\n        }\n    });\n    // Initial view update\n    triggerViewUpdate();\n    // View context update should always be throttled\n    contextManager.changeObservable.subscribe(scheduleViewUpdate);\n    function triggerBeforeViewUpdate() {\n        lifeCycle.notify(3 /* LifeCycleEventType.BEFORE_VIEW_UPDATED */, {\n            id,\n            name,\n            context: contextManager.getContext(),\n            startClocks,\n            sessionIsActive,\n        });\n    }\n    function scheduleViewUpdate() {\n        triggerBeforeViewUpdate();\n        throttled();\n    }\n    function triggerViewUpdate() {\n        cancelScheduleViewUpdate();\n        triggerBeforeViewUpdate();\n        documentVersion += 1;\n        const currentEnd = endClocks === undefined ? timeStampNow() : endClocks.timeStamp;\n        lifeCycle.notify(4 /* LifeCycleEventType.VIEW_UPDATED */, {\n            customTimings,\n            documentVersion,\n            id,\n            name,\n            service,\n            version,\n            context: contextManager.getContext(),\n            loadingType,\n            location,\n            handlingStack,\n            startClocks,\n            commonViewMetrics: getCommonViewMetrics(),\n            initialViewMetrics,\n            duration: elapsed(startClocks.timeStamp, currentEnd),\n            isActive: endClocks === undefined,\n            sessionIsActive,\n            eventCounts,\n        });\n    }\n    return {\n        get name() {\n            return name;\n        },\n        service,\n        version,\n        contextManager,\n        stopObservable,\n        end(options = {}) {\n            var _a, _b;\n            if (endClocks) {\n                // view already ended\n                return;\n            }\n            endClocks = (_a = options.endClocks) !== null && _a !== void 0 ? _a : clocksNow();\n            sessionIsActive = (_b = options.sessionIsActive) !== null && _b !== void 0 ? _b : true;\n            lifeCycle.notify(5 /* LifeCycleEventType.VIEW_ENDED */, { endClocks });\n            lifeCycle.notify(6 /* LifeCycleEventType.AFTER_VIEW_ENDED */, { endClocks });\n            clearInterval(keepAliveIntervalId);\n            setViewEnd(endClocks.relative);\n            stopCommonViewMetricsTracking();\n            pageMayExitSubscription.unsubscribe();\n            triggerViewUpdate();\n            setTimeout(() => {\n                this.stop();\n            }, KEEP_TRACKING_AFTER_VIEW_DELAY);\n        },\n        stop() {\n            stopInitialViewMetricsTracking();\n            stopEventCountsTracking();\n            stopINPTracking();\n            stopObservable.notify();\n        },\n        addTiming(name, time) {\n            if (endClocks) {\n                return;\n            }\n            const relativeTime = looksLikeRelativeTime(time) ? time : elapsed(startClocks.timeStamp, time);\n            customTimings[sanitizeTiming(name)] = relativeTime;\n            scheduleViewUpdate();\n        },\n        setLoadingTime,\n        setViewName(updatedName) {\n            name = updatedName;\n            triggerViewUpdate();\n        },\n    };\n}\n/**\n * Timing name is used as facet path that must contain only letters, digits, or the characters - _ . @ $\n */\nfunction sanitizeTiming(name) {\n    const sanitized = name.replace(/[^a-zA-Z0-9-_.@$]/g, '_');\n    if (sanitized !== name) {\n        display.warn(`Invalid timing name: ${name}, sanitized to: ${sanitized}`);\n    }\n    return sanitized;\n}\nfunction areDifferentLocation(currentLocation, otherLocation) {\n    return (currentLocation.pathname !== otherLocation.pathname ||\n        (!isHashAnAnchor(otherLocation.hash) &&\n            getPathFromHash(otherLocation.hash) !== getPathFromHash(currentLocation.hash)));\n}\nfunction isHashAnAnchor(hash) {\n    const correspondingId = hash.substring(1);\n    // check if the correspondingId is empty because on Firefox an empty string passed to getElementById() prints a consol warning\n    return correspondingId !== '' && !!document.getElementById(correspondingId);\n}\nfunction getPathFromHash(hash) {\n    const index = hash.indexOf('?');\n    return index < 0 ? hash : hash.slice(0, index);\n}\n//# sourceMappingURL=trackViews.js.map","import { trackEventCounts } from '../trackEventCounts';\nexport function trackViewEventCounts(lifeCycle, viewId, onChange) {\n    const { stop, eventCounts } = trackEventCounts({\n        lifeCycle,\n        isChildEvent: (event) => event.view.id === viewId,\n        onChange,\n    });\n    return {\n        stop,\n        eventCounts,\n    };\n}\n//# sourceMappingURL=trackViewEventCounts.js.map","import { addEventListener } from '@datadog/browser-core';\nexport function onBFCacheRestore(configuration, callback) {\n    const { stop } = addEventListener(configuration, window, \"pageshow\" /* DOM_EVENT.PAGE_SHOW */, (event) => {\n        if (event.persisted) {\n            callback(event);\n        }\n    }, { capture: true });\n    return stop;\n}\n//# sourceMappingURL=bfCacheSupport.js.map","import { getTimeZone, DISCARDED, isEmptyObject, mapValues, toServerDuration } from '@datadog/browser-core';\nimport { discardNegativeDuration } from '../discardNegativeDuration';\nimport { RumEventType } from '../../rawRumEvent.types';\nimport { trackViews } from './trackViews';\nexport function startViewCollection(lifeCycle, hooks, configuration, domMutationObservable, pageOpenObservable, locationChangeObservable, recorderApi, viewHistory, initialViewOptions) {\n    lifeCycle.subscribe(4 /* LifeCycleEventType.VIEW_UPDATED */, (view) => lifeCycle.notify(12 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, processViewUpdate(view, configuration, recorderApi)));\n    hooks.register(0 /* HookNames.Assemble */, ({ startTime, eventType }) => {\n        const view = viewHistory.findView(startTime);\n        if (!view) {\n            return DISCARDED;\n        }\n        return {\n            type: eventType,\n            service: view.service,\n            version: view.version,\n            context: view.context,\n            view: {\n                id: view.id,\n                name: view.name,\n            },\n        };\n    });\n    hooks.register(1 /* HookNames.AssembleTelemetry */, ({ startTime }) => {\n        var _a;\n        return ({\n            view: {\n                id: (_a = viewHistory.findView(startTime)) === null || _a === void 0 ? void 0 : _a.id,\n            },\n        });\n    });\n    return trackViews(lifeCycle, domMutationObservable, pageOpenObservable, configuration, locationChangeObservable, !configuration.trackViewsManually, initialViewOptions);\n}\nfunction processViewUpdate(view, configuration, recorderApi) {\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;\n    const replayStats = recorderApi.getReplayStats(view.id);\n    const clsDevicePixelRatio = (_b = (_a = view.commonViewMetrics) === null || _a === void 0 ? void 0 : _a.cumulativeLayoutShift) === null || _b === void 0 ? void 0 : _b.devicePixelRatio;\n    const viewEvent = {\n        _dd: {\n            document_version: view.documentVersion,\n            replay_stats: replayStats,\n            cls: clsDevicePixelRatio\n                ? {\n                    device_pixel_ratio: clsDevicePixelRatio,\n                }\n                : undefined,\n            configuration: {\n                start_session_replay_recording_manually: configuration.startSessionReplayRecordingManually,\n            },\n        },\n        date: view.startClocks.timeStamp,\n        type: RumEventType.VIEW,\n        view: {\n            action: {\n                count: view.eventCounts.actionCount,\n            },\n            frustration: {\n                count: view.eventCounts.frustrationCount,\n            },\n            cumulative_layout_shift: (_c = view.commonViewMetrics.cumulativeLayoutShift) === null || _c === void 0 ? void 0 : _c.value,\n            cumulative_layout_shift_time: toServerDuration((_d = view.commonViewMetrics.cumulativeLayoutShift) === null || _d === void 0 ? void 0 : _d.time),\n            cumulative_layout_shift_target_selector: (_e = view.commonViewMetrics.cumulativeLayoutShift) === null || _e === void 0 ? void 0 : _e.targetSelector,\n            first_byte: toServerDuration((_f = view.initialViewMetrics.navigationTimings) === null || _f === void 0 ? void 0 : _f.firstByte),\n            dom_complete: toServerDuration((_g = view.initialViewMetrics.navigationTimings) === null || _g === void 0 ? void 0 : _g.domComplete),\n            dom_content_loaded: toServerDuration((_h = view.initialViewMetrics.navigationTimings) === null || _h === void 0 ? void 0 : _h.domContentLoaded),\n            dom_interactive: toServerDuration((_j = view.initialViewMetrics.navigationTimings) === null || _j === void 0 ? void 0 : _j.domInteractive),\n            error: {\n                count: view.eventCounts.errorCount,\n            },\n            first_contentful_paint: toServerDuration(view.initialViewMetrics.firstContentfulPaint),\n            first_input_delay: toServerDuration((_k = view.initialViewMetrics.firstInput) === null || _k === void 0 ? void 0 : _k.delay),\n            first_input_time: toServerDuration((_l = view.initialViewMetrics.firstInput) === null || _l === void 0 ? void 0 : _l.time),\n            first_input_target_selector: (_m = view.initialViewMetrics.firstInput) === null || _m === void 0 ? void 0 : _m.targetSelector,\n            interaction_to_next_paint: toServerDuration((_o = view.commonViewMetrics.interactionToNextPaint) === null || _o === void 0 ? void 0 : _o.value),\n            interaction_to_next_paint_time: toServerDuration((_p = view.commonViewMetrics.interactionToNextPaint) === null || _p === void 0 ? void 0 : _p.time),\n            interaction_to_next_paint_target_selector: (_q = view.commonViewMetrics.interactionToNextPaint) === null || _q === void 0 ? void 0 : _q.targetSelector,\n            is_active: view.isActive,\n            name: view.name,\n            largest_contentful_paint: toServerDuration((_r = view.initialViewMetrics.largestContentfulPaint) === null || _r === void 0 ? void 0 : _r.value),\n            largest_contentful_paint_target_selector: (_s = view.initialViewMetrics.largestContentfulPaint) === null || _s === void 0 ? void 0 : _s.targetSelector,\n            load_event: toServerDuration((_t = view.initialViewMetrics.navigationTimings) === null || _t === void 0 ? void 0 : _t.loadEvent),\n            loading_time: discardNegativeDuration(toServerDuration(view.commonViewMetrics.loadingTime)),\n            loading_type: view.loadingType,\n            long_task: {\n                count: view.eventCounts.longTaskCount,\n            },\n            performance: computeViewPerformanceData(view.commonViewMetrics, view.initialViewMetrics),\n            resource: {\n                count: view.eventCounts.resourceCount,\n            },\n            time_spent: toServerDuration(view.duration),\n        },\n        display: view.commonViewMetrics.scroll\n            ? {\n                scroll: {\n                    max_depth: view.commonViewMetrics.scroll.maxDepth,\n                    max_depth_scroll_top: view.commonViewMetrics.scroll.maxDepthScrollTop,\n                    max_scroll_height: view.commonViewMetrics.scroll.maxScrollHeight,\n                    max_scroll_height_time: toServerDuration(view.commonViewMetrics.scroll.maxScrollHeightTime),\n                },\n            }\n            : undefined,\n        privacy: {\n            replay_level: configuration.defaultPrivacyLevel,\n        },\n        device: {\n            locale: navigator.language,\n            locales: navigator.languages,\n            time_zone: getTimeZone(),\n        },\n    };\n    if (!isEmptyObject(view.customTimings)) {\n        viewEvent.view.custom_timings = mapValues(view.customTimings, toServerDuration);\n    }\n    return {\n        rawRumEvent: viewEvent,\n        startClocks: view.startClocks,\n        duration: view.duration,\n        domainContext: {\n            location: view.location,\n            handlingStack: view.handlingStack,\n        },\n    };\n}\nfunction computeViewPerformanceData({ cumulativeLayoutShift, interactionToNextPaint }, { firstContentfulPaint, firstInput, largestContentfulPaint }) {\n    return {\n        cls: cumulativeLayoutShift && {\n            score: cumulativeLayoutShift.value,\n            timestamp: toServerDuration(cumulativeLayoutShift.time),\n            target_selector: cumulativeLayoutShift.targetSelector,\n            previous_rect: cumulativeLayoutShift.previousRect,\n            current_rect: cumulativeLayoutShift.currentRect,\n        },\n        fcp: firstContentfulPaint && { timestamp: toServerDuration(firstContentfulPaint) },\n        fid: firstInput && {\n            duration: toServerDuration(firstInput.delay),\n            timestamp: toServerDuration(firstInput.time),\n            target_selector: firstInput.targetSelector,\n        },\n        inp: interactionToNextPaint && {\n            duration: toServerDuration(interactionToNextPaint.value),\n            timestamp: toServerDuration(interactionToNextPaint.time),\n            target_selector: interactionToNextPaint.targetSelector,\n            sub_parts: interactionToNextPaint.subParts\n                ? {\n                    input_delay: toServerDuration(interactionToNextPaint.subParts.inputDelay),\n                    processing_duration: toServerDuration(interactionToNextPaint.subParts.processingDuration),\n                    presentation_delay: toServerDuration(interactionToNextPaint.subParts.presentationDelay),\n                }\n                : undefined,\n        },\n        lcp: largestContentfulPaint && {\n            timestamp: toServerDuration(largestContentfulPaint.value),\n            target_selector: largestContentfulPaint.targetSelector,\n            resource_url: largestContentfulPaint.resourceUrl,\n            sub_parts: largestContentfulPaint.subParts\n                ? {\n                    load_delay: toServerDuration(largestContentfulPaint.subParts.loadDelay),\n                    load_time: toServerDuration(largestContentfulPaint.subParts.loadTime),\n                    render_delay: toServerDuration(largestContentfulPaint.subParts.renderDelay),\n                }\n                : undefined,\n        },\n    };\n}\n//# sourceMappingURL=viewCollection.js.map","import { Observable } from '../../tools/observable';\nimport { createValueHistory } from '../../tools/valueHistory';\nimport { clocksOrigin, ONE_MINUTE, relativeNow } from '../../tools/utils/timeUtils';\nimport { addEventListener, addEventListeners } from '../../browser/addEventListener';\nimport { clearInterval, setInterval } from '../../tools/timer';\nimport { addTelemetryDebug } from '../telemetry';\nimport { isSyntheticsTest } from '../synthetics/syntheticsWorkerValues';\nimport { getCurrentSite } from '../../browser/cookie';\nimport { SESSION_NOT_TRACKED, SESSION_TIME_OUT_DELAY, SessionPersistence } from './sessionConstants';\nimport { startSessionStore } from './sessionStore';\nimport { retrieveSessionCookie } from './storeStrategies/sessionInCookie';\nimport { SESSION_STORE_KEY } from './storeStrategies/sessionStoreStrategy';\nimport { retrieveSessionFromLocalStorage } from './storeStrategies/sessionInLocalStorage';\nexport const VISIBILITY_CHECK_DELAY = ONE_MINUTE;\nconst SESSION_CONTEXT_TIMEOUT_DELAY = SESSION_TIME_OUT_DELAY;\nlet stopCallbacks = [];\nexport function startSessionManager(configuration, productKey, computeTrackingType, trackingConsentState) {\n    const renewObservable = new Observable();\n    const expireObservable = new Observable();\n    // TODO - Improve configuration type and remove assertion\n    const sessionStore = startSessionStore(configuration.sessionStoreStrategyType, configuration, productKey, computeTrackingType);\n    stopCallbacks.push(() => sessionStore.stop());\n    const sessionContextHistory = createValueHistory({\n        expireDelay: SESSION_CONTEXT_TIMEOUT_DELAY,\n    });\n    stopCallbacks.push(() => sessionContextHistory.stop());\n    sessionStore.renewObservable.subscribe(() => {\n        sessionContextHistory.add(buildSessionContext(), relativeNow());\n        renewObservable.notify();\n    });\n    sessionStore.expireObservable.subscribe(() => {\n        expireObservable.notify();\n        sessionContextHistory.closeActive(relativeNow());\n    });\n    // We expand/renew session unconditionally as tracking consent is always granted when the session\n    // manager is started.\n    sessionStore.expandOrRenewSession();\n    sessionContextHistory.add(buildSessionContext(), clocksOrigin().relative);\n    trackingConsentState.observable.subscribe(() => {\n        if (trackingConsentState.isGranted()) {\n            sessionStore.expandOrRenewSession();\n        }\n        else {\n            sessionStore.expire(false);\n        }\n    });\n    trackActivity(configuration, () => {\n        if (trackingConsentState.isGranted()) {\n            sessionStore.expandOrRenewSession();\n        }\n    });\n    trackVisibility(configuration, () => sessionStore.expandSession());\n    trackResume(configuration, () => sessionStore.restartSession());\n    function buildSessionContext() {\n        const session = sessionStore.getSession();\n        if (!session) {\n            reportUnexpectedSessionState(configuration).catch(() => void 0); // Ignore errors\n            return {\n                id: 'invalid',\n                trackingType: SESSION_NOT_TRACKED,\n                isReplayForced: false,\n                anonymousId: undefined,\n            };\n        }\n        return {\n            id: session.id,\n            trackingType: session[productKey],\n            isReplayForced: !!session.forcedReplay,\n            anonymousId: session.anonymousId,\n        };\n    }\n    return {\n        findSession: (startTime, options) => sessionContextHistory.find(startTime, options),\n        renewObservable,\n        expireObservable,\n        sessionStateUpdateObservable: sessionStore.sessionStateUpdateObservable,\n        expire: sessionStore.expire,\n        updateSessionState: sessionStore.updateSessionState,\n    };\n}\nexport function stopSessionManager() {\n    stopCallbacks.forEach((e) => e());\n    stopCallbacks = [];\n}\nfunction trackActivity(configuration, expandOrRenewSession) {\n    const { stop } = addEventListeners(configuration, window, [\"click\" /* DOM_EVENT.CLICK */, \"touchstart\" /* DOM_EVENT.TOUCH_START */, \"keydown\" /* DOM_EVENT.KEY_DOWN */, \"scroll\" /* DOM_EVENT.SCROLL */], expandOrRenewSession, { capture: true, passive: true });\n    stopCallbacks.push(stop);\n}\nfunction trackVisibility(configuration, expandSession) {\n    const expandSessionWhenVisible = () => {\n        if (document.visibilityState === 'visible') {\n            expandSession();\n        }\n    };\n    const { stop } = addEventListener(configuration, document, \"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */, expandSessionWhenVisible);\n    stopCallbacks.push(stop);\n    const visibilityCheckInterval = setInterval(expandSessionWhenVisible, VISIBILITY_CHECK_DELAY);\n    stopCallbacks.push(() => {\n        clearInterval(visibilityCheckInterval);\n    });\n}\nfunction trackResume(configuration, cb) {\n    const { stop } = addEventListener(configuration, window, \"resume\" /* DOM_EVENT.RESUME */, cb, { capture: true });\n    stopCallbacks.push(stop);\n}\nasync function reportUnexpectedSessionState(configuration) {\n    const sessionStoreStrategyType = configuration.sessionStoreStrategyType;\n    if (!sessionStoreStrategyType) {\n        return;\n    }\n    let rawSession;\n    let cookieContext;\n    if (sessionStoreStrategyType.type === SessionPersistence.COOKIE) {\n        rawSession = retrieveSessionCookie(sessionStoreStrategyType.cookieOptions, configuration);\n        cookieContext = {\n            cookie: await getSessionCookies(),\n            currentDomain: `${window.location.protocol}//${window.location.hostname}`,\n        };\n    }\n    else {\n        rawSession = retrieveSessionFromLocalStorage();\n    }\n    // monitor-until: forever, could be handy to troubleshoot issues until session manager rework\n    addTelemetryDebug('Unexpected session state', {\n        sessionStoreStrategyType: sessionStoreStrategyType.type,\n        session: rawSession,\n        isSyntheticsTest: isSyntheticsTest(),\n        createdTimestamp: rawSession === null || rawSession === void 0 ? void 0 : rawSession.created,\n        expireTimestamp: rawSession === null || rawSession === void 0 ? void 0 : rawSession.expire,\n        ...cookieContext,\n    });\n}\nasync function getSessionCookies() {\n    let sessionCookies;\n    if ('cookieStore' in window) {\n        sessionCookies = await window.cookieStore.getAll(SESSION_STORE_KEY);\n    }\n    else {\n        sessionCookies = document.cookie.split(/\\s*;\\s*/).filter((cookie) => cookie.startsWith(SESSION_STORE_KEY));\n    }\n    return {\n        count: sessionCookies.length,\n        domain: getCurrentSite() || 'undefined',\n        ...sessionCookies,\n    };\n}\n//# sourceMappingURL=sessionManager.js.map","import { Observable, SESSION_NOT_TRACKED, bridgeSupports, noop, performDraw, startSessionManager, } from '@datadog/browser-core';\nexport const RUM_SESSION_KEY = 'rum';\nexport function startRumSessionManager(configuration, lifeCycle, trackingConsentState) {\n    const sessionManager = startSessionManager(configuration, RUM_SESSION_KEY, (rawTrackingType) => computeTrackingType(configuration, rawTrackingType), trackingConsentState);\n    sessionManager.expireObservable.subscribe(() => {\n        lifeCycle.notify(9 /* LifeCycleEventType.SESSION_EXPIRED */);\n    });\n    sessionManager.renewObservable.subscribe(() => {\n        lifeCycle.notify(10 /* LifeCycleEventType.SESSION_RENEWED */);\n    });\n    sessionManager.sessionStateUpdateObservable.subscribe(({ previousState, newState }) => {\n        if (!previousState.forcedReplay && newState.forcedReplay) {\n            const sessionEntity = sessionManager.findSession();\n            if (sessionEntity) {\n                sessionEntity.isReplayForced = true;\n            }\n        }\n    });\n    return {\n        findTrackedSession: (startTime) => {\n            const session = sessionManager.findSession(startTime);\n            if (!session || session.trackingType === \"0\" /* RumTrackingType.NOT_TRACKED */) {\n                return;\n            }\n            return {\n                id: session.id,\n                sessionReplay: session.trackingType === \"1\" /* RumTrackingType.TRACKED_WITH_SESSION_REPLAY */\n                    ? 1 /* SessionReplayState.SAMPLED */\n                    : session.isReplayForced\n                        ? 2 /* SessionReplayState.FORCED */\n                        : 0 /* SessionReplayState.OFF */,\n                anonymousId: session.anonymousId,\n            };\n        },\n        expire: sessionManager.expire,\n        expireObservable: sessionManager.expireObservable,\n        setForcedReplay: () => sessionManager.updateSessionState({ forcedReplay: '1' }),\n    };\n}\n/**\n * Start a tracked replay session stub\n */\nexport function startRumSessionManagerStub() {\n    const session = {\n        id: '00000000-aaaa-0000-aaaa-000000000000',\n        sessionReplay: bridgeSupports(\"records\" /* BridgeCapability.RECORDS */) ? 1 /* SessionReplayState.SAMPLED */ : 0 /* SessionReplayState.OFF */,\n    };\n    return {\n        findTrackedSession: () => session,\n        expire: noop,\n        expireObservable: new Observable(),\n        setForcedReplay: noop,\n    };\n}\nfunction computeTrackingType(configuration, rawTrackingType) {\n    if (hasValidRumSession(rawTrackingType)) {\n        return rawTrackingType;\n    }\n    if (!performDraw(configuration.sessionSampleRate)) {\n        return \"0\" /* RumTrackingType.NOT_TRACKED */;\n    }\n    if (!performDraw(configuration.sessionReplaySampleRate)) {\n        return \"2\" /* RumTrackingType.TRACKED_WITHOUT_SESSION_REPLAY */;\n    }\n    return \"1\" /* RumTrackingType.TRACKED_WITH_SESSION_REPLAY */;\n}\nfunction hasValidRumSession(trackingType) {\n    return (trackingType === \"0\" /* RumTrackingType.NOT_TRACKED */ ||\n        trackingType === \"1\" /* RumTrackingType.TRACKED_WITH_SESSION_REPLAY */ ||\n        trackingType === \"2\" /* RumTrackingType.TRACKED_WITHOUT_SESSION_REPLAY */);\n}\n//# sourceMappingURL=rumSessionManager.js.map","import { SESSION_TIME_OUT_DELAY, relativeNow, createValueHistory, DISCARDED, mockable, buildUrl, } from '@datadog/browser-core';\n/**\n * We want to attach to an event:\n * - the url corresponding to its start\n * - the referrer corresponding to the previous view url (or document referrer for initial view)\n */\nexport const URL_CONTEXT_TIME_OUT_DELAY = SESSION_TIME_OUT_DELAY;\nexport function startUrlContexts(lifeCycle, hooks, locationChangeObservable) {\n    const urlContextHistory = createValueHistory({ expireDelay: URL_CONTEXT_TIME_OUT_DELAY });\n    let previousViewUrl;\n    lifeCycle.subscribe(1 /* LifeCycleEventType.BEFORE_VIEW_CREATED */, ({ startClocks, url }) => {\n        const locationHref = mockable(location).href;\n        const viewUrl = url !== undefined ? buildUrl(url, locationHref).href : locationHref;\n        urlContextHistory.add(buildUrlContext({\n            url: viewUrl,\n            referrer: !previousViewUrl ? document.referrer : previousViewUrl,\n        }), startClocks.relative);\n        previousViewUrl = viewUrl;\n    });\n    lifeCycle.subscribe(6 /* LifeCycleEventType.AFTER_VIEW_ENDED */, ({ endClocks }) => {\n        urlContextHistory.closeActive(endClocks.relative);\n    });\n    const locationChangeSubscription = locationChangeObservable.subscribe(({ newLocation }) => {\n        const current = urlContextHistory.find();\n        if (current) {\n            const changeTime = relativeNow();\n            urlContextHistory.closeActive(changeTime);\n            urlContextHistory.add(buildUrlContext({\n                url: newLocation.href,\n                referrer: current.referrer,\n            }), changeTime);\n        }\n    });\n    function buildUrlContext({ url, referrer }) {\n        return {\n            url,\n            referrer,\n        };\n    }\n    hooks.register(0 /* HookNames.Assemble */, ({ startTime, eventType }) => {\n        const urlContext = urlContextHistory.find(startTime);\n        if (!urlContext) {\n            return DISCARDED;\n        }\n        return {\n            type: eventType,\n            view: {\n                url: urlContext.url,\n                referrer: urlContext.referrer,\n            },\n        };\n    });\n    return {\n        findUrl: (startTime) => urlContextHistory.find(startTime),\n        stop: () => {\n            locationChangeSubscription.unsubscribe();\n            urlContextHistory.stop();\n        },\n    };\n}\n//# sourceMappingURL=urlContexts.js.map","import { addEventListener, instrumentMethod, Observable, shallowClone } from '@datadog/browser-core';\nexport function createLocationChangeObservable(configuration) {\n    let currentLocation = shallowClone(location);\n    return new Observable((observable) => {\n        const { stop: stopHistoryTracking } = trackHistory(configuration, onLocationChange);\n        const { stop: stopHashTracking } = trackHash(configuration, onLocationChange);\n        function onLocationChange() {\n            if (currentLocation.href === location.href) {\n                return;\n            }\n            const newLocation = shallowClone(location);\n            observable.notify({\n                newLocation,\n                oldLocation: currentLocation,\n            });\n            currentLocation = newLocation;\n        }\n        return () => {\n            stopHistoryTracking();\n            stopHashTracking();\n        };\n    });\n}\nfunction trackHistory(configuration, onHistoryChange) {\n    const { stop: stopInstrumentingPushState } = instrumentMethod(getHistoryInstrumentationTarget('pushState'), 'pushState', ({ onPostCall }) => {\n        onPostCall(onHistoryChange);\n    });\n    const { stop: stopInstrumentingReplaceState } = instrumentMethod(getHistoryInstrumentationTarget('replaceState'), 'replaceState', ({ onPostCall }) => {\n        onPostCall(onHistoryChange);\n    });\n    const { stop: removeListener } = addEventListener(configuration, window, \"popstate\" /* DOM_EVENT.POP_STATE */, onHistoryChange);\n    return {\n        stop: () => {\n            stopInstrumentingPushState();\n            stopInstrumentingReplaceState();\n            removeListener();\n        },\n    };\n}\nfunction trackHash(configuration, onHashChange) {\n    return addEventListener(configuration, window, \"hashchange\" /* DOM_EVENT.HASH_CHANGE */, onHashChange);\n}\nfunction getHistoryInstrumentationTarget(methodName) {\n    // Ideally we should always instument the method on the prototype, however some frameworks (e.g [Next.js](https://github.com/vercel/next.js/blob/d3f5532065f3e3bb84fb54bd2dfd1a16d0f03a21/packages/next/src/client/components/app-router.tsx#L429))\n    // are wrapping the instance method. In that case we should also wrap the instance method.\n    return Object.prototype.hasOwnProperty.call(history, methodName) ? history : History.prototype;\n}\n//# sourceMappingURL=locationChangeObservable.js.map","import { SESSION_TIME_OUT_DELAY, SKIPPED, createValueHistory, isEmptyObject } from '@datadog/browser-core';\nimport { RumEventType } from '../../rawRumEvent.types';\nexport const FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY = SESSION_TIME_OUT_DELAY;\nexport const BYTES_COMPUTATION_THROTTLING_DELAY = 200;\n/**\n * Start feature flag contexts\n *\n * Feature flag contexts follow the life of views.\n * A new context is added when a view is created and ended when the view is ended\n *\n * Note: we choose not to add a new context at each evaluation to save memory\n */\nexport function startFeatureFlagContexts(lifeCycle, hooks, configuration) {\n    const featureFlagContexts = createValueHistory({\n        expireDelay: FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY,\n    });\n    lifeCycle.subscribe(1 /* LifeCycleEventType.BEFORE_VIEW_CREATED */, ({ startClocks }) => {\n        featureFlagContexts.add({}, startClocks.relative);\n    });\n    lifeCycle.subscribe(6 /* LifeCycleEventType.AFTER_VIEW_ENDED */, ({ endClocks }) => {\n        featureFlagContexts.closeActive(endClocks.relative);\n    });\n    hooks.register(0 /* HookNames.Assemble */, ({ startTime, eventType }) => {\n        const trackFeatureFlagsForEvents = configuration.trackFeatureFlagsForEvents.concat([\n            RumEventType.VIEW,\n            RumEventType.ERROR,\n        ]);\n        if (!trackFeatureFlagsForEvents.includes(eventType)) {\n            return SKIPPED;\n        }\n        const featureFlagContext = featureFlagContexts.find(startTime);\n        if (!featureFlagContext || isEmptyObject(featureFlagContext)) {\n            return SKIPPED;\n        }\n        return {\n            type: eventType,\n            feature_flags: featureFlagContext,\n        };\n    });\n    return {\n        addFeatureFlagEvaluation: (key, value) => {\n            const currentContext = featureFlagContexts.find();\n            if (currentContext) {\n                currentContext[key] = value;\n            }\n        },\n    };\n}\n//# sourceMappingURL=featureFlagContext.js.map","import { ONE_SECOND, addTelemetryMetrics, setInterval } from '@datadog/browser-core';\nexport const MEASURES_PERIOD_DURATION = 10 * ONE_SECOND;\nlet currentPeriodMeasures;\nlet batchHasRumEvent;\nexport function startCustomerDataTelemetry(telemetry, lifeCycle, batchFlushObservable) {\n    if (!telemetry.metricsEnabled) {\n        return;\n    }\n    initCurrentPeriodMeasures();\n    batchHasRumEvent = false;\n    // We measure the data of every view updates even if there could only be one per batch due to the upsert\n    // It means that contexts bytes count sums can be higher than it really is\n    lifeCycle.subscribe(13 /* LifeCycleEventType.RUM_EVENT_COLLECTED */, () => {\n        batchHasRumEvent = true;\n    });\n    batchFlushObservable.subscribe(({ bytesCount, messagesCount }) => {\n        // Don't measure batch that only contains telemetry events to avoid batch sending loop\n        // It could happen because after each batch we are adding a customer data measures telemetry event to the next one\n        if (!batchHasRumEvent) {\n            return;\n        }\n        batchHasRumEvent = false;\n        currentPeriodMeasures.batchCount += 1;\n        updateMeasure(currentPeriodMeasures.batchBytesCount, bytesCount);\n        updateMeasure(currentPeriodMeasures.batchMessagesCount, messagesCount);\n    });\n    setInterval(sendCurrentPeriodMeasures, MEASURES_PERIOD_DURATION);\n}\nfunction sendCurrentPeriodMeasures() {\n    if (currentPeriodMeasures.batchCount === 0) {\n        return;\n    }\n    // monitor-until: forever\n    addTelemetryMetrics(\"Customer data measures\" /* TelemetryMetrics.CUSTOMER_DATA_METRIC_NAME */, currentPeriodMeasures);\n    initCurrentPeriodMeasures();\n}\nfunction createMeasure() {\n    return { min: Infinity, max: 0, sum: 0 };\n}\nfunction updateMeasure(measure, value) {\n    measure.sum += value;\n    measure.min = Math.min(measure.min, value);\n    measure.max = Math.max(measure.max, value);\n}\nfunction initCurrentPeriodMeasures() {\n    currentPeriodMeasures = {\n        batchCount: 0,\n        batchBytesCount: createMeasure(),\n        batchMessagesCount: createMeasure(),\n    };\n}\n//# sourceMappingURL=startCustomerDataTelemetry.js.map","import { SKIPPED, elapsed, createValueHistory, SESSION_TIME_OUT_DELAY, toServerDuration, addEventListeners, relativeNow, } from '@datadog/browser-core';\nimport { supportPerformanceTimingEvent, RumPerformanceEntryType } from '../../browser/performanceObservable';\nimport { RumEventType } from '../../rawRumEvent.types';\n// Arbitrary value to cap number of element for memory consumption in the browser\nexport const MAX_PAGE_STATE_ENTRIES = 4000;\n// Arbitrary value to cap number of element for backend & to save bandwidth\nexport const MAX_PAGE_STATE_ENTRIES_SELECTABLE = 500;\nexport const PAGE_STATE_CONTEXT_TIME_OUT_DELAY = SESSION_TIME_OUT_DELAY;\nexport function startPageStateHistory(hooks, configuration, maxPageStateEntriesSelectable = MAX_PAGE_STATE_ENTRIES_SELECTABLE) {\n    const pageStateEntryHistory = createValueHistory({\n        expireDelay: PAGE_STATE_CONTEXT_TIME_OUT_DELAY,\n        maxEntries: MAX_PAGE_STATE_ENTRIES,\n    });\n    let currentPageState;\n    if (supportPerformanceTimingEvent(RumPerformanceEntryType.VISIBILITY_STATE)) {\n        const visibilityEntries = performance.getEntriesByType(RumPerformanceEntryType.VISIBILITY_STATE);\n        visibilityEntries.forEach((entry) => {\n            const state = entry.name === 'hidden' ? \"hidden\" /* PageState.HIDDEN */ : \"active\" /* PageState.ACTIVE */;\n            addPageState(state, entry.startTime);\n        });\n    }\n    addPageState(getPageState(), relativeNow());\n    const { stop: stopEventListeners } = addEventListeners(configuration, window, [\n        \"pageshow\" /* DOM_EVENT.PAGE_SHOW */,\n        \"focus\" /* DOM_EVENT.FOCUS */,\n        \"blur\" /* DOM_EVENT.BLUR */,\n        \"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */,\n        \"resume\" /* DOM_EVENT.RESUME */,\n        \"freeze\" /* DOM_EVENT.FREEZE */,\n        \"pagehide\" /* DOM_EVENT.PAGE_HIDE */,\n    ], (event) => {\n        addPageState(computePageState(event), event.timeStamp);\n    }, { capture: true });\n    function addPageState(nextPageState, startTime = relativeNow()) {\n        if (nextPageState === currentPageState) {\n            return;\n        }\n        currentPageState = nextPageState;\n        pageStateEntryHistory.closeActive(startTime);\n        pageStateEntryHistory.add({ state: currentPageState, startTime }, startTime);\n    }\n    function wasInPageStateDuringPeriod(state, startTime, duration) {\n        return pageStateEntryHistory.findAll(startTime, duration).some((pageState) => pageState.state === state);\n    }\n    hooks.register(0 /* HookNames.Assemble */, ({ startTime, duration = 0, eventType }) => {\n        if (eventType === RumEventType.VIEW) {\n            const pageStates = pageStateEntryHistory.findAll(startTime, duration);\n            return {\n                type: eventType,\n                _dd: { page_states: processPageStates(pageStates, startTime, maxPageStateEntriesSelectable) },\n            };\n        }\n        if (eventType === RumEventType.ACTION || eventType === RumEventType.ERROR) {\n            return {\n                type: eventType,\n                view: { in_foreground: wasInPageStateDuringPeriod(\"active\" /* PageState.ACTIVE */, startTime, 0) },\n            };\n        }\n        return SKIPPED;\n    });\n    return {\n        wasInPageStateDuringPeriod,\n        addPageState,\n        stop: () => {\n            stopEventListeners();\n            pageStateEntryHistory.stop();\n        },\n    };\n}\nfunction processPageStates(pageStateEntries, eventStartTime, maxPageStateEntriesSelectable) {\n    if (pageStateEntries.length === 0) {\n        return;\n    }\n    return pageStateEntries\n        .slice(-maxPageStateEntriesSelectable)\n        .reverse()\n        .map(({ state, startTime }) => ({\n        state,\n        start: toServerDuration(elapsed(eventStartTime, startTime)),\n    }));\n}\nfunction computePageState(event) {\n    if (event.type === \"freeze\" /* DOM_EVENT.FREEZE */) {\n        return \"frozen\" /* PageState.FROZEN */;\n    }\n    else if (event.type === \"pagehide\" /* DOM_EVENT.PAGE_HIDE */) {\n        return event.persisted ? \"frozen\" /* PageState.FROZEN */ : \"terminated\" /* PageState.TERMINATED */;\n    }\n    return getPageState();\n}\nfunction getPageState() {\n    if (document.visibilityState === 'hidden') {\n        return \"hidden\" /* PageState.HIDDEN */;\n    }\n    if (document.hasFocus()) {\n        return \"active\" /* PageState.ACTIVE */;\n    }\n    return \"passive\" /* PageState.PASSIVE */;\n}\n//# sourceMappingURL=pageStateHistory.js.map","import { setInterval, clearInterval, Observable, addEventListener, ONE_SECOND, findCommaSeparatedValue, } from '@datadog/browser-core';\nexport function createCookieObservable(configuration, cookieName) {\n    const detectCookieChangeStrategy = window.cookieStore\n        ? listenToCookieStoreChange(configuration)\n        : watchCookieFallback;\n    return new Observable((observable) => detectCookieChangeStrategy(cookieName, (event) => observable.notify(event)));\n}\nfunction listenToCookieStoreChange(configuration) {\n    return (cookieName, callback) => {\n        const listener = addEventListener(configuration, window.cookieStore, \"change\" /* DOM_EVENT.CHANGE */, (event) => {\n            // Based on our experimentation, we're assuming that entries for the same cookie cannot be in both the 'changed' and 'deleted' arrays.\n            // However, due to ambiguity in the specification, we asked for clarification: https://github.com/WICG/cookie-store/issues/226\n            const changeEvent = event.changed.find((event) => event.name === cookieName) ||\n                event.deleted.find((event) => event.name === cookieName);\n            if (changeEvent) {\n                callback(changeEvent.value);\n            }\n        });\n        return listener.stop;\n    };\n}\nexport const WATCH_COOKIE_INTERVAL_DELAY = ONE_SECOND;\nfunction watchCookieFallback(cookieName, callback) {\n    let previousCookieValue = findCommaSeparatedValue(document.cookie, cookieName);\n    const watchCookieIntervalId = setInterval(() => {\n        const cookieValue = findCommaSeparatedValue(document.cookie, cookieName);\n        if (cookieValue !== previousCookieValue) {\n            previousCookieValue = cookieValue;\n            callback(cookieValue);\n        }\n    }, WATCH_COOKIE_INTERVAL_DELAY);\n    return () => {\n        clearInterval(watchCookieIntervalId);\n    };\n}\n//# sourceMappingURL=cookieObservable.js.map","import { getInitCookie, SKIPPED } from '@datadog/browser-core';\nimport { createCookieObservable } from '../../browser/cookieObservable';\nexport const CI_VISIBILITY_TEST_ID_COOKIE_NAME = 'datadog-ci-visibility-test-execution-id';\nexport function startCiVisibilityContext(configuration, hooks, cookieObservable = createCookieObservable(configuration, CI_VISIBILITY_TEST_ID_COOKIE_NAME)) {\n    var _a;\n    let testExecutionId = getInitCookie(CI_VISIBILITY_TEST_ID_COOKIE_NAME) || ((_a = window.Cypress) === null || _a === void 0 ? void 0 : _a.env('traceId'));\n    const cookieObservableSubscription = cookieObservable.subscribe((value) => {\n        testExecutionId = value;\n    });\n    hooks.register(0 /* HookNames.Assemble */, ({ eventType }) => {\n        if (typeof testExecutionId !== 'string') {\n            return SKIPPED;\n        }\n        return {\n            type: eventType,\n            session: {\n                type: \"ci_test\" /* SessionType.CI_TEST */,\n            },\n            ci_test: {\n                test_execution_id: testExecutionId,\n            },\n        };\n    });\n    return {\n        stop: () => {\n            cookieObservableSubscription.unsubscribe();\n        },\n    };\n}\n//# sourceMappingURL=ciVisibilityContext.js.map","import { toServerDuration, relativeToClocks, generateUUID } from '@datadog/browser-core';\nimport { RumEventType, RumLongTaskEntryType } from '../../rawRumEvent.types';\nimport { createPerformanceObservable, RumPerformanceEntryType, supportPerformanceTimingEvent, } from '../../browser/performanceObservable';\nexport function startLongTaskCollection(lifeCycle, configuration) {\n    const entryType = supportPerformanceTimingEvent(RumPerformanceEntryType.LONG_ANIMATION_FRAME)\n        ? RumPerformanceEntryType.LONG_ANIMATION_FRAME\n        : RumPerformanceEntryType.LONG_TASK;\n    const subscription = createPerformanceObservable(configuration, {\n        type: entryType,\n        buffered: true,\n    }).subscribe((entries) => {\n        for (const entry of entries) {\n            if (!configuration.trackLongTasks) {\n                break;\n            }\n            const startClocks = relativeToClocks(entry.startTime);\n            const rawRumEvent = processEntry(entry, startClocks);\n            lifeCycle.notify(12 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, {\n                rawRumEvent,\n                startClocks,\n                duration: entry.duration,\n                domainContext: { performanceEntry: entry },\n            });\n        }\n    });\n    return {\n        stop: () => subscription.unsubscribe(),\n    };\n}\nfunction processEntry(entry, startClocks) {\n    const id = generateUUID();\n    const duration = toServerDuration(entry.duration);\n    const baseEvent = {\n        date: startClocks.timeStamp,\n        type: RumEventType.LONG_TASK,\n        _dd: { discarded: false },\n    };\n    if (entry.entryType === RumPerformanceEntryType.LONG_TASK) {\n        return {\n            ...baseEvent,\n            long_task: {\n                id,\n                entry_type: RumLongTaskEntryType.LONG_TASK,\n                duration,\n            },\n        };\n    }\n    return {\n        ...baseEvent,\n        long_task: {\n            id,\n            entry_type: RumLongTaskEntryType.LONG_ANIMATION_FRAME,\n            duration,\n            blocking_duration: toServerDuration(entry.blockingDuration),\n            first_ui_event_timestamp: toServerDuration(entry.firstUIEventTimestamp),\n            render_start: toServerDuration(entry.renderStart),\n            style_and_layout_start: toServerDuration(entry.styleAndLayoutStart),\n            start_time: toServerDuration(entry.startTime),\n            scripts: entry.scripts.map((script) => ({\n                duration: toServerDuration(script.duration),\n                pause_duration: toServerDuration(script.pauseDuration),\n                forced_style_and_layout_duration: toServerDuration(script.forcedStyleAndLayoutDuration),\n                start_time: toServerDuration(script.startTime),\n                execution_start: toServerDuration(script.executionStart),\n                source_url: script.sourceURL,\n                source_function_name: script.sourceFunctionName,\n                source_char_position: script.sourceCharPosition,\n                invoker: script.invoker,\n                invoker_type: script.invokerType,\n                window_attribution: script.windowAttribution,\n            })),\n        },\n    };\n}\n//# sourceMappingURL=longTaskCollection.js.map","import { setTimeout } from '../../tools/timer';\nimport { clocksNow, ONE_MINUTE } from '../../tools/utils/timeUtils';\nimport { ErrorSource } from '../error/error.types';\n// Limit the maximum number of actions, errors and logs per minutes\nconst EVENT_RATE_LIMIT = 3000;\nexport function createEventRateLimiter(eventType, onLimitReached, limit = EVENT_RATE_LIMIT) {\n    let eventCount = 0;\n    let allowNextEvent = false;\n    return {\n        isLimitReached() {\n            if (eventCount === 0) {\n                setTimeout(() => {\n                    eventCount = 0;\n                }, ONE_MINUTE);\n            }\n            eventCount += 1;\n            if (eventCount <= limit || allowNextEvent) {\n                allowNextEvent = false;\n                return false;\n            }\n            if (eventCount === limit + 1) {\n                allowNextEvent = true;\n                try {\n                    onLimitReached({\n                        message: `Reached max number of ${eventType}s by minute: ${limit}`,\n                        source: ErrorSource.AGENT,\n                        startClocks: clocksNow(),\n                    });\n                }\n                finally {\n                    allowNextEvent = false;\n                }\n            }\n            return true;\n        },\n    };\n}\n//# sourceMappingURL=createEventRateLimiter.js.map","import { sanitize, deepClone, getType, objectEntries } from '@datadog/browser-core';\n/**\n * Allows declaring and enforcing modifications to specific fields of an object.\n * Only supports modifying properties of an object (even if nested in an array).\n * Does not support array manipulation (adding/removing items).\n *\n * Modifications of the object are sanitized only if the field was actually changed by the modifier function (i.e., value is different).\n * This ensures consistent SDK behavior regardless of whether limitModification is called.\n * Only string fields are handled this way, object fields are sanitized regardless of whether the modifier function was called or not.\n */\nexport function limitModification(object, modifiableFieldPaths, modifier) {\n    const clone = deepClone(object);\n    const result = modifier(clone);\n    objectEntries(modifiableFieldPaths).forEach(([fieldPath, fieldType]) => \n    // Traverse both object and clone simultaneously up to the path and apply the modification from the clone to the original object when the type is valid\n    setValueAtPath(object, clone, fieldPath.split(/\\.|(?=\\[\\])/), fieldType));\n    return result;\n}\nfunction setValueAtPath(object, clone, pathSegments, fieldType) {\n    const [field, ...restPathSegments] = pathSegments;\n    if (field === '[]') {\n        if (Array.isArray(object) && Array.isArray(clone)) {\n            object.forEach((item, i) => setValueAtPath(item, clone[i], restPathSegments, fieldType));\n        }\n        return;\n    }\n    if (!isValidObject(object) || !isValidObject(clone)) {\n        return;\n    }\n    if (restPathSegments.length > 0) {\n        return setValueAtPath(object[field], clone[field], restPathSegments, fieldType);\n    }\n    setNestedValue(object, field, clone[field], fieldType);\n}\nfunction setNestedValue(object, field, value, fieldType) {\n    if (object[field] === value) {\n        return;\n    }\n    const newType = getType(value);\n    if (newType === fieldType) {\n        object[field] = sanitize(value);\n    }\n    else if (fieldType === 'object' && (newType === 'undefined' || newType === 'null')) {\n        object[field] = {};\n    }\n}\nfunction isValidObject(object) {\n    return getType(object) === 'object';\n}\n//# sourceMappingURL=limitModification.js.map","import { combine, isEmptyObject, display, createEventRateLimiter, DISCARDED, buildTags, } from '@datadog/browser-core';\nimport { RumEventType } from '../rawRumEvent.types';\nimport { limitModification } from './limitModification';\nconst VIEW_MODIFIABLE_FIELD_PATHS = {\n    'view.name': 'string',\n    'view.url': 'string',\n    'view.referrer': 'string',\n};\nconst USER_CUSTOMIZABLE_FIELD_PATHS = {\n    context: 'object',\n};\nconst ROOT_MODIFIABLE_FIELD_PATHS = {\n    service: 'string',\n    version: 'string',\n};\nlet modifiableFieldPathsByEvent;\nexport function startRumAssembly(configuration, lifeCycle, hooks, reportError, eventRateLimit) {\n    modifiableFieldPathsByEvent = {\n        [RumEventType.VIEW]: {\n            'view.performance.lcp.resource_url': 'string',\n            ...USER_CUSTOMIZABLE_FIELD_PATHS,\n            ...VIEW_MODIFIABLE_FIELD_PATHS,\n            ...ROOT_MODIFIABLE_FIELD_PATHS,\n        },\n        [RumEventType.ERROR]: {\n            'error.message': 'string',\n            'error.stack': 'string',\n            'error.handling_stack': 'string',\n            'error.resource.url': 'string',\n            'error.fingerprint': 'string',\n            ...USER_CUSTOMIZABLE_FIELD_PATHS,\n            ...VIEW_MODIFIABLE_FIELD_PATHS,\n            ...ROOT_MODIFIABLE_FIELD_PATHS,\n        },\n        [RumEventType.RESOURCE]: {\n            'resource.url': 'string',\n            'resource.graphql.variables': 'string',\n            'resource.request.headers': 'object',\n            'resource.response.headers': 'object',\n            ...USER_CUSTOMIZABLE_FIELD_PATHS,\n            ...VIEW_MODIFIABLE_FIELD_PATHS,\n            ...ROOT_MODIFIABLE_FIELD_PATHS,\n        },\n        [RumEventType.ACTION]: {\n            'action.target.name': 'string',\n            ...USER_CUSTOMIZABLE_FIELD_PATHS,\n            ...VIEW_MODIFIABLE_FIELD_PATHS,\n            ...ROOT_MODIFIABLE_FIELD_PATHS,\n        },\n        [RumEventType.LONG_TASK]: {\n            'long_task.scripts[].source_url': 'string',\n            'long_task.scripts[].invoker': 'string',\n            ...USER_CUSTOMIZABLE_FIELD_PATHS,\n            ...VIEW_MODIFIABLE_FIELD_PATHS,\n            ...ROOT_MODIFIABLE_FIELD_PATHS,\n        },\n        [RumEventType.VITAL]: {\n            ...USER_CUSTOMIZABLE_FIELD_PATHS,\n            ...VIEW_MODIFIABLE_FIELD_PATHS,\n            ...ROOT_MODIFIABLE_FIELD_PATHS,\n        },\n    };\n    const eventRateLimiters = {\n        [RumEventType.ERROR]: createEventRateLimiter(RumEventType.ERROR, reportError, eventRateLimit),\n        [RumEventType.ACTION]: createEventRateLimiter(RumEventType.ACTION, reportError, eventRateLimit),\n        [RumEventType.VITAL]: createEventRateLimiter(RumEventType.VITAL, reportError, eventRateLimit),\n    };\n    lifeCycle.subscribe(12 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, ({ startClocks, duration, rawRumEvent, domainContext }) => {\n        const defaultRumEventAttributes = hooks.triggerHook(0 /* HookNames.Assemble */, {\n            eventType: rawRumEvent.type,\n            rawRumEvent,\n            domainContext,\n            startTime: startClocks.relative,\n            duration,\n        });\n        if (defaultRumEventAttributes === DISCARDED) {\n            return;\n        }\n        const serverRumEvent = combine(defaultRumEventAttributes, rawRumEvent, {\n            ddtags: buildTags(configuration).join(','),\n        });\n        if (shouldSend(serverRumEvent, configuration.beforeSend, domainContext, eventRateLimiters)) {\n            if (isEmptyObject(serverRumEvent.context)) {\n                delete serverRumEvent.context;\n            }\n            lifeCycle.notify(13 /* LifeCycleEventType.RUM_EVENT_COLLECTED */, serverRumEvent);\n        }\n    });\n}\nfunction shouldSend(event, beforeSend, domainContext, eventRateLimiters) {\n    var _a;\n    if (beforeSend) {\n        const result = limitModification(event, modifiableFieldPathsByEvent[event.type], (event) => beforeSend(event, domainContext));\n        if (result === false && event.type !== RumEventType.VIEW) {\n            return false;\n        }\n        if (result === false) {\n            display.warn(\"Can't dismiss view events using beforeSend!\");\n        }\n    }\n    const rateLimitReached = (_a = eventRateLimiters[event.type]) === null || _a === void 0 ? void 0 : _a.isLimitReached();\n    return !rateLimitReached;\n}\n//# sourceMappingURL=assembly.js.map","import { relativeToClocks } from '@datadog/browser-core';\nimport { RumEventType } from '../../rawRumEvent.types';\nconst allowedEventTypes = [\n    RumEventType.ACTION,\n    RumEventType.ERROR,\n    RumEventType.LONG_TASK,\n    RumEventType.RESOURCE,\n    RumEventType.VITAL,\n];\nexport function startEventCollection(lifeCycle) {\n    return {\n        addEvent: (startTime, event, domainContext, duration) => {\n            if (!allowedEventTypes.includes(event.type)) {\n                return;\n            }\n            lifeCycle.notify(12 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, {\n                startClocks: relativeToClocks(startTime),\n                rawRumEvent: event,\n                domainContext,\n                duration,\n            });\n        },\n    };\n}\n//# sourceMappingURL=eventCollection.js.map","import { SKIPPED, computeStackTrace, objectEntries, addTelemetryError } from '@datadog/browser-core';\nexport function startSourceCodeContext(hooks) {\n    const browserWindow = window;\n    const contextByFile = new Map();\n    function buildContextByFile() {\n        if (!browserWindow.DD_SOURCE_CODE_CONTEXT) {\n            return;\n        }\n        objectEntries(browserWindow.DD_SOURCE_CODE_CONTEXT).forEach(([stack, context]) => {\n            const stackTrace = computeStackTrace({ stack });\n            const firstFrame = stackTrace.stack[0];\n            if (!firstFrame.url) {\n                addTelemetryError('Source code context: missing frame url', { stack });\n                return;\n            }\n            // don't overwrite existing context\n            if (!contextByFile.has(firstFrame.url)) {\n                contextByFile.set(firstFrame.url, context);\n            }\n        });\n        browserWindow.DD_SOURCE_CODE_CONTEXT = {};\n    }\n    buildContextByFile();\n    hooks.register(0 /* HookNames.Assemble */, ({ domainContext, rawRumEvent }) => {\n        buildContextByFile();\n        if (contextByFile.size === 0) {\n            return SKIPPED;\n        }\n        const url = getSourceUrl(domainContext, rawRumEvent);\n        const context = url && contextByFile.get(url);\n        if (!context) {\n            return SKIPPED;\n        }\n        return {\n            type: rawRumEvent.type,\n            service: context.service,\n            version: context.version,\n        };\n    });\n}\nfunction getSourceUrl(domainContext, rawRumEvent) {\n    var _a, _b;\n    if (rawRumEvent.type === 'long_task' && rawRumEvent.long_task.entry_type === 'long-animation-frame') {\n        return (_a = rawRumEvent.long_task.scripts[0]) === null || _a === void 0 ? void 0 : _a.source_url;\n    }\n    let stack;\n    if ('handlingStack' in domainContext) {\n        stack = domainContext.handlingStack;\n    }\n    if (rawRumEvent.type === 'error' && rawRumEvent.error.stack) {\n        stack = rawRumEvent.error.stack;\n    }\n    const stackTrace = computeStackTrace({ stack });\n    return (_b = stackTrace.stack[0]) === null || _b === void 0 ? void 0 : _b.url;\n}\n//# sourceMappingURL=sourceCodeContext.js.map","import { sendToExtension, createPageMayExitObservable, canUseEventBridge, addTelemetryDebug, startAccountContext, startGlobalContext, startUserContext, startTabContext, } from '@datadog/browser-core';\nimport { createDOMMutationObservable } from '../browser/domMutationObservable';\nimport { createWindowOpenObservable } from '../browser/windowOpenObservable';\nimport { startInternalContext } from '../domain/contexts/internalContext';\nimport { LifeCycle } from '../domain/lifeCycle';\nimport { startViewHistory } from '../domain/contexts/viewHistory';\nimport { startRequestCollection } from '../domain/requestCollection';\nimport { startActionCollection } from '../domain/action/actionCollection';\nimport { startErrorCollection } from '../domain/error/errorCollection';\nimport { startResourceCollection } from '../domain/resource/resourceCollection';\nimport { startViewCollection } from '../domain/view/viewCollection';\nimport { startRumSessionManager, startRumSessionManagerStub } from '../domain/rumSessionManager';\nimport { startRumBatch } from '../transport/startRumBatch';\nimport { startRumEventBridge } from '../transport/startRumEventBridge';\nimport { startUrlContexts } from '../domain/contexts/urlContexts';\nimport { createLocationChangeObservable } from '../browser/locationChangeObservable';\nimport { startFeatureFlagContexts } from '../domain/contexts/featureFlagContext';\nimport { startCustomerDataTelemetry } from '../domain/startCustomerDataTelemetry';\nimport { startPageStateHistory } from '../domain/contexts/pageStateHistory';\nimport { startDisplayContext } from '../domain/contexts/displayContext';\nimport { startVitalCollection } from '../domain/vital/vitalCollection';\nimport { startCiVisibilityContext } from '../domain/contexts/ciVisibilityContext';\nimport { startLongTaskCollection } from '../domain/longTask/longTaskCollection';\nimport { startSyntheticsContext } from '../domain/contexts/syntheticsContext';\nimport { startRumAssembly } from '../domain/assembly';\nimport { startSessionContext } from '../domain/contexts/sessionContext';\nimport { startConnectivityContext } from '../domain/contexts/connectivityContext';\nimport { startDefaultContext } from '../domain/contexts/defaultContext';\nimport { startTrackingConsentContext } from '../domain/contexts/trackingConsentContext';\nimport { startEventCollection } from '../domain/event/eventCollection';\nimport { startInitialViewMetricsTelemetry } from '../domain/view/viewMetrics/startInitialViewMetricsTelemetry';\nimport { startSourceCodeContext } from '../domain/contexts/sourceCodeContext';\nexport function startRum(configuration, recorderApi, profilerApi, initialViewOptions, createEncoder, \n// `startRum` and its subcomponents assume tracking consent is granted initially and starts\n// collecting logs unconditionally. As such, `startRum` should be called with a\n// `trackingConsentState` set to \"granted\".\ntrackingConsentState, customVitalsState, bufferedDataObservable, telemetry, hooks, sdkName) {\n    const cleanupTasks = [];\n    const lifeCycle = new LifeCycle();\n    lifeCycle.subscribe(13 /* LifeCycleEventType.RUM_EVENT_COLLECTED */, (event) => sendToExtension('rum', event));\n    const reportError = (error) => {\n        lifeCycle.notify(14 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, { error });\n        // monitor-until: forever, to keep an eye on the errors reported to customers\n        addTelemetryDebug('Error reported to customer', { 'error.message': error.message });\n    };\n    const pageMayExitObservable = createPageMayExitObservable(configuration);\n    const session = !canUseEventBridge()\n        ? startRumSessionManager(configuration, lifeCycle, trackingConsentState)\n        : startRumSessionManagerStub();\n    if (!canUseEventBridge()) {\n        const batch = startRumBatch(configuration, lifeCycle, reportError, pageMayExitObservable, session.expireObservable, createEncoder);\n        const preparePageExitSubscription = batch.flushController.preparePageExitFlushObservable.subscribe((reason) => {\n            lifeCycle.notify(11 /* LifeCycleEventType.PAGE_MAY_EXIT */, { reason });\n        });\n        cleanupTasks.push(() => preparePageExitSubscription.unsubscribe());\n        cleanupTasks.push(() => batch.stop());\n        startCustomerDataTelemetry(telemetry, lifeCycle, batch.flushController.flushObservable);\n    }\n    else {\n        startRumEventBridge(lifeCycle);\n        const pageMayExitSubscription = pageMayExitObservable.subscribe((event) => {\n            lifeCycle.notify(11 /* LifeCycleEventType.PAGE_MAY_EXIT */, event);\n        });\n        cleanupTasks.push(() => pageMayExitSubscription.unsubscribe());\n    }\n    startTrackingConsentContext(hooks, trackingConsentState);\n    const { stop: stopInitialViewMetricsTelemetry } = startInitialViewMetricsTelemetry(lifeCycle, telemetry);\n    cleanupTasks.push(stopInitialViewMetricsTelemetry);\n    const { stop: stopRumEventCollection, ...startRumEventCollectionResult } = startRumEventCollection(lifeCycle, hooks, configuration, session, recorderApi, initialViewOptions, customVitalsState, bufferedDataObservable, sdkName, reportError);\n    cleanupTasks.push(stopRumEventCollection);\n    bufferedDataObservable.unbuffer();\n    // Add Clean-up tasks for Profiler API.\n    cleanupTasks.push(() => profilerApi.stop());\n    return {\n        ...startRumEventCollectionResult,\n        lifeCycle,\n        session,\n        stopSession: () => session.expire(),\n        telemetry,\n        stop: () => {\n            cleanupTasks.forEach((task) => task());\n        },\n        hooks,\n    };\n}\nexport function startRumEventCollection(lifeCycle, hooks, configuration, session, recorderApi, initialViewOptions, customVitalsState, bufferedDataObservable, sdkName, reportError) {\n    const cleanupTasks = [];\n    const domMutationObservable = createDOMMutationObservable();\n    const locationChangeObservable = createLocationChangeObservable(configuration);\n    const { observable: windowOpenObservable, stop: stopWindowOpen } = createWindowOpenObservable();\n    cleanupTasks.push(stopWindowOpen);\n    startDefaultContext(hooks, configuration, sdkName);\n    const pageStateHistory = startPageStateHistory(hooks, configuration);\n    cleanupTasks.push(() => pageStateHistory.stop());\n    const viewHistory = startViewHistory(lifeCycle);\n    cleanupTasks.push(() => viewHistory.stop());\n    const urlContexts = startUrlContexts(lifeCycle, hooks, locationChangeObservable);\n    cleanupTasks.push(() => urlContexts.stop());\n    const featureFlagContexts = startFeatureFlagContexts(lifeCycle, hooks, configuration);\n    startSessionContext(hooks, session, recorderApi, viewHistory);\n    startConnectivityContext(hooks);\n    startTabContext(hooks);\n    const globalContext = startGlobalContext(hooks, configuration, 'rum', true);\n    const userContext = startUserContext(hooks, configuration, session, 'rum');\n    const accountContext = startAccountContext(hooks, configuration, 'rum');\n    const actionCollection = startActionCollection(lifeCycle, hooks, domMutationObservable, windowOpenObservable, configuration);\n    cleanupTasks.push(actionCollection.stop);\n    const eventCollection = startEventCollection(lifeCycle);\n    const displayContext = startDisplayContext(hooks, configuration);\n    cleanupTasks.push(displayContext.stop);\n    const ciVisibilityContext = startCiVisibilityContext(configuration, hooks);\n    cleanupTasks.push(ciVisibilityContext.stop);\n    startSyntheticsContext(hooks);\n    startRumAssembly(configuration, lifeCycle, hooks, reportError);\n    const { addTiming, setLoadingTime, startView, setViewName, setViewContext, setViewContextProperty, getViewContext, stop: stopViewCollection, } = startViewCollection(lifeCycle, hooks, configuration, domMutationObservable, windowOpenObservable, locationChangeObservable, recorderApi, viewHistory, initialViewOptions);\n    startSourceCodeContext(hooks);\n    cleanupTasks.push(stopViewCollection);\n    const resourceCollection = startResourceCollection(lifeCycle, configuration, pageStateHistory);\n    cleanupTasks.push(resourceCollection.stop);\n    const { stop: stopLongTaskCollection } = startLongTaskCollection(lifeCycle, configuration);\n    cleanupTasks.push(stopLongTaskCollection);\n    const { addError } = startErrorCollection(lifeCycle, configuration, bufferedDataObservable);\n    startRequestCollection(lifeCycle, configuration, session, userContext, accountContext);\n    const vitalCollection = startVitalCollection(lifeCycle, pageStateHistory, customVitalsState);\n    const internalContext = startInternalContext(configuration.applicationId, session, viewHistory, actionCollection.actionContexts, urlContexts);\n    return {\n        addAction: actionCollection.addAction,\n        startAction: actionCollection.startAction,\n        stopAction: actionCollection.stopAction,\n        startResource: resourceCollection.startResource,\n        stopResource: resourceCollection.stopResource,\n        addEvent: eventCollection.addEvent,\n        addError,\n        addTiming,\n        setLoadingTime,\n        addFeatureFlagEvaluation: featureFlagContexts.addFeatureFlagEvaluation,\n        startView,\n        setViewContext,\n        setViewContextProperty,\n        getViewContext,\n        setViewName,\n        viewHistory,\n        getInternalContext: internalContext.get,\n        startDurationVital: vitalCollection.startDurationVital,\n        stopDurationVital: vitalCollection.stopDurationVital,\n        addDurationVital: vitalCollection.addDurationVital,\n        addOperationStepVital: vitalCollection.addOperationStepVital,\n        globalContext,\n        userContext,\n        accountContext,\n        stop: () => cleanupTasks.forEach((task) => task()),\n    };\n}\n//# sourceMappingURL=startRum.js.map","import { getEventBridge } from '@datadog/browser-core';\nexport function startRumEventBridge(lifeCycle) {\n    const bridge = getEventBridge();\n    lifeCycle.subscribe(13 /* LifeCycleEventType.RUM_EVENT_COLLECTED */, (serverRumEvent) => {\n        bridge.send('rum', serverRumEvent);\n    });\n}\n//# sourceMappingURL=startRumEventBridge.js.map","import { createBatch, createFlushController, createHttpRequest } from '@datadog/browser-core';\nimport { RumEventType } from '../rawRumEvent.types';\nexport function startRumBatch(configuration, lifeCycle, reportError, pageMayExitObservable, sessionExpireObservable, createEncoder) {\n    const endpoints = [configuration.rumEndpointBuilder];\n    if (configuration.replica) {\n        endpoints.push(configuration.replica.rumEndpointBuilder);\n    }\n    const batch = createBatch({\n        encoder: createEncoder(2 /* DeflateEncoderStreamId.RUM */),\n        request: createHttpRequest(endpoints, reportError),\n        flushController: createFlushController({\n            pageMayExitObservable,\n            sessionExpireObservable,\n        }),\n    });\n    lifeCycle.subscribe(13 /* LifeCycleEventType.RUM_EVENT_COLLECTED */, (serverRumEvent) => {\n        if (serverRumEvent.type === RumEventType.VIEW) {\n            batch.upsert(serverRumEvent, serverRumEvent.view.id);\n        }\n        else {\n            batch.add(serverRumEvent);\n        }\n    });\n    return batch;\n}\n//# sourceMappingURL=startRumBatch.js.map","import { DISCARDED, SKIPPED } from '@datadog/browser-core';\nexport function startTrackingConsentContext(hooks, trackingConsentState) {\n    hooks.register(1 /* HookNames.AssembleTelemetry */, () => {\n        const wasConsented = trackingConsentState.isGranted();\n        if (!wasConsented) {\n            return DISCARDED;\n        }\n        return SKIPPED;\n    });\n}\n//# sourceMappingURL=trackingConsentContext.js.map","import { addTelemetryMetrics, noop } from '@datadog/browser-core';\nexport function startInitialViewMetricsTelemetry(lifeCycle, telemetry) {\n    if (!telemetry.metricsEnabled) {\n        return { stop: noop };\n    }\n    const { unsubscribe } = lifeCycle.subscribe(4 /* LifeCycleEventType.VIEW_UPDATED */, ({ initialViewMetrics }) => {\n        if (!initialViewMetrics.largestContentfulPaint || !initialViewMetrics.navigationTimings) {\n            return;\n        }\n        // The navigation timings become available shortly after the load event fires, so\n        // we're snapshotting the LCP value available at that point. However, more LCP values\n        // can be emitted until the page is scrolled or interacted with, so it's possible that\n        // the final LCP value may differ. These metrics are intended to help diagnose\n        // performance issues early in the page load process, and using LCP-at-page-load is a\n        // good fit for that use case, but it's important to be aware that this is not\n        // necessarily equivalent to the normal LCP metric.\n        // monitor-until: 2026-07-01\n        addTelemetryMetrics(\"Initial view metrics\" /* TelemetryMetrics.INITIAL_VIEW_METRICS_TELEMETRY_NAME */, {\n            metrics: createCoreInitialViewMetrics(initialViewMetrics.largestContentfulPaint, initialViewMetrics.navigationTimings),\n        });\n        unsubscribe();\n    });\n    return {\n        stop: unsubscribe,\n    };\n}\nfunction createCoreInitialViewMetrics(lcp, navigation) {\n    return {\n        lcp: {\n            value: lcp.value,\n        },\n        navigation: {\n            domComplete: navigation.domComplete,\n            domContentLoaded: navigation.domContentLoaded,\n            domInteractive: navigation.domInteractive,\n            firstByte: navigation.firstByte,\n            loadEvent: navigation.loadEvent,\n        },\n    };\n}\n//# sourceMappingURL=startInitialViewMetricsTelemetry.js.map","import { instrumentMethod, Observable } from '@datadog/browser-core';\nexport function createWindowOpenObservable() {\n    const observable = new Observable();\n    const { stop } = instrumentMethod(window, 'open', () => observable.notify());\n    return { observable, stop };\n}\n//# sourceMappingURL=windowOpenObservable.js.map","import { canUseEventBridge, currentDrift, round, timeStampNow } from '@datadog/browser-core';\nexport function startDefaultContext(hooks, configuration, sdkName) {\n    hooks.register(0 /* HookNames.Assemble */, ({ eventType }) => {\n        const source = configuration.source;\n        return {\n            type: eventType,\n            _dd: {\n                format_version: 2,\n                drift: currentDrift(),\n                configuration: {\n                    session_sample_rate: round(configuration.sessionSampleRate, 3),\n                    session_replay_sample_rate: round(configuration.sessionReplaySampleRate, 3),\n                    profiling_sample_rate: round(configuration.profilingSampleRate, 3),\n                    trace_sample_rate: round(configuration.traceSampleRate, 3),\n                    beta_encode_cookie_options: configuration.betaEncodeCookieOptions,\n                },\n                browser_sdk_version: canUseEventBridge() ? \"6.33.0\" : undefined,\n                sdk_name: sdkName,\n            },\n            application: {\n                id: configuration.applicationId,\n            },\n            date: timeStampNow(),\n            source,\n        };\n    });\n    hooks.register(1 /* HookNames.AssembleTelemetry */, () => ({\n        application: { id: configuration.applicationId },\n    }));\n}\n//# sourceMappingURL=defaultContext.js.map","import { DISCARDED, SKIPPED } from '@datadog/browser-core';\nimport { RumEventType } from '../../rawRumEvent.types';\nexport function startSessionContext(hooks, sessionManager, recorderApi, viewHistory) {\n    hooks.register(0 /* HookNames.Assemble */, ({ eventType, startTime }) => {\n        const session = sessionManager.findTrackedSession(startTime);\n        const view = viewHistory.findView(startTime);\n        if (!session || !view) {\n            return DISCARDED;\n        }\n        let hasReplay;\n        let sampledForReplay;\n        let isActive;\n        if (eventType === RumEventType.VIEW) {\n            hasReplay = recorderApi.getReplayStats(view.id) ? true : undefined;\n            sampledForReplay = session.sessionReplay === 1 /* SessionReplayState.SAMPLED */;\n            isActive = view.sessionIsActive ? undefined : false;\n        }\n        else {\n            hasReplay = recorderApi.isRecording() ? true : undefined;\n        }\n        return {\n            type: eventType,\n            session: {\n                id: session.id,\n                type: \"user\" /* SessionType.USER */,\n                has_replay: hasReplay,\n                sampled_for_replay: sampledForReplay,\n                is_active: isActive,\n            },\n        };\n    });\n    hooks.register(1 /* HookNames.AssembleTelemetry */, ({ startTime }) => {\n        const session = sessionManager.findTrackedSession(startTime);\n        if (!session) {\n            return SKIPPED;\n        }\n        return {\n            session: {\n                id: session.id,\n            },\n        };\n    });\n}\n//# sourceMappingURL=sessionContext.js.map","import { getConnectivity } from '@datadog/browser-core';\nexport function startConnectivityContext(hooks) {\n    hooks.register(0 /* HookNames.Assemble */, ({ eventType }) => ({\n        type: eventType,\n        connectivity: getConnectivity(),\n    }));\n}\n//# sourceMappingURL=connectivityContext.js.map","import { monitor } from '@datadog/browser-core';\nimport { getViewportDimension, initViewportObservable } from '../../browser/viewportObservable';\nexport function startDisplayContext(hooks, configuration) {\n    let viewport;\n    // Use requestAnimationFrame to delay the calculation of viewport dimensions until after SDK initialization, preventing long tasks.\n    const animationFrameId = requestAnimationFrame(monitor(() => {\n        viewport = getViewportDimension();\n    }));\n    const unsubscribeViewport = initViewportObservable(configuration).subscribe((viewportDimension) => {\n        viewport = viewportDimension;\n    }).unsubscribe;\n    hooks.register(0 /* HookNames.Assemble */, ({ eventType }) => ({\n        type: eventType,\n        display: viewport ? { viewport } : undefined,\n    }));\n    return {\n        stop: () => {\n            unsubscribeViewport();\n            if (animationFrameId) {\n                cancelAnimationFrame(animationFrameId);\n            }\n        },\n    };\n}\n//# sourceMappingURL=displayContext.js.map","import { SKIPPED, getSyntheticsContext, willSyntheticsInjectRum, isSyntheticsTest, } from '@datadog/browser-core';\nexport function startSyntheticsContext(hooks) {\n    hooks.register(0 /* HookNames.Assemble */, ({ eventType }) => {\n        if (!isSyntheticsTest()) {\n            return SKIPPED;\n        }\n        return {\n            type: eventType,\n            session: {\n                type: \"synthetics\" /* SessionType.SYNTHETICS */,\n            },\n            synthetics: {\n                ...getSyntheticsContext(),\n                injected: willSyntheticsInjectRum(),\n            },\n        };\n    });\n}\n//# sourceMappingURL=syntheticsContext.js.map","/**\n * Internal context keep returning v1 format\n * to not break compatibility with logs data format\n */\nexport function startInternalContext(applicationId, sessionManager, viewHistory, actionContexts, urlContexts) {\n    return {\n        get: (startTime) => {\n            const viewContext = viewHistory.findView(startTime);\n            const urlContext = urlContexts.findUrl(startTime);\n            const session = sessionManager.findTrackedSession(startTime);\n            if (session && viewContext && urlContext) {\n                const actionId = actionContexts.findActionId(startTime);\n                return {\n                    application_id: applicationId,\n                    session_id: session.id,\n                    user_action: actionId ? { id: actionId } : undefined,\n                    view: { id: viewContext.id, name: viewContext.name, referrer: urlContext.referrer, url: urlContext.url },\n                };\n            }\n        },\n    };\n}\n//# sourceMappingURL=internalContext.js.map","import { ContextManagerMethod, addTelemetryUsage, deepClone, makePublicApi, monitor, clocksNow, callMonitored, createHandlingStack, sanitize, createIdentityEncoder, displayAlreadyInitializedError, createTrackingConsentState, timeStampToClocks, CustomerContextKey, defineContextMethod, startBufferingData, isExperimentalFeatureEnabled, ExperimentalFeature, mockable, generateUUID, timeStampNow, } from '@datadog/browser-core';\nimport { ActionType, VitalType } from '../rawRumEvent.types';\nimport { createCustomVitalsState } from '../domain/vital/vitalCollection';\nimport { callPluginsMethod } from '../domain/plugins';\nimport { createPreStartStrategy } from './preStartRum';\nimport { startRum } from './startRum';\nexport function makeRumPublicApi(recorderApi, profilerApi, options = {}) {\n    const trackingConsentState = createTrackingConsentState();\n    const customVitalsState = createCustomVitalsState();\n    const bufferedDataObservable = startBufferingData().observable;\n    let strategy = createPreStartStrategy(options, trackingConsentState, customVitalsState, (configuration, deflateWorker, initialViewOptions, telemetry, hooks) => {\n        const createEncoder = deflateWorker && options.createDeflateEncoder\n            ? (streamId) => options.createDeflateEncoder(configuration, deflateWorker, streamId)\n            : createIdentityEncoder;\n        const startRumResult = mockable(startRum)(configuration, recorderApi, profilerApi, initialViewOptions, createEncoder, trackingConsentState, customVitalsState, bufferedDataObservable, telemetry, hooks, options.sdkName);\n        recorderApi.onRumStart(startRumResult.lifeCycle, configuration, startRumResult.session, startRumResult.viewHistory, deflateWorker, startRumResult.telemetry);\n        profilerApi.onRumStart(startRumResult.lifeCycle, startRumResult.hooks, configuration, startRumResult.session, startRumResult.viewHistory, createEncoder);\n        strategy = createPostStartStrategy(strategy, startRumResult);\n        callPluginsMethod(configuration.plugins, 'onRumStart', {\n            strategy, // TODO: remove this in the next major release\n            addEvent: startRumResult.addEvent,\n            addError: startRumResult.addError,\n        });\n        return startRumResult;\n    });\n    const getStrategy = () => strategy;\n    const startView = (options) => {\n        const handlingStack = createHandlingStack('view');\n        callMonitored(() => {\n            const sanitizedOptions = typeof options === 'object' ? options : { name: options };\n            strategy.startView({ ...sanitizedOptions, handlingStack });\n            addTelemetryUsage({ feature: 'start-view' });\n        });\n    };\n    const rumPublicApi = makePublicApi({\n        init: (initConfiguration) => {\n            const errorStack = new Error().stack;\n            callMonitored(() => strategy.init(initConfiguration, rumPublicApi, errorStack));\n        },\n        setTrackingConsent: monitor((trackingConsent) => {\n            trackingConsentState.update(trackingConsent);\n            addTelemetryUsage({ feature: 'set-tracking-consent', tracking_consent: trackingConsent });\n        }),\n        setViewName: monitor((name) => {\n            strategy.setViewName(name);\n            addTelemetryUsage({ feature: 'set-view-name' });\n        }),\n        setViewContext: monitor((context) => {\n            strategy.setViewContext(context);\n            addTelemetryUsage({ feature: 'set-view-context' });\n        }),\n        setViewContextProperty: monitor((key, value) => {\n            strategy.setViewContextProperty(key, value);\n            addTelemetryUsage({ feature: 'set-view-context-property' });\n        }),\n        getViewContext: monitor(() => {\n            addTelemetryUsage({ feature: 'set-view-context-property' });\n            return strategy.getViewContext();\n        }),\n        getInternalContext: monitor((startTime) => strategy.getInternalContext(startTime)),\n        getInitConfiguration: monitor(() => deepClone(strategy.initConfiguration)),\n        addAction: (name, context) => {\n            const handlingStack = createHandlingStack('action');\n            callMonitored(() => {\n                strategy.addAction({\n                    name: sanitize(name),\n                    context: sanitize(context),\n                    startClocks: clocksNow(),\n                    type: ActionType.CUSTOM,\n                    handlingStack,\n                });\n                addTelemetryUsage({ feature: 'add-action' });\n            });\n        },\n        startAction: monitor((name, options) => {\n            // Check feature flag only after init; pre-init calls should be buffered\n            if (strategy.initConfiguration && !isExperimentalFeatureEnabled(ExperimentalFeature.START_STOP_ACTION)) {\n                return;\n            }\n            // addTelemetryUsage({ feature: 'start-action' })\n            strategy.startAction(sanitize(name), {\n                type: sanitize(options && options.type),\n                context: sanitize(options && options.context),\n                actionKey: options && options.actionKey,\n            });\n        }),\n        stopAction: monitor((name, options) => {\n            if (strategy.initConfiguration && !isExperimentalFeatureEnabled(ExperimentalFeature.START_STOP_ACTION)) {\n                return;\n            }\n            // addTelemetryUsage({ feature: 'stop-action' })\n            strategy.stopAction(sanitize(name), {\n                type: sanitize(options && options.type),\n                context: sanitize(options && options.context),\n                actionKey: options && options.actionKey,\n            });\n        }),\n        startResource: monitor((url, options) => {\n            // Check feature flag only after init; pre-init calls should be buffered\n            if (strategy.initConfiguration && !isExperimentalFeatureEnabled(ExperimentalFeature.START_STOP_RESOURCE)) {\n                return;\n            }\n            // addTelemetryUsage({ feature: 'start-resource' })\n            strategy.startResource(sanitize(url), {\n                type: sanitize(options && options.type),\n                method: sanitize(options && options.method),\n                context: sanitize(options && options.context),\n                resourceKey: options && options.resourceKey,\n            });\n        }),\n        stopResource: monitor((url, options) => {\n            if (strategy.initConfiguration && !isExperimentalFeatureEnabled(ExperimentalFeature.START_STOP_RESOURCE)) {\n                return;\n            }\n            // addTelemetryUsage({ feature: 'stop-resource' })\n            strategy.stopResource(sanitize(url), {\n                type: sanitize(options && options.type),\n                statusCode: options && options.statusCode,\n                size: options && options.size,\n                context: sanitize(options && options.context),\n                resourceKey: options && options.resourceKey,\n            });\n        }),\n        addError: (error, context) => {\n            const handlingStack = createHandlingStack('error');\n            callMonitored(() => {\n                strategy.addError({\n                    error, // Do not sanitize error here, it is needed unserialized by computeRawError()\n                    handlingStack,\n                    context: sanitize(context),\n                    startClocks: clocksNow(),\n                });\n                addTelemetryUsage({ feature: 'add-error' });\n            });\n        },\n        addTiming: monitor((name, time) => {\n            // TODO: next major decide to drop relative time support or update its behaviour\n            strategy.addTiming(sanitize(name), time);\n        }),\n        setViewLoadingTime: monitor(() => {\n            const callTimestamp = timeStampNow();\n            strategy.setLoadingTime(callTimestamp);\n            addTelemetryUsage({\n                feature: 'addViewLoadingTime',\n            });\n        }),\n        setGlobalContext: defineContextMethod(getStrategy, CustomerContextKey.globalContext, ContextManagerMethod.setContext, 'set-global-context'),\n        getGlobalContext: defineContextMethod(getStrategy, CustomerContextKey.globalContext, ContextManagerMethod.getContext, 'get-global-context'),\n        setGlobalContextProperty: defineContextMethod(getStrategy, CustomerContextKey.globalContext, ContextManagerMethod.setContextProperty, 'set-global-context-property'),\n        removeGlobalContextProperty: defineContextMethod(getStrategy, CustomerContextKey.globalContext, ContextManagerMethod.removeContextProperty, 'remove-global-context-property'),\n        clearGlobalContext: defineContextMethod(getStrategy, CustomerContextKey.globalContext, ContextManagerMethod.clearContext, 'clear-global-context'),\n        setUser: defineContextMethod(getStrategy, CustomerContextKey.userContext, ContextManagerMethod.setContext, 'set-user'),\n        getUser: defineContextMethod(getStrategy, CustomerContextKey.userContext, ContextManagerMethod.getContext, 'get-user'),\n        setUserProperty: defineContextMethod(getStrategy, CustomerContextKey.userContext, ContextManagerMethod.setContextProperty, 'set-user-property'),\n        removeUserProperty: defineContextMethod(getStrategy, CustomerContextKey.userContext, ContextManagerMethod.removeContextProperty, 'remove-user-property'),\n        clearUser: defineContextMethod(getStrategy, CustomerContextKey.userContext, ContextManagerMethod.clearContext, 'clear-user'),\n        setAccount: defineContextMethod(getStrategy, CustomerContextKey.accountContext, ContextManagerMethod.setContext, 'set-account'),\n        getAccount: defineContextMethod(getStrategy, CustomerContextKey.accountContext, ContextManagerMethod.getContext, 'get-account'),\n        setAccountProperty: defineContextMethod(getStrategy, CustomerContextKey.accountContext, ContextManagerMethod.setContextProperty, 'set-account-property'),\n        removeAccountProperty: defineContextMethod(getStrategy, CustomerContextKey.accountContext, ContextManagerMethod.removeContextProperty, 'remove-account-property'),\n        clearAccount: defineContextMethod(getStrategy, CustomerContextKey.accountContext, ContextManagerMethod.clearContext, 'clear-account'),\n        startView,\n        stopSession: monitor(() => {\n            strategy.stopSession();\n            addTelemetryUsage({ feature: 'stop-session' });\n        }),\n        addFeatureFlagEvaluation: monitor((key, value) => {\n            strategy.addFeatureFlagEvaluation(sanitize(key), sanitize(value));\n            addTelemetryUsage({ feature: 'add-feature-flag-evaluation' });\n        }),\n        getSessionReplayLink: monitor(() => recorderApi.getSessionReplayLink()),\n        startSessionReplayRecording: monitor((options) => {\n            recorderApi.start(options);\n            addTelemetryUsage({ feature: 'start-session-replay-recording', force: options && options.force });\n        }),\n        stopSessionReplayRecording: monitor(() => recorderApi.stop()),\n        addDurationVital: (name, options) => {\n            const handlingStack = createHandlingStack('vital');\n            callMonitored(() => {\n                addTelemetryUsage({ feature: 'add-duration-vital' });\n                strategy.addDurationVital({\n                    id: generateUUID(),\n                    name: sanitize(name),\n                    type: VitalType.DURATION,\n                    startClocks: timeStampToClocks(options.startTime),\n                    duration: options.duration,\n                    context: sanitize(options && options.context),\n                    description: sanitize(options && options.description),\n                    handlingStack,\n                });\n            });\n        },\n        startDurationVital: (name, options) => {\n            const handlingStack = createHandlingStack('vital');\n            return callMonitored(() => {\n                addTelemetryUsage({ feature: 'start-duration-vital' });\n                return strategy.startDurationVital(sanitize(name), {\n                    context: sanitize(options && options.context),\n                    description: sanitize(options && options.description),\n                    handlingStack,\n                });\n            });\n        },\n        stopDurationVital: monitor((nameOrRef, options) => {\n            addTelemetryUsage({ feature: 'stop-duration-vital' });\n            strategy.stopDurationVital(typeof nameOrRef === 'string' ? sanitize(nameOrRef) : nameOrRef, {\n                context: sanitize(options && options.context),\n                description: sanitize(options && options.description),\n            });\n        }),\n        startFeatureOperation: (name, options) => {\n            const handlingStack = createHandlingStack('vital');\n            callMonitored(() => {\n                addTelemetryUsage({ feature: 'add-operation-step-vital', action_type: 'start' });\n                strategy.addOperationStepVital(name, 'start', { ...options, handlingStack });\n            });\n        },\n        succeedFeatureOperation: monitor((name, options) => {\n            addTelemetryUsage({ feature: 'add-operation-step-vital', action_type: 'succeed' });\n            strategy.addOperationStepVital(name, 'end', options);\n        }),\n        failFeatureOperation: monitor((name, failureReason, options) => {\n            addTelemetryUsage({ feature: 'add-operation-step-vital', action_type: 'fail' });\n            strategy.addOperationStepVital(name, 'end', options, failureReason);\n        }),\n    });\n    return rumPublicApi;\n}\nfunction createPostStartStrategy(preStartStrategy, startRumResult) {\n    return {\n        init: (initConfiguration) => {\n            displayAlreadyInitializedError('DD_RUM', initConfiguration);\n        },\n        initConfiguration: preStartStrategy.initConfiguration,\n        ...startRumResult,\n    };\n}\n//# sourceMappingURL=rumPublicApi.js.map","import { BufferedObservable } from '../tools/observable';\nimport { mockable } from '../tools/mockable';\nimport { trackRuntimeError } from './error/trackRuntimeError';\nconst BUFFER_LIMIT = 500;\nexport function startBufferingData() {\n    const observable = new BufferedObservable(BUFFER_LIMIT);\n    const runtimeErrorSubscription = mockable(trackRuntimeError)().subscribe((error) => {\n        observable.notify({\n            type: 0 /* BufferedDataType.RUNTIME_ERROR */,\n            error,\n        });\n    });\n    return {\n        observable,\n        stop: () => {\n            runtimeErrorSubscription.unsubscribe();\n        },\n    };\n}\n//# sourceMappingURL=bufferedData.js.map","import { INTAKE_SITE_STAGING, INTAKE_SITE_US1, INTAKE_SITE_EU1 } from '@datadog/browser-core';\nexport function getSessionReplayUrl(configuration, { session, viewContext, errorType, }) {\n    const sessionId = session ? session.id : 'no-session-id';\n    const parameters = [];\n    if (errorType !== undefined) {\n        parameters.push(`error-type=${errorType}`);\n    }\n    if (viewContext) {\n        parameters.push(`seed=${viewContext.id}`);\n        parameters.push(`from=${viewContext.startClocks.timeStamp}`);\n    }\n    const origin = getDatadogSiteUrl(configuration);\n    const path = `/rum/replay/sessions/${sessionId}`;\n    return `${origin}${path}?${parameters.join('&')}`;\n}\nexport function getDatadogSiteUrl(rumConfiguration) {\n    const site = rumConfiguration.site;\n    const subdomain = rumConfiguration.subdomain || getSiteDefaultSubdomain(rumConfiguration);\n    return `https://${subdomain ? `${subdomain}.` : ''}${site}`;\n}\nfunction getSiteDefaultSubdomain(configuration) {\n    switch (configuration.site) {\n        case INTAKE_SITE_US1:\n        case INTAKE_SITE_EU1:\n            return 'app';\n        case INTAKE_SITE_STAGING:\n            return 'dd';\n        default:\n            return undefined;\n    }\n}\n//# sourceMappingURL=getSessionReplayUrl.js.map","import { addTelemetryDebug, createHttpRequest, jsonStringify, objectEntries } from '@datadog/browser-core';\nexport function createFormDataTransport(configuration, lifeCycle, createEncoder, streamId) {\n    const reportError = (error) => {\n        lifeCycle.notify(14 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, { error });\n        // monitor-until: forever, to keep an eye on the errors reported to customers\n        addTelemetryDebug('Error reported to customer', { 'error.message': error.message });\n    };\n    const httpRequest = createHttpRequest([configuration.profilingEndpointBuilder], reportError);\n    const encoder = createEncoder(streamId);\n    return {\n        async send({ event, ...attachments }) {\n            const formData = new FormData();\n            const serializedEvent = jsonStringify(event);\n            if (!serializedEvent) {\n                throw new Error('Failed to serialize event');\n            }\n            formData.append('event', new Blob([serializedEvent], { type: 'application/json' }), 'event.json');\n            let bytesCount = serializedEvent.length;\n            for (const [key, value] of objectEntries(attachments)) {\n                const serializedValue = jsonStringify(value);\n                if (!serializedValue) {\n                    throw new Error('Failed to serialize attachment');\n                }\n                const result = await encode(encoder, serializedValue);\n                bytesCount += result.outputBytesCount;\n                formData.append(key, new Blob([result.output]), key);\n            }\n            httpRequest.send({\n                data: formData,\n                bytesCount,\n            });\n        },\n    };\n}\nfunction encode(encoder, data) {\n    return new Promise((resolve) => {\n        encoder.write(data);\n        encoder.finish((encoderResult) => {\n            resolve(encoderResult);\n        });\n    });\n}\n//# sourceMappingURL=formDataTransport.js.map","export const RecordType = {\n    FullSnapshot: 2,\n    IncrementalSnapshot: 3,\n    Meta: 4,\n    Focus: 6,\n    ViewEnd: 7,\n    VisualViewport: 8,\n    FrustrationRecord: 9,\n    Change: 12,\n};\nexport const NodeType = {\n    Document: 0,\n    DocumentType: 1,\n    Element: 2,\n    Text: 3,\n    CDATA: 4,\n    DocumentFragment: 11,\n};\nexport const ChangeType = {\n    AddString: 0,\n    AddNode: 1,\n    RemoveNode: 2,\n    Attribute: 3,\n    Text: 4,\n    Size: 5,\n    ScrollPosition: 6,\n    AddStyleSheet: 7,\n    AttachedStyleSheets: 8,\n    MediaPlaybackState: 9,\n    VisualViewport: 10,\n};\nexport const PlaybackState = {\n    Playing: 0,\n    Paused: 1,\n};\nexport const IncrementalSource = {\n    Mutation: 0,\n    MouseMove: 1,\n    MouseInteraction: 2,\n    Scroll: 3,\n    ViewportResize: 4,\n    Input: 5,\n    TouchMove: 6,\n    MediaInteraction: 7,\n    StyleSheetRule: 8,\n    // CanvasMutation : 9,\n    // Font : 10,\n};\nexport const MouseInteractionType = {\n    MouseUp: 0,\n    MouseDown: 1,\n    Click: 2,\n    ContextMenu: 3,\n    DblClick: 4,\n    Focus: 5,\n    Blur: 6,\n    TouchStart: 7,\n    TouchEnd: 9,\n};\nexport const MediaInteractionType = {\n    Play: 0,\n    Pause: 1,\n};\nexport const SnapshotFormat = {\n    V1: 0,\n    Change: 1,\n};\n//# sourceMappingURL=sessionReplayConstants.js.map","import { ExperimentalFeature, isExperimentalFeatureEnabled } from '@datadog/browser-core';\nexport function isFullSnapshotChangeRecordsEnabled() {\n    // We don't want to have to support the case where full snapshots use the old format and\n    // incremental snapshots use the new one, so we should generate full snapshot Change\n    // records if either feature flag is enabled.\n    return (isExperimentalFeatureEnabled(ExperimentalFeature.USE_CHANGE_RECORDS) ||\n        isExperimentalFeatureEnabled(ExperimentalFeature.USE_INCREMENTAL_CHANGE_RECORDS));\n}\nexport function isIncrementalSnapshotChangeRecordsEnabled() {\n    return isExperimentalFeatureEnabled(ExperimentalFeature.USE_INCREMENTAL_CHANGE_RECORDS);\n}\n//# sourceMappingURL=experimentalFeatures.js.map","import { buildUrl } from '@datadog/browser-core';\nimport { CENSORED_STRING_MARK, shouldMaskNode } from '@datadog/browser-rum-core';\n/**\n * Get the element \"value\" to be serialized as an attribute or an input update record. It respects\n * the input privacy mode of the element.\n * PERFROMANCE OPTIMIZATION: Assumes that privacy level `HIDDEN` is never encountered because of earlier checks.\n */\nexport function getElementInputValue(element, nodePrivacyLevel) {\n    /*\n     BROWSER SPEC NOTE: <input>, <select>\n     For some <input> elements, the `value` is an exceptional property/attribute that has the\n     value synced between el.value and el.getAttribute()\n     input[type=button,checkbox,hidden,image,radio,reset,submit]\n     */\n    const tagName = element.tagName;\n    const value = element.value;\n    if (shouldMaskNode(element, nodePrivacyLevel)) {\n        const type = element.type;\n        if (tagName === 'INPUT' && (type === 'button' || type === 'submit' || type === 'reset')) {\n            // Overrule `MASK` privacy level for button-like element values, as they are used during replay\n            // to display their label. They can still be hidden via the \"hidden\" privacy attribute or class name.\n            return value;\n        }\n        else if (!value || tagName === 'OPTION') {\n            // <Option> value provides no benefit\n            return;\n        }\n        return CENSORED_STRING_MARK;\n    }\n    if (tagName === 'OPTION' || tagName === 'SELECT') {\n        return element.value;\n    }\n    if (tagName !== 'INPUT' && tagName !== 'TEXTAREA') {\n        return;\n    }\n    return value;\n}\nexport const URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")([^\"]*)\"|([^)]*))\\)/gm;\nexport const ABSOLUTE_URL = /^[A-Za-z]+:|^\\/\\//;\nexport const DATA_URI = /^[\"']?data:.*,/i;\nexport function switchToAbsoluteUrl(cssText, cssHref) {\n    return cssText.replace(URL_IN_CSS_REF, (matchingSubstring, singleQuote, urlWrappedInSingleQuotes, doubleQuote, urlWrappedInDoubleQuotes, urlNotWrappedInQuotes) => {\n        const url = urlWrappedInSingleQuotes || urlWrappedInDoubleQuotes || urlNotWrappedInQuotes;\n        if (!cssHref || !url || ABSOLUTE_URL.test(url) || DATA_URI.test(url)) {\n            return matchingSubstring;\n        }\n        const quote = singleQuote || doubleQuote || '';\n        return `url(${quote}${makeUrlAbsolute(url, cssHref)}${quote})`;\n    });\n}\nfunction makeUrlAbsolute(url, baseUrl) {\n    try {\n        return buildUrl(url, baseUrl).href;\n    }\n    catch (_a) {\n        return url;\n    }\n}\nconst TAG_NAME_REGEX = /[^a-z1-6-_]/;\nexport function getValidTagName(tagName) {\n    const processedTagName = tagName.toLowerCase().trim();\n    if (TAG_NAME_REGEX.test(processedTagName)) {\n        // if the tag name is odd and we cannot extract\n        // anything from the string, then we return a\n        // generic div\n        return 'div';\n    }\n    return processedTagName;\n}\n/**\n * Returns the tag name of the given element, normalized to ensure a consistent lowercase\n * representation regardless of whether the element is HTML, XHTML, or SVG.\n */\nexport function normalizedTagName(element) {\n    return element.tagName.toLowerCase();\n}\nexport function censoredImageForSize(width, height) {\n    return `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${width}' height='${height}' style='background-color:silver'%3E%3C/svg%3E`;\n}\n//# sourceMappingURL=serializationUtils.js.map","export function serializeStyleSheets(cssStyleSheets, transaction) {\n    if (cssStyleSheets === undefined || cssStyleSheets.length === 0) {\n        return undefined;\n    }\n    const serializeStylesheet = (cssStyleSheet) => {\n        const rules = cssStyleSheet.cssRules || cssStyleSheet.rules;\n        const cssRules = Array.from(rules, (cssRule) => cssRule.cssText);\n        transaction.addMetric('cssText', cssRules.reduce((totalLength, rule) => totalLength + rule.length, 0));\n        const styleSheet = {\n            cssRules,\n            disabled: cssStyleSheet.disabled || undefined,\n            media: cssStyleSheet.media.length > 0 ? Array.from(cssStyleSheet.media) : undefined,\n        };\n        return styleSheet;\n    };\n    // Safari iOS 16.x implements adoptedStyleSheets as a FrozenArray that:\n    // - can't be iterated over through map or for...of\n    // - can't be converted to regular array with Array.from\n    // - can't be detected with Array.isArray or Object.isFrozen\n    // Use index access to avoid the issue\n    const styleSheets = [];\n    for (let index = 0; index < cssStyleSheets.length; index++) {\n        styleSheets.push(serializeStylesheet(cssStyleSheets[index]));\n    }\n    return styleSheets;\n}\n//# sourceMappingURL=serializeStyleSheets.js.map","import { NodePrivacyLevel, CENSORED_STRING_MARK, CENSORED_IMG_MARK, sanitizeIfLongDataUrl, shouldMaskAttribute, } from '@datadog/browser-rum-core';\nimport { censoredImageForSize } from './serializationUtils';\n// TODO: temporarily bump the Session Replay limit to 1Mb for dataUrls\n// This limit should be removed after [PANA-2843] is implemented\nexport const MAX_ATTRIBUTE_VALUE_CHAR_LENGTH = 1000000;\nexport function serializeAttribute(element, nodePrivacyLevel, attributeName, configuration) {\n    if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {\n        // dup condition for direct access case\n        return null;\n    }\n    const attributeValue = element.getAttribute(attributeName);\n    const tagName = element.tagName;\n    if (shouldMaskAttribute(tagName, attributeName, attributeValue, nodePrivacyLevel, configuration)) {\n        // mask image URLs\n        if (tagName === 'IMG') {\n            // generate image with similar dimension than the original to have the same rendering behaviour\n            const image = element;\n            if (image.naturalWidth > 0) {\n                return censoredImageForSize(image.naturalWidth, image.naturalHeight);\n            }\n            const { width, height } = element.getBoundingClientRect();\n            if (width > 0 || height > 0) {\n                return censoredImageForSize(width, height);\n            }\n            // if we can't get the image size, fallback to the censored image\n            return CENSORED_IMG_MARK;\n        }\n        if (tagName === 'SOURCE') {\n            return CENSORED_IMG_MARK;\n        }\n        return CENSORED_STRING_MARK;\n    }\n    if (!attributeValue) {\n        return attributeValue;\n    }\n    return sanitizeIfLongDataUrl(attributeValue, MAX_ATTRIBUTE_VALUE_CHAR_LENGTH);\n}\n//# sourceMappingURL=serializeAttribute.js.map","import { NodePrivacyLevel, shouldMaskNode } from '@datadog/browser-rum-core';\nimport { isSafari } from '@datadog/browser-core';\nimport { getElementInputValue, normalizedTagName, switchToAbsoluteUrl } from './serializationUtils';\nimport { serializeAttribute } from './serializeAttribute';\nexport function serializeAttributes(element, nodePrivacyLevel, transaction) {\n    return {\n        ...serializeDOMAttributes(element, nodePrivacyLevel, transaction),\n        ...serializeVirtualAttributes(element, nodePrivacyLevel, transaction),\n    };\n}\nexport function serializeDOMAttributes(element, nodePrivacyLevel, transaction) {\n    if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {\n        return {};\n    }\n    const attrs = {};\n    const tagName = normalizedTagName(element);\n    for (let i = 0; i < element.attributes.length; i += 1) {\n        const attribute = element.attributes.item(i);\n        const attributeName = attribute.name;\n        const attributeValue = serializeAttribute(element, nodePrivacyLevel, attributeName, transaction.scope.configuration);\n        if (attributeValue !== null) {\n            attrs[attributeName] = attributeValue;\n        }\n    }\n    if (element.value &&\n        (tagName === 'textarea' || tagName === 'select' || tagName === 'option' || tagName === 'input')) {\n        const formValue = getElementInputValue(element, nodePrivacyLevel);\n        if (formValue !== undefined) {\n            attrs.value = formValue;\n        }\n    }\n    /**\n     * <Option> can be selected, which occurs if its `value` matches ancestor `<Select>.value`\n     */\n    if (tagName === 'option') {\n        const optionElement = element;\n        if (optionElement.selected && !shouldMaskNode(optionElement, nodePrivacyLevel)) {\n            attrs.selected = '';\n        }\n        else {\n            delete attrs.selected;\n        }\n    }\n    /**\n     * Forms: input[type=checkbox,radio]\n     * The `checked` property for <input> is a little bit special:\n     * 1. el.checked is a setter that returns if truthy.\n     * 2. getAttribute returns the string value\n     * getAttribute('checked') does not sync with `Element.checked`, so use JS property\n     * NOTE: `checked` property exists on `HTMLInputElement`. For serializer assumptions, we check for type=radio|check.\n     */\n    const inputElement = element;\n    if (tagName === 'input' && (inputElement.type === 'radio' || inputElement.type === 'checkbox')) {\n        if (inputElement.checked && !shouldMaskNode(inputElement, nodePrivacyLevel)) {\n            attrs.checked = '';\n        }\n        else {\n            delete attrs.checked;\n        }\n    }\n    return attrs;\n}\nexport function serializeVirtualAttributes(element, nodePrivacyLevel, transaction) {\n    if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {\n        return {};\n    }\n    const attrs = {};\n    const doc = element.ownerDocument;\n    const tagName = normalizedTagName(element);\n    // remote css\n    if (tagName === 'link') {\n        const stylesheet = Array.from(doc.styleSheets).find((s) => s.href === element.href);\n        const cssText = getCssRulesString(stylesheet);\n        if (cssText && stylesheet) {\n            transaction.addMetric('cssText', cssText.length);\n            attrs._cssText = cssText;\n        }\n    }\n    // dynamic stylesheet\n    if (tagName === 'style' && element.sheet) {\n        const cssText = getCssRulesString(element.sheet);\n        if (cssText) {\n            transaction.addMetric('cssText', cssText.length);\n            attrs._cssText = cssText;\n        }\n    }\n    /**\n     * Serialize the media playback state\n     */\n    if (tagName === 'audio' || tagName === 'video') {\n        const mediaElement = element;\n        attrs.rr_mediaState = mediaElement.paused ? 'paused' : 'played';\n    }\n    /**\n     * Serialize the scroll state for each element only for full snapshot\n     */\n    let scrollTop;\n    let scrollLeft;\n    switch (transaction.kind) {\n        case 0 /* SerializationKind.INITIAL_FULL_SNAPSHOT */:\n            scrollTop = Math.round(element.scrollTop);\n            scrollLeft = Math.round(element.scrollLeft);\n            if (scrollTop || scrollLeft) {\n                transaction.scope.elementsScrollPositions.set(element, { scrollTop, scrollLeft });\n            }\n            break;\n        case 1 /* SerializationKind.SUBSEQUENT_FULL_SNAPSHOT */:\n            if (transaction.scope.elementsScrollPositions.has(element)) {\n                ;\n                ({ scrollTop, scrollLeft } = transaction.scope.elementsScrollPositions.get(element));\n            }\n            break;\n    }\n    if (scrollLeft) {\n        attrs.rr_scrollLeft = scrollLeft;\n    }\n    if (scrollTop) {\n        attrs.rr_scrollTop = scrollTop;\n    }\n    return attrs;\n}\nexport function getCssRulesString(cssStyleSheet) {\n    if (!cssStyleSheet) {\n        return null;\n    }\n    let rules;\n    try {\n        rules = cssStyleSheet.rules || cssStyleSheet.cssRules;\n    }\n    catch (_a) {\n        // if css is protected by CORS we cannot access cssRules see: https://www.w3.org/TR/cssom-1/#the-cssstylesheet-interface\n    }\n    if (!rules) {\n        return null;\n    }\n    const styleSheetCssText = Array.from(rules, isSafari() ? getCssRuleStringForSafari : getCssRuleString).join('');\n    return switchToAbsoluteUrl(styleSheetCssText, cssStyleSheet.href);\n}\nfunction getCssRuleStringForSafari(rule) {\n    // Safari does not escape attribute selectors containing : properly\n    // https://bugs.webkit.org/show_bug.cgi?id=184604\n    if (isCSSStyleRule(rule) && rule.selectorText.includes(':')) {\n        // This regex replaces [foo:bar] by [foo\\\\:bar]\n        const escapeColon = /(\\[[\\w-]+[^\\\\])(:[^\\]]+\\])/g;\n        return rule.cssText.replace(escapeColon, '$1\\\\$2');\n    }\n    return getCssRuleString(rule);\n}\nfunction getCssRuleString(rule) {\n    // If it's an @import rule, try to inline sub-rules recursively with `getCssRulesString`. This\n    // operation can fail if the imported stylesheet is protected by CORS, in which case we fallback\n    // to the @import rule CSS text.\n    return (isCSSImportRule(rule) && getCssRulesString(rule.styleSheet)) || rule.cssText;\n}\nfunction isCSSImportRule(rule) {\n    return 'styleSheet' in rule;\n}\nfunction isCSSStyleRule(rule) {\n    return 'selectorText' in rule;\n}\n//# sourceMappingURL=serializeAttributes.js.map","import { reducePrivacyLevel, getNodeSelfPrivacyLevel, getTextContent, isNodeShadowRoot, hasChildNodes, forEachChildNodes, NodePrivacyLevel, PRIVACY_ATTR_NAME, PRIVACY_ATTR_VALUE_HIDDEN, } from '@datadog/browser-rum-core';\nimport { NodeType } from '../../../types';\nimport { getValidTagName } from './serializationUtils';\nimport { serializeStyleSheets } from './serializeStyleSheets';\nimport { serializeAttributes } from './serializeAttributes';\nexport function serializeNode(node, parentNodePrivacyLevel, transaction) {\n    switch (node.nodeType) {\n        case node.DOCUMENT_NODE:\n            return serializeDocumentNode(node, parentNodePrivacyLevel, transaction);\n        case node.DOCUMENT_FRAGMENT_NODE:\n            return serializeDocumentFragmentNode(node, parentNodePrivacyLevel, transaction);\n        case node.DOCUMENT_TYPE_NODE:\n            return serializeDocumentTypeNode(node, transaction);\n        case node.ELEMENT_NODE:\n            return serializeElementNode(node, parentNodePrivacyLevel, transaction);\n        case node.TEXT_NODE:\n            return serializeTextNode(node, parentNodePrivacyLevel, transaction);\n        case node.CDATA_SECTION_NODE:\n            return serializeCDataNode(node, transaction);\n        default:\n            return null;\n    }\n}\nexport function serializeChildNodes(node, parentNodePrivacyLevel, transaction) {\n    const result = [];\n    forEachChildNodes(node, (childNode) => {\n        const serializedChildNode = serializeNode(childNode, parentNodePrivacyLevel, transaction);\n        if (serializedChildNode) {\n            result.push(serializedChildNode);\n        }\n    });\n    return result;\n}\nexport function serializeDocumentNode(document, parentNodePrivacyLevel, transaction) {\n    return {\n        type: NodeType.Document,\n        id: transaction.assignId(document),\n        childNodes: serializeChildNodes(document, parentNodePrivacyLevel, transaction),\n        adoptedStyleSheets: serializeStyleSheets(document.adoptedStyleSheets, transaction),\n    };\n}\nfunction serializeDocumentFragmentNode(element, parentNodePrivacyLevel, transaction) {\n    const isShadowRoot = isNodeShadowRoot(element);\n    if (isShadowRoot) {\n        transaction.scope.shadowRootsController.addShadowRoot(element, transaction.scope);\n    }\n    return {\n        type: NodeType.DocumentFragment,\n        id: transaction.assignId(element),\n        childNodes: serializeChildNodes(element, parentNodePrivacyLevel, transaction),\n        isShadowRoot,\n        adoptedStyleSheets: isShadowRoot ? serializeStyleSheets(element.adoptedStyleSheets, transaction) : undefined,\n    };\n}\nfunction serializeDocumentTypeNode(documentType, transaction) {\n    return {\n        type: NodeType.DocumentType,\n        id: transaction.assignId(documentType),\n        name: documentType.name,\n        publicId: documentType.publicId,\n        systemId: documentType.systemId,\n    };\n}\n/**\n * Serializing Element nodes involves capturing:\n * 1. HTML ATTRIBUTES:\n * 2. JS STATE:\n * - scroll offsets\n * - Form fields (input value, checkbox checked, option selection, range)\n * - Canvas state,\n * - Media (video/audio) play mode + currentTime\n * - iframe contents\n * - webcomponents\n * 3. CUSTOM PROPERTIES:\n * - height+width for when `hidden` to cover the element\n * 4. EXCLUDED INTERACTION STATE:\n * - focus (possible, but not worth perf impact)\n * - hover (tracked only via mouse activity)\n * - fullscreen mode\n */\nfunction serializeElementNode(element, parentNodePrivacyLevel, transaction) {\n    const tagName = getValidTagName(element.tagName);\n    const isSVG = isSVGElement(element) || undefined;\n    // For performance reason, we don't use getNodePrivacyLevel directly: we leverage the\n    // parentNodePrivacyLevel option to avoid iterating over all parents\n    const nodePrivacyLevel = reducePrivacyLevel(getNodeSelfPrivacyLevel(element), parentNodePrivacyLevel);\n    if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {\n        const { width, height } = element.getBoundingClientRect();\n        return {\n            type: NodeType.Element,\n            id: transaction.assignId(element),\n            tagName,\n            attributes: {\n                rr_width: `${width}px`,\n                rr_height: `${height}px`,\n                [PRIVACY_ATTR_NAME]: PRIVACY_ATTR_VALUE_HIDDEN,\n            },\n            childNodes: [],\n            isSVG,\n        };\n    }\n    // Ignore Elements like Script and some Link, Metas\n    if (nodePrivacyLevel === NodePrivacyLevel.IGNORE) {\n        return null;\n    }\n    const id = transaction.assignId(element);\n    const attributes = serializeAttributes(element, nodePrivacyLevel, transaction);\n    let childNodes = [];\n    if (hasChildNodes(element) &&\n        // Do not serialize style children as the css rules are already in the _cssText attribute\n        tagName !== 'style') {\n        childNodes = serializeChildNodes(element, nodePrivacyLevel, transaction);\n    }\n    return {\n        type: NodeType.Element,\n        id,\n        tagName,\n        attributes,\n        childNodes,\n        isSVG,\n    };\n}\nfunction isSVGElement(el) {\n    return el.tagName === 'svg' || el instanceof SVGElement;\n}\n/**\n * Text Nodes are dependant on Element nodes\n * Privacy levels are set on elements so we check the parentElement of a text node\n * for privacy level.\n */\nfunction serializeTextNode(textNode, parentNodePrivacyLevel, transaction) {\n    const textContent = getTextContent(textNode, parentNodePrivacyLevel);\n    if (textContent === undefined) {\n        return null;\n    }\n    return {\n        type: NodeType.Text,\n        id: transaction.assignId(textNode),\n        textContent,\n    };\n}\nfunction serializeCDataNode(node, transaction) {\n    return {\n        type: NodeType.CDATA,\n        id: transaction.assignId(node),\n        textContent: '',\n    };\n}\n//# sourceMappingURL=serializeNode.js.map","export function createSerializationStats() {\n    return {\n        cssText: {\n            count: 0,\n            max: 0,\n            sum: 0,\n        },\n        serializationDuration: {\n            count: 0,\n            max: 0,\n            sum: 0,\n        },\n    };\n}\nexport function updateSerializationStats(stats, metric, value) {\n    stats[metric].count += 1;\n    stats[metric].max = Math.max(stats[metric].max, value);\n    stats[metric].sum += value;\n}\nexport function aggregateSerializationStats(aggregateStats, stats) {\n    for (const metric of ['cssText', 'serializationDuration']) {\n        aggregateStats[metric].count += stats[metric].count;\n        aggregateStats[metric].max = Math.max(aggregateStats[metric].max, stats[metric].max);\n        aggregateStats[metric].sum += stats[metric].sum;\n    }\n}\n//# sourceMappingURL=serializationStats.js.map","import { elapsed, timeStampNow } from '@datadog/browser-core';\nimport { ChangeType, RecordType, SnapshotFormat } from '../../../types';\nimport { createSerializationStats, updateSerializationStats } from './serializationStats';\nimport { createChangeEncoder } from './changeEncoder';\n/**\n * Perform serialization within a transaction. At the end of the transaction, the\n * generated records and statistics will be emitted.\n */\nexport function serializeInTransaction(kind, emitRecord, emitStats, scope, serialize) {\n    const records = [];\n    const stats = createSerializationStats();\n    const transaction = {\n        add(record) {\n            records.push(record);\n        },\n        addMetric(metric, value) {\n            updateSerializationStats(stats, metric, value);\n        },\n        assignId(node) {\n            const id = scope.nodeIds.getOrInsert(node);\n            if (transaction.serializedNodeIds) {\n                transaction.serializedNodeIds.add(id);\n            }\n            return id;\n        },\n        kind,\n        scope,\n    };\n    const start = timeStampNow();\n    serialize(transaction);\n    updateSerializationStats(stats, 'serializationDuration', elapsed(start, timeStampNow()));\n    for (const record of records) {\n        emitRecord(record);\n    }\n    emitStats(stats);\n}\nexport function serializeChangesInTransaction(kind, emitRecord, emitStats, scope, timestamp, serialize) {\n    const encoder = createChangeEncoder(scope.stringIds);\n    const stats = createSerializationStats();\n    const transaction = {\n        addMetric(metric, value) {\n            updateSerializationStats(stats, metric, value);\n        },\n        addNode(...change) {\n            encoder.add(ChangeType.AddNode, change);\n        },\n        addStyleSheet(rules, mediaList, disabled) {\n            if (disabled) {\n                encoder.add(ChangeType.AddStyleSheet, [rules, mediaList || [], disabled]);\n            }\n            else if (mediaList) {\n                encoder.add(ChangeType.AddStyleSheet, [rules, mediaList]);\n            }\n            else {\n                encoder.add(ChangeType.AddStyleSheet, [rules]);\n            }\n        },\n        attachStyleSheets(nodeId, sheetIds) {\n            const change = [nodeId];\n            for (const sheetId of sheetIds) {\n                change.push(sheetId);\n            }\n            encoder.add(ChangeType.AttachedStyleSheets, change);\n        },\n        removeNode(nodeId) {\n            encoder.add(ChangeType.RemoveNode, nodeId);\n        },\n        setAttributes(change) {\n            encoder.add(ChangeType.Attribute, change);\n        },\n        setMediaPlaybackState(nodeId, state) {\n            encoder.add(ChangeType.MediaPlaybackState, [nodeId, state]);\n        },\n        setScrollPosition(nodeId, x, y) {\n            encoder.add(ChangeType.ScrollPosition, [nodeId, x, y]);\n        },\n        setSize(nodeId, width, height) {\n            encoder.add(ChangeType.Size, [nodeId, width, height]);\n        },\n        setText(nodeId, content) {\n            encoder.add(ChangeType.Text, [nodeId, content]);\n        },\n        kind,\n        scope,\n    };\n    const start = timeStampNow();\n    serialize(transaction);\n    updateSerializationStats(stats, 'serializationDuration', elapsed(start, timeStampNow()));\n    const changes = encoder.flush();\n    if (changes.length > 0) {\n        if (kind === 0 /* SerializationKind.INITIAL_FULL_SNAPSHOT */ || kind === 1 /* SerializationKind.SUBSEQUENT_FULL_SNAPSHOT */) {\n            emitRecord({\n                data: changes,\n                format: SnapshotFormat.Change,\n                type: RecordType.FullSnapshot,\n                timestamp,\n            });\n        }\n        else {\n            emitRecord({\n                data: changes,\n                type: RecordType.Change,\n                timestamp,\n            });\n        }\n    }\n    emitStats(stats);\n}\n//# sourceMappingURL=serializationTransaction.js.map","import { ChangeType } from '../../../types';\nexport function createChangeEncoder(stringIds) {\n    let pendingChanges = {};\n    // A helper that searches for strings in arbitrarily-nested arrays, inserts any strings\n    // it finds into the string table, and replaces the strings with string table\n    // references.\n    const convertStringsToStringReferences = (array) => {\n        for (let index = 0, length = array.length; index < length; index++) {\n            const item = array[index];\n            if (typeof item === 'string') {\n                const previousSize = stringIds.size;\n                array[index] = stringIds.getOrInsert(item);\n                if (stringIds.size > previousSize) {\n                    add(ChangeType.AddString, item);\n                }\n            }\n            else if (Array.isArray(item)) {\n                convertStringsToStringReferences(item);\n            }\n        }\n    };\n    const add = (type, data) => {\n        if (!(type in pendingChanges)) {\n            pendingChanges[type] = [type];\n        }\n        if (type !== ChangeType.AddString && Array.isArray(data)) {\n            convertStringsToStringReferences(data);\n        }\n        pendingChanges[type].push(data);\n    };\n    const flush = () => {\n        const changes = [];\n        [\n            ChangeType.AddString,\n            ChangeType.AddNode,\n            ChangeType.RemoveNode,\n            ChangeType.Attribute,\n            ChangeType.Text,\n            ChangeType.Size,\n            ChangeType.ScrollPosition,\n            ChangeType.AddStyleSheet,\n            ChangeType.AttachedStyleSheets,\n            ChangeType.MediaPlaybackState,\n            ChangeType.VisualViewport,\n        ].forEach((changeType) => {\n            const change = pendingChanges[changeType];\n            if (change) {\n                changes.push(change);\n            }\n        });\n        pendingChanges = {};\n        return changes;\n    };\n    return { add, flush };\n}\n//# sourceMappingURL=changeEncoder.js.map","import { getScrollX, getScrollY } from '@datadog/browser-rum-core';\nimport { RecordType, SnapshotFormat } from '../../../types';\nimport { serializeNode } from './serializeNode';\nimport { serializeInTransaction } from './serializationTransaction';\nexport function serializeFullSnapshot(timestamp, kind, document, emitRecord, emitStats, scope) {\n    serializeInTransaction(kind, emitRecord, emitStats, scope, (transaction) => {\n        const defaultPrivacyLevel = transaction.scope.configuration.defaultPrivacyLevel;\n        // We are sure that Documents are never ignored, so this function never returns null.\n        const node = serializeNode(document, defaultPrivacyLevel, transaction);\n        const record = {\n            data: {\n                node,\n                initialOffset: {\n                    left: getScrollX(),\n                    top: getScrollY(),\n                },\n            },\n            format: SnapshotFormat.V1,\n            type: RecordType.FullSnapshot,\n            timestamp,\n        };\n        transaction.add(record);\n        scope.serializeObservable.notify({\n            type: 'full',\n            kind,\n            target: document,\n            timestamp,\n            v1: record,\n        });\n    });\n}\n//# sourceMappingURL=serializeFullSnapshot.js.map","import { reducePrivacyLevel, getNodeSelfPrivacyLevel, getTextContent, isNodeShadowRoot, forEachChildNodes, NodePrivacyLevel, PRIVACY_ATTR_NAME, PRIVACY_ATTR_VALUE_HIDDEN, getScrollX, getScrollY, isElementNode, } from '@datadog/browser-rum-core';\nimport { MediaInteractionType } from '../../../types';\nimport { serializeDOMAttributes, serializeVirtualAttributes } from './serializeAttributes';\nexport function serializeNodeAsChange(cursor, node, parentPrivacyLevel, transaction) {\n    var _a;\n    // Ignore the children of <style> elements; the CSS rules they contain are already\n    // serialized as StyleSheetSnapshots.\n    if (((_a = node.parentNode) === null || _a === void 0 ? void 0 : _a.nodeName) === 'STYLE') {\n        return;\n    }\n    // Never serialize the descendants of HIDDEN or IGNORE'd elements.\n    if (parentPrivacyLevel === NodePrivacyLevel.HIDDEN || parentPrivacyLevel === NodePrivacyLevel.IGNORE) {\n        return;\n    }\n    let privacyLevel;\n    const selfPrivacyLevel = getNodeSelfPrivacyLevel(node);\n    if (selfPrivacyLevel) {\n        privacyLevel = reducePrivacyLevel(selfPrivacyLevel, parentPrivacyLevel);\n    }\n    else {\n        privacyLevel = parentPrivacyLevel;\n    }\n    if (privacyLevel === NodePrivacyLevel.HIDDEN) {\n        serializeHiddenNodePlaceholder(cursor, node, transaction);\n        return;\n    }\n    // Totally ignore risky or unwanted elements. (e.g. <script>, some <link> and <meta> elements)\n    if (privacyLevel === NodePrivacyLevel.IGNORE) {\n        return;\n    }\n    switch (node.nodeType) {\n        case node.CDATA_SECTION_NODE:\n            serializeCDataNodeAsChange(cursor, node, transaction);\n            break;\n        case node.DOCUMENT_NODE:\n            serializeDocumentNodeAsChange(cursor, node, transaction);\n            break;\n        case node.DOCUMENT_FRAGMENT_NODE:\n            serializeDocumentFragmentNodeAsChange(cursor, node, transaction);\n            break;\n        case node.DOCUMENT_TYPE_NODE:\n            serializeDocumentTypeNodeAsChange(cursor, node, transaction);\n            break;\n        case node.ELEMENT_NODE:\n            serializeElementNodeAsChange(cursor, node, privacyLevel, transaction);\n            break;\n        case node.TEXT_NODE:\n            serializeTextNodeAsChange(cursor, node, privacyLevel, transaction);\n            break;\n        default:\n            return;\n    }\n    // If this node can't have children, we're done.\n    switch (node.nodeType) {\n        case node.CDATA_SECTION_NODE:\n        case node.DOCUMENT_TYPE_NODE:\n        case node.TEXT_NODE:\n            return;\n    }\n    cursor.descend();\n    forEachChildNodes(node, (childNode) => {\n        serializeNodeAsChange(cursor, childNode, privacyLevel, transaction);\n    });\n    cursor.ascend();\n}\nfunction serializeDocumentNodeAsChange(cursor, document, transaction) {\n    const { nodeId, insertionPoint } = cursor.advance(document);\n    transaction.addNode(insertionPoint, '#document');\n    transaction.setScrollPosition(nodeId, getScrollX(), getScrollY());\n    serializeStyleSheetsAsChange(document.adoptedStyleSheets, nodeId, transaction);\n}\nfunction serializeDocumentFragmentNodeAsChange(cursor, documentFragment, transaction) {\n    const { nodeId, insertionPoint } = cursor.advance(documentFragment);\n    const isShadowRoot = isNodeShadowRoot(documentFragment);\n    if (!isShadowRoot) {\n        transaction.addNode(insertionPoint, '#document-fragment');\n        return;\n    }\n    transaction.addNode(insertionPoint, '#shadow-root');\n    transaction.scope.shadowRootsController.addShadowRoot(documentFragment, transaction.scope);\n    serializeStyleSheetsAsChange(documentFragment.adoptedStyleSheets, nodeId, transaction);\n}\nfunction serializeDocumentTypeNodeAsChange(cursor, documentType, transaction) {\n    const { insertionPoint } = cursor.advance(documentType);\n    transaction.addNode(insertionPoint, '#doctype', documentType.name, documentType.publicId, documentType.systemId);\n}\nfunction serializeElementNodeAsChange(cursor, element, privacyLevel, transaction) {\n    const { nodeId, insertionPoint } = cursor.advance(element);\n    const domAttributes = Object.entries(serializeDOMAttributes(element, privacyLevel, transaction));\n    transaction.addNode(insertionPoint, encodedElementName(element), ...domAttributes);\n    const { _cssText: cssText, rr_mediaState: mediaState, rr_scrollLeft: scrollLeft, rr_scrollTop: scrollTop, } = serializeVirtualAttributes(element, privacyLevel, transaction);\n    const linkOrStyle = element;\n    if (cssText !== undefined && linkOrStyle.sheet) {\n        const sheetId = transaction.scope.styleSheetIds.getOrInsert(linkOrStyle.sheet);\n        transaction.addStyleSheet(cssText);\n        transaction.attachStyleSheets(nodeId, [sheetId]);\n    }\n    if (mediaState === 'played') {\n        transaction.setMediaPlaybackState(nodeId, MediaInteractionType.Play);\n    }\n    else if (mediaState === 'paused') {\n        transaction.setMediaPlaybackState(nodeId, MediaInteractionType.Pause);\n    }\n    if (scrollLeft !== undefined || scrollTop !== undefined) {\n        transaction.setScrollPosition(nodeId, scrollLeft || 0, scrollTop || 0);\n    }\n}\nfunction serializeTextNodeAsChange(cursor, textNode, privacyLevel, transaction) {\n    const textContent = getTextContent(textNode, privacyLevel);\n    if (textContent === undefined) {\n        return;\n    }\n    const { insertionPoint } = cursor.advance(textNode);\n    transaction.addNode(insertionPoint, '#text', textContent);\n}\nfunction serializeCDataNodeAsChange(cursor, cdataNode, transaction) {\n    const { insertionPoint } = cursor.advance(cdataNode);\n    transaction.addNode(insertionPoint, '#cdata-section');\n}\nfunction serializeHiddenNodePlaceholder(cursor, node, transaction) {\n    // We only generate placeholders for element nodes; other hidden nodes are simply not\n    // serialized.\n    if (!isElementNode(node)) {\n        return;\n    }\n    const { nodeId, insertionPoint } = cursor.advance(node);\n    transaction.addNode(insertionPoint, encodedElementName(node), [PRIVACY_ATTR_NAME, PRIVACY_ATTR_VALUE_HIDDEN]);\n    const { width, height } = node.getBoundingClientRect();\n    transaction.setSize(nodeId, width, height);\n}\nfunction serializeStyleSheetsAsChange(sheets, nodeId, transaction) {\n    if (!sheets || sheets.length === 0) {\n        return undefined;\n    }\n    transaction.attachStyleSheets(nodeId, sheets.map((sheet) => serializeStyleSheetAsChange(sheet, transaction)));\n}\nfunction serializeStyleSheetAsChange(sheet, transaction) {\n    const rules = Array.from(sheet.cssRules || sheet.rules, (rule) => rule.cssText);\n    const mediaList = sheet.media.length > 0 ? Array.from(sheet.media) : undefined;\n    transaction.addMetric('cssText', rules.reduce((totalLength, rule) => totalLength + rule.length, 0));\n    transaction.addStyleSheet(rules, mediaList, sheet.disabled);\n    return transaction.scope.styleSheetIds.getOrInsert(sheet);\n}\nfunction encodedElementName(element) {\n    const nodeName = element.nodeName;\n    if (isSVGElement(element)) {\n        return `svg>${nodeName}`;\n    }\n    return nodeName;\n}\nfunction isSVGElement(element) {\n    return element.namespaceURI === 'http://www.w3.org/2000/svg';\n}\n//# sourceMappingURL=serializeNodeAsChange.js.map","/** Returns an InsertionCursor which starts positioned at the root of the document. */\nexport function createRootInsertionCursor(nodeIds) {\n    return createInsertionCursor(undefined, undefined, nodeIds);\n}\n/**\n * Returns an InsertionCursor which starts positioned in the child list of the given\n * parent node. If a next sibling is provided, the cursor points to the position\n * immediately before the next sibling; otherwise, the cursor points to the end of the\n * child list.\n */\nexport function createChildInsertionCursor(parentId, nextSiblingId, nodeIds) {\n    return createInsertionCursor(parentId, nextSiblingId, nodeIds);\n}\nfunction createInsertionCursor(parentId, nextSiblingId, nodeIds) {\n    let cursor = {\n        container: undefined,\n        parentId,\n        previousSiblingId: undefined,\n        nextSiblingId,\n    };\n    const computeInsertionPoint = (nodeId) => {\n        if (cursor.previousSiblingId === nodeId - 1) {\n            // Use an AppendAfterPreviousInsertionPoint. (i.e., 0)\n            return 0;\n        }\n        if (cursor.nextSiblingId !== undefined) {\n            // Use an InsertBeforeInsertionPoint. We identify the next sibling using a\n            // negative integer indicating the difference between the new node's id and its next\n            // sibling's id.\n            return cursor.nextSiblingId - nodeId;\n        }\n        if (cursor.parentId !== undefined) {\n            // Use an AppendChildInsertionPoint. We identify the parent node using a positive\n            // integer indicating the difference between the new node's id and its parent's id.\n            return nodeId - cursor.parentId;\n        }\n        // There's no parent. Use a RootInsertionPoint. (i.e., null)\n        return null;\n    };\n    return {\n        advance(node) {\n            const nodeId = nodeIds.getOrInsert(node);\n            const insertionPoint = computeInsertionPoint(nodeId);\n            cursor.previousSiblingId = nodeId;\n            return { nodeId, insertionPoint };\n        },\n        ascend() {\n            if (cursor.container) {\n                cursor = cursor.container;\n            }\n        },\n        descend() {\n            if (cursor.previousSiblingId !== undefined) {\n                cursor = {\n                    container: cursor,\n                    parentId: cursor.previousSiblingId,\n                    previousSiblingId: undefined,\n                    nextSiblingId: undefined,\n                };\n            }\n        },\n    };\n}\n//# sourceMappingURL=insertionCursor.js.map","import { serializeChangesInTransaction } from './serializationTransaction';\nimport { serializeNodeAsChange } from './serializeNodeAsChange';\nimport { createRootInsertionCursor } from './insertionCursor';\nexport function serializeFullSnapshotAsChange(timestamp, kind, document, emitRecord, emitStats, scope) {\n    scope.resetIds();\n    serializeChangesInTransaction(kind, emitRecord, emitStats, scope, timestamp, (transaction) => {\n        serializeNodeAsChange(createRootInsertionCursor(scope.nodeIds), document, scope.configuration.defaultPrivacyLevel, transaction);\n    });\n}\n//# sourceMappingURL=serializeFullSnapshotAsChange.js.map","import { timeStampNow } from '@datadog/browser-core';\nimport { RecordType } from '../../types';\nexport function assembleIncrementalSnapshot(source, data, timestamp = timeStampNow()) {\n    return {\n        data: {\n            source,\n            ...data,\n        },\n        type: RecordType.IncrementalSnapshot,\n        timestamp,\n    };\n}\n//# sourceMappingURL=assembly.js.map","import { isNodeShadowHost, getParentNode, forEachChildNodes, getNodePrivacyLevel, getTextContent, NodePrivacyLevel, isNodeShadowRoot, } from '@datadog/browser-rum-core';\nimport { IncrementalSource } from '../../../types';\nimport { assembleIncrementalSnapshot } from '../assembly';\nimport { serializeInTransaction } from './serializationTransaction';\nimport { serializeNode } from './serializeNode';\nimport { serializeAttribute } from './serializeAttribute';\nimport { getElementInputValue } from './serializationUtils';\nexport function serializeMutations(timestamp, mutations, emitRecord, emitStats, scope) {\n    serializeInTransaction(2 /* SerializationKind.INCREMENTAL_SNAPSHOT */, emitRecord, emitStats, scope, (transaction) => processMutations(timestamp, mutations, transaction));\n}\nfunction processMutations(timestamp, mutations, transaction) {\n    const nodePrivacyLevelCache = new Map();\n    mutations\n        .filter((mutation) => mutation.type === 'childList')\n        .forEach((mutation) => {\n        mutation.removedNodes.forEach((removedNode) => {\n            traverseRemovedShadowDom(removedNode, transaction.scope.shadowRootsController.removeShadowRoot);\n        });\n    });\n    // Discard any mutation with a 'target' node that:\n    // * isn't injected in the current document or isn't known/serialized yet: those nodes are likely\n    // part of a mutation occurring in a parent Node\n    // * should be hidden or ignored\n    const filteredMutations = mutations.filter((mutation) => mutation.target.isConnected &&\n        idsAreAssignedForNodeAndAncestors(mutation.target, transaction.scope.nodeIds) &&\n        getNodePrivacyLevel(mutation.target, transaction.scope.configuration.defaultPrivacyLevel, nodePrivacyLevelCache) !== NodePrivacyLevel.HIDDEN);\n    const { adds, removes, hasBeenSerialized } = processChildListMutations(filteredMutations.filter((mutation) => mutation.type === 'childList'), nodePrivacyLevelCache, transaction);\n    const texts = processCharacterDataMutations(filteredMutations.filter((mutation) => mutation.type === 'characterData' && !hasBeenSerialized(mutation.target)), nodePrivacyLevelCache, transaction);\n    const attributes = processAttributesMutations(filteredMutations.filter((mutation) => mutation.type === 'attributes' && !hasBeenSerialized(mutation.target)), nodePrivacyLevelCache, transaction);\n    if (!texts.length && !attributes.length && !removes.length && !adds.length) {\n        return;\n    }\n    const record = assembleIncrementalSnapshot(IncrementalSource.Mutation, {\n        adds,\n        removes,\n        texts,\n        attributes,\n    }, timestamp);\n    transaction.add(record);\n    transaction.scope.serializeObservable.notify({\n        type: 'incremental',\n        target: mutations,\n        timestamp,\n        v1: record,\n    });\n}\nfunction processChildListMutations(mutations, nodePrivacyLevelCache, transaction) {\n    // First, we iterate over mutations to collect:\n    //\n    // * nodes that have been added in the document and not removed by a subsequent mutation\n    // * nodes that have been removed from the document but were not added in a previous mutation\n    //\n    // For this second category, we also collect their previous parent (mutation.target) because we'll\n    // need it to emit a 'remove' mutation.\n    //\n    // Those two categories may overlap: if a node moved from a position to another, it is reported as\n    // two mutation records, one with a \"removedNodes\" and the other with \"addedNodes\". In this case,\n    // the node will be in both sets.\n    const addedAndMovedNodes = new Set();\n    const removedNodes = new Map();\n    for (const mutation of mutations) {\n        mutation.addedNodes.forEach((node) => {\n            addedAndMovedNodes.add(node);\n        });\n        mutation.removedNodes.forEach((node) => {\n            if (!addedAndMovedNodes.has(node)) {\n                removedNodes.set(node, mutation.target);\n            }\n            addedAndMovedNodes.delete(node);\n        });\n    }\n    // Then, we sort nodes that are still in the document by topological order, for two reasons:\n    //\n    // * We will serialize each added nodes with their descendants. We don't want to serialize a node\n    // twice, so we need to iterate over the parent nodes first and skip any node that is contained in\n    // a precedent node.\n    //\n    // * To emit \"add\" mutations, we need references to the parent and potential next sibling of each\n    // added node. So we need to iterate over the parent nodes first, and when multiple nodes are\n    // siblings, we want to iterate from last to first. This will ensure that any \"next\" node is\n    // already serialized and have an id.\n    const sortedAddedAndMovedNodes = Array.from(addedAndMovedNodes);\n    sortAddedAndMovedNodes(sortedAddedAndMovedNodes);\n    // Then, we iterate over our sorted node sets to emit mutations. We collect the newly serialized\n    // node ids in a set to be able to skip subsequent related mutations.\n    transaction.serializedNodeIds = new Set();\n    const addedNodeMutations = [];\n    for (const node of sortedAddedAndMovedNodes) {\n        if (hasBeenSerialized(node)) {\n            continue;\n        }\n        const parentNodePrivacyLevel = getNodePrivacyLevel(node.parentNode, transaction.scope.configuration.defaultPrivacyLevel, nodePrivacyLevelCache);\n        if (parentNodePrivacyLevel === NodePrivacyLevel.HIDDEN || parentNodePrivacyLevel === NodePrivacyLevel.IGNORE) {\n            continue;\n        }\n        const serializedNode = serializeNode(node, parentNodePrivacyLevel, transaction);\n        if (!serializedNode) {\n            continue;\n        }\n        const parentNode = getParentNode(node);\n        addedNodeMutations.push({\n            nextId: getNextSibling(node),\n            parentId: transaction.scope.nodeIds.get(parentNode),\n            node: serializedNode,\n        });\n    }\n    // Finally, we emit remove mutations.\n    const removedNodeMutations = [];\n    removedNodes.forEach((parent, node) => {\n        const parentId = transaction.scope.nodeIds.get(parent);\n        const id = transaction.scope.nodeIds.get(node);\n        if (parentId !== undefined && id !== undefined) {\n            removedNodeMutations.push({ parentId, id });\n        }\n    });\n    return { adds: addedNodeMutations, removes: removedNodeMutations, hasBeenSerialized };\n    function hasBeenSerialized(node) {\n        var _a;\n        const id = transaction.scope.nodeIds.get(node);\n        return id !== undefined && ((_a = transaction.serializedNodeIds) === null || _a === void 0 ? void 0 : _a.has(id));\n    }\n    function getNextSibling(node) {\n        let nextSibling = node.nextSibling;\n        while (nextSibling) {\n            const id = transaction.scope.nodeIds.get(nextSibling);\n            if (id !== undefined) {\n                return id;\n            }\n            nextSibling = nextSibling.nextSibling;\n        }\n        return null;\n    }\n}\nfunction processCharacterDataMutations(mutations, nodePrivacyLevelCache, transaction) {\n    var _a;\n    const textMutations = [];\n    // Deduplicate mutations based on their target node\n    const handledNodes = new Set();\n    const filteredMutations = mutations.filter((mutation) => {\n        if (handledNodes.has(mutation.target)) {\n            return false;\n        }\n        handledNodes.add(mutation.target);\n        return true;\n    });\n    // Emit mutations\n    for (const mutation of filteredMutations) {\n        const value = mutation.target.textContent;\n        if (value === mutation.oldValue) {\n            continue;\n        }\n        const id = transaction.scope.nodeIds.get(mutation.target);\n        if (id === undefined) {\n            continue;\n        }\n        const parentNodePrivacyLevel = getNodePrivacyLevel(getParentNode(mutation.target), transaction.scope.configuration.defaultPrivacyLevel, nodePrivacyLevelCache);\n        if (parentNodePrivacyLevel === NodePrivacyLevel.HIDDEN || parentNodePrivacyLevel === NodePrivacyLevel.IGNORE) {\n            continue;\n        }\n        textMutations.push({\n            id,\n            value: (_a = getTextContent(mutation.target, parentNodePrivacyLevel)) !== null && _a !== void 0 ? _a : null,\n        });\n    }\n    return textMutations;\n}\nfunction processAttributesMutations(mutations, nodePrivacyLevelCache, transaction) {\n    const attributeMutations = [];\n    // Deduplicate mutations based on their target node and changed attribute\n    const handledElements = new Map();\n    const filteredMutations = mutations.filter((mutation) => {\n        const handledAttributes = handledElements.get(mutation.target);\n        if (handledAttributes && handledAttributes.has(mutation.attributeName)) {\n            return false;\n        }\n        if (!handledAttributes) {\n            handledElements.set(mutation.target, new Set([mutation.attributeName]));\n        }\n        else {\n            handledAttributes.add(mutation.attributeName);\n        }\n        return true;\n    });\n    // Emit mutations\n    const emittedMutations = new Map();\n    for (const mutation of filteredMutations) {\n        const uncensoredValue = mutation.target.getAttribute(mutation.attributeName);\n        if (uncensoredValue === mutation.oldValue) {\n            continue;\n        }\n        const id = transaction.scope.nodeIds.get(mutation.target);\n        if (id === undefined) {\n            continue;\n        }\n        const privacyLevel = getNodePrivacyLevel(mutation.target, transaction.scope.configuration.defaultPrivacyLevel, nodePrivacyLevelCache);\n        const attributeValue = serializeAttribute(mutation.target, privacyLevel, mutation.attributeName, transaction.scope.configuration);\n        let transformedValue;\n        if (mutation.attributeName === 'value') {\n            const inputValue = getElementInputValue(mutation.target, privacyLevel);\n            if (inputValue === undefined) {\n                continue;\n            }\n            transformedValue = inputValue;\n        }\n        else if (typeof attributeValue === 'string') {\n            transformedValue = attributeValue;\n        }\n        else {\n            transformedValue = null;\n        }\n        let emittedMutation = emittedMutations.get(mutation.target);\n        if (!emittedMutation) {\n            emittedMutation = { id, attributes: {} };\n            attributeMutations.push(emittedMutation);\n            emittedMutations.set(mutation.target, emittedMutation);\n        }\n        emittedMutation.attributes[mutation.attributeName] = transformedValue;\n    }\n    return attributeMutations;\n}\nexport function sortAddedAndMovedNodes(nodes) {\n    nodes.sort((a, b) => {\n        const position = a.compareDocumentPosition(b);\n        /* eslint-disable no-bitwise */\n        if (position & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n            return -1;\n        }\n        else if (position & Node.DOCUMENT_POSITION_CONTAINS) {\n            return 1;\n        }\n        else if (position & Node.DOCUMENT_POSITION_FOLLOWING) {\n            return 1;\n        }\n        else if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n            return -1;\n        }\n        /* eslint-enable no-bitwise */\n        return 0;\n    });\n}\nfunction traverseRemovedShadowDom(removedNode, shadowDomRemovedCallback) {\n    if (isNodeShadowHost(removedNode)) {\n        shadowDomRemovedCallback(removedNode.shadowRoot);\n    }\n    forEachChildNodes(removedNode, (childNode) => traverseRemovedShadowDom(childNode, shadowDomRemovedCallback));\n}\nexport function idsAreAssignedForNodeAndAncestors(node, nodeIds) {\n    let current = node;\n    while (current) {\n        if (nodeIds.get(current) === undefined && !isNodeShadowRoot(current)) {\n            return false;\n        }\n        current = getParentNode(current);\n    }\n    return true;\n}\n//# sourceMappingURL=serializeMutations.js.map","import { isNodeShadowHost, getParentNode, forEachChildNodes, getNodePrivacyLevel, getTextContent, NodePrivacyLevel, } from '@datadog/browser-rum-core';\nimport { serializeChangesInTransaction } from './serializationTransaction';\nimport { serializeNodeAsChange } from './serializeNodeAsChange';\nimport { createChildInsertionCursor } from './insertionCursor';\nimport { getElementInputValue } from './serializationUtils';\nimport { serializeAttribute } from './serializeAttribute';\nexport function serializeMutationsAsChange(timestamp, mutations, emitRecord, emitStats, scope) {\n    serializeChangesInTransaction(2 /* SerializationKind.INCREMENTAL_SNAPSHOT */, emitRecord, emitStats, scope, timestamp, (transaction) => processMutations(mutations, transaction));\n}\nfunction processMutations(mutations, transaction) {\n    const addedNodes = new Set();\n    const attributeMutations = new Map();\n    const characterDataMutations = new Map();\n    const removedNodes = new Set();\n    // Collect the changes made by this sequence of mutations. It's important to think of\n    // the mutations as telling us which parts of the tree are dirty, but not necessarily as\n    // specifying exactly which changes have occurred; trying to be too clever will result\n    // in incorrect behavior. For example, if we see a sequence of mutations where a node is\n    // removed and then added back in the same position, one might be tempted to \"cancel\n    // out\" these two changes and ignore both mutations, but that could cause us to miss\n    // changes to the node that occurred while it was detached.\n    for (const mutation of mutations) {\n        switch (mutation.type) {\n            case 'attributes': {\n                const node = mutation.target;\n                let attributes = attributeMutations.get(node);\n                if (!attributes) {\n                    attributes = new Map();\n                    attributeMutations.set(node, attributes);\n                }\n                const attributeName = mutation.attributeName;\n                if (!attributes.has(attributeName)) {\n                    attributes.set(attributeName, mutation.oldValue);\n                }\n                break;\n            }\n            case 'characterData':\n                if (!characterDataMutations.has(mutation.target)) {\n                    characterDataMutations.set(mutation.target, mutation.oldValue);\n                }\n                break;\n            case 'childList':\n                for (let index = 0; index < mutation.addedNodes.length; index++) {\n                    addedNodes.add(mutation.addedNodes[index]);\n                }\n                for (let index = 0; index < mutation.removedNodes.length; index++) {\n                    removedNodes.add(mutation.removedNodes[index]);\n                }\n                break;\n        }\n    }\n    // Before we process any mutations, snapshot the id that the next newly-added node will\n    // receive. We know that any node with an id greater than or equal to this one is new\n    // and will have been serialized in its entirety in processAddedNodes(), so we can skip\n    // processing more fine-grained mutations for these nodes.\n    const firstNewNodeId = transaction.scope.nodeIds.nextId;\n    // Because we process incremental mutations synchronously, we know that privacy levels\n    // cannot change during the process, so we use a single, shared privacy level cache.\n    const nodePrivacyLevelCache = new Map();\n    processRemovedNodes(removedNodes, transaction);\n    processAddedNodes(addedNodes, nodePrivacyLevelCache, transaction);\n    processCharacterDataMutations(characterDataMutations, firstNewNodeId, nodePrivacyLevelCache, transaction);\n    processAttributeMutations(attributeMutations, firstNewNodeId, nodePrivacyLevelCache, transaction);\n}\nfunction processRemovedNodes(nodes, transaction) {\n    const nodeIds = transaction.scope.nodeIds;\n    for (const node of nodes) {\n        const nodeId = nodeIds.get(node);\n        if (nodeId === undefined) {\n            continue; // This node wasn't serialized.\n        }\n        forNodeAndDescendants(node, (node) => {\n            if (isNodeShadowHost(node)) {\n                transaction.scope.shadowRootsController.removeShadowRoot(node.shadowRoot);\n            }\n            // Forget this node's identity. If it's added to the DOM again in another mutation,\n            // we'll treat it as a new node. This reduces the number of edge cases that we need\n            // to deal with; for example, changes in privacy level as a result of the different\n            // ancestor chain in the new position are handled without any special effort on our\n            // part.\n            nodeIds.delete(node);\n        });\n        transaction.removeNode(nodeId);\n    }\n}\nfunction processAddedNodes(nodes, nodePrivacyLevelCache, transaction) {\n    const nodeIds = transaction.scope.nodeIds;\n    for (const node of nodes) {\n        if (!node.isConnected) {\n            continue; // This node is not in the DOM.\n        }\n        const existingNodeId = nodeIds.get(node);\n        if (existingNodeId !== undefined) {\n            continue; // This node has already been serialized.\n        }\n        const parentNode = getParentNode(node);\n        if (!parentNode) {\n            continue; // This node has no parent.\n        }\n        const parentId = nodeIds.get(parentNode);\n        if (parentId === undefined) {\n            // This node's parent hasn't been serialized (e.g. because it has privacy level\n            // HIDDEN), so we shouldn't serialize this node either.\n            continue;\n        }\n        const parentNodePrivacyLevel = getNodePrivacyLevel(parentNode, transaction.scope.configuration.defaultPrivacyLevel, nodePrivacyLevelCache);\n        const nextSiblingId = getNextSiblingId(node, nodeIds);\n        serializeNodeAsChange(createChildInsertionCursor(parentId, nextSiblingId, nodeIds), node, parentNodePrivacyLevel, transaction);\n    }\n}\nfunction processCharacterDataMutations(mutations, firstNewNodeId, nodePrivacyLevelCache, transaction) {\n    var _a;\n    const nodeIds = transaction.scope.nodeIds;\n    for (const [node, oldValue] of mutations) {\n        if (node.textContent === oldValue) {\n            continue; // No change since the last snapshot.\n        }\n        if (!node.isConnected) {\n            continue; // This node is not in the DOM.\n        }\n        const nodeId = nodeIds.get(node);\n        if (nodeId === undefined) {\n            continue; // This node was never serialized.\n        }\n        if (nodeId >= firstNewNodeId) {\n            // This node was just serialized, so we've already got an up-to-date copy of its\n            // text content.\n            continue;\n        }\n        const parentNode = getParentNode(node);\n        if (!parentNode) {\n            continue; // This node has no parent.\n        }\n        const parentNodePrivacyLevel = getNodePrivacyLevel(parentNode, transaction.scope.configuration.defaultPrivacyLevel, nodePrivacyLevelCache);\n        if (parentNodePrivacyLevel === NodePrivacyLevel.HIDDEN || parentNodePrivacyLevel === NodePrivacyLevel.IGNORE) {\n            continue; // Mutations to this node should be ignored.\n        }\n        const content = (_a = getTextContent(node, parentNodePrivacyLevel)) !== null && _a !== void 0 ? _a : '';\n        transaction.setText(nodeId, content);\n    }\n}\nfunction processAttributeMutations(mutations, firstNewNodeId, nodePrivacyLevelCache, transaction) {\n    const nodeIds = transaction.scope.nodeIds;\n    for (const [node, attributeNames] of mutations) {\n        if (!node.isConnected) {\n            continue; // This node is not in the DOM.\n        }\n        const nodeId = nodeIds.get(node);\n        if (nodeId === undefined) {\n            continue; // This node was never serialized.\n        }\n        if (nodeId >= firstNewNodeId) {\n            // This node was just serialized, so we've already got an up-to-date copy of its\n            // attributes.\n            continue;\n        }\n        const privacyLevel = getNodePrivacyLevel(node, transaction.scope.configuration.defaultPrivacyLevel, nodePrivacyLevelCache);\n        if (privacyLevel === NodePrivacyLevel.HIDDEN || privacyLevel === NodePrivacyLevel.IGNORE) {\n            continue; // Mutations to this node should be ignored.\n        }\n        const change = [nodeId];\n        for (const [attributeName, oldValue] of attributeNames) {\n            if (node.getAttribute(attributeName) === oldValue) {\n                continue; // No change since the last snapshot.\n            }\n            if (attributeName === 'value') {\n                const attributeValue = getElementInputValue(node, privacyLevel);\n                if (attributeValue !== undefined) {\n                    change.push([attributeName, attributeValue]);\n                }\n                continue;\n            }\n            const attributeValue = serializeAttribute(node, privacyLevel, attributeName, transaction.scope.configuration);\n            if (attributeValue === null) {\n                change.push([attributeName]);\n            }\n            else {\n                change.push([attributeName, attributeValue]);\n            }\n        }\n        if (change.length > 1) {\n            transaction.setAttributes(change);\n        }\n    }\n}\nfunction getNextSiblingId(node, nodeIds) {\n    let nextSibling = node.nextSibling;\n    while (nextSibling) {\n        const id = nodeIds.get(nextSibling);\n        if (id !== undefined) {\n            return id;\n        }\n        nextSibling = nextSibling.nextSibling;\n    }\n    return undefined;\n}\nfunction forNodeAndDescendants(node, action) {\n    action(node);\n    forEachChildNodes(node, (childNode) => forNodeAndDescendants(childNode, action));\n}\n//# sourceMappingURL=serializeMutationsAsChange.js.map","/**\n * Browsers have not standardized various dimension properties. Mobile devices typically report\n * dimensions in reference to the visual viewport, while desktop uses the layout viewport. For example,\n * Mobile Chrome will change innerWidth when a pinch zoom takes place, while Chrome Desktop (mac) will not.\n *\n * With the new Viewport API, we now calculate and normalize dimension properties to the layout viewport.\n * If the VisualViewport API is not supported by a browser, it isn't reasonably possible to detect or normalize\n * which viewport is being measured. Therefore these exported functions will fallback to assuming that the layout\n * viewport is being measured by the browser\n */\n// Scrollbar widths vary across properties on different devices and browsers\nconst TOLERANCE = 25;\n/**\n * Use the Visual Viewport API's properties to measure scrollX/Y in reference to the layout viewport\n * in order to determine if window.scrollX/Y is measuring the layout or visual viewport.\n * This finding corresponds to which viewport mouseEvent.clientX/Y and window.innerWidth/Height measures.\n */\nfunction isVisualViewportFactoredIn(visualViewport) {\n    return (Math.abs(visualViewport.pageTop - visualViewport.offsetTop - window.scrollY) > TOLERANCE ||\n        Math.abs(visualViewport.pageLeft - visualViewport.offsetLeft - window.scrollX) > TOLERANCE);\n}\nexport const convertMouseEventToLayoutCoordinates = (clientX, clientY) => {\n    const visualViewport = window.visualViewport;\n    const normalized = {\n        layoutViewportX: clientX,\n        layoutViewportY: clientY,\n        visualViewportX: clientX,\n        visualViewportY: clientY,\n    };\n    if (!visualViewport) {\n        // On old browsers, we cannot normalize, so fallback to clientX/Y\n        return normalized;\n    }\n    else if (isVisualViewportFactoredIn(visualViewport)) {\n        // Typically Mobile Devices\n        normalized.layoutViewportX = Math.round(clientX + visualViewport.offsetLeft);\n        normalized.layoutViewportY = Math.round(clientY + visualViewport.offsetTop);\n    }\n    else {\n        // Typically Desktop Devices\n        normalized.visualViewportX = Math.round(clientX - visualViewport.offsetLeft);\n        normalized.visualViewportY = Math.round(clientY - visualViewport.offsetTop);\n    }\n    return normalized;\n};\nexport const getVisualViewport = (visualViewport) => ({\n    scale: visualViewport.scale,\n    offsetLeft: visualViewport.offsetLeft,\n    offsetTop: visualViewport.offsetTop,\n    pageLeft: visualViewport.pageLeft,\n    pageTop: visualViewport.pageTop,\n    height: visualViewport.height,\n    width: visualViewport.width,\n});\n//# sourceMappingURL=viewports.js.map","import { getViewportDimension } from '@datadog/browser-rum-core';\nimport { timeStampNow } from '@datadog/browser-core';\nimport { RecordType } from '../../types';\nimport { isFullSnapshotChangeRecordsEnabled, serializeFullSnapshotAsChange, serializeFullSnapshot, } from './serialization';\nimport { getVisualViewport } from './viewports';\nexport function startFullSnapshots(lifeCycle, emitRecord, emitStats, flushMutations, scope, serialize = defaultSerializeFullSnapshotCallback()) {\n    takeFullSnapshot(timeStampNow(), 0 /* SerializationKind.INITIAL_FULL_SNAPSHOT */, emitRecord, emitStats, scope, serialize);\n    const { unsubscribe } = lifeCycle.subscribe(2 /* LifeCycleEventType.VIEW_CREATED */, (view) => {\n        flushMutations();\n        takeFullSnapshot(view.startClocks.timeStamp, 1 /* SerializationKind.SUBSEQUENT_FULL_SNAPSHOT */, emitRecord, emitStats, scope, serialize);\n    });\n    return {\n        stop: unsubscribe,\n    };\n}\nexport function takeFullSnapshot(timestamp, kind, emitRecord, emitStats, scope, serialize = defaultSerializeFullSnapshotCallback()) {\n    const { width, height } = getViewportDimension();\n    emitRecord({\n        data: {\n            height,\n            href: window.location.href,\n            width,\n        },\n        type: RecordType.Meta,\n        timestamp,\n    });\n    emitRecord({\n        data: {\n            has_focus: document.hasFocus(),\n        },\n        type: RecordType.Focus,\n        timestamp,\n    });\n    serialize(timestamp, kind, document, emitRecord, emitStats, scope);\n    if (window.visualViewport) {\n        emitRecord({\n            data: getVisualViewport(window.visualViewport),\n            type: RecordType.VisualViewport,\n            timestamp,\n        });\n    }\n}\nfunction defaultSerializeFullSnapshotCallback() {\n    return isFullSnapshotChangeRecordsEnabled() ? serializeFullSnapshotAsChange : serializeFullSnapshot;\n}\n//# sourceMappingURL=startFullSnapshots.js.map","import { isNodeShadowHost } from '@datadog/browser-rum-core';\nexport function isTouchEvent(event) {\n    return Boolean(event.changedTouches);\n}\nexport function getEventTarget(event) {\n    if (event.composed === true && isNodeShadowHost(event.target)) {\n        return event.composedPath()[0];\n    }\n    return event.target;\n}\n//# sourceMappingURL=eventsUtils.js.map","import { addEventListeners, throttle } from '@datadog/browser-core';\nimport { IncrementalSource } from '../../../types';\nimport { getEventTarget, isTouchEvent } from '../eventsUtils';\nimport { convertMouseEventToLayoutCoordinates } from '../viewports';\nimport { assembleIncrementalSnapshot } from '../assembly';\nconst MOUSE_MOVE_OBSERVER_THRESHOLD = 50;\nexport function trackMove(emitRecord, scope) {\n    const { throttled: updatePosition, cancel: cancelThrottle } = throttle((event) => {\n        const target = getEventTarget(event);\n        const id = scope.nodeIds.get(target);\n        if (id === undefined) {\n            return;\n        }\n        const coordinates = tryToComputeCoordinates(event);\n        if (!coordinates) {\n            return;\n        }\n        const position = {\n            id,\n            timeOffset: 0,\n            x: coordinates.x,\n            y: coordinates.y,\n        };\n        emitRecord(assembleIncrementalSnapshot(isTouchEvent(event) ? IncrementalSource.TouchMove : IncrementalSource.MouseMove, { positions: [position] }));\n    }, MOUSE_MOVE_OBSERVER_THRESHOLD, {\n        trailing: false,\n    });\n    const { stop: removeListener } = addEventListeners(scope.configuration, document, [\"mousemove\" /* DOM_EVENT.MOUSE_MOVE */, \"touchmove\" /* DOM_EVENT.TOUCH_MOVE */], updatePosition, {\n        capture: true,\n        passive: true,\n    });\n    return {\n        stop: () => {\n            removeListener();\n            cancelThrottle();\n        },\n    };\n}\nexport function tryToComputeCoordinates(event) {\n    let { clientX: x, clientY: y } = isTouchEvent(event) ? event.changedTouches[0] : event;\n    if (window.visualViewport) {\n        const { visualViewportX, visualViewportY } = convertMouseEventToLayoutCoordinates(x, y);\n        x = visualViewportX;\n        y = visualViewportY;\n    }\n    if (!Number.isFinite(x) || !Number.isFinite(y)) {\n        return undefined;\n    }\n    return { x, y };\n}\n//# sourceMappingURL=trackMove.js.map","import { addEventListeners } from '@datadog/browser-core';\nimport { getNodePrivacyLevel, NodePrivacyLevel } from '@datadog/browser-rum-core';\nimport { IncrementalSource, MouseInteractionType } from '../../../types';\nimport { assembleIncrementalSnapshot } from '../assembly';\nimport { getEventTarget } from '../eventsUtils';\nimport { tryToComputeCoordinates } from './trackMove';\nconst eventTypeToMouseInteraction = {\n    // Listen for pointerup DOM events instead of mouseup for MouseInteraction/MouseUp records. This\n    // allows to reference such records from Frustration records.\n    //\n    // In the context of supporting Mobile Session Replay, we introduced `PointerInteraction` records\n    // used by the Mobile SDKs in place of `MouseInteraction`. In the future, we should replace\n    // `MouseInteraction` by `PointerInteraction` in the Browser SDK so we have an uniform way to\n    // convey such interaction. This would cleanly solve the issue since we would have\n    // `PointerInteraction/Up` records that we could reference from `Frustration` records.\n    [\"pointerup\" /* DOM_EVENT.POINTER_UP */]: MouseInteractionType.MouseUp,\n    [\"mousedown\" /* DOM_EVENT.MOUSE_DOWN */]: MouseInteractionType.MouseDown,\n    [\"click\" /* DOM_EVENT.CLICK */]: MouseInteractionType.Click,\n    [\"contextmenu\" /* DOM_EVENT.CONTEXT_MENU */]: MouseInteractionType.ContextMenu,\n    [\"dblclick\" /* DOM_EVENT.DBL_CLICK */]: MouseInteractionType.DblClick,\n    [\"focus\" /* DOM_EVENT.FOCUS */]: MouseInteractionType.Focus,\n    [\"blur\" /* DOM_EVENT.BLUR */]: MouseInteractionType.Blur,\n    [\"touchstart\" /* DOM_EVENT.TOUCH_START */]: MouseInteractionType.TouchStart,\n    [\"touchend\" /* DOM_EVENT.TOUCH_END */]: MouseInteractionType.TouchEnd,\n};\nexport function trackMouseInteraction(emitRecord, scope) {\n    const handler = (event) => {\n        const target = getEventTarget(event);\n        const id = scope.nodeIds.get(target);\n        if (id === undefined ||\n            getNodePrivacyLevel(target, scope.configuration.defaultPrivacyLevel) === NodePrivacyLevel.HIDDEN) {\n            return;\n        }\n        const type = eventTypeToMouseInteraction[event.type];\n        let interaction;\n        if (type !== MouseInteractionType.Blur && type !== MouseInteractionType.Focus) {\n            const coordinates = tryToComputeCoordinates(event);\n            if (!coordinates) {\n                return;\n            }\n            interaction = { id, type, x: coordinates.x, y: coordinates.y };\n        }\n        else {\n            interaction = { id, type };\n        }\n        emitRecord({\n            id: scope.eventIds.getOrInsert(event),\n            ...assembleIncrementalSnapshot(IncrementalSource.MouseInteraction, interaction),\n        });\n    };\n    return addEventListeners(scope.configuration, document, Object.keys(eventTypeToMouseInteraction), handler, {\n        capture: true,\n        passive: true,\n    });\n}\n//# sourceMappingURL=trackMouseInteraction.js.map","import { throttle, addEventListener } from '@datadog/browser-core';\nimport { getScrollX, getScrollY, getNodePrivacyLevel, NodePrivacyLevel } from '@datadog/browser-rum-core';\nimport { getEventTarget } from '../eventsUtils';\nimport { IncrementalSource } from '../../../types';\nimport { assembleIncrementalSnapshot } from '../assembly';\nconst SCROLL_OBSERVER_THRESHOLD = 100;\nexport function trackScroll(target, emitRecord, scope) {\n    const { throttled: updatePosition, cancel: cancelThrottle } = throttle((event) => {\n        const target = getEventTarget(event);\n        if (!target) {\n            return;\n        }\n        const id = scope.nodeIds.get(target);\n        if (id === undefined ||\n            getNodePrivacyLevel(target, scope.configuration.defaultPrivacyLevel) === NodePrivacyLevel.HIDDEN) {\n            return;\n        }\n        const scrollPositions = target === document\n            ? {\n                scrollTop: getScrollY(),\n                scrollLeft: getScrollX(),\n            }\n            : {\n                scrollTop: Math.round(target.scrollTop),\n                scrollLeft: Math.round(target.scrollLeft),\n            };\n        scope.elementsScrollPositions.set(target, scrollPositions);\n        emitRecord(assembleIncrementalSnapshot(IncrementalSource.Scroll, {\n            id,\n            x: scrollPositions.scrollLeft,\n            y: scrollPositions.scrollTop,\n        }));\n    }, SCROLL_OBSERVER_THRESHOLD);\n    const { stop: removeListener } = addEventListener(scope.configuration, target, \"scroll\" /* DOM_EVENT.SCROLL */, updatePosition, {\n        capture: true,\n        passive: true,\n    });\n    return {\n        stop: () => {\n            removeListener();\n            cancelThrottle();\n        },\n    };\n}\n//# sourceMappingURL=trackScroll.js.map","import { throttle, addEventListeners, timeStampNow, noop } from '@datadog/browser-core';\nimport { initViewportObservable } from '@datadog/browser-rum-core';\nimport { IncrementalSource, RecordType } from '../../../types';\nimport { getVisualViewport } from '../viewports';\nimport { assembleIncrementalSnapshot } from '../assembly';\nconst VISUAL_VIEWPORT_OBSERVER_THRESHOLD = 200;\nexport function trackViewportResize(emitRecord, scope) {\n    const viewportResizeSubscription = initViewportObservable(scope.configuration).subscribe((data) => {\n        emitRecord(assembleIncrementalSnapshot(IncrementalSource.ViewportResize, data));\n    });\n    return {\n        stop: () => {\n            viewportResizeSubscription.unsubscribe();\n        },\n    };\n}\nexport function trackVisualViewportResize(emitRecord, scope) {\n    const visualViewport = window.visualViewport;\n    if (!visualViewport) {\n        return { stop: noop };\n    }\n    const { throttled: updateDimension, cancel: cancelThrottle } = throttle(() => {\n        emitRecord({\n            data: getVisualViewport(visualViewport),\n            type: RecordType.VisualViewport,\n            timestamp: timeStampNow(),\n        });\n    }, VISUAL_VIEWPORT_OBSERVER_THRESHOLD, {\n        trailing: false,\n    });\n    const { stop: removeListener } = addEventListeners(scope.configuration, visualViewport, [\"resize\" /* DOM_EVENT.RESIZE */, \"scroll\" /* DOM_EVENT.SCROLL */], updateDimension, {\n        capture: true,\n        passive: true,\n    });\n    return {\n        stop: () => {\n            removeListener();\n            cancelThrottle();\n        },\n    };\n}\n//# sourceMappingURL=trackViewportResize.js.map","import { addEventListeners } from '@datadog/browser-core';\nimport { NodePrivacyLevel, getNodePrivacyLevel } from '@datadog/browser-rum-core';\nimport { IncrementalSource, MediaInteractionType } from '../../../types';\nimport { getEventTarget } from '../eventsUtils';\nimport { assembleIncrementalSnapshot } from '../assembly';\nexport function trackMediaInteraction(emitRecord, scope) {\n    return addEventListeners(scope.configuration, document, [\"play\" /* DOM_EVENT.PLAY */, \"pause\" /* DOM_EVENT.PAUSE */], (event) => {\n        const target = getEventTarget(event);\n        if (!target) {\n            return;\n        }\n        const id = scope.nodeIds.get(target);\n        if (id === undefined ||\n            getNodePrivacyLevel(target, scope.configuration.defaultPrivacyLevel) === NodePrivacyLevel.HIDDEN) {\n            return;\n        }\n        emitRecord(assembleIncrementalSnapshot(IncrementalSource.MediaInteraction, {\n            id,\n            type: event.type === \"play\" /* DOM_EVENT.PLAY */ ? MediaInteractionType.Play : MediaInteractionType.Pause,\n        }));\n    }, {\n        capture: true,\n        passive: true,\n    });\n}\n//# sourceMappingURL=trackMediaInteraction.js.map","import { instrumentMethod } from '@datadog/browser-core';\nimport { IncrementalSource } from '../../../types';\nimport { assembleIncrementalSnapshot } from '../assembly';\nexport function trackStyleSheet(emitRecord, scope) {\n    function checkStyleSheetAndCallback(styleSheet, callback) {\n        if (!styleSheet || !styleSheet.ownerNode) {\n            return;\n        }\n        const id = scope.nodeIds.get(styleSheet.ownerNode);\n        if (id === undefined) {\n            return;\n        }\n        callback(id);\n    }\n    const instrumentationStoppers = [\n        instrumentMethod(CSSStyleSheet.prototype, 'insertRule', ({ target: styleSheet, parameters: [rule, index] }) => {\n            checkStyleSheetAndCallback(styleSheet, (id) => emitRecord(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule, {\n                id,\n                adds: [{ rule, index }],\n            })));\n        }),\n        instrumentMethod(CSSStyleSheet.prototype, 'deleteRule', ({ target: styleSheet, parameters: [index] }) => {\n            checkStyleSheetAndCallback(styleSheet, (id) => emitRecord(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule, {\n                id,\n                removes: [{ index }],\n            })));\n        }),\n    ];\n    if (typeof CSSGroupingRule !== 'undefined') {\n        instrumentGroupingCSSRuleClass(CSSGroupingRule);\n    }\n    else {\n        instrumentGroupingCSSRuleClass(CSSMediaRule);\n        instrumentGroupingCSSRuleClass(CSSSupportsRule);\n    }\n    function instrumentGroupingCSSRuleClass(cls) {\n        instrumentationStoppers.push(instrumentMethod(cls.prototype, 'insertRule', ({ target: styleSheet, parameters: [rule, index] }) => {\n            checkStyleSheetAndCallback(styleSheet.parentStyleSheet, (id) => {\n                const path = getPathToNestedCSSRule(styleSheet);\n                if (path) {\n                    path.push(index || 0);\n                    emitRecord(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule, {\n                        id,\n                        adds: [{ rule, index: path }],\n                    }));\n                }\n            });\n        }), instrumentMethod(cls.prototype, 'deleteRule', ({ target: styleSheet, parameters: [index] }) => {\n            checkStyleSheetAndCallback(styleSheet.parentStyleSheet, (id) => {\n                const path = getPathToNestedCSSRule(styleSheet);\n                if (path) {\n                    path.push(index);\n                    emitRecord(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule, {\n                        id,\n                        removes: [{ index: path }],\n                    }));\n                }\n            });\n        }));\n    }\n    return {\n        stop: () => {\n            instrumentationStoppers.forEach((stopper) => stopper.stop());\n        },\n    };\n}\nexport function getPathToNestedCSSRule(rule) {\n    const path = [];\n    let currentRule = rule;\n    while (currentRule.parentRule) {\n        const rules = Array.from(currentRule.parentRule.cssRules);\n        const index = rules.indexOf(currentRule);\n        path.unshift(index);\n        currentRule = currentRule.parentRule;\n    }\n    // A rule may not be attached to a stylesheet\n    if (!currentRule.parentStyleSheet) {\n        return;\n    }\n    const rules = Array.from(currentRule.parentStyleSheet.cssRules);\n    const index = rules.indexOf(currentRule);\n    path.unshift(index);\n    return path;\n}\n//# sourceMappingURL=trackStyleSheet.js.map","import { addEventListeners, timeStampNow } from '@datadog/browser-core';\nimport { RecordType } from '../../../types';\nexport function trackFocus(emitRecord, scope) {\n    return addEventListeners(scope.configuration, window, [\"focus\" /* DOM_EVENT.FOCUS */, \"blur\" /* DOM_EVENT.BLUR */], () => {\n        emitRecord({\n            data: { has_focus: document.hasFocus() },\n            type: RecordType.Focus,\n            timestamp: timeStampNow(),\n        });\n    });\n}\n//# sourceMappingURL=trackFocus.js.map","import { timeStampNow } from '@datadog/browser-core';\nimport { RecordType } from '../../../types';\nexport function trackViewEnd(lifeCycle, emitRecord, flushMutations) {\n    const viewEndSubscription = lifeCycle.subscribe(5 /* LifeCycleEventType.VIEW_ENDED */, () => {\n        flushMutations();\n        emitRecord({\n            timestamp: timeStampNow(),\n            type: RecordType.ViewEnd,\n        });\n    });\n    return {\n        stop: () => {\n            viewEndSubscription.unsubscribe();\n        },\n    };\n}\n//# sourceMappingURL=trackViewEnd.js.map","import { instrumentSetter, addEventListeners, noop } from '@datadog/browser-core';\nimport { NodePrivacyLevel, getNodePrivacyLevel, shouldMaskNode } from '@datadog/browser-rum-core';\nimport { IncrementalSource } from '../../../types';\nimport { getEventTarget } from '../eventsUtils';\nimport { getElementInputValue } from '../serialization';\nimport { assembleIncrementalSnapshot } from '../assembly';\nexport function trackInput(target, emitRecord, scope) {\n    const defaultPrivacyLevel = scope.configuration.defaultPrivacyLevel;\n    const lastInputStateMap = new WeakMap();\n    const isShadowRoot = target !== document;\n    const { stop: stopEventListeners } = addEventListeners(scope.configuration, target, \n    // The 'input' event bubbles across shadow roots, so we don't have to listen for it on shadow\n    // roots since it will be handled by the event listener that we did add to the document. Only\n    // the 'change' event is blocked and needs to be handled on shadow roots.\n    isShadowRoot ? [\"change\" /* DOM_EVENT.CHANGE */] : [\"input\" /* DOM_EVENT.INPUT */, \"change\" /* DOM_EVENT.CHANGE */], (event) => {\n        const target = getEventTarget(event);\n        if (target instanceof HTMLInputElement ||\n            target instanceof HTMLTextAreaElement ||\n            target instanceof HTMLSelectElement) {\n            onElementChange(target);\n        }\n    }, {\n        capture: true,\n        passive: true,\n    });\n    let stopPropertySetterInstrumentation;\n    if (!isShadowRoot) {\n        const instrumentationStoppers = [\n            instrumentSetter(HTMLInputElement.prototype, 'value', onElementChange),\n            instrumentSetter(HTMLInputElement.prototype, 'checked', onElementChange),\n            instrumentSetter(HTMLSelectElement.prototype, 'value', onElementChange),\n            instrumentSetter(HTMLTextAreaElement.prototype, 'value', onElementChange),\n            instrumentSetter(HTMLSelectElement.prototype, 'selectedIndex', onElementChange),\n        ];\n        stopPropertySetterInstrumentation = () => {\n            instrumentationStoppers.forEach((stopper) => stopper.stop());\n        };\n    }\n    else {\n        stopPropertySetterInstrumentation = noop;\n    }\n    return {\n        stop: () => {\n            stopPropertySetterInstrumentation();\n            stopEventListeners();\n        },\n    };\n    function onElementChange(target) {\n        const nodePrivacyLevel = getNodePrivacyLevel(target, defaultPrivacyLevel);\n        if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {\n            return;\n        }\n        const type = target.type;\n        let inputState;\n        if (type === 'radio' || type === 'checkbox') {\n            if (shouldMaskNode(target, nodePrivacyLevel)) {\n                return;\n            }\n            inputState = { isChecked: target.checked };\n        }\n        else {\n            const value = getElementInputValue(target, nodePrivacyLevel);\n            if (value === undefined) {\n                return;\n            }\n            inputState = { text: value };\n        }\n        // Can be multiple changes on the same node within the same batched mutation observation.\n        createRecordIfStateChanged(target, inputState);\n        // If a radio was checked, other radios with the same name attribute will be unchecked.\n        const name = target.name;\n        if (type === 'radio' && name && target.checked) {\n            document.querySelectorAll(`input[type=\"radio\"][name=\"${CSS.escape(name)}\"]`).forEach((el) => {\n                if (el !== target) {\n                    // TODO: Consider the privacy implications for various differing input privacy levels\n                    createRecordIfStateChanged(el, { isChecked: false });\n                }\n            });\n        }\n    }\n    /**\n     * There can be multiple changes on the same node within the same batched mutation observation.\n     */\n    function createRecordIfStateChanged(target, inputState) {\n        const id = scope.nodeIds.get(target);\n        if (id === undefined) {\n            return;\n        }\n        const lastInputState = lastInputStateMap.get(target);\n        if (!lastInputState ||\n            lastInputState.text !== inputState.text ||\n            lastInputState.isChecked !== inputState.isChecked) {\n            lastInputStateMap.set(target, inputState);\n            emitRecord(assembleIncrementalSnapshot(IncrementalSource.Input, {\n                id,\n                ...inputState,\n            }));\n        }\n    }\n}\n//# sourceMappingURL=trackInput.js.map","import { monitor, noop, timeStampNow } from '@datadog/browser-core';\nimport { getMutationObserverConstructor } from '@datadog/browser-rum-core';\nimport { createMutationBatch } from '../mutationBatch';\nimport { isIncrementalSnapshotChangeRecordsEnabled, serializeMutations, serializeMutationsAsChange, } from '../serialization';\n/**\n * Buffers and aggregate mutations generated by a MutationObserver into MutationPayload\n */\nexport function trackMutation(target, emitRecord, emitStats, scope, serialize = defaultSerializeMutationsCallback()) {\n    const MutationObserver = getMutationObserverConstructor();\n    if (!MutationObserver) {\n        return { stop: noop, flush: noop };\n    }\n    const mutationBatch = createMutationBatch((mutations) => {\n        serialize(timeStampNow(), mutations.concat(observer.takeRecords()), emitRecord, emitStats, scope);\n    });\n    const observer = new MutationObserver(monitor(mutationBatch.addMutations));\n    observer.observe(target, {\n        attributeOldValue: true,\n        attributes: true,\n        characterData: true,\n        characterDataOldValue: true,\n        childList: true,\n        subtree: true,\n    });\n    return {\n        stop: () => {\n            observer.disconnect();\n            mutationBatch.stop();\n        },\n        flush: () => {\n            mutationBatch.flush();\n        },\n    };\n}\nfunction defaultSerializeMutationsCallback() {\n    return isIncrementalSnapshotChangeRecordsEnabled() ? serializeMutationsAsChange : serializeMutations;\n}\n//# sourceMappingURL=trackMutation.js.map","import { noop, throttle, requestIdleCallback } from '@datadog/browser-core';\n/**\n * Maximum duration to wait before processing mutations. If the browser is idle, mutations will be\n * processed more quickly. If the browser is busy executing small tasks (ex: rendering frames), the\n * mutations will wait MUTATION_PROCESS_MAX_DELAY milliseconds before being processed. If the\n * browser is busy executing a longer task, mutations will be processed after this task.\n */\nconst MUTATION_PROCESS_MAX_DELAY = 100;\n/**\n * Minimum duration to wait before processing mutations. This is used to batch mutations together\n * and be able to deduplicate them to save processing time and bandwidth.\n * 16ms is the duration of a frame at 60fps that ensure fluid UI.\n */\nexport const MUTATION_PROCESS_MIN_DELAY = 16;\nexport function createMutationBatch(processMutationBatch) {\n    let cancelScheduledFlush = noop;\n    let pendingMutations = [];\n    function flush() {\n        cancelScheduledFlush();\n        processMutationBatch(pendingMutations);\n        pendingMutations = [];\n    }\n    const { throttled: throttledFlush, cancel: cancelThrottle } = throttle(flush, MUTATION_PROCESS_MIN_DELAY, {\n        leading: false,\n    });\n    return {\n        addMutations: (mutations) => {\n            if (pendingMutations.length === 0) {\n                cancelScheduledFlush = requestIdleCallback(throttledFlush, { timeout: MUTATION_PROCESS_MAX_DELAY });\n            }\n            pendingMutations.push(...mutations);\n        },\n        flush,\n        stop: () => {\n            cancelScheduledFlush();\n            cancelThrottle();\n        },\n    };\n}\n//# sourceMappingURL=mutationBatch.js.map","export function createEventIds() {\n    return createWeakIdMap(1 /* EventIdConstants.FIRST_ID */);\n}\nexport function createNodeIds() {\n    return createWeakIdMap(0 /* NodeIdConstants.FIRST_ID */);\n}\nexport function createStringIds() {\n    return createIdMap(0 /* StringIdConstants.FIRST_ID */);\n}\nexport function createStyleSheetIds() {\n    return createWeakIdMap(0 /* StyleSheetIdConstants.FIRST_ID */);\n}\nfunction createIdMap(firstId) {\n    return createItemIds(() => new Map(), firstId);\n}\nfunction createWeakIdMap(firstId) {\n    return createItemIds(() => new WeakMap(), firstId);\n}\nfunction createItemIds(createMap, firstId) {\n    let map = createMap();\n    let nextId = firstId;\n    const get = (object) => map.get(object);\n    return {\n        clear() {\n            if (nextId === firstId) {\n                return;\n            }\n            map = createMap();\n            nextId = firstId;\n        },\n        delete(object) {\n            map.delete(object);\n        },\n        get,\n        getOrInsert(object) {\n            // Try to reuse any existing id.\n            let id = get(object);\n            if (id === undefined) {\n                id = nextId++;\n                map.set(object, id);\n            }\n            return id;\n        },\n        get nextId() {\n            return nextId;\n        },\n        get size() {\n            return nextId - firstId;\n        },\n    };\n}\n//# sourceMappingURL=itemIds.js.map","import { Observable } from '@datadog/browser-core';\nimport { createEventIds, createNodeIds, createStringIds, createStyleSheetIds } from './itemIds';\nexport function createRecordingScope(configuration, elementsScrollPositions, shadowRootsController) {\n    const eventIds = createEventIds();\n    const nodeIds = createNodeIds();\n    const stringIds = createStringIds();\n    const styleSheetIds = createStyleSheetIds();\n    const scope = {\n        resetIds() {\n            scope.eventIds.clear();\n            scope.nodeIds.clear();\n            scope.stringIds.clear();\n            scope.styleSheetIds.clear();\n        },\n        configuration,\n        elementsScrollPositions,\n        eventIds,\n        nodeIds,\n        serializeObservable: new Observable(),\n        shadowRootsController,\n        stringIds,\n        styleSheetIds,\n    };\n    return scope;\n}\n//# sourceMappingURL=recordingScope.js.map","import { sendToExtension } from '@datadog/browser-core';\nimport * as replayStats from '../replayStats';\nimport { trackFocus, trackInput, trackMediaInteraction, trackMouseInteraction, trackMove, trackMutation, trackScroll, trackStyleSheet, trackViewEnd, trackViewportResize, trackVisualViewportResize, } from './trackers';\nimport { createElementsScrollPositions } from './elementsScrollPositions';\nimport { initShadowRootsController } from './shadowRootsController';\nimport { startFullSnapshots } from './startFullSnapshots';\nimport { createRecordingScope } from './recordingScope';\nexport function record(options) {\n    const { emitRecord, emitStats, configuration, lifeCycle } = options;\n    // runtime checks for user options\n    if (!emitRecord || !emitStats) {\n        throw new Error('emit functions are required');\n    }\n    const processRecord = (record) => {\n        emitRecord(record);\n        sendToExtension('record', { record });\n        const view = options.viewHistory.findView();\n        replayStats.addRecord(view.id);\n    };\n    const shadowRootsController = initShadowRootsController(processRecord, emitStats);\n    const scope = createRecordingScope(configuration, createElementsScrollPositions(), shadowRootsController);\n    const { stop: stopFullSnapshots } = startFullSnapshots(lifeCycle, processRecord, emitStats, flushMutations, scope);\n    function flushMutations() {\n        shadowRootsController.flush();\n        mutationTracker.flush();\n    }\n    const mutationTracker = trackMutation(document, processRecord, emitStats, scope);\n    const trackers = [\n        mutationTracker,\n        trackMove(processRecord, scope),\n        trackMouseInteraction(processRecord, scope),\n        trackScroll(document, processRecord, scope),\n        trackViewportResize(processRecord, scope),\n        trackInput(document, processRecord, scope),\n        trackMediaInteraction(processRecord, scope),\n        trackStyleSheet(processRecord, scope),\n        trackFocus(processRecord, scope),\n        trackVisualViewportResize(processRecord, scope),\n        trackViewEnd(lifeCycle, processRecord, flushMutations),\n    ];\n    return {\n        stop: () => {\n            shadowRootsController.stop();\n            trackers.forEach((tracker) => tracker.stop());\n            stopFullSnapshots();\n        },\n        flushMutations,\n        shadowRootsController,\n    };\n}\n//# sourceMappingURL=record.js.map","import { trackInput, trackMutation, trackScroll } from './trackers';\nexport const initShadowRootsController = (emitRecord, emitStats) => {\n    const controllerByShadowRoot = new Map();\n    const shadowRootsController = {\n        addShadowRoot: (shadowRoot, scope) => {\n            if (controllerByShadowRoot.has(shadowRoot)) {\n                return;\n            }\n            const mutationTracker = trackMutation(shadowRoot, emitRecord, emitStats, scope);\n            // The change event does not bubble up across the shadow root, we have to listen on the shadow root\n            const inputTracker = trackInput(shadowRoot, emitRecord, scope);\n            // The scroll event does not bubble up across the shadow root, we have to listen on the shadow root\n            const scrollTracker = trackScroll(shadowRoot, emitRecord, scope);\n            controllerByShadowRoot.set(shadowRoot, {\n                flush: () => mutationTracker.flush(),\n                stop: () => {\n                    mutationTracker.stop();\n                    inputTracker.stop();\n                    scrollTracker.stop();\n                },\n            });\n        },\n        removeShadowRoot: (shadowRoot) => {\n            const entry = controllerByShadowRoot.get(shadowRoot);\n            if (!entry) {\n                // unidentified root cause: observed in some cases with shadow DOM added by browser extensions\n                return;\n            }\n            entry.stop();\n            controllerByShadowRoot.delete(shadowRoot);\n        },\n        stop: () => {\n            controllerByShadowRoot.forEach(({ stop }) => stop());\n        },\n        flush: () => {\n            controllerByShadowRoot.forEach(({ flush }) => flush());\n        },\n    };\n    return shadowRootsController;\n};\n//# sourceMappingURL=shadowRootsController.js.map","export function createElementsScrollPositions() {\n    const scrollPositionsByElement = new WeakMap();\n    return {\n        set(element, scrollPositions) {\n            if (element === document && !document.scrollingElement) {\n                // cf https://drafts.csswg.org/cssom-view/#dom-document-scrollingelement,\n                // in some cases scrolling elements can not be defined, we don't support those for now\n                return;\n            }\n            scrollPositionsByElement.set(element === document ? document.scrollingElement : element, scrollPositions);\n        },\n        get(element) {\n            return scrollPositionsByElement.get(element);\n        },\n        has(element) {\n            return scrollPositionsByElement.has(element);\n        },\n    };\n}\n//# sourceMappingURL=elementsScrollPositions.js.map","import { RecordType } from '../../types';\nimport * as replayStats from '../replayStats';\nimport { aggregateSerializationStats, createSerializationStats } from '../record';\nexport function createSegment({ context, creationReason, encoder, }) {\n    let encodedBytesCount = 0;\n    const viewId = context.view.id;\n    const indexInView = replayStats.getSegmentsCount(viewId);\n    const metadata = {\n        start: Infinity,\n        end: -Infinity,\n        creation_reason: creationReason,\n        records_count: 0,\n        has_full_snapshot: false,\n        index_in_view: indexInView,\n        source: 'browser',\n        ...context,\n    };\n    const serializationStats = createSerializationStats();\n    replayStats.addSegment(viewId);\n    function addRecord(record, callback) {\n        metadata.start = Math.min(metadata.start, record.timestamp);\n        metadata.end = Math.max(metadata.end, record.timestamp);\n        metadata.records_count += 1;\n        metadata.has_full_snapshot || (metadata.has_full_snapshot = record.type === RecordType.FullSnapshot || (record.type === RecordType.Change && metadata.index_in_view === 0));\n        const prefix = encoder.isEmpty ? '{\"records\":[' : ',';\n        encoder.write(prefix + JSON.stringify(record), (additionalEncodedBytesCount) => {\n            encodedBytesCount += additionalEncodedBytesCount;\n            callback(encodedBytesCount);\n        });\n    }\n    function addStats(stats) {\n        aggregateSerializationStats(serializationStats, stats);\n    }\n    function flush(callback) {\n        if (encoder.isEmpty) {\n            throw new Error('Empty segment flushed');\n        }\n        encoder.write(`],${JSON.stringify(metadata).slice(1)}\\n`);\n        encoder.finish((encoderResult) => {\n            replayStats.addWroteData(metadata.view.id, encoderResult.rawBytesCount);\n            callback(metadata, serializationStats, encoderResult);\n        });\n    }\n    return { addRecord, addStats, flush };\n}\n//# sourceMappingURL=segment.js.map","import { isPageExitReason, ONE_SECOND, clearTimeout, setTimeout } from '@datadog/browser-core';\nimport { buildReplayPayload } from './buildReplayPayload';\nimport { createSegment } from './segment';\nexport const SEGMENT_DURATION_LIMIT = 5 * ONE_SECOND;\n/**\n * beacon payload max queue size implementation is 64kb\n * ensure that we leave room for logs, rum and potential other users\n */\nexport let SEGMENT_BYTES_LIMIT = 60000;\nexport function startSegmentCollection(lifeCycle, configuration, sessionManager, viewHistory, httpRequest, encoder) {\n    return doStartSegmentCollection(lifeCycle, () => computeSegmentContext(configuration.applicationId, sessionManager, viewHistory), httpRequest, encoder);\n}\nexport function doStartSegmentCollection(lifeCycle, getSegmentContext, httpRequest, encoder) {\n    let state = {\n        status: 0 /* SegmentCollectionStatus.WaitingForInitialRecord */,\n        nextSegmentCreationReason: 'init',\n    };\n    const { unsubscribe: unsubscribeViewCreated } = lifeCycle.subscribe(2 /* LifeCycleEventType.VIEW_CREATED */, () => {\n        flushSegment('view_change');\n    });\n    const { unsubscribe: unsubscribePageMayExit } = lifeCycle.subscribe(11 /* LifeCycleEventType.PAGE_MAY_EXIT */, (pageMayExitEvent) => {\n        flushSegment(pageMayExitEvent.reason);\n    });\n    function flushSegment(flushReason) {\n        if (state.status === 1 /* SegmentCollectionStatus.SegmentPending */) {\n            state.segment.flush((metadata, stats, encoderResult) => {\n                const payload = buildReplayPayload(encoderResult.output, metadata, stats, encoderResult.rawBytesCount);\n                if (isPageExitReason(flushReason)) {\n                    httpRequest.sendOnExit(payload);\n                }\n                else {\n                    httpRequest.send(payload);\n                }\n            });\n            clearTimeout(state.expirationTimeoutId);\n        }\n        if (flushReason !== 'stop') {\n            state = {\n                status: 0 /* SegmentCollectionStatus.WaitingForInitialRecord */,\n                nextSegmentCreationReason: flushReason,\n            };\n        }\n        else {\n            state = {\n                status: 2 /* SegmentCollectionStatus.Stopped */,\n            };\n        }\n    }\n    return {\n        addRecord: (record) => {\n            if (state.status === 2 /* SegmentCollectionStatus.Stopped */) {\n                return;\n            }\n            if (state.status === 0 /* SegmentCollectionStatus.WaitingForInitialRecord */) {\n                const context = getSegmentContext();\n                if (!context) {\n                    return;\n                }\n                state = {\n                    status: 1 /* SegmentCollectionStatus.SegmentPending */,\n                    segment: createSegment({ encoder, context, creationReason: state.nextSegmentCreationReason }),\n                    expirationTimeoutId: setTimeout(() => {\n                        flushSegment('segment_duration_limit');\n                    }, SEGMENT_DURATION_LIMIT),\n                };\n            }\n            state.segment.addRecord(record, (encodedBytesCount) => {\n                if (encodedBytesCount > SEGMENT_BYTES_LIMIT) {\n                    flushSegment('segment_bytes_limit');\n                }\n            });\n        },\n        addStats: (stats) => {\n            if (state.status === 1 /* SegmentCollectionStatus.SegmentPending */) {\n                state.segment.addStats(stats);\n            }\n        },\n        stop: () => {\n            flushSegment('stop');\n            unsubscribeViewCreated();\n            unsubscribePageMayExit();\n        },\n    };\n}\nexport function computeSegmentContext(applicationId, sessionManager, viewHistory) {\n    const session = sessionManager.findTrackedSession();\n    const viewContext = viewHistory.findView();\n    if (!session || !viewContext) {\n        return undefined;\n    }\n    return {\n        application: {\n            id: applicationId,\n        },\n        session: {\n            id: session.id,\n        },\n        view: {\n            id: viewContext.id,\n        },\n    };\n}\nexport function setSegmentBytesLimit(newSegmentBytesLimit = 60000) {\n    SEGMENT_BYTES_LIMIT = newSegmentBytesLimit;\n}\n//# sourceMappingURL=segmentCollection.js.map","export function buildReplayPayload(data, metadata, stats, rawSegmentBytesCount) {\n    const formData = new FormData();\n    formData.append('segment', new Blob([data], {\n        type: 'application/octet-stream',\n    }), `${metadata.session.id}-${metadata.start}`);\n    const metadataAndSegmentSizes = {\n        raw_segment_size: rawSegmentBytesCount,\n        compressed_segment_size: data.byteLength,\n        ...metadata,\n    };\n    const serializedMetadataAndSegmentSizes = JSON.stringify(metadataAndSegmentSizes);\n    formData.append('event', new Blob([serializedMetadataAndSegmentSizes], { type: 'application/json' }));\n    return {\n        data: formData,\n        bytesCount: data.byteLength,\n        cssText: stats.cssText,\n        isFullSnapshot: metadata.index_in_view === 0,\n        rawSize: rawSegmentBytesCount,\n        recordCount: metadata.records_count,\n        serializationDuration: stats.serializationDuration,\n    };\n}\n//# sourceMappingURL=buildReplayPayload.js.map","import { addTelemetryMetrics, noop } from '@datadog/browser-core';\nimport { isFullSnapshotChangeRecordsEnabled, isIncrementalSnapshotChangeRecordsEnabled } from '../record';\nexport function startSegmentTelemetry(telemetry, requestObservable) {\n    if (!telemetry.metricsEnabled) {\n        return { stop: noop };\n    }\n    const { unsubscribe } = requestObservable.subscribe((requestEvent) => {\n        if (requestEvent.type === 'failure' ||\n            requestEvent.type === 'queue-full' ||\n            (requestEvent.type === 'success' && requestEvent.payload.isFullSnapshot)) {\n            const metrics = createSegmentMetrics(requestEvent.type, requestEvent.bandwidth, requestEvent.payload);\n            // monitor-until: 2026-07-01\n            addTelemetryMetrics(\"Segment network request metrics\" /* TelemetryMetrics.SEGMENT_METRICS_TELEMETRY_NAME */, { metrics });\n        }\n    });\n    return {\n        stop: unsubscribe,\n    };\n}\nfunction createSegmentMetrics(result, bandwidthStats, payload) {\n    return {\n        cssText: {\n            count: payload.cssText.count,\n            max: payload.cssText.max,\n            sum: payload.cssText.sum,\n        },\n        encoding: {\n            fullSnapshot: isFullSnapshotChangeRecordsEnabled() ? 'change' : 'v1',\n            incrementalSnapshot: isIncrementalSnapshotChangeRecordsEnabled() ? 'change' : 'v1',\n        },\n        isFullSnapshot: payload.isFullSnapshot,\n        ongoingRequests: {\n            count: bandwidthStats.ongoingRequestCount,\n            totalSize: bandwidthStats.ongoingByteCount,\n        },\n        recordCount: payload.recordCount,\n        result,\n        serializationDuration: {\n            count: payload.serializationDuration.count,\n            max: payload.serializationDuration.max,\n            sum: payload.serializationDuration.sum,\n        },\n        size: {\n            compressed: payload.bytesCount,\n            raw: payload.rawSize,\n        },\n    };\n}\n//# sourceMappingURL=startSegmentTelemetry.js.map","import { createHttpRequest, addTelemetryDebug, canUseEventBridge, noop } from '@datadog/browser-core';\nimport { record } from '../domain/record';\nimport { startSegmentCollection, SEGMENT_BYTES_LIMIT, startSegmentTelemetry } from '../domain/segmentCollection';\nimport { startRecordBridge } from '../domain/startRecordBridge';\nexport function startRecording(lifeCycle, configuration, sessionManager, viewHistory, encoder, telemetry, httpRequest) {\n    const cleanupTasks = [];\n    const reportError = (error) => {\n        lifeCycle.notify(14 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, { error });\n        // monitor-until: forever, to keep an eye on the errors reported to customers\n        addTelemetryDebug('Error reported to customer', { 'error.message': error.message });\n    };\n    const replayRequest = httpRequest || createHttpRequest([configuration.sessionReplayEndpointBuilder], reportError, SEGMENT_BYTES_LIMIT);\n    let addRecord;\n    let addStats;\n    if (!canUseEventBridge()) {\n        const segmentCollection = startSegmentCollection(lifeCycle, configuration, sessionManager, viewHistory, replayRequest, encoder);\n        addRecord = segmentCollection.addRecord;\n        addStats = segmentCollection.addStats;\n        cleanupTasks.push(segmentCollection.stop);\n        const segmentTelemetry = startSegmentTelemetry(telemetry, replayRequest.observable);\n        cleanupTasks.push(segmentTelemetry.stop);\n    }\n    else {\n        ;\n        ({ addRecord } = startRecordBridge(viewHistory));\n        addStats = noop;\n    }\n    const { stop: stopRecording } = record({\n        emitRecord: addRecord,\n        emitStats: addStats,\n        configuration,\n        lifeCycle,\n        viewHistory,\n    });\n    cleanupTasks.push(stopRecording);\n    return {\n        stop: () => {\n            cleanupTasks.forEach((task) => task());\n        },\n    };\n}\n//# sourceMappingURL=startRecording.js.map","import { getEventBridge } from '@datadog/browser-core';\nexport function startRecordBridge(viewHistory) {\n    const bridge = getEventBridge();\n    return {\n        addRecord: (record) => {\n            // Get the current active view, not at the time of the record, aligning with the segment logic.\n            // This approach could potentially associate the record to an incorrect view, in case the record date is in the past (e.g. frustration records).\n            // However the risk is minimal. We could address the issue when potential negative impact are identified.\n            const view = viewHistory.findView();\n            bridge.send('record', record, view.id);\n        },\n    };\n}\n//# sourceMappingURL=startRecordBridge.js.map","// This is the regex used to extract the path from the url (from SimpleUrlGroupingProcessor.java)\n// It's a bit different from the one in the java code because we removed the lookbehind unsupported by Safari.\nconst PATH_MIXED_ALPHANUMERICS = /\\/(?![vV]\\d{1,2}\\/)([^/\\d?]*\\d+[^/?]*)/g;\nexport function getDefaultViewName(viewPathUrl) {\n    if (!viewPathUrl) {\n        return '/';\n    }\n    // Replace all the mixed alphanumerics with a ?\n    return viewPathUrl.replace(PATH_MIXED_ALPHANUMERICS, '/?');\n}\n//# sourceMappingURL=getDefaultViewName.js.map","import { getDefaultViewName } from './getDefaultViewName';\nexport const getCustomOrDefaultViewName = (customViewName, viewPathUrl) => customViewName || getDefaultViewName(viewPathUrl);\n//# sourceMappingURL=getCustomOrDefaultViewName.js.map","/**\n * Builds attributes for the Profile Event.\n *\n * @param profilerTrace - Profiler trace\n * @param applicationId - application id.\n * @param sessionId - session id.\n * @returns Additional attributes.\n */\nexport function buildProfileEventAttributes(profilerTrace, applicationId, sessionId) {\n    var _a, _b;\n    // Extract view ids and names from the profiler trace and add them as attributes of the profile event.\n    // This will be used to filter the profiles by @view.id and/or @view.name.\n    const { ids, names } = extractViewIdsAndNames(profilerTrace.views);\n    const longTaskIds = profilerTrace.longTasks.map((longTask) => longTask.id).filter((id) => id !== undefined);\n    const actionIds = (_b = (_a = profilerTrace.actions) === null || _a === void 0 ? void 0 : _a.map((longTask) => longTask.id).filter((id) => id !== undefined)) !== null && _b !== void 0 ? _b : [];\n    const { ids: vitalIds, labels: vitalLabels } = extractVitalIdsAndLabels(profilerTrace.vitals);\n    const attributes = { application: { id: applicationId } };\n    if (sessionId) {\n        attributes.session = { id: sessionId };\n    }\n    if (ids.length) {\n        attributes.view = { id: ids, name: names };\n    }\n    if (longTaskIds.length) {\n        attributes.long_task = { id: longTaskIds };\n    }\n    if (actionIds.length) {\n        attributes.action = { id: actionIds, label: [] };\n    }\n    if (vitalIds.length) {\n        attributes.vital = { id: vitalIds, label: vitalLabels };\n    }\n    return attributes;\n}\nfunction extractViewIdsAndNames(views) {\n    const result = { ids: [], names: [] };\n    for (const view of views) {\n        result.ids.push(view.viewId);\n        if (view.viewName) {\n            result.names.push(view.viewName);\n        }\n    }\n    // Remove duplicates\n    result.names = Array.from(new Set(result.names));\n    return result;\n}\nfunction extractVitalIdsAndLabels(vitals) {\n    const result = { ids: [], labels: [] };\n    if (!vitals) {\n        return result;\n    }\n    for (const vital of vitals) {\n        result.ids.push(vital.id);\n        result.labels.push(vital.label);\n    }\n    // Remove duplicates\n    result.labels = Array.from(new Set(result.labels));\n    return result;\n}\n//# sourceMappingURL=buildProfileEventAttributes.js.map","import { buildTags, currentDrift } from '@datadog/browser-core';\nimport { buildProfileEventAttributes } from './buildProfileEventAttributes';\nexport function assembleProfilingPayload(profilerTrace, configuration, sessionId) {\n    const event = buildProfileEvent(profilerTrace, configuration, sessionId);\n    return {\n        event,\n        'wall-time.json': profilerTrace,\n    };\n}\nfunction buildProfileEvent(profilerTrace, configuration, sessionId) {\n    const tags = buildTags(configuration); // TODO: get that from the tagContext hook\n    const profileAttributes = buildProfileEventAttributes(profilerTrace, configuration.applicationId, sessionId);\n    const profileEventTags = buildProfileEventTags(tags);\n    const profileEvent = {\n        ...profileAttributes,\n        attachments: ['wall-time.json'],\n        start: new Date(profilerTrace.startClocks.timeStamp).toISOString(),\n        end: new Date(profilerTrace.endClocks.timeStamp).toISOString(),\n        family: 'chrome',\n        runtime: 'chrome',\n        format: 'json',\n        version: 4, // Ingestion event version (not the version application tag)\n        tags_profiler: profileEventTags.join(','),\n        _dd: {\n            clock_drift: currentDrift(),\n        },\n    };\n    return profileEvent;\n}\n/**\n * Builds tags for the Profile Event.\n *\n * @param tags - RUM tags\n * @returns Combined tags for the Profile Event.\n */\nfunction buildProfileEventTags(tags) {\n    // Tags already contains the common tags for all events. (service, env, version, etc.)\n    // Here we are adding some specific-to-profiling tags.\n    const profileEventTags = tags.concat(['language:javascript', 'runtime:chrome', 'family:chrome', 'host:browser']);\n    return profileEventTags;\n}\n//# sourceMappingURL=assembly.js.map","import { addDuration, createValueHistory, SESSION_TIME_OUT_DELAY } from '@datadog/browser-core';\nimport { RumPerformanceEntryType, RumLongTaskEntryType } from '@datadog/browser-rum-core';\nexport const LONG_TASK_ID_HISTORY_EXPIRE_DELAY = SESSION_TIME_OUT_DELAY;\nexport function createLongTaskHistory(lifeCycle) {\n    const history = createValueHistory({\n        expireDelay: LONG_TASK_ID_HISTORY_EXPIRE_DELAY,\n    });\n    lifeCycle.subscribe(12 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, ({ rawRumEvent, startClocks, duration }) => {\n        if (rawRumEvent.type === 'long_task') {\n            history\n                .add({\n                id: rawRumEvent.long_task.id,\n                startClocks,\n                duration: duration,\n                entryType: rawRumEvent.long_task.entry_type === RumLongTaskEntryType.LONG_TASK\n                    ? RumPerformanceEntryType.LONG_TASK\n                    : RumPerformanceEntryType.LONG_ANIMATION_FRAME,\n            }, startClocks.relative)\n                .close(addDuration(startClocks.relative, duration));\n        }\n    });\n    return history;\n}\n//# sourceMappingURL=longTaskHistory.js.map","import { addDuration, createValueHistory, SESSION_TIME_OUT_DELAY } from '@datadog/browser-core';\nexport const ACTION_ID_HISTORY_TIME_OUT_DELAY = SESSION_TIME_OUT_DELAY;\nexport function createActionHistory(lifeCycle) {\n    const history = createValueHistory({\n        expireDelay: ACTION_ID_HISTORY_TIME_OUT_DELAY,\n    });\n    lifeCycle.subscribe(15 /* LifeCycleEventType.ACTION_STARTED */, (actionStart) => {\n        history.add({\n            id: actionStart.id,\n            // The label is temporarily empty since we need to account for customers that might\n            // redact the action name in the beforeSend callback. We will either try to do patch this\n            // behavior, or remove the label field entirely.\n            label: '',\n            startClocks: actionStart.startClocks,\n            duration: undefined,\n        }, actionStart.startClocks.relative);\n    });\n    lifeCycle.subscribe(12 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, ({ rawRumEvent, startClocks, duration }) => {\n        if (rawRumEvent.type === 'action') {\n            const historyEntry = history\n                .getEntries(startClocks.relative)\n                .find((entry) => entry.value.id === rawRumEvent.action.id);\n            const durationForEntry = duration !== null && duration !== void 0 ? duration : 0;\n            if (historyEntry) {\n                historyEntry.value.duration = durationForEntry;\n                historyEntry.close(addDuration(startClocks.relative, durationForEntry));\n            }\n            else {\n                history\n                    .add({\n                    id: rawRumEvent.action.id,\n                    // The label is temporarily empty since we need to account for customers that might\n                    // redact the action name in the beforeSend callback. We will either try to do patch this\n                    // behavior, or remove the label field entirely.\n                    label: '',\n                    startClocks,\n                    duration,\n                }, startClocks.relative)\n                    .close(addDuration(startClocks.relative, durationForEntry));\n            }\n        }\n    });\n    return history;\n}\n//# sourceMappingURL=actionHistory.js.map","import { addDuration, createValueHistory, SESSION_TIME_OUT_DELAY } from '@datadog/browser-core';\nexport const VITAL_ID_HISTORY_TIME_OUT_DELAY = SESSION_TIME_OUT_DELAY;\nexport function createVitalHistory(lifeCycle) {\n    const history = createValueHistory({\n        expireDelay: VITAL_ID_HISTORY_TIME_OUT_DELAY,\n    });\n    lifeCycle.subscribe(16 /* LifeCycleEventType.VITAL_STARTED */, (vitalStart) => {\n        history.add({\n            id: vitalStart.id,\n            startClocks: vitalStart.startClocks,\n            duration: undefined,\n            label: vitalStart.name,\n        }, vitalStart.startClocks.relative);\n    });\n    lifeCycle.subscribe(12 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, ({ rawRumEvent, startClocks, duration }) => {\n        if (rawRumEvent.type === 'vital') {\n            const historyEntry = history\n                .getEntries(startClocks.relative)\n                .find((entry) => entry.value.id === rawRumEvent.vital.id);\n            if (historyEntry) {\n                historyEntry.value.duration = duration;\n                historyEntry.close(addDuration(startClocks.relative, duration));\n            }\n            else {\n                history\n                    .add({\n                    id: rawRumEvent.vital.id,\n                    startClocks,\n                    duration,\n                    label: rawRumEvent.vital.name,\n                }, startClocks.relative)\n                    .close(addDuration(startClocks.relative, duration));\n            }\n        }\n    });\n    return history;\n}\n//# sourceMappingURL=vitalHistory.js.map","import { addEventListener, clearTimeout, setTimeout, monitorError, display, getGlobalObject, clocksOrigin, clocksNow, elapsed, mockable, } from '@datadog/browser-core';\nimport { createFormDataTransport } from '@datadog/browser-rum-core';\nimport { getNumberOfSamples } from './utils/getNumberOfSamples';\nimport { getCustomOrDefaultViewName } from './utils/getCustomOrDefaultViewName';\nimport { assembleProfilingPayload } from './transport/assembly';\nimport { createLongTaskHistory } from './longTaskHistory';\nimport { createActionHistory } from './actionHistory';\nimport { createVitalHistory } from './vitalHistory';\nexport const DEFAULT_RUM_PROFILER_CONFIGURATION = {\n    sampleIntervalMs: 10, // Sample stack trace every 10ms\n    collectIntervalMs: 60000, // Collect data every minute\n    minProfileDurationMs: 5000, // Require at least 5 seconds of profile data to reduce noise and cost\n    minNumberOfSamples: 50, // Require at least 50 samples (~500 ms) to report a profile to reduce noise and cost\n};\nexport function createRumProfiler(configuration, lifeCycle, session, profilingContextManager, createEncoder, viewHistory, profilerConfiguration = DEFAULT_RUM_PROFILER_CONFIGURATION) {\n    const transport = createFormDataTransport(configuration, lifeCycle, createEncoder, 6 /* DeflateEncoderStreamId.PROFILING */);\n    let lastViewEntry;\n    // Global clean-up tasks for listeners that are not specific to a profiler instance (eg. visibility change, before unload)\n    const globalCleanupTasks = [];\n    const longTaskHistory = mockable(createLongTaskHistory)(lifeCycle);\n    const actionHistory = mockable(createActionHistory)(lifeCycle);\n    const vitalHistory = mockable(createVitalHistory)(lifeCycle);\n    let instance = { state: 'stopped', stateReason: 'initializing' };\n    // Stops the profiler when session expires\n    lifeCycle.subscribe(9 /* LifeCycleEventType.SESSION_EXPIRED */, () => {\n        stopProfiling('session-expired');\n    });\n    // Start the profiler again when session is renewed\n    lifeCycle.subscribe(10 /* LifeCycleEventType.SESSION_RENEWED */, () => {\n        if (instance.state === 'stopped' && instance.stateReason === 'session-expired') {\n            start();\n        }\n    });\n    // Public API to start the profiler.\n    function start() {\n        if (instance.state === 'running') {\n            return;\n        }\n        const viewEntry = viewHistory.findView();\n        // Add initial view\n        // Note: `viewEntry.name` is only filled when users use manual view creation via `startView` method.\n        lastViewEntry = viewEntry\n            ? {\n                startClocks: viewEntry.startClocks,\n                viewId: viewEntry.id,\n                viewName: getCustomOrDefaultViewName(viewEntry.name, document.location.pathname),\n            }\n            : undefined;\n        // Add global clean-up tasks for listeners that are not specific to a profiler instance (eg. visibility change, before unload)\n        globalCleanupTasks.push(addEventListener(configuration, window, \"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */, handleVisibilityChange).stop, addEventListener(configuration, window, \"beforeunload\" /* DOM_EVENT.BEFORE_UNLOAD */, handleBeforeUnload).stop);\n        // Start profiler instance\n        startNextProfilerInstance();\n    }\n    // Public API to manually stop the profiler.\n    function stop() {\n        stopProfiling('stopped-by-user');\n    }\n    function stopProfiling(reason) {\n        // Stop current profiler instance (data collection happens async in background)\n        stopProfilerInstance(reason);\n        // Cleanup global listeners and reset the array to prevent accumulation across start/stop cycles\n        globalCleanupTasks.forEach((task) => task());\n        globalCleanupTasks.length = 0;\n        // Update Profiling status once the Profiler has been stopped.\n        profilingContextManager.set({ status: 'stopped', error_reason: undefined });\n    }\n    /**\n     * Whenever a new Profiler instance is started, we need to add event listeners to surroundings (RUM Events, Long Tasks, etc) to enrich the Profiler data.\n     * If the instance is already running, we can keep the same event listeners.\n     */\n    function addEventListeners(existingInstance) {\n        if (existingInstance.state === 'running') {\n            // Instance is already running, so we can keep same event listeners.\n            return {\n                cleanupTasks: existingInstance.cleanupTasks,\n            };\n        }\n        // Store clean-up tasks for this instance (tasks to be executed when the Profiler is stopped or paused.)\n        const cleanupTasks = [];\n        // Whenever the View is updated, we add a views entry to the profiler instance.\n        const viewUpdatedSubscription = lifeCycle.subscribe(2 /* LifeCycleEventType.VIEW_CREATED */, (view) => {\n            const viewEntry = {\n                viewId: view.id,\n                // Note: `viewName` is only filled when users use manual view creation via `startView` method.\n                viewName: getCustomOrDefaultViewName(view.name, document.location.pathname),\n                startClocks: view.startClocks,\n            };\n            collectViewEntry(viewEntry);\n            // Update last view entry\n            lastViewEntry = viewEntry;\n        });\n        cleanupTasks.push(viewUpdatedSubscription.unsubscribe);\n        return {\n            cleanupTasks,\n        };\n    }\n    function startNextProfilerInstance() {\n        // These APIs might be unavailable in some browsers\n        const globalThisProfiler = getGlobalObject().Profiler;\n        if (!globalThisProfiler) {\n            profilingContextManager.set({ status: 'error', error_reason: 'not-supported-by-browser' });\n            throw new Error('RUM Profiler is not supported in this browser.');\n        }\n        // Collect data from previous running instance (fire-and-forget)\n        if (instance.state === 'running') {\n            collectProfilerInstance(instance);\n        }\n        const { cleanupTasks } = addEventListeners(instance);\n        let profiler;\n        try {\n            // We have to create new Profiler each time we start a new instance\n            profiler = new globalThisProfiler({\n                sampleInterval: profilerConfiguration.sampleIntervalMs,\n                // Keep buffer size at 1.5 times of minimum required to collect data for a profiling instance\n                maxBufferSize: Math.round((profilerConfiguration.collectIntervalMs * 1.5) / profilerConfiguration.sampleIntervalMs),\n            });\n        }\n        catch (e) {\n            if (e instanceof Error && e.message.includes('disabled by Document Policy')) {\n                // Missing Response Header (`js-profiling`) that is required to enable the profiler.\n                // We should suggest the user to enable the Response Header in their server configuration.\n                display.warn('[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.', e);\n                profilingContextManager.set({ status: 'error', error_reason: 'missing-document-policy-header' });\n            }\n            else {\n                profilingContextManager.set({ status: 'error', error_reason: 'unexpected-exception' });\n            }\n            return;\n        }\n        profilingContextManager.set({ status: 'running', error_reason: undefined });\n        // Kick-off the new instance\n        instance = {\n            state: 'running',\n            startClocks: clocksNow(),\n            profiler,\n            timeoutId: setTimeout(startNextProfilerInstance, profilerConfiguration.collectIntervalMs),\n            views: [],\n            cleanupTasks,\n            longTasks: [],\n        };\n        // Add last view entry\n        collectViewEntry(lastViewEntry);\n        // Add event handler case we overflow the buffer\n        profiler.addEventListener('samplebufferfull', handleSampleBufferFull);\n    }\n    function collectProfilerInstance(runningInstance) {\n        // Cleanup instance\n        clearTimeout(runningInstance.timeoutId);\n        runningInstance.profiler.removeEventListener('samplebufferfull', handleSampleBufferFull);\n        // Store instance data snapshot in local variables to use in async callback\n        const { startClocks, views } = runningInstance;\n        // Stop current profiler to get trace\n        runningInstance.profiler\n            .stop()\n            .then((trace) => {\n            const endClocks = clocksNow();\n            const duration = elapsed(startClocks.relative, endClocks.relative);\n            const longTasks = longTaskHistory.findAll(startClocks.relative, duration);\n            const actions = actionHistory.findAll(startClocks.relative, duration);\n            const vitals = vitalHistory.findAll(startClocks.relative, duration);\n            const isBelowDurationThreshold = duration < profilerConfiguration.minProfileDurationMs;\n            const isBelowSampleThreshold = getNumberOfSamples(trace.samples) < profilerConfiguration.minNumberOfSamples;\n            if (longTasks.length === 0 && (isBelowDurationThreshold || isBelowSampleThreshold)) {\n                // Skip very short profiles to reduce noise and cost, but keep them if they contain long tasks.\n                return;\n            }\n            handleProfilerTrace(\n            // Enrich trace with time and instance data\n            Object.assign(trace, {\n                startClocks,\n                endClocks,\n                clocksOrigin: clocksOrigin(),\n                longTasks,\n                actions,\n                vitals,\n                views,\n                sampleInterval: profilerConfiguration.sampleIntervalMs,\n            }));\n        })\n            .catch(monitorError);\n    }\n    function stopProfilerInstance(stateReason) {\n        if (instance.state !== 'running') {\n            if (\n            // If paused, profiler data was already collected during pause, just update state\n            instance.state === 'paused' ||\n                // Update stateReason when already stopped and the user explicitly stops the profiler,\n                // so that SESSION_RENEWED does not override the user's intent.\n                (instance.state === 'stopped' && stateReason === 'stopped-by-user')) {\n                instance = { state: 'stopped', stateReason };\n            }\n            return;\n        }\n        // Capture the running instance before changing state\n        const runningInstance = instance;\n        // Update state synchronously so SESSION_RENEWED check works immediately\n        instance = { state: 'stopped', stateReason };\n        // Cleanup instance-specific tasks (e.g., view listener)\n        runningInstance.cleanupTasks.forEach((cleanupTask) => cleanupTask());\n        // Collect and send profile data in background - doesn't block state transitions\n        collectProfilerInstance(runningInstance);\n    }\n    function pauseProfilerInstance() {\n        if (instance.state !== 'running') {\n            return;\n        }\n        // Capture the running instance before changing state\n        const runningInstance = instance;\n        // Update state synchronously\n        instance = { state: 'paused' };\n        // Cleanup instance-specific tasks\n        runningInstance.cleanupTasks.forEach((cleanupTask) => cleanupTask());\n        // Collect and send profile data in background\n        collectProfilerInstance(runningInstance);\n    }\n    function collectViewEntry(viewEntry) {\n        if (instance.state !== 'running' || !viewEntry) {\n            return;\n        }\n        // Add entry to views\n        instance.views.push(viewEntry);\n    }\n    function handleProfilerTrace(trace) {\n        var _a;\n        // Find current session to assign it to the Profile.\n        const sessionId = (_a = session.findTrackedSession()) === null || _a === void 0 ? void 0 : _a.id;\n        const payload = assembleProfilingPayload(trace, configuration, sessionId);\n        void transport.send(payload);\n    }\n    function handleSampleBufferFull() {\n        startNextProfilerInstance();\n    }\n    function handleVisibilityChange() {\n        if (document.visibilityState === 'hidden' && instance.state === 'running') {\n            // Pause when tab is hidden. We use paused state to distinguish between\n            // paused by visibility change and stopped by user.\n            // If profiler is paused by the visibility change, we should resume when\n            // tab becomes visible again. That's not the case when user stops the profiler.\n            pauseProfilerInstance();\n        }\n        else if (document.visibilityState === 'visible' && instance.state === 'paused') {\n            // Resume when tab becomes visible again\n            startNextProfilerInstance();\n        }\n    }\n    function handleBeforeUnload() {\n        // `unload` can in some cases be triggered while the page is still active (link to a different protocol like mailto:).\n        // We can immediately flush (by starting a new profiler instance) to make sure we receive the data, and at the same time keep the profiler active.\n        // In case of the regular unload, the profiler will be shut down anyway.\n        startNextProfilerInstance();\n    }\n    function isStopped() {\n        return instance.state === 'stopped';\n    }\n    function isRunning() {\n        return instance.state === 'running';\n    }\n    function isPaused() {\n        return instance.state === 'paused';\n    }\n    return { start, stop, isStopped, isRunning, isPaused };\n}\n//# sourceMappingURL=profiler.js.map","/**\n * Counts number of samples when the thread was not idle (stackId is defined)\n *\n * @param samples - Array of collected samples\n * @returns Number of samples\n */\nexport function getNumberOfSamples(samples) {\n    let numberOfSamples = 0;\n    for (const sample of samples) {\n        if (sample.stackId !== undefined) {\n            numberOfSamples++;\n        }\n    }\n    return numberOfSamples;\n}\n//# sourceMappingURL=getNumberOfSamples.js.map","export const MAX_STATS_HISTORY = 1000;\nlet statsPerView;\nexport function getSegmentsCount(viewId) {\n    return getOrCreateReplayStats(viewId).segments_count;\n}\nexport function addSegment(viewId) {\n    getOrCreateReplayStats(viewId).segments_count += 1;\n}\nexport function addRecord(viewId) {\n    getOrCreateReplayStats(viewId).records_count += 1;\n}\nexport function addWroteData(viewId, additionalBytesCount) {\n    getOrCreateReplayStats(viewId).segments_total_raw_size += additionalBytesCount;\n}\nexport function getReplayStats(viewId) {\n    return statsPerView === null || statsPerView === void 0 ? void 0 : statsPerView.get(viewId);\n}\nexport function resetReplayStats() {\n    statsPerView = undefined;\n}\nfunction getOrCreateReplayStats(viewId) {\n    if (!statsPerView) {\n        statsPerView = new Map();\n    }\n    let replayStats;\n    if (statsPerView.has(viewId)) {\n        replayStats = statsPerView.get(viewId);\n    }\n    else {\n        replayStats = {\n            records_count: 0,\n            segments_count: 0,\n            segments_total_raw_size: 0,\n        };\n        statsPerView.set(viewId, replayStats);\n        if (statsPerView.size > MAX_STATS_HISTORY) {\n            deleteOldestStats();\n        }\n    }\n    return replayStats;\n}\nfunction deleteOldestStats() {\n    if (!statsPerView) {\n        return;\n    }\n    const toDelete = statsPerView.keys().next().value;\n    if (toDelete) {\n        statsPerView.delete(toDelete);\n    }\n}\n//# sourceMappingURL=replayStats.js.map","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter/value functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tif(Array.isArray(definition)) {\n\t\tvar i = 0;\n\t\twhile(i < definition.length) {\n\t\t\tvar key = definition[i++];\n\t\t\tvar binding = definition[i++];\n\t\t\tif(!__webpack_require__.o(exports, key)) {\n\t\t\t\tif(binding === 0) {\n\t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, value: definition[i++] });\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: binding });\n\t\t\t\t}\n\t\t\t} else if(binding === 0) { i++; }\n\t\t}\n\t} else {\n\t\tfor(var key in definition) {\n\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t\t}\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import { addEventListener, concatBuffers } from '@datadog/browser-core';\nexport function createDeflateEncoder(configuration, worker, streamId) {\n    let rawBytesCount = 0;\n    let compressedData = [];\n    let compressedDataTrailer;\n    let isEmpty = true;\n    let nextWriteActionId = 0;\n    const pendingWriteActions = [];\n    const { stop: removeMessageListener } = addEventListener(configuration, worker, 'message', ({ data: workerResponse }) => {\n        if (workerResponse.type !== 'wrote' || workerResponse.streamId !== streamId) {\n            return;\n        }\n        const nextPendingAction = pendingWriteActions[0];\n        if (nextPendingAction) {\n            if (nextPendingAction.id === workerResponse.id) {\n                pendingWriteActions.shift();\n                rawBytesCount += workerResponse.additionalBytesCount;\n                compressedData.push(workerResponse.result);\n                compressedDataTrailer = workerResponse.trailer;\n                if (nextPendingAction.writeCallback) {\n                    nextPendingAction.writeCallback(workerResponse.result.byteLength);\n                }\n                else if (nextPendingAction.finishCallback) {\n                    nextPendingAction.finishCallback();\n                }\n            }\n            else if (nextPendingAction.id < workerResponse.id) {\n                // Worker responses received out of order\n                removeMessageListener();\n            }\n        }\n    });\n    function consumeResult() {\n        const output = compressedData.length === 0 ? new Uint8Array(0) : concatBuffers(compressedData.concat(compressedDataTrailer));\n        const result = {\n            rawBytesCount,\n            output,\n            outputBytesCount: output.byteLength,\n            encoding: 'deflate',\n        };\n        rawBytesCount = 0;\n        compressedData = [];\n        return result;\n    }\n    function sendResetIfNeeded() {\n        if (!isEmpty) {\n            worker.postMessage({\n                action: 'reset',\n                streamId,\n            });\n            isEmpty = true;\n        }\n    }\n    return {\n        isAsync: true,\n        get isEmpty() {\n            return isEmpty;\n        },\n        write(data, callback) {\n            worker.postMessage({\n                action: 'write',\n                id: nextWriteActionId,\n                data,\n                streamId,\n            });\n            pendingWriteActions.push({\n                id: nextWriteActionId,\n                writeCallback: callback,\n                data,\n            });\n            isEmpty = false;\n            nextWriteActionId += 1;\n        },\n        finish(callback) {\n            sendResetIfNeeded();\n            if (!pendingWriteActions.length) {\n                callback(consumeResult());\n            }\n            else {\n                // Make sure we do not call any write callback\n                pendingWriteActions.forEach((pendingWriteAction) => {\n                    delete pendingWriteAction.writeCallback;\n                });\n                // Wait for the last action to finish before calling the finish callback\n                pendingWriteActions[pendingWriteActions.length - 1].finishCallback = () => callback(consumeResult());\n            }\n        },\n        finishSync() {\n            sendResetIfNeeded();\n            const pendingData = pendingWriteActions.map((pendingWriteAction) => pendingWriteAction.data).join('');\n            // Ignore all pending write actions responses from the worker\n            pendingWriteActions.length = 0;\n            return { ...consumeResult(), pendingData };\n        },\n        estimateEncodedBytesCount(data) {\n            // This is a rough estimation of the data size once it'll be encoded by deflate. We observed\n            // that if it's the first chunk of data pushed to the stream, the ratio is lower (3-4), but\n            // after that the ratio is greater (10+). We chose 8 here, which (on average) seems to produce\n            // requests of the expected size.\n            return data.length / 8;\n        },\n        stop() {\n            removeMessageListener();\n        },\n    };\n}\n//# sourceMappingURL=deflateEncoder.js.map","import { addTelemetryError, display, DOCS_ORIGIN } from '@datadog/browser-core';\nexport function reportScriptLoadingError({ configuredUrl, error, source, scriptType, }) {\n    display.error(`${source} failed to start: an error occurred while initializing the ${scriptType}:`, error);\n    if (error instanceof Event || (error instanceof Error && isMessageCspRelated(error.message))) {\n        let baseMessage;\n        if (configuredUrl) {\n            baseMessage = `Please make sure the ${scriptType} URL ${configuredUrl} is correct and CSP is correctly configured.`;\n        }\n        else {\n            baseMessage = 'Please make sure CSP is correctly configured.';\n        }\n        display.error(`${baseMessage} See documentation at ${DOCS_ORIGIN}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`);\n    }\n    else if (scriptType === 'worker') {\n        addTelemetryError(error);\n    }\n}\nfunction isMessageCspRelated(message) {\n    return (message.includes('Content Security Policy') ||\n        // Related to `require-trusted-types-for` CSP: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/require-trusted-types-for\n        message.includes(\"requires 'TrustedScriptURL'\"));\n}\n//# sourceMappingURL=scriptLoadingError.js.map","import { addTelemetryError, display, addEventListener, setTimeout, ONE_SECOND, mockable } from '@datadog/browser-core';\nimport { reportScriptLoadingError } from '../scriptLoadingError';\nexport const INITIALIZATION_TIME_OUT_DELAY = 30 * ONE_SECOND;\nexport function createDeflateWorker(configuration) {\n    return new Worker(configuration.workerUrl || URL.createObjectURL(new Blob([\"(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},O={2:\\\"need dictionary\\\",1:\\\"stream end\\\",0:\\\"\\\",\\\"-1\\\":\\\"file error\\\",\\\"-2\\\":\\\"stream error\\\",\\\"-3\\\":\\\"data error\\\",\\\"-4\\\":\\\"insufficient memory\\\",\\\"-5\\\":\\\"buffer error\\\",\\\"-6\\\":\\\"incompatible version\\\"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=T(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\\\"\\\",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=\\\"\\\",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r=\\\"[object ArrayBuffer]\\\"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:\\\"errored\\\",error:e,streamId:a})}catch(n){t.postMessage({type:\\\"errored\\\",error:e+\\\"\\\",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,\\\"[object ArrayBuffer]\\\"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener(\\\"message\\\",n=>{try{const r=function(e,a){switch(a.action){case\\\"init\\\":return{type:\\\"initialized\\\",version:\\\"6.33.0\\\"};case\\\"write\\\":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if(\\\"function\\\"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:\\\"wrote\\\",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case\\\"reset\\\":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&\\\"streamId\\\"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();\"])));\n}\nlet state = { status: 0 /* DeflateWorkerStatus.Nil */ };\nexport function startDeflateWorker(configuration, source, onInitializationFailure) {\n    if (state.status === 0 /* DeflateWorkerStatus.Nil */) {\n        // doStartDeflateWorker updates the state to \"loading\" or \"error\"\n        doStartDeflateWorker(configuration, source);\n    }\n    switch (state.status) {\n        case 1 /* DeflateWorkerStatus.Loading */:\n            state.initializationFailureCallbacks.push(onInitializationFailure);\n            return state.worker;\n        case 3 /* DeflateWorkerStatus.Initialized */:\n            return state.worker;\n    }\n}\nexport function resetDeflateWorkerState() {\n    if (state.status === 3 /* DeflateWorkerStatus.Initialized */ || state.status === 1 /* DeflateWorkerStatus.Loading */) {\n        state.stop();\n    }\n    state = { status: 0 /* DeflateWorkerStatus.Nil */ };\n}\nexport function getDeflateWorkerStatus() {\n    return state.status;\n}\n/**\n * Starts the deflate worker and handle messages and errors\n *\n * The spec allow browsers to handle worker errors differently:\n * - Chromium throws an exception\n * - Firefox fires an error event\n *\n * more details: https://bugzilla.mozilla.org/show_bug.cgi?id=1736865#c2\n */\nexport function doStartDeflateWorker(configuration, source) {\n    try {\n        const worker = mockable(createDeflateWorker)(configuration);\n        const { stop: removeErrorListener } = addEventListener(configuration, worker, 'error', (error) => {\n            onError(configuration, source, error);\n        });\n        const { stop: removeMessageListener } = addEventListener(configuration, worker, 'message', ({ data }) => {\n            if (data.type === 'errored') {\n                onError(configuration, source, data.error, data.streamId);\n            }\n            else if (data.type === 'initialized') {\n                onInitialized(data.version);\n            }\n        });\n        worker.postMessage({ action: 'init' });\n        setTimeout(() => onTimeout(source), INITIALIZATION_TIME_OUT_DELAY);\n        const stop = () => {\n            removeErrorListener();\n            removeMessageListener();\n        };\n        state = { status: 1 /* DeflateWorkerStatus.Loading */, worker, stop, initializationFailureCallbacks: [] };\n    }\n    catch (error) {\n        onError(configuration, source, error);\n    }\n}\nfunction onTimeout(source) {\n    if (state.status === 1 /* DeflateWorkerStatus.Loading */) {\n        display.error(`${source} failed to start: a timeout occurred while initializing the Worker`);\n        state.initializationFailureCallbacks.forEach((callback) => callback());\n        state = { status: 2 /* DeflateWorkerStatus.Error */ };\n    }\n}\nfunction onInitialized(version) {\n    if (state.status === 1 /* DeflateWorkerStatus.Loading */) {\n        state = { status: 3 /* DeflateWorkerStatus.Initialized */, worker: state.worker, stop: state.stop, version };\n    }\n}\nfunction onError(configuration, source, error, streamId) {\n    if (state.status === 1 /* DeflateWorkerStatus.Loading */ || state.status === 0 /* DeflateWorkerStatus.Nil */) {\n        reportScriptLoadingError({\n            configuredUrl: configuration.workerUrl,\n            error,\n            source,\n            scriptType: 'worker',\n        });\n        if (state.status === 1 /* DeflateWorkerStatus.Loading */) {\n            state.initializationFailureCallbacks.forEach((callback) => callback());\n        }\n        state = { status: 2 /* DeflateWorkerStatus.Error */ };\n    }\n    else {\n        addTelemetryError(error, {\n            worker_version: state.status === 3 /* DeflateWorkerStatus.Initialized */ && state.version,\n            stream_id: streamId,\n        });\n    }\n}\n//# sourceMappingURL=deflateWorker.js.map","/**\n * Test for Browser features used while recording\n */\nexport function isBrowserSupported() {\n    return (\n    // Array.from is a bit less supported by browsers than CSSSupportsRule, but has higher chances\n    // to be polyfilled. Test for both to be more confident. We could add more things if we find out\n    // this test is not sufficient.\n    typeof Array.from === 'function' &&\n        typeof CSSSupportsRule === 'function' &&\n        typeof URL.createObjectURL === 'function' &&\n        'forEach' in NodeList.prototype);\n}\n//# sourceMappingURL=isBrowserSupported.js.map","import { getSessionReplayUrl } from '@datadog/browser-rum-core';\nimport { isBrowserSupported } from '../boot/isBrowserSupported';\nexport function getSessionReplayLink(configuration, sessionManager, viewHistory, isRecordingStarted) {\n    const session = sessionManager.findTrackedSession();\n    const errorType = getErrorType(session, isRecordingStarted);\n    const viewContext = viewHistory.findView();\n    return getSessionReplayUrl(configuration, {\n        viewContext,\n        errorType,\n        session,\n    });\n}\nfunction getErrorType(session, isRecordingStarted) {\n    if (!isBrowserSupported()) {\n        return 'browser-not-supported';\n    }\n    if (!session) {\n        // possibilities:\n        // - rum sampled out\n        // - session expired (edge case)\n        return 'rum-not-tracked';\n    }\n    if (session.sessionReplay === 0 /* SessionReplayState.OFF */) {\n        // possibilities\n        // - replay sampled out\n        return 'incorrect-session-plan';\n    }\n    if (!isRecordingStarted) {\n        return 'replay-not-started';\n    }\n}\n//# sourceMappingURL=getSessionReplayLink.js.map","import { mockable } from '@datadog/browser-core';\nimport { reportScriptLoadingError } from '../domain/scriptLoadingError';\nexport async function lazyLoadRecorder() {\n    try {\n        return await mockable(importRecorder)();\n    }\n    catch (error) {\n        reportScriptLoadingError({\n            error,\n            source: 'Recorder',\n            scriptType: 'module',\n        });\n    }\n}\nexport async function importRecorder() {\n    const module = await import(/* webpackChunkName: \"recorder\" */ './startRecording');\n    return module.startRecording;\n}\n//# sourceMappingURL=lazyLoadRecorder.js.map","import { asyncRunOnReadyState, monitorError, Observable } from '@datadog/browser-core';\nimport { getSessionReplayLink } from '../domain/getSessionReplayLink';\nimport { startRecorderInitTelemetry } from '../domain/startRecorderInitTelemetry';\nimport { lazyLoadRecorder } from './lazyLoadRecorder';\nexport function createPostStartStrategy(configuration, lifeCycle, sessionManager, viewHistory, getOrCreateDeflateEncoder, telemetry) {\n    let status = 0 /* RecorderStatus.Stopped */;\n    let stopRecording;\n    lifeCycle.subscribe(9 /* LifeCycleEventType.SESSION_EXPIRED */, () => {\n        if (status === 2 /* RecorderStatus.Starting */ || status === 3 /* RecorderStatus.Started */) {\n            stop();\n            status = 1 /* RecorderStatus.IntentToStart */;\n        }\n    });\n    lifeCycle.subscribe(10 /* LifeCycleEventType.SESSION_RENEWED */, () => {\n        if (status === 1 /* RecorderStatus.IntentToStart */) {\n            start();\n        }\n    });\n    const observable = new Observable();\n    startRecorderInitTelemetry(telemetry, observable);\n    const doStart = async (forced) => {\n        observable.notify({ type: 'start', forced });\n        const [startRecordingImpl] = await Promise.all([\n            notifyWhenSettled(observable, { type: 'recorder-settled' }, lazyLoadRecorder()),\n            notifyWhenSettled(observable, { type: 'document-ready' }, asyncRunOnReadyState(configuration, 'interactive')),\n        ]);\n        if (status !== 2 /* RecorderStatus.Starting */) {\n            observable.notify({ type: 'aborted' });\n            return;\n        }\n        if (!startRecordingImpl) {\n            status = 0 /* RecorderStatus.Stopped */;\n            observable.notify({ type: 'recorder-load-failed' });\n            return;\n        }\n        const deflateEncoder = getOrCreateDeflateEncoder();\n        if (!deflateEncoder) {\n            status = 0 /* RecorderStatus.Stopped */;\n            observable.notify({ type: 'deflate-encoder-load-failed' });\n            return;\n        }\n        ;\n        ({ stop: stopRecording } = startRecordingImpl(lifeCycle, configuration, sessionManager, viewHistory, deflateEncoder, telemetry));\n        status = 3 /* RecorderStatus.Started */;\n        observable.notify({ type: 'succeeded' });\n    };\n    function start(options) {\n        const session = sessionManager.findTrackedSession();\n        if (canStartRecording(session, options)) {\n            status = 1 /* RecorderStatus.IntentToStart */;\n            return;\n        }\n        if (isRecordingInProgress(status)) {\n            return;\n        }\n        status = 2 /* RecorderStatus.Starting */;\n        const forced = shouldForceReplay(session, options) || false;\n        // Intentionally not awaiting doStart() to keep it asynchronous\n        doStart(forced).catch(monitorError);\n        if (forced) {\n            sessionManager.setForcedReplay();\n        }\n    }\n    function stop() {\n        if (status === 3 /* RecorderStatus.Started */) {\n            stopRecording === null || stopRecording === void 0 ? void 0 : stopRecording();\n        }\n        status = 0 /* RecorderStatus.Stopped */;\n    }\n    return {\n        start,\n        stop,\n        getSessionReplayLink() {\n            return getSessionReplayLink(configuration, sessionManager, viewHistory, status !== 0 /* RecorderStatus.Stopped */);\n        },\n        isRecording: () => status === 3 /* RecorderStatus.Started */,\n    };\n}\nfunction canStartRecording(session, options) {\n    return !session || (session.sessionReplay === 0 /* SessionReplayState.OFF */ && (!options || !options.force));\n}\nfunction isRecordingInProgress(status) {\n    return status === 2 /* RecorderStatus.Starting */ || status === 3 /* RecorderStatus.Started */;\n}\nfunction shouldForceReplay(session, options) {\n    return options && options.force && session.sessionReplay === 0 /* SessionReplayState.OFF */;\n}\nasync function notifyWhenSettled(observable, event, promise) {\n    try {\n        return await promise;\n    }\n    finally {\n        observable.notify(event);\n    }\n}\n//# sourceMappingURL=postStartStrategy.js.map","import { addTelemetryMetrics, noop, timeStampNow, elapsed } from '@datadog/browser-core';\nexport function startRecorderInitTelemetry(telemetry, observable) {\n    if (!telemetry.metricsEnabled) {\n        return { stop: noop };\n    }\n    let startContext;\n    let documentReadyDuration;\n    let recorderSettledDuration;\n    const { unsubscribe } = observable.subscribe((event) => {\n        switch (event.type) {\n            case 'start':\n                startContext = { forced: event.forced, timestamp: timeStampNow() };\n                documentReadyDuration = undefined;\n                recorderSettledDuration = undefined;\n                break;\n            case 'document-ready':\n                if (startContext) {\n                    documentReadyDuration = elapsed(startContext.timestamp, timeStampNow());\n                }\n                break;\n            case 'recorder-settled':\n                if (startContext) {\n                    recorderSettledDuration = elapsed(startContext.timestamp, timeStampNow());\n                }\n                break;\n            case 'aborted':\n            case 'deflate-encoder-load-failed':\n            case 'recorder-load-failed':\n            case 'succeeded':\n                // Only send metrics for the first attempt at starting the recorder.\n                unsubscribe();\n                if (startContext) {\n                    // monitor-until: 2026-07-01\n                    addTelemetryMetrics(\"Recorder init metrics\" /* TelemetryMetrics.RECORDER_INIT_METRICS_TELEMETRY_NAME */, {\n                        metrics: createRecorderInitMetrics(startContext.forced, recorderSettledDuration, elapsed(startContext.timestamp, timeStampNow()), event.type, documentReadyDuration),\n                    });\n                }\n                break;\n        }\n    });\n    return { stop: unsubscribe };\n}\nfunction createRecorderInitMetrics(forced, loadRecorderModuleDuration, recorderInitDuration, result, waitForDocReadyDuration) {\n    return {\n        forced,\n        loadRecorderModuleDuration,\n        recorderInitDuration,\n        result,\n        waitForDocReadyDuration,\n    };\n}\n//# sourceMappingURL=startRecorderInitTelemetry.js.map","import { mockable } from '@datadog/browser-core';\nimport { reportScriptLoadingError } from '../domain/scriptLoadingError';\nexport async function lazyLoadProfiler() {\n    try {\n        return await mockable(importProfiler)();\n    }\n    catch (error) {\n        reportScriptLoadingError({\n            error,\n            source: 'Profiler',\n            scriptType: 'module',\n        });\n    }\n}\nexport async function importProfiler() {\n    const module = await import(/* webpackChunkName: \"profiler\" */ '../domain/profiling/profiler');\n    return module.createRumProfiler;\n}\n//# sourceMappingURL=lazyLoadProfiler.js.map","/**\n * Datadog Browser RUM SDK - Full version with Session Replay and Real User Profiling capabilities.\n * Use this package to monitor your web application's performance and user experience.\n *\n * @packageDocumentation\n * @see [RUM Browser Monitoring Setup](https://docs.datadoghq.com/real_user_monitoring/browser/)\n */\n// Keep the following in sync with packages/rum-slim/src/entries/main.ts\nimport { defineGlobal, getGlobalObject } from '@datadog/browser-core';\nimport { makeRumPublicApi } from '@datadog/browser-rum-core';\nimport { makeRecorderApi } from '../boot/recorderApi';\nimport { createDeflateEncoder, startDeflateWorker } from '../domain/deflate';\nimport { makeProfilerApi } from '../boot/profilerApi';\nexport { DefaultPrivacyLevel } from '@datadog/browser-core';\nexport { DEFAULT_TRACKED_RESOURCE_HEADERS } from '@datadog/browser-rum-core';\nconst recorderApi = makeRecorderApi();\nconst profilerApi = makeProfilerApi();\n/**\n * The global RUM instance. Use this to call RUM methods.\n *\n * @category Main\n * @see {@link DatadogRum}\n * @see [RUM Browser Monitoring Setup](https://docs.datadoghq.com/real_user_monitoring/browser/)\n */\nexport const datadogRum = makeRumPublicApi(recorderApi, profilerApi, {\n    startDeflateWorker,\n    createDeflateEncoder,\n    sdkName: 'rum',\n});\ndefineGlobal(getGlobalObject(), 'DD_RUM', datadogRum);\n//# sourceMappingURL=main.js.map","import { canUseEventBridge, noop, bridgeSupports, } from '@datadog/browser-core';\nimport { getReplayStats as getReplayStatsImpl } from '../domain/replayStats';\nimport { createDeflateEncoder, getDeflateWorkerStatus, startDeflateWorker, } from '../domain/deflate';\nimport { isBrowserSupported } from './isBrowserSupported';\nimport { createPostStartStrategy } from './postStartStrategy';\nimport { createPreStartStrategy } from './preStartStrategy';\nexport function makeRecorderApi() {\n    if ((canUseEventBridge() && !bridgeSupports(\"records\" /* BridgeCapability.RECORDS */)) || !isBrowserSupported()) {\n        return {\n            start: noop,\n            stop: noop,\n            getReplayStats: () => undefined,\n            onRumStart: noop,\n            isRecording: () => false,\n            getSessionReplayLink: () => undefined,\n        };\n    }\n    // eslint-disable-next-line prefer-const\n    let { strategy, shouldStartImmediately } = createPreStartStrategy();\n    return {\n        start: (options) => strategy.start(options),\n        stop: () => strategy.stop(),\n        getSessionReplayLink: () => strategy.getSessionReplayLink(),\n        onRumStart,\n        isRecording: () => \n        // The worker is started optimistically, meaning we could have started to record but its\n        // initialization fails a bit later. This could happen when:\n        // * the worker URL (blob or plain URL) is blocked by CSP in Firefox only (Chromium and Safari\n        // throw an exception when instantiating the worker, and IE doesn't care about CSP)\n        // * the browser fails to load the worker in case the workerUrl is used\n        // * an unexpected error occurs in the Worker before initialization, ex:\n        //   * a runtime exception collected by monitor()\n        //   * a syntax error notified by the browser via an error event\n        // * the worker is unresponsive for some reason and timeouts\n        //\n        // It is not expected to happen often. Nonetheless, the \"replayable\" status on RUM events is\n        // an important part of the Datadog App:\n        // * If we have a false positive (we set has_replay: true even if no replay data is present),\n        // we might display broken links to the Session Replay player.\n        // * If we have a false negative (we don't set has_replay: true even if replay data is\n        // available), it is less noticeable because no link will be displayed.\n        //\n        // Thus, it is better to have false negative, so let's make sure the worker is correctly\n        // initialized before advertizing that we are recording.\n        //\n        // In the future, when the compression worker will also be used for RUM data, this will be\n        // less important since no RUM event will be sent when the worker fails to initialize.\n        getDeflateWorkerStatus() === 3 /* DeflateWorkerStatus.Initialized */ && strategy.isRecording(),\n        getReplayStats: (viewId) => getDeflateWorkerStatus() === 3 /* DeflateWorkerStatus.Initialized */ ? getReplayStatsImpl(viewId) : undefined,\n    };\n    function onRumStart(lifeCycle, configuration, sessionManager, viewHistory, worker, telemetry) {\n        let cachedDeflateEncoder;\n        function getOrCreateDeflateEncoder() {\n            if (!cachedDeflateEncoder) {\n                worker !== null && worker !== void 0 ? worker : (worker = startDeflateWorker(configuration, 'Datadog Session Replay', () => strategy.stop()));\n                if (worker) {\n                    cachedDeflateEncoder = createDeflateEncoder(configuration, worker, 1 /* DeflateEncoderStreamId.REPLAY */);\n                }\n            }\n            return cachedDeflateEncoder;\n        }\n        strategy = createPostStartStrategy(configuration, lifeCycle, sessionManager, viewHistory, getOrCreateDeflateEncoder, telemetry);\n        if (shouldStartImmediately(configuration)) {\n            strategy.start();\n        }\n    }\n}\n//# sourceMappingURL=recorderApi.js.map","import { noop } from '@datadog/browser-core';\nexport function createPreStartStrategy() {\n    let status = 0 /* PreStartRecorderStatus.None */;\n    return {\n        strategy: {\n            start() {\n                status = 1 /* PreStartRecorderStatus.HadManualStart */;\n            },\n            stop() {\n                status = 2 /* PreStartRecorderStatus.HadManualStop */;\n            },\n            isRecording: () => false,\n            getSessionReplayLink: noop,\n        },\n        shouldStartImmediately(configuration) {\n            return (status === 1 /* PreStartRecorderStatus.HadManualStart */ ||\n                (status === 0 /* PreStartRecorderStatus.None */ && !configuration.startSessionReplayRecordingManually));\n        },\n    };\n}\n//# sourceMappingURL=preStartStrategy.js.map","import { isSampled } from '@datadog/browser-rum-core';\nimport { monitorError } from '@datadog/browser-core';\nimport { isProfilingSupported } from '../domain/profiling/profilingSupported';\nimport { startProfilingContext } from '../domain/profiling/profilingContext';\nimport { lazyLoadProfiler } from './lazyLoadProfiler';\nexport function makeProfilerApi() {\n    let profiler;\n    function onRumStart(lifeCycle, hooks, configuration, sessionManager, viewHistory, createEncoder) {\n        const session = sessionManager.findTrackedSession(); // Check if the session is tracked.\n        if (!session) {\n            // No session tracked, no profiling.\n            // Note: No Profiling context is set at this stage.\n            return;\n        }\n        // Sampling (sticky sampling based on session id)\n        if (!isSampled(session.id, configuration.profilingSampleRate)) {\n            // No sampling, no profiling.\n            // Note: No Profiling context is set at this stage.\n            return;\n        }\n        // Listen to events and add the profiling context to them.\n        const profilingContextManager = startProfilingContext(hooks);\n        // Browser support check\n        if (!isProfilingSupported()) {\n            profilingContextManager.set({\n                status: 'error',\n                error_reason: 'not-supported-by-browser',\n            });\n            return;\n        }\n        lazyLoadProfiler()\n            .then((createRumProfiler) => {\n            if (!createRumProfiler) {\n                profilingContextManager.set({ status: 'error', error_reason: 'failed-to-lazy-load' });\n                return;\n            }\n            profiler = createRumProfiler(configuration, lifeCycle, sessionManager, profilingContextManager, createEncoder, viewHistory, undefined);\n            profiler.start();\n        })\n            .catch(monitorError);\n    }\n    return {\n        onRumStart,\n        stop: () => {\n            profiler === null || profiler === void 0 ? void 0 : profiler.stop();\n        },\n    };\n}\n//# sourceMappingURL=profilerApi.js.map","import { SKIPPED } from '@datadog/browser-core';\nimport { RumEventType } from '@datadog/browser-rum-core';\nexport function startProfilingContext(hooks) {\n    let currentContext = {\n        status: 'starting',\n    };\n    hooks.register(0 /* HookNames.Assemble */, ({ eventType }) => {\n        if (eventType !== RumEventType.VIEW &&\n            eventType !== RumEventType.LONG_TASK &&\n            eventType !== RumEventType.ACTION &&\n            eventType !== RumEventType.VITAL) {\n            return SKIPPED;\n        }\n        return {\n            type: eventType,\n            _dd: {\n                profiling: currentContext,\n            },\n        };\n    });\n    return {\n        get: () => currentContext,\n        set: (newContext) => {\n            currentContext = newContext;\n        },\n    };\n}\n//# sourceMappingURL=profilingContext.js.map","import { getGlobalObject } from '@datadog/browser-core';\nexport function isProfilingSupported() {\n    const globalThis = getGlobalObject();\n    // This API might be unavailable in some browsers\n    const globalThisProfiler = globalThis.Profiler;\n    return globalThisProfiler !== undefined;\n}\n//# sourceMappingURL=profilingSupported.js.map","/*! js-cookie v3.0.8 | MIT */\nfunction assign (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n    for (var key in source) {\n      if (key === '__proto__') continue\n      target[key] = source[key];\n    }\n  }\n  return target\n}\n\nvar defaultConverter = {\n  read: function (value) {\n    if (value[0] === '\"') {\n      value = value.slice(1, -1);\n    }\n    return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n  },\n  write: function (value) {\n    return encodeURIComponent(value).replace(\n      /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n      decodeURIComponent\n    )\n  }\n};\n\nfunction init(converter, defaultAttributes) {\n  function set(name, value, attributes) {\n    if (typeof document === 'undefined') {\n      return\n    }\n\n    attributes = assign({}, defaultAttributes, attributes);\n\n    if (typeof attributes.expires === 'number') {\n      attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n    }\n    if (attributes.expires) {\n      attributes.expires = attributes.expires.toUTCString();\n    }\n\n    name = encodeURIComponent(name)\n      .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n      .replace(/[()]/g, escape);\n\n    var stringifiedAttributes = '';\n    for (var attributeName in attributes) {\n      if (!attributes[attributeName]) {\n        continue\n      }\n\n      stringifiedAttributes += '; ' + attributeName;\n\n      if (attributes[attributeName] === true) {\n        continue\n      }\n\n      // Considers RFC 6265 section 5.2:\n      // ...\n      // 3.  If the remaining unparsed-attributes contains a %x3B (\";\")\n      //     character:\n      // Consume the characters of the unparsed-attributes up to,\n      // not including, the first %x3B (\";\") character.\n      // ...\n      stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n    }\n\n    return (document.cookie =\n      name + '=' + converter.write(value, name) + stringifiedAttributes)\n  }\n\n  function get(name) {\n    if (typeof document === 'undefined' || (arguments.length && !name)) {\n      return\n    }\n\n    // To prevent the for loop in the first place assign an empty array\n    // in case there are no cookies at all.\n    var cookies = document.cookie ? document.cookie.split('; ') : [];\n    var jar = {};\n    for (var i = 0; i < cookies.length; i++) {\n      var parts = cookies[i].split('=');\n      var value = parts.slice(1).join('=');\n\n      try {\n        var found = decodeURIComponent(parts[0]);\n        if (!(found in jar)) jar[found] = converter.read(value, found);\n        if (name === found) {\n          break\n        }\n      } catch (_e) {\n        // Do nothing...\n      }\n    }\n\n    return name ? jar[name] : jar\n  }\n\n  return Object.create(\n    {\n      set: set,\n      get: get,\n      remove: function (name, attributes) {\n        set(\n          name,\n          '',\n          assign({}, attributes, {\n            expires: -1\n          })\n        );\n      },\n      withAttributes: function (attributes) {\n        return init(this.converter, assign({}, this.attributes, attributes))\n      },\n      withConverter: function (converter) {\n        return init(assign({}, this.converter, converter), this.attributes)\n      }\n    },\n    {\n      attributes: { value: Object.freeze(defaultAttributes) },\n      converter: { value: Object.freeze(converter) }\n    }\n  )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n\nexport { api as default };\n","/**\n * Standardized consent geo region detection.\n *\n * Single source of truth for mapping a Cloudflare cf-ipcountry country code to the\n * consent geo region used by the GTM Consent Initialization tag, plus the helpers for\n * sanitizing the raw header value and building the dataLayer payload.\n *\n * Consumed by elements-storefront, newvato, and landing-page-service so the\n * { consentCountryCode, consentGeoRegion, consentGeoSource } payload stays identical\n * across platforms. (sso-server renders the same payload server-side in Ruby and keeps\n * its own mirror of this mapping in lib/consent_geo_region.rb.)\n */\nimport consentGeoRegions from './consentGeoRegions.json' with { type: 'json' };\n// The country lists live in ./consentGeoRegions.json as the single, language-neutral\n// source of truth. It is shipped in the published package (dist/consentGeoRegions.json)\n// so other-language mirrors of this mapping that cannot consume this package at runtime\n// (e.g. sso-server's Ruby lib/consent_geo_region.rb) can read the same file and assert\n// parity against it in CI.\n//\n// eeaUkChCountryCodes includes:\n// - 27 EU member states\n// - EEA non-EU: IS, LI, NO\n// - UK (GB / UK alias) and Switzerland (CH) — grouped with EEA for consent purposes\n// - French outermost regions Cloudflare returns as distinct ISO codes (GDPR applies):\n//   AX (Åland Islands / FI), GP (Guadeloupe), MQ (Martinique), GF (French Guiana),\n//   RE (Réunion), YT (Mayotte), MF (Saint Martin, FR)\n// - BQ (Bonaire, Sint Eustatius and Saba — Dutch special municipalities, Dutch GDPR applies)\nexport const EEA_UK_CH_COUNTRY_CODES = consentGeoRegions.eeaUkChCountryCodes;\n// Cloudflare sends XX when it cannot identify the customer location, ?? when the header\n// is missing or empty, and T1 for Tor exit nodes (non-geographic).\n// Treating T1 as UNKNOWN keeps Tor traffic out of the ROW Consent Initialization path.\n// https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#cf-ipcountry\nexport const UNKNOWN_COUNTRY_INDICATORS = consentGeoRegions.unknownCountryIndicators;\nconst EEA_UK_CH_COUNTRIES = new Set(EEA_UK_CH_COUNTRY_CODES);\nconst UNKNOWN_INDICATORS = new Set(UNKNOWN_COUNTRY_INDICATORS);\nexport const CONSENT_GEO_SOURCE = 'cloudflare_cf-ipcountry';\nexport const MISSING_COUNTRY_CODE = '??';\n// Cloudflare country codes are 2-letter uppercase plus the documented sentinels (??, XX, T1).\n// Restricting to this shape prevents arbitrary header content (e.g. </script>) from breaking\n// out of an inline <script> when the payload is rendered server-side.\nconst COUNTRY_CODE_PATTERN = /^[A-Z0-9?]{2}$/;\nexport const getConsentGeoRegionFromCountryCode = (countryCode) => {\n    if (!countryCode || UNKNOWN_INDICATORS.has(countryCode)) {\n        return 'UNKNOWN';\n    }\n    if (countryCode === 'US') {\n        return 'US';\n    }\n    if (EEA_UK_CH_COUNTRIES.has(countryCode)) {\n        return 'EEA_UK_CH';\n    }\n    return 'ROW';\n};\nexport const sanitizeCountryCode = (raw) => {\n    if (!raw) {\n        return MISSING_COUNTRY_CODE;\n    }\n    return COUNTRY_CODE_PATTERN.test(raw) ? raw : MISSING_COUNTRY_CODE;\n};\nexport const buildConsentGeoPayload = (rawCountryCode) => {\n    const consentCountryCode = sanitizeCountryCode(rawCountryCode);\n    return {\n        consentCountryCode,\n        consentGeoRegion: getConsentGeoRegionFromCountryCode(consentCountryCode),\n        consentGeoSource: CONSENT_GEO_SOURCE\n    };\n};\n//# sourceMappingURL=consentGeo.js.map","import Cookies from 'js-cookie';\nexport { CONSENT_GEO_SOURCE, MISSING_COUNTRY_CODE, EEA_UK_CH_COUNTRY_CODES, UNKNOWN_COUNTRY_INDICATORS, getConsentGeoRegionFromCountryCode, sanitizeCountryCode, buildConsentGeoPayload } from './consentGeo.js';\nconst queue = [];\nexport var Consent;\n(function (Consent) {\n    Consent[\"statistics\"] = \"statistics\";\n    Consent[\"marketing\"] = \"marketing\";\n    Consent[\"necessary\"] = \"necessary\";\n    Consent[\"preferences\"] = \"preferences\";\n})(Consent || (Consent = {}));\nconst execute = () => {\n    while (queue.length) {\n        const cookiebotJob = queue.shift();\n        if (cookiebotJob) {\n            const { job, consent } = cookiebotJob;\n            // what to do if Cookiebot fail to load or blocked?\n            if (consented(consent)) {\n                job();\n            }\n        }\n    }\n};\nexport const deferRun = (job, consent) => {\n    if (typeof window !== 'undefined') {\n        queue.push({ job, consent });\n        if (window.Cookiebot && window.Cookiebot.hasResponse) {\n            execute();\n        }\n    }\n};\nif (typeof window !== 'undefined') {\n    window.addEventListener('CookiebotOnAccept', () => {\n        execute();\n    }, false);\n}\nexport const checkCookieConsent = (CookieString, consent) => {\n    if (!CookieString) {\n        return false;\n    }\n    // For user outside of targeted area\n    if (CookieString === '-1') {\n        return true;\n    }\n    try {\n        const parsedCookieConsent = JSON.parse(CookieString.replace(/%2c/g, ',')\n            .replace(/'/g, '\"')\n            .replace(/([{\\[,])\\s*([a-zA-Z0-9_]+?):/g, '$1\"$2\":'));\n        return parsedCookieConsent && !!parsedCookieConsent[consent];\n    }\n    catch (e) {\n        return false;\n    }\n};\nexport const consented = (consent) => {\n    if (!(typeof window !== 'undefined')) {\n        return false;\n    }\n    // when cookiebot is avaiable use it\n    if (!!(window && window.Cookiebot && window.Cookiebot.consent)) {\n        return !!window.Cookiebot.consent[consent];\n    }\n    // manually parse cookie if Cookiebot is not avaiable\n    const CookieConsent = Cookies.get('CookieConsent');\n    return checkCookieConsent(CookieConsent, consent);\n};\nexport const userHasOptedOutOfCookiesForCategory = (consent) => {\n    if (!(typeof window !== 'undefined')) {\n        return false;\n    }\n    // when cookiebot is avaiable\n    if (!!(window && window.Cookiebot && window.Cookiebot.consent)) {\n        if (window.Cookiebot.hasResponse) {\n            return !window.Cookiebot.consent[consent];\n        }\n        else {\n            return false;\n        }\n    }\n    // manually parse cookie if Cookiebot is not avaiable\n    const CookieConsent = Cookies.get('CookieConsent');\n    if (!CookieConsent) {\n        return false;\n    }\n    // For user outside of targeted area\n    if (CookieConsent === '-1') {\n        return false;\n    }\n    try {\n        const parsedCookieConsent = JSON.parse(CookieConsent.replace(/%2c/g, ',')\n            .replace(/'/g, '\"')\n            .replace(/([{\\[,])\\s*([a-zA-Z0-9_]+?):/g, '$1\"$2\":'));\n        return parsedCookieConsent && !parsedCookieConsent[consent];\n    }\n    catch (e) {\n        return false;\n    }\n};\n//# sourceMappingURL=index.js.map","import {\n  Consent as packageConsent,\n  consented as packageConsented,\n  deferRun as packageDeferRun,\n  userHasOptedOutOfCookiesForCategory as packageUserOptedOut,\n} from '@envato/cookiebot-wrapper'\n\nconst checkConsentTypePresent = (consentType) => {\n  if (!consentType) {\n    throw Error('Consent type unspecified')\n  }\n}\n// Wrapping these allows for more readable mocks in tests\n// Also allows us to make sure we are always passing consentType\nexport const Consent = packageConsent\nexport const consented = (consentType) => {\n  checkConsentTypePresent(consentType)\n  return packageConsented(consentType)\n}\nexport const deferRun = (job, consentType) => {\n  checkConsentTypePresent(consentType)\n  return packageDeferRun(job, consentType)\n}\nexport const userHasOptedOutOfCookiesForCategory = (consentType) => {\n  checkConsentTypePresent(consentType)\n  return packageUserOptedOut(consentType)\n}\n","import { datadogRum } from '@datadog/browser-rum'\nimport { TrackingConsent } from '@datadog/browser-core'\nimport { Consent, consented } from '../utils/consent.js'\n\nwindow.addEventListener('CookiebotOnConsentReady', () => {\n  if (!window.datadogEnvironment) return\n\n  datadogRum.init({\n    applicationId: '00847d7d-72d5-4ede-91ac-2efdc9af7278',\n    clientToken: 'pubb2da50a99f90a160463bb01ac07a1019',\n    site: 'datadoghq.com',\n    service: 'market-storefront',\n    env: window.datadogEnvironment,\n    version: window.datadogVersion,\n    sessionSampleRate: window.datadogSampleRate,\n    sessionReplaySampleRate: 0,\n    trackUserInteractions: true,\n    defaultPrivacyLevel: 'mask-user-input',\n    trackingConsent: consented(Consent.statistics) ? TrackingConsent.GRANTED : TrackingConsent.NOT_GRANTED,\n  })\n})\n"],"names":["makePublicApi","stub","publicApi","version","onReady","callback","Object","defineProperty","get","_tools_monitor__WEBPACK_IMPORTED_MODULE_1__","pM","enumerable","defineGlobal","global","name","api","existingGlobalVariable","q","_tools_display__WEBPACK_IMPORTED_MODULE_2__","Vy","warn","forEach","fn","_tools_catchUserErrors__WEBPACK_IMPORTED_MODULE_0__","y","addEventListener","configuration","eventTarget","eventName","listener","options","addEventListeners","eventNames","once","capture","passive","listenerWithMonitor","_tools_monitor__WEBPACK_IMPORTED_MODULE_0__","dm","event","isTrusted","__ddIsTrusted","allowUntrustedEvents","stop","listenerTarget","window","EventTarget","prototype","add","_tools_getZoneJsOriginalValue__WEBPACK_IMPORTED_MODULE_1__","W","remove","call","fetch","input","init","_tools_getZoneJsOriginalValue__WEBPACK_IMPORTED_MODULE_0__","_tools_globalObject__WEBPACK_IMPORTED_MODULE_1__","VZ","PageExitReason","HIDDEN","UNLOADING","PAGEHIDE","FROZEN","createPageMayExitObservable","_tools_observable__WEBPACK_IMPORTED_MODULE_0__","cP","observable","_tools_globalObject__WEBPACK_IMPORTED_MODULE_2__","Wq","stopListeners","_addEventListener__WEBPACK_IMPORTED_MODULE_3__","l","type","document","visibilityState","notify","reason","stopBeforeUnloadListener","isPageExitReason","_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_1__","KQ","includes","runOnReadyState","expectedReadyState","readyState","_tools_utils_functionUtils__WEBPACK_IMPORTED_MODULE_0__","_addEventListener__WEBPACK_IMPORTED_MODULE_1__","asyncRunOnReadyState","Promise","resolve","getConnectivity","_a","navigator","_tools_globalObject__WEBPACK_IMPORTED_MODULE_0__","J2","status","onLine","interfaces","connection","undefined","effective_type","effectiveType","NO_ERROR_STACK_PRESENT_MESSAGE","computeErrorBase","originalError","stackTrace","source","useFallbackStack","nonErrorPrefix","isErrorInstance","isError","_tools_stackTrace_computeStackTrace__WEBPACK_IMPORTED_MODULE_2__","T","message","computeMessage","stack","_tools_stackTrace_handlingStack__WEBPACK_IMPORTED_MODULE_3__","Yn","computeRawError","handlingStack","componentStack","startClocks","handling","causes","flattenErrorCauses","fingerprint","tryToGetFingerprint","context","tryToGetErrorContext","_tools_serialisation_jsonStringify__WEBPACK_IMPORTED_MODULE_1__","s","_tools_serialisation_sanitize__WEBPACK_IMPORTED_MODULE_0__","a","String","dd_fingerprint","_tools_utils_typeUtils__WEBPACK_IMPORTED_MODULE_4__","O","dd_context","error","Error","toString","parentSource","currentCause","cause","length","causeBase","push","AGENT","CONSOLE","CUSTOM","LOGGER","NETWORK","SOURCE","REPORT","SESSION_TIME_OUT_DELAY","_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__","MA","SESSION_COOKIE_EXPIRATION_DELAY","$H","COOKIE","MEMORY","LOCAL_STORAGE","buildTags","env","service","datacenter","sdkVersion","variant","tags","buildTag","key","rawValue","tag","RegExp","supportUnicodePropertyEscapes","test","hasForbiddenCharacters","_tools_display__WEBPACK_IMPORTED_MODULE_0__","xG","fH","replace","sanitizeTag","TelemetryType","ALLOWED_FRAME_URLS","TELEMETRY_EXCLUDED_SITES","intakeSites","R8","KG","telemetryObservable","getTelemetryObservable","tools_observable","dX","startTelemetry","telemetryService","hooks","enabled","metricsEnabled","metricSampleRate","maxTelemetryEventsPerPage","alreadySentEventsByKind","telemetryEnabled","site","numberUtils","ic","telemetrySampleRate","telemetryEnabledPerType","TelemetryType_LOG","TelemetryType_CONFIGURATION","telemetryConfigurationSampleRate","TelemetryType_USAGE","telemetryUsageSampleRate","metric","runtimeEnvInfo","is_local_file","globalObject","location","protocol","is_worker","subscribe","rawEvent","metricName","kind","alreadySentEvents","Set","size","stringifiedEvent","jsonStringify","has","defaultTelemetryEventAttributes","triggerHook","startTime","timeUtils","M8","relative","abstractHooks","ug","toTelemetryEvent","sendToExtension","b","unbuffer","monitor","Bd","addTelemetryError","date","timeStamp","_dd","format_version","telemetry","mergeInto","kg","runtime_env","connectivity","sdk_setup","ddtags","m5","join","experimental_features","Array","from","experimentalFeatures","q7","startTelemetryCollection","cleanupTasks","eventBridge","d0","bridge","Y9","telemetrySubscription","send","unsubscribe","endpoints","rumEndpointBuilder","replica","Bb","isTelemetryReplicationAllowed","telemetryBatch","batch","X","encoder","N","request","httpRequest","sA","functionUtils","flushController","tO","pageMayExitObservable","_T","sessionExpireObservable","task","startTelemetryTransport","addTelemetryDebug","oO","display","bP","debug","e","formatError","addTelemetryConfiguration","addTelemetryMetrics","addTelemetryUsage","usage","bJ","computeStackTrace","scrubCustomerFrames","e6","filter","frame","url","some","allowedFrameUrl","startsWith","TrackingConsent","GRANTED","NOT_GRANTED","createTrackingConsentState","currentConsent","tryToInit","trackingConsent","update","isGranted","DISCARDED","SKIPPED","callbacks","register","hookName","unregister","cb","param","hookCallbacks","results","result","_mergeInto__WEBPACK_IMPORTED_MODULE_0__","catchUserErrors","errorMsg","args","err","_display__WEBPACK_IMPORTED_MODULE_0__","ConsoleApiName","log","info","globalConsole","console","originalConsoleMethods","keys","PREFIX","bind","DOCS_ORIGIN","DOCS_TROUBLESHOOTING","createIdentityEncoder","output","outputBytesCount","isAsync","isEmpty","write","data","additionalEncodedBytesCount","_utils_byteUtils__WEBPACK_IMPORTED_MODULE_0__","WW","finish","this","finishSync","rawBytesCount","pendingData","estimateEncodedBytesCount","ExperimentalFeature","enabledExperimentalFeatures","initFeatureFlags","enableExperimentalFeatures","isArray","flag","_utils_objectUtils__WEBPACK_IMPORTED_MODULE_0__","Rj","isExperimentalFeatureEnabled","featureName","getExperimentalFeatures","getZoneJsOriginalValue","target","browserWindow","_globalObject__WEBPACK_IMPORTED_MODULE_0__","original","Zone","__symbol__","getGlobalObject","globalThis","configurable","_dd_temp_","self","isWorkerEnvironment","instrumentMethod","targetPrototype","method","onPreCall","computeHandlingStack","_utils_functionUtils__WEBPACK_IMPORTED_MODULE_2__","stopped","instrumentation","apply","arguments","parameters","postCallCallback","_monitor__WEBPACK_IMPORTED_MODULE_1__","um","onPostCall","_stackTrace_handlingStack__WEBPACK_IMPORTED_MODULE_3__","uC","instrumentSetter","property","after","originalDescriptor","getOwnPropertyDescriptor","set","stoppedInstrumentation","value","_timer__WEBPACK_IMPORTED_MODULE_0__","wg","instrumentationWrapper","destination","circularReferenceChecker","WeakSet","hasAlreadyBeenSeen","array","indexOf","createCircularReferenceChecker","Date","getTime","flags","ignoreCase","multiline","sticky","unicode","merged","i","_utils_typeUtils__WEBPACK_IMPORTED_MODULE_0__","P","hasOwnProperty","deepClone","combine","sources","Map","mockable","onMonitorErrorCollected","debugMode","startMonitorErrorCollection","newOnMonitorErrorCollected","setDebugMode","newDebugMode","callMonitored","monitorError","displayIfDebugEnabled","queueMicrotask","nativeImplementation","then","Observable","constructor","onFirstSubscribe","observers","observer","addObserver","removeObserver","onLastUnsubscribe","other","mergeObservables","observables","globalObservable","subscriptions","map","subscription","BufferedObservable","maxBufferSize","super","buffer","shift","closed","requestIdleCallback","opts","cancelIdleCallback","id","start","_utils_timeUtils__WEBPACK_IMPORTED_MODULE_2__","x3","timeoutId","didTimeout","timeRemaining","Math","max","DJ","requestIdleCallbackShim","payload","__ddBrowserSdkExtensionCallback","replacer","space","JSON","stringify","restoreObjectPrototypeToJson","detachToJsonMethod","restoreArrayPrototypeToJson","restoreValuePrototypeToJson","getPrototypeOf","restoreValueToJson","object","objectToJson","toJSON","_utils_functionUtils__WEBPACK_IMPORTED_MODULE_0__","sanitize","maxCharacterCount","_jsonStringify__WEBPACK_IMPORTED_MODULE_2__","M","containerQueue","visitedObjectsWithPath","WeakMap","sanitizedData","sanitizeProcessor","serializedSanitizedData","accumulatedCharacterCount","containerToProcess","separatorLength","targetData","path","warnOverCharacterLimit","parentPath","queue","sourceToSanitize","tryToApplyToJSON","description","sanitizePrimitivesAndFunctions","sanitizedSource","sanitizeObjects","sourceAsObject","currentPath","Event","currentTarget","match","changeType","UNKNOWN_FUNCTION","ex","_b","stackProperty","tryToGetString","exString","slice","split","line","stackFrame","parts","CHROME_LINE_RE","exec","isNative","isEval","submatch","CHROME_EVAL_RE","column","func","parseChromeLine","CHROME_ANONYMOUS_FUNCTION_RE","parseChromeAnonymousLine","WINJS_LINE_RE","parseWinLine","GECKO_LINE_RE","GECKO_EVAL_RE","parseGeckoLine","isWronglyReportingCustomErrorsCache","DatadogTestCustomError","customError","nativeError","errConstructor","isNonNativeClassPrototype","isWronglyReportingCustomErrors","constructors","currentPrototype","constructorName","fileUrl","filePosition","candidate","computeStackTraceFromOnErrorMessage","messageObj","ERROR_TYPES_RE","tryToParseMessage","createHandlingStack","formattedStack","_monitor__WEBPACK_IMPORTED_MODULE_0__","_computeStackTrace__WEBPACK_IMPORTED_MODULE_1__","toStackTraceString","formatErrorMessage","setTimeout","delay","_getZoneJsOriginalValue__WEBPACK_IMPORTED_MODULE_0__","_globalObject__WEBPACK_IMPORTED_MODULE_2__","clearTimeout","setInterval","clearInterval","removeItem","item","index","splice","isNonEmptyArray","isChromium","detectBrowserCached","isSafari","browserCache","userAgent","chrome","vendor","detectBrowser","HAS_MULTI_BYTES_CHARACTERS","computeBytesCount","TextEncoder","encode","Blob","concatBuffers","buffers","reduce","total","Uint8Array","offset","throttle","wait","needLeadingExecution","leading","needTrailingExecution","trailing","pendingExecutionWithParameters","pendingTimeoutId","inWaitPeriod","throttled","cancel","noop","performDraw","threshold","random","round","num","decimals","toFixed","isPercentage","isNumber","tryJsonParse","text","parse","shallowClone","objectHasValue","isEmptyObject","mapValues","newObject","findLast","predicate","objectValues","values","objectEntries","entries","isServerError","tryToClone","response","clone","ONE_HOUR","ONE_YEAR","relativeToClocks","getCorrectedTimeStamp","timeStampToClocks","getRelativeTime","relativeTime","correctedOrigin","dateNow","performance","now","getNavigationStart","addDuration","getTimeStamp","currentDrift","toServerDuration","duration","_numberUtils__WEBPACK_IMPORTED_MODULE_0__","Et","LI","timeStampNow","relativeNow","clocksNow","clocksOrigin","elapsed","end","timestamp","looksLikeRelativeTime","time","navigationStart","timing","timeOrigin","getType","isIndexableObject","normalizeUrl","buildUrl","href","isValidUrl","getPathName","pathname","base","URL","getPristineGlobalObjectCache","iframe","pristineWindow","createElement","style","body","appendChild","contentWindow","getPristineWindow","END_OF_TIMES","Infinity","cleanupHistoriesInterval","createValueHistory","expireDelay","maxEntries","yb","clearExpiredValues","oldTimeThreshold","$S","endTime","pop","entry","_utils_arrayUtils__WEBPACK_IMPORTED_MODULE_1__","Ai","close","unshift","find","returnInactive","closeActive","latestEntry","findAll","Gw","getEntries","reset","delete","vG","MESSAGE_BYTES_LIMIT","createBatch","upsertBuffer","flushSubscription","flushObservable","upsertMessages","pageMightExit","_browser_pageMayExitObservable__WEBPACK_IMPORTED_MODULE_2__","Kp","sendOnExit","encoderResult","formatPayloadFromEncoder","pendingMessages","Boolean","bytesCount","_tools_utils_byteUtils__WEBPACK_IMPORTED_MODULE_4__","flush","addOrUpdate","serializedMessage","_tools_serialisation_jsonStringify__WEBPACK_IMPORTED_MODULE_3__","estimatedMessageBytesCount","Xs","hasMessageFor","removedMessage","messageBytesCount","notifyAfterRemoveMessage","notifyBeforeAddMessage","notifyAfterAddMessage","realMessageBytesCount","upsert","encoding","getEventBridge","eventBridgeGlobal","DatadogEventBridge","getCapabilities","getPrivacyLevel","getAllowedWebViewHosts","eventType","viewId","view","bridgeSupports","capability","canUseEventBridge","currentHost","hostname","allowedHost","endsWith","MESSAGES_LIMIT","createFlushController","forcedFlushReason","preparePageExitFlushObservable","_tools_observable__WEBPACK_IMPORTED_MODULE_1__","pageMayExitSubscription","sessionExpireSubscription","durationLimitTimeoutId","currentBytesCount","currentMessagesCount","flushReason","messagesCount","cancelDurationLimitTimeout","_tools_timer__WEBPACK_IMPORTED_MODULE_2__","_httpRequest__WEBPACK_IMPORTED_MODULE_4__","AK","messageBytesCountDiff","MAX_QUEUE_BYTES_COUNT","byteUtils","iH","sendWithRetryStrategy","state","sendStrategy","trackType","reportError","requestObservable","transportStatus","queuedPayloads","bandwidthMonitor","canHandle","onSuccess","retryQueuedPayloads","onFailure","enqueue","bandwidth","stats","scheduleRetry","timer","first","dequeue","currentBackoffTime","min","responseUtils","G","shouldRetryRequest","ongoingRequestCount","retry","count","lastFailureStatus","isFull","queueFullReported","error_types","g","previousQueue","newPayloadQueue","RECOMMENDED_REQUEST_BYTES_LIMIT","createHttpRequest","endpointBuilders","bytesLimit","retryState","ongoingByteCount","endpointBuilder","onResponse","fetchStrategy","sendBeaconStrategy","sendBeacon","beaconUrl","build","hasReportedBeaconError","Dx","reportBeaconError","fetchUrl","h","mode","catch","trackRuntimeError","handleRuntimeError","rawError","error_error","As","stopInstrumentingOnError","H","tools_globalObject","errorObj","stopInstrumentingOnUnhandledRejection","instrumentUnhandledRejection","defineContextMethod","getStrategy","contextName","methodName","telemetry_telemetry","Q6","feature","CustomerContextKey","ContextManagerMethod","generateUUID","placeholder","parseInt","COMMA_SEPARATED_KEY_VALUE","findCommaSeparatedValue","rawString","lastIndex","safeTruncate","suffix","lastChar","charCodeAt","correctedLength","displayAlreadyInitializedError","sdkName","initConfiguration","silentMultipleInit","RumEventType","ACTION","ERROR","LONG_TASK","VIEW","RESOURCE","VITAL","RumLongTaskEntryType","LONG_ANIMATION_FRAME","ViewLoadingType","ActionType","FrustrationType","VitalType","startVitalCollection","lifeCycle","pageStateHistory","customVitalsState","addDurationVital","vital","wasInPageStateDuringPeriod","isValid","processVital","addOperationStepVital","stepType","failureReason","sr","R9","FEATURE_OPERATION_VITAL","operationKey","startDurationVital","ref","vitalState","vitalsByReference","stopDurationVital","nameOrRef","vitalsByName","reference","__dd_vital_reference","stopCallback","vitalStart","stopOptions","stopClocks","vk","buildDurationVital","vitalId","vitalData","Zj","step_type","operation_key","failure_reason","rawRumEvent","domainContext","callPluginsMethod","plugins","parameter","plugin","CONTEXT_STORE_KEY_PREFIX","storageListeners","storeContextManager","contextManager","productKey","customerDataType","storageKey","buildStorageKey","setContext","getFromStorage","changeObservable","localStorage","setItem","getContext","contextFromStorage","rawContext","getItem","objectUtils","RI","ensureProperties","propertiesConfig","newContext","required","isDefined","createContextManager","Go","maybeContext","typeUtils","checkContext","clearContext","setContextProperty","removeContextProperty","buildGlobalContextManager","buildUserContextManager","email","buildAccountContextManager","fetchObservable","responseBodyActionGetters","initFetchObservable","responseBodyAction","methodFromParams","Request","toUpperCase","urlPolyfill","l2","isAbortedOnStart","signal","aborted","responsePromise","async","startContext","isAborted","DOMException","code","ABORT_ERR","responseType","responseBodyCondition","action","getter","clonedResponse","bytes","stream","reader","getReader","chunks","read","done","collectStreamBody","wh","readBytesFromStream","responseBody","TextDecoder","decode","_c","afterSend","beforeSend","setCookie","setTime","expires","toUTCString","sameSite","crossSite","domain","secure","partitioned","cookie","getCookie","getCookies","findAllCommaSeparatedValues","initCookieParsed","getCurrentSiteCache","getInitCookie","findCommaSeparatedValues","deleteCookie","getCurrentSite","referrer","defaultHostName","c$","getCookieDefaultHostName","testCookieName","testCookieValue","domainLevels","candidateDomain","cookieNamePrefix","SYNTHETICS_TEST_ID_COOKIE_NAME","SYNTHETICS_RESULT_ID_COOKIE_NAME","SYNTHETICS_INJECTS_RUM_COOKIE_NAME","SYNTHETICS_CONTEXT_COOKIE_NAME","willSyntheticsInjectRum","_DATADOG_SYNTHETICS_INJECTS_RUM","getSyntheticsContext","raw","rawGlobal","_DATADOG_SYNTHETICS_RUM_CONTEXT","rawCookie","XU","decodeURIComponent","test_id","_DATADOG_SYNTHETICS_PUBLIC_ID","result_id","_DATADOG_SYNTHETICS_RESULT_ID","getRawSyntheticsContext","isSyntheticsTest","createHooks","SESSION_ENTRY_REGEXP","getExpiredSessionState","previousSessionState","expiredSessionState","isExpired","trackAnonymousUser","anonymousId","isSessionInNotStartedState","session","isSessionStarted","isSessionInExpiredState","sessionState","created","Number","sessionConstants","AQ","expire","expandSessionState","HB","toSessionString","polyfills","WP","toSessionState","sessionString","isValidSessionString","matches","selectCookieStrategy","cookieOptions","useSecureSessionCookie","usePartitionedCrossSiteSessionCookie","trackSessionAcrossSubdomains","currentSite","buildCookieOptions","isCookieCorrectlySet","areCookiesAuthorized","Q_","initCookieStrategy","cookieStore","isLockEnabled","browserDetection","F2","persistSession","storeSessionCookie","retrieveSession","retrieveSessionCookie","expireSession","cookieStoreStrategy","oldSessionId","oldRumType","oldLogsType","tryOldCookiesMigration","defaultTimeout","sessionStateString","betaEncodeCookieOptions","c","encodeCookieOptions","_P","cookies","reverse","retrieveSessionCookieFromEncodedCookie","byte","SESSION_COOKIE_VERSION","initLocalStorageStrategy","persistInLocalStorage","retrieveSessionFromLocalStorage","expireSessionFromLocalStorage","LOCK_SEPARATOR","bufferedOperations","ongoingOperations","processSessionStoreOperations","operations","sessionStoreStrategy","numberOfRetries","persistWithLock","lock","currentLock","retrieveStore","isLockExpired","next","currentStore","retryLater","nx","processedSession","process","sessionStore","currentNumberOfRetries","nextOperations","MEMORY_SESSION_STORE_KEY","initMemorySessionStoreStrategy","persistInMemory","expireSessionFromMemory","retrieveFromMemory","yG","selectSessionStoreStrategyType","sessionPersistence","persistenceList","allowFallbackToLocalStorage","normalizePersistenceList","persistence","strategyType","selectStrategyForPersistence","testKey","retrievedId","selectLocalStorageStrategy","startSessionStore","sessionStoreStrategyType","computeTrackingType","getSessionStoreStrategy","renewObservable","expireObservable","sessionStateUpdateObservable","watchSessionTimeoutId","synchronizeSession","sessionCache","startSession","throttledExpandOrRenewSession","cancelExpandOrRenewSession","n","synchronizedSession","trackingType","expandOrRenewSessionState","hasSessionInCache","renewSessionInCache","isSessionInCacheOutdated","previousState","newState","expandOrRenewSession","expandSession","getSession","restartSession","hasConsent","updateSessionState","partialSessionState","isMatchOption","itemType","matchList","list","useStartsWith","EXTENSION_PREFIXES","containsExtensionUrl","str","prefix","isAllowedTrackingOrigins","errorStack","B","windowOrigin","origin","allowedTrackingOrigins","windowLocation","trimmedLine","trim","isUnsupportedExtensionEnvironment","isAllowed","createEndpointBuilder","extraParameters","buildUrlWithParameters","proxy","normalizedProxyUrl","encodeURIComponent","host","buildEndpointHost","createEndpointUrlWithParametersBuilder","clientToken","internalAnalyticsSubdomain","concat","buildEndpointParameters","NW","usePciIntake","$A","TC","domainParts","extension","computeTransportConfiguration","validateSource","logsEndpointBuilder","profilingEndpointBuilder","sessionReplayEndpointBuilder","exposuresEndpointBuilder","flagEvaluationEndpointBuilder","computeEndpointBuilders","replicaConfiguration","applicationId","computeReplicaConfiguration","DefaultPrivacyLevel","ALLOW","MASK","MASK_USER_INPUT","MASK_UNLESS_ALLOWLISTED","TraceContextInjection","ALL","SAMPLED","isString","tagName","isSampleRate","sampleRate","fp","validateAndBuildConfiguration","_d","_e","_f","_g","_h","_j","_k","sessionSampleRate","w","storeContextsAcrossPages","DEFAULT_PROPAGATOR_TYPES","DEFAULT_TRACKED_RESOURCE_HEADERS","validateAndBuildRumConfiguration","trackFeatureFlagsForEvents","sessionReplaySampleRate","traceSampleRate","excludedActivityUrls","allowedTracingUrls","tracingOptions","option","normalizedOption","normalizeTracingOption","validateAndBuildTracingOptions","baseConfiguration","allowedGraphQlUrls","graphQlOptions","trackPayload","trackResponseErrors","validateAndBuildGraphQlOptions","actionNameAttribute","betaTrackActionsInShadowDom","startSessionReplayRecordingManually","rulePsr","workerUrl","compressIntakeRequests","trackUserInteractions","trackViewsManually","trackResources","trackResourceHeaders","validateAndBuildTrackResourceHeaders","trackLongTasks","trackBfcacheViews","trackEarlyRequests","subdomain","defaultPrivacyLevel","enablePrivacyForActionName","traceContextInjection","profilingSampleRate","propagateTraceBaggage","getSelectedTracingPropagators","usedTracingPropagators","arrayUtils","EI","propagatorTypes","propagatorType","VALID_HEADER_LOCATIONS","extractor","toLowerCase","hasGraphQlResponseErrorsTracking","serializeRumConfiguration","baseSerializedConfiguration","session_sample_rate","telemetry_sample_rate","telemetry_configuration_sample_rate","telemetry_usage_sample_rate","use_before_send","use_partitioned_cross_site_session_cookie","use_secure_session_cookie","use_proxy","silent_multiple_init","track_session_across_subdomains","track_anonymous_user","session_persistence","allow_fallback_to_local_storage","store_contexts_across_pages","allow_untrusted_events","tracking_consent","use_allowed_tracking_origins","beta_encode_cookie_options","sdk_version","session_replay_sample_rate","start_session_replay_recording_manually","trace_sample_rate","trace_context_injection","propagate_trace_baggage","action_name_attribute","use_allowed_tracing_urls","use_allowed_graph_ql_urls","use_track_graph_ql_payload","use_track_graph_ql_response_errors","selected_tracing_propagators","default_privacy_level","enable_privacy_for_action_name","use_excluded_activity_urls","use_worker_url","compress_intake_requests","track_views_manually","track_user_interactions","track_resources","track_long_task","track_bfcache_views","track_early_requests","getConfigurationTelemetry","track_feature_flags_for_events","remote_configuration_id","remoteConfigurationId","profiling_sample_rate","use_remote_configuration_proxy","remoteConfigurationProxy","track_resource_headers","extractRegexMatch","regexResult","NAME_SHORTHAND_FIRST_CHAR_REGEX","NAME_SHORTHAND_CHAR_REGEX","DIGIT_REGEX","UNICODE_CHAR_REGEX","TOKEN_PREDICATE","char","parsingContext","quote","escapeSequence","ALLOWED_NEXT_TOKENS","ALLOWED_SELECTOR_TOKENS","ALLOWED_SELECTOR_DELIMITER_TOKENS","isValidEscapeSequence","ESCAPED_CHARS","f","r","t","resolveEscapeSequence","fromCharCode","SUPPORTED_FIELDS","fetchAndApplyRemoteConfiguration","supportedContextManagers","rumInitConfiguration","metrics","increment","initMetrics","fetchResult","buildEndpoint","ok","remoteConfiguration","json","rum","fetchRemoteConfiguration","rumRemoteConfiguration","appliedConfiguration","resolveConfigurationProperty","resolveContextProperty","rcSerializedType","resolveRegex","resolveDynamicOption","LG","contextItems","strategy","resolvedValue","resolveCookieValue","resolveDomValue","resolveJsValue","resolveLocalStorageValue","resolvedExtractor","extractValue","selector","attribute","element","querySelector","isForbidden","domValue","getAttribute","textContent","current","pathParts","selectors","currentToken","previousToken","currentSelector","token","parseJsonPath","pathPart","applyRemoteConfiguration","Gk","pattern","createPreStartStrategy","ignoreInitIfSyntheticsWillInjectRum","startDeflateWorker","trackingConsentState","doStartRum","bufferApiCalls","drain","arg","createBoundedBuffer","globalContext","preStartRum_bufferContextCalls","userContext","accountContext","firstStartViewCall","deflateWorker","cachedInitConfiguration","cachedConfiguration","trackingConsentStateSubscription","tryStartRum","emptyContext","initialViewOptions","a5","startRumResult","doInit","eventBridgeAvailable","overrideInitConfigurationForBridge","Rr","Aq","user","getInternalContext","stopSession","addTiming","setLoadingTime","callTimestamp","startView","setViewName","setViewContext","setViewContextProperty","getViewContext","addAction","startAction","stopAction","startResource","stopResource","addError","providedError","addFeatureFlagEvaluation","preStartContextManager","TAB_ID_STORAGE_KEY","cachedTabId","startTabContext","tabId","existingId","sessionStorage","newId","getOrCreateIdInSessionStorage","retrieveOrCreateTabId","tab","getMutationObserverConstructor","MutationObserver","patchedInstance","originalInstance","LifeCycle","eventCallbacks","VIEW_CONTEXT_TIME_OUT_DELAY","xhrObservable","xhrContexts","initXhrObservable","stopInstrumentingStart","XMLHttpRequest","openXhr","stopInstrumentingSend","xhr","requestBody","hasBeenReported","stopInstrumentingOnReadyStateChange","DONE","onEnd","unsubscribeLoadEndListener","completeContext","sendXhr","stopInstrumentingAbort","abortXhr","createXhrObservable","ResourceType","RequestType","FETCH","XHR","FAKE_INITIAL_DOCUMENT","RESOURCE_TYPES","initiatorType","_","computeResourceEntryType","AY","L2","isType","areInOrder","numbers","isResourceEntryRequestType","computeResourceEntryDetails","hasValidResourceEntryTimings","fetchStart","workerStart","redirectStart","redirectEnd","domainLookupStart","domainLookupEnd","connectStart","secureConnectionStart","connectEnd","requestStart","responseStart","responseEnd","details","download","formatTiming","first_byte","worker","connect","ssl","dns","redirect","hasValidResourceEntryDuration","areCommonTimingsInOrder","areRedirectionTimingsInOrder","hasRedirection","computeResourceEntryProtocol","nextHopProtocol","computeResourceEntryDeliveryType","deliveryType","computeResourceEntrySize","encodedBodySize","decodedBodySize","transferSize","encoded_body_size","decoded_body_size","transfer_size","isAllowedRequestUrl","Ih","every","isIntakeUrl","TRACK_INTAKE_REQUESTS","DATA_URL_REGEX","sanitizeIfLongDataUrl","lengthLimit","dataUrlMatchArray","substring","sampleDecisionCache","isSampled","sessionId","cachedDecision","decision","BigInt","identifier","knuthFactor","twoPow64","sampleUsingKnuthFactor","createSpanIdentifier","createIdentifier","bits","crypto","getRandomValues","Uint32Array","radix","high","low","mod","floor","toPaddedHexadecimalString","padStart","clearTracingIfNeeded","traceId","spanId","traceSampled","injectHeadersIfTracingAllowed","sessionManager","inject","findTrackedSession","tracingOption","tracingHeaders","assign","traceparent","tracestate","b3","baggageItems","userId","accountId","baggageHeader","makeTracingHeaders","extractGraphQlMetadata","graphQlConfig","metadata","rawMetadata","graphqlBody","query","operationName","variables","extractFromBody","searchParams","variablesParam","extractFromUrlQueryParams","operationType","trimmedQuery","sanitizeGraphQlMetadata","extractGraphQlRequestMetadata","responseErrors","responseText","responseObj","errors","locations","extensions","parseGraphQlResponse","error_count","findGraphQlConfiguration","graphQlOption","nextRequestIndex","startRequestCollection","tracer","traceFetch","headers","append","Headers","header","traceXhr","setRequestHeader","startTracer","requestIndex","getNextRequestIndex","trackXhr","trackFetch","discardNegativeDuration","isTextNode","node","nodeType","Node","TEXT_NODE","isElementNode","ELEMENT_NODE","isNodeShadowHost","shadowRoot","isNodeShadowRoot","DOCUMENT_FRAGMENT_NODE","hasChildNodes","childNodes","forEachChildNodes","child","firstChild","nextSibling","getParentNode","parentNode","getParentElement","parentElement","retrieveFirstInputTiming","startTimeStamp","timingSent","removeEventListeners","evt","cancelable","entryType","processingStart","processingEnd","interactionId","sendTiming","sendTimingIfPointerIsNotCancelled","RumPerformanceEntryType","createPerformanceObservable","PerformanceObserver","handlePerformanceEntries","rumPerformanceEntries","isForbiddenResource","filterRumPerformanceEntries","isObserverInitializing","observe","NAVIGATION","PAINT","buffered","getEntriesByType","entryTypes","stopFirstInputTiming","resourceTimingBufferFullListener","clearResourceTimings","manageResourceTimingBufferFull","supportPerformanceTimingEvent","FIRST_INPUT","disconnect","supportedEntryTypes","EXCLUDED_MUTATIONS_ATTRIBUTE","waitPageActivityEnd","domMutationObservable","windowOpenObservable","pageActivityEndCallback","maxDuration","pageActivityObservable","createPageActivityObservable","pageActivityEndTimeoutId","hasCompleted","validationTimeoutId","complete","hadActivity","maxDurationTimeoutId","pageActivitySubscription","isBusy","lastChangeTime","firstRequestIndex","pendingRequestsCount","mutations","isExcludedMutation","notifyPageActivity","isExcludedUrl","startEvent","requestUrl","mutation","targetElement","DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE","ACTION_NAME_PLACEHOLDER","STABLE_ATTRIBUTES","GLOBALLY_UNIQUE_SELECTOR_GETTERS","getStableAttributeSelector","getIDSelector","UNIQUE_AMONG_CHILDREN_SELECTOR_GETTERS","classList","className","isGeneratedValue","CSS","escape","getTagNameSelector","getSelectorFromElement","isConnected","subtrees","rootNode","getRootNode","getAllSubtreeTargets","selectorParts","getSelectorFromElementWithinSubtree","currentElement","nodeName","globallyUniqueSelector","findSelector","isSelectorUniqueWithinRoot","combineSelector","isSelectorUniqueAmongSiblings","getPositionSelector","getAttributeSelector","attributeName","hasAttribute","getAttributeValueSelector","attributeValue","nthOfType","getNthOfTypeSelector","sibling","firstElementChild","nextElementSibling","selectorGetters","childSelector","selectorGetter","elementSelector","_element","querySelectorAll","_rootNode","currentElementSelector","isSiblingMatching","scopedSelector","previousElementSibling","parent","NodePrivacyLevel","IGNORE","PRIVACY_ATTR_NAME","CENSORED_IMG_MARK","FORM_PRIVATE_TAG_NAMES","INPUT","OUTPUT","TEXTAREA","SELECT","OPTION","DATALIST","OPTGROUP","getPrivacySelector","privacyLevel","getNodePrivacyLevel","cache","parentNodePrivacyLevel","nodePrivacyLevel","reducePrivacyLevel","getNodeSelfPrivacyLevel","childPrivacyLevel","inputElement","autocomplete","relAttribute","getLowerCaseAttribute","nameAttribute","propertyAttribute","shouldIgnoreElement","shouldMaskNode","isFormElement","isAllowlisted","shouldMaskAttribute","censorText","getTextContent","textNode","parentTagName","$DD_ALLOW","toLocaleLowerCase","trackEventCounts","isChildEvent","onChange","eventCounts","errorCount","longTaskCount","resourceCount","actionCount","frustrationCount","frustration","discarded","startEventTracker","history","valueHistory","qj","keyedEvents","cleanUpEvent","discardAll","sessionRenewalSubscription","historyEntry","existing","trackedEventData","extraData","finalData","counts","discard","getCounts","findId","stopAll","FILTERED_TAGNAMES","SAFE_ATTRIBUTES","getSelectorStringFromElement","allowedAttributes","classes","sort","getElementClassesString","attributes","extractSafeAttributesString","positionData","siblings","children","sameTypeSiblings","nthChild","computePositionDataString","MAX_DURATION_BETWEEN_CLICKS","createClickChain","firstClick","onFinalize","bufferedClicks","maxDurationBetweenClicksTimeoutId","appendClick","click","stopObservable","tryFinalize","dontAcceptMoreClick","isStopped","tryAppend","second","sqrt","pow","clientX","clientY","getActionNameFromElementProgrammatically","programmaticAttribute","elementWithAttribute","closestShadowAware","truncate","normalizeWhitespace","priorityStrategies","rumConfiguration","nodePrivacyLevelCache","labels","getActionNameFromTextualContent","nameSource","getActionNameFromStandardAttribute","labelledByAttribute","refElement","ShadowRoot","shadowElement","getElementById","ownerDocument","label","getTextualContent","fallbackStrategies","getActionNameFromElementForStrategies","strategies","recursionCounter","actionName","trimmedName","fixedMask","isContentEditable","userProgrammaticAttribute","USE_TREE_WALKER_FOR_ACTION_NAME","privacyEnabledActionName","walker","createTreeWalker","NodeFilter","SHOW_ELEMENT","SHOW_TEXT","rejectInvisibleOrMaskedElementsFilter","nextNode","currentNode","getComputedStyle","nodeSelfPrivacyLevel","FILTER_REJECT","visibility","contentVisibility","FILTER_ACCEPT","getTextualContentWithTreeWalker","innerText","removeTextFromElements","textToReplace","isSelectionEmpty","selection","getSelection","isCollapsed","isValidPointerEvent","Element","isPrimary","computeFrustration","clicks","rageClick","getUserActivity","scroll","isRage","addFrustration","isDead","hasError","hasSelectionChanged","hasPageActivity","CLICK_ACTION_MAX_DURATION","interactionSelectorCache","updateInteractionSelector","relativeTimestamp","isActionChildEvent","trackClickActions","actionTracker","currentClickChain","stopClickChain","stopActionEventsListener","onPointerDown","onPointerUp","selectionEmptyAtPointerDown","clickContext","userActivity","listeners","localUserActivity","listenActionEvents","pointerDownEvent","targetForPrivacy","getEventTarget","clickActionBase","rect","getBoundingClientRect","composedPathSelector","composedPath","elements","el","getComposedPathSelector","defaultActionName","getActionNameFromElement","width","height","position","x","left","top","computeClickActionBase","hadActivityOnPointerDown","pageActivityEndEvent","processPointerDown","appendClickToClickChain","newClick","stopWaitPageActivityEnd","viewEndedSubscription","endClocks","stopSubscription","startClickAction","findActionId","validate","finalizeClicks","composed","clickKey","FR","startedClickAction","actionTrackerFinishedEvent","frustrationTypes","activityEndTime","jR","currentCounts","frustrationType","domEvents","clickAction","events","startActionCollection","unsubscribeAutoAction","processAction","stopClickActions","clickActions","manualActions","onManualActionCompleted","lookupKey","actionKey","startedManualAction","manualAction","trackManualActions","actionContexts","manualActionId","clickActionId","$O","correctedStartTime","actionId","isAuto","isAutoAction","loadingTime","loading_time","long_task","resource","composed_path_selector","name_source","consoleObservablesByApi","initConsoleObservable","apis","consoleObservables","originalConsoleApi","JZ","params","stackTrace_handlingStack","NR","formatConsoleParameters","firstErrorParam","buildConsoleLog","createConsoleObservable","Fx","RawReportType","initReportObservable","blockedURI","effectiveDirective","buildRawReportError","csp","disposition","buildStack","originalPolicy","sourceFile","lineNumber","columnNumber","buildRawReportErrorFromCspViolation","createCspViolationReportObservable","reportTypes","ReportingObserver","handleReports","reports","report","buildRawReportErrorFromReport","types","createReportObservable","partial","startErrorCollection","bufferedDataObservable","errorObservable","bufferedData","consoleLog","trackConsoleError","trackReportError","handling_stack","component_stack","source_type","processError","doStartErrorCollection","createTaskQueue","pendingTasks","run","deadline","executionTimeRemaining","scheduleNextRun","BB","timeout","alreadyMatchedEntries","matchRequestResourceEntry","sameNameEntries","getEntriesByName","candidates","errorMargin","isBetween","getDocumentTraceId","traceIdMeta","traceTimeMeta","createDocumentTraceData","content","getDocumentTraceDataFromMeta","comment","getTraceCommentFromNode","findTraceComment","getDocumentTraceDataFromComment","traceTime","rawTraceTime","COMMENT_NODE","isCommentNode","getNavigationEntry","navigationEntry","timings","numberKey","timingElement","gs","computeTimingsFromDeprecatedPerformanceTiming","loadEventEnd","sanitizeFirstByte","findLcpResourceEntry","resourceUrl","lcpStartTime","getResourceEntries","Uk","retrieveInitialDocumentResourceTiming","startResourceCollection","taskQueue","requestRegistry","isEarlyRequestCollectionEnabled","requests","tooManyRequestsReported","oldestRequest","debugContext","TOO_MANY_REQUESTS_INVESTIGATION","abortedCount","abortedOnStartCount","xhrCount","withoutMatchingEntryCount","oldestRequestAge","fetchCount","oldestRequestEndAge","A2","getMatchingRequest","closestRequest","minTimeDifference","timeDifference","abs","createRequestRegistry","handleResource","matchingTiming","assembleResource","processRequest","performanceResourceSubscription","processResourceEntry","computeRawEvent","resourceTracker","manualResources","resourceKey","status_code","statusCode","isManual","trackManualResources","tracingInfo","hasBeenTraced","span_id","trace_id","rule_psr","computeRequestTracingInfo","computeResourceEntryTracingInfo","computeResourceEntryDuration","computeRequestDuration","networkHeaders","TRACK_RESOURCE_HEADERS","matchers","urlMatchers","m","responseMatchers","requestMatchers","responseHeaders","filterHeaders","rawXhrHeaders","getAllResponseHeaders","rawXhrheaders","pairs","lines","colonIndex","parseRawXhrHeaders","getResponseHeaders","requestHeaders","getRequestHeaders","computeNetworkHeaders","graphql","computeGraphQlMetaData","contentTypeFromPerformanceEntry","contentType","computeContentTypeFromPerformanceEntry","resourceEvent","responseStatus","delivery_type","renderBlockingStatus","render_blocking_status","computeResourceEntryMetrics","getResourceDomainContext","baseDomainContext","performanceEntry","requestInput","requestInit","FORBIDDEN_HEADER_PATTERN","MAX_HEADER_VALUE_LENGTH","collectedHeaderCount","totalHeaderCount","hasReachedMaxHeaderCount","lowerName","matchHeader","capturedValue","header_name","original_length","limit","getTimeZone","Intl","DateTimeFormat","resolvedOptions","timeZone","trackNavigationTimings","stopOnReadyState","waitAfterLoadEvent","isIncompleteNavigation","domComplete","domContentLoaded","domContentLoadedEventEnd","domInteractive","loadEvent","firstByte","processNavigationEntry","trackLargestContentfulPaint","firstHidden","firstInteractionTimestamp","stopEventListener","biggestLcpSize","performanceLcpSubscription","LARGEST_CONTENTFUL_PAINT","lcpEntry","lcpTargetSelector","lcpValue","subParts","lcpResourceEntry","lcpRequestStart","lcpResponseEnd","loadDelay","loadTime","renderDelay","computeLcpSubParts","targetSelector","trackFirstHidden","viewStart","VISIBILITY_STATE","firstHiddenEntry","trackInitialViewMetrics","setLoadEvent","scheduleViewUpdate","initialViewMetrics","stopNavigationTracking","navigationTimings","stopFCPTracking","fcpEntry","trackFirstContentfulPaint","firstContentfulPaint","stopLCPTracking","largestContentfulPaint","stopFIDTracking","performanceFirstInputSubscription","firstInputEntry","firstInputDelay","firstInputTargetSelector","trackFirstInput","firstInput","calculateArea","getClsAttributionImpactedArea","previousRect","currentRect","rect1","rect2","right","bottom","calculateIntersectionArea","trackCumulativeLayoutShift","LAYOUT_SHIFT","biggestShift","maxClsValue","slidingWindow","cumulatedValue","maxValue","isMaxValue","slidingSessionWindow","performanceSubscription","hadRecentInput","attribution","getTopImpactedElement","WeakRef","devicePixelRatio","deref","asRumRect","topImpactedSource","currentImpactedArea","interactionCountEstimate","minKnownInteractionId","maxKnownInteractionId","getInteractionCount","interactionCount","trackInteractionToNextPaint","viewLoadingType","EVENT","PerformanceEventTiming","getInteractionToNextPaint","setViewEnd","currentInp","viewEnd","getViewInteractionCount","stopViewInteractionCount","durationThreshold","previousInteractionCount","computeViewInteractionCount","trackViewInteractionCount","longestInteractions","sortAndTrimLongestInteractions","interactionIndex","findIndex","interaction","minLongestInteraction","estimateP98Interaction","isTracked","trackLongestInteractions","subPartsTracker","groupsByInteractionId","updateGroupWithEntry","group","renderTime","existingGroup","referenceRenderTime","pruneUntracked","computeSubParts","inpDuration","nextPaintTime","inputDelay","processingDuration","presentationDelay","clear","createSubPartsTracker","firstInputSubscription","handleEntries","eventSubscription","newStartTime","getInteractionSelector","sanitizeInpValue","updateCurrentInp","viewEndTime","inpValue","getScrollX","scrollX","visual","visualViewport","pageLeft","offsetLeft","pageXOffset","getScrollY","scrollY","pageTop","offsetTop","pageYOffset","viewportObservable","initViewportObservable","updateDimension","getViewportDimension","createViewportObservable","scale","innerWidth","innerHeight","trackScrollMetrics","scrollValues","throttleDuration","scrollTop","scrollHeight","scrollingElement","documentElement","scrollDepth","computeScrollValues","ResizeObserver","throttledNotify","observerTarget","resizeObserver","eventListener","createScrollValuesObservable","maxScrollDepth","maxScrollHeight","maxScrollHeightTime","shouldUpdate","maxDepth","maxDepthScrollTop","trackCommonViewMetrics","loadingType","commonViewMetrics","hasManualLoadingTime","viewEnded","stopLoadingTimeTracking","loadType","isWaitingForLoadEvent","isWaitingForActivityLoadingTime","loadingTimeCandidates","invokeCallbackIfAllCandidatesAreReceived","trackLoadingTime","newLoadingTime","stopScrollMetricsTracking","newScrollMetrics","stopCLSTracking","cumulativeLayoutShift","stopINPTracking","setINPViewEnd","getCommonViewMetrics","interactionToNextPaint","trackBfcacheMetrics","viewStartRelative","paintTime","requestAnimationFrame","SESSION_KEEP_ALIVE_INTERVAL","KEEP_TRACKING_AFTER_VIEW_DELAY","trackViews","locationChangeObservable","areViewsTrackedAutomatically","activeViews","stopOnBFCacheRestore","locationChangeSubscription","currentView","startNewView","Oc","viewOptions","newlyCreatedView","customTimings","documentVersion","sessionIsActive","viewCreatedEvent","cancelScheduleViewUpdate","triggerViewUpdate","stopCommonViewMetricsTracking","stopInitialViewMetricsTracking","stopEventCountsTracking","trackViewEventCounts","keepAliveIntervalId","pageMayExitEvent","browser_pageMayExitObservable","y5","triggerBeforeViewUpdate","currentEnd","isActive","pu","sanitized","sanitizeTiming","updatedName","newView","oldLocation","newLocation","currentLocation","otherLocation","hash","correspondingId","isHashAnAnchor","getPathFromHash","renewViewOnLocationChange","persisted","onBFCacheRestore","pageshowEvent","startViewCollection","pageOpenObservable","recorderApi","viewHistory","_l","_m","_o","_p","_q","_r","_s","_t","replayStats","getReplayStats","clsDevicePixelRatio","viewEvent","document_version","replay_stats","cls","device_pixel_ratio","cumulative_layout_shift","cumulative_layout_shift_time","cumulative_layout_shift_target_selector","dom_complete","dom_content_loaded","dom_interactive","first_contentful_paint","first_input_delay","first_input_time","first_input_target_selector","interaction_to_next_paint","interaction_to_next_paint_time","interaction_to_next_paint_target_selector","is_active","largest_contentful_paint","largest_contentful_paint_target_selector","load_event","loading_type","computeViewPerformanceData","time_spent","max_depth","max_depth_scroll_top","max_scroll_height","max_scroll_height_time","privacy","replay_level","device","locale","language","locales","languages","time_zone","custom_timings","processViewUpdate","findView","score","target_selector","previous_rect","current_rect","fcp","fid","inp","sub_parts","input_delay","processing_duration","presentation_delay","lcp","resource_url","load_delay","load_time","render_delay","SESSION_CONTEXT_TIMEOUT_DELAY","stopCallbacks","startSessionManager","sessionContextHistory","buildSessionContext","isReplayForced","forcedReplay","rawSession","cookieContext","getSessionCookies","currentDomain","createdTimestamp","expireTimestamp","reportUnexpectedSessionState","trackActivity","expandSessionWhenVisible","visibilityCheckInterval","trackVisibility","trackResume","findSession","sessionCookies","getAll","startRumSessionManager","rawTrackingType","sessionEntity","sessionReplay","setForcedReplay","URL_CONTEXT_TIME_OUT_DELAY","createLocationChangeObservable","stopHistoryTracking","onHistoryChange","stopInstrumentingPushState","getHistoryInstrumentationTarget","stopInstrumentingReplaceState","removeListener","trackHistory","onLocationChange","stopHashTracking","onHashChange","trackHash","History","FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY","currentPeriodMeasures","batchHasRumEvent","sendCurrentPeriodMeasures","batchCount","initCurrentPeriodMeasures","updateMeasure","measure","sum","batchBytesCount","batchMessagesCount","PAGE_STATE_CONTEXT_TIME_OUT_DELAY","startPageStateHistory","maxPageStateEntriesSelectable","pageStateEntryHistory","currentPageState","addPageState","getPageState","stopEventListeners","computePageState","nextPageState","pageState","page_states","processPageStates","in_foreground","pageStateEntries","eventStartTime","hasFocus","createCookieObservable","cookieName","detectCookieChangeStrategy","changeEvent","changed","deleted","listenToCookieStoreChange","watchCookieFallback","previousCookieValue","watchCookieIntervalId","cookieValue","CI_VISIBILITY_TEST_ID_COOKIE_NAME","processEntry","baseEvent","entry_type","blocking_duration","blockingDuration","first_ui_event_timestamp","firstUIEventTimestamp","render_start","renderStart","style_and_layout_start","styleAndLayoutStart","start_time","scripts","script","pause_duration","pauseDuration","forced_style_and_layout_duration","forcedStyleAndLayoutDuration","execution_start","executionStart","source_url","sourceURL","source_function_name","sourceFunctionName","source_char_position","sourceCharPosition","invoker","invoker_type","invokerType","window_attribution","windowAttribution","createEventRateLimiter","onLimitReached","eventCount","allowNextEvent","isLimitReached","limitModification","modifiableFieldPaths","modifier","fieldPath","fieldType","setValueAtPath","pathSegments","field","restPathSegments","isValidObject","newType","setNestedValue","VIEW_MODIFIABLE_FIELD_PATHS","USER_CUSTOMIZABLE_FIELD_PATHS","ROOT_MODIFIABLE_FIELD_PATHS","modifiableFieldPathsByEvent","startRumAssembly","eventRateLimit","eventRateLimiters","defaultRumEventAttributes","serverRumEvent","rateLimitReached","shouldSend","allowedEventTypes","startSourceCodeContext","contextByFile","buildContextByFile","DD_SOURCE_CODE_CONTEXT","firstFrame","VJ","getSourceUrl","startRum","profilerApi","createEncoder","Ww","startRumSessionManagerStub","startRumEventBridge","transport_batch","transport_httpRequest","startRumBatch","preparePageExitSubscription","batchFlushObservable","startCustomerDataTelemetry","startTrackingConsentContext","stopInitialViewMetricsTelemetry","navigation","startInitialViewMetricsTelemetry","stopRumEventCollection","startRumEventCollectionResult","records","characterData","childList","subtree","createDOMMutationObservable","stopWindowOpen","createWindowOpenObservable","drift","TP","browser_sdk_version","sdk_name","application","startDefaultContext","viewValueHistory","buildViewHistoryEntry","viewUpdate","startViewHistory","urlContexts","urlContextHistory","previousViewUrl","locationHref","viewUrl","buildUrlContext","changeTime","urlContext","findUrl","startUrlContexts","featureFlagContexts","featureFlagContext","feature_flags","currentContext","startFeatureFlagContexts","hasReplay","sampledForReplay","isRecording","has_replay","sampled_for_replay","startSessionContext","startConnectivityContext","useContextNamespace","globalContextManager","startGlobalContext","userContextManager","anonymous_id","usr","startUserContext","accountContextManager","account","startAccountContext","actionCollection","eventCollection","addEvent","startEventCollection","displayContext","viewport","animationFrameId","unsubscribeViewport","viewportDimension","cancelAnimationFrame","startDisplayContext","ciVisibilityContext","cookieObservable","testExecutionId","Cypress","cookieObservableSubscription","ci_test","test_execution_id","startCiVisibilityContext","synthetics","injected","startSyntheticsContext","stopViewCollection","resourceCollection","stopLongTaskCollection","startLongTaskCollection","vitalCollection","internalContext","viewContext","application_id","session_id","user_action","startInternalContext","startRumEventCollection","makeRumPublicApi","D","runtimeErrorSubscription","startBufferingData","createDeflateEncoder","streamId","onRumStart","preStartStrategy","createPostStartStrategy","rumPublicApi","setTrackingConsent","getInitConfiguration","START_STOP_ACTION","START_STOP_RESOURCE","setViewLoadingTime","setGlobalContext","getGlobalContext","setGlobalContextProperty","removeGlobalContextProperty","clearGlobalContext","setUser","getUser","setUserProperty","removeUserProperty","clearUser","setAccount","getAccount","setAccountProperty","removeAccountProperty","clearAccount","sanitizedOptions","getSessionReplayLink","startSessionReplayRecording","force","stopSessionReplayRecording","startFeatureOperation","action_type","succeedFeatureOperation","failFeatureOperation","getSessionReplayUrl","errorType","dV","getSiteDefaultSubdomain","getDatadogSiteUrl","createFormDataTransport","attachments","formData","FormData","serializedEvent","serializedValue","RecordType","NodeType","ChangeType","AddString","AddNode","RemoveNode","Attribute","Text","Size","ScrollPosition","AddStyleSheet","AttachedStyleSheets","MediaPlaybackState","VisualViewport","IncrementalSource","MouseInteractionType","MediaInteractionType","SnapshotFormat","isFullSnapshotChangeRecordsEnabled","USE_CHANGE_RECORDS","USE_INCREMENTAL_CHANGE_RECORDS","isIncrementalSnapshotChangeRecordsEnabled","getElementInputValue","esm","Ie","o","URL_IN_CSS_REF","ABSOLUTE_URL","DATA_URI","switchToAbsoluteUrl","cssText","cssHref","matchingSubstring","singleQuote","urlWrappedInSingleQuotes","doubleQuote","urlWrappedInDoubleQuotes","urlNotWrappedInQuotes","baseUrl","makeUrlAbsolute","TAG_NAME_REGEX","normalizedTagName","censoredImageForSize","serializeStyleSheets","cssStyleSheets","transaction","serializeStylesheet","cssStyleSheet","rules","cssRules","cssRule","addMetric","totalLength","rule","disabled","media","styleSheets","serializeAttribute","$m","ap","image","naturalWidth","naturalHeight","eT","ei","serializeDOMAttributes","attrs","scope","formValue","optionElement","selected","checked","serializeVirtualAttributes","doc","stylesheet","getCssRulesString","_cssText","sheet","mediaElement","rr_mediaState","paused","scrollLeft","elementsScrollPositions","rr_scrollLeft","rr_scrollTop","nr","getCssRuleStringForSafari","getCssRuleString","isCSSStyleRule","selectorText","escapeColon","isCSSImportRule","styleSheet","serializeNode","DOCUMENT_NODE","assignId","serializeChildNodes","adoptedStyleSheets","serializeDocumentNode","isShadowRoot","p_","shadowRootsController","addShadowRoot","serializeDocumentFragmentNode","DOCUMENT_TYPE_NODE","documentType","publicId","systemId","serializeDocumentTypeNode","processedTagName","getValidTagName","isSVG","SVGElement","dT","rr_width","rr_height","NT","Wd","serializeAttributes","wR","serializeElementNode","rf","serializeTextNode","CDATA_SECTION_NODE","serializeCDataNode","wI","childNode","serializedChildNode","updateSerializationStats","serializeInTransaction","emitRecord","emitStats","serialize","serializationDuration","record","nodeIds","getOrInsert","serializedNodeIds","serializeChangesInTransaction","stringIds","pendingChanges","convertStringsToStringReferences","previousSize","changes","change","createChangeEncoder","addNode","addStyleSheet","mediaList","attachStyleSheets","nodeId","sheetIds","sheetId","removeNode","setAttributes","setMediaPlaybackState","setScrollPosition","setSize","setText","format","serializeFullSnapshot","initialOffset","Gn","zL","serializeObservable","v1","serializeNodeAsChange","cursor","parentPrivacyLevel","selfPrivacyLevel","cdataNode","insertionPoint","advance","serializeCDataNodeAsChange","serializeStyleSheetsAsChange","serializeDocumentNodeAsChange","documentFragment","serializeDocumentFragmentNodeAsChange","serializeDocumentTypeNodeAsChange","domAttributes","encodedElementName","mediaState","linkOrStyle","styleSheetIds","serializeElementNodeAsChange","serializeTextNodeAsChange","descend","ascend","nS","serializeHiddenNodePlaceholder","sheets","serializeStyleSheetAsChange","namespaceURI","serializeNodeAsChange_isSVGElement","createChildInsertionCursor","parentId","nextSiblingId","createInsertionCursor","container","previousSiblingId","computeInsertionPoint","serializeFullSnapshotAsChange","resetIds","assembleIncrementalSnapshot","serializeMutations","removedNodes","removedNode","traverseRemovedShadowDom","removeShadowRoot","filteredMutations","$4","idsAreAssignedForNodeAndAncestors","PJ","adds","removes","hasBeenSerialized","addedAndMovedNodes","addedNodes","sortedAddedAndMovedNodes","nodes","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","DOCUMENT_POSITION_CONTAINS","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_PRECEDING","addedNodeMutations","serializedNode","nextId","getNextSibling","removedNodeMutations","processChildListMutations","texts","textMutations","handledNodes","oldValue","processCharacterDataMutations","attributeMutations","handledElements","handledAttributes","emittedMutations","transformedValue","inputValue","emittedMutation","processAttributesMutations","processMutations","shadowDomRemovedCallback","XS","serializeMutationsAsChange","characterDataMutations","firstNewNodeId","forNodeAndDescendants","processRemovedNodes","getNextSiblingId","processAddedNodes","serializeMutationsAsChange_processCharacterDataMutations","attributeNames","processAttributeMutations","serializeMutationsAsChange_processMutations","convertMouseEventToLayoutCoordinates","normalized","layoutViewportX","layoutViewportY","visualViewportX","visualViewportY","isVisualViewportFactoredIn","getVisualViewport","takeFullSnapshot","defaultSerializeFullSnapshotCallback","pB","has_focus","isTouchEvent","changedTouches","trackMove","updatePosition","cancelThrottle","coordinates","tryToComputeCoordinates","timeOffset","positions","isFinite","eventTypeToMouseInteraction","pointerup","mousedown","contextmenu","dblclick","focus","blur","touchstart","touchend","trackMouseInteraction","eventIds","trackScroll","scrollPositions","trackViewportResize","viewportResizeSubscription","g1","trackVisualViewportResize","trackMediaInteraction","trackStyleSheet","checkStyleSheetAndCallback","ownerNode","instrumentationStoppers","CSSStyleSheet","instrumentGroupingCSSRuleClass","parentStyleSheet","getPathToNestedCSSRule","CSSGroupingRule","CSSMediaRule","CSSSupportsRule","stopper","currentRule","parentRule","trackFocus","trackViewEnd","flushMutations","viewEndSubscription","trackInput","lastInputStateMap","HTMLInputElement","HTMLTextAreaElement","HTMLSelectElement","onElementChange","stopPropertySetterInstrumentation","inputState","isChecked","createRecordIfStateChanged","lastInputState","trackMutation","defaultSerializeMutationsCallback","W3","mutationBatch","processMutationBatch","cancelScheduledFlush","pendingMutations","throttledFlush","addMutations","createMutationBatch","takeRecords","attributeOldValue","characterDataOldValue","createStringIds","createItemIds","createWeakIdMap","firstId","createMap","recordingScope_createRecordingScope","processRecord","$1","controllerByShadowRoot","mutationTracker","inputTracker","scrollTracker","initShadowRootsController","scrollPositionsByElement","elementsScrollPositions_createElementsScrollPositions","stopFullSnapshots","startFullSnapshots","trackers","tracker","createSegment","creationReason","encodedBytesCount","creation_reason","records_count","has_full_snapshot","index_in_view","K_","serializationStats","H5","addRecord","addStats","aggregateStats","aggregateSerializationStats","L7","SEGMENT_BYTES_LIMIT","startSegmentCollection","getSegmentContext","nextSegmentCreationReason","unsubscribeViewCreated","flushSegment","unsubscribePageMayExit","segment","rawSegmentBytesCount","metadataAndSegmentSizes","raw_segment_size","compressed_segment_size","byteLength","serializedMetadataAndSegmentSizes","isFullSnapshot","rawSize","recordCount","buildReplayPayload","expirationTimeoutId","doStartSegmentCollection","computeSegmentContext","startSegmentTelemetry","requestEvent","bandwidthStats","fullSnapshot","incrementalSnapshot","ongoingRequests","totalSize","compressed","startRecording","replayRequest","startRecordBridge","segmentCollection","segmentTelemetry","stopRecording","PATH_MIXED_ALPHANUMERICS","getCustomOrDefaultViewName","customViewName","viewPathUrl","getDefaultViewName","buildProfileEventAttributes","profilerTrace","ids","names","views","viewName","extractViewIdsAndNames","longTaskIds","longTasks","longTask","actionIds","actions","vitalIds","vitalLabels","vitals","extractVitalIdsAndLabels","assembleProfilingPayload","domain_tags","profileAttributes","profileEventTags","buildProfileEventTags","profileEvent","toISOString","family","runtime","tags_profiler","clock_drift","buildProfileEvent","LONG_TASK_ID_HISTORY_EXPIRE_DELAY","createLongTaskHistory","K","ACTION_ID_HISTORY_TIME_OUT_DELAY","createActionHistory","actionStart","durationForEntry","VITAL_ID_HISTORY_TIME_OUT_DELAY","createVitalHistory","DEFAULT_RUM_PROFILER_CONFIGURATION","sampleIntervalMs","collectIntervalMs","minProfileDurationMs","minNumberOfSamples","createRumProfiler","profilingContextManager","profilerConfiguration","transport","wP","lastViewEntry","globalCleanupTasks","longTaskHistory","actionHistory","vitalHistory","instance","stateReason","viewEntry","handleVisibilityChange","handleBeforeUnload","startNextProfilerInstance","stopProfiling","runningInstance","cleanupTask","collectProfilerInstance","stopProfilerInstance","error_reason","globalThisProfiler","Profiler","existingInstance","viewUpdatedSubscription","collectViewEntry","profiler","sampleInterval","handleSampleBufferFull","removeEventListener","trace","isBelowDurationThreshold","isBelowSampleThreshold","samples","numberOfSamples","sample","stackId","getNumberOfSamples","handleProfilerTrace","pauseProfilerInstance","isRunning","isPaused","statsPerView","getSegmentsCount","getOrCreateReplayStats","segments_count","addSegment","addWroteData","additionalBytesCount","segments_total_raw_size","toDelete","deleteOldestStats","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","d","definition","binding","obj","prop","compressedDataTrailer","compressedData","nextWriteActionId","pendingWriteActions","removeMessageListener","workerResponse","nextPendingAction","trailer","writeCallback","finishCallback","consumeResult","sendResetIfNeeded","postMessage","pendingWriteAction","reportScriptLoadingError","configuredUrl","scriptType","baseMessage","createDeflateWorker","Worker","createObjectURL","onInitializationFailure","removeErrorListener","onError","initializationFailureCallbacks","onTimeout","doStartDeflateWorker","getDeflateWorkerStatus","worker_version","stream_id","isBrowserSupported","NodeList","isRecordingStarted","getErrorType","dx","lazyLoadRecorder","importRecorder","getOrCreateDeflateEncoder","documentReadyDuration","recorderSettledDuration","forced","loadRecorderModuleDuration","recorderInitDuration","waitForDocReadyDuration","startRecorderInitTelemetry","doStart","startRecordingImpl","all","notifyWhenSettled","deflateEncoder","canStartRecording","isRecordingInProgress","shouldForceReplay","promise","importProfiler","shouldStartImmediately","cachedDeflateEncoder","lv","makeRecorderApi","$5","bb","profiling","startProfilingContext","lazyLoadProfiler","makeProfilerApi","datadogRum","AB","Z","js_cookie_assign","js_cookie_init","converter","defaultAttributes","stringifiedAttributes","create","jar","found","withAttributes","withConverter","freeze","EEA_UK_CH_COUNTRY_CODES","consentGeoRegions_namespaceObject","V","UNKNOWN_COUNTRY_INDICATORS","Consent","execute","cookiebotJob","job","consent","consented","Cookiebot","CookieString","parsedCookieConsent","checkCookieConsent","checkConsentTypePresent","consentType","packageConsent","datadogEnvironment","datadogVersion","datadogSampleRate","statistics","packageConsented"],"sourceRoot":""}