"use strict";
(self["webpackChunk_anaconda_core"] = self["webpackChunk_anaconda_core"] || []).push([["vendors-node_modules_datadog_browser-logs_esm_entries_main_js-node_modules_launchdarkly-js-cl-2eae17"],{

/***/ "../../node_modules/@datadog/browser-core/esm/boot/init.js":
/*!*****************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/boot/init.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   defineGlobal: () => (/* binding */ defineGlobal),
/* harmony export */   makePublicApi: () => (/* binding */ makePublicApi)
/* harmony export */ });
/* harmony import */ var _tools_catchUserErrors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../tools/catchUserErrors */ "../../node_modules/@datadog/browser-core/esm/tools/catchUserErrors.js");
/* harmony import */ var _tools_monitor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tools/monitor */ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js");
/* harmony import */ var _tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tools/utils/polyfills */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");



function makePublicApi(stub) {
    var publicApi = (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_0__.assign)({
        version: "4.48.2",
        // This API method is intentionally not monitored, since the only thing executed is the
        // user-provided 'callback'.  All SDK usages executed in the callback should be monitored, and
        // we don't want to interfere with the user uncaught exceptions.
        onReady: function (callback) {
            callback();
        },
    }, stub);
    // Add a "hidden" property to set debug mode. We define it that way to hide it
    // as much as possible but of course it's not a real protection.
    Object.defineProperty(publicApi, '_setDebug', {
        get: function () {
            return _tools_monitor__WEBPACK_IMPORTED_MODULE_1__.setDebugMode;
        },
        enumerable: false,
    });
    return publicApi;
}
function defineGlobal(global, name, api) {
    var existingGlobalVariable = global[name];
    global[name] = api;
    if (existingGlobalVariable && existingGlobalVariable.q) {
        existingGlobalVariable.q.forEach(function (fn) { return (0,_tools_catchUserErrors__WEBPACK_IMPORTED_MODULE_2__.catchUserErrors)(fn, 'onReady callback threw an error:')(); });
    }
}
//# sourceMappingURL=init.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/browser/addEventListener.js":
/*!********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/browser/addEventListener.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   addEventListener: () => (/* binding */ addEventListener),
/* harmony export */   addEventListeners: () => (/* binding */ addEventListeners)
/* harmony export */ });
/* harmony import */ var _tools_monitor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tools/monitor */ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js");
/* harmony import */ var _tools_getZoneJsOriginalValue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tools/getZoneJsOriginalValue */ "../../node_modules/@datadog/browser-core/esm/tools/getZoneJsOriginalValue.js");


/**
 * Add an event listener to an event target object (Window, Element, mock object...).  This provides
 * a few conveniences compared to using `element.addEventListener` directly:
 *
 * * supports IE11 by: using an option object only if needed and emulating the `once` option
 *
 * * wraps the listener with a `monitor` function
 *
 * * returns a `stop` function to remove the listener
 */
function addEventListener(configuration, eventTarget, eventName, listener, options) {
    return addEventListeners(configuration, eventTarget, [eventName], listener, options);
}
/**
 * Add event listeners to an event target object (Window, Element, mock object...).  This provides
 * a few conveniences compared to using `element.addEventListener` directly:
 *
 * * supports IE11 by: using an option object only if needed and emulating the `once` option
 *
 * * wraps the listener with a `monitor` function
 *
 * * returns a `stop` function to remove the listener
 *
 * * with `once: true`, the listener will be called at most once, even if different events are listened
 */
function addEventListeners(_, eventTarget, eventNames, listener, _a) {
    var _b = _a === void 0 ? {} : _a, once = _b.once, capture = _b.capture, passive = _b.passive;
    var wrappedListener = (0,_tools_monitor__WEBPACK_IMPORTED_MODULE_0__.monitor)(once
        ? function (event) {
            stop();
            listener(event);
        }
        : listener);
    var options = passive ? { capture: capture, passive: passive } : capture;
    var add = (0,_tools_getZoneJsOriginalValue__WEBPACK_IMPORTED_MODULE_1__.getZoneJsOriginalValue)(eventTarget, 'addEventListener');
    eventNames.forEach(function (eventName) { return add.call(eventTarget, eventName, wrappedListener, options); });
    function stop() {
        var remove = (0,_tools_getZoneJsOriginalValue__WEBPACK_IMPORTED_MODULE_1__.getZoneJsOriginalValue)(eventTarget, 'removeEventListener');
        eventNames.forEach(function (eventName) { return remove.call(eventTarget, eventName, wrappedListener, options); });
    }
    return {
        stop: stop,
    };
}
//# sourceMappingURL=addEventListener.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/browser/cookie.js":
/*!**********************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/browser/cookie.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   areCookiesAuthorized: () => (/* binding */ areCookiesAuthorized),
/* harmony export */   deleteCookie: () => (/* binding */ deleteCookie),
/* harmony export */   getCookie: () => (/* binding */ getCookie),
/* harmony export */   getCurrentSite: () => (/* binding */ getCurrentSite),
/* harmony export */   setCookie: () => (/* binding */ setCookie)
/* harmony export */ });
/* harmony import */ var _tools_display__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../tools/display */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");
/* harmony import */ var _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tools/utils/timeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _tools_utils_stringUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tools/utils/stringUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/stringUtils.js");



function setCookie(name, value, expireDelay, options) {
    var date = new Date();
    date.setTime(date.getTime() + expireDelay);
    var expires = "expires=".concat(date.toUTCString());
    var sameSite = options && options.crossSite ? 'none' : 'strict';
    var domain = options && options.domain ? ";domain=".concat(options.domain) : '';
    var secure = options && options.secure ? ';secure' : '';
    document.cookie = "".concat(name, "=").concat(value, ";").concat(expires, ";path=/;samesite=").concat(sameSite).concat(domain).concat(secure);
}
function getCookie(name) {
    return (0,_tools_utils_stringUtils__WEBPACK_IMPORTED_MODULE_0__.findCommaSeparatedValue)(document.cookie, name);
}
function deleteCookie(name, options) {
    setCookie(name, '', 0, options);
}
function areCookiesAuthorized(options) {
    if (document.cookie === undefined || document.cookie === null) {
        return false;
    }
    try {
        // Use a unique cookie name to avoid issues when the SDK is initialized multiple times during
        // the test cookie lifetime
        var testCookieName = "dd_cookie_test_".concat((0,_tools_utils_stringUtils__WEBPACK_IMPORTED_MODULE_0__.generateUUID)());
        var testCookieValue = 'test';
        setCookie(testCookieName, testCookieValue, _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_1__.ONE_MINUTE, options);
        var isCookieCorrectlySet = getCookie(testCookieName) === testCookieValue;
        deleteCookie(testCookieName, options);
        return isCookieCorrectlySet;
    }
    catch (error) {
        _tools_display__WEBPACK_IMPORTED_MODULE_2__.display.error(error);
        return false;
    }
}
/**
 * No API to retrieve it, number of levels for subdomain and suffix are unknown
 * strategy: find the minimal domain on which cookies are allowed to be set
 * https://web.dev/same-site-same-origin/#site
 */
var getCurrentSiteCache;
function getCurrentSite() {
    if (getCurrentSiteCache === undefined) {
        // Use a unique cookie name to avoid issues when the SDK is initialized multiple times during
        // the test cookie lifetime
        var testCookieName = "dd_site_test_".concat((0,_tools_utils_stringUtils__WEBPACK_IMPORTED_MODULE_0__.generateUUID)());
        var testCookieValue = 'test';
        var domainLevels = window.location.hostname.split('.');
        var candidateDomain = domainLevels.pop();
        while (domainLevels.length && !getCookie(testCookieName)) {
            candidateDomain = "".concat(domainLevels.pop(), ".").concat(candidateDomain);
            setCookie(testCookieName, testCookieValue, _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_1__.ONE_SECOND, { domain: candidateDomain });
        }
        deleteCookie(testCookieName, { domain: candidateDomain });
        getCurrentSiteCache = candidateDomain;
    }
    return getCurrentSiteCache;
}
//# sourceMappingURL=cookie.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/browser/fetchObservable.js":
/*!*******************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/browser/fetchObservable.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   initFetchObservable: () => (/* binding */ initFetchObservable)
/* harmony export */ });
/* harmony import */ var _tools_instrumentMethod__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tools/instrumentMethod */ "../../node_modules/@datadog/browser-core/esm/tools/instrumentMethod.js");
/* harmony import */ var _tools_monitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../tools/monitor */ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js");
/* harmony import */ var _tools_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tools/observable */ "../../node_modules/@datadog/browser-core/esm/tools/observable.js");
/* harmony import */ var _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tools/utils/timeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _tools_utils_urlPolyfill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../tools/utils/urlPolyfill */ "../../node_modules/@datadog/browser-core/esm/tools/utils/urlPolyfill.js");





var fetchObservable;
function initFetchObservable() {
    if (!fetchObservable) {
        fetchObservable = createFetchObservable();
    }
    return fetchObservable;
}
function createFetchObservable() {
    var observable = new _tools_observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function () {
        if (!window.fetch) {
            return;
        }
        var stop = (0,_tools_instrumentMethod__WEBPACK_IMPORTED_MODULE_1__.instrumentMethod)(window, 'fetch', function (originalFetch) {
            return function (input, init) {
                var responsePromise;
                var context = (0,_tools_monitor__WEBPACK_IMPORTED_MODULE_2__.callMonitored)(beforeSend, null, [observable, input, init]);
                if (context) {
                    responsePromise = originalFetch.call(this, context.input, context.init);
                    (0,_tools_monitor__WEBPACK_IMPORTED_MODULE_2__.callMonitored)(afterSend, null, [observable, responsePromise, context]);
                }
                else {
                    responsePromise = originalFetch.call(this, input, init);
                }
                return responsePromise;
            };
        }).stop;
        return stop;
    });
    return observable;
}
function beforeSend(observable, input, init) {
    var method = (init && init.method) || (input instanceof Request && input.method) || 'GET';
    var url = input instanceof Request ? input.url : (0,_tools_utils_urlPolyfill__WEBPACK_IMPORTED_MODULE_3__.normalizeUrl)(String(input));
    var startClocks = (0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_4__.clocksNow)();
    var context = {
        state: 'start',
        init: init,
        input: input,
        method: method,
        startClocks: startClocks,
        url: url,
    };
    observable.notify(context);
    return context;
}
function afterSend(observable, responsePromise, startContext) {
    var reportFetch = function (response) {
        var context = startContext;
        context.state = 'resolve';
        if ('stack' in response || response instanceof Error) {
            context.status = 0;
            context.isAborted = response instanceof DOMException && response.code === DOMException.ABORT_ERR;
            context.error = response;
        }
        else if ('status' in response) {
            context.response = response;
            context.responseType = response.type;
            context.status = response.status;
            context.isAborted = false;
        }
        observable.notify(context);
    };
    responsePromise.then((0,_tools_monitor__WEBPACK_IMPORTED_MODULE_2__.monitor)(reportFetch), (0,_tools_monitor__WEBPACK_IMPORTED_MODULE_2__.monitor)(reportFetch));
}
//# sourceMappingURL=fetchObservable.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/browser/pageExitObservable.js":
/*!**********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/browser/pageExitObservable.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PageExitReason: () => (/* binding */ PageExitReason),
/* harmony export */   createPageExitObservable: () => (/* binding */ createPageExitObservable),
/* harmony export */   isPageExitReason: () => (/* binding */ isPageExitReason)
/* harmony export */ });
/* harmony import */ var _tools_experimentalFeatures__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tools/experimentalFeatures */ "../../node_modules/@datadog/browser-core/esm/tools/experimentalFeatures.js");
/* harmony import */ var _tools_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tools/observable */ "../../node_modules/@datadog/browser-core/esm/tools/observable.js");
/* harmony import */ var _tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tools/utils/polyfills */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");
/* harmony import */ var _tools_utils_functionUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../tools/utils/functionUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js");
/* harmony import */ var _addEventListener__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./addEventListener */ "../../node_modules/@datadog/browser-core/esm/browser/addEventListener.js");





var PageExitReason = {
    HIDDEN: 'visibility_hidden',
    UNLOADING: 'before_unload',
    PAGEHIDE: 'page_hide',
    FROZEN: 'page_frozen',
};
function createPageExitObservable(configuration) {
    var observable = new _tools_observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function () {
        var pagehideEnabled = (0,_tools_experimentalFeatures__WEBPACK_IMPORTED_MODULE_1__.isExperimentalFeatureEnabled)(_tools_experimentalFeatures__WEBPACK_IMPORTED_MODULE_1__.ExperimentalFeature.PAGEHIDE);
        var stopListeners = (0,_addEventListener__WEBPACK_IMPORTED_MODULE_2__.addEventListeners)(configuration, window, ["visibilitychange" /* DOM_EVENT.VISIBILITY_CHANGE */, "freeze" /* DOM_EVENT.FREEZE */, "pagehide" /* DOM_EVENT.PAGE_HIDE */], function (event) {
            if (event.type === "pagehide" /* DOM_EVENT.PAGE_HIDE */ && pagehideEnabled) {
                /**
                 * Only event that detect page unload events while being compatible with the back/forward cache (bfcache)
                 */
                observable.notify({ reason: PageExitReason.PAGEHIDE });
            }
            else if (event.type === "visibilitychange" /* DOM_EVENT.VISIBILITY_CHANGE */ && document.visibilityState === 'hidden') {
                /**
                 * Only event that guarantee to fire on mobile devices when the page transitions to background state
                 * (e.g. when user switches to a different application, goes to homescreen, etc), or is being unloaded.
                 */
                observable.notify({ reason: PageExitReason.HIDDEN });
            }
            else if (event.type === "freeze" /* DOM_EVENT.FREEZE */) {
                /**
                 * After transitioning in background a tab can be freezed to preserve resources. (cf: https://developer.chrome.com/blog/page-lifecycle-api)
                 * Allow to collect events happening between hidden and frozen state.
                 */
                observable.notify({ reason: PageExitReason.FROZEN });
            }
        }, { capture: true }).stop;
        var stopBeforeUnloadListener = _tools_utils_functionUtils__WEBPACK_IMPORTED_MODULE_3__.noop;
        if (!pagehideEnabled) {
            stopBeforeUnloadListener = (0,_addEventListener__WEBPACK_IMPORTED_MODULE_2__.addEventListener)(configuration, window, "beforeunload" /* DOM_EVENT.BEFORE_UNLOAD */, function () {
                observable.notify({ reason: PageExitReason.UNLOADING });
            }).stop;
        }
        return function () {
            stopListeners();
            stopBeforeUnloadListener();
        };
    });
    return observable;
}
function isPageExitReason(reason) {
    return (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_4__.includes)((0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_4__.objectValues)(PageExitReason), reason);
}
//# sourceMappingURL=pageExitObservable.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/browser/xhrObservable.js":
/*!*****************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/browser/xhrObservable.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   initXhrObservable: () => (/* binding */ initXhrObservable)
/* harmony export */ });
/* harmony import */ var _tools_instrumentMethod__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tools/instrumentMethod */ "../../node_modules/@datadog/browser-core/esm/tools/instrumentMethod.js");
/* harmony import */ var _tools_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tools/observable */ "../../node_modules/@datadog/browser-core/esm/tools/observable.js");
/* harmony import */ var _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../tools/utils/timeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _tools_utils_urlPolyfill__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../tools/utils/urlPolyfill */ "../../node_modules/@datadog/browser-core/esm/tools/utils/urlPolyfill.js");
/* harmony import */ var _tools_utils_objectUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tools/utils/objectUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/objectUtils.js");
/* harmony import */ var _addEventListener__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./addEventListener */ "../../node_modules/@datadog/browser-core/esm/browser/addEventListener.js");






var xhrObservable;
var xhrContexts = new WeakMap();
function initXhrObservable(configuration) {
    if (!xhrObservable) {
        xhrObservable = createXhrObservable(configuration);
    }
    return xhrObservable;
}
function createXhrObservable(configuration) {
    var observable = new _tools_observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function () {
        var stopInstrumentingStart = (0,_tools_instrumentMethod__WEBPACK_IMPORTED_MODULE_1__.instrumentMethodAndCallOriginal)(XMLHttpRequest.prototype, 'open', {
            before: openXhr,
        }).stop;
        var stopInstrumentingSend = (0,_tools_instrumentMethod__WEBPACK_IMPORTED_MODULE_1__.instrumentMethodAndCallOriginal)(XMLHttpRequest.prototype, 'send', {
            before: function () {
                sendXhr.call(this, configuration, observable);
            },
        }).stop;
        var stopInstrumentingAbort = (0,_tools_instrumentMethod__WEBPACK_IMPORTED_MODULE_1__.instrumentMethodAndCallOriginal)(XMLHttpRequest.prototype, 'abort', {
            before: abortXhr,
        }).stop;
        return function () {
            stopInstrumentingStart();
            stopInstrumentingSend();
            stopInstrumentingAbort();
        };
    });
    return observable;
}
function openXhr(method, url) {
    xhrContexts.set(this, {
        state: 'open',
        method: method,
        url: (0,_tools_utils_urlPolyfill__WEBPACK_IMPORTED_MODULE_2__.normalizeUrl)(String(url)),
    });
}
function sendXhr(configuration, observable) {
    var _this = this;
    var context = xhrContexts.get(this);
    if (!context) {
        return;
    }
    var startContext = context;
    startContext.state = 'start';
    startContext.startTime = (0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_3__.relativeNow)();
    startContext.startClocks = (0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_3__.clocksNow)();
    startContext.isAborted = false;
    startContext.xhr = this;
    var hasBeenReported = false;
    var stopInstrumentingOnReadyStateChange = (0,_tools_instrumentMethod__WEBPACK_IMPORTED_MODULE_1__.instrumentMethodAndCallOriginal)(this, 'onreadystatechange', {
        before: function () {
            if (this.readyState === XMLHttpRequest.DONE) {
                // Try to report the XHR as soon as possible, because the XHR may be mutated by the
                // application during a future event. For example, Angular is calling .abort() on
                // completed requests during a onreadystatechange event, so the status becomes '0'
                // before the request is collected.
                onEnd();
            }
        },
    }).stop;
    var onEnd = function () {
        unsubscribeLoadEndListener();
        stopInstrumentingOnReadyStateChange();
        if (hasBeenReported) {
            return;
        }
        hasBeenReported = true;
        var completeContext = context;
        completeContext.state = 'complete';
        completeContext.duration = (0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_3__.elapsed)(startContext.startClocks.timeStamp, (0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_3__.timeStampNow)());
        completeContext.status = _this.status;
        observable.notify((0,_tools_utils_objectUtils__WEBPACK_IMPORTED_MODULE_4__.shallowClone)(completeContext));
    };
    var unsubscribeLoadEndListener = (0,_addEventListener__WEBPACK_IMPORTED_MODULE_5__.addEventListener)(configuration, this, 'loadend', onEnd).stop;
    observable.notify(startContext);
}
function abortXhr() {
    var context = xhrContexts.get(this);
    if (context) {
        context.isAborted = true;
    }
}
//# sourceMappingURL=xhrObservable.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/configuration/configuration.js":
/*!******************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/configuration/configuration.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   DefaultPrivacyLevel: () => (/* binding */ DefaultPrivacyLevel),
/* harmony export */   serializeConfiguration: () => (/* binding */ serializeConfiguration),
/* harmony export */   validateAndBuildConfiguration: () => (/* binding */ validateAndBuildConfiguration)
/* harmony export */ });
/* harmony import */ var _tools_catchUserErrors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../tools/catchUserErrors */ "../../node_modules/@datadog/browser-core/esm/tools/catchUserErrors.js");
/* harmony import */ var _tools_display__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/display */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");
/* harmony import */ var _tools_experimentalFeatures__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../tools/experimentalFeatures */ "../../node_modules/@datadog/browser-core/esm/tools/experimentalFeatures.js");
/* harmony import */ var _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../tools/utils/timeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _tools_utils_numberUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../tools/utils/numberUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/numberUtils.js");
/* harmony import */ var _tools_utils_byteUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../tools/utils/byteUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/byteUtils.js");
/* harmony import */ var _tools_utils_objectUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../tools/utils/objectUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/objectUtils.js");
/* harmony import */ var _tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../tools/utils/polyfills */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");
/* harmony import */ var _session_sessionStore__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../session/sessionStore */ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionStore.js");
/* harmony import */ var _transportConfiguration__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./transportConfiguration */ "../../node_modules/@datadog/browser-core/esm/domain/configuration/transportConfiguration.js");










var DefaultPrivacyLevel = {
    ALLOW: 'allow',
    MASK: 'mask',
    MASK_USER_INPUT: 'mask-user-input',
};
function validateAndBuildConfiguration(initConfiguration) {
    var _a, _b, _c;
    if (!initConfiguration || !initConfiguration.clientToken) {
        _tools_display__WEBPACK_IMPORTED_MODULE_0__.display.error('Client Token is not configured, we will not send any data.');
        return;
    }
    var sessionSampleRate = (_a = initConfiguration.sessionSampleRate) !== null && _a !== void 0 ? _a : initConfiguration.sampleRate;
    if (sessionSampleRate !== undefined && !(0,_tools_utils_numberUtils__WEBPACK_IMPORTED_MODULE_1__.isPercentage)(sessionSampleRate)) {
        _tools_display__WEBPACK_IMPORTED_MODULE_0__.display.error('Session Sample Rate should be a number between 0 and 100');
        return;
    }
    if (initConfiguration.telemetrySampleRate !== undefined && !(0,_tools_utils_numberUtils__WEBPACK_IMPORTED_MODULE_1__.isPercentage)(initConfiguration.telemetrySampleRate)) {
        _tools_display__WEBPACK_IMPORTED_MODULE_0__.display.error('Telemetry Sample Rate should be a number between 0 and 100');
        return;
    }
    if (initConfiguration.telemetryConfigurationSampleRate !== undefined &&
        !(0,_tools_utils_numberUtils__WEBPACK_IMPORTED_MODULE_1__.isPercentage)(initConfiguration.telemetryConfigurationSampleRate)) {
        _tools_display__WEBPACK_IMPORTED_MODULE_0__.display.error('Telemetry Configuration Sample Rate should be a number between 0 and 100');
        return;
    }
    // Set the experimental feature flags as early as possible, so we can use them in most places
    if (Array.isArray(initConfiguration.enableExperimentalFeatures)) {
        (0,_tools_experimentalFeatures__WEBPACK_IMPORTED_MODULE_2__.addExperimentalFeatures)(initConfiguration.enableExperimentalFeatures.filter(function (flag) {
            return (0,_tools_utils_objectUtils__WEBPACK_IMPORTED_MODULE_3__.objectHasValue)(_tools_experimentalFeatures__WEBPACK_IMPORTED_MODULE_2__.ExperimentalFeature, flag);
        }));
    }
    return (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_4__.assign)({
        beforeSend: initConfiguration.beforeSend && (0,_tools_catchUserErrors__WEBPACK_IMPORTED_MODULE_5__.catchUserErrors)(initConfiguration.beforeSend, 'beforeSend threw an error:'),
        sessionStoreStrategyType: (0,_session_sessionStore__WEBPACK_IMPORTED_MODULE_6__.selectSessionStoreStrategyType)(initConfiguration),
        sessionSampleRate: sessionSampleRate !== null && sessionSampleRate !== void 0 ? sessionSampleRate : 100,
        telemetrySampleRate: (_b = initConfiguration.telemetrySampleRate) !== null && _b !== void 0 ? _b : 20,
        telemetryConfigurationSampleRate: (_c = initConfiguration.telemetryConfigurationSampleRate) !== null && _c !== void 0 ? _c : 5,
        service: initConfiguration.service,
        silentMultipleInit: !!initConfiguration.silentMultipleInit,
        /**
         * beacon payload max queue size implementation is 64kb
         * ensure that we leave room for logs, rum and potential other users
         */
        batchBytesLimit: 16 * _tools_utils_byteUtils__WEBPACK_IMPORTED_MODULE_7__.ONE_KIBI_BYTE,
        eventRateLimiterThreshold: 3000,
        maxTelemetryEventsPerPage: 15,
        /**
         * flush automatically, aim to be lower than ALB connection timeout
         * to maximize connection reuse.
         */
        flushTimeout: (30 * _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_8__.ONE_SECOND),
        /**
         * Logs intake limit
         */
        batchMessagesLimit: 50,
        messageBytesLimit: 256 * _tools_utils_byteUtils__WEBPACK_IMPORTED_MODULE_7__.ONE_KIBI_BYTE,
    }, (0,_transportConfiguration__WEBPACK_IMPORTED_MODULE_9__.computeTransportConfiguration)(initConfiguration));
}
function serializeConfiguration(initConfiguration) {
    var _a, _b;
    var proxy = (_a = initConfiguration.proxy) !== null && _a !== void 0 ? _a : initConfiguration.proxyUrl;
    return {
        session_sample_rate: (_b = initConfiguration.sessionSampleRate) !== null && _b !== void 0 ? _b : initConfiguration.sampleRate,
        telemetry_sample_rate: initConfiguration.telemetrySampleRate,
        telemetry_configuration_sample_rate: initConfiguration.telemetryConfigurationSampleRate,
        use_before_send: !!initConfiguration.beforeSend,
        use_cross_site_session_cookie: initConfiguration.useCrossSiteSessionCookie,
        use_secure_session_cookie: initConfiguration.useSecureSessionCookie,
        use_proxy: proxy !== undefined ? !!proxy : undefined,
        silent_multiple_init: initConfiguration.silentMultipleInit,
        track_session_across_subdomains: initConfiguration.trackSessionAcrossSubdomains,
        track_resources: initConfiguration.trackResources,
        track_long_task: initConfiguration.trackLongTasks,
        allow_fallback_to_local_storage: !!initConfiguration.allowFallbackToLocalStorage,
    };
}
//# sourceMappingURL=configuration.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/configuration/endpointBuilder.js":
/*!********************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/configuration/endpointBuilder.js ***!
  \********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ENDPOINTS: () => (/* binding */ ENDPOINTS),
/* harmony export */   createEndpointBuilder: () => (/* binding */ createEndpointBuilder)
/* harmony export */ });
/* harmony import */ var _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../tools/utils/timeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _tools_utils_urlPolyfill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/utils/urlPolyfill */ "../../node_modules/@datadog/browser-core/esm/tools/utils/urlPolyfill.js");
/* harmony import */ var _tools_experimentalFeatures__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../tools/experimentalFeatures */ "../../node_modules/@datadog/browser-core/esm/tools/experimentalFeatures.js");
/* harmony import */ var _tools_utils_stringUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../tools/utils/stringUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/stringUtils.js");
/* harmony import */ var _intakeSites__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./intakeSites */ "../../node_modules/@datadog/browser-core/esm/domain/configuration/intakeSites.js");





var ENDPOINTS = {
    logs: 'logs',
    rum: 'rum',
    sessionReplay: 'session-replay',
};
var INTAKE_TRACKS = {
    logs: 'logs',
    rum: 'rum',
    sessionReplay: 'replay',
};
function createEndpointBuilder(initConfiguration, endpointType, configurationTags) {
    var buildUrlWithParameters = createEndpointUrlWithParametersBuilder(initConfiguration, endpointType);
    return {
        build: function (api, flushReason, retry) {
            var parameters = buildEndpointParameters(initConfiguration, endpointType, configurationTags, api, flushReason, retry);
            return buildUrlWithParameters(parameters);
        },
        urlPrefix: buildUrlWithParameters(''),
        endpointType: endpointType,
    };
}
/**
 * Create a function used to build a full endpoint url from provided parameters. The goal of this
 * function is to pre-compute some parts of the URL to avoid re-computing everything on every
 * request, as only parameters are changing.
 */
function createEndpointUrlWithParametersBuilder(initConfiguration, endpointType) {
    var path = "/api/v2/".concat(INTAKE_TRACKS[endpointType]);
    var proxy = initConfiguration.proxy, proxyUrl = initConfiguration.proxyUrl;
    if (proxy) {
        var normalizedProxyUrl_1 = (0,_tools_utils_urlPolyfill__WEBPACK_IMPORTED_MODULE_0__.normalizeUrl)(proxy);
        return function (parameters) { return "".concat(normalizedProxyUrl_1, "?ddforward=").concat(encodeURIComponent("".concat(path, "?").concat(parameters))); };
    }
    var host = buildEndpointHost(initConfiguration, endpointType);
    if (proxy === undefined && proxyUrl) {
        // TODO: remove this in a future major.
        var normalizedProxyUrl_2 = (0,_tools_utils_urlPolyfill__WEBPACK_IMPORTED_MODULE_0__.normalizeUrl)(proxyUrl);
        return function (parameters) {
            return "".concat(normalizedProxyUrl_2, "?ddforward=").concat(encodeURIComponent("https://".concat(host).concat(path, "?").concat(parameters)));
        };
    }
    return function (parameters) { return "https://".concat(host).concat(path, "?").concat(parameters); };
}
function buildEndpointHost(initConfiguration, endpointType) {
    var _a = initConfiguration.site, site = _a === void 0 ? _intakeSites__WEBPACK_IMPORTED_MODULE_1__.INTAKE_SITE_US1 : _a, internalAnalyticsSubdomain = initConfiguration.internalAnalyticsSubdomain;
    if (internalAnalyticsSubdomain && site === _intakeSites__WEBPACK_IMPORTED_MODULE_1__.INTAKE_SITE_US1) {
        return "".concat(internalAnalyticsSubdomain, ".").concat(_intakeSites__WEBPACK_IMPORTED_MODULE_1__.INTAKE_SITE_US1);
    }
    var domainParts = site.split('.');
    var extension = domainParts.pop();
    var subdomain = site !== _intakeSites__WEBPACK_IMPORTED_MODULE_1__.INTAKE_SITE_AP1 ? "".concat(ENDPOINTS[endpointType], ".") : '';
    return "".concat(subdomain, "browser-intake-").concat(domainParts.join('-'), ".").concat(extension);
}
/**
 * Build parameters to be used for an intake request. Parameters should be re-built for each
 * request, as they change randomly.
 */
function buildEndpointParameters(_a, endpointType, configurationTags, api, flushReason, retry) {
    var clientToken = _a.clientToken, internalAnalyticsSubdomain = _a.internalAnalyticsSubdomain;
    var tags = ["sdk_version:".concat("4.48.2"), "api:".concat(api)].concat(configurationTags);
    if (flushReason && (0,_tools_experimentalFeatures__WEBPACK_IMPORTED_MODULE_2__.isExperimentalFeatureEnabled)(_tools_experimentalFeatures__WEBPACK_IMPORTED_MODULE_2__.ExperimentalFeature.COLLECT_FLUSH_REASON)) {
        tags.push("flush_reason:".concat(flushReason));
    }
    if (retry) {
        tags.push("retry_count:".concat(retry.count), "retry_after:".concat(retry.lastFailureStatus));
    }
    var parameters = [
        'ddsource=browser',
        "ddtags=".concat(encodeURIComponent(tags.join(','))),
        "dd-api-key=".concat(clientToken),
        "dd-evp-origin-version=".concat(encodeURIComponent("4.48.2")),
        'dd-evp-origin=browser',
        "dd-request-id=".concat((0,_tools_utils_stringUtils__WEBPACK_IMPORTED_MODULE_3__.generateUUID)()),
    ];
    if (endpointType === 'rum') {
        parameters.push("batch_time=".concat((0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_4__.timeStampNow)()));
    }
    if (internalAnalyticsSubdomain) {
        parameters.reverse();
    }
    return parameters.join('&');
}
//# sourceMappingURL=endpointBuilder.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/configuration/intakeSites.js":
/*!****************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/configuration/intakeSites.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   INTAKE_SITE_AP1: () => (/* binding */ INTAKE_SITE_AP1),
/* harmony export */   INTAKE_SITE_EU1: () => (/* binding */ INTAKE_SITE_EU1),
/* harmony export */   INTAKE_SITE_STAGING: () => (/* binding */ INTAKE_SITE_STAGING),
/* harmony export */   INTAKE_SITE_US1: () => (/* binding */ INTAKE_SITE_US1),
/* harmony export */   INTAKE_SITE_US1_FED: () => (/* binding */ INTAKE_SITE_US1_FED)
/* harmony export */ });
var INTAKE_SITE_STAGING = 'datad0g.com';
var INTAKE_SITE_US1 = 'datadoghq.com';
var INTAKE_SITE_EU1 = 'datadoghq.eu';
var INTAKE_SITE_AP1 = 'ap1.datadoghq.com';
var INTAKE_SITE_US1_FED = 'ddog-gov.com';
//# sourceMappingURL=intakeSites.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/configuration/tags.js":
/*!*********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/configuration/tags.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   TAG_SIZE_LIMIT: () => (/* binding */ TAG_SIZE_LIMIT),
/* harmony export */   buildTag: () => (/* binding */ buildTag),
/* harmony export */   buildTags: () => (/* binding */ buildTags)
/* harmony export */ });
/* harmony import */ var _tools_display__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/display */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");

var TAG_SIZE_LIMIT = 200;
function buildTags(configuration) {
    var env = configuration.env, service = configuration.service, version = configuration.version, datacenter = configuration.datacenter;
    var tags = [];
    if (env) {
        tags.push(buildTag('env', env));
    }
    if (service) {
        tags.push(buildTag('service', service));
    }
    if (version) {
        tags.push(buildTag('version', version));
    }
    if (datacenter) {
        tags.push(buildTag('datacenter', datacenter));
    }
    return tags;
}
var FORBIDDEN_CHARACTERS = /[^a-z0-9_:./-]/;
function buildTag(key, rawValue) {
    // See https://docs.datadoghq.com/getting_started/tagging/#defining-tags for tags syntax. Note
    // that the backend may not follow the exact same rules, so we only want to display an informal
    // warning.
    var valueSizeLimit = TAG_SIZE_LIMIT - key.length - 1;
    if (rawValue.length > valueSizeLimit || FORBIDDEN_CHARACTERS.test(rawValue)) {
        _tools_display__WEBPACK_IMPORTED_MODULE_0__.display.warn("".concat(key, " value doesn't meet tag requirements and will be sanitized"));
    }
    // Let the backend do most of the sanitization, but still make sure multiple tags can't be crafted
    // by forging a value containing commas.
    var sanitizedValue = rawValue.replace(/,/g, '_');
    return "".concat(key, ":").concat(sanitizedValue);
}
//# sourceMappingURL=tags.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/configuration/transportConfiguration.js":
/*!***************************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/configuration/transportConfiguration.js ***!
  \***************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   computeTransportConfiguration: () => (/* binding */ computeTransportConfiguration)
/* harmony export */ });
/* harmony import */ var _tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../tools/utils/polyfills */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");
/* harmony import */ var _endpointBuilder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./endpointBuilder */ "../../node_modules/@datadog/browser-core/esm/domain/configuration/endpointBuilder.js");
/* harmony import */ var _tags__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tags */ "../../node_modules/@datadog/browser-core/esm/domain/configuration/tags.js");
/* harmony import */ var _intakeSites__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./intakeSites */ "../../node_modules/@datadog/browser-core/esm/domain/configuration/intakeSites.js");




function computeTransportConfiguration(initConfiguration) {
    var tags = (0,_tags__WEBPACK_IMPORTED_MODULE_0__.buildTags)(initConfiguration);
    var endpointBuilders = computeEndpointBuilders(initConfiguration, tags);
    var intakeUrlPrefixes = (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_1__.objectValues)(endpointBuilders).map(function (builder) { return builder.urlPrefix; });
    var replicaConfiguration = computeReplicaConfiguration(initConfiguration, intakeUrlPrefixes, tags);
    return (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_1__.assign)({
        isIntakeUrl: function (url) { return intakeUrlPrefixes.some(function (intakeEndpoint) { return url.indexOf(intakeEndpoint) === 0; }); },
        replica: replicaConfiguration,
        site: initConfiguration.site || _intakeSites__WEBPACK_IMPORTED_MODULE_2__.INTAKE_SITE_US1,
    }, endpointBuilders);
}
function computeEndpointBuilders(initConfiguration, tags) {
    return {
        logsEndpointBuilder: (0,_endpointBuilder__WEBPACK_IMPORTED_MODULE_3__.createEndpointBuilder)(initConfiguration, 'logs', tags),
        rumEndpointBuilder: (0,_endpointBuilder__WEBPACK_IMPORTED_MODULE_3__.createEndpointBuilder)(initConfiguration, 'rum', tags),
        sessionReplayEndpointBuilder: (0,_endpointBuilder__WEBPACK_IMPORTED_MODULE_3__.createEndpointBuilder)(initConfiguration, 'sessionReplay', tags),
    };
}
function computeReplicaConfiguration(initConfiguration, intakeUrlPrefixes, tags) {
    if (!initConfiguration.replica) {
        return;
    }
    var replicaConfiguration = (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_1__.assign)({}, initConfiguration, {
        site: _intakeSites__WEBPACK_IMPORTED_MODULE_2__.INTAKE_SITE_US1,
        clientToken: initConfiguration.replica.clientToken,
    });
    var replicaEndpointBuilders = {
        logsEndpointBuilder: (0,_endpointBuilder__WEBPACK_IMPORTED_MODULE_3__.createEndpointBuilder)(replicaConfiguration, 'logs', tags),
        rumEndpointBuilder: (0,_endpointBuilder__WEBPACK_IMPORTED_MODULE_3__.createEndpointBuilder)(replicaConfiguration, 'rum', tags),
    };
    intakeUrlPrefixes.push.apply(intakeUrlPrefixes, (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_1__.objectValues)(replicaEndpointBuilders).map(function (builder) { return builder.urlPrefix; }));
    return (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_1__.assign)({ applicationId: initConfiguration.replica.applicationId }, replicaEndpointBuilders);
}
//# sourceMappingURL=transportConfiguration.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/console/consoleObservable.js":
/*!****************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/console/consoleObservable.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   initConsoleObservable: () => (/* binding */ initConsoleObservable),
/* harmony export */   resetConsoleObservable: () => (/* binding */ resetConsoleObservable)
/* harmony export */ });
/* harmony import */ var _tracekit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../tracekit */ "../../node_modules/@datadog/browser-core/esm/domain/tracekit/computeStackTrace.js");
/* harmony import */ var _error_error__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../error/error */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.js");
/* harmony import */ var _tools_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/observable */ "../../node_modules/@datadog/browser-core/esm/tools/observable.js");
/* harmony import */ var _tools_display__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../tools/display */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");
/* harmony import */ var _tools_monitor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../tools/monitor */ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js");
/* harmony import */ var _tools_serialisation_sanitize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../tools/serialisation/sanitize */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/sanitize.js");
/* harmony import */ var _tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../tools/utils/polyfills */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");
/* harmony import */ var _tools_serialisation_jsonStringify__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../tools/serialisation/jsonStringify */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/jsonStringify.js");








