@odigos/ui-kit 0.0.225 → 0.0.227
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.
- package/CHANGELOG.md +28 -0
- package/lib/chunks/index-B0b5lJH3.js +3 -0
- package/lib/chunks/index-C-Z4QHpA.js +149 -0
- package/lib/chunks/ui-components-C7i9zbc-.js +2652 -0
- package/lib/components/_v2/cards/data-card/index.d.ts +16 -3
- package/lib/components/_v2/charts/gauge-chart/index.d.ts +18 -0
- package/lib/components/_v2/charts/index.d.ts +1 -0
- package/lib/components/_v2/condition/index.d.ts +13 -0
- package/lib/components/_v2/conditions/index.d.ts +8 -0
- package/lib/components/_v2/drawer/header/index.d.ts +6 -1
- package/lib/components/_v2/drop-data/index.d.ts +1 -0
- package/lib/components/_v2/icon-button/index.d.ts +1 -0
- package/lib/components/_v2/index.d.ts +3 -0
- package/lib/components/_v2/tag/index.d.ts +2 -1
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants.js +1 -1
- package/lib/containers/_v2/_drawers/add-destination-drawer/index.d.ts +1 -1
- package/lib/containers/_v2/_drawers/add-source-drawer/index.d.ts +3 -1
- package/lib/containers/_v2/_drawers/edit-action-drawer/helpers.d.ts +12 -0
- package/lib/containers/_v2/_drawers/edit-action-drawer/index.d.ts +9 -0
- package/lib/containers/_v2/_drawers/edit-destination-drawer/helpers.d.ts +11 -0
- package/lib/containers/_v2/_drawers/edit-destination-drawer/index.d.ts +11 -0
- package/lib/containers/_v2/_drawers/edit-rule-drawer/helpers.d.ts +13 -0
- package/lib/containers/_v2/_drawers/edit-rule-drawer/index.d.ts +9 -0
- package/lib/containers/_v2/_drawers/index.d.ts +3 -0
- package/lib/containers/_v2/_forms/add-action-form/index.d.ts +0 -1
- package/lib/containers/_v2/_forms/add-destination-form/index.d.ts +8 -4
- package/lib/containers/_v2/_forms/add-rule-form/index.d.ts +0 -1
- package/lib/containers/_v2/_forms/index.d.ts +0 -1
- package/lib/containers/_v2/onboarding/summary/index.d.ts +1 -1
- package/lib/containers/_v2/pipeline-collectors/enum.d.ts +4 -0
- package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-badge.d.ts +1 -1
- package/lib/containers/_v2/pipeline-collectors/general-info/helpers/get-general-gauge-cards.d.ts +4 -0
- package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-status-card.d.ts +1 -1
- package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-text-cards.d.ts +1 -1
- package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-title.d.ts +1 -1
- package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/index.d.ts +2 -1
- package/lib/containers/_v2/pipeline-collectors/general-info/index.d.ts +7 -6
- package/lib/containers/_v2/pipeline-collectors/index.d.ts +5 -0
- package/lib/containers/_v2/pipeline-collectors/toolbar/index.d.ts +1 -11
- package/lib/containers/source-drawer/profiling/flamebearer.d.ts +5 -0
- package/lib/containers/v2.js +43 -56
- package/lib/containers.js +45 -45
- package/lib/contexts/action-form-context.d.ts +19 -0
- package/lib/{containers/_v2/_forms/add-destination-form/context.d.ts → contexts/destination-form-context.d.ts} +5 -4
- package/lib/contexts/index.d.ts +4 -0
- package/lib/contexts/rule-form-context.d.ts +19 -0
- package/lib/contexts/source-instrument-form-context.d.ts +22 -0
- package/lib/contexts.js +1 -1
- package/lib/functions/get-status-color/index.d.ts +2 -2
- package/lib/functions/get-status-icon/index.d.ts +2 -2
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/snippets/_v2/yaml-section-card/index.d.ts +2 -0
- package/lib/snippets/v2.js +1 -1
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/common/index.d.ts +36 -0
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/index-BMJ_MZzY.js +0 -149
- package/lib/chunks/index-Dlnglk_e.js +0 -3
- package/lib/chunks/ui-components-BqdkaDt2.js +0 -2543
- package/lib/components/_v2/cards/section-part-card/index.d.ts +0 -11
- package/lib/containers/_v2/_forms/add-action-form/context.d.ts +0 -18
- package/lib/containers/_v2/_forms/add-rule-form/context.d.ts +0 -18
- package/lib/containers/_v2/_forms/add-source-form/context.d.ts +0 -21
- package/lib/containers/_v2/_forms/add-source-form/index.d.ts +0 -1
|
@@ -1,2543 +0,0 @@
|
|
|
1
|
-
import{SamplerIcon as e,PiiMaskingIcon as t,ActionIcon as r,RenameAttributeIcon as o,DeleteAttributeIcon as n,AddClusterInfoIcon as i,K8sLogo as a,ImageErrorIcon as s,KafkaLogo as l,RedisLogo as c,PostgresLogo as d,NginxLogo as p,MysqlLogo as u,ElixirLogo as h,SwiftLogo as m,RustLogo as g,RubyLogo as f,PhpLogo as x,CPlusPlusLogo as y,CSharpLogo as b,DotnetLogo as $,PythonLogo as v,NodejsLogo as w,GoLogo as S,JavaLogo as k,AwsXrayLogo as C,VictoriaMetricsLogo as E,UptraceLogo as A,TraceloopLogo as T,TingyunLogo as D,TempoLogo as N,TelemetryHubLogo as I,SumoLogicLogo as R,SplunkLogo as O,SignozLogo as _,SeqLogo as P,AwsS3Logo as L,QuickwitLogo as F,GigapipeLogo as z,QrynLogo as M,PrometheusLogo as B,OpenTelemetryLogo as U,OracleLogo as j,OpsVerseLogo as W,OpenObserveLogo as H,OneUptimeLogo as X,OdigosLogo as G,ObserveLogo as V,NewRelicLogo as K,MiddlewareLogo as J,LumigoLogo as q,LokiLogo as Y,LogzioLogo as Q,LightstepLogo as Z,Last9Logo as ee,KloudmateLogo as te,JaegerLogo as re,InstanaLogo as oe,HyperDxLogo as ne,HoneycombLogo as ie,GroundcoverLogo as ae,GreptimeLogo as se,GrafanaLogo as le,GoogleCloudPlatformLogo as ce,ElasticSearchLogo as de,ElasticApmLogo as pe,DynatraceLogo as ue,DatadogLogo as he,Dash0Logo as me,CoralogixLogo as ge,AwsCloudwatchLogo as fe,ClickhouseLogo as xe,ChronosphereLogo as ye,ChecklyLogo as be,CauselyLogo as $e,BonreeLogo as ve,BetterStackLogo as we,AzureMonitorLogo as Se,AzureBlobLogo as ke,AxiomLogo as Ce,AppDynamicsLogo as Ee,AlibabaCloudLogo as Ae,AlaudaLogo as Te,SamplingIcon as De,InstrumentationRuleIcon as Ne,DestinationIcon as Ie,SourceIcon as Re,NamespacesIcon as Oe,PayloadCollectionIcon as _e,HeadersCollectionIcon as Pe,CustomInstrumentationIcon as Le,CodeAttributesIcon as Fe,TracesIcon as ze,MetricsIcon as Me,LogsIcon as Be,VmLogo as Ue,QuestionCircleIcon as je,XSquareIcon as We,VSquareIcon as He,ExclamationTriangleIcon as Xe,ExclamationCircleIcon as Ge,ISquareIcon as Ve,AwsLogo as Ke,AwsSecretsManagerLogo as Je,AwsStepFunctionsLogo as qe,AwsEventBridgeLogo as Ye,AwsBedrockLogo as Qe,AwsApiGatewayLogo as Ze,AwsEc2Logo as et,AwsKinesisLogo as tt,AwsLambdaLogo as rt,AwsSnsLogo as ot,AwsSqsLogo as nt,AwsDynamoDbLogo as it,AwsStsLogo as at,VIcon as st,CopyIcon as lt,XIcon as ct,MinusIcon as dt,ListIcon as pt,CodeIcon as ut,ExtendArrowIcon as ht,PlusIcon as mt,EditIcon as gt,NoDataIcon as ft,RefreshIcon as xt,EyeClosedIcon as yt,EyeOpenIcon as bt,SearchIcon as $t,TrashIcon as vt,EditedIcon as wt,SortArrowsIcon as St,NotebookIcon as kt,DotsHorizontalIcon as Ct,ChevronUpIcon as Et,ChevronDownIcon as At,ArrowIcon as Tt,DotsVerticalIcon as Dt,DotIcon as Nt,FilterIcon as It}from"../icons.js";import{create as Rt}from"zustand";import{Fragment as Ot,useMemo as _t,useState as Pt,useEffect as Lt,useRef as Ft,useCallback as zt,useContext as Mt,createContext as Bt,forwardRef as Ut,memo as jt}from"react";import Wt from"javascript-time-ago";import{p as Ht,c as Xt,s as Gt,l as Vt}from"./vendor-C150cdxb.js";import{jsx as Kt,jsxs as Jt,Fragment as qt}from"react/jsx-runtime";import Yt,{css as Qt,useTheme as Zt,ThemeProvider as er,keyframes as tr}from"styled-components";import{Handle as rr,Position as or,ReactFlowProvider as nr,ReactFlow as ir,Controls as ar,ControlButton as sr,useReactFlow as lr}from"@xyflow/react";import cr,{createPortal as dr}from"react-dom";import{Highlight as pr,themes as ur}from"prism-react-renderer";import{ErrorBoundary as hr}from"react-error-boundary";import mr from"lottie-react";import{VList as gr}from"virtua";const fr=e=>e.charAt(0).toUpperCase()+e.slice(1),xr=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),r=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,o])=>Array.isArray(o)?[e,t(o)]:"object"==typeof o&&null!==o?[e,r(o)]:[e,o]));return Object.entries(e).reduce((e,[o,n])=>{try{const i=JSON.parse(n);Array.isArray(i)?e[o]=JSON.stringify(t(i)):e[o]="object"==typeof i&&null!==i?JSON.stringify(r(i)):n}catch(i){"object"==typeof n&&null!==n?Array.isArray(n)?e[o]=JSON.stringify(t(n)):e[o]=JSON.stringify(r(n)):e[o]=n}return e},{})};var yr;!function(e){e.SIGNALS="SIGNALS"}(yr||(yr={}));const br=(e,t,r)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[o,n,i]=e;if(o===yr.SIGNALS)switch(n){case"INCLUDES":return t?.includes(i);case"EXCLUDES":return!t?.includes(i);default:return!0}const a=r.find(e=>e.name===o||e.key===o);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}},$r=e=>JSON.parse(JSON.stringify(e)),vr=(e,t)=>t.split(".").reduce((e,t)=>e?.[t],e),wr=(e,t,r)=>{const o=t.split(".");let n=e;for(let e=0;e<o.length-1;e++)o[e]in n&&"object"==typeof n[o[e]]||(n[o[e]]={}),n=n[o[e]];n[o[o.length-1]]=r},Sr=(e,t)=>{let r=[...e];return t.monitors?.length&&(r=r.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),r},kr=(e,t)=>{let r=[...e];return t.monitors?.length&&(r=r.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),r},Cr=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[];var Er,Ar,Tr,Dr,Nr,Ir,Rr,Or,_r,Pr,Lr,Fr,zr,Mr,Br,Ur,jr,Wr,Hr,Xr,Gr,Vr,Kr,Jr,qr,Yr,Qr,Zr,eo,to,ro,oo,no,io,ao,so,lo,co,po,uo,ho,mo;!function(e){e.Attributes="attributes",e.Samplers="samplers"}(Er||(Er={})),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"}(Ar||(Ar={})),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"}(Tr||(Tr={})),function(e){e.Pod="pod",e.Namespace="namespace",e.Node="node"}(Dr||(Dr={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(Nr||(Nr={})),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"}(Ir||(Ir={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(Rr||(Rr={})),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"}(Or||(Or={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(_r||(_r={})),function(e){e.Ascending="ascending",e.Descending="descending"}(Pr||(Pr={})),function(e){e.Community="community",e.Onprem="onprem"}(Lr||(Lr={})),function(e){e.K8s="k8s",e.Vm="vm"}(Fr||(Fr={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(zr||(zr={})),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"}(Mr||(Mr={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(Br||(Br={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule",e.SamplingRule="SamplingRule"}(Ur||(Ur={})),function(e){e.DataStream="DataStream"}(jr||(jr={})),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"}(Wr||(Wr={})),function(e){e.Text="text",e.Password="password",e.Number="number"}(Hr||(Hr={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(Xr||(Xr={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(Gr||(Gr={})),function(e){e.Loading="loading",e.Disabled="disabled"}(Vr||(Vr={})),function(e){e.Disabled="disabled",e.Unknown="unknown"}(Kr||(Kr={})),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"}(Jr||(Jr={})),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"}(qr||(qr={})),function(e){e.Labeled="labeled"}(Yr||(Yr={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(Qr||(Qr={})),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"}(Zr||(Zr={})),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"}(eo||(eo={})),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"}(to||(to={})),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"}(ro||(ro={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(oo||(oo={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(no||(no={})),function(e){e.HeaderKeys="headerKeys"}(io||(io={})),function(e){e.Java="java",e.Golang="golang"}(ao||(ao={}));class go{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 fo{packageName;functionName;receiverName;receiverMethodName;constructor(e,t,r,o){this.packageName=e,this.functionName=t||"",this.receiverName=r||"",this.receiverMethodName=o||""}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"}(so||(so={})),function(e){e.Healthy="Healthy",e.Updating="Updating",e.Degraded="Degraded",e.Failed="Failed",e.Down="Down",e.Unknown="Unknown"}(lo||(lo={})),function(e){e.Pending="Pending",e.Running="Running",e.Succeeded="Succeeded",e.Failed="Failed",e.Unknown="Unknown"}(co||(co={})),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"}(po||(po={})),function(e){e.Running="Running",e.Waiting="Waiting",e.Terminated="Terminated"}(uo||(uo={})),function(e){e.Logs="LOGS",e.Metrics="METRICS",e.Traces="TRACES"}(ho||(ho={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces"}(mo||(mo={}));const xo={[ho.Logs]:mo.Logs,[ho.Metrics]:mo.Metrics,[ho.Traces]:mo.Traces},yo={[mo.Logs]:ho.Logs,[mo.Metrics]:ho.Metrics,[mo.Traces]:ho.Traces},bo=(e,t)=>{let r=e;if(t.namespaces?.length){const e=new Set(t.namespaces.map(({id:e})=>e));r=r.filter(({namespace:t})=>e.has(t))}if(t.kinds?.length){const e=new Set(t.kinds.map(({id:e})=>e));r=r.filter(({kind:t})=>e.has(t))}if(t.languages?.length){const e=new Set(t.languages.map(({id:e})=>e));r=r.filter(({containers:t})=>t?.some(t=>{const r=t.overrides?.runtimeInfo?.language??t.runtimeInfo?.language;return!!r&&e.has(r)}))}if(t.conditions?.length){const e=new Set(t.conditions.map(({id:e})=>e));r=r.filter(({conditions:t})=>t?.some(({type:t,reason:r})=>e.has(`${t}#${r}`)))}if(t.podsAgentInjectionStatus?.length){const e=new Set(t.podsAgentInjectionStatus.map(({id:e})=>e));r=r.filter(({podsAgentInjectionStatus:t})=>e.has(t?.reasonEnum)||e.has(t?.message))}if(t.onlyErrors&&(r=r.filter(e=>e.conditions?.some(e=>e.status===Xr.Error))),t.errors?.length){const e=new Set(t.errors.map(({id:e})=>e));r=r.filter(t=>t.conditions?.some(t=>e.has(t.message)))}return r},$o="https://docs.odigos.io",vo="default",wo="this-cluster",So="This Cluster",ko={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},Co={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)'},Eo={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."},Ao={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"},To=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||t===vo&&!e.dataStreamNames.length):[],Do=(e,t="",r={})=>{for(const o in e)if(e.hasOwnProperty(o)){const n=e[o],i=t?`${t}.${o}`:o;null===n||"object"!=typeof n||Array.isArray(n)?Array.isArray(n)?n.forEach((e,t)=>{const o=`${i}[${t}]`;null!==e&&"object"==typeof e?Do(e,o,r):r[o]=e}):r[i]=n:Do(n,i,r)}return r},No=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]}`},Io=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`}},Ro=()=>{const e=crypto.getRandomValues(new Uint8Array(16));let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,r=>{const o=e[t%16];t++;return("1"===r?o:"0"===r?63&o|128:15&o|64).toString(16)})},Oo=l=>{const c=l?.toLowerCase(),d=c?.includes(Er.Samplers),p=c===Er.Attributes;if(d)return e;if(p)return t;return{[Ar.K8sAttributes]:a,[Ar.AddClusterInfo]:i,[Ar.DeleteAttributes]:n,[Ar.PiiMasking]:t,[Ar.RenameAttributes]:o,[Ar.URLTemplatization]:r,[Ar.ErrorSampler]:e,[Ar.ProbabilisticSampler]:e,[Ar.LatencySampler]:e,[Ar.ServiceNameSampler]:e,[Ar.SpanAttributeSampler]:e}[l]||s},_o=e=>{const t=e?.filter(({status:e})=>e===Xr.Error),r=e?.filter(({status:e})=>e===Xr.Warning),o=e?.filter(({status:e})=>e===Vr.Disabled),n=e?.filter(({status:e})=>e===Vr.Loading),i=t.length>0,a=r.length>0,s=o.length>0;return{errors:t,hasErrors:i,warnings:r,hasWarnings:a,disableds:o,hasDisableds:s,loadings:n,hasLoadings:n.length>0,priorotizedStatus:i?Xr.Error:a?Xr.Warning:s?Xr.Info:void 0}},Po=e=>{const t=e?.reduce((e,t)=>t.agentEnabled?.agentEnabled?e+1:e,0);return`${t}/${e?.length||0} instrumented`},Lo=e=>({[Mr.Java]:k,[Mr.Go]:S,[Mr.JavaScript]:w,[Mr.Python]:v,[Mr.DotNet]:$,[Mr.CSharp]:b,[Mr.CPlusPlus]:y,[Mr.Php]:x,[Mr.Ruby]:f,[Mr.Rust]:g,[Mr.Swift]:m,[Mr.Elixir]:h,[Mr.MySql]:u,[Mr.Nginx]:p,[Mr.Postgres]:d,[Mr.Redis]:c,[Mr.Kafka]:l,[Mr.Ignored]:s,[Mr.Unknown]:s,[Mr.Processing]:s,[Mr.NoContainers]:s,[Mr.NoRunningPods]:s}[e]||s),Fo=e=>e?.map(e=>{return Lo((t=e,t.overrides?.runtimeInfo?.language??t.runtimeInfo?.language??"unknown"));var t})||[],zo=e=>e?.map(e=>Lo(e))||[],Mo=e=>e.detectedLanguages?.length?zo(e.detectedLanguages):Fo(e.containers),Bo=(e,t)=>{const r={[Zr.Alauda]:Te,[Zr.AlibabaCloud]:Ae,[Zr.AppDynamics]:Ee,[Zr.Axiom]:Ce,[Zr.AzureBlob]:ke,[Zr.AzureMonitor]:Se,[Zr.BetterStack]:we,[Zr.Bonree]:ve,[Zr.Causely]:$e,[Zr.Checkly]:be,[Zr.Chronosphere]:ye,[Zr.ClickHouse]:xe,[Zr.CloudWatch]:fe,[Zr.Coralogix]:ge,[Zr.Dash0]:me,[Zr.Datadog]:he,[Zr.Dynamic]:U,[Zr.Dynatrace]:ue,[Zr.ElasticApm]:pe,[Zr.ElasticSearch]:de,[Zr.GoogleCloud]:ce,[Zr.GoogleCloudOTLP]:ce,[Zr.GrafanaCloudLoki]:le,[Zr.GrafanaCloudPrometheus]:le,[Zr.GrafanaCloudTempo]:le,[Zr.Greptime]:se,[Zr.Groundcover]:ae,[Zr.Honeycomb]:ie,[Zr.HyperDX]:ne,[Zr.Instana]:oe,[Zr.Jaeger]:re,[Zr.Kafka]:l,[Zr.Kloudmate]:te,[Zr.Last9]:ee,[Zr.Lightstep]:Z,[Zr.LogzIo]:Q,[Zr.Loki]:Y,[Zr.Lumigo]:q,[Zr.Middleware]:J,[Zr.NewRelic]:K,[Zr.Observe]:V,[Zr.Odigos]:G,[Zr.OneUptime]:X,[Zr.OpenObserve]:H,[Zr.Opsverse]:W,[Zr.Oracle]:j,[Zr.OTLP]:U,[Zr.OTLPHttp]:U,[Zr.Prometheus]:B,[Zr.Qryn]:M,[Zr.QrynOss]:z,[Zr.Quickwit]:F,[Zr.S3]:L,[Zr.Seq]:P,[Zr.Signalfx]:O,[Zr.Signoz]:_,[Zr.Splunk]:O,[Zr.SplunkSapm]:O,[Zr.SplunkOtlp]:O,[Zr.SumoLogic]:R,[Zr.TelemetryHub]:I,[Zr.Tempo]:N,[Zr.Tingyun]:D,[Zr.Traceloop]:T,[Zr.Uptrace]:A,[Zr.VictoriaMetrics]:E,[Zr.VictoriaMetricsCloud]:E,[Zr.XRay]:C}[e];return r&&!t?{icon:r}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},Uo=e=>({[Ur.Namespace]:Oe,[Ur.Source]:Re,[Ur.Destination]:Ie,[Ur.Action]:r,[Ur.InstrumentationRule]:Ne,[Ur.SamplingRule]:De}[e]),jo=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,Wo=e=>e?"string"==typeof e?e:`${e.namespace}/${e.kind}/${e.name}`:"",Ho=e=>Wo(jo(e)),Xo=(e,t,r)=>{const{extended:o,prioritizeDisplayName:n}=r||{};let i="",a="";switch(t){case Ur.InstrumentationRule:const t=e;i=t.type,a=t.ruleName;break;case Ur.Source:const r=e;i=r.name,a=r.otelServiceName;break;case Ur.Action:const o=e;i=o.type,a=o.name;break;case Ur.Destination:const n=e;i=n.destinationType.displayName,a=n.name;break;case Ur.Namespace:const s=e;i=s.name,a=s.name}return o?i+(a&&a!==i?` (${a})`:""):n&&a||i},Go=(e,t)=>{if(t===Ur.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[r,o]=e.split("=");t[r]=o}),t}return e},Vo=e=>({[oo.CodeAttributes]:Fe,[oo.CustomInstrumentation]:Le,[oo.HeadersCollection]:Pe,[oo.PayloadCollection]:_e,[oo.UnknownType]:s}[e]||s),Ko=e=>e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??Mr.Unknown,Jo=e=>{const{numberOfInstances:t,containers:r}=e;if(!r)return t&&t>0?Mr.Processing:Mr.NoRunningPods;const o=r?.filter(e=>Ko(e)!==Mr.Ignored);if(!o.length)return Mr.NoContainers;const n=o.find(e=>Ko(e)!==Mr.Unknown);return n?Ko(n):Mr.Unknown},qo=(e,t,r)=>(t===Ur.Source?e?.sources.find(e=>e.kind===r.kind&&e.name===r.name&&e.namespace===r.namespace):e?.destinations.find(e=>e.id===r))||{throughput:0},Yo=e=>({[ho.Logs]:Be,[ho.Metrics]:Me,[ho.Traces]:ze}[e]),Qo=e=>{if(!e)return G;return{[Fr.K8s]:a,[Fr.Vm]:Ue}[e]},Zo=e=>{if(!e)return"Unknown";return{[Fr.K8s]:"Kubernetes Cluster",[Fr.Vm]:"Virtual Machine"}[e]},en=(e,t,r)=>{const o=e[t];return o?o.flatMap(e=>{const o=e[r],n=[];return void 0!==o&&(Array.isArray(o)?n.push(...o):n.push(o)),n.push(...en(e,t,r)),n}):[]},tn=(e,t)=>{if(t===Ur.Source){let t="";return Object.entries(e).forEach(([e,r])=>{t+=`${e}=${r}&`}),t.slice(0,-1),t}return e},rn=(e,t,r)=>{switch(t){case Xr.Default:return e.v2.colors.purple[r];case Xr.Info:return e.v2.colors.blue[r];case Xr.Error:return e.v2.colors.red[r];case Xr.Warning:return e.v2.colors.yellow[r];case Xr.Success:return e.v2.colors.green[r];case Kr.Disabled:case Kr.Unknown:return e.v2.colors.silver[r];default:return e.v2.colors.white[500]}},on=e=>{switch(e){case lo.Updating:case co.Pending:case po.ContainerCreating:case uo.Waiting:return Xr.Info;case lo.Healthy:case co.Succeeded:case co.Running:case po.Running:case uo.Running:return Xr.Success;case lo.Degraded:return Xr.Warning;case lo.Failed:case co.Failed:case po.Error:case po.CrashLoopBackOff:case po.CreateContainerError:case po.CreateContainerConfigError:case po.ErrImagePull:case po.ErrImageNeverPull:case po.ImagePullBackOff:case po.InvalidImageName:case po.RegistryUnavailable:case po.NetworkNotReady:case po.OOMKilled:case po.ContainerCannotRun:case uo.Terminated:case po.DeadlineExceeded:case po.StartError:return Xr.Error;case lo.Down:case po.Completed:return Kr.Disabled;case lo.Unknown:case co.Unknown:default:return Kr.Unknown}},nn=(e,t)=>{const r={[Xr.Default]:r=>G({fill:rn(t,e,"300"),...r}),[Xr.Info]:r=>Ve({fill:rn(t,e,"400"),...r}),[Xr.Error]:r=>Ge({fill:rn(t,e,"500"),...r}),[Xr.Warning]:r=>Xe({fill:rn(t,e,"500"),...r}),[Xr.Success]:r=>He({fill:rn(t,e,"500"),...r}),[Kr.Disabled]:r=>We({fill:rn(t,e,"400"),...r}),[Kr.Unknown]:r=>je({fill:rn(t,e,"300"),...r})};return r[e]},an=e=>{switch(e){case ro.Success:return Xr.Success;case ro.Error:case ro.Failure:return Xr.Error;case ro.Notice:return Xr.Warning;case ro.Unsupported:case ro.Unknown:return Xr.Info;case ro.Irrelevant:case ro.Disabled:return Vr.Disabled;case ro.Waiting:return Vr.Loading;case ro.Pending:default:return Xr.Default}},sn=(e,t)=>{const r=t.find(([t,r])=>e>=t&&(null===r||e<=r));return r?.[2]||null},ln={redis:c,mysql:u,postgresql:d,postgres:d,kafka:l,elasticsearch:de,clickhouse:xe,oracle:j,aws:Ke},cn={sts:at,dynamodb:it,s3:L,sqs:nt,sns:ot,lambda:rt,kinesis:tt,ec2:et,apigateway:Ze,apigatewayv2:Ze,bedrock:Qe,bedrockruntime:Qe,eventbridge:Ye,sfn:qe,stepfunctions:qe,secretsmanager:Je,cloudwatch:fe},dn=e=>{const t=e.attributes,r=t["db.system"];if(r){const e=ln[r.toLowerCase()];if(e)return e}const o=t["messaging.system"];if(o){const e=ln[o.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=cn[e];if(t)return t}return Ke}const i=e.serviceName.toLowerCase();for(const[e,t]of Object.entries(ln))if(i.includes(e))return t;return Ie},pn=({namespace:e,name:t,kind:r})=>({namespace:e,name:t,kind:r});function un(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const hn=(e,t)=>{const r=[],o=JSON.parse(JSON.stringify(e));for(const e of o){const o=un(t.fields,{}),n=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==n&&r.push(...e.items[n].fields.map(e=>({...e,initialValue:o[e.name]})))}return r},mn=(e,t)=>{const r=e=>e?.some(({healthy:e})=>e.status!==Xr.Success);return e?.length?e.some(({instrumentationInstances:e})=>r(e)):r(t)??!1},gn=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),fn=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)},xn=(e,t=0)=>{const r=(new Date).getTime();return new Date(e).getTime()-r<=t},yn=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},bn=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,$n=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,vn=e=>$n.test(e),wn=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",Sn=e=>e?.map(({status:e,type:t,reason:r,message:o})=>({status:e?.toLowerCase(),type:wn(t),reason:r?wn(r):"",message:o}))||[],kn=(e,t)=>{const r=un(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:r[e.name]??null})).filter(e=>null!==e.value):Object.entries(r).map(([e,t])=>({key:e,name:e,value:t}))},Cn=e=>e?Object.keys(e).filter(t=>e[t]).map(e=>yo[e]):[],En=e=>e?Object.keys(e).filter(t=>e[t].supported).map(e=>yo[e]):[],An=e=>e.replace(/[^\d]/g,""),Tn=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},Dn=e=>{let t="";try{const r=JSON.parse(e);t=Array.isArray(r)?r.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(r){t=e}return t},Nn=e=>{const t=e.fields.reduce((e,{key:t,value:r})=>{const o=(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}}})(r);return void 0!==o&&e.push({key:t,value:o}),e},[]);return{...e,fields:t}},In=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(r=>{const o=e[r];if(Array.isArray(o)){const e=o.filter(e=>null!=e&&""!==e);e.length>0&&(t[r]=e.map(e=>In(e)))}else if("object"==typeof o&&null!==o){const e=In(o);Object.keys(e).length>0&&(t[r]=e)}else[void 0,null,""].includes(o)||(t[r]=o)}),t},Rn=(e,t=2)=>JSON.stringify(e||{},null,t),On=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),_n=e=>Object.entries(e).reduce((e,[t,r])=>(e[t]="string"==typeof r?r:JSON.stringify(r),e),{}),Pn=e=>{let t=e.toString().replace("v","").split("-")[0];t=t.match(/[\d.]+/)?.[0]||"";const r=t.split(".");return 1e4*parseInt(r[0]||"0",10)+parseInt(r[1]||"0",10)},Ln=Yt.div`
|
|
2
|
-
flex: 1;
|
|
3
|
-
align-self: stretch;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
gap: ${({$gap:e=24})=>e}px;
|
|
7
|
-
overflow-x: scroll;
|
|
8
|
-
|
|
9
|
-
max-height: calc(100vh - 24px - ${({$heightOffset:e})=>e||0}px);
|
|
10
|
-
padding: 24px 24px 0 24px;
|
|
11
|
-
`,Fn=Yt.div`
|
|
12
|
-
position: relative;
|
|
13
|
-
|
|
14
|
-
// inherit all the properties of the parent (PageContent)
|
|
15
|
-
flex: inherit;
|
|
16
|
-
align-self: inherit;
|
|
17
|
-
display: inherit;
|
|
18
|
-
flex-direction: inherit;
|
|
19
|
-
gap: inherit;
|
|
20
|
-
overflow-x: inherit;
|
|
21
|
-
`,zn=Yt.div`
|
|
22
|
-
padding: ${({$padding:e})=>e||"12px"};
|
|
23
|
-
`,Mn=Yt.div`
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: row;
|
|
26
|
-
flex-wrap: ${({$wrap:e="unset"})=>e};
|
|
27
|
-
align-items: ${({$alignItems:e="center"})=>e};
|
|
28
|
-
justify-content: ${({$justifyContent:e="unset"})=>e};
|
|
29
|
-
gap: ${({$gap:e=2})=>e}px;
|
|
30
|
-
width: ${({$width:e})=>e||"unset"};
|
|
31
|
-
height: ${({$height:e})=>e||"unset"};
|
|
32
|
-
margin: ${({$margin:e="unset"})=>e};
|
|
33
|
-
padding: ${({$padding:e="unset"})=>e};
|
|
34
|
-
`,Bn=Yt.div`
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
flex-wrap: ${({$wrap:e="unset"})=>e};
|
|
38
|
-
align-items: ${({$alignItems:e="unset"})=>e};
|
|
39
|
-
justify-content: ${({$justifyContent:e="unset"})=>e};
|
|
40
|
-
gap: ${({$gap:e=2})=>e}px;
|
|
41
|
-
width: ${({$width:e})=>e||"unset"};
|
|
42
|
-
height: ${({$height:e})=>e||"unset"};
|
|
43
|
-
margin: ${({$margin:e="unset"})=>e};
|
|
44
|
-
padding: ${({$padding:e="unset"})=>e};
|
|
45
|
-
`,Un=Yt(Bn)`
|
|
46
|
-
width: ${({$width:e})=>e||"100%"};
|
|
47
|
-
height: ${({$height:e})=>e||"unset"};
|
|
48
|
-
padding: ${({$padding:e})=>e||"unset"};
|
|
49
|
-
align-items: center;
|
|
50
|
-
justify-content: center;
|
|
51
|
-
`,jn=Yt.div`
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
padding: 12px;
|
|
55
|
-
overflow-y: scroll;
|
|
56
|
-
`,Wn=Yt.div`
|
|
57
|
-
position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
|
|
58
|
-
top: 0;
|
|
59
|
-
left: 0;
|
|
60
|
-
right: 0;
|
|
61
|
-
bottom: 0;
|
|
62
|
-
z-index: 1000;
|
|
63
|
-
background: rgba(0, 0, 0, 0.6);
|
|
64
|
-
backdrop-filter: blur(2px);
|
|
65
|
-
`,Hn=Yt.div`
|
|
66
|
-
width: 800px;
|
|
67
|
-
min-height: ${({$minHeight:e})=>e||"unset"};
|
|
68
|
-
height: ${({$isNotModal:e})=>e?"fit-content":"calc(100vh - 350px)"};
|
|
69
|
-
margin: ${({$isNotModal:e})=>e?"64px 0 0 0":"64px 7vw 32px 7vw"};
|
|
70
|
-
padding: 0 2px;
|
|
71
|
-
overflow-y: scroll;
|
|
72
|
-
`,Xn=Yt(Bn)`
|
|
73
|
-
max-width: ${({$maxWidth:e})=>e||"unset"};
|
|
74
|
-
width: 100%;
|
|
75
|
-
`,Gn=Yt(Mn)`
|
|
76
|
-
gap: 16px;
|
|
77
|
-
padding: 16px;
|
|
78
|
-
`,Vn=Yt.div`
|
|
79
|
-
width: 100%;
|
|
80
|
-
max-height: ${({$maxHeight:e})=>e||"unset"};
|
|
81
|
-
overflow-y: auto;
|
|
82
|
-
`;var Kn,Jn;!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"}(Kn||(Kn={})),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"}(Jn||(Jn={}));const qn=Yt.p`
|
|
83
|
-
margin: 0;
|
|
84
|
-
color: ${({$color:e,theme:t})=>e||t.v2.colors.grey[50]};
|
|
85
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
86
|
-
font-size: ${({theme:e,$size:t})=>e.v2.text.size[t]}px;
|
|
87
|
-
font-weight: ${({$weight:e})=>e};
|
|
88
|
-
text-align: ${({$align:e})=>e};
|
|
89
|
-
text-transform: ${({$transform:e})=>e};
|
|
90
|
-
line-height: ${({theme:e,$lineHeight:t,$size:r})=>t||`${e.v2.text.size[r]+2}px`};
|
|
91
|
-
opacity: ${({$opacity:e})=>e};
|
|
92
|
-
|
|
93
|
-
${({$nowrap:e})=>e&&Qt`
|
|
94
|
-
text-wrap: nowrap;
|
|
95
|
-
white-space: nowrap;
|
|
96
|
-
overflow: hidden;
|
|
97
|
-
text-overflow: ellipsis;
|
|
98
|
-
`}
|
|
99
|
-
|
|
100
|
-
${({$underline:e})=>e&&Qt`
|
|
101
|
-
text-decoration: underline;
|
|
102
|
-
`}
|
|
103
|
-
|
|
104
|
-
${({$withClick:e})=>e&&Qt`
|
|
105
|
-
cursor: pointer;
|
|
106
|
-
&:hover {
|
|
107
|
-
text-decoration: underline;
|
|
108
|
-
}
|
|
109
|
-
`}
|
|
110
|
-
`,Yn=({children:e,variant:t=Kn.P,color:r,size:o=Jn.S,weight:n=400,opacity:i=1,align:a="left",lineHeight:s,transform:l,nowrap:c,underline:d,onClick:p,disabled:u,...h})=>{const m=e?.toString().split("\n")||[];return Kt(qn,{as:t,$color:r,$size:o,$weight:n,$opacity:i,$align:a,$lineHeight:s,$transform:l,$nowrap:c,$underline:d,$withClick:!!p&&!u,onClick:u?void 0:p,...h,children:m.map((e,t)=>Jt(Ot,{children:[e,t!==m.length-1&&Kt("br",{})]},`typography-${t}-${e}`))})},Qn=Yt.div`
|
|
111
|
-
color: ${({$color:e,theme:t})=>e||t.text.secondary};
|
|
112
|
-
font-size: ${({$size:e})=>void 0!==e?e:16}px;
|
|
113
|
-
font-weight: ${({$weight:e})=>void 0!==e?e:300};
|
|
114
|
-
text-align: ${({$align:e})=>e||"left"};
|
|
115
|
-
opacity: ${({$opacity:e})=>void 0!==e?e:1};
|
|
116
|
-
text-decoration: ${({$decoration:e})=>e||"none"};
|
|
117
|
-
text-transform: ${({$transform:e,$family:t})=>e||("secondary"===t?"uppercase":"none")};
|
|
118
|
-
font-family: ${({theme:e,$family:t="primary"})=>e.font_family[t]};
|
|
119
|
-
white-space: ${({$nowrap:e})=>e?"nowrap":"unset"};
|
|
120
|
-
text-wrap: ${({$nowrap:e})=>e?"nowrap":"unset"};
|
|
121
|
-
`,Zn=e=>{const t=e.match(/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/g);return t?.map(e=>{const[t,r,o]=e.split('"');return{original:e,href:r,label:o.replace("</a>","").replace(">","")}})},ei=e=>{const t=e.match(/<strong[^>]*>(.*?)<\/strong>/g);return t?.map(e=>{const t=e.replace(/<strong[^>]*>/,"").replace(/<\/strong>/,"");return{original:e,label:t}})},ti=(e,t)=>{const r=Zn(e);r?.forEach((t,r)=>{e=e.replace(t.original,`LINK-${r}###`)});const o=ei(e);o?.forEach((t,r)=>{e=e.replace(t.original,`STRONG-${r}###`)});return e.split(" ").map(e=>{if(e.includes("LINK-")){const[o,n]=e.split("###"),i=r?.[parseInt(o.replace("LINK-",""))];return Jt(Ot,{children:[Kt("a",{href:i?.href,target:"_blank",rel:"noreferrer",style:{color:t.colors.majestic_blue_soft},children:i?.label}),n?`${n} `:" "]},e)}if(e.includes("STRONG-")){const[t,r]=e.split("###"),n=o?.[parseInt(t.replace("STRONG-",""))];return Jt(Ot,{children:[Kt("strong",{style:{fontWeight:600},children:n?.label}),r?`${r} `:" "]},e)}return e+" "})},ri=({children:e,color:t,size:r,weight:o,align:n,family:i,opacity:a,decoration:s,transform:l,nowrap:c,...d})=>{const p=Zt(),u=_t(()=>(e?["string","number"].includes(typeof e)?e.toString():Array.isArray(e)?e.map(e=>"object"==typeof e&&Object.hasOwn(e,"props")?e.props.children:e).filter(e=>e&&["string","number"].includes(typeof e)).join(" "):"":"").split("\n"),[e]);return Kt(Qn,{$color:t,$size:r,$weight:o,$align:n,$family:i,$opacity:a,$decoration:s,$transform:l,$nowrap:c,...d,children:u.length?u.map((e,t)=>Jt(Ot,{children:[ti(e,p),t!==u.length-1?Kt("br",{}):null]},`text-${t}-${e}`)):e})},oi=Yt.div`
|
|
122
|
-
padding: 4px 0 0 0;
|
|
123
|
-
`,ni=Yt(ri)`
|
|
124
|
-
font-size: 12px;
|
|
125
|
-
color: ${({theme:e})=>e.text.error};
|
|
126
|
-
`,ii=({children:e})=>Kt(oi,{children:Kt(ni,{children:e})}),ai=Yt.div`
|
|
127
|
-
position: relative;
|
|
128
|
-
width: 100%;
|
|
129
|
-
`,si=Yt.div`
|
|
130
|
-
width: calc(100% - 16px);
|
|
131
|
-
display: flex;
|
|
132
|
-
align-items: center;
|
|
133
|
-
height: 36px;
|
|
134
|
-
gap: 8px;
|
|
135
|
-
padding-left: 12px;
|
|
136
|
-
transition: border-color 0.3s;
|
|
137
|
-
border-radius: 32px;
|
|
138
|
-
border: 1px solid ${({theme:e,$hasError:t})=>t?e.text.error:e.colors.border};
|
|
139
|
-
|
|
140
|
-
&:hover {
|
|
141
|
-
border-color: ${({theme:e,$hasError:t})=>t?e.text.error_secondary:e.colors.secondary};
|
|
142
|
-
}
|
|
143
|
-
&:focus-within {
|
|
144
|
-
border-color: ${({theme:e,$hasError:t})=>t?e.text.error_secondary:e.colors.secondary};
|
|
145
|
-
}
|
|
146
|
-
`,li=Yt.input`
|
|
147
|
-
flex: 1;
|
|
148
|
-
border: none;
|
|
149
|
-
outline: none;
|
|
150
|
-
background: none;
|
|
151
|
-
color: ${({theme:e})=>e.text.secondary};
|
|
152
|
-
font-size: 14px;
|
|
153
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
154
|
-
font-weight: 300;
|
|
155
|
-
&::placeholder {
|
|
156
|
-
color: ${({theme:e})=>e.text.secondary};
|
|
157
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
158
|
-
opacity: 0.4;
|
|
159
|
-
font-size: 14px;
|
|
160
|
-
font-weight: 300;
|
|
161
|
-
line-height: 22px;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
&:disabled {
|
|
165
|
-
cursor: not-allowed;
|
|
166
|
-
}
|
|
167
|
-
`,ci=Yt.ul`
|
|
168
|
-
position: absolute;
|
|
169
|
-
max-height: 500px;
|
|
170
|
-
top: 32px;
|
|
171
|
-
border-radius: 24px;
|
|
172
|
-
width: calc(100% - 32px);
|
|
173
|
-
overflow-y: auto;
|
|
174
|
-
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
175
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
176
|
-
z-index: 9999;
|
|
177
|
-
padding: 12px;
|
|
178
|
-
`,di=Yt.li`
|
|
179
|
-
width: calc(100% - 24px);
|
|
180
|
-
padding: 8px 12px;
|
|
181
|
-
cursor: ${({$isList:e})=>e?"default":"pointer"};
|
|
182
|
-
border-radius: 24px;
|
|
183
|
-
gap: 8px;
|
|
184
|
-
display: flex;
|
|
185
|
-
align-items: ${({$isList:e})=>e?"flex-start":"center"};
|
|
186
|
-
background: transparent;
|
|
187
|
-
&:hover {
|
|
188
|
-
background: ${({theme:e,$isList:t})=>!t&&e.colors.dropdown_bg_2};
|
|
189
|
-
}
|
|
190
|
-
`,pi=Yt.div`
|
|
191
|
-
width: 100%;
|
|
192
|
-
`,ui=Yt.div`
|
|
193
|
-
display: flex;
|
|
194
|
-
width: 100%;
|
|
195
|
-
`,hi=Yt.div`
|
|
196
|
-
width: 1px;
|
|
197
|
-
height: 52px;
|
|
198
|
-
background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
199
|
-
position: absolute;
|
|
200
|
-
left: 33px;
|
|
201
|
-
`,mi=Yt.div`
|
|
202
|
-
display: flex;
|
|
203
|
-
flex-direction: column;
|
|
204
|
-
gap: 4px;
|
|
205
|
-
`,gi=Yt(ri)`
|
|
206
|
-
flex: 1;
|
|
207
|
-
font-size: 14px;
|
|
208
|
-
`,fi=Yt(ri)`
|
|
209
|
-
color: ${({theme:e})=>e.text.grey};
|
|
210
|
-
font-size: 10px;
|
|
211
|
-
line-height: 150%;
|
|
212
|
-
`,xi=Yt.ul`
|
|
213
|
-
padding-left: 0px;
|
|
214
|
-
margin: 4px 0 0 0;
|
|
215
|
-
list-style: none;
|
|
216
|
-
width: 100%;
|
|
217
|
-
`,yi=(e,t)=>t?e.reduce((e,r)=>{if(r.items){const o=yi(r.items,t);o.length&&e.push({...r,items:o})}else r.label.toLowerCase().includes(t.toLowerCase())&&e.push(r);return e},[]):e,bi=({placeholder:e="Type to search...",options:t,selectedOption:r,onOptionSelect:o,defaultText:n,onTextChange:i,style:a,disabled:s,errorMessage:l,...c})=>{const[d,p]=Pt(r?.label||n||""),[u,h]=Pt(yi(t,d)),[m,g]=Pt(!1);Pt(-1),Lt(()=>h(yi(t,d)),[t]);const f=r?.icon,x=e=>{e&&(p(e.label),i?.(e.label)),g(!e),o?.(e)};return Jt(ai,{style:a,children:[Jt(si,{$hasError:!!l,children:[f&&Kt(f,{}),Kt(li,{type:"text",value:d,placeholder:e,onChange:e=>{e.stopPropagation();const r=e.target.value,o=yi(t,r),n=1===o.length&&o[0].label===r?o[0]:void 0;p(r),i?.(r),h(o),x(n)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:s,onBlur:()=>!s&&g(!1),onFocus:()=>!s&&g(!0),...c})]}),m&&u.length?Kt(ci,{children:u.map(e=>Kt($i,{option:e,onClick:x},e.type||e.label))}):null,l&&Kt(ii,{children:l})]})},$i=({option:e,renderIcon:t=!0,onClick:r})=>{const o=!!e.items&&e.items.length>0,n=e.icon;return Jt(di,{"data-id":`option-${e.type||e.label}`,$isList:o,onMouseDown:()=>o?null:r(e),children:[n&&t&&Kt(n,{}),Jt(pi,{children:[Jt(mi,{children:[Kt(gi,{children:e.label}),Kt(fi,{children:e.description})]}),o&&Kt(xi,{children:e.items?.map(e=>Jt(ui,{children:[Kt(hi,{}),Kt($i,{option:e,renderIcon:!1,onClick:r})]},e.type||e.label))})]})]})},vi=Rt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})})),wi=[{type:Ar.K8sAttributes,icon:Oo(Ar.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[ho.Traces,ho.Metrics,ho.Logs],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:Ar.AddClusterInfo,icon:Oo(Ar.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[ho.Traces,ho.Metrics,ho.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:Ar.DeleteAttributes,icon:Oo(Ar.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[ho.Traces,ho.Metrics,ho.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:Ar.RenameAttributes,icon:Oo(Ar.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[ho.Traces,ho.Metrics,ho.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:Ar.PiiMasking,icon:Oo(Ar.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[ho.Traces],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."},{type:Ar.URLTemplatization,icon:Oo(Ar.URLTemplatization),label:"URL Templatization",description:"Replace dynamic URL path segments with named placeholders to reduce span cardinality.",allowedSignals:[ho.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:Pn("v1.21.0")}],Si=[{type:Ar.ErrorSampler,icon:Oo(Er.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[ho.Traces],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:Ar.LatencySampler,icon:Oo(Er.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[ho.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:Ar.ProbabilisticSampler,icon:Oo(Er.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[ho.Traces],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:Ar.ServiceNameSampler,icon:Oo(Er.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[ho.Traces],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:Ar.SpanAttributeSampler,icon:Oo(Er.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[ho.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."}],ki=[{label:"Attributes",icon:Oo(Er.Attributes),items:wi},{label:"Samplers",icon:Oo(Er.Samplers),items:Si}];var Ci;!function(e){e.ALL="all",e.UNSAVED="unsaved",e.EXISTS="exists",e.DETECTED="detected",e.SELF_HOSTED="self-hosted",e.MANAGED="managed"}(Ci||(Ci={}));const Ei={[Ci.ALL]:{TITLE:"All",DESCRIPTION:"All destinations"},[Ci.UNSAVED]:{TITLE:"Selected",DESCRIPTION:"These are destinations that you have not yet saved."},[Ci.EXISTS]:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},[Ci.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."},[Ci.SELF_HOSTED]:{TITLE:"Self hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."},[Ci.MANAGED]:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."}},Ai=[{type:oo.CodeAttributes,icon:Vo(oo.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:[Mr.Go,Mr.Python]},{type:oo.CustomInstrumentation,icon:Vo(oo.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:[Mr.Go,Mr.Java]},{type:oo.HeadersCollection,icon:Vo(oo.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:[Mr.Go,Mr.Java,Mr.JavaScript]},{type:oo.PayloadCollection,icon:Vo(oo.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:[Mr.Go,Mr.JavaScript]}],Ti="Cancel",Di="Save",Ni="Edit rule",Ii="Edit auto rule",Ri="Create rule",Oi="Delete rule",_i="Save",Pi="Rule name",Li="Rule type",Fi="Rule Enabled",zi="Rule Disabled",Mi="Note",Bi="HTTP route",Ui="Method",ji="Keep Percentage",Wi="Drop Percentage",Hi="Keep traces with duration larger than",Xi="Keep traces with errors",Gi="Keep at least this percentage of matching traces",Vi="Keep at most this percentage of matching traces",Ki="Custom percentage",Ji="Disabled rule",qi="Sample",Yi="Keep all",Qi="Drop all",Zi="Operation type",ea="HTTP route prefix",ta="Templated path",ra="Templated path prefix",oa="Kafka topic",na="Custom duration (ms)",ia="No preview available",aa="Server address",sa="Drop at most this percentage of matching traces",la="Unnamed rule",ca="Sampling Preview",da="Source Scope",pa="Operation",ua="Duration",ha="Errors",ma="Keep Percentage",ga="Drop Percentage",fa="Define which sources this rule applies to. You can target specific services, namespaces, or apply the rule to the entire cluster.",xa="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.",ya="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.",$a="Specify the exact percentage of matching traces to keep",va="Specify the exact percentage of matching traces to drop",wa="Type rule name",Sa="Add note here...",ka="Type here",Ca="Search source name",Ea="e.g. collector.my.vendor.com",Aa="Optional notes (not used by the system). Add any context or details for this sampling rule.",Ta="Rule will apply to all sources in the cluster",Da="If multiple source scopes are set, they must all match simultaneously.",Na="All sources",Ia="-",Ra="All",Oa="All operations",_a="HTTP server endpoint",Pa="HTTP client endpoint",La="Kafka consumer",Fa="Kafka producer",za="Sampling Rules",Ma='Control how traces are categorized based on "Importance" and potential value, for fine grain control of what is kept and what is dropped.',Ba="Refresh",Ua="Create rule",ja="Sampling docs",Wa="75vw",Ha="Delete rule?",Xa="Are you sure you want to delete this sampling rule?",Ga="Delete",Va="Cancel",Ka="Kubernetes Health Probes",Ja="Keep All Error Traces",qa="Drop Traces Cluster-Wide",Ya="A rule with the same matching conditions already exists.",Qa="Create 'Noisy Operation Kubernetes Health Probes' rule",Za="Edit 'Noisy Operation Kubernetes Health Probes' rule",es="Automatically detect and sample health probe traces across the cluster.",ts="Create 'Highly Relevant Operations' rule",rs="Edit 'Highly Relevant Operations' rule",os="Automatically keep all error traces across the entire cluster.",ns="Create 'Cost Reduction' rule",is="Edit 'Cost Reduction' rule",as="Automatically drop a percentage of traces across the entire cluster.",ss={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."},ls={noisy:Qa,highlyRelevant:ts,costReduction:ns},cs={noisy:Za,highlyRelevant:rs,costReduction:is},ds={noisy:"Noisy Operation",highlyRelevant:"Highly Relevant",costReduction:"Cost Reduction"},ps=[{id:ho.Logs,value:"Logs"},{id:ho.Metrics,value:"Metrics"},{id:ho.Traces,value:"Traces"}],us={[Mr.Go]:"Go",[Mr.Java]:"Java",[Mr.JavaScript]:"Node.js",[Mr.Python]:"Python",[Mr.DotNet]:".NET",[Mr.CSharp]:"C#",[Mr.CPlusPlus]:"C++",[Mr.Php]:"PHP",[Mr.Ruby]:"Ruby",[Mr.Rust]:"Rust",[Mr.Swift]:"Swift",[Mr.Elixir]:"Elixir",[Mr.MySql]:"MySQL",[Mr.Nginx]:"Nginx",[Mr.Postgres]:"PostgreSQL",[Mr.Redis]:"Redis",[Mr.Kafka]:"Kafka",[Mr.Ignored]:"Ignored",[Mr.Unknown]:"Unknown",[Mr.Processing]:"Processing",[Mr.NoContainers]:"No Containers",[Mr.NoRunningPods]:"No Running Pods"},hs=[{id:Mr.Go,value:us[Mr.Go],icon:Lo(Mr.Go)},{id:Mr.Java,value:us[Mr.Java],icon:Lo(Mr.Java)},{id:Mr.JavaScript,value:us[Mr.JavaScript],icon:Lo(Mr.JavaScript)},{id:Mr.Python,value:us[Mr.Python],icon:Lo(Mr.Python)},{id:Mr.Php,value:us[Mr.Php],icon:Lo(Mr.Php)},{id:Mr.Ruby,value:us[Mr.Ruby],icon:Lo(Mr.Ruby)},{id:Mr.Rust,value:us[Mr.Rust],icon:Lo(Mr.Rust)},{id:Mr.DotNet,value:us[Mr.DotNet],icon:Lo(Mr.DotNet)},{id:Mr.CSharp,value:us[Mr.CSharp],icon:Lo(Mr.CSharp)},{id:Mr.CPlusPlus,value:us[Mr.CPlusPlus],icon:Lo(Mr.CPlusPlus)},{id:Mr.Swift,value:us[Mr.Swift],icon:Lo(Mr.Swift)},{id:Mr.Elixir,value:us[Mr.Elixir],icon:Lo(Mr.Elixir)}],ms={id:to.OpentelemetryEbpfInstrumentation,value:to.OpentelemetryEbpfInstrumentation,icon:U},gs={[Mr.Go]:{community:[{id:to.GolangCommunity,value:to.GolangCommunity,icon:Lo(Mr.Go)},ms],enterprise:[{id:to.GolangEnterprise,value:to.GolangEnterprise,icon:Lo(Mr.Go)}]},[Mr.JavaScript]:{community:[{id:to.NodejsCommunity,value:to.NodejsCommunity,icon:Lo(Mr.JavaScript)},ms],enterprise:[{id:to.NodejsEnterprise,value:to.NodejsEnterprise,icon:Lo(Mr.JavaScript)}]},[Mr.Python]:{community:[{id:to.PythonCommunity,value:to.PythonCommunity,icon:Lo(Mr.Python)},ms],enterprise:[{id:to.PythonEnterprise,value:to.PythonEnterprise,icon:Lo(Mr.Python)}]},[Mr.Java]:{community:[{id:to.JavaCommunity,value:to.JavaCommunity,icon:Lo(Mr.Java)},ms],enterprise:[{id:to.JavaEnterprise,value:to.JavaEnterprise,icon:Lo(Mr.Java)},{id:to.JavaEbpfInstrumentations,value:to.JavaEbpfInstrumentations,icon:Lo(Mr.Java)}]},[Mr.DotNet]:{community:[{id:to.DotNetCommunity,value:to.DotNetCommunity,icon:Lo(Mr.DotNet)},ms],enterprise:[{id:to.DotNetEnterprise,value:to.DotNetEnterprise,icon:Lo(Mr.DotNet)}]},[Mr.Ruby]:{community:[{id:to.RubyCommunity,value:to.RubyCommunity,icon:Lo(Mr.Ruby)},ms],enterprise:[{id:to.RubyEnterprise,value:to.RubyEnterprise,icon:Lo(Mr.Ruby)}]},[Mr.Php]:{community:[{id:to.PhpCommunity,value:to.PhpCommunity,icon:Lo(Mr.Php)},ms],enterprise:[]},[Mr.CSharp]:{community:[],enterprise:[{id:to.CPlusPlusEnterprise,value:to.CPlusPlusEnterprise,icon:Lo(Mr.CSharp)}]},[Mr.MySql]:{community:[],enterprise:[{id:to.MySqlEnterprise,value:to.MySqlEnterprise,icon:Lo(Mr.MySql)}]},[Mr.CPlusPlus]:{community:[ms],enterprise:[ms]},[Mr.Rust]:{community:[ms],enterprise:[ms]},[Mr.Swift]:{community:[ms],enterprise:[ms]},[Mr.Elixir]:{community:[ms],enterprise:[ms]},[Mr.Nginx]:{community:[ms],enterprise:[ms]},[Mr.Postgres]:{community:[ms],enterprise:[ms]},[Mr.Redis]:{community:[ms],enterprise:[ms]},[Mr.Kafka]:{community:[ms],enterprise:[ms]},[Mr.Ignored]:{community:[],enterprise:[]},[Mr.Unknown]:{community:[],enterprise:[]},[Mr.Processing]:{community:[],enterprise:[]},[Mr.NoContainers]:{community:[],enterprise:[]},[Mr.NoRunningPods]:{community:[],enterprise:[]}},fs=6048e5,xs=Rt()(Ht(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:ko.DARK_MODE,storage:"undefined"!=typeof window?Xt(()=>localStorage):void 0})),ys={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:vo},bs=Rt(e=>({...ys,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const r=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(r).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(ys)})),$s=Rt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),vs=Rt(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,r)=>{const o=t===Ur.Namespace?"namespacesLoading":t===Ur.Source?"sourcesLoading":t===Ur.Destination?"destinationsLoading":t===Ur.Action?"actionsLoading":t===Ur.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==o&&e({[o]:r})},setEntities:(t,r)=>{const o=t===Ur.Namespace?"namespaces":t===Ur.Source?"sources":t===Ur.Destination?"destinations":t===Ur.Action?"actions":t===Ur.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e({[o]:r})},addEntities:(t,r)=>{const o=t===Ur.Namespace?"namespaces":t===Ur.Source?"sources":t===Ur.Destination?"destinations":t===Ur.Action?"actions":t===Ur.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const t=[...e[o]],n=new Map;return t.forEach((e,t)=>{n.set(Ho(e),t)}),r.forEach(e=>{const r=Ho(e),o=n.get(r);void 0!==o?t[o]={...t[o],...e}:(n.set(r,t.length),t.push(e))}),{[o]:t}})},removeEntities:(t,r)=>{const o=t===Ur.Namespace?"namespaces":t===Ur.Source?"sources":t===Ur.Destination?"destinations":t===Ur.Action?"actions":t===Ur.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const t=new Set(r.map(e=>Wo(e))),n=e[o].filter(e=>!t.has(Ho(e)));return{[o]: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}),Ss=Rt(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})),ks=Rt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),Cs=Rt((e,t)=>({notifications:[],addNotification:r=>{const o=new Date,n=`${o.getTime().toString()}${r.target?`#${r.target}`:""}`,{notifications:i}=t();i.some(e=>e.type===r.type&&e.title===r.title&&e.message===r.message&&!e.dismissed)||e(e=>({notifications:[{...r,id:n,time:o.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&(e.notifications[r].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&(e.notifications[r].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const r=e.notifications.findIndex(e=>e.id===t);return-1!==r&&e.notifications.splice(r,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}}));var Es;!function(e){e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting",e.DownloadingDiagnose="downloading-diagnose"}(Es||(Es={}));const As=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),Ts=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),Ds=Rt((e,t)=>({progress:{},setProgress:(r,o)=>{const n=t(),i=As();return"number"==typeof o.total&&(i.total=o.total),"number"==typeof o.current&&(i.current=o.current),Array.isArray(o.list)&&(i.list=o.list),e({progress:{...n.progress,[r]:Ts(i)}})},addProgress:(r,o,n)=>{const i=t(),a=As(r,i.progress);return a.current+=o,n&&(a.list=a.list?.map(e=>e.label===n.label?{...e,status:n.status}:e)),e({progress:{...i.progress,[r]:Ts(a)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),Ns=Rt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),Is={configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},Rs=(e,t)=>e.destinationType.type!==t.destinationType.type,Os=Rt(e=>({...Is,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=>Rs(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const r=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(r).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>Rs(e,t))})),clearStore:()=>e(()=>({...Is}))})),_s={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"}},Ps={v2:_s.v2,darkMode:!0,colors:{..._s.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:_s.font_family},Ls={v2:_s.v2,darkMode:!1,colors:{..._s.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:_s.font_family},Fs=e=>e?Ps:Ls;var zs=Object.freeze({__proto__:null,baseTheme:_s,darkModeTheme:Ps,getTheme:Fs,lightModeTheme:Ls});Gt('@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 Ms=({children:e})=>{const{darkMode:t}=xs();return Kt(er,{theme:Fs(t),children:e})},Bs={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 Us=Object.freeze({__proto__:null,hex:Bs});const js={in:{left:tr`
|
|
218
|
-
from { transform: translateX(-100%); }
|
|
219
|
-
to { transform: translateX(0); }
|
|
220
|
-
`,right:tr`
|
|
221
|
-
from { transform: translateX(100%); }
|
|
222
|
-
to { transform: translateX(0); }
|
|
223
|
-
`,top:tr`
|
|
224
|
-
from { transform: translateY(-100%); }
|
|
225
|
-
to { transform: translateY(0); }
|
|
226
|
-
`,bottom:tr`
|
|
227
|
-
from { transform: translateY(100%); }
|
|
228
|
-
to { transform: translateY(0); }
|
|
229
|
-
`,center:tr`
|
|
230
|
-
from { transform: translate(-50%, 100%); }
|
|
231
|
-
to { transform: translate(-50%, -50%); }
|
|
232
|
-
`},out:{left:tr`
|
|
233
|
-
from { transform: translateX(0); }
|
|
234
|
-
to { transform: translateX(-100%); }
|
|
235
|
-
`,right:tr`
|
|
236
|
-
from { transform: translateX(0); }
|
|
237
|
-
to { transform: translateX(100%); }
|
|
238
|
-
`,top:tr`
|
|
239
|
-
from { transform: translateY(0); }
|
|
240
|
-
to { transform: translateY(-100%); }
|
|
241
|
-
`,bottom:tr`
|
|
242
|
-
from { transform: translateY(0); }
|
|
243
|
-
to { transform: translateY(100%); }
|
|
244
|
-
`,center:tr`
|
|
245
|
-
from { transform: translate(-50%, -50%); }
|
|
246
|
-
to { transform: translate(-50%, 100%); }
|
|
247
|
-
`}},Ws={in:tr`
|
|
248
|
-
from {
|
|
249
|
-
width: 0%;
|
|
250
|
-
}
|
|
251
|
-
to {
|
|
252
|
-
width: 100%;
|
|
253
|
-
}
|
|
254
|
-
`,out:tr`
|
|
255
|
-
from {
|
|
256
|
-
width: 100%;
|
|
257
|
-
}
|
|
258
|
-
to {
|
|
259
|
-
width: 0%;
|
|
260
|
-
}
|
|
261
|
-
`},Hs=tr`
|
|
262
|
-
0% {
|
|
263
|
-
transform: scale(1);
|
|
264
|
-
opacity: 1;
|
|
265
|
-
}
|
|
266
|
-
75%, 100% {
|
|
267
|
-
transform: scale(2);
|
|
268
|
-
opacity: 0;
|
|
269
|
-
}
|
|
270
|
-
`,Xs=tr`
|
|
271
|
-
0% {
|
|
272
|
-
background-position: -500px 0;
|
|
273
|
-
}
|
|
274
|
-
100% {
|
|
275
|
-
background-position: 500px 0;
|
|
276
|
-
}
|
|
277
|
-
`,Gs={in:tr`
|
|
278
|
-
from {
|
|
279
|
-
opacity: 0;
|
|
280
|
-
}
|
|
281
|
-
to {
|
|
282
|
-
opacity: 1;
|
|
283
|
-
}
|
|
284
|
-
`,out:tr`
|
|
285
|
-
from {
|
|
286
|
-
opacity: 1;
|
|
287
|
-
}
|
|
288
|
-
to {
|
|
289
|
-
opacity: 0;
|
|
290
|
-
}
|
|
291
|
-
`};var Vs=Object.freeze({__proto__:null,fade:Gs,ping:Hs,progress:Ws,shimmer:Xs,slide:js});const Ks=Yt.span`
|
|
292
|
-
display: flex;
|
|
293
|
-
align-items: center;
|
|
294
|
-
justify-content: center;
|
|
295
|
-
|
|
296
|
-
min-height: 16px;
|
|
297
|
-
min-width: 16px;
|
|
298
|
-
width: fit-content;
|
|
299
|
-
padding: 4px;
|
|
300
|
-
gap: 2px;
|
|
301
|
-
|
|
302
|
-
border-radius: 50px;
|
|
303
|
-
border: 1px solid ${({theme:e,$filled:t,$status:r})=>r?e.text[r]+(t?"":Bs["050"]):t?"transparent":e.colors.border};
|
|
304
|
-
background-color: ${({theme:e,$filled:t,$status:r})=>t?r?e.colors[r]:e.colors.majestic_blue:"transparent"};
|
|
305
|
-
color: ${({theme:e,$filled:t,$status:r})=>t&&r?e.text.secondary:t?e.text.white:r?e.text[r]:e.text.grey};
|
|
306
|
-
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
307
|
-
font-size: 12px;
|
|
308
|
-
white-space: nowrap;
|
|
309
|
-
|
|
310
|
-
${({theme:e,$filled:t,$status:r,$clickable:o})=>o&&`&:hover {\n cursor: pointer;\n background-color: ${r?e.colors[r]+Bs["020"]:t?e.colors.majestic_blue_soft:e.colors.secondary+Bs["020"]};\n }`}
|
|
311
|
-
`,Js=({label:e,filled:t,status:r,withIcon:o,onClick:n})=>{const i=Zt(),a=r&&o?nn(r,i):null;return Jt(Ks,{$filled:t,$status:r,$clickable:!!n,onClick:n,children:[!!a&&Kt(a,{}),e]})},qs=Yt.div`
|
|
312
|
-
height: fit-content;
|
|
313
|
-
border: 2px solid transparent;
|
|
314
|
-
padding: 2px;
|
|
315
|
-
border-radius: 32px;
|
|
316
|
-
background-color: transparent;
|
|
317
|
-
transition: border-color 0.3s ease;
|
|
318
|
-
&:focus-within {
|
|
319
|
-
border-color: ${({theme:e})=>e.colors.secondary};
|
|
320
|
-
}
|
|
321
|
-
`,Ys={primary:Qt`
|
|
322
|
-
border: 1px solid ${({theme:e})=>e.text.secondary+Bs["024"]};
|
|
323
|
-
background: ${({theme:e})=>e.colors.secondary};
|
|
324
|
-
color: ${({theme:e})=>e.colors.primary};
|
|
325
|
-
&:hover {
|
|
326
|
-
background: ${({theme:e})=>e.colors.secondary+Bs["080"]};
|
|
327
|
-
}
|
|
328
|
-
&:active {
|
|
329
|
-
background: ${({theme:e})=>e.text.secondary+Bs["060"]};
|
|
330
|
-
}
|
|
331
|
-
`,secondary:Qt`
|
|
332
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
333
|
-
background: ${({theme:e})=>e.colors.primary};
|
|
334
|
-
color: ${({theme:e})=>e.colors.secondary};
|
|
335
|
-
&:hover {
|
|
336
|
-
border: 1px solid ${({theme:e})=>e.text.darker_grey};
|
|
337
|
-
background: ${({theme:e})=>e.colors.secondary+Bs["010"]};
|
|
338
|
-
}
|
|
339
|
-
&:active {
|
|
340
|
-
border: 1px solid ${({theme:e})=>e.text.dark_grey};
|
|
341
|
-
background: ${({theme:e})=>e.colors.secondary+Bs["015"]};
|
|
342
|
-
}
|
|
343
|
-
`,tertiary:Qt`
|
|
344
|
-
border-color: transparent;
|
|
345
|
-
background: transparent;
|
|
346
|
-
&:hover {
|
|
347
|
-
background: ${({theme:e})=>e.colors.dropdown_bg_2+Bs["040"]};
|
|
348
|
-
}
|
|
349
|
-
&:active {
|
|
350
|
-
background: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
351
|
-
}
|
|
352
|
-
`,danger:Qt`
|
|
353
|
-
border-color: transparent;
|
|
354
|
-
background: ${({theme:e})=>e.text.error};
|
|
355
|
-
&:hover {
|
|
356
|
-
background: ${({theme:e})=>e.text.error+Bs["090"]};
|
|
357
|
-
}
|
|
358
|
-
&:active {
|
|
359
|
-
background: ${({theme:e})=>e.text.error+Bs["080"]};
|
|
360
|
-
}
|
|
361
|
-
`,warning:Qt`
|
|
362
|
-
border-color: transparent;
|
|
363
|
-
background: ${({theme:e})=>e.text.warning};
|
|
364
|
-
&:hover {
|
|
365
|
-
background: ${({theme:e})=>e.text.warning+Bs["090"]};
|
|
366
|
-
}
|
|
367
|
-
&:active {
|
|
368
|
-
background: ${({theme:e})=>e.text.warning+Bs["080"]};
|
|
369
|
-
}
|
|
370
|
-
`},Qs=Yt.button`
|
|
371
|
-
height: 36px;
|
|
372
|
-
border-radius: 32px;
|
|
373
|
-
cursor: pointer;
|
|
374
|
-
display: flex;
|
|
375
|
-
align-items: center;
|
|
376
|
-
justify-content: center;
|
|
377
|
-
gap: 8px;
|
|
378
|
-
padding: 0 12px;
|
|
379
|
-
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
380
|
-
text-transform: uppercase;
|
|
381
|
-
text-decoration: underline;
|
|
382
|
-
font-weight: 600;
|
|
383
|
-
outline: none;
|
|
384
|
-
${({$variant:e})=>e&&Ys[e]}
|
|
385
|
-
${({disabled:e,$variant:t})=>e&&Qt`
|
|
386
|
-
opacity: 0.5;
|
|
387
|
-
cursor: not-allowed;
|
|
388
|
-
|
|
389
|
-
${"primary"===t?Qt`
|
|
390
|
-
color: ${({theme:e})=>e.colors.secondary};
|
|
391
|
-
background: ${({theme:e})=>e.text.secondary+Bs["010"]};
|
|
392
|
-
&:hover {
|
|
393
|
-
background: ${({theme:e})=>e.text.secondary+Bs["015"]};
|
|
394
|
-
}
|
|
395
|
-
`:""}
|
|
396
|
-
`}
|
|
397
|
-
`,Zs=({children:e,variant:t="primary",onClick:r,...o})=>{const n=Ft(null);return Kt(qs,{$variant:t,children:Kt(Qs,{ref:n,$variant:t,onClick:e=>{r&&r(e),n.current?.blur()},...o,children:e})})},el=e=>{function t(){return void 0===e?{}:$r(e)}const[r,o]=Pt(t()),[n,i]=Pt({}),a=zt((e,t)=>{const r={};if(!t||"object"!=typeof t)return e?{...e}:r;for(const[o,n]of Object.entries(e)){const e=o;if(Array.isArray(n)){const o=t[e];Array.isArray(o)&&n.length===o.length&&n.every((e,t)=>"object"==typeof e&&null!==e?0===Object.keys(a(e,o[t])).length:e===o[t])||(r[e]=t[e])}else if("object"==typeof n&&null!==n)if(null==t[e]||"object"!=typeof t[e])r[e]=t[e];else{const o=a(n,t[e]);Object.keys(o).length>0&&(r[e]=o)}else n!==t[e]&&(r[e]=t[e])}for(const o of Object.keys(t))o in e||(r[o]=t[o]);return r},[]),s=(e,t)=>0===Object.keys(a(e,t)).length,l=_t(()=>void 0!==e&&!s(e,r),[e,r]);Lt(()=>{const n=t();void 0!==e&&"{}"===JSON.stringify(r)&&"{}"!==JSON.stringify(n)&&o(n)},[e,r]);const c=zt((e,t)=>vr("formData"===e?r:n,t.toString()),[r,n]);return{formData:r,formErrors:n,getFormDiff:a,areFormValuesEqual:s,isFormDirty:l,handleFormChange:(e,t,r)=>{if(e){const r=e.toString().split(".");1===r.length?o(r=>({...r,[e]:t})):o(e=>{const o=$r(e);let n=o;for(let e=0;e<r.length-1;e++){const t=r[e];n[t]&&"object"==typeof n[t]||(n[t]={}),n=n[t]}return n[r[r.length-1]]=t,o})}else r&&o({...r})},handleErrorChange:(e,t,r)=>{if(e){const r=e.toString().split(".");1===r.length?i(r=>({...r,[e]:t})):i(e=>{const o=$r(e);let n=o;for(let e=0;e<r.length-1;e++){const t=r[e];n[t]&&"object"==typeof n[t]||(n[t]={}),n=n[t]}return n[r[r.length-1]]=t,o})}else r&&i({...r})},resetFormData:e=>{o(e||t()),i({})},getNestedValue:c}},tl={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}},rl=()=>{const{addNotification:e}=Cs(),{formData:t,formErrors:r,handleFormChange:o,handleErrorChange:n,resetFormData:i}=el(tl),a=e=>e&&Array.isArray(e)?e.map(e=>!e.fromSources?.length&&e.from?{...e,fromSources:[e.from]}:e):e;return{formData:t,formErrors:r,handleFormChange:o,resetFormData:i,validateForm:r=>{const o={};let i=!0;if(Object.entries(t).forEach(([e,t])=>{switch(e){case"type":case"signals":gn(t)&&(o[e]=Co.FIELD_IS_REQUIRED)}}),t.type===Ar.URLTemplatization){const e=t.fields?.urlTemplatizationRulesGroups;if(e)for(const t of e)if(t.templatizationRules?.some(e=>!e.template?.trim())){o.fields=Co.FIELD_IS_REQUIRED;break}}return i=!Object.values(o).length,!i&&r?.withAlert&&e({type:Xr.Warning,title:r.alertTitle,message:Co.REQUIRED_FIELDS,hideFromHistory:!0}),n(void 0,void 0,o),i},loadFormWithDrawerItem:({type:e,signals:t,name:r,notes:n,disabled:i,fields:s})=>{const l={...$r(tl),type:e,signals:t,name:r,notes:n,disabled:i};Object.entries(s).forEach(([e,t])=>{if(t)switch(e){case Tr.LabelsAttributes:case Tr.AnnotationsAttributes:l.fields||(l.fields={}),l.fields[e]=a(t);break;case Tr.CollectContainerAttributes:case Tr.CollectReplicaSetAttributes:case Tr.CollectWorkloadId:case Tr.CollectClusterId:case Tr.ClusterAttributes:case Tr.OverwriteExistingValues:case Tr.AttributeNamesToDelete:case Tr.Renames:case Tr.PiiCategories:case Tr.FallbackSamplingRatio:case Tr.SamplingPercentage:case Tr.EndpointsFilters:case Tr.ServicesNameFilters:case Tr.AttributeFilters:case Tr.UrlTemplatizationRulesGroups:l.fields||(l.fields={}),l.fields[e]=t}}),o(void 0,void 0,l)}}},ol=e=>{Lt(()=>{if(e){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])},nl=()=>{const{setCurrentModal:e}=ks(),{setDrawerType:t,setDrawerEntityId:r}=$s(),{setActiveNodeType:o,setActiveNodeId:n,activeNodeId:i}=vi();return{onClickNode:(a,s)=>{const{id:l,type:c,data:{id:d,type:p}}=s;switch(i===l?(o(null),n(null)):(o(c),n(l)),p){case Ur.Source:case Ur.Destination:case Ur.Action:case Ur.InstrumentationRule:t(p),r(d);break;case Qr.AddSource:e(Ur.Source);break;case Qr.AddDestination:e(Ur.Destination);break;case Qr.AddAction:e(Ur.Action);break;case Qr.AddRule:e(Ur.InstrumentationRule)}}}},il=()=>{const{setDrawerType:e,setDrawerEntityId:t}=$s(),{markAsDismissed:r,markAsSeen:o}=Cs();return{onClickNotification:(n,i)=>{const{id:a,crdType:s,target:l}=n,{dismissToast:c}=i||{};if(s&&l)switch(s){case Ur.InstrumentationRule:e(Ur.InstrumentationRule),t(Go(l,Ur.InstrumentationRule));break;case Ur.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(Ur.Source),t(Go(l,Ur.Source));break;case Ur.Action:e(Ur.Action),t(Go(l,Ur.Action));break;case Ur.Destination:case"Destination":e(Ur.Destination),t(Go(l,Ur.Destination))}o(a),c&&r(a)}}},al=()=>{const e=Ft(null),[t,r]=Pt(0),[o,n]=Pt(0);return Lt(()=>{const t=()=>{if(e.current){const{width:t,height:o}=e.current.getBoundingClientRect();r(t),n(o)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:o}};var sl;!function(e){e[e.XS=16]="XS",e[e.S=18]="S",e[e.M=24]="M",e[e.L=32]="L"}(sl||(sl={}));const ll=Yt.div`
|
|
398
|
-
width: ${({$size:e})=>1.5*e}px;
|
|
399
|
-
height: ${({$size:e})=>1.5*e}px;
|
|
400
|
-
display: flex;
|
|
401
|
-
align-items: center;
|
|
402
|
-
justify-content: center;
|
|
403
|
-
border-radius: 100%;
|
|
404
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
405
|
-
&:hover {
|
|
406
|
-
background: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
407
|
-
}
|
|
408
|
-
`,cl=({icon:e,size:t=sl.S,onClick:r,disabled:o})=>Kt(ll,{$size:t,$disabled:o,onClick:e=>{r&&!o&&(e.stopPropagation(),r(e))},children:Kt(e,{size:t})}),dl=({onDone:e}={})=>{const[t,r]=Pt(!1),[o,n]=Pt(-1),i=zt(async(o,i)=>{if(!t){if(r(!0),void 0!==i&&n(i),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(o)}catch(e){}else{const e=document.createElement("textarea");e.value=o,document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(e)}e?.(),setTimeout(()=>{r(!1),n(-1)},1e3)}},[t,e]);return{CopyButton:zt(({value:e,size:r})=>Kt(cl,{icon:t?st:lt,size:r,onClick:()=>i(e)}),[t]),isCopied:t,copiedIndex:o,clickCopy:i}},pl=e=>{const{addNotification:t}=Cs(),{formData:r,handleFormChange:o,formErrors:n,handleErrorChange:i,resetFormData:a}=el(e);return{formData:r,formErrors:n,handleFormChange:o,resetFormData:a,validateForm:e=>{const o={};let n=!0;return r.name?fn(r.name)?o.name=void 0:(n=!1,o.name=Co.ILLEGAL_K8S_LABEL):(n=!1,o.name=Co.FIELD_IS_REQUIRED),!n&&e?.withAlert&&t({type:Xr.Warning,title:e.alertTitle,message:Co.REQUIRED_FIELDS,hideFromHistory:!0}),i(void 0,void 0,o),n},loadFormWithDrawerItem:({name:t})=>{const r={...$r(e),name:t};o(void 0,void 0,r)}}},ul={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},hl=e=>{const{supportedSignals:t,preLoadedFields:r}=e||{},{addNotification:o}=Cs(),{formData:n,formErrors:i,handleFormChange:a,handleErrorChange:s,resetFormData:l}=el(ul),[c,d]=Pt([]),[p,u]=Pt([]);Lt(()=>{var e;u(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:r,componentProperties:o,displayName:n,initialValue:i,renderCondition:a}=e;if(r===Wr.Dropdown){const e=un(o,{}),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:r,title:n,value:i,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:r,title:n,value:i,renderCondition:a,...un(o,{})}})).map(e=>{if(r){const t="string"==typeof r?un(r,{}):r;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,r]),Lt(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[p]),Lt(()=>{if(t&&0===Cn(n.exportedSignals).length){const{logs:e,metrics:r,traces:o}=t;a("exportedSignals",{logs:e.supported,metrics:r.supported,traces:o.supported})}},[t,n.exportedSignals]);return{formData:n,formErrors:i,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let r=!0;return p.forEach(({name:e,value:o,required:n})=>{n&&!o&&(r=!1,t[e]=Co.FIELD_IS_REQUIRED)}),!r&&e?.withAlert&&o({type:Xr.Warning,title:e.alertTitle,message:Co.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),r},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:r,exportedSignals:o,fields:n})=>{const i={...$r(ul),type:e,name:t,disabled:r,exportedSignals:o,fields:Object.entries(un(n,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,i),i},yamlFields:c,setYamlFields:d,dynamicFields:p,setDynamicFields:u}},ml={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[so.HttpRequest]:null,[so.HttpResponse]:null,[so.DbQuery]:null,[so.Messaging]:null},codeAttributes:{[no.Column]:null,[no.FilePath]:null,[no.Function]:null,[no.LineNumber]:null,[no.Namespace]:null,[no.StackTrace]:null},headersCollection:null,customInstrumentations:{[ao.Java]:null,[ao.Golang]:null}},gl=()=>{const{formData:e,formErrors:t,handleFormChange:r,handleErrorChange:o,resetFormData:n}=el(ml);return{formData:e,formErrors:t,handleFormChange:r,resetFormData:n,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:o,payloadCollection:n,codeAttributes:i,headersCollection:a,customInstrumentations:s})=>{const l={...$r(ml),ruleName:e,notes:t,disabled:o};n&&(l.payloadCollection={[so.HttpRequest]:n[so.HttpRequest]?{}:null,[so.HttpResponse]:n[so.HttpResponse]?{}:null,[so.DbQuery]:n[so.DbQuery]?{}:null,[so.Messaging]:n[so.Messaging]?{}:null}),i&&(l.codeAttributes={[no.Column]:i[no.Column]||null,[no.FilePath]:i[no.FilePath]||null,[no.Function]:i[no.Function]||null,[no.LineNumber]:i[no.LineNumber]||null,[no.Namespace]:i[no.Namespace]||null,[no.StackTrace]:i[no.StackTrace]||null}),a&&(l.headersCollection=a),s&&(l.customInstrumentations={[ao.Java]:s[ao.Java]||null,[ao.Golang]:s[ao.Golang]||null}),r(void 0,void 0,l)}}},fl=({active:e,key:t,withAltKey:r,withCtrlKey:o,withShiftKey:n,withMetaKey:i},a)=>(Lt(()=>{const s=s=>{e&&t===s.key&&(!r||r&&s.altKey)&&(!o||o&&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,r,o,n,i,a]),null),xl=(e,t)=>{Lt(()=>{const r=r=>{e.current&&!e.current.contains(r.target)&&t()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])},yl=({sectionNames:e,threshold:t=.4})=>{const[r,o]=Pt(e[0]||""),[n,i]=Pt(null),a=Ft({}),s=Ft(!1),l=Ft(!1),c=zt((e,t)=>{a.current[e]=t},[]),d=zt(e=>{i(e)},[]),p=zt(e=>{l.current=!0,o(e)},[]);return Lt(()=>{if(!l.current)return;l.current=!1;const e=a.current[r];if(!e)return;s.current=!0,e.scrollIntoView({behavior:"smooth",block:"start"});const t=setTimeout(()=>{s.current=!1},600);return()=>clearTimeout(t)},[r]),Lt(()=>{const r=a.current,i=e.map(e=>r[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&&o(e);break}},{threshold:t,root:n});return i.forEach(e=>l.observe(e)),()=>l.disconnect()},[e,t,n]),{selectedSection:r,setSelectedSection:p,setSectionRef:c,setScrollContainerRef:d}},bl=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:r,positionMode:o="local"}={})=>{const n=Ft(null),[i,a]=Pt(!1),[s,l]=Pt({top:0,left:0}),[c,d]=Pt({edge:"top",align:"left"});xl(n,()=>{i&&(a(!1),r?.())});return{popupRef:n,popupOpen:i,setPopupOpen:a,popupPosition:s,arrowPlacement:c,handlePosition:(r,i)=>{if("local"===o)return void l({top:i,left:r});const{innerWidth:a,innerHeight:s}=window,c=n.current?.clientWidth||t,p=n.current?.clientHeight||e,u=r/a,h=u<1/3?"left":u>2/3?"right":"center";d({edge:i<s/2?"top":"bottom",align:h});let m=i,g=r;if(m>=s/2&&(m+=-p),"center"===h){g=r-c/2;const e=8;g=Math.max(e,Math.min(g,a-c-e))}else g>=a/2&&(g=r-c);l({top:m,left:g})}}},$l=()=>({getItemSS:(e,t)=>{const r=sessionStorage.getItem(e);return r?un(r,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),vl={otelServiceName:"",currentStreamName:""},wl=()=>{const{formData:e,formErrors:t,handleFormChange:r,handleErrorChange:o,resetFormData:n}=el(vl);return{formData:e,formErrors:t,handleFormChange:r,resetFormData:n,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const o={...$r(vl),otelServiceName:e||t||""};r(void 0,void 0,o)}}},Sl=Bt({platformType:Fr.K8s,tier:Lr.Community,version:"v0.0.0"}),kl=({children:e,platformType:t,tier:r,version:o})=>{const n=_t(()=>({platformType:t,tier:r,version:o}),[t,r,o]);return Kt(Sl.Provider,{value:n,children:e})},Cl=(e,t)=>!t||Pn(e)>=Pn(t),El=e=>{const t=Mt(Sl),r=Cl(t.version,e),o=t.platformType===Fr.Vm;return{...t,isVersionSupported:r,isVm:o,isEnterprise:t.tier===Lr.Onprem}},Al=new Set([eo.StaticPod]),Tl=e=>{const t=e.workloads.filter(({selected:e})=>e).length,r=e.workloads.length;return{selectedCount:t,isAllSourced:t>0&&t===r,isSomeSourced:t>0&&t<r,isFutureApps:e.selected||!1}},Dl=(e,t,r)=>{if(t&&!e.name.toLowerCase().includes(t.toLowerCase()))return!1;if(r.showOnlySelected){const{isAllSourced:t,isSomeSourced:r,isFutureApps:o}=Tl(e);return t||r||o}return!0},Nl=(e,t,r)=>!(t&&!e.name.toLowerCase().includes(t.toLowerCase()))&&(!r.showOnlySelected||e.selected),Il=(e,t,r)=>{const o=!!e.dataStreamNames?.length||!!e.currentStreamName?.length,n=o&&e.dataStreamNames?.includes(t)||e.currentStreamName===t,i=e.selected&&(!o||n)||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:i,numberOfInstances:e.numberOfInstances}},Rl=(e,t,r)=>({...Il(e,t),currentStreamName:t}),Ol=(e,t,r)=>{const o="boolean"==typeof r,n=e.dataStreamNames?.includes(t),i=(o?r:e.selected)||!1;return{namespace:e.name,selected:!(!n&&!o)&&i,currentStreamName:t}},_l=e=>{const{fetchNamespacesWithWorkloads:t}=e,{tier:r}=El(),o=e=>r!==Lr.Onprem&&Al.has(e),{selectedStreamName:n}=bs(),{namespaces:i,addEntities:a}=vs(),[s,l]=Pt(!1),[c,d]=Pt({}),[p,u]=Pt(!1),[h,m]=Pt(""),[g,f]=Pt({}),[x,y]=Pt({}),[b,$]=Pt(""),[v,w]=Pt(Ur.Source),[S,k]=Pt(!1),[C,E]=Pt(!1),A=_t(()=>{const e=(e,t)=>!b||v!==t||v===t&&e.toLowerCase().includes(b),t={};return Object.entries(x).filter(([t])=>e(t,Ur.Namespace)).forEach(([r,o])=>{const n=o.filter(t=>{return e(t.name,Ur.Source)&&(r=t,!S||r.selected)&&(e=>!C||(e.numberOfInstances||0)>0)(t);var r});(!b||b&&(v===Ur.Namespace||v===Ur.Source&&n.length))&&(t[r]=n)}),t},[x,b,v,S,C]);return Lt(()=>{(async()=>{l(!0);const e=await t();l(!1);const r=e.data;if(!r?.length)return;const o=[...r].sort((e,t)=>e.name.localeCompare(t.name)),i={},s={},c={};for(const e of o){const t=[...e.sources||[]].sort((e,t)=>e.name.localeCompare(t.name));i[e.name]=t.map(e=>Il(e,n)),s[e.name]=t.map(e=>Rl(e,n)),c[e.name]=Ol(e,n)}a(Ur.Namespace,r.map(({sources:e,...t})=>t));const{configuredSources:p,configuredFutureApps:u}=Os.getState();Object.entries(p).forEach(([e,t])=>{s[e]&&t.forEach(t=>{const r=s[e].findIndex(e=>e.name===t.name&&e.kind===t.kind);-1!==r&&(s[e][r]={...s[e][r],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,r])=>{r.forEach(r=>{const o=c[t]?.find(e=>e.name===r.name&&e.kind===r.kind);o?.selected!==r.selected&&(e[t]||(e[t]=[]),e[t].push(r))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries(g).forEach(([t,r])=>{const o=i?.find(e=>e.name===t);(r.selected&&!o?.dataStreamNames?.includes(n)||!r.selected&&o?.dataStreamNames?.includes(n))&&(e[t]=r)}),e},selectedNamespace:h,onSelectNamespace:(e,t)=>{if(i.find(t=>t.name===e)){const r="boolean"==typeof t;m(t=>t!==e||r?e:""),r&&(y(r=>({...r,[e]:(r[e]||[]).map(e=>t&&o(e.kind)?e:{...e,selected:t,currentStreamName:n})})),u(!1))}},selectedAllNamespaces:p,onSelectAllNamespaces:e=>{u(e),y(t=>{const r={};for(const[i,a]of Object.entries(t))r[i]=a.map(t=>e&&o(t.kind)?t:{...t,selected:e,currentStreamName:n});return r})},selectedSources:x,onSelectSource:(e,t)=>{const r=t||h;if(!r)return;if(o(e.kind))return;const i=[...x[r]||[]],a=i.findIndex(({name:t,kind:r})=>t===e.name&&r===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,[r]:i})),u(!1)},selectedFutureApps:g,onSelectFutureApps:(e,t)=>{const r=t||h;if(!r)return;const o=i.find(e=>e.name===t);o&&f(t=>({...t,[r]:Ol(o,n,e)}))},searchText:b,setSearchText:$,searchBy:v,setSearchBy:w,showSelectedOnly:S,setShowSelectedOnly:k,showRunningOnly:C,setShowRunningOnly:E}};try{Wt.addDefaultLocale(Vt)}catch(e){}const Pl=()=>{const e=Ft(new Wt(Vt.locale));return{formatTimeAgo:zt(t=>{try{return"string"==typeof t&&(t=t.replace("t","T").replace("z","Z")),e.current.format(new Date(t))}catch(e){return"-"}},[])}},Ll=Yt.div`
|
|
409
|
-
position: fixed;
|
|
410
|
-
top: 50%;
|
|
411
|
-
left: 50%;
|
|
412
|
-
transform: translate(-50%, -50%);
|
|
413
|
-
z-index: 1000;
|
|
414
|
-
width: fit-content;
|
|
415
|
-
background: ${({theme:e})=>e.colors.translucent_bg};
|
|
416
|
-
border: ${({theme:e})=>`1px solid ${e.colors.border}`};
|
|
417
|
-
border-radius: 40px;
|
|
418
|
-
box-shadow: ${({theme:e})=>{const t=e.colors.primary+Bs["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}`}};
|
|
419
|
-
animation-name: ${js.in.center};
|
|
420
|
-
`,Fl=Yt.div`
|
|
421
|
-
display: flex;
|
|
422
|
-
justify-content: space-between;
|
|
423
|
-
align-items: center;
|
|
424
|
-
height: 80px;
|
|
425
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
426
|
-
padding: 0 24px;
|
|
427
|
-
`,zl=Yt.div`
|
|
428
|
-
cursor: pointer;
|
|
429
|
-
display: flex;
|
|
430
|
-
align-items: center;
|
|
431
|
-
gap: 8px;
|
|
432
|
-
`,Ml=Yt.div`
|
|
433
|
-
display: flex;
|
|
434
|
-
align-items: center;
|
|
435
|
-
gap: 8px;
|
|
436
|
-
`,Bl=Yt(Un)`
|
|
437
|
-
min-width: 350px;
|
|
438
|
-
min-height: 150px;
|
|
439
|
-
`,Ul=Yt.div`
|
|
440
|
-
position: absolute;
|
|
441
|
-
left: 50%;
|
|
442
|
-
transform: translateX(-50%);
|
|
443
|
-
display: flex;
|
|
444
|
-
align-items: center;
|
|
445
|
-
justify-content: center;
|
|
446
|
-
width: 100%;
|
|
447
|
-
pointer-events: none;
|
|
448
|
-
`,jl=Yt(ri)`
|
|
449
|
-
text-transform: uppercase;
|
|
450
|
-
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
451
|
-
pointer-events: auto;
|
|
452
|
-
`,Wl=Yt(ri)`
|
|
453
|
-
text-transform: uppercase;
|
|
454
|
-
font-weight: 500;
|
|
455
|
-
font-size: 14px;
|
|
456
|
-
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
457
|
-
text-decoration: underline;
|
|
458
|
-
cursor: pointer;
|
|
459
|
-
`,Hl=({isOpen:e,noOverlay:t,header:r,actionComponent:o,onClose:n,children:i,closeOnEscape:a=!0})=>(fl({key:"Escape",active:e&&a},()=>n()),ol(e),e?cr.createPortal(Jt(qt,{children:[Kt(Wn,{hidden:!e,onClick:n,style:{opacity:t?0:1}}),Jt(Ll,{"data-id":"modal"+(r?`-${r.title.replaceAll(" ","-")}`:""),children:[r&&Jt(Fl,{children:[Jt(zl,{onClick:n,children:[Kt(ct,{}),Kt(Wl,{children:"Cancel"})]}),Kt(Ul,{children:Kt(jl,{children:r.title})}),Kt(Ml,{children:o})]}),Kt(Bl,{children:i})]})]}),document.body):null),Xl=Yt.div`
|
|
460
|
-
width: ${({$orientation:e,$thickness:t,$length:r})=>"vertical"===e?`${t}px`:r||"100%"};
|
|
461
|
-
height: ${({$orientation:e,$thickness:t,$length:r})=>"horizontal"===e?`${t}px`:r||"100%"};
|
|
462
|
-
margin: ${({$orientation:e,$margin:t})=>t||("horizontal"===e?"8px 0":"0 8px")};
|
|
463
|
-
background-color: ${({$type:e,theme:t})=>(e?t.text[e]:t.colors.border)+Bs["050"]};
|
|
464
|
-
opacity: ${({$opacity:e})=>e||1};
|
|
465
|
-
`,Gl=({orientation:e="horizontal",type:t,thickness:r=1,length:o,margin:n,opacity:i})=>Kt(Xl,{$orientation:e,$type:t,$thickness:r,$length:o,$margin:n,$opacity:i}),Vl=Yt.div`
|
|
466
|
-
/* Portal: viewport coords (usePopup positionMode viewport). Non-portal: offset-parent coords, absolute. */
|
|
467
|
-
position: ${({$asPortal:e})=>e?"fixed":"absolute"};
|
|
468
|
-
${({$top:e})=>void 0!==e&&`top: ${e}px;`}
|
|
469
|
-
${({$bottom:e})=>void 0!==e&&`bottom: ${e}px;`}
|
|
470
|
-
${({$left:e})=>void 0!==e&&`left: ${e}px;`}
|
|
471
|
-
${({$right:e})=>void 0!==e&&`right: ${e}px;`}
|
|
472
|
-
z-index: 9999;
|
|
473
|
-
|
|
474
|
-
background-color: ${({theme:e})=>e.colors.info};
|
|
475
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
476
|
-
border-radius: ${({$borderRadius:e})=>void 0!==e?e:"24px"};
|
|
477
|
-
max-width: ${({$maxWidth:e})=>void 0!==e?e:"unset"};
|
|
478
|
-
width: ${({$width:e})=>void 0!==e?e:"unset"};
|
|
479
|
-
|
|
480
|
-
${({$asPortal:e,$withPointerEvents:t})=>e&&!t&&"pointer-events: none;"}
|
|
481
|
-
`,Kl=Yt.div`
|
|
482
|
-
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
483
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
484
|
-
`,Jl=Yt.div`
|
|
485
|
-
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
486
|
-
`,ql=Yt.div`
|
|
487
|
-
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
488
|
-
border-top: 1px solid ${({theme:e})=>e.colors.border};
|
|
489
|
-
`,Yl=Ut(({isOpen:e,asPortal:t,...r},o)=>{const n=_t(()=>{const{children:e,top:n,bottom:i,left:a,right:s,borderRadius:l,padding:c,maxWidth:d,width:p,header:u,footer:h,withPointerEvents:m,...g}=r;return Jt(Vl,{ref:o,$top:n,$bottom:i,$left:a,$right:s,$borderRadius:l,$padding:c,$maxWidth:d,$width:p,$asPortal:t,$withPointerEvents:m,...g,children:[u&&Kt(Kl,{$padding:c,children:u}),Kt(Jl,{$padding:c,children:e}),h&&Kt(ql,{$padding:c,children:h})]})},[o,r,t]);return e?t?cr.createPortal(n,document.body):n:null});Yl.displayName=Yl.name;const Ql=Yt.div`
|
|
490
|
-
width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
|
|
491
|
-
position: relative;
|
|
492
|
-
display: flex;
|
|
493
|
-
align-items: center;
|
|
494
|
-
gap: 4px;
|
|
495
|
-
cursor: help;
|
|
496
|
-
${({$ellipsis:e})=>e&&"\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n "}
|
|
497
|
-
`,Zl=Yt.div`
|
|
498
|
-
display: flex;
|
|
499
|
-
flex-direction: column;
|
|
500
|
-
align-items: flex-start;
|
|
501
|
-
gap: 8px;
|
|
502
|
-
width: 100%;
|
|
503
|
-
`,ec=Yt.div`
|
|
504
|
-
display: flex;
|
|
505
|
-
width: 100%;
|
|
506
|
-
flex-shrink: 0;
|
|
507
|
-
box-sizing: border-box;
|
|
508
|
-
line-height: 0;
|
|
509
|
-
|
|
510
|
-
${({$align:e})=>"left"===e&&"\n justify-content: flex-start;\n padding-left: 20px;\n padding-right: 10px;\n "}
|
|
511
|
-
${({$align:e})=>"right"===e&&"\n justify-content: flex-end;\n padding-left: 10px;\n padding-right: 20px;\n "}
|
|
512
|
-
${({$align:e})=>"center"===e&&"\n justify-content: center;\n align-items: center;\n min-height: 8px;\n "}
|
|
513
|
-
`,tc=Yt.div`
|
|
514
|
-
width: 0;
|
|
515
|
-
height: 0;
|
|
516
|
-
border-style: solid;
|
|
517
|
-
border-left: 6.5px solid transparent;
|
|
518
|
-
border-right: 6.5px solid transparent;
|
|
519
|
-
flex-shrink: 0;
|
|
520
|
-
|
|
521
|
-
${({$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 `}
|
|
522
|
-
`,rc=Yt.div`
|
|
523
|
-
display: flex;
|
|
524
|
-
flex-direction: column;
|
|
525
|
-
align-items: stretch;
|
|
526
|
-
min-width: 0;
|
|
527
|
-
`,oc=Yt.div`
|
|
528
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
529
|
-
border-radius: 4px;
|
|
530
|
-
padding: 8px;
|
|
531
|
-
box-sizing: border-box;
|
|
532
|
-
min-width: 0;
|
|
533
|
-
`,nc=({withIcon:e,titleIcon:t,title:r,text:o,timestamp:n,children:i,fullWidth:a=!1,keepAlive:s=!1,ellipsis:l=!1})=>{const c=Zt(),{popupRef:d,popupOpen:p,setPopupOpen:u,popupPosition:h,arrowPlacement:m,handlePosition:g}=bl({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:Math.min(7.5*(o?.length||0),300)}),f=_t(()=>!!Zn(o||"")?.length,[o]),x=e=>{const{type:t,clientX:r,clientY:o}=e;f?g(h.left||r,h.top||o):g(r,o),u("mouseleave"!==t)};return o||s?Jt(Ql,{$fullWidth:a,$ellipsis:l,onMouseEnter:x,onMouseMove:x,onMouseLeave:x,children:[i,e&&Kt(je,{fill:c.v2.colors.white[500]}),Kt(Yl,{ref:d,isOpen:p&&!!o,top:h.top,left:h.left,asPortal:!0,withPointerEvents:f,onMouseEnter:f?x:void 0,style:{backgroundColor:"transparent",border:"none"},maxWidth:"270px",borderRadius:"0",padding:"0",children:Jt(rc,{children:["top"===m.edge&&Kt(ec,{$align:m.align,children:Kt(tc,{$pointsUp:!0})}),Kt(oc,{children:Jt(Zl,{children:[(!!t||!!r)&&Jt(Mn,{$gap:4,style:{alignItems:"center"},children:[t&&Kt(t,{size:16},"icon"),r&&Kt(Yn,{size:Jn.XS,children:r},"title")]}),!!o&&Kt(Yn,{size:Jn.XXXS,children:o}),!!n&&Kt(Yn,{size:Jn.XXXS,color:c.v2.colors.silver[200],children:new Date(n).toLocaleString()})]})}),"bottom"===m.edge&&Kt(ec,{$align:m.align,children:Kt(tc,{$pointsUp:!1})})]})})]}):Kt(qt,{children:i})},ic=Yt.button`
|
|
534
|
-
position: relative;
|
|
535
|
-
width: ${({$size:e})=>e}px;
|
|
536
|
-
height: ${({$size:e})=>e}px;
|
|
537
|
-
border: ${({theme:e,$withBorder:t})=>t?`1px solid ${e.colors.border}`:"none"};
|
|
538
|
-
border-radius: 100%;
|
|
539
|
-
background-color: ${({$backgroundColor:e})=>e||"transparent"};
|
|
540
|
-
display: flex;
|
|
541
|
-
align-items: center;
|
|
542
|
-
justify-content: center;
|
|
543
|
-
cursor: pointer;
|
|
544
|
-
&:hover {
|
|
545
|
-
background-color: ${({theme:e,$backgroundColor:t})=>t?t+Bs["070"]:e.colors.dropdown_bg_2};
|
|
546
|
-
}
|
|
547
|
-
`,ac=Yt.div`
|
|
548
|
-
position: absolute;
|
|
549
|
-
top: ${({$size:e})=>e/5}px;
|
|
550
|
-
right: ${({$size:e})=>e/5}px;
|
|
551
|
-
width: 6px;
|
|
552
|
-
height: 6px;
|
|
553
|
-
border-radius: 100%;
|
|
554
|
-
background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
|
|
555
|
-
|
|
556
|
-
&::after {
|
|
557
|
-
content: '';
|
|
558
|
-
position: absolute;
|
|
559
|
-
inset: 0;
|
|
560
|
-
border-radius: 100%;
|
|
561
|
-
background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
|
|
562
|
-
animation: ${Hs} 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
|
|
563
|
-
}
|
|
564
|
-
`,sc=({children:e,onClick:t,tooltip:r,size:o=36,withPing:n,pingColor:i,withBorder:a,backgroundColor:s,...l})=>Kt(nc,{text:r,children:Jt(ic,{$size:o,$withBorder:a,$backgroundColor:s,onClick:t,...l,children:[n&&Kt(ac,{$size:o,$color:i}),e]})}),lc=Yt.div`
|
|
565
|
-
position: relative;
|
|
566
|
-
&.animated {
|
|
567
|
-
overflow: hidden;
|
|
568
|
-
padding-bottom: 1px;
|
|
569
|
-
border-radius: 32px;
|
|
570
|
-
animation: ${({$isLeaving:e})=>e?js.out.bottom:js.in.bottom} ${({$duration:e})=>e/10}ms forwards;
|
|
571
|
-
}
|
|
572
|
-
`,cc=Yt.div`
|
|
573
|
-
position: absolute;
|
|
574
|
-
bottom: -1px;
|
|
575
|
-
left: 0;
|
|
576
|
-
z-index: -1;
|
|
577
|
-
width: 100%;
|
|
578
|
-
height: 100%;
|
|
579
|
-
border-radius: 32px;
|
|
580
|
-
background-color: ${({$type:e,theme:t})=>t.text[e]};
|
|
581
|
-
animation: ${Ws.out} ${({$duration:e})=>""+(e-e/10)}ms forwards;
|
|
582
|
-
`,dc=Yt.div`
|
|
583
|
-
display: flex;
|
|
584
|
-
align-items: center;
|
|
585
|
-
flex: 1;
|
|
586
|
-
gap: 8px;
|
|
587
|
-
padding: 0 12px;
|
|
588
|
-
border-radius: 32px;
|
|
589
|
-
background-color: ${({$type:e,theme:t})=>t.colors[e]};
|
|
590
|
-
`,pc=Yt.div`
|
|
591
|
-
display: flex;
|
|
592
|
-
align-items: center;
|
|
593
|
-
margin: 0 auto 0 0;
|
|
594
|
-
padding: 8px 0;
|
|
595
|
-
max-width: ${({$withAction:e,$overrideMaxWidth:t})=>t||(e?"400px":"500px")};
|
|
596
|
-
min-height: 12px;
|
|
597
|
-
`,uc=Yt(ri)`
|
|
598
|
-
font-size: 14px;
|
|
599
|
-
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
600
|
-
`,hc=Yt(ri)`
|
|
601
|
-
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
602
|
-
font-size: 12px;
|
|
603
|
-
`,mc=Yt(Mn)``,gc=Yt(ri)`
|
|
604
|
-
text-transform: uppercase;
|
|
605
|
-
text-decoration: underline;
|
|
606
|
-
font-size: 12px;
|
|
607
|
-
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
608
|
-
white-space: nowrap;
|
|
609
|
-
cursor: pointer;
|
|
610
|
-
&:hover {
|
|
611
|
-
transform: scale(1.1);
|
|
612
|
-
transition: transform 0.3s;
|
|
613
|
-
}
|
|
614
|
-
`,fc=({type:e,icon:t,title:r,message:o,action:n,onClose:i,duration:a=5e3,overrideMaxWidth:s,style:l})=>{const c=Zt(),[d,p]=Pt(!1),u=Ft(null),h=Ft(null),m=e=>{i&&(p(!0),i({asSeen:e?.asSeen}))};Lt(()=>(u.current=setTimeout(()=>m({asSeen:!1}),a),()=>{u.current&&clearTimeout(u.current)}),[a]);const g=t||nn(e,c);return Jt(lc,{className:i?"animated":"",$duration:a,$isLeaving:d,onMouseEnter:()=>{u.current&&clearTimeout(u.current),h.current&&(h.current.style.animationPlayState="paused")},onMouseLeave:()=>{if(h.current){const e=h.current.offsetWidth/h.current.parentElement.offsetWidth*a;u.current=setTimeout(()=>m({asSeen:!1}),e),h.current.style.animationPlayState="running"}},children:[Jt(dc,{"data-id":"toast",$type:e,style:l,children:[Kt(g,{fill:c.text[e]}),Jt(pc,{$withAction:!!n,$overrideMaxWidth:s,children:[r&&Kt(uc,{$type:e,children:r}),r&&o&&Kt(Gl,{orientation:"vertical",type:e}),o&&Kt(hc,{$type:e,children:o})]}),(!!n||!!i)&&Jt(mc,{children:[n&&Kt(gc,{"data-id":"toast-action",onClick:n.onClick,children:n.label}),i&&Kt(sc,{"data-id":"toast-close",onClick:()=>m({asSeen:!0}),children:Kt(ct,{size:12})})]})]}),i&&Kt(cc,{ref:h,$duration:a,$type:e})]})},xc=Yt.div`
|
|
615
|
-
padding: 24px 32px;
|
|
616
|
-
`,yc=Yt.div`
|
|
617
|
-
padding: ${({$withNote:e})=>e?"12px 0px":"12px 0px 32px 0"};
|
|
618
|
-
`,bc=Yt(ri)`
|
|
619
|
-
font-size: 20px;
|
|
620
|
-
line-height: 28px;
|
|
621
|
-
`,$c=Yt(ri)`
|
|
622
|
-
color: ${({theme:e})=>e.text.grey};
|
|
623
|
-
width: 416px;
|
|
624
|
-
font-style: normal;
|
|
625
|
-
font-weight: 300;
|
|
626
|
-
line-height: 24px;
|
|
627
|
-
`,vc=Yt.div`
|
|
628
|
-
display: flex;
|
|
629
|
-
justify-content: space-between;
|
|
630
|
-
gap: 12px;
|
|
631
|
-
`,wc=Yt(Zs)`
|
|
632
|
-
width: 250px;
|
|
633
|
-
`,Sc=Yt.div`
|
|
634
|
-
margin-bottom: 12px;
|
|
635
|
-
`,kc=({isOpen:e,noOverlay:t,title:r="",description:o="",note:n,approveButton:i,denyButton:a,closeOnEscape:s=!0})=>{fl({key:"Enter",active:e&&s},()=>i.onClick());const l=()=>a.onClick();return Kt(Hl,{isOpen:e,noOverlay:t,onClose:l,children:Jt(xc,{children:[Kt(bc,{children:r}),Kt(yc,{$withNote:!!n,children:Kt($c,{children:o})}),!!n&&Kt(Sc,{children:Kt(fc,{type:n.type,title:n.title,message:n.message})}),Jt(vc,{children:[Kt(wc,{"data-id":"approve",variant:i.variant||"primary",onClick:()=>i.onClick(),children:i.text}),Kt(wc,{"data-id":"deny",variant:a.variant||"secondary",onClick:l,children:a.text})]})]})})},Cc=({isOpen:e,noOverlay:t,name:r,onApprove:o,onDeny:n})=>Kt(kc,{isOpen:e,noOverlay:t,title:"Cancel"+(r?` ${r}`:""),description:"Are you sure you want to cancel?",approveButton:{text:"Confirm",variant:Xr.Warning,onClick:o},denyButton:{text:"Go Back",onClick:n}}),Ec=Yt.div`
|
|
636
|
-
display: flex;
|
|
637
|
-
align-items: center;
|
|
638
|
-
gap: 8px;
|
|
639
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
640
|
-
opacity: ${({$disabled:e})=>e?.6:1};
|
|
641
|
-
`,Ac=Yt.div`
|
|
642
|
-
width: 18px;
|
|
643
|
-
height: 18px;
|
|
644
|
-
border-radius: 6px;
|
|
645
|
-
border: 1px dashed ${({$isChecked:e,$isPartiallyChecked:t,theme:r})=>e||t?"transparent":r.colors.secondary};
|
|
646
|
-
display: flex;
|
|
647
|
-
align-items: center;
|
|
648
|
-
justify-content: center;
|
|
649
|
-
background-color: ${({$isChecked:e,$isPartiallyChecked:t,theme:r})=>e?r.colors.majestic_blue:t?r.colors.majestic_blue_soft:r.colors.secondary+Bs["020"]};
|
|
650
|
-
pointer-events: ${({$disabled:e})=>e?"none":"auto"};
|
|
651
|
-
transition: border 0.3s;
|
|
652
|
-
&:hover {
|
|
653
|
-
border: 1px solid ${({theme:e})=>e.colors.secondary};
|
|
654
|
-
}
|
|
655
|
-
`,Tc=({title:e,titleColor:t,tooltip:r,value:o=!1,partiallyChecked:n=!1,onChange:i,disabled:a,style:s,errorMessage:l,allowPropagation:c=!1})=>{const d=Zt(),[p,u]=Pt(o);Lt(()=>u(o),[o]);return Jt(Bn,{children:[Jt(Ec,{"data-id":"checkbox"+(e?`-${e}`:""),$disabled:a,onClick:e=>{a||(c||e.stopPropagation(),i?i(!!n||!p):u(e=>!!n||!e))},style:s,children:[Kt(Ac,{$isChecked:p,$isPartiallyChecked:n,$disabled:a,children:n?Kt(dt,{fill:d.text.white}):p?Kt(st,{fill:d.text.white}):null}),e&&Kt(nc,{text:r,withIcon:!0,children:Kt(ri,{size:12,color:t||d.text.grey,style:{maxWidth:"90%"},children:e})})]}),!!l&&Kt(ii,{children:l})]})},Dc=Yt(Mn)`
|
|
656
|
-
gap: 0;
|
|
657
|
-
`,Nc=Yt.button`
|
|
658
|
-
padding: 4px 8px;
|
|
659
|
-
background-color: ${({theme:e,$selected:t})=>t?e.colors.dropdown_bg_2:"transparent"};
|
|
660
|
-
border-radius: ${({$position:e})=>"left"===e?"32px 0px 0px 32px":"right"===e?"0px 32px 32px 0px":"0"};
|
|
661
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
662
|
-
display: flex;
|
|
663
|
-
align-items: center;
|
|
664
|
-
justify-content: center;
|
|
665
|
-
cursor: pointer;
|
|
666
|
-
&:hover {
|
|
667
|
-
border: 1px solid ${({theme:e})=>e.colors.secondary};
|
|
668
|
-
}
|
|
669
|
-
`,Ic=({isPrettyMode:e,setIsPrettyMode:t})=>Jt(Dc,{children:[Kt(Nc,{$position:"left",$selected:e,onClick:()=>t(!0),children:Kt(pt,{})}),Kt(Nc,{$position:"right",$selected:!e,onClick:()=>t(!1),children:Kt(ut,{})})]}),Rc=Yt.table`
|
|
670
|
-
border-collapse: collapse;
|
|
671
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
672
|
-
`,Oc=Yt.tbody``,_c=Yt.tr`
|
|
673
|
-
td:first-child {
|
|
674
|
-
padding-left: 0 !important;
|
|
675
|
-
}
|
|
676
|
-
td:last-child {
|
|
677
|
-
padding-right: 0 !important;
|
|
678
|
-
}
|
|
679
|
-
`,Pc=Yt.td`
|
|
680
|
-
vertical-align: top;
|
|
681
|
-
padding: 4px 6px;
|
|
682
|
-
`,Lc=Yt(ri)`
|
|
683
|
-
white-space: nowrap;
|
|
684
|
-
`,Fc=Yt.span`
|
|
685
|
-
white-space: ${({$noWrap:e})=>e?"nowrap":"pre-wrap"};
|
|
686
|
-
overflow-wrap: break-word;
|
|
687
|
-
word-break: break-word;
|
|
688
|
-
word-wrap: break-word;
|
|
689
|
-
/* Fallback for older browsers */
|
|
690
|
-
-ms-word-break: break-all;
|
|
691
|
-
font-size: 12px;
|
|
692
|
-
`,zc=({language:e,code:t,theme:r,flatten:o,pretty:n})=>{const{darkMode:i}=Zt(),a=r?ur[r]:i?ur.palenight:ur.vsLight;let s="";if("json"===e){const e=un(t,{}),r=In(e);s=Rn(o?Do(r):r)}else s=t;return n&&"json"===e?Kt(Mc,{darkMode:i,str:s}):Kt(pr,{theme:a||(i?ur.palenight:ur.vsLight),language:e,code:s,children:({getLineProps:e,getTokenProps:t,tokens:r})=>Kt("pre",{children:r.map((r,o)=>Kt("div",{...e({line:r}),children:r.map((e,r)=>Kt(Fc,{...t({token:e})},`line-${o}-token-${r}`))},`line-${o}`))})})},Mc=({darkMode:e,str:t})=>{const r=Zt(),o=(e,t)=>{const o=new Array(e).fill(e=>Jt(_c,{...e,children:[Kt(Pc,{}),Kt(Pc,{})]}));return Kt(Ot,{children:o.map((e,o)=>Kt(e,{style:0===o?{borderBottom:`1px solid ${r.colors.border}`}:{}},`empty-row-${t}-${o}`))})};return Kt(pr,{theme:e?ur.palenight:ur.vsLight,language:"json",code:t,children:({getLineProps:e,getTokenProps:t,tokens:n})=>Kt(Rc,{children:Kt(Oc,{children:n.map((n,i)=>{const a=(e=>{const t=["punctuation","plain","operator"];return e.filter(e=>!t.includes(e.types[0])).map(({types:e,content:t})=>{const r=[...e],o=["property","string"].includes(r[0])?t.replace(/"/g,""):t;return"string"===r[0]&&(["true","false"].includes(o.split("@")[0])&&(r[0]="boolean"),o.split("@")[0].match(/^[0-9]+$/)&&(r[0]="number")),{types:r,content:o}})})(n),s=e({line:a});return 1===a.length&&"property"===a[0].types[0]?Jt(Ot,{children:[o(2,i),Jt(_c,{...s,children:[Kt(Pc,{children:Kt(Lc,{children:a[0].content})}),Kt(Pc,{})]})]},`line-${i}`):2===a.length?Kt(_c,{...s,children:a.map((e,o)=>{const{text:n,components:a}=((e,t)=>{const[r,...o]=e.split("@");return{text:r,components:o?.map((e,r)=>{if(!e.includes("="))return null;const[o,n]=e.split("=");switch(o){case"tooltip":return Kt(nc,{withIcon:!0,text:n},`${o}-${n}-${r}`);case"status":if("none"===n)return Kt("div",{style:{width:16,height:16}},`${o}-${n}-${r}`);let e=nn(n,t);return e||(e=nn(Xr.Warning,t)),Kt(e,{},`${o}-${n}-${r}`);default:return null}})?.filter(e=>!!e)||[]}})(e.content,r),s=0===o;return Kt(Pc,{children:Jt(Mn,{children:[Kt(Mn,{children:a}),Kt(Fc,{$noWrap:s,...t({token:e}),children:n})]})},`line-${i}-token-${o}`)})},`line-${i}`):(a.length,null)})})})})},Bc={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 Uc(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const r=(e.match(/^[0-9.]*/)||"").toString();t=r.includes(".")?parseFloat(r):parseInt(r,10);const o=(e.match(/[^0-9]*$/)||"").toString();return Bc[o]?{value:t,unit:o}:{value:t,unit:"px"}}function jc(e){const t=Uc(e);return`${t.value}${t.unit}`}const Wc=((e,t,r)=>{const o=`react-spinners-${e}-${r}`;if("undefined"==typeof window||!window.document)return o;const n=document.createElement("style");document.head.appendChild(n);const i=n.sheet,a=`\n @keyframes ${o} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),o})("FadeLoader","50% {opacity: 0.3} 100% {opacity: 1}","fade"),Hc=({loading:e=!0,color:t,scale:r=1,speedMultiplier:o=1,cssOverride:n={},style:i={},...a})=>{const s=Zt(),l=t||s.text.secondary;if(!e)return null;const{value:c}=Uc(2),d=c+4.2,p=d/2+d/5.5,u=4*d*r,h={position:"relative",width:`${u}px`,height:`${u}px`,scale:r,...i,...n},m=(e,t)=>({position:"absolute",width:jc(1.5),height:jc(4),borderRadius:jc(2),backgroundColor:l,transition:"2s",animationFillMode:"both",animation:`${Wc} ${1.2/o}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return Jt("span",{style:h,...a,children:[Kt("span",{style:{...m(1,0),top:`calc(50% + ${d}px)`,left:"50%"}}),Kt("span",{style:{...m(2,-45),top:`calc(50% + ${p}px)`,left:`calc(50% + ${p}px)`}}),Kt("span",{style:{...m(3,90),top:"50%",left:`calc(50% + ${d}px)`}}),Kt("span",{style:{...m(4,45),top:`calc(50% + ${-1*p}px)`,left:`calc(50% + ${p}px)`}}),Kt("span",{style:{...m(5,0),top:`calc(50% + ${-1*d}px)`,left:"50%"}}),Kt("span",{style:{...m(6,-45),top:`calc(50% + ${-1*p}px)`,left:`calc(50% + ${-1*p}px)`}}),Kt("span",{style:{...m(7,90),top:"50%",left:`calc(50% + ${-1*d}px)`}}),Kt("span",{style:{...m(8,45),top:`calc(50% + ${p}px)`,left:`calc(50% + ${-1*p}px)`}})]})},Xc=Yt.div`
|
|
693
|
-
margin: ${({$align:e})=>"right"===e?"auto 6px auto auto":"left"===e?"auto auto auto 6px":"auto"};
|
|
694
|
-
display: flex;
|
|
695
|
-
align-items: center;
|
|
696
|
-
justify-content: center;
|
|
697
|
-
`,Gc=({extend:e,size:t=14,align:r="center"})=>Kt(Xc,{$align:r,children:Kt(ht,{size:t,rotate:e?180:0})}),Vc=Yt.div`
|
|
698
|
-
border-radius: 24px;
|
|
699
|
-
background-color: ${({theme:e,$status:t})=>t===Xr.Error?e.text.error+Bs["010"]:t===Xr.Warning?e.text.warning+Bs["010"]:e.colors.secondary+Bs["005"]};
|
|
700
|
-
&:hover {
|
|
701
|
-
background-color: ${({theme:e,$status:t})=>t===Xr.Error?e.text.error+Bs["020"]:t===Xr.Warning?e.text.warning+Bs["020"]:e.colors.secondary+Bs["010"]};
|
|
702
|
-
}
|
|
703
|
-
cursor: pointer;
|
|
704
|
-
transition: background 0.3s;
|
|
705
|
-
`,Kc=Yt.div`
|
|
706
|
-
display: flex;
|
|
707
|
-
align-items: center;
|
|
708
|
-
gap: 12px;
|
|
709
|
-
padding: 12px 18px;
|
|
710
|
-
`,Jc=Yt.div`
|
|
711
|
-
display: flex;
|
|
712
|
-
flex-direction: column;
|
|
713
|
-
gap: 8px;
|
|
714
|
-
padding: 6px 18px 12px 18px;
|
|
715
|
-
`,qc=Yt.div`
|
|
716
|
-
display: flex;
|
|
717
|
-
align-items: center;
|
|
718
|
-
gap: 12px;
|
|
719
|
-
`,Yc=Yt(ri)`
|
|
720
|
-
white-space: nowrap;
|
|
721
|
-
`,Qc=Yt(Bn)`
|
|
722
|
-
width: 16px;
|
|
723
|
-
`,Zc=({conditions:e,headerLabelError:t="Something Failed",headerLabelWarning:r="Something isn't right",headerLabelSuccess:o="Everything Successful"})=>{const n=Zt(),[i,a]=Pt(!1),s=_t(()=>Sn(e),[e]),{errors:l,hasErrors:c,warnings:d,hasWarnings:p,hasDisableds:u,hasLoadings:h}=_t(()=>_o(s),[s]);Lt(()=>{a(c||p||u)},[c,p,u]);const m=(!s.length||h)&&!c&&!p&&!u,g=c?Xr.Error:p?Xr.Warning:u?Xr.Info:Xr.Success,f=nn(g,n),x=c?t:p||u?r:m?"Loading...":o,y=c?n.text.error:p?n.text.warning:n.text.info,b=`(${c?l.length:p?d.length:s.length}/${s.length})`,$=c?n.text.error_secondary:p?n.text.warning_secondary:n.text.info_secondary,v=zt(()=>a(e=>!e),[]);return Jt(Vc,{onClick:v,$status:g,children:[Jt(Kc,{children:[Kt(m?Hc:f,{}),Kt(ri,{color:y,size:14,children:x}),Kt(ri,{color:$,size:12,family:"secondary",children:b}),Kt(Gc,{extend:i,align:"right"})]}),i&&Kt(Jc,{children:s.map(({status:e,type:t,reason:r,message:o},i)=>{const a=e===Vr.Loading?()=>Kt(Hc,{scale:.8}):e===Vr.Disabled?nn(Xr.Info,n):nn(e,n),s=e===Vr.Disabled?n.text.info:e===Xr.Error?n.text.error:e===Xr.Warning?n.text.warning:n.text.info,l=e===Vr.Disabled?n.text.info_secondary:e===Xr.Error?n.text.error_secondary:e===Xr.Warning?n.text.warning_secondary:n.text.info_secondary;return Jt(qc,{children:[Kt(Qc,{children:Kt(a,{})}),Jt(ri,{color:s,size:12,children:[Kt(Yc,{color:l,size:12,weight:700,children:t}),o||r]})]},`condition-${i}`)})})]})},ed=Yt.div`
|
|
724
|
-
display: flex;
|
|
725
|
-
align-items: center;
|
|
726
|
-
gap: ${({$size:e})=>e/3}px;
|
|
727
|
-
padding: ${({$size:e,$withBorder:t,$withBackground:r})=>t||r?`${e/(t?3:2)}px ${e/(t?1.5:1)}px`:"0"};
|
|
728
|
-
width: ${({$width:e})=>e||"fit-content"};
|
|
729
|
-
border-radius: 360px;
|
|
730
|
-
border: ${({$withBorder:e,$status:t,theme:r})=>e?`1px solid ${r.text[t]+Bs["050"]}`:"none"};
|
|
731
|
-
background: ${({$withBackground:e,$status:t,theme:r})=>e?`linear-gradient(90deg, transparent 0%, ${r.text[t]+Bs["030"]} 100%)`:"transparent"};
|
|
732
|
-
`,td=Yt.div`
|
|
733
|
-
display: flex;
|
|
734
|
-
align-items: center;
|
|
735
|
-
`,rd=Yt.div`
|
|
736
|
-
display: flex;
|
|
737
|
-
align-items: center;
|
|
738
|
-
`,od=({title:e,subtitle:t,status:r=Xr.Default,forceIcon:o,withIcon:n,withBorder:i,withBackground:a,width:s,size:l=12,family:c="secondary",nowrap:d=!1})=>{const p=Zt(),u=[Vr.Loading,Vr.Disabled].includes(r)?Xr.Info:r,h=o?()=>Kt(o,{size:l+2,fill:p.text[u]}):r===Vr.Loading?()=>Kt(Hc,{scale:.8}):()=>nn(u,p)?.({size:l+2});return Jt(ed,{$status:u,$width:s,$size:l,$withIcon:n,$withBorder:i,$withBackground:a,children:[n&&Kt(td,{children:Kt(h,{})}),(!!e||!!t)&&Jt(rd,{children:[!!e&&Kt(ri,{size:l,family:c,color:p.text[u],nowrap:d,children:e}),!!e&&!!t&&Kt(Gl,{orientation:"vertical",length:l-2+"px",type:u}),!!t&&Kt(ri,{size:l-2,family:c,color:p.text[`${u}_secondary`],nowrap:d,children:t})]})]})},nd=({label:e,onClick:t,variant:r="tertiary",textProps:o,...n})=>{const i=Zt();return Jt(Zs,{onClick:t,variant:r,...n,children:[Kt(mt,{fill:"primary"===r?i.text.primary:i.text.info}),Kt(ri,{size:14,family:"secondary",decoration:"underline",color:"primary"===r?i.text.primary:void 0,...o,children:e||Ao.ADD})]})},id=Yt(Mn)`
|
|
739
|
-
width: 100%;
|
|
740
|
-
border-radius: 8px;
|
|
741
|
-
background-color: ${({theme:e})=>e.colors.secondary+Bs["010"]};
|
|
742
|
-
pre {
|
|
743
|
-
color: ${({theme:e})=>e.text.default};
|
|
744
|
-
font-size: 12px;
|
|
745
|
-
overflow-x: auto;
|
|
746
|
-
width: 100%;
|
|
747
|
-
padding-left: 12px;
|
|
748
|
-
}
|
|
749
|
-
`,ad=({value:e,callbackCopyDone:t})=>{const{clickCopy:r,isCopied:o}=dl();return Jt(id,{children:[Kt("pre",{children:e}),Kt(sc,{onClick:o=>{o.stopPropagation(),r(e),t?.()},tooltip:o?"Copied!":"Copy",children:Kt(o?st:lt,{})})]})},sd=({label:e,onClick:t,variant:r="tertiary",...o})=>{const n=Zt();return Jt(Zs,{onClick:t,variant:r,...o,children:[Kt(gt,{fill:"primary"===r?n.text.primary:n.text.info}),Kt(ri,{size:14,family:"secondary",decoration:"underline",color:"primary"===r?n.text.primary:void 0,children:e||Ao.EDIT})]})},ld=({onClick:e})=>Kt(fc,{type:Xr.Default,icon:Ve,message:Eo.QUICK_BACK_TO_SUMMARY,action:{label:Eo.GO_TO_SUMMARY,onClick:e}}),cd=Yt(ri)`
|
|
750
|
-
max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
|
|
751
|
-
white-space: nowrap;
|
|
752
|
-
overflow-x: auto;
|
|
753
|
-
|
|
754
|
-
&::after {
|
|
755
|
-
// This is to prevent the "browser default tooltip" from appearing when the title is too long
|
|
756
|
-
content: '';
|
|
757
|
-
display: block;
|
|
758
|
-
}
|
|
759
|
-
`,dd=({maxWidth:e,text:t,textSize:r=16,textColor:o})=>{const[n,i]=Pt(!1),a=Ft(null);return Lt(()=>{if(a.current){const{clientWidth:t}=a.current;i(t<1.05*(e-r)&&t>.95*(e-r))}},[e,r,t]),Jt(Mn,{$gap:0,children:[t&&Kt(nc,{text:n?t:void 0,children:Kt(cd,{ref:a,$maxWidth:e-r,size:r,color:o,children:t})}),n&&Kt(cd,{$maxWidth:r,size:r,color:o,children:"..."})]})},pd=({src:e="",alt:t="",size:r=16})=>{const[o,n]=Pt(!1);return e&&!o?Kt("img",{src:e,alt:t,width:r,height:r,onError:()=>n(!0)}):Kt(s,{size:r})},ud=Yt.div`
|
|
760
|
-
display: flex;
|
|
761
|
-
align-items: center;
|
|
762
|
-
justify-content: center;
|
|
763
|
-
width: ${({$size:e})=>e}px;
|
|
764
|
-
height: ${({$size:e})=>e}px;
|
|
765
|
-
border-radius: 8px;
|
|
766
|
-
background: ${({$status:e,theme:t})=>{const r=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${r} 0%, ${r+Bs["030"]} 100%)`}};
|
|
767
|
-
`,hd=({icon:e,src:t="",alt:r="",status:o,size:n=36})=>Kt(ud,{$status:o,$size:n,children:t?Kt(pd,{src:t,alt:r,size:n-12}):Kt(e||s,{size:n-12})}),md=Yt.div`
|
|
768
|
-
position: relative;
|
|
769
|
-
display: flex;
|
|
770
|
-
flex-wrap: wrap;
|
|
771
|
-
align-items: center;
|
|
772
|
-
justify-content: center;
|
|
773
|
-
width: ${({$size:e})=>e}px;
|
|
774
|
-
height: ${({$size:e})=>e}px;
|
|
775
|
-
`,gd=Yt.div`
|
|
776
|
-
position: absolute;
|
|
777
|
-
top: ${({$top:e})=>e}px;
|
|
778
|
-
left: ${({$left:e})=>e}px;
|
|
779
|
-
z-index: ${({$zIndex:e})=>e};
|
|
780
|
-
display: flex;
|
|
781
|
-
align-items: center;
|
|
782
|
-
justify-content: center;
|
|
783
|
-
width: ${({$size:e})=>e}px;
|
|
784
|
-
height: ${({$size:e})=>e}px;
|
|
785
|
-
border-radius: 100%;
|
|
786
|
-
border: 1px solid ${({theme:e,$status:t})=>(t?e.text[t]:e.colors.border)+Bs["030"]};
|
|
787
|
-
background: ${({$status:e,theme:t})=>{const r=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${r} 0%, ${r+Bs["030"]} 100%)`}};
|
|
788
|
-
`,fd=({icons:e=[],iconSrcs:t=[],status:r,size:o=36,id:n})=>{const i=Zt(),a=1===e.length||1===t.length?o-12:o/2.7;if(t.length>0)return Kt(fd,{icons:t.map(e=>()=>Kt(pd,{src:e,size:a})),status:r,size:o,id:n});if(1===e.length)return Kt(hd,{icon:e[0],status:r,size:o});const s=t=>e.length<=2?.5*a:0===t||1===t?0:1.15*a,l=e=>0===e?0:1===e?1.15*a:1.15*a*.5;return Kt(md,{$status:r,$size:o,children:e.map((t,o)=>o>2?null:Kt(gd,{$status:r,$size:1.5*a,$top:s(o),$left:l(o),$zIndex:o+1,children:2===o&&e.length>3?Jt(ri,{family:"secondary",color:i.text.dark_grey,size:.8*a,children:["+",e.length-2]}):Kt(t,{size:a})},`icon-${n}-${o}`))})},xd=ps.map(({id:e})=>e),yd=({monitors:e=xd,withTooltips:t,withLabels:r,size:o=12,color:n})=>{const i=Zt(),a=n||i.text.grey;return Kt(Mn,{$gap:r?o:o/2,children:e.map(e=>{const n=fr(e.toLowerCase()),i=Yo(e);return i?Kt(nc,{text:t?n:"",children:Jt(Mn,{$gap:o/3,children:[Kt(i,{size:r?o+2:o,fill:a}),r&&Kt(ri,{size:o,color:a,children:n})]})},e):null})})},bd=Yt.div`
|
|
789
|
-
visibility: hidden;
|
|
790
|
-
`,$d=Yt.div`
|
|
791
|
-
display: flex;
|
|
792
|
-
flex-direction: column;
|
|
793
|
-
align-self: stretch;
|
|
794
|
-
padding: 16px;
|
|
795
|
-
width: calc(100% - 32px);
|
|
796
|
-
border-radius: 16px;
|
|
797
|
-
background-color: ${({theme:e,$status:t,$bgColor:r})=>r||(t?e.text[t]+Bs["010"]:e.colors.secondary+Bs["005"])};
|
|
798
|
-
opacity: ${({$faded:e})=>e?.5:1};
|
|
799
|
-
|
|
800
|
-
${({theme:e,$status:t,$bgColorHover:r,$withClick:o})=>o?Qt`
|
|
801
|
-
&:hover {
|
|
802
|
-
cursor: pointer;
|
|
803
|
-
background-color: ${r||(t?e.text[t]+Bs["020"]:e.colors.secondary+Bs["010"])};
|
|
804
|
-
${bd} {
|
|
805
|
-
visibility: visible;
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
`:`\n &:hover {\n ${bd} {\n visibility: visible;\n }\n }\n `}
|
|
809
|
-
`,vd=Yt.div`
|
|
810
|
-
display: flex;
|
|
811
|
-
align-items: center;
|
|
812
|
-
gap: 8px;
|
|
813
|
-
margin-left: auto;
|
|
814
|
-
`,wd=Yt(ri)`
|
|
815
|
-
margin-right: 16px;
|
|
816
|
-
`,Sd=Yt(ri)`
|
|
817
|
-
font-size: 10px;
|
|
818
|
-
color: ${({theme:e})=>e.text.grey};
|
|
819
|
-
`,kd=({title:e,subTitle:t,hoverText:r,onClick:o,renderActions:n,iconProps:{icon:i,icons:a,iconSrc:s,iconSrcs:l}={},visualProps:{status:c,faded:d,bgColor:p,bgColorHover:u,monitors:h,monitorsWithLabels:m,componentsUnderTitles:g}={},checkboxProps:{withCheckbox:f,isCheckboxDisabled:x,isChecked:y,isLoading:b,onCheckboxChange:$}={},extendableProps:{withExtend:v,isExtended:w,renderExtended:S}={},...k})=>{const C=Zt(),[E,A]=Pt(w||!1),[T,D]=Pt(0),N=Ft(null),I=Ft(null),R=Ft(null);return Lt(()=>{if(N.current){const e=N.current.clientWidth,t=I.current?.clientWidth||0;D(e-((f?125:85)+t))}},[f]),Jt($d,{ref:N,$status:c,$faded:d,$bgColor:p,$bgColorHover:u,$withClick:!!o,onClick:o,...k,children:[Jt(Mn,{$gap:8,children:[Jt(Mn,{$gap:16,children:[b?Kt(Hc,{}):f?Kt(Tc,{value:y,onChange:$,disabled:x}):null,a?.length||l?.length?Kt(fd,{icons:a,iconSrcs:l,status:c,id:`${e}-${t}`}):i||s?Kt(hd,{icon:i,src:s,status:c}):null]}),Jt(Bn,{$gap:4,children:[e&&Kt(dd,{maxWidth:T,text:e,textSize:14}),Jt(Mn,{$gap:4,children:[t&&Kt(dd,{maxWidth:T-(R.current?.clientWidth||0),text:t,textSize:10,textColor:C.text.grey}),h&&h.length>0&&Jt(Mn,{$gap:4,ref:R,children:[t&&Kt(Sd,{children:"•"}),Kt(yd,{monitors:h,withLabels:m,size:10})]})]}),g&&g.length>0?Kt(Mn,{$gap:4,children:g?.map((e,t)=>Kt(Ot,{children:e},`componentsUnderTitles-${t}`))}):null]}),Jt(vd,{ref:I,children:[!!r&&Kt(bd,{children:Kt(wd,{size:14,family:"secondary",children:r})}),n&&n(),v&&Jt(Ot,{children:[Kt(Gl,{orientation:"vertical",length:"16px",margin:"0 2px"}),Kt(sc,{onClick:()=>A(e=>!e),children:Kt(Gc,{extend:E})})]})]})]}),E&&S&&Jt(Bn,{children:[Kt(Gl,{margin:"16px 0"}),S()]})]})},Cd=Yt(Mn)`
|
|
820
|
-
width: 100%;
|
|
821
|
-
justify-content: space-between;
|
|
822
|
-
`,Ed=Yt(ri)`
|
|
823
|
-
font-size: 12px;
|
|
824
|
-
color: ${({theme:e})=>e.text.grey};
|
|
825
|
-
`,Ad=Yt(ri)`
|
|
826
|
-
font-size: 10px;
|
|
827
|
-
color: ${({theme:e})=>e.text.darker_grey};
|
|
828
|
-
`,Td=Yt.div`
|
|
829
|
-
display: flex;
|
|
830
|
-
align-items: center;
|
|
831
|
-
gap: 8px;
|
|
832
|
-
margin-left: auto;
|
|
833
|
-
`,Dd=Yt(ri)`
|
|
834
|
-
font-size: 12px;
|
|
835
|
-
text-align: right;
|
|
836
|
-
`,Nd=({title:e,subTitle:t,tooltip:r,value:o})=>Jt(Cd,{children:[Kt(Bn,{$gap:4,children:Jt(nc,{text:r||"",children:[e&&Kt(Ed,{children:e},"title"),t&&Kt(Ad,{children:t},"subtitle")]})}),Kt(Td,{children:o?.status?Kt(od,{status:"transitioning"===o.status?Vr.Loading:o.status,title:o.text||o.status,withBorder:!0,withIcon:!0}):Kt(Dd,{children:o?.text||"-"})})]}),Id=Yt(Bn)`
|
|
837
|
-
width: 100%;
|
|
838
|
-
`,Rd=({containerName:e,actualDevices:t,started:r,ready:o,instrumentationInstances:n})=>{const i=_t(()=>{const e=[];return r?.name&&e.push(Kt(od,{status:yn(r.value)?Tn(r.value)?Xr.Success:Xr.Error:Xr.Default,title:r.name,withIcon:!0,withBorder:!0,size:8},"started")),o?.name&&e.push(Kt(od,{status:yn(o.value)?Tn(o.value)?Xr.Success:Xr.Error:Xr.Default,title:o.name,withIcon:!0,withBorder:!0,size:8},"ready")),e},[r?.name,r?.value,o?.name,o?.value]);return Kt(kd,{title:e.value,subTitle:n.length?`${n.length} Instrumented Processes`:void 0,visualProps:{componentsUnderTitles:i},renderActions:()=>Kt(od,{status:Xr.Info,title:"Instrumentation Device",subtitle:t.value&&"[]"!==t.value?t.value:"none",withBorder:!0}),extendableProps:{isExtended:!!n.length,renderExtended:()=>Kt(Id,{$gap:24,children:n.map((e,t)=>Jt(Id,{$gap:8,children:[Kt(Nd,{title:`Instrumented Process #${t+1}`,subTitle:e.message?.value||"",value:{status:e.healthy.status,text:e.healthy.status===Xr.Success?"healthy":"unhealthy"}}),e.identifyingAttributes?.map(({name:e,value:t})=>Kt(Nd,{title:e,subTitle:"",value:{text:t,status:void 0}},`describe-${e}-${t}`))]},`process-${t}`))})}})},Od=({title:e="Data not found",subTitle:t})=>{const r=Zt().v2.colors.grey[400];return Jt(Un,{children:[Jt(Mn,{$gap:8,children:[Kt(ft,{fill:r}),Kt(Yn,{size:Jn.XS,color:r,align:"center",children:e})]}),t&&Kt(Yn,{size:Jn.XXS,color:r,align:"center",children:t})]})},_d=Yt(Bn)`
|
|
839
|
-
max-width: 300px;
|
|
840
|
-
padding: 12px;
|
|
841
|
-
border-radius: 12px;
|
|
842
|
-
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
843
|
-
justify-content: center;
|
|
844
|
-
`,Pd=jt(({id:e,data:t})=>{const{title:r,subTitle:o}=t;return Kt(_d,{"data-id":e,children:Kt(Od,{title:r,subTitle:o})})});Pd.displayName=Pd.name;const Ld=Yt.div`
|
|
845
|
-
padding: 6px;
|
|
846
|
-
border-radius: 12px;
|
|
847
|
-
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
848
|
-
cursor: pointer;
|
|
849
|
-
${({$isVirtual:e,theme:t})=>e&&`\n border: 1px dashed ${t.colors.border};\n opacity: 0.8;\n `}
|
|
850
|
-
`,Fd=Yt.div`
|
|
851
|
-
position: relative;
|
|
852
|
-
`,zd=Yt.div`
|
|
853
|
-
position: absolute;
|
|
854
|
-
top: 100%;
|
|
855
|
-
margin-top: 4px;
|
|
856
|
-
left: 50%;
|
|
857
|
-
transform: translateX(-50%);
|
|
858
|
-
display: flex;
|
|
859
|
-
flex-direction: column;
|
|
860
|
-
align-items: center;
|
|
861
|
-
gap: 2px;
|
|
862
|
-
width: 140px;
|
|
863
|
-
text-align: center;
|
|
864
|
-
`,Md=jt(({id:e,data:t})=>{const{id:r,status:o,title:n,icons:i,isVirtual:a}=t,s=Zt(),l=a||o!==Xr.Error?null:nn(o,s);return Jt(qt,{children:[Kt(rr,{type:"source",position:or.Right,style:{visibility:"hidden"}}),Kt(rr,{type:"target",position:or.Left,style:{visibility:"hidden"}}),Jt(Fd,{"data-id":e,children:[Kt(Ld,{$isVirtual:a,children:Kt(fd,{id:r,icons:i,status:a?void 0:o})}),Jt(zd,{children:[l&&Kt(l,{}),Kt(ri,{size:12,style:{textAlign:"center",wordBreak:"break-word",lineHeight:"1.3"},children:n})]})]})]})});Md.displayName=Md.name;const Bd={duration:300,padding:.1,includeHiddenNodes:!0},Ud=Yt.div`
|
|
865
|
-
height: 100%;
|
|
866
|
-
.react-flow__attribution {
|
|
867
|
-
visibility: hidden;
|
|
868
|
-
}
|
|
869
|
-
`,jd=Yt.div`
|
|
870
|
-
button {
|
|
871
|
-
padding: 8px;
|
|
872
|
-
margin: 8px;
|
|
873
|
-
border-radius: 8px;
|
|
874
|
-
border: 1px solid ${({theme:e})=>e.colors.border} !important;
|
|
875
|
-
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
876
|
-
path {
|
|
877
|
-
fill: ${({theme:e})=>e.text.secondary};
|
|
878
|
-
}
|
|
879
|
-
&:hover {
|
|
880
|
-
background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
881
|
-
}
|
|
882
|
-
&:last-child svg {
|
|
883
|
-
transform: scale(1.4);
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
`,Wd={[qr.MapItem]:Md,[qr.NoData]:Pd},Hd=({trigger:e})=>{const{fitView:t}=lr(),r=Ft(!0);return Lt(()=>{r.current?r.current=!1:e>0&&requestAnimationFrame(()=>t(Bd))},[e,t]),null},Xd=({nodes:e,edges:t,onNodesChange:r,onEdgesChange:o,fitViewTrigger:n=0,zoomOnScroll:i=!1,onEdgeClick:a,onNodeMouseEnter:s,onNodeMouseLeave:l,onRefresh:c})=>{const{onClickNode:d}=nl(),{setActiveNodeType:p,setActiveNodeId:u}=vi();return Jt(ir,{zoomOnScroll:i,nodes:e,nodeTypes:Wd,edges:t,onNodeClick:d,onEdgeClick:a,onNodeMouseEnter:s,onNodeMouseLeave:l,onNodesChange:r,onEdgesChange:o,onBlur:()=>{p(null),u(null)},children:[Kt(Hd,{trigger:n}),Kt(jd,{children:Kt(ar,{position:"bottom-right",orientation:"horizontal",showInteractive:!1,showZoom:!0,showFitView:!0,fitViewOptions:Bd,children:c&&Kt(sr,{onClick:c,children:Kt(xt,{size:20})})})})]})},Gd=e=>Kt(Ud,{children:Kt(nr,{children:Kt(Xd,{...e})})});function Vd(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 Kd(e){if(!e.sourceScopes.length)return null;const t=[];for(const r of e.sourceScopes)if("source"===r.scopeType&&r.workloadName){const e={workloadName:r.workloadName};r.workloadKind&&(e.workloadKind=r.workloadKind),r.workloadNamespace&&(e.workloadNamespace=r.workloadNamespace),t.push(e)}else"namespace"===r.scopeType&&r.workloadNamespace?t.push({workloadNamespace:r.workloadNamespace}):"language"===r.scopeType&&r.workloadLanguage&&t.push({workloadLanguage:r.workloadLanguage});return t.length?t:null}function Jd(e){return Kd(e)}function qd(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 Yd(e){if("custom"===e.durationPreset){const t=parseFloat(e.customDurationMs);return isNaN(t)?null:t}return parseInt(e.durationPreset,10)}function Qd(e){return{httpServer:{[e.routeType]:e.route||null,method:e.method||null}}}function Zd(e){return"all"===e.operationType?null:"httpServer"===e.operationType?Qd(e):"httpClient"===e.operationType?{httpClient:{serverAddress:e.serverAddress||null,["route"===e.routeType?"templatedPath":"templatedPathPrefix"]:e.route||null,method:e.method||null}}:null}function ep(e){return"all"===e.operationType?null:"httpServer"===e.operationType?Qd(e):"kafkaConsumer"===e.operationType?{kafkaConsumer:{kafkaTopic:e.kafkaTopic||null}}:"kafkaProducer"===e.operationType?{kafkaProducer:{kafkaTopic:e.kafkaTopic||null}}:null}function tp(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:Kd(e),percentageAtMost:qd(e),operation:Zd(e)}}function rp(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:Kd(e),error:e.keepErrors,durationAtLeastMs:"Duration"===e.ruleType?Yd(e):null,percentageAtLeast:qd(e),operation:ep(e)}}function op(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:Kd(e),percentageAtMost:qd(e)??0,operation:ep(e)}}function np(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:Jd(e),operation:Zd(e),percentageAtMost:qd(e),notes:e.notes||null}}function ip(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:Jd(e),error:"Error"===e.ruleType,durationAtLeastMs:"Duration"===e.ruleType?Yd(e):null,operation:ep(e),percentageAtLeast:qd(e),notes:e.notes||null}}function ap(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:Jd(e),operation:ep(e),percentageAtMost:qd(e)??0,notes:e.notes||null}}const sp=["5000","1000","500","100","50"],lp=["50","25","10","1","0.5","0.1","0"];function cp(e){if(null==e)return{percentageMode:"all",percentagePreset:"0",customPercentage:""};const t=lp.find(t=>Number(t)===e);return t?{percentageMode:"sample",percentagePreset:t,customPercentage:""}:{percentageMode:"sample",percentagePreset:"custom",customPercentage:String(e)}}function dp(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 pp(e){const t=Vd(),r=(o=e.rule.sourceScopes,o?.length?o.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 o;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=cp(e.rule.percentageAtMost);break;case"highlyRelevant":i=dp(e.rule.operation),a=cp(e.rule.percentageAtLeast),s=function(e){if(null==e)return{durationPreset:"500",customDurationMs:""};const t=sp.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=dp(e.rule.operation),a=cp(e.rule.percentageAtMost)}return{...t,name:e.rule.name||"",notes:e.rule.notes||"",disabled:e.rule.disabled,ruleType:n,sourceScopes:r,...i,...s,keepErrors:l,...a}}var up;!function(e){e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"}(up||(up={}));const hp=[up.Action,up.Endpoint,up.Scope,up.Duration],mp=Yt.span`
|
|
887
|
-
font-family: ${({theme:e,$isMono:t})=>t?e.font_family.secondary:e.font_family.primary};
|
|
888
|
-
font-size: ${({theme:e})=>e.v2.text.size.xxs}px;
|
|
889
|
-
line-height: 20px;
|
|
890
|
-
color: ${({theme:e,$variant:t})=>{const r=e.v2.colors;switch(t){case"action":return r.green[400];case"endpoint":return r.purple[300];case"scope":return r.yellow[400];case"duration":return r.orange[600];default:return r.white[500]}}};
|
|
891
|
-
`,gp=Yt.span`
|
|
892
|
-
display: inline;
|
|
893
|
-
cursor: help;
|
|
894
|
-
text-decoration: underline dotted;
|
|
895
|
-
text-underline-offset: 3px;
|
|
896
|
-
`,fp=Yt.div`
|
|
897
|
-
display: flex;
|
|
898
|
-
flex-direction: column;
|
|
899
|
-
gap: 4px;
|
|
900
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
901
|
-
border-radius: 4px;
|
|
902
|
-
padding: 8px;
|
|
903
|
-
max-width: 300px;
|
|
904
|
-
`,xp=({items:e,children:t})=>{const{popupRef:r,popupOpen:o,setPopupOpen:n,popupPosition:i,handlePosition:a}=bl({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:240}),s=e=>{a(e.clientX,e.clientY),n("mouseleave"!==e.type)};return Jt(gp,{onMouseEnter:s,onMouseMove:s,onMouseLeave:s,children:[t,Kt(Yl,{ref:r,isOpen:o,top:i.top,left:i.left,asPortal:!0,style:{backgroundColor:"transparent",border:"none"},borderRadius:"0",padding:"0",maxWidth:"300px",children:Kt(fp,{children:e.map((e,t)=>Kt(Yn,{size:Jn.XXXS,children:e},t))})})]})},yp=({parts:e})=>Kt(qt,{children:e.map((e,t)=>{const r=Kt(mp,{$variant:e.variant,$isMono:hp.includes(e.variant),children:e.text});return Jt(Ot,{children:[0!==t&&Kt(qt,{children:" "}),e.tooltipItems?.length?Kt(xp,{items:e.tooltipItems,children:r}):r]},`${e.variant}-${t}`)})});var bp;!function(e){e.Noisy="noisy",e.HighlyRelevant="highly-relevant",e.CostReduction="cost-reduction"}(bp||(bp={}));const $p=[{value:bp.Noisy,label:"1. Noisy Operations",tooltip:"Rules that reduce noise from high-volume, low-value operations"},{value:bp.HighlyRelevant,label:"2. Highly Relevant Operations",tooltip:"Rules that prioritize important traces for retention"},{value:bp.CostReduction,label:"3. Cost Reduction",tooltip:"Rules that optimize costs by sampling less critical data"}],vp={[bp.Noisy]:"This is the most efficient way to sample (with Head Sampling). Prefer to use it where possible.",[bp.HighlyRelevant]:'Any trace from the "Noisy Operations" category is sampled prior to checking highly relevance.',[bp.CostReduction]:"Cost reduction rules use Tail Sampling to drop traces that are unlikely to be useful for debugging or monitoring."},wp={[bp.Noisy]:"Noisy Operations rules list",[bp.HighlyRelevant]:"Highly Relevant Operations rules list",[bp.CostReduction]:"Cost Reduction rules list"},Sp={[bp.Noisy]:"noisy",[bp.HighlyRelevant]:"highlyRelevant",[bp.CostReduction]:"costReduction"};function kp(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 Cp(e){if(!e?.length)return[{text:" for ",variant:up.Default},{text:"entire cluster",variant:up.Scope}];const t=e.map(kp).filter(Boolean);if(!t.length)return[{text:" for ",variant:up.Default},{text:"entire cluster",variant:up.Scope}];const r=[{text:" for ",variant:up.Default}],o=t.slice(0,2),n=t.slice(2);return o.forEach((e,t)=>{t>0&&r.push({text:", ",variant:up.Default}),r.push({text:e,variant:up.Scope})}),n.length>0&&r.push({text:` + ${n.length} more`,variant:up.Default,tooltipItems:n}),r}function Ep(e,t){if(!e)return[];const r=(o=e).startsWith("/")?o.slice(1):o;var o;const n=[{text:" starting at ",variant:up.Default}];return t?n.push({text:`${t} /${r}`,variant:up.Endpoint}):n.push({text:`endpoint /${r}`,variant:up.Endpoint}),n}function Ap(e){const t=[];if(null!=e.percentageAtMost?(t.push({text:`Drop ${100-e.percentageAtMost}%`,variant:up.Action}),t.push({text:" of traces",variant:up.Default})):t.push({text:"Drop all traces",variant:up.Action}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,o=e.operation.httpServer?.method||e.operation.httpClient?.method;t.push(...Ep(r,o));const n=e.operation.httpClient,i=n?.templatedPath||n?.templatedPathPrefix,a=n?.serverAddress;if((i||a)&&!r){const e=i&&a?`${a}/${i}`:i||a;t.push({text:" to ",variant:up.Default}),o?t.push({text:`${o} /${e}`,variant:up.Endpoint}):t.push({text:`/${e}`,variant:up.Endpoint})}}else t.push({text:" on ",variant:up.Default}),t.push({text:"any operation",variant:up.Endpoint});return t.push(...Cp(e.sourceScopes)),t}function Tp(e){const t=[];if(null!=e.percentageAtLeast?(t.push({text:`Keep at least ${e.percentageAtLeast}%`,variant:up.Action}),t.push({text:" of traces",variant:up.Default})):t.push({text:"Keep all traces",variant:up.Action}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,o=e.operation.httpServer?.method;t.push(...Ep(r,o))}else t.push({text:" on ",variant:up.Default}),t.push({text:"any operation",variant:up.Endpoint});return t.push(...Cp(e.sourceScopes)),!e.error&&null!=e.durationAtLeastMs&&e.durationAtLeastMs>0&&(t.push({text:" with duration > ",variant:up.Default}),t.push({text:`${e.durationAtLeastMs}ms`,variant:up.Duration})),t}function Dp(e){const t=[];if(t.push({text:`Drop ${e.percentageAtMost}%`,variant:up.Action}),t.push({text:" of traces",variant:up.Default}),e.operation){const r=e.operation.httpServer?.route||e.operation.httpServer?.routePrefix,o=e.operation.httpServer?.method;t.push(...Ep(r,o));const n=e.operation.kafkaConsumer?.kafkaTopic;n&&!r&&(t.push({text:" from ",variant:up.Default}),t.push({text:`topic '${n}'`,variant:up.Endpoint}))}else t.push({text:" on ",variant:up.Default}),t.push({text:"any operation",variant:up.Endpoint});return t.push(...Cp(e.sourceScopes)),t}function Np(e){return e.error?"Error":null!=e.durationAtLeastMs?"Duration":"Relevance"}function Ip(e,t,r){const o=Sp[t],n=[];for(const i of e)switch(t){case bp.Noisy:for(const e of i.noisyOperations)r?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:Ap(e),category:o});break;case bp.HighlyRelevant:for(const e of i.highlyRelevantOperations)r?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:Tp(e),category:o,typeBadge:Np(e)});break;case bp.CostReduction:for(const e of i.costReductionRules)r?.has(e.ruleId)||n.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:Dp(e),category:o})}return n}function Rp(e,t){switch(e){case"noisy":return Ap(t);case"highlyRelevant":return Tp(t);case"costReduction":return Dp(t)}}function Op(e,t,r,o){for(const n of e)if(n.id===t)switch(o){case"noisy":{const e=n.noisyOperations.find(e=>e.ruleId===r);if(e)return{category:"noisy",samplingId:n.id,rule:e};break}case"highlyRelevant":{const e=n.highlyRelevantOperations.find(e=>e.ruleId===r);if(e)return{category:"highlyRelevant",samplingId:n.id,rule:e};break}case"costReduction":{const e=n.costReductionRules.find(e=>e.ruleId===r);if(e)return{category:"costReduction",samplingId:n.id,rule:e};break}}return null}function _p(e,t){const r=Op(e,t.samplingId,t.rule.ruleId,t.category);return r?{...r,summary:Rp(r.category,r.rule)}:null}function Pp(e,t){const r=Op(e,t.samplingId,t.ruleId,t.category);return r?{...r,summary:t.summary}:null}function Lp(e){return null==e||Array.isArray(e)&&0===e.length?null:e}function Fp(e,t){return JSON.stringify({sourceScopes:Lp(e),operation:Lp(t)})}function zp(e,t,r,o){return JSON.stringify({sourceScopes:Lp(e),error:t??!1,durationAtLeastMs:Lp(r),operation:Lp(o)})}function Mp(e,t){return JSON.stringify({sourceScopes:Lp(e),operation:Lp(t)})}function Bp(e,t,r,o){switch(t){case"noisy":{const t=Fp(r.sourceScopes,r.operation);for(const r of e)for(const e of r.noisyOperations)if((!o||e.ruleId!==o)&&Fp(e.sourceScopes,e.operation)===t)return e.ruleId;return null}case"highlyRelevant":{const t=zp(r.sourceScopes,r.error,r.durationAtLeastMs,r.operation);for(const r of e)for(const e of r.highlyRelevantOperations)if((!o||e.ruleId!==o)&&zp(e.sourceScopes,e.error,e.durationAtLeastMs,e.operation)===t)return e.ruleId;return null}case"costReduction":{const t=Mp(r.sourceScopes,r.operation);for(const r of e)for(const e of r.costReductionRules)if((!o||e.ruleId!==o)&&Mp(e.sourceScopes,e.operation)===t)return e.ruleId;return null}}}function Up(e){if(!e||!e.enabled)return[{text:"Auto rule is ",variant:up.Default},{text:"disabled",variant:up.Action}];return[{text:`Keep ${e.keepPercentage??0}%`,variant:up.Action},{text:" of ",variant:up.Default},{text:"traces for kubelet health probes in the entire cluster",variant:up.Scope}]}function jp(e){return!(!0!==e.error||e.sourceScopes&&0!==e.sourceScopes.length||e.operation||null!=e.percentageAtLeast&&100!==e.percentageAtLeast)}function Wp(e){for(const t of e){const e=t.highlyRelevantOperations.find(jp);if(e)return{rule:e,samplingId:t.id}}return null}function Hp(e){return!e||e.disabled?[{text:"Auto rule is ",variant:up.Default},{text:"disabled",variant:up.Action}]:[{text:"Keep 100%",variant:up.Action},{text:" of ",variant:up.Default},{text:"error traces across the entire cluster",variant:up.Scope}]}function Xp(e){return!(e.sourceScopes&&0!==e.sourceScopes.length||e.operation)}function Gp(e){for(const t of e){const e=t.costReductionRules.find(Xp);if(e)return{rule:e,samplingId:t.id}}return null}function Vp(e){return!e||e.disabled?[{text:" is ",variant:up.Default},{text:"disabled",variant:up.Action}]:[{text:`Drop ${e.percentageAtMost}%`,variant:up.Action},{text:" of ",variant:up.Default},{text:"traces across the entire cluster",variant:up.Scope}]}var Kp;!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"}(Kp||(Kp={}));const Jp=Bt(null),qp=["50","25","10","1","0"];function Yp(e){const t=String(e);return qp.includes(t)?t:"custom"}const Qp=({category:e,sourceOptions:t=[],namespaceOptions:r=[],children:o})=>{const{formData:n,handleFormChange:i,resetFormData:a}=el(Vd(e)),[s,l]=Pt(null);Lt(()=>{a(Vd(e)),l(null)},[e]);const c=zt(e=>{l(null),i(void 0,void 0,{...n,...e})},[n,i]),d=zt(()=>{a(Vd(e)),l(null)},[e,a]),p=_t(()=>({formType:Kp.Create,category:e,formData:n,handleChange:c,resetForm:d,duplicateWarning:s,setDuplicateWarning:l,sourceOptions:t,namespaceOptions:r}),[e,n,c,d,s,t,r]);return Kt(Jp.Provider,{value:p,children:o})},Zp=({data:e,defaultEditMode:t,sourceOptions:r=[],namespaceOptions:o=[],children:n})=>{const[i,a]=Pt(!1),{formData:s,handleFormChange:l,resetFormData:c}=el(void 0),d=Ft(null),[p,u]=Pt(null);Lt(()=>{e!==d.current&&(d.current=e,e&&t?(c(pp(e)),u(null),a(!0)):(a(!1),u(null)))},[e,t]);const h=zt(e=>{u(null),l(void 0,void 0,{...s,...e})},[s,l]),m=zt(()=>{e&&(c(pp(e)),u(null),a(!0))},[e,c]),g=zt(()=>{a(!1),u(null)},[]),f=_t(()=>({formType:Kp.View,data:e,isEditing:i,formData:s,handleChange:h,handleEdit:m,handleCancelEdit:g,duplicateWarning:p,setDuplicateWarning:u,sourceOptions:r,namespaceOptions:o}),[e,i,s,h,m,g,p,r,o]);return Kt(Jp.Provider,{value:f,children:n})};function eu(e){const[t,r]=Pt(()=>Yp(e)),[o,n]=Pt(()=>"custom"===Yp(e)?String(e):"");Lt(()=>{const t=Yp(e);r(t),n("custom"===t?String(e):"")},[e]);const i=_t(()=>"custom"===t?Number(o)||0:Number(t),[t,o]);return{percentagePreset:t,setPercentagePreset:r,customPercentage:o,setCustomPercentage:n,resolvedPercentage:i}}const tu=({enabled:e,keepPercentage:t,children:r})=>{const[o,n]=Pt(e),i=eu(t);Lt(()=>{n(e)},[e]);const a=_t(()=>Up({enabled:o,keepPercentage:i.resolvedPercentage}),[o,i.resolvedPercentage]),s=_t(()=>({formType:Kp.EditAutoNoisy,localEnabled:o,setLocalEnabled:n,...i,summary:a}),[o,i,a]);return Kt(Jp.Provider,{value:s,children:r})},ru=({enabled:e,dropPercentage:t,children:r})=>{const[o,n]=Pt(e),i=eu(t);Lt(()=>{n(e)},[e]);const a=_t(()=>Vp(o?{disabled:!1,percentageAtMost:i.resolvedPercentage}:null),[o,i.resolvedPercentage]),s=_t(()=>({formType:Kp.EditAutoCostReduction,localEnabled:o,setLocalEnabled:n,...i,summary:a}),[o,i,a]);return Kt(Jp.Provider,{value:s,children:r})},ou=({enabled:e,children:t})=>{const[r,o]=Pt(e);Lt(()=>{o(e)},[e]);const n=_t(()=>Hp(r?{disabled:!1}:null),[r]),i=_t(()=>({formType:Kp.EditAutoHighlyRelevant,localEnabled:r,setLocalEnabled:o,summary:n}),[r,n]);return Kt(Jp.Provider,{value:i,children:t})},nu=e=>{switch(e.formType){case Kp.Create:return Kt(Qp,{...e});case Kp.View:return Kt(Zp,{...e});case Kp.EditAutoNoisy:return Kt(tu,{...e});case Kp.EditAutoCostReduction:return Kt(ru,{...e});case Kp.EditAutoHighlyRelevant:return Kt(ou,{...e})}};function iu(e){const t=Mt(Jp);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 au=Bt({formType:void 0}),su=({children:e,formType:t})=>{const r=_t(()=>({formType:t}),[t]);return Kt(au.Provider,{value:r,children:e})},lu=()=>Mt(au),cu=Yt.div`
|
|
905
|
-
display: flex;
|
|
906
|
-
|
|
907
|
-
align-items: center;
|
|
908
|
-
gap: 6px;
|
|
909
|
-
margin-bottom: 4px;
|
|
910
|
-
`,du=Yt(ri)`
|
|
911
|
-
font-size: 14px;
|
|
912
|
-
opacity: 0.8;
|
|
913
|
-
line-height: 22px;
|
|
914
|
-
overflow: hidden;
|
|
915
|
-
white-space: nowrap;
|
|
916
|
-
text-overflow: ellipsis;
|
|
917
|
-
color: ${({$status:e,theme:t})=>e?t.text[e]:t.text.secondary};
|
|
918
|
-
`,pu=Yt(ri)`
|
|
919
|
-
font-size: 12px;
|
|
920
|
-
color: ${({theme:e})=>e.text.darker_grey};
|
|
921
|
-
opacity: 0.8;
|
|
922
|
-
`,uu=({title:e,required:t,tooltip:r,style:o,status:n})=>e?Kt(cu,{style:o,children:Jt(nc,{text:r,withIcon:!0,children:[Kt(du,{$status:n,children:e}),!t&&Kt(pu,{children:"(optional)"})]})}):null,hu=Yt.div`
|
|
923
|
-
display: flex;
|
|
924
|
-
flex-direction: column;
|
|
925
|
-
position: relative;
|
|
926
|
-
width: 100%;
|
|
927
|
-
`,mu=Yt.div`
|
|
928
|
-
width: 100%;
|
|
929
|
-
display: flex;
|
|
930
|
-
align-items: center;
|
|
931
|
-
height: 36px;
|
|
932
|
-
gap: 12px;
|
|
933
|
-
transition: border-color 0.3s;
|
|
934
|
-
border-radius: 32px;
|
|
935
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
936
|
-
${({$disabled:e})=>e&&Qt`
|
|
937
|
-
cursor: not-allowed;
|
|
938
|
-
opacity: 0.6;
|
|
939
|
-
`}
|
|
940
|
-
${({$isActive:e,$hasError:t,$status:r})=>e?Qt`
|
|
941
|
-
border-color: ${({theme:e})=>e.colors.secondary};
|
|
942
|
-
`:t?Qt`
|
|
943
|
-
border-color: ${({theme:e})=>e.text.error};
|
|
944
|
-
`:r?Qt`
|
|
945
|
-
border-color: ${({theme:e})=>e.text[r]};
|
|
946
|
-
`:""}
|
|
947
|
-
&:hover {
|
|
948
|
-
border-color: ${({theme:e})=>e.colors.secondary};
|
|
949
|
-
}
|
|
950
|
-
&:focus-within {
|
|
951
|
-
border-color: ${({theme:e})=>e.colors.secondary};
|
|
952
|
-
}
|
|
953
|
-
`,gu=Yt.input`
|
|
954
|
-
padding-left: ${({$hasIcon:e})=>e?"0":"16px"};
|
|
955
|
-
flex: 1;
|
|
956
|
-
min-width: 150px;
|
|
957
|
-
width: 100%;
|
|
958
|
-
border: none;
|
|
959
|
-
outline: none;
|
|
960
|
-
background: none;
|
|
961
|
-
color: ${({theme:e})=>e.text.secondary};
|
|
962
|
-
font-size: 14px;
|
|
963
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
964
|
-
font-weight: 300;
|
|
965
|
-
&::placeholder {
|
|
966
|
-
color: ${({theme:e})=>e.text.secondary};
|
|
967
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
968
|
-
opacity: 0.4;
|
|
969
|
-
font-size: 14px;
|
|
970
|
-
font-weight: 300;
|
|
971
|
-
line-height: 22px; /* 157.143% */
|
|
972
|
-
}
|
|
973
|
-
&:disabled {
|
|
974
|
-
cursor: not-allowed;
|
|
975
|
-
opacity: 0.6;
|
|
976
|
-
}
|
|
977
|
-
&::-webkit-inner-spin-button,
|
|
978
|
-
&::-webkit-outer-spin-button {
|
|
979
|
-
-webkit-appearance: none;
|
|
980
|
-
margin: 0;
|
|
981
|
-
}
|
|
982
|
-
`,fu=Yt.div`
|
|
983
|
-
display: flex;
|
|
984
|
-
align-items: center;
|
|
985
|
-
margin-left: 12px;
|
|
986
|
-
`,xu=Yt(fu)`
|
|
987
|
-
cursor: pointer;
|
|
988
|
-
`,yu=Yt.button`
|
|
989
|
-
background-color: ${({theme:e})=>e.colors.primary};
|
|
990
|
-
border: none;
|
|
991
|
-
color: ${({theme:e})=>e.text.secondary};
|
|
992
|
-
padding: 8px 16px;
|
|
993
|
-
border-radius: 20px;
|
|
994
|
-
cursor: pointer;
|
|
995
|
-
margin-left: 8px;
|
|
996
|
-
&:hover {
|
|
997
|
-
background-color: ${({theme:e})=>e.colors.secondary};
|
|
998
|
-
}
|
|
999
|
-
&:disabled {
|
|
1000
|
-
background-color: ${({theme:e})=>e.colors.border};
|
|
1001
|
-
cursor: not-allowed;
|
|
1002
|
-
}
|
|
1003
|
-
`,bu=({icon:e,buttonLabel:t,onButtonClick:r,hasError:o,errorMessage:n,title:i,tooltip:a,required:s,value:l,onChange:c,type:d=Hr.Text,name:p,status:u,...h})=>{const m=Zt(),g=d===Hr.Password,[f,x]=Pt(!1);return Jt(hu,{children:[Kt(uu,{title:i,required:s,tooltip:a,status:u}),Jt(mu,{$disabled:h.disabled,$hasError:o||!!n,$isActive:!!h.autoFocus,$status:u,children:[g?Kt(xu,{onClick:()=>x(e=>!e),children:Kt(f?yt:bt,{size:14,fill:m.text.grey})}):e?Kt(fu,{children:Kt(e,{size:14,fill:m.text.grey})}):null,Kt(gu,{"data-id":p,type:f||d===Hr.Number?Hr.Text:d,$hasIcon:!!e||g,name:p,value:l,onChange:e=>{e.stopPropagation(),d===Hr.Number&&(e.target.value=An(e.target.value)),c?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},...h}),t&&r&&Kt(yu,{onClick:r,disabled:h.disabled,children:t})]}),!!n&&Kt(ii,{children:n})]})},$u=Yt.div`
|
|
1004
|
-
display: flex;
|
|
1005
|
-
flex-direction: column;
|
|
1006
|
-
min-width: 120px;
|
|
1007
|
-
width: 100%;
|
|
1008
|
-
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1009
|
-
`,vu=Yt.div`
|
|
1010
|
-
position: relative;
|
|
1011
|
-
`,wu=Yt.div`
|
|
1012
|
-
display: flex;
|
|
1013
|
-
align-items: center;
|
|
1014
|
-
justify-content: space-between;
|
|
1015
|
-
height: 36px;
|
|
1016
|
-
padding: ${({$isMulti:e,$hasSelections:t})=>e&&t?"0 16px 0 6px":"0 16px"};
|
|
1017
|
-
border-radius: 32px;
|
|
1018
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1019
|
-
|
|
1020
|
-
${({$isOpen:e,$isMulti:t,theme:r})=>e&&!t?Qt`
|
|
1021
|
-
border: 1px solid ${r.text.grey};
|
|
1022
|
-
background: ${r.colors.dropdown_bg_2};
|
|
1023
|
-
`:Qt`
|
|
1024
|
-
border: 1px solid ${r.colors.border};
|
|
1025
|
-
background: transparent;
|
|
1026
|
-
`};
|
|
1027
|
-
|
|
1028
|
-
${({$hasError:e,$status:t})=>e?Qt`
|
|
1029
|
-
border-color: ${({theme:e})=>e.text.error};
|
|
1030
|
-
`:t?Qt`
|
|
1031
|
-
border-color: ${({theme:e})=>e.text[t]};
|
|
1032
|
-
`:""}
|
|
1033
|
-
|
|
1034
|
-
&:hover {
|
|
1035
|
-
border-color: ${({$isMulti:e,$hasSelections:t,$disabled:r,theme:o})=>r?"auto":e&&t?o.colors.border:o.colors.secondary};
|
|
1036
|
-
}
|
|
1037
|
-
`,Su=Yt.div`
|
|
1038
|
-
display: flex;
|
|
1039
|
-
align-items: center;
|
|
1040
|
-
gap: 4px;
|
|
1041
|
-
`,ku=({options:e,value:t,onSelect:r,onDeselect:o,title:n,tooltip:i,placeholder:a,disabled:s=!1,isMulti:l=!1,showSearch:c=!1,required:d=!1,errorMessage:p,hasError:u=!1,status:h})=>{const[m,g]=Pt(!1),[f,x]=Pt(!1),y=Ft(null);xl(y,()=>g(!1));const b=()=>{(()=>{if(y.current){const e=y.current.getBoundingClientRect().bottom+300>window.innerHeight;x(e)}})(),g(e=>!e)},$=Array.isArray(t)?t.length:0;return Jt($u,{$disabled:s,children:[Kt(uu,{title:n,required:d,tooltip:i,status:h}),Jt(vu,{ref:y,children:[Jt(wu,{$isOpen:m,$isMulti:l,$hasSelections:!!Array.isArray(t)&&!!t.length,$hasError:!!p||u,$status:h,$disabled:s,onClick:()=>!s&&b(),children:[Kt(Tu,{value:t,placeholder:a,onDeselect:o}),Jt(Su,{children:[l&&Kt(Js,{label:$,filled:!!$}),Kt(Gc,{extend:m})]})]}),m&&Kt(Iu,{openUpwards:f,options:e,value:t,onSelect:e=>{r?.(e),l||b()},onDeselect:e=>{o?.(e),l||b()},isMulti:l,showSearch:c})]}),!!p&&Kt(ii,{children:p})]})},Cu=Yt(Su)`
|
|
1042
|
-
max-width: calc(100% - 50px);
|
|
1043
|
-
overflow-x: auto;
|
|
1044
|
-
`,Eu=Yt(ri)`
|
|
1045
|
-
display: flex;
|
|
1046
|
-
align-items: center;
|
|
1047
|
-
gap: 2px;
|
|
1048
|
-
padding: 4px 12px;
|
|
1049
|
-
background: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1050
|
-
border-radius: 360px;
|
|
1051
|
-
white-space: nowrap;
|
|
1052
|
-
text-overflow: ellipsis;
|
|
1053
|
-
img {
|
|
1054
|
-
&:hover {
|
|
1055
|
-
transform: scale(2);
|
|
1056
|
-
transition: transform 0.3s;
|
|
1057
|
-
}
|
|
1058
|
-
}
|
|
1059
|
-
`,Au=Yt(ri)``,Tu=({value:e,placeholder:t,onDeselect:r})=>{const o=Zt();return Array.isArray(e)?e.length?Kt(Cu,{children:e.map(e=>Jt(Eu,{size:14,children:[e.value,Kt(Gl,{orientation:"vertical",length:"10px",margin:"0 4px"}),Kt(ct,{size:12,onClick:t=>{t.stopPropagation(),r?.(e)}})]},`multi-label-${e.id}`))}):Kt(Au,{size:14,color:o.text.darker_grey,children:t}):Kt(Au,{size:14,color:e?.value?void 0:o.text.darker_grey,children:e?.value||t})},Du=Yt.div`
|
|
1060
|
-
position: absolute;
|
|
1061
|
-
${({$openUpwards:e})=>e?"bottom":"top"}: calc(100% + 8px);
|
|
1062
|
-
left: 0;
|
|
1063
|
-
z-index: 1;
|
|
1064
|
-
display: flex;
|
|
1065
|
-
flex-direction: column;
|
|
1066
|
-
overflow-y: auto;
|
|
1067
|
-
width: calc(100% - 16px);
|
|
1068
|
-
max-height: 200px;
|
|
1069
|
-
gap: 8px;
|
|
1070
|
-
padding: 8px;
|
|
1071
|
-
background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1072
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1073
|
-
border-radius: 24px;
|
|
1074
|
-
`,Nu=Yt.div`
|
|
1075
|
-
display: flex;
|
|
1076
|
-
flex-direction: column;
|
|
1077
|
-
align-items: center;
|
|
1078
|
-
`,Iu=({openUpwards:e,options:t,value:r,onSelect:o,onDeselect:n,isMulti:i,showSearch:a})=>{const[s,l]=Pt(""),c=t.filter(e=>e.value?.toLowerCase().includes(s?.toLowerCase()));return Jt(Du,{$openUpwards:e,children:[a&&Jt(Nu,{children:[Kt(bu,{placeholder:"Search...",icon:$t,value:s,onChange:e=>l(e.target.value)}),Kt(Gl,{thickness:1,margin:"8px 0 0 0"})]}),0===c.length?Kt(Od,{subTitle:a&&s?void 0:" "}):c.map((e,t)=>Kt(Ou,{option:e,value:r,isMulti:i,onSelect:o,onDeselect:n},`dropdown-option-${e.id||t}`))]})},Ru=Yt.div`
|
|
1079
|
-
padding: 8px 12px;
|
|
1080
|
-
cursor: pointer;
|
|
1081
|
-
display: flex;
|
|
1082
|
-
justify-content: space-between;
|
|
1083
|
-
align-items: center;
|
|
1084
|
-
border-radius: 32px;
|
|
1085
|
-
&:hover,
|
|
1086
|
-
&.selected {
|
|
1087
|
-
background: ${({theme:e})=>e.colors.majestic_blue+Bs["024"]};
|
|
1088
|
-
}
|
|
1089
|
-
`,Ou=({option:e,value:t,isMulti:r,onSelect:o,onDeselect:n})=>{const i=Zt(),a=Array.isArray(t)?!!t?.find(t=>t.id===e.id):t?.id===e.id,s=t=>t?o?.(e):n?.(e);return r?Kt(Ru,{className:a?"selected":"",onClick:()=>s(!a),children:Kt(Tc,{title:e.value||"",titleColor:i.text.secondary,value:a,onChange:s,style:{width:"100%"}})}):Jt(Ru,{className:a?"selected":"",onClick:()=>a?n?.(e):o?.(e),children:[Jt(Mn,{$gap:8,children:[e.icon&&Kt(e.icon,{}),Kt(ri,{size:14,children:e.value})]}),a&&Kt(st,{})]})},_u=Yt(Bn)`
|
|
1090
|
-
gap: 12px;
|
|
1091
|
-
`,Pu=Yt(Mn)`
|
|
1092
|
-
width: 100%;
|
|
1093
|
-
gap: 12px;
|
|
1094
|
-
align-items: flex-end;
|
|
1095
|
-
`,Lu=({clientX:e=0,flipX:t,clientY:r=0,flipY:o,isOpen:n,onClose:i,onSave:a,withDelete:s,onDelete:l,title:c,titleTooltip:d,warning:p,children:u})=>{const h=Zt(),{popupRef:m,popupPosition:g,handlePosition:f}=bl({onClickOutside:i});return fl({key:"Enter",active:n},a),Lt(()=>f(e,r),[e,r]),0===g.top&&0!==r||0===g.left&&0!==e?null:Kt(Yl,{ref:m,isOpen:n,top:o?void 0:g.top,bottom:o?g.top:void 0,left:t?void 0:g.left,right:t?g.left:void 0,padding:"24px",children:Jt(_u,{children:[Kt(nc,{text:d,withIcon:!0,children:Kt(ri,{size:14,children:c})}),Jt(Pu,{children:[u,Jt(Mn,{$gap:6,children:[Kt(sc,{withBorder:!0,onClick:i,tooltip:"Cancel",children:Kt(ct,{})}),Kt(sc,{withBorder:!0,backgroundColor:h.colors.secondary,onClick:a,tooltip:"Save",children:Kt(st,{fill:h.text.primary})}),s&&Kt(sc,{onClick:l,tooltip:"Undo",children:Kt(vt,{})})]})]}),p&&Kt(fc,{type:Xr.Warning,message:p})]})})},Fu=Yt.div`
|
|
1096
|
-
position: relative;
|
|
1097
|
-
`,zu=({defaultLanguage:e=Mr.Unknown,defaultVersion:t="",defaultOtelDistroName:r=null,handleSave:o})=>{const{tier:n}=El(),{addNotification:i}=Cs(),{formData:a,handleFormChange:s,resetFormData:l}=el({language:e,version:t,otelDistroName:r}),[c,d]=Pt(!1),p=()=>{d(!1),l()},u=_t(()=>{if(!a.language)return[];const e=gs[a.language].community,t=n===Lr.Onprem?gs[a.language].enterprise:[];return e.concat(t)},[a.language,n]);return Jt(Fu,{children:[Kt(sc,{tooltip:Eo.OVERRIDE_RUNTIME_DETAILS,size:32,onClick:()=>{d(!0)},children:Kt(gt,{})}),Kt(Lu,{flipX:!0,clientX:36,isOpen:c,onClose:p,onSave:async()=>{!a.version||vn(a.version)?(await o({...a}),p()):i({type:Xr.Warning,message:Co.INVALID_VERSION,hideFromHistory:!0})},withDelete:!0,onDelete:async()=>{await o({language:null,version:"",otelDistroName:null}),p()},title:Eo.OVERRIDE_RUNTIME_DETAILS,warning:Eo.OVERRIDE_RUNTIME_WARNING,children:Jt(Bn,{$gap:12,children:[Jt(Mn,{$gap:12,children:[Kt(ku,{title:Eo.LANGUAGE,options:hs,value:hs.find(e=>e.id===a.language),onSelect:e=>{s("language",e.id),s("version",""),s("otelDistroName",null)},required:!0}),Kt(bu,{title:Eo.RUNTIME_VERSION,placeholder:Eo.VERSION_PLACEHOLDER,value:a.version,onChange:e=>s("version",e.target.value),required:!1})]}),a.language&&Kt(ku,{title:"Otel Distro Name",options:u,value:u.find(e=>e.id===a.otelDistroName),onSelect:e=>s("otelDistroName",e.id),required:!1})]})})]})},Mu=Yt(Mn)`
|
|
1098
|
-
width: 100%;
|
|
1099
|
-
justify-content: center;
|
|
1100
|
-
`,Bu=({containerName:e,runtimeInfo:t,agentEnabled:r,overrides:o,callbackRuntimeOverride:n})=>{const i=Zt(),a=o?.runtimeInfo??t,s=a?.language??Mr.Unknown,l=a?.runtimeVersion??"",c=null!=o?.runtimeInfo,d=r?.agentEnabled??!1,p=r?.agentEnabledStatus?.message??"",u=r?.otelDistroName??null,h=d?Xr.Success:p?Xr.Info:Xr.Warning,m=d?Gr.INSTRUMENTED:p?Gr.NOT_INSTRUMENTED:Gr.INSTRUMENTING;return Kt(kd,{title:e,subTitle:`${s?us[s]:"no runtime info"}`+(l?` • Runtime Version: ${l}`:""),iconProps:{icon:Lo(s)},extendableProps:{isExtended:!!p,renderExtended:()=>Kt(Mu,{children:Kt(ri,{size:12,family:"secondary",color:i.text.info,children:wn(p)})})},renderActions:()=>Jt(qt,{children:[Kt(od,{status:h,title:m,subtitle:u||void 0,withIcon:!0,withBorder:!0}),c&&Kt(od,{status:Xr.Default,forceIcon:wt,title:Eo.OVERIDDEN,withIcon:!0,withBorder:!0}),n&&Kt(zu,{defaultLanguage:s,defaultVersion:l??"",defaultOtelDistroName:u,handleSave:t=>n({...t,containerName:e})})]})})},Uu=Yt.tr`
|
|
1101
|
-
cursor: ${({$withHover:e})=>e?"pointer":"default"};
|
|
1102
|
-
opacity: ${({$faded:e})=>e?.5:1};
|
|
1103
|
-
`,ju=Yt.td`
|
|
1104
|
-
position: relative;
|
|
1105
|
-
width: fit-content;
|
|
1106
|
-
padding: 16px 8px 16px ${({$isFirst:e})=>e?"16px":"8px"};
|
|
1107
|
-
color: ${({theme:e})=>e.text.secondary};
|
|
1108
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1109
|
-
font-size: 14px;
|
|
1110
|
-
white-space: nowrap;
|
|
1111
|
-
`,Wu=Yt(ri)`
|
|
1112
|
-
font-size: 14px;
|
|
1113
|
-
color: ${({$color:e,theme:t})=>e??t.text.secondary};
|
|
1114
|
-
line-height: 16px;
|
|
1115
|
-
|
|
1116
|
-
overflow: hidden;
|
|
1117
|
-
overflow-wrap: break-word;
|
|
1118
|
-
white-space: wrap;
|
|
1119
|
-
text-wrap: wrap;
|
|
1120
|
-
text-overflow: ellipsis;
|
|
1121
|
-
display: -webkit-box;
|
|
1122
|
-
-webkit-line-clamp: 2;
|
|
1123
|
-
-webkit-box-orient: vertical;
|
|
1124
|
-
`,Hu=Yt.div`
|
|
1125
|
-
position: absolute;
|
|
1126
|
-
top: 0;
|
|
1127
|
-
left: 0;
|
|
1128
|
-
z-index: -1;
|
|
1129
|
-
width: ${({$width:e})=>e}px;
|
|
1130
|
-
height: ${({$height:e})=>e}px;
|
|
1131
|
-
border-radius: 16px;
|
|
1132
|
-
background-color: ${({theme:e,$hovered:t,$status:r})=>t?r?e.text[r]+Bs["020"]:e.colors.majestic_blue+Bs["030"]:r?e.text[r]+Bs["010"]:e.colors.secondary+Bs["005"]};
|
|
1133
|
-
`,Xu=({index:e,columns:t,cells:r,onClick:o,status:n,faded:i})=>{const{containerRef:a,containerHeight:s,containerWidth:l}=al(),[c,d]=Pt(!1);return Kt(Uu,{ref:a,onMouseEnter:()=>!!o&&d(!0),onMouseLeave:()=>!!o&&d(!1),onClick:()=>!!o&&o(),$withHover:!!o,$faded:i,children:t.map(({key:t},o)=>{const i=r.find(({columnKey:e})=>e===t);if(!i)return null;const{value:a,textColor:d,withTooltip:p,icon:u,component:h}=i;return Jt(ju,{$isFirst:0===o,children:[u?Kt(hd,{icon:u}):h?Kt(h,{}):Kt(nc,{text:p&&a?String(a):"",children:Kt(Wu,{$color:d,children:gn(a)?"-":a})}),0===o&&Kt(Hu,{$height:s,$width:l,$top:s*e,$hovered:c,$status:n})]},`table-row-${t}-${a}-${e}-${o}`)})})},Gu=Yt.div`
|
|
1134
|
-
width: 100%;
|
|
1135
|
-
`,Vu=Yt.table`
|
|
1136
|
-
position: relative;
|
|
1137
|
-
z-index: 0;
|
|
1138
|
-
width: 100%;
|
|
1139
|
-
border-collapse: separate;
|
|
1140
|
-
border-spacing: 0 12px;
|
|
1141
|
-
`,Ku=Yt.thead`
|
|
1142
|
-
// only supported with "border-collapse: collapse;"
|
|
1143
|
-
// border-top: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1144
|
-
// border-bottom: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1145
|
-
`,Ju=Yt.th`
|
|
1146
|
-
// only required with "border-collapse: separate;"
|
|
1147
|
-
border-top: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1148
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1149
|
-
|
|
1150
|
-
padding: 8px;
|
|
1151
|
-
`,qu=Yt(Mn)`
|
|
1152
|
-
cursor: pointer;
|
|
1153
|
-
&:hover {
|
|
1154
|
-
* {
|
|
1155
|
-
color: ${({theme:e})=>e.text.secondary};
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1158
|
-
`,Yu=Yt(ri)`
|
|
1159
|
-
color: ${({theme:e})=>e.text.darker_grey};
|
|
1160
|
-
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
1161
|
-
text-transform: uppercase;
|
|
1162
|
-
font-size: 12px;
|
|
1163
|
-
font-weight: 500;
|
|
1164
|
-
text-wrap: nowrap;
|
|
1165
|
-
`,Qu=Yt.tbody``,Zu=({columns:e,rows:t})=>{const[r,o]=Pt(Pr.Ascending),[n,i]=Pt("name"),a=zt(e=>{n===e?o(e=>e===Pr.Ascending?Pr.Descending:Pr.Ascending):(i(e),o(Pr.Ascending))},[n]),s=_t(()=>{const o=(e,t)=>e.cells.find(({columnKey:e})=>e===t)?.value??null;return(n?[...t].sort((e,t)=>{const i=o(e,n),a=o(t,n);return(r===Pr.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)))(i,a)}):t).map(({status:t,faded:r,cells:o,onClick:n},i)=>Kt(Xu,{index:i,columns:e,cells:o,onClick:n,status:t,faded:r},`row-${i}`))},[e,t,n,r]);return Kt(Gu,{children:Jt(Vu,{children:[Kt(Ku,{children:Kt("tr",{children:e.map(({key:e,title:t,sortable:r})=>Kt(Ju,{children:r?Jt(qu,{onClick:()=>a(e),children:[Kt(St,{}),Kt(Yu,{children:t})]}):Kt(Yu,{children:t})},`column-${e}`))})}),Kt(Qu,{children:s})]})})};var eh;!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"}(eh||(eh={}));const th=Yt.div`
|
|
1166
|
-
display: flex;
|
|
1167
|
-
flex-wrap: wrap;
|
|
1168
|
-
gap: 16px 32px;
|
|
1169
|
-
width: 100%;
|
|
1170
|
-
`,rh=Yt.div`
|
|
1171
|
-
display: flex;
|
|
1172
|
-
flex-direction: column;
|
|
1173
|
-
gap: 2px;
|
|
1174
|
-
width: ${({$width:e})=>e};
|
|
1175
|
-
`,oh=Yt(ri)`
|
|
1176
|
-
color: ${({theme:e})=>e.text.grey};
|
|
1177
|
-
font-size: 10px;
|
|
1178
|
-
line-height: 16px;
|
|
1179
|
-
`,nh=Yt(ri)`
|
|
1180
|
-
font-size: 12px;
|
|
1181
|
-
white-space: pre-wrap;
|
|
1182
|
-
`,ih=({data:e})=>Kt(th,{children:e?.map(({type:e,title:t,titleIcon:r,tooltip:o,value:n},i)=>Jt(rh,{$width:e&&[eh.Code,eh.Table].includes(e)?"inherit":e&&[eh.Loader,eh.Divider,eh.CopyText].includes(e)?"100%":"unset",children:[Kt(nc,{text:o,withIcon:!0,children:Jt(Mn,{$alignItems:"center",$gap:4,children:[r&&Kt(r,{size:14}),!!t&&Kt(oh,{transform:"capitalize",children:t})]})}),Kt(ah,{type:e,value:n})]},`data-field-${t||(n?JSON.stringify(n):i)}`))}),ah=({type:e,value:t})=>{const r=Zt();switch(e){case eh.Divider:return Kt(Gl,{length:"100%",margin:"0"});case eh.Loader:return Kt(Un,{children:Kt(Hc,{scale:1.2})});case eh.Monitors:return Kt(yd,{monitors:t?.split(", ")||[],withLabels:!0,color:r.colors.secondary});case eh.Badge:{const{label:e,filled:r,...o}=un(t,{label:"-",filled:!1});return Kt(Js,{label:e,filled:r,...o})}case eh.Code:{const{language:e,code:r,...o}=un(t,{language:"",code:""});return Kt(zc,{language:e,code:r,...o})}case eh.Table:{const{columns:e,rows:r,...o}=un(t,{columns:[],rows:[{status:void 0,cells:[]}]});return Kt(Zu,{columns:e,rows:r,...o})}case eh.ActiveStatus:return Kt(od,{status:"true"==t?Xr.Success:Xr.Error,title:"true"==t?Eo.ENABLED:Eo.DISABLED,size:10,withIcon:!0,withBorder:!0});case eh.CopyText:{const e="string"==typeof t?t:JSON.stringify(t);return Kt(ad,{value:e})}default:return Kt(nh,{children:Dn("string"==typeof t?t||"-":"")})}},sh=Yt.div`
|
|
1183
|
-
display: flex;
|
|
1184
|
-
flex-direction: column;
|
|
1185
|
-
align-items: flex-start;
|
|
1186
|
-
align-self: stretch;
|
|
1187
|
-
gap: 16px;
|
|
1188
|
-
padding: 24px;
|
|
1189
|
-
border-radius: 24px;
|
|
1190
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1191
|
-
background-color: ${({theme:e,$hovered:t})=>t?e.colors.secondary+Bs["010"]:"transparent"};
|
|
1192
|
-
transition: background-color 0.3s;
|
|
1193
|
-
`,lh=Yt.div`
|
|
1194
|
-
width: 100%;
|
|
1195
|
-
display: flex;
|
|
1196
|
-
flex-direction: column;
|
|
1197
|
-
gap: 4px;
|
|
1198
|
-
cursor: ${({$clickable:e})=>e?"pointer":"default"};
|
|
1199
|
-
`,ch=Yt(ri)`
|
|
1200
|
-
width: 100%;
|
|
1201
|
-
display: flex;
|
|
1202
|
-
align-items: center;
|
|
1203
|
-
gap: 8px;
|
|
1204
|
-
font-size: 16px;
|
|
1205
|
-
`,dh=Yt(ri)`
|
|
1206
|
-
font-size: 12px;
|
|
1207
|
-
color: ${({theme:e})=>e.text.grey};
|
|
1208
|
-
`,ph=Yt(Mn)`
|
|
1209
|
-
margin-left: auto;
|
|
1210
|
-
gap: 8px;
|
|
1211
|
-
`,uh=({title:e="Details",titleBadge:t,titleIcon:r,description:o,action:n,withExtend:i,initialExtended:a=!1,data:s,children:l})=>{const[c,d]=Pt(a),[p,u]=Pt(!1);return Jt(sh,{$hovered:p,children:[e||r||o||n?Jt(lh,{$clickable:i||!1,onClick:()=>i&&d(e=>!e),onMouseEnter:()=>i&&u(!0),onMouseLeave:()=>i&&u(!1),children:[Jt(Mn,{children:[Jt(Mn,{$alignItems:"center",$gap:8,children:[r&&Kt(Mn,{$alignItems:"center",children:Kt(r,{size:20})}),!!e&&Kt(ch,{transform:"capitalize",children:e}),t===Vr.Loading?Kt(Hc,{}):void 0!==t&&Kt(Js,{label:t})]}),(!!n||i)&&Jt(ph,{children:["function"==typeof n?Kt(n,{hovered:p}):n,i&&Kt(Gc,{extend:c})]})]}),!!o&&Kt(dh,{children:o})]}):null,(!i||i&&c)&&(l||Kt(ih,{data:s}))]})},hh=Yt.div`
|
|
1212
|
-
visibility: hidden;
|
|
1213
|
-
`,mh=Yt(Mn)`
|
|
1214
|
-
align-self: stretch;
|
|
1215
|
-
width: calc(100% - 32px);
|
|
1216
|
-
padding: 16px;
|
|
1217
|
-
border-radius: 16px;
|
|
1218
|
-
background-color: ${({theme:e})=>e.colors.secondary+Bs["005"]};
|
|
1219
|
-
${({theme:e,$withClick:t})=>t?Qt`
|
|
1220
|
-
&:hover {
|
|
1221
|
-
cursor: pointer;
|
|
1222
|
-
background-color: ${e.colors.secondary+Bs["010"]};
|
|
1223
|
-
${hh} {
|
|
1224
|
-
visibility: visible;
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
`:`\n &:hover {\n ${hh} {\n visibility: visible;\n }\n }\n `}
|
|
1228
|
-
`,gh=Yt(Mn)`
|
|
1229
|
-
margin-left: auto;
|
|
1230
|
-
gap: 8px;
|
|
1231
|
-
`,fh=Yt(ri)`
|
|
1232
|
-
font-size: 10px;
|
|
1233
|
-
color: ${({theme:e})=>e.text.grey};
|
|
1234
|
-
`,xh=({title:e,subTitle:t,icons:r,iconSrcs:o,onClick:n,renderActions:i})=>{const a=Zt(),[s,l]=Pt(0),c=Ft(null),d=Ft(null);return Lt(()=>{if(c.current){const e=c.current.clientWidth,t=d.current?.clientWidth||0;l(e-(85+t))}},[]),Jt(mh,{ref:c,$gap:8,$withClick:!!n,onClick:n,children:[Kt(fd,{id:`${e}-${t}`,icons:r,iconSrcs:o}),e&&Kt(dd,{maxWidth:s/2,text:e,textSize:14}),e&&t&&Kt(fh,{children:"•"}),t&&Kt(dd,{maxWidth:s/2,text:t,textSize:10,textColor:a.text.grey}),Kt(gh,{ref:d,children:i&&Jt(qt,{children:[Kt(Gl,{orientation:"vertical",length:"24px",margin:"0"}),i()]})})]})},yh=({isOpen:e,noOverlay:t,name:r,type:o,isLastItem:n,onApprove:i,onDeny:a})=>{const s=o===Ur.Source?"uninstrument":"delete";return Kt(kc,{isOpen:e,noOverlay:t,title:`${s.charAt(0).toUpperCase()+s.substring(1)}${r?` ${r}`:""}`,description:`Are you sure you want to ${s}?`,note:n?{type:Xr.Warning,title:`You're about to ${s} the last ${o||r}`,message:""}:void 0,approveButton:{text:"Confirm",variant:"danger",onClick:i},denyButton:{text:"Go Back",onClick:a}})},bh=Yt(Zs)`
|
|
1235
|
-
display: flex;
|
|
1236
|
-
align-items: center;
|
|
1237
|
-
justify-content: center;
|
|
1238
|
-
font-size: 14px;
|
|
1239
|
-
gap: 6px;
|
|
1240
|
-
min-width: 100px;
|
|
1241
|
-
`,$h=({endpoint:e="/",variant:t="secondary"})=>Jt(bh,{variant:t,onClick:()=>window.open(`https://docs.odigos.io${e}`,"_blank","noopener noreferrer"),children:[Kt(kt,{size:18}),"Docs"]}),vh=Yt(Mn)`
|
|
1242
|
-
border-bottom: ${({$hideBorder:e,theme:t})=>e?"none":`1px solid ${t.colors.border}`};
|
|
1243
|
-
`,wh=Yt.div`
|
|
1244
|
-
display: flex;
|
|
1245
|
-
align-items: center;
|
|
1246
|
-
border-bottom: 2px solid ${({theme:e,$selected:t})=>t?e.colors.majestic_blue:"transparent"};
|
|
1247
|
-
cursor: pointer;
|
|
1248
|
-
`,Sh=Yt(ri)`
|
|
1249
|
-
padding: 12px;
|
|
1250
|
-
font-size: 14px;
|
|
1251
|
-
color: ${({theme:e,$selected:t})=>t?e.text.secondary:e.text.grey};
|
|
1252
|
-
`,kh=({tabs:e,hideBorder:t=!1})=>e?.length?Kt(vh,{$hideBorder:t,children:e.map(({label:e,icon:t,onClick:r,selected:o})=>Jt(wh,{onClick:r,$selected:o,children:[Kt(Sh,{$selected:o,children:e}),t&&Kt(t,{})]},`tab-${e}`))}):null,Ch=Yt.section`
|
|
1253
|
-
padding: 0px 32px;
|
|
1254
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
1255
|
-
`,Eh=Yt.div`
|
|
1256
|
-
height: 76px;
|
|
1257
|
-
display: flex;
|
|
1258
|
-
justify-content: space-between;
|
|
1259
|
-
flex-shrink: 0;
|
|
1260
|
-
align-self: stretch;
|
|
1261
|
-
`,Ah=Yt.div`
|
|
1262
|
-
display: flex;
|
|
1263
|
-
align-items: center;
|
|
1264
|
-
gap: ${({$gap:e})=>e||16}px;
|
|
1265
|
-
`,Th=Yt(ri)`
|
|
1266
|
-
font-size: 18px;
|
|
1267
|
-
line-height: 26px;
|
|
1268
|
-
max-width: ${({$maxWidth:e})=>e};
|
|
1269
|
-
overflow: hidden;
|
|
1270
|
-
white-space: nowrap;
|
|
1271
|
-
text-overflow: ellipsis;
|
|
1272
|
-
`,Dh=Yt(Zs)`
|
|
1273
|
-
gap: 8px;
|
|
1274
|
-
`,Nh=Yt(Zs)``,Ih=({onClose:e,width:t,icons:r,iconSrcs:o,title:n,titleTooltip:i,replaceTitleWith:a,actions:s,actionButtons:l=[],tabs:c})=>Jt(Ch,{children:[Jt(Eh,{children:[Jt(Ah,{children:[r?.length||o?.length?Kt(fd,{icons:r,iconSrcs:o,id:`drawer-header-${n}`}):null,("function"==typeof a?Kt(a,{}):a||null)||Kt(nc,{text:i||n,withIcon:!!i,children:n&&Kt(Th,{$maxWidth:`calc(${t} ${s||l.length?"/ 5":"- 192px"})`,children:n})})]}),Jt(Ah,{$gap:2,children:[s,l.map((e,t)=>Kt(Dh,{...e},`header-action-button-${t}`)),Kt(Nh,{"data-id":"drawer-close",variant:"secondary",onClick:e,children:Kt(ct,{size:12})})]})]}),Kt(kh,{tabs:c,hideBorder:!0})]}),Rh=Yt.div`
|
|
1275
|
-
display: flex;
|
|
1276
|
-
justify-content: space-between;
|
|
1277
|
-
gap: 8px;
|
|
1278
|
-
padding: 24px 18px 24px 32px;
|
|
1279
|
-
border-top: 1px solid ${({theme:e})=>e.colors.border};
|
|
1280
|
-
background-color: ${({theme:e})=>e.colors.translucent_bg};
|
|
1281
|
-
transform: translateY(100%);
|
|
1282
|
-
animation-name: ${js.in.bottom};
|
|
1283
|
-
`,Oh=Yt(Mn)`
|
|
1284
|
-
margin-right: auto;
|
|
1285
|
-
`,_h=Yt(Mn)`
|
|
1286
|
-
margin: 0 auto;
|
|
1287
|
-
`,Ph=Yt(Mn)`
|
|
1288
|
-
margin-left: auto;
|
|
1289
|
-
`,Lh=Yt(Zs)`
|
|
1290
|
-
min-width: 140px;
|
|
1291
|
-
font-size: 14px;
|
|
1292
|
-
`,Fh=({isOpen:e,leftButtons:t=[],centerButtons:r=[],rightButtons:o=[]})=>e?Jt(Rh,{children:[Kt(Oh,{children:t.map((e,t)=>Kt(Lh,{...e},`footer-left-button-${t}`))}),Kt(_h,{children:r.map((e,t)=>Kt(Lh,{...e},`footer-center-button-${t}`))}),Kt(Ph,{children:o.map((e,t)=>Kt(Lh,{...e},`footer-right-button-${t}`))})]}):null,zh=Yt.div`
|
|
1293
|
-
position: fixed;
|
|
1294
|
-
top: 0;
|
|
1295
|
-
bottom: 0;
|
|
1296
|
-
${({$position:e})=>e}: 0;
|
|
1297
|
-
z-index: 1000;
|
|
1298
|
-
width: ${({$width:e})=>e};
|
|
1299
|
-
background: ${({theme:e})=>e.colors.translucent_bg};
|
|
1300
|
-
box-shadow: 0 2px 10px ${({theme:e})=>e.colors.primary+Bs["010"]};
|
|
1301
|
-
overflow-y: auto;
|
|
1302
|
-
animation-name: ${({$position:e})=>js.in[e]};
|
|
1303
|
-
`,Mh=Yt.div`
|
|
1304
|
-
display: flex;
|
|
1305
|
-
flex-direction: column;
|
|
1306
|
-
height: 100%;
|
|
1307
|
-
`,Bh=Yt.div`
|
|
1308
|
-
flex-grow: 1;
|
|
1309
|
-
padding: 24px 32px;
|
|
1310
|
-
overflow-y: auto;
|
|
1311
|
-
`,Uh=({isOpen:e,onClose:t,closeOnEscape:r=!0,position:o="right",width:n="300px",children:i,header:a,footer:s})=>(fl({key:"Escape",active:e&&r},()=>t()),ol(e),e?cr.createPortal(Jt(qt,{children:[Kt(Wn,{hidden:!e,onClick:t}),Kt(zh,{"data-id":"drawer",$position:o,$width:n,children:Jt(Mh,{children:[Kt(Ih,{onClose:t,width:n,...a}),Kt(Bh,{children:i}),Kt(Fh,{...s})]})})]}),document.body):null),jh=({error:e})=>{const t=Zt(),r={container:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",color:t.text.error,fontFamily:t.font_family.primary},errorMessage:{padding:10,borderRadius:5,whiteSpace:"pre-wrap",background:t.colors.error},errorStack:{whiteSpace:"pre-wrap",fontSize:"12px"},errorStackWrapper:{textAlign:"left",marginTop:10},infoText:{marginTop:100,color:t.text.secondary,fontSize:"14px"}};return Jt("div",{style:r.container,children:[Kt("h2",{children:"Something went wrong!"}),Kt("pre",{style:r.errorMessage,children:e?.message||"Unknown Error"}),Jt("details",{style:r.errorStackWrapper,children:[Kt("summary",{children:"Stack Trace"}),Kt("pre",{style:r.errorStack,children:e?.stack||"Unknown Stack"})]}),Kt("p",{style:r.infoText,children:"Try refreshing the page or contact support"}),Kt(Zs,{variant:"secondary",onClick:()=>window.location.reload(),style:{fontSize:"1rem"},children:"Reload"})]})},Wh=({children:e})=>Kt(hr,{FallbackComponent:({error:e,...t})=>Kt(Ms,{children:Kt(jh,{...t,error:e})}),children:e}),Hh=Yt(Mn)`
|
|
1312
|
-
position: relative;
|
|
1313
|
-
width: calc(100% - 24px);
|
|
1314
|
-
padding: 12px;
|
|
1315
|
-
background-color: ${({theme:e})=>e.colors.dark_grey};
|
|
1316
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.border+Bs["050"]};
|
|
1317
|
-
`,Xh=Yt(Mn)`
|
|
1318
|
-
margin-right: auto;
|
|
1319
|
-
margin-left: 32px;
|
|
1320
|
-
gap: 12px;
|
|
1321
|
-
`,Gh=Yt(Mn)`
|
|
1322
|
-
margin-left: auto;
|
|
1323
|
-
margin-right: 32px;
|
|
1324
|
-
gap: 12px;
|
|
1325
|
-
`,Vh=Yt(Mn)`
|
|
1326
|
-
position: absolute;
|
|
1327
|
-
left: 50%;
|
|
1328
|
-
transform: translateX(-50%);
|
|
1329
|
-
gap: 12px;
|
|
1330
|
-
`,Kh=({left:e=[],center:t=[],right:r=[]})=>Jt(Hh,{children:[Kt(Xh,{children:e.map((e,t)=>e&&Kt(Ot,{children:e},t))}),Kt(Vh,{children:t.map((e,t)=>e&&Kt(Ot,{children:e},t))}),Kt(Gh,{children:r.map((e,t)=>e&&Kt(Ot,{children:e},t))})]}),Jh=Yt(ri)`
|
|
1331
|
-
color: ${({theme:e})=>e.text.grey};
|
|
1332
|
-
`,qh=({icon:e,title:t,badge:r,badgeTooltip:o,loading:n})=>Jt(Mn,{$gap:6,children:[e&&Kt(e,{}),Kt(Jh,{size:14,children:t}),void 0!==r&&Kt(nc,{text:o,children:Kt(Js,{label:r})}),n&&Kt(Hc,{})]}),Yh=Yt.div`
|
|
1333
|
-
width: fit-content;
|
|
1334
|
-
height: fit-content;
|
|
1335
|
-
padding: 4px;
|
|
1336
|
-
gap: 4px;
|
|
1337
|
-
border-radius: 32px;
|
|
1338
|
-
border: 1px solid ${({theme:e})=>e.colors.border+Bs["070"]};
|
|
1339
|
-
|
|
1340
|
-
display: flex;
|
|
1341
|
-
flex-direction: ${({$orientation:e,$flip:t})=>("horizontal"===e?"row":"column")+(t?"-reverse":"")};
|
|
1342
|
-
align-items: center;
|
|
1343
|
-
justify-content: center;
|
|
1344
|
-
`,Qh=Yt.div`
|
|
1345
|
-
width: 32px;
|
|
1346
|
-
height: 32px;
|
|
1347
|
-
|
|
1348
|
-
border-radius: 100%;
|
|
1349
|
-
background-color: ${({theme:e,$selected:t})=>t?e.colors.majestic_blue+Bs["070"]:e.colors.secondary+Bs["012"]};
|
|
1350
|
-
transition: background-color 0.3s;
|
|
1351
|
-
|
|
1352
|
-
display: flex;
|
|
1353
|
-
align-items: center;
|
|
1354
|
-
justify-content: center;
|
|
1355
|
-
|
|
1356
|
-
cursor: pointer;
|
|
1357
|
-
`,Zh=({orientation:e="vertical",flip:t,mainIcons:r,subIcons:o})=>Jt(Yh,{$orientation:e,$flip:t,children:[r.map(({icon:e,selected:t,onClick:r,tooltip:o},n)=>Kt(nc,{text:o,children:Kt(Qh,{$selected:t,onClick:r,children:Kt(e,{size:20})})},`main-nav-icon-${n}`)),!!r.length&&!!o.length&&Kt(Gl,{orientation:"vertical"===e?"horizontal":"vertical",margin:"0",length:"20px"}),o.map(({icon:e,selected:t,onClick:r,tooltip:o},n)=>Kt(nc,{text:o,children:Kt(Qh,{$selected:t,onClick:r,children:Kt(e,{size:20})})},`sub-nav-icon-${n}`))]}),em=Yt.div`
|
|
1358
|
-
display: flex;
|
|
1359
|
-
flex-direction: column;
|
|
1360
|
-
width: 100%;
|
|
1361
|
-
`,tm=Yt.div`
|
|
1362
|
-
display: flex;
|
|
1363
|
-
flex-direction: column;
|
|
1364
|
-
gap: 8px;
|
|
1365
|
-
`,rm=Yt.div`
|
|
1366
|
-
display: flex;
|
|
1367
|
-
align-items: center;
|
|
1368
|
-
gap: 16px;
|
|
1369
|
-
`,om=Yt(sc)`
|
|
1370
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1371
|
-
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1372
|
-
`,nm=({initialValues:e=[],value:t,onChange:r,title:o,tooltip:n,required:i,errorMessage:a})=>{const[s,l]=Pt(t||e);Lt(()=>{s.length||l([""])},[]);const c=s.filter(e=>!!e.trim()),d=Ft(JSON.stringify(c));Lt(()=>{const e=JSON.stringify(c);d.current!==e&&(d.current=e,r&&r(c))},[c]);const p=(e,t)=>{l(r=>{const o=[...r];return o[t]=e,o})},u=s.length<=1,h=s.some(e=>""===e.trim()),m=u&&h;return Jt(em,{children:[Kt(uu,{title:o,required:i,tooltip:n}),Kt(tm,{children:s.map((e,t)=>{const r=t===s.length-1;return Jt(rm,{children:[Kt(bu,{value:e,onChange:e=>p(e.target.value,t),hasError:!!a,autoFocus:gn(e)&&!u&&r}),t===s.length-1&&Kt(om,{withBorder:!0,size:30,$disabled:h,onClick:h?void 0:()=>{l(e=>{const t=[...e];return t.push(""),t})},children:Kt(mt,{})}),Kt(om,{size:30,$disabled:m,onClick:m?void 0:()=>(e=>{u?p("",e):l(t=>t.filter((t,r)=>r!==e))})(t),children:Kt(vt,{})})]},`input-list-${t}`)})}),!!a&&Kt(ii,{children:a})]})},im=({col:e,colIdx:t,row:r,rowIdx:o,rowsLength:n,maxWidth:i,handleChange:a,errorMessage:s,limitFieldsPerRow:l})=>{const{keyName:c,title:d,tooltip:p,placeholder:u,required:h,type:m,componentType:g,options:f,renderCondition:x}=e,y=r[c];if(x&&!x(r))return null;return Kt("td",{style:{maxWidth:i,padding:"4px 6px 4px 0"},children:(()=>{switch(g){case Wr.Dropdown:const e=f?.find(e=>e.id===y);return Kt(ku,{title:l?d:void 0,tooltip:l?p:void 0,placeholder:u,required:h,options:f||[],value:e,onSelect:e=>a(c,e.id,o),onDeselect:()=>a(c,"",o),hasError:!!s&&(!h||h&&gn(y))});case"multi-dropdown":const r=Array.isArray(y)&&f?.filter(e=>y.includes(e.id))||[];return Kt(ku,{title:l?d:void 0,tooltip:l?p:void 0,placeholder:u,required:h,options:f||[],value:r,isMulti:!0,onSelect:e=>{const t=[...Array.isArray(y)?y:[],e.id];a(c,t,o)},onDeselect:e=>{const t=(Array.isArray(y)?y:[]).filter(t=>t!==e.id);a(c,t,o)},hasError:!!s&&(!h||h&&gn(y))});default:const g=n>1&&o===n-1&&0===t&&gn(y);return Kt(bu,{title:l?d:void 0,tooltip:l?p:void 0,placeholder:u,type:m,required:h,autoFocus:g,value:y,onChange:({target:{value:e}})=>a(c,e,o),style:{maxWidth:i,paddingLeft:10},hasError:!!s&&(!h||h&&gn(y))})}})()},`input-table-${o}-${c}`)},am=Yt.div`
|
|
1373
|
-
display: flex;
|
|
1374
|
-
flex-direction: column;
|
|
1375
|
-
width: 100%;
|
|
1376
|
-
`,sm=Yt.button`
|
|
1377
|
-
margin-top: ${({$marginTop:e})=>e};
|
|
1378
|
-
background: none;
|
|
1379
|
-
border: none;
|
|
1380
|
-
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1381
|
-
opacity: ${({disabled:e})=>e?.5:1};
|
|
1382
|
-
`,lm=({columns:e,initialValues:t=[],value:r,onChange:o,errorMessage:n,limitFieldsPerRow:i,title:a=""})=>{const[s,l]=Pt({}),[c,d]=Pt(r||t),p=_t(()=>new Map(e.map(e=>[e.keyName,e])),[e]);Lt(()=>{if(!c.length){const t={};e.forEach(({keyName:e})=>t[e]=""),l(t),d([t])}},[]);const u=c.filter(e=>{for(const[t,r]of Object.entries(e)){const o=p.get(t);if((!o?.renderCondition||o.renderCondition(e))&&(o?.required&&gn(r)))return!1}return!0}),h=Ft(JSON.stringify(u)),m=u.length!==c.length,g=`${Math.floor(640/((i||e.length)+.4))}px`;Lt(()=>{const e=JSON.stringify(u);h.current!==e&&(h.current=e,o&&o(u))},[u]);const f=(e,t,r)=>{d(o=>{const n=$r(o);return n[r][e]=t,n})},x=_t(()=>{if(i){const t=[];for(let r=0;;r+=i){const o=e.slice(r,r+i);if(!o.length)break;t.push(o)}return t}return[e]},[i,e]);return Jt(am,{children:[Kt(uu,{title:a}),Jt("table",{style:{borderCollapse:"collapse"},children:[!i&&Kt("thead",{children:Jt("tr",{children:[e.map(({title:e,tooltip:t,required:r})=>Kt("th",{style:{maxWidth:g},children:Kt(uu,{title:e,required:r,tooltip:t})},`input-table-head-${e}`)),Kt("th",{})]})}),Kt("tbody",{children:c.map((t,r)=>Jt(Ot,{children:[i&&r>0?Kt("tr",{children:Kt("td",{colSpan:x.length,children:Kt(Gl,{})})}):null,x.map((o,a)=>Jt("tr",{children:[o.map((e,o)=>Kt(im,{col:e,colIdx:o,row:t,rowIdx:r,rowsLength:c.length,maxWidth:g,limitFieldsPerRow:i,errorMessage:n,handleChange:f},`input-table-row-${r}-col-${o}`)),0===a&&Kt("td",{children:Kt(sm,{$marginTop:i?"24px":"0",onClick:()=>{return t=r,void(c.length>1?d(e=>e.filter((e,r)=>r!==t)):e.forEach(({keyName:e,type:r})=>f(e,r===Hr.Number?"0":"",t)));var t},children:Kt(vt,{})})})]},`input-table-matrix-${r}-${a}`))]},`input-table-row-${r}`))})]}),!!n&&Kt(ii,{children:n}),Kt(nd,{onClick:()=>{d(e=>{const t=$r(e);return t.push($r(s)),t})},disabled:m})]})},cm=Yt.div`
|
|
1383
|
-
display: flex;
|
|
1384
|
-
flex-direction: column;
|
|
1385
|
-
width: 100%;
|
|
1386
|
-
`,dm=Yt.div`
|
|
1387
|
-
display: flex;
|
|
1388
|
-
flex-direction: column;
|
|
1389
|
-
gap: 8px;
|
|
1390
|
-
`,pm=Yt.div`
|
|
1391
|
-
display: flex;
|
|
1392
|
-
align-items: center;
|
|
1393
|
-
gap: 8px;
|
|
1394
|
-
`,um=Yt.div`
|
|
1395
|
-
width: 100%;
|
|
1396
|
-
max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
|
|
1397
|
-
`,hm=Yt(sc)`
|
|
1398
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1399
|
-
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1400
|
-
`,mm={key:"",value:""},gm=({initialKeyValuePairs:e=[],value:t,onChange:r,title:o,tooltip:n,disabled:i,required:a,errorMessage:s,keyPlaceholder:l="Key",valuePlaceholder:c="Value",inputMaxWidth:d=300})=>{const[p,u]=Pt(t||e);Lt(()=>{p.length||u([{...mm}])},[]);const h=p.filter(({key:e,value:t})=>!gn(e.trim())&&!gn(t.trim())),m=Ft(JSON.stringify(h));Lt(()=>{const e=JSON.stringify(h);m.current!==e&&(m.current=e,r&&r(h))},[h]);const g=(e,t,r)=>{u(o=>{const n=[...o];return n[r][e]=t,n})},f=p.length<=1,x=i||p.some(({key:e,value:t})=>""===e.trim()||""===t.trim()),y=i||f&&x;return Jt(cm,{children:[Kt(uu,{title:o,required:a,tooltip:n}),Kt(dm,{children:p.map(({key:e,value:t},r)=>Jt(pm,{children:[Kt(um,{$maxWidth:d,children:Kt(bu,{placeholder:l,disabled:i,value:e,onChange:e=>g("key",e.target.value,r),hasError:!!s&&(!a||a&&!e),autoFocus:gn(t)&&!f&&r===p.length-1})}),Kt(um,{$maxWidth:r===p.length-1?d-38:d,children:Kt(bu,{placeholder:c,disabled:i,value:t,onChange:e=>g("value",e.target.value,r),hasError:!!s&&(!a||a&&gn(t)),autoFocus:!1})}),r===p.length-1&&Kt(hm,{withBorder:!0,size:30,$disabled:x,onClick:x?void 0:()=>{u(e=>{const t=[...e];return t.push({...mm}),t})},children:Kt(mt,{})}),Kt(hm,{size:30,$disabled:y,onClick:y?void 0:()=>(e=>{f?(g("key","",e),g("value","",e)):u(t=>t.filter((t,r)=>r!==e))})(r),children:Kt(vt,{})})]},`key-value-input-list-${r}`))}),!!s&&Kt(ii,{children:s})]})},fm=tr`
|
|
1401
|
-
0% {
|
|
1402
|
-
background-position: 0% 50%;
|
|
1403
|
-
}
|
|
1404
|
-
100% {
|
|
1405
|
-
background-position: 100% 50%;
|
|
1406
|
-
}
|
|
1407
|
-
`,xm=Yt(ri)`
|
|
1408
|
-
background: ${({$textColor:e,$stripColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
|
|
1409
|
-
background-size: 250% 100%; /* Expand background to allow movement */
|
|
1410
|
-
background-clip: text;
|
|
1411
|
-
color: transparent;
|
|
1412
|
-
animation: ${fm} 1s reverse linear infinite;
|
|
1413
|
-
`,ym=({children:e="Loading...",textColor:t,stripColor:r,...o})=>{const n=Zt(),i=t||n.v2.colors.white[500],a=r||n.v2.colors.black[500];return Kt(xm,{$textColor:i,$stripColor:a,...o,children:e})},bm=Yt.div`
|
|
1414
|
-
display: flex;
|
|
1415
|
-
flex-direction: ${({$isVertical:e})=>e?"column":"row"};
|
|
1416
|
-
gap: ${({$isVertical:e})=>e?"12px":"24px"};
|
|
1417
|
-
${({$hasError:e})=>e&&Qt`
|
|
1418
|
-
border: 1px solid ${({theme:e})=>e.text.error};
|
|
1419
|
-
border-radius: 32px;
|
|
1420
|
-
padding: 8px;
|
|
1421
|
-
`}
|
|
1422
|
-
`,$m=(e,t)=>!t?.length||!!t?.find(t=>t===e),vm=({isVertical:e,title:t="Monitors",required:r,errorMessage:o,allowedSignals:n,selectedSignals:i,setSelectedSignals:a})=>{const[s,l]=Pt(1===i.length),c=Ft(JSON.stringify(i));Lt(()=>{const e=i;e.length||ps.forEach(({id:t})=>{$m(t,n)&&e.push(t)});const t=JSON.stringify(e);return c.current!==t&&(c.current=t,a(e),l(1===e.length)),()=>{c.current=""}},[n]);return Jt("div",{children:[t&&Kt(uu,{title:t,required:r}),Kt(bm,{$isVertical:e,$hasError:!!o,children:ps.map(e=>{const t=$m(e.id,n),r=((e,t)=>!!t?.find(t=>t===e))(e.id,i);return t?Kt(Tc,{title:e.value,disabled:!t||s&&r,value:r,onChange:t=>((e,t)=>{const r=e,o=t?[...i,r]:i.filter(e=>e!==r);a(o),l(1===o.length)})(e.id,t)},e.id):null})}),!!o&&Kt(ii,{children:o})]})},wm=Yt.div`
|
|
1423
|
-
display: flex;
|
|
1424
|
-
gap: 8px;
|
|
1425
|
-
align-items: center;
|
|
1426
|
-
`,Sm=Yt(Zs)`
|
|
1427
|
-
display: flex;
|
|
1428
|
-
align-items: center;
|
|
1429
|
-
justify-content: center;
|
|
1430
|
-
gap: 8px;
|
|
1431
|
-
min-width: 90px;
|
|
1432
|
-
`,km=({buttons:e})=>{const t=Zt(),r=({button:t,index:r})=>e.length>1&&0===r&&(t.icon||t.iconSrc),o=({button:e,rotate:r})=>e.icon?Kt(e.icon,{size:14,rotate:r,fill:t.text[e.variant||"secondary"]}):e.iconSrc?Kt("img",{src:e.iconSrc,alt:e.label,width:8,height:12}):null;return Kt(wm,{children:e.map((e,t)=>Kt(nc,{text:e.tooltip||"",children:Jt(Sm,{variant:e.variant||"secondary",onClick:e.onClick,disabled:e.disabled,children:[r({button:e,index:t})&&o({button:e,rotate:0}),e.label,!r({button:e,index:t})&&o({button:e,rotate:180})]},t)},t))})},Cm=Yt.div`
|
|
1433
|
-
width: 100%;
|
|
1434
|
-
height: 100%;
|
|
1435
|
-
|
|
1436
|
-
* {
|
|
1437
|
-
animation: none !important;
|
|
1438
|
-
transition: none !important;
|
|
1439
|
-
}
|
|
1440
|
-
`,Em=({width:e="100%",height:t="100%",gap:r=0,elements:o,noAnimation:n=!1,onTopIndexChange:i})=>{const a=Ft(null),s=_t(()=>r?o.map((e,t)=>Kt("div",{style:{paddingBottom:r},children:e},`scroll-y-item-${t}`)):o,[o,r]),l=zt(e=>{if(!i||!a.current)return;const t=a.current.findItemIndex(e);i(t)},[i]),c=Kt(gr,{ref:a,style:{width:e,height:t},onScroll:i?l:void 0,children:s});return n?Kt(Cm,{children:c}):c},Am=Yt.div`
|
|
1441
|
-
display: flex;
|
|
1442
|
-
justify-content: space-between;
|
|
1443
|
-
align-items: center;
|
|
1444
|
-
gap: 16px;
|
|
1445
|
-
`,Tm=Yt.div`
|
|
1446
|
-
display: flex;
|
|
1447
|
-
flex-direction: column;
|
|
1448
|
-
gap: 4px;
|
|
1449
|
-
`,Dm=Yt.div`
|
|
1450
|
-
display: flex;
|
|
1451
|
-
align-items: center;
|
|
1452
|
-
gap: 8px;
|
|
1453
|
-
`,Nm=Yt(ri)``,Im=Yt(ri)``,Rm=({title:e,description:t,badgeLabel:r,icon:o,actionButton:n,size:i="medium"})=>{const a="small"===i?16:"medium"===i?20:24,s="small"===i?12:"medium"===i?14:16;return Jt(Am,{children:[Jt(Tm,{children:[Jt(Dm,{children:[o&&Kt(o,{size:a}),Kt(Nm,{weight:300,size:a,children:e}),void 0!==r&&Kt(Js,{label:r,filled:!!r})]}),Kt(Im,{weight:200,opacity:.8,size:s,children:t})]}),n&&Kt("div",{children:n})]})},Om=Yt.div`
|
|
1454
|
-
position: relative;
|
|
1455
|
-
gap: 0;
|
|
1456
|
-
z-index: 0;
|
|
1457
|
-
display: grid;
|
|
1458
|
-
grid-template-columns: repeat(${({$count:e})=>e}, 1fr);
|
|
1459
|
-
`,_m=Yt.button`
|
|
1460
|
-
flex: 1;
|
|
1461
|
-
display: flex;
|
|
1462
|
-
align-items: center;
|
|
1463
|
-
justify-content: center;
|
|
1464
|
-
gap: 4px;
|
|
1465
|
-
padding: 6px 12px;
|
|
1466
|
-
background-color: transparent;
|
|
1467
|
-
border-radius: ${({$isFirstItem:e,$isLastItem:t})=>e?"32px 0px 0px 32px":t?"0px 32px 32px 0px":"0"};
|
|
1468
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1469
|
-
cursor: pointer;
|
|
1470
|
-
&:hover {
|
|
1471
|
-
border: 1px solid ${({theme:e})=>e.colors.secondary};
|
|
1472
|
-
}
|
|
1473
|
-
`,Pm=Yt.div`
|
|
1474
|
-
position: absolute;
|
|
1475
|
-
top: ${({$y:e})=>e}px;
|
|
1476
|
-
left: ${({$x:e})=>e}px;
|
|
1477
|
-
z-index: -1;
|
|
1478
|
-
width: ${({$width:e})=>e}px;
|
|
1479
|
-
height: ${({$height:e})=>e}px;
|
|
1480
|
-
background-color: ${({theme:e,$bgColor:t})=>t||e.colors.dropdown_bg_2};
|
|
1481
|
-
border-radius: ${({$isFirstItem:e,$isLastItem:t})=>e?"32px 0px 0px 32px":t?"0px 32px 32px 0px":"0"};
|
|
1482
|
-
transition: all 0.3s;
|
|
1483
|
-
`,Lm=({options:e=[],selected:t,setSelected:r})=>{const o=e.findIndex(e=>e.value===t),[n,i]=Pt(e[o]?.selectedBgColor||""),[a,s]=Pt({width:0,height:0}),[l,c]=Pt({x:0,y:0}),d=Ft(null);return Lt(()=>{d.current&&(s({width:d.current.offsetWidth,height:d.current.offsetHeight}),c({x:d.current.offsetWidth*o,y:0}))},[t,o]),Jt(Om,{$count:e.length,children:[e.map(({icon:o,label:n,value:a,selectedBgColor:s,selectedTextColor:l},c)=>{const p=t===a;return Jt(_m,{ref:p?d:void 0,$isFirstItem:0===c,$isLastItem:c===e.length-1,onClick:()=>{r(a),i(s||"")},children:[o&&Kt(o,{}),n&&Kt(ri,{size:12,family:"secondary",decoration:"underline",color:p?l:void 0,children:n})]},`segment-${n||c}-${a}`)}),Kt(Pm,{$bgColor:n,$width:a.width,$height:a.height,$x:l.x,$y:l.y,$isFirstItem:0===o,$isLastItem:o===e.length-1})]})},Fm=Yt(Zs)`
|
|
1484
|
-
gap: 8px;
|
|
1485
|
-
text-transform: none;
|
|
1486
|
-
text-decoration: none;
|
|
1487
|
-
border: ${({theme:e,$withBorder:t})=>`1px solid ${t?e.colors.border:"transparent"}`};
|
|
1488
|
-
&.not-selected {
|
|
1489
|
-
background-color: ${({theme:e,$color:t})=>t||e.colors.dropdown_bg_2+Bs["060"]};
|
|
1490
|
-
&:hover {
|
|
1491
|
-
background-color: ${({theme:e,$hoverColor:t})=>t||e.colors.dropdown_bg_2};
|
|
1492
|
-
}
|
|
1493
|
-
}
|
|
1494
|
-
&.selected {
|
|
1495
|
-
background-color: ${({theme:e})=>e.colors.majestic_blue+Bs["030"]};
|
|
1496
|
-
}
|
|
1497
|
-
`,zm=Yt(ri)`
|
|
1498
|
-
white-space: nowrap;
|
|
1499
|
-
overflow: hidden;
|
|
1500
|
-
text-overflow: ellipsis;
|
|
1501
|
-
font-size: 14px;
|
|
1502
|
-
`,Mm=({label:e,onClick:t,icon:r,iconSrc:o,badgeLabel:n,badgeFilled:i,isSelected:a,withBorder:s,color:l,hoverColor:c,style:d})=>{const p=Zt();return Jt(Fm,{onClick:t,className:a?"selected":"not-selected",$withBorder:s,$color:l,$hoverColor:c,style:d,children:[r&&Kt("div",{children:Kt(r,{fill:p.text.info})}),o&&Kt("div",{children:Kt("img",{src:o,alt:"",width:16,height:16})}),Kt(zm,{children:e}),a&&Kt("div",{children:Kt(st,{fill:p.colors.majestic_blue_soft})}),void 0!==n&&Kt(Js,{label:n,filled:i||a})]})},Bm=Yt.div`
|
|
1503
|
-
display: flex;
|
|
1504
|
-
flex-direction: column;
|
|
1505
|
-
gap: 16px;
|
|
1506
|
-
${({$maxWidth:e})=>e&&`max-width: ${e};`}
|
|
1507
|
-
`,Um=Yt.div`
|
|
1508
|
-
display: flex;
|
|
1509
|
-
align-items: center;
|
|
1510
|
-
gap: 16px;
|
|
1511
|
-
`,jm=Yt.div`
|
|
1512
|
-
width: 50px;
|
|
1513
|
-
height: 50px;
|
|
1514
|
-
border-radius: 8px;
|
|
1515
|
-
background: ${({theme:e})=>`linear-gradient(90deg, ${e.colors.dropdown_bg_2} 25%, ${e.colors.dropdown_bg_2} 50%, ${e.colors.border} 75%)`};
|
|
1516
|
-
background-size: 200% 100%;
|
|
1517
|
-
animation: ${Xs} 10s infinite linear;
|
|
1518
|
-
`,Wm=Yt(Bn)`
|
|
1519
|
-
flex: 1;
|
|
1520
|
-
gap: 12px;
|
|
1521
|
-
`,Hm=Yt.div`
|
|
1522
|
-
width: ${({$width:e})=>e};
|
|
1523
|
-
height: 16px;
|
|
1524
|
-
background: ${({theme:e})=>`linear-gradient(90deg, ${e.colors.dropdown_bg_2} 25%, ${e.colors.dropdown_bg_2} 50%, ${e.colors.border} 75%)`};
|
|
1525
|
-
background-size: 200% 100%;
|
|
1526
|
-
animation: ${Xs} 1.5s infinite linear;
|
|
1527
|
-
border-radius: 4px;
|
|
1528
|
-
`,Xm=({size:e=5,maxWidth:t})=>Kt(Bm,{$maxWidth:t,children:[...Array(e)].map((e,t)=>Jt(Um,{children:[Kt(jm,{}),Jt(Wm,{children:[Kt(Hm,{$width:"80%"}),Kt(Hm,{$width:"100%"})]})]},t))});var Gm;!function(e){e.Active="active",e.Disabled="disabled",e.Finished="finish"}(Gm||(Gm={}));const Vm=Yt.div`
|
|
1529
|
-
display: flex;
|
|
1530
|
-
flex-direction: column;
|
|
1531
|
-
gap: 32px;
|
|
1532
|
-
`,Km=Yt.div`
|
|
1533
|
-
display: flex;
|
|
1534
|
-
gap: 16px;
|
|
1535
|
-
padding: 8px;
|
|
1536
|
-
opacity: ${({$state:e})=>e===Gm.Active?1:e===Gm.Disabled?.5:.8};
|
|
1537
|
-
transition: all 0.3s;
|
|
1538
|
-
`,Jm=Yt(Mn)`
|
|
1539
|
-
justify-content: center;
|
|
1540
|
-
width: 24px;
|
|
1541
|
-
height: 24px;
|
|
1542
|
-
border-radius: 32px;
|
|
1543
|
-
border: ${({theme:e,$state:t})=>t===Gm.Disabled?`1px dashed ${e.text.dark_grey}`:`1px solid ${e.colors.secondary}`};
|
|
1544
|
-
opacity: ${({$state:e})=>e===Gm.Finished?.8:1};
|
|
1545
|
-
`,qm=Yt(Bn)`
|
|
1546
|
-
justify-content: center;
|
|
1547
|
-
gap: 8px;
|
|
1548
|
-
`,Ym=Yt(ri)``,Qm=Yt(ri)``,Zm=({data:e,currentStep:t=0})=>{const[r,o]=Pt([]);return Lt(()=>{o(e.map((e,r)=>r<t-1?{...e,state:Gm.Finished,subtitle:e.subtitle||Xr.Success}:r===t-1?{...e,state:Gm.Active,subtitle:""}:{...e,state:Gm.Disabled,subtitle:""}))},[t,e]),Kt(Vm,{children:r.map((e,t)=>Jt(Km,{$state:e.state,children:[Kt(Jm,{$state:e.state,children:[Gm.Active,Gm.Disabled].includes(e.state)?Kt(ri,{size:12,children:e.stepNumber}):e.state===Gm.Finished?Kt(st,{size:20}):null}),Jt(qm,{children:[Kt(Ym,{family:"secondary",children:e.title}),e.subtitle&&Kt(Qm,{size:10,weight:300,children:e.subtitle})]})]},t))})},eg=Yt(Mn)`
|
|
1549
|
-
width: fit-content;
|
|
1550
|
-
gap: 6px;
|
|
1551
|
-
padding: 6px 12px;
|
|
1552
|
-
border-radius: 360px;
|
|
1553
|
-
background-color: ${({$type:e,theme:t})=>t.colors[e]};
|
|
1554
|
-
`,tg=Yt(ri)`
|
|
1555
|
-
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
1556
|
-
`,rg=({type:e=Xr.Info,icon:t,title:r,size:o,family:n,children:i,...a})=>Jt(eg,{$type:e,children:[t&&Kt(t,{}),Kt(tg,{$type:e,size:o||12,family:n||"secondary",...a,children:i||r})]}),og=Yt.div`
|
|
1557
|
-
display: flex;
|
|
1558
|
-
flex-direction: column;
|
|
1559
|
-
position: relative;
|
|
1560
|
-
width: 100%;
|
|
1561
|
-
`,ng=Yt.div`
|
|
1562
|
-
width: 100%;
|
|
1563
|
-
display: flex;
|
|
1564
|
-
align-items: center;
|
|
1565
|
-
gap: 12px;
|
|
1566
|
-
transition: border-color 0.3s;
|
|
1567
|
-
border-radius: 24px;
|
|
1568
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1569
|
-
${({$disabled:e})=>e&&Qt`
|
|
1570
|
-
background-color: ${({theme:e})=>e.colors.border};
|
|
1571
|
-
cursor: not-allowed;
|
|
1572
|
-
opacity: 0.6;
|
|
1573
|
-
`}
|
|
1574
|
-
|
|
1575
|
-
${({$hasError:e})=>e&&Qt`
|
|
1576
|
-
border-color: ${({theme:e})=>e.text.error};
|
|
1577
|
-
`}
|
|
1578
|
-
|
|
1579
|
-
${({$isActive:e})=>e&&Qt`
|
|
1580
|
-
border-color: ${({theme:e})=>e.colors.secondary};
|
|
1581
|
-
`}
|
|
1582
|
-
|
|
1583
|
-
&:hover {
|
|
1584
|
-
border-color: ${({theme:e})=>e.colors.secondary};
|
|
1585
|
-
}
|
|
1586
|
-
&:focus-within {
|
|
1587
|
-
border-color: ${({theme:e})=>e.colors.secondary};
|
|
1588
|
-
}
|
|
1589
|
-
`,ig=Yt.textarea`
|
|
1590
|
-
flex: 1;
|
|
1591
|
-
border: none;
|
|
1592
|
-
outline: none;
|
|
1593
|
-
background: none;
|
|
1594
|
-
color: ${({theme:e})=>e.text.secondary};
|
|
1595
|
-
font-size: 14px;
|
|
1596
|
-
padding: 12px 20px 0;
|
|
1597
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1598
|
-
font-weight: 300;
|
|
1599
|
-
line-height: 22px;
|
|
1600
|
-
&::placeholder {
|
|
1601
|
-
color: ${({theme:e})=>e.text.secondary};
|
|
1602
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1603
|
-
opacity: 0.4;
|
|
1604
|
-
font-size: 14px;
|
|
1605
|
-
font-weight: 300;
|
|
1606
|
-
line-height: 22px; /* 157.143% */
|
|
1607
|
-
}
|
|
1608
|
-
|
|
1609
|
-
&:disabled {
|
|
1610
|
-
background-color: ${({theme:e})=>e.colors.border};
|
|
1611
|
-
cursor: not-allowed;
|
|
1612
|
-
}
|
|
1613
|
-
`,ag=({errorMessage:e,title:t,tooltip:r,required:o,onChange:n,name:i,...a})=>{const s=Ft(null),l=e=>{s.current&&(s.current.style.height="auto",e&&(s.current.style.height=`${s.current.scrollHeight}px`))};return Jt(og,{children:[Kt(uu,{title:t,required:o,tooltip:r}),Kt(ng,{$disabled:a.disabled,$hasError:!!e,$isActive:!!a.autoFocus,children:Kt(ig,{ref:s,"data-id":i,name:i,onFocus:()=>l(!0),onBlur:()=>l(!1),onChange:e=>{e.stopPropagation(),l(!0),n?.(e)},onKeyDown:e=>{e.stopPropagation()},...a})}),!!e&&Kt(ii,{children:e})]})},sg=Yt.div`
|
|
1614
|
-
display: flex;
|
|
1615
|
-
align-items: center;
|
|
1616
|
-
gap: 12px;
|
|
1617
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1618
|
-
opacity: ${({$disabled:e})=>e?.6:1};
|
|
1619
|
-
`,lg=Yt.div`
|
|
1620
|
-
width: 24px;
|
|
1621
|
-
height: 12px;
|
|
1622
|
-
border: 1px ${({$isActive:e,theme:t})=>e?`solid ${t.colors.majestic_blue}`:`dashed ${t.text.grey}`};
|
|
1623
|
-
border-radius: 20px;
|
|
1624
|
-
display: flex;
|
|
1625
|
-
align-items: center;
|
|
1626
|
-
padding: 2px;
|
|
1627
|
-
background-color: transparent;
|
|
1628
|
-
pointer-events: ${({$disabled:e})=>e?"none":"auto"};
|
|
1629
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1630
|
-
opacity: ${({$isActive:e})=>e?1:.5};
|
|
1631
|
-
transition: border-color 0.3s, opacity 0.3s;
|
|
1632
|
-
&::before {
|
|
1633
|
-
content: '';
|
|
1634
|
-
width: 12px;
|
|
1635
|
-
height: 12px;
|
|
1636
|
-
border-radius: 50%;
|
|
1637
|
-
background-color: ${({$isActive:e,theme:t})=>e?t.colors.majestic_blue:t.colors.secondary};
|
|
1638
|
-
transform: ${({$isActive:e})=>e?"translateX(12px)":"translateX(0)"};
|
|
1639
|
-
transition: background-color 0.3s, transform 0.3s;
|
|
1640
|
-
}
|
|
1641
|
-
`,cg=({title:e,tooltip:t,initialValue:r=!1,onChange:o,disabled:n,allowPropagation:i=!1,flipHorizontally:a})=>{const[s,l]=Pt(r);Lt(()=>l(r),[r]);return Jt(sg,{$disabled:n,onClick:e=>{n||(i||e.stopPropagation(),o?o(!s):l(e=>!e))},children:[!a&&Kt(lg,{$disabled:n,$isActive:s}),(e||t)&&Kt(nc,{text:t,withIcon:!0,children:e&&Kt(ri,{size:14,children:e})}),a&&Kt(lg,{$disabled:n,$isActive:s})]})};var dg={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 pg=Yt.div`
|
|
1642
|
-
width: ${({$width:e})=>e}px;
|
|
1643
|
-
height: ${({$height:e})=>e}px;
|
|
1644
|
-
position: relative;
|
|
1645
|
-
`,ug=({width:e=620})=>{const{darkMode:t}=Zt(),r=e/(620/220);return Kt(pg,{$width:e,$height:r,children:Kt(mr,{autoplay:!0,loop:!0,animationData:dg,style:{width:r,height:e,transform:"rotate(-90deg)",position:"absolute",top:-(r-r/10),left:r-r/10,filter:t?"invert(0)":"invert(1)"}})})},hg=Yt.div`
|
|
1646
|
-
display: flex;
|
|
1647
|
-
align-items: center;
|
|
1648
|
-
justify-content: center;
|
|
1649
|
-
gap: 4px;
|
|
1650
|
-
min-width: ${({$minWidth:e})=>e};
|
|
1651
|
-
width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
|
|
1652
|
-
padding: ${({$hasLabel:e})=>e?"4px 8px":"4px"};
|
|
1653
|
-
border-radius: 100px;
|
|
1654
|
-
background-color: ${({$backgroundColor:e})=>e};
|
|
1655
|
-
`,mg=({label:e,leftIcon:t,rightIcon:r,tooltip:o,status:n=Kr.Unknown,useSecondaryTone:i=!1,invertColors:a=!1,textSize:s,textColor:l,backgroundColor:c,minWidth:d="unset",fullWidth:p=!1})=>{const u=Zt(),h=e?.toString(),m=n?[Kr.Disabled].includes(n)?rn(u,n,a?"400":"700"):[Kr.Unknown].includes(n)?rn(u,n,"600"):rn(u,n,a?i?"400":"300":i?"700":"500"):u.v2.colors.grey[200],g=l||(a&&![Kr.Unknown].includes(n)?m:[Kr.Disabled].includes(n)?u.v2.colors.grey[400]:[Xr.Error,Xr.Warning,Xr.Success].includes(n)?u.v2.colors.black[500]:u.v2.colors.white[500]),f=c||(a&&![Kr.Unknown].includes(n)?[Kr.Disabled].includes(n)?u.v2.colors.grey[700]:u.v2.colors.silver[600]:m);return Kt(nc,{text:o,fullWidth:p,children:Jt(hg,{$backgroundColor:f,$minWidth:d,$fullWidth:p,$hasLabel:!!h,children:[t&&Kt(t,{fill:g,size:14}),h&&Kt(Yn,{color:g,size:s||Jn.XXS,nowrap:!0,children:h}),r&&Kt(r,{fill:g,size:14})]})})},gg=Yt.span`
|
|
1656
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1657
|
-
font-size: ${({$smallAndDark:e})=>e?"12px":"14px"};
|
|
1658
|
-
font-weight: 400;
|
|
1659
|
-
color: ${({theme:e,$smallAndDark:t})=>t?e.v2.colors.grey[400]:e.v2.colors.silver[200]};
|
|
1660
|
-
`,fg=Yt.span`
|
|
1661
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1662
|
-
font-size: 14px;
|
|
1663
|
-
font-weight: 400;
|
|
1664
|
-
color: ${({theme:e})=>e.v2.colors.red[500]};
|
|
1665
|
-
`,xg=({label:e,tooltip:t,required:r,badge:o,width:n,smallAndDark:i})=>e||t||r?Jt(Mn,{$width:n,$justifyContent:"space-between",children:[e&&Kt(gg,{$smallAndDark:i,children:e}),Jt(Mn,{$gap:4,children:[o&&Kt(mg,{...o,textSize:Jn.XXXS}),r&&Kt(fg,{children:"*"}),t&&Kt(nc,{text:t,withIcon:!0})]})]}):null,yg=({errorMessage:e,warnMessage:t,helpMessage:r})=>{const o=Zt(),n=e?o.v2.colors.red[500]:t?o.v2.colors.yellow[500]:o.v2.colors.silver[200],i=Kt(Ve,{size:12,fill:n});return e||t||r?Jt(Mn,{$alignItems:"center",children:[i&&Kt(Bn,{children:i}),Kt(Yn,{size:Jn.XXS,weight:400,color:n,children:e||t||r})]}):null},bg=Yt.div`
|
|
1666
|
-
padding: ${({$small:e})=>e?"4px":"6px 12px"};
|
|
1667
|
-
|
|
1668
|
-
display: flex;
|
|
1669
|
-
align-self: stretch;
|
|
1670
|
-
align-items: center;
|
|
1671
|
-
gap: 8px;
|
|
1672
|
-
border-radius: 6px;
|
|
1673
|
-
|
|
1674
|
-
border: 1px solid ${({theme:e,$disabled:t,$error:r})=>t?e.v2.colors.grey[600]:r?e.v2.colors.red[500]:e.v2.colors.silver[500]};
|
|
1675
|
-
background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
|
|
1676
|
-
${({$disabled:e,$error:t})=>!e&&!t&&Qt`
|
|
1677
|
-
&:hover,
|
|
1678
|
-
&:active,
|
|
1679
|
-
&:focus-within {
|
|
1680
|
-
border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
|
|
1681
|
-
}
|
|
1682
|
-
`}
|
|
1683
|
-
`,$g=Yt.input`
|
|
1684
|
-
max-width: ${({$maxWidth:e})=>e||"unset"};
|
|
1685
|
-
width: ${({$width:e})=>e||"unset"};
|
|
1686
|
-
|
|
1687
|
-
flex: 1;
|
|
1688
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1689
|
-
font-size: ${({$small:e})=>e?"12px":"14px"};
|
|
1690
|
-
font-weight: 400;
|
|
1691
|
-
|
|
1692
|
-
cursor: text;
|
|
1693
|
-
color: ${({theme:e})=>e.v2.colors.white[500]};
|
|
1694
|
-
&::placeholder {
|
|
1695
|
-
color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
1696
|
-
}
|
|
1697
|
-
|
|
1698
|
-
&:disabled {
|
|
1699
|
-
cursor: not-allowed;
|
|
1700
|
-
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
1701
|
-
&::placeholder {
|
|
1702
|
-
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
1703
|
-
}
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
|
-
overflow: hidden;
|
|
1707
|
-
text-overflow: ellipsis;
|
|
1708
|
-
white-space: nowrap;
|
|
1709
|
-
`,vg=Yt.div`
|
|
1710
|
-
display: flex;
|
|
1711
|
-
align-items: center;
|
|
1712
|
-
justify-content: center;
|
|
1713
|
-
cursor: pointer;
|
|
1714
|
-
`,wg=({label:e,required:t,tooltip:r,badge:o,leftIcon:n,rightIcon:i,hasError:a,errorMessage:s,warnMessage:l,helpMessage:c,type:d=Hr.Text,name:p,value:u,onChange:h,disabled:m,maxWidth:g,width:f,small:x=!1,onClick:y,...b})=>{const $=Zt(),v=d===Hr.Password,[w,S]=Pt(!1),[k,C]=Pt(null),E=a||!!s||!!k,A=u?$.v2.colors.white[500]:m?$.v2.colors.grey[400]:$.v2.colors.silver[200],T=x?14:18;return Jt(Bn,{$width:f,$gap:6,children:[Kt(xg,{label:e,tooltip:r,required:t,badge:o}),Jt(bg,{$small:x,$disabled:m,$error:E,onClick:y,children:[n?Kt(n,{size:T,fill:A}):null,Kt($g,{"data-id":p,type:w||d===Hr.Number?Hr.Text:d,name:p,value:u,onChange:e=>{e.stopPropagation();const t=e.target.value;d===Hr.Number&&(e.target.value=An(t),t&&t!==e.target.value?C("Please enter a valid number"):C(null)),h?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:m,$maxWidth:g,$width:f,$small:x,...b}),v?Kt(vg,{onClick:()=>S(e=>!e),children:Kt(w?yt:bt,{size:T,fill:A})}):i?Kt(i,{size:T,fill:A}):null]}),Kt(yg,{errorMessage:k||s,warnMessage:l,helpMessage:c})]})};var Sg,kg;!function(e){e.S="s",e.L="l"}(Sg||(Sg={})),function(e){e.Filled="filled",e.Underline="underline"}(kg||(kg={}));const Cg=Yt.div`
|
|
1715
|
-
display: flex;
|
|
1716
|
-
align-items: center;
|
|
1717
|
-
gap: 2px;
|
|
1718
|
-
padding: 3px;
|
|
1719
|
-
border-radius: 8px;
|
|
1720
|
-
border: 1px solid ${({theme:e})=>e.v2.colors.grey[500]};
|
|
1721
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
1722
|
-
`,Eg=Yt.button`
|
|
1723
|
-
flex: 1;
|
|
1724
|
-
display: flex;
|
|
1725
|
-
align-items: center;
|
|
1726
|
-
justify-content: center;
|
|
1727
|
-
gap: 8px;
|
|
1728
|
-
padding: ${({$size:e})=>e===Sg.S?"4px 8px":"8px 16px"};
|
|
1729
|
-
border-radius: 6px;
|
|
1730
|
-
border: none;
|
|
1731
|
-
box-shadow: ${({$isSelected:e})=>e?"0 0 11px 0 rgba(0, 0, 0, 0.32)":"none"};
|
|
1732
|
-
|
|
1733
|
-
${({$disabled:e,$isSelected:t,$selectedBgColor:r,theme:o})=>e?Qt`
|
|
1734
|
-
cursor: not-allowed;
|
|
1735
|
-
background-color: ${t?(r||o.v2.colors.black[500])+Bs["040"]:"transparent"};
|
|
1736
|
-
`:Qt`
|
|
1737
|
-
cursor: pointer;
|
|
1738
|
-
background-color: ${t?r||o.v2.colors.black[500]:"transparent"};
|
|
1739
|
-
&:hover {
|
|
1740
|
-
background-color: ${t?r||o.v2.colors.black[500]:o.v2.colors.silver[800]};
|
|
1741
|
-
}
|
|
1742
|
-
`}
|
|
1743
|
-
`,Ag=Yt.div`
|
|
1744
|
-
display: flex;
|
|
1745
|
-
align-items: stretch;
|
|
1746
|
-
`,Tg=Yt.button`
|
|
1747
|
-
display: flex;
|
|
1748
|
-
height: 34px;
|
|
1749
|
-
padding: 8px 12px 8px 16px;
|
|
1750
|
-
justify-content: center;
|
|
1751
|
-
align-items: center;
|
|
1752
|
-
gap: 8px;
|
|
1753
|
-
border: none;
|
|
1754
|
-
border-bottom: 2px solid ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:"transparent"};
|
|
1755
|
-
border-radius: ${({$isSelected:e})=>e?"6px 6px 0 0":"0"};
|
|
1756
|
-
background-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.silver[1e3]:"transparent"};
|
|
1757
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1758
|
-
transition:
|
|
1759
|
-
border-color 0.2s,
|
|
1760
|
-
background-color 0.2s,
|
|
1761
|
-
border-radius 0.2s;
|
|
1762
|
-
&:hover {
|
|
1763
|
-
border-bottom-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:e.v2.colors.grey[500]};
|
|
1764
|
-
}
|
|
1765
|
-
`,Dg=({"data-id":e,size:t=Sg.L,variant:r=kg.Filled,options:o=[],selected:n,setSelected:i,disabled:a})=>{const s=Zt(),l=r===kg.Underline,c=l?Tg:Eg;return Kt(l?Ag:Cg,{"data-id":e,children:o.map(({value:e,label:r,icon:o,tooltip:d,selectedBgColor:p,disabled:u},h)=>{const m=n===e,g=u||a,f=g?s.v2.colors.grey[400]:l||m?s.v2.colors.white[500]:s.v2.colors.grey[300],x=t===Sg.S?Jn.XXS:Jn.XS,y=m?500:400,b=Jt(qt,{children:[o&&Kt(o,{fill:f}),r&&Kt(Yn,{size:x,weight:y,color:f,nowrap:!0,children:r})]});return Kt(c,{onClick:()=>!g&&i(e),$disabled:g,$isSelected:m,$size:t,...!l&&{$selectedBgColor:p},children:d?Kt(nc,{text:d,withIcon:!0,children:b}):b},`segment-${r||h}-${e}`)})})},Ng=Yt.div`
|
|
1766
|
-
box-sizing: border-box !important;
|
|
1767
|
-
width: ${({$width:e})=>e??"fit-content"};
|
|
1768
|
-
padding: ${({$withSegment:e})=>e?"2px 2px 2px 12px":"6px 12px"};
|
|
1769
|
-
display: flex;
|
|
1770
|
-
align-self: stretch;
|
|
1771
|
-
align-items: center;
|
|
1772
|
-
gap: 8px;
|
|
1773
|
-
overflow: hidden;
|
|
1774
|
-
border-radius: 6px;
|
|
1775
|
-
|
|
1776
|
-
border: none;
|
|
1777
|
-
border-radius: 6px;
|
|
1778
|
-
background: ${({$isHovered:e,$isActive:t,$idleBackgroundColor:r,$emphasizeBackgroundColor:o,theme:n})=>{const i=r??n.v2.colors.silver[800],a=o??n.v2.colors.silver[700];return e||t?a:i}};
|
|
1779
|
-
`,Ig=Yt.input`
|
|
1780
|
-
min-width: 0;
|
|
1781
|
-
flex: 1;
|
|
1782
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1783
|
-
font-size: 14px;
|
|
1784
|
-
font-weight: 400;
|
|
1785
|
-
line-height: 20px;
|
|
1786
|
-
|
|
1787
|
-
cursor: text;
|
|
1788
|
-
color: ${({$textColor:e})=>e};
|
|
1789
|
-
&::placeholder {
|
|
1790
|
-
color: ${({$textColor:e})=>e};
|
|
1791
|
-
}
|
|
1792
|
-
|
|
1793
|
-
overflow: hidden;
|
|
1794
|
-
text-overflow: ellipsis;
|
|
1795
|
-
white-space: nowrap;
|
|
1796
|
-
`,Rg=({"data-id":e,value:t,onChange:r,placeholder:o,width:n,segment:i,idleBackgroundColor:a,emphasizeBackgroundColor:s})=>{const l=Zt(),[c,d]=Pt(!1),[p,u]=Pt(!1),[h,m]=Pt(!1),g=c?l.v2.colors.white[500]:l.v2.colors.silver[200],f=!!i?.options?.length,x=_t(()=>{if(f)return i?.options.find(e=>e.value===i.selected)?.label},[f,i?.options,i?.selected]),y=_t(()=>o||(f&&x?`Search by ${x.toLowerCase()}`:"Search..."),[o,f,x]);return Jt(Ng,{$width:n,$withSegment:f,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),$isHovered:p&&!h,$isActive:c,$idleBackgroundColor:a,$emphasizeBackgroundColor:s,children:[Kt($t,{size:18,fill:g}),Kt(Ig,{"data-id":e??"search",name:"search",type:"text",placeholder:y,value:t,onChange:e=>{e.stopPropagation(),r(e.target.value)},onFocus:()=>d(!0),onBlur:()=>d(!1),$textColor:g}),f&&Kt("div",{style:{flexShrink:0},onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:Kt(Dg,{"data-id":i["data-id"],options:i.options,selected:i.selected,setSelected:i.setSelected,size:Sg.S})})]})},Og=Yt.div`
|
|
1797
|
-
border-radius: 100%;
|
|
1798
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
1799
|
-
position: relative;
|
|
1800
|
-
`,_g=Yt.div`
|
|
1801
|
-
width: 80px;
|
|
1802
|
-
height: 80px;
|
|
1803
|
-
border-radius: 100%;
|
|
1804
|
-
border: 4px solid ${({theme:e})=>e.v2.colors.green[300]};
|
|
1805
|
-
border-right-color: transparent;
|
|
1806
|
-
border-left-color: transparent;
|
|
1807
|
-
border-bottom-color: transparent;
|
|
1808
|
-
animation: spin 1s linear infinite;
|
|
1809
|
-
@keyframes spin {
|
|
1810
|
-
to {
|
|
1811
|
-
transform: rotate(360deg);
|
|
1812
|
-
}
|
|
1813
|
-
}
|
|
1814
|
-
`,Pg=Yt(Yn)`
|
|
1815
|
-
position: absolute;
|
|
1816
|
-
top: 50%;
|
|
1817
|
-
left: 50%;
|
|
1818
|
-
transform: translate(-50%, -50%);
|
|
1819
|
-
`,Lg=({percentage:e})=>Jt(Og,{children:[Kt(_g,{}),"number"==typeof e?Kt(Pg,{size:Jn.M,weight:500,children:`${e}%`}):null]}),Fg={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 zg(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const r=(e.match(/^[0-9.]*/)||"").toString();t=r.includes(".")?parseFloat(r):parseInt(r,10);const o=(e.match(/[^0-9]*$/)||"").toString();return Fg[o]?{value:t,unit:o}:{value:t,unit:"px"}}function Mg(e){const t=zg(e);return`${t.value}${t.unit}`}const Bg=((e,t,r)=>{const o=`react-spinners-${e}-${r}`;if("undefined"==typeof window||!window.document)return o;const n=document.createElement("style");document.head.appendChild(n);const i=n.sheet,a=`\n @keyframes ${o} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),o})("SpinnerOld","50% {opacity: 0.3} 100% {opacity: 1}","fade"),Ug=({loading:e=!0,color:t,scale:r=1,speedMultiplier:o=1,cssOverride:n={},style:i={},...a})=>{const s=Zt(),l=t||s.text.secondary;if(!e)return null;const{value:c}=zg(2),d=c+4.2,p=d/2+d/5.5,u=4*d*r,h={position:"relative",width:`${u}px`,height:`${u}px`,scale:r,...i,...n},m=(e,t)=>({position:"absolute",width:Mg(1.5),height:Mg(4),borderRadius:Mg(2),backgroundColor:l,transition:"2s",animationFillMode:"both",animation:`${Bg} ${1.2/o}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return Jt("span",{style:h,...a,children:[Kt("span",{style:{...m(1,0),top:`calc(50% + ${d}px)`,left:"50%"}}),Kt("span",{style:{...m(2,-45),top:`calc(50% + ${p}px)`,left:`calc(50% + ${p}px)`}}),Kt("span",{style:{...m(3,90),top:"50%",left:`calc(50% + ${d}px)`}}),Kt("span",{style:{...m(4,45),top:`calc(50% + ${-1*p}px)`,left:`calc(50% + ${p}px)`}}),Kt("span",{style:{...m(5,0),top:`calc(50% + ${-1*d}px)`,left:"50%"}}),Kt("span",{style:{...m(6,-45),top:`calc(50% + ${-1*p}px)`,left:`calc(50% + ${-1*p}px)`}}),Kt("span",{style:{...m(7,90),top:"50%",left:`calc(50% + ${-1*d}px)`}}),Kt("span",{style:{...m(8,45),top:`calc(50% + ${p}px)`,left:`calc(50% + ${-1*p}px)`}})]})},jg=Yt.div`
|
|
1820
|
-
width: ${({$size:e})=>e}px;
|
|
1821
|
-
height: ${({$size:e})=>e}px;
|
|
1822
|
-
border-radius: 100%;
|
|
1823
|
-
background: ${({$color:e})=>e};
|
|
1824
|
-
display: flex;
|
|
1825
|
-
align-items: center;
|
|
1826
|
-
justify-content: center;
|
|
1827
|
-
`,Wg=({scale:e,icon:t})=>{const r=Zt();return Kt(jg,{$size:45*e,$color:"rgba(80, 246, 232, 0.10)",children:Kt(jg,{$size:43*e,$color:"rgba(80, 246, 232, 0.20)",children:Kt(jg,{$size:39*e,$color:"rgba(80, 246, 232, 0.40)",children:Kt(jg,{$size:33*e,$color:"rgba(80, 246, 232, 0.60)",children:Kt(jg,{$size:23*e,$color:"#50F6E8",children:Kt(t,{size:16*e,fill:r.v2.colors.black[500]})})})})})})},Hg=434,Xg=635,Gg=Yt.div`
|
|
1828
|
-
width: ${434}px;
|
|
1829
|
-
height: ${635}px;
|
|
1830
|
-
display: flex;
|
|
1831
|
-
flex-direction: column;
|
|
1832
|
-
align-items: center;
|
|
1833
|
-
justify-content: center;
|
|
1834
|
-
padding: 16px;
|
|
1835
|
-
background: linear-gradient(180deg, #0b0517 2.82%, #190d31 100%);
|
|
1836
|
-
position: relative;
|
|
1837
|
-
`,Vg=Yt.div`
|
|
1838
|
-
position: absolute;
|
|
1839
|
-
top: 50%;
|
|
1840
|
-
left: 50%;
|
|
1841
|
-
transform: translate(-50%, -50%);
|
|
1842
|
-
`,Kg=()=>Jt(Gg,{children:[Kt(Vg,{children:Jt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"464",height:"464",viewBox:"0 0 464 464",fill:"none",children:[Kt("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)"}),Kt("defs",{children:Jt("radialGradient",{id:"paint0_radial_164_65835",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(201.232 229.641) scale(231.217)",children:[Kt("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),Kt("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),Kt("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),Kt("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),Kt("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),Kt("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),Kt("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),Kt("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),Kt("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"})]})})]})}),Kt(Vg,{children:Jt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"432",height:"432",viewBox:"0 0 432 432",fill:"none",children:[Kt("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)"}),Kt("defs",{children:Jt("radialGradient",{id:"paint0_radial_164_65836",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(204.229 214.376) scale(216.276)",children:[Kt("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),Kt("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),Kt("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),Kt("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),Kt("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),Kt("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),Kt("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),Kt("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),Kt("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),Kt("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),Kt("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),Kt(Vg,{children:Jt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"374",height:"374",viewBox:"0 0 374 374",fill:"none",children:[Kt("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)"}),Kt("defs",{children:Jt("radialGradient",{id:"paint0_radial_164_65837",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(166.792 184.246) scale(186.963)",children:[Kt("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),Kt("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),Kt("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),Kt("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),Kt("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),Kt("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),Kt("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),Kt("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),Kt("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),Kt("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),Kt("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),Kt(Vg,{children:Jt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"257",height:"257",viewBox:"0 0 257 257",fill:"none",children:[Kt("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)"}),Kt("defs",{children:Jt("radialGradient",{id:"paint0_radial_164_65838",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(113.263 126.219) scale(128.08)",children:[Kt("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),Kt("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),Kt("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),Kt("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),Kt("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),Kt("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),Kt("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),Kt("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),Kt("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),Kt("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),Kt("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),Kt(Vg,{children:Kt(G,{size:112})})]}),Jg=tr`
|
|
1843
|
-
0% {
|
|
1844
|
-
background-position: 0% 50%;
|
|
1845
|
-
}
|
|
1846
|
-
100% {
|
|
1847
|
-
background-position: 100% 50%;
|
|
1848
|
-
}
|
|
1849
|
-
`,qg=Yt(Yn)`
|
|
1850
|
-
background: ${({$titleColor:e,$gradientColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
|
|
1851
|
-
background-size: 250% 100%; /* Expand background to allow movement */
|
|
1852
|
-
background-clip: text;
|
|
1853
|
-
color: transparent;
|
|
1854
|
-
animation: ${Jg} 1s reverse linear infinite;
|
|
1855
|
-
`,Yg=e=>{const t=Math.max(0,Date.now()-e),r=Math.floor(t/1e3),o=Math.floor(r/60),n=r%60;return`${String(o).padStart(2,"0")}:${String(n).padStart(2,"0")}`},Qg=({icon:e,title:t,titleColor:r,titleSize:o=Jn.S,subTitle:n,subTitleColor:i,subTitleSize:a=Jn.XXXS,startedAt:s,withGradient:l,gradientColor:c,withSpinner:d,withSpinnerOld:p,scaleSpinnerOld:u=1,percentage:h,withVisual:m,visualIcon:g=Ct})=>{const f=Zt(),[x,y]=Pt(()=>s?Yg(s):"");Lt(()=>{if(!s)return;y(Yg(s));const e=setInterval(()=>y(Yg(s)),1e3);return()=>clearInterval(e)},[s]);const b=r||f.v2.colors.white[500],$=i||f.v2.colors.silver[200],v=c||f.v2.colors.black[500];return Jt(Bn,{$gap:16,$alignItems:"center",children:[m?Kt(Wg,{scale:1.7,icon:g}):d?Kt(Lg,{percentage:h}):p?Kt(Ug,{scale:u}):null,(t||n||s||e)&&Jt(Bn,{$gap:8,$alignItems:"center",children:[Jt(Mn,{$gap:4,children:[e&&Kt(e,{}),l?Kt(qg,{align:"center",size:o,$titleColor:b,$gradientColor:v,children:t}):Kt(Yn,{align:"center",size:o,color:b,children:t})]}),n?Kt(Yn,{align:"center",size:a,color:$,children:n}):null,x?Kt(Yn,{align:"center",size:a,color:b,children:x}):null]})]})};var Zg,ef;!function(e){e.Primary="primary",e.Secondary="secondary",e.Text="text"}(Zg||(Zg={})),function(e){e.S="small",e.M="medium",e.L="large"}(ef||(ef={}));const tf=Yt.button`
|
|
1856
|
-
display: flex;
|
|
1857
|
-
align-items: center;
|
|
1858
|
-
justify-content: center;
|
|
1859
|
-
gap: 8px;
|
|
1860
|
-
${({$fullWidth:e})=>e&&Qt`
|
|
1861
|
-
width: 100%;
|
|
1862
|
-
`}
|
|
1863
|
-
border: none;
|
|
1864
|
-
border-radius: 6px;
|
|
1865
|
-
${({$size:e,$hasLabel:t})=>e===ef.S?Qt`
|
|
1866
|
-
height: 32px;
|
|
1867
|
-
${t?Qt`
|
|
1868
|
-
padding: 8px 16px;
|
|
1869
|
-
`:Qt`
|
|
1870
|
-
width: 32px;
|
|
1871
|
-
`}
|
|
1872
|
-
`:e===ef.M?Qt`
|
|
1873
|
-
height: 38px;
|
|
1874
|
-
${t?Qt`
|
|
1875
|
-
padding: 8px 18px;
|
|
1876
|
-
`:Qt`
|
|
1877
|
-
width: 38px;
|
|
1878
|
-
`}
|
|
1879
|
-
`:Qt`
|
|
1880
|
-
height: 44px;
|
|
1881
|
-
${t?Qt`
|
|
1882
|
-
padding: 8px 22px;
|
|
1883
|
-
`:Qt`
|
|
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?Qt`
|
|
1895
|
-
box-shadow: 0 0 11px 0 rgba(0, 0, 0, 0.32);
|
|
1896
|
-
`:""}
|
|
1897
|
-
${({$variant:e})=>e===Zg.Primary?Qt`
|
|
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===Zg.Secondary?Qt`
|
|
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===Zg.Text?Qt`
|
|
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
|
-
`,rf=Ut(({"data-id":e,label:t,tooltip:r,hideTooltipIcon:o,leftIcon:n,rightIcon:i,variant:a=Zg.Primary,size:s=ef.M,iconSize:l,loading:c,fullWidth:d,withShadow:p,textColor:u,disabled:h,onClick:m,...g},f)=>{const x=Zt(),y=l||(s===ef.L?18:16),b=s===ef.L?Jn.S:Jn.XS,$=u||(h?x.v2.colors.grey[400]:x.v2.colors.white[500]),[v,w]=Pt(!1),S=zt(async e=>{e.stopPropagation(),w(!0),await(m?.(e)),w(!1)},[m]);return Kt(tf,{ref:f,"data-id":e,$variant:a,$size:s,$fullWidth:d,$withShadow:p,$hasLabel:!!t,disabled:h,onClick:c||v?void 0:S,...g,children:Kt(nc,{text:r,withIcon:!o,children:c||v?t?Kt(ym,{size:x.v2.text.size[b],textColor:$}):Kt(Hc,{}):Jt(qt,{children:[n&&Kt(n,{size:y,fill:$}),t?Kt(Yn,{size:b,weight:500,color:$,nowrap:!0,children:t}):null,i&&Kt(i,{size:y,fill:$})]})})})});rf.displayName=rf.name;const of=Yt.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
|
-
`,nf=({icon:e=ct,hideIcon:t=!1,title:r="No data",subTitle:o,button:n})=>{const i=Zt().v2.colors.silver[200];return Jt(Bn,{$gap:12,$alignItems:"center",children:[!t&&Kt(of,{children:Kt(e,{size:32,fill:i})}),Jt(Bn,{$gap:4,$alignItems:"center",children:[Kt(Yn,{size:Jn.S,align:"center",children:r}),o&&Kt(Yn,{size:Jn.XXS,align:"center",color:i,children:o})]}),n&&Kt(rf,{variant:Zg.Secondary,...n})]})};var af;!function(e){e.S="small",e.L="large"}(af||(af={}));const sf=Yt.div`
|
|
1933
|
-
width: fit-content;
|
|
1934
|
-
display: flex;
|
|
1935
|
-
align-items: center;
|
|
1936
|
-
gap: 8px;
|
|
1937
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1938
|
-
`,lf=Yt.div`
|
|
1939
|
-
width: ${({$size:e})=>e===af.S?"16px":"20px"};
|
|
1940
|
-
height: ${({$size:e})=>e===af.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
|
-
`,cf=({name:e,label:t,tooltip:r,badge:o,size:n=af.L,disabled:i,partiallyChecked:a,value:s,onChange:l,errorMessage:c,warnMessage:d,helpMessage:p})=>{const u=Zt(),[h,m]=Pt(!1),g=a||s,f=n===af.S?12:16,x=i?u.v2.colors.grey[400]:u.v2.colors.white[500],y=g?"transparent":i?u.v2.colors.grey[700]:h?u.v2.colors.silver[400]:u.v2.colors.silver[600],b=i?u.v2.colors.grey[600]:g?u.v2.colors.purple[500]:u.v2.colors.silver[900];return Jt(Bn,{$gap:4,children:[Jt(Mn,{$justifyContent:"space-between",children:[Jt(sf,{"data-id":e||"checkbox"+(t?`-${t}`:""),onClick:e=>{e.stopPropagation(),i||l(!!a||!s)},$disabled:i,onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:[Kt(lf,{$size:n,$borderColor:y,$backgroundColor:b,children:a?Kt(dt,{size:f,fill:x}):s?Kt(st,{size:f,fill:x}):null}),t&&Kt(Yn,{size:n===af.S?Jn.XXS:Jn.XS,nowrap:!0,children:t})]}),Kt(xg,{tooltip:r,badge:o})]}),Kt(yg,{errorMessage:c,warnMessage:d,helpMessage:p})]})},df=Yt.div`
|
|
1948
|
-
display: flex;
|
|
1949
|
-
flex-direction: ${({$direction:e})=>e===_r.Horizontal?"row":"column"};
|
|
1950
|
-
gap: ${({$direction:e})=>e===_r.Horizontal?16:8}px;
|
|
1951
|
-
`,pf=({direction:e=_r.Vertical,title:t,size:r,disabled:o,withSelectAll:n,options:i,values:a,setValues:s})=>{const l=r===af.S?Jn.XXS:Jn.XS,c=_t(()=>i.every(e=>a[e.id]),[i,a]),d=_t(()=>i.some(e=>a[e.id])&&i.some(e=>!a[e.id]),[i,a]),p=(e,t)=>{s(r=>{const o={...r};return e?o[e]=t:i.forEach(e=>o[e.id]=t),o})};return Jt(df,{$direction:e,children:[t&&n?Kt(cf,{label:t,partiallyChecked:d,value:c,onChange:e=>p("",e),size:r}):t&&!n?Kt(Yn,{size:l,children:t}):null,i.map(e=>Kt(cf,{...e,value:a[e.id],onChange:t=>p(e.id,t),disabled:o,size:r},`${t}-checkbox-${e.id}`))]})};var uf,hf;!function(e){e.Left="left",e.Right="right"}(uf||(uf={})),function(e){e.Top="top",e.Bottom="bottom"}(hf||(hf={}));const mf=Yt.div`
|
|
1952
|
-
position: relative;
|
|
1953
|
-
display: flex;
|
|
1954
|
-
flex-direction: column;
|
|
1955
|
-
gap: 4px;
|
|
1956
|
-
`,gf=Yt.div`
|
|
1957
|
-
display: flex;
|
|
1958
|
-
flex-direction: column;
|
|
1959
|
-
gap: 0;
|
|
1960
|
-
|
|
1961
|
-
min-width: 120px;
|
|
1962
|
-
width: ${({$fullWidth:e})=>e?"calc(100% - 16px)":"fit-content"};
|
|
1963
|
-
padding: 8px;
|
|
1964
|
-
border-radius: 6px;
|
|
1965
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
1966
|
-
box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.3);
|
|
1967
|
-
|
|
1968
|
-
position: absolute;
|
|
1969
|
-
${({$alignX:e})=>`${e}: 0;`}
|
|
1970
|
-
${({$alignY:e,$withOffsetY:t})=>`${e===hf.Bottom?"top":"bottom"}: ${t?"calc(100% + 8px)":"0"};`}
|
|
1971
|
-
z-index: 1;
|
|
1972
|
-
`,ff=Yt.div`
|
|
1973
|
-
display: flex;
|
|
1974
|
-
flex-direction: column;
|
|
1975
|
-
gap: 0;
|
|
1976
|
-
|
|
1977
|
-
width: 100%;
|
|
1978
|
-
max-height: ${({$maxHeight:e})=>e||"230px"};
|
|
1979
|
-
overflow-y: auto;
|
|
1980
|
-
`,xf=Yt.div`
|
|
1981
|
-
display: flex;
|
|
1982
|
-
align-items: center;
|
|
1983
|
-
gap: 8px;
|
|
1984
|
-
width: calc(100% - 16px);
|
|
1985
|
-
padding: 8px;
|
|
1986
|
-
border-radius: 6px;
|
|
1987
|
-
cursor: pointer;
|
|
1988
|
-
${({$selected:e})=>e?Qt`
|
|
1989
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
1990
|
-
`:Qt`
|
|
1991
|
-
background-color: transparent;
|
|
1992
|
-
&:hover {
|
|
1993
|
-
background-color: ${({theme:e})=>e.v2.colors.grey[700]};
|
|
1994
|
-
}
|
|
1995
|
-
`}
|
|
1996
|
-
`,yf=({defaultOpen:e,open:t,onOpenChange:r,alignX:o,alignY:n,items:i,selectedIds:a,setSelectedIds:s,label:l,withMultiSelect:c,withSearch:d,fullWidth:p,maxHeight:u,buttonProps:h,iconButtonProps:m,isLoading:g,emptyMessage:f,children:x})=>{const y=Zt(),b=void 0!==t,$=!!h||!!m||!!x,[v,w]=Pt(e??!$),S=b?t:v,k=zt(e=>{b||w(e),r?.(e)},[b,r]),[C,E]=Pt({x:o||uf.Left,y:n||hf.Bottom}),A=e=>{k(!S),E({x:o||(e.clientX>window.innerWidth/2?uf.Right:uf.Left),y:n||(e.clientY>window.innerHeight/2?hf.Top:hf.Bottom)})},T=e=>{s(c?a.includes(e)?a.filter(t=>t!==e):[...a,e]:[e]),$&&!c&&k(!1)},D=Ft(null);xl(D,()=>k(!1));const[N,I]=Pt(""),R=_t(()=>N?i.filter(e=>e?.label?.toLowerCase().includes(N.toLowerCase())):i,[i.length,N]);return Jt(mf,{ref:D,children:[l&&Kt(xg,{label:l}),h&&Kt(rf,{...h,fullWidth:p,rightIcon:S?Et:At,onClick:A}),m&&Kt(cl,{...m,onClick:A}),"function"==typeof x?x({ChevronIcon:S?Et:At,handleClick:A}):x,S&&Jt(gf,{$alignX:C.x,$alignY:C.y,$fullWidth:p,$withOffsetY:$,children:[d&&Kt(Rg,{value:N,onChange:I,width:"100%"}),g?Kt(Qg,{withSpinner:!0,title:"Loading...",titleSize:Jn.XS}):0===R.length&&f?Kt(nf,{subTitle:f}):Kt(ff,{$maxHeight:u,children:R.map(e=>{if(!e)return null;const{id:t,label:r,icon:o,withCheckbox:n}=e,i=a.includes(t);return Jt(xf,{"data-id":`option-${t}`,$selected:i&&!n,onClick:()=>T(t),children:[n&&Kt(cf,{value:i,onChange:()=>T(t)}),o&&Kt(o,{size:14,fill:y.v2.colors.white[500]}),Kt(Yn,{size:Jn.XS,nowrap:!0,children:r})]},t)})}),c&&Kt(rf,{label:"Done",onClick:()=>k(!1)})]})]})},bf=e=>{const{"data-id":t,options:r,placeholder:o="Search...",isLoading:n}=e,i=!0===e.multiple,[a,s]=Pt(""),[l,c]=Pt(!1),d=_t(()=>i?e.value:e.value?[e.value]:[],[i,e.value]),p=_t(()=>{if(i){const e=d.length;return e?1===e?r.find(e=>e.id===d[0])?.label??"":`${e} selected`:""}return e.value?r.find(t=>t.id===e.value)?.label??"":""},[i,e,r,d]),u=l?a:p,h=_t(()=>{const e=i?r.map(e=>({...e,withCheckbox:!0})):r;if(!a)return e;const t=a.toLowerCase();return e.filter(e=>e.label.toLowerCase().includes(t))},[i,r,a]),m=zt(()=>{s(""),c(!0)},[]),g=zt(t=>{s(t.target.value),l||c(!0),i||t.target.value||!e.value||e.onSelect(null)},[l,i,e]),f=zt(e=>{c(e),e||s("")},[]),x=zt(t=>{if(i)return void e.onSelect(t);const o=r.find(e=>e.id===t[0]);o&&(e.onSelect(o),s(""),c(!1))},[i,e,r]),y=l&&(n||h.length>0||a.length>0);return Kt(yf,{open:y,onOpenChange:f,items:h,selectedIds:d,setSelectedIds:x,withMultiSelect:i,isLoading:n,emptyMessage:"No results found",fullWidth:!0,alignY:hf.Bottom,children:Kt(wg,{name:t,leftIcon:$t,placeholder:o,value:u,onChange:g,onFocus:m})})},$f=Yt.button`
|
|
1997
|
-
width: 100%;
|
|
1998
|
-
padding: 0;
|
|
1999
|
-
padding-right: 12px;
|
|
2000
|
-
display: flex;
|
|
2001
|
-
align-items: center;
|
|
2002
|
-
justify-content: flex-start;
|
|
2003
|
-
gap: 12px;
|
|
2004
|
-
border-radius: 8px;
|
|
2005
|
-
border: none;
|
|
2006
|
-
${({$hovered:e})=>e?Qt`
|
|
2007
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
2008
|
-
`:Qt`
|
|
2009
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
2010
|
-
`}
|
|
2011
|
-
overflow: hidden;
|
|
2012
|
-
cursor: pointer;
|
|
2013
|
-
&:disabled {
|
|
2014
|
-
cursor: not-allowed;
|
|
2015
|
-
opacity: 0.5;
|
|
2016
|
-
}
|
|
2017
|
-
`,vf=Yt.div`
|
|
2018
|
-
width: ${({$hasIcon:e})=>e?"56px":"0"};
|
|
2019
|
-
height: 56px;
|
|
2020
|
-
display: flex;
|
|
2021
|
-
align-items: center;
|
|
2022
|
-
justify-content: center;
|
|
2023
|
-
${({$hovered:e})=>e?Qt`
|
|
2024
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
2025
|
-
`:Qt`
|
|
2026
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
2027
|
-
`}
|
|
2028
|
-
`,wf=Yt.div`
|
|
2029
|
-
width: ${({$hasIcon:e})=>e?"calc(100% - 56px)":"100%"};
|
|
2030
|
-
display: flex;
|
|
2031
|
-
justify-content: space-between;
|
|
2032
|
-
align-items: center;
|
|
2033
|
-
gap: 8px;
|
|
2034
|
-
`,Sf=({label:e,icon:t,loading:r,disabled:o,onClick:n})=>{const[i,a]=Pt(!1);return Jt($f,{$hovered:i,type:"button",disabled:o||r,onClick:n,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[Kt(vf,{$hovered:i,$hasIcon:!!t,children:t&&Kt(t,{size:36})}),Jt(wf,{$hasIcon:!!t,children:[r?Kt(ym,{size:16}):Kt(Yn,{variant:Kn.Span,align:"center",children:e}),Kt(Tt,{rotate:90,size:24})]})]})},kf=({buttons:e})=>Kt(Bn,{$gap:12,children:e.map(e=>Kt(Sf,{...e},e.label))}),Cf=Yt.div`
|
|
2035
|
-
display: flex;
|
|
2036
|
-
align-items: center;
|
|
2037
|
-
flex-wrap: wrap;
|
|
2038
|
-
width: calc(100% - 24px);
|
|
2039
|
-
padding: 4px 12px;
|
|
2040
|
-
border-radius: 12px;
|
|
2041
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
2042
|
-
`,Ef=Yt.div`
|
|
2043
|
-
width: calc(${({$cellsPerRow:e})=>100/e+"%"} - 16px);
|
|
2044
|
-
margin: 8px;
|
|
2045
|
-
display: flex;
|
|
2046
|
-
flex-direction: column;
|
|
2047
|
-
gap: 4px;
|
|
2048
|
-
`,Af=({cellsPerRow:e,items:t})=>{const r=Zt(),{CopyButton:o}=dl();return Kt(Cf,{children:t.map(({id:n,title:i,label:a,withCopy:s,badge:l})=>Jt(Ef,{$cellsPerRow:e||t.length,children:[Kt(Yn,{size:Jn.XXXS,color:r.v2.colors.silver[200],nowrap:!0,children:i}),Jt(Mn,{$gap:4,children:[l&&Kt(mg,{...l}),a&&Kt(Yn,{size:Jn.XS,nowrap:!0,children:a}),s&&Kt(o,{value:a||l?.label?.toString()||"",size:sl.XS})]})]},n))})};var Tf;!function(e){e.Button="button",e.ButtonDropData="button-drop-data"}(Tf||(Tf={}));const Df=({onAnyClick:e,actions:t})=>Kt(Mn,{$gap:8,$alignItems:"center",children:t?.map(t=>{if(!t)return null;switch(t.type){case Tf.Button:return Kt(rf,{...t.buttonProps,onClick:r=>{t.buttonProps?.onClick?.(r),e?.()}},t.id);case Tf.ButtonDropData:return Kt(yf,{...t.dropDataProps,items:t.dropDataProps?.items??[],withMultiSelect:!1,selectedIds:[],setSelectedIds:r=>{t.buttonProps?.onClick?.(r[0]),e?.()},buttonProps:t.buttonProps},t.id);default:return null}})}),Nf=Yt.div`
|
|
2049
|
-
display: flex;
|
|
2050
|
-
align-items: center;
|
|
2051
|
-
justify-content: center;
|
|
2052
|
-
padding: 8px;
|
|
2053
|
-
border-radius: 8px;
|
|
2054
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
2055
|
-
`,If=({icon:e,title:t,subTitle:r,withCopy:o,badge:n,children:i})=>{const a=Zt(),{CopyButton:s}=dl();return Jt(Mn,{$gap:r?8:6,$alignItems:"center",children:[e&&(r?Kt(Nf,{children:Kt(e,{size:24})}):Kt(e,{size:24})),t||n||r?Jt(Bn,{children:[t||n?Jt(Mn,{$gap:6,$alignItems:"center",children:[t&&Kt(Yn,{nowrap:!0,children:t}),o&&t&&Kt(s,{value:t,size:sl.XS}),n&&Kt(mg,{...n})]}):null,r&&Kt(Yn,{size:Jn.XXS,color:a.v2.colors.silver[200],nowrap:!0,children:r})]}):null,i]})};var Rf;!function(e){e.S="small",e.M="medium"}(Rf||(Rf={}));const Of=Yt.div`
|
|
2056
|
-
display: flex;
|
|
2057
|
-
flex-direction: column;
|
|
2058
|
-
gap: ${({$gap:e})=>e}px;
|
|
2059
|
-
width: ${({$padding:e})=>`calc(100% - ${2*e}px)`};
|
|
2060
|
-
align-self: ${({$fullHeight:e})=>e?"stretch":"auto"};
|
|
2061
|
-
padding: ${({$padding:e})=>e}px;
|
|
2062
|
-
border-radius: 16px;
|
|
2063
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
2064
|
-
`,_f=Ut(({id:e,size:t=Rf.M,fullHeight:r=!1,richTitle:o,search:n,actions:i,children:a},s)=>{const l=t===Rf.S?4:16,c=t===Rf.S?12:16;return Jt(Of,{ref:s,id:e,"data-section-name":e,$padding:c,$gap:l,$fullHeight:r,children:[n||o||i?Jt(Mn,{$gap:l,$justifyContent:"space-between",children:[n||o?Kt(If,{...o,children:n&&Kt(Rg,{...n})}):null,Kt(Df,{actions:i??[]})]}):null,a]})});_f.displayName="SectionCard";const Pf=Yt.div`
|
|
2065
|
-
flex: 1;
|
|
2066
|
-
align-self: stretch;
|
|
2067
|
-
display: flex;
|
|
2068
|
-
align-items: center;
|
|
2069
|
-
gap: 8px;
|
|
2070
|
-
padding: 16px;
|
|
2071
|
-
border-radius: 12px;
|
|
2072
|
-
background-color: ${({theme:e,$status:t})=>rn(e,t,t===Kr.Unknown?"750":"500")};
|
|
2073
|
-
`,Lf=Yt.div`
|
|
2074
|
-
display: flex;
|
|
2075
|
-
align-items: center;
|
|
2076
|
-
justify-content: center;
|
|
2077
|
-
width: fit-content;
|
|
2078
|
-
height: fit-content;
|
|
2079
|
-
padding: 8px;
|
|
2080
|
-
border-radius: 12px;
|
|
2081
|
-
background-color: ${({theme:e,$status:t})=>t===Kr.Unknown?rn(e,t,"800"):rn(e,t,"900")+Bs["015"]};
|
|
2082
|
-
`,Ff=({status:e,icon:t,title:r,description:o})=>{const n=Zt(),i=t??nn(e,n),a=[Xr.Default,Xr.Info,Kr.Disabled,Kr.Unknown].includes(e)?n.v2.colors.white[500]:n.v2.colors.black[500];return Jt(Pf,{$status:e,children:[Kt(Lf,{$status:e,children:Kt(i,{size:32,fill:a})}),Jt(Bn,{$gap:2,$justifyContent:"center",children:[Kt(Yn,{size:Jn.M,weight:500,color:a,nowrap:!0,children:r}),Kt(Yn,{size:Jn.XXS,weight:300,color:a,nowrap:!0,children:o})]})]})},zf=Yt.div`
|
|
2083
|
-
flex: 1;
|
|
2084
|
-
align-self: stretch;
|
|
2085
|
-
display: flex;
|
|
2086
|
-
flex-direction: column;
|
|
2087
|
-
gap: 12px;
|
|
2088
|
-
padding: 12px;
|
|
2089
|
-
border-radius: 12px;
|
|
2090
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
2091
|
-
`,Mf=["-","N/A"],Bf=({title:e,cells:t})=>{const r=Zt();return Jt(zf,{children:[Kt(Yn,{size:Jn.XXS,color:r.v2.colors.grey[150],children:e}),Kt(Mn,{$gap:32,children:t.map(t=>Jt(Bn,{$gap:2,children:[!t.isLoading||t.value&&!Mf.includes(t.value)?Kt(Yn,{size:t.label?Jn.M:Jn.L,children:t.value}):Kt(Hc,{scale:.9}),t.label&&Kt(Yn,{size:Jn.XXS,children:t.label})]},`${e}-${t.label}-${t.value}`))})]})},Uf=Yt(Mn)`
|
|
2092
|
-
width: calc(100% - 20px);
|
|
2093
|
-
padding: 10px;
|
|
2094
|
-
border-radius: 6px;
|
|
2095
|
-
background-color: ${({theme:e})=>e.v2.colors.grey[800]};
|
|
2096
|
-
display: flex;
|
|
2097
|
-
align-items: center;
|
|
2098
|
-
justify-content: space-between;
|
|
2099
|
-
gap: 12px;
|
|
2100
|
-
`,jf=Yt.div`
|
|
2101
|
-
position: relative;
|
|
2102
|
-
width: ${({$hideCopy:e})=>e?"100%":"calc(100% - 24px - 12px)"};
|
|
2103
|
-
display: flex;
|
|
2104
|
-
align-items: center;
|
|
2105
|
-
gap: 4px;
|
|
2106
|
-
`,Wf=Yt.pre`
|
|
2107
|
-
flex: 1;
|
|
2108
|
-
margin: 0;
|
|
2109
|
-
padding: 0;
|
|
2110
|
-
font-size: 14px;
|
|
2111
|
-
color: #5ffb98; // TODO: add to theme
|
|
2112
|
-
overflow-x: auto;
|
|
2113
|
-
`,Hf=Yt.span`
|
|
2114
|
-
flex-shrink: 0;
|
|
2115
|
-
font-size: 14px;
|
|
2116
|
-
color: #5ffb98; // TODO: add to theme
|
|
2117
|
-
`,Xf=({value:e,hideCopy:t=!1,onDone:r})=>{const{CopyButton:o}=dl({onDone:r}),n=Ft(null),[i,a]=Pt(!1);return Lt(()=>{const e=()=>{if(n.current){const{scrollWidth:e,clientWidth:t}=n.current;a(e>t)}};e();const t=new ResizeObserver(e);return n.current&&t.observe(n.current),()=>{t.disconnect()}},[e]),Jt(Uf,{children:[Jt(jf,{$hideCopy:t,children:[Kt(Wf,{ref:n,children:e}),i&&Kt(Hf,{children:"..."})]}),!t&&Kt(o,{value:e,size:sl.XS})]})};var Gf,Vf,Kf;!function(e){e.Default="default",e.SuccessError="successError"}(Gf||(Gf={})),function(e){e.S="small",e.L="large"}(Vf||(Vf={})),function(e){e.Left="left",e.Right="right"}(Kf||(Kf={}));const Jf=Yt.div`
|
|
2118
|
-
display: flex;
|
|
2119
|
-
align-items: center;
|
|
2120
|
-
gap: ${({$gap:e})=>e}px;
|
|
2121
|
-
`,qf=Yt.div`
|
|
2122
|
-
position: relative;
|
|
2123
|
-
display: flex;
|
|
2124
|
-
align-items: center;
|
|
2125
|
-
justify-content: space-between;
|
|
2126
|
-
|
|
2127
|
-
width: ${({$size:e})=>2*e+2}px;
|
|
2128
|
-
height: ${({$size:e})=>e}px;
|
|
2129
|
-
padding: ${4}px;
|
|
2130
|
-
border-radius: ${({$size:e})=>2*e}px;
|
|
2131
|
-
background-color: ${({$disabled:e,$onBgColor:t,$offBgColor:r,$variant:o,$value:n,theme:i})=>{if(e)return i.v2.colors.grey[800];if(t&&n)return t;if(r&&!n)return r;switch(o){case Gf.SuccessError:return n?i.v2.colors.green[500]:i.v2.colors.red[500];case Gf.Default:default:return n?i.v2.colors.purple[500]:i.v2.colors.grey[400]}}};
|
|
2132
|
-
|
|
2133
|
-
border: 1px solid ${({$disabled:e,theme:t})=>e?t.v2.colors.grey[600]:"transparent"};
|
|
2134
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
2135
|
-
`,Yf=Yt.div`
|
|
2136
|
-
position: absolute;
|
|
2137
|
-
top: 50%;
|
|
2138
|
-
left: ${({$value:e,$size:t})=>e?`calc(100% - ${t}px - 4px)`:"4px"};
|
|
2139
|
-
transform: translateY(-50%);
|
|
2140
|
-
width: ${({$size:e})=>e}px;
|
|
2141
|
-
height: ${({$size:e})=>e}px;
|
|
2142
|
-
border-radius: 100%;
|
|
2143
|
-
background-color: ${({$color:e})=>e};
|
|
2144
|
-
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)"};
|
|
2145
|
-
`,Qf=({variant:e=Gf.Default,size:t=Vf.L,name:r,label:o,labelAlign:n=Kf.Right,labelColor:i,tooltip:a,badge:s,value:l,onChange:c,disabled:d,withIcon:p,onIcon:u=st,offIcon:h=ct,onBgColor:m,offBgColor:g,errorMessage:f,warnMessage:x,helpMessage:y})=>{const b=Zt(),$=d?b.v2.colors.grey[400]:b.v2.colors.white[500],v=t===Vf.S?10:16,w=i||b.v2.colors.silver[200],S=t===Vf.S?Jn.XXXS:Jn.XS,k=t===Vf.S?8:12;return Jt(Bn,{$gap:4,children:[Jt(Mn,{$justifyContent:"space-between",children:[Jt(Jf,{"data-id":r||"toggle"+(o?`-${o}`:""),$gap:k,children:[o&&n===Kf.Left&&Kt(Yn,{color:w,size:S,nowrap:!0,children:o}),Jt(qf,{$onBgColor:m,$offBgColor:g,$variant:e,$size:v,$value:l,$disabled:d,onClick:e=>{e.stopPropagation(),d||c(!l)},children:[Kt(Yf,{$color:$,$size:v,$value:l,$disabled:d}),p&&Jt(qt,{children:[Kt(u,{size:v,fill:$}),Kt(h,{size:v,fill:$})]})]}),o&&n===Kf.Right&&Kt(Yn,{color:w,size:S,nowrap:!0,children:o})]}),Kt(xg,{tooltip:a,badge:s})]}),Kt(yg,{errorMessage:f,warnMessage:x,helpMessage:y})]})},Zf=Yt.div`
|
|
2146
|
-
display: flex;
|
|
2147
|
-
flex-direction: ${({$direction:e})=>e===_r.Horizontal?"row":"column"};
|
|
2148
|
-
gap: ${({$direction:e})=>e===_r.Horizontal?16:8}px;
|
|
2149
|
-
`,ex=({direction:e=_r.Vertical,title:t,size:r,disabled:o,options:n,values:i,setValues:a})=>{const s=r===Vf.S?Jn.XS:Jn.S;return Jt(Zf,{$direction:e,children:[t&&Kt(Yn,{size:s,children:t}),n.map(e=>Kt(Qf,{...e,labelAlign:Kf.Right,value:i[e.id],onChange:t=>{return r=e.id,o=t,void a(e=>{const t={...e};return r?t[r]=o:n.forEach(e=>t[e.id]=o),t});var r,o},disabled:o,size:r},`${t}-toggle-${e.id}`))]})},tx=Yt.div`
|
|
2150
|
-
display: flex;
|
|
2151
|
-
align-items: center;
|
|
2152
|
-
justify-content: space-between;
|
|
2153
|
-
width: 100%;
|
|
2154
|
-
overflow: hidden;
|
|
2155
|
-
`,rx=Yt.div`
|
|
2156
|
-
display: flex;
|
|
2157
|
-
align-items: center;
|
|
2158
|
-
gap: 16px;
|
|
2159
|
-
padding: 6px 0;
|
|
2160
|
-
min-width: 0;
|
|
2161
|
-
flex: 1;
|
|
2162
|
-
overflow: hidden;
|
|
2163
|
-
`,ox=Yt.div`
|
|
2164
|
-
display: flex;
|
|
2165
|
-
align-items: center;
|
|
2166
|
-
justify-content: center;
|
|
2167
|
-
flex: 0 0 36px;
|
|
2168
|
-
width: 36px;
|
|
2169
|
-
height: 36px;
|
|
2170
|
-
border-radius: 8px;
|
|
2171
|
-
background: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
2172
|
-
`,nx=Yt.div`
|
|
2173
|
-
display: flex;
|
|
2174
|
-
align-items: center;
|
|
2175
|
-
gap: 16px;
|
|
2176
|
-
flex-shrink: 0;
|
|
2177
|
-
`,ix=({icon:e,title:t,subTitle:r,toggleProps:o,actions:n,onClose:i,onCloseDisabled:a})=>Jt(tx,{children:[Jt(rx,{children:[e&&Kt(ox,{children:Kt(e,{size:24})}),(t||r)&&Jt(Bn,{$gap:6,children:[t&&Kt(Yn,{size:Jn.S,weight:500,children:t}),r&&Kt(Yn,{size:Jn.XXS,children:r})]})]}),Jt(nx,{children:[o&&Kt(Qf,{...o}),n?.length?Kt(cl,{icon:Dt,size:sl.M,onClick:()=>alert("todo")}):null,i&&Kt(cl,{icon:ct,size:sl.M,onClick:i,disabled:a})]})]}),ax=Yt.div`
|
|
2178
|
-
display: flex;
|
|
2179
|
-
align-items: center;
|
|
2180
|
-
gap: 10px;
|
|
2181
|
-
${({$fullWidth:e})=>e&&Qt`
|
|
2182
|
-
width: calc(100% - 16px);
|
|
2183
|
-
`}
|
|
2184
|
-
padding: 4px 12px 4px 4px;
|
|
2185
|
-
border-radius: 8px;
|
|
2186
|
-
background-color: ${({theme:e,$status:t})=>rn(e,t,[Xr.Info].includes(t)?"1000":"900")};
|
|
2187
|
-
`,sx=Yt.div`
|
|
2188
|
-
width: ${({$smallIcon:e})=>e?"24px":"32px"};
|
|
2189
|
-
height: ${({$smallIcon:e})=>e?"24px":"32px"};
|
|
2190
|
-
display: flex;
|
|
2191
|
-
align-items: center;
|
|
2192
|
-
justify-content: center;
|
|
2193
|
-
border-radius: 6px;
|
|
2194
|
-
background-color: ${({theme:e,$status:t})=>rn(e,t,[Xr.Info].includes(t)?"900":"800")};
|
|
2195
|
-
`,lx=Yt.div`
|
|
2196
|
-
margin-left: auto;
|
|
2197
|
-
margin-right: 8px;
|
|
2198
|
-
cursor: pointer;
|
|
2199
|
-
&:hover {
|
|
2200
|
-
transform: scale(1.2);
|
|
2201
|
-
}
|
|
2202
|
-
`,cx=({status:e,message:t,action:r,fullWidth:o,smallIcon:n})=>{const i=Zt(),a=nn(e,i),s=rn(i,e,e===Xr.Default?"300":e===Xr.Info?"400":"500");return Jt(ax,{$status:e,$fullWidth:o,children:[Kt("div",{children:Kt(sx,{$status:e,$smallIcon:n,children:Kt(a,{size:n?18:24})})}),Kt(Yn,{color:s,size:Jn.XXXS,weight:400,children:t}),r&&Kt(lx,{"data-id":r["data-id"],onClick:r.onClick,children:Kt(Yn,{color:s,size:Jn.XXS,weight:500,underline:!0,children:r.label})})]})},dx=Yt.div`
|
|
2203
|
-
display: flex;
|
|
2204
|
-
align-items: center;
|
|
2205
|
-
gap: 8px;
|
|
2206
|
-
padding: 4px 12px;
|
|
2207
|
-
`,px=Yt.div`
|
|
2208
|
-
flex: 1;
|
|
2209
|
-
`,ux=Yt.div`
|
|
2210
|
-
width: 150px;
|
|
2211
|
-
`,hx=({note:e,actions:t,children:r})=>r?Kt(dx,{children:r}):Jt(dx,{children:[e&&Kt(cx,{...e}),Kt(px,{}),t?.map((e,t)=>Kt(ux,{children:Kt(rf,{fullWidth:!0,...e})},e["data-id"]||`drawer-footer-button-${t}`))]}),mx=Yt.div`
|
|
2212
|
-
position: fixed;
|
|
2213
|
-
top: 0;
|
|
2214
|
-
bottom: 0;
|
|
2215
|
-
${({$position:e})=>e}: 0;
|
|
2216
|
-
z-index: 1000;
|
|
2217
|
-
|
|
2218
|
-
display: flex;
|
|
2219
|
-
flex-direction: column;
|
|
2220
|
-
gap: 12px;
|
|
2221
|
-
|
|
2222
|
-
width: calc(${({$width:e})=>e} - 32px);
|
|
2223
|
-
padding: 12px;
|
|
2224
|
-
border-radius: ${({$position:e})=>"left"===e?"0 20px 20px 0":"20px 0 0 20px"};
|
|
2225
|
-
background: ${({theme:e})=>e.v2.colors.black[500]};
|
|
2226
|
-
box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
|
|
2227
|
-
overflow: hidden;
|
|
2228
|
-
|
|
2229
|
-
${({$disableAnimation:e,$position:t})=>!e&&Qt`
|
|
2230
|
-
animation-name: ${js.in[t]};
|
|
2231
|
-
`}
|
|
2232
|
-
`,gx=Yt.div`
|
|
2233
|
-
display: flex;
|
|
2234
|
-
flex-direction: column;
|
|
2235
|
-
gap: 12px;
|
|
2236
|
-
|
|
2237
|
-
height: calc(100% - ${56}px);
|
|
2238
|
-
overflow-y: auto;
|
|
2239
|
-
`,fx=({isOpen:e,hideOverlay:t=!1,disableAnimation:r=!1,position:o="right",width:n="600px",header:i,footer:a,children:s})=>(ol(e),e?dr(Jt(qt,{children:[!t&&Kt(Wn,{onClick:i?.onCloseDisabled?void 0:i?.onClose}),Jt(mx,{$position:o,$width:n,$disableAnimation:r,children:[i&&Kt(ix,{...i}),Kt(gx,{children:s}),a&&Kt(hx,{...a})]})]}),document.body):null),xx=({options:e,values:t,setValues:r,withMultiSelect:o,withSearch:n,...i})=>{const a=_t(()=>t?.length?`Selected: ${e.filter(e=>t.includes(e.id)).map(e=>e.label).join(", ")||"none"}`:"",[e,t]);return Kt(yf,{withMultiSelect:o,withSearch:n,alignX:uf.Left,items:e,selectedIds:t,setSelectedIds:r,children:({ChevronIcon:e,handleClick:t})=>Kt(wg,{placeholder:"Select options...",...i,rightIcon:e,value:a,onChange:()=>{},onClick:t})})},yx=Yt.header`
|
|
2240
|
-
position: relative;
|
|
2241
|
-
width: calc(100% - 36px);
|
|
2242
|
-
padding: 12px 18px;
|
|
2243
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
2244
|
-
display: flex;
|
|
2245
|
-
align-items: center;
|
|
2246
|
-
justify-content: space-between;
|
|
2247
|
-
`,bx=Yt(Mn)`
|
|
2248
|
-
position: absolute;
|
|
2249
|
-
left: 50%;
|
|
2250
|
-
transform: translateX(-50%);
|
|
2251
|
-
gap: 16px;
|
|
2252
|
-
`,$x=({left:e=[],center:t=[],right:r=[]})=>Jt(yx,{children:[Kt(Mn,{$gap:16,children:e}),Kt(bx,{children:t}),Kt(Mn,{$gap:16,children:r})]}),vx=Yt.div`
|
|
2253
|
-
display: flex;
|
|
2254
|
-
align-items: center;
|
|
2255
|
-
gap: 2px;
|
|
2256
|
-
width: fit-content;
|
|
2257
|
-
padding: 4px;
|
|
2258
|
-
border-radius: 8px;
|
|
2259
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
2260
|
-
box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.25);
|
|
2261
|
-
|
|
2262
|
-
position: absolute;
|
|
2263
|
-
right: ${({$right:e,$left:t})=>e||(t?"unset":"12px")};
|
|
2264
|
-
left: ${({$left:e})=>e||"unset"};
|
|
2265
|
-
top: 50%;
|
|
2266
|
-
transform: translateY(-50%);
|
|
2267
|
-
`,wx=({isOpen:e,actions:t,positionRight:r,positionLeft:o})=>e?Kt(vx,{$right:r,$left:o,children:t.map(e=>{if(!e)return null;const{tooltip:t,...r}=e;return Kt(nc,{text:t||"",children:Kt(rf,{...r,variant:Zg.Secondary,size:ef.S})},r.id)})}):null,Sx=({values:e,setValues:t,name:r,label:o,tooltip:n,badge:i,required:a,errorMessage:s,warnMessage:l,helpMessage:c,placeholder:d,disabled:p})=>{const u=Zt(),h=e.length<=1,m=p,g=p||h&&m,f=e.length?e:[""];return Jt(Bn,{"data-id":r,$gap:6,children:[Kt(xg,{label:o,tooltip:n,required:a,badge:i}),Kt(Bn,{$gap:8,children:f.map((r,o)=>{const n=o===f.length-1;return Jt(Mn,{$gap:8,$alignItems:"center",children:[Kt(wg,{width:"100%",autoFocus:gn(r)&&!h&&n,value:r,onChange:r=>((r,o)=>{const n=[...e||[]];n[o]=r,t(n)})(r.target.value,o),disabled:p,placeholder:d,hasError:!!s}),n&&Kt(rf,{leftIcon:mt,variant:Zg.Secondary,size:ef.S,disabled:m,onClick:()=>(()=>{const r=[...e||[]];r.push(""),t(r)})()}),Kt(rf,{leftIcon:g?vt:()=>Kt(vt,{fill:u.v2.colors.red[500]}),variant:Zg.Secondary,size:ef.S,disabled:g,onClick:()=>(r=>{const o=[...e||[]].filter((e,t)=>t!==r);o.length||o.push(""),t(o)})(o)})]},`input-list-${o}`)})}),Kt(yg,{errorMessage:s,warnMessage:l,helpMessage:c})]})},kx=({col:e,colIdx:t,row:r,rowIdx:o,rowsLength:n,handleChange:i,errorMessage:a,disabled:s})=>{const{keyName:l,componentType:c,inputType:d,label:p,placeholder:u,options:h,renderCondition:m}=e,g=r[l];if(m&&!m(r))return null;switch(c){case Wr.Dropdown:case"multi-dropdown":{const e="multi-dropdown"===c,t=Array.isArray(g)?g:null!=g&&""!==g?[String(g)]:[],r=h?.filter(e=>t.includes(e.id)).map(e=>e.id)||[];return Kt(xx,{name:l,label:u?p:void 0,placeholder:u||p,options:h||[],withMultiSelect:e,withSearch:e,values:r,setValues:t=>i(l,e?t:t[0]??"",o),disabled:s,hasError:!!a},l)}default:const e=n>1&&0===o&&0===t&&gn(g);return Kt(wg,{name:l,label:u?p:void 0,placeholder:u||p,autoFocus:e,type:d,value:g,onChange:({target:{value:e}})=>i(l,e,o),disabled:s,hasError:!!a})}},Cx=Yt.table`
|
|
2268
|
-
width: 100%;
|
|
2269
|
-
border-collapse: separate;
|
|
2270
|
-
border-spacing: 0 8px;
|
|
2271
|
-
`,Ex=Yt.td`
|
|
2272
|
-
padding: 0 8px 0 0;
|
|
2273
|
-
`,Ax=Yt.td`
|
|
2274
|
-
width: 72px;
|
|
2275
|
-
padding-bottom: 2px;
|
|
2276
|
-
vertical-align: bottom;
|
|
2277
|
-
`,Tx=({columns:e,values:t,setValues:r,name:o,label:n,tooltip:i,badge:a,required:s,disabled:l,errorMessage:c,warnMessage:d,helpMessage:p,limitFieldsPerRow:u})=>{const h=Zt(),m=_t(()=>{const t={};return e.forEach(({keyName:e})=>t[e]=""),t},[e]),g=(e,o,n)=>{const i=t.length?$r(t):[$r(m)];i[n][e]=o,r(i)},f=_t(()=>{if(u){const t=[];for(let r=0;;r+=u){const o=e.slice(r,r+u);if(!o.length)break;t.push(o)}return t}return[e]},[u,e]),x=t.length?t:[m];return Jt(Bn,{"data-id":o,$gap:0,children:[Kt(xg,{label:n,tooltip:i,required:s,badge:a}),Kt(Cx,{children:Kt("tbody",{children:x.map((e,o)=>{const n=o===x.length-1;return Jt(Ot,{children:[u&&o>0?Kt("tr",{children:Kt(Ex,{colSpan:f.length})}):null,f.map((i,a)=>Jt("tr",{children:[i.map((t,r)=>t.renderCondition&&!t.renderCondition(e)?null:Kt(Ex,{children:Kt(kx,{col:t,colIdx:r,row:e,rowIdx:o,rowsLength:x.length,handleChange:g,disabled:l,errorMessage:c})},`input-table-row-${o}-col-${a}-${r}`)),0===a&&Kt(Ax,{children:Jt(Mn,{$gap:8,$justifyContent:"flex-end",children:[n&&Kt(rf,{leftIcon:mt,variant:Zg.Secondary,size:ef.S,disabled:l,onClick:()=>(()=>{const e=$r(t);e.push($r(m)),r(e)})()}),Kt(rf,{leftIcon:l?vt:()=>Kt(vt,{fill:h.v2.colors.red[500]}),variant:Zg.Secondary,size:ef.S,disabled:l,onClick:()=>(e=>{const o=t.filter((t,r)=>r!==e);o.length||o.push($r(m)),r(o)})(o)})]})})]},`input-table-matrix-${o}-${a}`))]},`input-table-row-${o}`)})})}),Kt(yg,{errorMessage:c,warnMessage:d,helpMessage:p})]})},Dx=Yt.div`
|
|
2278
|
-
display: flex;
|
|
2279
|
-
align-items: center;
|
|
2280
|
-
justify-content: space-between;
|
|
2281
|
-
gap: 32px;
|
|
2282
|
-
|
|
2283
|
-
padding: 18px 16px;
|
|
2284
|
-
border-radius: 18px;
|
|
2285
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]+Bs["095"]};
|
|
2286
|
-
box-shadow: 0 4px 16.7px 0 rgba(0, 0, 0, 0.83);
|
|
2287
|
-
|
|
2288
|
-
position: fixed;
|
|
2289
|
-
bottom: 0;
|
|
2290
|
-
left: 50%;
|
|
2291
|
-
z-index: 1;
|
|
2292
|
-
animation-name: ${js.in.center};
|
|
2293
|
-
`,Nx=({isOpen:e,onClose:t,richTitle:r,actions:o})=>e?Jt(Dx,{children:[Kt(If,{...r}),Kt(Df,{onAnyClick:t,actions:o})]}):null,Ix=Yt.div`
|
|
2294
|
-
position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
|
|
2295
|
-
top: 50%;
|
|
2296
|
-
left: 50%;
|
|
2297
|
-
transform: translate(-50%, -50%);
|
|
2298
|
-
z-index: 1000;
|
|
2299
|
-
width: fit-content;
|
|
2300
|
-
border-radius: 20px;
|
|
2301
|
-
background: ${({theme:e})=>e.v2.colors.black[500]};
|
|
2302
|
-
box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
|
|
2303
|
-
overflow: hidden;
|
|
2304
|
-
|
|
2305
|
-
animation-name: ${js.in.center};
|
|
2306
|
-
`,Rx=Yt.div`
|
|
2307
|
-
position: relative;
|
|
2308
|
-
`,Ox=Yt.div`
|
|
2309
|
-
position: absolute;
|
|
2310
|
-
top: 16px;
|
|
2311
|
-
left: 16px;
|
|
2312
|
-
`,_x=({isOpen:e,hideOverlay:t=!1,relativeToParent:r=!1,onBack:o,onClose:n,children:i})=>{if(ol(e),!e)return null;const a=Jt(qt,{children:[!t&&Kt(Wn,{$relativeToParent:r,onClick:n}),Kt(Ix,{$relativeToParent:r,children:Jt(Rx,{children:[o&&Kt(Ox,{children:Kt(cl,{icon:e=>Kt(Tt,{rotate:-90,...e}),size:sl.L,onClick:o})}),i]})})]});return r?a:dr(a,document.body)},Px=Yt.div`
|
|
2313
|
-
position: relative;
|
|
2314
|
-
width: ${64}px;
|
|
2315
|
-
height: ${({$height:e})=>e};
|
|
2316
|
-
flex-shrink: 0;
|
|
2317
|
-
`,Lx=Yt.aside`
|
|
2318
|
-
position: absolute;
|
|
2319
|
-
top: 0;
|
|
2320
|
-
left: 0;
|
|
2321
|
-
bottom: 0;
|
|
2322
|
-
display: flex;
|
|
2323
|
-
flex-direction: column;
|
|
2324
|
-
gap: 8px;
|
|
2325
|
-
width: ${({$expanded:e})=>e?"220px":"64px"};
|
|
2326
|
-
padding: 16px ${12}px;
|
|
2327
|
-
box-sizing: border-box;
|
|
2328
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
2329
|
-
overflow-x: hidden;
|
|
2330
|
-
overflow-y: auto;
|
|
2331
|
-
z-index: 10;
|
|
2332
|
-
transition:
|
|
2333
|
-
width 200ms ease,
|
|
2334
|
-
padding 200ms ease;
|
|
2335
|
-
`,Fx=Yt.button`
|
|
2336
|
-
display: flex;
|
|
2337
|
-
align-items: center;
|
|
2338
|
-
width: 100%;
|
|
2339
|
-
min-width: 0;
|
|
2340
|
-
height: ${40}px;
|
|
2341
|
-
padding: 0;
|
|
2342
|
-
margin: 0;
|
|
2343
|
-
border: none;
|
|
2344
|
-
border-radius: 6px;
|
|
2345
|
-
box-sizing: border-box;
|
|
2346
|
-
cursor: pointer;
|
|
2347
|
-
font: inherit;
|
|
2348
|
-
background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[500]:"transparent"};
|
|
2349
|
-
&:hover {
|
|
2350
|
-
background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[600]:e.v2.colors.silver[800]};
|
|
2351
|
-
}
|
|
2352
|
-
&:active {
|
|
2353
|
-
background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[700]:e.v2.colors.silver[900]};
|
|
2354
|
-
}
|
|
2355
|
-
`,zx=Yt.div`
|
|
2356
|
-
width: ${40}px;
|
|
2357
|
-
height: ${40}px;
|
|
2358
|
-
display: flex;
|
|
2359
|
-
align-items: center;
|
|
2360
|
-
justify-content: center;
|
|
2361
|
-
flex-shrink: 0;
|
|
2362
|
-
`,Mx=Yt.div`
|
|
2363
|
-
flex: 1 1 0;
|
|
2364
|
-
min-width: 0;
|
|
2365
|
-
overflow: hidden;
|
|
2366
|
-
padding-right: 12px;
|
|
2367
|
-
pointer-events: none;
|
|
2368
|
-
`,Bx=({height:e,icons:t})=>{const r=Zt(),[o,n]=Pt(!1);return Kt(Px,{$height:e,children:Kt(Lx,{$expanded:o,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:t.map(({id:e,label:t,selected:n,icon:i,onClick:a})=>Jt(Fx,{$selected:n,onClick:a,"aria-label":t,title:o?void 0:t,children:[Kt(zx,{children:Kt(i,{size:24,fill:r.v2.colors.white[500]})}),o&&Kt(Mx,{children:Kt(Yn,{size:Jn.S,weight:500,color:r.v2.colors.white[500],nowrap:!0,children:t})})]},e))})})};var Ux;!function(e){e.S="small",e.L="large"}(Ux||(Ux={}));const jx=Yt.div`
|
|
2369
|
-
width: fit-content;
|
|
2370
|
-
display: flex;
|
|
2371
|
-
align-items: center;
|
|
2372
|
-
gap: 8px;
|
|
2373
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
2374
|
-
`,Wx=Yt.div`
|
|
2375
|
-
width: ${({$size:e})=>e===Ux.S?"16px":"20px"};
|
|
2376
|
-
height: ${({$size:e})=>e===Ux.S?"16px":"20px"};
|
|
2377
|
-
display: flex;
|
|
2378
|
-
align-items: center;
|
|
2379
|
-
justify-content: center;
|
|
2380
|
-
border-radius: 100%;
|
|
2381
|
-
border: 1px solid ${({$borderColor:e})=>e};
|
|
2382
|
-
background-color: ${({$backgroundColor:e})=>e};
|
|
2383
|
-
`,Hx=({"data-id":e,label:t,value:r,onChange:o,disabled:n,size:i=Ux.L})=>{const a=Zt(),[s,l]=Pt(!1),c=r,d=i===Ux.S?6:8,p=n?a.v2.colors.grey[400]:a.v2.colors.white[500],u=c?"transparent":n?a.v2.colors.grey[700]:s?a.v2.colors.silver[400]:a.v2.colors.silver[600],h=n?a.v2.colors.grey[600]:c?a.v2.colors.purple[500]:a.v2.colors.silver[900];return Jt(jx,{"data-id":e??"radio"+(t?`-${t}`:""),onClick:e=>{e.stopPropagation(),n||o(!r)},$disabled:n,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[Kt(Wx,{$size:i,$borderColor:u,$backgroundColor:h,children:r?Kt(Nt,{size:d,fill:p}):null}),t&&Kt(Yn,{size:i===Ux.S?Jn.XXS:Jn.XS,children:t})]})},Xx=Yt.div`
|
|
2384
|
-
display: flex;
|
|
2385
|
-
flex-direction: ${({$flexDirection:e})=>e};
|
|
2386
|
-
gap: ${({$gap:e})=>e}px;
|
|
2387
|
-
`,Gx=({label:e,direction:t,disabled:r,size:o,options:n,values:i,setValues:a})=>Jt(Xx,{$flexDirection:t===_r.Horizontal?"row":"column",$gap:t===_r.Horizontal?16:8,children:[e&&Kt(Yn,{children:e}),n.map(t=>Kt(Hx,{...t,value:i[t.id],onChange:e=>{return r=t.id,o=e,void a(e=>{const t={...e};return Object.keys(t).forEach(e=>t[e]=!1),t[r]=o,t});var r,o},disabled:r,size:o},`${e}-radio-${t.id}`))]}),Vx=({currentStep:e,data:t,gap:r=12})=>Kt(Bn,{$gap:r,children:t.map(t=>{const r=t.step<e,o=t.step===e;return Jt(Mn,{$gap:8,children:[r||t.forceDoneBadge?Kt(mg,{status:Xr.Success,label:"",leftIcon:st}):Kt(mg,{status:Xr.Default,label:t.step.toString()}),Kt(Yn,{size:o?Jn.M:Jn.XS,weight:o?500:400,opacity:o?1:.7,children:t.label})]},`stepper-item-${t.step}`)})});var Kx;!function(e){e.Data="data",e.Pretty="pretty"}(Kx||(Kx={}));const Jx=Yt.div`
|
|
2388
|
-
height: ${({$maxHeight:e})=>e};
|
|
2389
|
-
width: 100%;
|
|
2390
|
-
display: flex;
|
|
2391
|
-
flex-direction: column;
|
|
2392
|
-
overflow: hidden;
|
|
2393
|
-
`,qx=Yt.div`
|
|
2394
|
-
width: 100%;
|
|
2395
|
-
flex: 1;
|
|
2396
|
-
display: flex;
|
|
2397
|
-
flex-direction: column;
|
|
2398
|
-
`,Yx=Yt.div`
|
|
2399
|
-
flex-shrink: 0;
|
|
2400
|
-
position: relative;
|
|
2401
|
-
z-index: 2;
|
|
2402
|
-
`,Qx=Yt.div`
|
|
2403
|
-
position: relative;
|
|
2404
|
-
display: flex;
|
|
2405
|
-
width: 100%;
|
|
2406
|
-
`,Zx=Yt.div`
|
|
2407
|
-
position: relative;
|
|
2408
|
-
min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
|
|
2409
|
-
flex: ${({$flex:e})=>e??1};
|
|
2410
|
-
padding: 18px 24px;
|
|
2411
|
-
border: none;
|
|
2412
|
-
border-radius: ${({$isFirst:e,$isLast:t})=>e?"4px 0 0 0":t?"0 4px 0 0":"0"};
|
|
2413
|
-
box-sizing: border-box;
|
|
2414
|
-
|
|
2415
|
-
${({$variant:e,$backgroundColor:t})=>{if(t)return Qt`
|
|
2416
|
-
background-color: ${t};
|
|
2417
|
-
`;switch(e){case Kx.Data:return Qt`
|
|
2418
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
2419
|
-
`;case Kx.Pretty:return Qt`
|
|
2420
|
-
background-color: transparent;
|
|
2421
|
-
`;default:return""}}}
|
|
2422
|
-
`,ey=Yt.div`
|
|
2423
|
-
position: absolute;
|
|
2424
|
-
top: 50%;
|
|
2425
|
-
right: 0;
|
|
2426
|
-
transform: translateY(-50%);
|
|
2427
|
-
width: 1px;
|
|
2428
|
-
height: 18px;
|
|
2429
|
-
background: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
2430
|
-
`,ty=Yt.div`
|
|
2431
|
-
min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
|
|
2432
|
-
flex: ${({$flex:e})=>e??1};
|
|
2433
|
-
overflow: hidden;
|
|
2434
|
-
display: flex;
|
|
2435
|
-
align-items: center;
|
|
2436
|
-
|
|
2437
|
-
padding: 18px 24px;
|
|
2438
|
-
cursor: ${({$withClick:e})=>e?"pointer":"default"};
|
|
2439
|
-
box-sizing: border-box;
|
|
2440
|
-
|
|
2441
|
-
${({$variant:e,$selected:t,$hovered:r,$isLastRow:o,$isFirstCell:n,$isLastCell:i})=>{switch(e){case Kx.Data:return Qt`
|
|
2442
|
-
border-bottom: ${({theme:e})=>o?"none":`1px solid ${e.v2.colors.silver[500]}`};
|
|
2443
|
-
border-radius: ${o?n?"0 0 0 4px":i?"0 0 4px 0":"0":"0"};
|
|
2444
|
-
background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:r?e.v2.colors.silver[700]:e.v2.colors.silver[800]};
|
|
2445
|
-
`;case Kx.Pretty:return Qt`
|
|
2446
|
-
border: none;
|
|
2447
|
-
border-radius: ${n?"12px 0 0 12px":i?"0 12px 12px 0":"0"};
|
|
2448
|
-
background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:r?e.v2.colors.silver[700]:e.v2.colors.silver[900]};
|
|
2449
|
-
`;default:return""}}}
|
|
2450
|
-
`,ry=Yt.div`
|
|
2451
|
-
width: 100%;
|
|
2452
|
-
display: flex;
|
|
2453
|
-
align-items: center;
|
|
2454
|
-
justify-content: ${({$textAlign:e})=>"right"===e?"flex-end":"left"===e?"flex-start":"center"===e?"center":"unset"};
|
|
2455
|
-
gap: 4px;
|
|
2456
|
-
text-align: ${({$textAlign:e})=>e||"left"};
|
|
2457
|
-
`,oy=({variant:e,columns:t,rows:r,getRowActions:o,rowActionsPushRightPosition:n,rowActionsPushLeftPosition:i,withCheckboxes:a})=>{const[s,l]=Pt(null),c=_t(()=>r.map((c,d)=>{const{cells:p,onClick:u,isSelected:h=!1,onSelect:m,onDeselect:g,hideCheckbox:f}=c,x=s===d,y=o(c),b=(e,t)=>({$isLastRow:d===r.length-1,$isFirstCell:e,$isLastCell:t,$selected:h,$withClick:!!u,onClick:()=>u?.(),$hovered:!!u&&x,onMouseEnter:()=>l(d),onMouseLeave:()=>l(null)});return Jt(Qx,{children:[a&&Kt(ty,{$variant:e,style:{flex:"0 0 68px"},...b(!0,!1),children:!f&&Kt(cf,{value:h,onChange:()=>h?g?.():m?.()})},"checkbox-column"),t.map(({key:r,withTooltip:o,textAlign:s,flex:l,minWidth:c},u)=>{const h=p.find(e=>e.key===r),m=0===u&&!a,g=u===t.length-1,f=y.length&&(n&&g||i&&m||!n&&!i&&g),$=Kt(Mn,{$width:"100%",$justifyContent:"right"===s?"flex-end":"center"===s?"center":"flex-start",children:h?.component?Kt(h.component,{}):Kt(Yn,{size:Jn.XS,children:h?.rawValue||"-"})});return Jt(ty,{$variant:e,$flex:l,$minWidth:c,...b(m,g),children:[o?Kt(nc,{text:h?.rawValue?.toString()||"",ellipsis:!0,children:$}):$,f?Kt(wx,{isOpen:x,actions:y,positionRight:n,positionLeft:i}):null]},`row-${d}-cell-${u}`)})]},`row-${d}`)}),[r,s,o,n,i,a,t]);return Kt(Em,{gap:e===Kx.Pretty?8:0,elements:c})},ny=({columnKey:e,sortDirection:t,sortByKey:r,onSort:o})=>{const n=Zt(),i=r===e?n.v2.colors.white[500]:n.v2.colors.grey[400],a=t===Pr.Ascending?0:180;return Kt(cl,{icon:e=>Kt(Tt,{fill:i,rotate:a,...e}),onClick:()=>o(e)})},iy=({columnKey:e,filters:t,onFilter:r,rowsUnfiltered:o,filterOverride:n})=>{const i=Zt(),a=t[e]?.length?i.v2.colors.white[500]:i.v2.colors.grey[400],s=_t(()=>{if(n)return n.options.map(({id:e,label:t})=>({id:e,label:t,withCheckbox:!0}));return Array.from(new Set(o.map(t=>t.cells.find(t=>t.key===e)?.rawValue?.toString()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t)).map(e=>({id:e,label:e,withCheckbox:!0}))},[o,e,n]);return Kt(yf,{items:s,withMultiSelect:!0,selectedIds:t[e]?.map(e=>e.toString())??[],setSelectedIds:t=>r(e,t),defaultOpen:!1,iconButtonProps:{icon:e=>Kt(It,{fill:a,...e})}})},ay=({variant:e,backgroundColor:t,columns:r,rowsUnfiltered:o,sortDirection:n,sortByKey:i,onSort:a,filters:s,onFilter:l,withCheckboxes:c,partiallySelected:d,allSelected:p,onSelectAll:u})=>Jt(Qx,{children:[c&&Kt(Zx,{$variant:e,$backgroundColor:t,$isFirst:!0,$isLast:!1,style:{flex:"0 0 68px"},children:Kt(cf,{partiallyChecked:d&&!p,value:p||!1,onChange:u})},"checkbox-column"),r.map(({key:d,label:p,withTooltip:u,tooltip:h,noSort:m,noFilter:g,filterOverride:f,flex:x,minWidth:y,textAlign:b},$)=>{const v=0===$&&!c,w=$===r.length-1,S=Kt(Yn,{size:Jn.XS,align:b,children:p});return Jt(Zx,{$variant:e,$backgroundColor:t,$flex:x,$minWidth:y,$isFirst:v,$isLast:w,children:[Jt(ry,{$textAlign:b,children:[h||u?Kt(nc,{text:h||p,children:S}):S,!m&&Kt(ny,{columnKey:d,sortDirection:n,sortByKey:i,onSort:a}),!g&&Kt(iy,{columnKey:d,filters:s,onFilter:l,rowsUnfiltered:o,filterOverride:f})]}),!w&&e===Kx.Data&&Kt(ey,{})]},`column-${d}`)})]}),sy=({variant:e,maxHeight:t="256px",headerBackgroundColor:r,hideHeader:o=!1,isLoading:n,noDataProps:i,columns:a,rows:s,getRowActions:l,rowActionsPushRightPosition:c,rowActionsPushLeftPosition:d,withCheckboxes:p})=>{const[u,h]=Pt(Pr.Ascending),[m,g]=Pt(""),[f,x]=Pt({}),y=zt(e=>{g(e),h(e=>e===Pr.Ascending?Pr.Descending:Pr.Ascending)},[]),b=zt((e,t)=>{x(r=>({...r,[e]:t}))},[]),$=_t(()=>{const e=(e,t)=>{const r=e.cells.find(e=>e.key===t);return r&&(r.rawValue?.toString()||r.component?.({})?.props?.children?.toString())||""};return(m?[...s].sort((t,r)=>{const o=e(t,m),n=e(r,m);return(u===Pr.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)))(o,n)}):s).filter(t=>{for(const[r,o]of Object.entries(f)){if(!o.length)continue;const n=a.find(e=>e.key===r)?.filterOverride;if(n){if(!n.filterRow(t,o))return!1}else if(!o.includes(e(t,r)))return!1}return!0})},[s,m,u,f,a]),{partiallySelected:v,allSelected:w}=_t(()=>{const e=$.filter(e=>!e.hideCheckbox);return{partiallySelected:e.length>0&&e.some(e=>e.isSelected),allSelected:e.length>0&&e.every(e=>e.isSelected)}},[$]);return Kt(Jx,{$maxHeight:t,children:Jt(qx,{$variant:e,children:[!o&&Kt(Yx,{children:Kt(ay,{variant:e,backgroundColor:r,columns:a,rowsUnfiltered:s,sortDirection:u,sortByKey:m,onSort:y,filters:f,onFilter:b,withCheckboxes:p,partiallySelected:v,allSelected:w,onSelectAll:e=>{e?$.forEach(e=>!e.hideCheckbox&&e.onSelect?.()):$.forEach(e=>!e.hideCheckbox&&e.onDeselect?.())}})}),$.length?Kt(oy,{variant:e,columns:a,rows:$,getRowActions:l||(()=>[]),rowActionsPushRightPosition:c,rowActionsPushLeftPosition:d,withCheckboxes:p}):Kt(Un,{style:{height:t},children:n?Kt(Qg,{withSpinner:!0}):Kt(nf,{...i})})]})})},ly=Yt.div`
|
|
2458
|
-
display: flex;
|
|
2459
|
-
align-items: center;
|
|
2460
|
-
justify-content: center;
|
|
2461
|
-
gap: 8px;
|
|
2462
|
-
width: fit-content;
|
|
2463
|
-
padding: 8px;
|
|
2464
|
-
border-radius: 4px;
|
|
2465
|
-
${({$disabled:e,$withClick:t})=>e?Qt`
|
|
2466
|
-
cursor: not-allowed;
|
|
2467
|
-
background-color: ${({theme:e})=>e.v2.colors.grey[800]};
|
|
2468
|
-
`:t?Qt`
|
|
2469
|
-
cursor: pointer;
|
|
2470
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[300]};
|
|
2471
|
-
&:hover {
|
|
2472
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[400]};
|
|
2473
|
-
}
|
|
2474
|
-
&:active {
|
|
2475
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
2476
|
-
}
|
|
2477
|
-
`:Qt`
|
|
2478
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[300]};
|
|
2479
|
-
`}
|
|
2480
|
-
`,cy=({label:e,leftIcon:t,rightIcon:r,onClick:o,disabled:n})=>{const i=Zt(),a=n?i.v2.colors.grey[400]:i.v2.colors.white[500];return Jt(ly,{$disabled:n,$withClick:!!o,onClick:()=>!n&&o?.(),children:[t&&Kt(t,{fill:a,size:16}),Kt(Yn,{color:a,size:Jn.XS,nowrap:!0,children:e}),r&&Kt(r,{fill:a,size:16})]})},dy=Yt.div`
|
|
2481
|
-
padding: 6px 12px;
|
|
2482
|
-
|
|
2483
|
-
display: flex;
|
|
2484
|
-
align-self: stretch;
|
|
2485
|
-
align-items: flex-start;
|
|
2486
|
-
gap: 8px;
|
|
2487
|
-
border-radius: 6px;
|
|
2488
|
-
|
|
2489
|
-
border: 1px solid ${({theme:e,$disabled:t,$error:r})=>t?e.v2.colors.grey[600]:r?e.v2.colors.red[500]:e.v2.colors.silver[500]};
|
|
2490
|
-
background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
|
|
2491
|
-
${({$disabled:e,$error:t})=>!e&&!t&&Qt`
|
|
2492
|
-
&:hover,
|
|
2493
|
-
&:active,
|
|
2494
|
-
&:focus-within {
|
|
2495
|
-
border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
|
|
2496
|
-
}
|
|
2497
|
-
`}
|
|
2498
|
-
`,py=Yt.textarea`
|
|
2499
|
-
max-width: ${({$maxWidth:e})=>e||"unset"};
|
|
2500
|
-
min-height: ${({$minHeight:e})=>e||"50px"};
|
|
2501
|
-
flex: 1;
|
|
2502
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
2503
|
-
font-size: 14px;
|
|
2504
|
-
font-weight: 400;
|
|
2505
|
-
resize: none;
|
|
2506
|
-
|
|
2507
|
-
background: transparent;
|
|
2508
|
-
border: none;
|
|
2509
|
-
outline: none;
|
|
2510
|
-
cursor: text;
|
|
2511
|
-
color: ${({theme:e})=>e.v2.colors.white[500]};
|
|
2512
|
-
&::placeholder {
|
|
2513
|
-
color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
2514
|
-
}
|
|
2515
|
-
|
|
2516
|
-
&:disabled {
|
|
2517
|
-
cursor: not-allowed;
|
|
2518
|
-
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
2519
|
-
&::placeholder {
|
|
2520
|
-
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
2521
|
-
}
|
|
2522
|
-
}
|
|
2523
|
-
`,uy=({label:e,required:t,tooltip:r,badge:o,errorMessage:n,warnMessage:i,helpMessage:a,name:s,value:l,onChange:c,disabled:d,maxWidth:p,minHeight:u,...h})=>{const m=Ft(null),g=()=>{m.current&&(m.current.style.height="auto",m.current.style.height=`${m.current.scrollHeight}px`)};return Jt(Bn,{$gap:6,children:[Kt(xg,{label:e,tooltip:r,required:t,badge:o}),Kt(dy,{$disabled:d,$error:!!n,children:Kt(py,{ref:m,"data-id":s,name:s,value:l,onChange:e=>{e.stopPropagation(),g(),c?.(e)},onKeyDown:e=>{e.stopPropagation()},onFocus:g,onBlur:g,disabled:d,$maxWidth:p,$minHeight:u,...h})}),Kt(yg,{errorMessage:n,warnMessage:i,helpMessage:a})]})},hy=[{id:"ms",label:"milliseconds"},{id:"s",label:"seconds"},{id:"m",label:"minutes"},{id:"h",label:"hours"}],my=Yt.div`
|
|
2524
|
-
flex: 1;
|
|
2525
|
-
min-width: 0;
|
|
2526
|
-
`,gy=Yt.div`
|
|
2527
|
-
flex: 0 0 auto;
|
|
2528
|
-
min-width: 140px;
|
|
2529
|
-
`,fy=({name:e,label:t,tooltip:r,badge:o,placeholder:n,required:i,disabled:a,value:s,setValue:l,units:c=hy,defaultUnit:d,errorMessage:p,warnMessage:u,helpMessage:h,hasError:m,width:g})=>{const f=_t(()=>d&&c.some(e=>e.id===d)?d:c[0]?.id||"s",[d,c]),{num:x,unit:y}=_t(()=>((e,t,r)=>{if(null==e||""===e)return{num:"",unit:r};const o=[...t.map(e=>e.id)].sort((e,t)=>t.length-e.length),n=new RegExp(`^\\s*(\\d+)\\s*(${o.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:r}:{num:"",unit:r}})(s,c,f),[s,c,f]),b=(e,t)=>{l(""!==e?`${e}${t}`:"")};return Jt(Bn,{$width:g,$gap:6,children:[Kt(xg,{label:t,tooltip:r,required:i,badge:o}),Jt(Mn,{$gap:8,$alignItems:"center",children:[Kt(my,{children:Kt(wg,{name:e,placeholder:n,disabled:a,hasError:m||!!p,inputMode:"numeric",value:x,onChange:e=>b(An(e.target.value),y)})}),Kt(gy,{children:Kt(xx,{name:`${e}-unit`,disabled:a,hasError:m||!!p,withSearch:!1,options:c,values:[y],setValues:e=>b(x,e[0]||y)})})]}),Kt(yg,{errorMessage:p,warnMessage:u,helpMessage:h})]})},xy=Yt.div`
|
|
2530
|
-
width: 530px;
|
|
2531
|
-
`,yy=Yt.div`
|
|
2532
|
-
display: flex;
|
|
2533
|
-
flex-direction: column;
|
|
2534
|
-
align-items: center;
|
|
2535
|
-
gap: 16px;
|
|
2536
|
-
padding: 24px;
|
|
2537
|
-
`,by=Yt.div`
|
|
2538
|
-
display: flex;
|
|
2539
|
-
justify-content: center;
|
|
2540
|
-
gap: 16px;
|
|
2541
|
-
padding: 16px 24px;
|
|
2542
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
2543
|
-
`,$y=({visual:e,title:t,description:r,isOpen:o,onClose:n,onDeny:i,denyLabel:a="Deny",onApprove:s,approveLabel:l="Approve",...c})=>{const d=Zt();return Kt(_x,{isOpen:o,onClose:n,...c,children:Jt(xy,{children:[Jt(yy,{children:[e&&Kt(e,{}),Kt(Yn,{size:Jn.M,weight:500,color:d.v2.colors.white[500],children:t}),Kt(Bn,{$alignItems:"center",$gap:4,children:r.split("\n").map(e=>Kt(Yn,{size:Jn.XS,weight:400,color:d.v2.colors.silver[200],children:e},e))})]}),(i||s)&&Jt(by,{children:[Kt(rf,{variant:Zg.Secondary,label:a,onClick:()=>{i?.(),n()}}),s&&Kt(rf,{variant:Zg.Primary,label:l,onClick:()=>{s(),n()}})]})]})})};export{oo as $,Tf as A,ef as B,zc as C,Gl as D,bs as E,Bn as F,Ci as G,En as H,wg as I,ho as J,Dr as K,Cn as L,un as M,nf as N,Co as O,cx as P,Xr as Q,Nn as R,_f as S,Yn as T,no as U,nc as V,io as W,so as X,fo as Y,go as Z,ao as _,Zg as a,Gf as a$,mg as a0,us as a1,Lo as a2,El as a3,So as a4,wo as a5,Al as a6,Nl as a7,Dl as a8,Lr as a9,Vf as aA,Kn as aB,Tl as aC,Ds as aD,Es as aE,Ti as aF,_i as aG,Ni as aH,Oi as aI,nu as aJ,ss as aK,cs as aL,la as aM,Ri as aN,ls as aO,os as aP,rs as aQ,as as aR,is as aS,es as aT,Za as aU,Di as aV,fx as aW,Wa as aX,zn as aY,Fi as aZ,zi as a_,Ur as aa,iu as ab,Kp as ac,Ja as ad,sa as ae,va as af,ga as ag,qa as ah,Gi as ai,$a as aj,ma as ak,Ka as al,Ki as am,wi as an,Si as ao,Eo as ap,cl as aq,sl as ar,Qg as as,Ei as at,Bo as au,xx as av,Sg as aw,vs as ax,Ai as ay,Kr as az,Un as b,lm as b$,fl as b0,Pl as b1,xn as b2,yf as b3,hf as b4,uf as b5,Af as b6,Cl as b7,Ao as b8,Ln as b9,ip as bA,np as bB,Pp as bC,Rp as bD,Sp as bE,Bp as bF,Ya as bG,ja as bH,Ba as bI,Ua as bJ,Ma as bK,za as bL,$p as bM,kg as bN,vp as bO,wp as bP,$y as bQ,Va as bR,Ga as bS,Xa as bT,Ha as bU,yl as bV,eh as bW,uu as bX,Tc as bY,ii as bZ,bu as b_,sy as ba,Kx as bb,Nx as bc,Vx as bd,on as be,Hc as bf,Xf as bg,Gs as bh,If as bi,Df as bj,Ff as bk,Bf as bl,lo as bm,Fn as bn,yp as bo,Ji as bp,Ra as bq,bp as br,Up as bs,Wp as bt,Hp as bu,Gp as bv,Vp as bw,_p as bx,Ip as by,ap as bz,Mn as c,bo as c$,cg as c0,gm as c1,nm as c2,sc as c3,nd as c4,Lm as c5,Rm as c6,$h as c7,vm as c8,ag as c9,hd as cA,Xo as cB,yd as cC,Xn as cD,Gn as cE,qh as cF,Uo as cG,Vn as cH,Zu as cI,Od as cJ,ug as cK,Js as cL,On as cM,Zs as cN,Ns as cO,kd as cP,ro as cQ,Ho as cR,Wo as cS,Em as cT,No as cU,Vo as cV,Mo as cW,Xm as cX,al as cY,To as cZ,Cr as c_,ri as ca,$s as cb,Uh as cc,yh as cd,Cc as ce,rl as cf,jo as cg,ki as ch,Zc as ci,uh as cj,Oo as ck,Br as cl,ks as cm,Pn as cn,Hl as co,Hn as cp,fc as cq,bi as cr,km as cs,_o as ct,od as cu,Vr as cv,Sn as cw,nn as cx,Ss as cy,Sr as cz,cf as d,fy as d$,kr as d0,nl as d1,bl as d2,Yl as d3,jn as d4,Mm as d5,xl as d6,wn as d7,ku as d8,ps as d9,vi as dA,Gd as dB,sd as dC,Zh as dD,Mr as dE,Rg as dF,an as dG,mn as dH,ad as dI,Nd as dJ,Rd as dK,wx as dL,yn as dM,Tn as dN,wl as dO,eo as dP,Bu as dQ,Fo as dR,_l as dS,fd as dT,Po as dU,Lu as dV,xs as dW,Io as dX,Ic as dY,en as dZ,dd as d_,ko as da,$l as db,pl as dc,Os as dd,vo as de,Gc as df,ld as dg,jr as dh,kn as di,hl as dj,hn as dk,fr as dl,xo as dm,Zm as dn,ih as dp,qo as dq,rg as dr,Cs as ds,gl as dt,kc as du,js as dv,pn as dw,il as dx,qr as dy,dn as dz,Jn as e,Gr as e$,ha as e0,Xi as e1,ua as e2,Hi as e3,ba as e4,ya as e5,na as e6,pa as e7,xa as e8,Ea as e9,Sa as eA,Aa as eB,ds as eC,up as eD,Ii as eE,Dp as eF,op as eG,Tp as eH,rp as eI,Ap as eJ,tp as eK,ca as eL,ia as eM,da as eN,Ta as eO,fa as eP,Da as eQ,bf as eR,Ca as eS,af as eT,Wg as eU,Er as eV,Qr as eW,Rr as eX,Zr as eY,Yr as eZ,zr as e_,aa as ea,Hx as eb,ka as ec,ta as ed,Bi as ee,ra as ef,ea as eg,Ui as eh,oa as ei,_a as ej,Zi as ek,Ia as el,Pa as em,Oa as en,La as eo,Fa as ep,ji as eq,Wi as er,Vi as es,qi as et,Qi as eu,Yi as ev,Pi as ew,Li as ex,Mi as ey,wa as ez,Tr as f,ti as f$,Or as f0,_r as f1,Ir as f2,to as f3,Fr as f4,uo as f5,po as f6,co as f7,Jr as f8,yo as f9,ts as fA,Qa as fB,hs as fC,ms as fD,gs as fE,fs as fF,Ms as fG,Vs as fH,Us as fI,zs as fJ,ol as fK,kl as fL,su as fM,lu as fN,Md as fO,Pd as fP,xh as fQ,Fh as fR,Ih as fS,Wh as fT,Kh as fU,pd as fV,ym as fW,Wn as fX,kh as fY,Zn as fZ,ei as f_,mo as fa,Pr as fb,Nr as fc,xr as fd,Do as fe,vr as ff,zo as fg,Go as fh,Jo as fi,Yo as fj,Qo as fk,Zo as fl,tn as fm,rn as fn,sn as fo,fn as fp,bn as fq,vn as fr,An as fs,Dn as ft,In as fu,Rn as fv,wr as fw,_n as fx,Na as fy,ns as fz,Ro as g,Xg as g0,Hg as g1,Kg as g2,Sf as g3,kf as g4,pf as g5,hy as g6,$x as g7,_x as g8,Bx as g9,Gx as ga,Ux as gb,Rf as gc,cy as gd,ex as ge,Bs as h,xg as i,yg as j,Hr as k,gn as l,Tx as m,Qf as n,Kf as o,Sx as p,rf as q,Wr as r,Ar as s,el as t,dl as u,$r as v,$o as w,Dg as x,uy as y,br as z};
|