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OAAO,OAAQI,OAAOH,EAAgBI,OAC7CP,EAAOE,OAAO,KAAMI,OAAOH,EAAgBK,KAE3C,MAAMC,EAAed,EAAQF,MAAMG,GAA0B,WAAfA,EAAOE,MAerD,OAdIW,GACFT,EAAOE,OAAO,OAAOrL,EAAAA,KAAqC,UAAvB4L,EAAarI,MAAoB,SAAW,QAGjF4H,EAAOE,OAAO,oBAAqB,QAEhB,CAACP,GACXA,EACJC,QAAQA,GAA0B,WAAfA,EAAOE,MAC1BY,KAAKd,GAAW,GAAGA,EAAOC,SAASD,EAAOE,OAAOF,EAAOG,YAAYH,EAAOxH,UAEhFuI,CAAWhB,GAAS5G,SAAS6G,GAAWI,EAAOE,OAAO,OAAO1L,EAAAA,KAAeoL,KAGrE,CACLR,KAAM,GAFIC,EAAaW,KAI3B,IAEA,SAASX,EAAauB,GACpB,MAAO,GAAGhN,EAAAA,KAAqBgN,EAAY,IAAIA,EAAUC,aAAe,IAC1E,CCtEA,MAAMC,GAAMzC,EAAAA,EAAAA,OAAK,IAAM,gCACjB0C,GAAY1C,EAAAA,EAAAA,OAAK,IAAM,gCAEhB2C,GAAS,IAAIC,EAAAA,WAAgBC,YAAYJ,GAAKK,cAAc,CACvE5C,MAAO,gBACP6C,KAAM,MACNC,KAAMN,EACNxK,GAAI,kBAEL+K,QAAQ,CACP/C,MAAO,mBACPC,YAAa,2BACb4C,KAAM,aACNnC,QAAS,kDACTsC,QAAS,KAC6BC,OAApCA,EAAAA,2CAAoCA,IAApCA,EAAAA,sCAAAA,EAAAA,qCAAsCC,UAAU,CAAEC,SAAU7N,EAAAA,GAAeuL,KAAM,YAAa,IAIlG,IAAK,MAAMuC,KAAc3C,EACvBgC,EAAOM,QAAQK,GAGjB,IAAK,MAAMC,KAA0BtD,EACnC0C,EAAOa,gBAAgBD,G","sources":["webpack://grafana-exploretraces-app/webpack/runtime/create fake namespace object","webpack://grafana-exploretraces-app/webpack/runtime/load script","webpack://grafana-exploretraces-app/external amd \"react-router\"","webpack://grafana-exploretraces-app/external amd \"rxjs\"","webpack://grafana-exploretraces-app/./utils/shared.ts","webpack://grafana-exploretraces-app/external amd \"@grafana/ui\"","webpack://grafana-exploretraces-app/external amd \"moment\"","webpack://grafana-exploretraces-app/external amd \"lodash\"","webpack://grafana-exploretraces-app/external amd \"react\"","webpack://grafana-exploretraces-app/external amd \"@emotion/css\"","webpack://grafana-exploretraces-app/external amd \"@grafana/data\"","webpack://grafana-exploretraces-app/external amd \"react-dom\"","webpack://grafana-exploretraces-app/external amd \"@grafana/runtime\"","webpack://grafana-exploretraces-app/webpack/bootstrap","webpack://grafana-exploretraces-app/webpack/runtime/compat get default export","webpack://grafana-exploretraces-app/webpack/runtime/define property getters","webpack://grafana-exploretraces-app/webpack/runtime/ensure chunk","webpack://grafana-exploretraces-app/webpack/runtime/get javascript chunk filename","webpack://grafana-exploretraces-app/webpack/runtime/global","webpack://grafana-exploretraces-app/webpack/runtime/hasOwnProperty shorthand","webpack://grafana-exploretraces-app/webpack/runtime/make namespace object","webpack://grafana-exploretraces-app/webpack/runtime/node module decorator","webpack://grafana-exploretraces-app/webpack/runtime/publicPath","webpack://grafana-exploretraces-app/webpack/runtime/jsonp chunk loading","webpack://grafana-exploretraces-app/./exposedComponents/index.tsx","webpack://grafana-exploretraces-app/./utils/links.ts","webpack://grafana-exploretraces-app/./module.tsx"],"sourcesContent":["var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"grafana-exploretraces-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}\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};","module.exports = __WEBPACK_EXTERNAL_MODULE__1159__;","module.exports = __WEBPACK_EXTERNAL_MODULE__1269__;","import { BusEventWithPayload, DataFrame } from '@grafana/data';\nimport pluginJson from '../plugin.json';\n\nexport type MetricFunction = 'rate' | 'errors' | 'duration';\n\nexport enum ROUTES {\n Explore = 'explore',\n Home = 'home',\n}\n\nexport const PLUGIN_ID = pluginJson.id;\nexport const PLUGIN_BASE_URL = `/a/${PLUGIN_ID}`;\nexport const EXPLORATIONS_ROUTE = `${PLUGIN_BASE_URL}/${ROUTES.Explore}`;\n\nexport const DATASOURCE_LS_KEY = 'grafana.drilldown.traces.datasource';\nexport const HOMEPAGE_FILTERS_LS_KEY = 'grafana.drilldown.traces.homepage.filters';\nexport const BOOKMARKS_LS_KEY = 'grafana.drilldown.traces.bookmarks';\n\nexport const GRID_TEMPLATE_COLUMNS = 'repeat(auto-fit, minmax(400px, 1fr))';\n\nexport const EMPTY_STATE_ERROR_MESSAGE = 'No data for selected query';\nexport const EMPTY_STATE_ERROR_REMEDY_MESSAGE = 'Please try removing some filters or changing your query.';\n\nexport const FILTER_SEPARATOR = ' && ';\n\nexport const VAR_DATASOURCE = 'ds';\nexport const VAR_DATASOURCE_EXPR = '${ds}';\nexport const VAR_PRIMARY_SIGNAL = 'primarySignal';\nexport const VAR_FILTERS = 'filters';\nexport const VAR_FILTERS_EXPR = '${primarySignal} && ${filters}';\nexport const VAR_HOME_FILTER = 'homeFilter';\nexport const VAR_GROUPBY = 'groupBy';\nexport const VAR_SPAN_LIST_COLUMNS = 'spanListColumns';\nexport const VAR_METRIC = 'metric';\nexport const VAR_LATENCY_THRESHOLD = 'latencyThreshold';\nexport const VAR_LATENCY_THRESHOLD_EXPR = '${latencyThreshold}';\nexport const VAR_LATENCY_PARTIAL_THRESHOLD = 'partialLatencyThreshold';\nexport const VAR_LATENCY_PARTIAL_THRESHOLD_EXPR = '${partialLatencyThreshold}';\nexport const explorationDS = { uid: VAR_DATASOURCE_EXPR };\n\nexport const ACTION_VIEW = 'actionView';\nexport const PRIMARY_SIGNAL = 'primarySignal';\nexport const SELECTION = 'selection';\n\nexport const ALL = 'All';\nexport const RESOURCE = 'Resource';\nexport const SPAN = 'Span';\nexport const RESOURCE_ATTR = 'resource.';\nexport const SPAN_ATTR = 'span.';\nexport const EVENT_ATTR = 'event.';\nexport const EVENT_INTRINSIC = 'event:';\n\nexport const radioAttributesResource = [\n // https://opentelemetry.io/docs/specs/semconv/resource/\n 'resource.service.name',\n 'resource.service.namespace',\n 'resource.service.version',\n // custom\n 'resource.cluster',\n 'resource.environment',\n 'resource.namespace',\n // https://opentelemetry.io/docs/specs/semconv/resource/deployment-environment/\n 'resource.deployment.environment',\n // https://opentelemetry.io/docs/specs/semconv/resource/k8s/\n 'resource.k8s.namespace.name',\n 'resource.k8s.pod.name',\n 'resource.k8s.container.name',\n 'resource.k8s.node.name',\n];\nexport const radioAttributesSpan = [\n 'name',\n 'kind',\n 'rootName',\n 'rootServiceName',\n 'status',\n 'statusMessage',\n 'span.http.status_code',\n];\nexport const ignoredAttributes = [\n 'duration',\n 'event:name',\n 'nestedSetLeft',\n 'nestedSetParent',\n 'nestedSetRight',\n 'span:duration',\n 'span:id',\n 'trace:duration',\n 'trace:id',\n 'traceDuration',\n];\nexport const ignoredAttributesHomeFilter = [\n 'status',\n 'span:status',\n 'rootName',\n 'rootService',\n 'rootServiceName',\n 'trace:rootName',\n 'trace:rootService',\n 'trace:rootServiceName',\n];\n// Limit maximum options in select dropdowns for performance reasons\nexport const maxOptions = 1000;\n\nexport type MakeOptional = Pick, K> & Omit;\n\nexport interface ComparisonSelection {\n type: 'auto' | 'manual';\n raw?: { x: { from: number; to: number }; y: { from: number; to: number } };\n timeRange?: { from: number; to: number };\n duration?: { from: string; to: string };\n query?: string;\n}\n\nexport interface EventTimeseriesDataReceivedPayload {\n series?: DataFrame[];\n}\n\nexport class EventTimeseriesDataReceived extends BusEventWithPayload {\n public static type = 'timeseries-data-received';\n}\n\nexport const filterStreamingProgressTransformations = [\n {\n id: 'filterByRefId',\n options: {\n exclude: 'streaming-progress',\n },\n },\n];\n","module.exports = __WEBPACK_EXTERNAL_MODULE__2007__;","module.exports = __WEBPACK_EXTERNAL_MODULE__2468__;","module.exports = __WEBPACK_EXTERNAL_MODULE__3241__;","module.exports = __WEBPACK_EXTERNAL_MODULE__5959__;","module.exports = __WEBPACK_EXTERNAL_MODULE__6089__;","module.exports = __WEBPACK_EXTERNAL_MODULE__7781__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8398__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8531__;","// 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","// 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-exploretraces-app/\";","// 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_exploretraces_app\"] = self[\"webpackChunkgrafana_exploretraces_app\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","import { LinkButton } from '@grafana/ui';\nimport { OpenInExploreTracesButtonProps } from 'exposedComponents/types';\nimport React, { lazy, Suspense } from 'react';\nconst OpenInExploreTracesButton = lazy(() => import('exposedComponents/OpenInExploreTracesButton/OpenInExploreTracesButton'));\n\nfunction SuspendedOpenInExploreTracesButton(props: OpenInExploreTracesButtonProps) {\n return (\n \n Open in Traces Drilldown\n \n }\n >\n \n \n );\n}\n\nexport const exposedComponents = [\n {\n id: 'grafana-exploretraces-app/open-in-explore-traces-button/v1',\n title: 'Open in Traces Drilldown button',\n description: 'A button that opens a traces view in the Traces drilldown app.',\n component: SuspendedOpenInExploreTracesButton,\n },\n];\n","import {\n PluginExtensionAddedLinkConfig,\n PluginExtensionPanelContext,\n PluginExtensionPoints,\n toURLRange\n} from '@grafana/data';\n\nimport { DataSourceRef } from '@grafana/schema';\nimport { EXPLORATIONS_ROUTE, VAR_DATASOURCE, VAR_FILTERS, VAR_METRIC } from './shared';\n\ntype TempoQuery = {\n filters?: TraceqlFilter[];\n datasource?: DataSourceRef;\n};\n\nexport interface TraceqlFilter {\n scope?: string;\n tag?: string;\n operator?: string;\n value?: (string | string[]);\n}\n\nconst title = 'Open in Explore Traces';\nconst description = 'Open current query in the Explore Traces app';\n\nexport const linkConfigs: Array<{ targets: string | string[] } & PluginExtensionAddedLinkConfig> = [\n {\n targets: PluginExtensionPoints.DashboardPanelMenu,\n title,\n description,\n path: createAppUrl(),\n configure: contextToLink,\n },\n];\n\nexport function contextToLink(context?: T) {\n if (!context) {\n return undefined;\n }\n\n const tempoQuery = context.targets.find((target) => target.datasource?.type === 'tempo') as TempoQuery | undefined;\n if (!tempoQuery || !tempoQuery.datasource?.uid) {\n return undefined;\n }\n\n const filters = tempoQuery.filters?.filter((filter) => filter.scope && filter.tag && filter.operator && filter.value && filter.value.length);\n if (!filters || filters.length === 0) {\n return undefined;\n }\n\n const params = new URLSearchParams();\n params.append(`var-${VAR_DATASOURCE}`, tempoQuery.datasource?.uid || '');\n\n const timeRangeParams = toURLRange(context.timeRange);\n params.append(`from`, String(timeRangeParams.from));\n params.append(`to`, String(timeRangeParams.to));\n\n const statusFilter = filters.find((filter) => filter.tag === 'status');\n if (statusFilter) {\n params.append(`var-${VAR_METRIC}`, statusFilter.value === 'error' ? 'errors' : 'rate');\n }\n\n params.append('var-primarySignal', 'true');\n\n const getFilters = (filters: TraceqlFilter[]) => {\n return filters\n .filter((filter) => filter.tag !== 'status')\n .map((filter) => `${filter.scope}.${filter.tag}|${filter.operator}|${filter.value}`);\n };\n getFilters(filters).forEach((filter) => params.append(`var-${VAR_FILTERS}`, filter));\n \n const url = createAppUrl(params);\n return {\n path: `${url}`,\n };\n}\n\nfunction createAppUrl(urlParams?: URLSearchParams): string {\n return `${EXPLORATIONS_ROUTE}${urlParams ? `?${urlParams.toString()}` : ''}`;\n}\n","import { lazy } from 'react';\nimport { AppPlugin } from '@grafana/data';\n\n// @ts-ignore new API that is not yet in stable release\nimport { sidecarServiceSingleton_EXPERIMENTAL } from '@grafana/runtime';\nimport pluginJson from './plugin.json';\nimport { exposedComponents } from 'exposedComponents';\nimport { linkConfigs } from 'utils/links';\n\nconst App = lazy(() => import('./components/App/App'));\nconst AppConfig = lazy(() => import('./components/AppConfig/AppConfig'));\n\nexport const plugin = new AppPlugin<{}>().setRootPage(App).addConfigPage({\n title: 'Configuration',\n icon: 'cog',\n body: AppConfig,\n id: 'configuration',\n})\n.addLink({\n title: 'traces drilldown',\n description: 'Open in Traces Drilldown',\n icon: 'align-left',\n targets: 'grafana-lokiexplore-app/toolbar-open-related/v1',\n onClick: () => {\n sidecarServiceSingleton_EXPERIMENTAL?.openAppV3({ pluginId: pluginJson.id, path: '/explore' });\n },\n});\n\nfor (const linkConfig of linkConfigs) {\n plugin.addLink(linkConfig);\n}\n\nfor (const exposedComponentConfig of exposedComponents) {\n plugin.exposeComponent(exposedComponentConfig);\n}\n"],"names":["leafPrototypes","getProto","inProgress","dataWebpackPrefix","module","exports","__WEBPACK_EXTERNAL_MODULE__1159__","__WEBPACK_EXTERNAL_MODULE__1269__","ROUTES","EXPLORATIONS_ROUTE","pluginJson","DATASOURCE_LS_KEY","HOMEPAGE_FILTERS_LS_KEY","BOOKMARKS_LS_KEY","GRID_TEMPLATE_COLUMNS","EMPTY_STATE_ERROR_MESSAGE","EMPTY_STATE_ERROR_REMEDY_MESSAGE","FILTER_SEPARATOR","VAR_DATASOURCE","VAR_DATASOURCE_EXPR","VAR_PRIMARY_SIGNAL","VAR_FILTERS","VAR_FILTERS_EXPR","VAR_HOME_FILTER","VAR_GROUPBY","VAR_SPAN_LIST_COLUMNS","VAR_METRIC","VAR_LATENCY_THRESHOLD","VAR_LATENCY_THRESHOLD_EXPR","VAR_LATENCY_PARTIAL_THRESHOLD","VAR_LATENCY_PARTIAL_THRESHOLD_EXPR","explorationDS","uid","ACTION_VIEW","PRIMARY_SIGNAL","SELECTION","ALL","RESOURCE","SPAN","RESOURCE_ATTR","SPAN_ATTR","EVENT_ATTR","EVENT_INTRINSIC","radioAttributesResource","radioAttributesSpan","ignoredAttributes","ignoredAttributesHomeFilter","maxOptions","EventTimeseriesDataReceived","BusEventWithPayload","type","filterStreamingProgressTransformations","id","options","exclude","__WEBPACK_EXTERNAL_MODULE__2007__","__WEBPACK_EXTERNAL_MODULE__2468__","__WEBPACK_EXTERNAL_MODULE__3241__","__WEBPACK_EXTERNAL_MODULE__5959__","__WEBPACK_EXTERNAL_MODULE__6089__","__WEBPACK_EXTERNAL_MODULE__7781__","__WEBPACK_EXTERNAL_MODULE__8398__","__WEBPACK_EXTERNAL_MODULE__8531__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","loaded","__webpack_modules__","call","m","n","getter","__esModule","d","a","Object","getPrototypeOf","obj","t","value","mode","this","then","ns","create","r","def","current","indexOf","getOwnPropertyNames","forEach","key","definition","o","defineProperty","enumerable","get","f","e","chunkId","Promise","all","keys","reduce","promises","u","g","globalThis","Function","window","prop","prototype","hasOwnProperty","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","i","length","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","fn","setTimeout","bind","target","head","appendChild","Symbol","toStringTag","nmd","paths","children","p","installedChunks","j","installedChunkData","promise","resolve","reject","error","Error","errorType","realSrc","message","name","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","self","OpenInExploreTracesButton","lazy","exposedComponents","title","description","component","props","Suspense","fallback","LinkButton","variant","disabled","linkConfigs","targets","PluginExtensionPoints","DashboardPanelMenu","path","createAppUrl","configure","context","tempoQuery","find","datasource","filters","filter","scope","tag","operator","params","URLSearchParams","append","timeRangeParams","toURLRange","timeRange","String","from","to","statusFilter","map","getFilters","urlParams","toString","App","AppConfig","plugin","AppPlugin","setRootPage","addConfigPage","icon","body","addLink","onClick","sidecarServiceSingleton_EXPERIMENTAL","openAppV3","pluginId","linkConfig","exposedComponentConfig","exposeComponent"],"sourceRoot":""}