var consoleObservablesByApi = {};
function initConsoleObservable(apis) {
    var consoleObservables = apis.map(function (api) {
        if (!consoleObservablesByApi[api]) {
            consoleObservablesByApi[api] = createConsoleObservable(api);
        }
        return consoleObservablesByApi[api];
    });
    return _tools_observable__WEBPACK_IMPORTED_MODULE_0__.mergeObservables.apply(void 0, consoleObservables);
}
function resetConsoleObservable() {
    consoleObservablesByApi = {};
}
function createConsoleObservable(api) {
    var observable = new _tools_observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function () {
        var originalConsoleApi = _tools_display__WEBPACK_IMPORTED_MODULE_1__.globalConsole[api];
        _tools_display__WEBPACK_IMPORTED_MODULE_1__.globalConsole[api] = function () {
            var params = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                params[_i] = arguments[_i];
            }
            originalConsoleApi.apply(console, params);
            var handlingStack = (0,_error_error__WEBPACK_IMPORTED_MODULE_2__.createHandlingStack)();
            (0,_tools_monitor__WEBPACK_IMPORTED_MODULE_3__.callMonitored)(function () {
                observable.notify(buildConsoleLog(params, api, handlingStack));
            });
        };
        return function () {
            _tools_display__WEBPACK_IMPORTED_MODULE_1__.globalConsole[api] = originalConsoleApi;
        };
    });
    return observable;
}
function buildConsoleLog(params, api, handlingStack) {
    // Todo: remove console error prefix in the next major version
    var message = params.map(function (param) { return formatConsoleParameters(param); }).join(' ');
    var stack;
    var fingerprint;
    if (api === _tools_display__WEBPACK_IMPORTED_MODULE_1__.ConsoleApiName.error) {
        var firstErrorParam = (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_4__.find)(params, function (param) { return param instanceof Error; });
        stack = firstErrorParam ? (0,_error_error__WEBPACK_IMPORTED_MODULE_2__.toStackTraceString)((0,_tracekit__WEBPACK_IMPORTED_MODULE_5__.computeStackTrace)(firstErrorParam)) : undefined;
        fingerprint = (0,_error_error__WEBPACK_IMPORTED_MODULE_2__.tryToGetFingerprint)(firstErrorParam);
        message = "console error: ".concat(message);
    }
    return {
        api: api,
        message: message,
        stack: stack,
        handlingStack: handlingStack,
        fingerprint: fingerprint,
    };
}
function formatConsoleParameters(param) {
    if (typeof param === 'string') {
        return (0,_tools_serialisation_sanitize__WEBPACK_IMPORTED_MODULE_6__.sanitize)(param);
    }
    if (param instanceof Error) {
        return (0,_error_error__WEBPACK_IMPORTED_MODULE_2__.formatErrorMessage)((0,_tracekit__WEBPACK_IMPORTED_MODULE_5__.computeStackTrace)(param));
    }
    return (0,_tools_serialisation_jsonStringify__WEBPACK_IMPORTED_MODULE_7__.jsonStringify)((0,_tools_serialisation_sanitize__WEBPACK_IMPORTED_MODULE_6__.sanitize)(param), undefined, 2);
}
//# sourceMappingURL=consoleObservable.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/error/error.js":
/*!**************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/error/error.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NO_ERROR_STACK_PRESENT_MESSAGE: () => (/* binding */ NO_ERROR_STACK_PRESENT_MESSAGE),
/* harmony export */   computeRawError: () => (/* binding */ computeRawError),
/* harmony export */   createHandlingStack: () => (/* binding */ createHandlingStack),
/* harmony export */   flattenErrorCauses: () => (/* binding */ flattenErrorCauses),
/* harmony export */   formatErrorMessage: () => (/* binding */ formatErrorMessage),
/* harmony export */   getFileFromStackTraceString: () => (/* binding */ getFileFromStackTraceString),
/* harmony export */   toStackTraceString: () => (/* binding */ toStackTraceString),
/* harmony export */   tryToGetFingerprint: () => (/* binding */ tryToGetFingerprint)
/* harmony export */ });
/* harmony import */ var _tracekit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tracekit */ "../../node_modules/@datadog/browser-core/esm/domain/tracekit/computeStackTrace.js");
/* harmony import */ var _tools_monitor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../tools/monitor */ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js");
/* harmony import */ var _tools_serialisation_sanitize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../tools/serialisation/sanitize */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/sanitize.js");
/* harmony import */ var _tools_utils_functionUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../tools/utils/functionUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js");
/* harmony import */ var _tools_serialisation_jsonStringify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/serialisation/jsonStringify */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/jsonStringify.js");





var NO_ERROR_STACK_PRESENT_MESSAGE = 'No stack, consider using an instance of Error';
function computeRawError(_a) {
    var stackTrace = _a.stackTrace, originalError = _a.originalError, handlingStack = _a.handlingStack, startClocks = _a.startClocks, nonErrorPrefix = _a.nonErrorPrefix, source = _a.source, handling = _a.handling;
    var isErrorInstance = originalError instanceof Error;
    var message = computeMessage(stackTrace, isErrorInstance, nonErrorPrefix, originalError);
    var stack = hasUsableStack(isErrorInstance, stackTrace)
        ? toStackTraceString(stackTrace)
        : NO_ERROR_STACK_PRESENT_MESSAGE;
    var causes = isErrorInstance ? flattenErrorCauses(originalError, source) : undefined;
    var type = stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.name;
    var fingerprint = tryToGetFingerprint(originalError);
    return {
        startClocks: startClocks,
        source: source,
        handling: handling,
        handlingStack: handlingStack,
        originalError: originalError,
        type: type,
        message: message,
        stack: stack,
        causes: causes,
        fingerprint: fingerprint,
    };
}
function computeMessage(stackTrace, isErrorInstance, nonErrorPrefix, originalError) {
    // Favor stackTrace message only if tracekit has really been able to extract something meaningful (message + name)
    // TODO rework tracekit integration to avoid scattering error building logic
    return (stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.message) && (stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.name)
        ? stackTrace.message
        : !isErrorInstance
            ? "".concat(nonErrorPrefix, " ").concat((0,_tools_serialisation_jsonStringify__WEBPACK_IMPORTED_MODULE_0__.jsonStringify)((0,_tools_serialisation_sanitize__WEBPACK_IMPORTED_MODULE_1__.sanitize)(originalError)))
            : 'Empty message';
}
function hasUsableStack(isErrorInstance, stackTrace) {
    if (stackTrace === undefined) {
        return false;
    }
    if (isErrorInstance) {
        return true;
    }
    // handle cases where tracekit return stack = [] or stack = [{url: undefined, line: undefined, column: undefined}]
    // TODO rework tracekit integration to avoid generating those unusable stack
    return stackTrace.stack.length > 0 && (stackTrace.stack.length > 1 || stackTrace.stack[0].url !== undefined);
}
function tryToGetFingerprint(originalError) {
    return originalError instanceof Error && 'dd_fingerprint' in originalError
        ? String(originalError.dd_fingerprint)
        : undefined;
}
function toStackTraceString(stack) {
    var result = formatErrorMessage(stack);
    stack.stack.forEach(function (frame) {
        var func = frame.func === '?' ? '<anonymous>' : frame.func;
        var args = frame.args && frame.args.length > 0 ? "(".concat(frame.args.join(', '), ")") : '';
        var line = frame.line ? ":".concat(frame.line) : '';
        var column = frame.line && frame.column ? ":".concat(frame.column) : '';
        result += "\n  at ".concat(func).concat(args, " @ ").concat(frame.url).concat(line).concat(column);
    });
    return result;
}
function getFileFromStackTraceString(stack) {
    var _a;
    return (_a = /@ (.+)/.exec(stack)) === null || _a === void 0 ? void 0 : _a[1];
}
function formatErrorMessage(stack) {
    return "".concat(stack.name || 'Error', ": ").concat(stack.message);
}
/**
 Creates a stacktrace without SDK internal frames.
 
 Constraints:
 - Has to be called at the utmost position of the call stack.
 - No monitored function should encapsulate it, that is why we need to use callMonitored inside it.
 */
function createHandlingStack() {
    /**
     * Skip the two internal frames:
     * - SDK API (console.error, ...)
     * - this function
     * in order to keep only the user calls
     */
    var internalFramesToSkip = 2;
    var error = new Error();
    var formattedStack;
    // IE needs to throw the error to fill in the stack trace
    if (!error.stack) {
        try {
            throw error;
        }
        catch (e) {
            (0,_tools_utils_functionUtils__WEBPACK_IMPORTED_MODULE_2__.noop)();
        }
    }
    (0,_tools_monitor__WEBPACK_IMPORTED_MODULE_3__.callMonitored)(function () {
        var stackTrace = (0,_tracekit__WEBPACK_IMPORTED_MODULE_4__.computeStackTrace)(error);
        stackTrace.stack = stackTrace.stack.slice(internalFramesToSkip);
        formattedStack = toStackTraceString(stackTrace);
    });
    return formattedStack;
}
function flattenErrorCauses(error, parentSource) {
    var currentError = error;
    var causes = [];
    while ((currentError === null || currentError === void 0 ? void 0 : currentError.cause) instanceof Error && causes.length < 10) {
        var stackTrace = (0,_tracekit__WEBPACK_IMPORTED_MODULE_4__.computeStackTrace)(currentError.cause);
        causes.push({
            message: currentError.cause.message,
            source: parentSource,
            type: stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.name,
            stack: stackTrace && toStackTraceString(stackTrace),
        });
        currentError = currentError.cause;
    }
    return causes.length ? causes : undefined;
}
//# sourceMappingURL=error.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/error/error.types.js":
/*!********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/error/error.types.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ErrorSource: () => (/* binding */ ErrorSource)
/* harmony export */ });
var ErrorSource = {
    AGENT: 'agent',
    CONSOLE: 'console',
    CUSTOM: 'custom',
    LOGGER: 'logger',
    NETWORK: 'network',
    SOURCE: 'source',
    REPORT: 'report',
};
//# sourceMappingURL=error.types.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/error/trackRuntimeError.js":
/*!**************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/error/trackRuntimeError.js ***!
  \**************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   trackRuntimeError: () => (/* binding */ trackRuntimeError)
/* harmony export */ });
/* harmony import */ var _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../tools/utils/timeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _tracekit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tracekit */ "../../node_modules/@datadog/browser-core/esm/domain/tracekit/tracekit.js");
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./error */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.js");
/* harmony import */ var _error_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./error.types */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.types.js");




function trackRuntimeError(errorObservable) {
    return (0,_tracekit__WEBPACK_IMPORTED_MODULE_0__.startUnhandledErrorCollection)(function (stackTrace, originalError) {
        errorObservable.notify((0,_error__WEBPACK_IMPORTED_MODULE_1__.computeRawError)({
            stackTrace: stackTrace,
            originalError: originalError,
            startClocks: (0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_2__.clocksNow)(),
            nonErrorPrefix: "Uncaught" /* NonErrorPrefix.UNCAUGHT */,
            source: _error_types__WEBPACK_IMPORTED_MODULE_3__.ErrorSource.SOURCE,
            handling: "unhandled" /* ErrorHandling.UNHANDLED */,
        }));
    });
}
//# sourceMappingURL=trackRuntimeError.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/eventRateLimiter/createEventRateLimiter.js":
/*!******************************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/eventRateLimiter/createEventRateLimiter.js ***!
  \******************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   createEventRateLimiter: () => (/* binding */ createEventRateLimiter)
/* harmony export */ });
/* harmony import */ var _tools_timer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/timer */ "../../node_modules/@datadog/browser-core/esm/tools/timer.js");
/* harmony import */ var _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../tools/utils/timeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _error_error_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../error/error.types */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.types.js");



function createEventRateLimiter(eventType, limit, onLimitReached) {
    var eventCount = 0;
    var allowNextEvent = false;
    return {
        isLimitReached: function () {
            if (eventCount === 0) {
                (0,_tools_timer__WEBPACK_IMPORTED_MODULE_0__.setTimeout)(function () {
                    eventCount = 0;
                }, _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_1__.ONE_MINUTE);
            }
            eventCount += 1;
            if (eventCount <= limit || allowNextEvent) {
                allowNextEvent = false;
                return false;
            }
            if (eventCount === limit + 1) {
                allowNextEvent = true;
                try {
                    onLimitReached({
                        message: "Reached max number of ".concat(eventType, "s by minute: ").concat(limit),
                        source: _error_error_types__WEBPACK_IMPORTED_MODULE_2__.ErrorSource.AGENT,
                        startClocks: (0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_1__.clocksNow)(),
                    });
                }
                finally {
                    allowNextEvent = false;
                }
            }
            return true;
        },
    };
}
//# sourceMappingURL=createEventRateLimiter.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/report/reportObservable.js":
/*!**************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/report/reportObservable.js ***!
  \**************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   RawReportType: () => (/* binding */ RawReportType),
/* harmony export */   initReportObservable: () => (/* binding */ initReportObservable)
/* harmony export */ });
/* harmony import */ var _error_error__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../error/error */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.js");
/* harmony import */ var _tools_monitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../tools/monitor */ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js");
/* harmony import */ var _tools_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../tools/observable */ "../../node_modules/@datadog/browser-core/esm/tools/observable.js");
/* harmony import */ var _browser_addEventListener__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/addEventListener */ "../../node_modules/@datadog/browser-core/esm/browser/addEventListener.js");
/* harmony import */ var _tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/utils/polyfills */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");
/* harmony import */ var _tools_utils_stringUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../tools/utils/stringUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/stringUtils.js");






var RawReportType = {
    intervention: 'intervention',
    deprecation: 'deprecation',
    cspViolation: 'csp_violation',
};
function initReportObservable(configuration, apis) {
    var observables = [];
    if ((0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_0__.includes)(apis, RawReportType.cspViolation)) {
        observables.push(createCspViolationReportObservable(configuration));
    }
    var reportTypes = apis.filter(function (api) { return api !== RawReportType.cspViolation; });
    if (reportTypes.length) {
        observables.push(createReportObservable(reportTypes));
    }
    return _tools_observable__WEBPACK_IMPORTED_MODULE_1__.mergeObservables.apply(void 0, observables);
}
function createReportObservable(reportTypes) {
    var observable = new _tools_observable__WEBPACK_IMPORTED_MODULE_1__.Observable(function () {
        if (!window.ReportingObserver) {
            return;
        }
        var handleReports = (0,_tools_monitor__WEBPACK_IMPORTED_MODULE_2__.monitor)(function (reports, _) {
            return reports.forEach(function (report) {
                observable.notify(buildRawReportFromReport(report));
            });
        });
        var observer = new window.ReportingObserver(handleReports, {
            types: reportTypes,
            buffered: true,
        });
        observer.observe();
        return function () {
            observer.disconnect();
        };
    });
    return observable;
}
function createCspViolationReportObservable(configuration) {
    var observable = new _tools_observable__WEBPACK_IMPORTED_MODULE_1__.Observable(function () {
        var stop = (0,_browser_addEventListener__WEBPACK_IMPORTED_MODULE_3__.addEventListener)(configuration, document, "securitypolicyviolation" /* DOM_EVENT.SECURITY_POLICY_VIOLATION */, function (event) {
            observable.notify(buildRawReportFromCspViolation(event));
        }).stop;
        return stop;
    });
    return observable;
}
function buildRawReportFromReport(_a) {
    var type = _a.type, body = _a.body;
    return {
        type: type,
        subtype: body.id,
        message: "".concat(type, ": ").concat(body.message),
        stack: buildStack(body.id, body.message, body.sourceFile, body.lineNumber, body.columnNumber),
    };
}
function buildRawReportFromCspViolation(event) {
    var type = RawReportType.cspViolation;
    var message = "'".concat(event.blockedURI, "' blocked by '").concat(event.effectiveDirective, "' directive");
    return {
        type: RawReportType.cspViolation,
        subtype: event.effectiveDirective,
        message: "".concat(type, ": ").concat(message),
        stack: buildStack(event.effectiveDirective, event.originalPolicy
            ? "".concat(message, " of the policy \"").concat((0,_tools_utils_stringUtils__WEBPACK_IMPORTED_MODULE_4__.safeTruncate)(event.originalPolicy, 100, '...'), "\"")
            : 'no policy', event.sourceFile, event.lineNumber, event.columnNumber),
    };
}
function buildStack(name, message, sourceFile, lineNumber, columnNumber) {
    return sourceFile
        ? (0,_error_error__WEBPACK_IMPORTED_MODULE_5__.toStackTraceString)({
            name: name,
            message: message,
            stack: [
                {
                    func: '?',
                    url: sourceFile,
                    line: lineNumber !== null && lineNumber !== void 0 ? lineNumber : undefined,
                    column: columnNumber !== null && columnNumber !== void 0 ? columnNumber : undefined,
                },
            ],
        })
        : undefined;
}
//# sourceMappingURL=reportObservable.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/session/oldCookiesMigration.js":
/*!******************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/session/oldCookiesMigration.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   LOGS_SESSION_KEY: () => (/* binding */ LOGS_SESSION_KEY),
/* harmony export */   OLD_LOGS_COOKIE_NAME: () => (/* binding */ OLD_LOGS_COOKIE_NAME),
/* harmony export */   OLD_RUM_COOKIE_NAME: () => (/* binding */ OLD_RUM_COOKIE_NAME),
/* harmony export */   OLD_SESSION_COOKIE_NAME: () => (/* binding */ OLD_SESSION_COOKIE_NAME),
/* harmony export */   RUM_SESSION_KEY: () => (/* binding */ RUM_SESSION_KEY),
/* harmony export */   tryOldCookiesMigration: () => (/* binding */ tryOldCookiesMigration)
/* harmony export */ });
/* harmony import */ var _browser_cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../browser/cookie */ "../../node_modules/@datadog/browser-core/esm/browser/cookie.js");
/* harmony import */ var _storeStrategies_sessionStoreStrategy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./storeStrategies/sessionStoreStrategy */ "../../node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionStoreStrategy.js");
/* harmony import */ var _sessionState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sessionState */ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionState.js");



var OLD_SESSION_COOKIE_NAME = '_dd';
var OLD_RUM_COOKIE_NAME = '_dd_r';
var OLD_LOGS_COOKIE_NAME = '_dd_l';
// duplicate values to avoid dependency issues
var RUM_SESSION_KEY = 'rum';
var LOGS_SESSION_KEY = 'logs';
/**
 * This migration should remain in the codebase as long as older versions are available/live
 * to allow older sdk versions to be upgraded to newer versions without compatibility issues.
 */
function tryOldCookiesMigration(cookieStoreStrategy) {
    var sessionString = (0,_browser_cookie__WEBPACK_IMPORTED_MODULE_0__.getCookie)(_storeStrategies_sessionStoreStrategy__WEBPACK_IMPORTED_MODULE_1__.SESSION_STORE_KEY);
    if (!sessionString) {
        var oldSessionId = (0,_browser_cookie__WEBPACK_IMPORTED_MODULE_0__.getCookie)(OLD_SESSION_COOKIE_NAME);
        var oldRumType = (0,_browser_cookie__WEBPACK_IMPORTED_MODULE_0__.getCookie)(OLD_RUM_COOKIE_NAME);
        var oldLogsType = (0,_browser_cookie__WEBPACK_IMPORTED_MODULE_0__.getCookie)(OLD_LOGS_COOKIE_NAME);
        var session = {};
        if (oldSessionId) {
            session.id = oldSessionId;
        }
        if (oldLogsType && /^[01]$/.test(oldLogsType)) {
            session[LOGS_SESSION_KEY] = oldLogsType;
        }
        if (oldRumType && /^[012]$/.test(oldRumType)) {
            session[RUM_SESSION_KEY] = oldRumType;
        }
        if (!(0,_sessionState__WEBPACK_IMPORTED_MODULE_2__.isSessionInExpiredState)(session)) {
            (0,_sessionState__WEBPACK_IMPORTED_MODULE_2__.expandSessionState)(session);
            cookieStoreStrategy.persistSession(session);
        }
    }
}
//# sourceMappingURL=oldCookiesMigration.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionConstants.js":
/*!***************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/session/sessionConstants.js ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SESSION_EXPIRATION_DELAY: () => (/* binding */ SESSION_EXPIRATION_DELAY),
/* harmony export */   SESSION_TIME_OUT_DELAY: () => (/* binding */ SESSION_TIME_OUT_DELAY)
/* harmony export */ });
/* harmony import */ var _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/utils/timeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");

var SESSION_TIME_OUT_DELAY = 4 * _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__.ONE_HOUR;
var SESSION_EXPIRATION_DELAY = 15 * _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__.ONE_MINUTE;
//# sourceMappingURL=sessionConstants.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionManager.js":
/*!*************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/session/sessionManager.js ***!
  \*************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   VISIBILITY_CHECK_DELAY: () => (/* binding */ VISIBILITY_CHECK_DELAY),
/* harmony export */   startSessionManager: () => (/* binding */ startSessionManager),
/* harmony export */   stopSessionManager: () => (/* binding */ stopSessionManager)
/* harmony export */ });
/* harmony import */ var _tools_valueHistory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../tools/valueHistory */ "../../node_modules/@datadog/browser-core/esm/tools/valueHistory.js");
/* harmony import */ var _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/utils/timeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _browser_addEventListener__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/addEventListener */ "../../node_modules/@datadog/browser-core/esm/browser/addEventListener.js");
/* harmony import */ var _tools_timer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../tools/timer */ "../../node_modules/@datadog/browser-core/esm/tools/timer.js");
/* harmony import */ var _sessionConstants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sessionConstants */ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionConstants.js");
/* harmony import */ var _sessionStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sessionStore */ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionStore.js");






var VISIBILITY_CHECK_DELAY = _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__.ONE_MINUTE;
var SESSION_CONTEXT_TIMEOUT_DELAY = _sessionConstants__WEBPACK_IMPORTED_MODULE_1__.SESSION_TIME_OUT_DELAY;
var stopCallbacks = [];
function startSessionManager(configuration, productKey, computeSessionState) {
    // TODO - Improve configuration type and remove assertion
    var sessionStore = (0,_sessionStore__WEBPACK_IMPORTED_MODULE_2__.startSessionStore)(configuration.sessionStoreStrategyType, productKey, computeSessionState);
    stopCallbacks.push(function () { return sessionStore.stop(); });
    var sessionContextHistory = new _tools_valueHistory__WEBPACK_IMPORTED_MODULE_3__.ValueHistory(SESSION_CONTEXT_TIMEOUT_DELAY);
    stopCallbacks.push(function () { return sessionContextHistory.stop(); });
    sessionStore.renewObservable.subscribe(function () {
        sessionContextHistory.add(buildSessionContext(), (0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__.relativeNow)());
    });
    sessionStore.expireObservable.subscribe(function () {
        sessionContextHistory.closeActive((0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__.relativeNow)());
    });
    sessionStore.expandOrRenewSession();
    sessionContextHistory.add(buildSessionContext(), (0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__.clocksOrigin)().relative);
    trackActivity(configuration, function () { return sessionStore.expandOrRenewSession(); });
    trackVisibility(configuration, function () { return sessionStore.expandSession(); });
    function buildSessionContext() {
        return {
            id: sessionStore.getSession().id,
            trackingType: sessionStore.getSession()[productKey],
        };
    }
    return {
        findActiveSession: function (startTime) { return sessionContextHistory.find(startTime); },
        renewObservable: sessionStore.renewObservable,
        expireObservable: sessionStore.expireObservable,
        expire: sessionStore.expire,
    };
}
function stopSessionManager() {
    stopCallbacks.forEach(function (e) { return e(); });
    stopCallbacks = [];
}
function trackActivity(configuration, expandOrRenewSession) {
    var stop = (0,_browser_addEventListener__WEBPACK_IMPORTED_MODULE_4__.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 }).stop;
    stopCallbacks.push(stop);
}
function trackVisibility(configuration, expandSession) {
    var expandSessionWhenVisible = function () {
        if (document.visibilityState === 'visible') {
            expandSession();
        }
    };
    var stop = (0,_browser_addEventListener__WEBPACK_IMPORTED_MODULE_4__.addEventListener)(configuration, document, "visibilitychange" /* DOM_EVENT.VISIBILITY_CHANGE */, expandSessionWhenVisible).stop;
    stopCallbacks.push(stop);
    var visibilityCheckInterval = (0,_tools_timer__WEBPACK_IMPORTED_MODULE_5__.setInterval)(expandSessionWhenVisible, VISIBILITY_CHECK_DELAY);
    stopCallbacks.push(function () {
        (0,_tools_timer__WEBPACK_IMPORTED_MODULE_5__.clearInterval)(visibilityCheckInterval);
    });
}
//# sourceMappingURL=sessionManager.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionState.js":
/*!***********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/session/sessionState.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   expandSessionState: () => (/* binding */ expandSessionState),
/* harmony export */   isSessionInExpiredState: () => (/* binding */ isSessionInExpiredState),
/* harmony export */   toSessionState: () => (/* binding */ toSessionState),
/* harmony export */   toSessionString: () => (/* binding */ toSessionString)
/* harmony export */ });
/* harmony import */ var _tools_utils_objectUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/utils/objectUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/objectUtils.js");
/* harmony import */ var _tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../tools/utils/polyfills */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");
/* harmony import */ var _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../tools/utils/timeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _sessionConstants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sessionConstants */ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionConstants.js");




var SESSION_ENTRY_REGEXP = /^([a-z]+)=([a-z0-9-]+)$/;
var SESSION_ENTRY_SEPARATOR = '&';
function isSessionInExpiredState(session) {
    return (0,_tools_utils_objectUtils__WEBPACK_IMPORTED_MODULE_0__.isEmptyObject)(session);
}
function expandSessionState(session) {
    session.expire = String((0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_1__.dateNow)() + _sessionConstants__WEBPACK_IMPORTED_MODULE_2__.SESSION_EXPIRATION_DELAY);
}
function toSessionString(session) {
    return (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_3__.objectEntries)(session)
        .map(function (_a) {
        var key = _a[0], value = _a[1];
        return "".concat(key, "=").concat(value);
    })
        .join(SESSION_ENTRY_SEPARATOR);
}
function toSessionState(sessionString) {
    var session = {};
    if (isValidSessionString(sessionString)) {
        sessionString.split(SESSION_ENTRY_SEPARATOR).forEach(function (entry) {
            var matches = SESSION_ENTRY_REGEXP.exec(entry);
            if (matches !== null) {
                var key = matches[1], value = matches[2];
                session[key] = value;
            }
        });
    }
    return session;
}
function isValidSessionString(sessionString) {
    return (!!sessionString &&
        (sessionString.indexOf(SESSION_ENTRY_SEPARATOR) !== -1 || SESSION_ENTRY_REGEXP.test(sessionString)));
}
//# sourceMappingURL=sessionState.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionStore.js":
/*!***********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/session/sessionStore.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   STORAGE_POLL_DELAY: () => (/* binding */ STORAGE_POLL_DELAY),
/* harmony export */   selectSessionStoreStrategyType: () => (/* binding */ selectSessionStoreStrategyType),
/* harmony export */   startSessionStore: () => (/* binding */ startSessionStore)
/* harmony export */ });
/* harmony import */ var _tools_timer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../tools/timer */ "../../node_modules/@datadog/browser-core/esm/tools/timer.js");
/* harmony import */ var _tools_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../tools/observable */ "../../node_modules/@datadog/browser-core/esm/tools/observable.js");
/* harmony import */ var _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/utils/timeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _tools_utils_functionUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../tools/utils/functionUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js");
/* harmony import */ var _tools_utils_stringUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../tools/utils/stringUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/stringUtils.js");
/* harmony import */ var _sessionConstants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./sessionConstants */ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionConstants.js");
/* harmony import */ var _storeStrategies_sessionInCookie__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./storeStrategies/sessionInCookie */ "../../node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInCookie.js");
/* harmony import */ var _storeStrategies_sessionInLocalStorage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./storeStrategies/sessionInLocalStorage */ "../../node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInLocalStorage.js");
/* harmony import */ var _sessionStoreOperations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sessionStoreOperations */ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionStoreOperations.js");









/**
 * Every second, the storage will be polled to check for any change that can occur
 * to the session state in another browser tab, or another window.
 * This value has been determined from our previous cookie-only implementation.
 */
var STORAGE_POLL_DELAY = _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__.ONE_SECOND;
/**
 * Checks if cookies are available as the preferred storage
 * Else, checks if LocalStorage is allowed and available
 */
function selectSessionStoreStrategyType(initConfiguration) {
    var sessionStoreStrategyType = (0,_storeStrategies_sessionInCookie__WEBPACK_IMPORTED_MODULE_1__.selectCookieStrategy)(initConfiguration);
    if (!sessionStoreStrategyType && initConfiguration.allowFallbackToLocalStorage) {
        sessionStoreStrategyType = (0,_storeStrategies_sessionInLocalStorage__WEBPACK_IMPORTED_MODULE_2__.selectLocalStorageStrategy)();
    }
    return sessionStoreStrategyType;
}
/**
 * Different session concepts:
 * - tracked, the session has an id and is updated along the user navigation
 * - not tracked, the session does not have an id but it is updated along the user navigation
 * - inactive, no session in store or session expired, waiting for a renew session
 */
function startSessionStore(sessionStoreStrategyType, productKey, computeSessionState) {
    var renewObservable = new _tools_observable__WEBPACK_IMPORTED_MODULE_3__.Observable();
    var expireObservable = new _tools_observable__WEBPACK_IMPORTED_MODULE_3__.Observable();
    var sessionStoreStrategy = sessionStoreStrategyType.type === 'Cookie'
        ? (0,_storeStrategies_sessionInCookie__WEBPACK_IMPORTED_MODULE_1__.initCookieStrategy)(sessionStoreStrategyType.cookieOptions)
        : (0,_storeStrategies_sessionInLocalStorage__WEBPACK_IMPORTED_MODULE_2__.initLocalStorageStrategy)();
    var clearSession = sessionStoreStrategy.clearSession, retrieveSession = sessionStoreStrategy.retrieveSession;
    var watchSessionTimeoutId = (0,_tools_timer__WEBPACK_IMPORTED_MODULE_4__.setInterval)(watchSession, STORAGE_POLL_DELAY);
    var sessionCache = retrieveActiveSession();
    function expandOrRenewSession() {
        var isTracked;
        (0,_sessionStoreOperations__WEBPACK_IMPORTED_MODULE_5__.processSessionStoreOperations)({
            process: function (sessionState) {
                var synchronizedSession = synchronizeSession(sessionState);
                isTracked = expandOrRenewSessionState(synchronizedSession);
                return synchronizedSession;
            },
            after: function (sessionState) {
                if (isTracked && !hasSessionInCache()) {
                    renewSessionInCache(sessionState);
                }
                sessionCache = sessionState;
            },
        }, sessionStoreStrategy);
    }
    function expandSession() {
        (0,_sessionStoreOperations__WEBPACK_IMPORTED_MODULE_5__.processSessionStoreOperations)({
            process: function (sessionState) { return (hasSessionInCache() ? synchronizeSession(sessionState) : undefined); },
        }, sessionStoreStrategy);
    }
    /**
     * allows two behaviors:
     * - if the session is active, synchronize the session cache without updating the session store
     * - if the session is not active, clear the session store and expire the session cache
     */
    function watchSession() {
        (0,_sessionStoreOperations__WEBPACK_IMPORTED_MODULE_5__.processSessionStoreOperations)({
            process: function (sessionState) { return (!isActiveSession(sessionState) ? {} : undefined); },
            after: synchronizeSession,
        }, sessionStoreStrategy);
    }
    function synchronizeSession(sessionState) {
        if (!isActiveSession(sessionState)) {
            sessionState = {};
        }
        if (hasSessionInCache()) {
            if (isSessionInCacheOutdated(sessionState)) {
                expireSessionInCache();
            }
            else {
                sessionCache = sessionState;
            }
        }
        return sessionState;
    }
    function expandOrRenewSessionState(sessionState) {
        var _a = computeSessionState(sessionState[productKey]), trackingType = _a.trackingType, isTracked = _a.isTracked;
        sessionState[productKey] = trackingType;
        if (isTracked && !sessionState.id) {
            sessionState.id = (0,_tools_utils_stringUtils__WEBPACK_IMPORTED_MODULE_6__.generateUUID)();
            sessionState.created = String((0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__.dateNow)());
        }
        return isTracked;
    }
    function hasSessionInCache() {
        return sessionCache[productKey] !== undefined;
    }
    function isSessionInCacheOutdated(sessionState) {
        return sessionCache.id !== sessionState.id || sessionCache[productKey] !== sessionState[productKey];
    }
    function expireSessionInCache() {
        sessionCache = {};
        expireObservable.notify();
    }
    function renewSessionInCache(sessionState) {
        sessionCache = sessionState;
        renewObservable.notify();
    }
    function retrieveActiveSession() {
        var session = retrieveSession();
        if (isActiveSession(session)) {
            return session;
        }
        return {};
    }
    function isActiveSession(sessionState) {
        // created and expire can be undefined for versions which was not storing them
        // these checks could be removed when older versions will not be available/live anymore
        return ((sessionState.created === undefined || (0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__.dateNow)() - Number(sessionState.created) < _sessionConstants__WEBPACK_IMPORTED_MODULE_7__.SESSION_TIME_OUT_DELAY) &&
            (sessionState.expire === undefined || (0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__.dateNow)() < Number(sessionState.expire)));
    }
    return {
        expandOrRenewSession: (0,_tools_utils_functionUtils__WEBPACK_IMPORTED_MODULE_8__.throttle)(expandOrRenewSession, STORAGE_POLL_DELAY).throttled,
        expandSession: expandSession,
        getSession: function () { return sessionCache; },
        renewObservable: renewObservable,
        expireObservable: expireObservable,
        expire: function () {
            clearSession();
            synchronizeSession({});
        },
        stop: function () {
            (0,_tools_timer__WEBPACK_IMPORTED_MODULE_4__.clearInterval)(watchSessionTimeoutId);
        },
    };
}
//# sourceMappingURL=sessionStore.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionStoreOperations.js":
/*!*********************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/session/sessionStoreOperations.js ***!
  \*********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   LOCK_MAX_TRIES: () => (/* binding */ LOCK_MAX_TRIES),
/* harmony export */   LOCK_RETRY_DELAY: () => (/* binding */ LOCK_RETRY_DELAY),
/* harmony export */   isLockEnabled: () => (/* binding */ isLockEnabled),
/* harmony export */   processSessionStoreOperations: () => (/* binding */ processSessionStoreOperations)
/* harmony export */ });
/* harmony import */ var _tools_timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../tools/timer */ "../../node_modules/@datadog/browser-core/esm/tools/timer.js");
/* harmony import */ var _tools_utils_stringUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/utils/stringUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/stringUtils.js");
/* harmony import */ var _tools_utils_browserDetection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../tools/utils/browserDetection */ "../../node_modules/@datadog/browser-core/esm/tools/utils/browserDetection.js");
/* harmony import */ var _sessionState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sessionState */ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionState.js");




var LOCK_RETRY_DELAY = 10;
var LOCK_MAX_TRIES = 100;
var bufferedOperations = [];
var ongoingOperations;
function processSessionStoreOperations(operations, sessionStoreStrategy, numberOfRetries) {
    var _a;
    if (numberOfRetries === void 0) { numberOfRetries = 0; }
    var retrieveSession = sessionStoreStrategy.retrieveSession, persistSession = sessionStoreStrategy.persistSession, clearSession = sessionStoreStrategy.clearSession;
    var lockEnabled = isLockEnabled();
    if (!ongoingOperations) {
        ongoingOperations = operations;
    }
    if (operations !== ongoingOperations) {
        bufferedOperations.push(operations);
        return;
    }
    if (lockEnabled && numberOfRetries >= LOCK_MAX_TRIES) {
        next(sessionStoreStrategy);
        return;
    }
    var currentLock;
    var currentSession = retrieveSession();
    if (lockEnabled) {
        // if someone has lock, retry later
        if (currentSession.lock) {
            retryLater(operations, sessionStoreStrategy, numberOfRetries);
            return;
        }
        // acquire lock
        currentLock = (0,_tools_utils_stringUtils__WEBPACK_IMPORTED_MODULE_0__.generateUUID)();
        currentSession.lock = currentLock;
        persistSession(currentSession);
        // if lock is not acquired, retry later
        currentSession = retrieveSession();
        if (currentSession.lock !== currentLock) {
            retryLater(operations, sessionStoreStrategy, numberOfRetries);
            return;
        }
    }
    var processedSession = operations.process(currentSession);
    if (lockEnabled) {
        // if lock corrupted after process, retry later
        currentSession = retrieveSession();
        if (currentSession.lock !== currentLock) {
            retryLater(operations, sessionStoreStrategy, numberOfRetries);
            return;
        }
    }
    if (processedSession) {
        if ((0,_sessionState__WEBPACK_IMPORTED_MODULE_1__.isSessionInExpiredState)(processedSession)) {
            clearSession();
        }
        else {
            (0,_sessionState__WEBPACK_IMPORTED_MODULE_1__.expandSessionState)(processedSession);
            persistSession(processedSession);
        }
    }
    if (lockEnabled) {
        // correctly handle lock around expiration would require to handle this case properly at several levels
        // since we don't have evidence of lock issues around expiration, let's just not do the corruption check for it
        if (!(processedSession && (0,_sessionState__WEBPACK_IMPORTED_MODULE_1__.isSessionInExpiredState)(processedSession))) {
            // if lock corrupted after persist, retry later
            currentSession = retrieveSession();
            if (currentSession.lock !== currentLock) {
                retryLater(operations, sessionStoreStrategy, numberOfRetries);
                return;
            }
            delete currentSession.lock;
            persistSession(currentSession);
            processedSession = currentSession;
        }
    }
    // call after even if session is not persisted in order to perform operations on
    // up-to-date session state value => the value could have been modified by another tab
    (_a = operations.after) === null || _a === void 0 ? void 0 : _a.call(operations, processedSession || currentSession);
    next(sessionStoreStrategy);
}
/**
 * Lock strategy allows mitigating issues due to concurrent access to cookie.
 * This issue concerns only chromium browsers and enabling this on firefox increases cookie write failures.
 */
var isLockEnabled = function () { return (0,_tools_utils_browserDetection__WEBPACK_IMPORTED_MODULE_2__.isChromium)(); };
function retryLater(operations, sessionStore, currentNumberOfRetries) {
    (0,_tools_timer__WEBPACK_IMPORTED_MODULE_3__.setTimeout)(function () {
        processSessionStoreOperations(operations, sessionStore, currentNumberOfRetries + 1);
    }, LOCK_RETRY_DELAY);
}
function next(sessionStore) {
    ongoingOperations = undefined;
    var nextOperations = bufferedOperations.shift();
    if (nextOperations) {
        processSessionStoreOperations(nextOperations, sessionStore);
    }
}
//# sourceMappingURL=sessionStoreOperations.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInCookie.js":
/*!******************************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInCookie.js ***!
  \******************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   buildCookieOptions: () => (/* binding */ buildCookieOptions),
/* harmony export */   initCookieStrategy: () => (/* binding */ initCookieStrategy),
/* harmony export */   selectCookieStrategy: () => (/* binding */ selectCookieStrategy)
/* harmony export */ });
/* harmony import */ var _browser_cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../browser/cookie */ "../../node_modules/@datadog/browser-core/esm/browser/cookie.js");
/* harmony import */ var _oldCookiesMigration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../oldCookiesMigration */ "../../node_modules/@datadog/browser-core/esm/domain/session/oldCookiesMigration.js");
/* harmony import */ var _sessionConstants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../sessionConstants */ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionConstants.js");
/* harmony import */ var _sessionState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../sessionState */ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionState.js");
/* harmony import */ var _sessionStoreStrategy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sessionStoreStrategy */ "../../node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionStoreStrategy.js");





