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5zB,MAAAA,CAAIE,UAAWT,EAAO+0B,eACrB,kBAAC3D,EAAAA,WAAUA,CAACC,OAAQC,EAAAA,eAAe2C,QACjC,kBAAC1zB,MAAAA,CAAIE,UAAU,iBACb,kBAAC8zB,GAAMA,YASzB","sources":["webpack://grafana-pyroscope-app/webpack/runtime/load script","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/utils/logLevels.js","webpack://grafana-pyroscope-app/../node_modules/object-assign/index.js","webpack://grafana-pyroscope-app/../node_modules/prop-types/factoryWithThrowingShims.js","webpack://grafana-pyroscope-app/../node_modules/prop-types/index.js","webpack://grafana-pyroscope-app/../node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://grafana-pyroscope-app/../node_modules/react-fast-compare/index.js","webpack://grafana-pyroscope-app/../node_modules/react-side-effect/lib/index.js","webpack://grafana-pyroscope-app/../node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://grafana-pyroscope-app/../node_modules/react/jsx-runtime.js","webpack://grafana-pyroscope-app/./constants.ts","webpack://grafana-pyroscope-app/./shared/domain/noOp.ts","webpack://grafana-pyroscope-app/./shared/infrastructure/http/ApiClient.ts","webpack://grafana-pyroscope-app/./shared/infrastructure/http/HttpClientError.ts","webpack://grafana-pyroscope-app/./shared/infrastructure/http/HttpClient.ts","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/transports/const.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/utils/date.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/utils/is.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/utils/deepEqual.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/api/exceptions/const.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/api/exceptions/initialize.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/api/logs/const.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/api/initialize.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/api/traces/initialize.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/api/meta/initialize.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/api/logs/initialize.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/api/measurements/initialize.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/api/events/initialize.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/utils/noop.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/internalLogger/const.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/unpatchedConsole/const.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/internalLogger/createInternalLogger.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/internalLogger/initialize.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/globalObject/globalObject.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/version.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/sdk/const.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/sdk/registerFaro.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/sdk/internalFaroGlobalObject.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/sdk/faroGlobalObject.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/transports/batchExecutor.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/transports/initialize.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/unpatchedConsole/initialize.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/initialize.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/metas/initialize.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/instrumentations/initialize.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/metas/registerInitial.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/utils/sourceMaps.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/transports/registerInitial.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/instrumentations/registerInitial.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/config/const.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/consts.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/errors/stackFrames/const.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/errors/stackFrames/buildStackFrame.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/errors/stackFrames/getDataFromSafariExtensions.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/errors/stackFrames/getStackFramesFromError.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/errors/stackFrames/parseStacktrace.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/session/sessionManager/sessionConstants.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/consts.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/metas/const.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/metas/browser/meta.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/metas/page/meta.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/metas/k6/meta.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/extensions/baseExtension.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/transports/base.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/transports/utils.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/utils/throttle.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/utils/webStorage.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/session/sessionManager/sampling.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/utils/shortId.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/session/sessionManager/sessionManagerUtils.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/session/sessionManager/PersistentSessionsManager.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/session/sessionManager/VolatileSessionManager.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/session/sessionManager/getSessionManagerByConfig.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/transports/fetch/transport.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/utils/promiseBuffer.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/instrumentations/base.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/errors/const.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/errors/getErrorDetails.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/errors/registerOnerror.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/errors/getValueAndTypeFromMessage.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/errors/registerOnunhandledrejection.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/errors/instrumentation.js","webpack://grafana-pyroscope-app/../node_modules/web-vitals/dist/web-vitals.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/webVitals/webVitalsBasic.js","webpack://grafana-pyroscope-app/../node_modules/web-vitals/dist/web-vitals.attribution.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/instrumentationConstants.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/webVitals/webVitalsWithAttribution.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/webVitals/instrumentation.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-core/dist/esm/semantic.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/session/instrumentation.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/metas/session/createSession.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/view/instrumentation.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/performance/performanceConstants.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/performance/performanceUtils.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/performance/resource.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/performance/instrumentation.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/performance/navigation.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/instrumentations/console/instrumentation.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/config/getWebInstrumentations.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/initialize.js","webpack://grafana-pyroscope-app/../node_modules/@grafana/faro-web-sdk/dist/esm/config/makeCoreConfig.js","webpack://grafana-pyroscope-app/./shared/infrastructure/tracking/faro/faro-environments.ts","webpack://grafana-pyroscope-app/./shared/infrastructure/tracking/faro/faro.ts","webpack://grafana-pyroscope-app/./shared/infrastructure/tracking/faro/getFaroEnvironment.ts","webpack://grafana-pyroscope-app/./shared/infrastructure/tracking/getEnvironment.ts","webpack://grafana-pyroscope-app/./shared/infrastructure/tracking/logger.ts","webpack://grafana-pyroscope-app/./shared/infrastructure/userStorage.ts","webpack://grafana-pyroscope-app/./shared/ui/InlineBanner.tsx","webpack://grafana-pyroscope-app/./shared/components/QueryAnalysisTooltip/QueryAnalysisTooltip.tsx","webpack://grafana-pyroscope-app/../node_modules/react-helmet/es/Helmet.js","webpack://grafana-pyroscope-app/./shared/ui/PageTitle.tsx","webpack://grafana-pyroscope-app/./shared/ui/PluginInfo.tsx","webpack://grafana-pyroscope-app/./shared/ui/PyroscopeLogo.tsx","webpack://grafana-pyroscope-app/./version.ts","webpack://grafana-pyroscope-app/../node_modules/ua-parser-js/src/ua-parser.js","webpack://grafana-pyroscope-app/external amd \"@emotion/css\"","webpack://grafana-pyroscope-app/external amd \"@grafana/data\"","webpack://grafana-pyroscope-app/external amd \"@grafana/runtime\"","webpack://grafana-pyroscope-app/external amd \"@grafana/ui\"","webpack://grafana-pyroscope-app/external amd \"d3\"","webpack://grafana-pyroscope-app/external amd \"lodash\"","webpack://grafana-pyroscope-app/external amd \"module\"","webpack://grafana-pyroscope-app/external amd \"react\"","webpack://grafana-pyroscope-app/external amd \"react-dom\"","webpack://grafana-pyroscope-app/external amd \"react-router\"","webpack://grafana-pyroscope-app/external amd \"rxjs\"","webpack://grafana-pyroscope-app/../node_modules/@tanstack/query-core/build/modern/focusManager.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/query-core/build/modern/mutation.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/query-core/build/modern/notifyManager.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/query-core/build/modern/onlineManager.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/query-core/build/modern/query.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/query-core/build/modern/removable.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/query-core/build/modern/retryer.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/query-core/build/modern/subscribable.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/query-core/build/modern/utils.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/query-core/build/modern/queryObserver.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/react-query/build/modern/isRestoring.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/react-query/build/modern/suspense.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/react-query/build/modern/useQuery.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/react-query/build/modern/useBaseQuery.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/react-query/build/modern/utils.js","webpack://grafana-pyroscope-app/webpack/bootstrap","webpack://grafana-pyroscope-app/webpack/runtime/amd options","webpack://grafana-pyroscope-app/webpack/runtime/compat get default export","webpack://grafana-pyroscope-app/webpack/runtime/define property getters","webpack://grafana-pyroscope-app/webpack/runtime/ensure chunk","webpack://grafana-pyroscope-app/webpack/runtime/get javascript chunk filename","webpack://grafana-pyroscope-app/webpack/runtime/global","webpack://grafana-pyroscope-app/webpack/runtime/hasOwnProperty shorthand","webpack://grafana-pyroscope-app/webpack/runtime/make namespace object","webpack://grafana-pyroscope-app/webpack/runtime/node module decorator","webpack://grafana-pyroscope-app/webpack/runtime/publicPath","webpack://grafana-pyroscope-app/webpack/runtime/compat","webpack://grafana-pyroscope-app/webpack/runtime/jsonp chunk loading","webpack://grafana-pyroscope-app/./node_modules/grafana-public-path.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/query-core/build/modern/queryCache.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/query-core/build/modern/mutationCache.js","webpack://grafana-pyroscope-app/../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js","webpack://grafana-pyroscope-app/./shared/infrastructure/react-query/queryClient.ts","webpack://grafana-pyroscope-app/../node_modules/@tanstack/query-core/build/modern/queryClient.js","webpack://grafana-pyroscope-app/./app/components/Onboarding/infrastructure/statsApiClient.ts","webpack://grafana-pyroscope-app/./app/components/Onboarding/domain/useOnboarding.tsx","webpack://grafana-pyroscope-app/./app/components/Onboarding/infrastructure/useFetchTenantStats.ts","webpack://grafana-pyroscope-app/./app/components/Onboarding/ui/EmptyLoadingPage.tsx","webpack://grafana-pyroscope-app/./app/components/Onboarding/ui/StyledLink.tsx","webpack://grafana-pyroscope-app/./app/components/Onboarding/ui/NoDataSourcePage.tsx","webpack://grafana-pyroscope-app/./app/components/Onboarding/domain/useOnboardingModal.tsx","webpack://grafana-pyroscope-app/./app/components/Onboarding/infrastructure/useFetchInstances.tsx","webpack://grafana-pyroscope-app/./app/components/Onboarding/ui/OnboardingModal.tsx","webpack://grafana-pyroscope-app/./app/components/Onboarding/ui/OnboardingPage.tsx","webpack://grafana-pyroscope-app/./app/components/Onboarding/Onboarding.tsx","webpack://grafana-pyroscope-app/./app/Routes.tsx","webpack://grafana-pyroscope-app/./app/ui/ErrorPage.tsx","webpack://grafana-pyroscope-app/./app/App.tsx","webpack://grafana-pyroscope-app/./links.ts","webpack://grafana-pyroscope-app/./module.ts"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"grafana-pyroscope-app:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t\tif (script.src.indexOf(window.location.origin + '/') !== 0) {\n\t\t\tscript.crossOrigin = \"anonymous\";\n\t\t}\n\t\tscript.integrity = __webpack_require__.sriHashes[chunkId];\n\t\tscript.crossOrigin = \"anonymous\";\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","export var LogLevel;\n(function (LogLevel) {\n LogLevel[\"TRACE\"] = \"trace\";\n LogLevel[\"DEBUG\"] = \"debug\";\n LogLevel[\"INFO\"] = \"info\";\n LogLevel[\"LOG\"] = \"log\";\n LogLevel[\"WARN\"] = \"warn\";\n LogLevel[\"ERROR\"] = \"error\";\n})(LogLevel || (LogLevel = {}));\nexport const defaultLogLevel = LogLevel.LOG;\nexport const allLogLevels = [\n LogLevel.TRACE,\n LogLevel.DEBUG,\n LogLevel.INFO,\n LogLevel.LOG,\n LogLevel.WARN,\n LogLevel.ERROR,\n];\n//# sourceMappingURL=logLevels.js.map","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\n\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;\n\n// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.3\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n // START: Modifications:\n // Apply guards for `Object.create(null)` handling. See:\n // - https://github.com/FormidableLabs/react-fast-compare/issues/64\n // - https://github.com/epoberezkin/fast-deep-equal/issues/49\n if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();\n // END: Modifications\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (((error.message || '').match(/stack|recursion/i))) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n","'use strict';\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar React = require('react');\nvar React__default = _interopDefault(React);\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n\n if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {\n throw new Error('Expected mapStateOnServer to either be undefined or a function.');\n }\n\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n\n return function wrap(WrappedComponent) {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n\n var mountedInstances = [];\n var state;\n\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n\n if (SideEffect.canUseDOM) {\n handleStateChangeOnClient(state);\n } else if (mapStateOnServer) {\n state = mapStateOnServer(state);\n }\n }\n\n var SideEffect =\n /*#__PURE__*/\n function (_PureComponent) {\n _inheritsLoose(SideEffect, _PureComponent);\n\n function SideEffect() {\n return _PureComponent.apply(this, arguments) || this;\n }\n\n // Try to use displayName of wrapped component\n // Expose canUseDOM so tests can monkeypatch it\n SideEffect.peek = function peek() {\n return state;\n };\n\n SideEffect.rewind = function rewind() {\n if (SideEffect.canUseDOM) {\n throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');\n }\n\n var recordedState = state;\n state = undefined;\n mountedInstances = [];\n return recordedState;\n };\n\n var _proto = SideEffect.prototype;\n\n _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {\n mountedInstances.push(this);\n emitChange();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n\n _proto.render = function render() {\n return React__default.createElement(WrappedComponent, this.props);\n };\n\n return SideEffect;\n }(React.PureComponent);\n\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n\n _defineProperty(SideEffect, \"canUseDOM\", canUseDOM);\n\n return SideEffect;\n };\n}\n\nmodule.exports = withSideEffect;\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import plugin from './plugin.json';\n\nexport const PYROSCOPE_APP_ID = plugin.id;\n\nexport const PLUGIN_BASE_URL = `/a/${PYROSCOPE_APP_ID}`;\n\nexport enum ROUTES {\n EXPLORE = '/explore',\n ADHOC = '/ad-hoc',\n SETTINGS = '/settings',\n}\n","export const noOp = () => {};\n","import { DataSourceInstanceSettings, DataSourceJsonData } from '@grafana/data';\nimport { config } from '@grafana/runtime';\n\nimport { logger } from '../tracking/logger';\nimport { userStorage } from '../userStorage';\nimport { HttpClient } from './HttpClient';\n\nconst PYROSCOPE_DATA_SOURCES_TYPE = 'grafana-pyroscope-datasource';\nconst PYROSCOPE_URL_SEARCH_PARAM_NAME = 'var-dataSource'; // matches with the Scenes library\n\ntype CustomDataSourceJsonData = { overridesDefault: boolean };\ntype CustomDataSourceInstanceSettings = DataSourceInstanceSettings;\n\n/**\n * An HTTP client ready to fetch data from the plugin's backend\n */\nexport class ApiClient extends HttpClient {\n static getPyroscopeDataSources() {\n return Object.values(config.datasources).filter((ds) => ds.type === PYROSCOPE_DATA_SOURCES_TYPE);\n }\n\n static selectDefaultDataSource() {\n const pyroscopeDataSources = ApiClient.getPyroscopeDataSources() as CustomDataSourceInstanceSettings[];\n\n const uidFromUrl = new URL(window.location.href).searchParams.get(PYROSCOPE_URL_SEARCH_PARAM_NAME);\n const uidFromLocalStorage = userStorage.get(userStorage.KEYS.PROFILES_EXPLORER)?.dataSource;\n\n const defaultDataSource =\n pyroscopeDataSources.find((ds) => ds.uid === uidFromUrl) ||\n pyroscopeDataSources.find((ds) => ds.uid === uidFromLocalStorage) ||\n pyroscopeDataSources.find((ds) => ds.jsonData.overridesDefault) ||\n pyroscopeDataSources.find((ds) => ds.isDefault) ||\n pyroscopeDataSources[0];\n\n if (!defaultDataSource) {\n logger.warn(\n 'Cannot find any Pyroscope data source! Please add and configure a Pyroscope data source to your Grafana instance.'\n );\n\n // because we instantiate most of our API clients before exporting them,\n // we have to return a dummy data source to prevent the whole app to fail\n return { uid: 'no-data-source-configured' };\n }\n\n return defaultDataSource;\n }\n\n static getBaseUrl() {\n const pyroscopeDataSource = ApiClient.selectDefaultDataSource();\n\n let appSubUrl = config.appSubUrl || '';\n if (appSubUrl.at(-1) !== '/') {\n // ensures that the API pathname is appended correctly (appUrl seems to always have it but better to be extra careful)\n appSubUrl += '/';\n }\n\n return `${appSubUrl}api/datasources/proxy/uid/${pyroscopeDataSource.uid}`;\n }\n\n constructor() {\n super(ApiClient.getBaseUrl().toString(), {\n 'content-type': 'application/json',\n 'X-Grafana-Org-Id': String(config.bootData?.user?.orgId || ''),\n });\n }\n}\n","export class HttpClientError extends Error {\n response: Response;\n reason?: any;\n\n constructor(response: Response, responseJson?: Record) {\n let message = `HTTP ${response.status} (${response.statusText || '?'})`;\n\n if (responseJson?.message) {\n message = `${message} → ${responseJson.message}`;\n }\n\n super(message);\n\n this.response = response;\n }\n}\n","import { noOp } from '@shared/domain/noOp';\n\nimport { HttpClientError } from './HttpClientError';\n\nexport class HttpClient {\n baseUrl = '';\n defaultHeaders = {};\n abortController?: AbortController | null = null;\n\n constructor(baseUrl: string, defaultHeaders: Record = {}) {\n this.baseUrl = baseUrl;\n this.defaultHeaders = Object.freeze(defaultHeaders);\n }\n\n async fetch(pathname: string, options?: RequestInit) {\n this.abortController = new AbortController();\n const { signal } = this.abortController;\n\n const fullUrl = `${this.baseUrl}${pathname}`;\n const headers = { ...this.defaultHeaders, ...options?.headers };\n const fullOptions = {\n signal, // we allow signal to be passed as an option\n ...options,\n headers,\n };\n\n let response;\n\n try {\n response = await fetch(fullUrl, fullOptions);\n\n if (!response.ok) {\n throw new HttpClientError(response, await response.json().catch(noOp));\n }\n } catch (error) {\n if (this.isAbortError(error)) {\n (error as any).reason = options?.signal?.reason || signal.reason;\n }\n\n throw error;\n } finally {\n this.abortController = null;\n }\n\n return response;\n }\n\n abort(reason?: any) {\n if (this.abortController) {\n this.abortController.abort(reason);\n }\n }\n\n isAbortError(error: unknown) {\n return error instanceof DOMException && error.name === 'AbortError';\n }\n}\n","export var TransportItemType;\n(function (TransportItemType) {\n TransportItemType[\"EXCEPTION\"] = \"exception\";\n TransportItemType[\"LOG\"] = \"log\";\n TransportItemType[\"MEASUREMENT\"] = \"measurement\";\n TransportItemType[\"TRACE\"] = \"trace\";\n TransportItemType[\"EVENT\"] = \"event\";\n})(TransportItemType || (TransportItemType = {}));\nexport const transportItemTypeToBodyKey = {\n [TransportItemType.EXCEPTION]: 'exceptions',\n [TransportItemType.LOG]: 'logs',\n [TransportItemType.MEASUREMENT]: 'measurements',\n [TransportItemType.TRACE]: 'traces',\n [TransportItemType.EVENT]: 'events',\n};\n//# sourceMappingURL=const.js.map","export function dateNow() {\n return Date.now();\n}\nexport function getCurrentTimestamp() {\n return new Date().toISOString();\n}\nexport function timestampToIsoString(value) {\n return new Date(value).toISOString();\n}\n//# sourceMappingURL=date.js.map","export function isTypeof(value, type) {\n return typeof value === type;\n}\nexport function isToString(value, type) {\n return Object.prototype.toString.call(value) === `[object ${type}]`;\n}\nexport function isInstanceOf(value, reference) {\n try {\n return value instanceof reference;\n }\n catch (err) {\n return false;\n }\n}\nexport const isUndefined = ((value) => isTypeof(value, 'undefined'));\nexport const isNull = ((value) => isTypeof(value, 'null'));\nexport const isString = ((value) => isTypeof(value, 'string'));\nexport const isNumber = ((value) => (isTypeof(value, 'number') && !isNaN(value)) || isTypeof(value, 'bigint'));\nexport const isInt = ((value) => isNumber(value) && Number.isInteger(value));\nexport const isBoolean = ((value) => isTypeof(value, 'boolean'));\nexport const isSymbol = ((value) => isTypeof(value, 'symbol'));\nexport const isObject = ((value) => !isNull(value) && isTypeof(value, 'object'));\nexport const isFunction = ((value) => isTypeof(value, 'function'));\nexport const isArray = ((value) => isToString(value, 'Array'));\nexport const isRegExp = ((value) => isToString(value, 'RegExp'));\nexport const isThenable = ((value) => isFunction(value === null || value === void 0 ? void 0 : value.then));\nexport const isPrimitive = ((value) => !isObject(value) && !isFunction(value));\nexport const isEventDefined = typeof Event !== 'undefined';\nexport const isEvent = ((value) => isEventDefined && isInstanceOf(value, Event));\nexport const isErrorDefined = typeof Error !== 'undefined';\nexport const isError = ((value) => isErrorDefined && isInstanceOf(value, Error));\nexport const isErrorEvent = ((value) => isToString(value, 'ErrorEvent'));\nexport const isDomError = ((value) => isToString(value, 'DOMError'));\nexport const isDomException = ((value) => isToString(value, 'DOMException'));\nexport const isElementDefined = typeof Element !== 'undefined';\nexport const isElement = ((value) => isElementDefined && isInstanceOf(value, Element));\nexport const isMapDefined = typeof Map !== 'undefined';\nexport const isMap = ((value) => isMapDefined && isInstanceOf(value, Map));\nexport const isSyntheticEvent = ((value) => isObject(value) &&\n 'nativeEvent' in value &&\n 'preventDefault' in value &&\n 'stopPropagation' in value);\n//# sourceMappingURL=is.js.map","import { isArray, isObject, isTypeof } from './is';\n// This function was inspired by fast-deep-equal\n// fast-deep-equal has issues with Rollup and also it checks for some edge cases that we don't need\nexport function deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n // Using isTypeOf instead of isNumber as isNumber also checks against NaN\n if (isTypeof(a, 'number') && isNaN(a)) {\n return isTypeof(b, 'number') && isNaN(b);\n }\n const aIsArray = isArray(a);\n const bIsArray = isArray(b);\n if (aIsArray !== bIsArray) {\n return false;\n }\n if (aIsArray && bIsArray) {\n const length = a.length;\n if (length !== b.length) {\n return false;\n }\n for (let idx = length; idx-- !== 0;) {\n if (!deepEqual(a[idx], b[idx])) {\n return false;\n }\n }\n return true;\n }\n const aIsObject = isObject(a);\n const bIsObject = isObject(b);\n if (aIsObject !== bIsObject) {\n return false;\n }\n if (a && b && aIsObject && bIsObject) {\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n const aLength = aKeys.length;\n const bLength = bKeys.length;\n if (aLength !== bLength) {\n return false;\n }\n for (let aKey of aKeys) {\n if (!bKeys.includes(aKey)) {\n return false;\n }\n }\n for (let aKey of aKeys) {\n if (!deepEqual(a[aKey], b[aKey])) {\n return false;\n }\n }\n return true;\n }\n return false;\n}\n//# sourceMappingURL=deepEqual.js.map","export const defaultExceptionType = 'Error';\n//# sourceMappingURL=const.js.map","import { TransportItemType } from '../../transports';\nimport { deepEqual, getCurrentTimestamp, isNull } from '../../utils';\nimport { timestampToIsoString } from '../../utils/date';\nimport { defaultExceptionType } from './const';\nlet stacktraceParser;\nexport function initializeExceptionsAPI(_unpatchedConsole, internalLogger, config, metas, transports, tracesApi) {\n var _a;\n internalLogger.debug('Initializing exceptions API');\n let lastPayload = null;\n stacktraceParser = (_a = config.parseStacktrace) !== null && _a !== void 0 ? _a : stacktraceParser;\n const changeStacktraceParser = (newStacktraceParser) => {\n internalLogger.debug('Changing stacktrace parser');\n stacktraceParser = newStacktraceParser !== null && newStacktraceParser !== void 0 ? newStacktraceParser : stacktraceParser;\n };\n const getStacktraceParser = () => stacktraceParser;\n const pushError = (error, { skipDedupe, stackFrames, type, context, spanContext, timestampOverwriteMs } = {}) => {\n type = type || error.name || defaultExceptionType;\n const item = {\n meta: metas.value,\n payload: {\n type,\n value: error.message,\n timestamp: timestampOverwriteMs ? timestampToIsoString(timestampOverwriteMs) : getCurrentTimestamp(),\n trace: spanContext\n ? {\n trace_id: spanContext.traceId,\n span_id: spanContext.spanId,\n }\n : tracesApi.getTraceContext(),\n context: context !== null && context !== void 0 ? context : {},\n },\n type: TransportItemType.EXCEPTION,\n };\n stackFrames = stackFrames !== null && stackFrames !== void 0 ? stackFrames : (error.stack ? stacktraceParser === null || stacktraceParser === void 0 ? void 0 : stacktraceParser(error).frames : undefined);\n if (stackFrames === null || stackFrames === void 0 ? void 0 : stackFrames.length) {\n item.payload.stacktrace = {\n frames: stackFrames,\n };\n }\n const testingPayload = {\n type: item.payload.type,\n value: item.payload.value,\n stackTrace: item.payload.stacktrace,\n context: item.payload.context,\n };\n if (!skipDedupe && config.dedupe && !isNull(lastPayload) && deepEqual(testingPayload, lastPayload)) {\n internalLogger.debug('Skipping error push because it is the same as the last one\\n', item.payload);\n return;\n }\n lastPayload = testingPayload;\n internalLogger.debug('Pushing exception\\n', item);\n transports.execute(item);\n };\n changeStacktraceParser(config.parseStacktrace);\n return {\n changeStacktraceParser,\n getStacktraceParser,\n pushError,\n };\n}\n//# sourceMappingURL=initialize.js.map","export const defaultLogArgsSerializer = (args) => args\n .map((arg) => {\n try {\n return String(arg);\n }\n catch (err) {\n return '';\n }\n})\n .join(' ');\n//# sourceMappingURL=const.js.map","import { initializeEventsAPI } from './events';\nimport { initializeExceptionsAPI } from './exceptions';\nimport { initializeLogsAPI } from './logs';\nimport { initializeMeasurementsAPI } from './measurements';\nimport { initializeMetaAPI } from './meta';\nimport { initializeTracesAPI } from './traces';\nexport function initializeAPI(unpatchedConsole, internalLogger, config, metas, transports) {\n internalLogger.debug('Initializing API');\n const tracesApi = initializeTracesAPI(unpatchedConsole, internalLogger, config, metas, transports);\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, tracesApi), initializeExceptionsAPI(unpatchedConsole, internalLogger, config, metas, transports, tracesApi)), initializeMetaAPI(unpatchedConsole, internalLogger, config, metas, transports)), initializeLogsAPI(unpatchedConsole, internalLogger, config, metas, transports, tracesApi)), initializeMeasurementsAPI(unpatchedConsole, internalLogger, config, metas, transports, tracesApi)), initializeEventsAPI(unpatchedConsole, internalLogger, config, metas, transports, tracesApi));\n}\n//# sourceMappingURL=initialize.js.map","import { TransportItemType } from '../../transports';\nexport function initializeTracesAPI(_unpatchedConsole, internalLogger, _config, metas, transports) {\n internalLogger.debug('Initializing traces API');\n let otel = undefined;\n const initOTEL = (trace, context) => {\n internalLogger.debug('Initializing OpenTelemetry');\n otel = {\n trace,\n context,\n };\n };\n const getTraceContext = () => {\n const ctx = otel === null || otel === void 0 ? void 0 : otel.trace.getSpanContext(otel.context.active());\n return !ctx\n ? undefined\n : {\n trace_id: ctx.traceId,\n span_id: ctx.spanId,\n };\n };\n const pushTraces = (payload) => {\n try {\n const item = {\n type: TransportItemType.TRACE,\n payload,\n meta: metas.value,\n };\n internalLogger.debug('Pushing trace\\n', item);\n transports.execute(item);\n }\n catch (err) {\n internalLogger.error('Error pushing trace\\n', err);\n }\n };\n const getOTEL = () => otel;\n const isOTELInitialized = () => !!otel;\n return {\n getOTEL,\n getTraceContext,\n initOTEL,\n isOTELInitialized,\n pushTraces,\n };\n}\n//# sourceMappingURL=initialize.js.map","export function initializeMetaAPI(_unpatchedConsole, internalLogger, _config, metas, _transports) {\n internalLogger.debug('Initializing meta API');\n let metaSession = undefined;\n let metaUser = undefined;\n let metaView = undefined;\n const setUser = (user) => {\n if (metaUser) {\n metas.remove(metaUser);\n }\n metaUser = {\n user,\n };\n metas.add(metaUser);\n };\n const setSession = (session) => {\n if (metaSession) {\n metas.remove(metaSession);\n }\n metaSession = {\n session,\n };\n metas.add(metaSession);\n };\n const getSession = () => metas.value.session;\n const setView = (view) => {\n var _a;\n if (((_a = metaView === null || metaView === void 0 ? void 0 : metaView.view) === null || _a === void 0 ? void 0 : _a.name) === (view === null || view === void 0 ? void 0 : view.name)) {\n return;\n }\n const previousView = metaView;\n metaView = {\n view,\n };\n metas.add(metaView);\n if (previousView) {\n metas.remove(previousView);\n }\n };\n const getView = () => metas.value.view;\n return {\n setUser,\n resetUser: setUser,\n setSession,\n resetSession: setSession,\n getSession,\n setView,\n getView,\n };\n}\n//# sourceMappingURL=initialize.js.map","import { TransportItemType } from '../../transports';\nimport { deepEqual, defaultLogLevel, getCurrentTimestamp, isNull } from '../../utils';\nimport { timestampToIsoString } from '../../utils/date';\nimport { defaultLogArgsSerializer } from './const';\nexport function initializeLogsAPI(_unpatchedConsole, internalLogger, config, metas, transports, tracesApi) {\n var _a;\n internalLogger.debug('Initializing logs API');\n let lastPayload = null;\n const logArgsSerializer = (_a = config.logArgsSerializer) !== null && _a !== void 0 ? _a : defaultLogArgsSerializer;\n const pushLog = (args, { context, level, skipDedupe, spanContext, timestampOverwriteMs } = {}) => {\n try {\n const item = {\n type: TransportItemType.LOG,\n payload: {\n message: logArgsSerializer(args),\n level: level !== null && level !== void 0 ? level : defaultLogLevel,\n context: context !== null && context !== void 0 ? context : {},\n timestamp: timestampOverwriteMs ? timestampToIsoString(timestampOverwriteMs) : getCurrentTimestamp(),\n trace: spanContext\n ? {\n trace_id: spanContext.traceId,\n span_id: spanContext.spanId,\n }\n : tracesApi.getTraceContext(),\n },\n meta: metas.value,\n };\n const testingPayload = {\n message: item.payload.message,\n level: item.payload.level,\n context: item.payload.context,\n };\n if (!skipDedupe && config.dedupe && !isNull(lastPayload) && deepEqual(testingPayload, lastPayload)) {\n internalLogger.debug('Skipping log push because it is the same as the last one\\n', item.payload);\n return;\n }\n lastPayload = testingPayload;\n internalLogger.debug('Pushing log\\n', item);\n transports.execute(item);\n }\n catch (err) {\n internalLogger.error('Error pushing log\\n', err);\n }\n };\n return {\n pushLog,\n };\n}\n//# sourceMappingURL=initialize.js.map","import { TransportItemType } from '../../transports';\nimport { deepEqual, getCurrentTimestamp, isNull } from '../../utils';\nimport { timestampToIsoString } from '../../utils/date';\nexport function initializeMeasurementsAPI(_unpatchedConsole, internalLogger, config, metas, transports, tracesApi) {\n internalLogger.debug('Initializing measurements API');\n let lastPayload = null;\n const pushMeasurement = (payload, { skipDedupe, context, spanContext, timestampOverwriteMs } = {}) => {\n try {\n const item = {\n type: TransportItemType.MEASUREMENT,\n payload: Object.assign(Object.assign({}, payload), { trace: spanContext\n ? {\n trace_id: spanContext.traceId,\n span_id: spanContext.spanId,\n }\n : tracesApi.getTraceContext(), timestamp: timestampOverwriteMs ? timestampToIsoString(timestampOverwriteMs) : getCurrentTimestamp(), context: context !== null && context !== void 0 ? context : {} }),\n meta: metas.value,\n };\n const testingPayload = {\n type: item.payload.type,\n values: item.payload.values,\n context: item.payload.context,\n };\n if (!skipDedupe && config.dedupe && !isNull(lastPayload) && deepEqual(testingPayload, lastPayload)) {\n internalLogger.debug('Skipping measurement push because it is the same as the last one\\n', item.payload);\n return;\n }\n lastPayload = testingPayload;\n internalLogger.debug('Pushing measurement\\n', item);\n transports.execute(item);\n }\n catch (err) {\n internalLogger.error('Error pushing measurement\\n', err);\n }\n };\n return {\n pushMeasurement,\n };\n}\n//# sourceMappingURL=initialize.js.map","import { TransportItemType } from '../../transports';\nimport { deepEqual, getCurrentTimestamp, isNull } from '../../utils';\nimport { timestampToIsoString } from '../../utils/date';\nexport function initializeEventsAPI(_unpatchedConsole, internalLogger, config, metas, transports, tracesApi) {\n let lastPayload = null;\n const pushEvent = (name, attributes, domain, { skipDedupe, spanContext, timestampOverwriteMs } = {}) => {\n try {\n const item = {\n meta: metas.value,\n payload: {\n name,\n domain: domain !== null && domain !== void 0 ? domain : config.eventDomain,\n attributes,\n timestamp: timestampOverwriteMs ? timestampToIsoString(timestampOverwriteMs) : getCurrentTimestamp(),\n trace: spanContext\n ? {\n trace_id: spanContext.traceId,\n span_id: spanContext.spanId,\n }\n : tracesApi.getTraceContext(),\n },\n type: TransportItemType.EVENT,\n };\n const testingPayload = {\n name: item.payload.name,\n attributes: item.payload.attributes,\n domain: item.payload.domain,\n };\n if (!skipDedupe && config.dedupe && !isNull(lastPayload) && deepEqual(testingPayload, lastPayload)) {\n internalLogger.debug('Skipping event push because it is the same as the last one\\n', item.payload);\n return;\n }\n lastPayload = testingPayload;\n internalLogger.debug('Pushing event\\n', item);\n transports.execute(item);\n }\n catch (err) {\n internalLogger.error('Error pushing event', err);\n }\n };\n return {\n pushEvent,\n };\n}\n//# sourceMappingURL=initialize.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","import { noop } from '../utils';\nexport var InternalLoggerLevel;\n(function (InternalLoggerLevel) {\n InternalLoggerLevel[InternalLoggerLevel[\"OFF\"] = 0] = \"OFF\";\n InternalLoggerLevel[InternalLoggerLevel[\"ERROR\"] = 1] = \"ERROR\";\n InternalLoggerLevel[InternalLoggerLevel[\"WARN\"] = 2] = \"WARN\";\n InternalLoggerLevel[InternalLoggerLevel[\"INFO\"] = 3] = \"INFO\";\n InternalLoggerLevel[InternalLoggerLevel[\"VERBOSE\"] = 4] = \"VERBOSE\";\n})(InternalLoggerLevel || (InternalLoggerLevel = {}));\nexport const defaultInternalLoggerPrefix = 'Faro';\nexport const defaultInternalLogger = {\n debug: noop,\n error: noop,\n info: noop,\n prefix: defaultInternalLoggerPrefix,\n warn: noop,\n};\nexport const defaultInternalLoggerLevel = InternalLoggerLevel.ERROR;\n//# sourceMappingURL=const.js.map","export const defaultUnpatchedConsole = Object.assign({}, console);\n//# sourceMappingURL=const.js.map","import { defaultUnpatchedConsole } from '../unpatchedConsole';\nimport { noop } from '../utils';\nimport { defaultInternalLogger, defaultInternalLoggerLevel, InternalLoggerLevel } from './const';\nexport function createInternalLogger(unpatchedConsole = defaultUnpatchedConsole, internalLoggerLevel = defaultInternalLoggerLevel) {\n const internalLogger = defaultInternalLogger;\n if (internalLoggerLevel > InternalLoggerLevel.OFF) {\n internalLogger.error =\n internalLoggerLevel >= InternalLoggerLevel.ERROR\n ? function (...args) {\n unpatchedConsole.error(`${internalLogger.prefix}\\n`, ...args);\n }\n : noop;\n internalLogger.warn =\n internalLoggerLevel >= InternalLoggerLevel.WARN\n ? function (...args) {\n unpatchedConsole.warn(`${internalLogger.prefix}\\n`, ...args);\n }\n : noop;\n internalLogger.info =\n internalLoggerLevel >= InternalLoggerLevel.INFO\n ? function (...args) {\n unpatchedConsole.info(`${internalLogger.prefix}\\n`, ...args);\n }\n : noop;\n internalLogger.debug =\n internalLoggerLevel >= InternalLoggerLevel.VERBOSE\n ? function (...args) {\n unpatchedConsole.debug(`${internalLogger.prefix}\\n`, ...args);\n }\n : noop;\n }\n return internalLogger;\n}\n//# sourceMappingURL=createInternalLogger.js.map","import { defaultInternalLogger } from './const';\nimport { createInternalLogger } from './createInternalLogger';\nexport let internalLogger = defaultInternalLogger;\nexport function initializeInternalLogger(unpatchedConsole, config) {\n internalLogger = createInternalLogger(unpatchedConsole, config.internalLoggerLevel);\n return internalLogger;\n}\n//# sourceMappingURL=initialize.js.map","// This does not uses isUndefined method because it will throw an error in non-browser environments\nexport const globalObject = (typeof globalThis !== 'undefined'\n ? globalThis\n : typeof global !== 'undefined'\n ? global\n : typeof self !== 'undefined'\n ? self\n : undefined);\n//# sourceMappingURL=globalObject.js.map","// auto-generated by bin/genVersion.ts\nexport const VERSION = '1.10.0';\n//# sourceMappingURL=version.js.map","export const internalGlobalObjectKey = '_faroInternal';\n//# sourceMappingURL=const.js.map","import { setFaroOnGlobalObject } from './faroGlobalObject';\nimport { setInternalFaroOnGlobalObject } from './internalFaroGlobalObject';\nexport let faro = {};\nexport function registerFaro(unpatchedConsole, internalLogger, config, metas, transports, api, instrumentations) {\n internalLogger.debug('Initializing Faro');\n faro = {\n api,\n config,\n instrumentations,\n internalLogger,\n metas,\n pause: transports.pause,\n transports,\n unpatchedConsole,\n unpause: transports.unpause,\n };\n setInternalFaroOnGlobalObject(faro);\n setFaroOnGlobalObject(faro);\n return faro;\n}\n//# sourceMappingURL=registerFaro.js.map","import { globalObject } from '../globalObject';\nimport { internalGlobalObjectKey } from './const';\nexport function getInternalFromGlobalObject() {\n return globalObject[internalGlobalObjectKey];\n}\nexport function setInternalFaroOnGlobalObject(faro) {\n if (!faro.config.isolate) {\n faro.internalLogger.debug('Registering internal Faro instance on global object');\n Object.defineProperty(globalObject, internalGlobalObjectKey, {\n configurable: false,\n enumerable: false,\n writable: false,\n value: faro,\n });\n }\n else {\n faro.internalLogger.debug('Skipping registering internal Faro instance on global object');\n }\n}\nexport function isInternalFaroOnGlobalObject() {\n return internalGlobalObjectKey in globalObject;\n}\n//# sourceMappingURL=internalFaroGlobalObject.js.map","import { globalObject } from '../globalObject';\nexport function setFaroOnGlobalObject(faro) {\n if (!faro.config.preventGlobalExposure) {\n faro.internalLogger.debug(`Registering public faro reference in the global scope using \"${faro.config.globalObjectKey}\" key`);\n if (faro.config.globalObjectKey in globalObject) {\n faro.internalLogger.warn(`Skipping global registration due to key \"${faro.config.globalObjectKey}\" being used already. Please set \"globalObjectKey\" to something else or set \"preventGlobalExposure\" to \"true\"`);\n return;\n }\n Object.defineProperty(globalObject, faro.config.globalObjectKey, {\n configurable: false,\n writable: false,\n value: faro,\n });\n }\n else {\n faro.internalLogger.debug('Skipping registering public Faro instance in the global scope');\n }\n}\n//# sourceMappingURL=faroGlobalObject.js.map","const DEFAULT_SEND_TIMEOUT_MS = 250;\nconst DEFAULT_BATCH_ITEM_LIMIT = 50;\nexport class BatchExecutor {\n constructor(sendFn, options) {\n var _a, _b;\n this.signalBuffer = [];\n this.itemLimit = (_a = options === null || options === void 0 ? void 0 : options.itemLimit) !== null && _a !== void 0 ? _a : DEFAULT_BATCH_ITEM_LIMIT;\n this.sendTimeout = (_b = options === null || options === void 0 ? void 0 : options.sendTimeout) !== null && _b !== void 0 ? _b : DEFAULT_SEND_TIMEOUT_MS;\n this.paused = (options === null || options === void 0 ? void 0 : options.paused) || false;\n this.sendFn = sendFn;\n this.flushInterval = -1;\n if (!this.paused) {\n this.start();\n }\n // Send batched/buffered data when user navigates to new page, switches or closes the tab, minimizes or closes the browser.\n // If on mobile, it also sends data if user switches from the browser to a different app.\n document.addEventListener('visibilitychange', () => {\n if (document.visibilityState === 'hidden') {\n this.flush();\n }\n });\n }\n addItem(item) {\n if (this.paused) {\n return;\n }\n this.signalBuffer.push(item);\n if (this.signalBuffer.length >= this.itemLimit) {\n this.flush();\n }\n }\n start() {\n this.paused = false;\n if (this.sendTimeout > 0) {\n this.flushInterval = window.setInterval(() => this.flush(), this.sendTimeout);\n }\n }\n pause() {\n this.paused = true;\n clearInterval(this.flushInterval);\n }\n groupItems(items) {\n const itemMap = new Map();\n items.forEach((item) => {\n const metaKey = JSON.stringify(item.meta);\n let currentItems = itemMap.get(metaKey);\n if (currentItems === undefined) {\n currentItems = [item];\n }\n else {\n currentItems = [...currentItems, item];\n }\n itemMap.set(metaKey, currentItems);\n });\n return Array.from(itemMap.values());\n }\n flush() {\n if (this.paused || this.signalBuffer.length === 0) {\n return;\n }\n const itemGroups = this.groupItems(this.signalBuffer);\n itemGroups.forEach(this.sendFn);\n this.signalBuffer = [];\n }\n}\n//# sourceMappingURL=batchExecutor.js.map","import { isString } from '../utils';\nimport { BatchExecutor } from './batchExecutor';\nimport { TransportItemType } from './const';\nexport function shouldIgnoreEvent(patterns, msg) {\n return patterns.some((pattern) => {\n return isString(pattern) ? msg.includes(pattern) : !!msg.match(pattern);\n });\n}\nexport function createBeforeSendHookFromIgnorePatterns(patterns) {\n return (item) => {\n if (item.type === TransportItemType.EXCEPTION && item.payload) {\n const evt = item.payload;\n const msg = `${evt.type}: ${evt.value}`;\n if (shouldIgnoreEvent(patterns, msg)) {\n return null;\n }\n }\n return item;\n };\n}\nexport function initializeTransports(unpatchedConsole, internalLogger, config, metas) {\n var _a;\n internalLogger.debug('Initializing transports');\n const transports = [];\n let paused = config.paused;\n let beforeSendHooks = [];\n const add = (...newTransports) => {\n internalLogger.debug('Adding transports');\n newTransports.forEach((newTransport) => {\n internalLogger.debug(`Adding \"${newTransport.name}\" transport`);\n const exists = transports.some((existingTransport) => existingTransport === newTransport);\n if (exists) {\n internalLogger.warn(`Transport ${newTransport.name} is already added`);\n return;\n }\n newTransport.unpatchedConsole = unpatchedConsole;\n newTransport.internalLogger = internalLogger;\n newTransport.config = config;\n newTransport.metas = metas;\n transports.push(newTransport);\n });\n };\n const addBeforeSendHooks = (...newBeforeSendHooks) => {\n internalLogger.debug('Adding beforeSendHooks\\n', beforeSendHooks);\n newBeforeSendHooks.forEach((beforeSendHook) => {\n if (beforeSendHook) {\n beforeSendHooks.push(beforeSendHook);\n }\n });\n };\n const addIgnoreErrorsPatterns = (...ignoreErrorsPatterns) => {\n internalLogger.debug('Adding ignoreErrorsPatterns\\n', ignoreErrorsPatterns);\n ignoreErrorsPatterns.forEach((ignoreErrorsPattern) => {\n if (ignoreErrorsPattern) {\n beforeSendHooks.push(createBeforeSendHookFromIgnorePatterns(ignoreErrorsPattern));\n }\n });\n };\n const applyBeforeSendHooks = (items) => {\n let filteredItems = items;\n for (const hook of beforeSendHooks) {\n const modified = filteredItems.map(hook).filter(Boolean);\n if (modified.length === 0) {\n return [];\n }\n filteredItems = modified;\n }\n return filteredItems;\n };\n const batchedSend = (items) => {\n const filteredItems = applyBeforeSendHooks(items);\n if (filteredItems.length === 0) {\n return;\n }\n for (const transport of transports) {\n internalLogger.debug(`Transporting item using ${transport.name}\\n`, filteredItems);\n if (transport.isBatched()) {\n transport.send(filteredItems);\n }\n }\n };\n const instantSend = (item) => {\n var _a, _b;\n // prevent all beforeSend hooks being executed twice if batching is enabled.\n if (((_a = config.batching) === null || _a === void 0 ? void 0 : _a.enabled) && transports.every((transport) => transport.isBatched())) {\n return;\n }\n const [filteredItem] = applyBeforeSendHooks([item]);\n if (filteredItem === undefined) {\n return;\n }\n for (const transport of transports) {\n internalLogger.debug(`Transporting item using ${transport.name}\\n`, filteredItem);\n if (!transport.isBatched()) {\n transport.send(filteredItem);\n }\n else if (!((_b = config.batching) === null || _b === void 0 ? void 0 : _b.enabled)) {\n transport.send([filteredItem]);\n }\n }\n };\n let batchExecutor;\n if ((_a = config.batching) === null || _a === void 0 ? void 0 : _a.enabled) {\n batchExecutor = new BatchExecutor(batchedSend, {\n sendTimeout: config.batching.sendTimeout,\n itemLimit: config.batching.itemLimit,\n paused,\n });\n }\n // Send a signal to the appropriate transports\n //\n // 1. If SDK is paused, early return\n // 2. If batching is not enabled send the signal to all transports\n // instantly.\n // 3i. If batching is enabled, enqueue the signal\n // 3ii. Send the signal instantly to all un-batched transports\n const execute = (item) => {\n var _a;\n if (paused) {\n return;\n }\n if ((_a = config.batching) === null || _a === void 0 ? void 0 : _a.enabled) {\n batchExecutor === null || batchExecutor === void 0 ? void 0 : batchExecutor.addItem(item);\n }\n instantSend(item);\n };\n const getBeforeSendHooks = () => [...beforeSendHooks];\n const isPaused = () => paused;\n const pause = () => {\n internalLogger.debug('Pausing transports');\n batchExecutor === null || batchExecutor === void 0 ? void 0 : batchExecutor.pause();\n paused = true;\n };\n const remove = (...transportsToRemove) => {\n internalLogger.debug('Removing transports');\n transportsToRemove.forEach((transportToRemove) => {\n internalLogger.debug(`Removing \"${transportToRemove.name}\" transport`);\n const existingTransportIndex = transports.indexOf(transportToRemove);\n if (existingTransportIndex === -1) {\n internalLogger.warn(`Transport \"${transportToRemove.name}\" is not added`);\n return;\n }\n transports.splice(existingTransportIndex, 1);\n });\n };\n const removeBeforeSendHooks = (...beforeSendHooksToRemove) => {\n beforeSendHooks.filter((beforeSendHook) => !beforeSendHooksToRemove.includes(beforeSendHook));\n };\n const unpause = () => {\n internalLogger.debug('Unpausing transports');\n batchExecutor === null || batchExecutor === void 0 ? void 0 : batchExecutor.start();\n paused = false;\n };\n return {\n add,\n addBeforeSendHooks,\n addIgnoreErrorsPatterns,\n getBeforeSendHooks,\n execute,\n isPaused,\n pause,\n remove,\n removeBeforeSendHooks,\n get transports() {\n return [...transports];\n },\n unpause,\n };\n}\n//# sourceMappingURL=initialize.js.map","import { defaultUnpatchedConsole } from './const';\nexport let unpatchedConsole = defaultUnpatchedConsole;\nexport function initializeUnpatchedConsole(config) {\n var _a;\n unpatchedConsole = (_a = config.unpatchedConsole) !== null && _a !== void 0 ? _a : unpatchedConsole;\n return unpatchedConsole;\n}\n//# sourceMappingURL=initialize.js.map","import { initializeAPI } from './api';\nimport { initializeInstrumentations, registerInitialInstrumentations } from './instrumentations';\nimport { initializeInternalLogger } from './internalLogger';\nimport { initializeMetas, registerInitialMetas } from './metas';\nimport { isInternalFaroOnGlobalObject, registerFaro } from './sdk';\nimport { initializeTransports, registerInitialTransports } from './transports';\nimport { initializeUnpatchedConsole } from './unpatchedConsole';\nexport function initializeFaro(config) {\n const unpatchedConsole = initializeUnpatchedConsole(config);\n const internalLogger = initializeInternalLogger(unpatchedConsole, config);\n if (isInternalFaroOnGlobalObject() && !config.isolate) {\n internalLogger.error('Faro is already registered. Either add instrumentations, transports etc. to the global faro instance or use the \"isolate\" property');\n return undefined;\n }\n internalLogger.debug('Initializing');\n // Initializing the APIs\n const metas = initializeMetas(unpatchedConsole, internalLogger, config);\n const transports = initializeTransports(unpatchedConsole, internalLogger, config, metas);\n const api = initializeAPI(unpatchedConsole, internalLogger, config, metas, transports);\n const instrumentations = initializeInstrumentations(unpatchedConsole, internalLogger, config, metas, transports, api);\n const faro = registerFaro(unpatchedConsole, internalLogger, config, metas, transports, api, instrumentations);\n // make sure Faro is initialized before registering default metas, instrumentations, transports etc.\n registerInitialMetas(faro);\n registerInitialTransports(faro);\n registerInitialInstrumentations(faro);\n return faro;\n}\n//# sourceMappingURL=initialize.js.map","import { isFunction } from '../utils';\nexport function initializeMetas(_unpatchedConsole, internalLogger, _config) {\n let items = [];\n let listeners = [];\n const getValue = () => items.reduce((acc, item) => Object.assign(acc, isFunction(item) ? item() : item), {});\n const notifyListeners = () => {\n if (listeners.length) {\n const value = getValue();\n listeners.forEach((listener) => listener(value));\n }\n };\n const add = (...newItems) => {\n internalLogger.debug('Adding metas\\n', newItems);\n items.push(...newItems);\n notifyListeners();\n };\n const remove = (...itemsToRemove) => {\n internalLogger.debug('Removing metas\\n', itemsToRemove);\n items = items.filter((currentItem) => !itemsToRemove.includes(currentItem));\n notifyListeners();\n };\n const addListener = (listener) => {\n internalLogger.debug('Adding metas listener\\n', listener);\n listeners.push(listener);\n };\n const removeListener = (listener) => {\n internalLogger.debug('Removing metas listener\\n', listener);\n listeners = listeners.filter((currentListener) => currentListener !== listener);\n };\n return {\n add,\n remove,\n addListener,\n removeListener,\n get value() {\n return getValue();\n },\n };\n}\n//# sourceMappingURL=initialize.js.map","export function initializeInstrumentations(unpatchedConsole, internalLogger, config, metas, transports, api) {\n internalLogger.debug('Initializing instrumentations');\n const instrumentations = [];\n const add = (...newInstrumentations) => {\n internalLogger.debug('Adding instrumentations');\n newInstrumentations.forEach((newInstrumentation) => {\n internalLogger.debug(`Adding \"${newInstrumentation.name}\" instrumentation`);\n const exists = instrumentations.some((existingInstrumentation) => existingInstrumentation.name === newInstrumentation.name);\n if (exists) {\n internalLogger.warn(`Instrumentation ${newInstrumentation.name} is already added`);\n return;\n }\n newInstrumentation.unpatchedConsole = unpatchedConsole;\n newInstrumentation.internalLogger = internalLogger;\n newInstrumentation.config = config;\n newInstrumentation.metas = metas;\n newInstrumentation.transports = transports;\n newInstrumentation.api = api;\n instrumentations.push(newInstrumentation);\n newInstrumentation.initialize();\n });\n };\n const remove = (...instrumentationsToRemove) => {\n internalLogger.debug('Removing instrumentations');\n instrumentationsToRemove.forEach((instrumentationToRemove) => {\n var _a, _b;\n internalLogger.debug(`Removing \"${instrumentationToRemove.name}\" instrumentation`);\n const existingInstrumentationIndex = instrumentations.reduce((acc, existingInstrumentation, existingTransportIndex) => {\n if (acc === null && existingInstrumentation.name === instrumentationToRemove.name) {\n return existingTransportIndex;\n }\n return null;\n }, null);\n if (!existingInstrumentationIndex) {\n internalLogger.warn(`Instrumentation \"${instrumentationToRemove.name}\" is not added`);\n return;\n }\n (_b = (_a = instrumentations[existingInstrumentationIndex]).destroy) === null || _b === void 0 ? void 0 : _b.call(_a);\n instrumentations.splice(existingInstrumentationIndex, 1);\n });\n };\n return {\n add,\n get instrumentations() {\n return [...instrumentations];\n },\n remove,\n };\n}\n//# sourceMappingURL=initialize.js.map","import { getBundleId } from '../utils/sourceMaps';\nimport { VERSION } from '../version';\nexport function registerInitialMetas(faro) {\n var _a, _b;\n const initial = {\n sdk: {\n version: VERSION,\n },\n app: {\n bundleId: faro.config.app.name && getBundleId(faro.config.app.name),\n },\n };\n const session = (_a = faro.config.sessionTracking) === null || _a === void 0 ? void 0 : _a.session;\n if (session) {\n faro.api.setSession(session);\n }\n if (faro.config.app) {\n initial.app = Object.assign(Object.assign({}, faro.config.app), initial.app);\n }\n if (faro.config.user) {\n initial.user = faro.config.user;\n }\n if (faro.config.view) {\n initial.view = faro.config.view;\n }\n faro.metas.add(initial, ...((_b = faro.config.metas) !== null && _b !== void 0 ? _b : []));\n}\n//# sourceMappingURL=registerInitial.js.map","import { globalObject } from '../globalObject';\nexport function getBundleId(appName) {\n return globalObject === null || globalObject === void 0 ? void 0 : globalObject[`__faroBundleId_${appName}`];\n}\n//# sourceMappingURL=sourceMaps.js.map","export function registerInitialTransports(faro) {\n faro.transports.add(...faro.config.transports);\n faro.transports.addBeforeSendHooks(faro.config.beforeSend);\n faro.transports.addIgnoreErrorsPatterns(faro.config.ignoreErrors);\n}\n//# sourceMappingURL=registerInitial.js.map","export function registerInitialInstrumentations(faro) {\n faro.instrumentations.add(...faro.config.instrumentations);\n}\n//# sourceMappingURL=registerInitial.js.map","export const defaultGlobalObjectKey = 'faro';\nexport const defaultBatchingConfig = {\n enabled: true,\n sendTimeout: 250,\n itemLimit: 50,\n};\n//# sourceMappingURL=const.js.map","export const defaultEventDomain = 'browser';\n//# sourceMappingURL=consts.js.map","export const newLineString = '\\n';\nexport const evalString = 'eval';\nexport const unknownSymbolString = '?';\nexport const atString = '@';\nexport const webkitLineRegex = /^\\s*at (?:(.*\\).*?|.*?) ?\\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nexport const webkitEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\nexport const webkitEvalString = 'eval';\nexport const webkitAddressAtString = 'address at ';\nexport const webkitAddressAtStringLength = webkitAddressAtString.length;\nexport const firefoxLineRegex = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\\/.*?|\\[native code]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nexport const firefoxEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nexport const firefoxEvalString = ' > eval';\nexport const safariExtensionString = 'safari-extension';\nexport const safariWebExtensionString = 'safari-web-extension';\nexport const reactMinifiedRegex = /Minified React error #\\d+;/i;\n//# sourceMappingURL=const.js.map","import { unknownSymbolString } from './const';\nexport function buildStackFrame(filename, func, lineno, colno) {\n const stackFrame = {\n filename: filename || document.location.href,\n function: func || unknownSymbolString,\n };\n if (lineno !== undefined) {\n stackFrame.lineno = lineno;\n }\n if (colno !== undefined) {\n stackFrame.colno = colno;\n }\n return stackFrame;\n}\n//# sourceMappingURL=buildStackFrame.js.map","import { atString, safariExtensionString, safariWebExtensionString } from './const';\nexport function getDataFromSafariExtensions(func, filename) {\n const isSafariExtension = func === null || func === void 0 ? void 0 : func.includes(safariExtensionString);\n const isSafariWebExtension = !isSafariExtension && (func === null || func === void 0 ? void 0 : func.includes(safariWebExtensionString));\n if (!isSafariExtension && !isSafariWebExtension) {\n return [func, filename];\n }\n return [\n (func === null || func === void 0 ? void 0 : func.includes(atString)) ? func.split(atString)[0] : func,\n isSafariExtension ? `${safariExtensionString}:${filename}` : `${safariWebExtensionString}:${filename}`,\n ];\n}\n//# sourceMappingURL=getDataFromSafariExtensions.js.map","import { isNumber } from '@grafana/faro-core';\nimport { buildStackFrame } from './buildStackFrame';\nimport { evalString, firefoxEvalRegex, firefoxEvalString, firefoxLineRegex, newLineString, reactMinifiedRegex, webkitAddressAtString, webkitAddressAtStringLength, webkitEvalRegex, webkitEvalString, webkitLineRegex, } from './const';\nimport { getDataFromSafariExtensions } from './getDataFromSafariExtensions';\nexport function getStackFramesFromError(error) {\n let lines = [];\n if (error.stacktrace) {\n lines = error.stacktrace.split(newLineString).filter((_line, idx) => idx % 2 === 0);\n }\n else if (error.stack) {\n lines = error.stack.split(newLineString);\n }\n const stackFrames = lines.reduce((acc, line, idx) => {\n let parts;\n let func;\n let filename;\n let lineno;\n let colno;\n if ((parts = webkitLineRegex.exec(line))) {\n func = parts[1];\n filename = parts[2];\n lineno = parts[3];\n colno = parts[4];\n if (filename === null || filename === void 0 ? void 0 : filename.startsWith(webkitEvalString)) {\n const submatch = webkitEvalRegex.exec(filename);\n if (submatch) {\n filename = submatch[1];\n lineno = submatch[2];\n colno = submatch[3];\n }\n }\n filename = (filename === null || filename === void 0 ? void 0 : filename.startsWith(webkitAddressAtString))\n ? filename.substring(webkitAddressAtStringLength)\n : filename;\n [func, filename] = getDataFromSafariExtensions(func, filename);\n }\n else if ((parts = firefoxLineRegex.exec(line))) {\n func = parts[1];\n filename = parts[3];\n lineno = parts[4];\n colno = parts[5];\n if (!!filename && filename.includes(firefoxEvalString)) {\n const submatch = firefoxEvalRegex.exec(filename);\n if (submatch) {\n func = func || evalString;\n filename = submatch[1];\n lineno = submatch[2];\n }\n }\n else if (idx === 0 && !colno && isNumber(error.columnNumber)) {\n colno = String(error.columnNumber + 1);\n }\n [func, filename] = getDataFromSafariExtensions(func, filename);\n }\n if (filename || func) {\n acc.push(buildStackFrame(filename, func, lineno ? Number(lineno) : undefined, colno ? Number(colno) : undefined));\n }\n return acc;\n }, []);\n if (reactMinifiedRegex.test(error.message)) {\n return stackFrames.slice(1);\n }\n return stackFrames;\n}\n//# sourceMappingURL=getStackFramesFromError.js.map","import { getStackFramesFromError } from './getStackFramesFromError';\nexport function parseStacktrace(error) {\n return {\n frames: getStackFramesFromError(error),\n };\n}\n//# sourceMappingURL=parseStacktrace.js.map","export const STORAGE_KEY = 'com.grafana.faro.session';\nexport const SESSION_EXPIRATION_TIME = 4 * 60 * 60 * 1000; // hrs\nexport const SESSION_INACTIVITY_TIME = 15 * 60 * 1000; // minutes\nexport const STORAGE_UPDATE_DELAY = 1 * 1000; // seconds\n/**\n * @deprecated MAX_SESSION_PERSISTENCE_TIME_BUFFER is not used anymore. The constant will be removed in the future\n */\nexport const MAX_SESSION_PERSISTENCE_TIME_BUFFER = 1 * 60 * 1000;\nexport const MAX_SESSION_PERSISTENCE_TIME = SESSION_INACTIVITY_TIME;\nexport const defaultSessionTrackingConfig = {\n enabled: true,\n persistent: false,\n maxSessionPersistenceTime: MAX_SESSION_PERSISTENCE_TIME,\n};\n//# sourceMappingURL=sessionConstants.js.map","export const unknownString = 'unknown';\n//# sourceMappingURL=consts.js.map","import { browserMeta } from './browser';\nimport { pageMeta } from './page';\nexport const defaultMetas = [browserMeta, pageMeta];\n//# sourceMappingURL=const.js.map","import { UAParser } from 'ua-parser-js';\nimport { unknownString } from '@grafana/faro-core';\nexport const browserMeta = () => {\n const parser = new UAParser();\n const { name, version } = parser.getBrowser();\n const { name: osName, version: osVersion } = parser.getOS();\n const userAgent = parser.getUA();\n const language = navigator.language;\n const mobile = navigator.userAgent.includes('Mobi');\n const brands = getBrands();\n return {\n browser: {\n name: name !== null && name !== void 0 ? name : unknownString,\n version: version !== null && version !== void 0 ? version : unknownString,\n os: `${osName !== null && osName !== void 0 ? osName : unknownString} ${osVersion !== null && osVersion !== void 0 ? osVersion : unknownString}`,\n userAgent: userAgent !== null && userAgent !== void 0 ? userAgent : unknownString,\n language: language !== null && language !== void 0 ? language : unknownString,\n mobile,\n brands: brands !== null && brands !== void 0 ? brands : unknownString,\n viewportWidth: `${window.innerWidth}`,\n viewportHeight: `${window.innerHeight}`,\n },\n };\n function getBrands() {\n if (!name || !version) {\n return undefined;\n }\n if ('userAgentData' in navigator && navigator.userAgentData) {\n // userAgentData in experimental (only Chrome supports it) thus TS does not ship the respective type declarations\n return navigator.userAgentData.brands;\n }\n return undefined;\n }\n};\n//# sourceMappingURL=meta.js.map","export const pageMeta = () => ({\n page: {\n url: location.href,\n },\n});\n//# sourceMappingURL=meta.js.map","export const k6Meta = () => {\n const k6Properties = window.k6;\n return {\n k6: Object.assign({ \n // we only add the k6 meta if Faro is running inside a k6 environment, so this is always true\n isK6Browser: true }, ((k6Properties === null || k6Properties === void 0 ? void 0 : k6Properties.testRunId) && { testRunId: k6Properties === null || k6Properties === void 0 ? void 0 : k6Properties.testRunId })),\n };\n};\n//# sourceMappingURL=meta.js.map","import { defaultInternalLogger } from '../internalLogger';\nimport { defaultUnpatchedConsole } from '../unpatchedConsole';\nexport class BaseExtension {\n constructor() {\n this.unpatchedConsole = defaultUnpatchedConsole;\n this.internalLogger = defaultInternalLogger;\n this.config = {};\n this.metas = {};\n }\n logDebug(...args) {\n this.internalLogger.debug(`${this.name}\\n`, ...args);\n }\n logInfo(...args) {\n this.internalLogger.info(`${this.name}\\n`, ...args);\n }\n logWarn(...args) {\n this.internalLogger.warn(`${this.name}\\n`, ...args);\n }\n logError(...args) {\n this.internalLogger.error(`${this.name}\\n`, ...args);\n }\n}\n//# sourceMappingURL=baseExtension.js.map","import { BaseExtension } from '../extensions';\nexport class BaseTransport extends BaseExtension {\n isBatched() {\n return false;\n }\n getIgnoreUrls() {\n return [];\n }\n}\n//# sourceMappingURL=base.js.map","import { TransportItemType, transportItemTypeToBodyKey } from './const';\nexport function mergeResourceSpans(traces, resourceSpans) {\n var _a, _b;\n if (resourceSpans === undefined) {\n return traces;\n }\n if (traces === undefined) {\n return {\n resourceSpans,\n };\n }\n const currentResource = (_a = traces.resourceSpans) === null || _a === void 0 ? void 0 : _a[0];\n if (currentResource === undefined) {\n return traces;\n }\n const currentSpans = (currentResource === null || currentResource === void 0 ? void 0 : currentResource.scopeSpans) || [];\n const newSpans = ((_b = resourceSpans === null || resourceSpans === void 0 ? void 0 : resourceSpans[0]) === null || _b === void 0 ? void 0 : _b.scopeSpans) || [];\n return Object.assign(Object.assign({}, traces), { resourceSpans: [\n Object.assign(Object.assign({}, currentResource), { scopeSpans: [...currentSpans, ...newSpans] }),\n ] });\n}\nexport function getTransportBody(item) {\n let body = {\n meta: {},\n };\n if (item[0] !== undefined) {\n body.meta = item[0].meta;\n }\n item.forEach((currentItem) => {\n switch (currentItem.type) {\n case TransportItemType.LOG:\n case TransportItemType.EVENT:\n case TransportItemType.EXCEPTION:\n case TransportItemType.MEASUREMENT:\n const bk = transportItemTypeToBodyKey[currentItem.type];\n const signals = body[bk];\n body = Object.assign(Object.assign({}, body), { [bk]: signals === undefined ? [currentItem.payload] : [...signals, currentItem.payload] });\n break;\n case TransportItemType.TRACE:\n body = Object.assign(Object.assign({}, body), { traces: mergeResourceSpans(body.traces, currentItem.payload.resourceSpans) });\n break;\n }\n });\n return body;\n}\n//# sourceMappingURL=utils.js.map","/**\n * Tail based throttle which caches the args of the last call and updates\n */\nexport function throttle(callback, delay) {\n let pause = false;\n let lastPending;\n const timeoutBehavior = () => {\n if (lastPending == null) {\n pause = false;\n return;\n }\n callback(...lastPending);\n lastPending = null;\n setTimeout(timeoutBehavior, delay);\n };\n return (...args) => {\n if (pause) {\n lastPending = args;\n return;\n }\n callback(...args);\n pause = true;\n setTimeout(timeoutBehavior, delay);\n };\n}\n//# sourceMappingURL=throttle.js.map","import { faro } from '@grafana/faro-core';\nexport const webStorageType = {\n session: 'sessionStorage',\n local: 'localStorage',\n};\n// TODO: remove default storage type from all function\n/**\n * Check if selected web storage mechanism is available.\n * @param type storage mechanism to test availability for.\n * @returns\n */\nexport function isWebStorageAvailable(type) {\n var _a;\n try {\n let storage;\n storage = window[type];\n const testItem = '__faro_storage_test__';\n storage.setItem(testItem, testItem);\n storage.removeItem(testItem);\n return true;\n }\n catch (error) {\n // the above can throw\n (_a = faro.internalLogger) === null || _a === void 0 ? void 0 : _a.info(`Web storage of type ${type} is not available. Reason: ${error}`);\n return false;\n }\n}\n/**\n * Get item from SessionStorage or LocalStorage.\n * @param key: the item key.\n * @param webStorageMechanism: wether the item shall be received form local storage or session storage. Defaults to local storage.\n */\nexport function getItem(key, webStorageMechanism) {\n if (isWebStorageTypeAvailable(webStorageMechanism)) {\n return window[webStorageMechanism].getItem(key);\n }\n return null;\n}\n/**\n * Store item in SessionStorage or LocalStorage.\n * @param key: the item key.\n * @param value: the item data.\n * @param webStorageMechanism: wether the item shall be received form local storage or session storage. Defaults to local storage.\n */\nexport function setItem(key, value, webStorageMechanism) {\n if (isWebStorageTypeAvailable(webStorageMechanism)) {\n try {\n window[webStorageMechanism].setItem(key, value);\n }\n catch (error) {\n // do nothing\n }\n }\n}\n/**\n * Remove item from SessionStorage or LocalStorage.\n * @param key: the item key.\n * @param webStorageMechanism: wether the item shall be received form local storage or session storage. Defaults to local storage.\n */\nexport function removeItem(key, webStorageMechanism) {\n if (isWebStorageTypeAvailable(webStorageMechanism)) {\n window[webStorageMechanism].removeItem(key);\n }\n}\nexport const isLocalStorageAvailable = isWebStorageAvailable(webStorageType.local);\nexport const isSessionStorageAvailable = isWebStorageAvailable(webStorageType.session);\nfunction isWebStorageTypeAvailable(webStorageMechanism) {\n if (webStorageMechanism === webStorageType.local) {\n return isLocalStorageAvailable;\n }\n if (webStorageMechanism === webStorageType.session) {\n return isSessionStorageAvailable;\n }\n return false;\n}\n//# sourceMappingURL=webStorage.js.map","import { faro } from '@grafana/faro-core';\nexport function isSampled() {\n var _a, _b, _c;\n const sendAllSignals = 1;\n const sessionTracking = faro.config.sessionTracking;\n let samplingRate = (_c = (_b = (_a = sessionTracking === null || sessionTracking === void 0 ? void 0 : sessionTracking.sampler) === null || _a === void 0 ? void 0 : _a.call(sessionTracking, { metas: faro.metas.value })) !== null && _b !== void 0 ? _b : sessionTracking === null || sessionTracking === void 0 ? void 0 : sessionTracking.samplingRate) !== null && _c !== void 0 ? _c : sendAllSignals;\n if (typeof samplingRate !== 'number') {\n const sendNoSignals = 0;\n samplingRate = sendNoSignals;\n }\n return Math.random() < samplingRate;\n}\n//# sourceMappingURL=sampling.js.map","const alphabet = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789';\nexport function genShortID(length = 10) {\n return Array.from(Array(length))\n .map(() => alphabet[Math.floor(Math.random() * alphabet.length)])\n .join('');\n}\n//# sourceMappingURL=shortId.js.map","import { dateNow, faro, genShortID } from '@grafana/faro-core';\nimport { isLocalStorageAvailable, isSessionStorageAvailable } from '../../../utils';\nimport { isSampled } from './sampling';\nimport { SESSION_EXPIRATION_TIME, SESSION_INACTIVITY_TIME } from './sessionConstants';\nexport function createUserSessionObject({ sessionId, started, lastActivity, isSampled = true, } = {}) {\n var _a, _b;\n const now = dateNow();\n const generateSessionId = (_b = (_a = faro.config) === null || _a === void 0 ? void 0 : _a.sessionTracking) === null || _b === void 0 ? void 0 : _b.generateSessionId;\n if (sessionId == null) {\n sessionId = typeof generateSessionId === 'function' ? generateSessionId() : genShortID();\n }\n return {\n sessionId,\n lastActivity: lastActivity !== null && lastActivity !== void 0 ? lastActivity : now,\n started: started !== null && started !== void 0 ? started : now,\n isSampled: isSampled,\n };\n}\nexport function isUserSessionValid(session) {\n if (session == null) {\n return false;\n }\n const now = dateNow();\n const lifetimeValid = now - session.started < SESSION_EXPIRATION_TIME;\n if (!lifetimeValid) {\n return false;\n }\n const inactivityPeriodValid = now - session.lastActivity < SESSION_INACTIVITY_TIME;\n return inactivityPeriodValid;\n}\nexport function getUserSessionUpdater({ fetchUserSession, storeUserSession, }) {\n return function updateSession({ forceSessionExtend } = { forceSessionExtend: false }) {\n var _a, _b, _c;\n if (!fetchUserSession || !storeUserSession) {\n return;\n }\n const sessionTrackingConfig = faro.config.sessionTracking;\n const isPersistentSessions = sessionTrackingConfig === null || sessionTrackingConfig === void 0 ? void 0 : sessionTrackingConfig.persistent;\n if ((isPersistentSessions && !isLocalStorageAvailable) || (!isPersistentSessions && !isSessionStorageAvailable)) {\n return;\n }\n const sessionFromStorage = fetchUserSession();\n if (forceSessionExtend === false && isUserSessionValid(sessionFromStorage)) {\n storeUserSession(Object.assign(Object.assign({}, sessionFromStorage), { lastActivity: dateNow() }));\n }\n else {\n let newSession = addSessionMetadataToNextSession(createUserSessionObject({ isSampled: isSampled() }), sessionFromStorage);\n storeUserSession(newSession);\n (_a = faro.api) === null || _a === void 0 ? void 0 : _a.setSession(newSession.sessionMeta);\n (_b = sessionTrackingConfig === null || sessionTrackingConfig === void 0 ? void 0 : sessionTrackingConfig.onSessionChange) === null || _b === void 0 ? void 0 : _b.call(sessionTrackingConfig, (_c = sessionFromStorage === null || sessionFromStorage === void 0 ? void 0 : sessionFromStorage.sessionMeta) !== null && _c !== void 0 ? _c : null, newSession.sessionMeta);\n }\n };\n}\nexport function addSessionMetadataToNextSession(newSession, previousSession) {\n var _a, _b, _c, _d;\n const sessionWithMeta = Object.assign(Object.assign({}, newSession), { sessionMeta: {\n id: newSession.sessionId,\n attributes: Object.assign(Object.assign(Object.assign(Object.assign({}, (_b = (_a = faro.config.sessionTracking) === null || _a === void 0 ? void 0 : _a.session) === null || _b === void 0 ? void 0 : _b.attributes), ((_d = (_c = faro.metas.value.session) === null || _c === void 0 ? void 0 : _c.attributes) !== null && _d !== void 0 ? _d : {})), (previousSession != null ? { previousSession: previousSession.sessionId } : {})), { isSampled: newSession.isSampled.toString() }),\n } });\n return sessionWithMeta;\n}\n//# sourceMappingURL=sessionManagerUtils.js.map","import { faro } from '@grafana/faro-core';\nimport { throttle } from '../../../utils';\nimport { getItem, removeItem, setItem, webStorageType } from '../../../utils/webStorage';\nimport { isSampled } from './sampling';\nimport { STORAGE_KEY, STORAGE_UPDATE_DELAY } from './sessionConstants';\nimport { addSessionMetadataToNextSession, createUserSessionObject, getUserSessionUpdater } from './sessionManagerUtils';\nexport class PersistentSessionsManager {\n constructor() {\n this.updateSession = throttle(() => this.updateUserSession(), STORAGE_UPDATE_DELAY);\n this.updateUserSession = getUserSessionUpdater({\n fetchUserSession: PersistentSessionsManager.fetchUserSession,\n storeUserSession: PersistentSessionsManager.storeUserSession,\n });\n this.init();\n }\n static removeUserSession() {\n removeItem(STORAGE_KEY, PersistentSessionsManager.storageTypeLocal);\n }\n static storeUserSession(session) {\n setItem(STORAGE_KEY, JSON.stringify(session), PersistentSessionsManager.storageTypeLocal);\n }\n static fetchUserSession() {\n const storedSession = getItem(STORAGE_KEY, PersistentSessionsManager.storageTypeLocal);\n if (storedSession) {\n return JSON.parse(storedSession);\n }\n return null;\n }\n init() {\n document.addEventListener('visibilitychange', () => {\n if (document.visibilityState === 'visible') {\n this.updateSession();\n }\n });\n // Users can call the setSession() method, so we need to sync this with the local storage session\n faro.metas.addListener(function syncSessionIfChangedExternally(meta) {\n const session = meta.session;\n const sessionFromLocalStorage = PersistentSessionsManager.fetchUserSession();\n if (session && session.id !== (sessionFromLocalStorage === null || sessionFromLocalStorage === void 0 ? void 0 : sessionFromLocalStorage.sessionId)) {\n const userSession = addSessionMetadataToNextSession(createUserSessionObject({ sessionId: session.id, isSampled: isSampled() }), sessionFromLocalStorage);\n PersistentSessionsManager.storeUserSession(userSession);\n faro.api.setSession(userSession.sessionMeta);\n }\n });\n }\n}\nPersistentSessionsManager.storageTypeLocal = webStorageType.local;\n//# sourceMappingURL=PersistentSessionsManager.js.map","import { faro } from '@grafana/faro-core';\nimport { throttle } from '../../../utils';\nimport { getItem, removeItem, setItem, webStorageType } from '../../../utils/webStorage';\nimport { isSampled } from './sampling';\nimport { STORAGE_KEY, STORAGE_UPDATE_DELAY } from './sessionConstants';\nimport { addSessionMetadataToNextSession, createUserSessionObject, getUserSessionUpdater } from './sessionManagerUtils';\nexport class VolatileSessionsManager {\n constructor() {\n this.updateSession = throttle(() => this.updateUserSession(), STORAGE_UPDATE_DELAY);\n this.updateUserSession = getUserSessionUpdater({\n fetchUserSession: VolatileSessionsManager.fetchUserSession,\n storeUserSession: VolatileSessionsManager.storeUserSession,\n });\n this.init();\n }\n static removeUserSession() {\n removeItem(STORAGE_KEY, VolatileSessionsManager.storageTypeSession);\n }\n static storeUserSession(session) {\n setItem(STORAGE_KEY, JSON.stringify(session), VolatileSessionsManager.storageTypeSession);\n }\n static fetchUserSession() {\n const storedSession = getItem(STORAGE_KEY, VolatileSessionsManager.storageTypeSession);\n if (storedSession) {\n return JSON.parse(storedSession);\n }\n return null;\n }\n init() {\n document.addEventListener('visibilitychange', () => {\n if (document.visibilityState === 'visible') {\n this.updateSession();\n }\n });\n // Users can call the setSession() method, so we need to sync this with the local storage session\n faro.metas.addListener(function syncSessionIfChangedExternally(meta) {\n const session = meta.session;\n const sessionFromSessionStorage = VolatileSessionsManager.fetchUserSession();\n if (session && session.id !== (sessionFromSessionStorage === null || sessionFromSessionStorage === void 0 ? void 0 : sessionFromSessionStorage.sessionId)) {\n const userSession = addSessionMetadataToNextSession(createUserSessionObject({ sessionId: session.id, isSampled: isSampled() }), sessionFromSessionStorage);\n VolatileSessionsManager.storeUserSession(userSession);\n faro.api.setSession(userSession.sessionMeta);\n }\n });\n }\n}\nVolatileSessionsManager.storageTypeSession = webStorageType.session;\n//# sourceMappingURL=VolatileSessionManager.js.map","import { PersistentSessionsManager } from './PersistentSessionsManager';\nimport { VolatileSessionsManager } from './VolatileSessionManager';\nexport function getSessionManagerByConfig(sessionTrackingConfig) {\n return (sessionTrackingConfig === null || sessionTrackingConfig === void 0 ? void 0 : sessionTrackingConfig.persistent) ? PersistentSessionsManager : VolatileSessionsManager;\n}\n//# sourceMappingURL=getSessionManagerByConfig.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { BaseTransport, createPromiseBuffer, getTransportBody, noop, VERSION, } from '@grafana/faro-core';\nimport { getSessionManagerByConfig } from '../../instrumentations/session/sessionManager';\nimport { getUserSessionUpdater } from '../../instrumentations/session/sessionManager/sessionManagerUtils';\nconst DEFAULT_BUFFER_SIZE = 30;\nconst DEFAULT_CONCURRENCY = 5; // chrome supports 10 total, firefox 17\nconst DEFAULT_RATE_LIMIT_BACKOFF_MS = 5000;\nconst BEACON_BODY_SIZE_LIMIT = 60000;\nconst TOO_MANY_REQUESTS = 429;\nconst ACCEPTED = 202;\nexport class FetchTransport extends BaseTransport {\n constructor(options) {\n var _a, _b, _c, _d;\n super();\n this.options = options;\n this.name = '@grafana/faro-web-sdk:transport-fetch';\n this.version = VERSION;\n this.disabledUntil = new Date();\n this.rateLimitBackoffMs = (_a = options.defaultRateLimitBackoffMs) !== null && _a !== void 0 ? _a : DEFAULT_RATE_LIMIT_BACKOFF_MS;\n this.getNow = (_b = options.getNow) !== null && _b !== void 0 ? _b : (() => Date.now());\n this.promiseBuffer = createPromiseBuffer({\n size: (_c = options.bufferSize) !== null && _c !== void 0 ? _c : DEFAULT_BUFFER_SIZE,\n concurrency: (_d = options.concurrency) !== null && _d !== void 0 ? _d : DEFAULT_CONCURRENCY,\n });\n }\n send(items) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (this.disabledUntil > new Date(this.getNow())) {\n this.logWarn(`Dropping transport item due to too many requests. Backoff until ${this.disabledUntil}`);\n return Promise.resolve();\n }\n yield this.promiseBuffer.add(() => {\n const body = JSON.stringify(getTransportBody(items));\n const { url, requestOptions, apiKey } = this.options;\n const _a = requestOptions !== null && requestOptions !== void 0 ? requestOptions : {}, { headers } = _a, restOfRequestOptions = __rest(_a, [\"headers\"]);\n let sessionId;\n const sessionMeta = this.metas.value.session;\n if (sessionMeta != null) {\n sessionId = sessionMeta.id;\n }\n return fetch(url, Object.assign({ method: 'POST', headers: Object.assign(Object.assign(Object.assign({ 'Content-Type': 'application/json' }, (headers !== null && headers !== void 0 ? headers : {})), (apiKey ? { 'x-api-key': apiKey } : {})), (sessionId ? { 'x-faro-session-id': sessionId } : {})), body, keepalive: body.length <= BEACON_BODY_SIZE_LIMIT }, (restOfRequestOptions !== null && restOfRequestOptions !== void 0 ? restOfRequestOptions : {})))\n .then((response) => __awaiter(this, void 0, void 0, function* () {\n if (response.status === ACCEPTED) {\n const sessionExpired = response.headers.get('X-Faro-Session-Status') === 'invalid';\n if (sessionExpired) {\n this.extendFaroSession(this.config, this.logDebug);\n }\n }\n if (response.status === TOO_MANY_REQUESTS) {\n this.disabledUntil = this.getRetryAfterDate(response);\n this.logWarn(`Too many requests, backing off until ${this.disabledUntil}`);\n }\n // read the body so the connection can be closed\n response.text().catch(noop);\n return response;\n }))\n .catch((err) => {\n this.logError('Failed sending payload to the receiver\\n', JSON.parse(body), err);\n });\n });\n }\n catch (err) {\n this.logError(err);\n }\n });\n }\n getIgnoreUrls() {\n var _a;\n return [this.options.url].concat((_a = this.config.ignoreUrls) !== null && _a !== void 0 ? _a : []);\n }\n isBatched() {\n return true;\n }\n getRetryAfterDate(response) {\n const now = this.getNow();\n const retryAfterHeader = response.headers.get('Retry-After');\n if (retryAfterHeader) {\n const delay = Number(retryAfterHeader);\n if (!isNaN(delay)) {\n return new Date(delay * 1000 + now);\n }\n const date = Date.parse(retryAfterHeader);\n if (!isNaN(date)) {\n return new Date(date);\n }\n }\n return new Date(now + this.rateLimitBackoffMs);\n }\n extendFaroSession(config, logDebug) {\n const SessionExpiredString = `Session expired`;\n const sessionTrackingConfig = config.sessionTracking;\n if (sessionTrackingConfig === null || sessionTrackingConfig === void 0 ? void 0 : sessionTrackingConfig.enabled) {\n const { fetchUserSession, storeUserSession } = getSessionManagerByConfig(sessionTrackingConfig);\n getUserSessionUpdater({ fetchUserSession, storeUserSession })({ forceSessionExtend: true });\n logDebug(`${SessionExpiredString} created new session.`);\n }\n else {\n logDebug(`${SessionExpiredString}.`);\n }\n }\n}\n//# sourceMappingURL=transport.js.map","export function createPromiseBuffer(options) {\n const { size, concurrency } = options;\n const buffer = []; // pending, not-yet-started tasks\n let inProgress = 0; // counter for tasks currently in progress\n const work = () => {\n // if there's space for a task and buffer is not empty,\n // take one task from buffer and run it\n if (inProgress < concurrency && buffer.length) {\n const { producer, resolve, reject } = buffer.shift();\n inProgress++;\n producer().then((result) => {\n inProgress--;\n work();\n resolve(result);\n }, (reason) => {\n inProgress--;\n work();\n reject(reason);\n });\n }\n };\n const add = (promiseProducer) => {\n if (buffer.length + inProgress >= size) {\n throw new Error('Task buffer full');\n }\n return new Promise((resolve, reject) => {\n buffer.push({\n producer: promiseProducer,\n resolve,\n reject,\n });\n work();\n });\n };\n return {\n add,\n };\n}\n//# sourceMappingURL=promiseBuffer.js.map","import { BaseExtension } from '../extensions';\nexport class BaseInstrumentation extends BaseExtension {\n constructor() {\n super(...arguments);\n this.api = {};\n this.transports = {};\n }\n}\n//# sourceMappingURL=base.js.map","export const primitiveUnhandledValue = 'Non-Error promise rejection captured with value:';\nexport const primitiveUnhandledType = 'UnhandledRejection';\nexport const domErrorType = 'DOMError';\nexport const domExceptionType = 'DOMException';\nexport const objectEventValue = 'Non-Error exception captured with keys:';\nexport const unknownSymbolString = '?';\nexport const valueTypeRegex = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n//# sourceMappingURL=const.js.map","import { isDomError, isDomException, isError, isErrorEvent, isEvent, isObject } from '@grafana/faro-core';\nimport { domErrorType, domExceptionType, objectEventValue } from './const';\nimport { getStackFramesFromError } from './stackFrames';\nexport function getErrorDetails(evt) {\n let value;\n let type;\n let stackFrames = [];\n let isDomErrorRes;\n let isEventRes;\n if (isErrorEvent(evt) && evt.error) {\n value = evt.error.message;\n type = evt.error.name;\n stackFrames = getStackFramesFromError(evt.error);\n }\n else if ((isDomErrorRes = isDomError(evt)) || isDomException(evt)) {\n const { name, message } = evt;\n type = name !== null && name !== void 0 ? name : (isDomErrorRes ? domErrorType : domExceptionType);\n value = message ? `${type}: ${message}` : type;\n }\n else if (isError(evt)) {\n value = evt.message;\n stackFrames = getStackFramesFromError(evt);\n }\n else if (isObject(evt) || (isEventRes = isEvent(evt))) {\n type = isEventRes ? evt.constructor.name : undefined;\n value = `${objectEventValue} ${Object.keys(evt)}`;\n }\n return [value, type, stackFrames];\n}\n//# sourceMappingURL=getErrorDetails.js.map","import { isString } from '@grafana/faro-core';\nimport { unknownSymbolString } from './const';\nimport { getErrorDetails } from './getErrorDetails';\nimport { getValueAndTypeFromMessage } from './getValueAndTypeFromMessage';\nimport { buildStackFrame } from './stackFrames';\nexport function registerOnerror(api) {\n const oldOnerror = window.onerror;\n window.onerror = (...args) => {\n try {\n const [evt, source, lineno, colno, error] = args;\n let value;\n let type;\n let stackFrames = [];\n const eventIsString = isString(evt);\n const initialStackFrame = buildStackFrame(source, unknownSymbolString, lineno, colno);\n if (error || !eventIsString) {\n [value, type, stackFrames] = getErrorDetails((error !== null && error !== void 0 ? error : evt));\n if (stackFrames.length === 0) {\n stackFrames = [initialStackFrame];\n }\n }\n else if (eventIsString) {\n [value, type] = getValueAndTypeFromMessage(evt);\n stackFrames = [initialStackFrame];\n }\n if (value) {\n api.pushError(new Error(value), { type, stackFrames });\n }\n }\n finally {\n oldOnerror === null || oldOnerror === void 0 ? void 0 : oldOnerror.apply(window, args);\n }\n };\n}\n//# sourceMappingURL=registerOnerror.js.map","import { defaultExceptionType } from '@grafana/faro-core';\nimport { valueTypeRegex } from './const';\nexport function getValueAndTypeFromMessage(message) {\n var _a, _b;\n const groups = message.match(valueTypeRegex);\n const type = (_a = groups === null || groups === void 0 ? void 0 : groups[1]) !== null && _a !== void 0 ? _a : defaultExceptionType;\n const value = (_b = groups === null || groups === void 0 ? void 0 : groups[2]) !== null && _b !== void 0 ? _b : message;\n return [value, type];\n}\n//# sourceMappingURL=getValueAndTypeFromMessage.js.map","import { isPrimitive } from '@grafana/faro-core';\nimport { primitiveUnhandledType, primitiveUnhandledValue } from './const';\nimport { getErrorDetails } from './getErrorDetails';\nexport function registerOnunhandledrejection(api) {\n window.addEventListener('unhandledrejection', (evt) => {\n var _a, _b;\n let error = evt;\n if (error.reason) {\n error = evt.reason;\n }\n else if ((_a = evt.detail) === null || _a === void 0 ? void 0 : _a.reason) {\n error = (_b = evt.detail) === null || _b === void 0 ? void 0 : _b.reason;\n }\n let value;\n let type;\n let stackFrames = [];\n if (isPrimitive(error)) {\n value = `${primitiveUnhandledValue} ${String(error)}`;\n type = primitiveUnhandledType;\n }\n else {\n [value, type, stackFrames] = getErrorDetails(error);\n }\n if (value) {\n api.pushError(new Error(value), { type, stackFrames });\n }\n });\n}\n//# sourceMappingURL=registerOnunhandledrejection.js.map","import { BaseInstrumentation, VERSION } from '@grafana/faro-core';\nimport { registerOnerror } from './registerOnerror';\nimport { registerOnunhandledrejection } from './registerOnunhandledrejection';\nexport class ErrorsInstrumentation extends BaseInstrumentation {\n constructor() {\n super(...arguments);\n this.name = '@grafana/faro-web-sdk:instrumentation-errors';\n this.version = VERSION;\n }\n initialize() {\n this.logDebug('Initializing');\n registerOnerror(this.api);\n registerOnunhandledrejection(this.api);\n }\n}\n//# sourceMappingURL=instrumentation.js.map","var e,n,t,r,i,o=-1,a=function(e){addEventListener(\"pageshow\",(function(n){n.persisted&&(o=n.timeStamp,e(n))}),!0)},c=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType(\"navigation\")[0];if(e&&e.responseStart>0&&e.responseStart=0?r=\"back-forward-cache\":t&&(document.prerendering||u()>0?r=\"prerender\":document.wasDiscarded?r=\"restore\":t.type&&(r=t.type.replace(/_/g,\"-\")));return{name:e,value:void 0===n?-1:n,rating:\"good\",delta:0,entries:[],id:\"v4-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},s=function(e,n,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){n(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},t||{})),r}}catch(e){}},d=function(e,n,t,r){var i,o;return function(a){n.value>=0&&(a||r)&&((o=n.value-(i||0))||void 0===i)&&(i=n.value,n.delta=o,n.rating=function(e,n){return e>n[1]?\"poor\":e>n[0]?\"needs-improvement\":\"good\"}(n.value,t),e(n))}},l=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},p=function(e){document.addEventListener(\"visibilitychange\",(function(){\"hidden\"===document.visibilityState&&e()}))},v=function(e){var n=!1;return function(){n||(e(),n=!0)}},m=-1,h=function(){return\"hidden\"!==document.visibilityState||document.prerendering?1/0:0},g=function(e){\"hidden\"===document.visibilityState&&m>-1&&(m=\"visibilitychange\"===e.type?e.timeStamp:0,T())},y=function(){addEventListener(\"visibilitychange\",g,!0),addEventListener(\"prerenderingchange\",g,!0)},T=function(){removeEventListener(\"visibilitychange\",g,!0),removeEventListener(\"prerenderingchange\",g,!0)},E=function(){return m<0&&(m=h(),y(),a((function(){setTimeout((function(){m=h(),y()}),0)}))),{get firstHiddenTime(){return m}}},C=function(e){document.prerendering?addEventListener(\"prerenderingchange\",(function(){return e()}),!0):e()},b=[1800,3e3],S=function(e,n){n=n||{},C((function(){var t,r=E(),i=f(\"FCP\"),o=s(\"paint\",(function(e){e.forEach((function(e){\"first-contentful-paint\"===e.name&&(o.disconnect(),e.startTimer.value&&(r.value=i,r.entries=o,t())},u=s(\"layout-shift\",c);u&&(t=d(e,r,L,n.reportAllChanges),p((function(){c(u.takeRecords()),t(!0)})),a((function(){i=0,r=f(\"CLS\",0),t=d(e,r,L,n.reportAllChanges),l((function(){return t()}))})),setTimeout(t,0))})))},A=0,I=1/0,P=0,M=function(e){e.forEach((function(e){e.interactionId&&(I=Math.min(I,e.interactionId),P=Math.max(P,e.interactionId),A=P?(P-I)/7+1:0)}))},k=function(){\"interactionCount\"in performance||e||(e=s(\"event\",M,{type:\"event\",buffered:!0,durationThreshold:0}))},F=[],D=new Map,x=0,R=function(){return(e?A:performance.interactionCount||0)-x},B=[],H=function(e){if(B.forEach((function(n){return n(e)})),e.interactionId||\"first-input\"===e.entryType){var n=F[F.length-1],t=D.get(e.interactionId);if(t||F.length<10||e.duration>n.latency){if(t)e.duration>t.latency?(t.entries=[e],t.latency=e.duration):e.duration===t.latency&&e.startTime===t.entries[0].startTime&&t.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};D.set(r.id,r),F.push(r)}F.sort((function(e,n){return n.latency-e.latency})),F.length>10&&F.splice(10).forEach((function(e){return D.delete(e.id)}))}}},q=function(e){var n=self.requestIdleCallback||self.setTimeout,t=-1;return e=v(e),\"hidden\"===document.visibilityState?e():(t=n(e),p(e)),t},O=[200,500],N=function(e,n){\"PerformanceEventTiming\"in self&&\"interactionId\"in PerformanceEventTiming.prototype&&(n=n||{},C((function(){var t;k();var r,i=f(\"INP\"),o=function(e){q((function(){e.forEach(H);var n,t=(n=Math.min(F.length-1,Math.floor(R()/50)),F[n]);t&&t.latency!==i.value&&(i.value=t.latency,i.entries=t.entries,r())}))},c=s(\"event\",o,{durationThreshold:null!==(t=n.durationThreshold)&&void 0!==t?t:40});r=d(e,i,O,n.reportAllChanges),c&&(c.observe({type:\"first-input\",buffered:!0}),p((function(){o(c.takeRecords()),r(!0)})),a((function(){x=0,F.length=0,D.clear(),i=f(\"INP\"),r=d(e,i,O,n.reportAllChanges)})))})))},j=[2500,4e3],_={},z=function(e,n){n=n||{},C((function(){var t,r=E(),i=f(\"LCP\"),o=function(e){n.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime=0&&t1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,n){var t=function(){V(e,n),i()},r=function(){i()},i=function(){removeEventListener(\"pointerup\",t,Q),removeEventListener(\"pointercancel\",r,Q)};addEventListener(\"pointerup\",t,Q),addEventListener(\"pointercancel\",r,Q)}(n,e):V(n,e)}},Y=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(n){return e(n,X,Q)}))},Z=[100,300],$=function(e,r){r=r||{},C((function(){var o,c=E(),u=f(\"FID\"),l=function(e){e.startTime {\n executor((metric) => {\n this.pushMeasurement({\n type: 'web-vitals',\n values: {\n [indicator]: metric.value,\n },\n });\n });\n });\n }\n}\nWebVitalsBasic.mapping = {\n cls: onCLS,\n fcp: onFCP,\n fid: onFID,\n inp: onINP,\n lcp: onLCP,\n ttfb: onTTFB,\n};\n//# sourceMappingURL=webVitalsBasic.js.map","var t,e,n,r=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType(\"navigation\")[0];if(t&&t.responseStart>0&&t.responseStart(e||100)-1)return n||i;if(n=n?i+\">\"+n:i,r.id)break;t=r.parentNode}}catch(t){}return n},c=-1,u=function(){return c},s=function(t){addEventListener(\"pageshow\",(function(e){e.persisted&&(c=e.timeStamp,t(e))}),!0)},f=function(){var t=r();return t&&t.activationStart||0},d=function(t,e){var n=r(),i=\"navigate\";u()>=0?i=\"back-forward-cache\":n&&(document.prerendering||f()>0?i=\"prerender\":document.wasDiscarded?i=\"restore\":n.type&&(i=n.type.replace(/_/g,\"-\")));return{name:t,value:void 0===e?-1:e,rating:\"good\",delta:0,entries:[],id:\"v4-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},l=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},m=function(t,e,n,r){var i,a;return function(o){e.value>=0&&(o||r)&&((a=e.value-(i||0))||void 0===i)&&(i=e.value,e.delta=a,e.rating=function(t,e){return t>e[1]?\"poor\":t>e[0]?\"needs-improvement\":\"good\"}(e.value,n),t(e))}},p=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},v=function(t){document.addEventListener(\"visibilitychange\",(function(){\"hidden\"===document.visibilityState&&t()}))},g=function(t){var e=!1;return function(){e||(t(),e=!0)}},h=-1,T=function(){return\"hidden\"!==document.visibilityState||document.prerendering?1/0:0},y=function(t){\"hidden\"===document.visibilityState&&h>-1&&(h=\"visibilitychange\"===t.type?t.timeStamp:0,S())},E=function(){addEventListener(\"visibilitychange\",y,!0),addEventListener(\"prerenderingchange\",y,!0)},S=function(){removeEventListener(\"visibilitychange\",y,!0),removeEventListener(\"prerenderingchange\",y,!0)},b=function(){return h<0&&(h=T(),E(),s((function(){setTimeout((function(){h=T(),E()}),0)}))),{get firstHiddenTime(){return h}}},L=function(t){document.prerendering?addEventListener(\"prerenderingchange\",(function(){return t()}),!0):t()},C=[1800,3e3],M=function(t,e){e=e||{},L((function(){var n,r=b(),i=d(\"FCP\"),a=l(\"paint\",(function(t){t.forEach((function(t){\"first-contentful-paint\"===t.name&&(a.disconnect(),t.startTimer.value&&(r.value=i,r.entries=a,n())},c=l(\"layout-shift\",o);c&&(n=m(t,r,D,e.reportAllChanges),v((function(){o(c.takeRecords()),n(!0)})),s((function(){i=0,r=d(\"CLS\",0),n=m(t,r,D,e.reportAllChanges),p((function(){return n()}))})),setTimeout(n,0))})))}((function(e){var n=function(t){var e,n={};if(t.entries.length){var r=t.entries.reduce((function(t,e){return t&&t.value>e.value?t:e}));if(r&&r.sources&&r.sources.length){var a=(e=r.sources).find((function(t){return t.node&&1===t.node.nodeType}))||e[0];a&&(n={largestShiftTarget:o(a.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:a,largestShiftEntry:r,loadState:i(r.startTime)})}}return Object.assign(t,{attribution:n})}(e);t(n)}),e)},x=function(t,e){M((function(e){var n=function(t){var e={timeToFirstByte:0,firstByteToFCP:t.value,loadState:i(u())};if(t.entries.length){var n=r(),a=t.entries[t.entries.length-1];if(n){var o=n.activationStart||0,c=Math.max(0,n.responseStart-o);e={timeToFirstByte:c,firstByteToFCP:t.value-c,loadState:i(t.entries[0].startTime),navigationEntry:n,fcpEntry:a}}}return Object.assign(t,{attribution:e})}(e);t(n)}),e)},I=0,k=1/0,A=0,F=function(t){t.forEach((function(t){t.interactionId&&(k=Math.min(k,t.interactionId),A=Math.max(A,t.interactionId),I=A?(A-k)/7+1:0)}))},P=function(){\"interactionCount\"in performance||t||(t=l(\"event\",F,{type:\"event\",buffered:!0,durationThreshold:0}))},B=[],O=new Map,R=0,j=function(){return(t?I:performance.interactionCount||0)-R},q=[],H=function(t){if(q.forEach((function(e){return e(t)})),t.interactionId||\"first-input\"===t.entryType){var e=B[B.length-1],n=O.get(t.interactionId);if(n||B.length<10||t.duration>e.latency){if(n)t.duration>n.latency?(n.entries=[t],n.latency=t.duration):t.duration===n.latency&&t.startTime===n.entries[0].startTime&&n.entries.push(t);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};O.set(r.id,r),B.push(r)}B.sort((function(t,e){return e.latency-t.latency})),B.length>10&&B.splice(10).forEach((function(t){return O.delete(t.id)}))}}},N=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=g(t),\"hidden\"===document.visibilityState?t():(n=e(t),v(t)),n},W=[200,500],z=function(t,e){\"PerformanceEventTiming\"in self&&\"interactionId\"in PerformanceEventTiming.prototype&&(e=e||{},L((function(){var n;P();var r,i=d(\"INP\"),a=function(t){N((function(){t.forEach(H);var e,n=(e=Math.min(B.length-1,Math.floor(j()/50)),B[e]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())}))},o=l(\"event\",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=m(t,i,W,e.reportAllChanges),o&&(o.observe({type:\"first-input\",buffered:!0}),v((function(){a(o.takeRecords()),r(!0)})),s((function(){R=0,B.length=0,O.clear(),i=d(\"INP\"),r=m(t,i,W,e.reportAllChanges)})))})))},U=[],V=[],_=new WeakMap,G=new Map,J=-1,K=function(t){U=U.concat(t),Q()},Q=function(){J<0&&(J=N(X))},X=function(){G.size>10&&G.forEach((function(t,e){O.has(e)||G.delete(e)}));var t=B.map((function(t){return _.get(t.entries[0])})),e=V.length-50;V=V.filter((function(n,r){return r>=e||t.includes(n)}));for(var r=new Set,i=0;i=0;i--){var a=V[i];if(Math.abs(r-a.renderTime)<=8){(e=a).startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd),e.entries.push(t);break}}e||(e={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:r,entries:[t]},V.push(e)),(t.interactionId||\"first-input\"===t.entryType)&&_.set(t,e),Q()}));var Y,Z,$,tt,et=function(t,e){for(var n,r=[],i=0;n=U[i];i++)if(!(n.startTime+n.duratione)break;r.push(n)}return r},nt=function(t,n){e||(e=l(\"long-animation-frame\",K)),z((function(e){var n=function(t){var e=t.entries[0],n=_.get(e),r=e.processingStart,a=n.processingEnd,c=n.entries.sort((function(t,e){return t.processingStart-e.processingStart})),u=et(e.startTime,a),s=t.entries.find((function(t){return t.target})),f=s&&s.target||G.get(e.interactionId),d=[e.startTime+e.duration,a].concat(u.map((function(t){return t.startTime+t.duration}))),l=Math.max.apply(Math,d),m={interactionTarget:o(f),interactionTargetElement:f,interactionType:e.name.startsWith(\"key\")?\"keyboard\":\"pointer\",interactionTime:e.startTime,nextPaintTime:l,processedEventEntries:c,longAnimationFrameEntries:u,inputDelay:r-e.startTime,processingDuration:a-r,presentationDelay:Math.max(l-a,0),loadState:i(e.startTime)};return Object.assign(t,{attribution:m})}(e);t(n)}),n)},rt=[2500,4e3],it={},at=function(t,e){!function(t,e){e=e||{},L((function(){var n,r=b(),i=d(\"LCP\"),a=function(t){e.reportAllChanges||(t=t.slice(-1)),t.forEach((function(t){t.startTime=0&&Z<$-dt){var t={entryType:\"first-input\",name:Y.type,target:Y.target,cancelable:Y.cancelable,startTime:Y.timeStamp,processingStart:Y.timeStamp+Z};tt.forEach((function(e){e(t)})),tt=[]}},pt=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;\"pointerdown\"==t.type?function(t,e){var n=function(){lt(t,e),i()},r=function(){i()},i=function(){removeEventListener(\"pointerup\",n,ft),removeEventListener(\"pointercancel\",r,ft)};addEventListener(\"pointerup\",n,ft),addEventListener(\"pointercancel\",r,ft)}(e,t):lt(e,t)}},vt=function(t){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(e){return t(e,pt,ft)}))},gt=[100,300],ht=function(t,e){e=e||{},L((function(){var n,r=b(),i=d(\"FID\"),a=function(t){t.startTime {\n const { loadState, largestShiftValue, largestShiftTime, largestShiftTarget } = metric.attribution;\n const values = this.buildInitialValues(metric);\n this.addIfPresent(values, 'largest_shift_value', largestShiftValue);\n this.addIfPresent(values, 'largest_shift_time', largestShiftTime);\n const context = this.buildInitialContext(metric);\n this.addIfPresent(context, loadStateKey, loadState);\n this.addIfPresent(context, 'largest_shift_target', largestShiftTarget);\n this.pushMeasurement(values, context);\n });\n }\n measureFCP() {\n onFCP((metric) => {\n const { firstByteToFCP, timeToFirstByte, loadState } = metric.attribution;\n const values = this.buildInitialValues(metric);\n this.addIfPresent(values, 'first_byte_to_fcp', firstByteToFCP);\n this.addIfPresent(values, timeToFirstByteKey, timeToFirstByte);\n const context = this.buildInitialContext(metric);\n this.addIfPresent(context, loadStateKey, loadState);\n this.pushMeasurement(values, context);\n });\n }\n measureFID() {\n onFID((metric) => {\n const { eventTime, eventTarget, eventType, loadState } = metric.attribution;\n const values = this.buildInitialValues(metric);\n this.addIfPresent(values, 'event_time', eventTime);\n const context = this.buildInitialContext(metric);\n this.addIfPresent(context, 'event_target', eventTarget);\n this.addIfPresent(context, 'event_type', eventType);\n this.addIfPresent(context, loadStateKey, loadState);\n this.pushMeasurement(values, context);\n });\n }\n measureINP() {\n onINP((metric) => {\n const { interactionTime, presentationDelay, inputDelay, processingDuration, nextPaintTime, loadState, interactionTarget, interactionType, } = metric.attribution;\n const values = this.buildInitialValues(metric);\n this.addIfPresent(values, 'interaction_time', interactionTime);\n this.addIfPresent(values, 'presentation_delay', presentationDelay);\n this.addIfPresent(values, 'input_delay', inputDelay);\n this.addIfPresent(values, 'processing_duration', processingDuration);\n this.addIfPresent(values, 'next_paint_time', nextPaintTime);\n const context = this.buildInitialContext(metric);\n this.addIfPresent(context, loadStateKey, loadState);\n this.addIfPresent(context, 'interaction_target', interactionTarget);\n this.addIfPresent(context, 'interaction_type', interactionType);\n this.pushMeasurement(values, context);\n });\n }\n measureLCP() {\n onLCP((metric) => {\n const { elementRenderDelay, resourceLoadDelay, resourceLoadDuration, timeToFirstByte, element } = metric.attribution;\n const values = this.buildInitialValues(metric);\n this.addIfPresent(values, 'element_render_delay', elementRenderDelay);\n this.addIfPresent(values, 'resource_load_delay', resourceLoadDelay);\n this.addIfPresent(values, 'resource_load_duration', resourceLoadDuration);\n this.addIfPresent(values, timeToFirstByteKey, timeToFirstByte);\n const context = this.buildInitialContext(metric);\n this.addIfPresent(context, 'element', element);\n this.pushMeasurement(values, context);\n });\n }\n measureTTFB() {\n onTTFB((metric) => {\n const { dnsDuration, connectionDuration, requestDuration, waitingDuration, cacheDuration } = metric.attribution;\n const values = this.buildInitialValues(metric);\n this.addIfPresent(values, 'dns_duration', dnsDuration);\n this.addIfPresent(values, 'connection_duration', connectionDuration);\n this.addIfPresent(values, 'request_duration', requestDuration);\n this.addIfPresent(values, 'waiting_duration', waitingDuration);\n this.addIfPresent(values, 'cache_duration', cacheDuration);\n const context = this.buildInitialContext(metric);\n this.pushMeasurement(values, context);\n });\n }\n buildInitialValues(metric) {\n const indicator = metric.name.toLowerCase();\n return {\n [indicator]: metric.value,\n delta: metric.delta,\n };\n }\n buildInitialContext(metric) {\n var _a;\n const navigationEntryId = (_a = getItem(NAVIGATION_ID_STORAGE_KEY, webStorageType.session)) !== null && _a !== void 0 ? _a : unknownString;\n return {\n id: metric.id,\n rating: metric.rating,\n navigation_type: metric.navigationType,\n navigation_entry_id: navigationEntryId,\n };\n }\n pushMeasurement(values, context) {\n const type = 'web-vitals';\n this.corePushMeasurement({ type, values }, { context });\n }\n addIfPresent(source, key, metric) {\n if (metric) {\n source[key] = metric;\n }\n }\n}\n//# sourceMappingURL=webVitalsWithAttribution.js.map","import { BaseInstrumentation, VERSION } from '@grafana/faro-core';\nimport { WebVitalsBasic } from './webVitalsBasic';\nimport { WebVitalsWithAttribution } from './webVitalsWithAttribution';\nexport class WebVitalsInstrumentation extends BaseInstrumentation {\n constructor() {\n super(...arguments);\n this.name = '@grafana/faro-web-sdk:instrumentation-web-vitals';\n this.version = VERSION;\n }\n initialize() {\n this.logDebug('Initializing');\n const webVitals = this.intializeWebVitalsInstrumentation();\n webVitals.initialize();\n }\n intializeWebVitalsInstrumentation() {\n if (this.config.trackWebVitalsAttribution) {\n return new WebVitalsWithAttribution(this.api.pushMeasurement);\n }\n return new WebVitalsBasic(this.api.pushMeasurement);\n }\n}\n//# sourceMappingURL=instrumentation.js.map","/**\n * @deprecated The conventions object will be removed in a future version\n */\nexport const Conventions = {\n /**\n * @deprecated The event names object will be removed in a future version\n */\n EventNames: {\n CLICK: 'click',\n NAVIGATION: 'navigation',\n SESSION_START: 'session_start',\n VIEW_CHANGED: 'view_changed',\n },\n};\nexport const EVENT_CLICK = 'click';\nexport const EVENT_NAVIGATION = 'navigation';\nexport const EVENT_VIEW_CHANGED = 'view_changed';\nexport const EVENT_SESSION_START = 'session_start';\nexport const EVENT_SESSION_RESUME = 'session_resume';\nexport const EVENT_SESSION_EXTEND = 'session_extend';\nexport const EVENT_ROUTE_CHANGE = 'route_change';\n//# sourceMappingURL=semantic.js.map","import { BaseInstrumentation, dateNow, EVENT_SESSION_EXTEND, EVENT_SESSION_RESUME, EVENT_SESSION_START, VERSION, } from '@grafana/faro-core';\nimport { createSession } from '../../metas';\nimport { getSessionManagerByConfig, isSampled } from './sessionManager';\nimport { PersistentSessionsManager } from './sessionManager/PersistentSessionsManager';\nimport { createUserSessionObject, isUserSessionValid } from './sessionManager/sessionManagerUtils';\nexport class SessionInstrumentation extends BaseInstrumentation {\n constructor() {\n super(...arguments);\n this.name = '@grafana/faro-web-sdk:instrumentation-session';\n this.version = VERSION;\n }\n sendSessionStartEvent(meta) {\n var _a, _b;\n const session = meta.session;\n if (session && session.id !== ((_a = this.notifiedSession) === null || _a === void 0 ? void 0 : _a.id)) {\n if (this.notifiedSession && this.notifiedSession.id === ((_b = session.attributes) === null || _b === void 0 ? void 0 : _b['previousSession'])) {\n this.api.pushEvent(EVENT_SESSION_EXTEND, {}, undefined, { skipDedupe: true });\n this.notifiedSession = session;\n return;\n }\n this.notifiedSession = session;\n // no need to add attributes and session id, they are included as part of meta\n // automatically\n this.api.pushEvent(EVENT_SESSION_START, {}, undefined, { skipDedupe: true });\n }\n }\n createInitialSession(SessionManager, sessionsConfig) {\n var _a, _b, _c, _d, _e;\n let userSession = SessionManager.fetchUserSession();\n if (sessionsConfig.persistent && sessionsConfig.maxSessionPersistenceTime && userSession) {\n const now = dateNow();\n const shouldClearPersistentSession = userSession.lastActivity < now - sessionsConfig.maxSessionPersistenceTime;\n if (shouldClearPersistentSession) {\n PersistentSessionsManager.removeUserSession();\n userSession = null;\n }\n }\n let lifecycleType;\n let initialSession;\n if (isUserSessionValid(userSession)) {\n const sessionId = userSession === null || userSession === void 0 ? void 0 : userSession.sessionId;\n initialSession = createUserSessionObject({\n sessionId,\n isSampled: userSession.isSampled || false,\n started: userSession === null || userSession === void 0 ? void 0 : userSession.started,\n });\n initialSession.sessionMeta = {\n id: sessionId,\n attributes: Object.assign(Object.assign(Object.assign({}, (_a = sessionsConfig.session) === null || _a === void 0 ? void 0 : _a.attributes), (_b = userSession === null || userSession === void 0 ? void 0 : userSession.sessionMeta) === null || _b === void 0 ? void 0 : _b.attributes), { \n // For valid resumed sessions we do not want to recalculate the sampling decision on each init phase.\n isSampled: initialSession.isSampled.toString() }),\n };\n lifecycleType = EVENT_SESSION_RESUME;\n }\n else {\n const sessionId = (_d = (_c = sessionsConfig.session) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : createSession().id;\n initialSession = createUserSessionObject({\n sessionId,\n isSampled: isSampled(),\n });\n initialSession.sessionMeta = {\n id: sessionId,\n attributes: Object.assign({ isSampled: initialSession.isSampled.toString() }, (_e = sessionsConfig.session) === null || _e === void 0 ? void 0 : _e.attributes),\n };\n lifecycleType = EVENT_SESSION_START;\n }\n return { initialSession, lifecycleType };\n }\n registerBeforeSendHook(SessionManager) {\n var _a;\n const { updateSession } = new SessionManager();\n (_a = this.transports) === null || _a === void 0 ? void 0 : _a.addBeforeSendHooks((item) => {\n var _a, _b, _c;\n updateSession();\n const attributes = (_a = item.meta.session) === null || _a === void 0 ? void 0 : _a.attributes;\n if (attributes && (attributes === null || attributes === void 0 ? void 0 : attributes['isSampled']) === 'true') {\n let newItem = JSON.parse(JSON.stringify(item));\n const newAttributes = (_b = newItem.meta.session) === null || _b === void 0 ? void 0 : _b.attributes;\n newAttributes === null || newAttributes === void 0 ? true : delete newAttributes['isSampled'];\n if (Object.keys(newAttributes !== null && newAttributes !== void 0 ? newAttributes : {}).length === 0) {\n (_c = newItem.meta.session) === null || _c === void 0 ? true : delete _c.attributes;\n }\n return newItem;\n }\n return null;\n });\n }\n initialize() {\n this.logDebug('init session instrumentation');\n const sessionTrackingConfig = this.config.sessionTracking;\n if (sessionTrackingConfig === null || sessionTrackingConfig === void 0 ? void 0 : sessionTrackingConfig.enabled) {\n const SessionManager = getSessionManagerByConfig(sessionTrackingConfig);\n this.registerBeforeSendHook(SessionManager);\n const { initialSession, lifecycleType } = this.createInitialSession(SessionManager, sessionTrackingConfig);\n SessionManager.storeUserSession(initialSession);\n const initialSessionMeta = initialSession.sessionMeta;\n this.notifiedSession = initialSessionMeta;\n this.api.setSession(initialSessionMeta);\n if (lifecycleType === EVENT_SESSION_START) {\n this.api.pushEvent(EVENT_SESSION_START, {}, undefined, { skipDedupe: true });\n }\n if (lifecycleType === EVENT_SESSION_RESUME) {\n this.api.pushEvent(EVENT_SESSION_RESUME, {}, undefined, { skipDedupe: true });\n }\n }\n this.metas.addListener(this.sendSessionStartEvent.bind(this));\n }\n}\n//# sourceMappingURL=instrumentation.js.map","import { faro, genShortID } from '@grafana/faro-core';\nexport function createSession(attributes) {\n var _a, _b, _c, _d;\n return {\n id: (_d = (_c = (_b = (_a = faro.config) === null || _a === void 0 ? void 0 : _a.sessionTracking) === null || _b === void 0 ? void 0 : _b.generateSessionId) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : genShortID(),\n attributes,\n };\n}\n//# sourceMappingURL=createSession.js.map","import { BaseInstrumentation, EVENT_VIEW_CHANGED, unknownString, VERSION } from '@grafana/faro-core';\n// all this does is send VIEW_CHANGED event\nexport class ViewInstrumentation extends BaseInstrumentation {\n constructor() {\n super(...arguments);\n this.name = '@grafana/faro-web-sdk:instrumentation-view';\n this.version = VERSION;\n }\n sendViewChangedEvent(meta) {\n var _a, _b, _c, _d;\n const view = meta.view;\n if (view && view.name !== ((_a = this.notifiedView) === null || _a === void 0 ? void 0 : _a.name)) {\n this.api.pushEvent(EVENT_VIEW_CHANGED, {\n fromView: (_c = (_b = this.notifiedView) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : unknownString,\n toView: (_d = view.name) !== null && _d !== void 0 ? _d : unknownString,\n }, undefined, { skipDedupe: true });\n this.notifiedView = view;\n }\n }\n initialize() {\n this.metas.addListener(this.sendViewChangedEvent.bind(this));\n }\n}\n//# sourceMappingURL=instrumentation.js.map","export const NAVIGATION_ENTRY = 'navigation';\nexport const RESOURCE_ENTRY = 'resource';\n//# sourceMappingURL=performanceConstants.js.map","import { isArray, unknownString } from '@grafana/faro-core';\nconst w3cTraceparentFormat = /^00-[a-f0-9]{32}-[a-f0-9]{16}-[0-9]{1,2}$/;\n// Extract traceparent from serverTiming, if present\nexport function getSpanContextFromServerTiming(serverTimings = []) {\n for (const serverEntry of serverTimings) {\n if (serverEntry.name === 'traceparent') {\n if (!w3cTraceparentFormat.test(serverEntry.description)) {\n continue;\n }\n const [, traceId, spanId] = serverEntry.description.split('-');\n if (traceId != null && spanId != null) {\n return { traceId, spanId };\n }\n break;\n }\n }\n return undefined;\n}\nexport function performanceObserverSupported() {\n return 'PerformanceObserver' in window;\n}\nexport function entryUrlIsIgnored(ignoredUrls = [], entryName) {\n return ignoredUrls.some((url) => url && entryName.match(url) != null);\n}\nexport function onDocumentReady(handleReady) {\n if (document.readyState === 'complete') {\n handleReady();\n }\n else {\n const readyStateCompleteHandler = () => {\n if (document.readyState === 'complete') {\n handleReady();\n document.removeEventListener('readystatechange', readyStateCompleteHandler);\n }\n };\n document.addEventListener('readystatechange', readyStateCompleteHandler);\n }\n}\nexport function includePerformanceEntry(performanceEntryJSON, allowProps = {}) {\n for (const [allowPropKey, allowPropValue] of Object.entries(allowProps)) {\n const perfEntryPropVal = performanceEntryJSON[allowPropKey];\n if (perfEntryPropVal == null) {\n return false;\n }\n if (isArray(allowPropValue)) {\n return allowPropValue.includes(perfEntryPropVal);\n }\n return perfEntryPropVal === allowPropValue;\n }\n // empty object allows all\n return true;\n}\nexport function createFaroResourceTiming(resourceEntryRaw) {\n const { connectEnd, connectStart, decodedBodySize, domainLookupEnd, domainLookupStart, duration, encodedBodySize, fetchStart, initiatorType, name, nextHopProtocol, redirectEnd, redirectStart, \n // @ts-expect-error the renderBlockingStatus property is not available in all browsers\n renderBlockingStatus: rbs, requestStart, responseEnd, responseStart, \n // @ts-expect-error the renderBlockingStatus property is not available in all browsers\n responseStatus, secureConnectionStart, transferSize, workerStart, } = resourceEntryRaw;\n return {\n name: name,\n duration: toFaroPerformanceTimingString(duration),\n tcpHandshakeTime: toFaroPerformanceTimingString(connectEnd - connectStart),\n dnsLookupTime: toFaroPerformanceTimingString(domainLookupEnd - domainLookupStart),\n tlsNegotiationTime: toFaroPerformanceTimingString(requestStart - secureConnectionStart),\n responseStatus: toFaroPerformanceTimingString(responseStatus),\n redirectTime: toFaroPerformanceTimingString(redirectEnd - redirectStart),\n requestTime: toFaroPerformanceTimingString(responseStart - requestStart),\n responseTime: toFaroPerformanceTimingString(responseEnd - responseStart),\n fetchTime: toFaroPerformanceTimingString(responseEnd - fetchStart),\n serviceWorkerTime: toFaroPerformanceTimingString(fetchStart - workerStart),\n decodedBodySize: toFaroPerformanceTimingString(decodedBodySize),\n encodedBodySize: toFaroPerformanceTimingString(encodedBodySize),\n cacheHitStatus: getCacheType(),\n renderBlockingStatus: toFaroPerformanceTimingString(rbs),\n protocol: nextHopProtocol,\n initiatorType: initiatorType,\n // TODO: add in future iteration, ideally after nested objects are supported by the collector.\n // serverTiming: resourceEntryRaw.serverTiming,\n };\n function getCacheType() {\n let cacheType = 'fullLoad';\n if (transferSize === 0) {\n if (decodedBodySize > 0) {\n cacheType = 'cache';\n }\n }\n else {\n if (responseStatus != null) {\n if (responseStatus === 304) {\n cacheType = 'conditionalFetch';\n }\n }\n else if (encodedBodySize > 0 && transferSize < encodedBodySize) {\n cacheType = 'conditionalFetch';\n }\n }\n return cacheType;\n }\n}\nexport function createFaroNavigationTiming(navigationEntryRaw) {\n const { activationStart, domComplete, domContentLoadedEventEnd, domContentLoadedEventStart, domInteractive, fetchStart, loadEventEnd, loadEventStart, responseStart, type, } = navigationEntryRaw;\n const parserStart = getDocumentParsingTime();\n return Object.assign({ visibilityState: document.visibilityState, pageLoadTime: toFaroPerformanceTimingString(domComplete - fetchStart), documentParsingTime: toFaroPerformanceTimingString(parserStart ? domInteractive - parserStart : null), domProcessingTime: toFaroPerformanceTimingString(domComplete - domInteractive), domContentLoadHandlerTime: toFaroPerformanceTimingString(domContentLoadedEventEnd - domContentLoadedEventStart), onLoadTime: toFaroPerformanceTimingString(loadEventEnd - loadEventStart), \n // For more accuracy on prerendered pages page we calculate relative top the activationStart instead of the start of the navigation.\n // clamp to 0 if activationStart occurs after first byte is received.\n ttfb: toFaroPerformanceTimingString(Math.max(responseStart - (activationStart !== null && activationStart !== void 0 ? activationStart : 0), 0)), type: type }, createFaroResourceTiming(navigationEntryRaw));\n}\nfunction getDocumentParsingTime() {\n var _a;\n if (((_a = performance.timing) === null || _a === void 0 ? void 0 : _a.domLoading) != null) {\n // the browser is about to start parsing the first received bytes of the HTML document.\n // This property is deprecated but there isn't a really good alternative atm.\n // For now we stick with domLoading and keep researching a better alternative.\n return performance.timing.domLoading - performance.timeOrigin;\n }\n return null;\n}\nfunction toFaroPerformanceTimingString(v) {\n if (v == null) {\n return unknownString;\n }\n if (typeof v === 'number') {\n return Math.round(v).toString();\n }\n return v.toString();\n}\n//# sourceMappingURL=performanceUtils.js.map","import { faro, genShortID } from '@grafana/faro-core';\nimport { RESOURCE_ENTRY } from './performanceConstants';\nimport { createFaroResourceTiming, entryUrlIsIgnored, getSpanContextFromServerTiming, includePerformanceEntry, } from './performanceUtils';\nconst DEFAULT_TRACK_RESOURCES = { initiatorType: ['xmlhttprequest', 'fetch'] };\nexport function observeResourceTimings(faroNavigationId, pushEvent, ignoredUrls) {\n const trackResources = faro.config.trackResources;\n const observer = new PerformanceObserver((observedEntries) => {\n const entries = observedEntries.getEntries();\n for (const resourceEntryRaw of entries) {\n if (entryUrlIsIgnored(ignoredUrls, resourceEntryRaw.name)) {\n return;\n }\n const resourceEntryJson = resourceEntryRaw.toJSON();\n let spanContext = getSpanContextFromServerTiming(resourceEntryJson === null || resourceEntryJson === void 0 ? void 0 : resourceEntryJson.serverTiming);\n if ((trackResources == null && includePerformanceEntry(resourceEntryJson, DEFAULT_TRACK_RESOURCES)) ||\n trackResources) {\n const faroResourceEntry = Object.assign(Object.assign({}, createFaroResourceTiming(resourceEntryJson)), { faroNavigationId, faroResourceId: genShortID() });\n pushEvent('faro.performance.resource', faroResourceEntry, undefined, {\n spanContext,\n timestampOverwriteMs: performance.timeOrigin + resourceEntryJson.startTime,\n });\n }\n }\n });\n observer.observe({\n type: RESOURCE_ENTRY,\n buffered: true,\n });\n}\n//# sourceMappingURL=resource.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { BaseInstrumentation, VERSION } from '@grafana/faro-core';\nimport { getNavigationTimings } from './navigation';\nimport { onDocumentReady, performanceObserverSupported } from './performanceUtils';\nimport { observeResourceTimings } from './resource';\nexport class PerformanceInstrumentation extends BaseInstrumentation {\n constructor() {\n super(...arguments);\n this.name = '@grafana/faro-web-sdk:instrumentation-performance';\n this.version = VERSION;\n }\n initialize() {\n if (!performanceObserverSupported()) {\n this.logDebug('performance observer not supported. Disable performance instrumentation.');\n return;\n }\n onDocumentReady(() => __awaiter(this, void 0, void 0, function* () {\n const pushEvent = this.api.pushEvent;\n const ignoredUrls = this.getIgnoreUrls();\n const { faroNavigationId } = yield getNavigationTimings(pushEvent, ignoredUrls);\n if (faroNavigationId != null) {\n observeResourceTimings(faroNavigationId, pushEvent, ignoredUrls);\n }\n }));\n }\n getIgnoreUrls() {\n var _a;\n return (_a = this.transports.transports) === null || _a === void 0 ? void 0 : _a.flatMap((transport) => transport.getIgnoreUrls());\n }\n}\n//# sourceMappingURL=instrumentation.js.map","import { genShortID, unknownString } from '@grafana/faro-core';\nimport { getItem, setItem, webStorageType } from '../../utils';\nimport { NAVIGATION_ID_STORAGE_KEY } from '../instrumentationConstants';\nimport { NAVIGATION_ENTRY } from './performanceConstants';\nimport { createFaroNavigationTiming, entryUrlIsIgnored, getSpanContextFromServerTiming } from './performanceUtils';\nexport function getNavigationTimings(pushEvent, ignoredUrls) {\n let faroNavigationEntryResolve;\n const faroNavigationEntryPromise = new Promise((resolve) => {\n faroNavigationEntryResolve = resolve;\n });\n const observer = new PerformanceObserver((observedEntries) => {\n var _a;\n const [navigationEntryRaw] = observedEntries.getEntries();\n if (navigationEntryRaw == null || entryUrlIsIgnored(ignoredUrls, navigationEntryRaw.name)) {\n return;\n }\n const navEntryJson = navigationEntryRaw.toJSON();\n let spanContext = getSpanContextFromServerTiming(navEntryJson === null || navEntryJson === void 0 ? void 0 : navEntryJson.serverTiming);\n const faroPreviousNavigationId = (_a = getItem(NAVIGATION_ID_STORAGE_KEY, webStorageType.session)) !== null && _a !== void 0 ? _a : unknownString;\n const faroNavigationEntry = Object.assign(Object.assign({}, createFaroNavigationTiming(navEntryJson)), { faroNavigationId: genShortID(), faroPreviousNavigationId });\n setItem(NAVIGATION_ID_STORAGE_KEY, faroNavigationEntry.faroNavigationId, webStorageType.session);\n pushEvent('faro.performance.navigation', faroNavigationEntry, undefined, {\n spanContext,\n timestampOverwriteMs: performance.timeOrigin + navEntryJson.startTime,\n });\n faroNavigationEntryResolve(faroNavigationEntry);\n });\n observer.observe({\n type: NAVIGATION_ENTRY,\n buffered: true,\n });\n return faroNavigationEntryPromise;\n}\n//# sourceMappingURL=navigation.js.map","import { allLogLevels, BaseInstrumentation, LogLevel, VERSION } from '@grafana/faro-core';\nexport class ConsoleInstrumentation extends BaseInstrumentation {\n constructor(options = {}) {\n super();\n this.options = options;\n this.name = '@grafana/faro-web-sdk:instrumentation-console';\n this.version = VERSION;\n }\n initialize() {\n this.logDebug('Initializing\\n', this.options);\n allLogLevels\n .filter((level) => { var _a; return !((_a = this.options.disabledLevels) !== null && _a !== void 0 ? _a : ConsoleInstrumentation.defaultDisabledLevels).includes(level); })\n .forEach((level) => {\n /* eslint-disable-next-line no-console */\n console[level] = (...args) => {\n try {\n this.api.pushLog(args, { level });\n }\n catch (err) {\n this.logError(err);\n }\n finally {\n this.unpatchedConsole[level](...args);\n }\n };\n });\n }\n}\nConsoleInstrumentation.defaultDisabledLevels = [LogLevel.DEBUG, LogLevel.TRACE, LogLevel.LOG];\n//# sourceMappingURL=instrumentation.js.map","import { ConsoleInstrumentation, ErrorsInstrumentation, PerformanceInstrumentation, SessionInstrumentation, ViewInstrumentation, WebVitalsInstrumentation, } from '../instrumentations';\nexport function getWebInstrumentations(options = {}) {\n const instrumentations = [\n new ErrorsInstrumentation(),\n new WebVitalsInstrumentation(),\n new SessionInstrumentation(),\n new ViewInstrumentation(),\n ];\n if (options.enablePerformanceInstrumentation !== false) {\n // unshift to ensure that initialization starts before the other instrumentations\n instrumentations.unshift(new PerformanceInstrumentation());\n }\n if (options.captureConsole !== false) {\n instrumentations.push(new ConsoleInstrumentation({\n disabledLevels: options.captureConsoleDisabledLevels,\n }));\n }\n return instrumentations;\n}\n//# sourceMappingURL=getWebInstrumentations.js.map","import { initializeFaro as coreInit } from '@grafana/faro-core';\nimport { makeCoreConfig } from './config';\nexport function initializeFaro(config) {\n const coreConfig = makeCoreConfig(config);\n if (!coreConfig) {\n return undefined;\n }\n return coreInit(coreConfig);\n}\n//# sourceMappingURL=initialize.js.map","import { createInternalLogger, defaultBatchingConfig, defaultGlobalObjectKey, defaultInternalLoggerLevel, defaultLogArgsSerializer, defaultUnpatchedConsole, isObject, } from '@grafana/faro-core';\nimport { defaultEventDomain } from '../consts';\nimport { parseStacktrace } from '../instrumentations';\nimport { defaultSessionTrackingConfig } from '../instrumentations/session';\nimport { defaultMetas } from '../metas';\nimport { k6Meta } from '../metas/k6';\nimport { FetchTransport } from '../transports';\nimport { getWebInstrumentations } from './getWebInstrumentations';\nexport function makeCoreConfig(browserConfig) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n const transports = [];\n const internalLogger = createInternalLogger(browserConfig.unpatchedConsole, browserConfig.internalLoggerLevel);\n if (browserConfig.transports) {\n if (browserConfig.url || browserConfig.apiKey) {\n internalLogger.error('if \"transports\" is defined, \"url\" and \"apiKey\" should not be defined');\n }\n transports.push(...browserConfig.transports);\n }\n else if (browserConfig.url) {\n transports.push(new FetchTransport({\n url: browserConfig.url,\n apiKey: browserConfig.apiKey,\n }));\n }\n else {\n internalLogger.error('either \"url\" or \"transports\" must be defined');\n }\n function createMetas() {\n const initialMetas = defaultMetas;\n if (browserConfig.metas) {\n initialMetas.push(...browserConfig.metas);\n }\n const isK6BrowserSession = isObject(window.k6);\n if (isK6BrowserSession) {\n return [...initialMetas, k6Meta];\n }\n return initialMetas;\n }\n const config = {\n app: browserConfig.app,\n batching: Object.assign(Object.assign({}, defaultBatchingConfig), browserConfig.batching),\n dedupe: (_a = browserConfig.dedupe) !== null && _a !== void 0 ? _a : true,\n globalObjectKey: browserConfig.globalObjectKey || defaultGlobalObjectKey,\n instrumentations: (_b = browserConfig.instrumentations) !== null && _b !== void 0 ? _b : getWebInstrumentations(),\n internalLoggerLevel: (_c = browserConfig.internalLoggerLevel) !== null && _c !== void 0 ? _c : defaultInternalLoggerLevel,\n isolate: (_d = browserConfig.isolate) !== null && _d !== void 0 ? _d : false,\n logArgsSerializer: (_e = browserConfig.logArgsSerializer) !== null && _e !== void 0 ? _e : defaultLogArgsSerializer,\n metas: createMetas(),\n parseStacktrace,\n paused: (_f = browserConfig.paused) !== null && _f !== void 0 ? _f : false,\n preventGlobalExposure: (_g = browserConfig.preventGlobalExposure) !== null && _g !== void 0 ? _g : false,\n transports,\n unpatchedConsole: (_h = browserConfig.unpatchedConsole) !== null && _h !== void 0 ? _h : defaultUnpatchedConsole,\n beforeSend: browserConfig.beforeSend,\n eventDomain: (_j = browserConfig.eventDomain) !== null && _j !== void 0 ? _j : defaultEventDomain,\n ignoreErrors: browserConfig.ignoreErrors,\n ignoreUrls: browserConfig.ignoreUrls,\n sessionTracking: Object.assign(Object.assign({}, defaultSessionTrackingConfig), browserConfig.sessionTracking),\n user: browserConfig.user,\n view: browserConfig.view,\n trackResources: browserConfig.trackResources,\n trackWebVitalsAttribution: browserConfig.trackWebVitalsAttribution,\n };\n return config;\n}\n//# sourceMappingURL=makeCoreConfig.js.map","import { Environment } from '../getEnvironment';\nimport { FaroEnvironment } from './getFaroEnvironment';\n\nexport const FARO_ENVIRONMENTS = new Map([\n // Uncomment this map entry to test from your local machine\n // [\n // 'local',\n // {\n // environment: 'local',\n // appName: 'grafana-pyroscope-local',\n // faroUrl: 'https://faro-collector-ops-eu-south-0.grafana-ops.net/collect/d6ca259b3387e6ddd641973d0fad3ed0',\n // },\n // ],\n // Always keep the options below\n [\n 'dev',\n {\n environment: 'dev',\n appName: 'grafana-pyroscope-dev',\n faroUrl: 'https://faro-collector-ops-eu-south-0.grafana-ops.net/collect/48e03a2647389f2f6494af7f975b4084',\n },\n ],\n [\n 'ops',\n {\n environment: 'ops',\n appName: 'grafana-pyroscope-ops',\n faroUrl: 'https://faro-collector-ops-eu-south-0.grafana-ops.net/collect/b5cfd5eeb412cf5e74bd828b4ddd17ff',\n },\n ],\n [\n 'prod',\n {\n environment: 'prod',\n appName: 'grafana-pyroscope-prod',\n faroUrl: 'https://faro-collector-ops-eu-south-0.grafana-ops.net/collect/6cbe17b3af4b72ce5936bf4d15a5c393',\n },\n ],\n]);\n","import { Faro, getWebInstrumentations, initializeFaro } from '@grafana/faro-web-sdk';\nimport { config } from '@grafana/runtime';\n\nimport { PLUGIN_BASE_URL, PYROSCOPE_APP_ID } from '../../../../constants';\nimport { GIT_COMMIT } from '../../../../version';\nimport { getFaroEnvironment } from './getFaroEnvironment';\n\nlet faro: Faro | null = null;\n\nexport const getFaro = () => faro;\nexport const setFaro = (instance: Faro | null) => (faro = instance);\n\nexport function initFaro() {\n if (getFaro()) {\n return;\n }\n\n const faroEnvironment = getFaroEnvironment();\n if (!faroEnvironment) {\n return;\n }\n\n const { environment, faroUrl, appName } = faroEnvironment;\n\n const { apps, bootData, buildInfo } = config;\n\n const appRelease = apps[PYROSCOPE_APP_ID].version;\n const userEmail = bootData.user.email;\n const grafanaVersion = `v${buildInfo.version} (${buildInfo.edition})`;\n\n setFaro(\n initializeFaro({\n url: faroUrl,\n app: {\n name: appName,\n release: appRelease,\n version: GIT_COMMIT,\n environment,\n namespace: grafanaVersion, // :man_shrug:\n },\n user: {\n email: userEmail,\n },\n instrumentations: [\n ...getWebInstrumentations({\n captureConsole: false,\n }),\n ],\n isolate: true,\n beforeSend: (event) => {\n if ((event.meta.page?.url ?? '').includes(PLUGIN_BASE_URL)) {\n event.meta.view = {\n name: new URLSearchParams(event.meta.page?.url).get('explorationType') || '',\n };\n\n return event;\n }\n\n return null;\n },\n })\n );\n}\n","import { Environment, getEnvironment } from '../getEnvironment';\nimport { FARO_ENVIRONMENTS } from './faro-environments';\n\nexport type FaroEnvironment = { environment: Environment; appName: string; faroUrl: string };\n\nexport function getFaroEnvironment() {\n const environment = getEnvironment();\n\n if (!environment || !FARO_ENVIRONMENTS.has(environment)) {\n return;\n }\n\n return FARO_ENVIRONMENTS.get(environment) as FaroEnvironment;\n}\n","export type Environment = 'local' | 'dev' | 'ops' | 'prod';\n\nconst MATCHERS: Array<{ regExp: RegExp; environment: Environment }> = [\n {\n regExp: /localhost/,\n environment: 'local',\n },\n {\n regExp: /grafana-dev\\.net/,\n environment: 'dev',\n },\n {\n regExp: /grafana-ops\\.net/,\n environment: 'ops',\n },\n {\n regExp: /grafana\\.net/,\n environment: 'prod',\n },\n];\n\nexport function getEnvironment(): Environment | null {\n if (!window?.location?.host) {\n return null;\n }\n\n const found = MATCHERS.find(({ regExp }) => regExp.test(window.location.host));\n\n return found ? found.environment : null;\n}\n","import { LogLevel } from '@grafana/faro-web-sdk';\nimport { getFaro } from '@shared/infrastructure/tracking/faro/faro';\n\nimport { Environment, getEnvironment } from './getEnvironment';\n\nexport type ErrorContext = Record;\n\nexport class Logger {\n #environment: Environment | null;\n\n constructor() {\n this.#environment = getEnvironment();\n }\n\n #callConsole(methodName: 'trace' | 'debug' | 'info' | 'log' | 'warn' | 'error', args: any[]) {\n // silence console in production\n if (this.#environment !== 'prod') {\n console[methodName](...args); // eslint-disable-line no-console\n }\n }\n\n trace() {\n this.#callConsole('trace', []);\n\n getFaro()?.api.pushLog([], {\n level: LogLevel.TRACE,\n });\n }\n\n debug(...args: any) {\n this.#callConsole('debug', args);\n\n getFaro()?.api.pushLog(args, {\n level: LogLevel.DEBUG,\n });\n }\n\n info(...args: any) {\n this.#callConsole('info', args);\n\n getFaro()?.api.pushLog(args, {\n level: LogLevel.INFO,\n });\n }\n\n log(...args: any) {\n this.#callConsole('log', args);\n\n getFaro()?.api.pushLog(args, {\n level: LogLevel.LOG,\n });\n }\n\n warn(...args: any) {\n this.#callConsole('warn', args);\n\n getFaro()?.api.pushLog(args, {\n level: LogLevel.WARN,\n });\n }\n\n error(error: Error, context?: ErrorContext) {\n this.#callConsole('error', [error]);\n\n if (context) {\n this.#callConsole('error', ['Error context', context]);\n }\n\n // does not report an error, but an exception ;)\n getFaro()?.api.pushError(error, {\n context,\n });\n }\n}\n\nexport const logger = new Logger();\n","import { logger } from '@shared/infrastructure/tracking/logger';\n\nimport plugin from '../../plugin.json';\n\nclass UserStorage {\n #storage: Storage = window.localStorage;\n\n KEYS = {\n SETTINGS: `${plugin.id}.userSettings`,\n GITHUB_INTEGRATION: `${plugin.id}.gitHubIntegration`,\n PROFILES_EXPLORER: `${plugin.id}.profilesExplorer`,\n };\n\n has(itemName: string): boolean {\n return this.#storage.hasOwnProperty(itemName);\n }\n\n get(itemName: string): null | any {\n if (!this.has(itemName)) {\n return null;\n }\n\n try {\n return JSON.parse(this.#storage.getItem(itemName) as string);\n } catch (error) {\n logger.error(error as Error, { info: `Error parsing JSON for storage item \"${itemName}\"!` });\n return null;\n }\n }\n\n set(itemName: string, value: any): void {\n try {\n this.#storage.setItem(itemName, JSON.stringify(value));\n } catch (error) {\n logger.error(error as Error, { info: `Error setting storage item \"${itemName}\"!` });\n }\n }\n}\n\nexport const userStorage = new UserStorage();\n","import { Alert, AlertVariant } from '@grafana/ui';\nimport { ErrorContext, logger } from '@shared/infrastructure/tracking/logger';\nimport React from 'react';\n\ntype InlineBannerProps = {\n severity: AlertVariant;\n title: string;\n message?: string | React.ReactNode;\n error?: Error;\n errorContext?: ErrorContext;\n};\n\nexport function InlineBanner({ severity, title, message, error, errorContext }: InlineBannerProps) {\n if (error) {\n logger.error(error, errorContext);\n }\n\n return (\n \n {error && (\n <>\n {error.message}\n
\n \n )}\n {message}\n
\n );\n}\n","import { css } from '@emotion/css';\nimport { formattedValueToString, getValueFormat, GrafanaTheme2 } from '@grafana/data';\nimport { Divider, IconButton, styleMixins, Toggletip, useStyles2 } from '@grafana/ui';\nimport React, { useMemo } from 'react';\n\nimport { QueryAnalysisResult } from './domain/QueryAnalysis';\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n row: css({\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'flex-start',\n }),\n headerColumn: css({\n display: 'flex',\n flexDirection: 'column',\n minWidth: '120px',\n alignItems: 'start',\n }),\n column: css({\n display: 'flex',\n flexDirection: 'column',\n minWidth: '120px',\n alignItems: 'end',\n }),\n tooltip: css({\n display: 'flex',\n color: theme.colors.text.secondary,\n fontSize: theme.typography.bodySmall.fontSize,\n }),\n contentWithIcon: css({\n display: 'none',\n\n [`@media ${styleMixins.mediaUp(theme.v1.breakpoints.sm)}`]: {\n display: 'block',\n },\n }),\n});\n\ntype QueryAnalysisTooltipProps = {\n data: QueryAnalysisResult;\n};\n\nconst formatSize = (size: number) => formattedValueToString(getValueFormat('decbytes')(size));\n\nconst formatCount = (count: number) => formattedValueToString(getValueFormat('short')(count));\n\nexport function QueryAnalysisTooltip(props: QueryAnalysisTooltipProps) {\n const styles = useStyles2(getStyles);\n const { data } = props;\n const totalBytesInTimeRange = formatSize(data.queryImpact.totalBytesInTimeRange);\n\n const queryAnalysisTooltip = useMemo(() => {\n return (\n
\n
\n
Data in time range
\n
{totalBytesInTimeRange}
\n
 
\n
\n {data.queryImpact.totalQueriedSeries !== undefined && (\n
\n
Series in query
\n
{formatCount(data.queryImpact.totalQueriedSeries)}
\n
 
\n
\n )}\n
\n
Deduplication
\n
{data.queryImpact.deduplicationNeeded ? 'yes' : 'no'}
\n
 
\n
\n \n
\n
 
\n {data.queryScopes.map((s, i) => (\n
\n {s.componentType}\n
\n ))}\n
\n
\n
Replicas
\n {data.queryScopes.map((s, i) => (\n
\n {s.componentCount || '/'}\n
\n ))}\n
\n
\n
Blocks
\n {data.queryScopes.map((s, i) => (\n
\n {formatCount(s.blockCount) || '/'}\n
\n ))}\n
\n
\n
Series
\n {data.queryScopes.map((s, i) => (\n
\n {formatCount(s.seriesCount) || '/'}\n
\n ))}\n
\n
\n
Profiles
\n {data.queryScopes.map((s, i) => (\n
\n {formatCount(s.profileCount) || '/'}\n
\n ))}\n
\n
\n
Samples
\n {data.queryScopes.map((s, i) => (\n
\n {formatCount(s.sampleCount) || '/'}\n
\n ))}\n
\n
\n
 
\n
 
\n
 
\n
\n
\n
Index Store
\n {data.queryScopes.map((s, i) => (\n
\n {formatSize(s.indexBytes) || '/'}\n
\n ))}\n
\n
\n
Profiles Store
\n {data.queryScopes.map((s, i) => (\n
\n {formatSize(s.profileBytes) || '/'}\n
\n ))}\n
\n
\n
Symbols Store
\n {data.queryScopes.map((s, i) => (\n
\n {formatSize(s.symbolBytes) || '/'}\n
\n ))}\n
\n
\n );\n }, [data, styles, totalBytesInTimeRange]);\n\n return (\n <>\n {data.queryImpact.totalBytesInTimeRange !== undefined ? (\n \n
\n Stored data in time range: {totalBytesInTimeRange}\n  \n \n
\n
\n ) : null}\n \n );\n}\n","import PropTypes from 'prop-types';\nimport withSideEffect from 'react-side-effect';\nimport isEqual from 'react-fast-compare';\nimport React from 'react';\nimport objectAssign from 'object-assign';\n\nvar ATTRIBUTE_NAMES = {\n BODY: \"bodyAttributes\",\n HTML: \"htmlAttributes\",\n TITLE: \"titleAttributes\"\n};\n\nvar TAG_NAMES = {\n BASE: \"base\",\n BODY: \"body\",\n HEAD: \"head\",\n HTML: \"html\",\n LINK: \"link\",\n META: \"meta\",\n NOSCRIPT: \"noscript\",\n SCRIPT: \"script\",\n STYLE: \"style\",\n TITLE: \"title\"\n};\n\nvar VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) {\n return TAG_NAMES[name];\n});\n\nvar TAG_PROPERTIES = {\n CHARSET: \"charset\",\n CSS_TEXT: \"cssText\",\n HREF: \"href\",\n HTTPEQUIV: \"http-equiv\",\n INNER_HTML: \"innerHTML\",\n ITEM_PROP: \"itemprop\",\n NAME: \"name\",\n PROPERTY: \"property\",\n REL: \"rel\",\n SRC: \"src\",\n TARGET: \"target\"\n};\n\nvar REACT_TAG_MAP = {\n accesskey: \"accessKey\",\n charset: \"charSet\",\n class: \"className\",\n contenteditable: \"contentEditable\",\n contextmenu: \"contextMenu\",\n \"http-equiv\": \"httpEquiv\",\n itemprop: \"itemProp\",\n tabindex: \"tabIndex\"\n};\n\nvar HELMET_PROPS = {\n DEFAULT_TITLE: \"defaultTitle\",\n DEFER: \"defer\",\n ENCODE_SPECIAL_CHARACTERS: \"encodeSpecialCharacters\",\n ON_CHANGE_CLIENT_STATE: \"onChangeClientState\",\n TITLE_TEMPLATE: \"titleTemplate\"\n};\n\nvar HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) {\n obj[REACT_TAG_MAP[key]] = key;\n return obj;\n}, {});\n\nvar SELF_CLOSING_TAGS = [TAG_NAMES.NOSCRIPT, TAG_NAMES.SCRIPT, TAG_NAMES.STYLE];\n\nvar HELMET_ATTRIBUTE = \"data-react-helmet\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nvar encodeSpecialCharacters = function encodeSpecialCharacters(str) {\n var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (encode === false) {\n return String(str);\n }\n\n return String(str).replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\");\n};\n\nvar getTitleFromPropsList = function getTitleFromPropsList(propsList) {\n var innermostTitle = getInnermostProperty(propsList, TAG_NAMES.TITLE);\n var innermostTemplate = getInnermostProperty(propsList, HELMET_PROPS.TITLE_TEMPLATE);\n\n if (innermostTemplate && innermostTitle) {\n // use function arg to avoid need to escape $ characters\n return innermostTemplate.replace(/%s/g, function () {\n return Array.isArray(innermostTitle) ? innermostTitle.join(\"\") : innermostTitle;\n });\n }\n\n var innermostDefaultTitle = getInnermostProperty(propsList, HELMET_PROPS.DEFAULT_TITLE);\n\n return innermostTitle || innermostDefaultTitle || undefined;\n};\n\nvar getOnChangeClientState = function getOnChangeClientState(propsList) {\n return getInnermostProperty(propsList, HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || function () {};\n};\n\nvar getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) {\n return propsList.filter(function (props) {\n return typeof props[tagType] !== \"undefined\";\n }).map(function (props) {\n return props[tagType];\n }).reduce(function (tagAttrs, current) {\n return _extends({}, tagAttrs, current);\n }, {});\n};\n\nvar getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) {\n return propsList.filter(function (props) {\n return typeof props[TAG_NAMES.BASE] !== \"undefined\";\n }).map(function (props) {\n return props[TAG_NAMES.BASE];\n }).reverse().reduce(function (innermostBaseTag, tag) {\n if (!innermostBaseTag.length) {\n var keys = Object.keys(tag);\n\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) {\n return innermostBaseTag.concat(tag);\n }\n }\n }\n\n return innermostBaseTag;\n }, []);\n};\n\nvar getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) {\n // Calculate list of tags, giving priority innermost component (end of the propslist)\n var approvedSeenTags = {};\n\n return propsList.filter(function (props) {\n if (Array.isArray(props[tagName])) {\n return true;\n }\n if (typeof props[tagName] !== \"undefined\") {\n warn(\"Helmet: \" + tagName + \" should be of type \\\"Array\\\". Instead found type \\\"\" + _typeof(props[tagName]) + \"\\\"\");\n }\n return false;\n }).map(function (props) {\n return props[tagName];\n }).reverse().reduce(function (approvedTags, instanceTags) {\n var instanceSeenTags = {};\n\n instanceTags.filter(function (tag) {\n var primaryAttributeKey = void 0;\n var keys = Object.keys(tag);\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n // Special rule with link tags, since rel and href are both primary tags, rel takes priority\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === TAG_PROPERTIES.REL && tag[primaryAttributeKey].toLowerCase() === \"canonical\") && !(lowerCaseAttributeKey === TAG_PROPERTIES.REL && tag[lowerCaseAttributeKey].toLowerCase() === \"stylesheet\")) {\n primaryAttributeKey = lowerCaseAttributeKey;\n }\n // Special case for innerHTML which doesn't work lowercased\n if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === TAG_PROPERTIES.INNER_HTML || attributeKey === TAG_PROPERTIES.CSS_TEXT || attributeKey === TAG_PROPERTIES.ITEM_PROP)) {\n primaryAttributeKey = attributeKey;\n }\n }\n\n if (!primaryAttributeKey || !tag[primaryAttributeKey]) {\n return false;\n }\n\n var value = tag[primaryAttributeKey].toLowerCase();\n\n if (!approvedSeenTags[primaryAttributeKey]) {\n approvedSeenTags[primaryAttributeKey] = {};\n }\n\n if (!instanceSeenTags[primaryAttributeKey]) {\n instanceSeenTags[primaryAttributeKey] = {};\n }\n\n if (!approvedSeenTags[primaryAttributeKey][value]) {\n instanceSeenTags[primaryAttributeKey][value] = true;\n return true;\n }\n\n return false;\n }).reverse().forEach(function (tag) {\n return approvedTags.push(tag);\n });\n\n // Update seen tags with tags from this instance\n var keys = Object.keys(instanceSeenTags);\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var tagUnion = objectAssign({}, approvedSeenTags[attributeKey], instanceSeenTags[attributeKey]);\n\n approvedSeenTags[attributeKey] = tagUnion;\n }\n\n return approvedTags;\n }, []).reverse();\n};\n\nvar getInnermostProperty = function getInnermostProperty(propsList, property) {\n for (var i = propsList.length - 1; i >= 0; i--) {\n var props = propsList[i];\n\n if (props.hasOwnProperty(property)) {\n return props[property];\n }\n }\n\n return null;\n};\n\nvar reducePropsToState = function reducePropsToState(propsList) {\n return {\n baseTag: getBaseTagFromPropsList([TAG_PROPERTIES.HREF, TAG_PROPERTIES.TARGET], propsList),\n bodyAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.BODY, propsList),\n defer: getInnermostProperty(propsList, HELMET_PROPS.DEFER),\n encode: getInnermostProperty(propsList, HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),\n htmlAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.HTML, propsList),\n linkTags: getTagsFromPropsList(TAG_NAMES.LINK, [TAG_PROPERTIES.REL, TAG_PROPERTIES.HREF], propsList),\n metaTags: getTagsFromPropsList(TAG_NAMES.META, [TAG_PROPERTIES.NAME, TAG_PROPERTIES.CHARSET, TAG_PROPERTIES.HTTPEQUIV, TAG_PROPERTIES.PROPERTY, TAG_PROPERTIES.ITEM_PROP], propsList),\n noscriptTags: getTagsFromPropsList(TAG_NAMES.NOSCRIPT, [TAG_PROPERTIES.INNER_HTML], propsList),\n onChangeClientState: getOnChangeClientState(propsList),\n scriptTags: getTagsFromPropsList(TAG_NAMES.SCRIPT, [TAG_PROPERTIES.SRC, TAG_PROPERTIES.INNER_HTML], propsList),\n styleTags: getTagsFromPropsList(TAG_NAMES.STYLE, [TAG_PROPERTIES.CSS_TEXT], propsList),\n title: getTitleFromPropsList(propsList),\n titleAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.TITLE, propsList)\n };\n};\n\nvar rafPolyfill = function () {\n var clock = Date.now();\n\n return function (callback) {\n var currentTime = Date.now();\n\n if (currentTime - clock > 16) {\n clock = currentTime;\n callback(currentTime);\n } else {\n setTimeout(function () {\n rafPolyfill(callback);\n }, 0);\n }\n };\n}();\n\nvar cafPolyfill = function cafPolyfill(id) {\n return clearTimeout(id);\n};\n\nvar requestAnimationFrame = typeof window !== \"undefined\" ? window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || rafPolyfill : global.requestAnimationFrame || rafPolyfill;\n\nvar cancelAnimationFrame = typeof window !== \"undefined\" ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || cafPolyfill : global.cancelAnimationFrame || cafPolyfill;\n\nvar warn = function warn(msg) {\n return console && typeof console.warn === \"function\" && console.warn(msg);\n};\n\nvar _helmetCallback = null;\n\nvar handleClientStateChange = function handleClientStateChange(newState) {\n if (_helmetCallback) {\n cancelAnimationFrame(_helmetCallback);\n }\n\n if (newState.defer) {\n _helmetCallback = requestAnimationFrame(function () {\n commitTagChanges(newState, function () {\n _helmetCallback = null;\n });\n });\n } else {\n commitTagChanges(newState);\n _helmetCallback = null;\n }\n};\n\nvar commitTagChanges = function commitTagChanges(newState, cb) {\n var baseTag = newState.baseTag,\n bodyAttributes = newState.bodyAttributes,\n htmlAttributes = newState.htmlAttributes,\n linkTags = newState.linkTags,\n metaTags = newState.metaTags,\n noscriptTags = newState.noscriptTags,\n onChangeClientState = newState.onChangeClientState,\n scriptTags = newState.scriptTags,\n styleTags = newState.styleTags,\n title = newState.title,\n titleAttributes = newState.titleAttributes;\n\n updateAttributes(TAG_NAMES.BODY, bodyAttributes);\n updateAttributes(TAG_NAMES.HTML, htmlAttributes);\n\n updateTitle(title, titleAttributes);\n\n var tagUpdates = {\n baseTag: updateTags(TAG_NAMES.BASE, baseTag),\n linkTags: updateTags(TAG_NAMES.LINK, linkTags),\n metaTags: updateTags(TAG_NAMES.META, metaTags),\n noscriptTags: updateTags(TAG_NAMES.NOSCRIPT, noscriptTags),\n scriptTags: updateTags(TAG_NAMES.SCRIPT, scriptTags),\n styleTags: updateTags(TAG_NAMES.STYLE, styleTags)\n };\n\n var addedTags = {};\n var removedTags = {};\n\n Object.keys(tagUpdates).forEach(function (tagType) {\n var _tagUpdates$tagType = tagUpdates[tagType],\n newTags = _tagUpdates$tagType.newTags,\n oldTags = _tagUpdates$tagType.oldTags;\n\n\n if (newTags.length) {\n addedTags[tagType] = newTags;\n }\n if (oldTags.length) {\n removedTags[tagType] = tagUpdates[tagType].oldTags;\n }\n });\n\n cb && cb();\n\n onChangeClientState(newState, addedTags, removedTags);\n};\n\nvar flattenArray = function flattenArray(possibleArray) {\n return Array.isArray(possibleArray) ? possibleArray.join(\"\") : possibleArray;\n};\n\nvar updateTitle = function updateTitle(title, attributes) {\n if (typeof title !== \"undefined\" && document.title !== title) {\n document.title = flattenArray(title);\n }\n\n updateAttributes(TAG_NAMES.TITLE, attributes);\n};\n\nvar updateAttributes = function updateAttributes(tagName, attributes) {\n var elementTag = document.getElementsByTagName(tagName)[0];\n\n if (!elementTag) {\n return;\n }\n\n var helmetAttributeString = elementTag.getAttribute(HELMET_ATTRIBUTE);\n var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(\",\") : [];\n var attributesToRemove = [].concat(helmetAttributes);\n var attributeKeys = Object.keys(attributes);\n\n for (var i = 0; i < attributeKeys.length; i++) {\n var attribute = attributeKeys[i];\n var value = attributes[attribute] || \"\";\n\n if (elementTag.getAttribute(attribute) !== value) {\n elementTag.setAttribute(attribute, value);\n }\n\n if (helmetAttributes.indexOf(attribute) === -1) {\n helmetAttributes.push(attribute);\n }\n\n var indexToSave = attributesToRemove.indexOf(attribute);\n if (indexToSave !== -1) {\n attributesToRemove.splice(indexToSave, 1);\n }\n }\n\n for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) {\n elementTag.removeAttribute(attributesToRemove[_i]);\n }\n\n if (helmetAttributes.length === attributesToRemove.length) {\n elementTag.removeAttribute(HELMET_ATTRIBUTE);\n } else if (elementTag.getAttribute(HELMET_ATTRIBUTE) !== attributeKeys.join(\",\")) {\n elementTag.setAttribute(HELMET_ATTRIBUTE, attributeKeys.join(\",\"));\n }\n};\n\nvar updateTags = function updateTags(type, tags) {\n var headElement = document.head || document.querySelector(TAG_NAMES.HEAD);\n var tagNodes = headElement.querySelectorAll(type + \"[\" + HELMET_ATTRIBUTE + \"]\");\n var oldTags = Array.prototype.slice.call(tagNodes);\n var newTags = [];\n var indexToDelete = void 0;\n\n if (tags && tags.length) {\n tags.forEach(function (tag) {\n var newElement = document.createElement(type);\n\n for (var attribute in tag) {\n if (tag.hasOwnProperty(attribute)) {\n if (attribute === TAG_PROPERTIES.INNER_HTML) {\n newElement.innerHTML = tag.innerHTML;\n } else if (attribute === TAG_PROPERTIES.CSS_TEXT) {\n if (newElement.styleSheet) {\n newElement.styleSheet.cssText = tag.cssText;\n } else {\n newElement.appendChild(document.createTextNode(tag.cssText));\n }\n } else {\n var value = typeof tag[attribute] === \"undefined\" ? \"\" : tag[attribute];\n newElement.setAttribute(attribute, value);\n }\n }\n }\n\n newElement.setAttribute(HELMET_ATTRIBUTE, \"true\");\n\n // Remove a duplicate tag from domTagstoRemove, so it isn't cleared.\n if (oldTags.some(function (existingTag, index) {\n indexToDelete = index;\n return newElement.isEqualNode(existingTag);\n })) {\n oldTags.splice(indexToDelete, 1);\n } else {\n newTags.push(newElement);\n }\n });\n }\n\n oldTags.forEach(function (tag) {\n return tag.parentNode.removeChild(tag);\n });\n newTags.forEach(function (tag) {\n return headElement.appendChild(tag);\n });\n\n return {\n oldTags: oldTags,\n newTags: newTags\n };\n};\n\nvar generateElementAttributesAsString = function generateElementAttributesAsString(attributes) {\n return Object.keys(attributes).reduce(function (str, key) {\n var attr = typeof attributes[key] !== \"undefined\" ? key + \"=\\\"\" + attributes[key] + \"\\\"\" : \"\" + key;\n return str ? str + \" \" + attr : attr;\n }, \"\");\n};\n\nvar generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) {\n var attributeString = generateElementAttributesAsString(attributes);\n var flattenedTitle = flattenArray(title);\n return attributeString ? \"<\" + type + \" \" + HELMET_ATTRIBUTE + \"=\\\"true\\\" \" + attributeString + \">\" + encodeSpecialCharacters(flattenedTitle, encode) + \"\" : \"<\" + type + \" \" + HELMET_ATTRIBUTE + \"=\\\"true\\\">\" + encodeSpecialCharacters(flattenedTitle, encode) + \"\";\n};\n\nvar generateTagsAsString = function generateTagsAsString(type, tags, encode) {\n return tags.reduce(function (str, tag) {\n var attributeHtml = Object.keys(tag).filter(function (attribute) {\n return !(attribute === TAG_PROPERTIES.INNER_HTML || attribute === TAG_PROPERTIES.CSS_TEXT);\n }).reduce(function (string, attribute) {\n var attr = typeof tag[attribute] === \"undefined\" ? attribute : attribute + \"=\\\"\" + encodeSpecialCharacters(tag[attribute], encode) + \"\\\"\";\n return string ? string + \" \" + attr : attr;\n }, \"\");\n\n var tagContent = tag.innerHTML || tag.cssText || \"\";\n\n var isSelfClosing = SELF_CLOSING_TAGS.indexOf(type) === -1;\n\n return str + \"<\" + type + \" \" + HELMET_ATTRIBUTE + \"=\\\"true\\\" \" + attributeHtml + (isSelfClosing ? \"/>\" : \">\" + tagContent + \"\");\n }, \"\");\n};\n\nvar convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) {\n var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return Object.keys(attributes).reduce(function (obj, key) {\n obj[REACT_TAG_MAP[key] || key] = attributes[key];\n return obj;\n }, initProps);\n};\n\nvar convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) {\n var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return Object.keys(props).reduce(function (obj, key) {\n obj[HTML_TAG_MAP[key] || key] = props[key];\n return obj;\n }, initAttributes);\n};\n\nvar generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) {\n var _initProps;\n\n // assigning into an array to define toString function on it\n var initProps = (_initProps = {\n key: title\n }, _initProps[HELMET_ATTRIBUTE] = true, _initProps);\n var props = convertElementAttributestoReactProps(attributes, initProps);\n\n return [React.createElement(TAG_NAMES.TITLE, props, title)];\n};\n\nvar generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) {\n return tags.map(function (tag, i) {\n var _mappedTag;\n\n var mappedTag = (_mappedTag = {\n key: i\n }, _mappedTag[HELMET_ATTRIBUTE] = true, _mappedTag);\n\n Object.keys(tag).forEach(function (attribute) {\n var mappedAttribute = REACT_TAG_MAP[attribute] || attribute;\n\n if (mappedAttribute === TAG_PROPERTIES.INNER_HTML || mappedAttribute === TAG_PROPERTIES.CSS_TEXT) {\n var content = tag.innerHTML || tag.cssText;\n mappedTag.dangerouslySetInnerHTML = { __html: content };\n } else {\n mappedTag[mappedAttribute] = tag[attribute];\n }\n });\n\n return React.createElement(type, mappedTag);\n });\n};\n\nvar getMethodsForTag = function getMethodsForTag(type, tags, encode) {\n switch (type) {\n case TAG_NAMES.TITLE:\n return {\n toComponent: function toComponent() {\n return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode);\n },\n toString: function toString() {\n return generateTitleAsString(type, tags.title, tags.titleAttributes, encode);\n }\n };\n case ATTRIBUTE_NAMES.BODY:\n case ATTRIBUTE_NAMES.HTML:\n return {\n toComponent: function toComponent() {\n return convertElementAttributestoReactProps(tags);\n },\n toString: function toString() {\n return generateElementAttributesAsString(tags);\n }\n };\n default:\n return {\n toComponent: function toComponent() {\n return generateTagsAsReactComponent(type, tags);\n },\n toString: function toString() {\n return generateTagsAsString(type, tags, encode);\n }\n };\n }\n};\n\nvar mapStateOnServer = function mapStateOnServer(_ref) {\n var baseTag = _ref.baseTag,\n bodyAttributes = _ref.bodyAttributes,\n encode = _ref.encode,\n htmlAttributes = _ref.htmlAttributes,\n linkTags = _ref.linkTags,\n metaTags = _ref.metaTags,\n noscriptTags = _ref.noscriptTags,\n scriptTags = _ref.scriptTags,\n styleTags = _ref.styleTags,\n _ref$title = _ref.title,\n title = _ref$title === undefined ? \"\" : _ref$title,\n titleAttributes = _ref.titleAttributes;\n return {\n base: getMethodsForTag(TAG_NAMES.BASE, baseTag, encode),\n bodyAttributes: getMethodsForTag(ATTRIBUTE_NAMES.BODY, bodyAttributes, encode),\n htmlAttributes: getMethodsForTag(ATTRIBUTE_NAMES.HTML, htmlAttributes, encode),\n link: getMethodsForTag(TAG_NAMES.LINK, linkTags, encode),\n meta: getMethodsForTag(TAG_NAMES.META, metaTags, encode),\n noscript: getMethodsForTag(TAG_NAMES.NOSCRIPT, noscriptTags, encode),\n script: getMethodsForTag(TAG_NAMES.SCRIPT, scriptTags, encode),\n style: getMethodsForTag(TAG_NAMES.STYLE, styleTags, encode),\n title: getMethodsForTag(TAG_NAMES.TITLE, { title: title, titleAttributes: titleAttributes }, encode)\n };\n};\n\nvar Helmet = function Helmet(Component) {\n var _class, _temp;\n\n return _temp = _class = function (_React$Component) {\n inherits(HelmetWrapper, _React$Component);\n\n function HelmetWrapper() {\n classCallCheck(this, HelmetWrapper);\n return possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return !isEqual(this.props, nextProps);\n };\n\n HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps(child, nestedChildren) {\n if (!nestedChildren) {\n return null;\n }\n\n switch (child.type) {\n case TAG_NAMES.SCRIPT:\n case TAG_NAMES.NOSCRIPT:\n return {\n innerHTML: nestedChildren\n };\n\n case TAG_NAMES.STYLE:\n return {\n cssText: nestedChildren\n };\n }\n\n throw new Error(\"<\" + child.type + \" /> elements are self-closing and can not contain children. Refer to our API for more information.\");\n };\n\n HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) {\n var _babelHelpers$extends;\n\n var child = _ref.child,\n arrayTypeChildren = _ref.arrayTypeChildren,\n newChildProps = _ref.newChildProps,\n nestedChildren = _ref.nestedChildren;\n\n return _extends({}, arrayTypeChildren, (_babelHelpers$extends = {}, _babelHelpers$extends[child.type] = [].concat(arrayTypeChildren[child.type] || [], [_extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren))]), _babelHelpers$extends));\n };\n\n HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) {\n var _babelHelpers$extends2, _babelHelpers$extends3;\n\n var child = _ref2.child,\n newProps = _ref2.newProps,\n newChildProps = _ref2.newChildProps,\n nestedChildren = _ref2.nestedChildren;\n\n switch (child.type) {\n case TAG_NAMES.TITLE:\n return _extends({}, newProps, (_babelHelpers$extends2 = {}, _babelHelpers$extends2[child.type] = nestedChildren, _babelHelpers$extends2.titleAttributes = _extends({}, newChildProps), _babelHelpers$extends2));\n\n case TAG_NAMES.BODY:\n return _extends({}, newProps, {\n bodyAttributes: _extends({}, newChildProps)\n });\n\n case TAG_NAMES.HTML:\n return _extends({}, newProps, {\n htmlAttributes: _extends({}, newChildProps)\n });\n }\n\n return _extends({}, newProps, (_babelHelpers$extends3 = {}, _babelHelpers$extends3[child.type] = _extends({}, newChildProps), _babelHelpers$extends3));\n };\n\n HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {\n var newFlattenedProps = _extends({}, newProps);\n\n Object.keys(arrayTypeChildren).forEach(function (arrayChildName) {\n var _babelHelpers$extends4;\n\n newFlattenedProps = _extends({}, newFlattenedProps, (_babelHelpers$extends4 = {}, _babelHelpers$extends4[arrayChildName] = arrayTypeChildren[arrayChildName], _babelHelpers$extends4));\n });\n\n return newFlattenedProps;\n };\n\n HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren(child, nestedChildren) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!VALID_TAG_NAMES.some(function (name) {\n return child.type === name;\n })) {\n if (typeof child.type === \"function\") {\n return warn(\"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.\");\n }\n\n return warn(\"Only elements types \" + VALID_TAG_NAMES.join(\", \") + \" are allowed. Helmet does not support rendering <\" + child.type + \"> elements. Refer to our API for more information.\");\n }\n\n if (nestedChildren && typeof nestedChildren !== \"string\" && (!Array.isArray(nestedChildren) || nestedChildren.some(function (nestedChild) {\n return typeof nestedChild !== \"string\";\n }))) {\n throw new Error(\"Helmet expects a string as a child of <\" + child.type + \">. Did you forget to wrap your children in braces? ( <\" + child.type + \">{``} ) Refer to our API for more information.\");\n }\n }\n\n return true;\n };\n\n HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) {\n var _this2 = this;\n\n var arrayTypeChildren = {};\n\n React.Children.forEach(children, function (child) {\n if (!child || !child.props) {\n return;\n }\n\n var _child$props = child.props,\n nestedChildren = _child$props.children,\n childProps = objectWithoutProperties(_child$props, [\"children\"]);\n\n var newChildProps = convertReactPropstoHtmlAttributes(childProps);\n\n _this2.warnOnInvalidChildren(child, nestedChildren);\n\n switch (child.type) {\n case TAG_NAMES.LINK:\n case TAG_NAMES.META:\n case TAG_NAMES.NOSCRIPT:\n case TAG_NAMES.SCRIPT:\n case TAG_NAMES.STYLE:\n arrayTypeChildren = _this2.flattenArrayTypeChildren({\n child: child,\n arrayTypeChildren: arrayTypeChildren,\n newChildProps: newChildProps,\n nestedChildren: nestedChildren\n });\n break;\n\n default:\n newProps = _this2.mapObjectTypeChildren({\n child: child,\n newProps: newProps,\n newChildProps: newChildProps,\n nestedChildren: nestedChildren\n });\n break;\n }\n });\n\n newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);\n return newProps;\n };\n\n HelmetWrapper.prototype.render = function render() {\n var _props = this.props,\n children = _props.children,\n props = objectWithoutProperties(_props, [\"children\"]);\n\n var newProps = _extends({}, props);\n\n if (children) {\n newProps = this.mapChildrenToProps(children, newProps);\n }\n\n return React.createElement(Component, newProps);\n };\n\n createClass(HelmetWrapper, null, [{\n key: \"canUseDOM\",\n\n\n // Component.peek comes from react-side-effect:\n // For testing, you may use a static peek() method available on the returned component.\n // It lets you get the current state without resetting the mounted instance stack.\n // Don’t use it for anything other than testing.\n\n /**\n * @param {Object} base: {\"target\": \"_blank\", \"href\": \"http://mysite.com/\"}\n * @param {Object} bodyAttributes: {\"className\": \"root\"}\n * @param {String} defaultTitle: \"Default Title\"\n * @param {Boolean} defer: true\n * @param {Boolean} encodeSpecialCharacters: true\n * @param {Object} htmlAttributes: {\"lang\": \"en\", \"amp\": undefined}\n * @param {Array} link: [{\"rel\": \"canonical\", \"href\": \"http://mysite.com/example\"}]\n * @param {Array} meta: [{\"name\": \"description\", \"content\": \"Test description\"}]\n * @param {Array} noscript: [{\"innerHTML\": \" console.log(newState)\"\n * @param {Array} script: [{\"type\": \"text/javascript\", \"src\": \"http://mysite.com/js/test.js\"}]\n * @param {Array} style: [{\"type\": \"text/css\", \"cssText\": \"div { display: block; color: blue; }\"}]\n * @param {String} title: \"Title\"\n * @param {Object} titleAttributes: {\"itemprop\": \"name\"}\n * @param {String} titleTemplate: \"MySite.com - %s\"\n */\n set: function set$$1(canUseDOM) {\n Component.canUseDOM = canUseDOM;\n }\n }]);\n return HelmetWrapper;\n }(React.Component), _class.propTypes = {\n base: PropTypes.object,\n bodyAttributes: PropTypes.object,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n defaultTitle: PropTypes.string,\n defer: PropTypes.bool,\n encodeSpecialCharacters: PropTypes.bool,\n htmlAttributes: PropTypes.object,\n link: PropTypes.arrayOf(PropTypes.object),\n meta: PropTypes.arrayOf(PropTypes.object),\n noscript: PropTypes.arrayOf(PropTypes.object),\n onChangeClientState: PropTypes.func,\n script: PropTypes.arrayOf(PropTypes.object),\n style: PropTypes.arrayOf(PropTypes.object),\n title: PropTypes.string,\n titleAttributes: PropTypes.object,\n titleTemplate: PropTypes.string\n }, _class.defaultProps = {\n defer: true,\n encodeSpecialCharacters: true\n }, _class.peek = Component.peek, _class.rewind = function () {\n var mappedState = Component.rewind();\n if (!mappedState) {\n // provide fallback if mappedState is undefined\n mappedState = mapStateOnServer({\n baseTag: [],\n bodyAttributes: {},\n encodeSpecialCharacters: true,\n htmlAttributes: {},\n linkTags: [],\n metaTags: [],\n noscriptTags: [],\n scriptTags: [],\n styleTags: [],\n title: \"\",\n titleAttributes: {}\n });\n }\n\n return mappedState;\n }, _temp;\n};\n\nvar NullComponent = function NullComponent() {\n return null;\n};\n\nvar HelmetSideEffects = withSideEffect(reducePropsToState, handleClientStateChange, mapStateOnServer)(NullComponent);\n\nvar HelmetExport = Helmet(HelmetSideEffects);\nHelmetExport.renderStatic = HelmetExport.rewind;\n\nexport default HelmetExport;\nexport { HelmetExport as Helmet };\n","import { css } from '@emotion/css';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Stack, useStyles2 } from '@grafana/ui';\nimport { QueryAnalysisResult } from '@shared/components/QueryAnalysisTooltip/domain/QueryAnalysis';\nimport { QueryAnalysisTooltip } from '@shared/components/QueryAnalysisTooltip/QueryAnalysisTooltip';\nimport React, { memo, ReactNode } from 'react';\nimport { Helmet } from 'react-helmet';\n\nimport { PluginInfo } from './PluginInfo';\nimport { PyroscopeLogo } from './PyroscopeLogo';\n\ntype PageTitleProps = {\n title: ReactNode;\n queryAnalysis?: QueryAnalysisResult;\n};\n\nfunction PageTitleComponent({ title, queryAnalysis }: PageTitleProps) {\n const styles = useStyles2(getStyles);\n const fullTitle = typeof title === 'string' ? `${title} | Pyroscope` : 'Pyroscope';\n\n return (\n <>\n \n {fullTitle}\n \n
\n \n
\n \n

\n {title}\n

\n
\n
\n \n {queryAnalysis ? : null}\n
\n
\n
\n \n );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n titleContainer: css`\n height: ${theme.spacing(5)};\n line-height: ${theme.spacing(5)};\n margin-bottom: ${theme.spacing(3)};\n `,\n title: css`\n font-size: ${theme.typography.h2.fontSize};\n display: inline-block;\n margin: 0;\n position: relative;\n top: 10px;\n left: ${theme.spacing(1)};\n `,\n infoArea: css`\n align-self: end;\n margin-bottom: 0;\n line-height: 20px;\n text-align: right;\n `,\n});\n\nexport const PageTitle = memo(PageTitleComponent);\n","import { css } from '@emotion/css';\nimport { GrafanaTheme2, usePluginContext } from '@grafana/data';\nimport { config } from '@grafana/runtime';\nimport { Dropdown, IconButton, Menu, useStyles2 } from '@grafana/ui';\nimport React from 'react';\n\nimport { GIT_COMMIT } from '../../version';\nimport { PyroscopeLogo } from './PyroscopeLogo';\n\nconst pluginCommitSha: string = GIT_COMMIT;\nconst pluginCommitURL = `https://github.com/grafana/explore-profiles/commit/${pluginCommitSha}`;\n\nconst { buildInfo: grafanaBuildInfo } = config;\n\nfunction InfoMenuHeader() {\n const styles = useStyles2(getStyles);\n\n const {\n meta: {\n info: { version, updated },\n },\n } = usePluginContext() || { meta: { info: { version: '?.?.?', updated: '?' } } };\n\n return (\n
\n
\n \n Explore profiles v{version}\n
\n
Last update: {updated}
\n
\n );\n}\n\nfunction InfoMenu() {\n const isDev = pluginCommitSha === 'dev';\n const shortCommitSha = isDev ? pluginCommitSha : pluginCommitSha.slice(0, 8);\n\n return (\n }>\n window.open(pluginCommitURL)}\n disabled={isDev}\n />\n window.open('https://github.com/grafana/explore-profiles/blob/main/CHANGELOG.md')}\n />\n window.open('https://github.com/grafana/explore-profiles/blob/main/docs/CONTRIBUTING.md')}\n />\n window.open('https://grafana.com/docs/grafana/latest/explore/simplified-exploration/profiles')}\n />\n window.open('https://github.com/grafana/explore-profiles/issues/new?template=bug_report.md')}\n />\n \n window.open(`https://github.com/grafana/grafana/commit/${grafanaBuildInfo.commit}`)}\n />\n \n );\n}\n\nexport function PluginInfo() {\n return (\n } placement=\"bottom-end\">\n \n \n );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n menuHeader: css`\n padding: ${theme.spacing(0.5, 1)};\n white-space: nowrap;\n `,\n subTitle: css`\n color: ${theme.colors.text.secondary};\n font-size: ${theme.typography.bodySmall.fontSize};\n `,\n});\n","import { css, cx } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\nimport React from 'react';\n\ntype PyroscopeLogoProps = {\n size: 'small' | 'large';\n};\n\nfunction PyroscopeLogoComponent({ size }: PyroscopeLogoProps) {\n const styles = useStyles2(getStyles);\n return ;\n}\n\nexport const PyroscopeLogo = React.memo(PyroscopeLogoComponent);\n\nconst getStyles = () => ({\n logo: css`\n &.small {\n width: 16px;\n height: 16px;\n margin-right: 4px;\n position: relative;\n top: -2px;\n }\n\n &.large {\n width: 40px;\n height: 40px;\n }\n `,\n});\n","export const GIT_COMMIT = 'e07aff41c3f5e568cddcfb4ce36d38234403230a';\n","/////////////////////////////////////////////////////////////////////////////////\n/* UAParser.js v1.0.38\n Copyright © 2012-2021 Faisal Salman \n MIT License *//*\n Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.\n Supports browser & node.js environment. \n Demo : https://faisalman.github.io/ua-parser-js\n Source : https://github.com/faisalman/ua-parser-js */\n/////////////////////////////////////////////////////////////////////////////////\n\n(function (window, undefined) {\n\n 'use strict';\n\n //////////////\n // Constants\n /////////////\n\n\n var LIBVERSION = '1.0.38',\n EMPTY = '',\n UNKNOWN = '?',\n FUNC_TYPE = 'function',\n UNDEF_TYPE = 'undefined',\n OBJ_TYPE = 'object',\n STR_TYPE = 'string',\n MAJOR = 'major',\n MODEL = 'model',\n NAME = 'name',\n TYPE = 'type',\n VENDOR = 'vendor',\n VERSION = 'version',\n ARCHITECTURE= 'architecture',\n CONSOLE = 'console',\n MOBILE = 'mobile',\n TABLET = 'tablet',\n SMARTTV = 'smarttv',\n WEARABLE = 'wearable',\n EMBEDDED = 'embedded',\n UA_MAX_LENGTH = 500;\n\n var AMAZON = 'Amazon',\n APPLE = 'Apple',\n ASUS = 'ASUS',\n BLACKBERRY = 'BlackBerry',\n BROWSER = 'Browser',\n CHROME = 'Chrome',\n EDGE = 'Edge',\n FIREFOX = 'Firefox',\n GOOGLE = 'Google',\n HUAWEI = 'Huawei',\n LG = 'LG',\n MICROSOFT = 'Microsoft',\n MOTOROLA = 'Motorola',\n OPERA = 'Opera',\n SAMSUNG = 'Samsung',\n SHARP = 'Sharp',\n SONY = 'Sony',\n XIAOMI = 'Xiaomi',\n ZEBRA = 'Zebra',\n FACEBOOK = 'Facebook',\n CHROMIUM_OS = 'Chromium OS',\n MAC_OS = 'Mac OS';\n\n ///////////\n // Helper\n //////////\n\n var extend = function (regexes, extensions) {\n var mergedRegexes = {};\n for (var i in regexes) {\n if (extensions[i] && extensions[i].length % 2 === 0) {\n mergedRegexes[i] = extensions[i].concat(regexes[i]);\n } else {\n mergedRegexes[i] = regexes[i];\n }\n }\n return mergedRegexes;\n },\n enumerize = function (arr) {\n var enums = {};\n for (var i=0; i 0) {\n if (q.length === 2) {\n if (typeof q[1] == FUNC_TYPE) {\n // assign modified match\n this[q[0]] = q[1].call(this, match);\n } else {\n // assign given value, ignore regex match\n this[q[0]] = q[1];\n }\n } else if (q.length === 3) {\n // check whether function or regex\n if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {\n // call function (usually string mapper)\n this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;\n } else {\n // sanitize match using given regex\n this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;\n }\n } else if (q.length === 4) {\n this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;\n }\n } else {\n this[q] = match ? match : undefined;\n }\n }\n }\n }\n i += 2;\n }\n },\n\n strMapper = function (str, map) {\n\n for (var i in map) {\n // check if current value is array\n if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {\n for (var j = 0; j < map[i].length; j++) {\n if (has(map[i][j], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n } else if (has(map[i], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n return str;\n };\n\n ///////////////\n // String map\n //////////////\n\n // Safari < 3.0\n var oldSafariMap = {\n '1.0' : '/8',\n '1.2' : '/1',\n '1.3' : '/3',\n '2.0' : '/412',\n '2.0.2' : '/416',\n '2.0.3' : '/417',\n '2.0.4' : '/419',\n '?' : '/'\n },\n windowsVersionMap = {\n 'ME' : '4.90',\n 'NT 3.11' : 'NT3.51',\n 'NT 4.0' : 'NT4.0',\n '2000' : 'NT 5.0',\n 'XP' : ['NT 5.1', 'NT 5.2'],\n 'Vista' : 'NT 6.0',\n '7' : 'NT 6.1',\n '8' : 'NT 6.2',\n '8.1' : 'NT 6.3',\n '10' : ['NT 6.4', 'NT 10.0'],\n 'RT' : 'ARM'\n };\n\n //////////////\n // Regex map\n /////////////\n\n var regexes = {\n\n browser : [[\n\n /\\b(?:crmo|crios)\\/([\\w\\.]+)/i // Chrome for Android/iOS\n ], [VERSION, [NAME, 'Chrome']], [\n /edg(?:e|ios|a)?\\/([\\w\\.]+)/i // Microsoft Edge\n ], [VERSION, [NAME, 'Edge']], [\n\n // Presto based\n /(opera mini)\\/([-\\w\\.]+)/i, // Opera Mini\n /(opera [mobiletab]{3,6})\\b.+version\\/([-\\w\\.]+)/i, // Opera Mobi/Tablet\n /(opera)(?:.+version\\/|[\\/ ]+)([\\w\\.]+)/i // Opera\n ], [NAME, VERSION], [\n /opios[\\/ ]+([\\w\\.]+)/i // Opera mini on iphone >= 8.0\n ], [VERSION, [NAME, OPERA+' Mini']], [\n /\\bop(?:rg)?x\\/([\\w\\.]+)/i // Opera GX\n ], [VERSION, [NAME, OPERA+' GX']], [\n /\\bopr\\/([\\w\\.]+)/i // Opera Webkit\n ], [VERSION, [NAME, OPERA]], [\n\n // Mixed\n /\\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\\/ ]?([\\w\\.]+)/i // Baidu\n ], [VERSION, [NAME, 'Baidu']], [\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(lunascape|maxthon|netfront|jasmine|blazer)[\\/ ]?([\\w\\.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer\n // Trident based\n /(avant|iemobile|slim)\\s?(?:browser)?[\\/ ]?([\\w\\.]*)/i, // Avant/IEMobile/SlimBrowser\n /(?:ms|\\()(ie) ([\\w\\.]+)/i, // Internet Explorer\n\n // Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon\n /(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\\/([-\\w\\.]+)/i,\n // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ\n /(heytap|ovi)browser\\/([\\d\\.]+)/i, // Heytap/Ovi\n /(weibo)__([\\d\\.]+)/i // Weibo\n ], [NAME, VERSION], [\n /\\bddg\\/([\\w\\.]+)/i // DuckDuckGo\n ], [VERSION, [NAME, 'DuckDuckGo']], [\n /(?:\\buc? ?browser|(?:juc.+)ucweb)[\\/ ]?([\\w\\.]+)/i // UCBrowser\n ], [VERSION, [NAME, 'UC'+BROWSER]], [\n /microm.+\\bqbcore\\/([\\w\\.]+)/i, // WeChat Desktop for Windows Built-in Browser\n /\\bqbcore\\/([\\w\\.]+).+microm/i,\n /micromessenger\\/([\\w\\.]+)/i // WeChat\n ], [VERSION, [NAME, 'WeChat']], [\n /konqueror\\/([\\w\\.]+)/i // Konqueror\n ], [VERSION, [NAME, 'Konqueror']], [\n /trident.+rv[: ]([\\w\\.]{1,9})\\b.+like gecko/i // IE11\n ], [VERSION, [NAME, 'IE']], [\n /ya(?:search)?browser\\/([\\w\\.]+)/i // Yandex\n ], [VERSION, [NAME, 'Yandex']], [\n /slbrowser\\/([\\w\\.]+)/i // Smart Lenovo Browser\n ], [VERSION, [NAME, 'Smart Lenovo '+BROWSER]], [\n /(avast|avg)\\/([\\w\\.]+)/i // Avast/AVG Secure Browser\n ], [[NAME, /(.+)/, '$1 Secure '+BROWSER], VERSION], [\n /\\bfocus\\/([\\w\\.]+)/i // Firefox Focus\n ], [VERSION, [NAME, FIREFOX+' Focus']], [\n /\\bopt\\/([\\w\\.]+)/i // Opera Touch\n ], [VERSION, [NAME, OPERA+' Touch']], [\n /coc_coc\\w+\\/([\\w\\.]+)/i // Coc Coc Browser\n ], [VERSION, [NAME, 'Coc Coc']], [\n /dolfin\\/([\\w\\.]+)/i // Dolphin\n ], [VERSION, [NAME, 'Dolphin']], [\n /coast\\/([\\w\\.]+)/i // Opera Coast\n ], [VERSION, [NAME, OPERA+' Coast']], [\n /miuibrowser\\/([\\w\\.]+)/i // MIUI Browser\n ], [VERSION, [NAME, 'MIUI '+BROWSER]], [\n /fxios\\/([-\\w\\.]+)/i // Firefox for iOS\n ], [VERSION, [NAME, FIREFOX]], [\n /\\bqihu|(qi?ho?o?|360)browser/i // 360\n ], [[NAME, '360 ' + BROWSER]], [\n /(oculus|sailfish|huawei|vivo)browser\\/([\\w\\.]+)/i\n ], [[NAME, /(.+)/, '$1 ' + BROWSER], VERSION], [ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser\n /samsungbrowser\\/([\\w\\.]+)/i // Samsung Internet\n ], [VERSION, [NAME, SAMSUNG + ' Internet']], [\n /(comodo_dragon)\\/([\\w\\.]+)/i // Comodo Dragon\n ], [[NAME, /_/g, ' '], VERSION], [\n /metasr[\\/ ]?([\\d\\.]+)/i // Sogou Explorer\n ], [VERSION, [NAME, 'Sogou Explorer']], [\n /(sogou)mo\\w+\\/([\\d\\.]+)/i // Sogou Mobile\n ], [[NAME, 'Sogou Mobile'], VERSION], [\n /(electron)\\/([\\w\\.]+) safari/i, // Electron-based App\n /(tesla)(?: qtcarbrowser|\\/(20\\d\\d\\.[-\\w\\.]+))/i, // Tesla\n /m?(qqbrowser|2345Explorer)[\\/ ]?([\\w\\.]+)/i // QQBrowser/2345 Browser\n ], [NAME, VERSION], [\n /(lbbrowser)/i, // LieBao Browser\n /\\[(linkedin)app\\]/i // LinkedIn App for iOS & Android\n ], [NAME], [\n\n // WebView\n /((?:fban\\/fbios|fb_iab\\/fb4a)(?!.+fbav)|;fbav\\/([\\w\\.]+);)/i // Facebook App for iOS & Android\n ], [[NAME, FACEBOOK], VERSION], [\n /(Klarna)\\/([\\w\\.]+)/i, // Klarna Shopping Browser for iOS & Android\n /(kakao(?:talk|story))[\\/ ]([\\w\\.]+)/i, // Kakao App\n /(naver)\\(.*?(\\d+\\.[\\w\\.]+).*\\)/i, // Naver InApp\n /safari (line)\\/([\\w\\.]+)/i, // Line App for iOS\n /\\b(line)\\/([\\w\\.]+)\\/iab/i, // Line App for Android\n /(alipay)client\\/([\\w\\.]+)/i, // Alipay\n /(twitter)(?:and| f.+e\\/([\\w\\.]+))/i, // Twitter\n /(chromium|instagram|snapchat)[\\/ ]([-\\w\\.]+)/i // Chromium/Instagram/Snapchat\n ], [NAME, VERSION], [\n /\\bgsa\\/([\\w\\.]+) .*safari\\//i // Google Search Appliance on iOS\n ], [VERSION, [NAME, 'GSA']], [\n /musical_ly(?:.+app_?version\\/|_)([\\w\\.]+)/i // TikTok\n ], [VERSION, [NAME, 'TikTok']], [\n\n /headlesschrome(?:\\/([\\w\\.]+)| )/i // Chrome Headless\n ], [VERSION, [NAME, CHROME+' Headless']], [\n\n / wv\\).+(chrome)\\/([\\w\\.]+)/i // Chrome WebView\n ], [[NAME, CHROME+' WebView'], VERSION], [\n\n /droid.+ version\\/([\\w\\.]+)\\b.+(?:mobile safari|safari)/i // Android Browser\n ], [VERSION, [NAME, 'Android '+BROWSER]], [\n\n /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\\/v?([\\w\\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia\n ], [NAME, VERSION], [\n\n /version\\/([\\w\\.\\,]+) .*mobile\\/\\w+ (safari)/i // Mobile Safari\n ], [VERSION, [NAME, 'Mobile Safari']], [\n /version\\/([\\w(\\.|\\,)]+) .*(mobile ?safari|safari)/i // Safari & Safari Mobile\n ], [VERSION, NAME], [\n /webkit.+?(mobile ?safari|safari)(\\/[\\w\\.]+)/i // Safari < 3.0\n ], [NAME, [VERSION, strMapper, oldSafariMap]], [\n\n /(webkit|khtml)\\/([\\w\\.]+)/i\n ], [NAME, VERSION], [\n\n // Gecko based\n /(navigator|netscape\\d?)\\/([-\\w\\.]+)/i // Netscape\n ], [[NAME, 'Netscape'], VERSION], [\n /mobile vr; rv:([\\w\\.]+)\\).+firefox/i // Firefox Reality\n ], [VERSION, [NAME, FIREFOX+' Reality']], [\n /ekiohf.+(flow)\\/([\\w\\.]+)/i, // Flow\n /(swiftfox)/i, // Swiftfox\n /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\\/ ]?([\\w\\.\\+]+)/i,\n // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror/Klar\n /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\/([-\\w\\.]+)$/i,\n // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix\n /(firefox)\\/([\\w\\.]+)/i, // Other Firefox-based\n /(mozilla)\\/([\\w\\.]+) .+rv\\:.+gecko\\/\\d+/i, // Mozilla\n\n // Other\n /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\\. ]?browser)[-\\/ ]?v?([\\w\\.]+)/i,\n // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir/Obigo/Mosaic/Go/ICE/UP.Browser\n /(links) \\(([\\w\\.]+)/i, // Links\n /panasonic;(viera)/i // Panasonic Viera\n ], [NAME, VERSION], [\n \n /(cobalt)\\/([\\w\\.]+)/i // Cobalt\n ], [NAME, [VERSION, /master.|lts./, \"\"]]\n ],\n\n cpu : [[\n\n /(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\\)]/i // AMD64 (x64)\n ], [[ARCHITECTURE, 'amd64']], [\n\n /(ia32(?=;))/i // IA32 (quicktime)\n ], [[ARCHITECTURE, lowerize]], [\n\n /((?:i[346]|x)86)[;\\)]/i // IA32 (x86)\n ], [[ARCHITECTURE, 'ia32']], [\n\n /\\b(aarch64|arm(v?8e?l?|_?64))\\b/i // ARM64\n ], [[ARCHITECTURE, 'arm64']], [\n\n /\\b(arm(?:v[67])?ht?n?[fl]p?)\\b/i // ARMHF\n ], [[ARCHITECTURE, 'armhf']], [\n\n // PocketPC mistakenly identified as PowerPC\n /windows (ce|mobile); ppc;/i\n ], [[ARCHITECTURE, 'arm']], [\n\n /((?:ppc|powerpc)(?:64)?)(?: mac|;|\\))/i // PowerPC\n ], [[ARCHITECTURE, /ower/, EMPTY, lowerize]], [\n\n /(sun4\\w)[;\\)]/i // SPARC\n ], [[ARCHITECTURE, 'sparc']], [\n\n /((?:avr32|ia64(?=;))|68k(?=\\))|\\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\\b|pa-risc)/i\n // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC\n ], [[ARCHITECTURE, lowerize]]\n ],\n\n device : [[\n\n //////////////////////////\n // MOBILES & TABLETS\n /////////////////////////\n\n // Samsung\n /\\b(sch-i[89]0\\d|shw-m380s|sm-[ptx]\\w{2,4}|gt-[pn]\\d{2,4}|sgh-t8[56]9|nexus 10)/i\n ], [MODEL, [VENDOR, SAMSUNG], [TYPE, TABLET]], [\n /\\b((?:s[cgp]h|gt|sm)-\\w+|sc[g-]?[\\d]+a?|galaxy nexus)/i,\n /samsung[- ]([-\\w]+)/i,\n /sec-(sgh\\w+)/i\n ], [MODEL, [VENDOR, SAMSUNG], [TYPE, MOBILE]], [\n\n // Apple\n /(?:\\/|\\()(ip(?:hone|od)[\\w, ]*)(?:\\/|;)/i // iPod/iPhone\n ], [MODEL, [VENDOR, APPLE], [TYPE, MOBILE]], [\n /\\((ipad);[-\\w\\),; ]+apple/i, // iPad\n /applecoremedia\\/[\\w\\.]+ \\((ipad)/i,\n /\\b(ipad)\\d\\d?,\\d\\d?[;\\]].+ios/i\n ], [MODEL, [VENDOR, APPLE], [TYPE, TABLET]], [\n /(macintosh);/i\n ], [MODEL, [VENDOR, APPLE]], [\n\n // Sharp\n /\\b(sh-?[altvz]?\\d\\d[a-ekm]?)/i\n ], [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]], [\n\n // Huawei\n /\\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\\d{2})\\b(?!.+d\\/s)/i\n ], [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]], [\n /(?:huawei|honor)([-\\w ]+)[;\\)]/i,\n /\\b(nexus 6p|\\w{2,4}e?-[atu]?[ln][\\dx][012359c][adn]?)\\b(?!.+d\\/s)/i\n ], [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]], [\n\n // Xiaomi\n /\\b(poco[\\w ]+|m2\\d{3}j\\d\\d[a-z]{2})(?: bui|\\))/i, // Xiaomi POCO\n /\\b; (\\w+) build\\/hm\\1/i, // Xiaomi Hongmi 'numeric' models\n /\\b(hm[-_ ]?note?[_ ]?(?:\\d\\w)?) bui/i, // Xiaomi Hongmi\n /\\b(redmi[\\-_ ]?(?:note|k)?[\\w_ ]+)(?: bui|\\))/i, // Xiaomi Redmi\n /oid[^\\)]+; (m?[12][0-389][01]\\w{3,6}[c-y])( bui|; wv|\\))/i, // Xiaomi Redmi 'numeric' models\n /\\b(mi[-_ ]?(?:a\\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\\d?\\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\\))/i // Xiaomi Mi\n ], [[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [\n /oid[^\\)]+; (2\\d{4}(283|rpbf)[cgl])( bui|\\))/i, // Redmi Pad\n /\\b(mi[-_ ]?(?:pad)(?:[\\w_ ]+))(?: bui|\\))/i // Mi Pad tablets\n ],[[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, TABLET]], [\n\n // OPPO\n /; (\\w+) bui.+ oppo/i,\n /\\b(cph[12]\\d{3}|p(?:af|c[al]|d\\w|e[ar])[mt]\\d0|x9007|a101op)\\b/i\n ], [MODEL, [VENDOR, 'OPPO'], [TYPE, MOBILE]], [\n /\\b(opd2\\d{3}a?) bui/i\n ], [MODEL, [VENDOR, 'OPPO'], [TYPE, TABLET]], [\n\n // Vivo\n /vivo (\\w+)(?: bui|\\))/i,\n /\\b(v[12]\\d{3}\\w?[at])(?: bui|;)/i\n ], [MODEL, [VENDOR, 'Vivo'], [TYPE, MOBILE]], [\n\n // Realme\n /\\b(rmx[1-3]\\d{3})(?: bui|;|\\))/i\n ], [MODEL, [VENDOR, 'Realme'], [TYPE, MOBILE]], [\n\n // Motorola\n /\\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\\b[\\w ]+build\\//i,\n /\\bmot(?:orola)?[- ](\\w*)/i,\n /((?:moto[\\w\\(\\) ]+|xt\\d{3,4}|nexus 6)(?= bui|\\)))/i\n ], [MODEL, [VENDOR, MOTOROLA], [TYPE, MOBILE]], [\n /\\b(mz60\\d|xoom[2 ]{0,2}) build\\//i\n ], [MODEL, [VENDOR, MOTOROLA], [TYPE, TABLET]], [\n\n // LG\n /((?=lg)?[vl]k\\-?\\d{3}) bui| 3\\.[-\\w; ]{10}lg?-([06cv9]{3,4})/i\n ], [MODEL, [VENDOR, LG], [TYPE, TABLET]], [\n /(lm(?:-?f100[nv]?|-[\\w\\.]+)(?= bui|\\))|nexus [45])/i,\n /\\blg[-e;\\/ ]+((?!browser|netcast|android tv)\\w+)/i,\n /\\blg-?([\\d\\w]+) bui/i\n ], [MODEL, [VENDOR, LG], [TYPE, MOBILE]], [\n\n // Lenovo\n /(ideatab[-\\w ]+)/i,\n /lenovo ?(s[56]000[-\\w]+|tab(?:[\\w ]+)|yt[-\\d\\w]{6}|tb[-\\d\\w]{6})/i\n ], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [\n\n // Nokia\n /(?:maemo|nokia).*(n900|lumia \\d+)/i,\n /nokia[-_ ]?([-\\w\\.]*)/i\n ], [[MODEL, /_/g, ' '], [VENDOR, 'Nokia'], [TYPE, MOBILE]], [\n\n // Google\n /(pixel c)\\b/i // Google Pixel C\n ], [MODEL, [VENDOR, GOOGLE], [TYPE, TABLET]], [\n /droid.+; (pixel[\\daxl ]{0,6})(?: bui|\\))/i // Google Pixel\n ], [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]], [\n\n // Sony\n /droid.+ (a?\\d[0-2]{2}so|[c-g]\\d{4}|so[-gl]\\w+|xq-a\\w[4-7][12])(?= bui|\\).+chrome\\/(?![1-6]{0,1}\\d\\.))/i\n ], [MODEL, [VENDOR, SONY], [TYPE, MOBILE]], [\n /sony tablet [ps]/i,\n /\\b(?:sony)?sgp\\w+(?: bui|\\))/i\n ], [[MODEL, 'Xperia Tablet'], [VENDOR, SONY], [TYPE, TABLET]], [\n\n // OnePlus\n / (kb2005|in20[12]5|be20[12][59])\\b/i,\n /(?:one)?(?:plus)? (a\\d0\\d\\d)(?: b|\\))/i\n ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [\n\n // Amazon\n /(alexa)webm/i,\n /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\\))/i, // Kindle Fire without Silk / Echo Show\n /(kf[a-z]+)( bui|\\)).+silk\\//i // Kindle Fire HD\n ], [MODEL, [VENDOR, AMAZON], [TYPE, TABLET]], [\n /((?:sd|kf)[0349hijorstuw]+)( bui|\\)).+silk\\//i // Fire Phone\n ], [[MODEL, /(.+)/g, 'Fire Phone $1'], [VENDOR, AMAZON], [TYPE, MOBILE]], [\n\n // BlackBerry\n /(playbook);[-\\w\\),; ]+(rim)/i // BlackBerry PlayBook\n ], [MODEL, VENDOR, [TYPE, TABLET]], [\n /\\b((?:bb[a-f]|st[hv])100-\\d)/i,\n /\\(bb10; (\\w+)/i // BlackBerry 10\n ], [MODEL, [VENDOR, BLACKBERRY], [TYPE, MOBILE]], [\n\n // Asus\n /(?:\\b|asus_)(transfo[prime ]{4,10} \\w+|eeepc|slider \\w+|nexus 7|padfone|p00[cj])/i\n ], [MODEL, [VENDOR, ASUS], [TYPE, TABLET]], [\n / (z[bes]6[027][012][km][ls]|zenfone \\d\\w?)\\b/i\n ], [MODEL, [VENDOR, ASUS], [TYPE, MOBILE]], [\n\n // HTC\n /(nexus 9)/i // HTC Nexus 9\n ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [\n /(htc)[-;_ ]{1,2}([\\w ]+(?=\\)| bui)|\\w+)/i, // HTC\n\n // ZTE\n /(zte)[- ]([\\w ]+?)(?: bui|\\/|\\))/i,\n /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\\.))|sony(?!-bra))[-_ ]?([-\\w]*)/i // Alcatel/GeeksPhone/Nexian/Panasonic/Sony\n ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [\n\n // Acer\n /droid.+; ([ab][1-7]-?[0178a]\\d\\d?)/i\n ], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [\n\n // Meizu\n /droid.+; (m[1-5] note) bui/i,\n /\\bmz-([-\\w]{2,})/i\n ], [MODEL, [VENDOR, 'Meizu'], [TYPE, MOBILE]], [\n \n // Ulefone\n /; ((?:power )?armor(?:[\\w ]{0,8}))(?: bui|\\))/i\n ], [MODEL, [VENDOR, 'Ulefone'], [TYPE, MOBILE]], [\n\n // MIXED\n /(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\\w]*)/i,\n // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron\n /(hp) ([\\w ]+\\w)/i, // HP iPAQ\n /(asus)-?(\\w+)/i, // Asus\n /(microsoft); (lumia[\\w ]+)/i, // Microsoft Lumia\n /(lenovo)[-_ ]?([-\\w]+)/i, // Lenovo\n /(jolla)/i, // Jolla\n /(oppo) ?([\\w ]+) bui/i // OPPO\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /(kobo)\\s(ereader|touch)/i, // Kobo\n /(archos) (gamepad2?)/i, // Archos\n /(hp).+(touchpad(?!.+tablet)|tablet)/i, // HP TouchPad\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(nook)[\\w ]+build\\/(\\w+)/i, // Nook\n /(dell) (strea[kpr\\d ]*[\\dko])/i, // Dell Streak\n /(le[- ]+pan)[- ]+(\\w{1,9}) bui/i, // Le Pan Tablets\n /(trinity)[- ]*(t\\d{3}) bui/i, // Trinity Tablets\n /(gigaset)[- ]+(q\\w{1,9}) bui/i, // Gigaset Tablets\n /(vodafone) ([\\w ]+)(?:\\)| bui)/i // Vodafone\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(surface duo)/i // Surface Duo\n ], [MODEL, [VENDOR, MICROSOFT], [TYPE, TABLET]], [\n /droid [\\d\\.]+; (fp\\du?)(?: b|\\))/i // Fairphone\n ], [MODEL, [VENDOR, 'Fairphone'], [TYPE, MOBILE]], [\n /(u304aa)/i // AT&T\n ], [MODEL, [VENDOR, 'AT&T'], [TYPE, MOBILE]], [\n /\\bsie-(\\w*)/i // Siemens\n ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [\n /\\b(rct\\w+) b/i // RCA Tablets\n ], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [\n /\\b(venue[\\d ]{2,7}) b/i // Dell Venue Tablets\n ], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [\n /\\b(q(?:mv|ta)\\w+) b/i // Verizon Tablet\n ], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [\n /\\b(?:barnes[& ]+noble |bn[rt])([\\w\\+ ]*) b/i // Barnes & Noble Tablet\n ], [MODEL, [VENDOR, 'Barnes & Noble'], [TYPE, TABLET]], [\n /\\b(tm\\d{3}\\w+) b/i\n ], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [\n /\\b(k88) b/i // ZTE K Series Tablet\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, TABLET]], [\n /\\b(nx\\d{3}j) b/i // ZTE Nubia\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [\n /\\b(gen\\d{3}) b.+49h/i // Swiss GEN Mobile\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [\n /\\b(zur\\d{3}) b/i // Swiss ZUR Tablet\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [\n /\\b((zeki)?tb.*\\b) b/i // Zeki Tablets\n ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [\n /\\b([yr]\\d{2}) b/i,\n /\\b(dragon[- ]+touch |dt)(\\w{5}) b/i // Dragon Touch Tablet\n ], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [\n /\\b(ns-?\\w{0,9}) b/i // Insignia Tablets\n ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [\n /\\b((nxa|next)-?\\w{0,9}) b/i // NextBook Tablets\n ], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [\n /\\b(xtreme\\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i // Voice Xtreme Phones\n ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [\n /\\b(lvtel\\-)?(v1[12]) b/i // LvTel Phones\n ], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [\n /\\b(ph-1) /i // Essential PH-1\n ], [MODEL, [VENDOR, 'Essential'], [TYPE, MOBILE]], [\n /\\b(v(100md|700na|7011|917g).*\\b) b/i // Envizen Tablets\n ], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [\n /\\b(trio[-\\w\\. ]+) b/i // MachSpeed Tablets\n ], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [\n /\\btu_(1491) b/i // Rotor Tablets\n ], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [\n /(shield[\\w ]+) b/i // Nvidia Shield Tablets\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, TABLET]], [\n /(sprint) (\\w+)/i // Sprint Phones\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(kin\\.[onetw]{3})/i // Microsoft Kin\n ], [[MODEL, /\\./g, ' '], [VENDOR, MICROSOFT], [TYPE, MOBILE]], [\n /droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\\)/i // Zebra\n ], [MODEL, [VENDOR, ZEBRA], [TYPE, TABLET]], [\n /droid.+; (ec30|ps20|tc[2-8]\\d[kx])\\)/i\n ], [MODEL, [VENDOR, ZEBRA], [TYPE, MOBILE]], [\n\n ///////////////////\n // SMARTTVS\n ///////////////////\n\n /smart-tv.+(samsung)/i // Samsung\n ], [VENDOR, [TYPE, SMARTTV]], [\n /hbbtv.+maple;(\\d+)/i\n ], [[MODEL, /^/, 'SmartTV'], [VENDOR, SAMSUNG], [TYPE, SMARTTV]], [\n /(nux; netcast.+smarttv|lg (netcast\\.tv-201\\d|android tv))/i // LG SmartTV\n ], [[VENDOR, LG], [TYPE, SMARTTV]], [\n /(apple) ?tv/i // Apple TV\n ], [VENDOR, [MODEL, APPLE+' TV'], [TYPE, SMARTTV]], [\n /crkey/i // Google Chromecast\n ], [[MODEL, CHROME+'cast'], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [\n /droid.+aft(\\w+)( bui|\\))/i // Fire TV\n ], [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]], [\n /\\(dtv[\\);].+(aquos)/i,\n /(aquos-tv[\\w ]+)\\)/i // Sharp\n ], [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],[\n /(bravia[\\w ]+)( bui|\\))/i // Sony\n ], [MODEL, [VENDOR, SONY], [TYPE, SMARTTV]], [\n /(mitv-\\w{5}) bui/i // Xiaomi\n ], [MODEL, [VENDOR, XIAOMI], [TYPE, SMARTTV]], [\n /Hbbtv.*(technisat) (.*);/i // TechniSAT\n ], [VENDOR, MODEL, [TYPE, SMARTTV]], [\n /\\b(roku)[\\dx]*[\\)\\/]((?:dvp-)?[\\d\\.]*)/i, // Roku\n /hbbtv\\/\\d+\\.\\d+\\.\\d+ +\\([\\w\\+ ]*; *([\\w\\d][^;]*);([^;]*)/i // HbbTV devices\n ], [[VENDOR, trim], [MODEL, trim], [TYPE, SMARTTV]], [\n /\\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\\b/i // SmartTV from Unidentified Vendors\n ], [[TYPE, SMARTTV]], [\n\n ///////////////////\n // CONSOLES\n ///////////////////\n\n /(ouya)/i, // Ouya\n /(nintendo) ([wids3utch]+)/i // Nintendo\n ], [VENDOR, MODEL, [TYPE, CONSOLE]], [\n /droid.+; (shield) bui/i // Nvidia\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [\n /(playstation [345portablevi]+)/i // Playstation\n ], [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]], [\n /\\b(xbox(?: one)?(?!; xbox))[\\); ]/i // Microsoft Xbox\n ], [MODEL, [VENDOR, MICROSOFT], [TYPE, CONSOLE]], [\n\n ///////////////////\n // WEARABLES\n ///////////////////\n\n /((pebble))app/i // Pebble\n ], [VENDOR, MODEL, [TYPE, WEARABLE]], [\n /(watch)(?: ?os[,\\/]|\\d,\\d\\/)[\\d\\.]+/i // Apple Watch\n ], [MODEL, [VENDOR, APPLE], [TYPE, WEARABLE]], [\n /droid.+; (glass) \\d/i // Google Glass\n ], [MODEL, [VENDOR, GOOGLE], [TYPE, WEARABLE]], [\n /droid.+; (wt63?0{2,3})\\)/i\n ], [MODEL, [VENDOR, ZEBRA], [TYPE, WEARABLE]], [\n /(quest( \\d| pro)?)/i // Oculus Quest\n ], [MODEL, [VENDOR, FACEBOOK], [TYPE, WEARABLE]], [\n\n ///////////////////\n // EMBEDDED\n ///////////////////\n\n /(tesla)(?: qtcarbrowser|\\/[-\\w\\.]+)/i // Tesla\n ], [VENDOR, [TYPE, EMBEDDED]], [\n /(aeobc)\\b/i // Echo Dot\n ], [MODEL, [VENDOR, AMAZON], [TYPE, EMBEDDED]], [\n\n ////////////////////\n // MIXED (GENERIC)\n ///////////////////\n\n /droid .+?; ([^;]+?)(?: bui|; wv\\)|\\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors\n ], [MODEL, [TYPE, MOBILE]], [\n /droid .+?; ([^;]+?)(?: bui|\\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors\n ], [MODEL, [TYPE, TABLET]], [\n /\\b((tablet|tab)[;\\/]|focus\\/\\d(?!.+mobile))/i // Unidentifiable Tablet\n ], [[TYPE, TABLET]], [\n /(phone|mobile(?:[;\\/]| [ \\w\\/\\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile\n ], [[TYPE, MOBILE]], [\n /(android[-\\w\\. ]{0,9});.+buil/i // Generic Android Device\n ], [MODEL, [VENDOR, 'Generic']]\n ],\n\n engine : [[\n\n /windows.+ edge\\/([\\w\\.]+)/i // EdgeHTML\n ], [VERSION, [NAME, EDGE+'HTML']], [\n\n /webkit\\/537\\.36.+chrome\\/(?!27)([\\w\\.]+)/i // Blink\n ], [VERSION, [NAME, 'Blink']], [\n\n /(presto)\\/([\\w\\.]+)/i, // Presto\n /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\\/([\\w\\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna\n /ekioh(flow)\\/([\\w\\.]+)/i, // Flow\n /(khtml|tasman|links)[\\/ ]\\(?([\\w\\.]+)/i, // KHTML/Tasman/Links\n /(icab)[\\/ ]([23]\\.[\\d\\.]+)/i, // iCab\n /\\b(libweb)/i\n ], [NAME, VERSION], [\n\n /rv\\:([\\w\\.]{1,9})\\b.+(gecko)/i // Gecko\n ], [VERSION, NAME]\n ],\n\n os : [[\n\n // Windows\n /microsoft (windows) (vista|xp)/i // Windows (iTunes)\n ], [NAME, VERSION], [\n /(windows (?:phone(?: os)?|mobile))[\\/ ]?([\\d\\.\\w ]*)/i // Windows Phone\n ], [NAME, [VERSION, strMapper, windowsVersionMap]], [\n /windows nt 6\\.2; (arm)/i, // Windows RT\n /windows[\\/ ]?([ntce\\d\\. ]+\\w)(?!.+xbox)/i,\n /(?:win(?=3|9|n)|win 9x )([nt\\d\\.]+)/i\n ], [[VERSION, strMapper, windowsVersionMap], [NAME, 'Windows']], [\n\n // iOS/macOS\n /ip[honead]{2,4}\\b(?:.*os ([\\w]+) like mac|; opera)/i, // iOS\n /(?:ios;fbsv\\/|iphone.+ios[\\/ ])([\\d\\.]+)/i,\n /cfnetwork\\/.+darwin/i\n ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [\n /(mac os x) ?([\\w\\. ]*)/i,\n /(macintosh|mac_powerpc\\b)(?!.+haiku)/i // Mac OS\n ], [[NAME, MAC_OS], [VERSION, /_/g, '.']], [\n\n // Mobile OSes\n /droid ([\\w\\.]+)\\b.+(android[- ]x86|harmonyos)/i // Android-x86/HarmonyOS\n ], [VERSION, NAME], [ // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS\n /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\\/ ]?([\\w\\.]*)/i,\n /(blackberry)\\w*\\/([\\w\\.]*)/i, // Blackberry\n /(tizen|kaios)[\\/ ]([\\w\\.]+)/i, // Tizen/KaiOS\n /\\((series40);/i // Series 40\n ], [NAME, VERSION], [\n /\\(bb(10);/i // BlackBerry 10\n ], [VERSION, [NAME, BLACKBERRY]], [\n /(?:symbian ?os|symbos|s60(?=;)|series60)[-\\/ ]?([\\w\\.]*)/i // Symbian\n ], [VERSION, [NAME, 'Symbian']], [\n /mozilla\\/[\\d\\.]+ \\((?:mobile|tablet|tv|mobile; [\\w ]+); rv:.+ gecko\\/([\\w\\.]+)/i // Firefox OS\n ], [VERSION, [NAME, FIREFOX+' OS']], [\n /web0s;.+rt(tv)/i,\n /\\b(?:hp)?wos(?:browser)?\\/([\\w\\.]+)/i // WebOS\n ], [VERSION, [NAME, 'webOS']], [\n /watch(?: ?os[,\\/]|\\d,\\d\\/)([\\d\\.]+)/i // watchOS\n ], [VERSION, [NAME, 'watchOS']], [\n\n // Google Chromecast\n /crkey\\/([\\d\\.]+)/i // Google Chromecast\n ], [VERSION, [NAME, CHROME+'cast']], [\n /(cros) [\\w]+(?:\\)| ([\\w\\.]+)\\b)/i // Chromium OS\n ], [[NAME, CHROMIUM_OS], VERSION],[\n\n // Smart TVs\n /panasonic;(viera)/i, // Panasonic Viera\n /(netrange)mmh/i, // Netrange\n /(nettv)\\/(\\d+\\.[\\w\\.]+)/i, // NetTV\n\n // Console\n /(nintendo|playstation) ([wids345portablevuch]+)/i, // Nintendo/Playstation\n /(xbox); +xbox ([^\\);]+)/i, // Microsoft Xbox (360, One, X, S, Series X, Series S)\n\n // Other\n /\\b(joli|palm)\\b ?(?:os)?\\/?([\\w\\.]*)/i, // Joli/Palm\n /(mint)[\\/\\(\\) ]?(\\w*)/i, // Mint\n /(mageia|vectorlinux)[; ]/i, // Mageia/VectorLinux\n /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\\/ ]?(?!chrom|package)([-\\w\\.]*)/i,\n // Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire\n /(hurd|linux) ?([\\w\\.]*)/i, // Hurd/Linux\n /(gnu) ?([\\w\\.]*)/i, // GNU\n /\\b([-frentopcghs]{0,5}bsd|dragonfly)[\\/ ]?(?!amd|[ix346]{1,2}86)([\\w\\.]*)/i, // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly\n /(haiku) (\\w+)/i // Haiku\n ], [NAME, VERSION], [\n /(sunos) ?([\\w\\.\\d]*)/i // Solaris\n ], [[NAME, 'Solaris'], VERSION], [\n /((?:open)?solaris)[-\\/ ]?([\\w\\.]*)/i, // Solaris\n /(aix) ((\\d)(?=\\.|\\)| )[\\w\\.])*/i, // AIX\n /\\b(beos|os\\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX/SerenityOS\n /(unix) ?([\\w\\.]*)/i // UNIX\n ], [NAME, VERSION]\n ]\n };\n\n /////////////////\n // Constructor\n ////////////////\n\n var UAParser = function (ua, extensions) {\n\n if (typeof ua === OBJ_TYPE) {\n extensions = ua;\n ua = undefined;\n }\n\n if (!(this instanceof UAParser)) {\n return new UAParser(ua, extensions).getResult();\n }\n\n var _navigator = (typeof window !== UNDEF_TYPE && window.navigator) ? window.navigator : undefined;\n var _ua = ua || ((_navigator && _navigator.userAgent) ? _navigator.userAgent : EMPTY);\n var _uach = (_navigator && _navigator.userAgentData) ? _navigator.userAgentData : undefined;\n var _rgxmap = extensions ? extend(regexes, extensions) : regexes;\n var _isSelfNav = _navigator && _navigator.userAgent == _ua;\n\n this.getBrowser = function () {\n var _browser = {};\n _browser[NAME] = undefined;\n _browser[VERSION] = undefined;\n rgxMapper.call(_browser, _ua, _rgxmap.browser);\n _browser[MAJOR] = majorize(_browser[VERSION]);\n // Brave-specific detection\n if (_isSelfNav && _navigator && _navigator.brave && typeof _navigator.brave.isBrave == FUNC_TYPE) {\n _browser[NAME] = 'Brave';\n }\n return _browser;\n };\n this.getCPU = function () {\n var _cpu = {};\n _cpu[ARCHITECTURE] = undefined;\n rgxMapper.call(_cpu, _ua, _rgxmap.cpu);\n return _cpu;\n };\n this.getDevice = function () {\n var _device = {};\n _device[VENDOR] = undefined;\n _device[MODEL] = undefined;\n _device[TYPE] = undefined;\n rgxMapper.call(_device, _ua, _rgxmap.device);\n if (_isSelfNav && !_device[TYPE] && _uach && _uach.mobile) {\n _device[TYPE] = MOBILE;\n }\n // iPadOS-specific detection: identified as Mac, but has some iOS-only properties\n if (_isSelfNav && _device[MODEL] == 'Macintosh' && _navigator && typeof _navigator.standalone !== UNDEF_TYPE && _navigator.maxTouchPoints && _navigator.maxTouchPoints > 2) {\n _device[MODEL] = 'iPad';\n _device[TYPE] = TABLET;\n }\n return _device;\n };\n this.getEngine = function () {\n var _engine = {};\n _engine[NAME] = undefined;\n _engine[VERSION] = undefined;\n rgxMapper.call(_engine, _ua, _rgxmap.engine);\n return _engine;\n };\n this.getOS = function () {\n var _os = {};\n _os[NAME] = undefined;\n _os[VERSION] = undefined;\n rgxMapper.call(_os, _ua, _rgxmap.os);\n if (_isSelfNav && !_os[NAME] && _uach && _uach.platform && _uach.platform != 'Unknown') {\n _os[NAME] = _uach.platform \n .replace(/chrome os/i, CHROMIUM_OS)\n .replace(/macos/i, MAC_OS); // backward compatibility\n }\n return _os;\n };\n this.getResult = function () {\n return {\n ua : this.getUA(),\n browser : this.getBrowser(),\n engine : this.getEngine(),\n os : this.getOS(),\n device : this.getDevice(),\n cpu : this.getCPU()\n };\n };\n this.getUA = function () {\n return _ua;\n };\n this.setUA = function (ua) {\n _ua = (typeof ua === STR_TYPE && ua.length > UA_MAX_LENGTH) ? trim(ua, UA_MAX_LENGTH) : ua;\n return this;\n };\n this.setUA(_ua);\n return this;\n };\n\n UAParser.VERSION = LIBVERSION;\n UAParser.BROWSER = enumerize([NAME, VERSION, MAJOR]);\n UAParser.CPU = enumerize([ARCHITECTURE]);\n UAParser.DEVICE = enumerize([MODEL, VENDOR, TYPE, CONSOLE, MOBILE, SMARTTV, TABLET, WEARABLE, EMBEDDED]);\n UAParser.ENGINE = UAParser.OS = enumerize([NAME, VERSION]);\n\n ///////////\n // Export\n //////////\n\n // check js environment\n if (typeof(exports) !== UNDEF_TYPE) {\n // nodejs env\n if (typeof module !== UNDEF_TYPE && module.exports) {\n exports = module.exports = UAParser;\n }\n exports.UAParser = UAParser;\n } else {\n // requirejs env (optional)\n if (typeof(define) === FUNC_TYPE && define.amd) {\n define(function () {\n return UAParser;\n });\n } else if (typeof window !== UNDEF_TYPE) {\n // browser env\n window.UAParser = UAParser;\n }\n }\n\n // jQuery/Zepto specific (optional)\n // Note:\n // In AMD env the global scope should be kept clean, but jQuery is an exception.\n // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,\n // and we should catch that.\n var $ = typeof window !== UNDEF_TYPE && (window.jQuery || window.Zepto);\n if ($ && !$.ua) {\n var parser = new UAParser();\n $.ua = parser.getResult();\n $.ua.get = function () {\n return parser.getUA();\n };\n $.ua.set = function (ua) {\n parser.setUA(ua);\n var result = parser.getResult();\n for (var prop in result) {\n $.ua[prop] = result[prop];\n }\n };\n }\n\n})(typeof window === 'object' ? window : this);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__6089__;","module.exports = __WEBPACK_EXTERNAL_MODULE__7781__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8531__;","module.exports = __WEBPACK_EXTERNAL_MODULE__2007__;","module.exports = __WEBPACK_EXTERNAL_MODULE__4201__;","module.exports = __WEBPACK_EXTERNAL_MODULE__3241__;","module.exports = __WEBPACK_EXTERNAL_MODULE__1308__;","module.exports = __WEBPACK_EXTERNAL_MODULE__5959__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8398__;","module.exports = __WEBPACK_EXTERNAL_MODULE__1159__;","module.exports = __WEBPACK_EXTERNAL_MODULE__1269__;","// src/focusManager.ts\nimport { Subscribable } from \"./subscribable.js\";\nimport { isServer } from \"./utils.js\";\nvar FocusManager = class extends Subscribable {\n #focused;\n #cleanup;\n #setup;\n constructor() {\n super();\n this.#setup = (onFocus) => {\n if (!isServer && window.addEventListener) {\n const listener = () => onFocus();\n window.addEventListener(\"visibilitychange\", listener, false);\n return () => {\n window.removeEventListener(\"visibilitychange\", listener);\n };\n }\n return;\n };\n }\n onSubscribe() {\n if (!this.#cleanup) {\n this.setEventListener(this.#setup);\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#cleanup?.();\n this.#cleanup = void 0;\n }\n }\n setEventListener(setup) {\n this.#setup = setup;\n this.#cleanup?.();\n this.#cleanup = setup((focused) => {\n if (typeof focused === \"boolean\") {\n this.setFocused(focused);\n } else {\n this.onFocus();\n }\n });\n }\n setFocused(focused) {\n const changed = this.#focused !== focused;\n if (changed) {\n this.#focused = focused;\n this.onFocus();\n }\n }\n onFocus() {\n const isFocused = this.isFocused();\n this.listeners.forEach((listener) => {\n listener(isFocused);\n });\n }\n isFocused() {\n if (typeof this.#focused === \"boolean\") {\n return this.#focused;\n }\n return globalThis.document?.visibilityState !== \"hidden\";\n }\n};\nvar focusManager = new FocusManager();\nexport {\n FocusManager,\n focusManager\n};\n//# sourceMappingURL=focusManager.js.map","// src/mutation.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Removable } from \"./removable.js\";\nimport { createRetryer } from \"./retryer.js\";\nvar Mutation = class extends Removable {\n #observers;\n #mutationCache;\n #retryer;\n constructor(config) {\n super();\n this.mutationId = config.mutationId;\n this.#mutationCache = config.mutationCache;\n this.#observers = [];\n this.state = config.state || getDefaultState();\n this.setOptions(config.options);\n this.scheduleGc();\n }\n setOptions(options) {\n this.options = options;\n this.updateGcTime(this.options.gcTime);\n }\n get meta() {\n return this.options.meta;\n }\n addObserver(observer) {\n if (!this.#observers.includes(observer)) {\n this.#observers.push(observer);\n this.clearGcTimeout();\n this.#mutationCache.notify({\n type: \"observerAdded\",\n mutation: this,\n observer\n });\n }\n }\n removeObserver(observer) {\n this.#observers = this.#observers.filter((x) => x !== observer);\n this.scheduleGc();\n this.#mutationCache.notify({\n type: \"observerRemoved\",\n mutation: this,\n observer\n });\n }\n optionalRemove() {\n if (!this.#observers.length) {\n if (this.state.status === \"pending\") {\n this.scheduleGc();\n } else {\n this.#mutationCache.remove(this);\n }\n }\n }\n continue() {\n return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before\n this.execute(this.state.variables);\n }\n async execute(variables) {\n this.#retryer = createRetryer({\n fn: () => {\n if (!this.options.mutationFn) {\n return Promise.reject(new Error(\"No mutationFn found\"));\n }\n return this.options.mutationFn(variables);\n },\n onFail: (failureCount, error) => {\n this.#dispatch({ type: \"failed\", failureCount, error });\n },\n onPause: () => {\n this.#dispatch({ type: \"pause\" });\n },\n onContinue: () => {\n this.#dispatch({ type: \"continue\" });\n },\n retry: this.options.retry ?? 0,\n retryDelay: this.options.retryDelay,\n networkMode: this.options.networkMode,\n canRun: () => this.#mutationCache.canRun(this)\n });\n const restored = this.state.status === \"pending\";\n const isPaused = !this.#retryer.canStart();\n try {\n if (!restored) {\n this.#dispatch({ type: \"pending\", variables, isPaused });\n await this.#mutationCache.config.onMutate?.(\n variables,\n this\n );\n const context = await this.options.onMutate?.(variables);\n if (context !== this.state.context) {\n this.#dispatch({\n type: \"pending\",\n context,\n variables,\n isPaused\n });\n }\n }\n const data = await this.#retryer.start();\n await this.#mutationCache.config.onSuccess?.(\n data,\n variables,\n this.state.context,\n this\n );\n await this.options.onSuccess?.(data, variables, this.state.context);\n await this.#mutationCache.config.onSettled?.(\n data,\n null,\n this.state.variables,\n this.state.context,\n this\n );\n await this.options.onSettled?.(data, null, variables, this.state.context);\n this.#dispatch({ type: \"success\", data });\n return data;\n } catch (error) {\n try {\n await this.#mutationCache.config.onError?.(\n error,\n variables,\n this.state.context,\n this\n );\n await this.options.onError?.(\n error,\n variables,\n this.state.context\n );\n await this.#mutationCache.config.onSettled?.(\n void 0,\n error,\n this.state.variables,\n this.state.context,\n this\n );\n await this.options.onSettled?.(\n void 0,\n error,\n variables,\n this.state.context\n );\n throw error;\n } finally {\n this.#dispatch({ type: \"error\", error });\n }\n } finally {\n this.#mutationCache.runNext(this);\n }\n }\n #dispatch(action) {\n const reducer = (state) => {\n switch (action.type) {\n case \"failed\":\n return {\n ...state,\n failureCount: action.failureCount,\n failureReason: action.error\n };\n case \"pause\":\n return {\n ...state,\n isPaused: true\n };\n case \"continue\":\n return {\n ...state,\n isPaused: false\n };\n case \"pending\":\n return {\n ...state,\n context: action.context,\n data: void 0,\n failureCount: 0,\n failureReason: null,\n error: null,\n isPaused: action.isPaused,\n status: \"pending\",\n variables: action.variables,\n submittedAt: Date.now()\n };\n case \"success\":\n return {\n ...state,\n data: action.data,\n failureCount: 0,\n failureReason: null,\n error: null,\n status: \"success\",\n isPaused: false\n };\n case \"error\":\n return {\n ...state,\n data: void 0,\n error: action.error,\n failureCount: state.failureCount + 1,\n failureReason: action.error,\n isPaused: false,\n status: \"error\"\n };\n }\n };\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.#observers.forEach((observer) => {\n observer.onMutationUpdate(action);\n });\n this.#mutationCache.notify({\n mutation: this,\n type: \"updated\",\n action\n });\n });\n }\n};\nfunction getDefaultState() {\n return {\n context: void 0,\n data: void 0,\n error: null,\n failureCount: 0,\n failureReason: null,\n isPaused: false,\n status: \"idle\",\n variables: void 0,\n submittedAt: 0\n };\n}\nexport {\n Mutation,\n getDefaultState\n};\n//# sourceMappingURL=mutation.js.map","// src/notifyManager.ts\nfunction createNotifyManager() {\n let queue = [];\n let transactions = 0;\n let notifyFn = (callback) => {\n callback();\n };\n let batchNotifyFn = (callback) => {\n callback();\n };\n let scheduleFn = (cb) => setTimeout(cb, 0);\n const setScheduler = (fn) => {\n scheduleFn = fn;\n };\n const batch = (callback) => {\n let result;\n transactions++;\n try {\n result = callback();\n } finally {\n transactions--;\n if (!transactions) {\n flush();\n }\n }\n return result;\n };\n const schedule = (callback) => {\n if (transactions) {\n queue.push(callback);\n } else {\n scheduleFn(() => {\n notifyFn(callback);\n });\n }\n };\n const batchCalls = (callback) => {\n return (...args) => {\n schedule(() => {\n callback(...args);\n });\n };\n };\n const flush = () => {\n const originalQueue = queue;\n queue = [];\n if (originalQueue.length) {\n scheduleFn(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback);\n });\n });\n });\n }\n };\n const setNotifyFunction = (fn) => {\n notifyFn = fn;\n };\n const setBatchNotifyFunction = (fn) => {\n batchNotifyFn = fn;\n };\n return {\n batch,\n batchCalls,\n schedule,\n setNotifyFunction,\n setBatchNotifyFunction,\n setScheduler\n };\n}\nvar notifyManager = createNotifyManager();\nexport {\n createNotifyManager,\n notifyManager\n};\n//# sourceMappingURL=notifyManager.js.map","// src/onlineManager.ts\nimport { Subscribable } from \"./subscribable.js\";\nimport { isServer } from \"./utils.js\";\nvar OnlineManager = class extends Subscribable {\n #online = true;\n #cleanup;\n #setup;\n constructor() {\n super();\n this.#setup = (onOnline) => {\n if (!isServer && window.addEventListener) {\n const onlineListener = () => onOnline(true);\n const offlineListener = () => onOnline(false);\n window.addEventListener(\"online\", onlineListener, false);\n window.addEventListener(\"offline\", offlineListener, false);\n return () => {\n window.removeEventListener(\"online\", onlineListener);\n window.removeEventListener(\"offline\", offlineListener);\n };\n }\n return;\n };\n }\n onSubscribe() {\n if (!this.#cleanup) {\n this.setEventListener(this.#setup);\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#cleanup?.();\n this.#cleanup = void 0;\n }\n }\n setEventListener(setup) {\n this.#setup = setup;\n this.#cleanup?.();\n this.#cleanup = setup(this.setOnline.bind(this));\n }\n setOnline(online) {\n const changed = this.#online !== online;\n if (changed) {\n this.#online = online;\n this.listeners.forEach((listener) => {\n listener(online);\n });\n }\n }\n isOnline() {\n return this.#online;\n }\n};\nvar onlineManager = new OnlineManager();\nexport {\n OnlineManager,\n onlineManager\n};\n//# sourceMappingURL=onlineManager.js.map","// src/query.ts\nimport {\n ensureQueryFn,\n noop,\n replaceData,\n resolveEnabled,\n timeUntilStale\n} from \"./utils.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { canFetch, createRetryer, isCancelledError } from \"./retryer.js\";\nimport { Removable } from \"./removable.js\";\nvar Query = class extends Removable {\n #initialState;\n #revertState;\n #cache;\n #retryer;\n #defaultOptions;\n #abortSignalConsumed;\n constructor(config) {\n super();\n this.#abortSignalConsumed = false;\n this.#defaultOptions = config.defaultOptions;\n this.setOptions(config.options);\n this.observers = [];\n this.#cache = config.cache;\n this.queryKey = config.queryKey;\n this.queryHash = config.queryHash;\n this.#initialState = config.state || getDefaultState(this.options);\n this.state = this.#initialState;\n this.scheduleGc();\n }\n get meta() {\n return this.options.meta;\n }\n get promise() {\n return this.#retryer?.promise;\n }\n setOptions(options) {\n this.options = { ...this.#defaultOptions, ...options };\n this.updateGcTime(this.options.gcTime);\n }\n optionalRemove() {\n if (!this.observers.length && this.state.fetchStatus === \"idle\") {\n this.#cache.remove(this);\n }\n }\n setData(newData, options) {\n const data = replaceData(this.state.data, newData, this.options);\n this.#dispatch({\n data,\n type: \"success\",\n dataUpdatedAt: options?.updatedAt,\n manual: options?.manual\n });\n return data;\n }\n setState(state, setStateOptions) {\n this.#dispatch({ type: \"setState\", state, setStateOptions });\n }\n cancel(options) {\n const promise = this.#retryer?.promise;\n this.#retryer?.cancel(options);\n return promise ? promise.then(noop).catch(noop) : Promise.resolve();\n }\n destroy() {\n super.destroy();\n this.cancel({ silent: true });\n }\n reset() {\n this.destroy();\n this.setState(this.#initialState);\n }\n isActive() {\n return this.observers.some(\n (observer) => resolveEnabled(observer.options.enabled, this) !== false\n );\n }\n isDisabled() {\n return this.getObserversCount() > 0 && !this.isActive();\n }\n isStale() {\n if (this.state.isInvalidated) {\n return true;\n }\n if (this.getObserversCount() > 0) {\n return this.observers.some(\n (observer) => observer.getCurrentResult().isStale\n );\n }\n return this.state.data === void 0;\n }\n isStaleByTime(staleTime = 0) {\n return this.state.isInvalidated || this.state.data === void 0 || !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n }\n onFocus() {\n const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus());\n observer?.refetch({ cancelRefetch: false });\n this.#retryer?.continue();\n }\n onOnline() {\n const observer = this.observers.find((x) => x.shouldFetchOnReconnect());\n observer?.refetch({ cancelRefetch: false });\n this.#retryer?.continue();\n }\n addObserver(observer) {\n if (!this.observers.includes(observer)) {\n this.observers.push(observer);\n this.clearGcTimeout();\n this.#cache.notify({ type: \"observerAdded\", query: this, observer });\n }\n }\n removeObserver(observer) {\n if (this.observers.includes(observer)) {\n this.observers = this.observers.filter((x) => x !== observer);\n if (!this.observers.length) {\n if (this.#retryer) {\n if (this.#abortSignalConsumed) {\n this.#retryer.cancel({ revert: true });\n } else {\n this.#retryer.cancelRetry();\n }\n }\n this.scheduleGc();\n }\n this.#cache.notify({ type: \"observerRemoved\", query: this, observer });\n }\n }\n getObserversCount() {\n return this.observers.length;\n }\n invalidate() {\n if (!this.state.isInvalidated) {\n this.#dispatch({ type: \"invalidate\" });\n }\n }\n fetch(options, fetchOptions) {\n if (this.state.fetchStatus !== \"idle\") {\n if (this.state.data !== void 0 && fetchOptions?.cancelRefetch) {\n this.cancel({ silent: true });\n } else if (this.#retryer) {\n this.#retryer.continueRetry();\n return this.#retryer.promise;\n }\n }\n if (options) {\n this.setOptions(options);\n }\n if (!this.options.queryFn) {\n const observer = this.observers.find((x) => x.options.queryFn);\n if (observer) {\n this.setOptions(observer.options);\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n if (!Array.isArray(this.options.queryKey)) {\n console.error(\n `As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`\n );\n }\n }\n const abortController = new AbortController();\n const addSignalProperty = (object) => {\n Object.defineProperty(object, \"signal\", {\n enumerable: true,\n get: () => {\n this.#abortSignalConsumed = true;\n return abortController.signal;\n }\n });\n };\n const fetchFn = () => {\n const queryFn = ensureQueryFn(this.options, fetchOptions);\n const queryFnContext = {\n queryKey: this.queryKey,\n meta: this.meta\n };\n addSignalProperty(queryFnContext);\n this.#abortSignalConsumed = false;\n if (this.options.persister) {\n return this.options.persister(\n queryFn,\n queryFnContext,\n this\n );\n }\n return queryFn(queryFnContext);\n };\n const context = {\n fetchOptions,\n options: this.options,\n queryKey: this.queryKey,\n state: this.state,\n fetchFn\n };\n addSignalProperty(context);\n this.options.behavior?.onFetch(\n context,\n this\n );\n this.#revertState = this.state;\n if (this.state.fetchStatus === \"idle\" || this.state.fetchMeta !== context.fetchOptions?.meta) {\n this.#dispatch({ type: \"fetch\", meta: context.fetchOptions?.meta });\n }\n const onError = (error) => {\n if (!(isCancelledError(error) && error.silent)) {\n this.#dispatch({\n type: \"error\",\n error\n });\n }\n if (!isCancelledError(error)) {\n this.#cache.config.onError?.(\n error,\n this\n );\n this.#cache.config.onSettled?.(\n this.state.data,\n error,\n this\n );\n }\n if (!this.isFetchingOptimistic) {\n this.scheduleGc();\n }\n this.isFetchingOptimistic = false;\n };\n this.#retryer = createRetryer({\n initialPromise: fetchOptions?.initialPromise,\n fn: context.fetchFn,\n abort: abortController.abort.bind(abortController),\n onSuccess: (data) => {\n if (data === void 0) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(\n `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`\n );\n }\n onError(new Error(`${this.queryHash} data is undefined`));\n return;\n }\n this.setData(data);\n this.#cache.config.onSuccess?.(data, this);\n this.#cache.config.onSettled?.(\n data,\n this.state.error,\n this\n );\n if (!this.isFetchingOptimistic) {\n this.scheduleGc();\n }\n this.isFetchingOptimistic = false;\n },\n onError,\n onFail: (failureCount, error) => {\n this.#dispatch({ type: \"failed\", failureCount, error });\n },\n onPause: () => {\n this.#dispatch({ type: \"pause\" });\n },\n onContinue: () => {\n this.#dispatch({ type: \"continue\" });\n },\n retry: context.options.retry,\n retryDelay: context.options.retryDelay,\n networkMode: context.options.networkMode,\n canRun: () => true\n });\n return this.#retryer.start();\n }\n #dispatch(action) {\n const reducer = (state) => {\n switch (action.type) {\n case \"failed\":\n return {\n ...state,\n fetchFailureCount: action.failureCount,\n fetchFailureReason: action.error\n };\n case \"pause\":\n return {\n ...state,\n fetchStatus: \"paused\"\n };\n case \"continue\":\n return {\n ...state,\n fetchStatus: \"fetching\"\n };\n case \"fetch\":\n return {\n ...state,\n ...fetchState(state.data, this.options),\n fetchMeta: action.meta ?? null\n };\n case \"success\":\n return {\n ...state,\n data: action.data,\n dataUpdateCount: state.dataUpdateCount + 1,\n dataUpdatedAt: action.dataUpdatedAt ?? Date.now(),\n error: null,\n isInvalidated: false,\n status: \"success\",\n ...!action.manual && {\n fetchStatus: \"idle\",\n fetchFailureCount: 0,\n fetchFailureReason: null\n }\n };\n case \"error\":\n const error = action.error;\n if (isCancelledError(error) && error.revert && this.#revertState) {\n return { ...this.#revertState, fetchStatus: \"idle\" };\n }\n return {\n ...state,\n error,\n errorUpdateCount: state.errorUpdateCount + 1,\n errorUpdatedAt: Date.now(),\n fetchFailureCount: state.fetchFailureCount + 1,\n fetchFailureReason: error,\n fetchStatus: \"idle\",\n status: \"error\"\n };\n case \"invalidate\":\n return {\n ...state,\n isInvalidated: true\n };\n case \"setState\":\n return {\n ...state,\n ...action.state\n };\n }\n };\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.observers.forEach((observer) => {\n observer.onQueryUpdate();\n });\n this.#cache.notify({ query: this, type: \"updated\", action });\n });\n }\n};\nfunction fetchState(data, options) {\n return {\n fetchFailureCount: 0,\n fetchFailureReason: null,\n fetchStatus: canFetch(options.networkMode) ? \"fetching\" : \"paused\",\n ...data === void 0 && {\n error: null,\n status: \"pending\"\n }\n };\n}\nfunction getDefaultState(options) {\n const data = typeof options.initialData === \"function\" ? options.initialData() : options.initialData;\n const hasData = data !== void 0;\n const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === \"function\" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n return {\n data,\n dataUpdateCount: 0,\n dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,\n error: null,\n errorUpdateCount: 0,\n errorUpdatedAt: 0,\n fetchFailureCount: 0,\n fetchFailureReason: null,\n fetchMeta: null,\n isInvalidated: false,\n status: hasData ? \"success\" : \"pending\",\n fetchStatus: \"idle\"\n };\n}\nexport {\n Query,\n fetchState\n};\n//# sourceMappingURL=query.js.map","// src/removable.ts\nimport { isServer, isValidTimeout } from \"./utils.js\";\nvar Removable = class {\n #gcTimeout;\n destroy() {\n this.clearGcTimeout();\n }\n scheduleGc() {\n this.clearGcTimeout();\n if (isValidTimeout(this.gcTime)) {\n this.#gcTimeout = setTimeout(() => {\n this.optionalRemove();\n }, this.gcTime);\n }\n }\n updateGcTime(newGcTime) {\n this.gcTime = Math.max(\n this.gcTime || 0,\n newGcTime ?? (isServer ? Infinity : 5 * 60 * 1e3)\n );\n }\n clearGcTimeout() {\n if (this.#gcTimeout) {\n clearTimeout(this.#gcTimeout);\n this.#gcTimeout = void 0;\n }\n }\n};\nexport {\n Removable\n};\n//# sourceMappingURL=removable.js.map","// src/retryer.ts\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { isServer, sleep } from \"./utils.js\";\nfunction defaultRetryDelay(failureCount) {\n return Math.min(1e3 * 2 ** failureCount, 3e4);\n}\nfunction canFetch(networkMode) {\n return (networkMode ?? \"online\") === \"online\" ? onlineManager.isOnline() : true;\n}\nvar CancelledError = class {\n constructor(options) {\n this.revert = options?.revert;\n this.silent = options?.silent;\n }\n};\nfunction isCancelledError(value) {\n return value instanceof CancelledError;\n}\nfunction createRetryer(config) {\n let isRetryCancelled = false;\n let failureCount = 0;\n let isResolved = false;\n let continueFn;\n let promiseResolve;\n let promiseReject;\n const promise = new Promise((outerResolve, outerReject) => {\n promiseResolve = outerResolve;\n promiseReject = outerReject;\n });\n const cancel = (cancelOptions) => {\n if (!isResolved) {\n reject(new CancelledError(cancelOptions));\n config.abort?.();\n }\n };\n const cancelRetry = () => {\n isRetryCancelled = true;\n };\n const continueRetry = () => {\n isRetryCancelled = false;\n };\n const canContinue = () => focusManager.isFocused() && (config.networkMode === \"always\" || onlineManager.isOnline()) && config.canRun();\n const canStart = () => canFetch(config.networkMode) && config.canRun();\n const resolve = (value) => {\n if (!isResolved) {\n isResolved = true;\n config.onSuccess?.(value);\n continueFn?.();\n promiseResolve(value);\n }\n };\n const reject = (value) => {\n if (!isResolved) {\n isResolved = true;\n config.onError?.(value);\n continueFn?.();\n promiseReject(value);\n }\n };\n const pause = () => {\n return new Promise((continueResolve) => {\n continueFn = (value) => {\n if (isResolved || canContinue()) {\n continueResolve(value);\n }\n };\n config.onPause?.();\n }).then(() => {\n continueFn = void 0;\n if (!isResolved) {\n config.onContinue?.();\n }\n });\n };\n const run = () => {\n if (isResolved) {\n return;\n }\n let promiseOrValue;\n const initialPromise = failureCount === 0 ? config.initialPromise : void 0;\n try {\n promiseOrValue = initialPromise ?? config.fn();\n } catch (error) {\n promiseOrValue = Promise.reject(error);\n }\n Promise.resolve(promiseOrValue).then(resolve).catch((error) => {\n if (isResolved) {\n return;\n }\n const retry = config.retry ?? (isServer ? 0 : 3);\n const retryDelay = config.retryDelay ?? defaultRetryDelay;\n const delay = typeof retryDelay === \"function\" ? retryDelay(failureCount, error) : retryDelay;\n const shouldRetry = retry === true || typeof retry === \"number\" && failureCount < retry || typeof retry === \"function\" && retry(failureCount, error);\n if (isRetryCancelled || !shouldRetry) {\n reject(error);\n return;\n }\n failureCount++;\n config.onFail?.(failureCount, error);\n sleep(delay).then(() => {\n return canContinue() ? void 0 : pause();\n }).then(() => {\n if (isRetryCancelled) {\n reject(error);\n } else {\n run();\n }\n });\n });\n };\n return {\n promise,\n cancel,\n continue: () => {\n continueFn?.();\n return promise;\n },\n cancelRetry,\n continueRetry,\n canStart,\n start: () => {\n if (canStart()) {\n run();\n } else {\n pause().then(run);\n }\n return promise;\n }\n };\n}\nexport {\n CancelledError,\n canFetch,\n createRetryer,\n isCancelledError\n};\n//# sourceMappingURL=retryer.js.map","// src/subscribable.ts\nvar Subscribable = class {\n constructor() {\n this.listeners = /* @__PURE__ */ new Set();\n this.subscribe = this.subscribe.bind(this);\n }\n subscribe(listener) {\n this.listeners.add(listener);\n this.onSubscribe();\n return () => {\n this.listeners.delete(listener);\n this.onUnsubscribe();\n };\n }\n hasListeners() {\n return this.listeners.size > 0;\n }\n onSubscribe() {\n }\n onUnsubscribe() {\n }\n};\nexport {\n Subscribable\n};\n//# sourceMappingURL=subscribable.js.map","// src/utils.ts\nvar isServer = typeof window === \"undefined\" || \"Deno\" in globalThis;\nfunction noop() {\n return void 0;\n}\nfunction functionalUpdate(updater, input) {\n return typeof updater === \"function\" ? updater(input) : updater;\n}\nfunction isValidTimeout(value) {\n return typeof value === \"number\" && value >= 0 && value !== Infinity;\n}\nfunction timeUntilStale(updatedAt, staleTime) {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nfunction resolveStaleTime(staleTime, query) {\n return typeof staleTime === \"function\" ? staleTime(query) : staleTime;\n}\nfunction resolveEnabled(enabled, query) {\n return typeof enabled === \"function\" ? enabled(query) : enabled;\n}\nfunction matchQuery(filters, query) {\n const {\n type = \"all\",\n exact,\n fetchStatus,\n predicate,\n queryKey,\n stale\n } = filters;\n if (queryKey) {\n if (exact) {\n if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {\n return false;\n }\n } else if (!partialMatchKey(query.queryKey, queryKey)) {\n return false;\n }\n }\n if (type !== \"all\") {\n const isActive = query.isActive();\n if (type === \"active\" && !isActive) {\n return false;\n }\n if (type === \"inactive\" && isActive) {\n return false;\n }\n }\n if (typeof stale === \"boolean\" && query.isStale() !== stale) {\n return false;\n }\n if (fetchStatus && fetchStatus !== query.state.fetchStatus) {\n return false;\n }\n if (predicate && !predicate(query)) {\n return false;\n }\n return true;\n}\nfunction matchMutation(filters, mutation) {\n const { exact, status, predicate, mutationKey } = filters;\n if (mutationKey) {\n if (!mutation.options.mutationKey) {\n return false;\n }\n if (exact) {\n if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {\n return false;\n }\n } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n return false;\n }\n }\n if (status && mutation.state.status !== status) {\n return false;\n }\n if (predicate && !predicate(mutation)) {\n return false;\n }\n return true;\n}\nfunction hashQueryKeyByOptions(queryKey, options) {\n const hashFn = options?.queryKeyHashFn || hashKey;\n return hashFn(queryKey);\n}\nfunction hashKey(queryKey) {\n return JSON.stringify(\n queryKey,\n (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {\n result[key] = val[key];\n return result;\n }, {}) : val\n );\n}\nfunction partialMatchKey(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (a && b && typeof a === \"object\" && typeof b === \"object\") {\n return !Object.keys(b).some((key) => !partialMatchKey(a[key], b[key]));\n }\n return false;\n}\nfunction replaceEqualDeep(a, b) {\n if (a === b) {\n return a;\n }\n const array = isPlainArray(a) && isPlainArray(b);\n if (array || isPlainObject(a) && isPlainObject(b)) {\n const aItems = array ? a : Object.keys(a);\n const aSize = aItems.length;\n const bItems = array ? b : Object.keys(b);\n const bSize = bItems.length;\n const copy = array ? [] : {};\n let equalItems = 0;\n for (let i = 0; i < bSize; i++) {\n const key = array ? i : bItems[i];\n if ((!array && aItems.includes(key) || array) && a[key] === void 0 && b[key] === void 0) {\n copy[key] = void 0;\n equalItems++;\n } else {\n copy[key] = replaceEqualDeep(a[key], b[key]);\n if (copy[key] === a[key] && a[key] !== void 0) {\n equalItems++;\n }\n }\n }\n return aSize === bSize && equalItems === aSize ? a : copy;\n }\n return b;\n}\nfunction shallowEqualObjects(a, b) {\n if (!b || Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n for (const key in a) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\nfunction isPlainArray(value) {\n return Array.isArray(value) && value.length === Object.keys(value).length;\n}\nfunction isPlainObject(o) {\n if (!hasObjectPrototype(o)) {\n return false;\n }\n const ctor = o.constructor;\n if (ctor === void 0) {\n return true;\n }\n const prot = ctor.prototype;\n if (!hasObjectPrototype(prot)) {\n return false;\n }\n if (!prot.hasOwnProperty(\"isPrototypeOf\")) {\n return false;\n }\n if (Object.getPrototypeOf(o) !== Object.prototype) {\n return false;\n }\n return true;\n}\nfunction hasObjectPrototype(o) {\n return Object.prototype.toString.call(o) === \"[object Object]\";\n}\nfunction sleep(ms) {\n return new Promise((resolve) => {\n setTimeout(resolve, ms);\n });\n}\nfunction replaceData(prevData, data, options) {\n if (typeof options.structuralSharing === \"function\") {\n return options.structuralSharing(prevData, data);\n } else if (options.structuralSharing !== false) {\n return replaceEqualDeep(prevData, data);\n }\n return data;\n}\nfunction keepPreviousData(previousData) {\n return previousData;\n}\nfunction addToEnd(items, item, max = 0) {\n const newItems = [...items, item];\n return max && newItems.length > max ? newItems.slice(1) : newItems;\n}\nfunction addToStart(items, item, max = 0) {\n const newItems = [item, ...items];\n return max && newItems.length > max ? newItems.slice(0, -1) : newItems;\n}\nvar skipToken = Symbol();\nvar ensureQueryFn = (options, fetchOptions) => {\n if (process.env.NODE_ENV !== \"production\") {\n if (options.queryFn === skipToken) {\n console.error(\n `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`\n );\n }\n }\n if (!options.queryFn && fetchOptions?.initialPromise) {\n return () => fetchOptions.initialPromise;\n }\n if (!options.queryFn || options.queryFn === skipToken) {\n return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`));\n }\n return options.queryFn;\n};\nexport {\n addToEnd,\n addToStart,\n ensureQueryFn,\n functionalUpdate,\n hashKey,\n hashQueryKeyByOptions,\n isPlainArray,\n isPlainObject,\n isServer,\n isValidTimeout,\n keepPreviousData,\n matchMutation,\n matchQuery,\n noop,\n partialMatchKey,\n replaceData,\n replaceEqualDeep,\n resolveEnabled,\n resolveStaleTime,\n shallowEqualObjects,\n skipToken,\n sleep,\n timeUntilStale\n};\n//# sourceMappingURL=utils.js.map","\"use client\";\n\n// src/QueryClientProvider.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar QueryClientContext = React.createContext(\n void 0\n);\nvar useQueryClient = (queryClient) => {\n const client = React.useContext(QueryClientContext);\n if (queryClient) {\n return queryClient;\n }\n if (!client) {\n throw new Error(\"No QueryClient set, use QueryClientProvider to set one\");\n }\n return client;\n};\nvar QueryClientProvider = ({\n client,\n children\n}) => {\n React.useEffect(() => {\n client.mount();\n return () => {\n client.unmount();\n };\n }, [client]);\n return /* @__PURE__ */ jsx(QueryClientContext.Provider, { value: client, children });\n};\nexport {\n QueryClientContext,\n QueryClientProvider,\n useQueryClient\n};\n//# sourceMappingURL=QueryClientProvider.js.map","// src/queryObserver.ts\nimport {\n isServer,\n isValidTimeout,\n noop,\n replaceData,\n resolveEnabled,\n resolveStaleTime,\n shallowEqualObjects,\n timeUntilStale\n} from \"./utils.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { fetchState } from \"./query.js\";\nvar QueryObserver = class extends Subscribable {\n constructor(client, options) {\n super();\n this.options = options;\n this.#client = client;\n this.#selectError = null;\n this.bindMethods();\n this.setOptions(options);\n }\n #client;\n #currentQuery = void 0;\n #currentQueryInitialState = void 0;\n #currentResult = void 0;\n #currentResultState;\n #currentResultOptions;\n #selectError;\n #selectFn;\n #selectResult;\n // This property keeps track of the last query with defined data.\n // It will be used to pass the previous data and query to the placeholder function between renders.\n #lastQueryWithDefinedData;\n #staleTimeoutId;\n #refetchIntervalId;\n #currentRefetchInterval;\n #trackedProps = /* @__PURE__ */ new Set();\n bindMethods() {\n this.refetch = this.refetch.bind(this);\n }\n onSubscribe() {\n if (this.listeners.size === 1) {\n this.#currentQuery.addObserver(this);\n if (shouldFetchOnMount(this.#currentQuery, this.options)) {\n this.#executeFetch();\n } else {\n this.updateResult();\n }\n this.#updateTimers();\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.destroy();\n }\n }\n shouldFetchOnReconnect() {\n return shouldFetchOn(\n this.#currentQuery,\n this.options,\n this.options.refetchOnReconnect\n );\n }\n shouldFetchOnWindowFocus() {\n return shouldFetchOn(\n this.#currentQuery,\n this.options,\n this.options.refetchOnWindowFocus\n );\n }\n destroy() {\n this.listeners = /* @__PURE__ */ new Set();\n this.#clearStaleTimeout();\n this.#clearRefetchInterval();\n this.#currentQuery.removeObserver(this);\n }\n setOptions(options, notifyOptions) {\n const prevOptions = this.options;\n const prevQuery = this.#currentQuery;\n this.options = this.#client.defaultQueryOptions(options);\n if (this.options.enabled !== void 0 && typeof this.options.enabled !== \"boolean\" && typeof this.options.enabled !== \"function\" && typeof resolveEnabled(this.options.enabled, this.#currentQuery) !== \"boolean\") {\n throw new Error(\n \"Expected enabled to be a boolean or a callback that returns a boolean\"\n );\n }\n this.#updateQuery();\n this.#currentQuery.setOptions(this.options);\n if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) {\n this.#client.getQueryCache().notify({\n type: \"observerOptionsUpdated\",\n query: this.#currentQuery,\n observer: this\n });\n }\n const mounted = this.hasListeners();\n if (mounted && shouldFetchOptionally(\n this.#currentQuery,\n prevQuery,\n this.options,\n prevOptions\n )) {\n this.#executeFetch();\n }\n this.updateResult(notifyOptions);\n if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || resolveStaleTime(this.options.staleTime, this.#currentQuery) !== resolveStaleTime(prevOptions.staleTime, this.#currentQuery))) {\n this.#updateStaleTimeout();\n }\n const nextRefetchInterval = this.#computeRefetchInterval();\n if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) {\n this.#updateRefetchInterval(nextRefetchInterval);\n }\n }\n getOptimisticResult(options) {\n const query = this.#client.getQueryCache().build(this.#client, options);\n const result = this.createResult(query, options);\n if (shouldAssignObserverCurrentProperties(this, result)) {\n this.#currentResult = result;\n this.#currentResultOptions = this.options;\n this.#currentResultState = this.#currentQuery.state;\n }\n return result;\n }\n getCurrentResult() {\n return this.#currentResult;\n }\n trackResult(result, onPropTracked) {\n const trackedResult = {};\n Object.keys(result).forEach((key) => {\n Object.defineProperty(trackedResult, key, {\n configurable: false,\n enumerable: true,\n get: () => {\n this.trackProp(key);\n onPropTracked?.(key);\n return result[key];\n }\n });\n });\n return trackedResult;\n }\n trackProp(key) {\n this.#trackedProps.add(key);\n }\n getCurrentQuery() {\n return this.#currentQuery;\n }\n refetch({ ...options } = {}) {\n return this.fetch({\n ...options\n });\n }\n fetchOptimistic(options) {\n const defaultedOptions = this.#client.defaultQueryOptions(options);\n const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);\n query.isFetchingOptimistic = true;\n return query.fetch().then(() => this.createResult(query, defaultedOptions));\n }\n fetch(fetchOptions) {\n return this.#executeFetch({\n ...fetchOptions,\n cancelRefetch: fetchOptions.cancelRefetch ?? true\n }).then(() => {\n this.updateResult();\n return this.#currentResult;\n });\n }\n #executeFetch(fetchOptions) {\n this.#updateQuery();\n let promise = this.#currentQuery.fetch(\n this.options,\n fetchOptions\n );\n if (!fetchOptions?.throwOnError) {\n promise = promise.catch(noop);\n }\n return promise;\n }\n #updateStaleTimeout() {\n this.#clearStaleTimeout();\n const staleTime = resolveStaleTime(\n this.options.staleTime,\n this.#currentQuery\n );\n if (isServer || this.#currentResult.isStale || !isValidTimeout(staleTime)) {\n return;\n }\n const time = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime);\n const timeout = time + 1;\n this.#staleTimeoutId = setTimeout(() => {\n if (!this.#currentResult.isStale) {\n this.updateResult();\n }\n }, timeout);\n }\n #computeRefetchInterval() {\n return (typeof this.options.refetchInterval === \"function\" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;\n }\n #updateRefetchInterval(nextInterval) {\n this.#clearRefetchInterval();\n this.#currentRefetchInterval = nextInterval;\n if (isServer || resolveEnabled(this.options.enabled, this.#currentQuery) === false || !isValidTimeout(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {\n return;\n }\n this.#refetchIntervalId = setInterval(() => {\n if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {\n this.#executeFetch();\n }\n }, this.#currentRefetchInterval);\n }\n #updateTimers() {\n this.#updateStaleTimeout();\n this.#updateRefetchInterval(this.#computeRefetchInterval());\n }\n #clearStaleTimeout() {\n if (this.#staleTimeoutId) {\n clearTimeout(this.#staleTimeoutId);\n this.#staleTimeoutId = void 0;\n }\n }\n #clearRefetchInterval() {\n if (this.#refetchIntervalId) {\n clearInterval(this.#refetchIntervalId);\n this.#refetchIntervalId = void 0;\n }\n }\n createResult(query, options) {\n const prevQuery = this.#currentQuery;\n const prevOptions = this.options;\n const prevResult = this.#currentResult;\n const prevResultState = this.#currentResultState;\n const prevResultOptions = this.#currentResultOptions;\n const queryChange = query !== prevQuery;\n const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;\n const { state } = query;\n let newState = { ...state };\n let isPlaceholderData = false;\n let data;\n if (options._optimisticResults) {\n const mounted = this.hasListeners();\n const fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n if (fetchOnMount || fetchOptionally) {\n newState = {\n ...newState,\n ...fetchState(state.data, query.options)\n };\n }\n if (options._optimisticResults === \"isRestoring\") {\n newState.fetchStatus = \"idle\";\n }\n }\n let { error, errorUpdatedAt, status } = newState;\n if (options.select && newState.data !== void 0) {\n if (prevResult && newState.data === prevResultState?.data && options.select === this.#selectFn) {\n data = this.#selectResult;\n } else {\n try {\n this.#selectFn = options.select;\n data = options.select(newState.data);\n data = replaceData(prevResult?.data, data, options);\n this.#selectResult = data;\n this.#selectError = null;\n } catch (selectError) {\n this.#selectError = selectError;\n }\n }\n } else {\n data = newState.data;\n }\n if (options.placeholderData !== void 0 && data === void 0 && status === \"pending\") {\n let placeholderData;\n if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {\n placeholderData = prevResult.data;\n } else {\n placeholderData = typeof options.placeholderData === \"function\" ? options.placeholderData(\n this.#lastQueryWithDefinedData?.state.data,\n this.#lastQueryWithDefinedData\n ) : options.placeholderData;\n if (options.select && placeholderData !== void 0) {\n try {\n placeholderData = options.select(placeholderData);\n this.#selectError = null;\n } catch (selectError) {\n this.#selectError = selectError;\n }\n }\n }\n if (placeholderData !== void 0) {\n status = \"success\";\n data = replaceData(\n prevResult?.data,\n placeholderData,\n options\n );\n isPlaceholderData = true;\n }\n }\n if (this.#selectError) {\n error = this.#selectError;\n data = this.#selectResult;\n errorUpdatedAt = Date.now();\n status = \"error\";\n }\n const isFetching = newState.fetchStatus === \"fetching\";\n const isPending = status === \"pending\";\n const isError = status === \"error\";\n const isLoading = isPending && isFetching;\n const hasData = data !== void 0;\n const result = {\n status,\n fetchStatus: newState.fetchStatus,\n isPending,\n isSuccess: status === \"success\",\n isError,\n isInitialLoading: isLoading,\n isLoading,\n data,\n dataUpdatedAt: newState.dataUpdatedAt,\n error,\n errorUpdatedAt,\n failureCount: newState.fetchFailureCount,\n failureReason: newState.fetchFailureReason,\n errorUpdateCount: newState.errorUpdateCount,\n isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,\n isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching,\n isRefetching: isFetching && !isPending,\n isLoadingError: isError && !hasData,\n isPaused: newState.fetchStatus === \"paused\",\n isPlaceholderData,\n isRefetchError: isError && hasData,\n isStale: isStale(query, options),\n refetch: this.refetch\n };\n return result;\n }\n updateResult(notifyOptions) {\n const prevResult = this.#currentResult;\n const nextResult = this.createResult(this.#currentQuery, this.options);\n this.#currentResultState = this.#currentQuery.state;\n this.#currentResultOptions = this.options;\n if (this.#currentResultState.data !== void 0) {\n this.#lastQueryWithDefinedData = this.#currentQuery;\n }\n if (shallowEqualObjects(nextResult, prevResult)) {\n return;\n }\n this.#currentResult = nextResult;\n const defaultNotifyOptions = {};\n const shouldNotifyListeners = () => {\n if (!prevResult) {\n return true;\n }\n const { notifyOnChangeProps } = this.options;\n const notifyOnChangePropsValue = typeof notifyOnChangeProps === \"function\" ? notifyOnChangeProps() : notifyOnChangeProps;\n if (notifyOnChangePropsValue === \"all\" || !notifyOnChangePropsValue && !this.#trackedProps.size) {\n return true;\n }\n const includedProps = new Set(\n notifyOnChangePropsValue ?? this.#trackedProps\n );\n if (this.options.throwOnError) {\n includedProps.add(\"error\");\n }\n return Object.keys(this.#currentResult).some((key) => {\n const typedKey = key;\n const changed = this.#currentResult[typedKey] !== prevResult[typedKey];\n return changed && includedProps.has(typedKey);\n });\n };\n if (notifyOptions?.listeners !== false && shouldNotifyListeners()) {\n defaultNotifyOptions.listeners = true;\n }\n this.#notify({ ...defaultNotifyOptions, ...notifyOptions });\n }\n #updateQuery() {\n const query = this.#client.getQueryCache().build(this.#client, this.options);\n if (query === this.#currentQuery) {\n return;\n }\n const prevQuery = this.#currentQuery;\n this.#currentQuery = query;\n this.#currentQueryInitialState = query.state;\n if (this.hasListeners()) {\n prevQuery?.removeObserver(this);\n query.addObserver(this);\n }\n }\n onQueryUpdate() {\n this.updateResult();\n if (this.hasListeners()) {\n this.#updateTimers();\n }\n }\n #notify(notifyOptions) {\n notifyManager.batch(() => {\n if (notifyOptions.listeners) {\n this.listeners.forEach((listener) => {\n listener(this.#currentResult);\n });\n }\n this.#client.getQueryCache().notify({\n query: this.#currentQuery,\n type: \"observerResultsUpdated\"\n });\n });\n }\n};\nfunction shouldLoadOnMount(query, options) {\n return resolveEnabled(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === \"error\" && options.retryOnMount === false);\n}\nfunction shouldFetchOnMount(query, options) {\n return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\nfunction shouldFetchOn(query, options, field) {\n if (resolveEnabled(options.enabled, query) !== false) {\n const value = typeof field === \"function\" ? field(query) : field;\n return value === \"always\" || value !== false && isStale(query, options);\n }\n return false;\n}\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return (query !== prevQuery || resolveEnabled(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== \"error\") && isStale(query, options);\n}\nfunction isStale(query, options) {\n return resolveEnabled(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query));\n}\nfunction shouldAssignObserverCurrentProperties(observer, optimisticResult) {\n if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {\n return true;\n }\n return false;\n}\nexport {\n QueryObserver\n};\n//# sourceMappingURL=queryObserver.js.map","\"use client\";\n\n// src/QueryErrorResetBoundary.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createValue() {\n let isReset = false;\n return {\n clearReset: () => {\n isReset = false;\n },\n reset: () => {\n isReset = true;\n },\n isReset: () => {\n return isReset;\n }\n };\n}\nvar QueryErrorResetBoundaryContext = React.createContext(createValue());\nvar useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);\nvar QueryErrorResetBoundary = ({\n children\n}) => {\n const [value] = React.useState(() => createValue());\n return /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === \"function\" ? children(value) : children });\n};\nexport {\n QueryErrorResetBoundary,\n useQueryErrorResetBoundary\n};\n//# sourceMappingURL=QueryErrorResetBoundary.js.map","\"use client\";\n\n// src/isRestoring.ts\nimport * as React from \"react\";\nvar IsRestoringContext = React.createContext(false);\nvar useIsRestoring = () => React.useContext(IsRestoringContext);\nvar IsRestoringProvider = IsRestoringContext.Provider;\nexport {\n IsRestoringProvider,\n useIsRestoring\n};\n//# sourceMappingURL=isRestoring.js.map","\"use client\";\n\n// src/errorBoundaryUtils.ts\nimport * as React from \"react\";\nimport { shouldThrowError } from \"./utils.js\";\nvar ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {\n if (options.suspense || options.throwOnError) {\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false;\n }\n }\n};\nvar useClearResetErrorBoundary = (errorResetBoundary) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset();\n }, [errorResetBoundary]);\n};\nvar getHasError = ({\n result,\n errorResetBoundary,\n throwOnError,\n query\n}) => {\n return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && shouldThrowError(throwOnError, [result.error, query]);\n};\nexport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary\n};\n//# sourceMappingURL=errorBoundaryUtils.js.map","// src/suspense.ts\nvar defaultThrowOnError = (_error, query) => query.state.data === void 0;\nvar ensureStaleTime = (defaultedOptions) => {\n if (defaultedOptions.suspense) {\n if (typeof defaultedOptions.staleTime !== \"number\") {\n defaultedOptions.staleTime = 1e3;\n }\n }\n};\nvar willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;\nvar shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;\nvar fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {\n errorResetBoundary.clearReset();\n});\nexport {\n defaultThrowOnError,\n ensureStaleTime,\n fetchOptimistic,\n shouldSuspend,\n willFetch\n};\n//# sourceMappingURL=suspense.js.map","\"use client\";\n\n// src/useQuery.ts\nimport { QueryObserver } from \"@tanstack/query-core\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nfunction useQuery(options, queryClient) {\n return useBaseQuery(options, QueryObserver, queryClient);\n}\nexport {\n useQuery\n};\n//# sourceMappingURL=useQuery.js.map","\"use client\";\n\n// src/useBaseQuery.ts\nimport * as React from \"react\";\nimport { notifyManager } from \"@tanstack/query-core\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useIsRestoring } from \"./isRestoring.js\";\nimport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary\n} from \"./errorBoundaryUtils.js\";\nimport { ensureStaleTime, fetchOptimistic, shouldSuspend } from \"./suspense.js\";\nfunction useBaseQuery(options, Observer, queryClient) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof options !== \"object\" || Array.isArray(options)) {\n throw new Error(\n 'Bad argument type. Starting with v5, only the \"Object\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'\n );\n }\n }\n const client = useQueryClient(queryClient);\n const isRestoring = useIsRestoring();\n const errorResetBoundary = useQueryErrorResetBoundary();\n const defaultedOptions = client.defaultQueryOptions(options);\n client.getDefaultOptions().queries?._experimental_beforeQuery?.(\n defaultedOptions\n );\n defaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : \"optimistic\";\n ensureStaleTime(defaultedOptions);\n ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary);\n useClearResetErrorBoundary(errorResetBoundary);\n const [observer] = React.useState(\n () => new Observer(\n client,\n defaultedOptions\n )\n );\n const result = observer.getOptimisticResult(defaultedOptions);\n React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => {\n const unsubscribe = isRestoring ? () => void 0 : observer.subscribe(notifyManager.batchCalls(onStoreChange));\n observer.updateResult();\n return unsubscribe;\n },\n [observer, isRestoring]\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult()\n );\n React.useEffect(() => {\n observer.setOptions(defaultedOptions, { listeners: false });\n }, [defaultedOptions, observer]);\n if (shouldSuspend(defaultedOptions, result)) {\n throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);\n }\n if (getHasError({\n result,\n errorResetBoundary,\n throwOnError: defaultedOptions.throwOnError,\n query: client.getQueryCache().get(defaultedOptions.queryHash)\n })) {\n throw result.error;\n }\n ;\n client.getDefaultOptions().queries?._experimental_afterQuery?.(\n defaultedOptions,\n result\n );\n return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;\n}\nexport {\n useBaseQuery\n};\n//# sourceMappingURL=useBaseQuery.js.map","// src/utils.ts\nfunction shouldThrowError(throwError, params) {\n if (typeof throwError === \"function\") {\n return throwError(...params);\n }\n return !!throwError;\n}\nfunction noop() {\n}\nexport {\n noop,\n shouldThrowError\n};\n//# sourceMappingURL=utils.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"public/plugins/grafana-pyroscope-app/\";","\n__webpack_require__.sriHashes = {\"75\":\"*-*-*-CHUNK-SRI-HASH-CT0nxi3C/95LndfQk5spEPrNL6L6o=\",\"373\":\"*-*-*-CHUNK-SRI-HASH-jy7mlnCdgjZWTmMvvkfRk/jU2hF9o=\",\"608\":\"*-*-*-CHUNK-SRI-HASH-7WP11YQGOz0IbuJbBY9HnENq/FpFQ=\",\"702\":\"*-*-*-CHUNK-SRI-HASH-S/KN3Q9+c/GZLV5WdbKD7nUGWBtBY=\",\"755\":\"*-*-*-CHUNK-SRI-HASH-PS+hSbQr0qWSLNFexwBFQwZUA6C2s=\"};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t231: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkgrafana_pyroscope_app\"] = self[\"webpackChunkgrafana_pyroscope_app\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","\nimport amdMetaModule from 'amd-module';\n\n__webpack_public_path__ =\n amdMetaModule && amdMetaModule.uri\n ? amdMetaModule.uri.slice(0, amdMetaModule.uri.lastIndexOf('/') + 1)\n : 'public/plugins/grafana-pyroscope-app/';\n","// src/queryCache.ts\nimport { hashQueryKeyByOptions, matchQuery } from \"./utils.js\";\nimport { Query } from \"./query.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar QueryCache = class extends Subscribable {\n constructor(config = {}) {\n super();\n this.config = config;\n this.#queries = /* @__PURE__ */ new Map();\n }\n #queries;\n build(client, options, state) {\n const queryKey = options.queryKey;\n const queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options);\n let query = this.get(queryHash);\n if (!query) {\n query = new Query({\n cache: this,\n queryKey,\n queryHash,\n options: client.defaultQueryOptions(options),\n state,\n defaultOptions: client.getQueryDefaults(queryKey)\n });\n this.add(query);\n }\n return query;\n }\n add(query) {\n if (!this.#queries.has(query.queryHash)) {\n this.#queries.set(query.queryHash, query);\n this.notify({\n type: \"added\",\n query\n });\n }\n }\n remove(query) {\n const queryInMap = this.#queries.get(query.queryHash);\n if (queryInMap) {\n query.destroy();\n if (queryInMap === query) {\n this.#queries.delete(query.queryHash);\n }\n this.notify({ type: \"removed\", query });\n }\n }\n clear() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n this.remove(query);\n });\n });\n }\n get(queryHash) {\n return this.#queries.get(queryHash);\n }\n getAll() {\n return [...this.#queries.values()];\n }\n find(filters) {\n const defaultedFilters = { exact: true, ...filters };\n return this.getAll().find(\n (query) => matchQuery(defaultedFilters, query)\n );\n }\n findAll(filters = {}) {\n const queries = this.getAll();\n return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;\n }\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(event);\n });\n });\n }\n onFocus() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n query.onFocus();\n });\n });\n }\n onOnline() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n query.onOnline();\n });\n });\n }\n};\nexport {\n QueryCache\n};\n//# sourceMappingURL=queryCache.js.map","// src/mutationCache.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Mutation } from \"./mutation.js\";\nimport { matchMutation, noop } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar MutationCache = class extends Subscribable {\n constructor(config = {}) {\n super();\n this.config = config;\n this.#mutations = /* @__PURE__ */ new Map();\n this.#mutationId = Date.now();\n }\n #mutations;\n #mutationId;\n build(client, options, state) {\n const mutation = new Mutation({\n mutationCache: this,\n mutationId: ++this.#mutationId,\n options: client.defaultMutationOptions(options),\n state\n });\n this.add(mutation);\n return mutation;\n }\n add(mutation) {\n const scope = scopeFor(mutation);\n const mutations = this.#mutations.get(scope) ?? [];\n mutations.push(mutation);\n this.#mutations.set(scope, mutations);\n this.notify({ type: \"added\", mutation });\n }\n remove(mutation) {\n const scope = scopeFor(mutation);\n if (this.#mutations.has(scope)) {\n const mutations = this.#mutations.get(scope)?.filter((x) => x !== mutation);\n if (mutations) {\n if (mutations.length === 0) {\n this.#mutations.delete(scope);\n } else {\n this.#mutations.set(scope, mutations);\n }\n }\n }\n this.notify({ type: \"removed\", mutation });\n }\n canRun(mutation) {\n const firstPendingMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m.state.status === \"pending\");\n return !firstPendingMutation || firstPendingMutation === mutation;\n }\n runNext(mutation) {\n const foundMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m !== mutation && m.state.isPaused);\n return foundMutation?.continue() ?? Promise.resolve();\n }\n clear() {\n notifyManager.batch(() => {\n this.getAll().forEach((mutation) => {\n this.remove(mutation);\n });\n });\n }\n getAll() {\n return [...this.#mutations.values()].flat();\n }\n find(filters) {\n const defaultedFilters = { exact: true, ...filters };\n return this.getAll().find(\n (mutation) => matchMutation(defaultedFilters, mutation)\n );\n }\n findAll(filters = {}) {\n return this.getAll().filter((mutation) => matchMutation(filters, mutation));\n }\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(event);\n });\n });\n }\n resumePausedMutations() {\n const pausedMutations = this.getAll().filter((x) => x.state.isPaused);\n return notifyManager.batch(\n () => Promise.all(\n pausedMutations.map((mutation) => mutation.continue().catch(noop))\n )\n );\n }\n};\nfunction scopeFor(mutation) {\n return mutation.options.scope?.id ?? String(mutation.mutationId);\n}\nexport {\n MutationCache\n};\n//# sourceMappingURL=mutationCache.js.map","// src/infiniteQueryBehavior.ts\nimport { addToEnd, addToStart, ensureQueryFn } from \"./utils.js\";\nfunction infiniteQueryBehavior(pages) {\n return {\n onFetch: (context, query) => {\n const fetchFn = async () => {\n const options = context.options;\n const direction = context.fetchOptions?.meta?.fetchMore?.direction;\n const oldPages = context.state.data?.pages || [];\n const oldPageParams = context.state.data?.pageParams || [];\n const empty = { pages: [], pageParams: [] };\n let cancelled = false;\n const addSignalProperty = (object) => {\n Object.defineProperty(object, \"signal\", {\n enumerable: true,\n get: () => {\n if (context.signal.aborted) {\n cancelled = true;\n } else {\n context.signal.addEventListener(\"abort\", () => {\n cancelled = true;\n });\n }\n return context.signal;\n }\n });\n };\n const queryFn = ensureQueryFn(context.options, context.fetchOptions);\n const fetchPage = async (data, param, previous) => {\n if (cancelled) {\n return Promise.reject();\n }\n if (param == null && data.pages.length) {\n return Promise.resolve(data);\n }\n const queryFnContext = {\n queryKey: context.queryKey,\n pageParam: param,\n direction: previous ? \"backward\" : \"forward\",\n meta: context.options.meta\n };\n addSignalProperty(queryFnContext);\n const page = await queryFn(\n queryFnContext\n );\n const { maxPages } = context.options;\n const addTo = previous ? addToStart : addToEnd;\n return {\n pages: addTo(data.pages, page, maxPages),\n pageParams: addTo(data.pageParams, param, maxPages)\n };\n };\n let result;\n if (direction && oldPages.length) {\n const previous = direction === \"backward\";\n const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;\n const oldData = {\n pages: oldPages,\n pageParams: oldPageParams\n };\n const param = pageParamFn(options, oldData);\n result = await fetchPage(oldData, param, previous);\n } else {\n result = await fetchPage(\n empty,\n oldPageParams[0] ?? options.initialPageParam\n );\n const remainingPages = pages ?? oldPages.length;\n for (let i = 1; i < remainingPages; i++) {\n const param = getNextPageParam(options, result);\n result = await fetchPage(result, param);\n }\n }\n return result;\n };\n if (context.options.persister) {\n context.fetchFn = () => {\n return context.options.persister?.(\n fetchFn,\n {\n queryKey: context.queryKey,\n meta: context.options.meta,\n signal: context.signal\n },\n query\n );\n };\n } else {\n context.fetchFn = fetchFn;\n }\n }\n };\n}\nfunction getNextPageParam(options, { pages, pageParams }) {\n const lastIndex = pages.length - 1;\n return options.getNextPageParam(\n pages[lastIndex],\n pages,\n pageParams[lastIndex],\n pageParams\n );\n}\nfunction getPreviousPageParam(options, { pages, pageParams }) {\n return options.getPreviousPageParam?.(\n pages[0],\n pages,\n pageParams[0],\n pageParams\n );\n}\nfunction hasNextPage(options, data) {\n if (!data)\n return false;\n return getNextPageParam(options, data) != null;\n}\nfunction hasPreviousPage(options, data) {\n if (!data || !options.getPreviousPageParam)\n return false;\n return getPreviousPageParam(options, data) != null;\n}\nexport {\n hasNextPage,\n hasPreviousPage,\n infiniteQueryBehavior\n};\n//# sourceMappingURL=infiniteQueryBehavior.js.map","import { QueryClient } from '@tanstack/react-query';\n\nexport const queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n networkMode: 'always',\n retry: false,\n refetchOnWindowFocus: false,\n },\n },\n});\n","// src/queryClient.ts\nimport {\n functionalUpdate,\n hashKey,\n hashQueryKeyByOptions,\n noop,\n partialMatchKey,\n resolveStaleTime,\n skipToken\n} from \"./utils.js\";\nimport { QueryCache } from \"./queryCache.js\";\nimport { MutationCache } from \"./mutationCache.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { infiniteQueryBehavior } from \"./infiniteQueryBehavior.js\";\nvar QueryClient = class {\n #queryCache;\n #mutationCache;\n #defaultOptions;\n #queryDefaults;\n #mutationDefaults;\n #mountCount;\n #unsubscribeFocus;\n #unsubscribeOnline;\n constructor(config = {}) {\n this.#queryCache = config.queryCache || new QueryCache();\n this.#mutationCache = config.mutationCache || new MutationCache();\n this.#defaultOptions = config.defaultOptions || {};\n this.#queryDefaults = /* @__PURE__ */ new Map();\n this.#mutationDefaults = /* @__PURE__ */ new Map();\n this.#mountCount = 0;\n }\n mount() {\n this.#mountCount++;\n if (this.#mountCount !== 1)\n return;\n this.#unsubscribeFocus = focusManager.subscribe(async (focused) => {\n if (focused) {\n await this.resumePausedMutations();\n this.#queryCache.onFocus();\n }\n });\n this.#unsubscribeOnline = onlineManager.subscribe(async (online) => {\n if (online) {\n await this.resumePausedMutations();\n this.#queryCache.onOnline();\n }\n });\n }\n unmount() {\n this.#mountCount--;\n if (this.#mountCount !== 0)\n return;\n this.#unsubscribeFocus?.();\n this.#unsubscribeFocus = void 0;\n this.#unsubscribeOnline?.();\n this.#unsubscribeOnline = void 0;\n }\n isFetching(filters) {\n return this.#queryCache.findAll({ ...filters, fetchStatus: \"fetching\" }).length;\n }\n isMutating(filters) {\n return this.#mutationCache.findAll({ ...filters, status: \"pending\" }).length;\n }\n getQueryData(queryKey) {\n const options = this.defaultQueryOptions({ queryKey });\n return this.#queryCache.get(options.queryHash)?.state.data;\n }\n ensureQueryData(options) {\n const cachedData = this.getQueryData(options.queryKey);\n if (cachedData === void 0)\n return this.fetchQuery(options);\n else {\n const defaultedOptions = this.defaultQueryOptions(options);\n const query = this.#queryCache.build(this, defaultedOptions);\n if (options.revalidateIfStale && query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query))) {\n void this.prefetchQuery(defaultedOptions);\n }\n return Promise.resolve(cachedData);\n }\n }\n getQueriesData(filters) {\n return this.#queryCache.findAll(filters).map(({ queryKey, state }) => {\n const data = state.data;\n return [queryKey, data];\n });\n }\n setQueryData(queryKey, updater, options) {\n const defaultedOptions = this.defaultQueryOptions({ queryKey });\n const query = this.#queryCache.get(\n defaultedOptions.queryHash\n );\n const prevData = query?.state.data;\n const data = functionalUpdate(updater, prevData);\n if (data === void 0) {\n return void 0;\n }\n return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });\n }\n setQueriesData(filters, updater, options) {\n return notifyManager.batch(\n () => this.#queryCache.findAll(filters).map(({ queryKey }) => [\n queryKey,\n this.setQueryData(queryKey, updater, options)\n ])\n );\n }\n getQueryState(queryKey) {\n const options = this.defaultQueryOptions({ queryKey });\n return this.#queryCache.get(options.queryHash)?.state;\n }\n removeQueries(filters) {\n const queryCache = this.#queryCache;\n notifyManager.batch(() => {\n queryCache.findAll(filters).forEach((query) => {\n queryCache.remove(query);\n });\n });\n }\n resetQueries(filters, options) {\n const queryCache = this.#queryCache;\n const refetchFilters = {\n type: \"active\",\n ...filters\n };\n return notifyManager.batch(() => {\n queryCache.findAll(filters).forEach((query) => {\n query.reset();\n });\n return this.refetchQueries(refetchFilters, options);\n });\n }\n cancelQueries(filters = {}, cancelOptions = {}) {\n const defaultedCancelOptions = { revert: true, ...cancelOptions };\n const promises = notifyManager.batch(\n () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))\n );\n return Promise.all(promises).then(noop).catch(noop);\n }\n invalidateQueries(filters = {}, options = {}) {\n return notifyManager.batch(() => {\n this.#queryCache.findAll(filters).forEach((query) => {\n query.invalidate();\n });\n if (filters.refetchType === \"none\") {\n return Promise.resolve();\n }\n const refetchFilters = {\n ...filters,\n type: filters.refetchType ?? filters.type ?? \"active\"\n };\n return this.refetchQueries(refetchFilters, options);\n });\n }\n refetchQueries(filters = {}, options) {\n const fetchOptions = {\n ...options,\n cancelRefetch: options?.cancelRefetch ?? true\n };\n const promises = notifyManager.batch(\n () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled()).map((query) => {\n let promise = query.fetch(void 0, fetchOptions);\n if (!fetchOptions.throwOnError) {\n promise = promise.catch(noop);\n }\n return query.state.fetchStatus === \"paused\" ? Promise.resolve() : promise;\n })\n );\n return Promise.all(promises).then(noop);\n }\n fetchQuery(options) {\n const defaultedOptions = this.defaultQueryOptions(options);\n if (defaultedOptions.retry === void 0) {\n defaultedOptions.retry = false;\n }\n const query = this.#queryCache.build(this, defaultedOptions);\n return query.isStaleByTime(\n resolveStaleTime(defaultedOptions.staleTime, query)\n ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n }\n prefetchQuery(options) {\n return this.fetchQuery(options).then(noop).catch(noop);\n }\n fetchInfiniteQuery(options) {\n options.behavior = infiniteQueryBehavior(options.pages);\n return this.fetchQuery(options);\n }\n prefetchInfiniteQuery(options) {\n return this.fetchInfiniteQuery(options).then(noop).catch(noop);\n }\n resumePausedMutations() {\n if (onlineManager.isOnline()) {\n return this.#mutationCache.resumePausedMutations();\n }\n return Promise.resolve();\n }\n getQueryCache() {\n return this.#queryCache;\n }\n getMutationCache() {\n return this.#mutationCache;\n }\n getDefaultOptions() {\n return this.#defaultOptions;\n }\n setDefaultOptions(options) {\n this.#defaultOptions = options;\n }\n setQueryDefaults(queryKey, options) {\n this.#queryDefaults.set(hashKey(queryKey), {\n queryKey,\n defaultOptions: options\n });\n }\n getQueryDefaults(queryKey) {\n const defaults = [...this.#queryDefaults.values()];\n let result = {};\n defaults.forEach((queryDefault) => {\n if (partialMatchKey(queryKey, queryDefault.queryKey)) {\n result = { ...result, ...queryDefault.defaultOptions };\n }\n });\n return result;\n }\n setMutationDefaults(mutationKey, options) {\n this.#mutationDefaults.set(hashKey(mutationKey), {\n mutationKey,\n defaultOptions: options\n });\n }\n getMutationDefaults(mutationKey) {\n const defaults = [...this.#mutationDefaults.values()];\n let result = {};\n defaults.forEach((queryDefault) => {\n if (partialMatchKey(mutationKey, queryDefault.mutationKey)) {\n result = { ...result, ...queryDefault.defaultOptions };\n }\n });\n return result;\n }\n defaultQueryOptions(options) {\n if (options._defaulted) {\n return options;\n }\n const defaultedOptions = {\n ...this.#defaultOptions.queries,\n ...this.getQueryDefaults(options.queryKey),\n ...options,\n _defaulted: true\n };\n if (!defaultedOptions.queryHash) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(\n defaultedOptions.queryKey,\n defaultedOptions\n );\n }\n if (defaultedOptions.refetchOnReconnect === void 0) {\n defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== \"always\";\n }\n if (defaultedOptions.throwOnError === void 0) {\n defaultedOptions.throwOnError = !!defaultedOptions.suspense;\n }\n if (!defaultedOptions.networkMode && defaultedOptions.persister) {\n defaultedOptions.networkMode = \"offlineFirst\";\n }\n if (defaultedOptions.enabled !== true && defaultedOptions.queryFn === skipToken) {\n defaultedOptions.enabled = false;\n }\n return defaultedOptions;\n }\n defaultMutationOptions(options) {\n if (options?._defaulted) {\n return options;\n }\n return {\n ...this.#defaultOptions.mutations,\n ...options?.mutationKey && this.getMutationDefaults(options.mutationKey),\n ...options,\n _defaulted: true\n };\n }\n clear() {\n this.#queryCache.clear();\n this.#mutationCache.clear();\n }\n};\nexport {\n QueryClient\n};\n//# sourceMappingURL=queryClient.js.map","import { ApiClient } from '@shared/infrastructure/http/ApiClient';\n\nexport type Stats = {\n hasIngestedData: boolean;\n oldestProfileTime: number;\n newestProfileTime: number;\n};\n\nclass StatsApiClient extends ApiClient {\n async get(): Promise {\n const response = await this.fetch('/querier.v1.QuerierService/GetProfileStats', {\n method: 'POST',\n body: JSON.stringify({}),\n });\n\n const json = await response.json();\n\n return {\n hasIngestedData: json.dataIngested,\n oldestProfileTime: Number(json.oldestProfileTime),\n newestProfileTime: Number(json.newestProfileTime),\n };\n }\n}\n\nexport const statsApiClient = new StatsApiClient();\n","import { ApiClient } from '@shared/infrastructure/http/ApiClient';\nimport { DomainHookReturnValue } from '@shared/types/DomainHookReturnValue';\nimport { useState } from 'react';\n\nimport { useFetchTenantStats } from '../infrastructure/useFetchTenantStats';\n\nexport function useOnboarding(): DomainHookReturnValue {\n const [isModalClosed, setIsModalClosed] = useState(false);\n\n const pyroscopeDataSourcesCount = ApiClient.getPyroscopeDataSources().length;\n const { isFetching, error, stats } = useFetchTenantStats({ enabled: pyroscopeDataSourcesCount > 0 });\n const hasNoUserData = !isFetching && !stats?.hasIngestedData;\n\n return {\n data: {\n shouldShowLoadingPage: !error && isFetching,\n shouldShowOnboardingPage: (error || !pyroscopeDataSourcesCount || hasNoUserData) && !isModalClosed,\n shouldShowNoDataSourceBanner: !pyroscopeDataSourcesCount,\n },\n actions: {\n closeModal() {\n setIsModalClosed(true);\n },\n },\n };\n}\n","import { useQuery } from '@tanstack/react-query';\n\nimport { Stats, statsApiClient } from './statsApiClient';\n\ntype FetchResponse = {\n isFetching: boolean;\n error: Error | null;\n stats?: Stats;\n refetch: () => void;\n};\n\nexport function useFetchTenantStats({ enabled }: { enabled: boolean }): FetchResponse {\n const { isFetching, error, data, refetch } = useQuery({\n enabled,\n placeholderData: () => ({ hasIngestedData: true, oldestProfileTime: 0, newestProfileTime: 0 }),\n queryKey: ['tenant-stats'],\n queryFn: () => {\n statsApiClient.abort();\n\n return statsApiClient.get();\n },\n });\n\n return {\n isFetching,\n error: statsApiClient.isAbortError(error) ? null : error,\n stats: data,\n refetch,\n };\n}\n","import { PageLayoutType } from '@grafana/data';\nimport { PluginPage } from '@grafana/runtime';\nimport { Icon } from '@grafana/ui';\nimport { PageTitle } from '@shared/ui/PageTitle';\nimport React from 'react';\n\nexport function EmptyLoadingPage() {\n return (\n \n \n Loading... \n \n }\n />\n \n );\n}\n","import { css } from '@emotion/css';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Icon, useStyles2 } from '@grafana/ui';\nimport React from 'react';\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n link: css`\n color: ${theme.colors.text.link};\n &:hover {\n text-decoration: underline;\n }\n `,\n});\n\nexport function StyledLink({ href, children }: { href: string; children: React.ReactNode }) {\n const styles = useStyles2(getStyles);\n\n return (\n \n {children} {}\n \n );\n}\n","import { PageLayoutType } from '@grafana/data';\nimport { PluginPage } from '@grafana/runtime';\nimport { Alert } from '@grafana/ui';\nimport { PageTitle } from '@shared/ui/PageTitle';\nimport React from 'react';\n\nimport { StyledLink } from './StyledLink';\n\nexport function NoDataSourcePage() {\n return (\n \n \n\n \n This plugin requires a Pyroscope data source. Please{' '}\n add and configure a Pyroscope data source to your\n Grafana instance.\n \n \n );\n}\n","import { DomainHookReturnValue } from '@shared/types/DomainHookReturnValue';\nimport { useState } from 'react';\n\nimport { useFetchInstances } from '../infrastructure/useFetchInstances';\n\nexport function useOnboardingModal(): DomainHookReturnValue {\n const { instances } = useFetchInstances();\n\n const [settingsUrl, setSettingsUrl] = useState('https://grafana.com/auth/sign-in/');\n const isCloud = /grafana(-dev|-ops)?\\.net/.test(window.location.host);\n\n if (instances && instances.orgSlug && instances.hpInstanceId) {\n const newSettingsUrl = `https://grafana.com/orgs/${instances.orgSlug}/hosted-profiles/${instances.hpInstanceId}`;\n\n if (settingsUrl !== newSettingsUrl) {\n setSettingsUrl(newSettingsUrl);\n }\n }\n\n return {\n data: {\n settingsUrl,\n isCloud,\n },\n actions: {},\n };\n}\n","import { useQuery } from '@tanstack/react-query';\n\nexport function useFetchInstances() {\n const { isFetching, error, data } = useQuery({\n queryKey: ['instances'],\n queryFn: () =>\n fetch('/api/plugin-proxy/cloud-home-app/grafanacom-api/instances').then((response) => response.json()),\n });\n\n return {\n isFetching,\n error,\n instances: data,\n };\n}\n","import { css, cx } from '@emotion/css';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\nimport DecreaseLatency from '@img/decrease-latency.png';\nimport HeroImageExploreProfiles from '@img/hero-image-explore-profiles.png';\nimport HeroImage from '@img/hero-image.png';\nimport ReduceCosts from '@img/reduce-costs.png';\nimport ResolveIncidents from '@img/resolve-incidents.png';\nimport React from 'react';\n\nimport { useOnboardingModal } from '../domain/useOnboardingModal';\nimport { StyledLink } from './StyledLink';\n\n/** This was extracted from the former `styles.module.scss` */\n// TODO Use more spacial and color parameters from `theme`\nconst getStyles = (theme: GrafanaTheme2) => ({\n onboardingRow: css`\n background: ${theme.colors.background.secondary};\n display: flex;\n margin-top: 16px;\n gap: 20px;\n padding: 20px;\n margin-bottom: 2.5rem;\n `,\n onboardingParagraph: css`\n padding: 20px 64px;\n text-align: center;\n line-height: 2;\n flex: 1;\n margin: 0;\n `,\n onboardingPanel: css`\n flex: 1;\n display: flex;\n flex-flow: column wrap;\n -webkit-box-align: center;\n align-items: center;\n margin-top: 16px;\n text-align: center;\n `,\n onboardingPanelHeader: css`\n line-height: 1.5;\n margin-bottom: 1em;\n `,\n onboardingPanelImage: css`\n width: 5rem;\n margin-bottom: 1em;\n `,\n hero: css`\n display: flex;\n flex-direction: row;\n `,\n heroTitles: css`\n flex: 1;\n `,\n heroImage: css`\n width: 40%;\n margin-left: 16px;\n margin-top: 16px;\n margin-bottom: 16px;\n border-radius: 3px;\n `,\n onboardingPanelNumber: css`\n color: rgb(236, 109, 19);\n text-align: center;\n display: grid;\n place-items: center;\n background-image: linear-gradient(135deg, currentcolor, 75%, rgb(204, 204, 220));\n border-radius: 100%;\n font-size: 2.5rem;\n line-height: 5rem;\n height: 5rem;\n width: 5rem;\n margin-bottom: 1em;\n `,\n // TODO use theme.colors\n color2: css`\n color: rgb(190, 85, 190);\n `,\n // TODO use theme.colors\n color3: css`\n color: rgb(126, 108, 218);\n `,\n // FIXME use theme.colors\n onboardingPanelNumberSpan: css`\n color: rgb(220, 220, 220);\n `,\n onboardingPanelDescription: css`\n text-align: justify;\n text-align: center;\n line-height: 1.66;\n margin-top: 0;\n `,\n title: css`\n margin-bottom: 0.5em;\n line-height: 1.5;\n `,\n subtitle: css`\n margin-bottom: 1em;\n line-height: 1.5;\n font-size: 1.25rem;\n `,\n});\n\nexport function OnboardingModal() {\n const styles = useStyles2(getStyles);\n const { data } = useOnboardingModal();\n\n return (\n
\n
\n
\n

Welcome to {data.isCloud ? 'Grafana Cloud Profiles' : 'Explore Profiles'}

\n

\n Optimize infrastructure spend, simplify debugging, and enhance application performance\n

\n {/* */}\n
\n \n
\n\n
\n

What You Can Do

\n
\n
\n \n

Reduce Costs

\n

\n Spot CPU spikes, memory leaks, and other inefficiencies with code-level visibility into resource usage.\n Teams can then optimize their code and lower infrastructure costs.\n

\n
\n
\n \n

Decrease Latency

\n

\n Maintain high speed and efficiency and improve application performance. In a competitive digital world,\n decreasing latency translates to increasing revenue.\n

\n
\n
\n \n

Resolve Incidents Faster

\n

\n Cut down the mean time to resolution (MTTR) by correlating continuous profiling data with metrics, logs,\n and traces to quickly identify the root cause of any issue.\n

\n
\n
\n
\n\n
\n

How to Get Started

\n
\n {data.isCloud ? (\n <>\n
\n
\n 1\n
\n

Add Profiling to Your Application

\n

\n Use{' '}\n \n Grafana Alloy\n {' '}\n or{' '}\n \n Pyroscope SDKs\n {' '}\n to push profiles from your applications to Grafana Cloud.\n

\n
\n
\n
\n 2\n
\n

Configure Your Applications

\n

\n Go to Grafana Cloud Stack settings to find your\n Grafana Cloud Credentials.\n

\n
\n
\n
\n 3\n
\n

Start Getting Performance Insights

\n

\n Once you're done with initial setup, refresh this page to see your profiling data.\n

\n
\n \n ) : (\n <>\n
\n
\n 1\n
\n

Set Up Your Pyroscope Server

\n

\n Install Pyroscope Server on\n your infrastructure. Or if you want to use a hosted service, go to{' '}\n Grafana Cloud Stack settings to find your Grafana\n Cloud Credentials.\n

\n
\n
\n
\n 2\n
\n

Configure Grafana

\n

\n Add a new Pyroscope datasource. Use your\n Pyroscope server URL and appropriate security credentials if you use Grafana Cloud Profiles.\n

\n
\n
\n
\n 3\n
\n

Add Profiling to Your Application

\n

\n Use{' '}\n \n Grafana Alloy\n {' '}\n or{' '}\n \n Pyroscope SDKs\n {' '}\n to push profiles from your applications to Grafana Cloud.\n

\n
\n \n )}\n
\n
\n\n {data.isCloud && (\n
\n

How Billing Works

\n
\n

\n Usage of Grafana Cloud Profiles is subject to{' '}\n Grafana Cloud Pricing for Profiles.\n

\n For additional information, read the announcement \n \n blog post\n \n .\n

\n
\n
\n )}\n
\n );\n}\n","import { css } from '@emotion/css';\nimport { GrafanaTheme2, PageLayoutType } from '@grafana/data';\nimport { PluginPage } from '@grafana/runtime';\nimport { useStyles2 } from '@grafana/ui';\nimport React from 'react';\n\nimport { OnboardingModal } from './OnboardingModal';\n\ntype OnboardingPageProps = {\n onCloseModal: () => void;\n};\n\n/** This was extracted from the former `styles.module.scss` */\n// TODO Use more spacial and color parameters from `theme`\nconst getStyles = (theme: GrafanaTheme2) => ({\n onboardingPage: css`\n padding: 16px;\n margin: 64px;\n position: relative;\n background-color: ${theme.colors.background.primary};\n `,\n closeButton: css`\n position: absolute;\n top: -30px;\n opacity: 0.8;\n right: -32px;\n border: none;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n line-height: 40px;\n display: block;\n padding: 0;\n margin: 0;\n font-size: 22px;\n `,\n});\n\nconst pageNav = { text: 'Onboarding' };\n\nexport function OnboardingPage({ onCloseModal }: OnboardingPageProps) {\n const styles = useStyles2(getStyles);\n\n return (\n // The use of `PluginPage` is to set a clear \"Onboarding\" breadcrumb\n // Using `Custom` ensures that it takes up the whole page (and doesn't conflict with the other `PluginPage`)\n \n
\n \n ×\n \n \n
\n
\n );\n}\n","import React from 'react';\n\nimport { useOnboarding } from './domain/useOnboarding';\nimport { EmptyLoadingPage } from './ui/EmptyLoadingPage';\nimport { NoDataSourcePage } from './ui/NoDataSourcePage';\nimport { OnboardingPage } from './ui/OnboardingPage';\n\ntype OnboardingProps = {\n children: React.ReactNode;\n};\n\n/**\n * Displays an onboarding dialog instructing how to push data only when data is not present\n */\nexport function Onboarding({ children }: OnboardingProps) {\n const { data, actions } = useOnboarding();\n\n if (data.shouldShowLoadingPage) {\n return ;\n }\n\n if (data.shouldShowOnboardingPage) {\n return ;\n }\n\n if (data.shouldShowNoDataSourceBanner) {\n return ;\n }\n\n return <>{children};\n}\n","import React from 'react';\nimport { Routes as ReactRouterRoutes, Route } from 'react-router-dom';\n\nimport { ROUTES } from '../constants';\n\nconst ProfilesExplorerView = React.lazy(() => import('../pages/ProfilesExplorerView/ProfilesExplorerView'));\nconst AdHocView = React.lazy(() => import('../pages/AdHocView/AdHocView'));\nconst SettingsView = React.lazy(() => import('../pages/SettingsView/SettingsView'));\n\nexport function Routes() {\n return (\n \n } />\n } />\n } />\n {/* Default Route */}\n } />\n \n );\n}\n","import { PageLayoutType } from '@grafana/data';\nimport { PluginPage } from '@grafana/runtime';\nimport { InlineBanner } from '@shared/ui/InlineBanner';\nimport { PageTitle } from '@shared/ui/PageTitle';\nimport React from 'react';\n\nexport function ErrorPage({ error }: { error: Error }) {\n return (\n \n
\n \n\n \n
\n
\n );\n}\n","import { css } from '@emotion/css';\nimport { GrafanaTheme2, PageLayoutType } from '@grafana/data';\nimport { PluginPage } from '@grafana/runtime';\nimport { ErrorBoundary, useStyles2 } from '@grafana/ui';\nimport { queryClient } from '@shared/infrastructure/react-query/queryClient';\nimport { initFaro } from '@shared/infrastructure/tracking/faro/faro';\nimport { QueryClientProvider } from '@tanstack/react-query';\nimport React, { useState } from 'react';\n\nimport { Onboarding } from './components/Onboarding/Onboarding';\nimport { Routes } from './Routes';\nimport { ErrorPage } from './ui/ErrorPage';\n\ninitFaro();\n\nexport function App() {\n const styles = useStyles2(getStyles);\n const [error, setError] = useState();\n\n if (error) {\n return ;\n }\n\n return (\n \n {() => (\n \n \n
\n \n
\n \n
\n
\n
\n
\n
\n )}\n
\n );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n pageContainer: css`\n display: flex;\n flex-direction: column;\n padding: ${theme.spacing(1)} ${theme.spacing(2)} ${theme.spacing(2)} ${theme.spacing(2)};\n flex-basis: 100%;\n flex-grow: 1;\n `,\n});\n","import { PluginExtensionAddedLinkConfig, PluginExtensionPoints, RawTimeRange } from '@grafana/data';\nimport { DataQuery } from '@grafana/schema';\nimport { GrafanaPyroscopeDataQuery } from '@grafana/schema/dist/esm/raw/composable/grafanapyroscope/dataquery/x/GrafanaPyroscopeDataQuery_types.gen';\n\nexport type PluginExtensionExploreContext = {\n targets: DataQuery[];\n timeRange: RawTimeRange;\n};\n\ntype URLParamsBuilderProps = {\n pyroscopeQuery: GrafanaPyroscopeDataQuery;\n timeRange?: RawTimeRange;\n};\n\nfunction buildURL(props: URLParamsBuilderProps) {\n const { timeRange, pyroscopeQuery } = props;\n\n let timeRangeParam = '';\n let explorationType = 'all';\n\n let serviceName = props.pyroscopeQuery.labelSelector?.match(/service_name=\"([^\"]+)\"/)?.[1];\n\n if (serviceName) {\n explorationType = 'labels';\n }\n\n const datasourceParam = `var-dataSource=${pyroscopeQuery.datasource?.uid}`;\n const serviceNameParam = serviceName ? `&var-serviceName=${serviceName}` : '';\n const profileTypeParam = `&var-profileMetricId=${pyroscopeQuery.profileTypeId}`;\n const explorationTypeParam = `&explorationType=${explorationType}`;\n if (timeRange) {\n timeRangeParam = `&from=${timeRange.from}&to=${timeRange.to}`;\n }\n\n const base = '/a/grafana-pyroscope-app/profiles-explorer?';\n const params = new URLSearchParams(\n `${datasourceParam}${serviceNameParam}${profileTypeParam}${timeRangeParam}${explorationTypeParam}`\n ).toString();\n return `${base}${params}`;\n}\n\nexport const EXPLORE_TOOLBAR_ACTION: PluginExtensionAddedLinkConfig = {\n targets: [PluginExtensionPoints.ExploreToolbarAction],\n title: 'Open in Explore Profiles',\n icon: 'fire',\n description: 'Try our new queryless experience for profiles',\n path: '/a/grafana-pyroscope-app/profiles-explorer',\n configure(context: PluginExtensionExploreContext | undefined) {\n if (!context || !context.targets || !context.timeRange || context.targets.length > 1) {\n return undefined;\n }\n\n const firstQuery = context.targets[0];\n\n if (firstQuery.datasource && firstQuery.datasource.type === 'grafana-pyroscope-datasource') {\n return {\n path: buildURL({\n pyroscopeQuery: firstQuery as GrafanaPyroscopeDataQuery,\n timeRange: context.timeRange,\n }),\n };\n }\n return undefined;\n },\n};\n","import { AppPlugin } from '@grafana/data';\nimport { AppPluginSettings } from '@shared/types/AppPluginSettings';\n\nimport { App } from './app/App';\nimport { EXPLORE_TOOLBAR_ACTION, PluginExtensionExploreContext } from './links';\n\nexport const plugin = new AppPlugin()\n .addLink(EXPLORE_TOOLBAR_ACTION)\n .setRootPage(App);\n"],"names":["inProgress","dataWebpackPrefix","LogLevel","defaultLogLevel","LOG","allLogLevels","TRACE","DEBUG","INFO","WARN","ERROR","getOwnPropertySymbols","Object","hasOwnProperty","prototype","propIsEnumerable","propertyIsEnumerable","module","exports","assign","test1","String","getOwnPropertyNames","test2","i","fromCharCode","map","n","join","test3","split","forEach","letter","keys","err","shouldUseNative","target","source","from","symbols","to","val","TypeError","toObject","s","arguments","length","key","call","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","Error","name","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","hasElementType","Element","hasMap","Map","hasSet","Set","hasArrayBuffer","ArrayBuffer","isView","equal","a","b","constructor","it","Array","isArray","size","entries","next","done","has","value","get","RegExp","flags","valueOf","toString","$$typeof","error","message","match","console","warn","ex","React","React__default","_defineProperty","obj","defineProperty","enumerable","configurable","writable","canUseDOM","window","document","createElement","reducePropsToState","handleStateChangeOnClient","mapStateOnServer","WrappedComponent","state","mountedInstances","emitChange","instance","SideEffect","_PureComponent","subClass","superClass","apply","this","create","__proto__","peek","rewind","recordedState","undefined","_proto","UNSAFE_componentWillMount","push","componentDidUpdate","componentWillUnmount","index","indexOf","splice","render","PureComponent","displayName","getDisplayName","f","k","Symbol","for","l","m","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","ref","__self","__source","q","c","g","d","e","h","defaultProps","type","_owner","current","Fragment","jsx","jsxs","PYROSCOPE_APP_ID","plugin","PLUGIN_BASE_URL","ROUTES","noOp","ApiClient","HttpClient","getPyroscopeDataSources","values","config","datasources","filter","ds","selectDefaultDataSource","userStorage","pyroscopeDataSources","uidFromUrl","URL","href","searchParams","uidFromLocalStorage","KEYS","PROFILES_EXPLORER","dataSource","defaultDataSource","find","uid","jsonData","overridesDefault","isDefault","logger","getBaseUrl","pyroscopeDataSource","appSubUrl","at","super","bootData","user","orgId","HttpClientError","response","responseJson","status","statusText","reason","fetch","pathname","options","abortController","AbortController","signal","fullUrl","baseUrl","headers","defaultHeaders","fullOptions","ok","json","catch","isAbortError","abort","DOMException","freeze","TransportItemType","transportItemTypeToBodyKey","EXCEPTION","MEASUREMENT","EVENT","dateNow","Date","now","getCurrentTimestamp","toISOString","timestampToIsoString","isTypeof","isToString","isInstanceOf","reference","isNull","isString","isNumber","isNaN","isObject","isFunction","isEventDefined","Event","isEvent","isErrorDefined","isError","isErrorEvent","isDomError","isDomException","deepEqual","aIsArray","bIsArray","idx","aIsObject","bIsObject","aKeys","bKeys","aKey","includes","defaultExceptionType","stacktraceParser","defaultLogArgsSerializer","args","arg","initializeAPI","unpatchedConsole","internalLogger","metas","transports","debug","tracesApi","_unpatchedConsole","_config","otel","getOTEL","getTraceContext","ctx","trace","getSpanContext","context","active","trace_id","traceId","span_id","spanId","initOTEL","isOTELInitialized","pushTraces","payload","item","meta","execute","initializeTracesAPI","_a","lastPayload","parseStacktrace","changeStacktraceParser","newStacktraceParser","getStacktraceParser","pushError","skipDedupe","stackFrames","spanContext","timestampOverwriteMs","timestamp","stack","frames","stacktrace","testingPayload","stackTrace","dedupe","initializeExceptionsAPI","_transports","metaSession","metaUser","metaView","setUser","remove","add","setSession","session","resetUser","resetSession","getSession","setView","view","previousView","getView","initializeMetaAPI","logArgsSerializer","pushLog","level","initializeLogsAPI","pushMeasurement","initializeMeasurementsAPI","pushEvent","attributes","domain","eventDomain","initializeEventsAPI","noop","InternalLoggerLevel","defaultInternalLogger","info","prefix","defaultInternalLoggerLevel","defaultUnpatchedConsole","createInternalLogger","internalLoggerLevel","OFF","VERBOSE","initializeInternalLogger","globalThis","self","VERSION","faro","registerFaro","api","instrumentations","pause","unpause","isolate","setInternalFaroOnGlobalObject","preventGlobalExposure","globalObjectKey","setFaroOnGlobalObject","BatchExecutor","sendFn","_b","signalBuffer","itemLimit","sendTimeout","paused","flushInterval","start","addEventListener","visibilityState","flush","addItem","setInterval","clearInterval","groupItems","items","itemMap","metaKey","JSON","stringify","currentItems","set","createBeforeSendHookFromIgnorePatterns","patterns","evt","msg","some","pattern","shouldIgnoreEvent","initializeTransports","beforeSendHooks","applyBeforeSendHooks","filteredItems","hook","modified","Boolean","batchedSend","transport","isBatched","send","batchExecutor","batching","enabled","newTransports","newTransport","existingTransport","addBeforeSendHooks","newBeforeSendHooks","beforeSendHook","addIgnoreErrorsPatterns","ignoreErrorsPatterns","ignoreErrorsPattern","getBeforeSendHooks","every","filteredItem","instantSend","isPaused","transportsToRemove","transportToRemove","existingTransportIndex","removeBeforeSendHooks","beforeSendHooksToRemove","initializeUnpatchedConsole","initializeFaro","listeners","getValue","reduce","acc","notifyListeners","listener","newItems","itemsToRemove","currentItem","addListener","removeListener","currentListener","initializeMetas","newInstrumentations","newInstrumentation","existingInstrumentation","initialize","instrumentationsToRemove","instrumentationToRemove","existingInstrumentationIndex","destroy","initializeInstrumentations","initial","sdk","version","app","bundleId","appName","sessionTracking","registerInitialMetas","beforeSend","ignoreErrors","registerInitialTransports","registerInitialInstrumentations","defaultGlobalObjectKey","defaultBatchingConfig","defaultEventDomain","newLineString","evalString","unknownSymbolString","atString","webkitLineRegex","webkitEvalRegex","webkitEvalString","webkitAddressAtString","webkitAddressAtStringLength","firefoxLineRegex","firefoxEvalRegex","firefoxEvalString","safariExtensionString","safariWebExtensionString","reactMinifiedRegex","buildStackFrame","filename","lineno","colno","stackFrame","function","getDataFromSafariExtensions","isSafariExtension","isSafariWebExtension","getStackFramesFromError","lines","_line","line","parts","exec","startsWith","submatch","substring","columnNumber","Number","test","slice","STORAGE_KEY","SESSION_EXPIRATION_TIME","SESSION_INACTIVITY_TIME","defaultSessionTrackingConfig","persistent","maxSessionPersistenceTime","unknownString","defaultMetas","parser","UAParser","getBrowser","osName","osVersion","getOS","userAgent","getUA","language","navigator","mobile","brands","userAgentData","getBrands","browser","os","viewportWidth","innerWidth","viewportHeight","innerHeight","page","url","k6Meta","k6Properties","k6","isK6Browser","testRunId","BaseExtension","logDebug","logInfo","logWarn","logError","BaseTransport","getIgnoreUrls","mergeResourceSpans","traces","resourceSpans","currentResource","currentSpans","scopeSpans","newSpans","throttle","callback","delay","lastPending","timeoutBehavior","setTimeout","webStorageType","local","isWebStorageAvailable","storage","testItem","setItem","removeItem","getItem","webStorageMechanism","isWebStorageTypeAvailable","isLocalStorageAvailable","isSessionStorageAvailable","isSampled","_c","samplingRate","sampler","Math","random","alphabet","genShortID","floor","createUserSessionObject","sessionId","started","lastActivity","generateSessionId","isUserSessionValid","getUserSessionUpdater","fetchUserSession","storeUserSession","forceSessionExtend","sessionTrackingConfig","isPersistentSessions","sessionFromStorage","newSession","addSessionMetadataToNextSession","sessionMeta","onSessionChange","previousSession","_d","id","PersistentSessionsManager","updateSession","updateUserSession","init","removeUserSession","storageTypeLocal","storedSession","parse","sessionFromLocalStorage","userSession","VolatileSessionsManager","storageTypeSession","sessionFromSessionStorage","getSessionManagerByConfig","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","rejected","result","then","__rest","t","FetchTransport","disabledUntil","rateLimitBackoffMs","defaultRateLimitBackoffMs","getNow","promiseBuffer","concurrency","buffer","work","producer","shift","promiseProducer","createPromiseBuffer","bufferSize","body","bk","signals","getTransportBody","requestOptions","apiKey","restOfRequestOptions","method","keepalive","extendFaroSession","getRetryAfterDate","text","concat","ignoreUrls","retryAfterHeader","date","SessionExpiredString","BaseInstrumentation","domErrorType","domExceptionType","objectEventValue","valueTypeRegex","getErrorDetails","isDomErrorRes","isEventRes","registerOnerror","oldOnerror","onerror","eventIsString","initialStackFrame","groups","getValueAndTypeFromMessage","registerOnunhandledrejection","detail","isPrimitive","ErrorsInstrumentation","r","o","persisted","timeStamp","performance","getEntriesByType","responseStart","u","activationStart","prerendering","wasDiscarded","replace","rating","delta","navigationType","PerformanceObserver","supportedEntryTypes","getEntries","observe","buffered","requestAnimationFrame","v","T","y","removeEventListener","E","firstHiddenTime","C","S","disconnect","startTime","max","reportAllChanges","L","A","I","M","interactionId","min","durationThreshold","F","D","x","R","interactionCount","B","H","entryType","duration","latency","sort","delete","requestIdleCallback","O","j","_","G","J","readyState","Q","passive","capture","U","V","Y","W","cancelable","processingStart","X","Z","WebVitalsBasic","mapping","indicator","executor","metric","cls","hadRecentInput","takeRecords","fcp","fid","inp","PerformanceEventTiming","clear","lcp","ttfb","domInteractive","domContentLoadedEventStart","domComplete","nodeName","nodeType","toLowerCase","toUpperCase","classList","trim","parentNode","WeakMap","et","processingEnd","abs","renderTime","tt","rt","ot","ct","ut","ft","dt","lt","vt","mt","pt","gt","Tt","ht","eventTarget","eventType","eventTime","eventEntry","loadState","attribution","NAVIGATION_ID_STORAGE_KEY","loadStateKey","timeToFirstByteKey","WebVitalsWithAttribution","corePushMeasurement","measureCLS","measureFCP","measureFID","measureINP","measureLCP","measureTTFB","sources","largestShiftTarget","largestShiftTime","largestShiftValue","largestShiftSource","largestShiftEntry","buildInitialValues","addIfPresent","buildInitialContext","timeToFirstByte","firstByteToFCP","navigationEntry","fcpEntry","interactionTarget","interactionTargetElement","interactionType","interactionTime","nextPaintTime","processedEventEntries","longAnimationFrameEntries","inputDelay","processingDuration","presentationDelay","resourceLoadDelay","resourceLoadDuration","elementRenderDelay","requestStart","responseEnd","lcpEntry","lcpResourceEntry","waitingDuration","cacheDuration","dnsDuration","connectionDuration","requestDuration","workerStart","fetchStart","domainLookupStart","connectStart","connectEnd","navigationEntryId","navigation_type","navigation_entry_id","WebVitalsInstrumentation","intializeWebVitalsInstrumentation","trackWebVitalsAttribution","EVENT_SESSION_START","EVENT_SESSION_RESUME","SessionInstrumentation","sendSessionStartEvent","notifiedSession","createInitialSession","SessionManager","sessionsConfig","_e","lifecycleType","initialSession","createSession","registerBeforeSendHook","newItem","newAttributes","initialSessionMeta","bind","ViewInstrumentation","sendViewChangedEvent","notifiedView","fromView","toView","w3cTraceparentFormat","getSpanContextFromServerTiming","serverTimings","serverEntry","description","entryUrlIsIgnored","ignoredUrls","entryName","includePerformanceEntry","performanceEntryJSON","allowProps","allowPropKey","allowPropValue","perfEntryPropVal","createFaroResourceTiming","resourceEntryRaw","decodedBodySize","domainLookupEnd","encodedBodySize","initiatorType","nextHopProtocol","redirectEnd","redirectStart","renderBlockingStatus","rbs","responseStatus","secureConnectionStart","transferSize","toFaroPerformanceTimingString","tcpHandshakeTime","dnsLookupTime","tlsNegotiationTime","redirectTime","requestTime","responseTime","fetchTime","serviceWorkerTime","cacheHitStatus","cacheType","getCacheType","protocol","createFaroNavigationTiming","navigationEntryRaw","domContentLoadedEventEnd","loadEventEnd","loadEventStart","parserStart","timing","domLoading","timeOrigin","getDocumentParsingTime","pageLoadTime","documentParsingTime","domProcessingTime","domContentLoadHandlerTime","onLoadTime","round","DEFAULT_TRACK_RESOURCES","PerformanceInstrumentation","handleReady","readyStateCompleteHandler","onDocumentReady","faroNavigationId","faroNavigationEntryResolve","faroNavigationEntryPromise","observedEntries","navEntryJson","toJSON","serverTiming","faroPreviousNavigationId","faroNavigationEntry","getNavigationTimings","trackResources","resourceEntryJson","faroResourceEntry","faroResourceId","observeResourceTimings","flatMap","ConsoleInstrumentation","disabledLevels","defaultDisabledLevels","getWebInstrumentations","enablePerformanceInstrumentation","unshift","captureConsole","captureConsoleDisabledLevels","coreConfig","browserConfig","_f","_g","_h","_j","initialMetas","createMetas","makeCoreConfig","FARO_ENVIRONMENTS","environment","faroUrl","getFaro","setFaro","initFaro","faroEnvironment","getEnvironment","getFaroEnvironment","apps","buildInfo","appRelease","userEmail","email","grafanaVersion","edition","release","GIT_COMMIT","namespace","event","URLSearchParams","MATCHERS","regExp","host","found","methodName","log","itemName","localStorage","SETTINGS","GITHUB_INTEGRATION","InlineBanner","severity","title","errorContext","Alert","br","getStyles","theme","row","css","display","flexDirection","justifyContent","alignItems","headerColumn","minWidth","column","tooltip","color","colors","secondary","fontSize","typography","bodySmall","contentWithIcon","styleMixins","mediaUp","v1","breakpoints","sm","formatSize","formattedValueToString","getValueFormat","formatCount","count","QueryAnalysisTooltip","styles","useStyles2","data","totalBytesInTimeRange","queryImpact","queryAnalysisTooltip","useMemo","div","data-testid","className","totalQueriedSeries","deduplicationNeeded","Divider","queryScopes","strong","componentType","componentCount","blockCount","seriesCount","profileCount","sampleCount","indexBytes","profileBytes","symbolBytes","Toggletip","content","fitContent","span","IconButton","aria-label","clock","Component","_class","_temp","ATTRIBUTE_NAMES","TAG_NAMES","BASE","BODY","HEAD","HTML","LINK","META","NOSCRIPT","SCRIPT","STYLE","TITLE","TAG_PROPERTIES","REACT_TAG_MAP","accesskey","charset","class","contenteditable","contextmenu","itemprop","tabindex","HELMET_PROPS","HTML_TAG_MAP","SELF_CLOSING_TAGS","HELMET_ATTRIBUTE","_typeof","iterator","createClass","defineProperties","descriptor","Constructor","protoProps","staticProps","_extends","objectWithoutProperties","encodeSpecialCharacters","str","getTitleFromPropsList","propsList","innermostTitle","getInnermostProperty","innermostTemplate","innermostDefaultTitle","getOnChangeClientState","getAttributesFromPropsList","tagType","tagAttrs","getBaseTagFromPropsList","primaryAttributes","reverse","innermostBaseTag","tag","lowerCaseAttributeKey","getTagsFromPropsList","tagName","approvedSeenTags","approvedTags","instanceTags","instanceSeenTags","primaryAttributeKey","attributeKey","tagUnion","property","rafPolyfill","currentTime","cafPolyfill","clearTimeout","webkitRequestAnimationFrame","mozRequestAnimationFrame","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","_helmetCallback","commitTagChanges","newState","cb","baseTag","bodyAttributes","htmlAttributes","linkTags","metaTags","noscriptTags","onChangeClientState","scriptTags","styleTags","titleAttributes","updateAttributes","updateTitle","tagUpdates","updateTags","addedTags","removedTags","_tagUpdates$tagType","newTags","oldTags","flattenArray","possibleArray","elementTag","getElementsByTagName","helmetAttributeString","getAttribute","helmetAttributes","attributesToRemove","attributeKeys","attribute","setAttribute","indexToSave","_i","removeAttribute","tags","headElement","head","querySelector","tagNodes","querySelectorAll","indexToDelete","newElement","innerHTML","styleSheet","cssText","appendChild","createTextNode","existingTag","isEqualNode","removeChild","generateElementAttributesAsString","attr","convertElementAttributestoReactProps","initProps","getMethodsForTag","encode","toComponent","_initProps","attributeString","flattenedTitle","generateTitleAsString","_mappedTag","mappedTag","mappedAttribute","dangerouslySetInnerHTML","__html","generateTagsAsReactComponent","attributeHtml","tagContent","isSelfClosing","generateTagsAsString","_ref","_ref$title","base","link","noscript","script","style","HelmetSideEffects","defer","HelmetExport","_React$Component","HelmetWrapper","classCallCheck","ReferenceError","possibleConstructorReturn","setPrototypeOf","inherits","shouldComponentUpdate","nextProps","mapNestedChildrenToProps","child","nestedChildren","flattenArrayTypeChildren","_babelHelpers$extends","arrayTypeChildren","newChildProps","mapObjectTypeChildren","_ref2","_babelHelpers$extends2","_babelHelpers$extends3","newProps","mapArrayTypeChildrenToProps","newFlattenedProps","arrayChildName","_babelHelpers$extends4","warnOnInvalidChildren","mapChildrenToProps","children","_this2","_child$props","initAttributes","convertReactPropstoHtmlAttributes","_props","propTypes","defaultTitle","titleTemplate","mappedState","renderStatic","PageTitleComponent","queryAnalysis","fullTitle","Helmet","titleContainer","Stack","PyroscopeLogo","h1","infoArea","PluginInfo","spacing","h2","PageTitle","memo","pluginCommitSha","pluginCommitURL","grafanaBuildInfo","InfoMenuHeader","updated","usePluginContext","menuHeader","h5","subTitle","InfoMenu","isDev","shortCommitSha","Menu","header","Item","label","icon","onClick","open","disabled","env","commit","Dropdown","overlay","placement","PyroscopeLogoComponent","img","cx","logo","src","FUNC_TYPE","UNDEF_TYPE","OBJ_TYPE","STR_TYPE","MAJOR","MODEL","NAME","TYPE","VENDOR","ARCHITECTURE","CONSOLE","MOBILE","TABLET","SMARTTV","WEARABLE","EMBEDDED","AMAZON","APPLE","ASUS","BLACKBERRY","BROWSER","CHROME","FIREFOX","GOOGLE","HUAWEI","LG","MICROSOFT","MOTOROLA","OPERA","SAMSUNG","SHARP","SONY","XIAOMI","ZEBRA","FACEBOOK","CHROMIUM_OS","MAC_OS","enumerize","arr","enums","str1","str2","lowerize","len","rgxMapper","ua","arrays","matches","regex","strMapper","windowsVersionMap","regexes","cpu","device","engine","EDGE","extensions","getResult","_navigator","_ua","_uach","_rgxmap","mergedRegexes","extend","_isSelfNav","_browser","brave","isBrave","getCPU","_cpu","getDevice","_device","standalone","maxTouchPoints","getEngine","_engine","_os","platform","setUA","CPU","DEVICE","ENGINE","OS","$","jQuery","Zepto","prop","__WEBPACK_EXTERNAL_MODULE__6089__","__WEBPACK_EXTERNAL_MODULE__7781__","__WEBPACK_EXTERNAL_MODULE__8531__","__WEBPACK_EXTERNAL_MODULE__2007__","__WEBPACK_EXTERNAL_MODULE__4201__","__WEBPACK_EXTERNAL_MODULE__3241__","__WEBPACK_EXTERNAL_MODULE__1308__","__WEBPACK_EXTERNAL_MODULE__5959__","__WEBPACK_EXTERNAL_MODULE__8398__","__WEBPACK_EXTERNAL_MODULE__1159__","__WEBPACK_EXTERNAL_MODULE__1269__","focusManager","onFocus","onSubscribe","setEventListener","onUnsubscribe","hasListeners","setup","focused","setFocused","isFocused","Mutation","mutationId","mutationCache","failureCount","failureReason","variables","submittedAt","setOptions","scheduleGc","updateGcTime","gcTime","addObserver","observer","clearGcTimeout","notify","mutation","removeObserver","optionalRemove","continue","fn","mutationFn","onFail","onPause","onContinue","retry","retryDelay","networkMode","canRun","restored","canStart","onMutate","onSuccess","onSettled","onError","runNext","action","reducer","batch","onMutationUpdate","getDefaultState","notifyManager","queue","transactions","notifyFn","batchNotifyFn","scheduleFn","schedule","originalQueue","batchCalls","setNotifyFunction","setBatchNotifyFunction","setScheduler","createNotifyManager","onlineManager","onOnline","onlineListener","offlineListener","setOnline","online","isOnline","Query","defaultOptions","observers","cache","queryKey","queryHash","initialData","hasData","initialDataUpdatedAt","dataUpdateCount","dataUpdatedAt","errorUpdateCount","errorUpdatedAt","fetchFailureCount","fetchFailureReason","fetchMeta","isInvalidated","fetchStatus","promise","setData","newData","updatedAt","manual","setState","setStateOptions","cancel","silent","reset","isActive","isDisabled","getObserversCount","isStale","getCurrentResult","isStaleByTime","staleTime","shouldFetchOnWindowFocus","refetch","cancelRefetch","shouldFetchOnReconnect","query","revert","cancelRetry","invalidate","fetchOptions","continueRetry","queryFn","addSignalProperty","fetchFn","queryFnContext","persister","behavior","onFetch","isFetchingOptimistic","initialPromise","fetchState","onQueryUpdate","Removable","newGcTime","Infinity","defaultRetryDelay","canFetch","CancelledError","isCancelledError","createRetryer","continueFn","promiseResolve","promiseReject","isRetryCancelled","isResolved","outerResolve","outerReject","canContinue","continueResolve","run","promiseOrValue","shouldRetry","cancelOptions","Subscribable","subscribe","isServer","functionalUpdate","updater","input","isValidTimeout","timeUntilStale","resolveStaleTime","resolveEnabled","matchQuery","filters","predicate","stale","hashQueryKeyByOptions","partialMatchKey","matchMutation","mutationKey","hashKey","queryKeyHashFn","isPlainObject","replaceEqualDeep","isPlainArray","aItems","aSize","bItems","bSize","copy","equalItems","shallowEqualObjects","hasObjectPrototype","ctor","prot","getPrototypeOf","sleep","ms","replaceData","prevData","structuralSharing","addToEnd","addToStart","skipToken","ensureQueryFn","QueryClientContext","useQueryClient","queryClient","client","QueryClientProvider","mount","unmount","Provider","QueryObserver","bindMethods","shouldFetchOnMount","updateResult","shouldFetchOn","refetchOnReconnect","refetchOnWindowFocus","notifyOptions","prevOptions","prevQuery","defaultQueryOptions","_defaulted","getQueryCache","mounted","shouldFetchOptionally","nextRefetchInterval","getOptimisticResult","build","createResult","optimisticResult","shouldAssignObserverCurrentProperties","trackResult","onPropTracked","trackedResult","trackProp","getCurrentQuery","fetchOptimistic","defaultedOptions","throwOnError","timeout","refetchInterval","nextInterval","refetchIntervalInBackground","prevResult","prevResultState","prevResultOptions","queryInitialState","isPlaceholderData","_optimisticResults","fetchOnMount","fetchOptionally","select","selectError","placeholderData","isFetching","isPending","isLoading","isSuccess","isInitialLoading","isFetched","isFetchedAfterMount","isRefetching","isLoadingError","isRefetchError","nextResult","defaultNotifyOptions","notifyOnChangeProps","notifyOnChangePropsValue","includedProps","typedKey","shouldNotifyListeners","retryOnMount","shouldLoadOnMount","refetchOnMount","field","suspense","createValue","isReset","clearReset","QueryErrorResetBoundaryContext","useQueryErrorResetBoundary","IsRestoringContext","useIsRestoring","ensurePreventErrorBoundaryRetry","errorResetBoundary","useClearResetErrorBoundary","getHasError","ensureStaleTime","shouldSuspend","useQuery","Observer","isRestoring","getDefaultOptions","queries","_experimental_beforeQuery","onStoreChange","unsubscribe","_experimental_afterQuery","useBaseQuery","shouldThrowError","throwError","params","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","amdO","getter","__esModule","definition","chunkId","all","promises","Function","needAttach","scripts","nc","origin","crossOrigin","integrity","sriHashes","onScriptComplete","prev","onload","doneFns","toStringTag","nmd","paths","installedChunks","installedChunkData","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","chunkLoadingGlobal","lastIndexOf","QueryCache","getQueryDefaults","queryInMap","getAll","defaultedFilters","findAll","MutationCache","defaultMutationOptions","scope","scopeFor","mutations","firstPendingMutation","foundMutation","flat","resumePausedMutations","pausedMutations","infiniteQueryBehavior","pages","async","direction","fetchMore","oldPages","oldPageParams","pageParams","empty","cancelled","fetchPage","param","previous","pageParam","aborted","maxPages","addTo","oldData","getPreviousPageParam","getNextPageParam","initialPageParam","remainingPages","lastIndex","queryCache","isMutating","getQueryData","ensureQueryData","cachedData","fetchQuery","revalidateIfStale","prefetchQuery","getQueriesData","setQueryData","setQueriesData","getQueryState","removeQueries","resetQueries","refetchFilters","refetchQueries","cancelQueries","defaultedCancelOptions","invalidateQueries","refetchType","fetchInfiniteQuery","prefetchInfiniteQuery","getMutationCache","setDefaultOptions","setQueryDefaults","defaults","queryDefault","setMutationDefaults","getMutationDefaults","StatsApiClient","hasIngestedData","dataIngested","oldestProfileTime","newestProfileTime","statsApiClient","useOnboarding","isModalClosed","setIsModalClosed","useState","pyroscopeDataSourcesCount","stats","useFetchTenantStats","hasNoUserData","shouldShowLoadingPage","shouldShowOnboardingPage","shouldShowNoDataSourceBanner","actions","closeModal","EmptyLoadingPage","PluginPage","layout","PageLayoutType","Canvas","Icon","StyledLink","rel","NoDataSourcePage","useOnboardingModal","instances","useFetchInstances","settingsUrl","setSettingsUrl","isCloud","orgSlug","hpInstanceId","newSettingsUrl","onboardingRow","background","onboardingParagraph","onboardingPanel","onboardingPanelHeader","onboardingPanelImage","hero","heroTitles","heroImage","onboardingPanelNumber","color2","color3","onboardingPanelNumberSpan","onboardingPanelDescription","subtitle","OnboardingModal","HeroImage","HeroImageExploreProfiles","h3","ReduceCosts","DecreaseLatency","ResolveIncidents","onboardingPage","primary","closeButton","pageNav","OnboardingPage","onCloseModal","Custom","button","Onboarding","ProfilesExplorerView","AdHocView","SettingsView","Routes","ReactRouterRoutes","Route","path","EXPLORE","ADHOC","ErrorPage","handheldBy","pageContainer","buildURL","pyroscopeQuery","timeRange","timeRangeParam","explorationType","serviceName","labelSelector","datasourceParam","datasource","serviceNameParam","profileTypeParam","profileTypeId","explorationTypeParam","EXPLORE_TOOLBAR_ACTION","targets","PluginExtensionPoints","ExploreToolbarAction","configure","firstQuery","AppPlugin","addLink","setRootPage","setError","ErrorBoundary"],"sourceRoot":""}