@odigos/ui-kit 0.0.226 → 0.0.228

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/lib/chunks/index-DJZLguZq.js +3 -0
  3. package/lib/chunks/{index-BWi3du_1.js → index-hLSQkKAv.js} +9 -9
  4. package/lib/chunks/ui-components-B4xHrszQ.js +2659 -0
  5. package/lib/components/_v2/cards/data-card/index.d.ts +2 -1
  6. package/lib/components/_v2/charts/gauge-chart/index.d.ts +18 -0
  7. package/lib/components/_v2/charts/index.d.ts +1 -0
  8. package/lib/components/_v2/index.d.ts +2 -0
  9. package/lib/components/_v2/typography/index.d.ts +2 -2
  10. package/lib/components/_v2/typography-truncatable/index.d.ts +21 -0
  11. package/lib/components/v2.js +1 -1
  12. package/lib/components.js +1 -1
  13. package/lib/constants.js +1 -1
  14. package/lib/containers/_v2/_drawers/add-destination-drawer/helpers.d.ts +4 -3
  15. package/lib/containers/_v2/_drawers/add-destination-drawer/lists-column/index.d.ts +2 -3
  16. package/lib/containers/_v2/_drawers/edit-destination-drawer/helpers.d.ts +30 -3
  17. package/lib/containers/_v2/pipeline-collectors/enum.d.ts +4 -0
  18. package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-badge.d.ts +1 -1
  19. package/lib/containers/_v2/pipeline-collectors/general-info/helpers/get-general-gauge-cards.d.ts +4 -0
  20. package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-status-card.d.ts +1 -1
  21. package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-text-cards.d.ts +1 -1
  22. package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-title.d.ts +1 -1
  23. package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/index.d.ts +2 -1
  24. package/lib/containers/_v2/pipeline-collectors/general-info/index.d.ts +7 -6
  25. package/lib/containers/_v2/pipeline-collectors/index.d.ts +5 -0
  26. package/lib/containers/_v2/pipeline-collectors/toolbar/index.d.ts +1 -11
  27. package/lib/containers/source-drawer/index.d.ts +1 -0
  28. package/lib/containers/source-drawer/profiling/flamebearer.d.ts +5 -0
  29. package/lib/containers/v2.js +32 -45
  30. package/lib/containers.js +5 -5
  31. package/lib/contexts.js +1 -1
  32. package/lib/functions.js +1 -1
  33. package/lib/hooks.js +1 -1
  34. package/lib/snippets/_v2/yaml-section-card/index.d.ts +2 -0
  35. package/lib/snippets/v2.js +1 -1
  36. package/lib/snippets.js +1 -1
  37. package/lib/store.js +1 -1
  38. package/lib/theme.js +1 -1
  39. package/lib/types/common/index.d.ts +42 -0
  40. package/lib/types.js +1 -1
  41. package/lib/visuals.js +1 -1
  42. package/package.json +1 -1
  43. package/lib/chunks/index-BYYemmZD.js +0 -3
  44. package/lib/chunks/ui-components-B4LvruCJ.js +0 -2620
@@ -1,2620 +0,0 @@
1
- import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import r,{css as n,useTheme as i,keyframes as a,ThemeProvider as s}from"styled-components";import{SamplerIcon as l,PiiMaskingIcon as c,ActionIcon as d,RenameAttributeIcon as p,DeleteAttributeIcon as u,AddClusterInfoIcon as h,K8sLogo as m,ImageErrorIcon as g,KafkaLogo as f,RedisLogo as x,PostgresLogo as y,NginxLogo as b,MysqlLogo as v,ElixirLogo as $,SwiftLogo as w,RustLogo as S,RubyLogo as k,PhpLogo as C,CPlusPlusLogo as E,CSharpLogo as A,DotnetLogo as D,PythonLogo as T,NodejsLogo as I,GoLogo as N,JavaLogo as R,AwsXrayLogo as O,VictoriaMetricsLogo as _,UptraceLogo as F,TraceloopLogo as P,TingyunLogo as L,TempoLogo as z,TelemetryHubLogo as M,SumoLogicLogo as B,SplunkLogo as U,SignozLogo as j,SeqLogo as W,AwsS3Logo as H,QuickwitLogo as X,GigapipeLogo as V,QrynLogo as G,PrometheusLogo as K,OpenTelemetryLogo as q,OracleLogo as J,OpsVerseLogo as Y,OpenObserveLogo as Q,OneUptimeLogo as Z,OdigosLogo as ee,ObserveLogo as te,NewRelicLogo as oe,MiddlewareLogo as re,LumigoLogo as ne,LokiLogo as ie,LogzioLogo as ae,LightstepLogo as se,Last9Logo as le,KloudmateLogo as ce,JaegerLogo as de,InstanaLogo as pe,HyperDxLogo as ue,HoneycombLogo as he,GroundcoverLogo as me,GreptimeLogo as ge,GrafanaLogo as fe,GoogleCloudPlatformLogo as xe,ElasticSearchLogo as ye,ElasticApmLogo as be,DynatraceLogo as ve,DatadogLogo as $e,Dash0Logo as we,CoralogixLogo as Se,AwsCloudwatchLogo as ke,ClickhouseLogo as Ce,ChronosphereLogo as Ee,ChecklyLogo as Ae,CauselyLogo as De,BonreeLogo as Te,BetterStackLogo as Ie,AzureMonitorLogo as Ne,AzureBlobLogo as Re,AxiomLogo as Oe,AppDynamicsLogo as _e,AlibabaCloudLogo as Fe,AlaudaLogo as Pe,SamplingIcon as Le,InstrumentationRuleIcon as ze,DestinationIcon as Me,SourceIcon as Be,NamespacesIcon as Ue,PayloadCollectionIcon as je,HeadersCollectionIcon as We,CustomInstrumentationIcon as He,CodeAttributesIcon as Xe,TracesIcon as Ve,MetricsIcon as Ge,LogsIcon as Ke,VmLogo as qe,DotsHorizontalIcon as Je,QuestionCircleIcon as Ye,XSquareIcon as Qe,VSquareIcon as Ze,ExclamationTriangleIcon as et,ExclamationCircleIcon as tt,ISquareIcon as ot,AwsLogo as rt,AwsSecretsManagerLogo as nt,AwsStepFunctionsLogo as it,AwsEventBridgeLogo as at,AwsBedrockLogo as st,AwsApiGatewayLogo as lt,AwsEc2Logo as ct,AwsKinesisLogo as dt,AwsLambdaLogo as pt,AwsSnsLogo as ut,AwsSqsLogo as ht,AwsDynamoDbLogo as mt,AwsStsLogo as gt,VIcon as ft,CopyIcon as xt,XIcon as yt,MinusIcon as bt,ListIcon as vt,CodeIcon as $t,ExtendArrowIcon as wt,PlusIcon as St,EditIcon as kt,NoDataIcon as Ct,RefreshIcon as Et,EyeClosedIcon as At,EyeOpenIcon as Dt,SearchIcon as Tt,TrashIcon as It,EditedIcon as Nt,SortArrowsIcon as Rt,NotebookIcon as Ot,ChevronUpIcon as _t,ChevronDownIcon as Ft,ArrowIcon as Pt,DotsVerticalIcon as Lt,DotIcon as zt,FilterIcon as Mt}from"../icons.js";import{create as Bt}from"zustand";import{Fragment as Ut,useState as jt,useEffect as Wt,useMemo as Ht,useRef as Xt,useCallback as Vt,useContext as Gt,createContext as Kt,forwardRef as qt,memo as Jt,useLayoutEffect as Yt}from"react";import Qt from"javascript-time-ago";import{p as Zt,c as eo,s as to,l as oo}from"./vendor-C150cdxb.js";import{Handle as ro,Position as no,ReactFlowProvider as io,ReactFlow as ao,Controls as so,ControlButton as lo,useReactFlow as co}from"@xyflow/react";import po,{createPortal as uo}from"react-dom";import{Highlight as ho,themes as mo}from"prism-react-renderer";import{ErrorBoundary as go}from"react-error-boundary";import fo from"lottie-react";import{VList as xo}from"virtua";const yo=e=>e.charAt(0).toUpperCase()+e.slice(1),bo=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),o=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,r])=>Array.isArray(r)?[e,t(r)]:"object"==typeof r&&null!==r?[e,o(r)]:[e,r]));return Object.entries(e).reduce((e,[r,n])=>{try{const i=JSON.parse(n);Array.isArray(i)?e[r]=JSON.stringify(t(i)):e[r]="object"==typeof i&&null!==i?JSON.stringify(o(i)):n}catch(i){"object"==typeof n&&null!==n?Array.isArray(n)?e[r]=JSON.stringify(t(n)):e[r]=JSON.stringify(o(n)):e[r]=n}return e},{})};var vo;!function(e){e.SIGNALS="SIGNALS"}(vo||(vo={}));const $o=(e,t,o)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[r,n,i]=e;if(r===vo.SIGNALS)switch(n){case"INCLUDES":return t?.includes(i);case"EXCLUDES":return!t?.includes(i);default:return!0}const a=o.find(e=>e.name===r||e.key===r);if(!a)return!1;switch(n){case"===":case"==":return a.value===i;case"!==":case"!=":return a.value!==i;case">":return Number(a.value)>Number(i);case"<":return Number(a.value)<Number(i);case">=":return Number(a.value)>=Number(i);case"<=":return Number(a.value)<=Number(i);default:return!0}},wo=e=>JSON.parse(JSON.stringify(e)),So=(e,t)=>t.split(".").reduce((e,t)=>e?.[t],e),ko=(e,t,o)=>{const r=t.split(".");let n=e;for(let e=0;e<r.length-1;e++)r[e]in n&&"object"==typeof n[r[e]]||(n[r[e]]={}),n=n[r[e]];n[r[r.length-1]]=o},Co=(e,t)=>{let o=[...e];return t.monitors?.length&&(o=o.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),o},Eo=(e,t)=>{let o=[...e];return t.monitors?.length&&(o=o.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),o},Ao=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[];var Do,To,Io,No,Ro,Oo,_o,Fo,Po,Lo,zo,Mo,Bo,Uo,jo,Wo,Ho,Xo,Vo,Go,Ko,qo,Jo,Yo,Qo,Zo,er,tr,or,rr,nr,ir,ar,sr,lr,cr,dr,pr,ur,hr,mr,gr;!function(e){e.Attributes="attributes",e.Samplers="samplers"}(Do||(Do={})),function(e){e.K8sAttributes="K8sAttributesResolver",e.AddClusterInfo="AddClusterInfo",e.DeleteAttributes="DeleteAttribute",e.RenameAttributes="RenameAttribute",e.PiiMasking="PiiMasking",e.ErrorSampler="ErrorSampler",e.ProbabilisticSampler="ProbabilisticSampler",e.LatencySampler="LatencySampler",e.ServiceNameSampler="ServiceNameSampler",e.SpanAttributeSampler="SpanAttributeSampler",e.URLTemplatization="URLTemplatization"}(To||(To={})),function(e){e.CollectContainerAttributes="collectContainerAttributes",e.CollectReplicaSetAttributes="collectReplicaSetAttributes",e.CollectWorkloadId="collectWorkloadId",e.CollectClusterId="collectClusterId",e.LabelsAttributes="labelsAttributes",e.AnnotationsAttributes="annotationsAttributes",e.ClusterAttributes="clusterAttributes",e.OverwriteExistingValues="overwriteExistingValues",e.AttributeNamesToDelete="attributeNamesToDelete",e.Renames="renames",e.PiiCategories="piiCategories",e.FallbackSamplingRatio="fallbackSamplingRatio",e.SamplingPercentage="samplingPercentage",e.EndpointsFilters="endpointsFilters",e.ServicesNameFilters="servicesNameFilters",e.AttributeFilters="attributeFilters",e.UrlTemplatizationRulesGroups="urlTemplatizationRulesGroups"}(Io||(Io={})),function(e){e.Pod="pod",e.Namespace="namespace",e.Node="node"}(No||(No={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(Ro||(Ro={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.GREATER_THAN="greater_than",e.LESS_THAN="less_than",e.GREATER_THAN_OR_EQUAL="greater_than_or_equal",e.LESS_THAN_OR_EQUAL="less_than_or_equal"}(Oo||(Oo={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(_o||(_o={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.IS_VALID_JSON="is_valid_json",e.IS_INVALID_JSON="is_invalid_json",e.JSONPATH_EXISTS="jsonpath_exists",e.KEY_EQUALS="key_equals",e.KEY_NOT_EQUALS="key_not_equals"}(Fo||(Fo={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(Po||(Po={})),function(e){e.Ascending="ascending",e.Descending="descending"}(Lo||(Lo={})),function(e){e.Community="community",e.Onprem="onprem"}(zo||(zo={})),function(e){e.K8s="k8s",e.Vm="vm"}(Mo||(Mo={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(Bo||(Bo={})),function(e){e.Go="go",e.JavaScript="javascript",e.Python="python",e.Java="java",e.DotNet="dotnet",e.CSharp="csharp",e.CPlusPlus="cplusplus",e.Php="php",e.Ruby="ruby",e.Rust="rust",e.Swift="swift",e.Elixir="elixir",e.MySql="mysql",e.Nginx="nginx",e.Postgres="postgres",e.Redis="redis",e.Kafka="kafka",e.Ignored="ignored",e.Unknown="unknown",e.Processing="processing",e.NoContainers="no containers",e.NoRunningPods="no running pods"}(Uo||(Uo={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(jo||(jo={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule",e.SamplingRule="SamplingRule"}(Wo||(Wo={})),function(e){e.DataStream="DataStream"}(Ho||(Ho={})),function(e){e.Input="input",e.MultiInput="multiInput",e.MultiTabledInput="multiTabledInput",e.KeyValuePair="keyValuePairs",e.TextArea="textarea",e.Dropdown="dropdown",e.Checkbox="checkbox",e.Toggle="toggle",e.Time="time"}(Xo||(Xo={})),function(e){e.Text="text",e.Password="password",e.Number="number"}(Vo||(Vo={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(Go||(Go={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(Ko||(Ko={})),function(e){e.Loading="loading",e.Disabled="disabled"}(qo||(qo={})),function(e){e.Disabled="disabled",e.Unknown="unknown"}(Jo||(Jo={})),function(e){e.CodeAttributes="code-attributes",e.FullPayloadCollection="full-payload-collection",e.DbPayloadCollection="db-payload-collection",e.QueryOperationDetector="query-operation-detector",e.AllowConcurrentAgents="allow_concurrent_agents",e.JavaEbpfInstrumentations="java-ebpf-instrumentations",e.JavaNativeInstrumentations="java-native-instrumentations",e.SizeS="size_s",e.SizeM="size_m",e.SizeL="size_l"}(Yo||(Yo={})),function(e){e.Header="header",e.Add="add",e.Base="base",e.Edged="edged",e.Frame="frame",e.Scroll="scroll",e.Skeleton="skeleton",e.MapItem="map-item",e.NoData="no-data",e.OdiLogo="odilogo"}(Qo||(Qo={})),function(e){e.Labeled="labeled"}(Zo||(Zo={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(er||(er={})),function(e){e.Alauda="alauda",e.AlibabaCloud="alibabacloud",e.AppDynamics="appdynamics",e.Axiom="axiom",e.AzureBlob="azureblob",e.AzureMonitor="azuremonitor",e.BetterStack="betterstack",e.Bonree="bonree",e.Causely="causely",e.Checkly="checkly",e.Chronosphere="chronosphere",e.ClickHouse="clickhouse",e.CloudWatch="cloudwatch",e.Coralogix="coralogix",e.Dash0="dash0",e.Datadog="datadog",e.Dynamic="dynamic",e.Dynatrace="dynatrace",e.ElasticApm="elasticapm",e.ElasticSearch="elasticsearch",e.GoogleCloud="googlecloud",e.GoogleCloudOTLP="googlecloudotlp",e.GrafanaCloudLoki="grafanacloudloki",e.GrafanaCloudPrometheus="grafanacloudprometheus",e.GrafanaCloudTempo="grafanacloudtempo",e.Greptime="greptime",e.Groundcover="groundcover",e.Honeycomb="honeycomb",e.HyperDX="hyperdx",e.Instana="instana",e.Jaeger="jaeger",e.Kafka="kafka",e.Kloudmate="kloudmate",e.Last9="last9",e.Lightstep="lightstep",e.LogzIo="logzio",e.Loki="loki",e.Lumigo="lumigo",e.Middleware="middleware",e.NewRelic="newrelic",e.Observe="observe",e.Odigos="odigos",e.OneUptime="oneuptime",e.OpenObserve="openobserve",e.Opsverse="opsverse",e.Oracle="oracle",e.OTLP="otlp",e.OTLPHttp="otlphttp",e.Prometheus="prometheus",e.Qryn="qryn",e.QrynOss="qryn-oss",e.Quickwit="quickwit",e.S3="s3",e.Seq="seq",e.Signalfx="signalfx",e.Signoz="signoz",e.Splunk="splunk",e.SplunkSapm="splunksapm",e.SplunkOtlp="splunkotlp",e.SumoLogic="sumologic",e.TelemetryHub="telemetryhub",e.Tempo="tempo",e.Tingyun="tingyun",e.Traceloop="traceloop",e.Uptrace="uptrace",e.VictoriaMetrics="victoriametrics",e.VictoriaMetricsCloud="victoriametricscloud",e.XRay="xray"}(tr||(tr={})),function(e){e.Deployment="Deployment",e.DaemonSet="DaemonSet",e.StatefulSet="StatefulSet",e.CronJob="CronJob",e.Pod="Pod",e.StaticPod="StaticPod",e.Rollout="Rollout",e.ConfigMap="ConfigMap",e.DeploymentConfig="DeploymentConfig"}(or||(or={})),function(e){e.GolangCommunity="golang-community",e.NodejsCommunity="nodejs-community",e.PythonCommunity="python-community",e.JavaCommunity="java-community",e.DotNetCommunity="dotnet-community",e.RubyCommunity="ruby-community",e.PhpCommunity="php-community",e.GolangEnterprise="golang-enterprise",e.NodejsEnterprise="nodejs-enterprise",e.PythonEnterprise="python-enterprise",e.JavaEnterprise="java-enterprise",e.JavaEbpfInstrumentations="java-ebpf-instrumentations",e.OpentelemetryEbpfInstrumentation="opentelemetry-ebpf-instrumentation",e.DotNetLegacy="dotnet-legacy",e.DotNetEnterprise="dotnet-enterprise",e.RubyEnterprise="ruby-enterprise",e.CPlusPlusEnterprise="cplusplus-enterprise",e.MySqlEnterprise="mysql-enterprise"}(rr||(rr={})),function(e){e.Error="Error",e.Failure="Failure",e.Notice="Notice",e.Pending="Pending",e.Waiting="Waiting",e.Unsupported="Unsupported",e.Disabled="Disabled",e.Success="Success",e.Irrelevant="Irrelevant",e.Unknown="Unknown"}(nr||(nr={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(ir||(ir={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(ar||(ar={})),function(e){e.HeaderKeys="headerKeys"}(sr||(sr={})),function(e){e.Java="java",e.Golang="golang"}(lr||(lr={}));class fr{className;methodName;constructor(e,t){this.className=e,this.methodName=t}Verify(){return!!this.className&&!!this.methodName}toString(){return this.Verify()?`${this.className}.${this.methodName}`:"[Faulty Java Probe]"}}class xr{packageName;functionName;receiverName;receiverMethodName;constructor(e,t,o,r){this.packageName=e,this.functionName=t||"",this.receiverName=o||"",this.receiverMethodName=r||""}Verify(){return!!this.packageName&&(this.functionName?!(this.receiverMethodName||this.receiverName):!(!this.receiverMethodName||!this.receiverName))}toString(){return this.Verify()?this.functionName?`${this.packageName}.${this.functionName}`:this.receiverName&&this.receiverMethodName?`${this.packageName}.(${this.receiverName}).${this.receiverMethodName}`:"":"[Faulty Golang Probe]"}}!function(e){e.HttpRequest="httpRequest",e.HttpResponse="httpResponse",e.DbQuery="dbQuery",e.Messaging="messaging"}(cr||(cr={})),function(e){e.Healthy="Healthy",e.Updating="Updating",e.Degraded="Degraded",e.Failed="Failed",e.Down="Down",e.Unknown="Unknown"}(dr||(dr={})),function(e){e.Pending="Pending",e.Running="Running",e.Succeeded="Succeeded",e.Failed="Failed",e.Unknown="Unknown"}(pr||(pr={})),function(e){e.ContainerCreating="ContainerCreating",e.CrashLoopBackOff="CrashLoopBackOff",e.CreateContainerError="CreateContainerError",e.CreateContainerConfigError="CreateContainerConfigError",e.ErrImagePull="ErrImagePull",e.ErrImageNeverPull="ErrImageNeverPull",e.ImagePullBackOff="ImagePullBackOff",e.InvalidImageName="InvalidImageName",e.RegistryUnavailable="RegistryUnavailable",e.NetworkNotReady="NetworkNotReady",e.Running="Running",e.Completed="Completed",e.Error="Error",e.OOMKilled="OOMKilled",e.ContainerCannotRun="ContainerCannotRun",e.DeadlineExceeded="DeadlineExceeded",e.StartError="StartError"}(ur||(ur={})),function(e){e.Running="Running",e.Waiting="Waiting",e.Terminated="Terminated"}(hr||(hr={})),function(e){e.Logs="LOGS",e.Metrics="METRICS",e.Traces="TRACES"}(mr||(mr={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces"}(gr||(gr={}));const yr={[mr.Logs]:gr.Logs,[mr.Metrics]:gr.Metrics,[mr.Traces]:gr.Traces},br={[gr.Logs]:mr.Logs,[gr.Metrics]:mr.Metrics,[gr.Traces]:mr.Traces},vr=(e,t)=>{let o=e;if(t.namespaces?.length){const e=new Set(t.namespaces.map(({id:e})=>e));o=o.filter(({namespace:t})=>e.has(t))}if(t.kinds?.length){const e=new Set(t.kinds.map(({id:e})=>e));o=o.filter(({kind:t})=>e.has(t))}if(t.languages?.length){const e=new Set(t.languages.map(({id:e})=>e));o=o.filter(({containers:t})=>t?.some(t=>{const o=t.overrides?.runtimeInfo?.language??t.runtimeInfo?.language;return!!o&&e.has(o)}))}if(t.conditions?.length){const e=new Set(t.conditions.map(({id:e})=>e));o=o.filter(({conditions:t})=>t?.some(({type:t,reason:o})=>e.has(`${t}#${o}`)))}if(t.podsAgentInjectionStatus?.length){const e=new Set(t.podsAgentInjectionStatus.map(({id:e})=>e));o=o.filter(({podsAgentInjectionStatus:t})=>e.has(t?.reasonEnum)||e.has(t?.message))}if(t.onlyErrors&&(o=o.filter(e=>e.conditions?.some(e=>e.status===Go.Error))),t.errors?.length){const e=new Set(t.errors.map(({id:e})=>e));o=o.filter(t=>t.conditions?.some(t=>e.has(t.message)))}return o},$r="https://docs.odigos.io",wr="default",Sr="this-cluster",kr="This Cluster",Cr={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},Er={REQUIRED_FIELDS:"Required fields are missing",FIELD_IS_REQUIRED:"This field is required",FORBIDDEN:"Forbidden",ENTERPRISE_ONLY:(e="This")=>`${e} is an Enterprise feature. Please upgrade your plan.`,DEFINED_FOR_ALL_STREAMS:e=>`${e} are defined for all Data Streams.`,CANNOT_EDIT_RULE:"Cannot edit a system-managed instrumentation rule",CANNOT_DELETE_RULE:"Cannot delete a system-managed instrumentation rule",LATENCY_HTTP_ROUTE:'HTTP route must start with a forward slash "/"',READONLY_WARNING:"You're not allowed to create/update/delete in readonly mode",ILLEGAL_K8S_LABEL:'Must be 63 characters or less, must consist of alphanumeric characters, "-", "_", or ".", and must start & end with an alphanumeric character (e.g., my-name, 123.abc).',INVALID_VERSION:'Invalid version format, must be in the format of "major.minor.patch" (e.g. 1.0.0)'},Ar={NAMESPACE:"Namespace",NAME:"Name",KIND:"Kind",CONNECTION:"Connection",CONNECTIONS:"Connections",DATA_STREAM:"Data Stream",DATA_STREAMS:"Data Streams",STREAM_NAME:"Data Stream Name",NAME_YOUR_STREAM:"Name your Data Stream",NAME_YOUR_STREAM_PLACEHOLDER:"e.g. Highest priority",STREAM_DESCRIPTION:"Provide a clear and descriptive name for your pipeline to ensure its purpose is easily understood by you and your team.",STREAM_CONFIRM:"Confirm your new Data Stream",DATA_STREAM_EXISTS_WARNING:(e,t)=>`A Data Stream with this name already exists, you can still rename the current "${e}", but it will merge into the existing "${t}".`,ACTION:"Action",ACTIONS:"Actions",ADD_ACTION:"Add Action",ACTION_DETAILS:"Action Details",INSTRUMENTATION_RULE:"Instrumentation Rule",INSTRUMENTATION_RULES:"Instrumentation Rules",ADD_INSTRUMENTATION_RULE:"Add Instrumentation Rule",INSTRUMENTATION_RULE_DETAILS:"Instrumentation Rule Details",DESTINATION:"Destination",DESTINATIONS:"Destinations",ADD_DESTINATION:"Add Destination",ADD_DESTINATIONS:"Add Destinations",ADD_DESTINATION_DESCRIPTION:"Add a destination to send your telemetry data to. You can add multiple destinations.",DESTINATION_DETAILS:"Destination Details",SELECTED_DESTINATIONS:"Selected Destinations",SOURCE:"Source",SOURCES:"Sources",ADD_SOURCE:"Add Source",SOURCE_DETAILS:"Source Details",SELECT_SOURCES:"Select Sources",SELECTED_SOURCES:"Selected Sources",SELECT_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline.",NO_SOURCES:"No sources",NO_SOURCES_GO_BACK:"No sources selected. Please go back to select sources.",PLEASE_ADD_SOURCE:"Please add a source",NO_SOURCES_NAMESPACE:"No sources available in this namespace",TRY_SEARCH_OR_OTHER_NAMESPACE:"Try searching again or select another namespace.",PLEASE_MAKE_SURE_UNIGNORED_NAMESPACES:"Please make sure your cluster has unignored namespaces",INSTALLATION:"Installation",SOURCES_SETUP:"Sources setup",DESTINATIONS_SETUP:"Destinations setup",SUMMARY:"Summary",REVIEW_SETUP:"Review your setup and confirm your choices.",NO_SOURCES_SELECTED:"No sources selected",ADD_SOURCE_PROMPT:"Add at least one source to start collecting data",NO_DESTINATIONS_SELECTED:"No destinations selected",ADD_DESTINATION_PROMPT:"Add destination so your data has somewhere to go",GET_STARTED_WITH:"Get started with",GET_STARTED_DESCRIPTION:"First, select the sources you want Odigos to monitor. Next, choose where your data should be sent by configuring destinations.",TYPE:"Type",NOTES:"Notes",STATUS:"Status",READONLY:"Readonly",LANGUAGE:"Language",VERSION:"Version",RUNTIME_VERSION:"Runtime Version",VERSION_PLACEHOLDER:"1.0.0",MONITORS:"Monitors",SIGNALS_FOR_PROCESSING:"Signals for Processing",MANAGED_BY_PROFILE:"Managed by Profile",TIER:"Tier",ENTERPRISE:"Enterprise",ENTERPRISE_TIER:"Enterprise Tier",COMMUNITY:"Community",COMMUNITY_TIER:"Community Tier",API_TOKEN:"API Token",API_TOKENS:"API Tokens",DESCRIBE_ODIGOS:"Describe Odigos",DESCRIBE_SOURCE:"Describe Source",DETECTED_CONTAINERS:"Detected Containers",DETECTED_CONTAINERS_DESCRIPTION:"The system automatically instruments the containers it detects with a supported programming language.",DETECTED_PROCESSES:"Detected Processes",DETECTED_PROCESSES_DESCRIPTION:"The system automatically instruments the processes it detects with a supported programming language.",CONTAINER_NAME:"Container Name",FILTERED_COUNT_TOOLTIP:"Represents filtered amount, out of total amount",SEARCH_NAMESPACES:"Search Namespaces",SEARCH_SOURCES:"Search Sources",SELECT_ALL:"Select All",ONLY_SELECTED:"Only selected",ONLY_RUNNING_INSTANCES:"Only running instances",TO_COLLECT_OTEL_DATA:"To collect OpenTelemetry data",TO_MONITOR_OTEL_DATA:"To monitor OpenTelemetry data",TO_MODIFY_OTEL_DATA:"To modify OpenTelemetry data",QUICK_BACK_TO_SUMMARY:"When you finish editing you can quickly go back to the summary.",GO_TO_SUMMARY:"Go to summary",FUTURE_APPS_TITLE:"Instrument entire namespace",FUTURE_APPS_DESCRIPTION:"When enabled, all applications in the namespace and new applications will be instrumented automatically and included in the current data stream using a Namespace Source.",OVERIDE:"Override",OVERIDDEN:"Overridden",OVERRIDE_RUNTIME_DETAILS:"Override Runtime Details",OVERRIDE_RUNTIME_WARNING:"This is an advanced configuration. If the selected programming language is incorrect, data collection may be incomplete or may not occur at all.",ACTIVE:"Active",INACTIVE:"Inactive",ENABLED:"Enabled",DISABLED:"Disabled",NO_TRACES_FOUND:"No traces found",ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC:"Are your services instrumented & producing traffic?",JAVA_CUSTOM_PROBES:"Java Custom Probes",GOLANG_CUSTOM_PROBES:"Golang Custom Probes",ROLLBACK_OCCURRED_MESSAGE:"Odigos detected a crash and rolled back instrumentation to protect your workload.",ROLLBACK_RECOVER:"Recover",FETCHING_NAMESPACES:"Fetching namespaces",FETCHING_NAMESPACES_SUBTITLE:"Please wait while we fetch the namespaces",ADD_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline.",CREATING_SOURCES:"Creating Sources...",CREATING_SOURCES_SUBTITLE:"This may take a few moments while sources are being created.",SELECT_NAMESPACE:"Select namespace from the list",SELECT_NAMESPACE_SUBTITLE:"Add namespace so you can select workloads from it.",CREATING_ACTION:"Creating action",CREATING_ACTION_SUBTITLE:"Please wait while we create the action",ADD_ACTION_DESCRIPTION:"Select an action to modify telemetry data before it's sent to destinations. Choose an action type and configure its details.",CREATING_INSTRUMENTATION_RULE:"Creating instrumentation rule",CREATING_INSTRUMENTATION_RULE_SUBTITLE:"Please wait while we create the instrumentation rule",ADD_INSTRUMENTATION_RULE_DESCRIPTION:"Define how telemetry is recorded from your application. Choose a rule type and configure the details.",CREATING_DESTINATION:"Creating destination",CREATING_DESTINATION_SUBTITLE:"Please wait while we create the destination",ADD_DESTINATION_DRAWER_DESCRIPTION:"Add backend destination you want to connect with Odigos."},Dr={GET_STARTED:"Get started",ADD:"Add",ADD_NEW:"Add New",NEW:"New",SELECT:"Select",CREATE:"Create",UPDATE:"Update",EDIT:"Edit",DELETE:"Delete",CANCEL:"Cancel",DONE:"Done",SAVE:"Save",BACK:"Back",NEXT:"Next",TEST:"Test",TEST_CONNECTION:"Test Connection",INSTRUMENT:"Instrument",UNINSTRUMENT:"Uninstrument"},Tr=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||t===wr&&!e.dataStreamNames.length):[],Ir=(e,t="",o={})=>{for(const r in e)if(e.hasOwnProperty(r)){const n=e[r],i=t?`${t}.${r}`:r;null===n||"object"!=typeof n||Array.isArray(n)?Array.isArray(n)?n.forEach((e,t)=>{const r=`${i}[${t}]`;null!==e&&"object"==typeof e?Ir(e,r,o):o[r]=e}):o[i]=n:Ir(n,i,o)}return o},Nr=e=>{if(!e)return"0 KB/s";const t=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,t)).toFixed(0===t?0:1)} ${["Bytes/s","KB/s","MB/s","GB/s","TB/s"][t]}`},Rr=e=>{if(!e)return"0 ns";if(e<1e3)return`${e.toFixed(0)} ns`;if(e<1e6){const t=e/1e3;return`${t.toFixed(t<10?2:0)} μs`}if(e<1e9){const t=e/1e6;return`${t.toFixed(t<10?2:0)} ms`}if(e<6e10){const t=e/1e9;return`${t.toFixed(t<10?2:0)} s`}if(e<36e11){const t=e/6e10;return`${t.toFixed(t<10?2:0)} m`}if(e<864e11){const t=e/36e11;return`${t.toFixed(t<10?2:0)} h`}{const t=e/864e11;return`${t.toFixed(t<10?2:0)} d`}},Or=()=>{const e=crypto.getRandomValues(new Uint8Array(16));let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,o=>{const r=e[t%16];t++;return("1"===o?r:"0"===o?63&r|128:15&r|64).toString(16)})},_r=e=>{const t=e?.toLowerCase(),o=t?.includes(Do.Samplers),r=t===Do.Attributes;if(o)return l;if(r)return c;return{[To.K8sAttributes]:m,[To.AddClusterInfo]:h,[To.DeleteAttributes]:u,[To.PiiMasking]:c,[To.RenameAttributes]:p,[To.URLTemplatization]:d,[To.ErrorSampler]:l,[To.ProbabilisticSampler]:l,[To.LatencySampler]:l,[To.ServiceNameSampler]:l,[To.SpanAttributeSampler]:l}[e]||g},Fr=e=>{const t=e?.filter(({status:e})=>e===Go.Error),o=e?.filter(({status:e})=>e===Go.Warning),r=e?.filter(({status:e})=>e===qo.Disabled),n=e?.filter(({status:e})=>e===qo.Loading),i=t.length>0,a=o.length>0,s=r.length>0;return{errors:t,hasErrors:i,warnings:o,hasWarnings:a,disableds:r,hasDisableds:s,loadings:n,hasLoadings:n.length>0,priorotizedStatus:i?Go.Error:a?Go.Warning:s?Go.Info:void 0}},Pr=e=>{const t=e?.reduce((e,t)=>t.agentEnabled?.agentEnabled?e+1:e,0);return`${t}/${e?.length||0} instrumented`},Lr=e=>({[Uo.Java]:R,[Uo.Go]:N,[Uo.JavaScript]:I,[Uo.Python]:T,[Uo.DotNet]:D,[Uo.CSharp]:A,[Uo.CPlusPlus]:E,[Uo.Php]:C,[Uo.Ruby]:k,[Uo.Rust]:S,[Uo.Swift]:w,[Uo.Elixir]:$,[Uo.MySql]:v,[Uo.Nginx]:b,[Uo.Postgres]:y,[Uo.Redis]:x,[Uo.Kafka]:f,[Uo.Ignored]:g,[Uo.Unknown]:g,[Uo.Processing]:g,[Uo.NoContainers]:g,[Uo.NoRunningPods]:g}[e]||g),zr=e=>e?.map(e=>{return Lr((t=e,t.overrides?.runtimeInfo?.language??t.runtimeInfo?.language??"unknown"));var t})||[],Mr=e=>e?.map(e=>Lr(e))||[],Br=e=>e.detectedLanguages?.length?Mr(e.detectedLanguages):zr(e.containers),Ur=(e,t)=>{const o={[tr.Alauda]:Pe,[tr.AlibabaCloud]:Fe,[tr.AppDynamics]:_e,[tr.Axiom]:Oe,[tr.AzureBlob]:Re,[tr.AzureMonitor]:Ne,[tr.BetterStack]:Ie,[tr.Bonree]:Te,[tr.Causely]:De,[tr.Checkly]:Ae,[tr.Chronosphere]:Ee,[tr.ClickHouse]:Ce,[tr.CloudWatch]:ke,[tr.Coralogix]:Se,[tr.Dash0]:we,[tr.Datadog]:$e,[tr.Dynamic]:q,[tr.Dynatrace]:ve,[tr.ElasticApm]:be,[tr.ElasticSearch]:ye,[tr.GoogleCloud]:xe,[tr.GoogleCloudOTLP]:xe,[tr.GrafanaCloudLoki]:fe,[tr.GrafanaCloudPrometheus]:fe,[tr.GrafanaCloudTempo]:fe,[tr.Greptime]:ge,[tr.Groundcover]:me,[tr.Honeycomb]:he,[tr.HyperDX]:ue,[tr.Instana]:pe,[tr.Jaeger]:de,[tr.Kafka]:f,[tr.Kloudmate]:ce,[tr.Last9]:le,[tr.Lightstep]:se,[tr.LogzIo]:ae,[tr.Loki]:ie,[tr.Lumigo]:ne,[tr.Middleware]:re,[tr.NewRelic]:oe,[tr.Observe]:te,[tr.Odigos]:ee,[tr.OneUptime]:Z,[tr.OpenObserve]:Q,[tr.Opsverse]:Y,[tr.Oracle]:J,[tr.OTLP]:q,[tr.OTLPHttp]:q,[tr.Prometheus]:K,[tr.Qryn]:G,[tr.QrynOss]:V,[tr.Quickwit]:X,[tr.S3]:H,[tr.Seq]:W,[tr.Signalfx]:U,[tr.Signoz]:j,[tr.Splunk]:U,[tr.SplunkSapm]:U,[tr.SplunkOtlp]:U,[tr.SumoLogic]:B,[tr.TelemetryHub]:M,[tr.Tempo]:z,[tr.Tingyun]:L,[tr.Traceloop]:P,[tr.Uptrace]:F,[tr.VictoriaMetrics]:_,[tr.VictoriaMetricsCloud]:_,[tr.XRay]:O}[e];return o&&!t?{icon:o}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},jr=e=>({[Wo.Namespace]:Ue,[Wo.Source]:Be,[Wo.Destination]:Me,[Wo.Action]:d,[Wo.InstrumentationRule]:ze,[Wo.SamplingRule]:Le}[e]),Wr=e=>"ruleId"in e&&e.ruleId?e.ruleId:"id"in e&&e.id?e.id:"namespace"in e&&e.namespace&&"kind"in e&&e.kind&&"name"in e&&e.name?{namespace:e.namespace,name:e.name,kind:e.kind}:"name"in e&&e.name?e.name:void 0,Hr=e=>e?"string"==typeof e?e:`${e.namespace}/${e.kind}/${e.name}`:"",Xr=e=>Hr(Wr(e)),Vr=(e,t,o)=>{const{extended:r,prioritizeDisplayName:n}=o||{};let i="",a="";switch(t){case Wo.InstrumentationRule:const t=e;i=t.type,a=t.ruleName;break;case Wo.Source:const o=e;i=o.name,a=o.otelServiceName;break;case Wo.Action:const r=e;i=r.type,a=r.name;break;case Wo.Destination:const n=e;i=n.destinationType.displayName,a=n.name;break;case Wo.Namespace:const s=e;i=s.name,a=s.name}return r?i+(a&&a!==i?` (${a})`:""):n&&a||i},Gr=(e,t)=>{if(t===Wo.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[o,r]=e.split("=");t[o]=r}),t}return e},Kr=e=>({[ir.CodeAttributes]:Xe,[ir.CustomInstrumentation]:He,[ir.HeadersCollection]:We,[ir.PayloadCollection]:je,[ir.UnknownType]:g}[e]||g),qr=e=>e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??Uo.Unknown,Jr=e=>{const{numberOfInstances:t,containers:o}=e;if(!o)return t&&t>0?Uo.Processing:Uo.NoRunningPods;const r=o?.filter(e=>qr(e)!==Uo.Ignored);if(!r.length)return Uo.NoContainers;const n=r.find(e=>qr(e)!==Uo.Unknown);return n?qr(n):Uo.Unknown},Yr=(e,t,o)=>(t===Wo.Source?e?.sources.find(e=>e.kind===o.kind&&e.name===o.name&&e.namespace===o.namespace):e?.destinations.find(e=>e.id===o))||{throughput:0},Qr=e=>({[mr.Logs]:Ke,[mr.Metrics]:Ge,[mr.Traces]:Ve}[e]),Zr=e=>{if(!e)return ee;return{[Mo.K8s]:m,[Mo.Vm]:qe}[e]},en=e=>{if(!e)return"Unknown";return{[Mo.K8s]:"Kubernetes Cluster",[Mo.Vm]:"Virtual Machine"}[e]},tn=(e,t,o)=>{const r=e[t];return r?r.flatMap(e=>{const r=e[o],n=[];return void 0!==r&&(Array.isArray(r)?n.push(...r):n.push(r)),n.push(...tn(e,t,o)),n}):[]},on=(e,t)=>{if(t===Wo.Source){let t="";return Object.entries(e).forEach(([e,o])=>{t+=`${e}=${o}&`}),t.slice(0,-1),t}return e},rn=(e,t,o)=>{switch(t){case Go.Default:return e.v2.colors.purple[o];case Go.Info:return e.v2.colors.blue[o];case Go.Error:return e.v2.colors.red[o];case Go.Warning:return e.v2.colors.yellow[o];case Go.Success:return e.v2.colors.green[o];case qo.Loading:case Jo.Disabled:case Jo.Unknown:return e.v2.colors.silver[o];default:return e.v2.colors.white[500]}},nn=e=>{switch(e){case dr.Updating:case pr.Pending:case ur.ContainerCreating:case hr.Waiting:return Go.Info;case dr.Healthy:case pr.Succeeded:case pr.Running:case ur.Running:case hr.Running:return Go.Success;case dr.Degraded:return Go.Warning;case dr.Failed:case pr.Failed:case ur.Error:case ur.CrashLoopBackOff:case ur.CreateContainerError:case ur.CreateContainerConfigError:case ur.ErrImagePull:case ur.ErrImageNeverPull:case ur.ImagePullBackOff:case ur.InvalidImageName:case ur.RegistryUnavailable:case ur.NetworkNotReady:case ur.OOMKilled:case ur.ContainerCannotRun:case hr.Terminated:case ur.DeadlineExceeded:case ur.StartError:return Go.Error;case dr.Down:case ur.Completed:return Jo.Disabled;case dr.Unknown:case pr.Unknown:default:return Jo.Unknown}};var an,sn;!function(e){e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.P="p",e.Span="span"}(an||(an={})),function(e){e.XXXS="xxxs",e.XXS="xxs",e.XS="xs",e.S="s",e.M="m",e.L="l",e.XL="xl",e.XXL="xxl",e.XXXL="xxxl"}(sn||(sn={}));const ln=r.p`
2
- margin: 0;
3
- color: ${({$color:e,theme:t})=>e||t.v2.colors.grey[50]};
4
- font-family: ${({theme:e})=>e.font_family.primary};
5
- font-size: ${({theme:e,$size:t})=>e.v2.text.size[t]}px;
6
- font-weight: ${({$weight:e})=>e};
7
- text-align: ${({$align:e})=>e};
8
- text-transform: ${({$transform:e})=>e};
9
- line-height: ${({theme:e,$lineHeight:t,$size:o})=>t||`${e.v2.text.size[o]+2}px`};
10
- opacity: ${({$opacity:e})=>e};
11
-
12
- ${({$nowrap:e})=>e&&n`
13
- text-wrap: nowrap;
14
- white-space: nowrap;
15
- overflow: hidden;
16
- text-overflow: ellipsis;
17
- `}
18
-
19
- ${({$underline:e})=>e&&n`
20
- text-decoration: underline;
21
- `}
22
-
23
- ${({$withClick:e})=>e&&n`
24
- cursor: pointer;
25
- &:hover {
26
- text-decoration: underline;
27
- }
28
- `}
29
- `,cn=({children:o,variant:r=an.P,color:n,size:i=sn.S,weight:a=400,opacity:s=1,align:l="left",lineHeight:c,transform:d,nowrap:p,underline:u,onClick:h,disabled:m,...g})=>{const f=o?.toString().split("\n")||[];return e(ln,{as:r,$color:n,$size:i,$weight:a,$opacity:s,$align:l,$lineHeight:c,$transform:d,$nowrap:p,$underline:u,$withClick:!!h&&!m,onClick:m?void 0:h,...g,children:f.map((o,r)=>t(Ut,{children:[o,r!==f.length-1&&e("br",{})]},`typography-${r}-${o}`))})},dn=r.div`
30
- border-radius: 100%;
31
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
32
- position: relative;
33
- `,pn=r.div`
34
- width: 80px;
35
- height: 80px;
36
- border-radius: 100%;
37
- border: 4px solid ${({theme:e})=>e.v2.colors.green[300]};
38
- border-right-color: transparent;
39
- border-left-color: transparent;
40
- border-bottom-color: transparent;
41
- animation: spin 1s linear infinite;
42
- @keyframes spin {
43
- to {
44
- transform: rotate(360deg);
45
- }
46
- }
47
- `,un=r(cn)`
48
- position: absolute;
49
- top: 50%;
50
- left: 50%;
51
- transform: translate(-50%, -50%);
52
- `,hn=({percentage:o})=>t(dn,{children:[e(pn,{}),"number"==typeof o?e(un,{size:sn.M,weight:500,children:`${o}%`}):null]}),mn={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function gn(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const o=(e.match(/^[0-9.]*/)||"").toString();t=o.includes(".")?parseFloat(o):parseInt(o,10);const r=(e.match(/[^0-9]*$/)||"").toString();return mn[r]?{value:t,unit:r}:{value:t,unit:"px"}}function fn(e){const t=gn(e);return`${t.value}${t.unit}`}const xn=((e,t,o)=>{const r=`react-spinners-${e}-${o}`;if("undefined"==typeof window||!window.document)return r;const n=document.createElement("style");document.head.appendChild(n);const i=n.sheet,a=`\n @keyframes ${r} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),r})("SpinnerOld","50% {opacity: 0.3} 100% {opacity: 1}","fade"),yn=({loading:o=!0,color:r,scale:n=1,speedMultiplier:a=1,cssOverride:s={},style:l={},...c})=>{const d=i(),p=r||d.text.secondary;if(!o)return null;const{value:u}=gn(2),h=u+4.2,m=h/2+h/5.5,g=4*h*n,f={position:"relative",width:`${g}px`,height:`${g}px`,scale:n,...l,...s},x=(e,t)=>({position:"absolute",width:fn(1.5),height:fn(4),borderRadius:fn(2),backgroundColor:p,transition:"2s",animationFillMode:"both",animation:`${xn} ${1.2/a}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return t("span",{style:f,...c,children:[e("span",{style:{...x(1,0),top:`calc(50% + ${h}px)`,left:"50%"}}),e("span",{style:{...x(2,-45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...x(3,90),top:"50%",left:`calc(50% + ${h}px)`}}),e("span",{style:{...x(4,45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...x(5,0),top:`calc(50% + ${-1*h}px)`,left:"50%"}}),e("span",{style:{...x(6,-45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${-1*m}px)`}}),e("span",{style:{...x(7,90),top:"50%",left:`calc(50% + ${-1*h}px)`}}),e("span",{style:{...x(8,45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${-1*m}px)`}})]})},bn=r.div`
53
- width: ${({$size:e})=>e}px;
54
- height: ${({$size:e})=>e}px;
55
- border-radius: 100%;
56
- background: ${({$color:e})=>e};
57
- display: flex;
58
- align-items: center;
59
- justify-content: center;
60
- `,vn=({scale:t,icon:o})=>{const r=i();return e(bn,{$size:45*t,$color:"rgba(80, 246, 232, 0.10)",children:e(bn,{$size:43*t,$color:"rgba(80, 246, 232, 0.20)",children:e(bn,{$size:39*t,$color:"rgba(80, 246, 232, 0.40)",children:e(bn,{$size:33*t,$color:"rgba(80, 246, 232, 0.60)",children:e(bn,{$size:23*t,$color:"#50F6E8",children:e(o,{size:16*t,fill:r.v2.colors.black[500]})})})})})})},$n=434,wn=635,Sn=r.div`
61
- width: ${434}px;
62
- height: ${635}px;
63
- display: flex;
64
- flex-direction: column;
65
- align-items: center;
66
- justify-content: center;
67
- padding: 16px;
68
- background: linear-gradient(180deg, #0b0517 2.82%, #190d31 100%);
69
- position: relative;
70
- `,kn=r.div`
71
- position: absolute;
72
- top: 50%;
73
- left: 50%;
74
- transform: translate(-50%, -50%);
75
- `,Cn=()=>t(Sn,{children:[e(kn,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"464",height:"464",viewBox:"0 0 464 464",fill:"none",children:[e("path",{opacity:"0.1",d:"M231.567 463.134C359.458 463.134 463.134 359.458 463.134 231.567C463.134 103.676 359.458 0 231.567 0C103.676 0 0 103.676 0 231.567C0 359.458 103.676 463.134 231.567 463.134Z",fill:"url(#paint0_radial_164_65835)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65835",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(201.232 229.641) scale(231.217)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),e("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),e("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),e("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),e("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),e("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),e("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"})]})})]})}),e(kn,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"432",height:"432",viewBox:"0 0 432 432",fill:"none",children:[e("path",{opacity:"0.3",d:"M215.921 431.841C335.17 431.841 431.841 335.17 431.841 215.921C431.841 96.6709 335.17 0 215.921 0C96.6709 0 0 96.6709 0 215.921C0 335.17 96.6709 431.841 215.921 431.841Z",fill:"url(#paint0_radial_164_65836)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65836",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(204.229 214.376) scale(216.276)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),e("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),e("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),e("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),e("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),e("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),e("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),e("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e(kn,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"374",height:"374",viewBox:"0 0 374 374",fill:"none",children:[e("path",{opacity:"0.5",d:"M186.963 373.927C290.22 373.927 373.927 290.22 373.927 186.963C373.927 83.7063 290.22 0 186.963 0C83.7063 0 0 83.7063 0 186.963C0 290.22 83.7063 373.927 186.963 373.927Z",fill:"url(#paint0_radial_164_65837)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65837",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(166.792 184.246) scale(186.963)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),e("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),e("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),e("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),e("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),e("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),e("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e(kn,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"257",height:"257",viewBox:"0 0 257 257",fill:"none",children:[e("path",{opacity:"0.7",d:"M128.193 256.387C198.992 256.387 256.387 198.992 256.387 128.193C256.387 57.3941 198.992 0 128.193 0C57.3941 0 0 57.3941 0 128.193C0 198.992 57.3941 256.387 128.193 256.387Z",fill:"url(#paint0_radial_164_65838)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65838",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(113.263 126.219) scale(128.08)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),e("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),e("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),e("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),e("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),e("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),e("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e(kn,{children:e(ee,{size:112})})]}),En=r.div`
76
- flex: 1;
77
- align-self: stretch;
78
- display: flex;
79
- flex-direction: column;
80
- gap: ${({$gap:e=24})=>e}px;
81
- overflow-x: scroll;
82
-
83
- max-height: calc(100vh - 24px - ${({$heightOffset:e})=>e||0}px);
84
- padding: 24px 24px 0 24px;
85
- `,An=r.div`
86
- position: relative;
87
-
88
- // inherit all the properties of the parent (PageContent)
89
- flex: inherit;
90
- align-self: inherit;
91
- display: inherit;
92
- flex-direction: inherit;
93
- gap: inherit;
94
- overflow-x: inherit;
95
- `,Dn=r.div`
96
- padding: ${({$padding:e})=>e||"12px"};
97
- `,Tn=r.div`
98
- display: flex;
99
- flex-direction: row;
100
- flex-wrap: ${({$wrap:e="unset"})=>e};
101
- align-items: ${({$alignItems:e="center"})=>e};
102
- justify-content: ${({$justifyContent:e="unset"})=>e};
103
- gap: ${({$gap:e=2})=>e}px;
104
- width: ${({$width:e})=>e||"unset"};
105
- height: ${({$height:e})=>e||"unset"};
106
- margin: ${({$margin:e="unset"})=>e};
107
- padding: ${({$padding:e="unset"})=>e};
108
- `,In=r.div`
109
- display: flex;
110
- flex-direction: column;
111
- flex-wrap: ${({$wrap:e="unset"})=>e};
112
- align-items: ${({$alignItems:e="unset"})=>e};
113
- justify-content: ${({$justifyContent:e="unset"})=>e};
114
- gap: ${({$gap:e=2})=>e}px;
115
- width: ${({$width:e})=>e||"unset"};
116
- height: ${({$height:e})=>e||"unset"};
117
- margin: ${({$margin:e="unset"})=>e};
118
- padding: ${({$padding:e="unset"})=>e};
119
- `,Nn=r(In)`
120
- width: ${({$width:e})=>e||"100%"};
121
- height: ${({$height:e})=>e||"unset"};
122
- padding: ${({$padding:e})=>e||"unset"};
123
- align-items: center;
124
- justify-content: center;
125
- `,Rn=r.div`
126
- display: flex;
127
- flex-direction: column;
128
- padding: 12px;
129
- overflow-y: scroll;
130
- `,On=r.div`
131
- position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
132
- top: 0;
133
- left: 0;
134
- right: 0;
135
- bottom: 0;
136
- z-index: 1000;
137
- background: rgba(0, 0, 0, 0.6);
138
- backdrop-filter: blur(2px);
139
- `,_n=r.div`
140
- width: 800px;
141
- min-height: ${({$minHeight:e})=>e||"unset"};
142
- height: ${({$isNotModal:e})=>e?"fit-content":"calc(100vh - 350px)"};
143
- margin: ${({$isNotModal:e})=>e?"64px 0 0 0":"64px 7vw 32px 7vw"};
144
- padding: 0 2px;
145
- overflow-y: scroll;
146
- `,Fn=r(In)`
147
- max-width: ${({$maxWidth:e})=>e||"unset"};
148
- width: 100%;
149
- `,Pn=r(Tn)`
150
- gap: 16px;
151
- padding: 16px;
152
- `,Ln=r.div`
153
- width: 100%;
154
- max-height: ${({$maxHeight:e})=>e||"unset"};
155
- overflow-y: auto;
156
- `,zn=a`
157
- 0% {
158
- background-position: 0% 50%;
159
- }
160
- 100% {
161
- background-position: 100% 50%;
162
- }
163
- `,Mn=r(cn)`
164
- background: ${({$titleColor:e,$gradientColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
165
- background-size: 250% 100%; /* Expand background to allow movement */
166
- background-clip: text;
167
- color: transparent;
168
- animation: ${zn} 1s reverse linear infinite;
169
- `,Bn=e=>{const t=Math.max(0,Date.now()-e),o=Math.floor(t/1e3),r=Math.floor(o/60),n=o%60;return`${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`},Un=({icon:o,title:r,titleColor:n,titleSize:a=sn.S,subTitle:s,subTitleColor:l,subTitleSize:c=sn.XXXS,startedAt:d,withGradient:p,gradientColor:u,withSpinner:h,withSpinnerOld:m,scaleSpinnerOld:g=1,percentage:f,withVisual:x,visualIcon:y=Je})=>{const b=i(),[v,$]=jt(()=>d?Bn(d):"");Wt(()=>{if(!d)return;$(Bn(d));const e=setInterval(()=>$(Bn(d)),1e3);return()=>clearInterval(e)},[d]);const w=n||b.v2.colors.white[500],S=l||b.v2.colors.silver[200],k=u||b.v2.colors.black[500];return t(In,{$gap:16,$alignItems:"center",children:[x?e(vn,{scale:1.7,icon:y}):h?e(hn,{percentage:f}):m?e(yn,{scale:g}):null,(r||s||d||o)&&t(In,{$gap:8,$alignItems:"center",children:[t(Tn,{$gap:4,children:[o&&e(o,{}),p?e(Mn,{align:"center",size:a,$titleColor:w,$gradientColor:k,children:r}):e(cn,{align:"center",size:a,color:w,children:r})]}),s?e(cn,{align:"center",size:c,color:S,children:s}):null,v?e(cn,{align:"center",size:c,color:w,children:v}):null]})]})},jn=(e,t)=>{const o={[Go.Default]:o=>ee({fill:rn(t,e,"300"),...o}),[Go.Info]:o=>ot({fill:rn(t,e,"400"),...o}),[Go.Error]:o=>tt({fill:rn(t,e,"500"),...o}),[Go.Warning]:o=>et({fill:rn(t,e,"500"),...o}),[Go.Success]:o=>Ze({fill:rn(t,e,"500"),...o}),[qo.Loading]:e=>Un({withSpinnerOld:!0,...e}),[Jo.Disabled]:o=>Qe({fill:rn(t,e,"400"),...o}),[Jo.Unknown]:o=>Ye({fill:rn(t,e,"300"),...o})};return o[e]},Wn=e=>{switch(e){case nr.Success:return Go.Success;case nr.Error:case nr.Failure:return Go.Error;case nr.Notice:return Go.Warning;case nr.Unsupported:case nr.Unknown:return Go.Info;case nr.Irrelevant:case nr.Disabled:return qo.Disabled;case nr.Waiting:return qo.Loading;case nr.Pending:default:return Go.Default}},Hn=(e,t)=>{const o=t.find(([t,o])=>e>=t&&(null===o||e<=o));return o?.[2]||null},Xn={redis:x,mysql:v,postgresql:y,postgres:y,kafka:f,elasticsearch:ye,clickhouse:Ce,oracle:J,aws:rt},Vn={sts:gt,dynamodb:mt,s3:H,sqs:ht,sns:ut,lambda:pt,kinesis:dt,ec2:ct,apigateway:lt,apigatewayv2:lt,bedrock:st,bedrockruntime:st,eventbridge:at,sfn:it,stepfunctions:it,secretsmanager:nt,cloudwatch:ke},Gn=e=>{const t=e.attributes,o=t["db.system"];if(o){const e=Xn[o.toLowerCase()];if(e)return e}const r=t["messaging.system"];if(r){const e=Xn[r.toLowerCase()];if(e)return e}const n=t["rpc.system"];if(n?.toLowerCase().includes("aws")){const e=t["rpc.service"]?.toLowerCase();if(e){const t=Vn[e];if(t)return t}return rt}const i=e.serviceName.toLowerCase();for(const[e,t]of Object.entries(Xn))if(i.includes(e))return t;return Me},Kn=({namespace:e,name:t,kind:o})=>({namespace:e,name:t,kind:o});function qn(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const Jn=(e,t)=>{const o=[],r=JSON.parse(JSON.stringify(e));for(const e of r){const r=qn(t.fields,{}),n=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==n&&o.push(...e.items[n].fields.map(e=>({...e,initialValue:r[e.name]})))}return o},Yn=(e,t)=>{const o=e=>e?.some(({healthy:e})=>e.status!==Go.Success);return e?.length?e.some(({instrumentationInstances:e})=>o(e)):o(t)??!1},Qn=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),Zn=e=>{if(!e)return!1;if(e.length>63)return!1;return/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)},ei=(e,t=0)=>{const o=(new Date).getTime();return new Date(e).getTime()-o<=t},ti=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},oi=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,ri=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,ni=e=>ri.test(e),ii=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",ai=e=>e?.map(({status:e,type:t,reason:o,message:r})=>({status:e?.toLowerCase(),type:ii(t),reason:o?ii(o):"",message:r}))||[],si=(e,t)=>{const o=qn(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:o[e.name]??null})).filter(e=>null!==e.value):Object.entries(o).map(([e,t])=>({key:e,name:e,value:t}))},li=e=>e?Object.keys(e).filter(t=>e[t]).map(e=>br[e]):[],ci=e=>e?Object.keys(e).filter(t=>e[t].supported).map(e=>br[e]):[],di=e=>e.replace(/[^\d]/g,""),pi=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},ui=e=>{let t="";try{const o=JSON.parse(e);t=Array.isArray(o)?o.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof o&&null!==o?Object.entries(o).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(o){t=e}return t},hi=e=>{const t=e.fields.reduce((e,{key:t,value:o})=>{const r=(e=>{if(null!=e){if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return String(e);try{return JSON.stringify(e)}catch{return}}})(o);return void 0!==r&&e.push({key:t,value:r}),e},[]);return{...e,fields:t}},mi=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(o=>{const r=e[o];if(Array.isArray(r)){const e=r.filter(e=>null!=e&&""!==e);e.length>0&&(t[o]=e.map(e=>mi(e)))}else if("object"==typeof r&&null!==r){const e=mi(r);Object.keys(e).length>0&&(t[o]=e)}else[void 0,null,""].includes(r)||(t[o]=r)}),t},gi=(e,t=2)=>JSON.stringify(e||{},null,t),fi=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),xi=e=>Object.entries(e).reduce((e,[t,o])=>(e[t]="string"==typeof o?o:JSON.stringify(o),e),{}),yi=e=>{let t=e.toString().replace("v","").split("-")[0];t=t.match(/[\d.]+/)?.[0]||"";const o=t.split(".");return 1e4*parseInt(o[0]||"0",10)+parseInt(o[1]||"0",10)},bi=r.div`
170
- color: ${({$color:e,theme:t})=>e||t.text.secondary};
171
- font-size: ${({$size:e})=>void 0!==e?e:16}px;
172
- font-weight: ${({$weight:e})=>void 0!==e?e:300};
173
- text-align: ${({$align:e})=>e||"left"};
174
- opacity: ${({$opacity:e})=>void 0!==e?e:1};
175
- text-decoration: ${({$decoration:e})=>e||"none"};
176
- text-transform: ${({$transform:e,$family:t})=>e||("secondary"===t?"uppercase":"none")};
177
- font-family: ${({theme:e,$family:t="primary"})=>e.font_family[t]};
178
- white-space: ${({$nowrap:e})=>e?"nowrap":"unset"};
179
- text-wrap: ${({$nowrap:e})=>e?"nowrap":"unset"};
180
- `,vi=e=>{const t=e.match(/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/g);return t?.map(e=>{const[t,o,r]=e.split('"');return{original:e,href:o,label:r.replace("</a>","").replace(">","")}})},$i=e=>{const t=e.match(/<strong[^>]*>(.*?)<\/strong>/g);return t?.map(e=>{const t=e.replace(/<strong[^>]*>/,"").replace(/<\/strong>/,"");return{original:e,label:t}})},wi=(o,r)=>{const n=vi(o);n?.forEach((e,t)=>{o=o.replace(e.original,`LINK-${t}###`)});const i=$i(o);i?.forEach((e,t)=>{o=o.replace(e.original,`STRONG-${t}###`)});return o.split(" ").map(o=>{if(o.includes("LINK-")){const[i,a]=o.split("###"),s=n?.[parseInt(i.replace("LINK-",""))];return t(Ut,{children:[e("a",{href:s?.href,target:"_blank",rel:"noreferrer",style:{color:r.colors.majestic_blue_soft},children:s?.label}),a?`${a} `:" "]},o)}if(o.includes("STRONG-")){const[r,n]=o.split("###"),a=i?.[parseInt(r.replace("STRONG-",""))];return t(Ut,{children:[e("strong",{style:{fontWeight:600},children:a?.label}),n?`${n} `:" "]},o)}return o+" "})},Si=({children:o,color:r,size:n,weight:a,align:s,family:l,opacity:c,decoration:d,transform:p,nowrap:u,...h})=>{const m=i(),g=Ht(()=>(o?["string","number"].includes(typeof o)?o.toString():Array.isArray(o)?o.map(e=>"object"==typeof e&&Object.hasOwn(e,"props")?e.props.children:e).filter(e=>e&&["string","number"].includes(typeof e)).join(" "):"":"").split("\n"),[o]);return e(bi,{$color:r,$size:n,$weight:a,$align:s,$family:l,$opacity:c,$decoration:d,$transform:p,$nowrap:u,...h,children:g.length?g.map((o,r)=>t(Ut,{children:[wi(o,m),r!==g.length-1?e("br",{}):null]},`text-${r}-${o}`)):o})},ki=r.div`
181
- padding: 4px 0 0 0;
182
- `,Ci=r(Si)`
183
- font-size: 12px;
184
- color: ${({theme:e})=>e.text.error};
185
- `,Ei=({children:t})=>e(ki,{children:e(Ci,{children:t})}),Ai=r.div`
186
- position: relative;
187
- width: 100%;
188
- `,Di=r.div`
189
- width: calc(100% - 16px);
190
- display: flex;
191
- align-items: center;
192
- height: 36px;
193
- gap: 8px;
194
- padding-left: 12px;
195
- transition: border-color 0.3s;
196
- border-radius: 32px;
197
- border: 1px solid ${({theme:e,$hasError:t})=>t?e.text.error:e.colors.border};
198
-
199
- &:hover {
200
- border-color: ${({theme:e,$hasError:t})=>t?e.text.error_secondary:e.colors.secondary};
201
- }
202
- &:focus-within {
203
- border-color: ${({theme:e,$hasError:t})=>t?e.text.error_secondary:e.colors.secondary};
204
- }
205
- `,Ti=r.input`
206
- flex: 1;
207
- border: none;
208
- outline: none;
209
- background: none;
210
- color: ${({theme:e})=>e.text.secondary};
211
- font-size: 14px;
212
- font-family: ${({theme:e})=>e.font_family.primary};
213
- font-weight: 300;
214
- &::placeholder {
215
- color: ${({theme:e})=>e.text.secondary};
216
- font-family: ${({theme:e})=>e.font_family.primary};
217
- opacity: 0.4;
218
- font-size: 14px;
219
- font-weight: 300;
220
- line-height: 22px;
221
- }
222
-
223
- &:disabled {
224
- cursor: not-allowed;
225
- }
226
- `,Ii=r.ul`
227
- position: absolute;
228
- max-height: 500px;
229
- top: 32px;
230
- border-radius: 24px;
231
- width: calc(100% - 32px);
232
- overflow-y: auto;
233
- background-color: ${({theme:e})=>e.colors.dropdown_bg};
234
- border: 1px solid ${({theme:e})=>e.colors.border};
235
- z-index: 9999;
236
- padding: 12px;
237
- `,Ni=r.li`
238
- width: calc(100% - 24px);
239
- padding: 8px 12px;
240
- cursor: ${({$isList:e})=>e?"default":"pointer"};
241
- border-radius: 24px;
242
- gap: 8px;
243
- display: flex;
244
- align-items: ${({$isList:e})=>e?"flex-start":"center"};
245
- background: transparent;
246
- &:hover {
247
- background: ${({theme:e,$isList:t})=>!t&&e.colors.dropdown_bg_2};
248
- }
249
- `,Ri=r.div`
250
- width: 100%;
251
- `,Oi=r.div`
252
- display: flex;
253
- width: 100%;
254
- `,_i=r.div`
255
- width: 1px;
256
- height: 52px;
257
- background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
258
- position: absolute;
259
- left: 33px;
260
- `,Fi=r.div`
261
- display: flex;
262
- flex-direction: column;
263
- gap: 4px;
264
- `,Pi=r(Si)`
265
- flex: 1;
266
- font-size: 14px;
267
- `,Li=r(Si)`
268
- color: ${({theme:e})=>e.text.grey};
269
- font-size: 10px;
270
- line-height: 150%;
271
- `,zi=r.ul`
272
- padding-left: 0px;
273
- margin: 4px 0 0 0;
274
- list-style: none;
275
- width: 100%;
276
- `,Mi=(e,t)=>t?e.reduce((e,o)=>{if(o.items){const r=Mi(o.items,t);r.length&&e.push({...o,items:r})}else o.label.toLowerCase().includes(t.toLowerCase())&&e.push(o);return e},[]):e,Bi=({placeholder:o="Type to search...",options:r,selectedOption:n,onOptionSelect:i,defaultText:a,onTextChange:s,style:l,disabled:c,errorMessage:d,...p})=>{const[u,h]=jt(n?.label||a||""),[m,g]=jt(Mi(r,u)),[f,x]=jt(!1);jt(-1),Wt(()=>g(Mi(r,u)),[r]);const y=n?.icon,b=e=>{e&&(h(e.label),s?.(e.label)),x(!e),i?.(e)};return t(Ai,{style:l,children:[t(Di,{$hasError:!!d,children:[y&&e(y,{}),e(Ti,{type:"text",value:u,placeholder:o,onChange:e=>{e.stopPropagation();const t=e.target.value,o=Mi(r,t),n=1===o.length&&o[0].label===t?o[0]:void 0;h(t),s?.(t),g(o),b(n)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:c,onBlur:()=>!c&&x(!1),onFocus:()=>!c&&x(!0),...p})]}),f&&m.length?e(Ii,{children:m.map(t=>e(Ui,{option:t,onClick:b},t.type||t.label))}):null,d&&e(Ei,{children:d})]})},Ui=({option:o,renderIcon:r=!0,onClick:n})=>{const i=!!o.items&&o.items.length>0,a=o.icon;return t(Ni,{"data-id":`option-${o.type||o.label}`,$isList:i,onMouseDown:()=>i?null:n(o),children:[a&&r&&e(a,{}),t(Ri,{children:[t(Fi,{children:[e(Pi,{children:o.label}),e(Li,{children:o.description})]}),i&&e(zi,{children:o.items?.map(o=>t(Oi,{children:[e(_i,{}),e(Ui,{option:o,renderIcon:!1,onClick:n})]},o.type||o.label))})]})]})},ji=Bt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})})),Wi=[{type:To.K8sAttributes,icon:_r(To.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[mr.Traces,mr.Metrics,mr.Logs],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:To.AddClusterInfo,icon:_r(To.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[mr.Traces,mr.Metrics,mr.Logs],docsEndpoint:"/pipeline/actions/attributes/addclusterinfo",docsDescription:"This action adds static resource attributes to spans, metrics data points and log records. It is useful to add cluster-wide attributes to all telemetry signals."},{type:To.DeleteAttributes,icon:_r(To.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[mr.Traces,mr.Metrics,mr.Logs],docsEndpoint:"/pipeline/actions/attributes/deleteattribute",docsDescription:"This action will delete the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:To.RenameAttributes,icon:_r(To.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[mr.Traces,mr.Metrics,mr.Logs],docsEndpoint:"/pipeline/actions/attributes/renameattribute",docsDescription:"This action will rename the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:To.PiiMasking,icon:_r(To.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[mr.Traces],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."},{type:To.URLTemplatization,icon:_r(To.URLTemplatization),label:"URL Templatization",description:"Replace dynamic URL path segments with named placeholders to reduce span cardinality.",allowedSignals:[mr.Traces],docsEndpoint:"/pipeline/actions/attributes/urltemplatization",docsDescription:"Normalizes HTTP URL paths by replacing dynamic segments (IDs, UUIDs, dates) with named placeholders (e.g. /user/1234 → /user/{id}). Reduces cardinality of http.route and span names, improving usability in telemetry backends.",minVersion:yi("v1.21.0")}],Hi=[{type:To.ErrorSampler,icon:_r(Do.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[mr.Traces],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:To.LatencySampler,icon:_r(Do.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[mr.Traces],docsEndpoint:"/pipeline/actions/sampling/latencysampler",docsDescription:"This action is an Endpoint Action that samples traces based on their duration for a specific service and endpoint (HTTP route) filter."},{type:To.ProbabilisticSampler,icon:_r(Do.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[mr.Traces],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:To.ServiceNameSampler,icon:_r(Do.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[mr.Traces],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:To.SpanAttributeSampler,icon:_r(Do.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[mr.Traces],docsEndpoint:"/pipeline/actions/sampling/spanattributesampler",docsDescription:"This action supports service name sampling based on the presence or value of specific attributes within a trace."}],Xi=[{label:"Attributes",icon:_r(Do.Attributes),items:Wi},{label:"Samplers",icon:_r(Do.Samplers),items:Hi}];var Vi;!function(e){e.ALL="all",e.UNSAVED="unsaved",e.EXISTS="exists",e.DETECTED="detected",e.SELF_HOSTED="self-hosted",e.MANAGED="managed"}(Vi||(Vi={}));const Gi={[Vi.ALL]:{TITLE:"All",DESCRIPTION:"All destinations"},[Vi.UNSAVED]:{TITLE:"Selected",DESCRIPTION:"These are destinations that you have not yet saved."},[Vi.EXISTS]:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},[Vi.DETECTED]:{TITLE:"Detected by system",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},[Vi.SELF_HOSTED]:{TITLE:"Self hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."},[Vi.MANAGED]:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."}},Ki=[{type:ir.CodeAttributes,icon:Kr(ir.CodeAttributes),label:"Code Attributes",description:"Collect code attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/codeattributes",docsDescription:'The "Code Attributes" rule can be used to add code attributes containing payload data to traces.',supportedLanguages:[Uo.Go,Uo.Python]},{type:ir.CustomInstrumentation,icon:Kr(ir.CustomInstrumentation),label:"Custom Instrumentation",description:"Define custom instrumentation for specific class and methods (i.e. for Java) or explicit symbol (i.e. for Golang).",docsEndpoint:"/pipeline/rules/custominstrumentation",docsDescription:'The "Custom Instrumentation" rule can be used to instrument a specific symbol (i.e. for Golang), or a class and method combination (i.e. for Java) for detailed tracing.',supportedLanguages:[Uo.Go,Uo.Java]},{type:ir.HeadersCollection,icon:Kr(ir.HeadersCollection),label:"Headers Collection",description:"Collect span attributes containing HTTP Headers data to traces.",docsEndpoint:"/pipeline/rules/headerscollection",docsDescription:'The "Headers Collection" rule can be used to add span attributes containing HTTP Headers data to traces.',supportedLanguages:[Uo.Go,Uo.Java,Uo.JavaScript]},{type:ir.PayloadCollection,icon:Kr(ir.PayloadCollection),label:"Payload Collection",description:"Collect span attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/payloadcollection",docsDescription:'The "Payload Collection" rule can be used to add span attributes containing payload data to traces.',supportedLanguages:[Uo.Go,Uo.JavaScript]}],qi="Cancel",Ji="Save",Yi="Edit rule",Qi="Edit auto rule",Zi="Create rule",ea="Delete rule",ta="Save",oa="Rule name",ra="Rule type",na="Rule Enabled",ia="Rule Disabled",aa="Note",sa="HTTP route",la="Method",ca="Keep Percentage",da="Drop Percentage",pa="Keep traces with duration larger than",ua="Keep traces with errors",ha="Keep at least this percentage of matching traces",ma="Keep at most this percentage of matching traces",ga="Custom percentage",fa="Disabled rule",xa="Sample",ya="Keep all",ba="Drop all",va="Operation type",$a="HTTP route prefix",wa="Templated path",Sa="Templated path prefix",ka="Kafka topic",Ca="Custom duration (ms)",Ea="No preview available",Aa="Server address",Da="Drop at most this percentage of matching traces",Ta="Unnamed rule",Ia="Sampling Preview",Na="Source Scope",Ra="Operation",Oa="Duration",_a="Errors",Fa="Keep Percentage",Pa="Drop Percentage",La="Define which sources this rule applies to. You can target specific services, namespaces, or apply the rule to the entire cluster.",za="Define which operations this rule applies to. You can target specific endpoints or requests, or apply the rule to all operations in the selected services.",Ma="Define a duration threshold for this rule. Traces with a duration longer than the specified value will be considered important and retained.",Ba="Retain traces with errors from the selected services and operations.",Ua="Specify the exact percentage of matching traces to keep",ja="Specify the exact percentage of matching traces to drop",Wa="Type rule name",Ha="Add note here...",Xa="Type here",Va="Search source name",Ga="e.g. collector.my.vendor.com",Ka="Optional notes (not used by the system). Add any context or details for this sampling rule.",qa="Rule will apply to all sources in the cluster",Ja="If multiple source scopes are set, they must all match simultaneously.",Ya="All sources",Qa="-",Za="All",es="All operations",ts="HTTP server endpoint",os="HTTP client endpoint",rs="Kafka consumer",ns="Kafka producer",is="Sampling Rules",as='Control how traces are categorized based on "Importance" and potential value, for fine grain control of what is kept and what is dropped.',ss="Refresh",ls="Create rule",cs="Sampling docs",ds="75vw",ps="Delete rule?",us="Are you sure you want to delete this sampling rule?",hs="Delete",ms="Cancel",gs="Kubernetes Health Probes",fs="Keep All Error Traces",xs="Drop Traces Cluster-Wide",ys="A rule with the same matching conditions already exists.",bs="Create 'Noisy Operation Kubernetes Health Probes' rule",vs="Edit 'Noisy Operation Kubernetes Health Probes' rule",$s="Automatically detect and sample health probe traces across the cluster.",ws="Create 'Highly Relevant Operations' rule",Ss="Edit 'Highly Relevant Operations' rule",ks="Automatically keep all error traces across the entire cluster.",Cs="Create 'Cost Reduction' rule",Es="Edit 'Cost Reduction' rule",As="Automatically drop a percentage of traces across the entire cluster.",Ds={noisy:"Rules that reduce noise from high-volume, low-value operations using Head Sampling.",highlyRelevant:"Add a rule to identify highly relevant operations. Traces with errors, long duration, or from critical endpoints and key workflows will be retained so important transactions are always available for analysis.",costReduction:"Rules that optimize costs by sampling less critical data using Tail Sampling."},Ts={noisy:bs,highlyRelevant:ws,costReduction:Cs},Is={noisy:vs,highlyRelevant:Ss,costReduction:Es},Ns={noisy:"Noisy Operation",highlyRelevant:"Highly Relevant",costReduction:"Cost Reduction"},Rs=[{id:mr.Logs,value:"Logs"},{id:mr.Metrics,value:"Metrics"},{id:mr.Traces,value:"Traces"}],Os={[Uo.Go]:"Go",[Uo.Java]:"Java",[Uo.JavaScript]:"Node.js",[Uo.Python]:"Python",[Uo.DotNet]:".NET",[Uo.CSharp]:"C#",[Uo.CPlusPlus]:"C++",[Uo.Php]:"PHP",[Uo.Ruby]:"Ruby",[Uo.Rust]:"Rust",[Uo.Swift]:"Swift",[Uo.Elixir]:"Elixir",[Uo.MySql]:"MySQL",[Uo.Nginx]:"Nginx",[Uo.Postgres]:"PostgreSQL",[Uo.Redis]:"Redis",[Uo.Kafka]:"Kafka",[Uo.Ignored]:"Ignored",[Uo.Unknown]:"Unknown",[Uo.Processing]:"Processing",[Uo.NoContainers]:"No Containers",[Uo.NoRunningPods]:"No Running Pods"},_s=[{id:Uo.Go,value:Os[Uo.Go],icon:Lr(Uo.Go)},{id:Uo.Java,value:Os[Uo.Java],icon:Lr(Uo.Java)},{id:Uo.JavaScript,value:Os[Uo.JavaScript],icon:Lr(Uo.JavaScript)},{id:Uo.Python,value:Os[Uo.Python],icon:Lr(Uo.Python)},{id:Uo.Php,value:Os[Uo.Php],icon:Lr(Uo.Php)},{id:Uo.Ruby,value:Os[Uo.Ruby],icon:Lr(Uo.Ruby)},{id:Uo.Rust,value:Os[Uo.Rust],icon:Lr(Uo.Rust)},{id:Uo.DotNet,value:Os[Uo.DotNet],icon:Lr(Uo.DotNet)},{id:Uo.CSharp,value:Os[Uo.CSharp],icon:Lr(Uo.CSharp)},{id:Uo.CPlusPlus,value:Os[Uo.CPlusPlus],icon:Lr(Uo.CPlusPlus)},{id:Uo.Swift,value:Os[Uo.Swift],icon:Lr(Uo.Swift)},{id:Uo.Elixir,value:Os[Uo.Elixir],icon:Lr(Uo.Elixir)}],Fs={id:rr.OpentelemetryEbpfInstrumentation,value:rr.OpentelemetryEbpfInstrumentation,icon:q},Ps={[Uo.Go]:{community:[{id:rr.GolangCommunity,value:rr.GolangCommunity,icon:Lr(Uo.Go)},Fs],enterprise:[{id:rr.GolangEnterprise,value:rr.GolangEnterprise,icon:Lr(Uo.Go)}]},[Uo.JavaScript]:{community:[{id:rr.NodejsCommunity,value:rr.NodejsCommunity,icon:Lr(Uo.JavaScript)},Fs],enterprise:[{id:rr.NodejsEnterprise,value:rr.NodejsEnterprise,icon:Lr(Uo.JavaScript)}]},[Uo.Python]:{community:[{id:rr.PythonCommunity,value:rr.PythonCommunity,icon:Lr(Uo.Python)},Fs],enterprise:[{id:rr.PythonEnterprise,value:rr.PythonEnterprise,icon:Lr(Uo.Python)}]},[Uo.Java]:{community:[{id:rr.JavaCommunity,value:rr.JavaCommunity,icon:Lr(Uo.Java)},Fs],enterprise:[{id:rr.JavaEnterprise,value:rr.JavaEnterprise,icon:Lr(Uo.Java)},{id:rr.JavaEbpfInstrumentations,value:rr.JavaEbpfInstrumentations,icon:Lr(Uo.Java)}]},[Uo.DotNet]:{community:[{id:rr.DotNetCommunity,value:rr.DotNetCommunity,icon:Lr(Uo.DotNet)},Fs],enterprise:[{id:rr.DotNetEnterprise,value:rr.DotNetEnterprise,icon:Lr(Uo.DotNet)}]},[Uo.Ruby]:{community:[{id:rr.RubyCommunity,value:rr.RubyCommunity,icon:Lr(Uo.Ruby)},Fs],enterprise:[{id:rr.RubyEnterprise,value:rr.RubyEnterprise,icon:Lr(Uo.Ruby)}]},[Uo.Php]:{community:[{id:rr.PhpCommunity,value:rr.PhpCommunity,icon:Lr(Uo.Php)},Fs],enterprise:[]},[Uo.CSharp]:{community:[],enterprise:[{id:rr.CPlusPlusEnterprise,value:rr.CPlusPlusEnterprise,icon:Lr(Uo.CSharp)}]},[Uo.MySql]:{community:[],enterprise:[{id:rr.MySqlEnterprise,value:rr.MySqlEnterprise,icon:Lr(Uo.MySql)}]},[Uo.CPlusPlus]:{community:[Fs],enterprise:[]},[Uo.Rust]:{community:[Fs],enterprise:[]},[Uo.Swift]:{community:[Fs],enterprise:[]},[Uo.Elixir]:{community:[Fs],enterprise:[]},[Uo.Nginx]:{community:[Fs],enterprise:[]},[Uo.Postgres]:{community:[Fs],enterprise:[]},[Uo.Redis]:{community:[Fs],enterprise:[]},[Uo.Kafka]:{community:[Fs],enterprise:[]},[Uo.Ignored]:{community:[],enterprise:[]},[Uo.Unknown]:{community:[],enterprise:[]},[Uo.Processing]:{community:[],enterprise:[]},[Uo.NoContainers]:{community:[],enterprise:[]},[Uo.NoRunningPods]:{community:[],enterprise:[]}},Ls=6048e5,zs=Bt()(Zt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:Cr.DARK_MODE,storage:"undefined"!=typeof window?eo(()=>localStorage):void 0})),Ms={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:wr},Bs=Bt(e=>({...Ms,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const o=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(o).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(Ms)})),Us=Bt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),js=Bt(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,o)=>{const r=t===Wo.Namespace?"namespacesLoading":t===Wo.Source?"sourcesLoading":t===Wo.Destination?"destinationsLoading":t===Wo.Action?"actionsLoading":t===Wo.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==r&&e({[r]:o})},setEntities:(t,o)=>{const r=t===Wo.Namespace?"namespaces":t===Wo.Source?"sources":t===Wo.Destination?"destinations":t===Wo.Action?"actions":t===Wo.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==r&&e({[r]:o})},addEntities:(t,o)=>{const r=t===Wo.Namespace?"namespaces":t===Wo.Source?"sources":t===Wo.Destination?"destinations":t===Wo.Action?"actions":t===Wo.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==r&&e(e=>{const t=[...e[r]],n=new Map;return t.forEach((e,t)=>{n.set(Xr(e),t)}),o.forEach(e=>{const o=Xr(e),r=n.get(o);void 0!==r?t[r]={...t[r],...e}:(n.set(o,t.length),t.push(e))}),{[r]:t}})},removeEntities:(t,o)=>{const r=t===Wo.Namespace?"namespaces":t===Wo.Source?"sources":t===Wo.Destination?"destinations":t===Wo.Action?"actions":t===Wo.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==r&&e(e=>{const t=new Set(o.map(e=>Hr(e))),n=e[r].filter(e=>!t.has(Xr(e)));return{[r]:n}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),Ws=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),Hs=Bt(e=>({searchText:"",setSearchText:t=>e({searchText:t}),statuses:[],setStatuses:t=>e({statuses:t}),platformTypes:[],setPlatformTypes:t=>e({platformTypes:t}),namespaces:[],setNamespaces:t=>e({namespaces:t}),kinds:[],setKinds:t=>e({kinds:t}),monitors:[],setMonitors:t=>e({monitors:t}),languages:[],setLanguages:t=>e({languages:t}),conditions:[],setConditions:t=>e({conditions:t}),podsAgentInjectionStatus:[],setPodsAgentInjectionStatus:t=>e({podsAgentInjectionStatus:t}),errors:[],setErrors:t=>e({errors:t}),onlyErrors:!1,setOnlyErrors:t=>e({onlyErrors:t}),setAll:t=>e(t),clearAll:()=>e({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),getEmptyState:Ws})),Xs=Bt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),Vs=Bt((e,t)=>({notifications:[],addNotification:o=>{const r=new Date,n=`${r.getTime().toString()}${o.target?`#${o.target}`:""}`,{notifications:i}=t();i.some(e=>e.type===o.type&&e.title===o.title&&e.message===o.message&&!e.dismissed)||e(e=>({notifications:[{...o,id:n,time:r.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const o=e.notifications.findIndex(e=>e.id===t);return-1!==o&&(e.notifications[o].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const o=e.notifications.findIndex(e=>e.id===t);return-1!==o&&(e.notifications[o].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const o=e.notifications.findIndex(e=>e.id===t);return-1!==o&&e.notifications.splice(o,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}}));var Gs;!function(e){e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting",e.DownloadingDiagnose="downloading-diagnose"}(Gs||(Gs={}));const Ks=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),qs=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),Js=Bt((e,t)=>({progress:{},setProgress:(o,r)=>{const n=t(),i=Ks();return"number"==typeof r.total&&(i.total=r.total),"number"==typeof r.current&&(i.current=r.current),Array.isArray(r.list)&&(i.list=r.list),e({progress:{...n.progress,[o]:qs(i)}})},addProgress:(o,r,n)=>{const i=t(),a=Ks(o,i.progress);return a.current+=r,n&&(a.list=a.list?.map(e=>e.label===n.label?{...e,status:n.status}:e)),e({progress:{...i.progress,[o]:qs(a)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),Ys=Bt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),Qs={configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},Zs=(e,t)=>e.destinationType.type!==t.destinationType.type,el=Bt(e=>({...Qs,setConfiguredSources:t=>e({configuredSources:t}),setConfiguredFutureApps:t=>e({configuredFutureApps:t}),setConfiguredDestinations:t=>e({configuredDestinations:t}),addConfiguredDestination:t=>e(e=>({configuredDestinations:[...e.configuredDestinations,t]})),removeConfiguredDestination:t=>e(e=>({configuredDestinations:e.configuredDestinations.filter(e=>Zs(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const o=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(o).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>Zs(e,t))})),clearStore:()=>e(()=>({...Qs}))})),tl={v2:{text:{size:{xxxs:10,xxs:12,xs:14,s:16,m:20,l:24,xl:32,xxl:40,xxxl:48}},colors:{black:{500:"#151618"},white:{500:"#FFFFFF"},purple:{100:"#E1D4FF",200:"#C3AAFF",300:"#A57FFF",400:"#8854FF",500:"#6A2AFF",600:"#5925D0",700:"#4822A2",800:"#371E73",900:"#271A45"},green:{100:"#DCFDFA",200:"#B9FBF6",300:"#96FAF1",400:"#73F8ED",500:"#50F6E8",600:"#44C9BE",700:"#399D94",800:"#2D6F6A",900:"#224340"},grey:{25:"#F6F6F6",50:"#ECECED",100:"#DADADB",150:"#B8B8B8",200:"#B4B5B7",300:"#8F9093",400:"#696B6F",500:"#44464B",600:"#3A3C40",700:"#313236",800:"#282A2E",900:"#1B1B1C"},silver:{25:"#F6F6F7",50:"#EDEDEE",100:"#DADCDE",200:"#B6B8BD",300:"#91959C",400:"#6D717B",500:"#484E5A",600:"#3E424C",700:"#34383F",750:"#2C2F36",800:"#26292F",900:"#1F2125",1e3:"#1B1C1D"},red:{100:"#FFE5E7",200:"#FFCBD0",300:"#FFB0B8",400:"#FF96A1",500:"#FF7C89",600:"#D06772",700:"#A2535B",800:"#733F44",900:"#452B2D",1e3:"#2E2022"},blue:{100:"#EBF0FA",200:"#D6E1F4",300:"#ADC3EA",400:"#84A4DF",500:"#5C86D5",600:"#3368CA",700:"#2D57A6",800:"#274782",900:"#21375E",1e3:"#1C273A"},yellow:{100:"#FFFBF1",200:"#FFF7E2",300:"#FFEFC6",400:"#FFE7A9",500:"#FFDF8D",600:"#FFD770",700:"#D0B05E",800:"#A28A4C",900:"#73633A",1e3:"#453D28"},beige:{600:"#EEC990"},pink:{600:"#F576A2"},orange:{600:"#F29142"}}},colors:{majestic_blue:"#444AD9",majestic_blue_soft:"#6C7AE8",orange_og:"#FE9239",orange_soft:"#FFB160",dark_red:"#802828",darker_red:"#611F1F",darkest_red:"#281515",darkest_red_hover:"#351515",dark_green:"#2D4323"},text:{},font_family:{primary:"Inter, sans-serif",secondary:"Kode Mono, sans-serif",code:"IBM Plex Mono, monospace"}},ol={v2:tl.v2,darkMode:!0,colors:{...tl.colors,primary:"#111111",secondary:"#F9F9F9",border:"#525252",dark_grey:"#151515",translucent_bg:"#1A1A1A",dropdown_bg:"#242424",dropdown_bg_2:"#333333",warning:"#472300",error:"#431919",success:"#172013",info:"#242424",default:"#181944"},text:{white:"#FFFFFF",primary:"#111111",secondary:"#F9F9F9",grey:"#B8B8B8",dark_grey:"#8F8F8F",darker_grey:"#7A7A7A",light_grey:"#CCD0D2",dark_button:"#0A1824",warning:"#E9CF35",warning_secondary:"#FFA349",error:"#EF7676",error_secondary:"#DB5151",success:"#81AF65",success_secondary:"#51DB51",info:"#B8B8B8",info_secondary:"#CCDDDD",default:"#AABEF7",default_secondary:"#8CBEFF"},font_family:tl.font_family},rl={v2:tl.v2,darkMode:!1,colors:{...tl.colors,primary:"#EEEEEE",secondary:"#060606",border:"#ADADAD",dark_grey:"#EAEAEA",translucent_bg:"#E5E5E5",dropdown_bg:"#DBDBDB",dropdown_bg_2:"#CCCCCC",warning:"#F6F092",error:"#FACECE",success:"#C8DEB8",info:"#E0E0E0",default:"#CAD9FB"},text:{white:"#FFFFFF",primary:"#EEEEEE",secondary:"#060606",grey:"#474747",dark_grey:"#707070",darker_grey:"#858585",light_grey:"#332F2D",dark_button:"#F5E7DB",warning:"#A56F12",warning_secondary:"#CA9416",error:"#B63A3A",error_secondary:"#DB5151",success:"#4E763A",success_secondary:"#67964C",info:"#525252",info_secondary:"#7A7A7A",default:"#444AD9",default_secondary:"#6C7AE8"},font_family:tl.font_family},nl=e=>e?ol:rl;var il=Object.freeze({__proto__:null,baseTheme:tl,darkModeTheme:ol,getTheme:nl,lightModeTheme:rl});to('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Kode+Mono:wght@100;200;300;400;500;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");*{-ms-overflow-style:none;scrollbar-width:none}::-webkit-scrollbar{display:none}*{animation-duration:.3s;animation-fill-mode:forwards;transition:all .3s}input{all:unset}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-transition:all 50000s ease-in-out 0s;transition:all 50000s ease-in-out 0s}');const al=({children:t})=>{const{darkMode:o}=zs();return e(s,{theme:nl(o),children:t})},sl={100:"FF","099":"FC","098":"FA","097":"F7","096":"F5","095":"F2","094":"F0","093":"ED","092":"EB","091":"E8","090":"E6","089":"E3","088":"E0","087":"DE","086":"DB","085":"D9","084":"D6","083":"D4","082":"D1","081":"CF","080":"CC","079":"C9","078":"C7","077":"C4","076":"C2","075":"BF","074":"BD","073":"BA","072":"B8","071":"B5","070":"B3","069":"B0","068":"AD","067":"AB","066":"A8","065":"A6","064":"A3","063":"A1","062":"9E","061":"9C","060":"99","059":"96","058":"94","057":"91","056":"8F","055":"8C","054":"8A","053":"87","052":"85","051":"82","050":"80","049":"7D","048":"7A","047":"78","046":"75","045":"73","044":"70","043":"6E","042":"6B","041":"69","040":"66","039":"63","038":"61","037":"5E","036":"5C","035":"59","034":"57","033":"54","032":"52","031":"4F","030":"4D","029":"4A","028":"47","027":"45","026":"42","025":"40","024":"3D","023":"3B","022":"38","021":"36","020":"33","019":"30","018":"2E","017":"2B","016":"29","015":"26","014":"24","013":"21","012":"1F","011":"1C","010":"1A","009":"17","008":"14","007":"12","006":"0F","005":"0D","004":"0A","003":"08","002":"05","001":"03","000":"00"};var ll=Object.freeze({__proto__:null,hex:sl});const cl={in:{left:a`
277
- from { transform: translateX(-100%); }
278
- to { transform: translateX(0); }
279
- `,right:a`
280
- from { transform: translateX(100%); }
281
- to { transform: translateX(0); }
282
- `,top:a`
283
- from { transform: translateY(-100%); }
284
- to { transform: translateY(0); }
285
- `,bottom:a`
286
- from { transform: translateY(100%); }
287
- to { transform: translateY(0); }
288
- `,center:a`
289
- from { transform: translate(-50%, 100%); }
290
- to { transform: translate(-50%, -50%); }
291
- `},out:{left:a`
292
- from { transform: translateX(0); }
293
- to { transform: translateX(-100%); }
294
- `,right:a`
295
- from { transform: translateX(0); }
296
- to { transform: translateX(100%); }
297
- `,top:a`
298
- from { transform: translateY(0); }
299
- to { transform: translateY(-100%); }
300
- `,bottom:a`
301
- from { transform: translateY(0); }
302
- to { transform: translateY(100%); }
303
- `,center:a`
304
- from { transform: translate(-50%, -50%); }
305
- to { transform: translate(-50%, 100%); }
306
- `}},dl={in:a`
307
- from {
308
- width: 0%;
309
- }
310
- to {
311
- width: 100%;
312
- }
313
- `,out:a`
314
- from {
315
- width: 100%;
316
- }
317
- to {
318
- width: 0%;
319
- }
320
- `},pl=a`
321
- 0% {
322
- transform: scale(1);
323
- opacity: 1;
324
- }
325
- 75%, 100% {
326
- transform: scale(2);
327
- opacity: 0;
328
- }
329
- `,ul=a`
330
- 0% {
331
- background-position: -500px 0;
332
- }
333
- 100% {
334
- background-position: 500px 0;
335
- }
336
- `,hl={in:a`
337
- from {
338
- opacity: 0;
339
- }
340
- to {
341
- opacity: 1;
342
- }
343
- `,out:a`
344
- from {
345
- opacity: 1;
346
- }
347
- to {
348
- opacity: 0;
349
- }
350
- `};var ml=Object.freeze({__proto__:null,fade:hl,ping:pl,progress:dl,shimmer:ul,slide:cl});const gl=r.span`
351
- display: flex;
352
- align-items: center;
353
- justify-content: center;
354
-
355
- min-height: 16px;
356
- min-width: 16px;
357
- width: fit-content;
358
- padding: 4px;
359
- gap: 2px;
360
-
361
- border-radius: 50px;
362
- border: 1px solid ${({theme:e,$filled:t,$status:o})=>o?e.text[o]+(t?"":sl["050"]):t?"transparent":e.colors.border};
363
- background-color: ${({theme:e,$filled:t,$status:o})=>t?o?e.colors[o]:e.colors.majestic_blue:"transparent"};
364
- color: ${({theme:e,$filled:t,$status:o})=>t&&o?e.text.secondary:t?e.text.white:o?e.text[o]:e.text.grey};
365
- font-family: ${({theme:e})=>e.font_family.secondary};
366
- font-size: 12px;
367
- white-space: nowrap;
368
-
369
- ${({theme:e,$filled:t,$status:o,$clickable:r})=>r&&`&:hover {\n cursor: pointer;\n background-color: ${o?e.colors[o]+sl["020"]:t?e.colors.majestic_blue_soft:e.colors.secondary+sl["020"]};\n }`}
370
- `,fl=({label:o,filled:r,status:n,withIcon:a,onClick:s})=>{const l=i(),c=n&&a?jn(n,l):null;return t(gl,{$filled:r,$status:n,$clickable:!!s,onClick:s,children:[!!c&&e(c,{}),o]})},xl=r.div`
371
- height: fit-content;
372
- border: 2px solid transparent;
373
- padding: 2px;
374
- border-radius: 32px;
375
- background-color: transparent;
376
- transition: border-color 0.3s ease;
377
- &:focus-within {
378
- border-color: ${({theme:e})=>e.colors.secondary};
379
- }
380
- `,yl={primary:n`
381
- border: 1px solid ${({theme:e})=>e.text.secondary+sl["024"]};
382
- background: ${({theme:e})=>e.colors.secondary};
383
- color: ${({theme:e})=>e.colors.primary};
384
- &:hover {
385
- background: ${({theme:e})=>e.colors.secondary+sl["080"]};
386
- }
387
- &:active {
388
- background: ${({theme:e})=>e.text.secondary+sl["060"]};
389
- }
390
- `,secondary:n`
391
- border: 1px solid ${({theme:e})=>e.colors.border};
392
- background: ${({theme:e})=>e.colors.primary};
393
- color: ${({theme:e})=>e.colors.secondary};
394
- &:hover {
395
- border: 1px solid ${({theme:e})=>e.text.darker_grey};
396
- background: ${({theme:e})=>e.colors.secondary+sl["010"]};
397
- }
398
- &:active {
399
- border: 1px solid ${({theme:e})=>e.text.dark_grey};
400
- background: ${({theme:e})=>e.colors.secondary+sl["015"]};
401
- }
402
- `,tertiary:n`
403
- border-color: transparent;
404
- background: transparent;
405
- &:hover {
406
- background: ${({theme:e})=>e.colors.dropdown_bg_2+sl["040"]};
407
- }
408
- &:active {
409
- background: ${({theme:e})=>e.colors.dropdown_bg_2};
410
- }
411
- `,danger:n`
412
- border-color: transparent;
413
- background: ${({theme:e})=>e.text.error};
414
- &:hover {
415
- background: ${({theme:e})=>e.text.error+sl["090"]};
416
- }
417
- &:active {
418
- background: ${({theme:e})=>e.text.error+sl["080"]};
419
- }
420
- `,warning:n`
421
- border-color: transparent;
422
- background: ${({theme:e})=>e.text.warning};
423
- &:hover {
424
- background: ${({theme:e})=>e.text.warning+sl["090"]};
425
- }
426
- &:active {
427
- background: ${({theme:e})=>e.text.warning+sl["080"]};
428
- }
429
- `},bl=r.button`
430
- height: 36px;
431
- border-radius: 32px;
432
- cursor: pointer;
433
- display: flex;
434
- align-items: center;
435
- justify-content: center;
436
- gap: 8px;
437
- padding: 0 12px;
438
- font-family: ${({theme:e})=>e.font_family.secondary};
439
- text-transform: uppercase;
440
- text-decoration: underline;
441
- font-weight: 600;
442
- outline: none;
443
- ${({$variant:e})=>e&&yl[e]}
444
- ${({disabled:e,$variant:t})=>e&&n`
445
- opacity: 0.5;
446
- cursor: not-allowed;
447
-
448
- ${"primary"===t?n`
449
- color: ${({theme:e})=>e.colors.secondary};
450
- background: ${({theme:e})=>e.text.secondary+sl["010"]};
451
- &:hover {
452
- background: ${({theme:e})=>e.text.secondary+sl["015"]};
453
- }
454
- `:""}
455
- `}
456
- `,vl=({children:t,variant:o="primary",onClick:r,...n})=>{const i=Xt(null);return e(xl,{$variant:o,children:e(bl,{ref:i,$variant:o,onClick:e=>{r&&r(e),i.current?.blur()},...n,children:t})})},$l=e=>{function t(){return void 0===e?{}:wo(e)}const[o,r]=jt(t()),[n,i]=jt({}),a=Vt((e,t)=>{const o={};if(!t||"object"!=typeof t)return e?{...e}:o;for(const[r,n]of Object.entries(e)){const e=r;if(Array.isArray(n)){const r=t[e];Array.isArray(r)&&n.length===r.length&&n.every((e,t)=>"object"==typeof e&&null!==e?0===Object.keys(a(e,r[t])).length:e===r[t])||(o[e]=t[e])}else if("object"==typeof n&&null!==n)if(null==t[e]||"object"!=typeof t[e])o[e]=t[e];else{const r=a(n,t[e]);Object.keys(r).length>0&&(o[e]=r)}else n!==t[e]&&(o[e]=t[e])}for(const r of Object.keys(t))r in e||(o[r]=t[r]);return o},[]),s=(e,t)=>0===Object.keys(a(e,t)).length,l=Ht(()=>void 0!==e&&!s(e,o),[e,o]);Wt(()=>{const n=t();void 0!==e&&"{}"===JSON.stringify(o)&&"{}"!==JSON.stringify(n)&&r(n)},[e,o]);const c=Vt((e,t)=>So("formData"===e?o:n,t.toString()),[o,n]);return{formData:o,formErrors:n,getFormDiff:a,areFormValuesEqual:s,isFormDirty:l,handleFormChange:(e,t,o)=>{if(e){const o=e.toString().split(".");1===o.length?r(o=>({...o,[e]:t})):r(e=>{const r=wo(e);let n=r;for(let e=0;e<o.length-1;e++){const t=o[e];n[t]&&"object"==typeof n[t]||(n[t]={}),n=n[t]}return n[o[o.length-1]]=t,r})}else o&&r({...o})},handleErrorChange:(e,t,o)=>{if(e){const o=e.toString().split(".");1===o.length?i(o=>({...o,[e]:t})):i(e=>{const r=wo(e);let n=r;for(let e=0;e<o.length-1;e++){const t=o[e];n[t]&&"object"==typeof n[t]||(n[t]={}),n=n[t]}return n[o[o.length-1]]=t,r})}else o&&i({...o})},resetFormData:e=>{r(e||t()),i({})},getNestedValue:c}},wl={type:"",name:"",notes:"",signals:[],disabled:!1,fields:{clusterAttributes:null,overwriteExistingValues:null,renames:null,attributeNamesToDelete:null,piiCategories:null,fallbackSamplingRatio:null,samplingPercentage:null,endpointsFilters:null,servicesNameFilters:null,attributeFilters:null,urlTemplatizationRulesGroups:null}},Sl=()=>{const{addNotification:e}=Vs(),{formData:t,formErrors:o,handleFormChange:r,handleErrorChange:n,resetFormData:i}=$l(wl),a=e=>e&&Array.isArray(e)?e.map(e=>!e.fromSources?.length&&e.from?{...e,fromSources:[e.from]}:e):e;return{formData:t,formErrors:o,handleFormChange:r,resetFormData:i,validateForm:o=>{const r={};let i=!0;if(Object.entries(t).forEach(([e,t])=>{switch(e){case"type":case"signals":Qn(t)&&(r[e]=Er.FIELD_IS_REQUIRED)}}),t.type===To.URLTemplatization){const e=t.fields?.urlTemplatizationRulesGroups;if(e)for(const t of e)if(t.templatizationRules?.some(e=>!e.template?.trim())){r.fields=Er.FIELD_IS_REQUIRED;break}}return i=!Object.values(r).length,!i&&o?.withAlert&&e({type:Go.Warning,title:o.alertTitle,message:Er.REQUIRED_FIELDS,hideFromHistory:!0}),n(void 0,void 0,r),i},loadFormWithDrawerItem:({type:e,signals:t,name:o,notes:n,disabled:i,fields:s})=>{const l={...wo(wl),type:e,signals:t,name:o,notes:n,disabled:i};Object.entries(s).forEach(([e,t])=>{if(t)switch(e){case Io.LabelsAttributes:case Io.AnnotationsAttributes:l.fields||(l.fields={}),l.fields[e]=a(t);break;case Io.CollectContainerAttributes:case Io.CollectReplicaSetAttributes:case Io.CollectWorkloadId:case Io.CollectClusterId:case Io.ClusterAttributes:case Io.OverwriteExistingValues:case Io.AttributeNamesToDelete:case Io.Renames:case Io.PiiCategories:case Io.FallbackSamplingRatio:case Io.SamplingPercentage:case Io.EndpointsFilters:case Io.ServicesNameFilters:case Io.AttributeFilters:case Io.UrlTemplatizationRulesGroups:l.fields||(l.fields={}),l.fields[e]=t}}),r(void 0,void 0,l)}}},kl=e=>{Wt(()=>{if(e){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])},Cl=()=>{const{setCurrentModal:e}=Xs(),{setDrawerType:t,setDrawerEntityId:o}=Us(),{setActiveNodeType:r,setActiveNodeId:n,activeNodeId:i}=ji();return{onClickNode:(a,s)=>{const{id:l,type:c,data:{id:d,type:p}}=s;switch(i===l?(r(null),n(null)):(r(c),n(l)),p){case Wo.Source:case Wo.Destination:case Wo.Action:case Wo.InstrumentationRule:t(p),o(d);break;case er.AddSource:e(Wo.Source);break;case er.AddDestination:e(Wo.Destination);break;case er.AddAction:e(Wo.Action);break;case er.AddRule:e(Wo.InstrumentationRule)}}}},El=()=>{const{setDrawerType:e,setDrawerEntityId:t}=Us(),{markAsDismissed:o,markAsSeen:r}=Vs();return{onClickNotification:(n,i)=>{const{id:a,crdType:s,target:l}=n,{dismissToast:c}=i||{};if(s&&l)switch(s){case Wo.InstrumentationRule:e(Wo.InstrumentationRule),t(Gr(l,Wo.InstrumentationRule));break;case Wo.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(Wo.Source),t(Gr(l,Wo.Source));break;case Wo.Action:e(Wo.Action),t(Gr(l,Wo.Action));break;case Wo.Destination:case"Destination":e(Wo.Destination),t(Gr(l,Wo.Destination))}r(a),c&&o(a)}}},Al=()=>{const e=Xt(null),[t,o]=jt(0),[r,n]=jt(0);return Wt(()=>{const t=()=>{if(e.current){const{width:t,height:r}=e.current.getBoundingClientRect();o(t),n(r)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:r}};var Dl;!function(e){e[e.XS=16]="XS",e[e.S=18]="S",e[e.M=24]="M",e[e.L=32]="L"}(Dl||(Dl={}));const Tl=r.div`
457
- width: ${({$size:e})=>1.5*e}px;
458
- height: ${({$size:e})=>1.5*e}px;
459
- display: flex;
460
- align-items: center;
461
- justify-content: center;
462
- border-radius: 100%;
463
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
464
- &:hover {
465
- background: ${({theme:e})=>e.v2.colors.silver[900]};
466
- }
467
- `,Il=({"data-id":t,icon:o,size:r=Dl.S,onClick:n,disabled:i})=>e(Tl,{"data-id":t,$size:r,$disabled:i,onClick:e=>{n&&!i&&(e.stopPropagation(),n(e))},children:e(o,{size:r})}),Nl=({onDone:t}={})=>{const[o,r]=jt(!1),[n,i]=jt(-1),a=Vt(async(e,n)=>{if(!o){if(r(!0),void 0!==n&&i(n),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(e)}catch(e){}else{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(t)}t?.(),setTimeout(()=>{r(!1),i(-1)},1e3)}},[o,t]);return{CopyButton:Vt(({value:t,size:r})=>e(Il,{icon:o?ft:xt,size:r,onClick:()=>a(t)}),[o]),isCopied:o,copiedIndex:n,clickCopy:a}},Rl=e=>{const{addNotification:t}=Vs(),{formData:o,handleFormChange:r,formErrors:n,handleErrorChange:i,resetFormData:a}=$l(e);return{formData:o,formErrors:n,handleFormChange:r,resetFormData:a,validateForm:e=>{const r={};let n=!0;return o.name?Zn(o.name)?r.name=void 0:(n=!1,r.name=Er.ILLEGAL_K8S_LABEL):(n=!1,r.name=Er.FIELD_IS_REQUIRED),!n&&e?.withAlert&&t({type:Go.Warning,title:e.alertTitle,message:Er.REQUIRED_FIELDS,hideFromHistory:!0}),i(void 0,void 0,r),n},loadFormWithDrawerItem:({name:t})=>{const o={...wo(e),name:t};r(void 0,void 0,o)}}},Ol={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},_l=e=>{const{supportedSignals:t,preLoadedFields:o}=e||{},{addNotification:r}=Vs(),{formData:n,formErrors:i,handleFormChange:a,handleErrorChange:s,resetFormData:l}=$l(Ol),[c,d]=jt([]),[p,u]=jt([]);Wt(()=>{var e;u(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:o,componentProperties:r,displayName:n,initialValue:i,renderCondition:a}=e;if(o===Xo.Dropdown){const e=qn(r,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,value:e})):Object.entries(e.values).map(([e,t])=>({id:e,value:t}));return{name:t,componentType:o,title:n,value:i,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:o,title:n,value:i,renderCondition:a,...qn(r,{})}})).map(e=>{if(o){const t="string"==typeof o?qn(o,{}):o;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,o]),Wt(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[p]),Wt(()=>{if(t&&0===li(n.exportedSignals).length){const{logs:e,metrics:o,traces:r}=t;a("exportedSignals",{logs:e.supported,metrics:o.supported,traces:r.supported})}},[t,n.exportedSignals]);return{formData:n,formErrors:i,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let o=!0;return p.forEach(({name:e,value:r,required:n})=>{n&&!r&&(o=!1,t[e]=Er.FIELD_IS_REQUIRED)}),!o&&e?.withAlert&&r({type:Go.Warning,title:e.alertTitle,message:Er.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),o},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:o,exportedSignals:r,fields:n})=>{const i={...wo(Ol),type:e,name:t,disabled:o,exportedSignals:r,fields:Object.entries(qn(n,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,i),i},yamlFields:c,setYamlFields:d,dynamicFields:p,setDynamicFields:u}},Fl={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[cr.HttpRequest]:null,[cr.HttpResponse]:null,[cr.DbQuery]:null,[cr.Messaging]:null},codeAttributes:{[ar.Column]:null,[ar.FilePath]:null,[ar.Function]:null,[ar.LineNumber]:null,[ar.Namespace]:null,[ar.StackTrace]:null},headersCollection:null,customInstrumentations:{[lr.Java]:null,[lr.Golang]:null}},Pl=()=>{const{formData:e,formErrors:t,handleFormChange:o,handleErrorChange:r,resetFormData:n}=$l(Fl);return{formData:e,formErrors:t,handleFormChange:o,resetFormData:n,validateForm:()=>(r(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:r,payloadCollection:n,codeAttributes:i,headersCollection:a,customInstrumentations:s})=>{const l={...wo(Fl),ruleName:e,notes:t,disabled:r};n&&(l.payloadCollection={[cr.HttpRequest]:n[cr.HttpRequest]?{}:null,[cr.HttpResponse]:n[cr.HttpResponse]?{}:null,[cr.DbQuery]:n[cr.DbQuery]?{}:null,[cr.Messaging]:n[cr.Messaging]?{}:null}),i&&(l.codeAttributes={[ar.Column]:i[ar.Column]||null,[ar.FilePath]:i[ar.FilePath]||null,[ar.Function]:i[ar.Function]||null,[ar.LineNumber]:i[ar.LineNumber]||null,[ar.Namespace]:i[ar.Namespace]||null,[ar.StackTrace]:i[ar.StackTrace]||null}),a&&(l.headersCollection=a),s&&(l.customInstrumentations={[lr.Java]:s[lr.Java]||null,[lr.Golang]:s[lr.Golang]||null}),o(void 0,void 0,l)}}},Ll=({active:e,key:t,withAltKey:o,withCtrlKey:r,withShiftKey:n,withMetaKey:i},a)=>(Wt(()=>{const s=s=>{e&&t===s.key&&(!o||o&&s.altKey)&&(!r||r&&s.ctrlKey)&&(!n||n&&s.shiftKey)&&(!i||i&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),a(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,o,r,n,i,a]),null),zl=(e,t)=>{Wt(()=>{const o=o=>{e.current&&!e.current.contains(o.target)&&t()};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e,t])},Ml=({sectionNames:e,threshold:t=.4})=>{const[o,r]=jt(e[0]||""),[n,i]=jt(null),a=Xt({}),s=Xt(!1),l=Xt(!1),c=Vt((e,t)=>{a.current[e]=t},[]),d=Vt(e=>{i(e)},[]),p=Vt(e=>{l.current=!0,r(e)},[]);return Wt(()=>{if(!l.current)return;l.current=!1;const e=a.current[o];if(!e)return;s.current=!0,e.scrollIntoView({behavior:"smooth",block:"start"});const t=setTimeout(()=>{s.current=!1},600);return()=>clearTimeout(t)},[o]),Wt(()=>{const o=a.current,i=e.map(e=>o[e]).filter(Boolean);if(!i.length)return;const l=new IntersectionObserver(e=>{if(!s.current)for(const t of e)if(t.isIntersecting){const e=t.target.getAttribute("data-section-name");e&&r(e);break}},{threshold:t,root:n});return i.forEach(e=>l.observe(e)),()=>l.disconnect()},[e,t,n]),{selectedSection:o,setSelectedSection:p,setSectionRef:c,setScrollContainerRef:d}},Bl=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:o,positionMode:r="local"}={})=>{const n=Xt(null),[i,a]=jt(!1),[s,l]=jt({top:0,left:0}),[c,d]=jt({edge:"top",align:"left"});zl(n,()=>{i&&(a(!1),o?.())});return{popupRef:n,popupOpen:i,setPopupOpen:a,popupPosition:s,arrowPlacement:c,handlePosition:(o,i)=>{if("local"===r)return void l({top:i,left:o});const{innerWidth:a,innerHeight:s}=window,c=n.current?.clientWidth||t,p=n.current?.clientHeight||e,u=o/a,h=u<1/3?"left":u>2/3?"right":"center";d({edge:i<s/2?"top":"bottom",align:h});let m=i,g=o;if(m>=s/2&&(m+=-p),"center"===h){g=o-c/2;const e=8;g=Math.max(e,Math.min(g,a-c-e))}else g>=a/2&&(g=o-c);l({top:m,left:g})}}},Ul=()=>({getItemSS:(e,t)=>{const o=sessionStorage.getItem(e);return o?qn(o,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),jl={otelServiceName:"",currentStreamName:""},Wl=()=>{const{formData:e,formErrors:t,handleFormChange:o,handleErrorChange:r,resetFormData:n}=$l(jl);return{formData:e,formErrors:t,handleFormChange:o,resetFormData:n,validateForm:()=>(r(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const r={...wo(jl),otelServiceName:e||t||""};o(void 0,void 0,r)}}},Hl=Kt({platformType:Mo.K8s,tier:zo.Community,version:"v0.0.0"}),Xl=({children:t,platformType:o,tier:r,version:n})=>{const i=Ht(()=>({platformType:o,tier:r,version:n}),[o,r,n]);return e(Hl.Provider,{value:i,children:t})},Vl=(e,t)=>!t||yi(e)>=yi(t),Gl=e=>{const t=Gt(Hl),o=Vl(t.version,e),r=t.platformType===Mo.Vm;return{...t,isVersionSupported:o,isVm:r,isEnterprise:t.tier===zo.Onprem}},Kl=new Set([or.StaticPod]),ql=e=>{const t=e.workloads.filter(({selected:e})=>e).length,o=e.workloads.length;return{selectedCount:t,isAllSourced:t>0&&t===o,isSomeSourced:t>0&&t<o,isFutureApps:e.selected||!1}},Jl=(e,t,o)=>{if(t&&!e.name.toLowerCase().includes(t.toLowerCase()))return!1;if(o.showOnlySelected){const{isAllSourced:t,isSomeSourced:o,isFutureApps:r}=ql(e);return t||o||r}return!0},Yl=(e,t,o)=>!(t&&!e.name.toLowerCase().includes(t.toLowerCase()))&&(!o.showOnlySelected||e.selected),Ql=(e,t,o)=>{const r=!!e.dataStreamNames?.length||!!e.currentStreamName?.length,n=r&&e.dataStreamNames?.includes(t)||e.currentStreamName===t,i=e.selected&&(!r||n)||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:i,numberOfInstances:e.numberOfInstances}},Zl=(e,t,o)=>({...Ql(e,t),currentStreamName:t}),ec=(e,t,o)=>{const r="boolean"==typeof o,n=e.dataStreamNames?.includes(t),i=(r?o:e.selected)||!1;return{namespace:e.name,selected:!(!n&&!r)&&i,currentStreamName:t}},tc=e=>{const{fetchNamespacesWithWorkloads:t}=e,{tier:o}=Gl(),r=e=>o!==zo.Onprem&&Kl.has(e),{selectedStreamName:n}=Bs(),{namespaces:i,addEntities:a}=js(),[s,l]=jt(!1),[c,d]=jt({}),[p,u]=jt(!1),[h,m]=jt(""),[g,f]=jt({}),[x,y]=jt({}),[b,v]=jt(""),[$,w]=jt(Wo.Source),[S,k]=jt(!1),[C,E]=jt(!1),A=Ht(()=>{const e=(e,t)=>!b||$!==t||$===t&&e.toLowerCase().includes(b),t={};return Object.entries(x).filter(([t])=>e(t,Wo.Namespace)).forEach(([o,r])=>{const n=r.filter(t=>{return e(t.name,Wo.Source)&&(o=t,!S||o.selected)&&(e=>!C||(e.numberOfInstances||0)>0)(t);var o});(!b||b&&($===Wo.Namespace||$===Wo.Source&&n.length))&&(t[o]=n)}),t},[x,b,$,S,C]);return Wt(()=>{(async()=>{l(!0);const e=await t();l(!1);const o=e.data;if(!o?.length)return;const r=[...o].sort((e,t)=>e.name.localeCompare(t.name)),i={},s={},c={};for(const e of r){const t=[...e.sources||[]].sort((e,t)=>e.name.localeCompare(t.name));i[e.name]=t.map(e=>Ql(e,n)),s[e.name]=t.map(e=>Zl(e,n)),c[e.name]=ec(e,n)}a(Wo.Namespace,o.map(({sources:e,...t})=>t));const{configuredSources:p,configuredFutureApps:u}=el.getState();Object.entries(p).forEach(([e,t])=>{s[e]&&t.forEach(t=>{const o=s[e].findIndex(e=>e.name===t.name&&e.kind===t.kind);-1!==o&&(s[e][o]={...s[e][o],selected:t.selected,currentStreamName:t.currentStreamName})})}),Object.entries(u).forEach(([e,t])=>{c[e]&&(c[e]=t)}),d(i),y(s),f(c)})()},[n]),{loading:s,availableSources:c,filteredNamespacesAndSources:A,getApiSourcesPayload:()=>{const e={};return Object.entries(x).forEach(([t,o])=>{o.forEach(o=>{const r=c[t]?.find(e=>e.name===o.name&&e.kind===o.kind);r?.selected!==o.selected&&(e[t]||(e[t]=[]),e[t].push(o))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries(g).forEach(([t,o])=>{const r=i?.find(e=>e.name===t);(o.selected&&!r?.dataStreamNames?.includes(n)||!o.selected&&r?.dataStreamNames?.includes(n))&&(e[t]=o)}),e},selectedNamespace:h,onSelectNamespace:(e,t)=>{if(i.find(t=>t.name===e)){const o="boolean"==typeof t;m(t=>t!==e||o?e:""),o&&(y(o=>({...o,[e]:(o[e]||[]).map(e=>t&&r(e.kind)?e:{...e,selected:t,currentStreamName:n})})),u(!1))}},selectedAllNamespaces:p,onSelectAllNamespaces:e=>{u(e),y(t=>{const o={};for(const[i,a]of Object.entries(t))o[i]=a.map(t=>e&&r(t.kind)?t:{...t,selected:e,currentStreamName:n});return o})},selectedSources:x,onSelectSource:(e,t)=>{const o=t||h;if(!o)return;if(r(e.kind))return;const i=[...x[o]||[]],a=i.findIndex(({name:t,kind:o})=>t===e.name&&o===e.kind);if(-1!==a){const e={...i[a],selected:!i[a].selected,currentStreamName:n};i[a]=e}else i.push({...e,selected:!0,currentStreamName:n});y(e=>({...e,[o]:i})),u(!1)},selectedFutureApps:g,onSelectFutureApps:(e,t)=>{const o=t||h;if(!o)return;const r=i.find(e=>e.name===t);r&&f(t=>({...t,[o]:ec(r,n,e)}))},searchText:b,setSearchText:v,searchBy:$,setSearchBy:w,showSelectedOnly:S,setShowSelectedOnly:k,showRunningOnly:C,setShowRunningOnly:E}};try{Qt.addDefaultLocale(oo)}catch(e){}const oc=()=>{const e=Xt(new Qt(oo.locale));return{formatTimeAgo:Vt(t=>{try{return"string"==typeof t&&(t=t.replace("t","T").replace("z","Z")),e.current.format(new Date(t))}catch(e){return"-"}},[])}},rc=r.div`
468
- position: fixed;
469
- top: 50%;
470
- left: 50%;
471
- transform: translate(-50%, -50%);
472
- z-index: 1000;
473
- width: fit-content;
474
- background: ${({theme:e})=>e.colors.translucent_bg};
475
- border: ${({theme:e})=>`1px solid ${e.colors.border}`};
476
- border-radius: 40px;
477
- box-shadow: ${({theme:e})=>{const t=e.colors.primary+sl["010"];return`0px 1px 1px 0px ${t}, 0px 2px 2px 0px ${t}, 0px 5px 5px 0px ${t}, 0px 10px 10px 0px ${t}, 0px 0px 8px 0px ${t}`}};
478
- animation-name: ${cl.in.center};
479
- `,nc=r.div`
480
- display: flex;
481
- justify-content: space-between;
482
- align-items: center;
483
- height: 80px;
484
- border-bottom: 1px solid ${({theme:e})=>e.colors.border};
485
- padding: 0 24px;
486
- `,ic=r.div`
487
- cursor: pointer;
488
- display: flex;
489
- align-items: center;
490
- gap: 8px;
491
- `,ac=r.div`
492
- display: flex;
493
- align-items: center;
494
- gap: 8px;
495
- `,sc=r(Nn)`
496
- min-width: 350px;
497
- min-height: 150px;
498
- `,lc=r.div`
499
- position: absolute;
500
- left: 50%;
501
- transform: translateX(-50%);
502
- display: flex;
503
- align-items: center;
504
- justify-content: center;
505
- width: 100%;
506
- pointer-events: none;
507
- `,cc=r(Si)`
508
- text-transform: uppercase;
509
- font-family: ${({theme:e})=>e.font_family.secondary};
510
- pointer-events: auto;
511
- `,dc=r(Si)`
512
- text-transform: uppercase;
513
- font-weight: 500;
514
- font-size: 14px;
515
- font-family: ${({theme:e})=>e.font_family.secondary};
516
- text-decoration: underline;
517
- cursor: pointer;
518
- `,pc=({isOpen:r,noOverlay:n,header:i,actionComponent:a,onClose:s,children:l,closeOnEscape:c=!0})=>(Ll({key:"Escape",active:r&&c},()=>s()),kl(r),r?po.createPortal(t(o,{children:[e(On,{hidden:!r,onClick:s,style:{opacity:n?0:1}}),t(rc,{"data-id":"modal"+(i?`-${i.title.replaceAll(" ","-")}`:""),children:[i&&t(nc,{children:[t(ic,{onClick:s,children:[e(yt,{}),e(dc,{children:"Cancel"})]}),e(lc,{children:e(cc,{children:i.title})}),e(ac,{children:a})]}),e(sc,{children:l})]})]}),document.body):null),uc=r.div`
519
- width: ${({$orientation:e,$thickness:t,$length:o})=>"vertical"===e?`${t}px`:o||"100%"};
520
- height: ${({$orientation:e,$thickness:t,$length:o})=>"horizontal"===e?`${t}px`:o||"100%"};
521
- margin: ${({$orientation:e,$margin:t})=>t||("horizontal"===e?"8px 0":"0 8px")};
522
- background-color: ${({$type:e,theme:t})=>(e?t.text[e]:t.colors.border)+sl["050"]};
523
- opacity: ${({$opacity:e})=>e||1};
524
- `,hc=({orientation:t="horizontal",type:o,thickness:r=1,length:n,margin:i,opacity:a})=>e(uc,{$orientation:t,$type:o,$thickness:r,$length:n,$margin:i,$opacity:a}),mc=r.div`
525
- /* Portal: viewport coords (usePopup positionMode viewport). Non-portal: offset-parent coords, absolute. */
526
- position: ${({$asPortal:e})=>e?"fixed":"absolute"};
527
- ${({$top:e})=>void 0!==e&&`top: ${e}px;`}
528
- ${({$bottom:e})=>void 0!==e&&`bottom: ${e}px;`}
529
- ${({$left:e})=>void 0!==e&&`left: ${e}px;`}
530
- ${({$right:e})=>void 0!==e&&`right: ${e}px;`}
531
- z-index: 9999;
532
-
533
- background-color: ${({theme:e})=>e.colors.info};
534
- border: 1px solid ${({theme:e})=>e.colors.border};
535
- border-radius: ${({$borderRadius:e})=>void 0!==e?e:"24px"};
536
- max-width: ${({$maxWidth:e})=>void 0!==e?e:"unset"};
537
- width: ${({$width:e})=>void 0!==e?e:"unset"};
538
-
539
- ${({$asPortal:e,$withPointerEvents:t})=>e&&!t&&"pointer-events: none;"}
540
- `,gc=r.div`
541
- padding: ${({$padding:e})=>void 0!==e?e:"12px"};
542
- border-bottom: 1px solid ${({theme:e})=>e.colors.border};
543
- `,fc=r.div`
544
- padding: ${({$padding:e})=>void 0!==e?e:"12px"};
545
- `,xc=r.div`
546
- padding: ${({$padding:e})=>void 0!==e?e:"12px"};
547
- border-top: 1px solid ${({theme:e})=>e.colors.border};
548
- `,yc=qt(({isOpen:o,asPortal:r,...n},i)=>{const a=Ht(()=>{const{children:o,top:a,bottom:s,left:l,right:c,borderRadius:d,padding:p,maxWidth:u,width:h,header:m,footer:g,withPointerEvents:f,...x}=n;return t(mc,{ref:i,$top:a,$bottom:s,$left:l,$right:c,$borderRadius:d,$padding:p,$maxWidth:u,$width:h,$asPortal:r,$withPointerEvents:f,...x,children:[m&&e(gc,{$padding:p,children:m}),e(fc,{$padding:p,children:o}),g&&e(xc,{$padding:p,children:g})]})},[i,n,r]);return o?r?po.createPortal(a,document.body):a:null});yc.displayName=yc.name;const bc=r.div`
549
- width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
550
- position: relative;
551
- display: flex;
552
- align-items: center;
553
- gap: 4px;
554
- cursor: help;
555
- ${({$ellipsis:e})=>e&&"\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n "}
556
- `,vc=r.div`
557
- display: flex;
558
- flex-direction: column;
559
- align-items: flex-start;
560
- gap: 8px;
561
- width: 100%;
562
- `,$c=r.div`
563
- display: flex;
564
- width: 100%;
565
- flex-shrink: 0;
566
- box-sizing: border-box;
567
- line-height: 0;
568
-
569
- ${({$align:e})=>"left"===e&&"\n justify-content: flex-start;\n padding-left: 20px;\n padding-right: 10px;\n "}
570
- ${({$align:e})=>"right"===e&&"\n justify-content: flex-end;\n padding-left: 10px;\n padding-right: 20px;\n "}
571
- ${({$align:e})=>"center"===e&&"\n justify-content: center;\n align-items: center;\n min-height: 8px;\n "}
572
- `,wc=r.div`
573
- width: 0;
574
- height: 0;
575
- border-style: solid;
576
- border-left: 6.5px solid transparent;
577
- border-right: 6.5px solid transparent;
578
- flex-shrink: 0;
579
-
580
- ${({$pointsUp:e,theme:t})=>e?`\n border-bottom: 8px solid ${t.v2.colors.black[500]};\n border-top-width: 0;\n `:`\n border-top: 8px solid ${t.v2.colors.black[500]};\n border-bottom-width: 0;\n `}
581
- `,Sc=r.div`
582
- display: flex;
583
- flex-direction: column;
584
- align-items: stretch;
585
- min-width: 0;
586
- `,kc=r.div`
587
- background-color: ${({theme:e})=>e.v2.colors.black[500]};
588
- border-radius: 4px;
589
- padding: 8px;
590
- box-sizing: border-box;
591
- min-width: 0;
592
- `,Cc=({withIcon:r,titleIcon:n,title:a,text:s,timestamp:l,children:c,fullWidth:d=!1,keepAlive:p=!1,ellipsis:u=!1})=>{const h=i(),{popupRef:m,popupOpen:g,setPopupOpen:f,popupPosition:x,arrowPlacement:y,handlePosition:b}=Bl({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:Math.min(7.5*(s?.length||0),300)}),v=Ht(()=>!!vi(s||"")?.length,[s]),$=e=>{const{type:t,clientX:o,clientY:r}=e;v?b(x.left||o,x.top||r):b(o,r),f("mouseleave"!==t)};return s||p?t(bc,{$fullWidth:d,$ellipsis:u,onMouseEnter:$,onMouseMove:$,onMouseLeave:$,children:[c,r&&e(Ye,{fill:h.v2.colors.white[500]}),e(yc,{ref:m,isOpen:g&&!!s,top:x.top,left:x.left,asPortal:!0,withPointerEvents:v,onMouseEnter:v?$:void 0,style:{backgroundColor:"transparent",border:"none"},maxWidth:"270px",borderRadius:"0",padding:"0",children:t(Sc,{children:["top"===y.edge&&e($c,{$align:y.align,children:e(wc,{$pointsUp:!0})}),e(kc,{children:t(vc,{children:[(!!n||!!a)&&t(Tn,{$gap:4,style:{alignItems:"center"},children:[n&&e(n,{size:16},"icon"),a&&e(cn,{size:sn.XS,children:a},"title")]}),!!s&&e(cn,{size:sn.XXXS,children:s}),!!l&&e(cn,{size:sn.XXXS,color:h.v2.colors.silver[200],children:new Date(l).toLocaleString()})]})}),"bottom"===y.edge&&e($c,{$align:y.align,children:e(wc,{$pointsUp:!1})})]})})]}):e(o,{children:c})},Ec=r.button`
593
- position: relative;
594
- width: ${({$size:e})=>e}px;
595
- height: ${({$size:e})=>e}px;
596
- border: ${({theme:e,$withBorder:t})=>t?`1px solid ${e.colors.border}`:"none"};
597
- border-radius: 100%;
598
- background-color: ${({$backgroundColor:e})=>e||"transparent"};
599
- display: flex;
600
- align-items: center;
601
- justify-content: center;
602
- cursor: pointer;
603
- &:hover {
604
- background-color: ${({theme:e,$backgroundColor:t})=>t?t+sl["070"]:e.colors.dropdown_bg_2};
605
- }
606
- `,Ac=r.div`
607
- position: absolute;
608
- top: ${({$size:e})=>e/5}px;
609
- right: ${({$size:e})=>e/5}px;
610
- width: 6px;
611
- height: 6px;
612
- border-radius: 100%;
613
- background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
614
-
615
- &::after {
616
- content: '';
617
- position: absolute;
618
- inset: 0;
619
- border-radius: 100%;
620
- background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
621
- animation: ${pl} 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
622
- }
623
- `,Dc=({children:o,onClick:r,tooltip:n,size:i=36,withPing:a,pingColor:s,withBorder:l,backgroundColor:c,...d})=>e(Cc,{text:n,children:t(Ec,{$size:i,$withBorder:l,$backgroundColor:c,onClick:r,...d,children:[a&&e(Ac,{$size:i,$color:s}),o]})}),Tc=r.div`
624
- position: relative;
625
- &.animated {
626
- overflow: hidden;
627
- padding-bottom: 1px;
628
- border-radius: 32px;
629
- animation: ${({$isLeaving:e})=>e?cl.out.bottom:cl.in.bottom} ${({$duration:e})=>e/10}ms forwards;
630
- }
631
- `,Ic=r.div`
632
- position: absolute;
633
- bottom: -1px;
634
- left: 0;
635
- z-index: -1;
636
- width: 100%;
637
- height: 100%;
638
- border-radius: 32px;
639
- background-color: ${({$type:e,theme:t})=>t.text[e]};
640
- animation: ${dl.out} ${({$duration:e})=>""+(e-e/10)}ms forwards;
641
- `,Nc=r.div`
642
- display: flex;
643
- align-items: center;
644
- flex: 1;
645
- gap: 8px;
646
- padding: 0 12px;
647
- border-radius: 32px;
648
- background-color: ${({$type:e,theme:t})=>t.colors[e]};
649
- `,Rc=r.div`
650
- display: flex;
651
- align-items: center;
652
- margin: 0 auto 0 0;
653
- padding: 8px 0;
654
- max-width: ${({$withAction:e,$overrideMaxWidth:t})=>t||(e?"400px":"500px")};
655
- min-height: 12px;
656
- `,Oc=r(Si)`
657
- font-size: 14px;
658
- color: ${({$type:e,theme:t})=>t.text[e]};
659
- `,_c=r(Si)`
660
- color: ${({$type:e,theme:t})=>t.text[e]};
661
- font-size: 12px;
662
- `,Fc=r(Tn)``,Pc=r(Si)`
663
- text-transform: uppercase;
664
- text-decoration: underline;
665
- font-size: 12px;
666
- font-family: ${({theme:e})=>e.font_family.secondary};
667
- white-space: nowrap;
668
- cursor: pointer;
669
- &:hover {
670
- transform: scale(1.1);
671
- transition: transform 0.3s;
672
- }
673
- `,Lc=({type:o,icon:r,title:n,message:a,action:s,onClose:l,duration:c=5e3,overrideMaxWidth:d,style:p})=>{const u=i(),[h,m]=jt(!1),g=Xt(null),f=Xt(null),x=e=>{l&&(m(!0),l({asSeen:e?.asSeen}))};Wt(()=>(g.current=setTimeout(()=>x({asSeen:!1}),c),()=>{g.current&&clearTimeout(g.current)}),[c]);const y=r||jn(o,u);return t(Tc,{className:l?"animated":"",$duration:c,$isLeaving:h,onMouseEnter:()=>{g.current&&clearTimeout(g.current),f.current&&(f.current.style.animationPlayState="paused")},onMouseLeave:()=>{if(f.current){const e=f.current.offsetWidth/f.current.parentElement.offsetWidth*c;g.current=setTimeout(()=>x({asSeen:!1}),e),f.current.style.animationPlayState="running"}},children:[t(Nc,{"data-id":"toast",$type:o,style:p,children:[e(y,{fill:u.text[o]}),t(Rc,{$withAction:!!s,$overrideMaxWidth:d,children:[n&&e(Oc,{$type:o,children:n}),n&&a&&e(hc,{orientation:"vertical",type:o}),a&&e(_c,{$type:o,children:a})]}),(!!s||!!l)&&t(Fc,{children:[s&&e(Pc,{"data-id":"toast-action",onClick:s.onClick,children:s.label}),l&&e(Dc,{"data-id":"toast-close",onClick:()=>x({asSeen:!0}),children:e(yt,{size:12})})]})]}),l&&e(Ic,{ref:f,$duration:c,$type:o})]})},zc=r.div`
674
- padding: 24px 32px;
675
- `,Mc=r.div`
676
- padding: ${({$withNote:e})=>e?"12px 0px":"12px 0px 32px 0"};
677
- `,Bc=r(Si)`
678
- font-size: 20px;
679
- line-height: 28px;
680
- `,Uc=r(Si)`
681
- color: ${({theme:e})=>e.text.grey};
682
- width: 416px;
683
- font-style: normal;
684
- font-weight: 300;
685
- line-height: 24px;
686
- `,jc=r.div`
687
- display: flex;
688
- justify-content: space-between;
689
- gap: 12px;
690
- `,Wc=r(vl)`
691
- width: 250px;
692
- `,Hc=r.div`
693
- margin-bottom: 12px;
694
- `,Xc=({isOpen:o,noOverlay:r,title:n="",description:i="",note:a,approveButton:s,denyButton:l,closeOnEscape:c=!0})=>{Ll({key:"Enter",active:o&&c},()=>s.onClick());const d=()=>l.onClick();return e(pc,{isOpen:o,noOverlay:r,onClose:d,children:t(zc,{children:[e(Bc,{children:n}),e(Mc,{$withNote:!!a,children:e(Uc,{children:i})}),!!a&&e(Hc,{children:e(Lc,{type:a.type,title:a.title,message:a.message})}),t(jc,{children:[e(Wc,{"data-id":"approve",variant:s.variant||"primary",onClick:()=>s.onClick(),children:s.text}),e(Wc,{"data-id":"deny",variant:l.variant||"secondary",onClick:d,children:l.text})]})]})})},Vc=({isOpen:t,noOverlay:o,name:r,onApprove:n,onDeny:i})=>e(Xc,{isOpen:t,noOverlay:o,title:"Cancel"+(r?` ${r}`:""),description:"Are you sure you want to cancel?",approveButton:{text:"Confirm",variant:Go.Warning,onClick:n},denyButton:{text:"Go Back",onClick:i}}),Gc=r.div`
695
- display: flex;
696
- align-items: center;
697
- gap: 8px;
698
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
699
- opacity: ${({$disabled:e})=>e?.6:1};
700
- `,Kc=r.div`
701
- width: 18px;
702
- height: 18px;
703
- border-radius: 6px;
704
- border: 1px dashed ${({$isChecked:e,$isPartiallyChecked:t,theme:o})=>e||t?"transparent":o.colors.secondary};
705
- display: flex;
706
- align-items: center;
707
- justify-content: center;
708
- background-color: ${({$isChecked:e,$isPartiallyChecked:t,theme:o})=>e?o.colors.majestic_blue:t?o.colors.majestic_blue_soft:o.colors.secondary+sl["020"]};
709
- pointer-events: ${({$disabled:e})=>e?"none":"auto"};
710
- transition: border 0.3s;
711
- &:hover {
712
- border: 1px solid ${({theme:e})=>e.colors.secondary};
713
- }
714
- `,qc=({title:o,titleColor:r,tooltip:n,value:a=!1,partiallyChecked:s=!1,onChange:l,disabled:c,style:d,errorMessage:p,allowPropagation:u=!1})=>{const h=i(),[m,g]=jt(a);Wt(()=>g(a),[a]);return t(In,{children:[t(Gc,{"data-id":"checkbox"+(o?`-${o}`:""),$disabled:c,onClick:e=>{c||(u||e.stopPropagation(),l?l(!!s||!m):g(e=>!!s||!e))},style:d,children:[e(Kc,{$isChecked:m,$isPartiallyChecked:s,$disabled:c,children:s?e(bt,{fill:h.text.white}):m?e(ft,{fill:h.text.white}):null}),o&&e(Cc,{text:n,withIcon:!0,children:e(Si,{size:12,color:r||h.text.grey,style:{maxWidth:"90%"},children:o})})]}),!!p&&e(Ei,{children:p})]})},Jc=r(Tn)`
715
- gap: 0;
716
- `,Yc=r.button`
717
- padding: 4px 8px;
718
- background-color: ${({theme:e,$selected:t})=>t?e.colors.dropdown_bg_2:"transparent"};
719
- border-radius: ${({$position:e})=>"left"===e?"32px 0px 0px 32px":"right"===e?"0px 32px 32px 0px":"0"};
720
- border: 1px solid ${({theme:e})=>e.colors.border};
721
- display: flex;
722
- align-items: center;
723
- justify-content: center;
724
- cursor: pointer;
725
- &:hover {
726
- border: 1px solid ${({theme:e})=>e.colors.secondary};
727
- }
728
- `,Qc=({isPrettyMode:o,setIsPrettyMode:r})=>t(Jc,{children:[e(Yc,{$position:"left",$selected:o,onClick:()=>r(!0),children:e(vt,{})}),e(Yc,{$position:"right",$selected:!o,onClick:()=>r(!1),children:e($t,{})})]}),Zc=r.table`
729
- border-collapse: collapse;
730
- font-family: ${({theme:e})=>e.font_family.primary};
731
- `,ed=r.tbody``,td=r.tr`
732
- td:first-child {
733
- padding-left: 0 !important;
734
- }
735
- td:last-child {
736
- padding-right: 0 !important;
737
- }
738
- `,od=r.td`
739
- vertical-align: top;
740
- padding: 4px 6px;
741
- `,rd=r(Si)`
742
- white-space: nowrap;
743
- `,nd=r.span`
744
- white-space: ${({$noWrap:e})=>e?"nowrap":"pre-wrap"};
745
- overflow-wrap: break-word;
746
- word-break: break-word;
747
- word-wrap: break-word;
748
- /* Fallback for older browsers */
749
- -ms-word-break: break-all;
750
- font-size: 12px;
751
- `,id=({language:t,code:o,theme:r,flatten:n,pretty:a})=>{const{darkMode:s}=i(),l=r?mo[r]:s?mo.palenight:mo.vsLight;let c="";if("json"===t){const e=qn(o,{}),t=mi(e);c=gi(n?Ir(t):t)}else c=o;return a&&"json"===t?e(ad,{darkMode:s,str:c}):e(ho,{theme:l||(s?mo.palenight:mo.vsLight),language:t,code:c,children:({getLineProps:t,getTokenProps:o,tokens:r})=>e("pre",{children:r.map((r,n)=>e("div",{...t({line:r}),children:r.map((t,r)=>e(nd,{...o({token:t})},`line-${n}-token-${r}`))},`line-${n}`))})})},ad=({darkMode:o,str:r})=>{const n=i(),a=(o,r)=>{const i=new Array(o).fill(o=>t(td,{...o,children:[e(od,{}),e(od,{})]}));return e(Ut,{children:i.map((t,o)=>e(t,{style:0===o?{borderBottom:`1px solid ${n.colors.border}`}:{}},`empty-row-${r}-${o}`))})};return e(ho,{theme:o?mo.palenight:mo.vsLight,language:"json",code:r,children:({getLineProps:o,getTokenProps:r,tokens:i})=>e(Zc,{children:e(ed,{children:i.map((i,s)=>{const l=(e=>{const t=["punctuation","plain","operator"];return e.filter(e=>!t.includes(e.types[0])).map(({types:e,content:t})=>{const o=[...e],r=["property","string"].includes(o[0])?t.replace(/"/g,""):t;return"string"===o[0]&&(["true","false"].includes(r.split("@")[0])&&(o[0]="boolean"),r.split("@")[0].match(/^[0-9]+$/)&&(o[0]="number")),{types:o,content:r}})})(i),c=o({line:l});return 1===l.length&&"property"===l[0].types[0]?t(Ut,{children:[a(2,s),t(td,{...c,children:[e(od,{children:e(rd,{children:l[0].content})}),e(od,{})]})]},`line-${s}`):2===l.length?e(td,{...c,children:l.map((o,i)=>{const{text:a,components:l}=((t,o)=>{const[r,...n]=t.split("@");return{text:r,components:n?.map((t,r)=>{if(!t.includes("="))return null;const[n,i]=t.split("=");switch(n){case"tooltip":return e(Cc,{withIcon:!0,text:i},`${n}-${i}-${r}`);case"status":if("none"===i)return e("div",{style:{width:16,height:16}},`${n}-${i}-${r}`);let t=jn(i,o);return t||(t=jn(Go.Warning,o)),e(t,{},`${n}-${i}-${r}`);default:return null}})?.filter(e=>!!e)||[]}})(o.content,n),c=0===i;return e(od,{children:t(Tn,{children:[e(Tn,{children:l}),e(nd,{$noWrap:c,...r({token:o}),children:a})]})},`line-${s}-token-${i}`)})},`line-${s}`):(l.length,null)})})})})},sd={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function ld(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const o=(e.match(/^[0-9.]*/)||"").toString();t=o.includes(".")?parseFloat(o):parseInt(o,10);const r=(e.match(/[^0-9]*$/)||"").toString();return sd[r]?{value:t,unit:r}:{value:t,unit:"px"}}function cd(e){const t=ld(e);return`${t.value}${t.unit}`}const dd=((e,t,o)=>{const r=`react-spinners-${e}-${o}`;if("undefined"==typeof window||!window.document)return r;const n=document.createElement("style");document.head.appendChild(n);const i=n.sheet,a=`\n @keyframes ${r} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),r})("FadeLoader","50% {opacity: 0.3} 100% {opacity: 1}","fade"),pd=({loading:o=!0,color:r,scale:n=1,speedMultiplier:a=1,cssOverride:s={},style:l={},...c})=>{const d=i(),p=r||d.text.secondary;if(!o)return null;const{value:u}=ld(2),h=u+4.2,m=h/2+h/5.5,g=4*h*n,f={position:"relative",width:`${g}px`,height:`${g}px`,scale:n,...l,...s},x=(e,t)=>({position:"absolute",width:cd(1.5),height:cd(4),borderRadius:cd(2),backgroundColor:p,transition:"2s",animationFillMode:"both",animation:`${dd} ${1.2/a}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return t("span",{style:f,...c,children:[e("span",{style:{...x(1,0),top:`calc(50% + ${h}px)`,left:"50%"}}),e("span",{style:{...x(2,-45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...x(3,90),top:"50%",left:`calc(50% + ${h}px)`}}),e("span",{style:{...x(4,45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...x(5,0),top:`calc(50% + ${-1*h}px)`,left:"50%"}}),e("span",{style:{...x(6,-45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${-1*m}px)`}}),e("span",{style:{...x(7,90),top:"50%",left:`calc(50% + ${-1*h}px)`}}),e("span",{style:{...x(8,45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${-1*m}px)`}})]})},ud=r.div`
752
- margin: ${({$align:e})=>"right"===e?"auto 6px auto auto":"left"===e?"auto auto auto 6px":"auto"};
753
- display: flex;
754
- align-items: center;
755
- justify-content: center;
756
- `,hd=({extend:t,size:o=14,align:r="center"})=>e(ud,{$align:r,children:e(wt,{size:o,rotate:t?180:0})}),md=r.div`
757
- border-radius: 24px;
758
- background-color: ${({theme:e,$status:t})=>t===Go.Error?e.text.error+sl["010"]:t===Go.Warning?e.text.warning+sl["010"]:e.colors.secondary+sl["005"]};
759
- &:hover {
760
- background-color: ${({theme:e,$status:t})=>t===Go.Error?e.text.error+sl["020"]:t===Go.Warning?e.text.warning+sl["020"]:e.colors.secondary+sl["010"]};
761
- }
762
- cursor: pointer;
763
- transition: background 0.3s;
764
- `,gd=r.div`
765
- display: flex;
766
- align-items: center;
767
- gap: 12px;
768
- padding: 12px 18px;
769
- `,fd=r.div`
770
- display: flex;
771
- flex-direction: column;
772
- gap: 8px;
773
- padding: 6px 18px 12px 18px;
774
- `,xd=r.div`
775
- display: flex;
776
- align-items: center;
777
- gap: 12px;
778
- `,yd=r(Si)`
779
- white-space: nowrap;
780
- `,bd=r(In)`
781
- width: 16px;
782
- `,vd=({conditions:o,headerLabelError:r="Something Failed",headerLabelWarning:n="Something isn't right",headerLabelSuccess:a="Everything Successful"})=>{const s=i(),[l,c]=jt(!1),d=Ht(()=>ai(o),[o]),{errors:p,hasErrors:u,warnings:h,hasWarnings:m,hasDisableds:g,hasLoadings:f}=Ht(()=>Fr(d),[d]);Wt(()=>{c(u||m||g)},[u,m,g]);const x=(!d.length||f)&&!u&&!m&&!g,y=u?Go.Error:m?Go.Warning:g?Go.Info:Go.Success,b=jn(y,s),v=u?r:m||g?n:x?"Loading...":a,$=u?s.text.error:m?s.text.warning:s.text.info,w=`(${u?p.length:m?h.length:d.length}/${d.length})`,S=u?s.text.error_secondary:m?s.text.warning_secondary:s.text.info_secondary,k=Vt(()=>c(e=>!e),[]);return t(md,{onClick:k,$status:y,children:[t(gd,{children:[e(x?pd:b,{}),e(Si,{color:$,size:14,children:v}),e(Si,{color:S,size:12,family:"secondary",children:w}),e(hd,{extend:l,align:"right"})]}),l&&e(fd,{children:d.map(({status:o,type:r,reason:n,message:i},a)=>{const l=o===qo.Loading?()=>e(pd,{scale:.8}):o===qo.Disabled?jn(Go.Info,s):jn(o,s),c=o===qo.Disabled?s.text.info:o===Go.Error?s.text.error:o===Go.Warning?s.text.warning:s.text.info,d=o===qo.Disabled?s.text.info_secondary:o===Go.Error?s.text.error_secondary:o===Go.Warning?s.text.warning_secondary:s.text.info_secondary;return t(xd,{children:[e(bd,{children:e(l,{})}),t(Si,{color:c,size:12,children:[e(yd,{color:d,size:12,weight:700,children:r}),i||n]})]},`condition-${a}`)})})]})},$d=r.div`
783
- display: flex;
784
- align-items: center;
785
- gap: ${({$size:e})=>e/3}px;
786
- padding: ${({$size:e,$withBorder:t,$withBackground:o})=>t||o?`${e/(t?3:2)}px ${e/(t?1.5:1)}px`:"0"};
787
- width: ${({$width:e})=>e||"fit-content"};
788
- border-radius: 360px;
789
- border: ${({$withBorder:e,$status:t,theme:o})=>e?`1px solid ${o.text[t]+sl["050"]}`:"none"};
790
- background: ${({$withBackground:e,$status:t,theme:o})=>e?`linear-gradient(90deg, transparent 0%, ${o.text[t]+sl["030"]} 100%)`:"transparent"};
791
- `,wd=r.div`
792
- display: flex;
793
- align-items: center;
794
- `,Sd=r.div`
795
- display: flex;
796
- align-items: center;
797
- `,kd=({title:o,subtitle:r,status:n=Go.Default,forceIcon:a,withIcon:s,withBorder:l,withBackground:c,width:d,size:p=12,family:u="secondary",nowrap:h=!1})=>{const m=i(),g=[qo.Loading,qo.Disabled].includes(n)?Go.Info:n,f=a?()=>e(a,{size:p+2,fill:m.text[g]}):n===qo.Loading?()=>e(pd,{scale:.8}):()=>jn(g,m)?.({size:p+2});return t($d,{$status:g,$width:d,$size:p,$withIcon:s,$withBorder:l,$withBackground:c,children:[s&&e(wd,{children:e(f,{})}),(!!o||!!r)&&t(Sd,{children:[!!o&&e(Si,{size:p,family:u,color:m.text[g],nowrap:h,children:o}),!!o&&!!r&&e(hc,{orientation:"vertical",length:p-2+"px",type:g}),!!r&&e(Si,{size:p-2,family:u,color:m.text[`${g}_secondary`],nowrap:h,children:r})]})]})},Cd=({label:o,onClick:r,variant:n="tertiary",textProps:a,...s})=>{const l=i();return t(vl,{onClick:r,variant:n,...s,children:[e(St,{fill:"primary"===n?l.text.primary:l.text.info}),e(Si,{size:14,family:"secondary",decoration:"underline",color:"primary"===n?l.text.primary:void 0,...a,children:o||Dr.ADD})]})},Ed=r(Tn)`
798
- width: 100%;
799
- border-radius: 8px;
800
- background-color: ${({theme:e})=>e.colors.secondary+sl["010"]};
801
- pre {
802
- color: ${({theme:e})=>e.text.default};
803
- font-size: 12px;
804
- overflow-x: auto;
805
- width: 100%;
806
- padding-left: 12px;
807
- }
808
- `,Ad=({value:o,callbackCopyDone:r})=>{const{clickCopy:n,isCopied:i}=Nl();return t(Ed,{children:[e("pre",{children:o}),e(Dc,{onClick:e=>{e.stopPropagation(),n(o),r?.()},tooltip:i?"Copied!":"Copy",children:e(i?ft:xt,{})})]})},Dd=({label:o,onClick:r,variant:n="tertiary",...a})=>{const s=i();return t(vl,{onClick:r,variant:n,...a,children:[e(kt,{fill:"primary"===n?s.text.primary:s.text.info}),e(Si,{size:14,family:"secondary",decoration:"underline",color:"primary"===n?s.text.primary:void 0,children:o||Dr.EDIT})]})},Td=({onClick:t})=>e(Lc,{type:Go.Default,icon:ot,message:Ar.QUICK_BACK_TO_SUMMARY,action:{label:Ar.GO_TO_SUMMARY,onClick:t}}),Id=r(Si)`
809
- max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
810
- white-space: nowrap;
811
- overflow-x: auto;
812
-
813
- &::after {
814
- // This is to prevent the "browser default tooltip" from appearing when the title is too long
815
- content: '';
816
- display: block;
817
- }
818
- `,Nd=({maxWidth:o,text:r,textSize:n=16,textColor:i})=>{const[a,s]=jt(!1),l=Xt(null);return Wt(()=>{if(l.current){const{clientWidth:e}=l.current;s(e<1.05*(o-n)&&e>.95*(o-n))}},[o,n,r]),t(Tn,{$gap:0,children:[r&&e(Cc,{text:a?r:void 0,children:e(Id,{ref:l,$maxWidth:o-n,size:n,color:i,children:r})}),a&&e(Id,{$maxWidth:n,size:n,color:i,children:"..."})]})},Rd=({src:t="",alt:o="",size:r=16})=>{const[n,i]=jt(!1);return t&&!n?e("img",{src:t,alt:o,width:r,height:r,onError:()=>i(!0)}):e(g,{size:r})},Od=r.div`
819
- display: flex;
820
- align-items: center;
821
- justify-content: center;
822
- width: ${({$size:e})=>e}px;
823
- height: ${({$size:e})=>e}px;
824
- border-radius: 8px;
825
- background: ${({$status:e,theme:t})=>{const o=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${o} 0%, ${o+sl["030"]} 100%)`}};
826
- `,_d=({icon:t,src:o="",alt:r="",status:n,size:i=36})=>e(Od,{$status:n,$size:i,children:o?e(Rd,{src:o,alt:r,size:i-12}):e(t||g,{size:i-12})}),Fd=r.div`
827
- position: relative;
828
- display: flex;
829
- flex-wrap: wrap;
830
- align-items: center;
831
- justify-content: center;
832
- width: ${({$size:e})=>e}px;
833
- height: ${({$size:e})=>e}px;
834
- `,Pd=r.div`
835
- position: absolute;
836
- top: ${({$top:e})=>e}px;
837
- left: ${({$left:e})=>e}px;
838
- z-index: ${({$zIndex:e})=>e};
839
- display: flex;
840
- align-items: center;
841
- justify-content: center;
842
- width: ${({$size:e})=>e}px;
843
- height: ${({$size:e})=>e}px;
844
- border-radius: 100%;
845
- border: 1px solid ${({theme:e,$status:t})=>(t?e.text[t]:e.colors.border)+sl["030"]};
846
- background: ${({$status:e,theme:t})=>{const o=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${o} 0%, ${o+sl["030"]} 100%)`}};
847
- `,Ld=({icons:o=[],iconSrcs:r=[],status:n,size:a=36,id:s})=>{const l=i(),c=1===o.length||1===r.length?a-12:a/2.7;if(r.length>0)return e(Ld,{icons:r.map(t=>()=>e(Rd,{src:t,size:c})),status:n,size:a,id:s});if(1===o.length)return e(_d,{icon:o[0],status:n,size:a});const d=e=>o.length<=2?.5*c:0===e||1===e?0:1.15*c,p=e=>0===e?0:1===e?1.15*c:1.15*c*.5;return e(Fd,{$status:n,$size:a,children:o.map((r,i)=>i>2?null:e(Pd,{$status:n,$size:1.5*c,$top:d(i),$left:p(i),$zIndex:i+1,children:2===i&&o.length>3?t(Si,{family:"secondary",color:l.text.dark_grey,size:.8*c,children:["+",o.length-2]}):e(r,{size:c})},`icon-${s}-${i}`))})},zd=Rs.map(({id:e})=>e),Md=({monitors:o=zd,withTooltips:r,withLabels:n,size:a=12,color:s})=>{const l=i(),c=s||l.text.grey;return e(Tn,{$gap:n?a:a/2,children:o.map(o=>{const i=yo(o.toLowerCase()),s=Qr(o);return s?e(Cc,{text:r?i:"",children:t(Tn,{$gap:a/3,children:[e(s,{size:n?a+2:a,fill:c}),n&&e(Si,{size:a,color:c,children:i})]})},o):null})})},Bd=r.div`
848
- visibility: hidden;
849
- `,Ud=r.div`
850
- display: flex;
851
- flex-direction: column;
852
- align-self: stretch;
853
- padding: 16px;
854
- width: calc(100% - 32px);
855
- border-radius: 16px;
856
- background-color: ${({theme:e,$status:t,$bgColor:o})=>o||(t?e.text[t]+sl["010"]:e.colors.secondary+sl["005"])};
857
- opacity: ${({$faded:e})=>e?.5:1};
858
-
859
- ${({theme:e,$status:t,$bgColorHover:o,$withClick:r})=>r?n`
860
- &:hover {
861
- cursor: pointer;
862
- background-color: ${o||(t?e.text[t]+sl["020"]:e.colors.secondary+sl["010"])};
863
- ${Bd} {
864
- visibility: visible;
865
- }
866
- }
867
- `:`\n &:hover {\n ${Bd} {\n visibility: visible;\n }\n }\n `}
868
- `,jd=r.div`
869
- display: flex;
870
- align-items: center;
871
- gap: 8px;
872
- margin-left: auto;
873
- `,Wd=r(Si)`
874
- margin-right: 16px;
875
- `,Hd=r(Si)`
876
- font-size: 10px;
877
- color: ${({theme:e})=>e.text.grey};
878
- `,Xd=({title:o,subTitle:r,hoverText:n,onClick:a,renderActions:s,iconProps:{icon:l,icons:c,iconSrc:d,iconSrcs:p}={},visualProps:{status:u,faded:h,bgColor:m,bgColorHover:g,monitors:f,monitorsWithLabels:x,componentsUnderTitles:y}={},checkboxProps:{withCheckbox:b,isCheckboxDisabled:v,isChecked:$,isLoading:w,onCheckboxChange:S}={},extendableProps:{withExtend:k,isExtended:C,renderExtended:E}={},...A})=>{const D=i(),[T,I]=jt(C||!1),[N,R]=jt(0),O=Xt(null),_=Xt(null),F=Xt(null);return Wt(()=>{if(O.current){const e=O.current.clientWidth,t=_.current?.clientWidth||0;R(e-((b?125:85)+t))}},[b]),t(Ud,{ref:O,$status:u,$faded:h,$bgColor:m,$bgColorHover:g,$withClick:!!a,onClick:a,...A,children:[t(Tn,{$gap:8,children:[t(Tn,{$gap:16,children:[w?e(pd,{}):b?e(qc,{value:$,onChange:S,disabled:v}):null,c?.length||p?.length?e(Ld,{icons:c,iconSrcs:p,status:u,id:`${o}-${r}`}):l||d?e(_d,{icon:l,src:d,status:u}):null]}),t(In,{$gap:4,children:[o&&e(Nd,{maxWidth:N,text:o,textSize:14}),t(Tn,{$gap:4,children:[r&&e(Nd,{maxWidth:N-(F.current?.clientWidth||0),text:r,textSize:10,textColor:D.text.grey}),f&&f.length>0&&t(Tn,{$gap:4,ref:F,children:[r&&e(Hd,{children:"•"}),e(Md,{monitors:f,withLabels:x,size:10})]})]}),y&&y.length>0?e(Tn,{$gap:4,children:y?.map((t,o)=>e(Ut,{children:t},`componentsUnderTitles-${o}`))}):null]}),t(jd,{ref:_,children:[!!n&&e(Bd,{children:e(Wd,{size:14,family:"secondary",children:n})}),s&&s(),k&&t(Ut,{children:[e(hc,{orientation:"vertical",length:"16px",margin:"0 2px"}),e(Dc,{onClick:()=>I(e=>!e),children:e(hd,{extend:T})})]})]})]}),T&&E&&t(In,{children:[e(hc,{margin:"16px 0"}),E()]})]})},Vd=r(Tn)`
879
- width: 100%;
880
- justify-content: space-between;
881
- `,Gd=r(Si)`
882
- font-size: 12px;
883
- color: ${({theme:e})=>e.text.grey};
884
- `,Kd=r(Si)`
885
- font-size: 10px;
886
- color: ${({theme:e})=>e.text.darker_grey};
887
- `,qd=r.div`
888
- display: flex;
889
- align-items: center;
890
- gap: 8px;
891
- margin-left: auto;
892
- `,Jd=r(Si)`
893
- font-size: 12px;
894
- text-align: right;
895
- `,Yd=({title:o,subTitle:r,tooltip:n,value:i})=>t(Vd,{children:[e(In,{$gap:4,children:t(Cc,{text:n||"",children:[o&&e(Gd,{children:o},"title"),r&&e(Kd,{children:r},"subtitle")]})}),e(qd,{children:i?.status?e(kd,{status:"transitioning"===i.status?qo.Loading:i.status,title:i.text||i.status,withBorder:!0,withIcon:!0}):e(Jd,{children:i?.text||"-"})})]}),Qd=r(In)`
896
- width: 100%;
897
- `,Zd=({containerName:o,actualDevices:r,started:n,ready:i,instrumentationInstances:a})=>{const s=Ht(()=>{const t=[];return n?.name&&t.push(e(kd,{status:ti(n.value)?pi(n.value)?Go.Success:Go.Error:Go.Default,title:n.name,withIcon:!0,withBorder:!0,size:8},"started")),i?.name&&t.push(e(kd,{status:ti(i.value)?pi(i.value)?Go.Success:Go.Error:Go.Default,title:i.name,withIcon:!0,withBorder:!0,size:8},"ready")),t},[n?.name,n?.value,i?.name,i?.value]);return e(Xd,{title:o.value,subTitle:a.length?`${a.length} Instrumented Processes`:void 0,visualProps:{componentsUnderTitles:s},renderActions:()=>e(kd,{status:Go.Info,title:"Instrumentation Device",subtitle:r.value&&"[]"!==r.value?r.value:"none",withBorder:!0}),extendableProps:{isExtended:!!a.length,renderExtended:()=>e(Qd,{$gap:24,children:a.map((o,r)=>t(Qd,{$gap:8,children:[e(Yd,{title:`Instrumented Process #${r+1}`,subTitle:o.message?.value||"",value:{status:o.healthy.status,text:o.healthy.status===Go.Success?"healthy":"unhealthy"}}),o.identifyingAttributes?.map(({name:t,value:o})=>e(Yd,{title:t,subTitle:"",value:{text:o,status:void 0}},`describe-${t}-${o}`))]},`process-${r}`))})}})},ep=({title:o="Data not found",subTitle:r})=>{const n=i().v2.colors.grey[400];return t(Nn,{children:[t(Tn,{$gap:8,children:[e(Ct,{fill:n}),e(cn,{size:sn.XS,color:n,align:"center",children:o})]}),r&&e(cn,{size:sn.XXS,color:n,align:"center",children:r})]})},tp=r(In)`
898
- max-width: 300px;
899
- padding: 12px;
900
- border-radius: 12px;
901
- background-color: ${({theme:e})=>e.colors.dropdown_bg};
902
- justify-content: center;
903
- `,op=Jt(({id:t,data:o})=>{const{title:r,subTitle:n}=o;return e(tp,{"data-id":t,children:e(ep,{title:r,subTitle:n})})});op.displayName=op.name;const rp=r.div`
904
- padding: 6px;
905
- border-radius: 12px;
906
- background-color: ${({theme:e})=>e.colors.dropdown_bg};
907
- cursor: pointer;
908
- ${({$isVirtual:e,theme:t})=>e&&`\n border: 1px dashed ${t.colors.border};\n opacity: 0.8;\n `}
909
- `,np=r.div`
910
- position: relative;
911
- `,ip=r.div`
912
- position: absolute;
913
- top: 100%;
914
- margin-top: 4px;
915
- left: 50%;
916
- transform: translateX(-50%);
917
- display: flex;
918
- flex-direction: column;
919
- align-items: center;
920
- gap: 2px;
921
- width: 140px;
922
- text-align: center;
923
- `,ap=Jt(({id:r,data:n})=>{const{id:a,status:s,title:l,icons:c,isVirtual:d}=n,p=i(),u=d||s!==Go.Error?null:jn(s,p);return t(o,{children:[e(ro,{type:"source",position:no.Right,style:{visibility:"hidden"}}),e(ro,{type:"target",position:no.Left,style:{visibility:"hidden"}}),t(np,{"data-id":r,children:[e(rp,{$isVirtual:d,children:e(Ld,{id:a,icons:c,status:d?void 0:s})}),t(ip,{children:[u&&e(u,{}),e(Si,{size:12,style:{textAlign:"center",wordBreak:"break-word",lineHeight:"1.3"},children:l})]})]})]})});ap.displayName=ap.name;const sp={duration:300,padding:.1,includeHiddenNodes:!0},lp=r.div`
924
- height: 100%;
925
- .react-flow__attribution {
926
- visibility: hidden;
927
- }
928
- `,cp=r.div`
929
- button {
930
- padding: 8px;
931
- margin: 8px;
932
- border-radius: 8px;
933
- border: 1px solid ${({theme:e})=>e.colors.border} !important;
934
- background-color: ${({theme:e})=>e.colors.dropdown_bg};
935
- path {
936
- fill: ${({theme:e})=>e.text.secondary};
937
- }
938
- &:hover {
939
- background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
940
- }
941
- &:last-child svg {
942
- transform: scale(1.4);
943
- }
944
- }
945
- `,dp={[Qo.MapItem]:ap,[Qo.NoData]:op},pp=({trigger:e})=>{const{fitView:t}=co(),o=Xt(!0);return Wt(()=>{o.current?o.current=!1:e>0&&requestAnimationFrame(()=>t(sp))},[e,t]),null},up=({nodes:o,edges:r,onNodesChange:n,onEdgesChange:i,fitViewTrigger:a=0,zoomOnScroll:s=!1,onEdgeClick:l,onNodeMouseEnter:c,onNodeMouseLeave:d,onRefresh:p})=>{const{onClickNode:u}=Cl(),{setActiveNodeType:h,setActiveNodeId:m}=ji();return t(ao,{zoomOnScroll:s,nodes:o,nodeTypes:dp,edges:r,onNodeClick:u,onEdgeClick:l,onNodeMouseEnter:c,onNodeMouseLeave:d,onNodesChange:n,onEdgesChange:i,onBlur:()=>{h(null),m(null)},children:[e(pp,{trigger:a}),e(cp,{children:e(so,{position:"bottom-right",orientation:"horizontal",showInteractive:!1,showZoom:!0,showFitView:!0,fitViewOptions:sp,children:p&&e(lo,{onClick:p,children:e(Et,{size:20})})})})]})},hp=t=>e(lp,{children:e(io,{children:e(up,{...t})})}),mp={type:"",disabled:!1,name:"",notes:"",signals:[],fields:{}},gp=Kt(null),fp=({children:t})=>{const[o,r]=jt(null),[n,i]=jt(void 0),a=$l(mp),s=Vt(e=>{a.resetFormData(),a.handleErrorChange(void 0,void 0,{}),i(void 0),e?.type&&a.handleFormChange("type",e.type),r(e)},[]),l=Vt(e=>{var t;a.resetFormData((({type:e,name:t,notes:o,disabled:r,signals:n,fields:i})=>({type:e,name:t||"",notes:o||"",disabled:!!r,signals:n??[],fields:i??{}}))(e)),a.handleErrorChange(void 0,void 0,{}),i(void 0),r((t=e.type,Wi.find(e=>e.type===t)??Hi.find(e=>e.type===t)??null))},[]),c=Vt(()=>{if(!o)return{errorMessage:"No action type selected",preparedFormData:wo(mp)};const e=(t=a.formData,wo(t));var t;const r={};a.handleErrorChange(void 0,void 0,r);const n=Object.keys(r).length>0?"Invalid form values":void 0;return i(n),{errorMessage:n,preparedFormData:e}},[a,o]),d=Ht(()=>({selectedOption:o,onSelectOption:s,loadAction:l,genericForm:a,validateFormData:c,errorMessage:n}),[o,s,l,a,c,n]);return e(gp.Provider,{value:d,children:t})},xp=()=>{const e=Gt(gp);if(!e)throw new Error("useActionFormContext must be used within an ActionFormContextProvider");return e},yp={type:"",name:"",currentStreamName:"",disabled:!1,exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[]},bp={activeForm:null,onChangeActiveForm:()=>{},loadDestination:()=>{},genericForm:void 0,formErrorMessage:void 0,validateFormData:()=>({isOk:!1,preparedFormData:wo(yp)}),unsavedDestinations:[],thisUnsavedDestination:void 0,setUnsavedDestinations:()=>{},addUnsavedDestination:()=>{},updateUnsavedDestination:()=>{},deleteUnsavedDestination:()=>{}},vp=Kt(bp),$p=e=>e.filter(e=>!!e).map(e=>{const{name:t,componentType:o,componentProperties:r,displayName:n,initialValue:i,renderCondition:a}=e,s=o===Xo.Dropdown,l=qn(r,{});return{componentType:o,renderCondition:a,name:t,title:n,value:i,placeholder:l.placeholder||(s?"Select an option":void 0),options:s&&Array.isArray(l.values)?l.values.map(e=>({id:e,value:e})):void 0,...l}}),wp=({children:t})=>{const{selectedStreamName:o}=Bs(),[r,n]=jt(null),[i,a]=jt(),[s,l]=jt(bp.unsavedDestinations),c=Ht(()=>"number"==typeof r?.unsavedIdx?s[r.unsavedIdx]:void 0,[r,s]),d=Vt((e,t)=>{r&&(l(t=>[...t,{...e,option:r.option}]),n(t?e=>e?{...e,listType:Vi.UNSAVED,unsavedIdx:s.length}:null:null))},[r,s.length]),p=Vt((e,t,o)=>{r&&(l(o=>o.map((o,n)=>n===e?{...o,...t,option:r.option}:o)),n(o?e=>e?{...e,listType:Vi.UNSAVED}:null:null))},[r]),u=Vt(e=>{l(t=>t.filter((t,o)=>o!==e)),n(null)},[]),h=$l({...yp,currentStreamName:o});Wt(()=>{if(r)if(c)h.handleFormChange(void 0,void 0,c.formData);else{h.handleFormChange("type",r.option.type),h.handleFormChange("name",r.option.displayName),h.handleFormChange("disabled",!1);const e=ci(r.option.supportedSignals);h.handleFormChange("exportedSignals",{logs:e.includes(mr.Logs),metrics:e.includes(mr.Metrics),traces:e.includes(mr.Traces)}),h.handleFormChange("fields",r.dynamicFields.map(e=>({key:e.name,value:e.value})))}},[r,c]);const m=Vt(e=>{h.resetFormData(),h.handleErrorChange(void 0,void 0,{}),a(void 0),n(e?{...e,dynamicFields:e.option?.fields?$p(e.option.fields):[]}:null)},[]),g=Vt((e,t)=>{let o;for(const r of t){const t=r.items.find(t=>t.type===e.destinationType.type);if(t){o=t;break}}const r=qn(e.fields,{}),i={id:e.id,type:e.destinationType.type,displayName:e.name||e.destinationType.displayName,selected:!0,testConnectionSupported:o?.testConnectionSupported??!1,supportedSignals:e.destinationType.supportedSignals,fields:o?o.fields.map(e=>({...e,initialValue:r[e.name]??e.initialValue})):[]};h.resetFormData(),h.handleErrorChange(void 0,void 0,{}),a(void 0),n({listType:Vi.EXISTS,option:i,dynamicFields:$p(i.fields)}),queueMicrotask(()=>{h.handleFormChange("name",e.name||e.destinationType.displayName),h.handleFormChange("disabled",!!e.disabled),h.handleFormChange("exportedSignals",{logs:!!e.exportedSignals?.logs,metrics:!!e.exportedSignals?.metrics,traces:!!e.exportedSignals?.traces})})},[]),f=Vt(()=>{const e=wo(h.formData),t={};r?.dynamicFields.forEach(({name:o,required:r})=>{if(r){const r=e.fields.find(e=>e.key===o)?.value;Qn(r)&&(t[o]=Er.FIELD_IS_REQUIRED)}});li(e.exportedSignals).length||(t.exportedSignals=Er.FIELD_IS_REQUIRED);const o=0===Object.keys(t).length?void 0:"Invalid form values";return h.handleErrorChange(void 0,void 0,t),a(o),{errorMessage:o,preparedFormData:e}},[h,r]);return e(vp.Provider,{value:{activeForm:r,onChangeActiveForm:m,loadDestination:g,genericForm:h,formErrorMessage:i,validateFormData:f,unsavedDestinations:s,thisUnsavedDestination:c,setUnsavedDestinations:l,addUnsavedDestination:d,updateUnsavedDestination:p,deleteUnsavedDestination:u},children:t})},Sp=()=>Gt(vp),kp={disabled:!1,ruleName:"",notes:"",workloads:null,instrumentationLibraries:null,payloadCollection:null,codeAttributes:null,headersCollection:null,customInstrumentations:null},Cp=Kt(null),Ep=({children:t})=>{const[o,r]=jt(null),[n,i]=jt(void 0),a=$l(kp),s=Vt(e=>{a.resetFormData(),a.handleErrorChange(void 0,void 0,{}),i(void 0),r(e)},[]),l=Vt(e=>{var t;a.resetFormData((({ruleName:e,notes:t,disabled:o,workloads:r,instrumentationLibraries:n,payloadCollection:i,codeAttributes:a,headersCollection:s,customInstrumentations:l})=>({ruleName:e||"",notes:t||"",disabled:!!o,workloads:r??null,instrumentationLibraries:n??null,payloadCollection:i??null,codeAttributes:a??null,headersCollection:s??null,customInstrumentations:l??null}))(e)),a.handleErrorChange(void 0,void 0,{}),i(void 0),r((t=e.type,Ki.find(e=>e.type===t)??null))},[]),c=Vt(()=>{if(!o)return{errorMessage:"No rule type selected",preparedFormData:wo(kp)};const e=(e=>{const t=wo(e);return t.headersCollection?.[sr.HeaderKeys]?.length&&(t.headersCollection[sr.HeaderKeys]=t.headersCollection[sr.HeaderKeys].map(e=>e.trim()).filter(e=>e)),t.customInstrumentations?.[lr.Golang]?.length&&(t.customInstrumentations[lr.Golang]=t.customInstrumentations[lr.Golang].map(e=>new xr(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).filter(e=>e.Verify())),t.customInstrumentations?.[lr.Java]?.length&&(t.customInstrumentations[lr.Java]=t.customInstrumentations[lr.Java].map(e=>new fr(e.className,e.methodName)).filter(e=>e.Verify())),t})(a.formData),t=((e,t)=>{const o={};switch(e){case ir.CodeAttributes:Object.values(t.codeAttributes||{}).some(e=>null!=e)||(o.codeAttributes="Code attributes are required");break;case ir.PayloadCollection:Object.values(t.payloadCollection||{}).some(e=>null!=e)||(o.payloadCollection="Payload collection are required");break;case ir.HeadersCollection:t.headersCollection?.[sr.HeaderKeys]?.length||(o.headersCollection="Header keys are required");break;case ir.CustomInstrumentation:t.customInstrumentations?.[lr.Golang]?.length||t.customInstrumentations?.[lr.Java]?.length||(o.customInstrumentations="Custom instrumentation are required")}return o})(o.type,e);a.handleErrorChange(void 0,void 0,t);const r=Object.keys(t).length>0?"Invalid form values":void 0;return i(r),{errorMessage:r,preparedFormData:e}},[a,o]),d=Ht(()=>({selectedOption:o,onSelectOption:s,loadRule:l,genericForm:a,validateFormData:c,errorMessage:n}),[o,s,l,a,c,n]);return e(Cp.Provider,{value:d,children:t})},Ap=()=>{const e=Gt(Cp);if(!e)throw new Error("useRuleFormContext must be used within a RuleFormContextProvider");return e};function Dp(e){return{name:"",notes:"",disabled:!1,ruleType:"Relevance",sourceScopes:[],operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:"",durationPreset:"500",customDurationMs:"",keepErrors:!1,percentageMode:"costReduction"===e?"sample":"all",percentagePreset:"0",customPercentage:""}}function Tp(e){if(!e.sourceScopes.length)return null;const t=[];for(const o of e.sourceScopes)if("source"===o.scopeType&&o.workloadName){const e={workloadName:o.workloadName};o.workloadKind&&(e.workloadKind=o.workloadKind),o.workloadNamespace&&(e.workloadNamespace=o.workloadNamespace),t.push(e)}else"namespace"===o.scopeType&&o.workloadNamespace?t.push({workloadNamespace:o.workloadNamespace}):"language"===o.scopeType&&o.workloadLanguage&&t.push({workloadLanguage:o.workloadLanguage});return t.length?t:null}function Ip(e){return Tp(e)}function Np(e){if("all"===e.percentageMode)return null;if("custom"===e.percentagePreset){const t=parseFloat(e.customPercentage);return isNaN(t)?null:t}return parseFloat(e.percentagePreset)}function Rp(e){if("custom"===e.durationPreset){const t=parseFloat(e.customDurationMs);return isNaN(t)?null:t}return parseInt(e.durationPreset,10)}function Op(e){return{httpServer:{[e.routeType]:e.route||null,method:e.method||null}}}function _p(e){return"all"===e.operationType?null:"httpServer"===e.operationType?Op(e):"httpClient"===e.operationType?{httpClient:{serverAddress:e.serverAddress||null,["route"===e.routeType?"templatedPath":"templatedPathPrefix"]:e.route||null,method:e.method||null}}:null}function Fp(e){return"all"===e.operationType?null:"httpServer"===e.operationType?Op(e):"kafkaConsumer"===e.operationType?{kafkaConsumer:{kafkaTopic:e.kafkaTopic||null}}:"kafkaProducer"===e.operationType?{kafkaProducer:{kafkaTopic:e.kafkaTopic||null}}:null}function Pp(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:Tp(e),percentageAtMost:Np(e),operation:_p(e)}}function Lp(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:Tp(e),error:e.keepErrors,durationAtLeastMs:"Duration"===e.ruleType?Rp(e):null,percentageAtLeast:Np(e),operation:Fp(e)}}function zp(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:Tp(e),percentageAtMost:Np(e)??0,operation:Fp(e)}}function Mp(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:Ip(e),operation:_p(e),percentageAtMost:Np(e),notes:e.notes||null}}function Bp(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:Ip(e),error:"Error"===e.ruleType,durationAtLeastMs:"Duration"===e.ruleType?Rp(e):null,operation:Fp(e),percentageAtLeast:Np(e),notes:e.notes||null}}function Up(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:Ip(e),operation:Fp(e),percentageAtMost:Np(e)??0,notes:e.notes||null}}const jp=["5000","1000","500","100","50"],Wp=["50","25","10","1","0.5","0.1","0"];function Hp(e){if(null==e)return{percentageMode:"all",percentagePreset:"0",customPercentage:""};const t=Wp.find(t=>Number(t)===e);return t?{percentageMode:"sample",percentagePreset:t,customPercentage:""}:{percentageMode:"sample",percentagePreset:"custom",customPercentage:String(e)}}function Xp(e){if(!e)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};const t=e;if(t.httpServer){return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""}}return t.kafkaConsumer?{operationType:"kafkaConsumer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaConsumer.kafkaTopic||""}:t.kafkaProducer?{operationType:"kafkaProducer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaProducer.kafkaTopic||""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}function Vp(e){const t=Dp(),o=(r=e.rule.sourceScopes,r?.length?r.map(e=>e.workloadLanguage?{scopeType:"language",workloadName:"",workloadKind:"",workloadNamespace:"",workloadLanguage:e.workloadLanguage}:e.workloadName?{scopeType:"source",workloadName:e.workloadName,workloadKind:e.workloadKind??"",workloadNamespace:e.workloadNamespace??"",workloadLanguage:""}:e.workloadNamespace?{scopeType:"namespace",workloadName:"",workloadKind:"",workloadNamespace:e.workloadNamespace,workloadLanguage:""}:{scopeType:"all",workloadName:"",workloadKind:"",workloadNamespace:"",workloadLanguage:""}).filter(e=>"all"!==e.scopeType):[]);var r;const n=function(e){return"highlyRelevant"!==e.category?"Relevance":e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance"}(e);let i,a,s={durationPreset:"500",customDurationMs:""},l=!1;switch(e.category){case"noisy":i=function(e){const t=e.rule.operation;if(!t)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};if(t.httpServer)return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""};if(t.httpClient)return{operationType:"httpClient",routeType:t.httpClient.templatedPathPrefix?"routePrefix":"route",route:t.httpClient.templatedPath||t.httpClient.templatedPathPrefix||"",serverAddress:t.httpClient.serverAddress||"",method:t.httpClient.method||"",kafkaTopic:""};return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}(e),a=Hp(e.rule.percentageAtMost);break;case"highlyRelevant":i=Xp(e.rule.operation),a=Hp(e.rule.percentageAtLeast),s=function(e){if(null==e)return{durationPreset:"500",customDurationMs:""};const t=jp.find(t=>Number(t)===e);return t?{durationPreset:t,customDurationMs:""}:{durationPreset:"custom",customDurationMs:String(e)}}(e.rule.durationAtLeastMs),l=e.rule.error;break;case"costReduction":i=Xp(e.rule.operation),a=Hp(e.rule.percentageAtMost)}return{...t,name:e.rule.name||"",notes:e.rule.notes||"",disabled:e.rule.disabled,ruleType:n,sourceScopes:o,...i,...s,keepErrors:l,...a}}var Gp;!function(e){e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"}(Gp||(Gp={}));const Kp=[Gp.Action,Gp.Endpoint,Gp.Scope,Gp.Duration],qp=r.span`
946
- font-family: ${({theme:e,$isMono:t})=>t?e.font_family.secondary:e.font_family.primary};
947
- font-size: ${({theme:e})=>e.v2.text.size.xxs}px;
948
- line-height: 20px;
949
- color: ${({theme:e,$variant:t})=>{const o=e.v2.colors;switch(t){case"action":return o.green[400];case"endpoint":return o.purple[300];case"scope":return o.yellow[400];case"duration":return o.orange[600];default:return o.white[500]}}};
950
- `,Jp=r.span`
951
- display: inline;
952
- cursor: help;
953
- text-decoration: underline dotted;
954
- text-underline-offset: 3px;
955
- `,Yp=r.div`
956
- display: flex;
957
- flex-direction: column;
958
- gap: 4px;
959
- background-color: ${({theme:e})=>e.v2.colors.black[500]};
960
- border-radius: 4px;
961
- padding: 8px;
962
- max-width: 300px;
963
- `,Qp=({items:o,children:r})=>{const{popupRef:n,popupOpen:i,setPopupOpen:a,popupPosition:s,handlePosition:l}=Bl({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:240}),c=e=>{l(e.clientX,e.clientY),a("mouseleave"!==e.type)};return t(Jp,{onMouseEnter:c,onMouseMove:c,onMouseLeave:c,children:[r,e(yc,{ref:n,isOpen:i,top:s.top,left:s.left,asPortal:!0,style:{backgroundColor:"transparent",border:"none"},borderRadius:"0",padding:"0",maxWidth:"300px",children:e(Yp,{children:o.map((t,o)=>e(cn,{size:sn.XXXS,children:t},o))})})]})},Zp=({parts:r})=>e(o,{children:r.map((r,n)=>{const i=e(qp,{$variant:r.variant,$isMono:Kp.includes(r.variant),children:r.text});return t(Ut,{children:[0!==n&&e(o,{children:" "}),r.tooltipItems?.length?e(Qp,{items:r.tooltipItems,children:i}):i]},`${r.variant}-${n}`)})});var eu;!function(e){e.Noisy="noisy",e.HighlyRelevant="highly-relevant",e.CostReduction="cost-reduction"}(eu||(eu={}));const tu=[{value:eu.Noisy,label:"1. Noisy Operations",tooltip:"Rules that reduce noise from high-volume, low-value operations"},{value:eu.HighlyRelevant,label:"2. Highly Relevant Operations",tooltip:"Rules that prioritize important traces for retention"},{value:eu.CostReduction,label:"3. Cost Reduction",tooltip:"Rules that optimize costs by sampling less critical data"}],ou={[eu.Noisy]:"This is the most efficient way to sample (with Head Sampling). Prefer to use it where possible.",[eu.HighlyRelevant]:'Any trace from the "Noisy Operations" category is sampled prior to checking highly relevance.',[eu.CostReduction]:"Cost reduction rules use Tail Sampling to drop traces that are unlikely to be useful for debugging or monitoring."},ru={[eu.Noisy]:"Noisy Operations rules list",[eu.HighlyRelevant]:"Highly Relevant Operations rules list",[eu.CostReduction]:"Cost Reduction rules list"},nu={[eu.Noisy]:"noisy",[eu.HighlyRelevant]:"highlyRelevant",[eu.CostReduction]:"costReduction"};function iu(e){if(e.workloadName){const t=e.workloadKind?.toLowerCase()||"deployment";return e.workloadNamespace?`${t} '${e.workloadName}' in namespace '${e.workloadNamespace}'`:`${t} '${e.workloadName}'`}return e.workloadNamespace?`namespace '${e.workloadNamespace}'`:e.workloadLanguage?`${e.workloadLanguage} services`:""}function au(e){if(!e?.length)return[{text:" for ",variant:Gp.Default},{text:"entire cluster",variant:Gp.Scope}];const t=e.map(iu).filter(Boolean);if(!t.length)return[{text:" for ",variant:Gp.Default},{text:"entire cluster",variant:Gp.Scope}];const o=[{text:" for ",variant:Gp.Default}],r=t.slice(0,2),n=t.slice(2);return r.forEach((e,t)=>{t>0&&o.push({text:", ",variant:Gp.Default}),o.push({text:e,variant:Gp.Scope})}),n.length>0&&o.push({text:` + ${n.length} more`,variant:Gp.Default,tooltipItems:n}),o}function su(e,t){if(!e)return[];const o=(r=e).startsWith("/")?r.slice(1):r;var r;const n=[{text:" starting at ",variant:Gp.Default}];return t?n.push({text:`${t} /${o}`,variant:Gp.Endpoint}):n.push({text:`endpoint /${o}`,variant:Gp.Endpoint}),n}function lu(e){const t=[];if(null!=e.percentageAtMost?(t.push({text:`Drop ${100-e.percentageAtMost}%`,variant:Gp.Action}),t.push({text:" of traces",variant:Gp.Default})):t.push({text:"Drop all traces",variant:Gp.Action}),e.operation){const o=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,r=e.operation.httpServer?.method||e.operation.httpClient?.method;t.push(...su(o,r));const n=e.operation.httpClient,i=n?.templatedPath||n?.templatedPathPrefix,a=n?.serverAddress;if((i||a)&&!o){const e=i&&a?`${a}/${i}`:i||a;t.push({text:" to ",variant:Gp.Default}),r?t.push({text:`${r} /${e}`,variant:Gp.Endpoint}):t.push({text:`/${e}`,variant:Gp.Endpoint})}}else t.push({text:" on ",variant:Gp.Default}),t.push({text:"any operation",variant:Gp.Endpoint});return t.push(...au(e.sourceScopes)),t}function cu(e){const t=[];if(null!=e.percentageAtLeast?(t.push({text:`Keep at least ${e.percentageAtLeast}%`,variant:Gp.Action}),t.push({text:" of traces",variant:Gp.Default})):t.push({text:"Keep all traces",variant:Gp.Action}),e.operation){const o=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,r=e.operation.httpServer?.method;t.push(...su(o,r))}else t.push({text:" on ",variant:Gp.Default}),t.push({text:"any operation",variant:Gp.Endpoint});return t.push(...au(e.sourceScopes)),!e.error&&null!=e.durationAtLeastMs&&e.durationAtLeastMs>0&&(t.push({text:" with duration > ",variant:Gp.Default}),t.push({text:`${e.durationAtLeastMs}ms`,variant:Gp.Duration})),t}function du(e){const t=[];if(t.push({text:`Drop ${e.percentageAtMost}%`,variant:Gp.Action}),t.push({text:" of traces",variant:Gp.Default}),e.operation){const o=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,r=e.operation.httpServer?.method;t.push(...su(o,r));const n=e.operation.kafkaConsumer?.kafkaTopic;n&&!o&&(t.push({text:" from ",variant:Gp.Default}),t.push({text:`topic '${n}'`,variant:Gp.Endpoint}))}else t.push({text:" on ",variant:Gp.Default}),t.push({text:"any operation",variant:Gp.Endpoint});return t.push(...au(e.sourceScopes)),t}function pu(e){return e.error?"Error":null!=e.durationAtLeastMs?"Duration":"Relevance"}function uu(e,t,o){const r=nu[t],n=[];for(const i of e)switch(t){case eu.Noisy:for(const e of i.noisyOperations)o?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:lu(e),category:r});break;case eu.HighlyRelevant:for(const e of i.highlyRelevantOperations)o?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:cu(e),category:r,typeBadge:pu(e)});break;case eu.CostReduction:for(const e of i.costReductionRules)o?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:du(e),category:r})}return n}function hu(e,t){switch(e){case"noisy":return lu(t);case"highlyRelevant":return cu(t);case"costReduction":return du(t)}}function mu(e,t,o,r){for(const n of e)if(n.id===t)switch(r){case"noisy":{const e=n.noisyOperations.find(e=>e.ruleId===o);if(e)return{category:"noisy",samplingId:n.id,rule:e};break}case"highlyRelevant":{const e=n.highlyRelevantOperations.find(e=>e.ruleId===o);if(e)return{category:"highlyRelevant",samplingId:n.id,rule:e};break}case"costReduction":{const e=n.costReductionRules.find(e=>e.ruleId===o);if(e)return{category:"costReduction",samplingId:n.id,rule:e};break}}return null}function gu(e,t){const o=mu(e,t.samplingId,t.rule.ruleId,t.category);return o?{...o,summary:hu(o.category,o.rule)}:null}function fu(e,t){const o=mu(e,t.samplingId,t.ruleId,t.category);return o?{...o,summary:t.summary}:null}function xu(e){return null==e||Array.isArray(e)&&0===e.length?null:e}function yu(e,t){return JSON.stringify({sourceScopes:xu(e),operation:xu(t)})}function bu(e,t,o,r){return JSON.stringify({sourceScopes:xu(e),error:t??!1,durationAtLeastMs:xu(o),operation:xu(r)})}function vu(e,t){return JSON.stringify({sourceScopes:xu(e),operation:xu(t)})}function $u(e,t,o,r){switch(t){case"noisy":{const t=yu(o.sourceScopes,o.operation);for(const o of e)for(const e of o.noisyOperations)if((!r||e.ruleId!==r)&&yu(e.sourceScopes,e.operation)===t)return e.ruleId;return null}case"highlyRelevant":{const t=bu(o.sourceScopes,o.error,o.durationAtLeastMs,o.operation);for(const o of e)for(const e of o.highlyRelevantOperations)if((!r||e.ruleId!==r)&&bu(e.sourceScopes,e.error,e.durationAtLeastMs,e.operation)===t)return e.ruleId;return null}case"costReduction":{const t=vu(o.sourceScopes,o.operation);for(const o of e)for(const e of o.costReductionRules)if((!r||e.ruleId!==r)&&vu(e.sourceScopes,e.operation)===t)return e.ruleId;return null}}}function wu(e){if(!e||!e.enabled)return[{text:"Auto rule is ",variant:Gp.Default},{text:"disabled",variant:Gp.Action}];return[{text:`Keep ${e.keepPercentage??0}%`,variant:Gp.Action},{text:" of ",variant:Gp.Default},{text:"traces for kubelet health probes in the entire cluster",variant:Gp.Scope}]}function Su(e){return!(!0!==e.error||e.sourceScopes&&0!==e.sourceScopes.length||e.operation||null!=e.percentageAtLeast&&100!==e.percentageAtLeast)}function ku(e){for(const t of e){const e=t.highlyRelevantOperations.find(Su);if(e)return{rule:e,samplingId:t.id}}return null}function Cu(e){return!e||e.disabled?[{text:"Auto rule is ",variant:Gp.Default},{text:"disabled",variant:Gp.Action}]:[{text:"Keep 100%",variant:Gp.Action},{text:" of ",variant:Gp.Default},{text:"error traces across the entire cluster",variant:Gp.Scope}]}function Eu(e){return!(e.sourceScopes&&0!==e.sourceScopes.length||e.operation)}function Au(e){for(const t of e){const e=t.costReductionRules.find(Eu);if(e)return{rule:e,samplingId:t.id}}return null}function Du(e){return!e||e.disabled?[{text:" is ",variant:Gp.Default},{text:"disabled",variant:Gp.Action}]:[{text:`Drop ${e.percentageAtMost}%`,variant:Gp.Action},{text:" of ",variant:Gp.Default},{text:"traces across the entire cluster",variant:Gp.Scope}]}var Tu;!function(e){e.Create="create",e.View="view",e.EditAutoNoisy="edit-auto-noisy",e.EditAutoCostReduction="edit-auto-cost-reduction",e.EditAutoHighlyRelevant="edit-auto-highly-relevant"}(Tu||(Tu={}));const Iu=Kt(null),Nu=["50","25","10","1","0"];function Ru(e){const t=String(e);return Nu.includes(t)?t:"custom"}const Ou=({category:t,sourceOptions:o=[],namespaceOptions:r=[],children:n})=>{const{formData:i,handleFormChange:a,resetFormData:s}=$l(Dp(t)),[l,c]=jt(null);Wt(()=>{s(Dp(t)),c(null)},[t]);const d=Vt(e=>{c(null),a(void 0,void 0,{...i,...e})},[i,a]),p=Vt(()=>{s(Dp(t)),c(null)},[t,s]),u=Ht(()=>({formType:Tu.Create,category:t,formData:i,handleChange:d,resetForm:p,duplicateWarning:l,setDuplicateWarning:c,sourceOptions:o,namespaceOptions:r}),[t,i,d,p,l,o,r]);return e(Iu.Provider,{value:u,children:n})},_u=({data:t,defaultEditMode:o,sourceOptions:r=[],namespaceOptions:n=[],children:i})=>{const[a,s]=jt(!1),{formData:l,handleFormChange:c,resetFormData:d}=$l(void 0),p=Xt(null),[u,h]=jt(null);Wt(()=>{t!==p.current&&(p.current=t,t&&o?(d(Vp(t)),h(null),s(!0)):(s(!1),h(null)))},[t,o]);const m=Vt(e=>{h(null),c(void 0,void 0,{...l,...e})},[l,c]),g=Vt(()=>{t&&(d(Vp(t)),h(null),s(!0))},[t,d]),f=Vt(()=>{s(!1),h(null)},[]),x=Ht(()=>({formType:Tu.View,data:t,isEditing:a,formData:l,handleChange:m,handleEdit:g,handleCancelEdit:f,duplicateWarning:u,setDuplicateWarning:h,sourceOptions:r,namespaceOptions:n}),[t,a,l,m,g,f,u,r,n]);return e(Iu.Provider,{value:x,children:i})};function Fu(e){const[t,o]=jt(()=>Ru(e)),[r,n]=jt(()=>"custom"===Ru(e)?String(e):"");Wt(()=>{const t=Ru(e);o(t),n("custom"===t?String(e):"")},[e]);const i=Ht(()=>"custom"===t?Number(r)||0:Number(t),[t,r]);return{percentagePreset:t,setPercentagePreset:o,customPercentage:r,setCustomPercentage:n,resolvedPercentage:i}}const Pu=({enabled:t,keepPercentage:o,children:r})=>{const[n,i]=jt(t),a=Fu(o);Wt(()=>{i(t)},[t]);const s=Ht(()=>wu({enabled:n,keepPercentage:a.resolvedPercentage}),[n,a.resolvedPercentage]),l=Ht(()=>({formType:Tu.EditAutoNoisy,localEnabled:n,setLocalEnabled:i,...a,summary:s}),[n,a,s]);return e(Iu.Provider,{value:l,children:r})},Lu=({enabled:t,dropPercentage:o,children:r})=>{const[n,i]=jt(t),a=Fu(o);Wt(()=>{i(t)},[t]);const s=Ht(()=>Du(n?{disabled:!1,percentageAtMost:a.resolvedPercentage}:null),[n,a.resolvedPercentage]),l=Ht(()=>({formType:Tu.EditAutoCostReduction,localEnabled:n,setLocalEnabled:i,...a,summary:s}),[n,a,s]);return e(Iu.Provider,{value:l,children:r})},zu=({enabled:t,children:o})=>{const[r,n]=jt(t);Wt(()=>{n(t)},[t]);const i=Ht(()=>Cu(r?{disabled:!1}:null),[r]),a=Ht(()=>({formType:Tu.EditAutoHighlyRelevant,localEnabled:r,setLocalEnabled:n,summary:i}),[r,i]);return e(Iu.Provider,{value:a,children:o})},Mu=t=>{switch(t.formType){case Tu.Create:return e(Ou,{...t});case Tu.View:return e(_u,{...t});case Tu.EditAutoNoisy:return e(Pu,{...t});case Tu.EditAutoCostReduction:return e(Lu,{...t});case Tu.EditAutoHighlyRelevant:return e(zu,{...t})}};function Bu(e){const t=Gt(Iu);if(!t)throw new Error("useSamplingRulesFormContext must be used within a SamplingRulesFormProvider");if(e&&t.formType!==e)throw new Error(`Expected formType "${e}" but found "${t.formType}"`);return t}const Uu=Kt({snapshots:null,setSnapshots:()=>{},isFetching:!1,setIsFetching:()=>{},formData:[],handleSourceChange:()=>{},handleSelectAll:()=>{},formDiff:{},isFormDirty:!1}),ju=({children:t,selectedConnectionIds:o,initialInputs:r})=>{const{tier:n}=Gl(),i=n===zo.Onprem,{selectedStreamName:a}=Bs(),[s,l]=jt(!1),[c,d]=jt(null),[p,u]=jt([]);Wt(()=>{c&&u(e=>{const t=((e,t)=>wo(((e,t)=>e.clusters.filter(({clusterId:e})=>!t||t.includes(e)))(e,t)))(c,o);return t.map(t=>{const o=e?.find(e=>e.clusterId===t.clusterId),n=o??t;if(r?.[t.clusterId]){const e=r[t.clusterId],o=wo(n);return e.forEach(e=>{const t=o.namespaces.find(t=>t.name===e.namespace);if(t)if(e.name&&e.kind){const o=t.workloads.find(t=>t.name===e.name&&t.kind===e.kind);o&&(o.selected=e.selected)}else t.selected=e.selected,e.selected&&t.workloads.forEach(e=>{Kl.has(e.kind)&&!i||(e.selected=!0)})}),o}return n})})},[c,o,r]);const{formDiff:h,isFormDirty:m}=Ht(()=>{const e=((e,t,o)=>{const r={};return e.forEach(e=>{e.namespaces.forEach(n=>{const i=t.find(t=>t.clusterId===e.clusterId)?.namespaces.find(e=>e.name===n.name),a=n.selected||!1,s=a!==i?.selected;if(s&&(r[e.clusterId]||(r[e.clusterId]=[]),r[e.clusterId].push({namespace:n.name,selected:a,currentStreamName:o}),a&&(r[e.clusterId]=r[e.clusterId].filter(e=>e.namespace!==n.name||e.namespace===n.name&&(!e.name||!e.kind)))),!s||!a){const t=((e,t,o)=>{const r=[];return t.workloads.forEach(n=>{const i=e?.workloads.find(e=>e.name===n.name&&e.kind===n.kind);n.selected!==i?.selected&&r.push({namespace:t.name,name:n.name,kind:n.kind,selected:n.selected||!1,currentStreamName:o})}),r})(i,n,o);t.length>0&&(r[e.clusterId]||(r[e.clusterId]=[]),r[e.clusterId].push(...t))}})}),r})(p,c?.clusters||[],a);return{formDiff:e,isFormDirty:Object.keys(e).length>0}},[p,c,a]),g=Vt(e=>!i&&Kl.has(e),[i]),f=Vt(({clusterId:e,workloadId:t,selected:o,auto:r})=>{u(n=>{const i=wo(n),a=i.findIndex(t=>t.clusterId===e);if(-1===a)return i;const s=i[a].namespaces.findIndex(e=>e.name===t.namespace);if(-1===s)return i;if(t.kind&&t.name){const e=i[a].namespaces[s].workloads.findIndex(e=>e.name===t.name&&e.kind===t.kind);if(-1===e)return i;const r="boolean"==typeof o?o:!i[a].namespaces[s].workloads[e].selected;if(i[a].namespaces[s].workloads[e].selected=r,r){const e=i[a].namespaces[s].workloads.filter(e=>!g(e.kind));e.every(e=>e.selected)&&(i[a].namespaces[s].selected=!0)}else i[a].namespaces[s].selected=!1}else{const e="boolean"==typeof r?r:!i[a].namespaces[s].selected;i[a].namespaces[s].selected=e,e?i[a].namespaces[s].workloads.forEach(e=>{g(e.kind)||(e.selected=!0)}):"boolean"!=typeof o||o||i[a].namespaces[s].workloads.forEach(e=>{e.selected=!1})}return i})},[g]),x=Vt(({clusterId:e,namespaceName:t,boolean:o,searchText:r="",searchBy:n="",filters:i})=>{u(a=>{const s=wo(a),l=n===Wo.Namespace?r:"",c=n===Wo.Source?r:"",d=!!l||!!c||!!i?.showOnlySelected;return s.forEach((r,n)=>{e&&r.clusterId!==e||r.namespaces.forEach(({name:e,workloads:r},a)=>{if(!t||e===t)if(d)if(t){r.forEach((e,t)=>{o&&g(e.kind)||Yl(e,c,i||{showOnlySelected:!1})&&(s[n].namespaces[a].workloads[t].selected=o)});const e=s[n].namespaces[a].workloads.filter(e=>!g(e.kind)),t=e.every(e=>e.selected);s[n].namespaces[a].selected=t}else{if(!Jl(s[n].namespaces[a],l,i||{showOnlySelected:!1}))return;s[n].namespaces[a].selected=o,r.forEach((e,t)=>{o&&g(e.kind)||(s[n].namespaces[a].workloads[t].selected=o)})}else s[n].namespaces[a].selected=o,r.forEach((e,t)=>{o&&g(e.kind)||(s[n].namespaces[a].workloads[t].selected=o)})})}),s})},[g]);return e(Uu.Provider,{value:{snapshots:c,setSnapshots:d,isFetching:s,setIsFetching:l,formData:p,handleSourceChange:f,handleSelectAll:x,formDiff:h,isFormDirty:m},children:t})},Wu=()=>Gt(Uu),Hu=Kt({formType:void 0}),Xu=({children:t,formType:o})=>{const r=Ht(()=>({formType:o}),[o]);return e(Hu.Provider,{value:r,children:t})},Vu=()=>Gt(Hu),Gu=r.div`
964
- display: flex;
965
-
966
- align-items: center;
967
- gap: 6px;
968
- margin-bottom: 4px;
969
- `,Ku=r(Si)`
970
- font-size: 14px;
971
- opacity: 0.8;
972
- line-height: 22px;
973
- overflow: hidden;
974
- white-space: nowrap;
975
- text-overflow: ellipsis;
976
- color: ${({$status:e,theme:t})=>e?t.text[e]:t.text.secondary};
977
- `,qu=r(Si)`
978
- font-size: 12px;
979
- color: ${({theme:e})=>e.text.darker_grey};
980
- opacity: 0.8;
981
- `,Ju=({title:o,required:r,tooltip:n,style:i,status:a})=>o?e(Gu,{style:i,children:t(Cc,{text:n,withIcon:!0,children:[e(Ku,{$status:a,children:o}),!r&&e(qu,{children:"(optional)"})]})}):null,Yu=r.div`
982
- display: flex;
983
- flex-direction: column;
984
- position: relative;
985
- width: 100%;
986
- `,Qu=r.div`
987
- width: 100%;
988
- display: flex;
989
- align-items: center;
990
- height: 36px;
991
- gap: 12px;
992
- transition: border-color 0.3s;
993
- border-radius: 32px;
994
- border: 1px solid ${({theme:e})=>e.colors.border};
995
- ${({$disabled:e})=>e&&n`
996
- cursor: not-allowed;
997
- opacity: 0.6;
998
- `}
999
- ${({$isActive:e,$hasError:t,$status:o})=>e?n`
1000
- border-color: ${({theme:e})=>e.colors.secondary};
1001
- `:t?n`
1002
- border-color: ${({theme:e})=>e.text.error};
1003
- `:o?n`
1004
- border-color: ${({theme:e})=>e.text[o]};
1005
- `:""}
1006
- &:hover {
1007
- border-color: ${({theme:e})=>e.colors.secondary};
1008
- }
1009
- &:focus-within {
1010
- border-color: ${({theme:e})=>e.colors.secondary};
1011
- }
1012
- `,Zu=r.input`
1013
- padding-left: ${({$hasIcon:e})=>e?"0":"16px"};
1014
- flex: 1;
1015
- min-width: 150px;
1016
- width: 100%;
1017
- border: none;
1018
- outline: none;
1019
- background: none;
1020
- color: ${({theme:e})=>e.text.secondary};
1021
- font-size: 14px;
1022
- font-family: ${({theme:e})=>e.font_family.primary};
1023
- font-weight: 300;
1024
- &::placeholder {
1025
- color: ${({theme:e})=>e.text.secondary};
1026
- font-family: ${({theme:e})=>e.font_family.primary};
1027
- opacity: 0.4;
1028
- font-size: 14px;
1029
- font-weight: 300;
1030
- line-height: 22px; /* 157.143% */
1031
- }
1032
- &:disabled {
1033
- cursor: not-allowed;
1034
- opacity: 0.6;
1035
- }
1036
- &::-webkit-inner-spin-button,
1037
- &::-webkit-outer-spin-button {
1038
- -webkit-appearance: none;
1039
- margin: 0;
1040
- }
1041
- `,eh=r.div`
1042
- display: flex;
1043
- align-items: center;
1044
- margin-left: 12px;
1045
- `,th=r(eh)`
1046
- cursor: pointer;
1047
- `,oh=r.button`
1048
- background-color: ${({theme:e})=>e.colors.primary};
1049
- border: none;
1050
- color: ${({theme:e})=>e.text.secondary};
1051
- padding: 8px 16px;
1052
- border-radius: 20px;
1053
- cursor: pointer;
1054
- margin-left: 8px;
1055
- &:hover {
1056
- background-color: ${({theme:e})=>e.colors.secondary};
1057
- }
1058
- &:disabled {
1059
- background-color: ${({theme:e})=>e.colors.border};
1060
- cursor: not-allowed;
1061
- }
1062
- `,rh=({icon:o,buttonLabel:r,onButtonClick:n,hasError:a,errorMessage:s,title:l,tooltip:c,required:d,value:p,onChange:u,type:h=Vo.Text,name:m,status:g,...f})=>{const x=i(),y=h===Vo.Password,[b,v]=jt(!1);return t(Yu,{children:[e(Ju,{title:l,required:d,tooltip:c,status:g}),t(Qu,{$disabled:f.disabled,$hasError:a||!!s,$isActive:!!f.autoFocus,$status:g,children:[y?e(th,{onClick:()=>v(e=>!e),children:e(b?At:Dt,{size:14,fill:x.text.grey})}):o?e(eh,{children:e(o,{size:14,fill:x.text.grey})}):null,e(Zu,{"data-id":m,type:b||h===Vo.Number?Vo.Text:h,$hasIcon:!!o||y,name:m,value:p,onChange:e=>{e.stopPropagation(),h===Vo.Number&&(e.target.value=di(e.target.value)),u?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},...f}),r&&n&&e(oh,{onClick:n,disabled:f.disabled,children:r})]}),!!s&&e(Ei,{children:s})]})},nh=r.div`
1063
- display: flex;
1064
- flex-direction: column;
1065
- min-width: 120px;
1066
- width: 100%;
1067
- opacity: ${({$disabled:e})=>e?.5:1};
1068
- `,ih=r.div`
1069
- position: relative;
1070
- `,ah=r.div`
1071
- display: flex;
1072
- align-items: center;
1073
- justify-content: space-between;
1074
- height: 36px;
1075
- padding: ${({$isMulti:e,$hasSelections:t})=>e&&t?"0 16px 0 6px":"0 16px"};
1076
- border-radius: 32px;
1077
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1078
-
1079
- ${({$isOpen:e,$isMulti:t,theme:o})=>e&&!t?n`
1080
- border: 1px solid ${o.text.grey};
1081
- background: ${o.colors.dropdown_bg_2};
1082
- `:n`
1083
- border: 1px solid ${o.colors.border};
1084
- background: transparent;
1085
- `};
1086
-
1087
- ${({$hasError:e,$status:t})=>e?n`
1088
- border-color: ${({theme:e})=>e.text.error};
1089
- `:t?n`
1090
- border-color: ${({theme:e})=>e.text[t]};
1091
- `:""}
1092
-
1093
- &:hover {
1094
- border-color: ${({$isMulti:e,$hasSelections:t,$disabled:o,theme:r})=>o?"auto":e&&t?r.colors.border:r.colors.secondary};
1095
- }
1096
- `,sh=r.div`
1097
- display: flex;
1098
- align-items: center;
1099
- gap: 4px;
1100
- `,lh=({options:o,value:r,onSelect:n,onDeselect:i,title:a,tooltip:s,placeholder:l,disabled:c=!1,isMulti:d=!1,showSearch:p=!1,required:u=!1,errorMessage:h,hasError:m=!1,status:g})=>{const[f,x]=jt(!1),[y,b]=jt(!1),v=Xt(null);zl(v,()=>x(!1));const $=()=>{(()=>{if(v.current){const e=v.current.getBoundingClientRect().bottom+300>window.innerHeight;b(e)}})(),x(e=>!e)},w=Array.isArray(r)?r.length:0;return t(nh,{$disabled:c,children:[e(Ju,{title:a,required:u,tooltip:s,status:g}),t(ih,{ref:v,children:[t(ah,{$isOpen:f,$isMulti:d,$hasSelections:!!Array.isArray(r)&&!!r.length,$hasError:!!h||m,$status:g,$disabled:c,onClick:()=>!c&&$(),children:[e(uh,{value:r,placeholder:l,onDeselect:i}),t(sh,{children:[d&&e(fl,{label:w,filled:!!w}),e(hd,{extend:f})]})]}),f&&e(gh,{openUpwards:y,options:o,value:r,onSelect:e=>{n?.(e),d||$()},onDeselect:e=>{i?.(e),d||$()},isMulti:d,showSearch:p})]}),!!h&&e(Ei,{children:h})]})},ch=r(sh)`
1101
- max-width: calc(100% - 50px);
1102
- overflow-x: auto;
1103
- `,dh=r(Si)`
1104
- display: flex;
1105
- align-items: center;
1106
- gap: 2px;
1107
- padding: 4px 12px;
1108
- background: ${({theme:e})=>e.colors.dropdown_bg_2};
1109
- border-radius: 360px;
1110
- white-space: nowrap;
1111
- text-overflow: ellipsis;
1112
- img {
1113
- &:hover {
1114
- transform: scale(2);
1115
- transition: transform 0.3s;
1116
- }
1117
- }
1118
- `,ph=r(Si)``,uh=({value:o,placeholder:r,onDeselect:n})=>{const a=i();return Array.isArray(o)?o.length?e(ch,{children:o.map(o=>t(dh,{size:14,children:[o.value,e(hc,{orientation:"vertical",length:"10px",margin:"0 4px"}),e(yt,{size:12,onClick:e=>{e.stopPropagation(),n?.(o)}})]},`multi-label-${o.id}`))}):e(ph,{size:14,color:a.text.darker_grey,children:r}):e(ph,{size:14,color:o?.value?void 0:a.text.darker_grey,children:o?.value||r})},hh=r.div`
1119
- position: absolute;
1120
- ${({$openUpwards:e})=>e?"bottom":"top"}: calc(100% + 8px);
1121
- left: 0;
1122
- z-index: 1;
1123
- display: flex;
1124
- flex-direction: column;
1125
- overflow-y: auto;
1126
- width: calc(100% - 16px);
1127
- max-height: 200px;
1128
- gap: 8px;
1129
- padding: 8px;
1130
- background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
1131
- border: 1px solid ${({theme:e})=>e.colors.border};
1132
- border-radius: 24px;
1133
- `,mh=r.div`
1134
- display: flex;
1135
- flex-direction: column;
1136
- align-items: center;
1137
- `,gh=({openUpwards:o,options:r,value:n,onSelect:i,onDeselect:a,isMulti:s,showSearch:l})=>{const[c,d]=jt(""),p=r.filter(e=>e.value?.toLowerCase().includes(c?.toLowerCase()));return t(hh,{$openUpwards:o,children:[l&&t(mh,{children:[e(rh,{placeholder:"Search...",icon:Tt,value:c,onChange:e=>d(e.target.value)}),e(hc,{thickness:1,margin:"8px 0 0 0"})]}),0===p.length?e(ep,{subTitle:l&&c?void 0:" "}):p.map((t,o)=>e(xh,{option:t,value:n,isMulti:s,onSelect:i,onDeselect:a},`dropdown-option-${t.id||o}`))]})},fh=r.div`
1138
- padding: 8px 12px;
1139
- cursor: pointer;
1140
- display: flex;
1141
- justify-content: space-between;
1142
- align-items: center;
1143
- border-radius: 32px;
1144
- &:hover,
1145
- &.selected {
1146
- background: ${({theme:e})=>e.colors.majestic_blue+sl["024"]};
1147
- }
1148
- `,xh=({option:o,value:r,isMulti:n,onSelect:a,onDeselect:s})=>{const l=i(),c=Array.isArray(r)?!!r?.find(e=>e.id===o.id):r?.id===o.id,d=e=>e?a?.(o):s?.(o);return n?e(fh,{className:c?"selected":"",onClick:()=>d(!c),children:e(qc,{title:o.value||"",titleColor:l.text.secondary,value:c,onChange:d,style:{width:"100%"}})}):t(fh,{className:c?"selected":"",onClick:()=>c?s?.(o):a?.(o),children:[t(Tn,{$gap:8,children:[o.icon&&e(o.icon,{}),e(Si,{size:14,children:o.value})]}),c&&e(ft,{})]})},yh=r(In)`
1149
- gap: 12px;
1150
- `,bh=r(Tn)`
1151
- width: 100%;
1152
- gap: 12px;
1153
- align-items: flex-end;
1154
- `,vh=({clientX:o=0,flipX:r,clientY:n=0,flipY:a,isOpen:s,onClose:l,onSave:c,withDelete:d,onDelete:p,title:u,titleTooltip:h,warning:m,children:g})=>{const f=i(),{popupRef:x,popupPosition:y,handlePosition:b}=Bl({onClickOutside:l});return Ll({key:"Enter",active:s},c),Wt(()=>b(o,n),[o,n]),0===y.top&&0!==n||0===y.left&&0!==o?null:e(yc,{ref:x,isOpen:s,top:a?void 0:y.top,bottom:a?y.top:void 0,left:r?void 0:y.left,right:r?y.left:void 0,padding:"24px",children:t(yh,{children:[e(Cc,{text:h,withIcon:!0,children:e(Si,{size:14,children:u})}),t(bh,{children:[g,t(Tn,{$gap:6,children:[e(Dc,{withBorder:!0,onClick:l,tooltip:"Cancel",children:e(yt,{})}),e(Dc,{withBorder:!0,backgroundColor:f.colors.secondary,onClick:c,tooltip:"Save",children:e(ft,{fill:f.text.primary})}),d&&e(Dc,{onClick:p,tooltip:"Undo",children:e(It,{})})]})]}),m&&e(Lc,{type:Go.Warning,message:m})]})})},$h=r.div`
1155
- position: relative;
1156
- `,wh=({defaultLanguage:o=Uo.Unknown,defaultVersion:r="",defaultOtelDistroName:n=null,handleSave:i})=>{const{tier:a}=Gl(),{addNotification:s}=Vs(),{formData:l,handleFormChange:c,resetFormData:d}=$l({language:o,version:r,otelDistroName:n}),[p,u]=jt(!1),h=()=>{u(!1),d()},m=Ht(()=>{if(!l.language)return[];const e=Ps[l.language].community,t=a===zo.Onprem?Ps[l.language].enterprise:[];return e.concat(t)},[l.language,a]);return t($h,{children:[e(Dc,{tooltip:Ar.OVERRIDE_RUNTIME_DETAILS,size:32,onClick:()=>{u(!0)},children:e(kt,{})}),e(vh,{flipX:!0,clientX:36,isOpen:p,onClose:h,onSave:async()=>{!l.version||ni(l.version)?(await i({...l}),h()):s({type:Go.Warning,message:Er.INVALID_VERSION,hideFromHistory:!0})},withDelete:!0,onDelete:async()=>{await i({language:null,version:"",otelDistroName:null}),h()},title:Ar.OVERRIDE_RUNTIME_DETAILS,warning:Ar.OVERRIDE_RUNTIME_WARNING,children:t(In,{$gap:12,children:[t(Tn,{$gap:12,children:[e(lh,{title:Ar.LANGUAGE,options:_s,value:_s.find(e=>e.id===l.language),onSelect:e=>{c("language",e.id),c("version",""),c("otelDistroName",null)},required:!0}),e(rh,{title:Ar.RUNTIME_VERSION,placeholder:Ar.VERSION_PLACEHOLDER,value:l.version,onChange:e=>c("version",e.target.value),required:!1})]}),l.language&&e(lh,{title:"Otel Distro Name",options:m,value:m.find(e=>e.id===l.otelDistroName),onSelect:e=>c("otelDistroName",e.id),required:!1})]})})]})},Sh=r(Tn)`
1157
- width: 100%;
1158
- justify-content: center;
1159
- `,kh=({containerName:r,runtimeInfo:n,agentEnabled:a,overrides:s,callbackRuntimeOverride:l})=>{const c=i(),d=s?.runtimeInfo??n,p=d?.language??Uo.Unknown,u=d?.runtimeVersion??"",h=null!=s?.runtimeInfo,m=a?.agentEnabled??!1,g=a?.agentEnabledStatus?.message??"",f=a?.otelDistroName??null,x=m?Go.Success:g?Go.Info:Go.Warning,y=m?Ko.INSTRUMENTED:g?Ko.NOT_INSTRUMENTED:Ko.INSTRUMENTING;return e(Xd,{title:r,subTitle:`${p?Os[p]:"no runtime info"}`+(u?` • Runtime Version: ${u}`:""),iconProps:{icon:Lr(p)},extendableProps:{isExtended:!!g,renderExtended:()=>e(Sh,{children:e(Si,{size:12,family:"secondary",color:c.text.info,children:ii(g)})})},renderActions:()=>t(o,{children:[e(kd,{status:x,title:y,subtitle:f||void 0,withIcon:!0,withBorder:!0}),h&&e(kd,{status:Go.Default,forceIcon:Nt,title:Ar.OVERIDDEN,withIcon:!0,withBorder:!0}),l&&e(wh,{defaultLanguage:p,defaultVersion:u??"",defaultOtelDistroName:f,handleSave:e=>l({...e,containerName:r})})]})})},Ch=r.tr`
1160
- cursor: ${({$withHover:e})=>e?"pointer":"default"};
1161
- opacity: ${({$faded:e})=>e?.5:1};
1162
- `,Eh=r.td`
1163
- position: relative;
1164
- width: fit-content;
1165
- padding: 16px 8px 16px ${({$isFirst:e})=>e?"16px":"8px"};
1166
- color: ${({theme:e})=>e.text.secondary};
1167
- font-family: ${({theme:e})=>e.font_family.primary};
1168
- font-size: 14px;
1169
- white-space: nowrap;
1170
- `,Ah=r(Si)`
1171
- font-size: 14px;
1172
- color: ${({$color:e,theme:t})=>e??t.text.secondary};
1173
- line-height: 16px;
1174
-
1175
- overflow: hidden;
1176
- overflow-wrap: break-word;
1177
- white-space: wrap;
1178
- text-wrap: wrap;
1179
- text-overflow: ellipsis;
1180
- display: -webkit-box;
1181
- -webkit-line-clamp: 2;
1182
- -webkit-box-orient: vertical;
1183
- `,Dh=r.div`
1184
- position: absolute;
1185
- top: 0;
1186
- left: 0;
1187
- z-index: -1;
1188
- width: ${({$width:e})=>e}px;
1189
- height: ${({$height:e})=>e}px;
1190
- border-radius: 16px;
1191
- background-color: ${({theme:e,$hovered:t,$status:o})=>t?o?e.text[o]+sl["020"]:e.colors.majestic_blue+sl["030"]:o?e.text[o]+sl["010"]:e.colors.secondary+sl["005"]};
1192
- `,Th=({index:o,columns:r,cells:n,onClick:i,status:a,faded:s})=>{const{containerRef:l,containerHeight:c,containerWidth:d}=Al(),[p,u]=jt(!1);return e(Ch,{ref:l,onMouseEnter:()=>!!i&&u(!0),onMouseLeave:()=>!!i&&u(!1),onClick:()=>!!i&&i(),$withHover:!!i,$faded:s,children:r.map(({key:r},i)=>{const s=n.find(({columnKey:e})=>e===r);if(!s)return null;const{value:l,textColor:u,withTooltip:h,icon:m,component:g}=s;return t(Eh,{$isFirst:0===i,children:[m?e(_d,{icon:m}):g?e(g,{}):e(Cc,{text:h&&l?String(l):"",children:e(Ah,{$color:u,children:Qn(l)?"-":l})}),0===i&&e(Dh,{$height:c,$width:d,$top:c*o,$hovered:p,$status:a})]},`table-row-${r}-${l}-${o}-${i}`)})})},Ih=r.div`
1193
- width: 100%;
1194
- `,Nh=r.table`
1195
- position: relative;
1196
- z-index: 0;
1197
- width: 100%;
1198
- border-collapse: separate;
1199
- border-spacing: 0 12px;
1200
- `,Rh=r.thead`
1201
- // only supported with "border-collapse: collapse;"
1202
- // border-top: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
1203
- // border-bottom: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
1204
- `,Oh=r.th`
1205
- // only required with "border-collapse: separate;"
1206
- border-top: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
1207
- border-bottom: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
1208
-
1209
- padding: 8px;
1210
- `,_h=r(Tn)`
1211
- cursor: pointer;
1212
- &:hover {
1213
- * {
1214
- color: ${({theme:e})=>e.text.secondary};
1215
- }
1216
- }
1217
- `,Fh=r(Si)`
1218
- color: ${({theme:e})=>e.text.darker_grey};
1219
- font-family: ${({theme:e})=>e.font_family.secondary};
1220
- text-transform: uppercase;
1221
- font-size: 12px;
1222
- font-weight: 500;
1223
- text-wrap: nowrap;
1224
- `,Ph=r.tbody``,Lh=({columns:o,rows:r})=>{const[n,i]=jt(Lo.Ascending),[a,s]=jt("name"),l=Vt(e=>{a===e?i(e=>e===Lo.Ascending?Lo.Descending:Lo.Ascending):(s(e),i(Lo.Ascending))},[a]),c=Ht(()=>{const t=(e,t)=>e.cells.find(({columnKey:e})=>e===t)?.value??null;return(a?[...r].sort((e,o)=>{const r=t(e,a),i=t(o,a);return(n===Lo.Ascending?1:-1)*((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:"string"==typeof e&&"string"==typeof t?e.localeCompare(t):"boolean"==typeof e&&"boolean"==typeof t?e===t?0:e?1:-1:String(e).localeCompare(String(t)))(r,i)}):r).map(({status:t,faded:r,cells:n,onClick:i},a)=>e(Th,{index:a,columns:o,cells:n,onClick:i,status:t,faded:r},`row-${a}`))},[o,r,a,n]);return e(Ih,{children:t(Nh,{children:[e(Rh,{children:e("tr",{children:o.map(({key:o,title:r,sortable:n})=>e(Oh,{children:n?t(_h,{onClick:()=>l(o),children:[e(Rt,{}),e(Fh,{children:r})]}):e(Fh,{children:r})},`column-${o}`))})}),e(Ph,{children:c})]})})};var zh;!function(e){e.Code="code",e.Table="table",e.Badge="badge",e.Loader="loader",e.Divider="divider",e.Monitors="monitors",e.CopyText="copy-text",e.ActiveStatus="active-status"}(zh||(zh={}));const Mh=r.div`
1225
- display: flex;
1226
- flex-wrap: wrap;
1227
- gap: 16px 32px;
1228
- width: 100%;
1229
- `,Bh=r.div`
1230
- display: flex;
1231
- flex-direction: column;
1232
- gap: 2px;
1233
- width: ${({$width:e})=>e};
1234
- `,Uh=r(Si)`
1235
- color: ${({theme:e})=>e.text.grey};
1236
- font-size: 10px;
1237
- line-height: 16px;
1238
- `,jh=r(Si)`
1239
- font-size: 12px;
1240
- white-space: pre-wrap;
1241
- `,Wh=({data:o})=>e(Mh,{children:o?.map(({type:o,title:r,titleIcon:n,tooltip:i,value:a},s)=>t(Bh,{$width:o&&[zh.Code,zh.Table].includes(o)?"inherit":o&&[zh.Loader,zh.Divider,zh.CopyText].includes(o)?"100%":"unset",children:[e(Cc,{text:i,withIcon:!0,children:t(Tn,{$alignItems:"center",$gap:4,children:[n&&e(n,{size:14}),!!r&&e(Uh,{transform:"capitalize",children:r})]})}),e(Hh,{type:o,value:a})]},`data-field-${r||(a?JSON.stringify(a):s)}`))}),Hh=({type:t,value:o})=>{const r=i();switch(t){case zh.Divider:return e(hc,{length:"100%",margin:"0"});case zh.Loader:return e(Nn,{children:e(pd,{scale:1.2})});case zh.Monitors:return e(Md,{monitors:o?.split(", ")||[],withLabels:!0,color:r.colors.secondary});case zh.Badge:{const{label:t,filled:r,...n}=qn(o,{label:"-",filled:!1});return e(fl,{label:t,filled:r,...n})}case zh.Code:{const{language:t,code:r,...n}=qn(o,{language:"",code:""});return e(id,{language:t,code:r,...n})}case zh.Table:{const{columns:t,rows:r,...n}=qn(o,{columns:[],rows:[{status:void 0,cells:[]}]});return e(Lh,{columns:t,rows:r,...n})}case zh.ActiveStatus:return e(kd,{status:"true"==o?Go.Success:Go.Error,title:"true"==o?Ar.ENABLED:Ar.DISABLED,size:10,withIcon:!0,withBorder:!0});case zh.CopyText:{const t="string"==typeof o?o:JSON.stringify(o);return e(Ad,{value:t})}default:return e(jh,{children:ui("string"==typeof o?o||"-":"")})}},Xh=r.div`
1242
- display: flex;
1243
- flex-direction: column;
1244
- align-items: flex-start;
1245
- align-self: stretch;
1246
- gap: 16px;
1247
- padding: 24px;
1248
- border-radius: 24px;
1249
- border: 1px solid ${({theme:e})=>e.colors.border};
1250
- background-color: ${({theme:e,$hovered:t})=>t?e.colors.secondary+sl["010"]:"transparent"};
1251
- transition: background-color 0.3s;
1252
- `,Vh=r.div`
1253
- width: 100%;
1254
- display: flex;
1255
- flex-direction: column;
1256
- gap: 4px;
1257
- cursor: ${({$clickable:e})=>e?"pointer":"default"};
1258
- `,Gh=r(Si)`
1259
- width: 100%;
1260
- display: flex;
1261
- align-items: center;
1262
- gap: 8px;
1263
- font-size: 16px;
1264
- `,Kh=r(Si)`
1265
- font-size: 12px;
1266
- color: ${({theme:e})=>e.text.grey};
1267
- `,qh=r(Tn)`
1268
- margin-left: auto;
1269
- gap: 8px;
1270
- `,Jh=({title:o="Details",titleBadge:r,titleIcon:n,description:i,action:a,withExtend:s,initialExtended:l=!1,data:c,children:d})=>{const[p,u]=jt(l),[h,m]=jt(!1);return t(Xh,{$hovered:h,children:[o||n||i||a?t(Vh,{$clickable:s||!1,onClick:()=>s&&u(e=>!e),onMouseEnter:()=>s&&m(!0),onMouseLeave:()=>s&&m(!1),children:[t(Tn,{children:[t(Tn,{$alignItems:"center",$gap:8,children:[n&&e(Tn,{$alignItems:"center",children:e(n,{size:20})}),!!o&&e(Gh,{transform:"capitalize",children:o}),r===qo.Loading?e(pd,{}):void 0!==r&&e(fl,{label:r})]}),(!!a||s)&&t(qh,{children:["function"==typeof a?e(a,{hovered:h}):a,s&&e(hd,{extend:p})]})]}),!!i&&e(Kh,{children:i})]}):null,(!s||s&&p)&&(d||e(Wh,{data:c}))]})},Yh=r.div`
1271
- visibility: hidden;
1272
- `,Qh=r(Tn)`
1273
- align-self: stretch;
1274
- width: calc(100% - 32px);
1275
- padding: 16px;
1276
- border-radius: 16px;
1277
- background-color: ${({theme:e})=>e.colors.secondary+sl["005"]};
1278
- ${({theme:e,$withClick:t})=>t?n`
1279
- &:hover {
1280
- cursor: pointer;
1281
- background-color: ${e.colors.secondary+sl["010"]};
1282
- ${Yh} {
1283
- visibility: visible;
1284
- }
1285
- }
1286
- `:`\n &:hover {\n ${Yh} {\n visibility: visible;\n }\n }\n `}
1287
- `,Zh=r(Tn)`
1288
- margin-left: auto;
1289
- gap: 8px;
1290
- `,em=r(Si)`
1291
- font-size: 10px;
1292
- color: ${({theme:e})=>e.text.grey};
1293
- `,tm=({title:r,subTitle:n,icons:a,iconSrcs:s,onClick:l,renderActions:c})=>{const d=i(),[p,u]=jt(0),h=Xt(null),m=Xt(null);return Wt(()=>{if(h.current){const e=h.current.clientWidth,t=m.current?.clientWidth||0;u(e-(85+t))}},[]),t(Qh,{ref:h,$gap:8,$withClick:!!l,onClick:l,children:[e(Ld,{id:`${r}-${n}`,icons:a,iconSrcs:s}),r&&e(Nd,{maxWidth:p/2,text:r,textSize:14}),r&&n&&e(em,{children:"•"}),n&&e(Nd,{maxWidth:p/2,text:n,textSize:10,textColor:d.text.grey}),e(Zh,{ref:m,children:c&&t(o,{children:[e(hc,{orientation:"vertical",length:"24px",margin:"0"}),c()]})})]})},om=({isOpen:t,noOverlay:o,name:r,type:n,isLastItem:i,onApprove:a,onDeny:s})=>{const l=n===Wo.Source?"uninstrument":"delete";return e(Xc,{isOpen:t,noOverlay:o,title:`${l.charAt(0).toUpperCase()+l.substring(1)}${r?` ${r}`:""}`,description:`Are you sure you want to ${l}?`,note:i?{type:Go.Warning,title:`You're about to ${l} the last ${n||r}`,message:""}:void 0,approveButton:{text:"Confirm",variant:"danger",onClick:a},denyButton:{text:"Go Back",onClick:s}})},rm=r(vl)`
1294
- display: flex;
1295
- align-items: center;
1296
- justify-content: center;
1297
- font-size: 14px;
1298
- gap: 6px;
1299
- min-width: 100px;
1300
- `,nm=({endpoint:o="/",variant:r="secondary"})=>t(rm,{variant:r,onClick:()=>window.open(`https://docs.odigos.io${o}`,"_blank","noopener noreferrer"),children:[e(Ot,{size:18}),"Docs"]}),im=r(Tn)`
1301
- border-bottom: ${({$hideBorder:e,theme:t})=>e?"none":`1px solid ${t.colors.border}`};
1302
- `,am=r.div`
1303
- display: flex;
1304
- align-items: center;
1305
- border-bottom: 2px solid ${({theme:e,$selected:t})=>t?e.colors.majestic_blue:"transparent"};
1306
- cursor: pointer;
1307
- `,sm=r(Si)`
1308
- padding: 12px;
1309
- font-size: 14px;
1310
- color: ${({theme:e,$selected:t})=>t?e.text.secondary:e.text.grey};
1311
- `,lm=({tabs:o,hideBorder:r=!1})=>o?.length?e(im,{$hideBorder:r,children:o.map(({label:o,icon:r,onClick:n,selected:i})=>t(am,{onClick:n,$selected:i,children:[e(sm,{$selected:i,children:o}),r&&e(r,{})]},`tab-${o}`))}):null,cm=r.section`
1312
- padding: 0px 32px;
1313
- border-bottom: 1px solid ${({theme:e})=>e.colors.border};
1314
- `,dm=r.div`
1315
- height: 76px;
1316
- display: flex;
1317
- justify-content: space-between;
1318
- flex-shrink: 0;
1319
- align-self: stretch;
1320
- `,pm=r.div`
1321
- display: flex;
1322
- align-items: center;
1323
- gap: ${({$gap:e})=>e||16}px;
1324
- `,um=r(Si)`
1325
- font-size: 18px;
1326
- line-height: 26px;
1327
- max-width: ${({$maxWidth:e})=>e};
1328
- overflow: hidden;
1329
- white-space: nowrap;
1330
- text-overflow: ellipsis;
1331
- `,hm=r(vl)`
1332
- gap: 8px;
1333
- `,mm=r(vl)``,gm=({onClose:o,width:r,icons:n,iconSrcs:i,title:a,titleTooltip:s,replaceTitleWith:l,actions:c,actionButtons:d=[],tabs:p})=>t(cm,{children:[t(dm,{children:[t(pm,{children:[n?.length||i?.length?e(Ld,{icons:n,iconSrcs:i,id:`drawer-header-${a}`}):null,("function"==typeof l?e(l,{}):l||null)||e(Cc,{text:s||a,withIcon:!!s,children:a&&e(um,{$maxWidth:`calc(${r} ${c||d.length?"/ 5":"- 192px"})`,children:a})})]}),t(pm,{$gap:2,children:[c,d.map((t,o)=>e(hm,{...t},`header-action-button-${o}`)),e(mm,{"data-id":"drawer-close",variant:"secondary",onClick:o,children:e(yt,{size:12})})]})]}),e(lm,{tabs:p,hideBorder:!0})]}),fm=r.div`
1334
- display: flex;
1335
- justify-content: space-between;
1336
- gap: 8px;
1337
- padding: 24px 18px 24px 32px;
1338
- border-top: 1px solid ${({theme:e})=>e.colors.border};
1339
- background-color: ${({theme:e})=>e.colors.translucent_bg};
1340
- transform: translateY(100%);
1341
- animation-name: ${cl.in.bottom};
1342
- `,xm=r(Tn)`
1343
- margin-right: auto;
1344
- `,ym=r(Tn)`
1345
- margin: 0 auto;
1346
- `,bm=r(Tn)`
1347
- margin-left: auto;
1348
- `,vm=r(vl)`
1349
- min-width: 140px;
1350
- font-size: 14px;
1351
- `,$m=({isOpen:o,leftButtons:r=[],centerButtons:n=[],rightButtons:i=[]})=>o?t(fm,{children:[e(xm,{children:r.map((t,o)=>e(vm,{...t},`footer-left-button-${o}`))}),e(ym,{children:n.map((t,o)=>e(vm,{...t},`footer-center-button-${o}`))}),e(bm,{children:i.map((t,o)=>e(vm,{...t},`footer-right-button-${o}`))})]}):null,wm=r.div`
1352
- position: fixed;
1353
- top: 0;
1354
- bottom: 0;
1355
- ${({$position:e})=>e}: 0;
1356
- z-index: 1000;
1357
- width: ${({$width:e})=>e};
1358
- background: ${({theme:e})=>e.colors.translucent_bg};
1359
- box-shadow: 0 2px 10px ${({theme:e})=>e.colors.primary+sl["010"]};
1360
- overflow-y: auto;
1361
- animation-name: ${({$position:e})=>cl.in[e]};
1362
- `,Sm=r.div`
1363
- display: flex;
1364
- flex-direction: column;
1365
- height: 100%;
1366
- `,km=r.div`
1367
- flex-grow: 1;
1368
- padding: 24px 32px;
1369
- overflow-y: auto;
1370
- `,Cm=({isOpen:r,onClose:n,closeOnEscape:i=!0,position:a="right",width:s="300px",children:l,header:c,footer:d})=>(Ll({key:"Escape",active:r&&i},()=>n()),kl(r),r?po.createPortal(t(o,{children:[e(On,{hidden:!r,onClick:n}),e(wm,{"data-id":"drawer",$position:a,$width:s,children:t(Sm,{children:[e(gm,{onClose:n,width:s,...c}),e(km,{children:l}),e($m,{...d})]})})]}),document.body):null),Em=({error:o})=>{const r=i(),n={container:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",color:r.text.error,fontFamily:r.font_family.primary},errorMessage:{padding:10,borderRadius:5,whiteSpace:"pre-wrap",background:r.colors.error},errorStack:{whiteSpace:"pre-wrap",fontSize:"12px"},errorStackWrapper:{textAlign:"left",marginTop:10},infoText:{marginTop:100,color:r.text.secondary,fontSize:"14px"}};return t("div",{style:n.container,children:[e("h2",{children:"Something went wrong!"}),e("pre",{style:n.errorMessage,children:o?.message||"Unknown Error"}),t("details",{style:n.errorStackWrapper,children:[e("summary",{children:"Stack Trace"}),e("pre",{style:n.errorStack,children:o?.stack||"Unknown Stack"})]}),e("p",{style:n.infoText,children:"Try refreshing the page or contact support"}),e(vl,{variant:"secondary",onClick:()=>window.location.reload(),style:{fontSize:"1rem"},children:"Reload"})]})},Am=({children:t})=>e(go,{FallbackComponent:({error:t,...o})=>e(al,{children:e(Em,{...o,error:t})}),children:t}),Dm=r(Tn)`
1371
- position: relative;
1372
- width: calc(100% - 24px);
1373
- padding: 12px;
1374
- background-color: ${({theme:e})=>e.colors.dark_grey};
1375
- border-bottom: 1px solid ${({theme:e})=>e.colors.border+sl["050"]};
1376
- `,Tm=r(Tn)`
1377
- margin-right: auto;
1378
- margin-left: 32px;
1379
- gap: 12px;
1380
- `,Im=r(Tn)`
1381
- margin-left: auto;
1382
- margin-right: 32px;
1383
- gap: 12px;
1384
- `,Nm=r(Tn)`
1385
- position: absolute;
1386
- left: 50%;
1387
- transform: translateX(-50%);
1388
- gap: 12px;
1389
- `,Rm=({left:o=[],center:r=[],right:n=[]})=>t(Dm,{children:[e(Tm,{children:o.map((t,o)=>t&&e(Ut,{children:t},o))}),e(Nm,{children:r.map((t,o)=>t&&e(Ut,{children:t},o))}),e(Im,{children:n.map((t,o)=>t&&e(Ut,{children:t},o))})]}),Om=r(Si)`
1390
- color: ${({theme:e})=>e.text.grey};
1391
- `,_m=({icon:o,title:r,badge:n,badgeTooltip:i,loading:a})=>t(Tn,{$gap:6,children:[o&&e(o,{}),e(Om,{size:14,children:r}),void 0!==n&&e(Cc,{text:i,children:e(fl,{label:n})}),a&&e(pd,{})]}),Fm=r.div`
1392
- width: fit-content;
1393
- height: fit-content;
1394
- padding: 4px;
1395
- gap: 4px;
1396
- border-radius: 32px;
1397
- border: 1px solid ${({theme:e})=>e.colors.border+sl["070"]};
1398
-
1399
- display: flex;
1400
- flex-direction: ${({$orientation:e,$flip:t})=>("horizontal"===e?"row":"column")+(t?"-reverse":"")};
1401
- align-items: center;
1402
- justify-content: center;
1403
- `,Pm=r.div`
1404
- width: 32px;
1405
- height: 32px;
1406
-
1407
- border-radius: 100%;
1408
- background-color: ${({theme:e,$selected:t})=>t?e.colors.majestic_blue+sl["070"]:e.colors.secondary+sl["012"]};
1409
- transition: background-color 0.3s;
1410
-
1411
- display: flex;
1412
- align-items: center;
1413
- justify-content: center;
1414
-
1415
- cursor: pointer;
1416
- `,Lm=({orientation:o="vertical",flip:r,mainIcons:n,subIcons:i})=>t(Fm,{$orientation:o,$flip:r,children:[n.map(({icon:t,selected:o,onClick:r,tooltip:n},i)=>e(Cc,{text:n,children:e(Pm,{$selected:o,onClick:r,children:e(t,{size:20})})},`main-nav-icon-${i}`)),!!n.length&&!!i.length&&e(hc,{orientation:"vertical"===o?"horizontal":"vertical",margin:"0",length:"20px"}),i.map(({icon:t,selected:o,onClick:r,tooltip:n},i)=>e(Cc,{text:n,children:e(Pm,{$selected:o,onClick:r,children:e(t,{size:20})})},`sub-nav-icon-${i}`))]}),zm=r.div`
1417
- display: flex;
1418
- flex-direction: column;
1419
- width: 100%;
1420
- `,Mm=r.div`
1421
- display: flex;
1422
- flex-direction: column;
1423
- gap: 8px;
1424
- `,Bm=r.div`
1425
- display: flex;
1426
- align-items: center;
1427
- gap: 16px;
1428
- `,Um=r(Dc)`
1429
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1430
- opacity: ${({$disabled:e})=>e?.5:1};
1431
- `,jm=({initialValues:o=[],value:r,onChange:n,title:i,tooltip:a,required:s,errorMessage:l})=>{const[c,d]=jt(r||o);Wt(()=>{c.length||d([""])},[]);const p=c.filter(e=>!!e.trim()),u=Xt(JSON.stringify(p));Wt(()=>{const e=JSON.stringify(p);u.current!==e&&(u.current=e,n&&n(p))},[p]);const h=(e,t)=>{d(o=>{const r=[...o];return r[t]=e,r})},m=c.length<=1,g=c.some(e=>""===e.trim()),f=m&&g;return t(zm,{children:[e(Ju,{title:i,required:s,tooltip:a}),e(Mm,{children:c.map((o,r)=>{const n=r===c.length-1;return t(Bm,{children:[e(rh,{value:o,onChange:e=>h(e.target.value,r),hasError:!!l,autoFocus:Qn(o)&&!m&&n}),r===c.length-1&&e(Um,{withBorder:!0,size:30,$disabled:g,onClick:g?void 0:()=>{d(e=>{const t=[...e];return t.push(""),t})},children:e(St,{})}),e(Um,{size:30,$disabled:f,onClick:f?void 0:()=>(e=>{m?h("",e):d(t=>t.filter((t,o)=>o!==e))})(r),children:e(It,{})})]},`input-list-${r}`)})}),!!l&&e(Ei,{children:l})]})},Wm=({col:t,colIdx:o,row:r,rowIdx:n,rowsLength:i,maxWidth:a,handleChange:s,errorMessage:l,limitFieldsPerRow:c})=>{const{keyName:d,title:p,tooltip:u,placeholder:h,required:m,type:g,componentType:f,options:x,renderCondition:y}=t,b=r[d];if(y&&!y(r))return null;return e("td",{style:{maxWidth:a,padding:"4px 6px 4px 0"},children:(()=>{switch(f){case Xo.Dropdown:const t=x?.find(e=>e.id===b);return e(lh,{title:c?p:void 0,tooltip:c?u:void 0,placeholder:h,required:m,options:x||[],value:t,onSelect:e=>s(d,e.id,n),onDeselect:()=>s(d,"",n),hasError:!!l&&(!m||m&&Qn(b))});case"multi-dropdown":const r=Array.isArray(b)&&x?.filter(e=>b.includes(e.id))||[];return e(lh,{title:c?p:void 0,tooltip:c?u:void 0,placeholder:h,required:m,options:x||[],value:r,isMulti:!0,onSelect:e=>{const t=[...Array.isArray(b)?b:[],e.id];s(d,t,n)},onDeselect:e=>{const t=(Array.isArray(b)?b:[]).filter(t=>t!==e.id);s(d,t,n)},hasError:!!l&&(!m||m&&Qn(b))});default:const f=i>1&&n===i-1&&0===o&&Qn(b);return e(rh,{title:c?p:void 0,tooltip:c?u:void 0,placeholder:h,type:g,required:m,autoFocus:f,value:b,onChange:({target:{value:e}})=>s(d,e,n),style:{maxWidth:a,paddingLeft:10},hasError:!!l&&(!m||m&&Qn(b))})}})()},`input-table-${n}-${d}`)},Hm=r.div`
1432
- display: flex;
1433
- flex-direction: column;
1434
- width: 100%;
1435
- `,Xm=r.button`
1436
- margin-top: ${({$marginTop:e})=>e};
1437
- background: none;
1438
- border: none;
1439
- cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
1440
- opacity: ${({disabled:e})=>e?.5:1};
1441
- `,Vm=({columns:o,initialValues:r=[],value:n,onChange:i,errorMessage:a,limitFieldsPerRow:s,title:l=""})=>{const[c,d]=jt({}),[p,u]=jt(n||r),h=Ht(()=>new Map(o.map(e=>[e.keyName,e])),[o]);Wt(()=>{if(!p.length){const e={};o.forEach(({keyName:t})=>e[t]=""),d(e),u([e])}},[]);const m=p.filter(e=>{for(const[t,o]of Object.entries(e)){const r=h.get(t);if((!r?.renderCondition||r.renderCondition(e))&&(r?.required&&Qn(o)))return!1}return!0}),g=Xt(JSON.stringify(m)),f=m.length!==p.length,x=`${Math.floor(640/((s||o.length)+.4))}px`;Wt(()=>{const e=JSON.stringify(m);g.current!==e&&(g.current=e,i&&i(m))},[m]);const y=(e,t,o)=>{u(r=>{const n=wo(r);return n[o][e]=t,n})},b=Ht(()=>{if(s){const e=[];for(let t=0;;t+=s){const r=o.slice(t,t+s);if(!r.length)break;e.push(r)}return e}return[o]},[s,o]);return t(Hm,{children:[e(Ju,{title:l}),t("table",{style:{borderCollapse:"collapse"},children:[!s&&e("thead",{children:t("tr",{children:[o.map(({title:t,tooltip:o,required:r})=>e("th",{style:{maxWidth:x},children:e(Ju,{title:t,required:r,tooltip:o})},`input-table-head-${t}`)),e("th",{})]})}),e("tbody",{children:p.map((r,n)=>t(Ut,{children:[s&&n>0?e("tr",{children:e("td",{colSpan:b.length,children:e(hc,{})})}):null,b.map((i,l)=>t("tr",{children:[i.map((t,o)=>e(Wm,{col:t,colIdx:o,row:r,rowIdx:n,rowsLength:p.length,maxWidth:x,limitFieldsPerRow:s,errorMessage:a,handleChange:y},`input-table-row-${n}-col-${o}`)),0===l&&e("td",{children:e(Xm,{$marginTop:s?"24px":"0",onClick:()=>{return e=n,void(p.length>1?u(t=>t.filter((t,o)=>o!==e)):o.forEach(({keyName:t,type:o})=>y(t,o===Vo.Number?"0":"",e)));var e},children:e(It,{})})})]},`input-table-matrix-${n}-${l}`))]},`input-table-row-${n}`))})]}),!!a&&e(Ei,{children:a}),e(Cd,{onClick:()=>{u(e=>{const t=wo(e);return t.push(wo(c)),t})},disabled:f})]})},Gm=r.div`
1442
- display: flex;
1443
- flex-direction: column;
1444
- width: 100%;
1445
- `,Km=r.div`
1446
- display: flex;
1447
- flex-direction: column;
1448
- gap: 8px;
1449
- `,qm=r.div`
1450
- display: flex;
1451
- align-items: center;
1452
- gap: 8px;
1453
- `,Jm=r.div`
1454
- width: 100%;
1455
- max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
1456
- `,Ym=r(Dc)`
1457
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1458
- opacity: ${({$disabled:e})=>e?.5:1};
1459
- `,Qm={key:"",value:""},Zm=({initialKeyValuePairs:o=[],value:r,onChange:n,title:i,tooltip:a,disabled:s,required:l,errorMessage:c,keyPlaceholder:d="Key",valuePlaceholder:p="Value",inputMaxWidth:u=300})=>{const[h,m]=jt(r||o);Wt(()=>{h.length||m([{...Qm}])},[]);const g=h.filter(({key:e,value:t})=>!Qn(e.trim())&&!Qn(t.trim())),f=Xt(JSON.stringify(g));Wt(()=>{const e=JSON.stringify(g);f.current!==e&&(f.current=e,n&&n(g))},[g]);const x=(e,t,o)=>{m(r=>{const n=[...r];return n[o][e]=t,n})},y=h.length<=1,b=s||h.some(({key:e,value:t})=>""===e.trim()||""===t.trim()),v=s||y&&b;return t(Gm,{children:[e(Ju,{title:i,required:l,tooltip:a}),e(Km,{children:h.map(({key:o,value:r},n)=>t(qm,{children:[e(Jm,{$maxWidth:u,children:e(rh,{placeholder:d,disabled:s,value:o,onChange:e=>x("key",e.target.value,n),hasError:!!c&&(!l||l&&!o),autoFocus:Qn(r)&&!y&&n===h.length-1})}),e(Jm,{$maxWidth:n===h.length-1?u-38:u,children:e(rh,{placeholder:p,disabled:s,value:r,onChange:e=>x("value",e.target.value,n),hasError:!!c&&(!l||l&&Qn(r)),autoFocus:!1})}),n===h.length-1&&e(Ym,{withBorder:!0,size:30,$disabled:b,onClick:b?void 0:()=>{m(e=>{const t=[...e];return t.push({...Qm}),t})},children:e(St,{})}),e(Ym,{size:30,$disabled:v,onClick:v?void 0:()=>(e=>{y?(x("key","",e),x("value","",e)):m(t=>t.filter((t,o)=>o!==e))})(n),children:e(It,{})})]},`key-value-input-list-${n}`))}),!!c&&e(Ei,{children:c})]})},eg=a`
1460
- 0% {
1461
- background-position: 0% 50%;
1462
- }
1463
- 100% {
1464
- background-position: 100% 50%;
1465
- }
1466
- `,tg=r(Si)`
1467
- background: ${({$textColor:e,$stripColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
1468
- background-size: 250% 100%; /* Expand background to allow movement */
1469
- background-clip: text;
1470
- color: transparent;
1471
- animation: ${eg} 1s reverse linear infinite;
1472
- `,og=({children:t="Loading...",textColor:o,stripColor:r,...n})=>{const a=i(),s=o||a.v2.colors.white[500],l=r||a.v2.colors.black[500];return e(tg,{$textColor:s,$stripColor:l,...n,children:t})},rg=r.div`
1473
- display: flex;
1474
- flex-direction: ${({$isVertical:e})=>e?"column":"row"};
1475
- gap: ${({$isVertical:e})=>e?"12px":"24px"};
1476
- ${({$hasError:e})=>e&&n`
1477
- border: 1px solid ${({theme:e})=>e.text.error};
1478
- border-radius: 32px;
1479
- padding: 8px;
1480
- `}
1481
- `,ng=(e,t)=>!t?.length||!!t?.find(t=>t===e),ig=({isVertical:o,title:r="Monitors",required:n,errorMessage:i,allowedSignals:a,selectedSignals:s,setSelectedSignals:l})=>{const[c,d]=jt(1===s.length),p=Xt(JSON.stringify(s));Wt(()=>{const e=s;e.length||Rs.forEach(({id:t})=>{ng(t,a)&&e.push(t)});const t=JSON.stringify(e);return p.current!==t&&(p.current=t,l(e),d(1===e.length)),()=>{p.current=""}},[a]);return t("div",{children:[r&&e(Ju,{title:r,required:n}),e(rg,{$isVertical:o,$hasError:!!i,children:Rs.map(t=>{const o=ng(t.id,a),r=((e,t)=>!!t?.find(t=>t===e))(t.id,s);return o?e(qc,{title:t.value,disabled:!o||c&&r,value:r,onChange:e=>((e,t)=>{const o=e,r=t?[...s,o]:s.filter(e=>e!==o);l(r),d(1===r.length)})(t.id,e)},t.id):null})}),!!i&&e(Ei,{children:i})]})},ag=r.div`
1482
- display: flex;
1483
- gap: 8px;
1484
- align-items: center;
1485
- `,sg=r(vl)`
1486
- display: flex;
1487
- align-items: center;
1488
- justify-content: center;
1489
- gap: 8px;
1490
- min-width: 90px;
1491
- `,lg=({buttons:o})=>{const r=i(),n=({button:e,index:t})=>o.length>1&&0===t&&(e.icon||e.iconSrc),a=({button:t,rotate:o})=>t.icon?e(t.icon,{size:14,rotate:o,fill:r.text[t.variant||"secondary"]}):t.iconSrc?e("img",{src:t.iconSrc,alt:t.label,width:8,height:12}):null;return e(ag,{children:o.map((o,r)=>e(Cc,{text:o.tooltip||"",children:t(sg,{variant:o.variant||"secondary",onClick:o.onClick,disabled:o.disabled,children:[n({button:o,index:r})&&a({button:o,rotate:0}),o.label,!n({button:o,index:r})&&a({button:o,rotate:180})]},r)},r))})},cg=r.div`
1492
- width: 100%;
1493
- height: 100%;
1494
-
1495
- * {
1496
- animation: none !important;
1497
- transition: none !important;
1498
- }
1499
- `,dg=({width:t="100%",height:o="100%",gap:r=0,elements:n,noAnimation:i=!1,onTopIndexChange:a})=>{const s=Xt(null),l=Ht(()=>r?n.map((t,o)=>e("div",{style:{paddingBottom:r},children:t},`scroll-y-item-${o}`)):n,[n,r]),c=Vt(e=>{if(!a||!s.current)return;const t=s.current.findItemIndex(e);a(t)},[a]),d=e(xo,{ref:s,style:{width:t,height:o},onScroll:a?c:void 0,children:l});return i?e(cg,{children:d}):d},pg=r.div`
1500
- display: flex;
1501
- justify-content: space-between;
1502
- align-items: center;
1503
- gap: 16px;
1504
- `,ug=r.div`
1505
- display: flex;
1506
- flex-direction: column;
1507
- gap: 4px;
1508
- `,hg=r.div`
1509
- display: flex;
1510
- align-items: center;
1511
- gap: 8px;
1512
- `,mg=r(Si)``,gg=r(Si)``,fg=({title:o,description:r,badgeLabel:n,icon:i,actionButton:a,size:s="medium"})=>{const l="small"===s?16:"medium"===s?20:24,c="small"===s?12:"medium"===s?14:16;return t(pg,{children:[t(ug,{children:[t(hg,{children:[i&&e(i,{size:l}),e(mg,{weight:300,size:l,children:o}),void 0!==n&&e(fl,{label:n,filled:!!n})]}),e(gg,{weight:200,opacity:.8,size:c,children:r})]}),a&&e("div",{children:a})]})},xg=r.div`
1513
- position: relative;
1514
- gap: 0;
1515
- z-index: 0;
1516
- display: grid;
1517
- grid-template-columns: repeat(${({$count:e})=>e}, 1fr);
1518
- `,yg=r.button`
1519
- flex: 1;
1520
- display: flex;
1521
- align-items: center;
1522
- justify-content: center;
1523
- gap: 4px;
1524
- padding: 6px 12px;
1525
- background-color: transparent;
1526
- border-radius: ${({$isFirstItem:e,$isLastItem:t})=>e?"32px 0px 0px 32px":t?"0px 32px 32px 0px":"0"};
1527
- border: 1px solid ${({theme:e})=>e.colors.border};
1528
- cursor: pointer;
1529
- &:hover {
1530
- border: 1px solid ${({theme:e})=>e.colors.secondary};
1531
- }
1532
- `,bg=r.div`
1533
- position: absolute;
1534
- top: ${({$y:e})=>e}px;
1535
- left: ${({$x:e})=>e}px;
1536
- z-index: -1;
1537
- width: ${({$width:e})=>e}px;
1538
- height: ${({$height:e})=>e}px;
1539
- background-color: ${({theme:e,$bgColor:t})=>t||e.colors.dropdown_bg_2};
1540
- border-radius: ${({$isFirstItem:e,$isLastItem:t})=>e?"32px 0px 0px 32px":t?"0px 32px 32px 0px":"0"};
1541
- transition: all 0.3s;
1542
- `,vg=({options:o=[],selected:r,setSelected:n})=>{const i=o.findIndex(e=>e.value===r),[a,s]=jt(o[i]?.selectedBgColor||""),[l,c]=jt({width:0,height:0}),[d,p]=jt({x:0,y:0}),u=Xt(null);return Wt(()=>{u.current&&(c({width:u.current.offsetWidth,height:u.current.offsetHeight}),p({x:u.current.offsetWidth*i,y:0}))},[r,i]),t(xg,{$count:o.length,children:[o.map(({icon:i,label:a,value:l,selectedBgColor:c,selectedTextColor:d},p)=>{const h=r===l;return t(yg,{ref:h?u:void 0,$isFirstItem:0===p,$isLastItem:p===o.length-1,onClick:()=>{n(l),s(c||"")},children:[i&&e(i,{}),a&&e(Si,{size:12,family:"secondary",decoration:"underline",color:h?d:void 0,children:a})]},`segment-${a||p}-${l}`)}),e(bg,{$bgColor:a,$width:l.width,$height:l.height,$x:d.x,$y:d.y,$isFirstItem:0===i,$isLastItem:i===o.length-1})]})},$g=r(vl)`
1543
- gap: 8px;
1544
- text-transform: none;
1545
- text-decoration: none;
1546
- border: ${({theme:e,$withBorder:t})=>`1px solid ${t?e.colors.border:"transparent"}`};
1547
- &.not-selected {
1548
- background-color: ${({theme:e,$color:t})=>t||e.colors.dropdown_bg_2+sl["060"]};
1549
- &:hover {
1550
- background-color: ${({theme:e,$hoverColor:t})=>t||e.colors.dropdown_bg_2};
1551
- }
1552
- }
1553
- &.selected {
1554
- background-color: ${({theme:e})=>e.colors.majestic_blue+sl["030"]};
1555
- }
1556
- `,wg=r(Si)`
1557
- white-space: nowrap;
1558
- overflow: hidden;
1559
- text-overflow: ellipsis;
1560
- font-size: 14px;
1561
- `,Sg=({label:o,onClick:r,icon:n,iconSrc:a,badgeLabel:s,badgeFilled:l,isSelected:c,withBorder:d,color:p,hoverColor:u,style:h})=>{const m=i();return t($g,{onClick:r,className:c?"selected":"not-selected",$withBorder:d,$color:p,$hoverColor:u,style:h,children:[n&&e("div",{children:e(n,{fill:m.text.info})}),a&&e("div",{children:e("img",{src:a,alt:"",width:16,height:16})}),e(wg,{children:o}),c&&e("div",{children:e(ft,{fill:m.colors.majestic_blue_soft})}),void 0!==s&&e(fl,{label:s,filled:l||c})]})},kg=r.div`
1562
- display: flex;
1563
- flex-direction: column;
1564
- gap: 16px;
1565
- ${({$maxWidth:e})=>e&&`max-width: ${e};`}
1566
- `,Cg=r.div`
1567
- display: flex;
1568
- align-items: center;
1569
- gap: 16px;
1570
- `,Eg=r.div`
1571
- width: 50px;
1572
- height: 50px;
1573
- border-radius: 8px;
1574
- background: ${({theme:e})=>`linear-gradient(90deg, ${e.colors.dropdown_bg_2} 25%, ${e.colors.dropdown_bg_2} 50%, ${e.colors.border} 75%)`};
1575
- background-size: 200% 100%;
1576
- animation: ${ul} 10s infinite linear;
1577
- `,Ag=r(In)`
1578
- flex: 1;
1579
- gap: 12px;
1580
- `,Dg=r.div`
1581
- width: ${({$width:e})=>e};
1582
- height: 16px;
1583
- background: ${({theme:e})=>`linear-gradient(90deg, ${e.colors.dropdown_bg_2} 25%, ${e.colors.dropdown_bg_2} 50%, ${e.colors.border} 75%)`};
1584
- background-size: 200% 100%;
1585
- animation: ${ul} 1.5s infinite linear;
1586
- border-radius: 4px;
1587
- `,Tg=({size:o=5,maxWidth:r})=>e(kg,{$maxWidth:r,children:[...Array(o)].map((o,r)=>t(Cg,{children:[e(Eg,{}),t(Ag,{children:[e(Dg,{$width:"80%"}),e(Dg,{$width:"100%"})]})]},r))});var Ig;!function(e){e.Active="active",e.Disabled="disabled",e.Finished="finish"}(Ig||(Ig={}));const Ng=r.div`
1588
- display: flex;
1589
- flex-direction: column;
1590
- gap: 32px;
1591
- `,Rg=r.div`
1592
- display: flex;
1593
- gap: 16px;
1594
- padding: 8px;
1595
- opacity: ${({$state:e})=>e===Ig.Active?1:e===Ig.Disabled?.5:.8};
1596
- transition: all 0.3s;
1597
- `,Og=r(Tn)`
1598
- justify-content: center;
1599
- width: 24px;
1600
- height: 24px;
1601
- border-radius: 32px;
1602
- border: ${({theme:e,$state:t})=>t===Ig.Disabled?`1px dashed ${e.text.dark_grey}`:`1px solid ${e.colors.secondary}`};
1603
- opacity: ${({$state:e})=>e===Ig.Finished?.8:1};
1604
- `,_g=r(In)`
1605
- justify-content: center;
1606
- gap: 8px;
1607
- `,Fg=r(Si)``,Pg=r(Si)``,Lg=({data:o,currentStep:r=0})=>{const[n,i]=jt([]);return Wt(()=>{i(o.map((e,t)=>t<r-1?{...e,state:Ig.Finished,subtitle:e.subtitle||Go.Success}:t===r-1?{...e,state:Ig.Active,subtitle:""}:{...e,state:Ig.Disabled,subtitle:""}))},[r,o]),e(Ng,{children:n.map((o,r)=>t(Rg,{$state:o.state,children:[e(Og,{$state:o.state,children:[Ig.Active,Ig.Disabled].includes(o.state)?e(Si,{size:12,children:o.stepNumber}):o.state===Ig.Finished?e(ft,{size:20}):null}),t(_g,{children:[e(Fg,{family:"secondary",children:o.title}),o.subtitle&&e(Pg,{size:10,weight:300,children:o.subtitle})]})]},r))})},zg=r(Tn)`
1608
- width: fit-content;
1609
- gap: 6px;
1610
- padding: 6px 12px;
1611
- border-radius: 360px;
1612
- background-color: ${({$type:e,theme:t})=>t.colors[e]};
1613
- `,Mg=r(Si)`
1614
- color: ${({$type:e,theme:t})=>t.text[e]};
1615
- `,Bg=({type:o=Go.Info,icon:r,title:n,size:i,family:a,children:s,...l})=>t(zg,{$type:o,children:[r&&e(r,{}),e(Mg,{$type:o,size:i||12,family:a||"secondary",...l,children:s||n})]}),Ug=r.div`
1616
- display: flex;
1617
- flex-direction: column;
1618
- position: relative;
1619
- width: 100%;
1620
- `,jg=r.div`
1621
- width: 100%;
1622
- display: flex;
1623
- align-items: center;
1624
- gap: 12px;
1625
- transition: border-color 0.3s;
1626
- border-radius: 24px;
1627
- border: 1px solid ${({theme:e})=>e.colors.border};
1628
- ${({$disabled:e})=>e&&n`
1629
- background-color: ${({theme:e})=>e.colors.border};
1630
- cursor: not-allowed;
1631
- opacity: 0.6;
1632
- `}
1633
-
1634
- ${({$hasError:e})=>e&&n`
1635
- border-color: ${({theme:e})=>e.text.error};
1636
- `}
1637
-
1638
- ${({$isActive:e})=>e&&n`
1639
- border-color: ${({theme:e})=>e.colors.secondary};
1640
- `}
1641
-
1642
- &:hover {
1643
- border-color: ${({theme:e})=>e.colors.secondary};
1644
- }
1645
- &:focus-within {
1646
- border-color: ${({theme:e})=>e.colors.secondary};
1647
- }
1648
- `,Wg=r.textarea`
1649
- flex: 1;
1650
- border: none;
1651
- outline: none;
1652
- background: none;
1653
- color: ${({theme:e})=>e.text.secondary};
1654
- font-size: 14px;
1655
- padding: 12px 20px 0;
1656
- font-family: ${({theme:e})=>e.font_family.primary};
1657
- font-weight: 300;
1658
- line-height: 22px;
1659
- &::placeholder {
1660
- color: ${({theme:e})=>e.text.secondary};
1661
- font-family: ${({theme:e})=>e.font_family.primary};
1662
- opacity: 0.4;
1663
- font-size: 14px;
1664
- font-weight: 300;
1665
- line-height: 22px; /* 157.143% */
1666
- }
1667
-
1668
- &:disabled {
1669
- background-color: ${({theme:e})=>e.colors.border};
1670
- cursor: not-allowed;
1671
- }
1672
- `,Hg=({errorMessage:o,title:r,tooltip:n,required:i,onChange:a,name:s,...l})=>{const c=Xt(null),d=e=>{c.current&&(c.current.style.height="auto",e&&(c.current.style.height=`${c.current.scrollHeight}px`))};return t(Ug,{children:[e(Ju,{title:r,required:i,tooltip:n}),e(jg,{$disabled:l.disabled,$hasError:!!o,$isActive:!!l.autoFocus,children:e(Wg,{ref:c,"data-id":s,name:s,onFocus:()=>d(!0),onBlur:()=>d(!1),onChange:e=>{e.stopPropagation(),d(!0),a?.(e)},onKeyDown:e=>{e.stopPropagation()},...l})}),!!o&&e(Ei,{children:o})]})},Xg=r.div`
1673
- display: flex;
1674
- align-items: center;
1675
- gap: 12px;
1676
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1677
- opacity: ${({$disabled:e})=>e?.6:1};
1678
- `,Vg=r.div`
1679
- width: 24px;
1680
- height: 12px;
1681
- border: 1px ${({$isActive:e,theme:t})=>e?`solid ${t.colors.majestic_blue}`:`dashed ${t.text.grey}`};
1682
- border-radius: 20px;
1683
- display: flex;
1684
- align-items: center;
1685
- padding: 2px;
1686
- background-color: transparent;
1687
- pointer-events: ${({$disabled:e})=>e?"none":"auto"};
1688
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1689
- opacity: ${({$isActive:e})=>e?1:.5};
1690
- transition: border-color 0.3s, opacity 0.3s;
1691
- &::before {
1692
- content: '';
1693
- width: 12px;
1694
- height: 12px;
1695
- border-radius: 50%;
1696
- background-color: ${({$isActive:e,theme:t})=>e?t.colors.majestic_blue:t.colors.secondary};
1697
- transform: ${({$isActive:e})=>e?"translateX(12px)":"translateX(0)"};
1698
- transition: background-color 0.3s, transform 0.3s;
1699
- }
1700
- `,Gg=({title:o,tooltip:r,initialValue:n=!1,onChange:i,disabled:a,allowPropagation:s=!1,flipHorizontally:l})=>{const[c,d]=jt(n);Wt(()=>d(n),[n]);return t(Xg,{$disabled:a,onClick:e=>{a||(s||e.stopPropagation(),i?i(!c):d(e=>!e))},children:[!l&&e(Vg,{$disabled:a,$isActive:c}),(o||r)&&e(Cc,{text:r,withIcon:!0,children:o&&e(Si,{size:14,children:o})}),l&&e(Vg,{$disabled:a,$isActive:c})]})};var Kg={v:"5.12.1",fr:60,ip:0,op:80,w:220,h:620,nm:"Odigos - Trace Loader",ddd:0,assets:[{id:"comp_0",nm:"moving lines-5",fr:60,layers:[{ddd:0,ind:1,ty:4,nm:"moving lines-5",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[6.097,.571,0],ix:2,l:2},a:{a:0,k:[-.046,-149.04,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-.055,-173.88],[.095,546.629]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.976470588235,.976470588235,.976470588235,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:6,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[85.714,85.714],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Vector",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.757],y:[.459]},o:{x:[.441],y:[0]},t:2.4,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:18.172,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:36.174,s:[85.889]},{t:51,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.757],y:[.582]},o:{x:[.441],y:[0]},t:0,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:12.174,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:30.174,s:[85.889]},{t:45,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:51,st:-26,ct:1,bm:0}]},{id:"comp_1",nm:"moving lines-4",fr:60,layers:[{ddd:0,ind:1,ty:4,nm:"moving lines-4",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[5.475,.571,0],ix:2,l:2},a:{a:0,k:[.144,-156.04,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[.167,-182.047],[.314,547.797]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.976470588235,.976470588235,.976470588235,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:6,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[85.714,85.714],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Vector",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.757],y:[.459]},o:{x:[.441],y:[0]},t:17.9,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:38.055,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:61.053,s:[85.889]},{t:80,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.757],y:[.582]},o:{x:[.441],y:[0]},t:0,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:15.553,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:38.555,s:[85.889]},{t:57.5,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:80,st:-26,ct:1,bm:0}]},{id:"comp_2",nm:"moving lines-3",fr:60,layers:[{ddd:0,ind:1,ty:4,nm:"moving lines-3",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[5.841,.571,0],ix:2,l:2},a:{a:0,k:[.324,-150.04,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[.382,-175.047],[-.051,538.464]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.976470588235,.976470588235,.976470588235,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:6,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[85.714,85.714],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Vector",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.757],y:[.459]},o:{x:[.441],y:[0]},t:6,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:23.525,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:43.525,s:[85.889]},{t:60,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.757],y:[.582]},o:{x:[.441],y:[0]},t:0,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:13.525,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:33.525,s:[85.889]},{t:50,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:60,st:-26,ct:1,bm:0}]}],layers:[{ddd:0,ind:1,ty:0,nm:"moving lines-5",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[213,1,0],ix:2,l:2},a:{a:0,k:[6,0,0],ix:1,l:2},s:{a:0,k:[100,99.4,100],ix:6,l:2}},ao:0,w:12,h:619,ip:-22,op:29,st:-22,ct:1,bm:0},{ddd:0,ind:2,ty:0,nm:"moving lines-5",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[213,1,0],ix:2,l:2},a:{a:0,k:[6,0,0],ix:1,l:2},s:{a:0,k:[100,99.4,100],ix:6,l:2}},ao:0,w:12,h:619,ip:56,op:107,st:56,ct:1,bm:0},{ddd:0,ind:3,ty:0,nm:"moving lines-5",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[213,1,0],ix:2,l:2},a:{a:0,k:[6,0,0],ix:1,l:2},s:{a:0,k:[100,99.4,100],ix:6,l:2}},ao:0,w:12,h:619,ip:22,op:73,st:22,ct:1,bm:0},{ddd:0,ind:4,ty:0,nm:"moving lines-4",refId:"comp_1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[110.5,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,98.2,100],ix:6,l:2}},ao:0,w:11,h:627,ip:-65,op:15,st:-65,ct:1,bm:0},{ddd:0,ind:5,ty:0,nm:"moving lines-4",refId:"comp_1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[110.5,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,98.2,100],ix:6,l:2}},ao:0,w:11,h:627,ip:14,op:94,st:14,ct:1,bm:0},{ddd:0,ind:6,ty:0,nm:"moving lines-3",refId:"comp_2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[7,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,100.4,100],ix:6,l:2}},ao:0,w:11,h:613,ip:2,op:62,st:2,ct:1,bm:0},{ddd:0,ind:7,ty:0,nm:"moving lines-3",refId:"comp_2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[7,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,100.4,100],ix:6,l:2}},ao:0,w:11,h:613,ip:-36,op:20,st:-40,ct:1,bm:0},{ddd:0,ind:8,ty:0,nm:"moving lines-3",refId:"comp_2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[7,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,100.4,100],ix:6,l:2}},ao:0,w:11,h:613,ip:39,op:99,st:39,ct:1,bm:0},{ddd:0,ind:9,ty:4,nm:"Vector :M",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[110,309.736,0],ix:2,l:2},a:{a:0,k:[308.5,313.236,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[205.677,618.844],[205.677,4.807]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ind:1,ty:"sh",ix:2,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[411.428,618.822],[411.333,4.99]],c:!1},ix:2},nm:"Path 6",mn:"ADBE Vector Shape - Group",hd:!1},{ind:2,ty:"sh",ix:3,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[308.5,618.796],[308.5,5.145]],c:!1},ix:2},nm:"Path 7",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.975244164467,.975244164467,.975244164467,.639999985695],ix:3},o:{a:0,k:64,ix:4},w:{a:0,k:1,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 7",mn:"ADBE Vector Graphic - Stroke",hd:!1}],ip:0,op:684,st:0,ct:1,bm:0}],markers:[],props:{}};const qg=r.div`
1701
- width: ${({$width:e})=>e}px;
1702
- height: ${({$height:e})=>e}px;
1703
- position: relative;
1704
- `,Jg=({width:t=620})=>{const{darkMode:o}=i(),r=t/(620/220);return e(qg,{$width:t,$height:r,children:e(fo,{autoplay:!0,loop:!0,animationData:Kg,style:{width:r,height:t,transform:"rotate(-90deg)",position:"absolute",top:-(r-r/10),left:r-r/10,filter:o?"invert(0)":"invert(1)"}})})},Yg=r.div`
1705
- display: flex;
1706
- align-items: center;
1707
- justify-content: center;
1708
- gap: 4px;
1709
- min-width: ${({$minWidth:e})=>e};
1710
- width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
1711
- padding: ${({$hasLabel:e})=>e?"4px 8px":"4px"};
1712
- border-radius: 100px;
1713
- background-color: ${({$backgroundColor:e})=>e};
1714
- `,Qg=({label:o,leftIcon:r,rightIcon:n,tooltip:a,status:s=Jo.Unknown,useSecondaryTone:l=!1,invertColors:c=!1,textSize:d,textColor:p,backgroundColor:u,minWidth:h="unset",fullWidth:m=!1})=>{const g=i(),f=o?.toString(),x=s?[Jo.Disabled].includes(s)?rn(g,s,c?"400":"700"):[Jo.Unknown].includes(s)?rn(g,s,"600"):rn(g,s,c?l?"400":"300":l?"700":"500"):g.v2.colors.grey[200],y=p||(c&&![Jo.Unknown].includes(s)?x:[Jo.Disabled].includes(s)?g.v2.colors.grey[400]:[Go.Error,Go.Warning,Go.Success].includes(s)?g.v2.colors.black[500]:g.v2.colors.white[500]),b=u||(c&&![Jo.Unknown].includes(s)?[Jo.Disabled].includes(s)?g.v2.colors.grey[700]:g.v2.colors.silver[600]:x);return e(Cc,{text:a,fullWidth:m,children:t(Yg,{$backgroundColor:b,$minWidth:h,$fullWidth:m,$hasLabel:!!f,children:[r&&e(r,{fill:y,size:14}),f&&e(cn,{color:y,size:d||sn.XXS,nowrap:!0,children:f}),n&&e(n,{fill:y,size:14})]})})},Zg=r.span`
1715
- font-family: ${({theme:e})=>e.font_family.primary};
1716
- font-size: ${({$smallAndDark:e})=>e?"12px":"14px"};
1717
- font-weight: 400;
1718
- color: ${({theme:e,$smallAndDark:t})=>t?e.v2.colors.grey[400]:e.v2.colors.silver[200]};
1719
- `,ef=r.span`
1720
- font-family: ${({theme:e})=>e.font_family.primary};
1721
- font-size: 14px;
1722
- font-weight: 400;
1723
- color: ${({theme:e})=>e.v2.colors.red[500]};
1724
- `,tf=({label:o,tooltip:r,required:n,badge:i,width:a,smallAndDark:s})=>o||r||n?t(Tn,{$width:a,$justifyContent:"space-between",children:[o&&e(Zg,{$smallAndDark:s,children:o}),t(Tn,{$gap:4,children:[i&&e(Qg,{...i,textSize:sn.XXXS}),n&&e(ef,{children:"*"}),r&&e(Cc,{text:r,withIcon:!0})]})]}):null,of=({errorMessage:o,warnMessage:r,helpMessage:n})=>{const a=i(),s=o?a.v2.colors.red[500]:r?a.v2.colors.yellow[500]:a.v2.colors.silver[200],l=e(ot,{size:12,fill:s});return o||r||n?t(Tn,{$alignItems:"center",children:[l&&e(In,{children:l}),e(cn,{size:sn.XXS,weight:400,color:s,children:o||r||n})]}):null},rf=r.div`
1725
- padding: ${({$small:e})=>e?"4px":"6px 12px"};
1726
-
1727
- display: flex;
1728
- align-self: stretch;
1729
- align-items: center;
1730
- gap: 8px;
1731
- border-radius: 6px;
1732
-
1733
- border: 1px solid ${({theme:e,$disabled:t,$error:o})=>t?e.v2.colors.grey[600]:o?e.v2.colors.red[500]:e.v2.colors.silver[500]};
1734
- background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
1735
- ${({$disabled:e,$error:t})=>!e&&!t&&n`
1736
- &:hover,
1737
- &:active,
1738
- &:focus-within {
1739
- border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
1740
- }
1741
- `}
1742
- `,nf=r.input`
1743
- max-width: ${({$maxWidth:e})=>e||"unset"};
1744
- width: ${({$width:e})=>e||"unset"};
1745
-
1746
- flex: 1;
1747
- font-family: ${({theme:e})=>e.font_family.primary};
1748
- font-size: ${({$small:e})=>e?"12px":"14px"};
1749
- font-weight: 400;
1750
-
1751
- cursor: text;
1752
- color: ${({theme:e})=>e.v2.colors.white[500]};
1753
- &::placeholder {
1754
- color: ${({theme:e})=>e.v2.colors.silver[600]};
1755
- }
1756
-
1757
- &:disabled {
1758
- cursor: not-allowed;
1759
- color: ${({theme:e})=>e.v2.colors.grey[400]};
1760
- &::placeholder {
1761
- color: ${({theme:e})=>e.v2.colors.grey[400]};
1762
- }
1763
- }
1764
-
1765
- overflow: hidden;
1766
- text-overflow: ellipsis;
1767
- white-space: nowrap;
1768
- `,af=r.div`
1769
- display: flex;
1770
- align-items: center;
1771
- justify-content: center;
1772
- cursor: pointer;
1773
- `,sf=({label:o,required:r,tooltip:n,badge:a,leftIcon:s,rightIcon:l,hasError:c,errorMessage:d,warnMessage:p,helpMessage:u,type:h=Vo.Text,name:m,value:g,onChange:f,disabled:x,maxWidth:y,width:b,small:v=!1,onClick:$,...w})=>{const S=i(),k=h===Vo.Password,[C,E]=jt(!1),[A,D]=jt(null),T=c||!!d||!!A,I=g?S.v2.colors.white[500]:x?S.v2.colors.grey[400]:S.v2.colors.silver[200],N=v?14:18;return t(In,{$width:b,$gap:6,children:[e(tf,{label:o,tooltip:n,required:r,badge:a}),t(rf,{$small:v,$disabled:x,$error:T,onClick:$,children:[s?e(s,{size:N,fill:I}):null,e(nf,{"data-id":m,type:C||h===Vo.Number?Vo.Text:h,name:m,value:g,onChange:e=>{e.stopPropagation();const t=e.target.value;h===Vo.Number&&(e.target.value=di(t),t&&t!==e.target.value?D("Please enter a valid number"):D(null)),f?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:x,$maxWidth:y,$width:b,$small:v,...w}),k?e(af,{onClick:()=>E(e=>!e),children:e(C?At:Dt,{size:N,fill:I})}):l?e(l,{size:N,fill:I}):null]}),e(of,{errorMessage:A||d,warnMessage:p,helpMessage:u})]})};var lf,cf;!function(e){e.S="s",e.L="l"}(lf||(lf={})),function(e){e.Filled="filled",e.Underline="underline"}(cf||(cf={}));const df=r.div`
1774
- display: flex;
1775
- align-items: center;
1776
- gap: 2px;
1777
- padding: 3px;
1778
- border-radius: 8px;
1779
- border: 1px solid ${({theme:e})=>e.v2.colors.grey[500]};
1780
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
1781
- `,pf=r.button`
1782
- flex: 1;
1783
- display: flex;
1784
- align-items: center;
1785
- justify-content: center;
1786
- gap: 8px;
1787
- padding: ${({$size:e})=>e===lf.S?"4px 8px":"8px 16px"};
1788
- border-radius: 6px;
1789
- border: none;
1790
- box-shadow: ${({$isSelected:e})=>e?"0 0 11px 0 rgba(0, 0, 0, 0.32)":"none"};
1791
-
1792
- ${({$disabled:e,$isSelected:t,$selectedBgColor:o,theme:r})=>e?n`
1793
- cursor: not-allowed;
1794
- background-color: ${t?(o||r.v2.colors.black[500])+sl["040"]:"transparent"};
1795
- `:n`
1796
- cursor: pointer;
1797
- background-color: ${t?o||r.v2.colors.black[500]:"transparent"};
1798
- &:hover {
1799
- background-color: ${t?o||r.v2.colors.black[500]:r.v2.colors.silver[800]};
1800
- }
1801
- `}
1802
- `,uf=r.div`
1803
- display: flex;
1804
- align-items: stretch;
1805
- `,hf=r.button`
1806
- display: flex;
1807
- height: 34px;
1808
- padding: 8px 12px 8px 16px;
1809
- justify-content: center;
1810
- align-items: center;
1811
- gap: 8px;
1812
- border: none;
1813
- border-bottom: 2px solid ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:"transparent"};
1814
- border-radius: ${({$isSelected:e})=>e?"6px 6px 0 0":"0"};
1815
- background-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.silver[1e3]:"transparent"};
1816
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1817
- transition:
1818
- border-color 0.2s,
1819
- background-color 0.2s,
1820
- border-radius 0.2s;
1821
- &:hover {
1822
- border-bottom-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:e.v2.colors.grey[500]};
1823
- }
1824
- `,mf=({"data-id":r,size:n=lf.L,variant:a=cf.Filled,options:s=[],selected:l,setSelected:c,disabled:d})=>{const p=i(),u=a===cf.Underline,h=u?hf:pf;return e(u?uf:df,{"data-id":r,children:s.map(({value:r,label:i,icon:a,tooltip:s,selectedBgColor:m,disabled:g},f)=>{const x=l===r,y=g||d,b=y?p.v2.colors.grey[400]:u||x?p.v2.colors.white[500]:p.v2.colors.grey[300],v=n===lf.S?sn.XXS:sn.XS,$=x?500:400,w=t(o,{children:[a&&e(a,{fill:b}),i&&e(cn,{size:v,weight:$,color:b,nowrap:!0,children:i})]});return e(h,{onClick:()=>!y&&c(r),$disabled:y,$isSelected:x,$size:n,...!u&&{$selectedBgColor:m},children:s?e(Cc,{text:s,withIcon:!0,children:w}):w},`segment-${i||f}-${r}`)})})},gf=r.div`
1825
- box-sizing: border-box !important;
1826
- width: ${({$width:e})=>e??"fit-content"};
1827
- padding: ${({$withSegment:e})=>e?"2px 2px 2px 12px":"6px 12px"};
1828
- display: flex;
1829
- align-self: stretch;
1830
- align-items: center;
1831
- gap: 8px;
1832
- overflow: hidden;
1833
- border-radius: 6px;
1834
-
1835
- border: none;
1836
- border-radius: 6px;
1837
- background: ${({$isHovered:e,$isActive:t,$idleBackgroundColor:o,$emphasizeBackgroundColor:r,theme:n})=>{const i=o??n.v2.colors.silver[800],a=r??n.v2.colors.silver[700];return e||t?a:i}};
1838
- `,ff=r.input`
1839
- min-width: 0;
1840
- flex: 1;
1841
- font-family: ${({theme:e})=>e.font_family.primary};
1842
- font-size: 14px;
1843
- font-weight: 400;
1844
- line-height: 20px;
1845
-
1846
- cursor: text;
1847
- color: ${({$textColor:e})=>e};
1848
- &::placeholder {
1849
- color: ${({$textColor:e})=>e};
1850
- }
1851
-
1852
- overflow: hidden;
1853
- text-overflow: ellipsis;
1854
- white-space: nowrap;
1855
- `,xf=({"data-id":o,value:r,onChange:n,placeholder:a,width:s,segment:l,idleBackgroundColor:c,emphasizeBackgroundColor:d})=>{const p=i(),[u,h]=jt(!1),[m,g]=jt(!1),[f,x]=jt(!1),y=u?p.v2.colors.white[500]:p.v2.colors.silver[200],b=!!l?.options?.length,v=Ht(()=>{if(b)return l?.options.find(e=>e.value===l.selected)?.label},[b,l?.options,l?.selected]),$=Ht(()=>a||(b&&v?`Search by ${v.toLowerCase()}`:"Search..."),[a,b,v]);return t(gf,{$width:s,$withSegment:b,onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),$isHovered:m&&!f,$isActive:u,$idleBackgroundColor:c,$emphasizeBackgroundColor:d,children:[e(Tt,{size:18,fill:y}),e(ff,{"data-id":o??"search",name:"search",type:"text",placeholder:$,value:r,onChange:e=>{e.stopPropagation(),n(e.target.value)},onFocus:()=>h(!0),onBlur:()=>h(!1),$textColor:y}),b&&e("div",{style:{flexShrink:0},onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:e(mf,{"data-id":l["data-id"],options:l.options,selected:l.selected,setSelected:l.setSelected,size:lf.S})})]})};var yf,bf;!function(e){e.Primary="primary",e.Secondary="secondary",e.Text="text"}(yf||(yf={})),function(e){e.S="small",e.M="medium",e.L="large"}(bf||(bf={}));const vf=r.button`
1856
- display: flex;
1857
- align-items: center;
1858
- justify-content: center;
1859
- gap: 8px;
1860
- ${({$fullWidth:e})=>e&&n`
1861
- width: 100%;
1862
- `}
1863
- border: none;
1864
- border-radius: 6px;
1865
- ${({$size:e,$hasLabel:t})=>e===bf.S?n`
1866
- height: 32px;
1867
- ${t?n`
1868
- padding: 8px 16px;
1869
- `:n`
1870
- width: 32px;
1871
- `}
1872
- `:e===bf.M?n`
1873
- height: 38px;
1874
- ${t?n`
1875
- padding: 8px 18px;
1876
- `:n`
1877
- width: 38px;
1878
- `}
1879
- `:n`
1880
- height: 44px;
1881
- ${t?n`
1882
- padding: 8px 22px;
1883
- `:n`
1884
- width: 44px;
1885
- `}
1886
- `}
1887
-
1888
- cursor: pointer;
1889
- &:disabled {
1890
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
1891
- cursor: not-allowed;
1892
- }
1893
- &:enabled {
1894
- ${({$withShadow:e})=>e?n`
1895
- box-shadow: 0 0 11px 0 rgba(0, 0, 0, 0.32);
1896
- `:""}
1897
- ${({$variant:e})=>e===yf.Primary?n`
1898
- background-color: ${({theme:e})=>e.v2.colors.purple[500]};
1899
- &:hover {
1900
- background-color: ${({theme:e})=>e.v2.colors.purple[600]};
1901
- }
1902
- &:active {
1903
- background-color: ${({theme:e})=>e.v2.colors.purple[700]};
1904
- }
1905
- `:e===yf.Secondary?n`
1906
- background-color: ${({theme:e})=>e.v2.colors.silver[750]};
1907
- &:hover {
1908
- background-color: ${({theme:e})=>e.v2.colors.silver[600]};
1909
- }
1910
- &:active {
1911
- background-color: ${({theme:e})=>e.v2.colors.silver[500]};
1912
- }
1913
- `:e===yf.Text?n`
1914
- background-color: transparent;
1915
- &:hover {
1916
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
1917
- }
1918
- &:active {
1919
- background-color: ${({theme:e})=>e.v2.colors.silver[900]};
1920
- }
1921
- `:""}
1922
- }
1923
- `,$f=qt(({"data-id":r,label:n,tooltip:a,hideTooltipIcon:s,leftIcon:l,rightIcon:c,variant:d=yf.Primary,size:p=bf.M,iconSize:u,loading:h,fullWidth:m,withShadow:g,textColor:f,disabled:x,onClick:y,...b},v)=>{const $=i(),w=u||(p===bf.L?18:16),S=p===bf.L?sn.S:sn.XS,k=f||(x?$.v2.colors.grey[400]:$.v2.colors.white[500]),[C,E]=jt(!1),A=Vt(async e=>{e.stopPropagation(),E(!0),await(y?.(e)),E(!1)},[y]);return e(vf,{ref:v,"data-id":r,$variant:d,$size:p,$fullWidth:m,$withShadow:g,$hasLabel:!!n,disabled:x,onClick:h||C?void 0:A,...b,children:e(Cc,{text:a,withIcon:!s,children:h||C?n?e(og,{size:$.v2.text.size[S],textColor:k}):e(pd,{}):t(o,{children:[l&&e(l,{size:w,fill:k}),n?e(cn,{size:S,weight:500,color:k,nowrap:!0,children:n}):null,c&&e(c,{size:w,fill:k})]})})})});$f.displayName=$f.name;const wf=r.div`
1924
- display: flex;
1925
- align-items: center;
1926
- justify-content: center;
1927
- width: fit-content;
1928
- height: fit-content;
1929
- padding: 8px;
1930
- border-radius: 100%;
1931
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
1932
- `,Sf=({icon:o=yt,hideIcon:r=!1,title:n="No data",subTitle:a,button:s})=>{const l=i().v2.colors.silver[200];return t(In,{$gap:12,$alignItems:"center",children:[!r&&e(wf,{children:e(o,{size:32,fill:l})}),t(In,{$gap:4,$alignItems:"center",children:[e(cn,{size:sn.S,align:"center",children:n}),a&&e(cn,{size:sn.XXS,align:"center",color:l,children:a})]}),s&&e($f,{variant:yf.Secondary,...s})]})};var kf;!function(e){e.S="small",e.L="large"}(kf||(kf={}));const Cf=r.div`
1933
- width: fit-content;
1934
- display: flex;
1935
- align-items: center;
1936
- gap: 8px;
1937
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1938
- `,Ef=r.div`
1939
- width: ${({$size:e})=>e===kf.S?"16px":"20px"};
1940
- height: ${({$size:e})=>e===kf.S?"16px":"20px"};
1941
- display: flex;
1942
- align-items: center;
1943
- justify-content: center;
1944
- border-radius: 4px;
1945
- border: 1px solid ${({$borderColor:e})=>e};
1946
- background-color: ${({$backgroundColor:e})=>e};
1947
- `,Af=({name:o,label:r,tooltip:n,badge:a,size:s=kf.L,disabled:l,partiallyChecked:c,value:d,onChange:p,errorMessage:u,warnMessage:h,helpMessage:m})=>{const g=i(),[f,x]=jt(!1),y=c||d,b=s===kf.S?12:16,v=l?g.v2.colors.grey[400]:g.v2.colors.white[500],$=y?"transparent":l?g.v2.colors.grey[700]:f?g.v2.colors.silver[400]:g.v2.colors.silver[600],w=l?g.v2.colors.grey[600]:y?g.v2.colors.purple[500]:g.v2.colors.silver[900];return t(In,{$gap:4,children:[t(Tn,{$justifyContent:"space-between",children:[t(Cf,{"data-id":o||"checkbox"+(r?`-${r}`:""),onClick:e=>{e.stopPropagation(),l||p(!!c||!d)},$disabled:l,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[e(Ef,{$size:s,$borderColor:$,$backgroundColor:w,children:c?e(bt,{size:b,fill:v}):d?e(ft,{size:b,fill:v}):null}),r&&e(cn,{size:s===kf.S?sn.XXS:sn.XS,nowrap:!0,children:r})]}),e(tf,{tooltip:n,badge:a})]}),e(of,{errorMessage:u,warnMessage:h,helpMessage:m})]})},Df=r.div`
1948
- display: flex;
1949
- flex-direction: ${({$direction:e})=>e===Po.Horizontal?"row":"column"};
1950
- gap: ${({$direction:e})=>e===Po.Horizontal?16:8}px;
1951
- `,Tf=({direction:o=Po.Vertical,title:r,size:n,disabled:i,withSelectAll:a,options:s,values:l,setValues:c})=>{const d=n===kf.S?sn.XXS:sn.XS,p=Ht(()=>s.every(e=>l[e.id]),[s,l]),u=Ht(()=>s.some(e=>l[e.id])&&s.some(e=>!l[e.id]),[s,l]),h=(e,t)=>{c(o=>{const r={...o};return e?r[e]=t:s.forEach(e=>r[e.id]=t),r})};return t(Df,{$direction:o,children:[r&&a?e(Af,{label:r,partiallyChecked:u,value:p,onChange:e=>h("",e),size:n}):r&&!a?e(cn,{size:d,children:r}):null,s.map(t=>e(Af,{...t,value:l[t.id],onChange:e=>h(t.id,e),disabled:i,size:n},`${r}-checkbox-${t.id}`))]})};var If,Nf;!function(e){e.Left="left",e.Right="right"}(If||(If={})),function(e){e.Top="top",e.Bottom="bottom"}(Nf||(Nf={}));const Rf=r.div`
1952
- position: relative;
1953
- display: flex;
1954
- flex-direction: column;
1955
- gap: 4px;
1956
- `,Of=r.div`
1957
- position: fixed;
1958
- ${({$coords:e})=>null!=e.top?`top: ${e.top}px;`:""}
1959
- ${({$coords:e})=>null!=e.bottom?`bottom: ${e.bottom}px;`:""}
1960
- ${({$coords:e})=>null!=e.left?`left: ${e.left}px;`:""}
1961
- ${({$coords:e})=>null!=e.right?`right: ${e.right}px;`:""}
1962
- ${({$coords:e})=>null!=e.width?`width: ${e.width-16}px;`:""}
1963
- z-index: 1100;
1964
-
1965
- display: flex;
1966
- flex-direction: column;
1967
- gap: 0;
1968
-
1969
- min-width: 120px;
1970
- padding: 8px;
1971
- border-radius: 6px;
1972
- background-color: ${({theme:e})=>e.v2.colors.silver[900]};
1973
- box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.3);
1974
- `,_f=r.div`
1975
- display: flex;
1976
- flex-direction: column;
1977
- gap: 0;
1978
-
1979
- width: 100%;
1980
- max-height: ${({$maxHeight:e})=>e||"230px"};
1981
- overflow-y: auto;
1982
- `,Ff=r.div`
1983
- display: flex;
1984
- align-items: center;
1985
- gap: 8px;
1986
- width: calc(100% - 16px);
1987
- padding: 8px;
1988
- border-radius: 6px;
1989
- cursor: pointer;
1990
- ${({$selected:e})=>e?n`
1991
- background-color: ${({theme:e})=>e.v2.colors.silver[500]};
1992
- `:n`
1993
- background-color: transparent;
1994
- &:hover {
1995
- background-color: ${({theme:e})=>e.v2.colors.grey[700]};
1996
- }
1997
- `}
1998
- `,Pf=({defaultOpen:o,open:r,onOpenChange:n,alignX:a,alignY:s,items:l,selectedIds:c,setSelectedIds:d,label:p,withMultiSelect:u,withSearch:h,fullWidth:m,maxHeight:g,buttonProps:f,iconButtonProps:x,isLoading:y,emptyMessage:b,children:v})=>{const $=i(),w=void 0!==r,S=!!f||!!x||!!v,[k,C]=jt(o??!S),E=w?r:k,A=Vt(e=>{w||C(e),n?.(e)},[w,n]),[D,T]=jt({x:a||If.Left,y:s||Nf.Bottom}),I=Xt(null),N=Xt(null),[R,O]=jt({}),_=Vt((e,t)=>{const o=I.current?.getBoundingClientRect();if(!o)return;const r=S?8:0;O({top:t===Nf.Bottom?S?o.bottom+r:o.top:void 0,bottom:t===Nf.Top?S?window.innerHeight-o.top+r:window.innerHeight-o.bottom:void 0,left:e===If.Left?o.left:void 0,right:e===If.Right?window.innerWidth-o.right:void 0,width:m?o.width:void 0})},[S,m]),F=e=>{const t=!E;if(A(t),!t)return;const o={x:a||(e.clientX>window.innerWidth/2?If.Right:If.Left),y:s||(e.clientY>window.innerHeight/2?Nf.Top:Nf.Bottom)};T(o),_(o.x,o.y)};Yt(()=>{E&&_(D.x,D.y)},[E,D.x,D.y,_]),Wt(()=>{if(!E)return;const e=e=>{const t=e.target;I.current?.contains(t)||N.current?.contains(t)||A(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[E,A]),Wt(()=>{if(!E)return;const e=()=>A(!1),t=()=>A(!1);return document.addEventListener("scroll",e,!0),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",e,!0),window.removeEventListener("resize",t)}},[E,A]);const P=e=>{d(u?c.includes(e)?c.filter(t=>t!==e):[...c,e]:[e]),S&&!u&&A(!1)},[L,z]=jt(""),M=Ht(()=>L?l.filter(e=>e?.label?.toLowerCase().includes(L.toLowerCase())):l,[l.length,L]);return t(Rf,{ref:I,children:[p&&e(tf,{label:p}),f&&e($f,{...f,fullWidth:m,rightIcon:E?_t:Ft,onClick:F}),x&&e(Il,{...x,onClick:F}),"function"==typeof v?v({ChevronIcon:E?_t:Ft,handleClick:F}):v,E&&uo(t(Of,{ref:N,$coords:R,children:[h&&e(xf,{value:L,onChange:z,width:"100%"}),y?e(Un,{withSpinner:!0,title:"Loading...",titleSize:sn.XS}):0===M.length&&b?e(Sf,{subTitle:b}):e(_f,{$maxHeight:g,children:M.map(o=>{if(!o)return null;const{id:r,label:n,icon:i,withCheckbox:a}=o,s=c.includes(r);return t(Ff,{"data-id":`option-${r}`,$selected:s&&!a,onClick:()=>P(r),children:[a&&e(Af,{value:s,onChange:()=>P(r)}),i&&e(i,{size:14,fill:o.color||$.v2.colors.white[500]}),e(cn,{size:sn.XS,nowrap:!0,color:o.color||$.v2.colors.white[500],children:n})]},r)})}),u&&e($f,{label:"Done",onClick:()=>A(!1)})]}),document.body)]})},Lf=t=>{const{"data-id":o,options:r,placeholder:n="Search...",isLoading:i}=t,a=!0===t.multiple,[s,l]=jt(""),[c,d]=jt(!1),p=Ht(()=>a?t.value:t.value?[t.value]:[],[a,t.value]),u=Ht(()=>{if(a){const e=p.length;return e?1===e?r.find(e=>e.id===p[0])?.label??"":`${e} selected`:""}return t.value?r.find(e=>e.id===t.value)?.label??"":""},[a,t,r,p]),h=c?s:u,m=Ht(()=>{const e=a?r.map(e=>({...e,withCheckbox:!0})):r;if(!s)return e;const t=s.toLowerCase();return e.filter(e=>e.label.toLowerCase().includes(t))},[a,r,s]),g=Vt(()=>{l(""),d(!0)},[]),f=Vt(e=>{l(e.target.value),c||d(!0),a||e.target.value||!t.value||t.onSelect(null)},[c,a,t]),x=Vt(e=>{d(e),e||l("")},[]),y=Vt(e=>{if(a)return void t.onSelect(e);const o=r.find(t=>t.id===e[0]);o&&(t.onSelect(o),l(""),d(!1))},[a,t,r]),b=c&&(i||m.length>0||s.length>0);return e(Pf,{open:b,onOpenChange:x,items:m,selectedIds:p,setSelectedIds:y,withMultiSelect:a,isLoading:i,emptyMessage:"No results found",fullWidth:!0,alignY:Nf.Bottom,children:e(sf,{name:o,leftIcon:Tt,placeholder:n,value:h,onChange:f,onFocus:g})})},zf=r.button`
1999
- width: 100%;
2000
- padding: 0;
2001
- padding-right: 12px;
2002
- display: flex;
2003
- align-items: center;
2004
- justify-content: flex-start;
2005
- gap: 12px;
2006
- border-radius: 8px;
2007
- border: none;
2008
- ${({$hovered:e})=>e?n`
2009
- background-color: ${({theme:e})=>e.v2.colors.silver[750]};
2010
- `:n`
2011
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
2012
- `}
2013
- overflow: hidden;
2014
- cursor: pointer;
2015
- &:disabled {
2016
- cursor: not-allowed;
2017
- opacity: 0.5;
2018
- }
2019
- `,Mf=r.div`
2020
- width: ${({$hasIcon:e})=>e?"56px":"0"};
2021
- height: 56px;
2022
- display: flex;
2023
- align-items: center;
2024
- justify-content: center;
2025
- ${({$hovered:e})=>e?n`
2026
- background-color: ${({theme:e})=>e.v2.colors.silver[600]};
2027
- `:n`
2028
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
2029
- `}
2030
- `,Bf=r.div`
2031
- width: ${({$hasIcon:e})=>e?"calc(100% - 56px)":"100%"};
2032
- display: flex;
2033
- justify-content: space-between;
2034
- align-items: center;
2035
- gap: 8px;
2036
- `,Uf=({label:o,icon:r,loading:n,disabled:i,onClick:a})=>{const[s,l]=jt(!1);return t(zf,{$hovered:s,type:"button",disabled:i||n,onClick:a,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[e(Mf,{$hovered:s,$hasIcon:!!r,children:r&&e(r,{size:36})}),t(Bf,{$hasIcon:!!r,children:[n?e(og,{size:16}):e(cn,{variant:an.Span,align:"center",children:o}),e(Pt,{rotate:90,size:24})]})]})},jf=({buttons:t})=>e(In,{$gap:12,children:t.map(t=>e(Uf,{...t},t.label))});var Wf;!function(e){e.Button="button",e.ButtonDropData="button-drop-data"}(Wf||(Wf={}));const Hf=({onAnyClick:t,actions:o})=>e(Tn,{$gap:8,$alignItems:"center",children:o?.map(o=>{if(!o)return null;switch(o.type){case Wf.Button:return e($f,{...o.buttonProps,onClick:e=>{o.buttonProps?.onClick?.(e),t?.()}},o.id);case Wf.ButtonDropData:return e(Pf,{...o.dropDataProps,items:o.dropDataProps?.items??[],withMultiSelect:!1,selectedIds:[],setSelectedIds:e=>{o.buttonProps?.onClick?.(e[0]),t?.()},buttonProps:o.buttonProps},o.id);default:return null}})}),Xf=r.div`
2037
- display: flex;
2038
- align-items: center;
2039
- justify-content: center;
2040
- padding: 8px;
2041
- border-radius: 8px;
2042
- background-color: ${({theme:e})=>e.v2.colors.silver[900]};
2043
- `,Vf=({icon:o,title:r,subTitle:n,withCopy:a,badge:s,children:l})=>{const c=i(),{CopyButton:d}=Nl();return t(Tn,{$gap:n?8:6,$alignItems:"center",children:[o&&(n?e(Xf,{children:e(o,{size:24})}):e(o,{size:24})),r||s||n?t(In,{children:[r||s?t(Tn,{$gap:6,$alignItems:"center",children:[r&&e(cn,{nowrap:!0,children:r}),a&&r&&e(d,{value:r,size:Dl.XS}),s&&e(Qg,{...s})]}):null,n&&e(cn,{size:sn.XXS,color:c.v2.colors.silver[200],nowrap:!0,children:n})]}):null,l]})},Gf=r.div`
2044
- display: flex;
2045
- flex-direction: column;
2046
- gap: ${({$moreSpacing:e})=>e?"16px":"12px"};
2047
- width: ${({$moreSpacing:e})=>e?"calc(100% - 32px)":"calc(100% - 24px)"};
2048
- align-self: ${({$fullHeight:e})=>e?"stretch":"auto"};
2049
- padding: ${({$moreSpacing:e})=>e?"16px":"12px"};
2050
- border-radius: ${({$moreSpacing:e})=>e?"16px":"12px"};
2051
- background-color: ${({theme:e,$bgTint:t})=>e.v2.colors.silver[t]};
2052
- `,Kf=r.div`
2053
- display: flex;
2054
- align-items: center;
2055
- flex-wrap: wrap;
2056
- width: 100%;
2057
- `,qf=r.div`
2058
- width: calc(${({$cellsPerRow:e})=>100/e+"%"} - 16px);
2059
- margin: 8px;
2060
- display: flex;
2061
- flex-direction: column;
2062
- gap: 4px;
2063
- `,Jf=({bgTint:o="900",fullHeight:r=!1,moreSpacing:n=!1,richTitle:a,withCollapse:s,collapseIsDefaultOpen:l,actions:c=[],cellsPerRow:d,items:p,children:u})=>{const h=i(),{CopyButton:m}=Nl(),[g,f]=jt(l||!1),x=!s||s&&g;return t(Gf,{$bgTint:o,$fullHeight:r,$moreSpacing:n,children:[(a||s)&&t(Tn,{$gap:16,$justifyContent:"space-between",children:[a?e(Vf,{...a}):e("div",{}),t(Tn,{children:[x&&e(Hf,{actions:c}),s&&e(Tn,{$gap:8,$alignItems:"center",children:e($f,{variant:yf.Text,size:bf.S,leftIcon:g?_t:Ft,onClick:()=>f(e=>!e)})})]})]}),x&&p?e(Kf,{children:p.map(({id:o,title:r,label:n,withCopy:i,badge:a})=>t(qf,{$cellsPerRow:d||p.length,children:[e(cn,{size:sn.XXXS,color:h.v2.colors.silver[200],nowrap:!0,children:r}),t(Tn,{$gap:4,children:[a&&e(Qg,{...a}),n&&e(cn,{size:sn.XS,nowrap:!0,children:n}),i&&e(m,{value:n||a?.label?.toString()||"",size:Dl.XS})]})]},o))}):null,x&&u]})};var Yf;!function(e){e.S="small",e.M="medium"}(Yf||(Yf={}));const Qf=r.div`
2064
- display: flex;
2065
- flex-direction: column;
2066
- gap: ${({$gap:e})=>e}px;
2067
- width: ${({$padding:e})=>`calc(100% - ${2*e}px)`};
2068
- align-self: ${({$fullHeight:e})=>e?"stretch":"auto"};
2069
- padding: ${({$padding:e})=>e}px;
2070
- border-radius: 16px;
2071
- background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
2072
- `,Zf=qt(({id:o,size:r=Yf.M,fullHeight:n=!1,richTitle:i,search:a,actions:s,children:l},c)=>{const d=r===Yf.S?4:16,p=r===Yf.S?12:16;return t(Qf,{ref:c,id:o,"data-section-name":o,$padding:p,$gap:d,$fullHeight:n,children:[a||i||s?t(Tn,{$gap:d,$justifyContent:"space-between",children:[a||i?e(Vf,{...i,children:a&&e(xf,{...a})}):null,e(Hf,{actions:s??[]})]}):null,l]})});Zf.displayName="SectionCard";const ex=r.div`
2073
- flex: 1;
2074
- align-self: stretch;
2075
- display: flex;
2076
- align-items: center;
2077
- gap: 8px;
2078
- padding: 16px;
2079
- border-radius: 12px;
2080
- background-color: ${({theme:e,$status:t})=>rn(e,t,t===Jo.Unknown?"750":"500")};
2081
- `,tx=r.div`
2082
- display: flex;
2083
- align-items: center;
2084
- justify-content: center;
2085
- width: fit-content;
2086
- height: fit-content;
2087
- padding: 8px;
2088
- border-radius: 12px;
2089
- background-color: ${({theme:e,$status:t})=>t===Jo.Unknown?rn(e,t,"800"):rn(e,t,"900")+sl["015"]};
2090
- `,ox=({status:o,icon:r,title:n,description:a})=>{const s=i(),l=r??jn(o,s),c=[Go.Default,Go.Info,Jo.Disabled,Jo.Unknown].includes(o)?s.v2.colors.white[500]:s.v2.colors.black[500];return t(ex,{$status:o,children:[e(tx,{$status:o,children:e(l,{size:32,fill:c})}),t(In,{$gap:2,$justifyContent:"center",children:[e(cn,{size:sn.M,weight:500,color:c,nowrap:!0,children:n}),e(cn,{size:sn.XXS,weight:300,color:c,nowrap:!0,children:a})]})]})},rx=r.div`
2091
- flex: 1;
2092
- align-self: stretch;
2093
- display: flex;
2094
- flex-direction: column;
2095
- gap: 12px;
2096
- padding: 12px;
2097
- border-radius: 12px;
2098
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
2099
- `,nx=["-","N/A"],ix=({title:o,cells:r})=>{const n=i();return t(rx,{children:[e(cn,{size:sn.XXS,color:n.v2.colors.grey[150],children:o}),e(Tn,{$gap:32,children:r.map(r=>t(In,{$gap:2,children:[!r.isLoading||r.value&&!nx.includes(r.value)?e(cn,{size:r.label?sn.M:sn.L,children:r.value}):e(pd,{scale:.9}),r.label&&e(cn,{size:sn.XXS,children:r.label})]},`${o}-${r.label}-${r.value}`))})]})},ax=r(Tn)`
2100
- width: calc(100% - 20px);
2101
- padding: 10px;
2102
- border-radius: 6px;
2103
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
2104
- display: flex;
2105
- align-items: center;
2106
- justify-content: space-between;
2107
- gap: 12px;
2108
- `,sx=r.div`
2109
- position: relative;
2110
- width: ${({$hideCopy:e})=>e?"100%":"calc(100% - 24px - 12px)"};
2111
- display: flex;
2112
- align-items: center;
2113
- gap: 4px;
2114
- `,lx=r.pre`
2115
- flex: 1;
2116
- margin: 0;
2117
- padding: 0;
2118
- font-size: 14px;
2119
- color: #5ffb98; // TODO: add to theme
2120
- overflow-x: auto;
2121
- `,cx=r.span`
2122
- flex-shrink: 0;
2123
- font-size: 14px;
2124
- color: #5ffb98; // TODO: add to theme
2125
- `,dx=({value:o,hideCopy:r=!1,onDone:n})=>{const{CopyButton:i}=Nl({onDone:n}),a=Xt(null),[s,l]=jt(!1);return Wt(()=>{const e=()=>{if(a.current){const{scrollWidth:e,clientWidth:t}=a.current;l(e>t)}};e();const t=new ResizeObserver(e);return a.current&&t.observe(a.current),()=>{t.disconnect()}},[o]),t(ax,{children:[t(sx,{$hideCopy:r,children:[e(lx,{ref:a,children:o}),s&&e(cx,{children:"..."})]}),!r&&e(i,{value:o,size:Dl.XS})]})},px=r.div`
2126
- display: flex;
2127
- align-items: center;
2128
- gap: 8px;
2129
- padding: 16px;
2130
- border-radius: ${({$isExtended:e})=>e?"12px 12px 0 0":"12px"};
2131
- background-color: ${({$backgroundColor:e})=>e};
2132
-
2133
- ${({$withHover:e,$hoverBackgroundColor:t})=>e&&n`
2134
- cursor: pointer;
2135
- transition: background 0.2s;
2136
- &:hover {
2137
- background-color: ${t};
2138
- }
2139
- `}
2140
- `,ux=r.div`
2141
- display: flex;
2142
- align-items: center;
2143
- justify-content: center;
2144
- flex-shrink: 0;
2145
- width: 42px;
2146
- height: 42px;
2147
- border-radius: 11px;
2148
- background-color: ${({$backgroundColor:e})=>e};
2149
- `,hx=r(In)`
2150
- flex: 1;
2151
- min-width: 0;
2152
- `,mx=r.div`
2153
- display: flex;
2154
- align-items: center;
2155
- justify-content: center;
2156
- flex-shrink: 0;
2157
- width: 24px;
2158
- height: 24px;
2159
- `,gx=({status:o,title:r,subTitle:n,badgeLabel:a,loading:s,isExtended:l=!1,toggleExtended:c,invertColors:d=!1})=>{const p=i(),u=jn(o,p),h=c?l?_t:Ft:void 0,m=o===Jo.Unknown,g=o===Jo.Disabled,f=[Go.Error,Go.Warning,Go.Success].includes(o),x=rn(p,o,g?d?"400":"700":m?"600":d?"300":"500"),y=g?p.v2.colors.grey[400]:d?p.v2.colors.white[500]:f?p.v2.colors.black[500]:p.v2.colors.white[500],b=d&&!m?x:y,v=d&&!m?g?p.v2.colors.grey[700]:l?p.v2.colors.silver[500]:p.v2.colors.silver[600]:"rgba(21, 22, 24, 0.1)",$=d||m?l?p.v2.colors.silver[700]:p.v2.colors.silver[800]:g?l?p.v2.colors.grey[800]:p.v2.colors.grey[900]:rn(p,o,l?"400":"500"),w=d||m?l?p.v2.colors.silver[600]:p.v2.colors.silver[700]:g?l?p.v2.colors.grey[700]:p.v2.colors.grey[800]:rn(p,o,l?"700":"800");return t(px,{$withHover:!!c,$isExtended:l,$backgroundColor:$,$hoverBackgroundColor:w,onClick:c,children:[e(ux,{$backgroundColor:v,children:s?e(pd,{scale:1.2}):e(u,{size:32,fill:b})}),t(hx,{$gap:4,$justifyContent:"center",children:[t(Tn,{$gap:10,$alignItems:"center",children:[e(cn,{size:sn.S,weight:500,color:y,children:r}),a&&e(Qg,{label:a,backgroundColor:p.v2.colors.silver[600],textColor:p.v2.colors.white[500],textSize:sn.XXXS})]}),n&&e(cn,{size:sn.XXXS,color:y,children:n})]}),h&&e(mx,{children:e(h,{size:24,fill:y})})]})},fx=r.div`
2160
- display: flex;
2161
- flex-direction: column;
2162
- width: 100%;
2163
- border-radius: 12px;
2164
- overflow: hidden;
2165
- `,xx=r.div`
2166
- display: flex;
2167
- flex-direction: column;
2168
- gap: 8px;
2169
- padding: 8px 12px 16px 12px;
2170
- background-color: ${({theme:e})=>e.v2.colors.silver[900]};
2171
- `,yx=r.div`
2172
- display: flex;
2173
- align-items: center;
2174
- gap: 8px;
2175
- `,bx=r.div`
2176
- display: flex;
2177
- align-items: center;
2178
- justify-content: center;
2179
- flex-shrink: 0;
2180
- width: 18px;
2181
- height: 18px;
2182
- `,vx=({conditions:o,title:r,subTitle:n})=>{const a=i(),[s,l]=jt(!1),c=Vt(()=>l(e=>!e),[]),d=Ht(()=>ai(o),[o]),{errors:p,hasErrors:u,warnings:h,hasWarnings:m,hasDisableds:g,hasLoadings:f}=Ht(()=>Fr(d),[d]);Wt(()=>{l(u||m||g)},[u,m,g]);const x=Ht(()=>(!d.length||f)&&!u&&!m&&!g,[d.length,f,u,m,g]),y=Ht(()=>u?Go.Error:m?Go.Warning:g?Go.Info:Go.Success,[u,m,g]),b=Ht(()=>r||(1===d.length?ii(d[0].reason||d[0].type):void 0)||(({hasErrors:e,hasWarnings:t,hasDisableds:o,loading:r})=>{const n="Something isn't right";return e?"Something Failed":t||o?n:r?"Loading...":"Everything Successful"})({hasErrors:u,hasWarnings:m,hasDisableds:g,loading:x}),[r,d,u,m,g,x]),v=Ht(()=>n||1===d.length&&d[0].message||void 0,[n,d]),$=Ht(()=>`${u?p.length:m?h.length:d.length}/${d.length}`,[u,p.length,m,h.length,d.length]);return t(fx,{children:[e(gx,{status:y,invertColors:!0,title:b,subTitle:v,badgeLabel:$,loading:x,isExtended:s,toggleExtended:c}),s&&e(xx,{children:d.map(({status:o,type:r,reason:n,message:i},s)=>{const l=o===qo.Loading,c=o===qo.Disabled?Go.Info:o,d=l?null:jn(c,a),p=o===Go.Error?rn(a,Go.Error,"500"):o===Go.Warning?rn(a,Go.Warning,"500"):a.v2.colors.white[500],u=[r,i||n].filter(Boolean).join(" - ");return t(yx,{children:[e(bx,{children:l||!d?e(Un,{withSpinnerOld:!0}):e(d,{size:18})}),e(cn,{size:sn.XXXS,color:p,lineHeight:"16px",children:u})]},`condition-${s}`)})})]})};var $x,wx,Sx;!function(e){e.Default="default",e.SuccessError="successError"}($x||($x={})),function(e){e.S="small",e.L="large"}(wx||(wx={})),function(e){e.Left="left",e.Right="right"}(Sx||(Sx={}));const kx=r.div`
2183
- display: flex;
2184
- align-items: center;
2185
- gap: ${({$gap:e})=>e}px;
2186
- `,Cx=r.div`
2187
- position: relative;
2188
- display: flex;
2189
- align-items: center;
2190
- justify-content: space-between;
2191
-
2192
- width: ${({$size:e})=>2*e+2}px;
2193
- height: ${({$size:e})=>e}px;
2194
- padding: ${4}px;
2195
- border-radius: ${({$size:e})=>2*e}px;
2196
- background-color: ${({$disabled:e,$onBgColor:t,$offBgColor:o,$variant:r,$value:n,theme:i})=>{if(e)return i.v2.colors.grey[800];if(t&&n)return t;if(o&&!n)return o;switch(r){case $x.SuccessError:return n?i.v2.colors.green[500]:i.v2.colors.red[500];case $x.Default:default:return n?i.v2.colors.purple[500]:i.v2.colors.grey[400]}}};
2197
-
2198
- border: 1px solid ${({$disabled:e,theme:t})=>e?t.v2.colors.grey[600]:"transparent"};
2199
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
2200
- `,Ex=r.div`
2201
- position: absolute;
2202
- top: 50%;
2203
- left: ${({$value:e,$size:t})=>e?`calc(100% - ${t}px - 4px)`:"4px"};
2204
- transform: translateY(-50%);
2205
- width: ${({$size:e})=>e}px;
2206
- height: ${({$size:e})=>e}px;
2207
- border-radius: 100%;
2208
- background-color: ${({$color:e})=>e};
2209
- box-shadow: ${({$disabled:e})=>e?"0 0 40px 0 rgba(0, 0, 0, 0.07)":"0 0 10px 0 rgba(0, 0, 0, 0.50)"};
2210
- `,Ax=({variant:r=$x.Default,size:n=wx.L,name:a,label:s,labelAlign:l=Sx.Right,labelColor:c,tooltip:d,badge:p,value:u,onChange:h,disabled:m,withIcon:g,onIcon:f=ft,offIcon:x=yt,onBgColor:y,offBgColor:b,errorMessage:v,warnMessage:$,helpMessage:w})=>{const S=i(),k=m?S.v2.colors.grey[400]:S.v2.colors.white[500],C=n===wx.S?10:16,E=c||S.v2.colors.silver[200],A=n===wx.S?sn.XXXS:sn.XS,D=n===wx.S?8:12;return t(In,{$gap:4,children:[t(Tn,{$justifyContent:"space-between",children:[t(kx,{"data-id":a||"toggle"+(s?`-${s}`:""),$gap:D,children:[s&&l===Sx.Left&&e(cn,{color:E,size:A,nowrap:!0,children:s}),t(Cx,{$onBgColor:y,$offBgColor:b,$variant:r,$size:C,$value:u,$disabled:m,onClick:e=>{e.stopPropagation(),m||h(!u)},children:[e(Ex,{$color:k,$size:C,$value:u,$disabled:m}),g&&t(o,{children:[e(f,{size:C,fill:k}),e(x,{size:C,fill:k})]})]}),s&&l===Sx.Right&&e(cn,{color:E,size:A,nowrap:!0,children:s})]}),e(tf,{tooltip:d,badge:p})]}),e(of,{errorMessage:v,warnMessage:$,helpMessage:w})]})},Dx=r.div`
2211
- display: flex;
2212
- flex-direction: ${({$direction:e})=>e===Po.Horizontal?"row":"column"};
2213
- gap: ${({$direction:e})=>e===Po.Horizontal?16:8}px;
2214
- `,Tx=({direction:o=Po.Vertical,title:r,size:n,disabled:i,options:a,values:s,setValues:l})=>{const c=n===wx.S?sn.XS:sn.S;return t(Dx,{$direction:o,children:[r&&e(cn,{size:c,children:r}),a.map(t=>e(Ax,{...t,labelAlign:Sx.Right,value:s[t.id],onChange:e=>{return o=t.id,r=e,void l(e=>{const t={...e};return o?t[o]=r:a.forEach(e=>t[e.id]=r),t});var o,r},disabled:i,size:n},`${r}-toggle-${t.id}`))]})},Ix=r.div`
2215
- display: flex;
2216
- align-items: center;
2217
- justify-content: space-between;
2218
- width: 100%;
2219
- overflow: hidden;
2220
- `,Nx=r.div`
2221
- display: flex;
2222
- align-items: center;
2223
- gap: 16px;
2224
- padding: 6px 0;
2225
- min-width: 0;
2226
- flex: 1;
2227
- overflow: hidden;
2228
- `,Rx=r.div`
2229
- display: flex;
2230
- align-items: center;
2231
- justify-content: center;
2232
- flex: 0 0 36px;
2233
- width: 36px;
2234
- height: 36px;
2235
- border-radius: 8px;
2236
- background: ${({theme:e})=>e.v2.colors.silver[800]};
2237
- `,Ox=r.img`
2238
- width: 24px;
2239
- height: 24px;
2240
- `,_x=r.div`
2241
- display: flex;
2242
- align-items: center;
2243
- gap: 16px;
2244
- flex-shrink: 0;
2245
- `,Fx=({icon:o,iconSrc:r,title:n,subTitle:i,toggleProps:a,actions:s,onClose:l,onCloseDisabled:c})=>t(Ix,{children:[t(Nx,{children:[o?e(Rx,{children:e(o,{size:24})}):r?e(Rx,{children:e(Ox,{src:r,alt:n||"icon"})}):null,(n||i)&&t(In,{$gap:6,children:[n&&e(cn,{size:sn.S,weight:500,children:n}),i&&e(cn,{size:sn.XXS,children:i})]})]}),t(_x,{children:[a&&e(Ax,{...a}),s?.length?e(Pf,{iconButtonProps:{"data-id":"drawer-actions",icon:Lt},items:s,selectedIds:s?.filter(e=>e?.active)?.map(e=>e?.id)??[],setSelectedIds:e=>s?.find(t=>t?.id===e[0])?.onClick?.()}):null,l&&e(Il,{"data-id":"drawer-close",icon:yt,size:Dl.M,onClick:l,disabled:c})]})]}),Px=r.div`
2246
- display: flex;
2247
- align-items: center;
2248
- gap: 10px;
2249
- ${({$fullWidth:e})=>e&&n`
2250
- width: calc(100% - 16px);
2251
- `}
2252
- padding: 4px 12px 4px 4px;
2253
- border-radius: 8px;
2254
- background-color: ${({theme:e,$status:t})=>rn(e,t,[Go.Info].includes(t)?"1000":"900")};
2255
- `,Lx=r.div`
2256
- width: ${({$smallIcon:e})=>e?"24px":"32px"};
2257
- height: ${({$smallIcon:e})=>e?"24px":"32px"};
2258
- display: flex;
2259
- align-items: center;
2260
- justify-content: center;
2261
- border-radius: 6px;
2262
- background-color: ${({theme:e,$status:t})=>rn(e,t,[Go.Info].includes(t)?"900":"800")};
2263
- `,zx=r.div`
2264
- margin-left: auto;
2265
- margin-right: 8px;
2266
- cursor: pointer;
2267
- &:hover {
2268
- transform: scale(1.2);
2269
- }
2270
- `,Mx=({status:o,message:r,action:n,fullWidth:a,smallIcon:s})=>{const l=i(),c=jn(o,l),d=rn(l,o,o===Go.Default?"300":o===Go.Info?"400":"500");return t(Px,{$status:o,$fullWidth:a,children:[e("div",{children:e(Lx,{$status:o,$smallIcon:s,children:e(c,{size:s?18:24})})}),e(cn,{color:d,size:sn.XXXS,weight:400,children:r}),n&&e(zx,{"data-id":n["data-id"],onClick:n.onClick,children:e(cn,{color:d,size:sn.XXS,weight:500,underline:!0,children:n.label})})]})},Bx=r.div`
2271
- display: flex;
2272
- align-items: center;
2273
- gap: 8px;
2274
- padding: 4px 12px;
2275
- `,Ux=r.div`
2276
- flex: 1;
2277
- `,jx=r.div`
2278
- width: 150px;
2279
- `,Wx=({note:o,actions:r,children:n})=>n?e(Bx,{children:n}):t(Bx,{children:[o&&e(Mx,{...o}),e(Ux,{}),r?.map((t,o)=>e(jx,{children:e($f,{fullWidth:!0,...t})},t["data-id"]||`drawer-footer-button-${o}`))]}),Hx=r.div`
2280
- position: fixed;
2281
- top: 0;
2282
- bottom: 0;
2283
- ${({$position:e})=>e}: 0;
2284
- z-index: 1000;
2285
-
2286
- display: flex;
2287
- flex-direction: column;
2288
- gap: 12px;
2289
-
2290
- width: calc(${({$width:e})=>e} - 32px);
2291
- padding: 12px;
2292
- border-radius: ${({$position:e})=>"left"===e?"0 20px 20px 0":"20px 0 0 20px"};
2293
- background: ${({theme:e})=>e.v2.colors.black[500]};
2294
- box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
2295
- overflow: hidden;
2296
-
2297
- ${({$disableAnimation:e,$position:t})=>!e&&n`
2298
- animation-name: ${cl.in[t]};
2299
- `}
2300
- `,Xx=r.div`
2301
- display: flex;
2302
- flex-direction: column;
2303
- gap: 12px;
2304
-
2305
- height: calc(100% - ${56}px);
2306
- overflow-y: auto;
2307
- `,Vx=({isOpen:r,hideOverlay:n=!1,disableAnimation:i=!1,position:a="right",width:s="600px",header:l,footer:c,children:d})=>(kl(r),r?uo(t(o,{children:[!n&&e(On,{onClick:l?.onCloseDisabled?void 0:l?.onClose}),t(Hx,{"data-id":"drawer",$position:a,$width:s,$disableAnimation:i,children:[l&&e(Fx,{...l}),e(Xx,{children:d}),c&&e(Wx,{...c})]})]}),document.body):null),Gx=({options:t,values:o,setValues:r,withMultiSelect:n,withSearch:i,...a})=>{const s=Ht(()=>o?.length?`Selected: ${t.filter(e=>o.includes(e.id)).map(e=>e.label).join(", ")||"none"}`:"",[t,o]);return e(Pf,{withMultiSelect:n,withSearch:i,alignX:If.Left,items:t,selectedIds:o,setSelectedIds:r,children:({ChevronIcon:t,handleClick:o})=>e(sf,{placeholder:"Select options...",...a,rightIcon:t,value:s,onChange:()=>{},onClick:o})})},Kx=r.header`
2308
- position: relative;
2309
- width: calc(100% - 36px);
2310
- padding: 12px 18px;
2311
- background-color: ${({theme:e})=>e.v2.colors.black[500]};
2312
- display: flex;
2313
- align-items: center;
2314
- justify-content: space-between;
2315
- `,qx=r(Tn)`
2316
- position: absolute;
2317
- left: 50%;
2318
- transform: translateX(-50%);
2319
- gap: 16px;
2320
- `,Jx=({left:o=[],center:r=[],right:n=[]})=>t(Kx,{children:[e(Tn,{$gap:16,children:o}),e(qx,{children:r}),e(Tn,{$gap:16,children:n})]}),Yx=r.div`
2321
- display: flex;
2322
- align-items: center;
2323
- gap: 2px;
2324
- width: fit-content;
2325
- padding: 4px;
2326
- border-radius: 8px;
2327
- background-color: ${({theme:e})=>e.v2.colors.silver[600]};
2328
- box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.25);
2329
-
2330
- position: absolute;
2331
- right: ${({$right:e,$left:t})=>e||(t?"unset":"12px")};
2332
- left: ${({$left:e})=>e||"unset"};
2333
- top: 50%;
2334
- transform: translateY(-50%);
2335
- `,Qx=({isOpen:t,actions:o,positionRight:r,positionLeft:n})=>t?e(Yx,{$right:r,$left:n,children:o.map(t=>{if(!t)return null;const{tooltip:o,...r}=t;return e(Cc,{text:o||"",children:e($f,{...r,variant:yf.Secondary,size:bf.S})},r.id)})}):null,Zx=({values:o,setValues:r,name:n,label:a,tooltip:s,badge:l,required:c,errorMessage:d,warnMessage:p,helpMessage:u,placeholder:h,disabled:m})=>{const g=i(),f=o.length<=1,x=m,y=m||f&&x,b=o.length?o:[""];return t(In,{"data-id":n,$gap:6,children:[e(tf,{label:a,tooltip:s,required:c,badge:l}),e(In,{$gap:8,children:b.map((n,i)=>{const a=i===b.length-1;return t(Tn,{$gap:8,$alignItems:"center",children:[e(sf,{width:"100%",autoFocus:Qn(n)&&!f&&a,value:n,onChange:e=>((e,t)=>{const n=[...o||[]];n[t]=e,r(n)})(e.target.value,i),disabled:m,placeholder:h,hasError:!!d}),a&&e($f,{leftIcon:St,variant:yf.Secondary,size:bf.S,disabled:x,onClick:()=>(()=>{const e=[...o||[]];e.push(""),r(e)})()}),e($f,{leftIcon:y?It:()=>e(It,{fill:g.v2.colors.red[500]}),variant:yf.Secondary,size:bf.S,disabled:y,onClick:()=>(e=>{const t=[...o||[]].filter((t,o)=>o!==e);t.length||t.push(""),r(t)})(i)})]},`input-list-${i}`)})}),e(of,{errorMessage:d,warnMessage:p,helpMessage:u})]})},ey=({col:t,colIdx:o,row:r,rowIdx:n,rowsLength:i,handleChange:a,errorMessage:s,disabled:l})=>{const{keyName:c,componentType:d,inputType:p,label:u,placeholder:h,options:m,renderCondition:g}=t,f=r[c];if(g&&!g(r))return null;switch(d){case Xo.Dropdown:case"multi-dropdown":{const t="multi-dropdown"===d,o=Array.isArray(f)?f:null!=f&&""!==f?[String(f)]:[],r=m?.filter(e=>o.includes(e.id)).map(e=>e.id)||[];return e(Gx,{name:c,label:h?u:void 0,placeholder:h||u,options:m||[],withMultiSelect:t,withSearch:t,values:r,setValues:e=>a(c,t?e:e[0]??"",n),disabled:l,hasError:!!s},c)}default:const t=i>1&&0===n&&0===o&&Qn(f);return e(sf,{name:c,label:h?u:void 0,placeholder:h||u,autoFocus:t,type:p,value:f,onChange:({target:{value:e}})=>a(c,e,n),disabled:l,hasError:!!s})}},ty=r.table`
2336
- width: 100%;
2337
- border-collapse: separate;
2338
- border-spacing: 0 8px;
2339
- `,oy=r.td`
2340
- padding: 0 8px 0 0;
2341
- `,ry=r.td`
2342
- width: 72px;
2343
- padding-bottom: 2px;
2344
- vertical-align: bottom;
2345
- `,ny=({columns:o,values:r,setValues:n,name:a,label:s,tooltip:l,badge:c,required:d,disabled:p,errorMessage:u,warnMessage:h,helpMessage:m,limitFieldsPerRow:g})=>{const f=i(),x=Ht(()=>{const e={};return o.forEach(({keyName:t})=>e[t]=""),e},[o]),y=(e,t,o)=>{const i=r.length?wo(r):[wo(x)];i[o][e]=t,n(i)},b=Ht(()=>{if(g){const e=[];for(let t=0;;t+=g){const r=o.slice(t,t+g);if(!r.length)break;e.push(r)}return e}return[o]},[g,o]),v=r.length?r:[x];return t(In,{"data-id":a,$gap:0,children:[e(tf,{label:s,tooltip:l,required:d,badge:c}),e(ty,{children:e("tbody",{children:v.map((o,i)=>{const a=i===v.length-1;return t(Ut,{children:[g&&i>0?e("tr",{children:e(oy,{colSpan:b.length})}):null,b.map((s,l)=>t("tr",{children:[s.map((t,r)=>t.renderCondition&&!t.renderCondition(o)?null:e(oy,{children:e(ey,{col:t,colIdx:r,row:o,rowIdx:i,rowsLength:v.length,handleChange:y,disabled:p,errorMessage:u})},`input-table-row-${i}-col-${l}-${r}`)),0===l&&e(ry,{children:t(Tn,{$gap:8,$justifyContent:"flex-end",children:[a&&e($f,{leftIcon:St,variant:yf.Secondary,size:bf.S,disabled:p,onClick:()=>(()=>{const e=wo(r);e.push(wo(x)),n(e)})()}),e($f,{leftIcon:p?It:()=>e(It,{fill:f.v2.colors.red[500]}),variant:yf.Secondary,size:bf.S,disabled:p,onClick:()=>(e=>{const t=r.filter((t,o)=>o!==e);t.length||t.push(wo(x)),n(t)})(i)})]})})]},`input-table-matrix-${i}-${l}`))]},`input-table-row-${i}`)})})}),e(of,{errorMessage:u,warnMessage:h,helpMessage:m})]})},iy=r.div`
2346
- display: flex;
2347
- align-items: center;
2348
- justify-content: space-between;
2349
- gap: 32px;
2350
-
2351
- padding: 18px 16px;
2352
- border-radius: 18px;
2353
- background-color: ${({theme:e})=>e.v2.colors.black[500]+sl["095"]};
2354
- box-shadow: 0 4px 16.7px 0 rgba(0, 0, 0, 0.83);
2355
-
2356
- position: fixed;
2357
- bottom: 0;
2358
- left: 50%;
2359
- z-index: 1;
2360
- animation-name: ${cl.in.center};
2361
- `,ay=({isOpen:o,onClose:r,richTitle:n,actions:i})=>o?t(iy,{children:[e(Vf,{...n}),e(Hf,{onAnyClick:r,actions:i})]}):null,sy=r.div`
2362
- position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
2363
- top: 50%;
2364
- left: 50%;
2365
- transform: translate(-50%, -50%);
2366
- z-index: 1000;
2367
- width: fit-content;
2368
- border-radius: 20px;
2369
- background: ${({theme:e})=>e.v2.colors.black[500]};
2370
- box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
2371
- overflow: hidden;
2372
-
2373
- animation-name: ${cl.in.center};
2374
- `,ly=r.div`
2375
- position: relative;
2376
- `,cy=r.div`
2377
- position: absolute;
2378
- top: 16px;
2379
- left: 16px;
2380
- `,dy=({isOpen:r,hideOverlay:n=!1,relativeToParent:i=!1,onBack:a,onClose:s,children:l})=>{if(kl(r),!r)return null;const c=t(o,{children:[!n&&e(On,{$relativeToParent:i,onClick:s}),e(sy,{"data-id":"modal",$relativeToParent:i,children:t(ly,{children:[a&&e(cy,{children:e(Il,{icon:t=>e(Pt,{rotate:-90,...t}),size:Dl.L,onClick:a})}),l]})})]});return i?c:uo(c,document.body)},py=r.div`
2381
- position: relative;
2382
- width: ${64}px;
2383
- height: ${({$height:e})=>e};
2384
- flex-shrink: 0;
2385
- `,uy=r.aside`
2386
- position: absolute;
2387
- top: 0;
2388
- left: 0;
2389
- bottom: 0;
2390
- display: flex;
2391
- flex-direction: column;
2392
- gap: 8px;
2393
- width: ${({$expanded:e})=>e?"220px":"64px"};
2394
- padding: 16px ${12}px;
2395
- box-sizing: border-box;
2396
- background-color: ${({theme:e})=>e.v2.colors.black[500]};
2397
- overflow-x: hidden;
2398
- overflow-y: auto;
2399
- z-index: 10;
2400
- transition:
2401
- width 200ms ease,
2402
- padding 200ms ease;
2403
- `,hy=r.button`
2404
- display: flex;
2405
- align-items: center;
2406
- width: 100%;
2407
- min-width: 0;
2408
- height: ${40}px;
2409
- padding: 0;
2410
- margin: 0;
2411
- border: none;
2412
- border-radius: 6px;
2413
- box-sizing: border-box;
2414
- cursor: pointer;
2415
- font: inherit;
2416
- background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[500]:"transparent"};
2417
- &:hover {
2418
- background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[600]:e.v2.colors.silver[800]};
2419
- }
2420
- &:active {
2421
- background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[700]:e.v2.colors.silver[900]};
2422
- }
2423
- `,my=r.div`
2424
- width: ${40}px;
2425
- height: ${40}px;
2426
- display: flex;
2427
- align-items: center;
2428
- justify-content: center;
2429
- flex-shrink: 0;
2430
- `,gy=r.div`
2431
- flex: 1 1 0;
2432
- min-width: 0;
2433
- overflow: hidden;
2434
- padding-right: 12px;
2435
- pointer-events: none;
2436
- `,fy=({height:o,icons:r})=>{const n=i(),[a,s]=jt(!1);return e(py,{$height:o,children:e(uy,{$expanded:a,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:r.map(({id:o,label:r,selected:i,icon:s,onClick:l})=>t(hy,{$selected:i,onClick:l,"aria-label":r,title:a?void 0:r,children:[e(my,{children:e(s,{size:24,fill:n.v2.colors.white[500]})}),a&&e(gy,{children:e(cn,{size:sn.S,weight:500,color:n.v2.colors.white[500],nowrap:!0,children:r})})]},o))})})};var xy;!function(e){e.S="small",e.L="large"}(xy||(xy={}));const yy=r.div`
2437
- width: fit-content;
2438
- display: flex;
2439
- align-items: center;
2440
- gap: 8px;
2441
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
2442
- `,by=r.div`
2443
- width: ${({$size:e})=>e===xy.S?"16px":"20px"};
2444
- height: ${({$size:e})=>e===xy.S?"16px":"20px"};
2445
- display: flex;
2446
- align-items: center;
2447
- justify-content: center;
2448
- border-radius: 100%;
2449
- border: 1px solid ${({$borderColor:e})=>e};
2450
- background-color: ${({$backgroundColor:e})=>e};
2451
- `,vy=({"data-id":o,label:r,value:n,onChange:a,disabled:s,size:l=xy.L})=>{const c=i(),[d,p]=jt(!1),u=n,h=l===xy.S?6:8,m=s?c.v2.colors.grey[400]:c.v2.colors.white[500],g=u?"transparent":s?c.v2.colors.grey[700]:d?c.v2.colors.silver[400]:c.v2.colors.silver[600],f=s?c.v2.colors.grey[600]:u?c.v2.colors.purple[500]:c.v2.colors.silver[900];return t(yy,{"data-id":o??"radio"+(r?`-${r}`:""),onClick:e=>{e.stopPropagation(),s||a(!n)},$disabled:s,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[e(by,{$size:l,$borderColor:g,$backgroundColor:f,children:n?e(zt,{size:h,fill:m}):null}),r&&e(cn,{size:l===xy.S?sn.XXS:sn.XS,children:r})]})},$y=r.div`
2452
- display: flex;
2453
- flex-direction: ${({$flexDirection:e})=>e};
2454
- gap: ${({$gap:e})=>e}px;
2455
- `,wy=({label:o,direction:r,disabled:n,size:i,options:a,values:s,setValues:l})=>t($y,{$flexDirection:r===Po.Horizontal?"row":"column",$gap:r===Po.Horizontal?16:8,children:[o&&e(cn,{children:o}),a.map(t=>e(vy,{...t,value:s[t.id],onChange:e=>{return o=t.id,r=e,void l(e=>{const t={...e};return Object.keys(t).forEach(e=>t[e]=!1),t[o]=r,t});var o,r},disabled:n,size:i},`${o}-radio-${t.id}`))]}),Sy=({currentStep:o,data:r,gap:n=12})=>e(In,{$gap:n,children:r.map(r=>{const n=r.step<o,i=r.step===o;return t(Tn,{$gap:8,children:[n||r.forceDoneBadge?e(Qg,{status:Go.Success,label:"",leftIcon:ft}):e(Qg,{status:Go.Default,label:r.step.toString()}),e(cn,{size:i?sn.M:sn.XS,weight:i?500:400,opacity:i?1:.7,children:r.label})]},`stepper-item-${r.step}`)})});var ky;!function(e){e.Data="data",e.Pretty="pretty"}(ky||(ky={}));const Cy=r.div`
2456
- height: ${({$maxHeight:e})=>e};
2457
- width: 100%;
2458
- display: flex;
2459
- flex-direction: column;
2460
- overflow: hidden;
2461
- `,Ey=r.div`
2462
- width: 100%;
2463
- flex: 1;
2464
- display: flex;
2465
- flex-direction: column;
2466
- `,Ay=r.div`
2467
- flex-shrink: 0;
2468
- position: relative;
2469
- z-index: 2;
2470
- `,Dy=r.div`
2471
- position: relative;
2472
- display: flex;
2473
- width: 100%;
2474
- `,Ty=r.div`
2475
- position: relative;
2476
- min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
2477
- flex: ${({$flex:e})=>e??1};
2478
- padding: 18px 24px;
2479
- border: none;
2480
- border-radius: ${({$isFirst:e,$isLast:t})=>e?"4px 0 0 0":t?"0 4px 0 0":"0"};
2481
- box-sizing: border-box;
2482
-
2483
- ${({$variant:e,$backgroundColor:t})=>{if(t)return n`
2484
- background-color: ${t};
2485
- `;switch(e){case ky.Data:return n`
2486
- background-color: ${({theme:e})=>e.v2.colors.silver[750]};
2487
- `;case ky.Pretty:return n`
2488
- background-color: transparent;
2489
- `;default:return""}}}
2490
- `,Iy=r.div`
2491
- position: absolute;
2492
- top: 50%;
2493
- right: 0;
2494
- transform: translateY(-50%);
2495
- width: 1px;
2496
- height: 18px;
2497
- background: ${({theme:e})=>e.v2.colors.silver[500]};
2498
- `,Ny=r.div`
2499
- min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
2500
- flex: ${({$flex:e})=>e??1};
2501
- overflow: hidden;
2502
- display: flex;
2503
- align-items: center;
2504
-
2505
- padding: 18px 24px;
2506
- cursor: ${({$withClick:e})=>e?"pointer":"default"};
2507
- box-sizing: border-box;
2508
-
2509
- ${({$variant:e,$selected:t,$hovered:o,$isLastRow:r,$isFirstCell:i,$isLastCell:a})=>{switch(e){case ky.Data:return n`
2510
- border-bottom: ${({theme:e})=>r?"none":`1px solid ${e.v2.colors.silver[500]}`};
2511
- border-radius: ${r?i?"0 0 0 4px":a?"0 0 4px 0":"0":"0"};
2512
- background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:o?e.v2.colors.silver[700]:e.v2.colors.silver[800]};
2513
- `;case ky.Pretty:return n`
2514
- border: none;
2515
- border-radius: ${i?"12px 0 0 12px":a?"0 12px 12px 0":"0"};
2516
- background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:o?e.v2.colors.silver[700]:e.v2.colors.silver[900]};
2517
- `;default:return""}}}
2518
- `,Ry=r.div`
2519
- width: 100%;
2520
- display: flex;
2521
- align-items: center;
2522
- justify-content: ${({$textAlign:e})=>"right"===e?"flex-end":"left"===e?"flex-start":"center"===e?"center":"unset"};
2523
- gap: 4px;
2524
- text-align: ${({$textAlign:e})=>e||"left"};
2525
- `,Oy=({variant:o,columns:r,rows:n,getRowActions:i,rowActionsPushRightPosition:a,rowActionsPushLeftPosition:s,withCheckboxes:l})=>{const[c,d]=jt(null),p=Ht(()=>n.map((p,u)=>{const{cells:h,onClick:m,isSelected:g=!1,onSelect:f,onDeselect:x,hideCheckbox:y}=p,b=c===u,v=i(p),$=(e,t)=>({$isLastRow:u===n.length-1,$isFirstCell:e,$isLastCell:t,$selected:g,$withClick:!!m,onClick:()=>m?.(),$hovered:!!m&&b,onMouseEnter:()=>d(u),onMouseLeave:()=>d(null)});return t(Dy,{children:[l&&e(Ny,{$variant:o,style:{flex:"0 0 68px"},...$(!0,!1),children:!y&&e(Af,{value:g,onChange:()=>g?x?.():f?.()})},"checkbox-column"),r.map(({key:n,withTooltip:i,textAlign:c,flex:d,minWidth:p},m)=>{const g=h.find(e=>e.key===n),f=0===m&&!l,x=m===r.length-1,y=v.length&&(a&&x||s&&f||!a&&!s&&x),w=e(Tn,{$width:"100%",$justifyContent:"right"===c?"flex-end":"center"===c?"center":"flex-start",children:g?.component?e(g.component,{}):e(cn,{size:sn.XS,children:g?.rawValue||"-"})});return t(Ny,{$variant:o,$flex:d,$minWidth:p,...$(f,x),children:[i?e(Cc,{text:g?.rawValue?.toString()||"",ellipsis:!0,children:w}):w,y?e(Qx,{isOpen:b,actions:v,positionRight:a,positionLeft:s}):null]},`row-${u}-cell-${m}`)})]},`row-${u}`)}),[n,c,i,a,s,l,r]);return e(dg,{gap:o===ky.Pretty?8:0,elements:p})},_y=({columnKey:t,sortDirection:o,sortByKey:r,onSort:n})=>{const a=i(),s=r===t?a.v2.colors.white[500]:a.v2.colors.grey[400],l=o===Lo.Ascending?0:180;return e(Il,{icon:t=>e(Pt,{fill:s,rotate:l,...t}),onClick:()=>n(t)})},Fy=({columnKey:t,filters:o,onFilter:r,rowsUnfiltered:n,filterOverride:a})=>{const s=i(),l=o[t]?.length?s.v2.colors.white[500]:s.v2.colors.grey[400],c=Ht(()=>{if(a)return a.options.map(({id:e,label:t})=>({id:e,label:t,withCheckbox:!0}));return Array.from(new Set(n.map(e=>e.cells.find(e=>e.key===t)?.rawValue?.toString()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t)).map(e=>({id:e,label:e,withCheckbox:!0}))},[n,t,a]);return e(Pf,{items:c,withMultiSelect:!0,selectedIds:o[t]?.map(e=>e.toString())??[],setSelectedIds:e=>r(t,e),defaultOpen:!1,iconButtonProps:{icon:t=>e(Mt,{fill:l,...t})}})},Py=({variant:o,backgroundColor:r,columns:n,rowsUnfiltered:i,sortDirection:a,sortByKey:s,onSort:l,filters:c,onFilter:d,withCheckboxes:p,partiallySelected:u,allSelected:h,onSelectAll:m})=>t(Dy,{children:[p&&e(Ty,{$variant:o,$backgroundColor:r,$isFirst:!0,$isLast:!1,style:{flex:"0 0 68px"},children:e(Af,{partiallyChecked:u&&!h,value:h||!1,onChange:m})},"checkbox-column"),n.map(({key:u,label:h,withTooltip:m,tooltip:g,noSort:f,noFilter:x,filterOverride:y,flex:b,minWidth:v,textAlign:$},w)=>{const S=0===w&&!p,k=w===n.length-1,C=e(cn,{size:sn.XS,align:$,children:h});return t(Ty,{$variant:o,$backgroundColor:r,$flex:b,$minWidth:v,$isFirst:S,$isLast:k,children:[t(Ry,{$textAlign:$,children:[g||m?e(Cc,{text:g||h,children:C}):C,!f&&e(_y,{columnKey:u,sortDirection:a,sortByKey:s,onSort:l}),!x&&e(Fy,{columnKey:u,filters:c,onFilter:d,rowsUnfiltered:i,filterOverride:y})]}),!k&&o===ky.Data&&e(Iy,{})]},`column-${u}`)})]}),Ly=({variant:o,maxHeight:r="256px",headerBackgroundColor:n,hideHeader:i=!1,isLoading:a,noDataProps:s,columns:l,rows:c,getRowActions:d,rowActionsPushRightPosition:p,rowActionsPushLeftPosition:u,withCheckboxes:h})=>{const[m,g]=jt(Lo.Ascending),[f,x]=jt(""),[y,b]=jt({}),v=Vt(e=>{x(e),g(e=>e===Lo.Ascending?Lo.Descending:Lo.Ascending)},[]),$=Vt((e,t)=>{b(o=>({...o,[e]:t}))},[]),w=Ht(()=>{const e=(e,t)=>{const o=e.cells.find(e=>e.key===t);return o&&(o.rawValue?.toString()||o.component?.({})?.props?.children?.toString())||""};return(f?[...c].sort((t,o)=>{const r=e(t,f),n=e(o,f);return(m===Lo.Ascending?1:-1)*((e,t)=>"string"==typeof e&&"string"==typeof t?e.localeCompare(t):"number"==typeof e&&"number"==typeof t?e-t:"boolean"==typeof e&&"boolean"==typeof t?e===t?0:e?1:-1:String(e).localeCompare(String(t)))(r,n)}):c).filter(t=>{for(const[o,r]of Object.entries(y)){if(!r.length)continue;const n=l.find(e=>e.key===o)?.filterOverride;if(n){if(!n.filterRow(t,r))return!1}else if(!r.includes(e(t,o)))return!1}return!0})},[c,f,m,y,l]),{partiallySelected:S,allSelected:k}=Ht(()=>{const e=w.filter(e=>!e.hideCheckbox);return{partiallySelected:e.length>0&&e.some(e=>e.isSelected),allSelected:e.length>0&&e.every(e=>e.isSelected)}},[w]);return e(Cy,{$maxHeight:r,children:t(Ey,{$variant:o,children:[!i&&e(Ay,{children:e(Py,{variant:o,backgroundColor:n,columns:l,rowsUnfiltered:c,sortDirection:m,sortByKey:f,onSort:v,filters:y,onFilter:$,withCheckboxes:h,partiallySelected:S,allSelected:k,onSelectAll:e=>{e?w.forEach(e=>!e.hideCheckbox&&e.onSelect?.()):w.forEach(e=>!e.hideCheckbox&&e.onDeselect?.())}})}),w.length?e(Oy,{variant:o,columns:l,rows:w,getRowActions:d||(()=>[]),rowActionsPushRightPosition:p,rowActionsPushLeftPosition:u,withCheckboxes:h}):e(Nn,{style:{height:r},children:a?e(Un,{withSpinner:!0}):e(Sf,{...s})})]})})},zy=r.div`
2526
- display: flex;
2527
- align-items: center;
2528
- justify-content: center;
2529
- gap: 8px;
2530
- padding: 8px;
2531
- border-radius: 6px;
2532
-
2533
- ${({$flex:e})=>e?n`
2534
- flex: ${e};
2535
- `:n`
2536
- width: fit-content;
2537
- `}
2538
-
2539
- ${({$disabled:e,$withClick:t})=>e?n`
2540
- cursor: not-allowed;
2541
- background-color: ${({theme:e})=>e.v2.colors.grey[800]};
2542
- border: 1px solid transparent;
2543
- `:t?n`
2544
- cursor: pointer;
2545
- background-color: ${({theme:e})=>e.v2.colors.silver[750]};
2546
- &:hover {
2547
- background-color: ${({theme:e})=>e.v2.colors.silver[600]};
2548
- }
2549
- &:active {
2550
- background-color: ${({theme:e})=>e.v2.colors.purple[900]};
2551
- border: 1px solid ${({theme:e})=>e.v2.colors.purple[400]};
2552
- }
2553
- `:n`
2554
- background-color: ${({theme:e})=>e.v2.colors.silver[750]};
2555
- border: 1px solid transparent;
2556
- `}
2557
- `,My=({label:o,leftIcon:r,rightIcon:n,onClick:a,disabled:s,flex:l})=>{const c=i(),d=s?c.v2.colors.grey[400]:c.v2.colors.white[500];return t(zy,{$disabled:s,$withClick:!!a,onClick:()=>!s&&a?.(),$flex:l,children:[r&&e(r,{fill:d,size:16}),e(cn,{color:d,size:sn.XS,nowrap:!0,children:o}),n&&e(n,{fill:d,size:16})]})},By=r.div`
2558
- padding: 6px 12px;
2559
-
2560
- display: flex;
2561
- align-self: stretch;
2562
- align-items: flex-start;
2563
- gap: 8px;
2564
- border-radius: 6px;
2565
-
2566
- border: 1px solid ${({theme:e,$disabled:t,$error:o})=>t?e.v2.colors.grey[600]:o?e.v2.colors.red[500]:e.v2.colors.silver[500]};
2567
- background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
2568
- ${({$disabled:e,$error:t})=>!e&&!t&&n`
2569
- &:hover,
2570
- &:active,
2571
- &:focus-within {
2572
- border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
2573
- }
2574
- `}
2575
- `,Uy=r.textarea`
2576
- max-width: ${({$maxWidth:e})=>e||"unset"};
2577
- min-height: ${({$minHeight:e})=>e||"50px"};
2578
- flex: 1;
2579
- font-family: ${({theme:e})=>e.font_family.primary};
2580
- font-size: 14px;
2581
- font-weight: 400;
2582
- resize: none;
2583
-
2584
- background: transparent;
2585
- border: none;
2586
- outline: none;
2587
- cursor: text;
2588
- color: ${({theme:e})=>e.v2.colors.white[500]};
2589
- &::placeholder {
2590
- color: ${({theme:e})=>e.v2.colors.silver[600]};
2591
- }
2592
-
2593
- &:disabled {
2594
- cursor: not-allowed;
2595
- color: ${({theme:e})=>e.v2.colors.grey[400]};
2596
- &::placeholder {
2597
- color: ${({theme:e})=>e.v2.colors.grey[400]};
2598
- }
2599
- }
2600
- `,jy=({label:o,required:r,tooltip:n,badge:i,errorMessage:a,warnMessage:s,helpMessage:l,name:c,value:d,onChange:p,disabled:u,maxWidth:h,minHeight:m,...g})=>{const f=Xt(null),x=()=>{f.current&&(f.current.style.height="auto",f.current.style.height=`${f.current.scrollHeight}px`)};return t(In,{$gap:6,children:[e(tf,{label:o,tooltip:n,required:r,badge:i}),e(By,{$disabled:u,$error:!!a,children:e(Uy,{ref:f,"data-id":c,name:c,value:d,onChange:e=>{e.stopPropagation(),x(),p?.(e)},onKeyDown:e=>{e.stopPropagation()},onFocus:x,onBlur:x,disabled:u,$maxWidth:h,$minHeight:m,...g})}),e(of,{errorMessage:a,warnMessage:s,helpMessage:l})]})},Wy=[{id:"ms",label:"milliseconds"},{id:"s",label:"seconds"},{id:"m",label:"minutes"},{id:"h",label:"hours"}],Hy=r.div`
2601
- flex: 1;
2602
- min-width: 0;
2603
- `,Xy=r.div`
2604
- flex: 0 0 auto;
2605
- min-width: 140px;
2606
- `,Vy=({name:o,label:r,tooltip:n,badge:i,placeholder:a,required:s,disabled:l,value:c,setValue:d,units:p=Wy,defaultUnit:u,errorMessage:h,warnMessage:m,helpMessage:g,hasError:f,width:x})=>{const y=Ht(()=>u&&p.some(e=>e.id===u)?u:p[0]?.id||"s",[u,p]),{num:b,unit:v}=Ht(()=>((e,t,o)=>{if(null==e||""===e)return{num:"",unit:o};const r=[...t.map(e=>e.id)].sort((e,t)=>t.length-e.length),n=new RegExp(`^\\s*(\\d+)\\s*(${r.join("|")})\\s*$`,"i"),i=String(e).match(n);if(i)return{num:i[1],unit:i[2].toLowerCase()};const a=String(e).match(/^\s*(\d+)\s*$/);return a?{num:a[1],unit:o}:{num:"",unit:o}})(c,p,y),[c,p,y]),$=(e,t)=>{d(""!==e?`${e}${t}`:"")};return t(In,{$width:x,$gap:6,children:[e(tf,{label:r,tooltip:n,required:s,badge:i}),t(Tn,{$gap:8,$alignItems:"center",children:[e(Hy,{children:e(sf,{name:o,placeholder:a,disabled:l,hasError:f||!!h,inputMode:"numeric",value:b,onChange:e=>$(di(e.target.value),v)})}),e(Xy,{children:e(Gx,{name:`${o}-unit`,disabled:l,hasError:f||!!h,withSearch:!1,options:p,values:[v],setValues:e=>$(b,e[0]||v)})})]}),e(of,{errorMessage:h,warnMessage:m,helpMessage:g})]})},Gy=r.div`
2607
- width: 530px;
2608
- `,Ky=r.div`
2609
- display: flex;
2610
- flex-direction: column;
2611
- align-items: center;
2612
- gap: 16px;
2613
- padding: 24px;
2614
- `,qy=r.div`
2615
- display: flex;
2616
- justify-content: center;
2617
- gap: 16px;
2618
- padding: 16px 24px;
2619
- background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
2620
- `,Jy=({visual:o,title:r,description:n,isOpen:a,onClose:s,onDeny:l,denyLabel:c="Deny",onApprove:d,approveLabel:p="Approve",...u})=>{const h=i();return e(dy,{isOpen:a,onClose:s,...u,children:t(Gy,{children:[t(Ky,{children:[o&&e(o,{}),e(cn,{size:sn.M,weight:500,color:h.v2.colors.white[500],children:r}),e(In,{$alignItems:"center",$gap:4,children:n.split("\n").map(t=>e(cn,{size:sn.XS,weight:400,color:h.v2.colors.silver[200],children:t},t))})]}),(l||d)&&t(qy,{children:[e($f,{"data-id":"deny",variant:yf.Secondary,label:c,onClick:()=>{l?.(),s()}}),d&&e($f,{"data-id":"approve",variant:yf.Primary,label:p,onClick:()=>{d(),s()}})]})]})})};export{Bu as $,Wf as A,bf as B,id as C,hc as D,Go as E,In as F,mr as G,li as H,sf as I,ci as J,No as K,hi as L,ar as M,Sf as N,Cc as O,sr as P,cr as Q,xr as R,Zf as S,Ax as T,fr as U,lr as V,ir as W,Ap as X,Qg as Y,Os as Z,Lr as _,yf as a,Mu as a$,Tu as a0,fs as a1,Da as a2,ja as a3,Pa as a4,xs as a5,ha as a6,Ua as a7,Fa as a8,gs as a9,Js as aA,Wu as aB,Wo as aC,Gs as aD,kr as aE,Sr as aF,Wr as aG,Vx as aH,Dr as aI,Dn as aJ,Jf as aK,vx as aL,_r as aM,$l as aN,si as aO,Bs as aP,Ao as aQ,Jn as aR,ii as aS,Vs as aT,Er as aU,My as aV,Kr as aW,qi as aX,ta as aY,Yi as aZ,ea as a_,ga as aa,sl as ab,Wi as ac,Hi as ad,Ar as ae,Il as af,Dl as ag,Vi as ah,Un as ai,Gi as aj,Ur as ak,Gx as al,lf as am,wo as an,qn as ao,js as ap,Ki as aq,Gl as ar,Yl as as,Kl as at,Jo as au,zo as av,wx as aw,an as ax,Jl as ay,ql as az,Nn as b,ls as b$,Ds as b0,Is as b1,Ta as b2,Zi as b3,Ts as b4,ks as b5,Ss as b6,As as b7,Es as b8,$s as b9,Vf as bA,Hf as bB,ox as bC,ix as bD,dr as bE,An as bF,Zp as bG,fa as bH,Za as bI,eu as bJ,wu as bK,ku as bL,Cu as bM,Au as bN,Du as bO,gu as bP,uu as bQ,Up as bR,Bp as bS,Mp as bT,fu as bU,hu as bV,nu as bW,$u as bX,ys as bY,cs as bZ,ss as b_,vs as ba,Ji as bb,ds as bc,na as bd,ia as be,$x as bf,Ll as bg,oc as bh,ei as bi,Pf as bj,Nf as bk,If as bl,Vl as bm,En as bn,Ly as bo,ky as bp,ju as bq,wp as br,fp as bs,Ep as bt,ay as bu,Sy as bv,nn as bw,pd as bx,dx as by,hl as bz,Io as c,fl as c$,as as c0,is as c1,tu as c2,cf as c3,ou as c4,ru as c5,Jy as c6,ms as c7,hs as c8,us as c9,Jh as cA,jo as cB,Xs as cC,yi as cD,pc as cE,_n as cF,Lc as cG,Bi as cH,lg as cI,Fr as cJ,kd as cK,qo as cL,ai as cM,jn as cN,Hs as cO,Co as cP,_d as cQ,Vr as cR,Md as cS,Fn as cT,Pn as cU,_m as cV,jr as cW,Ln as cX,Lh as cY,ep as cZ,Jg as c_,ps as ca,Ml as cb,zh as cc,Ju as cd,qc as ce,Ei as cf,rh as cg,Vm as ch,Gg as ci,Zm as cj,jm as ck,Dc as cl,Cd as cm,vg as cn,fg as co,nm as cp,ig as cq,Hg as cr,Si as cs,Us as ct,Cm as cu,om as cv,Vc as cw,Sl as cx,Xi as cy,vd as cz,tf as d,zr as d$,fi as d0,vl as d1,Ys as d2,Xd as d3,nr as d4,Xr as d5,Hr as d6,dg as d7,Nr as d8,Br as d9,Wh as dA,Yr as dB,Bg as dC,Pl as dD,Xc as dE,cl as dF,Kn as dG,El as dH,Qo as dI,Gn as dJ,ji as dK,hp as dL,Dd as dM,Lm as dN,Uo as dO,xf as dP,Wn as dQ,Yn as dR,Ad as dS,Yd as dT,Zd as dU,Qx as dV,ti as dW,pi as dX,Wl as dY,or as dZ,kh as d_,Tg as da,Al as db,Tr as dc,vr as dd,Eo as de,Cl as df,Bl as dg,yc as dh,Rn as di,Sg as dj,zl as dk,lh as dl,Rs as dm,Cr as dn,Ul as dp,Rl as dq,el as dr,wr as ds,hd as dt,Td as du,Ho as dv,_l as dw,yo as dx,yr as dy,Lg as dz,Af as e,Lf as e$,tc as e0,Ld as e1,Pr as e2,vh as e3,zs as e4,Rr as e5,Qc as e6,tn as e7,Nd as e8,Vy as e9,ca as eA,da as eB,ma as eC,xa as eD,ba as eE,ya as eF,oa as eG,ra as eH,aa as eI,Wa as eJ,Ha as eK,Ka as eL,Ns as eM,Gp as eN,Qi as eO,du as eP,zp as eQ,cu as eR,Lp as eS,lu as eT,Pp as eU,Ia as eV,Ea as eW,Na as eX,qa as eY,La as eZ,Ja as e_,_a as ea,ua as eb,Oa as ec,pa as ed,Ba as ee,Ma as ef,Ca as eg,Ra as eh,za as ei,Ga as ej,Aa as ek,vy as el,Xa as em,wa as en,sa as eo,Sa as ep,$a as eq,la as er,ka as es,ts as et,va as eu,Qa as ev,os as ew,es as ex,rs as ey,ns as ez,of as f,ap as f$,Va as f0,kf as f1,vn as f2,Do as f3,er as f4,_o as f5,tr as f6,Zo as f7,Bo as f8,Ko as f9,rn as fA,Hn as fB,Zn as fC,oi as fD,ni as fE,di as fF,ui as fG,mi as fH,gi as fI,ko as fJ,xi as fK,Ya as fL,Cs as fM,ws as fN,bs as fO,_s as fP,Fs as fQ,Ps as fR,Ls as fS,al as fT,ml as fU,ll as fV,il as fW,kl as fX,Xl as fY,Xu as fZ,Vu as f_,Fo as fa,Po as fb,Oo as fc,rr as fd,Mo as fe,hr as ff,ur as fg,pr as fh,Yo as fi,br as fj,gr as fk,Lo as fl,Ro as fm,wn as fn,$n as fo,Cn as fp,bo as fq,Ir as fr,So as fs,Mr as ft,Gr as fu,Jr as fv,Qr as fw,Zr as fx,en as fy,on as fz,Or as g,op as g0,tm as g1,$m as g2,gm as g3,Am as g4,Rm as g5,Rd as g6,og as g7,On as g8,lm as g9,vi as ga,$i as gb,wi as gc,Uf as gd,jf as ge,Tf as gf,gx as gg,Wy as gh,Jx as gi,dy as gj,fy as gk,wy as gl,xy as gm,Yf as gn,Tx as go,Vo as h,Qn as i,ny as j,Sx as k,Zx as l,Tn as m,$f as n,Xo as o,To as p,xp as q,cn as r,sn as s,$r as t,Nl as u,mf as v,jy as w,$o as x,Sp as y,Mx as z};