function selectCookieStrategy(initConfiguration) {
    var cookieOptions = buildCookieOptions(initConfiguration);
    return (0,_browser_cookie__WEBPACK_IMPORTED_MODULE_0__.areCookiesAuthorized)(cookieOptions) ? { type: 'Cookie', cookieOptions: cookieOptions } : undefined;
}
function initCookieStrategy(cookieOptions) {
    var cookieStore = {
        persistSession: persistSessionCookie(cookieOptions),
        retrieveSession: retrieveSessionCookie,
        clearSession: deleteSessionCookie(cookieOptions),
    };
    (0,_oldCookiesMigration__WEBPACK_IMPORTED_MODULE_1__.tryOldCookiesMigration)(cookieStore);
    return cookieStore;
}
function persistSessionCookie(options) {
    return function (session) {
        (0,_browser_cookie__WEBPACK_IMPORTED_MODULE_0__.setCookie)(_sessionStoreStrategy__WEBPACK_IMPORTED_MODULE_2__.SESSION_STORE_KEY, (0,_sessionState__WEBPACK_IMPORTED_MODULE_3__.toSessionString)(session), _sessionConstants__WEBPACK_IMPORTED_MODULE_4__.SESSION_EXPIRATION_DELAY, options);
    };
}
function retrieveSessionCookie() {
    var sessionString = (0,_browser_cookie__WEBPACK_IMPORTED_MODULE_0__.getCookie)(_sessionStoreStrategy__WEBPACK_IMPORTED_MODULE_2__.SESSION_STORE_KEY);
    return (0,_sessionState__WEBPACK_IMPORTED_MODULE_3__.toSessionState)(sessionString);
}
function deleteSessionCookie(options) {
    return function () {
        (0,_browser_cookie__WEBPACK_IMPORTED_MODULE_0__.deleteCookie)(_sessionStoreStrategy__WEBPACK_IMPORTED_MODULE_2__.SESSION_STORE_KEY, options);
    };
}
function buildCookieOptions(initConfiguration) {
    var cookieOptions = {};
    cookieOptions.secure = !!initConfiguration.useSecureSessionCookie || !!initConfiguration.useCrossSiteSessionCookie;
    cookieOptions.crossSite = !!initConfiguration.useCrossSiteSessionCookie;
    if (initConfiguration.trackSessionAcrossSubdomains) {
        cookieOptions.domain = (0,_browser_cookie__WEBPACK_IMPORTED_MODULE_0__.getCurrentSite)();
    }
    return cookieOptions;
}
//# sourceMappingURL=sessionInCookie.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInLocalStorage.js":
/*!************************************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInLocalStorage.js ***!
  \************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   initLocalStorageStrategy: () => (/* binding */ initLocalStorageStrategy),
/* harmony export */   selectLocalStorageStrategy: () => (/* binding */ selectLocalStorageStrategy)
/* harmony export */ });
/* harmony import */ var _tools_utils_stringUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../tools/utils/stringUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/stringUtils.js");
/* harmony import */ var _sessionState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../sessionState */ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionState.js");
/* harmony import */ var _sessionStoreStrategy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sessionStoreStrategy */ "../../node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionStoreStrategy.js");



var LOCAL_STORAGE_TEST_KEY = '_dd_test_';
function selectLocalStorageStrategy() {
    try {
        var id = (0,_tools_utils_stringUtils__WEBPACK_IMPORTED_MODULE_0__.generateUUID)();
        var testKey = "".concat(LOCAL_STORAGE_TEST_KEY).concat(id);
        localStorage.setItem(testKey, id);
        var retrievedId = localStorage.getItem(testKey);
        localStorage.removeItem(testKey);
        return id === retrievedId ? { type: 'LocalStorage' } : undefined;
    }
    catch (e) {
        return undefined;
    }
}
function initLocalStorageStrategy() {
    return {
        persistSession: persistInLocalStorage,
        retrieveSession: retrieveSessionFromLocalStorage,
        clearSession: clearSessionFromLocalStorage,
    };
}
function persistInLocalStorage(sessionState) {
    localStorage.setItem(_sessionStoreStrategy__WEBPACK_IMPORTED_MODULE_1__.SESSION_STORE_KEY, (0,_sessionState__WEBPACK_IMPORTED_MODULE_2__.toSessionString)(sessionState));
}
function retrieveSessionFromLocalStorage() {
    var sessionString = localStorage.getItem(_sessionStoreStrategy__WEBPACK_IMPORTED_MODULE_1__.SESSION_STORE_KEY);
    return (0,_sessionState__WEBPACK_IMPORTED_MODULE_2__.toSessionState)(sessionString);
}
function clearSessionFromLocalStorage() {
    localStorage.removeItem(_sessionStoreStrategy__WEBPACK_IMPORTED_MODULE_1__.SESSION_STORE_KEY);
}
//# sourceMappingURL=sessionInLocalStorage.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionStoreStrategy.js":
/*!***********************************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionStoreStrategy.js ***!
  \***********************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SESSION_STORE_KEY: () => (/* binding */ SESSION_STORE_KEY)
/* harmony export */ });
var SESSION_STORE_KEY = '_dd_s';
//# sourceMappingURL=sessionStoreStrategy.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/synthetics/syntheticsWorkerValues.js":
/*!************************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/synthetics/syntheticsWorkerValues.js ***!
  \************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SYNTHETICS_INJECTS_RUM_COOKIE_NAME: () => (/* binding */ SYNTHETICS_INJECTS_RUM_COOKIE_NAME),
/* harmony export */   SYNTHETICS_RESULT_ID_COOKIE_NAME: () => (/* binding */ SYNTHETICS_RESULT_ID_COOKIE_NAME),
/* harmony export */   SYNTHETICS_TEST_ID_COOKIE_NAME: () => (/* binding */ SYNTHETICS_TEST_ID_COOKIE_NAME),
/* harmony export */   getSyntheticsResultId: () => (/* binding */ getSyntheticsResultId),
/* harmony export */   getSyntheticsTestId: () => (/* binding */ getSyntheticsTestId),
/* harmony export */   willSyntheticsInjectRum: () => (/* binding */ willSyntheticsInjectRum)
/* harmony export */ });
/* harmony import */ var _browser_cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../browser/cookie */ "../../node_modules/@datadog/browser-core/esm/browser/cookie.js");

var SYNTHETICS_TEST_ID_COOKIE_NAME = 'datadog-synthetics-public-id';
var SYNTHETICS_RESULT_ID_COOKIE_NAME = 'datadog-synthetics-result-id';
var SYNTHETICS_INJECTS_RUM_COOKIE_NAME = 'datadog-synthetics-injects-rum';
function willSyntheticsInjectRum() {
    return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM || (0,_browser_cookie__WEBPACK_IMPORTED_MODULE_0__.getCookie)(SYNTHETICS_INJECTS_RUM_COOKIE_NAME));
}
function getSyntheticsTestId() {
    var value = window._DATADOG_SYNTHETICS_PUBLIC_ID || (0,_browser_cookie__WEBPACK_IMPORTED_MODULE_0__.getCookie)(SYNTHETICS_TEST_ID_COOKIE_NAME);
    return typeof value === 'string' ? value : undefined;
}
function getSyntheticsResultId() {
    var value = window._DATADOG_SYNTHETICS_RESULT_ID || (0,_browser_cookie__WEBPACK_IMPORTED_MODULE_0__.getCookie)(SYNTHETICS_RESULT_ID_COOKIE_NAME);
    return typeof value === 'string' ? value : undefined;
}
//# sourceMappingURL=syntheticsWorkerValues.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/telemetry/rawTelemetryEvent.types.js":
/*!************************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/telemetry/rawTelemetryEvent.types.js ***!
  \************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   TelemetryType: () => (/* binding */ TelemetryType)
/* harmony export */ });
var TelemetryType = {
    log: 'log',
    configuration: 'configuration',
};
//# sourceMappingURL=rawTelemetryEvent.types.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/telemetry/telemetry.js":
/*!**********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/telemetry/telemetry.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   addTelemetryConfiguration: () => (/* binding */ addTelemetryConfiguration),
/* harmony export */   addTelemetryDebug: () => (/* binding */ addTelemetryDebug),
/* harmony export */   addTelemetryError: () => (/* binding */ addTelemetryError),
/* harmony export */   formatError: () => (/* binding */ formatError),
/* harmony export */   isTelemetryReplicationAllowed: () => (/* binding */ isTelemetryReplicationAllowed),
/* harmony export */   resetTelemetry: () => (/* binding */ resetTelemetry),
/* harmony export */   scrubCustomerFrames: () => (/* binding */ scrubCustomerFrames),
/* harmony export */   startFakeTelemetry: () => (/* binding */ startFakeTelemetry),
/* harmony export */   startTelemetry: () => (/* binding */ startTelemetry)
/* harmony export */ });
/* harmony import */ var _tools_display__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../tools/display */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");
/* harmony import */ var _error_error__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../error/error */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.js");
/* harmony import */ var _tools_experimentalFeatures__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../tools/experimentalFeatures */ "../../node_modules/@datadog/browser-core/esm/tools/experimentalFeatures.js");
/* harmony import */ var _configuration__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../configuration */ "../../node_modules/@datadog/browser-core/esm/domain/configuration/intakeSites.js");
/* harmony import */ var _tracekit__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../tracekit */ "../../node_modules/@datadog/browser-core/esm/domain/tracekit/computeStackTrace.js");
/* harmony import */ var _tools_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../tools/observable */ "../../node_modules/@datadog/browser-core/esm/tools/observable.js");
/* harmony import */ var _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../tools/utils/timeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _tools_monitor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../tools/monitor */ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js");
/* harmony import */ var _tools_sendToExtension__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../tools/sendToExtension */ "../../node_modules/@datadog/browser-core/esm/tools/sendToExtension.js");
/* harmony import */ var _tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../tools/utils/polyfills */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");
/* harmony import */ var _tools_utils_numberUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../tools/utils/numberUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/numberUtils.js");
/* harmony import */ var _tools_serialisation_jsonStringify__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../tools/serialisation/jsonStringify */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/jsonStringify.js");
/* harmony import */ var _tools_mergeInto__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../tools/mergeInto */ "../../node_modules/@datadog/browser-core/esm/tools/mergeInto.js");
/* harmony import */ var _rawTelemetryEvent_types__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./rawTelemetryEvent.types */ "../../node_modules/@datadog/browser-core/esm/domain/telemetry/rawTelemetryEvent.types.js");














var ALLOWED_FRAME_URLS = [
    'https://www.datadoghq-browser-agent.com',
    'https://www.datad0g-browser-agent.com',
    'https://d3uc069fcn7uxw.cloudfront.net',
    'https://d20xtzwzcl0ceb.cloudfront.net',
    'http://localhost',
    '<anonymous>',
];
var TELEMETRY_EXCLUDED_SITES = [_configuration__WEBPACK_IMPORTED_MODULE_0__.INTAKE_SITE_US1_FED];
var telemetryConfiguration = { maxEventsPerPage: 0, sentEventCount: 0, telemetryEnabled: false, telemetryConfigurationEnabled: false };
var onRawTelemetryEventCollected;
function startTelemetry(telemetryService, configuration) {
    var contextProvider;
    var observable = new _tools_observable__WEBPACK_IMPORTED_MODULE_1__.Observable();
    telemetryConfiguration.telemetryEnabled =
        !(0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_2__.includes)(TELEMETRY_EXCLUDED_SITES, configuration.site) && (0,_tools_utils_numberUtils__WEBPACK_IMPORTED_MODULE_3__.performDraw)(configuration.telemetrySampleRate);
    telemetryConfiguration.telemetryConfigurationEnabled =
        telemetryConfiguration.telemetryEnabled && (0,_tools_utils_numberUtils__WEBPACK_IMPORTED_MODULE_3__.performDraw)(configuration.telemetryConfigurationSampleRate);
    onRawTelemetryEventCollected = function (rawEvent) {
        if (telemetryConfiguration.telemetryEnabled) {
            var event_1 = toTelemetryEvent(telemetryService, rawEvent);
            observable.notify(event_1);
            (0,_tools_sendToExtension__WEBPACK_IMPORTED_MODULE_4__.sendToExtension)('telemetry', event_1);
        }
    };
    (0,_tools_monitor__WEBPACK_IMPORTED_MODULE_5__.startMonitorErrorCollection)(addTelemetryError);
    (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_2__.assign)(telemetryConfiguration, {
        maxEventsPerPage: configuration.maxTelemetryEventsPerPage,
        sentEventCount: 0,
    });
    function toTelemetryEvent(telemetryService, event) {
        return (0,_tools_mergeInto__WEBPACK_IMPORTED_MODULE_6__.combine)({
            type: 'telemetry',
            date: (0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_7__.timeStampNow)(),
            service: telemetryService,
            version: "4.48.2",
            source: 'browser',
            _dd: {
                format_version: 2,
            },
            telemetry: event,
            experimental_features: (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_2__.arrayFrom)((0,_tools_experimentalFeatures__WEBPACK_IMPORTED_MODULE_8__.getExperimentalFeatures)()),
        }, contextProvider !== undefined ? contextProvider() : {});
    }
    return {
        setContextProvider: function (provider) {
            contextProvider = provider;
        },
        observable: observable,
        enabled: telemetryConfiguration.telemetryEnabled,
    };
}
function startFakeTelemetry() {
    var events = [];
    (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_2__.assign)(telemetryConfiguration, {
        maxEventsPerPage: Infinity,
        sentEventCount: 0,
    });
    onRawTelemetryEventCollected = function (event) {
        events.push(event);
    };
    return events;
}
function resetTelemetry() {
    onRawTelemetryEventCollected = undefined;
}
/**
 * Avoid mixing telemetry events from different data centers
 * but keep replicating staging events for reliability
 */
function isTelemetryReplicationAllowed(configuration) {
    return configuration.site === _configuration__WEBPACK_IMPORTED_MODULE_0__.INTAKE_SITE_STAGING;
}
function addTelemetryDebug(message, context) {
    (0,_tools_monitor__WEBPACK_IMPORTED_MODULE_5__.displayIfDebugEnabled)(_tools_display__WEBPACK_IMPORTED_MODULE_9__.ConsoleApiName.debug, message, context);
    addTelemetry((0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_2__.assign)({
        type: _rawTelemetryEvent_types__WEBPACK_IMPORTED_MODULE_10__.TelemetryType.log,
        message: message,
        status: "debug" /* StatusType.debug */,
    }, context));
}
function addTelemetryError(e, context) {
    addTelemetry((0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_2__.assign)({
        type: _rawTelemetryEvent_types__WEBPACK_IMPORTED_MODULE_10__.TelemetryType.log,
        status: "error" /* StatusType.error */,
    }, formatError(e), context));
}
function addTelemetryConfiguration(configuration) {
    if (telemetryConfiguration.telemetryConfigurationEnabled) {
        addTelemetry({
            type: _rawTelemetryEvent_types__WEBPACK_IMPORTED_MODULE_10__.TelemetryType.configuration,
            configuration: configuration,
        });
    }
}
function addTelemetry(event) {
    if (onRawTelemetryEventCollected && telemetryConfiguration.sentEventCount < telemetryConfiguration.maxEventsPerPage) {
        telemetryConfiguration.sentEventCount += 1;
        onRawTelemetryEventCollected(event);
    }
}
function formatError(e) {
    if (e instanceof Error) {
        var stackTrace = (0,_tracekit__WEBPACK_IMPORTED_MODULE_11__.computeStackTrace)(e);
        return {
            error: {
                kind: stackTrace.name,
                stack: (0,_error_error__WEBPACK_IMPORTED_MODULE_12__.toStackTraceString)(scrubCustomerFrames(stackTrace)),
            },
            message: stackTrace.message,
        };
    }
    return {
        error: {
            stack: _error_error__WEBPACK_IMPORTED_MODULE_12__.NO_ERROR_STACK_PRESENT_MESSAGE,
        },
        message: "".concat("Uncaught" /* NonErrorPrefix.UNCAUGHT */, " ").concat((0,_tools_serialisation_jsonStringify__WEBPACK_IMPORTED_MODULE_13__.jsonStringify)(e)),
    };
}
function scrubCustomerFrames(stackTrace) {
    stackTrace.stack = stackTrace.stack.filter(function (frame) { return !frame.url || ALLOWED_FRAME_URLS.some(function (allowedFrameUrl) { return (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_2__.startsWith)(frame.url, allowedFrameUrl); }); });
    return stackTrace;
}
//# sourceMappingURL=telemetry.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/tracekit/computeStackTrace.js":
/*!*****************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/tracekit/computeStackTrace.js ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   computeStackTrace: () => (/* binding */ computeStackTrace)
/* harmony export */ });
/* harmony import */ var _tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/utils/polyfills */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");

var UNKNOWN_FUNCTION = '?';
/**
 * Computes a stack trace for an exception.
 */
function computeStackTrace(ex) {
    var stack = [];
    var stackProperty = tryToGetString(ex, 'stack');
    var exString = String(ex);
    if (stackProperty && (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_0__.startsWith)(stackProperty, exString)) {
        stackProperty = stackProperty.slice(exString.length);
    }
    if (stackProperty) {
        stackProperty.split('\n').forEach(function (line) {
            var stackFrame = parseChromeLine(line) || parseChromeAnonymousLine(line) || parseWinLine(line) || parseGeckoLine(line);
            if (stackFrame) {
                if (!stackFrame.func && stackFrame.line) {
                    stackFrame.func = UNKNOWN_FUNCTION;
                }
                stack.push(stackFrame);
            }
        });
    }
    return {
        message: tryToGetString(ex, 'message'),
        name: tryToGetString(ex, 'name'),
        stack: stack,
    };
}
var fileUrl = '((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)';
var filePosition = '(?::(\\d+))';
var CHROME_LINE_RE = new RegExp("^\\s*at (.*?) ?\\(".concat(fileUrl).concat(filePosition, "?").concat(filePosition, "?\\)?\\s*$"), 'i');
var CHROME_EVAL_RE = new RegExp("\\((\\S*)".concat(filePosition).concat(filePosition, "\\)"));
function parseChromeLine(line) {
    var parts = CHROME_LINE_RE.exec(line);
    if (!parts) {
        return;
    }
    var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line
    var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line
    var submatch = CHROME_EVAL_RE.exec(parts[2]);
    if (isEval && submatch) {
        // throw out eval line/column and use top-most line/column number
        parts[2] = submatch[1]; // url
        parts[3] = submatch[2]; // line
        parts[4] = submatch[3]; // column
    }
    return {
        args: isNative ? [parts[2]] : [],
        column: parts[4] ? +parts[4] : undefined,
        func: parts[1] || UNKNOWN_FUNCTION,
        line: parts[3] ? +parts[3] : undefined,
        url: !isNative ? parts[2] : undefined,
    };
}
var CHROME_ANONYMOUS_FUNCTION_RE = new RegExp("^\\s*at ?".concat(fileUrl).concat(filePosition, "?").concat(filePosition, "??\\s*$"), 'i');
function parseChromeAnonymousLine(line) {
    var parts = CHROME_ANONYMOUS_FUNCTION_RE.exec(line);
    if (!parts) {
        return;
    }
    return {
        args: [],
        column: parts[3] ? +parts[3] : undefined,
        func: UNKNOWN_FUNCTION,
        line: parts[2] ? +parts[2] : undefined,
        url: parts[1],
    };
}
var WINJS_LINE_RE = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
function parseWinLine(line) {
    var parts = WINJS_LINE_RE.exec(line);
    if (!parts) {
        return;
    }
    return {
        args: [],
        column: parts[4] ? +parts[4] : undefined,
        func: parts[1] || UNKNOWN_FUNCTION,
        line: +parts[3],
        url: parts[2],
    };
}
var GECKO_LINE_RE = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i;
var GECKO_EVAL_RE = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
function parseGeckoLine(line) {
    var parts = GECKO_LINE_RE.exec(line);
    if (!parts) {
        return;
    }
    var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
    var submatch = GECKO_EVAL_RE.exec(parts[3]);
    if (isEval && submatch) {
        // throw out eval line/column and use top-most line number
        parts[3] = submatch[1];
        parts[4] = submatch[2];
        parts[5] = undefined; // no column when eval
    }
    return {
        args: parts[2] ? parts[2].split(',') : [],
        column: parts[5] ? +parts[5] : undefined,
        func: parts[1] || UNKNOWN_FUNCTION,
        line: parts[4] ? +parts[4] : undefined,
        url: parts[3],
    };
}
function tryToGetString(candidate, property) {
    if (typeof candidate !== 'object' || !candidate || !(property in candidate)) {
        return undefined;
    }
    var value = candidate[property];
    return typeof value === 'string' ? value : undefined;
}
//# sourceMappingURL=computeStackTrace.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/tracekit/tracekit.js":
/*!********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/tracekit/tracekit.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   startUnhandledErrorCollection: () => (/* binding */ startUnhandledErrorCollection)
/* harmony export */ });
/* harmony import */ var _tools_instrumentMethod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/instrumentMethod */ "../../node_modules/@datadog/browser-core/esm/tools/instrumentMethod.js");
/* harmony import */ var _computeStackTrace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./computeStackTrace */ "../../node_modules/@datadog/browser-core/esm/domain/tracekit/computeStackTrace.js");


// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types
var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;
/**
 * Cross-browser collection of unhandled errors
 *
 * Supports:
 * - Firefox: full stack trace with line numbers, plus column number
 * on top frame; column number is not guaranteed
 * - Opera: full stack trace with line and column numbers
 * - Chrome: full stack trace with line and column numbers
 * - Safari: line and column number for the top frame only; some frames
 * may be missing, and column number is not guaranteed
 * - IE: line and column number for the top frame only; some frames
 * may be missing, and column number is not guaranteed
 *
 * In theory, TraceKit should work on all of the following versions:
 * - IE5.5+ (only 8.0 tested)
 * - Firefox 0.9+ (only 3.5+ tested)
 * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require
 * Exceptions Have Stacktrace to be enabled in opera:config)
 * - Safari 3+ (only 4+ tested)
 * - Chrome 1+ (only 5+ tested)
 * - Konqueror 3.5+ (untested)
 *
 * Tries to catch all unhandled errors and report them to the
 * callback.
 *
 * Callbacks receive a StackTrace object as described in the
 * computeStackTrace docs.
 *
 * @memberof TraceKit
 * @namespace
 */
function startUnhandledErrorCollection(callback) {
    var stopInstrumentingOnError = instrumentOnError(callback).stop;
    var stopInstrumentingOnUnhandledRejection = instrumentUnhandledRejection(callback).stop;
    return {
        stop: function () {
            stopInstrumentingOnError();
            stopInstrumentingOnUnhandledRejection();
        },
    };
}
/**
 * Install a global onerror handler
 */
function instrumentOnError(callback) {
    return (0,_tools_instrumentMethod__WEBPACK_IMPORTED_MODULE_0__.instrumentMethodAndCallOriginal)(window, 'onerror', {
        before: function (messageObj, url, line, column, errorObj) {
            var stackTrace;
            if (errorObj instanceof Error) {
                stackTrace = (0,_computeStackTrace__WEBPACK_IMPORTED_MODULE_1__.computeStackTrace)(errorObj);
            }
            else {
                var stack = [{ url: url, column: column, line: line }];
                var _a = tryToParseMessage(messageObj), name_1 = _a.name, message = _a.message;
                stackTrace = {
                    name: name_1,
                    message: message,
                    stack: stack,
                };
            }
            callback(stackTrace, errorObj !== null && errorObj !== void 0 ? errorObj : messageObj);
        },
    });
}
function tryToParseMessage(messageObj) {
    var _a;
    var name;
    var message;
    if ({}.toString.call(messageObj) === '[object String]') {
        ;
        _a = ERROR_TYPES_RE.exec(messageObj), name = _a[1], message = _a[2];
    }
    return { name: name, message: message };
}
/**
 * Install a global onunhandledrejection handler
 */
function instrumentUnhandledRejection(callback) {
    return (0,_tools_instrumentMethod__WEBPACK_IMPORTED_MODULE_0__.instrumentMethodAndCallOriginal)(window, 'onunhandledrejection', {
        before: function (e) {
            var reason = e.reason || 'Empty reason';
            var stack = (0,_computeStackTrace__WEBPACK_IMPORTED_MODULE_1__.computeStackTrace)(reason);
            callback(stack, reason);
        },
    });
}
//# sourceMappingURL=tracekit.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/domain/user/user.js":
/*!************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/domain/user/user.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   checkUser: () => (/* binding */ checkUser),
/* harmony export */   sanitizeUser: () => (/* binding */ sanitizeUser)
/* harmony export */ });
/* harmony import */ var _tools_display__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../tools/display */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");
/* harmony import */ var _tools_utils_typeUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../tools/utils/typeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/typeUtils.js");
/* harmony import */ var _tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../tools/utils/polyfills */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");



/**
 * Clone input data and ensure known user properties (id, name, email)
 * are strings, as defined here:
 * https://docs.datadoghq.com/logs/log_configuration/attributes_naming_convention/#user-related-attributes
 */
function sanitizeUser(newUser) {
    // We shallow clone only to prevent mutation of user data.
    var user = (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_0__.assign)({}, newUser);
    var keys = ['id', 'name', 'email'];
    keys.forEach(function (key) {
        if (key in user) {
            user[key] = String(user[key]);
        }
    });
    return user;
}
/**
 * Simple check to ensure user is valid
 */
function checkUser(newUser) {
    var isValid = (0,_tools_utils_typeUtils__WEBPACK_IMPORTED_MODULE_1__.getType)(newUser) === 'object';
    if (!isValid) {
        _tools_display__WEBPACK_IMPORTED_MODULE_2__.display.error('Unsupported user:', newUser);
    }
    return isValid;
}
//# sourceMappingURL=user.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/abstractLifeCycle.js":
/*!*******************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/abstractLifeCycle.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AbstractLifeCycle: () => (/* binding */ AbstractLifeCycle)
/* harmony export */ });
var AbstractLifeCycle = /** @class */ (function () {
    function AbstractLifeCycle() {
        this.callbacks = {};
    }
    AbstractLifeCycle.prototype.notify = function (eventType, data) {
        var eventCallbacks = this.callbacks[eventType];
        if (eventCallbacks) {
            eventCallbacks.forEach(function (callback) { return callback(data); });
        }
    };
    AbstractLifeCycle.prototype.subscribe = function (eventType, callback) {
        var _this = this;
        if (!this.callbacks[eventType]) {
            this.callbacks[eventType] = [];
        }
        this.callbacks[eventType].push(callback);
        return {
            unsubscribe: function () {
                _this.callbacks[eventType] = _this.callbacks[eventType].filter(function (other) { return callback !== other; });
            },
        };
    };
    return AbstractLifeCycle;
}());

//# sourceMappingURL=abstractLifeCycle.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/boundedBuffer.js":
/*!***************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/boundedBuffer.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   BoundedBuffer: () => (/* binding */ BoundedBuffer)
/* harmony export */ });
var BUFFER_LIMIT = 500;
var BoundedBuffer = /** @class */ (function () {
    function BoundedBuffer() {
        this.buffer = [];
    }
    BoundedBuffer.prototype.add = function (callback) {
        var length = this.buffer.push(callback);
        if (length > BUFFER_LIMIT) {
            this.buffer.splice(0, 1);
        }
    };
    BoundedBuffer.prototype.drain = function () {
        this.buffer.forEach(function (callback) { return callback(); });
        this.buffer.length = 0;
    };
    return BoundedBuffer;
}());

//# sourceMappingURL=boundedBuffer.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/catchUserErrors.js":
/*!*****************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/catchUserErrors.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   catchUserErrors: () => (/* binding */ catchUserErrors)
/* harmony export */ });
/* harmony import */ var _display__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./display */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");

function catchUserErrors(fn, errorMsg) {
    return function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        try {
            return fn.apply(void 0, args);
        }
        catch (err) {
            _display__WEBPACK_IMPORTED_MODULE_0__.display.error(errorMsg, err);
        }
    };
}
//# sourceMappingURL=catchUserErrors.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/display.js":
/*!*********************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/display.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ConsoleApiName: () => (/* binding */ ConsoleApiName),
/* harmony export */   display: () => (/* binding */ display),
/* harmony export */   globalConsole: () => (/* binding */ globalConsole)
/* harmony export */ });
/* eslint-disable local-rules/disallow-side-effects */
/**
 * Keep references on console methods to avoid triggering patched behaviors
 *
 * NB: in some setup, console could already be patched by another SDK.
 * In this case, some display messages can be sent by the other SDK
 * but we should be safe from infinite loop nonetheless.
 */
var ConsoleApiName = {
    log: 'log',
    debug: 'debug',
    info: 'info',
    warn: 'warn',
    error: 'error',
};
var display = function (api) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    if (!Object.prototype.hasOwnProperty.call(ConsoleApiName, api)) {
        api = ConsoleApiName.log;
    }
    display[api].apply(display, args);
};
/**
 * When building JS bundles, some users might use a plugin[1] or configuration[2] to remove
 * "console.*" references. This causes some issue as we expect `console.*` to be defined.
 * As a workaround, let's use a variable alias, so those expressions won't be taken into account by
 * simple static analysis.
 *
 * [1]: https://babeljs.io/docs/babel-plugin-transform-remove-console/
 * [2]: https://github.com/terser/terser#compress-options (look for drop_console)
 */
var globalConsole = console;
display.debug = globalConsole.debug.bind(globalConsole);
display.log = globalConsole.log.bind(globalConsole);
display.info = globalConsole.info.bind(globalConsole);
display.warn = globalConsole.warn.bind(globalConsole);
display.error = globalConsole.error.bind(globalConsole);
//# sourceMappingURL=display.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/experimentalFeatures.js":
/*!**********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/experimentalFeatures.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ExperimentalFeature: () => (/* binding */ ExperimentalFeature),
/* harmony export */   addExperimentalFeatures: () => (/* binding */ addExperimentalFeatures),
/* harmony export */   getExperimentalFeatures: () => (/* binding */ getExperimentalFeatures),
/* harmony export */   isExperimentalFeatureEnabled: () => (/* binding */ isExperimentalFeatureEnabled),
/* harmony export */   resetExperimentalFeatures: () => (/* binding */ resetExperimentalFeatures)
/* harmony export */ });
/**
 * LIMITATION:
 * For NPM setup, this feature flag singleton is shared between RUM and Logs product.
 * This means that an experimental flag set on the RUM product will be set on the Logs product.
 * So keep in mind that in certain configurations, your experimental feature flag may affect other products.
 *
 * FORMAT:
 * All feature flags should be snake_cased
 */
// We want to use a real enum (i.e. not a const enum) here, to be able to check whether an arbitrary
// string is an expected feature flag
// eslint-disable-next-line no-restricted-syntax
var ExperimentalFeature;
(function (ExperimentalFeature) {
    ExperimentalFeature["PAGEHIDE"] = "pagehide";
    ExperimentalFeature["FEATURE_FLAGS"] = "feature_flags";
    ExperimentalFeature["RESOURCE_PAGE_STATES"] = "resource_page_states";
    ExperimentalFeature["PAGE_STATES"] = "page_states";
    ExperimentalFeature["COLLECT_FLUSH_REASON"] = "collect_flush_reason";
    ExperimentalFeature["NO_RESOURCE_DURATION_FROZEN_STATE"] = "no_resource_duration_frozen_state";
    ExperimentalFeature["SCROLLMAP"] = "scrollmap";
    ExperimentalFeature["INTERACTION_TO_NEXT_PAINT"] = "interaction_to_next_paint";
    ExperimentalFeature["DISABLE_REPLAY_INLINE_CSS"] = "disable_replay_inline_css";
})(ExperimentalFeature || (ExperimentalFeature = {}));
var enabledExperimentalFeatures = new Set();
function addExperimentalFeatures(enabledFeatures) {
    enabledFeatures.forEach(function (flag) {
        enabledExperimentalFeatures.add(flag);
    });
}
function isExperimentalFeatureEnabled(featureName) {
    return enabledExperimentalFeatures.has(featureName);
}
function resetExperimentalFeatures() {
    enabledExperimentalFeatures.clear();
}
function getExperimentalFeatures() {
    return enabledExperimentalFeatures;
}
//# sourceMappingURL=experimentalFeatures.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/getGlobalObject.js":
/*!*****************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/getGlobalObject.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   getGlobalObject: () => (/* binding */ getGlobalObject)
/* harmony export */ });
/**
 * inspired by https://mathiasbynens.be/notes/globalthis
 */
function getGlobalObject() {
    if (typeof globalThis === 'object') {
        return globalThis;
    }
    Object.defineProperty(Object.prototype, '_dd_temp_', {
        get: function () {
            return this;
        },
        configurable: true,
    });
    // @ts-ignore _dd_temp is defined using defineProperty
    var globalObject = _dd_temp_;
    // @ts-ignore _dd_temp is defined using defineProperty
    delete Object.prototype._dd_temp_;
    if (typeof globalObject !== 'object') {
        // on safari _dd_temp_ is available on window but not globally
        // fallback on other browser globals check
        if (typeof self === 'object') {
            globalObject = self;
        }
        else if (typeof window === 'object') {
            globalObject = window;
        }
        else {
            globalObject = {};
        }
    }
    return globalObject;
}
//# sourceMappingURL=getGlobalObject.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/getZoneJsOriginalValue.js":
/*!************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/getZoneJsOriginalValue.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   getZoneJsOriginalValue: () => (/* binding */ getZoneJsOriginalValue)
/* harmony export */ });
/* harmony import */ var _getGlobalObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getGlobalObject */ "../../node_modules/@datadog/browser-core/esm/tools/getGlobalObject.js");

/**
 * Gets the original value for a DOM API that was potentially patched by Zone.js.
 *
 * Zone.js[1] is a library that patches a bunch of JS and DOM APIs. It usually stores the original
 * value of the patched functions/constructors/methods in a hidden property prefixed by
 * __zone_symbol__.
 *
 * In multiple occasions, we observed that Zone.js is the culprit of important issues leading to
 * browser resource exhaustion (memory leak, high CPU usage). This method is used as a workaround to
 * use the original DOM API instead of the one patched by Zone.js.
 *
 * [1]: https://github.com/angular/angular/tree/main/packages/zone.js
 */
function getZoneJsOriginalValue(target, name) {
    var browserWindow = (0,_getGlobalObject__WEBPACK_IMPORTED_MODULE_0__.getGlobalObject)();
    var original;
    if (browserWindow.Zone && typeof browserWindow.Zone.__symbol__ === 'function') {
        original = target[browserWindow.Zone.__symbol__(name)];
    }
    if (!original) {
        original = target[name];
    }
    return original;
}
//# sourceMappingURL=getZoneJsOriginalValue.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/instrumentMethod.js":
/*!******************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/instrumentMethod.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   instrumentMethod: () => (/* binding */ instrumentMethod),
/* harmony export */   instrumentMethodAndCallOriginal: () => (/* binding */ instrumentMethodAndCallOriginal),
/* harmony export */   instrumentSetter: () => (/* binding */ instrumentSetter)
/* harmony export */ });
/* harmony import */ var _timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./timer */ "../../node_modules/@datadog/browser-core/esm/tools/timer.js");
/* harmony import */ var _monitor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./monitor */ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js");
/* harmony import */ var _utils_functionUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/functionUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js");



function instrumentMethod(object, method, instrumentationFactory) {
    var original = object[method];
    var instrumentation = instrumentationFactory(original);
    var instrumentationWrapper = function () {
        if (typeof instrumentation !== 'function') {
            return undefined;
        }
        // eslint-disable-next-line @typescript-eslint/no-unsafe-return
        return instrumentation.apply(this, arguments);
    };
    object[method] = instrumentationWrapper;
    return {
        stop: function () {
            if (object[method] === instrumentationWrapper) {
                object[method] = original;
            }
            else {
                instrumentation = original;
            }
        },
    };
}
function instrumentMethodAndCallOriginal(object, method, _a) {
    var before = _a.before, after = _a.after;
    return instrumentMethod(object, method, function (original) {
        return function () {
            var args = arguments;
            var result;
            if (before) {
                (0,_monitor__WEBPACK_IMPORTED_MODULE_0__.callMonitored)(before, this, args);
            }
            if (typeof original === 'function') {
                // eslint-disable-next-line @typescript-eslint/no-unsafe-call
                result = original.apply(this, args);
            }
            if (after) {
                (0,_monitor__WEBPACK_IMPORTED_MODULE_0__.callMonitored)(after, this, args);
            }
            // eslint-disable-next-line @typescript-eslint/no-unsafe-return
            return result;
        };
    });
}
function instrumentSetter(object, property, after) {
    var originalDescriptor = Object.getOwnPropertyDescriptor(object, property);
    if (!originalDescriptor || !originalDescriptor.set || !originalDescriptor.configurable) {
        return { stop: _utils_functionUtils__WEBPACK_IMPORTED_MODULE_1__.noop };
    }
    var instrumentation = function (thisObject, value) {
        // put hooked setter into event loop to avoid of set latency
        (0,_timer__WEBPACK_IMPORTED_MODULE_2__.setTimeout)(function () {
            after(thisObject, value);
        }, 0);
    };
    var instrumentationWrapper = function (value) {
        originalDescriptor.set.call(this, value);
        instrumentation(this, value);
    };
    Object.defineProperty(object, property, {
        set: instrumentationWrapper,
    });
    return {
        stop: function () {
            var _a;
            if (((_a = Object.getOwnPropertyDescriptor(object, property)) === null || _a === void 0 ? void 0 : _a.set) === instrumentationWrapper) {
                Object.defineProperty(object, property, originalDescriptor);
            }
            else {
                instrumentation = _utils_functionUtils__WEBPACK_IMPORTED_MODULE_1__.noop;
            }
        },
    };
}
//# sourceMappingURL=instrumentMethod.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/mergeInto.js":
/*!***********************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/mergeInto.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   combine: () => (/* binding */ combine),
/* harmony export */   deepClone: () => (/* binding */ deepClone),
/* harmony export */   mergeInto: () => (/* binding */ mergeInto)
/* harmony export */ });
/* harmony import */ var _utils_typeUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/typeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/typeUtils.js");

/**
 * Iterate over source and affect its sub values into destination, recursively.
 * If the source and destination can't be merged, return source.
 */
function mergeInto(destination, source, circularReferenceChecker) {
    if (circularReferenceChecker === void 0) { circularReferenceChecker = createCircularReferenceChecker(); }
    // ignore the source if it is undefined
    if (source === undefined) {
        return destination;
    }
    if (typeof source !== 'object' || source === null) {
        // primitive values - just return source
        return source;
    }
    else if (source instanceof Date) {
        return new Date(source.getTime());
    }
    else if (source instanceof RegExp) {
        var flags = source.flags ||
            // old browsers compatibility
            [
                source.global ? 'g' : '',
                source.ignoreCase ? 'i' : '',
                source.multiline ? 'm' : '',
                source.sticky ? 'y' : '',
                source.unicode ? 'u' : '',
            ].join('');
        return new RegExp(source.source, flags);
    }
    if (circularReferenceChecker.hasAlreadyBeenSeen(source)) {
        // remove circular references
        return undefined;
    }
    else if (Array.isArray(source)) {
        var merged_1 = Array.isArray(destination) ? destination : [];
        for (var i = 0; i < source.length; ++i) {
            merged_1[i] = mergeInto(merged_1[i], source[i], circularReferenceChecker);
        }
        return merged_1;
    }
    var merged = (0,_utils_typeUtils__WEBPACK_IMPORTED_MODULE_0__.getType)(destination) === 'object' ? destination : {};
    for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
            merged[key] = mergeInto(merged[key], source[key], circularReferenceChecker);
        }
    }
    return merged;
}
/**
 * A simplistic implementation of a deep clone algorithm.
 * Caveats:
 * - It doesn't maintain prototype chains - don't use with instances of custom classes.
 * - It doesn't handle Map and Set
 */
function deepClone(value) {
    return mergeInto(undefined, value);
}
function combine() {
    var sources = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        sources[_i] = arguments[_i];
    }
    var destination;
    for (var _a = 0, sources_1 = sources; _a < sources_1.length; _a++) {
        var source = sources_1[_a];
        // Ignore any undefined or null sources.
        if (source === undefined || source === null) {
            continue;
        }
        destination = mergeInto(destination, source);
    }
    return destination;
}
function createCircularReferenceChecker() {
    if (typeof WeakSet !== 'undefined') {
        var set_1 = new WeakSet();
        return {
            hasAlreadyBeenSeen: function (value) {
                var has = set_1.has(value);
                if (!has) {
                    set_1.add(value);
                }
                return has;
            },
        };
    }
    var array = [];
    return {
        hasAlreadyBeenSeen: function (value) {
            var has = array.indexOf(value) >= 0;
            if (!has) {
                array.push(value);
            }
            return has;
        },
    };
}
//# sourceMappingURL=mergeInto.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js":
/*!*********************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/monitor.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   callMonitored: () => (/* binding */ callMonitored),
/* harmony export */   displayIfDebugEnabled: () => (/* binding */ displayIfDebugEnabled),
/* harmony export */   monitor: () => (/* binding */ monitor),
/* harmony export */   monitored: () => (/* binding */ monitored),
/* harmony export */   resetMonitor: () => (/* binding */ resetMonitor),
/* harmony export */   setDebugMode: () => (/* binding */ setDebugMode),
/* harmony export */   startMonitorErrorCollection: () => (/* binding */ startMonitorErrorCollection)
/* harmony export */ });
/* harmony import */ var _display__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./display */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
        }
    }
    return to.concat(ar || Array.prototype.slice.call(from));
};

var onMonitorErrorCollected;
var debugMode = false;
function startMonitorErrorCollection(newOnMonitorErrorCollected) {
    onMonitorErrorCollected = newOnMonitorErrorCollected;
}
function setDebugMode(newDebugMode) {
    debugMode = newDebugMode;
}
function resetMonitor() {
    onMonitorErrorCollected = undefined;
    debugMode = false;
}
function monitored(_, __, descriptor) {
    var originalMethod = descriptor.value;
    descriptor.value = function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var decorated = onMonitorErrorCollected ? monitor(originalMethod) : originalMethod;
        return decorated.apply(this, args);
    };
}
function monitor(fn) {
    return function () {
        // eslint-disable-next-line @typescript-eslint/no-unsafe-return
        return callMonitored(fn, this, arguments);
    }; // consider output type has input type
}
function callMonitored(fn, context, args) {
    try {
        // eslint-disable-next-line @typescript-eslint/no-unsafe-return
        return fn.apply(context, args);
    }
    catch (e) {
        displayIfDebugEnabled(_display__WEBPACK_IMPORTED_MODULE_0__.ConsoleApiName.error, e);
        if (onMonitorErrorCollected) {
            try {
                onMonitorErrorCollected(e);
            }
            catch (e) {
                displayIfDebugEnabled(_display__WEBPACK_IMPORTED_MODULE_0__.ConsoleApiName.error, e);
            }
        }
    }
}
function displayIfDebugEnabled(api) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    if (debugMode) {
        _display__WEBPACK_IMPORTED_MODULE_0__.display.apply(void 0, __spreadArray([api, '[MONITOR]'], args, false));
    }
}
//# sourceMappingURL=monitor.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/observable.js":
/*!************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/observable.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   Observable: () => (/* binding */ Observable),
/* harmony export */   mergeObservables: () => (/* binding */ mergeObservables)
/* harmony export */ });
var Observable = /** @class */ (function () {
    function Observable(onFirstSubscribe) {
        this.onFirstSubscribe = onFirstSubscribe;
        this.observers = [];
    }
    Observable.prototype.subscribe = function (f) {
        var _this = this;
        if (!this.observers.length && this.onFirstSubscribe) {
            this.onLastUnsubscribe = this.onFirstSubscribe() || undefined;
        }
        this.observers.push(f);
        return {
            unsubscribe: function () {
                _this.observers = _this.observers.filter(function (other) { return f !== other; });
                if (!_this.observers.length && _this.onLastUnsubscribe) {
                    _this.onLastUnsubscribe();
                }
            },
        };
    };
    Observable.prototype.notify = function (data) {
        this.observers.forEach(function (observer) { return observer(data); });
    };
    return Observable;
}());

function mergeObservables() {
    var observables = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        observables[_i] = arguments[_i];
    }
    var globalObservable = new Observable(function () {
        var subscriptions = observables.map(function (observable) {
            return observable.subscribe(function (data) { return globalObservable.notify(data); });
        });
        return function () { return subscriptions.forEach(function (subscription) { return subscription.unsubscribe(); }); };
    });
    return globalObservable;
}
//# sourceMappingURL=observable.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/readBytesFromStream.js":
/*!*********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/readBytesFromStream.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   readBytesFromStream: () => (/* binding */ readBytesFromStream)
/* harmony export */ });
/* harmony import */ var _monitor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./monitor */ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js");
/* harmony import */ var _utils_functionUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/functionUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js");


/**
 * Read bytes from a ReadableStream until at least `limit` bytes have been read (or until the end of
 * the stream). The callback is invoked with the at most `limit` bytes, and indicates that the limit
 * has been exceeded if more bytes were available.
 */
function readBytesFromStream(stream, callback, options) {
    var reader = stream.getReader();
    var chunks = [];
    var readBytesCount = 0;
    readMore();
    function readMore() {
        reader.read().then((0,_monitor__WEBPACK_IMPORTED_MODULE_0__.monitor)(function (result) {
            if (result.done) {
                onDone();
                return;
            }
            if (options.collectStreamBody) {
                chunks.push(result.value);
            }
            readBytesCount += result.value.length;
            if (readBytesCount > options.bytesLimit) {
                onDone();
            }
            else {
                readMore();
            }
        }), (0,_monitor__WEBPACK_IMPORTED_MODULE_0__.monitor)(function (error) { return callback(error); }));
    }
    function onDone() {
        reader.cancel().catch(
        // we don't care if cancel fails, but we still need to catch the error to avoid reporting it
        // as an unhandled rejection
        _utils_functionUtils__WEBPACK_IMPORTED_MODULE_1__.noop);
        var bytes;
        var limitExceeded;
        if (options.collectStreamBody) {
            var completeBuffer_1;
            if (chunks.length === 1) {
                // optimization: if the response is small enough to fit in a single buffer (provided by the browser), just
                // use it directly.
                completeBuffer_1 = chunks[0];
            }
            else {
                // else, we need to copy buffers into a larger buffer to concatenate them.
                completeBuffer_1 = new Uint8Array(readBytesCount);
                var offset_1 = 0;
                chunks.forEach(function (chunk) {
                    completeBuffer_1.set(chunk, offset_1);
                    offset_1 += chunk.length;
                });
            }
            bytes = completeBuffer_1.slice(0, options.bytesLimit);
            limitExceeded = completeBuffer_1.length > options.bytesLimit;
        }
        callback(undefined, bytes, limitExceeded);
    }
}
//# sourceMappingURL=readBytesFromStream.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/sendToExtension.js":
/*!*****************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/sendToExtension.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   sendToExtension: () => (/* binding */ sendToExtension)
/* harmony export */ });
function sendToExtension(type, payload) {
    var callback = window.__ddBrowserSdkExtensionCallback;
    if (callback) {
        callback({ type: type, payload: payload });
    }
}
//# sourceMappingURL=sendToExtension.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/contextManager.js":
/*!******************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/serialisation/contextManager.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   BYTES_COMPUTATION_THROTTLING_DELAY: () => (/* binding */ BYTES_COMPUTATION_THROTTLING_DELAY),
/* harmony export */   createContextManager: () => (/* binding */ createContextManager)
/* harmony export */ });
/* harmony import */ var _utils_byteUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/byteUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/byteUtils.js");
/* harmony import */ var _utils_functionUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/functionUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js");
/* harmony import */ var _mergeInto__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../mergeInto */ "../../node_modules/@datadog/browser-core/esm/tools/mergeInto.js");
/* harmony import */ var _utils_typeUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/typeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/typeUtils.js");
/* harmony import */ var _jsonStringify__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonStringify */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/jsonStringify.js");
/* harmony import */ var _sanitize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./sanitize */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/sanitize.js");
/* harmony import */ var _heavyCustomerDataWarning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./heavyCustomerDataWarning */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/heavyCustomerDataWarning.js");







var BYTES_COMPUTATION_THROTTLING_DELAY = 200;
function createContextManager(customerDataType, computeBytesCountImpl) {
    if (computeBytesCountImpl === void 0) { computeBytesCountImpl = _utils_byteUtils__WEBPACK_IMPORTED_MODULE_0__.computeBytesCount; }
    var context = {};
    var bytesCountCache;
    var alreadyWarned = false;
    // Throttle the bytes computation to minimize the impact on performance.
    // Especially useful if the user call context APIs synchronously multiple times in a row
    var computeBytesCountThrottled = (0,_utils_functionUtils__WEBPACK_IMPORTED_MODULE_1__.throttle)(function (context) {
        bytesCountCache = computeBytesCountImpl((0,_jsonStringify__WEBPACK_IMPORTED_MODULE_2__.jsonStringify)(context));
        if (!alreadyWarned) {
            alreadyWarned = (0,_heavyCustomerDataWarning__WEBPACK_IMPORTED_MODULE_3__.warnIfCustomerDataLimitReached)(bytesCountCache, customerDataType);
        }
    }, BYTES_COMPUTATION_THROTTLING_DELAY).throttled;
    var contextManager = {
        getBytesCount: function () { return bytesCountCache; },
        /** @deprecated use getContext instead */
        get: function () { return context; },
        /** @deprecated use setContextProperty instead */
        add: function (key, value) {
            context[key] = value;
            computeBytesCountThrottled(context);
        },
        /** @deprecated renamed to removeContextProperty */
        remove: function (key) {
            delete context[key];
            computeBytesCountThrottled(context);
        },
        /** @deprecated use setContext instead */
        set: function (newContext) {
            context = newContext;
            computeBytesCountThrottled(context);
        },
        getContext: function () { return (0,_mergeInto__WEBPACK_IMPORTED_MODULE_4__.deepClone)(context); },
        setContext: function (newContext) {
            if ((0,_utils_typeUtils__WEBPACK_IMPORTED_MODULE_5__.getType)(newContext) === 'object') {
                context = (0,_sanitize__WEBPACK_IMPORTED_MODULE_6__.sanitize)(newContext);
                computeBytesCountThrottled(context);
            }
            else {
                contextManager.clearContext();
            }
        },
        setContextProperty: function (key, property) {
            context[key] = (0,_sanitize__WEBPACK_IMPORTED_MODULE_6__.sanitize)(property);
            computeBytesCountThrottled(context);
        },
        removeContextProperty: function (key) {
            delete context[key];
            computeBytesCountThrottled(context);
        },
        clearContext: function () {
            context = {};
            bytesCountCache = 0;
        },
    };
    return contextManager;
}
//# sourceMappingURL=contextManager.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/heavyCustomerDataWarning.js":
/*!****************************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/serialisation/heavyCustomerDataWarning.js ***!
  \****************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CUSTOMER_DATA_BYTES_LIMIT: () => (/* binding */ CUSTOMER_DATA_BYTES_LIMIT),
/* harmony export */   warnIfCustomerDataLimitReached: () => (/* binding */ warnIfCustomerDataLimitReached)
/* harmony export */ });
/* harmony import */ var _utils_byteUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/byteUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/byteUtils.js");
/* harmony import */ var _display__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../display */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");


// RUM and logs batch bytes limit is 16KB
// ensure that we leave room for other event attributes and maintain a decent amount of event per batch
// (3KB (customer data) + 1KB (other attributes)) * 4 (events per batch) = 16KB
var CUSTOMER_DATA_BYTES_LIMIT = 3 * _utils_byteUtils__WEBPACK_IMPORTED_MODULE_0__.ONE_KIBI_BYTE;
function warnIfCustomerDataLimitReached(bytesCount, customerDataType) {
    if (bytesCount > CUSTOMER_DATA_BYTES_LIMIT) {
        _display__WEBPACK_IMPORTED_MODULE_1__.display.warn("The ".concat(customerDataType, " data exceeds the recommended ").concat(CUSTOMER_DATA_BYTES_LIMIT / _utils_byteUtils__WEBPACK_IMPORTED_MODULE_0__.ONE_KIBI_BYTE, "KiB threshold. More details: https://docs.datadoghq.com/real_user_monitoring/browser/troubleshooting/#customer-data-exceeds-the-recommended-3kib-warning"));
        return true;
    }
    return false;
}
//# sourceMappingURL=heavyCustomerDataWarning.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/jsonStringify.js":
/*!*****************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/serialisation/jsonStringify.js ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   detachToJsonMethod: () => (/* binding */ detachToJsonMethod),
/* harmony export */   jsonStringify: () => (/* binding */ jsonStringify)
/* harmony export */ });
/* harmony import */ var _utils_functionUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/functionUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js");

/**
 * Custom implementation of JSON.stringify that ignores some toJSON methods. We need to do that
 * because some sites badly override toJSON on certain objects. Removing all toJSON methods from
 * nested values would be too costly, so we just detach them from the root value, and native classes
 * used to build JSON values (Array and Object).
 *
 * Note: this still assumes that JSON.stringify is correct.
 */
function jsonStringify(value, replacer, space) {
    if (typeof value !== 'object' || value === null) {
        return JSON.stringify(value);
    }
    // Note: The order matter here. We need to detach toJSON methods on parent classes before their
    // subclasses.
    var restoreObjectPrototypeToJson = detachToJsonMethod(Object.prototype);
    var restoreArrayPrototypeToJson = detachToJsonMethod(Array.prototype);
    var restoreValuePrototypeToJson = detachToJsonMethod(Object.getPrototypeOf(value));
    var restoreValueToJson = detachToJsonMethod(value);
    try {
        return JSON.stringify(value, replacer, space);
    }
    catch (_a) {
        return '<error: unable to serialize object>';
    }
    finally {
        restoreObjectPrototypeToJson();
        restoreArrayPrototypeToJson();
        restoreValuePrototypeToJson();
        restoreValueToJson();
    }
}
function detachToJsonMethod(value) {
    var object = value;
    var objectToJson = object.toJSON;
    if (objectToJson) {
        delete object.toJSON;
        return function () {
            object.toJSON = objectToJson;
        };
    }
    return _utils_functionUtils__WEBPACK_IMPORTED_MODULE_0__.noop;
}
//# sourceMappingURL=jsonStringify.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/sanitize.js":
/*!************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/serialisation/sanitize.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   sanitize: () => (/* binding */ sanitize)
/* harmony export */ });
/* harmony import */ var _display__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../display */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");
/* harmony import */ var _utils_byteUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/byteUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/byteUtils.js");
/* harmony import */ var _jsonStringify__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonStringify */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/jsonStringify.js");



// The maximum size of a single event is 256KiB. By default, we ensure that user-provided data
// going through sanitize fits inside our events, while leaving room for other contexts, metadata, ...
var SANITIZE_DEFAULT_MAX_CHARACTER_COUNT = 220 * _utils_byteUtils__WEBPACK_IMPORTED_MODULE_0__.ONE_KIBI_BYTE;
// Symbol for the root element of the JSONPath used for visited objects
var JSON_PATH_ROOT_ELEMENT = '$';
// When serializing (using JSON.stringify) a key of an object, { key: 42 } gets wrapped in quotes as "key".
// With the separator (:), we need to add 3 characters to the count.
var KEY_DECORATION_LENGTH = 3;
function sanitize(source, maxCharacterCount) {
    var _a;
    if (maxCharacterCount === void 0) { maxCharacterCount = SANITIZE_DEFAULT_MAX_CHARACTER_COUNT; }
    // Unbind any toJSON function we may have on [] or {} prototypes
    var restoreObjectPrototypeToJson = (0,_jsonStringify__WEBPACK_IMPORTED_MODULE_1__.detachToJsonMethod)(Object.prototype);
    var restoreArrayPrototypeToJson = (0,_jsonStringify__WEBPACK_IMPORTED_MODULE_1__.detachToJsonMethod)(Array.prototype);
    // Initial call to sanitizeProcessor - will populate containerQueue if source is an Array or a plain Object
    var containerQueue = [];
    var visitedObjectsWithPath = new WeakMap();
    var sanitizedData = sanitizeProcessor(source, JSON_PATH_ROOT_ELEMENT, undefined, containerQueue, visitedObjectsWithPath);
    var accumulatedCharacterCount = ((_a = JSON.stringify(sanitizedData)) === null || _a === void 0 ? void 0 : _a.length) || 0;
    if (accumulatedCharacterCount > maxCharacterCount) {
        warnOverCharacterLimit(maxCharacterCount, 'discarded', source);
        return undefined;
    }
    while (containerQueue.length > 0 && accumulatedCharacterCount < maxCharacterCount) {
        var containerToProcess = containerQueue.shift();
        var separatorLength = 0; // 0 for the first element, 1 for subsequent elements
        // Arrays and Objects have to be handled distinctly to ensure
        // we do not pick up non-numerical properties from Arrays
        if (Array.isArray(containerToProcess.source)) {
            for (var key = 0; key < containerToProcess.source.length; key++) {
                var targetData = sanitizeProcessor(containerToProcess.source[key], containerToProcess.path, key, containerQueue, visitedObjectsWithPath);
                if (targetData !== undefined) {
                    accumulatedCharacterCount += JSON.stringify(targetData).length;
                }
                else {
                    // When an element of an Array (targetData) is undefined, it is serialized as null:
                    // JSON.stringify([undefined]) => '[null]' - This accounts for 4 characters
                    accumulatedCharacterCount += 4;
                }
                accumulatedCharacterCount += separatorLength;
                separatorLength = 1;
                if (accumulatedCharacterCount > maxCharacterCount) {
                    warnOverCharacterLimit(maxCharacterCount, 'truncated', source);
                    break;
                }
                ;
                containerToProcess.target[key] = targetData;
            }
        }
        else {
            for (var key in containerToProcess.source) {
                if (Object.prototype.hasOwnProperty.call(containerToProcess.source, key)) {
                    var targetData = sanitizeProcessor(containerToProcess.source[key], containerToProcess.path, key, containerQueue, visitedObjectsWithPath);
                    // When a property of an object has an undefined value, it will be dropped during serialization:
                    // JSON.stringify({a:undefined}) => '{}'
                    if (targetData !== undefined) {
                        accumulatedCharacterCount +=
                            JSON.stringify(targetData).length + separatorLength + key.length + KEY_DECORATION_LENGTH;
                        separatorLength = 1;
                    }
                    if (accumulatedCharacterCount > maxCharacterCount) {
                        warnOverCharacterLimit(maxCharacterCount, 'truncated', source);
                        break;
                    }
                    ;
                    containerToProcess.target[key] = targetData;
                }
            }
        }
    }
    // Rebind detached toJSON functions
    restoreObjectPrototypeToJson();
    restoreArrayPrototypeToJson();
    return sanitizedData;
}
/**
 * Internal function to factorize the process common to the
 * initial call to sanitize, and iterations for Arrays and Objects
 *
 */
function sanitizeProcessor(source, parentPath, key, queue, visitedObjectsWithPath) {
    // Start by handling toJSON, as we want to sanitize its output
    var sourceToSanitize = tryToApplyToJSON(source);
    if (!sourceToSanitize || typeof sourceToSanitize !== 'object') {
        return sanitizePrimitivesAndFunctions(sourceToSanitize);
    }
    var sanitizedSource = sanitizeObjects(sourceToSanitize);
    if (sanitizedSource !== '[Object]' && sanitizedSource !== '[Array]' && sanitizedSource !== '[Error]') {
        return sanitizedSource;
    }
    // Handle potential cyclic references
    // We need to use source as sourceToSanitize could be a reference to a new object
    // At this stage, we know the source is an object type
    var sourceAsObject = source;
    if (visitedObjectsWithPath.has(sourceAsObject)) {
        return "[Reference seen at ".concat(visitedObjectsWithPath.get(sourceAsObject), "]");
    }
    // Add processed source to queue
    var currentPath = key !== undefined ? "".concat(parentPath, ".").concat(key) : parentPath;
    var target = Array.isArray(sourceToSanitize) ? [] : {};
    visitedObjectsWithPath.set(sourceAsObject, currentPath);
    queue.push({ source: sourceToSanitize, target: target, path: currentPath });
    return target;
}
/**
 * Handles sanitization of simple, non-object types
 *
 */
function sanitizePrimitivesAndFunctions(value) {
    // BigInt cannot be serialized by JSON.stringify(), convert it to a string representation
    if (typeof value === 'bigint') {
        return "[BigInt] ".concat(value.toString());
    }
    // Functions cannot be serialized by JSON.stringify(). Moreover, if a faulty toJSON is present, it needs to be converted
    // so it won't prevent stringify from serializing later
    if (typeof value === 'function') {
        return "[Function] ".concat(value.name || 'unknown');
    }
    // JSON.stringify() does not serialize symbols.
    if (typeof value === 'symbol') {
        return "[Symbol] ".concat(value.description || value.toString());
    }
    return value;
}
/**
 * Handles sanitization of object types
 *
 * LIMITATIONS
 * - If a class defines a toStringTag Symbol, it will fall in the catch-all method and prevent enumeration of properties.
 * To avoid this, a toJSON method can be defined.
 * - IE11 does not return a distinct type for objects such as Map, WeakMap, ... These objects will pass through and their
 * properties enumerated if any.
 *
 */
function sanitizeObjects(value) {
    try {
        // Handle events - Keep a simple implementation to avoid breaking changes
        if (value instanceof Event) {
            return {
                isTrusted: value.isTrusted,
            };
        }
        // Handle all remaining object types in a generic way
        var result = Object.prototype.toString.call(value);
        var match = result.match(/\[object (.*)\]/);
        if (match && match[1]) {
            return "[".concat(match[1], "]");
        }
    }
    catch (_a) {
        // If the previous serialization attempts failed, and we cannot convert using
        // Object.prototype.toString, declare the value unserializable
    }
    return '[Unserializable]';
}
/**
 * Checks if a toJSON function exists and tries to execute it
 *
 */
function tryToApplyToJSON(value) {
    var object = value;
    if (object && typeof object.toJSON === 'function') {
        try {
            return object.toJSON();
        }
        catch (_a) {
            // If toJSON fails, we continue by trying to serialize the value manually
        }
    }
    return value;
}
/**
 * Helper function to display the warning when the accumulated character count is over the limit
 */
function warnOverCharacterLimit(maxCharacterCount, changeType, source) {
    _display__WEBPACK_IMPORTED_MODULE_2__.display.warn("The data provided has been ".concat(changeType, " as it is over the limit of ").concat(maxCharacterCount, " characters:"), source);
}
//# sourceMappingURL=sanitize.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/timer.js":
/*!*******************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/timer.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   clearInterval: () => (/* binding */ clearInterval),
/* harmony export */   clearTimeout: () => (/* binding */ clearTimeout),
/* harmony export */   setInterval: () => (/* binding */ setInterval),
/* harmony export */   setTimeout: () => (/* binding */ setTimeout)
/* harmony export */ });
/* harmony import */ var _getZoneJsOriginalValue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getZoneJsOriginalValue */ "../../node_modules/@datadog/browser-core/esm/tools/getZoneJsOriginalValue.js");
/* harmony import */ var _monitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./monitor */ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js");
/* harmony import */ var _getGlobalObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getGlobalObject */ "../../node_modules/@datadog/browser-core/esm/tools/getGlobalObject.js");



function setTimeout(callback, delay) {
    return (0,_getZoneJsOriginalValue__WEBPACK_IMPORTED_MODULE_0__.getZoneJsOriginalValue)((0,_getGlobalObject__WEBPACK_IMPORTED_MODULE_1__.getGlobalObject)(), 'setTimeout')((0,_monitor__WEBPACK_IMPORTED_MODULE_2__.monitor)(callback), delay);
}
function clearTimeout(timeoutId) {
    (0,_getZoneJsOriginalValue__WEBPACK_IMPORTED_MODULE_0__.getZoneJsOriginalValue)((0,_getGlobalObject__WEBPACK_IMPORTED_MODULE_1__.getGlobalObject)(), 'clearTimeout')(timeoutId);
}
function setInterval(callback, delay) {
    return (0,_getZoneJsOriginalValue__WEBPACK_IMPORTED_MODULE_0__.getZoneJsOriginalValue)((0,_getGlobalObject__WEBPACK_IMPORTED_MODULE_1__.getGlobalObject)(), 'setInterval')((0,_monitor__WEBPACK_IMPORTED_MODULE_2__.monitor)(callback), delay);
}
function clearInterval(timeoutId) {
    (0,_getZoneJsOriginalValue__WEBPACK_IMPORTED_MODULE_0__.getZoneJsOriginalValue)((0,_getGlobalObject__WEBPACK_IMPORTED_MODULE_1__.getGlobalObject)(), 'clearInterval')(timeoutId);
}
//# sourceMappingURL=timer.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/utils/arrayUtils.js":
/*!******************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/utils/arrayUtils.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   removeDuplicates: () => (/* binding */ removeDuplicates)
/* harmony export */ });
/* harmony import */ var _polyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polyfills */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");

function removeDuplicates(array) {
    var set = new Set();
    array.forEach(function (item) { return set.add(item); });
    return (0,_polyfills__WEBPACK_IMPORTED_MODULE_0__.arrayFrom)(set);
}
//# sourceMappingURL=arrayUtils.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/utils/browserDetection.js":
/*!************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/utils/browserDetection.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   isChromium: () => (/* binding */ isChromium),
/* harmony export */   isIE: () => (/* binding */ isIE)
/* harmony export */ });
function isIE() {
    return Boolean(document.documentMode);
}
function isChromium() {
    return !!window.chrome || /HeadlessChrome/.test(window.navigator.userAgent);
}
//# sourceMappingURL=browserDetection.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/utils/byteUtils.js":
/*!*****************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/utils/byteUtils.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ONE_KIBI_BYTE: () => (/* binding */ ONE_KIBI_BYTE),
/* harmony export */   ONE_MEBI_BYTE: () => (/* binding */ ONE_MEBI_BYTE),
/* harmony export */   computeBytesCount: () => (/* binding */ computeBytesCount),
/* harmony export */   concatBuffers: () => (/* binding */ concatBuffers)
/* harmony export */ });
var ONE_KIBI_BYTE = 1024;
var ONE_MEBI_BYTE = 1024 * ONE_KIBI_BYTE;
// eslint-disable-next-line no-control-regex
var HAS_MULTI_BYTES_CHARACTERS = /[^\u0000-\u007F]/;
function computeBytesCount(candidate) {
    // Accurate bytes count computations can degrade performances when there is a lot of events to process
    if (!HAS_MULTI_BYTES_CHARACTERS.test(candidate)) {
        return candidate.length;
    }
    if (window.TextEncoder !== undefined) {
        return new TextEncoder().encode(candidate).length;
    }
    return new Blob([candidate]).size;
}
function concatBuffers(buffers) {
    var length = buffers.reduce(function (total, buffer) { return total + buffer.length; }, 0);
    var result = new Uint8Array(length);
    var offset = 0;
    for (var _i = 0, buffers_1 = buffers; _i < buffers_1.length; _i++) {
        var buffer = buffers_1[_i];
        result.set(buffer, offset);
        offset += buffer.length;
    }
    return result;
}
//# sourceMappingURL=byteUtils.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js":
/*!*********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   noop: () => (/* binding */ noop),
/* harmony export */   throttle: () => (/* binding */ throttle)
/* harmony export */ });
/* harmony import */ var _timer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../timer */ "../../node_modules/@datadog/browser-core/esm/tools/timer.js");

// use lodash API
function throttle(fn, wait, options) {
    var needLeadingExecution = options && options.leading !== undefined ? options.leading : true;
    var needTrailingExecution = options && options.trailing !== undefined ? options.trailing : true;
    var inWaitPeriod = false;
    var pendingExecutionWithParameters;
    var pendingTimeoutId;
    return {
        throttled: function () {
            var parameters = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                parameters[_i] = arguments[_i];
            }
            if (inWaitPeriod) {
                pendingExecutionWithParameters = parameters;
                return;
            }
            if (needLeadingExecution) {
                fn.apply(void 0, parameters);
            }
            else {
                pendingExecutionWithParameters = parameters;
            }
            inWaitPeriod = true;
            pendingTimeoutId = (0,_timer__WEBPACK_IMPORTED_MODULE_0__.setTimeout)(function () {
                if (needTrailingExecution && pendingExecutionWithParameters) {
                    fn.apply(void 0, pendingExecutionWithParameters);
                }
                inWaitPeriod = false;
                pendingExecutionWithParameters = undefined;
            }, wait);
        },
        cancel: function () {
            (0,_timer__WEBPACK_IMPORTED_MODULE_0__.clearTimeout)(pendingTimeoutId);
            inWaitPeriod = false;
            pendingExecutionWithParameters = undefined;
        },
    };
}
// eslint-disable-next-line @typescript-eslint/no-empty-function
function noop() { }
//# sourceMappingURL=functionUtils.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/utils/numberUtils.js":
/*!*******************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/utils/numberUtils.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   isNumber: () => (/* binding */ isNumber),
/* harmony export */   isPercentage: () => (/* binding */ isPercentage),
/* harmony export */   performDraw: () => (/* binding */ performDraw),
/* harmony export */   round: () => (/* binding */ round)
/* harmony export */ });
/**
 * Return true if the draw is successful
 * @param threshold between 0 and 100
 */
function performDraw(threshold) {
    return threshold !== 0 && Math.random() * 100 <= threshold;
}
function round(num, decimals) {
    return +num.toFixed(decimals);
}
function isPercentage(value) {
    return isNumber(value) && value >= 0 && value <= 100;
}
function isNumber(value) {
    return typeof value === 'number';
}
//# sourceMappingURL=numberUtils.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/utils/objectUtils.js":
/*!*******************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/utils/objectUtils.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   isEmptyObject: () => (/* binding */ isEmptyObject),
/* harmony export */   mapValues: () => (/* binding */ mapValues),
/* harmony export */   objectHasValue: () => (/* binding */ objectHasValue),
/* harmony export */   shallowClone: () => (/* binding */ shallowClone)
/* harmony export */ });
/* harmony import */ var _polyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polyfills */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");

function shallowClone(object) {
    return (0,_polyfills__WEBPACK_IMPORTED_MODULE_0__.assign)({}, object);
}
function objectHasValue(object, value) {
    return Object.keys(object).some(function (key) { return object[key] === value; });
}
function isEmptyObject(object) {
    return Object.keys(object).length === 0;
}
function mapValues(object, fn) {
    var newObject = {};
    for (var _i = 0, _a = Object.keys(object); _i < _a.length; _i++) {
        var key = _a[_i];
        newObject[key] = fn(object[key]);
    }
    return newObject;
}
//# sourceMappingURL=objectUtils.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js":
/*!*****************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   arrayFrom: () => (/* binding */ arrayFrom),
/* harmony export */   assign: () => (/* binding */ assign),
/* harmony export */   cssEscape: () => (/* binding */ cssEscape),
/* harmony export */   elementMatches: () => (/* binding */ elementMatches),
/* harmony export */   endsWith: () => (/* binding */ endsWith),
/* harmony export */   find: () => (/* binding */ find),
/* harmony export */   findLast: () => (/* binding */ findLast),
/* harmony export */   forEach: () => (/* binding */ forEach),
/* harmony export */   includes: () => (/* binding */ includes),
/* harmony export */   objectEntries: () => (/* binding */ objectEntries),
/* harmony export */   objectValues: () => (/* binding */ objectValues),
/* harmony export */   startsWith: () => (/* binding */ startsWith)
/* harmony export */ });
function includes(candidate, search) {
    return candidate.indexOf(search) !== -1;
}
function arrayFrom(arrayLike) {
    if (Array.from) {
        return Array.from(arrayLike);
    }
    var array = [];
    if (arrayLike instanceof Set) {
        arrayLike.forEach(function (item) { return array.push(item); });
    }
    else {
        for (var i = 0; i < arrayLike.length; i++) {
            array.push(arrayLike[i]);
        }
    }
    return array;
}
function find(array, predicate) {
    for (var i = 0; i < array.length; i += 1) {
        var item = array[i];
        if (predicate(item, i)) {
            return item;
        }
    }
    return undefined;
}
function findLast(array, predicate) {
    for (var i = array.length - 1; i >= 0; i -= 1) {
        var item = array[i];
        if (predicate(item, i, array)) {
            return item;
        }
    }
    return undefined;
}
function forEach(list, callback) {
    Array.prototype.forEach.call(list, callback);
}
function objectValues(object) {
    return Object.keys(object).map(function (key) { return object[key]; });
}
function objectEntries(object) {
    return Object.keys(object).map(function (key) { return [key, object[key]]; });
}
function startsWith(candidate, search) {
    return candidate.slice(0, search.length) === search;
}
function endsWith(candidate, search) {
    return candidate.slice(-search.length) === search;
}
function elementMatches(element, selector) {
    if (element.matches) {
        return element.matches(selector);
    }
    // IE11 support
    if (element.msMatchesSelector) {
        return element.msMatchesSelector(selector);
    }
    return false;
}
// https://github.com/jquery/jquery/blob/a684e6ba836f7c553968d7d026ed7941e1a612d8/src/selector/escapeSelector.js
function cssEscape(str) {
    if (window.CSS && window.CSS.escape) {
        return window.CSS.escape(str);
    }
    // eslint-disable-next-line no-control-regex
    return str.replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g, function (ch, asCodePoint) {
        if (asCodePoint) {
            // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
            if (ch === '\0') {
                return '\uFFFD';
            }
            // Control characters and (dependent upon position) numbers get escaped as code points
            return "".concat(ch.slice(0, -1), "\\").concat(ch.charCodeAt(ch.length - 1).toString(16), " ");
        }
        // Other potentially-special ASCII characters get backslash-escaped
        return "\\".concat(ch);
    });
}
function assign(target) {
    var toAssign = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        toAssign[_i - 1] = arguments[_i];
    }
    toAssign.forEach(function (source) {
        for (var key in source) {
            if (Object.prototype.hasOwnProperty.call(source, key)) {
                target[key] = source[key];
            }
        }
    });
    return target;
}
//# sourceMappingURL=polyfills.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/utils/responseUtils.js":
/*!*********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/utils/responseUtils.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   isServerError: () => (/* binding */ isServerError),
/* harmony export */   tryToClone: () => (/* binding */ tryToClone)
/* harmony export */ });
function isServerError(status) {
    return status >= 500;
}
function tryToClone(response) {
    try {
        return response.clone();
    }
    catch (e) {
        // clone can throw if the response has already been used by another instrumentation or is disturbed
        return;
    }
}
//# sourceMappingURL=responseUtils.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/utils/stringUtils.js":
/*!*******************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/utils/stringUtils.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   findCommaSeparatedValue: () => (/* binding */ findCommaSeparatedValue),
/* harmony export */   generateUUID: () => (/* binding */ generateUUID),
/* harmony export */   safeTruncate: () => (/* binding */ safeTruncate)
/* harmony export */ });
/**
 * UUID v4
 * from https://gist.github.com/jed/982883
 */
function generateUUID(placeholder) {
    return placeholder
        ? // eslint-disable-next-line  no-bitwise
            (parseInt(placeholder, 10) ^ ((Math.random() * 16) >> (parseInt(placeholder, 10) / 4))).toString(16)
        : "".concat(1e7, "-").concat(1e3, "-").concat(4e3, "-").concat(8e3, "-").concat(1e11).replace(/[018]/g, generateUUID);
}
function findCommaSeparatedValue(rawString, name) {
    var regex = new RegExp("(?:^|;)\\s*".concat(name, "\\s*=\\s*([^;]+)"));
    var matches = regex.exec(rawString);
    return matches ? matches[1] : undefined;
}
function safeTruncate(candidate, length, suffix) {
    if (suffix === void 0) { suffix = ''; }
    var lastChar = candidate.charCodeAt(length - 1);
    var isLastCharSurrogatePair = lastChar >= 0xd800 && lastChar <= 0xdbff;
    var correctedLength = isLastCharSurrogatePair ? length + 1 : length;
    if (candidate.length <= correctedLength) {
        return candidate;
    }
    return "".concat(candidate.slice(0, correctedLength)).concat(suffix);
}
//# sourceMappingURL=stringUtils.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js":
/*!*****************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ONE_DAY: () => (/* binding */ ONE_DAY),
/* harmony export */   ONE_HOUR: () => (/* binding */ ONE_HOUR),
/* harmony export */   ONE_MINUTE: () => (/* binding */ ONE_MINUTE),
/* harmony export */   ONE_SECOND: () => (/* binding */ ONE_SECOND),
/* harmony export */   ONE_YEAR: () => (/* binding */ ONE_YEAR),
/* harmony export */   addDuration: () => (/* binding */ addDuration),
/* harmony export */   clocksNow: () => (/* binding */ clocksNow),
/* harmony export */   clocksOrigin: () => (/* binding */ clocksOrigin),
/* harmony export */   currentDrift: () => (/* binding */ currentDrift),
/* harmony export */   dateNow: () => (/* binding */ dateNow),
/* harmony export */   elapsed: () => (/* binding */ elapsed),
/* harmony export */   getRelativeTime: () => (/* binding */ getRelativeTime),
/* harmony export */   getTimeStamp: () => (/* binding */ getTimeStamp),
/* harmony export */   looksLikeRelativeTime: () => (/* binding */ looksLikeRelativeTime),
/* harmony export */   relativeNow: () => (/* binding */ relativeNow),
/* harmony export */   relativeToClocks: () => (/* binding */ relativeToClocks),
/* harmony export */   resetNavigationStart: () => (/* binding */ resetNavigationStart),
/* harmony export */   timeStampNow: () => (/* binding */ timeStampNow),
/* harmony export */   toServerDuration: () => (/* binding */ toServerDuration)
/* harmony export */ });
/* harmony import */ var _numberUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./numberUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/numberUtils.js");

var ONE_SECOND = 1000;
var ONE_MINUTE = 60 * ONE_SECOND;
var ONE_HOUR = 60 * ONE_MINUTE;
var ONE_DAY = 24 * ONE_HOUR;
var ONE_YEAR = 365 * ONE_DAY;
function relativeToClocks(relative) {
    return { relative: relative, timeStamp: getCorrectedTimeStamp(relative) };
}
function getCorrectedTimeStamp(relativeTime) {
    var correctedOrigin = (dateNow() - performance.now());
    // apply correction only for positive drift
    if (correctedOrigin > getNavigationStart()) {
        return Math.round(addDuration(correctedOrigin, relativeTime));
    }
    return getTimeStamp(relativeTime);
}
function currentDrift() {
    return Math.round(dateNow() - addDuration(getNavigationStart(), performance.now()));
}
function toServerDuration(duration) {
    if (!(0,_numberUtils__WEBPACK_IMPORTED_MODULE_0__.isNumber)(duration)) {
        return duration;
    }
    return (0,_numberUtils__WEBPACK_IMPORTED_MODULE_0__.round)(duration * 1e6, 0);
}
function dateNow() {
    // Do not use `Date.now` because sometimes websites are wrongly "polyfilling" it. For example, we
    // had some users using a very old version of `datejs`, which patched `Date.now` to return a Date
    // instance instead of a timestamp[1]. Those users are unlikely to fix this, so let's handle this
    // case ourselves.
    // [1]: https://github.com/datejs/Datejs/blob/97f5c7c58c5bc5accdab8aa7602b6ac56462d778/src/core-debug.js#L14-L16
    return new Date().getTime();
}
function timeStampNow() {
    return dateNow();
}
function relativeNow() {
    return performance.now();
}
function clocksNow() {
    return { relative: relativeNow(), timeStamp: timeStampNow() };
}
function clocksOrigin() {
    return { relative: 0, timeStamp: getNavigationStart() };
}
function elapsed(start, end) {
    return (end - start);
}
function addDuration(a, b) {
    return a + b;
}
/**
 * Get the time since the navigation was started.
 *
 * Note: this does not use `performance.timeOrigin` because it doesn't seem to reflect the actual
 * time on which the navigation has started: it may be much farther in the past, at least in Firefox 71.
 * Related issue in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1429926
 */
function getRelativeTime(timestamp) {
    return (timestamp - getNavigationStart());
}
function getTimeStamp(relativeTime) {
    return Math.round(addDuration(getNavigationStart(), relativeTime));
}
function looksLikeRelativeTime(time) {
    return time < ONE_YEAR;
}
/**
 * Navigation start slightly change on some rare cases
 */
var navigationStart;
function getNavigationStart() {
    if (navigationStart === undefined) {
        navigationStart = performance.timing.navigationStart;
    }
    return navigationStart;
}
function resetNavigationStart() {
    navigationStart = undefined;
}
//# sourceMappingURL=timeUtils.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/utils/typeUtils.js":
/*!*****************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/utils/typeUtils.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   getType: () => (/* binding */ getType)
/* harmony export */ });
/**
 * Similar to `typeof`, but distinguish plain objects from `null` and arrays
 */
function getType(value) {
    if (value === null) {
        return 'null';
    }
    if (Array.isArray(value)) {
        return 'array';
    }
    return typeof value;
}
//# sourceMappingURL=typeUtils.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/utils/urlPolyfill.js":
/*!*******************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/utils/urlPolyfill.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   buildUrl: () => (/* binding */ buildUrl),
/* harmony export */   getHash: () => (/* binding */ getHash),
/* harmony export */   getLinkElementOrigin: () => (/* binding */ getLinkElementOrigin),
/* harmony export */   getLocationOrigin: () => (/* binding */ getLocationOrigin),
/* harmony export */   getOrigin: () => (/* binding */ getOrigin),
/* harmony export */   getPathName: () => (/* binding */ getPathName),
/* harmony export */   getSearch: () => (/* binding */ getSearch),
/* harmony export */   isValidUrl: () => (/* binding */ isValidUrl),
/* harmony export */   normalizeUrl: () => (/* binding */ normalizeUrl)
/* harmony export */ });
/* harmony import */ var _serialisation_jsonStringify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../serialisation/jsonStringify */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/jsonStringify.js");

function normalizeUrl(url) {
    return buildUrl(url, getLocationOrigin()).href;
}
function isValidUrl(url) {
    try {
        return !!buildUrl(url);
    }
    catch (_a) {
        return false;
    }
}
function getOrigin(url) {
    return getLinkElementOrigin(buildUrl(url));
}
function getPathName(url) {
    var pathname = buildUrl(url).pathname;
    return pathname[0] === '/' ? pathname : "/".concat(pathname);
}
function getSearch(url) {
    return buildUrl(url).search;
}
function getHash(url) {
    return buildUrl(url).hash;
}
function buildUrl(url, base) {
    var supportedURL = getSupportedUrl();
    if (supportedURL) {
        try {
            return base !== undefined ? new supportedURL(url, base) : new supportedURL(url);
        }
        catch (error) {
            throw new Error("Failed to construct URL: ".concat(String(error), " ").concat((0,_serialisation_jsonStringify__WEBPACK_IMPORTED_MODULE_0__.jsonStringify)({ url: url, base: base })));
        }
    }
    if (base === undefined && !/:/.test(url)) {
        throw new Error("Invalid URL: '".concat(url, "'"));
    }
    var doc = document;
    var anchorElement = doc.createElement('a');
    if (base !== undefined) {
        doc = document.implementation.createHTMLDocument('');
        var baseElement = doc.createElement('base');
        baseElement.href = base;
        doc.head.appendChild(baseElement);
        doc.body.appendChild(anchorElement);
    }
    anchorElement.href = url;
    return anchorElement;
}
var originalURL = URL;
var isURLSupported;
function getSupportedUrl() {
    if (isURLSupported === undefined) {
        try {
            var url = new originalURL('http://test/path');
            isURLSupported = url.href === 'http://test/path';
        }
        catch (_a) {
            isURLSupported = false;
        }
    }
    return isURLSupported ? originalURL : undefined;
}
function getLocationOrigin() {
    return getLinkElementOrigin(window.location);
}
/**
 * Fallback
 * On IE HTMLAnchorElement origin is not supported: https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/origin
 * On Firefox window.location.origin is "null" for file: URIs: https://bugzilla.mozilla.org/show_bug.cgi?id=878297
 */
function getLinkElementOrigin(element) {
    if (element.origin && element.origin !== 'null') {
        return element.origin;
    }
    var sanitizedHost = element.host.replace(/(:80|:443)$/, '');
    return "".concat(element.protocol, "//").concat(sanitizedHost);
}
//# sourceMappingURL=urlPolyfill.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/tools/valueHistory.js":
/*!**************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/tools/valueHistory.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CLEAR_OLD_VALUES_INTERVAL: () => (/* binding */ CLEAR_OLD_VALUES_INTERVAL),
/* harmony export */   ValueHistory: () => (/* binding */ ValueHistory)
/* harmony export */ });
/* harmony import */ var _timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timer */ "../../node_modules/@datadog/browser-core/esm/tools/timer.js");
/* harmony import */ var _utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/timeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");


var END_OF_TIMES = Infinity;
var CLEAR_OLD_VALUES_INTERVAL = _utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__.ONE_MINUTE;
/**
 * Store and keep track of values spans. This whole class assumes that values are added in
 * chronological order (i.e. all entries have an increasing start time).
 */
var ValueHistory = /** @class */ (function () {
    function ValueHistory(expireDelay, maxEntries) {
        var _this = this;
        this.expireDelay = expireDelay;
        this.maxEntries = maxEntries;
        this.entries = [];
        this.clearOldValuesInterval = (0,_timer__WEBPACK_IMPORTED_MODULE_1__.setInterval)(function () { return _this.clearOldValues(); }, CLEAR_OLD_VALUES_INTERVAL);
    }
    /**
     * Add a value to the history associated with a start time. Returns a reference to this newly
     * added entry that can be removed or closed.
     */
    ValueHistory.prototype.add = function (value, startTime) {
        var _this = this;
        var entry = {
            value: value,
            startTime: startTime,
            endTime: END_OF_TIMES,
            remove: function () {
                var index = _this.entries.indexOf(entry);
                if (index >= 0) {
                    _this.entries.splice(index, 1);
                }
            },
            close: function (endTime) {
                entry.endTime = endTime;
            },
        };
        if (this.maxEntries && this.entries.length >= this.maxEntries) {
            this.entries.pop();
        }
        this.entries.unshift(entry);
        return entry;
    };
    /**
     * Return the latest value that was active during `startTime`, or the currently active value
     * if no `startTime` is provided. This method assumes that entries are not overlapping.
     */
    ValueHistory.prototype.find = function (startTime) {
        if (startTime === void 0) { startTime = END_OF_TIMES; }
        for (var _i = 0, _a = this.entries; _i < _a.length; _i++) {
            var entry = _a[_i];
            if (entry.startTime <= startTime) {
                if (startTime <= entry.endTime) {
                    return entry.value;
                }
                break;
            }
        }
    };
    /**
     * Helper function to close the currently active value, if any. This method assumes that entries
     * are not overlapping.
     */
    ValueHistory.prototype.closeActive = function (endTime) {
        var latestEntry = this.entries[0];
        if (latestEntry && latestEntry.endTime === END_OF_TIMES) {
            latestEntry.close(endTime);
        }
    };
    /**
     * Return all values with an active period overlapping with the duration,
     * or all values that were active during `startTime` if no duration is provided,
     * or all currently active values if no `startTime` is provided.
     */
    ValueHistory.prototype.findAll = function (startTime, duration) {
        if (startTime === void 0) { startTime = END_OF_TIMES; }
        if (duration === void 0) { duration = 0; }
        var endTime = (0,_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__.addDuration)(startTime, duration);
        return this.entries
            .filter(function (entry) { return entry.startTime <= endTime && startTime <= entry.endTime; })
            .map(function (entry) { return entry.value; });
    };
    /**
     * Remove all entries from this collection.
     */
    ValueHistory.prototype.reset = function () {
        this.entries = [];
    };
    /**
     * Stop internal garbage collection of past entries.
     */
    ValueHistory.prototype.stop = function () {
        (0,_timer__WEBPACK_IMPORTED_MODULE_1__.clearInterval)(this.clearOldValuesInterval);
    };
    ValueHistory.prototype.clearOldValues = function () {
        var oldTimeThreshold = (0,_utils_timeUtils__WEBPACK_IMPORTED_MODULE_0__.relativeNow)() - this.expireDelay;
        while (this.entries.length > 0 && this.entries[this.entries.length - 1].endTime < oldTimeThreshold) {
            this.entries.pop();
        }
    };
    return ValueHistory;
}());

//# sourceMappingURL=valueHistory.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/transport/batch.js":
/*!***********************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/transport/batch.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   Batch: () => (/* binding */ Batch)
/* harmony export */ });
/* harmony import */ var _tools_display__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../tools/display */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");
/* harmony import */ var _tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tools/utils/polyfills */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");
/* harmony import */ var _browser_pageExitObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../browser/pageExitObservable */ "../../node_modules/@datadog/browser-core/esm/browser/pageExitObservable.js");
/* harmony import */ var _tools_utils_byteUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tools/utils/byteUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/byteUtils.js");
/* harmony import */ var _tools_serialisation_jsonStringify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../tools/serialisation/jsonStringify */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/jsonStringify.js");





var Batch = /** @class */ (function () {
    function Batch(request, flushController, messageBytesLimit) {
        var _this = this;
        this.request = request;
        this.flushController = flushController;
        this.messageBytesLimit = messageBytesLimit;
        this.pushOnlyBuffer = [];
        this.upsertBuffer = {};
        this.flushController.flushObservable.subscribe(function (event) { return _this.flush(event); });
    }
    Batch.prototype.add = function (message) {
        this.addOrUpdate(message);
    };
    Batch.prototype.upsert = function (message, key) {
        this.addOrUpdate(message, key);
    };
    Batch.prototype.flush = function (event) {
        var messages = this.pushOnlyBuffer.concat((0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_0__.objectValues)(this.upsertBuffer));
        this.pushOnlyBuffer = [];
        this.upsertBuffer = {};
        var payload = { data: messages.join('\n'), bytesCount: event.bytesCount, flushReason: event.reason };
        if ((0,_browser_pageExitObservable__WEBPACK_IMPORTED_MODULE_1__.isPageExitReason)(event.reason)) {
            this.request.sendOnExit(payload);
        }
        else {
            this.request.send(payload);
        }
    };
    Batch.prototype.addOrUpdate = function (message, key) {
        var _a = this.process(message), processedMessage = _a.processedMessage, messageBytesCount = _a.messageBytesCount;
        if (messageBytesCount >= this.messageBytesLimit) {
            _tools_display__WEBPACK_IMPORTED_MODULE_2__.display.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit, "KB."));
            return;
        }
        if (this.hasMessageFor(key)) {
            this.remove(key);
        }
        this.push(processedMessage, messageBytesCount, key);
    };
    Batch.prototype.process = function (message) {
        var processedMessage = (0,_tools_serialisation_jsonStringify__WEBPACK_IMPORTED_MODULE_3__.jsonStringify)(message);
        var messageBytesCount = (0,_tools_utils_byteUtils__WEBPACK_IMPORTED_MODULE_4__.computeBytesCount)(processedMessage);
        return { processedMessage: processedMessage, messageBytesCount: messageBytesCount };
    };
    Batch.prototype.push = function (processedMessage, messageBytesCount, key) {
        // If there are other messages, a '\n' will be added at serialization
        var separatorBytesCount = this.flushController.messagesCount > 0 ? 1 : 0;
        this.flushController.notifyBeforeAddMessage(messageBytesCount + separatorBytesCount);
        if (key !== undefined) {
            this.upsertBuffer[key] = processedMessage;
        }
        else {
            this.pushOnlyBuffer.push(processedMessage);
        }
        this.flushController.notifyAfterAddMessage();
    };
    Batch.prototype.remove = function (key) {
        var removedMessage = this.upsertBuffer[key];
        delete this.upsertBuffer[key];
        var messageBytesCount = (0,_tools_utils_byteUtils__WEBPACK_IMPORTED_MODULE_4__.computeBytesCount)(removedMessage);
        // If there are other messages, a '\n' will be added at serialization
        var separatorBytesCount = this.flushController.messagesCount > 1 ? 1 : 0;
        this.flushController.notifyAfterRemoveMessage(messageBytesCount + separatorBytesCount);
    };
    Batch.prototype.hasMessageFor = function (key) {
        return key !== undefined && this.upsertBuffer[key] !== undefined;
    };
    return Batch;
}());

//# sourceMappingURL=batch.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/transport/eventBridge.js":
/*!*****************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/transport/eventBridge.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   canUseEventBridge: () => (/* binding */ canUseEventBridge),
/* harmony export */   getEventBridge: () => (/* binding */ getEventBridge)
/* harmony export */ });
/* harmony import */ var _tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tools/utils/polyfills */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");
/* harmony import */ var _tools_getGlobalObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tools/getGlobalObject */ "../../node_modules/@datadog/browser-core/esm/tools/getGlobalObject.js");


function getEventBridge() {
    var eventBridgeGlobal = getEventBridgeGlobal();
    if (!eventBridgeGlobal) {
        return;
    }
    return {
        getAllowedWebViewHosts: function () {
            return JSON.parse(eventBridgeGlobal.getAllowedWebViewHosts());
        },
        send: function (eventType, event) {
            eventBridgeGlobal.send(JSON.stringify({ eventType: eventType, event: event }));
        },
    };
}
function canUseEventBridge(currentHost) {
    var _a;
    if (currentHost === void 0) { currentHost = (_a = (0,_tools_getGlobalObject__WEBPACK_IMPORTED_MODULE_0__.getGlobalObject)().location) === null || _a === void 0 ? void 0 : _a.hostname; }
    var bridge = getEventBridge();
    return (!!bridge &&
        bridge
            .getAllowedWebViewHosts()
            .some(function (allowedHost) { return currentHost === allowedHost || (0,_tools_utils_polyfills__WEBPACK_IMPORTED_MODULE_1__.endsWith)(currentHost, ".".concat(allowedHost)); }));
}
function getEventBridgeGlobal() {
    return (0,_tools_getGlobalObject__WEBPACK_IMPORTED_MODULE_0__.getGlobalObject)().DatadogEventBridge;
}
//# sourceMappingURL=eventBridge.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/transport/flushController.js":
/*!*********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/transport/flushController.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   createFlushController: () => (/* binding */ createFlushController)
/* harmony export */ });
/* harmony import */ var _tools_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tools/observable */ "../../node_modules/@datadog/browser-core/esm/tools/observable.js");
/* harmony import */ var _tools_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tools/timer */ "../../node_modules/@datadog/browser-core/esm/tools/timer.js");


/**
 * Returns a "flush controller", responsible of notifying when flushing a pool of pending data needs
 * to happen. The implementation is designed to support both synchronous and asynchronous usages,
 * but relies on invariants described in each method documentation to keep a coherent state.
 */
function createFlushController(_a) {
    var messagesLimit = _a.messagesLimit, bytesLimit = _a.bytesLimit, durationLimit = _a.durationLimit, pageExitObservable = _a.pageExitObservable, sessionExpireObservable = _a.sessionExpireObservable;
    var flushObservable = new _tools_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
    pageExitObservable.subscribe(function (event) { return flush(event.reason); });
    sessionExpireObservable.subscribe(function () { return flush('session_expire'); });
    var currentBytesCount = 0;
    var currentMessagesCount = 0;
    function flush(flushReason) {
        if (currentMessagesCount === 0) {
            return;
        }
        var messagesCount = currentMessagesCount;
        var bytesCount = currentBytesCount;
        currentMessagesCount = 0;
        currentBytesCount = 0;
        cancelDurationLimitTimeout();
        flushObservable.notify({
            reason: flushReason,
            messagesCount: messagesCount,
            bytesCount: bytesCount,
        });
    }
    var durationLimitTimeoutId;
    function scheduleDurationLimitTimeout() {
        if (durationLimitTimeoutId === undefined) {
            durationLimitTimeoutId = (0,_tools_timer__WEBPACK_IMPORTED_MODULE_1__.setTimeout)(function () {
                flush('duration_limit');
            }, durationLimit);
        }
    }
    function cancelDurationLimitTimeout() {
        (0,_tools_timer__WEBPACK_IMPORTED_MODULE_1__.clearTimeout)(durationLimitTimeoutId);
        durationLimitTimeoutId = undefined;
    }
    return {
        flushObservable: flushObservable,
        get messagesCount() {
            return currentMessagesCount;
        },
        /**
         * Notifies that a message will be added to a pool of pending messages waiting to be flushed.
         *
         * This function needs to be called synchronously, right before adding the message, so no flush
         * event can happen after `notifyBeforeAddMessage` and before adding the message.
         */
        notifyBeforeAddMessage: function (messageBytesCount) {
            if (currentBytesCount + messageBytesCount >= bytesLimit) {
                flush('bytes_limit');
            }
            // Consider the message to be added now rather than in `notifyAfterAddMessage`, because if no
            // message was added yet and `notifyAfterAddMessage` is called asynchronously, we still want
            // to notify when a flush is needed (for example on page exit).
            currentMessagesCount += 1;
            currentBytesCount += messageBytesCount;
            scheduleDurationLimitTimeout();
        },
        /**
         * Notifies that a message *was* added to a pool of pending messages waiting to be flushed.
         *
         * This function can be called asynchronously after the message was added, but in this case it
         * should not be called if a flush event occurred in between.
         */
        notifyAfterAddMessage: function () {
            if (currentMessagesCount >= messagesLimit) {
                flush('messages_limit');
            }
            else if (currentBytesCount >= bytesLimit) {
                flush('bytes_limit');
            }
        },
        /**
         * Notifies that a message was removed from a pool of pending messages waiting to be flushed.
         *
         * This function needs to be called synchronously, right after removing the message, so no flush
         * event can happen after removing the message and before `notifyAfterRemoveMessage`.
         */
        notifyAfterRemoveMessage: function (messageBytesCount) {
            currentBytesCount -= messageBytesCount;
            currentMessagesCount -= 1;
            if (currentMessagesCount === 0) {
                cancelDurationLimitTimeout();
            }
        },
    };
}
//# sourceMappingURL=flushController.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/transport/httpRequest.js":
/*!*****************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/transport/httpRequest.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   createHttpRequest: () => (/* binding */ createHttpRequest),
/* harmony export */   fetchKeepAliveStrategy: () => (/* binding */ fetchKeepAliveStrategy),
/* harmony export */   sendXHR: () => (/* binding */ sendXHR)
/* harmony export */ });
/* harmony import */ var _domain_telemetry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../domain/telemetry */ "../../node_modules/@datadog/browser-core/esm/domain/telemetry/telemetry.js");
/* harmony import */ var _tools_monitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../tools/monitor */ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js");
/* harmony import */ var _browser_addEventListener__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../browser/addEventListener */ "../../node_modules/@datadog/browser-core/esm/browser/addEventListener.js");
/* harmony import */ var _sendWithRetryStrategy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sendWithRetryStrategy */ "../../node_modules/@datadog/browser-core/esm/transport/sendWithRetryStrategy.js");




function createHttpRequest(configuration, endpointBuilder, bytesLimit, reportError) {
    var retryState = (0,_sendWithRetryStrategy__WEBPACK_IMPORTED_MODULE_0__.newRetryState)();
    var sendStrategyForRetry = function (payload, onResponse) {
        return fetchKeepAliveStrategy(configuration, endpointBuilder, bytesLimit, payload, onResponse);
    };
    return {
        send: function (payload) {
            (0,_sendWithRetryStrategy__WEBPACK_IMPORTED_MODULE_0__.sendWithRetryStrategy)(payload, retryState, sendStrategyForRetry, endpointBuilder.endpointType, reportError);
        },
        /**
         * Since fetch keepalive behaves like regular fetch on Firefox,
         * keep using sendBeaconStrategy on exit
         */
        sendOnExit: function (payload) {
            sendBeaconStrategy(configuration, endpointBuilder, bytesLimit, payload);
        },
    };
}
function sendBeaconStrategy(configuration, endpointBuilder, bytesLimit, _a) {
    var data = _a.data, bytesCount = _a.bytesCount, flushReason = _a.flushReason;
    var canUseBeacon = !!navigator.sendBeacon && bytesCount < bytesLimit;
    if (canUseBeacon) {
        try {
            var beaconUrl = endpointBuilder.build('beacon', flushReason);
            var isQueued = navigator.sendBeacon(beaconUrl, data);
            if (isQueued) {
                return;
            }
        }
        catch (e) {
            reportBeaconError(e);
        }
    }
    var xhrUrl = endpointBuilder.build('xhr', flushReason);
    sendXHR(configuration, xhrUrl, data);
}
var hasReportedBeaconError = false;
function reportBeaconError(e) {
    if (!hasReportedBeaconError) {
        hasReportedBeaconError = true;
        (0,_domain_telemetry__WEBPACK_IMPORTED_MODULE_1__.addTelemetryError)(e);
    }
}
function fetchKeepAliveStrategy(configuration, endpointBuilder, bytesLimit, _a, onResponse) {
    var data = _a.data, bytesCount = _a.bytesCount, flushReason = _a.flushReason, retry = _a.retry;
    var canUseKeepAlive = isKeepAliveSupported() && bytesCount < bytesLimit;
    if (canUseKeepAlive) {
        var fetchUrl = endpointBuilder.build('fetch', flushReason, retry);
        fetch(fetchUrl, { method: 'POST', body: data, keepalive: true, mode: 'cors' }).then((0,_tools_monitor__WEBPACK_IMPORTED_MODULE_2__.monitor)(function (response) { return onResponse === null || onResponse === void 0 ? void 0 : onResponse({ status: response.status, type: response.type }); }), (0,_tools_monitor__WEBPACK_IMPORTED_MODULE_2__.monitor)(function () {
            var xhrUrl = endpointBuilder.build('xhr', flushReason, retry);
            // failed to queue the request
            sendXHR(configuration, xhrUrl, data, onResponse);
        }));
    }
    else {
        var xhrUrl = endpointBuilder.build('xhr', flushReason, retry);
        sendXHR(configuration, xhrUrl, data, onResponse);
    }
}
function isKeepAliveSupported() {
    // Request can throw, cf https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#errors
    try {
        return window.Request && 'keepalive' in new Request('http://a');
    }
    catch (_a) {
        return false;
    }
}
function sendXHR(configuration, url, data, onResponse) {
    var request = new XMLHttpRequest();
    request.open('POST', url, true);
    (0,_browser_addEventListener__WEBPACK_IMPORTED_MODULE_3__.addEventListener)(configuration, request, 'loadend', function () {
        onResponse === null || onResponse === void 0 ? void 0 : onResponse({ status: request.status });
    }, {
        // prevent multiple onResponse callbacks
        // if the xhr instance is reused by a third party
        once: true,
    });
    request.send(data);
}
//# sourceMappingURL=httpRequest.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/transport/sendWithRetryStrategy.js":
/*!***************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/transport/sendWithRetryStrategy.js ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   INITIAL_BACKOFF_TIME: () => (/* binding */ INITIAL_BACKOFF_TIME),
/* harmony export */   MAX_BACKOFF_TIME: () => (/* binding */ MAX_BACKOFF_TIME),
/* harmony export */   MAX_ONGOING_BYTES_COUNT: () => (/* binding */ MAX_ONGOING_BYTES_COUNT),
/* harmony export */   MAX_ONGOING_REQUESTS: () => (/* binding */ MAX_ONGOING_REQUESTS),
/* harmony export */   MAX_QUEUE_BYTES_COUNT: () => (/* binding */ MAX_QUEUE_BYTES_COUNT),
/* harmony export */   newRetryState: () => (/* binding */ newRetryState),
/* harmony export */   sendWithRetryStrategy: () => (/* binding */ sendWithRetryStrategy)
/* harmony export */ });
/* harmony import */ var _tools_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../tools/timer */ "../../node_modules/@datadog/browser-core/esm/tools/timer.js");
/* harmony import */ var _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tools/utils/timeUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _tools_utils_byteUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tools/utils/byteUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/byteUtils.js");
/* harmony import */ var _tools_utils_responseUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tools/utils/responseUtils */ "../../node_modules/@datadog/browser-core/esm/tools/utils/responseUtils.js");
/* harmony import */ var _domain_error_error_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../domain/error/error.types */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.types.js");





var MAX_ONGOING_BYTES_COUNT = 80 * _tools_utils_byteUtils__WEBPACK_IMPORTED_MODULE_0__.ONE_KIBI_BYTE;
var MAX_ONGOING_REQUESTS = 32;
var MAX_QUEUE_BYTES_COUNT = 3 * _tools_utils_byteUtils__WEBPACK_IMPORTED_MODULE_0__.ONE_MEBI_BYTE;
var MAX_BACKOFF_TIME = _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_1__.ONE_MINUTE;
var INITIAL_BACKOFF_TIME = _tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_1__.ONE_SECOND;
function sendWithRetryStrategy(payload, state, sendStrategy, endpointType, reportError) {
    if (state.transportStatus === 0 /* TransportStatus.UP */ &&
        state.queuedPayloads.size() === 0 &&
        state.bandwidthMonitor.canHandle(payload)) {
        send(payload, state, sendStrategy, {
            onSuccess: function () { return retryQueuedPayloads(0 /* RetryReason.AFTER_SUCCESS */, state, sendStrategy, endpointType, reportError); },
            onFailure: function () {
                state.queuedPayloads.enqueue(payload);
                scheduleRetry(state, sendStrategy, endpointType, reportError);
            },
        });
    }
    else {
        state.queuedPayloads.enqueue(payload);
    }
}
function scheduleRetry(state, sendStrategy, endpointType, reportError) {
    if (state.transportStatus !== 2 /* TransportStatus.DOWN */) {
        return;
    }
    (0,_tools_timer__WEBPACK_IMPORTED_MODULE_2__.setTimeout)(function () {
        var payload = state.queuedPayloads.first();
        send(payload, state, sendStrategy, {
            onSuccess: function () {
                state.queuedPayloads.dequeue();
                state.currentBackoffTime = INITIAL_BACKOFF_TIME;
                retryQueuedPayloads(1 /* RetryReason.AFTER_RESUME */, state, sendStrategy, endpointType, reportError);
            },
            onFailure: function () {
                state.currentBackoffTime = Math.min(MAX_BACKOFF_TIME, state.currentBackoffTime * 2);
                scheduleRetry(state, sendStrategy, endpointType, reportError);
            },
        });
    }, state.currentBackoffTime);
}
function send(payload, state, sendStrategy, _a) {
    var onSuccess = _a.onSuccess, onFailure = _a.onFailure;
    state.bandwidthMonitor.add(payload);
    sendStrategy(payload, function (response) {
        state.bandwidthMonitor.remove(payload);
        if (!shouldRetryRequest(response)) {
            state.transportStatus = 0 /* TransportStatus.UP */;
            onSuccess();
        }
        else {
            // do not consider transport down if another ongoing request could succeed
            state.transportStatus =
                state.bandwidthMonitor.ongoingRequestCount > 0 ? 1 /* TransportStatus.FAILURE_DETECTED */ : 2 /* TransportStatus.DOWN */;
            payload.retry = {
                count: payload.retry ? payload.retry.count + 1 : 1,
                lastFailureStatus: response.status,
            };
            onFailure();
        }
    });
}
function retryQueuedPayloads(reason, state, sendStrategy, endpointType, reportError) {
    if (reason === 0 /* RetryReason.AFTER_SUCCESS */ && state.queuedPayloads.isFull() && !state.queueFullReported) {
        reportError({
            message: "Reached max ".concat(endpointType, " events size queued for upload: ").concat(MAX_QUEUE_BYTES_COUNT / _tools_utils_byteUtils__WEBPACK_IMPORTED_MODULE_0__.ONE_MEBI_BYTE, "MiB"),
            source: _domain_error_error_types__WEBPACK_IMPORTED_MODULE_3__.ErrorSource.AGENT,
            startClocks: (0,_tools_utils_timeUtils__WEBPACK_IMPORTED_MODULE_1__.clocksNow)(),
        });
        state.queueFullReported = true;
    }
    var previousQueue = state.queuedPayloads;
    state.queuedPayloads = newPayloadQueue();
    while (previousQueue.size() > 0) {
        sendWithRetryStrategy(previousQueue.dequeue(), state, sendStrategy, endpointType, reportError);
    }
}
function shouldRetryRequest(response) {
    return (response.type !== 'opaque' &&
        ((response.status === 0 && !navigator.onLine) ||
            response.status === 408 ||
            response.status === 429 ||
            (0,_tools_utils_responseUtils__WEBPACK_IMPORTED_MODULE_4__.isServerError)(response.status)));
}
function newRetryState() {
    return {
        transportStatus: 0 /* TransportStatus.UP */,
        currentBackoffTime: INITIAL_BACKOFF_TIME,
        bandwidthMonitor: newBandwidthMonitor(),
        queuedPayloads: newPayloadQueue(),
        queueFullReported: false,
    };
}
function newPayloadQueue() {
    var queue = [];
    return {
        bytesCount: 0,
        enqueue: function (payload) {
            if (this.isFull()) {
                return;
            }
            queue.push(payload);
            this.bytesCount += payload.bytesCount;
        },
        first: function () {
            return queue[0];
        },
        dequeue: function () {
            var payload = queue.shift();
            if (payload) {
                this.bytesCount -= payload.bytesCount;
            }
            return payload;
        },
        size: function () {
            return queue.length;
        },
        isFull: function () {
            return this.bytesCount >= MAX_QUEUE_BYTES_COUNT;
        },
    };
}
function newBandwidthMonitor() {
    return {
        ongoingRequestCount: 0,
        ongoingByteCount: 0,
        canHandle: function (payload) {
            return (this.ongoingRequestCount === 0 ||
                (this.ongoingByteCount + payload.bytesCount <= MAX_ONGOING_BYTES_COUNT &&
                    this.ongoingRequestCount < MAX_ONGOING_REQUESTS));
        },
        add: function (payload) {
            this.ongoingRequestCount += 1;
            this.ongoingByteCount += payload.bytesCount;
        },
        remove: function (payload) {
            this.ongoingRequestCount -= 1;
            this.ongoingByteCount -= payload.bytesCount;
        },
    };
}
//# sourceMappingURL=sendWithRetryStrategy.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-core/esm/transport/startBatchWithReplica.js":
/*!***************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-core/esm/transport/startBatchWithReplica.js ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   startBatchWithReplica: () => (/* binding */ startBatchWithReplica)
/* harmony export */ });
/* harmony import */ var _batch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./batch */ "../../node_modules/@datadog/browser-core/esm/transport/batch.js");
/* harmony import */ var _httpRequest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./httpRequest */ "../../node_modules/@datadog/browser-core/esm/transport/httpRequest.js");
/* harmony import */ var _flushController__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flushController */ "../../node_modules/@datadog/browser-core/esm/transport/flushController.js");



function startBatchWithReplica(configuration, primary, replica, reportError, pageExitObservable, sessionExpireObservable) {
    var primaryBatch = createBatch(configuration, primary.endpoint);
    var replicaBatch = replica && createBatch(configuration, replica.endpoint);
    function createBatch(configuration, endpointBuilder) {
        return new _batch__WEBPACK_IMPORTED_MODULE_0__.Batch((0,_httpRequest__WEBPACK_IMPORTED_MODULE_1__.createHttpRequest)(configuration, endpointBuilder, configuration.batchBytesLimit, reportError), (0,_flushController__WEBPACK_IMPORTED_MODULE_2__.createFlushController)({
            messagesLimit: configuration.batchMessagesLimit,
            bytesLimit: configuration.batchBytesLimit,
            durationLimit: configuration.flushTimeout,
            pageExitObservable: pageExitObservable,
            sessionExpireObservable: sessionExpireObservable,
        }), configuration.messageBytesLimit);
    }
    return {
        flushObservable: primaryBatch.flushController.flushObservable,
        add: function (message, replicated) {
            if (replicated === void 0) { replicated = true; }
            primaryBatch.add(message);
            if (replicaBatch && replicated) {
                replicaBatch.add(replica.transformMessage ? replica.transformMessage(message) : message);
            }
        },
        upsert: function (message, key) {
            primaryBatch.upsert(message, key);
            if (replicaBatch) {
                replicaBatch.upsert(replica.transformMessage ? replica.transformMessage(message) : message, key);
            }
        },
    };
}
//# sourceMappingURL=startBatchWithReplica.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/boot/logsPublicApi.js":
/*!**************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/boot/logsPublicApi.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   makeLogsPublicApi: () => (/* binding */ makeLogsPublicApi)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/contextManager.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/boundedBuffer.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/mergeInto.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/boot/init.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/transport/eventBridge.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/sanitize.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/user/user.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");
/* harmony import */ var _domain_configuration__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../domain/configuration */ "../../node_modules/@datadog/browser-logs/esm/domain/configuration.js");
/* harmony import */ var _domain_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../domain/logger */ "../../node_modules/@datadog/browser-logs/esm/domain/logger.js");



function makeLogsPublicApi(startLogsImpl) {
    var isAlreadyInitialized = false;
    var globalContextManager = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.createContextManager)("global context" /* CustomerDataType.GlobalContext */);
    var userContextManager = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.createContextManager)("user" /* CustomerDataType.User */);
    var customLoggers = {};
    var getInternalContextStrategy = function () { return undefined; };
    var beforeInitLoggerLog = new _datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__.BoundedBuffer();
    var handleLogStrategy = function (logsMessage, logger, savedCommonContext, date) {
        if (savedCommonContext === void 0) { savedCommonContext = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__.deepClone)(buildCommonContext()); }
        if (date === void 0) { date = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_5__.timeStampNow)(); }
        beforeInitLoggerLog.add(function () { return handleLogStrategy(logsMessage, logger, savedCommonContext, date); });
    };
    var getInitConfigurationStrategy = function () { return undefined; };
    var mainLogger = new _domain_logger__WEBPACK_IMPORTED_MODULE_1__.Logger(function () {
        var params = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            params[_i] = arguments[_i];
        }
        return handleLogStrategy.apply(void 0, params);
    });
    function buildCommonContext() {
        return {
            view: {
                referrer: document.referrer,
                url: window.location.href,
            },
            context: globalContextManager.getContext(),
            user: userContextManager.getContext(),
        };
    }
    return (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_6__.makePublicApi)({
        logger: mainLogger,
        init: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(function (initConfiguration) {
            var _a;
            // This function should be available, regardless of initialization success.
            getInitConfigurationStrategy = function () { return (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__.deepClone)(initConfiguration); };
            if ((0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_8__.canUseEventBridge)()) {
                initConfiguration = overrideInitConfigurationForBridge(initConfiguration);
            }
            if (!canInitLogs(initConfiguration)) {
                return;
            }
            var configuration = (0,_domain_configuration__WEBPACK_IMPORTED_MODULE_0__.validateAndBuildLogsConfiguration)(initConfiguration);
            if (!configuration) {
                return;
            }
            ;
            (_a = startLogsImpl(initConfiguration, configuration, buildCommonContext, mainLogger), handleLogStrategy = _a.handleLog, getInternalContextStrategy = _a.getInternalContext);
            beforeInitLoggerLog.drain();
            isAlreadyInitialized = true;
        }),
        /** @deprecated: use getGlobalContext instead */
        getLoggerGlobalContext: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(globalContextManager.get),
        getGlobalContext: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(globalContextManager.getContext),
        /** @deprecated: use setGlobalContext instead */
        setLoggerGlobalContext: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(globalContextManager.set),
        setGlobalContext: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(globalContextManager.setContext),
        /** @deprecated: use setGlobalContextProperty instead */
        addLoggerGlobalContext: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(globalContextManager.add),
        setGlobalContextProperty: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(globalContextManager.setContextProperty),
        /** @deprecated: use removeGlobalContextProperty instead */
        removeLoggerGlobalContext: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(globalContextManager.remove),
        removeGlobalContextProperty: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(globalContextManager.removeContextProperty),
        clearGlobalContext: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(globalContextManager.clearContext),
        createLogger: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(function (name, conf) {
            if (conf === void 0) { conf = {}; }
            customLoggers[name] = new _domain_logger__WEBPACK_IMPORTED_MODULE_1__.Logger(function () {
                var params = [];
                for (var _i = 0; _i < arguments.length; _i++) {
                    params[_i] = arguments[_i];
                }
                return handleLogStrategy.apply(void 0, params);
            }, (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_9__.sanitize)(name), conf.handler, conf.level, (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_9__.sanitize)(conf.context));
            return customLoggers[name];
        }),
        getLogger: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(function (name) { return customLoggers[name]; }),
        getInitConfiguration: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(function () { return getInitConfigurationStrategy(); }),
        getInternalContext: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(function (startTime) { return getInternalContextStrategy(startTime); }),
        setUser: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(function (newUser) {
            if ((0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_10__.checkUser)(newUser)) {
                userContextManager.setContext((0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_10__.sanitizeUser)(newUser));
            }
        }),
        getUser: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(userContextManager.getContext),
        setUserProperty: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(function (key, property) {
            var _a;
            var sanitizedProperty = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_10__.sanitizeUser)((_a = {}, _a[key] = property, _a))[key];
            userContextManager.setContextProperty(key, sanitizedProperty);
        }),
        removeUserProperty: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(userContextManager.removeContextProperty),
        clearUser: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.monitor)(userContextManager.clearContext),
    });
    function overrideInitConfigurationForBridge(initConfiguration) {
        return (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_11__.assign)({}, initConfiguration, { clientToken: 'empty' });
    }
    function canInitLogs(initConfiguration) {
        if (isAlreadyInitialized) {
            if (!initConfiguration.silentMultipleInit) {
                _datadog_browser_core__WEBPACK_IMPORTED_MODULE_12__.display.error('DD_LOGS is already initialized.');
            }
            return false;
        }
        return true;
    }
}
//# sourceMappingURL=logsPublicApi.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/boot/startLogs.js":
/*!**********************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/boot/startLogs.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   startLogs: () => (/* binding */ startLogs)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/sendToExtension.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.types.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/telemetry/telemetry.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/browser/pageExitObservable.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/transport/eventBridge.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/synthetics/syntheticsWorkerValues.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/transport/startBatchWithReplica.js");
/* harmony import */ var _domain_logsSessionManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../domain/logsSessionManager */ "../../node_modules/@datadog/browser-logs/esm/domain/logsSessionManager.js");
/* harmony import */ var _domain_configuration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../domain/configuration */ "../../node_modules/@datadog/browser-logs/esm/domain/configuration.js");
/* harmony import */ var _domain_assembly__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../domain/assembly */ "../../node_modules/@datadog/browser-logs/esm/domain/assembly.js");
/* harmony import */ var _domain_logsCollection_console_consoleCollection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../domain/logsCollection/console/consoleCollection */ "../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/console/consoleCollection.js");
/* harmony import */ var _domain_logsCollection_report_reportCollection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../domain/logsCollection/report/reportCollection */ "../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/report/reportCollection.js");
/* harmony import */ var _domain_logsCollection_networkError_networkErrorCollection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../domain/logsCollection/networkError/networkErrorCollection */ "../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/networkError/networkErrorCollection.js");
/* harmony import */ var _domain_logsCollection_runtimeError_runtimeErrorCollection__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../domain/logsCollection/runtimeError/runtimeErrorCollection */ "../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/runtimeError/runtimeErrorCollection.js");
/* harmony import */ var _domain_lifeCycle__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../domain/lifeCycle */ "../../node_modules/@datadog/browser-logs/esm/domain/lifeCycle.js");
/* harmony import */ var _domain_logsCollection_logger_loggerCollection__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../domain/logsCollection/logger/loggerCollection */ "../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/logger/loggerCollection.js");
/* harmony import */ var _transport_startLogsBatch__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../transport/startLogsBatch */ "../../node_modules/@datadog/browser-logs/esm/transport/startLogsBatch.js");
/* harmony import */ var _transport_startLogsBridge__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../transport/startLogsBridge */ "../../node_modules/@datadog/browser-logs/esm/transport/startLogsBridge.js");
/* harmony import */ var _domain_logger__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../domain/logger */ "../../node_modules/@datadog/browser-logs/esm/domain/logger.js");
/* harmony import */ var _domain_internalContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../domain/internalContext */ "../../node_modules/@datadog/browser-logs/esm/domain/internalContext.js");














function startLogs(initConfiguration, configuration, buildCommonContext, mainLogger) {
    var lifeCycle = new _domain_lifeCycle__WEBPACK_IMPORTED_MODULE_7__.LifeCycle();
    lifeCycle.subscribe(1 /* LifeCycleEventType.LOG_COLLECTED */, function (log) { return (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_13__.sendToExtension)('logs', log); });
    var reportError = function (error) {
        lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {
            rawLogsEvent: {
                message: error.message,
                date: error.startClocks.timeStamp,
                error: {
                    origin: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_14__.ErrorSource.AGENT, // Todo: Remove in the next major release
                },
                origin: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_14__.ErrorSource.AGENT,
                status: _domain_logger__WEBPACK_IMPORTED_MODULE_11__.StatusType.error,
            },
        });
        (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_15__.addTelemetryDebug)('Error reported to customer', { 'error.message': error.message });
    };
    var pageExitObservable = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_16__.createPageExitObservable)(configuration);
    var session = configuration.sessionStoreStrategyType && !(0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_17__.canUseEventBridge)() && !(0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_18__.willSyntheticsInjectRum)()
        ? (0,_domain_logsSessionManager__WEBPACK_IMPORTED_MODULE_0__.startLogsSessionManager)(configuration)
        : (0,_domain_logsSessionManager__WEBPACK_IMPORTED_MODULE_0__.startLogsSessionManagerStub)(configuration);
    var telemetry = startLogsTelemetry(configuration, reportError, pageExitObservable, session.expireObservable);
    telemetry.setContextProvider(function () {
        var _a, _b, _c, _d, _e, _f;
        return ({
            application: {
                id: (_a = (0,_domain_assembly__WEBPACK_IMPORTED_MODULE_2__.getRUMInternalContext)()) === null || _a === void 0 ? void 0 : _a.application_id,
            },
            session: {
                id: (_b = session.findTrackedSession()) === null || _b === void 0 ? void 0 : _b.id,
            },
            view: {
                id: (_d = (_c = (0,_domain_assembly__WEBPACK_IMPORTED_MODULE_2__.getRUMInternalContext)()) === null || _c === void 0 ? void 0 : _c.view) === null || _d === void 0 ? void 0 : _d.id,
            },
            action: {
                id: (_f = (_e = (0,_domain_assembly__WEBPACK_IMPORTED_MODULE_2__.getRUMInternalContext)()) === null || _e === void 0 ? void 0 : _e.user_action) === null || _f === void 0 ? void 0 : _f.id,
            },
        });
    });
    (0,_domain_logsCollection_networkError_networkErrorCollection__WEBPACK_IMPORTED_MODULE_5__.startNetworkErrorCollection)(configuration, lifeCycle);
    (0,_domain_logsCollection_runtimeError_runtimeErrorCollection__WEBPACK_IMPORTED_MODULE_6__.startRuntimeErrorCollection)(configuration, lifeCycle);
    (0,_domain_logsCollection_console_consoleCollection__WEBPACK_IMPORTED_MODULE_3__.startConsoleCollection)(configuration, lifeCycle);
    (0,_domain_logsCollection_report_reportCollection__WEBPACK_IMPORTED_MODULE_4__.startReportCollection)(configuration, lifeCycle);
    var handleLog = (0,_domain_logsCollection_logger_loggerCollection__WEBPACK_IMPORTED_MODULE_8__.startLoggerCollection)(lifeCycle).handleLog;
    (0,_domain_assembly__WEBPACK_IMPORTED_MODULE_2__.startLogsAssembly)(session, configuration, lifeCycle, buildCommonContext, mainLogger, reportError);
    if (!(0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_17__.canUseEventBridge)()) {
        (0,_transport_startLogsBatch__WEBPACK_IMPORTED_MODULE_9__.startLogsBatch)(configuration, lifeCycle, reportError, pageExitObservable, session.expireObservable);
    }
    else {
        (0,_transport_startLogsBridge__WEBPACK_IMPORTED_MODULE_10__.startLogsBridge)(lifeCycle);
    }
    (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_15__.addTelemetryConfiguration)((0,_domain_configuration__WEBPACK_IMPORTED_MODULE_1__.serializeLogsConfiguration)(initConfiguration));
    var internalContext = (0,_domain_internalContext__WEBPACK_IMPORTED_MODULE_12__.startInternalContext)(session);
    return {
        handleLog: handleLog,
        getInternalContext: internalContext.get,
    };
}
function startLogsTelemetry(configuration, reportError, pageExitObservable, sessionExpireObservable) {
    var telemetry = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_15__.startTelemetry)("browser-logs-sdk" /* TelemetryService.LOGS */, configuration);
    if ((0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_17__.canUseEventBridge)()) {
        var bridge_1 = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_17__.getEventBridge)();
        telemetry.observable.subscribe(function (event) { return bridge_1.send('internal_telemetry', event); });
    }
    else {
        var telemetryBatch_1 = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_19__.startBatchWithReplica)(configuration, {
            endpoint: configuration.rumEndpointBuilder,
        }, configuration.replica && {
            endpoint: configuration.replica.rumEndpointBuilder,
        }, reportError, pageExitObservable, sessionExpireObservable);
        telemetry.observable.subscribe(function (event) { return telemetryBatch_1.add(event, (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_15__.isTelemetryReplicationAllowed)(configuration)); });
    }
    return telemetry;
}
//# sourceMappingURL=startLogs.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/domain/assembly.js":
/*!***********************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/domain/assembly.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   getRUMInternalContext: () => (/* binding */ getRUMInternalContext),
/* harmony export */   resetRUMInternalContext: () => (/* binding */ resetRUMInternalContext),
/* harmony export */   startLogsAssembly: () => (/* binding */ startLogsAssembly)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/eventRateLimiter/createEventRateLimiter.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/mergeInto.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/objectUtils.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.types.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/synthetics/syntheticsWorkerValues.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/telemetry/telemetry.js");
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./logger */ "../../node_modules/@datadog/browser-logs/esm/domain/logger.js");
/* harmony import */ var _logsCollection_logger_loggerCollection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logsCollection/logger/loggerCollection */ "../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/logger/loggerCollection.js");



function startLogsAssembly(sessionManager, configuration, lifeCycle, buildCommonContext, mainLogger, // Todo: [RUMF-1230] Remove this parameter in the next major release
reportError) {
    var statusWithCustom = _logger__WEBPACK_IMPORTED_MODULE_0__.STATUSES.concat(['custom']);
    var logRateLimiters = {};
    statusWithCustom.forEach(function (status) {
        logRateLimiters[status] = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.createEventRateLimiter)(status, configuration.eventRateLimiterThreshold, reportError);
    });
    lifeCycle.subscribe(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, function (_a) {
        var _b, _c, _d;
        var rawLogsEvent = _a.rawLogsEvent, _e = _a.messageContext, messageContext = _e === void 0 ? undefined : _e, _f = _a.savedCommonContext, savedCommonContext = _f === void 0 ? undefined : _f, _g = _a.logger, logger = _g === void 0 ? mainLogger : _g;
        var startTime = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__.getRelativeTime)(rawLogsEvent.date);
        var session = sessionManager.findTrackedSession(startTime);
        if (!session) {
            return;
        }
        var commonContext = savedCommonContext || buildCommonContext();
        var log = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__.combine)({
            service: configuration.service,
            session_id: session.id,
            // Insert user first to allow overrides from global context
            usr: !(0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_5__.isEmptyObject)(commonContext.user) ? commonContext.user : undefined,
            view: commonContext.view,
        }, commonContext.context, getRUMInternalContext(startTime), rawLogsEvent, logger.getContext(), messageContext);
        if (
        // Todo: [RUMF-1230] Move this check to the logger collection in the next major release
        !(0,_logsCollection_logger_loggerCollection__WEBPACK_IMPORTED_MODULE_1__.isAuthorized)(rawLogsEvent.status, _logger__WEBPACK_IMPORTED_MODULE_0__.HandlerType.http, logger) ||
            ((_b = configuration.beforeSend) === null || _b === void 0 ? void 0 : _b.call(configuration, log)) === false ||
            (((_c = log.error) === null || _c === void 0 ? void 0 : _c.origin) !== _datadog_browser_core__WEBPACK_IMPORTED_MODULE_6__.ErrorSource.AGENT &&
                ((_d = logRateLimiters[log.status]) !== null && _d !== void 0 ? _d : logRateLimiters['custom']).isLimitReached())) {
            return;
        }
        lifeCycle.notify(1 /* LifeCycleEventType.LOG_COLLECTED */, log);
    });
}
var logsSentBeforeRumInjectionTelemetryAdded = false;
function getRUMInternalContext(startTime) {
    var browserWindow = window;
    if ((0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.willSyntheticsInjectRum)()) {
        var context = getInternalContextFromRumGlobal(browserWindow.DD_RUM_SYNTHETICS);
        if (!context && !logsSentBeforeRumInjectionTelemetryAdded) {
            logsSentBeforeRumInjectionTelemetryAdded = true;
            (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_8__.addTelemetryDebug)('Logs sent before RUM is injected by the synthetics worker', {
                testId: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.getSyntheticsTestId)(),
                resultId: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.getSyntheticsResultId)(),
            });
        }
        return context;
    }
    return getInternalContextFromRumGlobal(browserWindow.DD_RUM);
    function getInternalContextFromRumGlobal(rumGlobal) {
        if (rumGlobal && rumGlobal.getInternalContext) {
            return rumGlobal.getInternalContext(startTime);
        }
    }
}
function resetRUMInternalContext() {
    logsSentBeforeRumInjectionTelemetryAdded = false;
}
//# sourceMappingURL=assembly.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/domain/configuration.js":
/*!****************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/domain/configuration.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   DEFAULT_REQUEST_ERROR_RESPONSE_LENGTH_LIMIT: () => (/* binding */ DEFAULT_REQUEST_ERROR_RESPONSE_LENGTH_LIMIT),
/* harmony export */   serializeLogsConfiguration: () => (/* binding */ serializeLogsConfiguration),
/* harmony export */   validateAndBuildForwardOption: () => (/* binding */ validateAndBuildForwardOption),
/* harmony export */   validateAndBuildLogsConfiguration: () => (/* binding */ validateAndBuildLogsConfiguration)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/byteUtils.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/configuration/configuration.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/report/reportObservable.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/arrayUtils.js");

/**
 * arbitrary value, byte precision not needed
 */
var DEFAULT_REQUEST_ERROR_RESPONSE_LENGTH_LIMIT = 32 * _datadog_browser_core__WEBPACK_IMPORTED_MODULE_0__.ONE_KIBI_BYTE;
function validateAndBuildLogsConfiguration(initConfiguration) {
    var baseConfiguration = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.validateAndBuildConfiguration)(initConfiguration);
    var forwardConsoleLogs = validateAndBuildForwardOption(initConfiguration.forwardConsoleLogs, (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.objectValues)(_datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__.ConsoleApiName), 'Forward Console Logs');
    var forwardReports = validateAndBuildForwardOption(initConfiguration.forwardReports, (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.objectValues)(_datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__.RawReportType), 'Forward Reports');
    if (!baseConfiguration || !forwardConsoleLogs || !forwardReports) {
        return;
    }
    if (initConfiguration.forwardErrorsToLogs && !(0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.includes)(forwardConsoleLogs, _datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__.ConsoleApiName.error)) {
        forwardConsoleLogs.push(_datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__.ConsoleApiName.error);
    }
    return (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.assign)({
        forwardErrorsToLogs: initConfiguration.forwardErrorsToLogs !== false,
        forwardConsoleLogs: forwardConsoleLogs,
        forwardReports: forwardReports,
        requestErrorResponseLengthLimit: DEFAULT_REQUEST_ERROR_RESPONSE_LENGTH_LIMIT,
    }, baseConfiguration);
}
function validateAndBuildForwardOption(option, allowedValues, label) {
    if (option === undefined) {
        return [];
    }
    if (!(option === 'all' || (Array.isArray(option) && option.every(function (api) { return (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.includes)(allowedValues, api); })))) {
        _datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__.display.error("".concat(label, " should be \"all\" or an array with allowed values \"").concat(allowedValues.join('", "'), "\""));
        return;
    }
    return option === 'all' ? allowedValues : (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_5__.removeDuplicates)(option);
}
function serializeLogsConfiguration(configuration) {
    var baseSerializedInitConfiguration = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.serializeConfiguration)(configuration);
    return (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.assign)({
        forward_errors_to_logs: configuration.forwardErrorsToLogs,
        forward_console_logs: configuration.forwardConsoleLogs,
        forward_reports: configuration.forwardReports,
    }, baseSerializedInitConfiguration);
}
//# sourceMappingURL=configuration.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/domain/internalContext.js":
/*!******************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/domain/internalContext.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   startInternalContext: () => (/* binding */ startInternalContext)
/* harmony export */ });
function startInternalContext(sessionManager) {
    return {
        get: function (startTime) {
            var trackedSession = sessionManager.findTrackedSession(startTime);
            if (trackedSession) {
                return {
                    session_id: trackedSession.id,
                };
            }
        },
    };
}
//# sourceMappingURL=internalContext.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/domain/lifeCycle.js":
/*!************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/domain/lifeCycle.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   LifeCycle: () => (/* binding */ LifeCycle)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/abstractLifeCycle.js");

var LifeCycle = (_datadog_browser_core__WEBPACK_IMPORTED_MODULE_0__.AbstractLifeCycle);
//# sourceMappingURL=lifeCycle.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/domain/logger.js":
/*!*********************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/domain/logger.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   HandlerType: () => (/* binding */ HandlerType),
/* harmony export */   Logger: () => (/* binding */ Logger),
/* harmony export */   STATUSES: () => (/* binding */ STATUSES),
/* harmony export */   StatusType: () => (/* binding */ StatusType)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/contextManager.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.types.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/tracekit/computeStackTrace.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/serialisation/sanitize.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/mergeInto.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};

var StatusType = {
    debug: 'debug',
    error: 'error',
    info: 'info',
    warn: 'warn',
};
var HandlerType = {
    console: 'console',
    http: 'http',
    silent: 'silent',
};
var STATUSES = Object.keys(StatusType);
var Logger = /** @class */ (function () {
    function Logger(handleLogStrategy, name, handlerType, level, loggerContext) {
        if (handlerType === void 0) { handlerType = HandlerType.http; }
        if (level === void 0) { level = StatusType.debug; }
        if (loggerContext === void 0) { loggerContext = {}; }
        this.handleLogStrategy = handleLogStrategy;
        this.handlerType = handlerType;
        this.level = level;
        this.contextManager = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_0__.createContextManager)("logger context" /* CustomerDataType.LoggerContext */);
        this.contextManager.set((0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.assign)({}, loggerContext, name ? { logger: { name: name } } : undefined));
    }
    Logger.prototype.log = function (message, messageContext, status, error) {
        if (status === void 0) { status = StatusType.info; }
        var errorContext;
        if (status === StatusType.error) {
            // Always add origin if status is error (backward compatibility - Remove in next major)
            errorContext = { origin: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.ErrorSource.LOGGER };
        }
        if (error !== undefined && error !== null) {
            var stackTrace = error instanceof Error ? (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__.computeStackTrace)(error) : undefined;
            var rawError = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__.computeRawError)({
                stackTrace: stackTrace,
                originalError: error,
                nonErrorPrefix: "Provided" /* NonErrorPrefix.PROVIDED */,
                source: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.ErrorSource.LOGGER,
                handling: "handled" /* ErrorHandling.HANDLED */,
                startClocks: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_5__.clocksNow)(),
            });
            errorContext = {
                origin: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.ErrorSource.LOGGER,
                stack: rawError.stack,
                kind: rawError.type,
                message: rawError.message,
            };
        }
        var sanitizedMessageContext = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_6__.sanitize)(messageContext);
        var context = errorContext
            ? (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.combine)({ error: errorContext }, sanitizedMessageContext)
            : sanitizedMessageContext;
        this.handleLogStrategy({
            message: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_6__.sanitize)(message),
            context: context,
            status: status,
        }, this);
    };
    Logger.prototype.debug = function (message, messageContext, error) {
        this.log(message, messageContext, StatusType.debug, error);
    };
    Logger.prototype.info = function (message, messageContext, error) {
        this.log(message, messageContext, StatusType.info, error);
    };
    Logger.prototype.warn = function (message, messageContext, error) {
        this.log(message, messageContext, StatusType.warn, error);
    };
    Logger.prototype.error = function (message, messageContext, error) {
        this.log(message, messageContext, StatusType.error, error);
    };
    Logger.prototype.setContext = function (context) {
        this.contextManager.set(context);
    };
    Logger.prototype.getContext = function () {
        return this.contextManager.get();
    };
    Logger.prototype.addContext = function (key, value) {
        this.contextManager.add(key, value);
    };
    Logger.prototype.removeContext = function (key) {
        this.contextManager.remove(key);
    };
    Logger.prototype.setHandler = function (handler) {
        this.handlerType = handler;
    };
    Logger.prototype.getHandler = function () {
        return this.handlerType;
    };
    Logger.prototype.setLevel = function (level) {
        this.level = level;
    };
    Logger.prototype.getLevel = function () {
        return this.level;
    };
    __decorate([
        _datadog_browser_core__WEBPACK_IMPORTED_MODULE_8__.monitored
    ], Logger.prototype, "log", null);
    return Logger;
}());
//# sourceMappingURL=logger.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/console/consoleCollection.js":
/*!*******************************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/console/consoleCollection.js ***!
  \*******************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   startConsoleCollection: () => (/* binding */ startConsoleCollection)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/console/consoleObservable.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.types.js");
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "../../node_modules/@datadog/browser-logs/esm/domain/logger.js");
var _a;


var LogStatusForApi = (_a = {},
    _a[_datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.ConsoleApiName.log] = _logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.info,
    _a[_datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.ConsoleApiName.debug] = _logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.debug,
    _a[_datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.ConsoleApiName.info] = _logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.info,
    _a[_datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.ConsoleApiName.warn] = _logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.warn,
    _a[_datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.ConsoleApiName.error] = _logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.error,
    _a);
function startConsoleCollection(configuration, lifeCycle) {
    var consoleSubscription = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.initConsoleObservable)(configuration.forwardConsoleLogs).subscribe(function (log) {
        lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {
            rawLogsEvent: {
                date: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__.timeStampNow)(),
                message: log.message,
                origin: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__.ErrorSource.CONSOLE,
                error: log.api === _datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.ConsoleApiName.error
                    ? {
                        origin: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__.ErrorSource.CONSOLE,
                        stack: log.stack,
                        fingerprint: log.fingerprint,
                    }
                    : undefined,
                status: LogStatusForApi[log.api],
            },
        });
    });
    return {
        stop: function () {
            consoleSubscription.unsubscribe();
        },
    };
}
//# sourceMappingURL=consoleCollection.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/logger/loggerCollection.js":
/*!*****************************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/logger/loggerCollection.js ***!
  \*****************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   STATUS_PRIORITIES: () => (/* binding */ STATUS_PRIORITIES),
/* harmony export */   isAuthorized: () => (/* binding */ isAuthorized),
/* harmony export */   startLoggerCollection: () => (/* binding */ startLoggerCollection)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/display.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/mergeInto.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.types.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js");
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "../../node_modules/@datadog/browser-logs/esm/domain/logger.js");
var _a;


var STATUS_PRIORITIES = (_a = {},
    _a[_logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.debug] = 0,
    _a[_logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.info] = 1,
    _a[_logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.warn] = 2,
    _a[_logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.error] = 3,
    _a);
function startLoggerCollection(lifeCycle) {
    function handleLog(logsMessage, logger, savedCommonContext, savedDate) {
        var messageContext = logsMessage.context;
        if (isAuthorized(logsMessage.status, _logger__WEBPACK_IMPORTED_MODULE_0__.HandlerType.console, logger)) {
            (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.display)(logsMessage.status, logsMessage.message, (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.combine)(logger.getContext(), messageContext));
        }
        lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {
            rawLogsEvent: {
                date: savedDate || (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__.timeStampNow)(),
                message: logsMessage.message,
                status: logsMessage.status,
                origin: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__.ErrorSource.LOGGER,
            },
            messageContext: messageContext,
            savedCommonContext: savedCommonContext,
            logger: logger,
        });
    }
    return {
        handleLog: handleLog,
    };
}
function isAuthorized(status, handlerType, logger) {
    var loggerHandler = logger.getHandler();
    var sanitizedHandlerType = Array.isArray(loggerHandler) ? loggerHandler : [loggerHandler];
    return (STATUS_PRIORITIES[status] >= STATUS_PRIORITIES[logger.getLevel()] && (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_5__.includes)(sanitizedHandlerType, handlerType));
}
//# sourceMappingURL=loggerCollection.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/networkError/networkErrorCollection.js":
/*!*****************************************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/networkError/networkErrorCollection.js ***!
  \*****************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   computeFetchErrorText: () => (/* binding */ computeFetchErrorText),
/* harmony export */   computeFetchResponseText: () => (/* binding */ computeFetchResponseText),
/* harmony export */   computeXhrResponseData: () => (/* binding */ computeXhrResponseData),
/* harmony export */   startNetworkErrorCollection: () => (/* binding */ startNetworkErrorCollection)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/browser/xhrObservable.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/browser/fetchObservable.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/responseUtils.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.types.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/tracekit/computeStackTrace.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/monitor.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/readBytesFromStream.js");
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "../../node_modules/@datadog/browser-logs/esm/domain/logger.js");


function startNetworkErrorCollection(configuration, lifeCycle) {
    if (!configuration.forwardErrorsToLogs) {
        return { stop: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.noop };
    }
    var xhrSubscription = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.initXhrObservable)(configuration).subscribe(function (context) {
        if (context.state === 'complete') {
            handleResponse("xhr" /* RequestType.XHR */, context);
        }
    });
    var fetchSubscription = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__.initFetchObservable)().subscribe(function (context) {
        if (context.state === 'resolve') {
            handleResponse("fetch" /* RequestType.FETCH */, context);
        }
    });
    function handleResponse(type, request) {
        if (!configuration.isIntakeUrl(request.url) && (isRejected(request) || (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__.isServerError)(request.status))) {
            if ('xhr' in request) {
                computeXhrResponseData(request.xhr, configuration, onResponseDataAvailable);
            }
            else if (request.response) {
                computeFetchResponseText(request.response, configuration, onResponseDataAvailable);
            }
            else if (request.error) {
                computeFetchErrorText(request.error, configuration, onResponseDataAvailable);
            }
        }
        function onResponseDataAvailable(responseData) {
            lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {
                rawLogsEvent: {
                    message: "".concat(format(type), " error ").concat(request.method, " ").concat(request.url),
                    date: request.startClocks.timeStamp,
                    error: {
                        origin: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_5__.ErrorSource.NETWORK,
                        stack: responseData || 'Failed to load',
                    },
                    http: {
                        method: request.method,
                        status_code: request.status,
                        url: request.url,
                    },
                    status: _logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.error,
                    origin: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_5__.ErrorSource.NETWORK,
                },
            });
        }
    }
    return {
        stop: function () {
            xhrSubscription.unsubscribe();
            fetchSubscription.unsubscribe();
        },
    };
}
// TODO: ideally, computeXhrResponseData should always call the callback with a string instead of
// `unknown`. But to keep backward compatibility, in the case of XHR with a `responseType` different
// than "text", the response data should be whatever `xhr.response` is. This is a bit confusing as
// Logs event 'stack' is expected to be a string. This should be changed in a future major version
// as it could be a breaking change.
function computeXhrResponseData(xhr, configuration, callback) {
    if (typeof xhr.response === 'string') {
        callback(truncateResponseText(xhr.response, configuration));
    }
    else {
        callback(xhr.response);
    }
}
function computeFetchErrorText(error, configuration, callback) {
    callback(truncateResponseText((0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_6__.toStackTraceString)((0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_7__.computeStackTrace)(error)), configuration));
}
function computeFetchResponseText(response, configuration, callback) {
    var clonedResponse = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__.tryToClone)(response);
    if (!clonedResponse || !clonedResponse.body) {
        // if the clone failed or if the body is null, let's not try to read it.
        callback();
    }
    else if (!window.TextDecoder) {
        // If the browser doesn't support TextDecoder, let's read the whole response then truncate it.
        //
        // This should only be the case on early versions of Edge (before they migrated to Chromium).
        // Even if it could be possible to implement a workaround for the missing TextDecoder API (using
        // a Blob and FileReader), we found another issue preventing us from reading only the first
        // bytes from the response: contrary to other browsers, when reading from the cloned response,
        // if the original response gets canceled, the cloned response is also canceled and we can't
        // know about it.  In the following illustration, the promise returned by `reader.read()` may
        // never be fulfilled:
        //
        // fetch('/').then((response) => {
        //   const reader = response.clone().body.getReader()
        //   readMore()
        //   function readMore() {
        //     reader.read().then(
        //       (result) => {
        //         if (result.done) {
        //           console.log('done')
        //         } else {
        //           readMore()
        //         }
        //       },
        //       () => console.log('error')
        //     )
        //   }
        //   response.body.getReader().cancel()
        // })
        clonedResponse.text().then((0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_8__.monitor)(function (text) { return callback(truncateResponseText(text, configuration)); }), (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_8__.monitor)(function (error) { return callback("Unable to retrieve response: ".concat(error)); }));
    }
    else {
        truncateResponseStream(clonedResponse.body, configuration.requestErrorResponseLengthLimit, function (error, responseText) {
            if (error) {
                callback("Unable to retrieve response: ".concat(error));
            }
            else {
                callback(responseText);
            }
        });
    }
}
function isRejected(request) {
    return request.status === 0 && request.responseType !== 'opaque';
}
function truncateResponseText(responseText, configuration) {
    if (responseText.length > configuration.requestErrorResponseLengthLimit) {
        return "".concat(responseText.substring(0, configuration.requestErrorResponseLengthLimit), "...");
    }
    return responseText;
}
function format(type) {
    if ("xhr" /* RequestType.XHR */ === type) {
        return 'XHR';
    }
    return 'Fetch';
}
function truncateResponseStream(stream, bytesLimit, callback) {
    (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_9__.readBytesFromStream)(stream, function (error, bytes, limitExceeded) {
        if (error) {
            callback(error);
        }
        else {
            var responseText = new TextDecoder().decode(bytes);
            if (limitExceeded) {
                responseText += '...';
            }
            callback(undefined, responseText);
        }
    }, {
        bytesLimit: bytesLimit,
        collectStreamBody: true,
    });
}
//# sourceMappingURL=networkErrorCollection.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/report/reportCollection.js":
/*!*****************************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/report/reportCollection.js ***!
  \*****************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   startReportCollection: () => (/* binding */ startReportCollection)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/report/reportObservable.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.types.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js");
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "../../node_modules/@datadog/browser-logs/esm/domain/logger.js");
var _a;


var LogStatusForReport = (_a = {},
    _a[_datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.RawReportType.cspViolation] = _logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.error,
    _a[_datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.RawReportType.intervention] = _logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.error,
    _a[_datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.RawReportType.deprecation] = _logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.warn,
    _a);
function startReportCollection(configuration, lifeCycle) {
    var reportSubscription = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.initReportObservable)(configuration, configuration.forwardReports).subscribe(function (report) {
        var message = report.message;
        var status = LogStatusForReport[report.type];
        var error;
        if (status === _logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.error) {
            error = {
                kind: report.subtype,
                origin: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.ErrorSource.REPORT,
                stack: report.stack,
            };
        }
        else if (report.stack) {
            message += " Found in ".concat((0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__.getFileFromStackTraceString)(report.stack));
        }
        lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {
            rawLogsEvent: {
                date: (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__.timeStampNow)(),
                message: message,
                origin: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.ErrorSource.REPORT,
                error: error,
                status: status,
            },
        });
    });
    return {
        stop: function () {
            reportSubscription.unsubscribe();
        },
    };
}
//# sourceMappingURL=reportCollection.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/runtimeError/runtimeErrorCollection.js":
/*!*****************************************************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/domain/logsCollection/runtimeError/runtimeErrorCollection.js ***!
  \*****************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   startRuntimeErrorCollection: () => (/* binding */ startRuntimeErrorCollection)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/observable.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/error/trackRuntimeError.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/error/error.types.js");
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "../../node_modules/@datadog/browser-logs/esm/domain/logger.js");


function startRuntimeErrorCollection(configuration, lifeCycle) {
    if (!configuration.forwardErrorsToLogs) {
        return { stop: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.noop };
    }
    var rawErrorObservable = new _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.Observable();
    var stopRuntimeErrorTracking = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__.trackRuntimeError)(rawErrorObservable).stop;
    var rawErrorSubscription = rawErrorObservable.subscribe(function (rawError) {
        lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {
            rawLogsEvent: {
                message: rawError.message,
                date: rawError.startClocks.timeStamp,
                error: {
                    kind: rawError.type,
                    origin: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__.ErrorSource.SOURCE,
                    stack: rawError.stack,
                },
                origin: _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__.ErrorSource.SOURCE,
                status: _logger__WEBPACK_IMPORTED_MODULE_0__.StatusType.error,
            },
        });
    });
    return {
        stop: function () {
            stopRuntimeErrorTracking();
            rawErrorSubscription.unsubscribe();
        },
    };
}
//# sourceMappingURL=runtimeErrorCollection.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/domain/logsSessionManager.js":
/*!*********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/domain/logsSessionManager.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   LOGS_SESSION_KEY: () => (/* binding */ LOGS_SESSION_KEY),
/* harmony export */   startLogsSessionManager: () => (/* binding */ startLogsSessionManager),
/* harmony export */   startLogsSessionManagerStub: () => (/* binding */ startLogsSessionManagerStub)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/domain/session/sessionManager.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/observable.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/utils/numberUtils.js");

var LOGS_SESSION_KEY = 'logs';
function startLogsSessionManager(configuration) {
    var sessionManager = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_0__.startSessionManager)(configuration, LOGS_SESSION_KEY, function (rawTrackingType) {
        return computeSessionState(configuration, rawTrackingType);
    });
    return {
        findTrackedSession: function (startTime) {
            var session = sessionManager.findActiveSession(startTime);
            return session && session.trackingType === "1" /* LoggerTrackingType.TRACKED */
                ? {
                    id: session.id,
                }
                : undefined;
        },
        expireObservable: sessionManager.expireObservable,
    };
}
function startLogsSessionManagerStub(configuration) {
    var isTracked = computeTrackingType(configuration) === "1" /* LoggerTrackingType.TRACKED */;
    var session = isTracked ? {} : undefined;
    return {
        findTrackedSession: function () { return session; },
        expireObservable: new _datadog_browser_core__WEBPACK_IMPORTED_MODULE_1__.Observable(),
    };
}
function computeTrackingType(configuration) {
    if (!(0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_2__.performDraw)(configuration.sessionSampleRate)) {
        return "0" /* LoggerTrackingType.NOT_TRACKED */;
    }
    return "1" /* LoggerTrackingType.TRACKED */;
}
function computeSessionState(configuration, rawSessionType) {
    var trackingType = hasValidLoggerSession(rawSessionType) ? rawSessionType : computeTrackingType(configuration);
    return {
        trackingType: trackingType,
        isTracked: trackingType === "1" /* LoggerTrackingType.TRACKED */,
    };
}
function hasValidLoggerSession(trackingType) {
    return trackingType === "0" /* LoggerTrackingType.NOT_TRACKED */ || trackingType === "1" /* LoggerTrackingType.TRACKED */;
}
//# sourceMappingURL=logsSessionManager.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/entries/main.js":
/*!********************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/entries/main.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   HandlerType: () => (/* reexport safe */ _domain_logger__WEBPACK_IMPORTED_MODULE_2__.HandlerType),
/* harmony export */   Logger: () => (/* reexport safe */ _domain_logger__WEBPACK_IMPORTED_MODULE_2__.Logger),
/* harmony export */   StatusType: () => (/* reexport safe */ _domain_logger__WEBPACK_IMPORTED_MODULE_2__.StatusType),
/* harmony export */   datadogLogs: () => (/* binding */ datadogLogs)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/boot/init.js");
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/tools/getGlobalObject.js");
/* harmony import */ var _boot_logsPublicApi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../boot/logsPublicApi */ "../../node_modules/@datadog/browser-logs/esm/boot/logsPublicApi.js");
/* harmony import */ var _boot_startLogs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../boot/startLogs */ "../../node_modules/@datadog/browser-logs/esm/boot/startLogs.js");
/* harmony import */ var _domain_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../domain/logger */ "../../node_modules/@datadog/browser-logs/esm/domain/logger.js");




var datadogLogs = (0,_boot_logsPublicApi__WEBPACK_IMPORTED_MODULE_0__.makeLogsPublicApi)(_boot_startLogs__WEBPACK_IMPORTED_MODULE_1__.startLogs);
(0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_3__.defineGlobal)((0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_4__.getGlobalObject)(), 'DD_LOGS', datadogLogs);
//# sourceMappingURL=main.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/transport/startLogsBatch.js":
/*!********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/transport/startLogsBatch.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   startLogsBatch: () => (/* binding */ startLogsBatch)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/transport/startBatchWithReplica.js");

function startLogsBatch(configuration, lifeCycle, reportError, pageExitObservable, sessionExpireObservable) {
    var batch = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_0__.startBatchWithReplica)(configuration, {
        endpoint: configuration.logsEndpointBuilder,
    }, configuration.replica && {
        endpoint: configuration.replica.logsEndpointBuilder,
    }, reportError, pageExitObservable, sessionExpireObservable);
    lifeCycle.subscribe(1 /* LifeCycleEventType.LOG_COLLECTED */, function (serverLogsEvent) {
        batch.add(serverLogsEvent);
    });
}
//# sourceMappingURL=startLogsBatch.js.map

/***/ }),

/***/ "../../node_modules/@datadog/browser-logs/esm/transport/startLogsBridge.js":
/*!*********************************************************************************!*\
  !*** ../../node_modules/@datadog/browser-logs/esm/transport/startLogsBridge.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   startLogsBridge: () => (/* binding */ startLogsBridge)
/* harmony export */ });
/* harmony import */ var _datadog_browser_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @datadog/browser-core */ "../../node_modules/@datadog/browser-core/esm/transport/eventBridge.js");

function startLogsBridge(lifeCycle) {
    var bridge = (0,_datadog_browser_core__WEBPACK_IMPORTED_MODULE_0__.getEventBridge)();
    lifeCycle.subscribe(1 /* LifeCycleEventType.LOG_COLLECTED */, function (serverLogsEvent) {
        bridge.send('log', serverLogsEvent);
    });
}
//# sourceMappingURL=startLogsBridge.js.map

/***/ }),

/***/ "../../node_modules/launchdarkly-js-client-sdk/dist/ldclient.es.js":
/*!*************************************************************************!*\
  !*** ../../node_modules/launchdarkly-js-client-sdk/dist/ldclient.es.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   basicLogger: () => (/* binding */ Nt),
/* harmony export */   createConsoleLogger: () => (/* binding */ $t),
/* harmony export */   "default": () => (/* binding */ Ht),
/* harmony export */   initialize: () => (/* binding */ Ft),
/* harmony export */   version: () => (/* binding */ Vt)
/* harmony export */ });
function e(e){function t(e,t){Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.message=e,this.code=t}return t.prototype=new Error,t.prototype.name=e,t.prototype.constructor=t,t}const t=e("LaunchDarklyUnexpectedResponseError"),n=e("LaunchDarklyInvalidEnvironmentIdError"),r=e("LaunchDarklyInvalidUserError"),o=e("LaunchDarklyInvalidEventKeyError"),i=e("LaunchDarklyInvalidArgumentError"),a=e("LaunchDarklyFlagFetchError");for(var s={LDUnexpectedResponseError:t,LDInvalidEnvironmentIdError:n,LDInvalidUserError:r,LDInvalidEventKeyError:o,LDInvalidArgumentError:i,LDInvalidDataError:e("LaunchDarklyInvalidDataError"),LDFlagFetchError:a,isHttpErrorRecoverable:function(e){return!(e>=400&&e<500)||(400===e||408===e||429===e)}},c=function(e){var t=m(e),n=t[0],r=t[1];return 3*(n+r)/4-r},u=function(e){var t,n,r=m(e),o=r[0],i=r[1],a=new g(function(e,t,n){return 3*(t+n)/4-n}(0,o,i)),s=0,c=i>0?o-4:o;for(n=0;n<c;n+=4)t=f[e.charCodeAt(n)]<<18|f[e.charCodeAt(n+1)]<<12|f[e.charCodeAt(n+2)]<<6|f[e.charCodeAt(n+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;2===i&&(t=f[e.charCodeAt(n)]<<2|f[e.charCodeAt(n+1)]>>4,a[s++]=255&t);1===i&&(t=f[e.charCodeAt(n)]<<10|f[e.charCodeAt(n+1)]<<4|f[e.charCodeAt(n+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t);return a},l=function(e){for(var t,n=e.length,r=n%3,o=[],i=16383,a=0,s=n-r;a<s;a+=i)o.push(h(e,a,a+i>s?s:a+i));1===r?(t=e[n-1],o.push(d[t>>2]+d[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(d[t>>10]+d[t>>4&63]+d[t<<2&63]+"="));return o.join("")},d=[],f=[],g="undefined"!=typeof Uint8Array?Uint8Array:Array,v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0;p<64;++p)d[p]=v[p],f[v.charCodeAt(p)]=p;function m(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function h(e,t,n){for(var r,o,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(d[(o=r)>>18&63]+d[o>>12&63]+d[o>>6&63]+d[63&o]);return i.join("")}f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63;var y={byteLength:c,toByteArray:u,fromByteArray:l},w=Array.isArray,b=Object.keys,k=Object.prototype.hasOwnProperty,E=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,o,i,a=w(t),s=w(n);if(a&&s){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(a!=s)return!1;var c=t instanceof Date,u=n instanceof Date;if(c!=u)return!1;if(c&&u)return t.getTime()==n.getTime();var l=t instanceof RegExp,d=n instanceof RegExp;if(l!=d)return!1;if(l&&d)return t.toString()==n.toString();var f=b(t);if((o=f.length)!==b(n).length)return!1;for(r=o;0!=r--;)if(!k.call(n,f[r]))return!1;for(r=o;0!=r--;)if(!e(t[i=f[r]],n[i]))return!1;return!0}return t!=t&&n!=n};const D=["key","ip","country","email","firstName","lastName","avatar","name"];function C(e){const t=unescape(encodeURIComponent(e));return y.fromByteArray(function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e.charCodeAt(n));return t}(t))}function x(e){return C(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var S,I={appendUrlPath:function(e,t){return(e.endsWith("/")?e.substring(0,e.length-1):e)+(t.startsWith("/")?"":"/")+t},base64URLEncode:x,btoa:C,chunkEventsForUrl:function(e,t){const n=t.slice(0),r=[];let o,i=e;for(;n.length>0;){for(o=[];i>0;){const e=n.shift();if(!e)break;i-=x(JSON.stringify(e)).length,i<0&&o.length>0?n.unshift(e):o.push(e)}i=e,r.push(o)}return r},clone:function(e){return JSON.parse(JSON.stringify(e))},deepEquals:function(e,t){return E(e,t)},extend:function(...e){return e.reduce(((e,t)=>({...e,...t})),{})},getLDUserAgentString:function(e){const t=e.version||"?";return e.userAgent+"/"+t},objectHasOwnProperty:P,onNextTick:function(e){setTimeout(e,0)},sanitizeContext:function(e){if(!e)return e;let t;return null!==e.kind&&void 0!==e.kind||D.forEach((n=>{const r=e[n];void 0!==r&&"string"!=typeof r&&(t=t||{...e},t[n]=String(r))})),t||e},transformValuesToVersionedValues:function(e){const t={};for(const n in e)P(e,n)&&(t[n]={value:e[n],version:0});return t},transformVersionedValuesToValues:function(e){const t={};for(const n in e)P(e,n)&&(t[n]=e[n].value);return t},wrapPromiseCallback:function(e,t){const n=e.then((e=>(t&&setTimeout((()=>{t(null,e)}),0),e)),(e=>{if(!t)return Promise.reject(e);setTimeout((()=>{t(e,null)}),0)}));return t?void 0:n}},O=new Uint8Array(16);function L(){if(!S&&!(S="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return S(O)}var U=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function T(e){return"string"==typeof e&&U.test(e)}for(var R,A,j=[],F=0;F<256;++F)j.push((F+256).toString(16).substr(1));function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(j[e[t+0]]+j[e[t+1]]+j[e[t+2]]+j[e[t+3]]+"-"+j[e[t+4]]+j[e[t+5]]+"-"+j[e[t+6]]+j[e[t+7]]+"-"+j[e[t+8]]+j[e[t+9]]+"-"+j[e[t+10]]+j[e[t+11]]+j[e[t+12]]+j[e[t+13]]+j[e[t+14]]+j[e[t+15]]).toLowerCase();if(!T(n))throw TypeError("Stringified UUID is invalid");return n}var $=0,V=0;function H(e){if(!T(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function q(e,t,n){function r(e,r,o,i){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=H(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),(a=n(a))[6]=15&a[6]|t,a[8]=63&a[8]|128,o){i=i||0;for(var s=0;s<16;++s)o[i+s]=a[s];return o}return N(a)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function M(e){return 14+(e+64>>>9<<4)+1}function K(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function _(e,t,n,r,o,i){return K((a=K(K(t,e),K(r,i)))<<(s=o)|a>>>32-s,n);var a,s}function J(e,t,n,r,o,i,a){return _(t&n|~t&r,e,t,o,i,a)}function z(e,t,n,r,o,i,a){return _(t&r|n&~r,e,t,o,i,a)}function B(e,t,n,r,o,i,a){return _(t^n^r,e,t,o,i,a)}function G(e,t,n,r,o,i,a){return _(n^(t|~r),e,t,o,i,a)}var W=q("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",o=0;o<n;o+=8){var i=e[o>>5]>>>o%32&255,a=parseInt(r.charAt(i>>>4&15)+r.charAt(15&i),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[M(t)-1]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,a=0;a<e.length;a+=16){var s=n,c=r,u=o,l=i;n=J(n,r,o,i,e[a],7,-680876936),i=J(i,n,r,o,e[a+1],12,-389564586),o=J(o,i,n,r,e[a+2],17,606105819),r=J(r,o,i,n,e[a+3],22,-1044525330),n=J(n,r,o,i,e[a+4],7,-176418897),i=J(i,n,r,o,e[a+5],12,1200080426),o=J(o,i,n,r,e[a+6],17,-1473231341),r=J(r,o,i,n,e[a+7],22,-45705983),n=J(n,r,o,i,e[a+8],7,1770035416),i=J(i,n,r,o,e[a+9],12,-1958414417),o=J(o,i,n,r,e[a+10],17,-42063),r=J(r,o,i,n,e[a+11],22,-1990404162),n=J(n,r,o,i,e[a+12],7,1804603682),i=J(i,n,r,o,e[a+13],12,-40341101),o=J(o,i,n,r,e[a+14],17,-1502002290),n=z(n,r=J(r,o,i,n,e[a+15],22,1236535329),o,i,e[a+1],5,-165796510),i=z(i,n,r,o,e[a+6],9,-1069501632),o=z(o,i,n,r,e[a+11],14,643717713),r=z(r,o,i,n,e[a],20,-373897302),n=z(n,r,o,i,e[a+5],5,-701558691),i=z(i,n,r,o,e[a+10],9,38016083),o=z(o,i,n,r,e[a+15],14,-660478335),r=z(r,o,i,n,e[a+4],20,-405537848),n=z(n,r,o,i,e[a+9],5,568446438),i=z(i,n,r,o,e[a+14],9,-1019803690),o=z(o,i,n,r,e[a+3],14,-187363961),r=z(r,o,i,n,e[a+8],20,1163531501),n=z(n,r,o,i,e[a+13],5,-1444681467),i=z(i,n,r,o,e[a+2],9,-51403784),o=z(o,i,n,r,e[a+7],14,1735328473),n=B(n,r=z(r,o,i,n,e[a+12],20,-1926607734),o,i,e[a+5],4,-378558),i=B(i,n,r,o,e[a+8],11,-2022574463),o=B(o,i,n,r,e[a+11],16,1839030562),r=B(r,o,i,n,e[a+14],23,-35309556),n=B(n,r,o,i,e[a+1],4,-1530992060),i=B(i,n,r,o,e[a+4],11,1272893353),o=B(o,i,n,r,e[a+7],16,-155497632),r=B(r,o,i,n,e[a+10],23,-1094730640),n=B(n,r,o,i,e[a+13],4,681279174),i=B(i,n,r,o,e[a],11,-358537222),o=B(o,i,n,r,e[a+3],16,-722521979),r=B(r,o,i,n,e[a+6],23,76029189),n=B(n,r,o,i,e[a+9],4,-640364487),i=B(i,n,r,o,e[a+12],11,-421815835),o=B(o,i,n,r,e[a+15],16,530742520),n=G(n,r=B(r,o,i,n,e[a+2],23,-995338651),o,i,e[a],6,-198630844),i=G(i,n,r,o,e[a+7],10,1126891415),o=G(o,i,n,r,e[a+14],15,-1416354905),r=G(r,o,i,n,e[a+5],21,-57434055),n=G(n,r,o,i,e[a+12],6,1700485571),i=G(i,n,r,o,e[a+3],10,-1894986606),o=G(o,i,n,r,e[a+10],15,-1051523),r=G(r,o,i,n,e[a+1],21,-2054922799),n=G(n,r,o,i,e[a+8],6,1873313359),i=G(i,n,r,o,e[a+15],10,-30611744),o=G(o,i,n,r,e[a+6],15,-1560198380),r=G(r,o,i,n,e[a+13],21,1309151649),n=G(n,r,o,i,e[a+4],6,-145523070),i=G(i,n,r,o,e[a+11],10,-1120210379),o=G(o,i,n,r,e[a+2],15,718787259),r=G(r,o,i,n,e[a+9],21,-343485551),n=K(n,s),r=K(r,c),o=K(o,u),i=K(i,l)}return[n,r,o,i]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(M(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))})),X=W;function Q(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function Y(e,t){return e<<t|e>>>32-t}var Z=q("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var o=0;o<r.length;++o)e.push(r.charCodeAt(o))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,a=Math.ceil(i/16),s=new Array(a),c=0;c<a;++c){for(var u=new Uint32Array(16),l=0;l<16;++l)u[l]=e[64*c+4*l]<<24|e[64*c+4*l+1]<<16|e[64*c+4*l+2]<<8|e[64*c+4*l+3];s[c]=u}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(var d=0;d<a;++d){for(var f=new Uint32Array(80),g=0;g<16;++g)f[g]=s[d][g];for(var v=16;v<80;++v)f[v]=Y(f[v-3]^f[v-8]^f[v-14]^f[v-16],1);for(var p=n[0],m=n[1],h=n[2],y=n[3],w=n[4],b=0;b<80;++b){var k=Math.floor(b/20),E=Y(p,5)+Q(k,m,h,y)+w+t[k]+f[b]>>>0;w=y,y=h,h=Y(m,30)>>>0,m=p,p=E}n[0]=n[0]+p>>>0,n[1]=n[1]+m>>>0,n[2]=n[2]+h>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+w>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),ee=Z;var te=Object.freeze({__proto__:null,v1:function(e,t,n){var r=t&&n||0,o=t||new Array(16),i=(e=e||{}).node||R,a=void 0!==e.clockseq?e.clockseq:A;if(null==i||null==a){var s=e.random||(e.rng||L)();null==i&&(i=R=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=A=16383&(s[6]<<8|s[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:V+1,l=c-$+(u-V)/1e4;if(l<0&&void 0===e.clockseq&&(a=a+1&16383),(l<0||c>$)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");$=c,V=u,A=a;var d=(1e4*(268435455&(c+=122192928e5))+u)%4294967296;o[r++]=d>>>24&255,o[r++]=d>>>16&255,o[r++]=d>>>8&255,o[r++]=255&d;var f=c/4294967296*1e4&268435455;o[r++]=f>>>8&255,o[r++]=255&f,o[r++]=f>>>24&15|16,o[r++]=f>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var g=0;g<6;++g)o[r+g]=i[g];return t||N(o)},v3:X,v4:function(e,t,n){var r=(e=e||{}).random||(e.rng||L)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return N(r)},v5:ee,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(!T(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)},validate:T,stringify:N,parse:H});const ne=["debug","info","warn","error","none"];var re={commonBasicLogger:function(e,t){if(e&&e.destination&&"function"!=typeof e.destination)throw new Error("destination for basicLogger was set to a non-function");function n(e){return function(t){console&&console[e]&&console[e].call(console,t)}}const r=e&&e.destination?[e.destination,e.destination,e.destination,e.destination]:[n("log"),n("info"),n("warn"),n("error")],o=!(!e||!e.destination),i=e&&void 0!==e.prefix&&null!==e.prefix?e.prefix:"[LaunchDarkly] ";let a=1;if(e&&e.level)for(let t=0;t<ne.length;t++)ne[t]===e.level&&(a=t);function s(e,n,a){if(a.length<1)return;let s;const c=o?n+": "+i:i;if(1!==a.length&&t){const e=[...a];e[0]=c+e[0],s=t(...e)}else s=c+a[0];try{r[e](s)}catch(e){console&&console.log&&console.log("[LaunchDarkly] Configured logger's "+n+" method threw an exception: "+e)}}const c={};for(let e=0;e<ne.length;e++){const t=ne[e];if("none"!==t)if(e<a)c[t]=()=>{};else{const n=e;c[t]=function(){s(n,t,arguments)}}}return c},validateLogger:function(e){ne.forEach((t=>{if("none"!==t&&(!e[t]||"function"!=typeof e[t]))throw new Error("Provided logger instance must support logger."+t+"(...) method")}))}};function oe(e){return e&&e.message?e.message:"string"==typeof e||e instanceof String?e:JSON.stringify(e)}const ie=" Please see https://docs.launchdarkly.com/sdk/client-side/javascript#initializing-the-client for instructions on SDK initialization.";var ae={bootstrapInvalid:function(){return"LaunchDarkly bootstrap data is not available because the back end could not read the flags."},bootstrapOldFormat:function(){return"LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."+ie},clientInitialized:function(){return"LaunchDarkly client initialized"},clientNotReady:function(){return"LaunchDarkly client is not ready"},debugEnqueueingEvent:function(e){return'enqueueing "'+e+'" event'},debugPostingDiagnosticEvent:function(e){return"sending diagnostic event ("+e.kind+")"},debugPostingEvents:function(e){return"sending "+e+" events"},debugStreamDelete:function(e){return'received streaming deletion for flag "'+e+'"'},debugStreamDeleteIgnored:function(e){return'received streaming deletion for flag "'+e+'" but ignored due to version check'},debugStreamPatch:function(e){return'received streaming update for flag "'+e+'"'},debugStreamPatchIgnored:function(e){return'received streaming update for flag "'+e+'" but ignored due to version check'},debugStreamPing:function(){return"received ping message from stream"},debugPolling:function(e){return"polling for feature flags at "+e},debugStreamPut:function(){return"received streaming update for all flags"},deprecated:function(e,t){return t?'"'+e+'" is deprecated, please use "'+t+'"':'"'+e+'" is deprecated'},environmentNotFound:function(){return"Environment not found. Double check that you specified a valid environment/client-side ID."+ie},environmentNotSpecified:function(){return"No environment/client-side ID was specified."+ie},errorFetchingFlags:function(e){return"Error fetching flag settings: "+oe(e)},eventCapacityExceeded:function(){return"Exceeded event queue capacity. Increase capacity to avoid dropping events."},eventWithoutContext:function(){return"Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript"},httpErrorMessage:function(e,t,n){return"Received error "+e+(401===e?" (invalid SDK key)":"")+" for "+t+" - "+(s.isHttpErrorRecoverable(e)?n:"giving up permanently")},httpUnavailable:function(){return"Cannot make HTTP requests in this environment."+ie},identifyDisabled:function(){return"identify() has no effect here; it must be called on the main client instance"},inspectorMethodError:(e,t)=>`an inspector: "${t}" of type: "${e}" generated an exception`,invalidContentType:function(e){return'Expected application/json content type but got "'+e+'"'},invalidData:function(){return"Invalid data received from LaunchDarkly; connection may have been interrupted"},invalidInspector:(e,t)=>`an inspector: "${t}" of an invalid type (${e}) was configured`,invalidKey:function(){return"Event key must be a string"},invalidContext:function(){return"Invalid context specified."+ie},invalidTagValue:e=>`Config option "${e}" must only contain letters, numbers, ., _ or -.`,localStorageUnavailable:function(e){return"local storage is unavailable: "+oe(e)},networkError:e=>"network error"+(e?" ("+e+")":""),optionBelowMinimum:(e,t,n)=>'Config option "'+e+'" was set to '+t+", changing to minimum value of "+n,streamClosing:function(){return"Closing stream connection"},streamConnecting:function(e){return"Opening stream connection to "+e},streamError:function(e,t){return"Error on stream connection: "+oe(e)+", will continue retrying after "+t+" milliseconds."},tagValueTooLong:e=>`Value of "${e}" was longer than 64 characters and was discarded.`,unknownCustomEventKey:function(e){return'Custom event "'+e+'" does not exist'},unknownOption:e=>'Ignoring unknown config option "'+e+'"',contextNotSpecified:function(){return"No context specified."+ie},unrecoverableStreamError:e=>`Error on stream connection ${oe(e)}, giving up permanently`,wrongOptionType:(e,t,n)=>'Config option "'+e+'" should be of type '+t+", got "+n+", using default value",wrongOptionTypeBoolean:(e,t)=>'Config option "'+e+'" should be a boolean, got '+t+", converting to boolean"};const{validateLogger:se}=re,ce={baseUrl:{default:"https://app.launchdarkly.com"},streamUrl:{default:"https://clientstream.launchdarkly.com"},eventsUrl:{default:"https://events.launchdarkly.com"},sendEvents:{default:!0},streaming:{type:"boolean"},sendLDHeaders:{default:!0},requestHeaderTransform:{type:"function"},sendEventsOnlyForVariation:{default:!1},useReport:{default:!1},evaluationReasons:{default:!1},eventCapacity:{default:100,minimum:1},flushInterval:{default:2e3,minimum:2e3},samplingInterval:{default:0,minimum:0},streamReconnectDelay:{default:1e3,minimum:0},allAttributesPrivate:{default:!1},privateAttributes:{default:[]},bootstrap:{type:"string|object"},diagnosticRecordingInterval:{default:9e5,minimum:2e3},diagnosticOptOut:{default:!1},wrapperName:{type:"string"},wrapperVersion:{type:"string"},stateProvider:{type:"object"},application:{validator:function(e,t,n){const r={};t.id&&(r.id=de(`${e}.id`,t.id,n));t.version&&(r.version=de(`${e}.version`,t.version,n));return r}},inspectors:{default:[]}},ue=/^(\w|\.|-)+$/;function le(e){return e&&e.replace(/\/+$/,"")}function de(e,t,n){if("string"==typeof t&&t.match(ue)){if(!(t.length>64))return t;n.warn(ae.tagValueTooLong(e))}else n.warn(ae.invalidTagValue(e))}var fe={baseOptionDefs:ce,validate:function(e,t,n,r){const o=I.extend({logger:{default:r}},ce,n),i={};function a(e){I.onNextTick((()=>{t&&t.maybeReportError(new s.LDInvalidArgumentError(e))}))}let c=I.extend({},e||{});return function(e){const t=e;Object.keys(i).forEach((e=>{if(void 0!==t[e]){const n=i[e];r&&r.warn(ae.deprecated(e,n)),n&&(void 0===t[n]&&(t[n]=t[e]),delete t[e])}}))}(c),c=function(e){const t=I.extend({},e);return Object.keys(o).forEach((e=>{void 0!==t[e]&&null!==t[e]||(t[e]=o[e]&&o[e].default)})),t}(c),c=function(e){const t=I.extend({},e),n=e=>{if(null===e)return"any";if(void 0===e)return;if(Array.isArray(e))return"array";const t=typeof e;return"boolean"===t||"string"===t||"number"===t||"function"===t?t:"object"};return Object.keys(e).forEach((i=>{const s=e[i];if(null!=s){const c=o[i];if(void 0===c)a(ae.unknownOption(i));else{const o=c.type||n(c.default),u=c.validator;if(u){const n=u(i,e[i],r);void 0!==n?t[i]=n:delete t[i]}else if("any"!==o){const e=o.split("|"),r=n(s);e.indexOf(r)<0?"boolean"===o?(t[i]=!!s,a(ae.wrongOptionTypeBoolean(i,r))):(a(ae.wrongOptionType(i,o,r)),t[i]=c.default):"number"===r&&void 0!==c.minimum&&s<c.minimum&&(a(ae.optionBelowMinimum(i,s,c.minimum)),t[i]=c.minimum)}}}})),t.baseUrl=le(t.baseUrl),t.streamUrl=le(t.streamUrl),t.eventsUrl=le(t.eventsUrl),t}(c),se(c.logger),c},getTags:function(e){const t={};return e&&(e.application&&void 0!==e.application.id&&null!==e.application.id&&(t["application-id"]=[e.application.id]),e.application&&void 0!==e.application.version&&null!==e.application.id&&(t["application-version"]=[e.application.version])),t}};const{getLDUserAgentString:ge}=I;var ve={getLDHeaders:function(e,t){if(t&&!t.sendLDHeaders)return{};const n={};n[e.userAgentHeaderName||"User-Agent"]=ge(e),t&&t.wrapperName&&(n["X-LaunchDarkly-Wrapper"]=t.wrapperVersion?t.wrapperName+"/"+t.wrapperVersion:t.wrapperName);const r=fe.getTags(t),o=Object.keys(r);return o.length&&(n["x-launchdarkly-tags"]=o.sort().map((e=>Array.isArray(r[e])?r[e].sort().map((t=>`${e}/${t}`)):[`${e}/${r[e]}`])).reduce(((e,t)=>e.concat(t)),[]).join(" ")),n},transformHeaders:function(e,t){return t&&t.requestHeaderTransform?t.requestHeaderTransform({...e}):e}};const{v1:pe}=te,{getLDHeaders:me,transformHeaders:he}=ve;var ye=function(e,t,n){const r="/a/"+t+".gif",o=I.extend({"Content-Type":"application/json"},me(e,n)),i=e.httpFallbackPing,a={};return a.sendChunk=(t,a,c,u)=>{const l=JSON.stringify(t),d=c?null:pe();return u?function t(r){const i=c?o:I.extend({},o,{"X-LaunchDarkly-Event-Schema":"4","X-LaunchDarkly-Payload-ID":d});return e.httpRequest("POST",a,he(i,n),l).promise.then((e=>{if(e)return e.status>=400&&s.isHttpErrorRecoverable(e.status)&&r?t(!1):function(e){const t={status:e.status},n=e.header("date");if(n){const e=Date.parse(n);e&&(t.serverTime=e)}return t}(e)})).catch((()=>r?t(!1):Promise.reject()))}(!0).catch((()=>{})):(i&&i(a+r+"?d="+I.base64URLEncode(l)),Promise.resolve())},a.sendEvents=function(t,n,r){if(!e.httpRequest)return Promise.resolve();const o=e.httpAllowsPost();let i;i=o?[t]:I.chunkEventsForUrl(2e3-n.length,t);const s=[];for(let e=0;e<i.length;e++)s.push(a.sendChunk(i[e],n,r,o));return Promise.all(s)},a};const{commonBasicLogger:we}=re;function be(e){return"string"==typeof e&&"kind"!==e&&e.match(/^(\w|\.|-)+$/)}function ke(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}var Ee={checkContext:function(e,t){if(e){if(t&&(void 0===e.kind||null===e.kind))return void 0!==e.key&&null!==e.key;const n=e.key,r=void 0===e.kind?"user":e.kind,o=be(r),i="multi"===r||null!=n&&""!==n;if("multi"===r){const t=Object.keys(e).filter((e=>"kind"!==e));return i&&t.every((e=>be(e)))&&t.every((t=>{const n=e[t].key;return null!=n&&""!==n}))}return i&&o}return!1},getContextKeys:function(e,t=we()){if(!e)return;const n={},{kind:r,key:o}=e;switch(r){case void 0:n.user=`${o}`;break;case"multi":Object.entries(e).filter((([e])=>"kind"!==e)).forEach((([e,t])=>{t&&t.key&&(n[e]=t.key)}));break;case null:t.warn(`null is not a valid context kind: ${e}`);break;case"":t.warn(`'' is not a valid context kind: ${e}`);break;default:n[r]=`${o}`}return n},getContextKinds:function(e){return e?null===e.kind||void 0===e.kind?["user"]:"multi"!==e.kind?[e.kind]:Object.keys(e).filter((e=>"kind"!==e)):[]},getCanonicalKey:function(e){if(e){if((void 0===e.kind||null===e.kind||"user"===e.kind)&&e.key)return e.key;if("multi"!==e.kind&&e.key)return`${e.kind}:${ke(e.key)}`;if("multi"===e.kind)return Object.keys(e).sort().filter((e=>"kind"!==e)).map((t=>`${t}:${ke(e[t].key)}`)).join(":")}}};const{getContextKinds:De}=Ee;var Ce=function(){const e={};let t=0,n=0,r={},o={};return e.summarizeEvent=e=>{if("feature"===e.kind){const i=e.key+":"+(null!==e.variation&&void 0!==e.variation?e.variation:"")+":"+(null!==e.version&&void 0!==e.version?e.version:""),a=r[i];let s=o[e.key];s||(s=new Set,o[e.key]=s),function(e){return e.context?De(e.context):e.contextKeys?Object.keys(e.contextKeys):[]}(e).forEach((e=>s.add(e))),a?a.count=a.count+1:r[i]={count:1,key:e.key,version:e.version,variation:e.variation,value:e.value,default:e.default},(0===t||e.creationDate<t)&&(t=e.creationDate),e.creationDate>n&&(n=e.creationDate)}},e.getSummary=()=>{const e={};let i=!0;for(const t of Object.values(r)){let n=e[t.key];n||(n={default:t.default,counters:[],contextKinds:[...o[t.key]]},e[t.key]=n);const r={value:t.value,count:t.count};void 0!==t.variation&&null!==t.variation&&(r.variation=t.variation),void 0!==t.version&&null!==t.version?r.version=t.version:r.unknown=!0,n.counters.push(r),i=!1}return i?null:{startDate:t,endDate:n,features:e}},e.clearSummary=()=>{t=0,n=0,r={},o={}},e};function xe(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Pe(e){return(e.startsWith("/")?e.substring(1):e).split("/").map((e=>e.indexOf("~")>=0?e.replace(/~1/g,"/").replace(/~0/g,"~"):e))}function Se(e){return!e.startsWith("/")}function Ie(e,t){const n=Se(e),r=Se(t);if(n&&r)return e===t;if(n){const n=Pe(t);return 1===n.length&&e===n[0]}if(r){const n=Pe(e);return 1===n.length&&t===n[0]}return e===t}function Oe(e){return`/${xe(e)}`}var Le={cloneExcluding:function(e,t){const n=[],r={},o=[];for(n.push(...Object.keys(e).map((t=>({key:t,ptr:Oe(t),source:e,parent:r,visited:[e]}))));n.length;){const e=n.pop();if(t.some((t=>Ie(t,e.ptr))))o.push(e.ptr);else{const t=e.source[e.key];if(null===t)e.parent[e.key]=t;else if(Array.isArray(t))e.parent[e.key]=[...t];else if("object"==typeof t){if(e.visited.includes(t))continue;e.parent[e.key]={},n.push(...Object.keys(t).map((n=>{return{key:n,ptr:(r=e.ptr,o=xe(n),`${r}/${o}`),source:t,parent:e.parent[e.key],visited:[...e.visited,t]};var r,o})))}else e.parent[e.key]=t}}return{cloned:r,excluded:o.sort()}},compare:Ie,literalToReference:Oe};var Ue=function(e){const t={},n=e.allAttributesPrivate,r=e.privateAttributes||[],o=["key","kind","_meta","anonymous"],i=["name","ip","firstName","lastName","email","avatar","country"],a=e=>{if("object"!=typeof e||null===e||Array.isArray(e))return;const{cloned:t,excluded:i}=Le.cloneExcluding(e,(e=>(n?Object.keys(e):[...r,...e._meta&&e._meta.privateAttributes||[]]).filter((e=>!o.some((t=>Le.compare(e,t))))))(e));return t.key=String(t.key),i.length&&(t._meta||(t._meta={}),t._meta.redactedAttributes=i),t._meta&&(delete t._meta.privateAttributes,0===Object.keys(t._meta).length&&delete t._meta),void 0!==t.anonymous&&(t.anonymous=!!t.anonymous),t};return t.filter=e=>void 0===e.kind||null===e.kind?a((e=>{const t={...e.custom||{},kind:"user",key:e.key};void 0!==e.anonymous&&(t.anonymous=!!e.anonymous);for(const n of i)delete t[n],void 0!==e[n]&&null!==e[n]&&(t[n]=String(e[n]));return void 0!==e.privateAttributeNames&&null!==e.privateAttributeNames&&(t._meta=t._meta||{},t._meta.privateAttributes=e.privateAttributeNames.map((e=>e.startsWith("/")?Le.literalToReference(e):e))),t})(e)):"multi"===e.kind?(e=>{const t={kind:e.kind},n=Object.keys(e);for(const r of n)if("kind"!==r){const n=a(e[r]);n&&(t[r]=n)}return t})(e):a(e),t};const{getContextKeys:Te}=Ee;var Re=function(e,t,n,r=null,o=null,i=null){const a={},c=i||ye(e,n,t),u=I.appendUrlPath(t.eventsUrl,"/events/bulk/"+n),l=Ce(),d=Ue(t),f=t.samplingInterval,g=t.eventCapacity,v=t.flushInterval,p=t.logger;let m,h=[],y=0,w=!1,b=!1;function k(){return 0===f||0===Math.floor(Math.random()*f)}function E(e){const t=I.extend({},e);return"identify"===e.kind?t.context=d.filter(e.context):(t.contextKeys=Te(e.context,p),delete t.context),"feature"===e.kind&&(delete t.trackEvents,delete t.debugEventsUntilDate),t}function D(e){h.length<g?(h.push(e),b=!1):(b||(b=!0,p.warn(ae.eventCapacityExceeded())),r&&r.incrementDroppedEvents())}return a.enqueue=function(e){if(w)return;let t=!1,n=!1;var r;if(l.summarizeEvent(e),"feature"===e.kind?k()&&(t=!!e.trackEvents,n=!!(r=e).debugEventsUntilDate&&r.debugEventsUntilDate>y&&r.debugEventsUntilDate>(new Date).getTime()):t=k(),t&&D(E(e)),n){const t=I.extend({},e,{kind:"debug"});t.context=d.filter(t.context),delete t.trackEvents,delete t.debugEventsUntilDate,D(t)}},a.flush=function(){if(w)return Promise.resolve();const e=h,t=l.getSummary();return l.clearSummary(),t&&(t.kind="summary",e.push(t)),r&&r.setEventsInLastBatch(e.length),0===e.length?Promise.resolve():(h=[],p.debug(ae.debugPostingEvents(e.length)),c.sendEvents(e,u).then((e=>{const t=e&&e[0];t&&(t.serverTime&&(y=t.serverTime),s.isHttpErrorRecoverable(t.status)||(w=!0),t.status>=400&&I.onNextTick((()=>{o.maybeReportError(new s.LDUnexpectedResponseError(ae.httpErrorMessage(t.status,"event posting","some events were dropped")))})))})))},a.start=function(){const e=()=>{a.flush(),m=setTimeout(e,v)};m=setTimeout(e,v)},a.stop=function(){clearTimeout(m)},a};var Ae=function(e){const t={},n={};return t.on=function(e,t,r){n[e]=n[e]||[],n[e]=n[e].concat({handler:t,context:r})},t.off=function(e,t,r){if(n[e])for(let o=0;o<n[e].length;o++)n[e][o].handler===t&&n[e][o].context===r&&(n[e]=n[e].slice(0,o).concat(n[e].slice(o+1)))},t.emit=function(e){if(!n[e])return;const t=n[e].slice(0);for(let e=0;e<t.length;e++)t[e].handler.apply(t[e].context,Array.prototype.slice.call(arguments,1))},t.getEvents=function(){return Object.keys(n)},t.getEventListenerCount=function(e){return n[e]?n[e].length:0},t.maybeReportError=function(t){t&&(n["error"]?this.emit("error",t):(e||console).error(t.message))},t};const je="ready",Fe="initialized",Ne="failed";var $e=function(e){let t=!1,n=!1,r=null,o=null;const i=new Promise((t=>{const n=()=>{e.off(je,n),t()};e.on(je,n)})).catch((()=>{}));return{getInitializationPromise:()=>o||(t?Promise.resolve():n?Promise.reject(r):(o=new Promise(((t,n)=>{const r=()=>{e.off(Fe,r),t()},o=t=>{e.off(Ne,o),n(t)};e.on(Fe,r),e.on(Ne,o)})),o)),getReadyPromise:()=>i,signalSuccess:()=>{t||n||(t=!0,e.emit(Fe),e.emit(je))},signalFailure:o=>{t||n||(n=!0,r=o,e.emit(Ne,o),e.emit(je)),e.maybeReportError(o)}}};var Ve=function(e,t,n,r){const o={};function i(){let e="";const o=r.getContext();return o&&(e=n||I.btoa(JSON.stringify(o))),"ld:"+t+":"+e}return o.loadFlags=()=>e.get(i()).then((e=>{if(null==e)return null;try{let t=JSON.parse(e);if(t){const e=t.$schema;void 0===e||e<1?t=I.transformValuesToVersionedValues(t):delete t.$schema}return t}catch(e){return o.clearFlags().then((()=>null))}})),o.saveFlags=t=>{const n=I.extend({},t,{$schema:1});return e.set(i(),JSON.stringify(n))},o.clearFlags=()=>e.clear(i()),o};var He=function(e,t){const n={};let r=!1;const o=e=>{r||(r=!0,t.warn(ae.localStorageUnavailable(e)))};return n.isEnabled=()=>!!e,n.get=t=>new Promise((n=>{e?e.get(t).then(n).catch((e=>{o(e),n(void 0)})):n(void 0)})),n.set=(t,n)=>new Promise((r=>{e?e.set(t,n).then((()=>r(!0))).catch((e=>{o(e),r(!1)})):r(!1)})),n.clear=t=>new Promise((n=>{e?e.clear(t).then((()=>n(!0))).catch((e=>{o(e),n(!1)})):n(!1)})),n};const{appendUrlPath:qe,base64URLEncode:Me,objectHasOwnProperty:Ke}=I,{getLDHeaders:_e,transformHeaders:Je}=ve,{isHttpErrorRecoverable:ze}=s;var Be=function(e,t,n,r){const o=t.streamUrl,i=t.logger,a={},s=qe(o,"/eval/"+n),c=t.useReport,u=t.evaluationReasons,l=t.streamReconnectDelay,d=_e(e,t);let f,g=!1,v=null,p=null,m=null,h=null,y=null,w=0;function b(){const e=(t=function(){const e=l*Math.pow(2,w);return e>3e4?3e4:e}(),t-Math.trunc(.5*Math.random()*t));var t;return w+=1,e}function k(e){if(e.status&&"number"==typeof e.status&&!ze(e.status))return C(),i.error(ae.unrecoverableStreamError(e)),void(p&&(clearTimeout(p),p=null));const t=b();g||(i.warn(ae.streamError(e,t)),g=!0),x(!1),C(),E(t)}function E(e){p||(e?p=setTimeout(D,e):D())}function D(){let r;p=null;let a="";const l={headers:d,readTimeoutMillis:3e5};if(e.eventSourceFactory){null!=h&&(a="h="+h),c?e.eventSourceAllowsReport?(r=s,l.method="REPORT",l.headers["Content-Type"]="application/json",l.body=JSON.stringify(m)):(r=qe(o,"/ping/"+n),a=""):r=s+"/"+Me(JSON.stringify(m)),l.headers=Je(l.headers,t),u&&(a=a+(a?"&":"")+"withReasons=true"),r=r+(a?"?":"")+a,C(),i.info(ae.streamConnecting(r)),f=(new Date).getTime(),v=e.eventSourceFactory(r,l);for(const e in y)Ke(y,e)&&v.addEventListener(e,y[e]);v.onerror=k,v.onopen=()=>{w=0}}}function C(){v&&(i.info(ae.streamClosing()),v.close(),v=null)}function x(e){f&&r&&r.recordStreamInit(f,!e,(new Date).getTime()-f),f=null}return a.connect=function(e,t,n){m=e,h=t,y={};for(const e in n||{})y[e]=function(t){g=!1,x(!0),n[e]&&n[e](t)};E()},a.disconnect=function(){clearTimeout(p),p=null,C()},a.isConnected=function(){return!!(v&&e.eventSourceIsActive&&e.eventSourceIsActive(v))},a};var Ge=function(e){let t,n,r,o;const i={addPromise:(i,a)=>{t=i,n&&n(),n=a,i.then((n=>{t===i&&(r(n),e&&e())}),(n=>{t===i&&(o(n),e&&e())}))}};return i.resultPromise=new Promise(((e,t)=>{r=e,o=t})),i};const{transformHeaders:We,getLDHeaders:Xe}=ve,Qe="application/json";var Ye=function(e,t,n){const r=t.baseUrl,o=t.useReport,i=t.evaluationReasons,a=t.logger,c={},u={};function l(n,r){if(!e.httpRequest)return new Promise(((e,t)=>{t(new s.LDFlagFetchError(ae.httpUnavailable()))}));const o=r?"REPORT":"GET",i=Xe(e,t);r&&(i["Content-Type"]=Qe);let a=u[n];a||(a=Ge((()=>{delete u[n]})),u[n]=a);const c=e.httpRequest(o,n,We(i,t),r),l=c.promise.then((e=>{if(200===e.status){if(e.header("content-type")&&e.header("content-type").substring(0,16)===Qe)return JSON.parse(e.body);{const t=ae.invalidContentType(e.header("content-type")||"");return Promise.reject(new s.LDFlagFetchError(t))}}return Promise.reject(function(e){return 404===e.status?new s.LDInvalidEnvironmentIdError(ae.environmentNotFound()):new s.LDFlagFetchError(ae.errorFetchingFlags(e.statusText||String(e.status)))}(e))}),(e=>Promise.reject(new s.LDFlagFetchError(ae.networkError(e)))));return a.addPromise(l,(()=>{c.cancel&&c.cancel()})),a.resultPromise}return c.fetchJSON=function(e){return l(I.appendUrlPath(r,e),null)},c.fetchFlagSettings=function(e,t){let s,c,u,d="";return o?(c=[r,"/sdk/evalx/",n,"/context"].join(""),u=JSON.stringify(e)):(s=I.base64URLEncode(JSON.stringify(e)),c=[r,"/sdk/evalx/",n,"/contexts/",s].join("")),t&&(d="h="+t),i&&(d=d+(d?"&":"")+"withReasons=true"),c=c+(d?"?":"")+d,a.debug(ae.debugPolling(c)),l(c,u)},c};var Ze=function(e,t){const n={};let r;return n.setContext=function(e){r=I.sanitizeContext(e),r&&t&&t(I.clone(r))},n.getContext=function(){return r?I.clone(r):null},e&&n.setContext(e),n};const{v1:et}=te,{getContextKinds:tt}=Ee;var nt=function(e){function t(e){return null==e||"user"===e?"ld:$anonUserId":`ld:$contextKey:${e}`}function n(n,r){return null!==r.key&&void 0!==r.key?(r.key=r.key.toString(),Promise.resolve(r)):r.anonymous?function(n){return e.get(t(n))}(n).then((o=>{if(o)return r.key=o,r;{const o=et();return r.key=o,function(n,r){return e.set(t(r),n)}(o,n).then((()=>r))}})):Promise.reject(new s.LDInvalidUserError(ae.invalidContext()))}this.processContext=e=>{if(!e)return Promise.reject(new s.LDInvalidUserError(ae.contextNotSpecified()));const t=I.clone(e);if("multi"===e.kind){const e=tt(t);return Promise.all(e.map((e=>n(e,t[e])))).then((()=>t))}return n(e.kind,t)}};const{v1:rt}=te,{baseOptionDefs:ot}=fe,{appendUrlPath:it}=I;var at={DiagnosticId:function(e){const t={diagnosticId:rt()};return e&&(t.sdkKeySuffix=e.length>6?e.substring(e.length-6):e),t},DiagnosticsAccumulator:function(e){let t,n,r,o;function i(e){t=e,n=0,r=0,o=[]}return i(e),{getProps:()=>({dataSinceDate:t,droppedEvents:n,eventsInLastBatch:r,streamInits:o}),setProps:e=>{t=e.dataSinceDate,n=e.droppedEvents||0,r=e.eventsInLastBatch||0,o=e.streamInits||[]},incrementDroppedEvents:()=>{n++},setEventsInLastBatch:e=>{r=e},recordStreamInit:(e,t,n)=>{const r={timestamp:e,failed:t,durationMillis:n};o.push(r)},reset:i}},DiagnosticsManager:function(e,t,n,r,o,i,a){const s=!!e.diagnosticUseCombinedEvent,c="ld:"+o+":$diagnostics",u=it(i.eventsUrl,"/events/diagnostic/"+o),l=i.diagnosticRecordingInterval,d=n;let f,g,v=!!i.streaming;const p={};function m(){return{sdk:w(),configuration:b(),platform:e.diagnosticPlatformData}}function h(e){i.logger&&i.logger.debug(ae.debugPostingDiagnosticEvent(e)),r.sendEvents(e,u,!0).then((()=>{})).catch((()=>{}))}function y(){h(function(){const e=(new Date).getTime();let t={kind:s?"diagnostic-combined":"diagnostic",id:a,creationDate:e,...d.getProps()};return s&&(t={...t,...m()}),d.reset(e),t}()),g=setTimeout(y,l),f=(new Date).getTime(),s&&function(){if(t.isEnabled()){const e={...d.getProps()};t.set(c,JSON.stringify(e))}}()}function w(){const t={...e.diagnosticSdkData};return i.wrapperName&&(t.wrapperName=i.wrapperName),i.wrapperVersion&&(t.wrapperVersion=i.wrapperVersion),t}function b(){return{customBaseURI:i.baseUrl!==ot.baseUrl.default,customStreamURI:i.streamUrl!==ot.streamUrl.default,customEventsURI:i.eventsUrl!==ot.eventsUrl.default,eventsCapacity:i.eventCapacity,eventsFlushIntervalMillis:i.flushInterval,reconnectTimeMillis:i.streamReconnectDelay,streamingDisabled:!v,allAttributesPrivate:!!i.allAttributesPrivate,diagnosticRecordingIntervalMillis:i.diagnosticRecordingInterval,usingSecureMode:!!i.hash,bootstrapMode:!!i.bootstrap,fetchGoalsDisabled:!i.fetchGoals,sendEventsOnlyForVariation:!!i.sendEventsOnlyForVariation}}return p.start=()=>{s?function(e){if(!t.isEnabled())return e(!1);t.get(c).then((t=>{if(t)try{const e=JSON.parse(t);d.setProps(e),f=e.dataSinceDate}catch(e){}e(!0)})).catch((()=>{e(!1)}))}((e=>{if(e){const e=(f||0)+l,t=(new Date).getTime();t>=e?y():g=setTimeout(y,e-t)}else 0===Math.floor(4*Math.random())?y():g=setTimeout(y,l)})):(h({kind:"diagnostic-init",id:a,creationDate:d.getProps().dataSinceDate,...m()}),g=setTimeout(y,l))},p.stop=()=>{g&&clearTimeout(g)},p.setStreaming=e=>{v=e},p}};var st=function(e,t){let n=!1;const r={type:e.type,name:e.name,method:(...o)=>{try{e.method(...o)}catch{n||(n=!0,t.warn(ae.inspectorMethodError(r.type,r.name)))}}};return r};const{onNextTick:ct}=I,ut={flagUsed:"flag-used",flagDetailsChanged:"flag-details-changed",flagDetailChanged:"flag-detail-changed",clientIdentityChanged:"client-identity-changed"};Object.freeze(ut);var lt={InspectorTypes:ut,InspectorManager:function(e,t){const n={},r={[ut.flagUsed]:[],[ut.flagDetailsChanged]:[],[ut.flagDetailChanged]:[],[ut.clientIdentityChanged]:[]},o=e&&e.map((e=>st(e,t)));return o&&o.forEach((e=>{Object.prototype.hasOwnProperty.call(r,e.type)?r[e.type].push(e):t.warn(ae.invalidInspector(e.type,e.name))})),n.hasListeners=e=>r[e]&&r[e].length,n.onFlagUsed=(e,t,n)=>{r[ut.flagUsed].length&&ct((()=>{r[ut.flagUsed].forEach((r=>r.method(e,t,n)))}))},n.onFlags=e=>{r[ut.flagDetailsChanged].length&&ct((()=>{r[ut.flagDetailsChanged].forEach((t=>t.method(e)))}))},n.onFlagChanged=(e,t)=>{r[ut.flagDetailChanged].length&&ct((()=>{r[ut.flagDetailChanged].forEach((n=>n.method(e,t)))}))},n.onIdentityChanged=e=>{r[ut.clientIdentityChanged].length&&ct((()=>{r[ut.clientIdentityChanged].forEach((t=>t.method(e)))}))},n}};const{commonBasicLogger:dt}=re,{checkContext:ft,getContextKeys:gt}=Ee,{InspectorTypes:vt,InspectorManager:pt}=lt,mt="change",ht="internal-change";var yt={initialize:function(e,t,n,r,o){const i=function(){if(n&&n.logger)return n.logger;return o&&o.logger&&o.logger.default||dt("warn")}(),a=Ae(i),c=$e(a),u=fe.validate(n,a,o,i),l=pt(u.inspectors,i),d=u.sendEvents;let f=e,g=u.hash;const v=He(r.localStorage,i),p=ye(r,f,u),m=u.sendEvents&&!u.diagnosticOptOut,h=m?at.DiagnosticId(f):null,y=m?at.DiagnosticsAccumulator((new Date).getTime()):null,w=m?at.DiagnosticsManager(r,v,y,p,f,u,h):null,b=Be(r,u,f,y),k=u.eventProcessor||Re(r,u,f,y,a,p),E=Ye(r,u,f);let D,C,x,P={},S=u.streaming,O=!1,L=!1,U=!0;const T=u.stateProvider,R=Ze(null,(function(e){(function(e){if(T)return;e&&F({kind:"identify",context:e,creationDate:(new Date).getTime()})})(e),l.hasListeners(vt.clientIdentityChanged)&&l.onIdentityChanged(R.getContext())})),A=new nt(v),j=v.isEnabled()?Ve(v,f,g,R):null;function F(e){f&&(T&&T.enqueueEvent&&T.enqueueEvent(e)||(e.context?(U=!1,!d||L||r.isDoNotTrack()||(i.debug(ae.debugEnqueueingEvent(e.kind)),k.enqueue(e))):U&&(i.warn(ae.eventWithoutContext()),U=!1)))}function N(e,t){l.hasListeners(vt.flagDetailChanged)&&l.onFlagChanged(e.key,M(t))}function $(){l.hasListeners(vt.flagDetailsChanged)&&l.onFlags(Object.entries(P).map((([e,t])=>({key:e,detail:M(t)}))).reduce(((e,t)=>(e[t.key]=t.detail,e)),{}))}function V(e,t,n,r){const o=R.getContext(),i=new Date,a={kind:"feature",key:e,context:o,value:t?t.value:null,variation:t?t.variationIndex:null,default:n,creationDate:i.getTime()},s=P[e];s&&(a.version=s.flagVersion?s.flagVersion:s.version,a.trackEvents=s.trackEvents,a.debugEventsUntilDate=s.debugEventsUntilDate),(r||s&&s.trackReason)&&t&&(a.reason=t.reason),F(a)}function H(e){return ft(e,!1)?Promise.resolve(e):Promise.reject(new s.LDInvalidUserError(ae.invalidContext()))}function q(e,t,n,r,o){let i;if(P&&I.objectHasOwnProperty(P,e)&&P[e]&&!P[e].deleted){const n=P[e];i=M(n),null!==n.value&&void 0!==n.value||(i.value=t)}else i={value:t,variationIndex:null,reason:{kind:"ERROR",errorKind:"FLAG_NOT_FOUND"}};return n&&V(e,i,t,r),o||function(e,t){l.hasListeners(vt.flagUsed)&&l.onFlagUsed(e,t,R.getContext())}(e,i),i}function M(e){return{value:e.value,variationIndex:void 0===e.variation?null:e.variation,reason:e.reason||null}}function K(){if(C=!0,!R.getContext())return;const e=e=>{try{return JSON.parse(e)}catch(e){return void a.maybeReportError(new s.LDInvalidDataError(ae.invalidData()))}};b.connect(R.getContext(),g,{ping:function(){i.debug(ae.debugStreamPing());const e=R.getContext();E.fetchFlagSettings(e,g).then((t=>{I.deepEquals(e,R.getContext())&&J(t||{})})).catch((e=>{a.maybeReportError(new s.LDFlagFetchError(ae.errorFetchingFlags(e)))}))},put:function(t){const n=e(t.data);n&&(i.debug(ae.debugStreamPut()),J(n))},patch:function(t){const n=e(t.data);if(!n)return;const r=P[n.key];if(!r||!r.version||!n.version||r.version<n.version){i.debug(ae.debugStreamPatch(n.key));const e={},t=I.extend({},n);delete t.key,P[n.key]=t;const o=M(t);e[n.key]=r?{previous:r.value,current:o}:{current:o},z(e),N(n,t)}else i.debug(ae.debugStreamPatchIgnored(n.key))},delete:function(t){const n=e(t.data);if(n)if(!P[n.key]||P[n.key].version<n.version){i.debug(ae.debugStreamDelete(n.key));const e={};P[n.key]&&!P[n.key].deleted&&(e[n.key]={previous:P[n.key].value}),P[n.key]={version:n.version,deleted:!0},N(n,P[n.key]),z(e)}else i.debug(ae.debugStreamDeleteIgnored(n.key))}})}function _(){C&&(b.disconnect(),C=!1)}function J(e){const t={};if(!e)return Promise.resolve();for(const n in P)I.objectHasOwnProperty(P,n)&&P[n]&&(e[n]&&!I.deepEquals(e[n].value,P[n].value)?t[n]={previous:P[n].value,current:M(e[n])}:e[n]&&!e[n].deleted||(t[n]={previous:P[n].value}));for(const n in e)I.objectHasOwnProperty(e,n)&&e[n]&&(!P[n]||P[n].deleted)&&(t[n]={current:M(e[n])});return P={...e},$(),z(t).catch((()=>{}))}function z(e){const t=Object.keys(e);if(t.length>0){const n={};t.forEach((t=>{const r=e[t].current,o=r?r.value:void 0,i=e[t].previous;a.emit(mt+":"+t,o,i),n[t]=r?{current:o,previous:i}:{previous:i}})),a.emit(mt,n),a.emit(ht,P),u.sendEventsOnlyForVariation||T||t.forEach((t=>{V(t,e[t].current)}))}return D&&j?j.saveFlags(P):Promise.resolve()}function B(){const e=S||x&&void 0===S;e&&!C?K():!e&&C&&_(),w&&w.setStreaming(e)}function G(e){return e===mt||e.substr(0,7)===mt+":"}if("string"==typeof u.bootstrap&&"LOCALSTORAGE"===u.bootstrap.toUpperCase()&&(j?D=!0:i.warn(ae.localStorageUnavailable())),"object"==typeof u.bootstrap&&(P=function(e){const t=Object.keys(e),n="$flagsState",r="$valid",o=e[n];!o&&t.length&&i.warn(ae.bootstrapOldFormat()),!1===e[r]&&i.warn(ae.bootstrapInvalid());const a={};return t.forEach((t=>{if(t!==n&&t!==r){let n={value:e[t]};o&&o[t]?n=I.extend(n,o[t]):n.version=0,a[t]=n}})),a}(u.bootstrap)),T){const e=T.getInitialState();e?W(e):T.on("init",W),T.on("update",(function(e){e.context&&R.setContext(e.context);e.flags&&J(e.flags)}))}else(function(){if(!e)return Promise.reject(new s.LDInvalidEnvironmentIdError(ae.environmentNotSpecified()));return A.processContext(t).then(H).then((e=>(R.setContext(e),"object"==typeof u.bootstrap?X():D?j.loadFlags().then((e=>null==e?(P={},E.fetchFlagSettings(R.getContext(),g).then((e=>J(e||{}))).then(X).catch((e=>{Q(new s.LDFlagFetchError(ae.errorFetchingFlags(e)))}))):(P=e,I.onNextTick(X),E.fetchFlagSettings(R.getContext(),g).then((e=>J(e))).catch((e=>a.maybeReportError(e)))))):E.fetchFlagSettings(R.getContext(),g).then((e=>{P=e||{},$(),X()})).catch((e=>{P={},Q(e)})))))})().catch(Q);function W(e){f=e.environment,R.setContext(e.context),P={...e.flags},I.onNextTick(X)}function X(){i.info(ae.clientInitialized()),O=!0,B(),c.signalSuccess()}function Q(e){c.signalFailure(e)}const Y={waitForInitialization:()=>c.getInitializationPromise(),waitUntilReady:()=>c.getReadyPromise(),identify:function(e,t,n){if(L)return I.wrapPromiseCallback(Promise.resolve({}),n);if(T)return i.warn(ae.identifyDisabled()),I.wrapPromiseCallback(Promise.resolve(I.transformVersionedValuesToValues(P)),n);const r=D&&j?j.clearFlags():Promise.resolve();return I.wrapPromiseCallback(r.then((()=>A.processContext(e))).then(H).then((e=>E.fetchFlagSettings(e,t).then((n=>{const r=I.transformVersionedValuesToValues(n);return R.setContext(e),g=t,n?J(n).then((()=>r)):r})))).then((e=>(C&&K(),e))).catch((e=>(a.maybeReportError(e),Promise.reject(e)))),n)},getContext:function(){return R.getContext()},variation:function(e,t){return q(e,t,!0,!1,!1).value},variationDetail:function(e,t){return q(e,t,!0,!0,!1)},track:function(e,t,n){if("string"!=typeof e)return void a.maybeReportError(new s.LDInvalidEventKeyError(ae.unknownCustomEventKey(e)));r.customEventFilter&&!r.customEventFilter(e)&&i.warn(ae.unknownCustomEventKey(e));const o=R.getContext(),c={kind:"custom",key:e,context:o,url:r.getCurrentUrl(),creationDate:(new Date).getTime()};o&&o.anonymous&&(c.contextKind=o.anonymous?"anonymousUser":"user"),null!=t&&(c.data=t),null!=n&&(c.metricValue=n),F(c)},on:function(e,t,n){G(e)?(x=!0,O&&B(),a.on(e,t,n)):a.on(...arguments)},off:function(e){if(a.off(...arguments),G(e)){let e=!1;a.getEvents().forEach((t=>{G(t)&&a.getEventListenerCount(t)>0&&(e=!0)})),e||(x=!1,C&&void 0===S&&_())}},setStreaming:function(e){const t=null===e?void 0:e;t!==S&&(S=t,B())},flush:function(e){return I.wrapPromiseCallback(d?k.flush():Promise.resolve(),e)},allFlags:function(){const e={};if(!P)return e;for(const t in P)I.objectHasOwnProperty(P,t)&&!P[t].deleted&&(e[t]=q(t,null,!u.sendEventsOnlyForVariation,!1,!0).value);return e},close:function(e){if(L)return I.wrapPromiseCallback(Promise.resolve(),e);const t=()=>{L=!0,P={}},n=Promise.resolve().then((()=>{if(_(),w&&w.stop(),d)return k.stop(),k.flush()})).then(t).catch(t);return I.wrapPromiseCallback(n,e)}};return{client:Y,options:u,emitter:a,ident:R,logger:i,requestor:E,start:function(){d&&(w&&w.start(),k.start())},enqueueEvent:F,getFlagsInternal:function(){return P},getEnvironmentId:()=>f,internalChangeEventName:ht}},commonBasicLogger:dt,errors:s,messages:ae,utils:I,getContextKeys:gt},wt=yt.initialize,bt=yt.errors,kt=yt.messages;function Et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Et(Object(n),!0).forEach((function(t){Ct(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ct(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xt=yt.commonBasicLogger;var Pt=function(e){return xt(Dt({destination:console.log},e))};var St={promise:Promise.resolve({status:200,header:function(){return null},body:null})};function It(e,t,n,r,o){if(o&&!function(){var e=window.navigator&&window.navigator.userAgent;if(e){var t=e.match(/Chrom(e|ium)\/([0-9]+)\./);if(t)return parseInt(t[2],10)<73}return!0}())return St;var i=new window.XMLHttpRequest;for(var a in i.open(e,t,!o),n||{})Object.prototype.hasOwnProperty.call(n,a)&&i.setRequestHeader(a,n[a]);if(o){try{i.send(r)}catch(e){}return St}var s,c=new Promise((function(e,t){i.addEventListener("load",(function(){s||e({status:i.status,header:function(e){return i.getResponseHeader(e)},body:i.responseText})})),i.addEventListener("error",(function(){s||t(new Error)})),i.send(r)}));return{promise:c,cancel:function(){s=!0,i.abort()}}}var Ot=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function Lt(e,t,n,r){var o,i,a=(("substring"===e.kind||"regex"===e.kind)&&r.includes("/")?t:t.replace(r,"")).replace(n,"");switch(e.kind){case"exact":i=t,o=new RegExp("^"+Ot(e.url)+"/?$");break;case"canonical":i=a,o=new RegExp("^"+Ot(e.url)+"/?$");break;case"substring":i=a,o=new RegExp(".*"+Ot(e.substring)+".*$");break;case"regex":i=a,o=new RegExp(e.pattern);break;default:return!1}return o.test(i)}function Ut(e,t){for(var n={},r=null,o=[],i=0;i<e.length;i++)for(var a=e[i],s=a.urls||[],c=0;c<s.length;c++)if(Lt(s[c],window.location.href,window.location.search,window.location.hash)){"pageview"===a.kind?t("pageview",a):(o.push(a),t("click_pageview",a));break}return o.length>0&&(r=function(e){for(var n=function(e,t){for(var n=[],r=0;r<t.length;r++)for(var o=e.target,i=t[r],a=i.selector,s=document.querySelectorAll(a);o&&s.length>0;){for(var c=0;c<s.length;c++)o===s[c]&&n.push(i);o=o.parentNode}return n}(e,o),r=0;r<n.length;r++)t("click",n[r])},document.addEventListener("click",r)),n.dispose=function(){document.removeEventListener("click",r)},n}var Tt=300;function Rt(e,t){var n,r;function o(){r&&r.dispose(),n&&n.length&&(r=Ut(n,i))}function i(t,n){var r=e.ident.getContext(),o={kind:t,key:n.key,data:null,url:window.location.href,creationDate:(new Date).getTime(),context:r};return"click"===t&&(o.selector=n.selector),e.enqueueEvent(o)}return e.requestor.fetchJSON("/sdk/goals/"+e.getEnvironmentId()).then((function(e){e&&e.length>0&&(r=Ut(n=e,i),function(e,t){var n,r=window.location.href;function o(){(n=window.location.href)!==r&&(r=n,t())}!function e(t,n){t(),setTimeout((function(){e(t,n)}),n)}(o,e),window.history&&window.history.pushState?window.addEventListener("popstate",o):window.addEventListener("hashchange",o)}(Tt,o)),t()})).catch((function(n){e.emitter.maybeReportError(new bt.LDUnexpectedResponseError((n&&n.message,n.message))),t()})),{}}var At="goalsReady",jt={fetchGoals:{default:!0},hash:{type:"string"},eventProcessor:{type:"object"},eventUrlTransformer:{type:"function"},disableSyncEventPost:{default:!1}};function Ft(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=function(e){var t,n={userAgentHeaderName:"X-LaunchDarkly-User-Agent",synchronousFlush:!1};if(window.XMLHttpRequest){var r=e&&e.disableSyncEventPost;n.httpRequest=function(e,t,o,i){var a=n.synchronousFlush&!r;return n.synchronousFlush=!1,It(e,t,o,i,a)}}n.httpAllowsPost=function(){return void 0===t&&(t=!!window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest),t},n.httpFallbackPing=function(e){(new window.Image).src=e};var o,i=e&&e.eventUrlTransformer;n.getCurrentUrl=function(){return i?i(window.location.href):window.location.href},n.isDoNotTrack=function(){var e;return 1===(e=window.navigator&&void 0!==window.navigator.doNotTrack?window.navigator.doNotTrack:window.navigator&&void 0!==window.navigator.msDoNotTrack?window.navigator.msDoNotTrack:window.doNotTrack)||!0===e||"1"===e||"yes"===e};try{window.localStorage&&(n.localStorage={get:function(e){return new Promise((function(t){t(window.localStorage.getItem(e))}))},set:function(e,t){return new Promise((function(n){window.localStorage.setItem(e,t),n()}))},clear:function(e){return new Promise((function(t){window.localStorage.removeItem(e),t()}))}})}catch(e){n.localStorage=null}if(e&&e.useReport&&"function"==typeof window.EventSourcePolyfill&&window.EventSourcePolyfill.supportedOptions&&window.EventSourcePolyfill.supportedOptions.method?(n.eventSourceAllowsReport=!0,o=window.EventSourcePolyfill):(n.eventSourceAllowsReport=!1,o=window.EventSource),window.EventSource){var a=3e5;n.eventSourceFactory=function(e,t){var n=Dt(Dt({},{heartbeatTimeout:a,silentTimeout:a,skipDefaultHeaders:!0}),t);return new o(e,n)},n.eventSourceIsActive=function(e){return e.readyState===window.EventSource.OPEN||e.readyState===window.EventSource.CONNECTING}}return n.userAgent="JSClient",n.version="3.1.4",n.diagnosticSdkData={name:"js-client-sdk",version:"3.1.4"},n.diagnosticPlatformData={name:"JS"},n.diagnosticUseCombinedEvent=!0,n}(n),o=wt(e,t,n,r,jt),i=o.client,a=o.options,s=o.emitter,c=new Promise((function(e){var t=s.on(At,(function(){s.off(At,t),e()}))}));i.waitUntilGoalsReady=function(){return c},a.fetchGoals?Rt(o,(function(){return s.emit(At)})):s.emit(At),"complete"!==document.readyState?window.addEventListener("load",o.start):o.start();var u=function(){r.synchronousFlush=!0,i.flush().catch((function(){})),r.synchronousFlush=!1};return document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&u()})),window.addEventListener("pagehide",u),i}var Nt=Pt,$t=void 0,Vt="3.1.4";var Ht={initialize:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return console&&console.warn&&console.warn(kt.deprecated("default export","named LDClient export")),Ft(e,t,n)},version:Vt};
//# sourceMappingURL=ldclient.es.js.map


/***/ }),

/***/ "../../node_modules/react-ga4/dist/format.js":
/*!***************************************************!*\
  !*** ../../node_modules/react-ga4/dist/format.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, exports) => {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = format;
var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;
function toTitleCase(string) {
  return string.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g, function (match, index, title) {
    if (index > 0 && index + match.length !== title.length && match.search(smallWords) > -1 && title.charAt(index - 2) !== ":" && (title.charAt(index + match.length) !== "-" || title.charAt(index - 1) === "-") && title.charAt(index - 1).search(/[^\s-]/) < 0) {
      return match.toLowerCase();
    }
    if (match.substr(1).search(/[A-Z]|\../) > -1) {
      return match;
    }
    return match.charAt(0).toUpperCase() + match.substr(1);
  });
}

// See if s could be an email address. We don't want to send personal data like email.
// https://support.google.com/analytics/answer/2795983?hl=en
function mightBeEmail(s) {
  // There's no point trying to validate rfc822 fully, just look for ...@...
  return typeof s === "string" && s.indexOf("@") !== -1;
}
var redacted = "REDACTED (Potential Email Address)";
function redactEmail(string) {
  if (mightBeEmail(string)) {
    console.warn("This arg looks like an email address, redacting.");
    return redacted;
  }
  return string;
}
function format() {
  var s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  var titleCase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  var redactingEmail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  var _str = s || "";
  if (titleCase) {
    _str = toTitleCase(s);
  }
  if (redactingEmail) {
    _str = redactEmail(_str);
  }
  return _str;
}

/***/ }),

/***/ "../../node_modules/react-ga4/dist/ga4.js":
/*!************************************************!*\
  !*** ../../node_modules/react-ga4/dist/ga4.js ***!
  \************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.GA4 = void 0;
var _gtag = _interopRequireDefault(__webpack_require__(/*! ./gtag */ "../../node_modules/react-ga4/dist/gtag.js"));
var _format = _interopRequireDefault(__webpack_require__(/*! ./format */ "../../node_modules/react-ga4/dist/format.js"));
var _excluded = ["eventCategory", "eventAction", "eventLabel", "eventValue", "hitType"],
  _excluded2 = ["title", "location"],
  _excluded3 = ["page", "hitType"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
/*
Links
https://developers.google.com/gtagjs/reference/api
https://developers.google.com/tag-platform/gtagjs/reference
*/
/**
 * @typedef GaOptions
 * @type {Object}
 * @property {boolean} [cookieUpdate=true]
 * @property {number} [cookieExpires=63072000] Default two years
 * @property {string} [cookieDomain="auto"]
 * @property {string} [cookieFlags]
 * @property {string} [userId]
 * @property {string} [clientId]
 * @property {boolean} [anonymizeIp]
 * @property {string} [contentGroup1]
 * @property {string} [contentGroup2]
 * @property {string} [contentGroup3]
 * @property {string} [contentGroup4]
 * @property {string} [contentGroup5]
 * @property {boolean} [allowAdFeatures=true]
 * @property {boolean} [allowAdPersonalizationSignals]
 * @property {boolean} [nonInteraction]
 * @property {string} [page]
 */
/**
 * @typedef UaEventOptions
 * @type {Object}
 * @property {string} action
 * @property {string} category
 * @property {string} [label]
 * @property {number} [value]
 * @property {boolean} [nonInteraction]
 * @property {('beacon'|'xhr'|'image')} [transport]
 */
/**
 * @typedef InitOptions
 * @type {Object}
 * @property {string} trackingId
 * @property {GaOptions|any} [gaOptions]
 * @property {Object} [gtagOptions] New parameter
 */
var GA4 = /*#__PURE__*/function () {
  function GA4() {
    var _this = this;
    _classCallCheck(this, GA4);
    _defineProperty(this, "reset", function () {
      _this.isInitialized = false;
      _this._testMode = false;
      _this._currentMeasurementId;
      _this._hasLoadedGA = false;
      _this._isQueuing = false;
      _this._queueGtag = [];
    });
    _defineProperty(this, "_gtag", function () {
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      if (!_this._testMode) {
        if (_this._isQueuing) {
          _this._queueGtag.push(args);
        } else {
          _gtag["default"].apply(void 0, args);
        }
      } else {
        _this._queueGtag.push(args);
      }
    });
    _defineProperty(this, "_loadGA", function (GA_MEASUREMENT_ID, nonce) {
      var gtagUrl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "https://www.googletagmanager.com/gtag/js";
      if (typeof window === "undefined" || typeof document === "undefined") {
        return;
      }
      if (!_this._hasLoadedGA) {
        // Global Site Tag (gtag.js) - Google Analytics
        var script = document.createElement("script");
        script.async = true;
        script.src = "".concat(gtagUrl, "?id=").concat(GA_MEASUREMENT_ID);
        if (nonce) {
          script.setAttribute("nonce", nonce);
        }
        document.body.appendChild(script);
        window.dataLayer = window.dataLayer || [];
        window.gtag = function gtag() {
          window.dataLayer.push(arguments);
        };
        _this._hasLoadedGA = true;
      }
    });
    _defineProperty(this, "_toGtagOptions", function (gaOptions) {
      if (!gaOptions) {
        return;
      }
      var mapFields = {
        // Old https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#cookieUpdate
        // New https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id#cookie_update
        cookieUpdate: "cookie_update",
        cookieExpires: "cookie_expires",
        cookieDomain: "cookie_domain",
        cookieFlags: "cookie_flags",
        // must be in set method?
        userId: "user_id",
        clientId: "client_id",
        anonymizeIp: "anonymize_ip",
        // https://support.google.com/analytics/answer/2853546?hl=en#zippy=%2Cin-this-article
        contentGroup1: "content_group1",
        contentGroup2: "content_group2",
        contentGroup3: "content_group3",
        contentGroup4: "content_group4",
        contentGroup5: "content_group5",
        // https://support.google.com/analytics/answer/9050852?hl=en
        allowAdFeatures: "allow_google_signals",
        allowAdPersonalizationSignals: "allow_ad_personalization_signals",
        nonInteraction: "non_interaction",
        page: "page_path",
        hitCallback: "event_callback"
      };
      var gtagOptions = Object.entries(gaOptions).reduce(function (prev, _ref) {
        var _ref2 = _slicedToArray(_ref, 2),
          key = _ref2[0],
          value = _ref2[1];
        if (mapFields[key]) {
          prev[mapFields[key]] = value;
        } else {
          prev[key] = value;
        }
        return prev;
      }, {});
      return gtagOptions;
    });
    _defineProperty(this, "initialize", function (GA_MEASUREMENT_ID) {
      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      if (!GA_MEASUREMENT_ID) {
        throw new Error("Require GA_MEASUREMENT_ID");
      }
      var initConfigs = typeof GA_MEASUREMENT_ID === "string" ? [{
        trackingId: GA_MEASUREMENT_ID
      }] : GA_MEASUREMENT_ID;
      _this._currentMeasurementId = initConfigs[0].trackingId;
      var gaOptions = options.gaOptions,
        gtagOptions = options.gtagOptions,
        nonce = options.nonce,
        _options$testMode = options.testMode,
        testMode = _options$testMode === void 0 ? false : _options$testMode,
        gtagUrl = options.gtagUrl;
      _this._testMode = testMode;
      if (!testMode) {
        _this._loadGA(_this._currentMeasurementId, nonce, gtagUrl);
      }
      if (!_this.isInitialized) {
        _this._gtag("js", new Date());
        initConfigs.forEach(function (config) {
          var mergedGtagOptions = _objectSpread(_objectSpread(_objectSpread({}, _this._toGtagOptions(_objectSpread(_objectSpread({}, gaOptions), config.gaOptions))), gtagOptions), config.gtagOptions);
          if (Object.keys(mergedGtagOptions).length) {
            _this._gtag("config", config.trackingId, mergedGtagOptions);
          } else {
            _this._gtag("config", config.trackingId);
          }
        });
      }
      _this.isInitialized = true;
      if (!testMode) {
        var queues = _toConsumableArray(_this._queueGtag);
        _this._queueGtag = [];
        _this._isQueuing = false;
        while (queues.length) {
          var queue = queues.shift();
          _this._gtag.apply(_this, _toConsumableArray(queue));
          if (queue[0] === "get") {
            _this._isQueuing = true;
          }
        }
      }
    });
    _defineProperty(this, "set", function (fieldsObject) {
      if (!fieldsObject) {
        console.warn("`fieldsObject` is required in .set()");
        return;
      }
      if (_typeof(fieldsObject) !== "object") {
        console.warn("Expected `fieldsObject` arg to be an Object");
        return;
      }
      if (Object.keys(fieldsObject).length === 0) {
        console.warn("empty `fieldsObject` given to .set()");
      }
      _this._gaCommand("set", fieldsObject);
    });
    _defineProperty(this, "_gaCommandSendEvent", function (eventCategory, eventAction, eventLabel, eventValue, fieldsObject) {
      _this._gtag("event", eventAction, _objectSpread(_objectSpread({
        event_category: eventCategory,
        event_label: eventLabel,
        value: eventValue
      }, fieldsObject && {
        non_interaction: fieldsObject.nonInteraction
      }), _this._toGtagOptions(fieldsObject)));
    });
    _defineProperty(this, "_gaCommandSendEventParameters", function () {
      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        args[_key2] = arguments[_key2];
      }
      if (typeof args[0] === "string") {
        _this._gaCommandSendEvent.apply(_this, _toConsumableArray(args.slice(1)));
      } else {
        var _args$ = args[0],
          eventCategory = _args$.eventCategory,
          eventAction = _args$.eventAction,
          eventLabel = _args$.eventLabel,
          eventValue = _args$.eventValue,
          hitType = _args$.hitType,
          rest = _objectWithoutProperties(_args$, _excluded);
        _this._gaCommandSendEvent(eventCategory, eventAction, eventLabel, eventValue, rest);
      }
    });
    _defineProperty(this, "_gaCommandSendTiming", function (timingCategory, timingVar, timingValue, timingLabel) {
      _this._gtag("event", "timing_complete", {
        name: timingVar,
        value: timingValue,
        event_category: timingCategory,
        event_label: timingLabel
      });
    });
    _defineProperty(this, "_gaCommandSendPageview", function (page, fieldsObject) {
      if (fieldsObject && Object.keys(fieldsObject).length) {
        var _this$_toGtagOptions = _this._toGtagOptions(fieldsObject),
          title = _this$_toGtagOptions.title,
          location = _this$_toGtagOptions.location,
          rest = _objectWithoutProperties(_this$_toGtagOptions, _excluded2);
        _this._gtag("event", "page_view", _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, page && {
          page_path: page
        }), title && {
          page_title: title
        }), location && {
          page_location: location
        }), rest));
      } else if (page) {
        _this._gtag("event", "page_view", {
          page_path: page
        });
      } else {
        _this._gtag("event", "page_view");
      }
    });
    _defineProperty(this, "_gaCommandSendPageviewParameters", function () {
      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
        args[_key3] = arguments[_key3];
      }
      if (typeof args[0] === "string") {
        _this._gaCommandSendPageview.apply(_this, _toConsumableArray(args.slice(1)));
      } else {
        var _args$2 = args[0],
          page = _args$2.page,
          hitType = _args$2.hitType,
          rest = _objectWithoutProperties(_args$2, _excluded3);
        _this._gaCommandSendPageview(page, rest);
      }
    });
    _defineProperty(this, "_gaCommandSend", function () {
      for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
        args[_key4] = arguments[_key4];
      }
      var hitType = typeof args[0] === "string" ? args[0] : args[0].hitType;
      switch (hitType) {
        case "event":
          _this._gaCommandSendEventParameters.apply(_this, args);
          break;
        case "pageview":
          _this._gaCommandSendPageviewParameters.apply(_this, args);
          break;
        case "timing":
          _this._gaCommandSendTiming.apply(_this, _toConsumableArray(args.slice(1)));
          break;
        case "screenview":
        case "transaction":
        case "item":
        case "social":
        case "exception":
          console.warn("Unsupported send command: ".concat(hitType));
          break;
        default:
          console.warn("Send command doesn't exist: ".concat(hitType));
      }
    });
    _defineProperty(this, "_gaCommandSet", function () {
      for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
        args[_key5] = arguments[_key5];
      }
      if (typeof args[0] === "string") {
        args[0] = _defineProperty({}, args[0], args[1]);
      }
      _this._gtag("set", _this._toGtagOptions(args[0]));
    });
    _defineProperty(this, "_gaCommand", function (command) {
      for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
        args[_key6 - 1] = arguments[_key6];
      }
      switch (command) {
        case "send":
          _this._gaCommandSend.apply(_this, args);
          break;
        case "set":
          _this._gaCommandSet.apply(_this, args);
          break;
        default:
          console.warn("Command doesn't exist: ".concat(command));
      }
    });
    _defineProperty(this, "ga", function () {
      for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
        args[_key7] = arguments[_key7];
      }
      if (typeof args[0] === "string") {
        _this._gaCommand.apply(_this, args);
      } else {
        var readyCallback = args[0];
        _this._gtag("get", _this._currentMeasurementId, "client_id", function (clientId) {
          _this._isQueuing = false;
          var queues = _this._queueGtag;
          readyCallback({
            get: function get(property) {
              return property === "clientId" ? clientId : property === "trackingId" ? _this._currentMeasurementId : property === "apiVersion" ? "1" : undefined;
            }
          });
          while (queues.length) {
            var queue = queues.shift();
            _this._gtag.apply(_this, _toConsumableArray(queue));
          }
        });
        _this._isQueuing = true;
      }
      return _this.ga;
    });
    _defineProperty(this, "event", function (optionsOrName, params) {
      if (typeof optionsOrName === "string") {
        _this._gtag("event", optionsOrName, _this._toGtagOptions(params));
      } else {
        var action = optionsOrName.action,
          category = optionsOrName.category,
          label = optionsOrName.label,
          value = optionsOrName.value,
          nonInteraction = optionsOrName.nonInteraction,
          transport = optionsOrName.transport;
        if (!category || !action) {
          console.warn("args.category AND args.action are required in event()");
          return;
        }

        // Required Fields
        var fieldObject = {
          hitType: "event",
          eventCategory: (0, _format["default"])(category),
          eventAction: (0, _format["default"])(action)
        };

        // Optional Fields
        if (label) {
          fieldObject.eventLabel = (0, _format["default"])(label);
        }
        if (typeof value !== "undefined") {
          if (typeof value !== "number") {
            console.warn("Expected `args.value` arg to be a Number.");
          } else {
            fieldObject.eventValue = value;
          }
        }
        if (typeof nonInteraction !== "undefined") {
          if (typeof nonInteraction !== "boolean") {
            console.warn("`args.nonInteraction` must be a boolean.");
          } else {
            fieldObject.nonInteraction = nonInteraction;
          }
        }
        if (typeof transport !== "undefined") {
          if (typeof transport !== "string") {
            console.warn("`args.transport` must be a string.");
          } else {
            if (["beacon", "xhr", "image"].indexOf(transport) === -1) {
              console.warn("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`");
            }
            fieldObject.transport = transport;
          }
        }
        _this._gaCommand("send", fieldObject);
      }
    });
    _defineProperty(this, "send", function (fieldObject) {
      _this._gaCommand("send", fieldObject);
    });
    this.reset();
  }
  _createClass(GA4, [{
    key: "gtag",
    value: function gtag() {
      this._gtag.apply(this, arguments);
    }
  }]);
  return GA4;
}();
exports.GA4 = GA4;
var _default = new GA4();
exports["default"] = _default;

/***/ }),

/***/ "../../node_modules/react-ga4/dist/gtag.js":
/*!*************************************************!*\
  !*** ../../node_modules/react-ga4/dist/gtag.js ***!
  \*************************************************/
/***/ ((__unused_webpack_module, exports) => {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var gtag = function gtag() {
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
    args[_key] = arguments[_key];
  }
  if (typeof window !== "undefined") {
    var _window;
    if (typeof window.gtag === "undefined") {
      window.dataLayer = window.dataLayer || [];
      window.gtag = function gtag() {
        window.dataLayer.push(arguments);
      };
    }
    (_window = window).gtag.apply(_window, args);
  }
};
var _default = gtag;
exports["default"] = _default;

/***/ }),

/***/ "../../node_modules/react-ga4/dist/index.js":
/*!**************************************************!*\
  !*** ../../node_modules/react-ga4/dist/index.js ***!
  \**************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {



function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.ReactGAImplementation = void 0;
var _ga = _interopRequireWildcard(__webpack_require__(/*! ./ga4 */ "../../node_modules/react-ga4/dist/ga4.js"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var ReactGAImplementation = _ga.GA4;
exports.ReactGAImplementation = ReactGAImplementation;
var _default = _ga["default"];
exports["default"] = _default;

/***/ }),

/***/ "../../node_modules/reactjs-heap/dist/index.es.js":
/*!********************************************************!*\
  !*** ../../node_modules/reactjs-heap/dist/index.es.js ***!
  \********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
var DEFAULT_SCRIPT_ID = 'reactjs-heap';
/**
 * Provides the Heap script to inject.
 */
var getHeapScript = function (id) { return "\n  window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=document.createElement(\"script\");r.type=\"text/javascript\",r.async=!0,r.src=\"https://cdn.heapanalytics.com/js/heap-\"+e+\".js\";var a=document.getElementsByTagName(\"script\")[0];a.parentNode.insertBefore(r,a);for(var n=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=[\"addEventProperties\",\"addUserProperties\",\"clearEventProperties\",\"identify\",\"resetIdentity\",\"removeEventProperty\",\"setEventProperties\",\"track\",\"unsetEventProperty\"],o=0;o<p.length;o++)heap[p[o]]=n(p[o])};\n  heap.load(\"" + id + "\");\n"; };
/**
 * Initializes Heap tracking.
 */
var initialize = function (id) {
    if (!id) {
        throw new Error('You need to provide your Heap Analytics ID.');
    }
    if (!document) {
        return;
    }
    var hasScript = !!document.getElementById(DEFAULT_SCRIPT_ID);
    if (hasScript) {
        return;
    }
    var script = document.createElement('script');
    script.innerHTML = getHeapScript(id);
    script.id = DEFAULT_SCRIPT_ID;
    script.async = true;
    document.body.appendChild(script);
};
/**
 * Object for manipulating Heap Analytics.
 */
var ReactHeap = {
    initialize: initialize,
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ReactHeap);
//# sourceMappingURL=index.es.js.map


/***/ })

}]);
//# sourceMappingURL=vendors-node_modules_datadog_browser-logs_esm_entries_main_js-node_modules_launchdarkly-js-cl-2eae17.fc9305513dcb680c2f86.js.map