@odigos/ui-kit 0.0.171 → 0.0.172
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 +10 -0
- package/lib/chunks/ui-components-e5ad46f1.js +2288 -0
- package/lib/components/_v2/table/types.d.ts +2 -0
- package/lib/components/styled.d.ts +8 -3
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants/sources/index.d.ts +5 -1
- package/lib/constants.js +1 -1
- package/lib/containers/_v2/central-connections/source-drawer/styled.d.ts +2 -1
- package/lib/containers/_v2/pipeline-collectors/pods-info/index.d.ts +1 -1
- package/lib/containers/v2.js +19 -19
- package/lib/containers.js +3 -3
- package/lib/contexts.js +1 -1
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/mock-data/sources/index.d.ts +2 -19
- package/lib/snippets/source-container/index.d.ts +1 -1
- package/lib/snippets/source-container/override-runtime.d.ts +2 -1
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/enum/index.d.ts +23 -1
- package/lib/types/instrumentation-instances/index.d.ts +1 -0
- package/lib/types/pipeline-collectors/index.d.ts +9 -0
- package/lib/types/sources/index.d.ts +3 -2
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/ui-components-917db301.js +0 -2286
|
@@ -0,0 +1,2288 @@
|
|
|
1
|
+
import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as o,K8sLogo as n,AddClusterInfoIcon as i,DeleteAttributeIcon as r,RenameAttributeIcon as a,JavaLogo as s,GoLogo as l,NodejsLogo as c,PythonLogo as d,DotnetLogo as p,CSharpLogo as u,CPlusPlusLogo as h,PhpLogo as m,RubyLogo as g,RustLogo as $,SwiftLogo as f,ElixirLogo as x,MysqlLogo as b,NginxLogo as y,PostgresLogo as w,RedisLogo as k,KafkaLogo as v,AlaudaLogo as C,AlibabaCloudLogo as E,AppDynamicsLogo as S,AxiomLogo as A,AzureBlobLogo as D,AzureMonitorLogo as T,BetterStackLogo as z,BonreeLogo as F,CauselyLogo as O,ChecklyLogo as N,ChronosphereLogo as I,ClickhouseLogo as _,AwsCloudwatchLogo as B,CoralogixLogo as R,Dash0Logo as L,DatadogLogo as M,OpenTelemetryLogo as P,DynatraceLogo as j,ElasticApmLogo as U,ElasticSearchLogo as W,GoogleCloudPlatformLogo as V,GrafanaLogo as H,GreptimeLogo as q,GroundcoverLogo as G,HoneycombLogo as K,HyperDxLogo as Y,InstanaLogo as J,JaegerLogo as X,KloudmateLogo as Z,Last9Logo as Q,LightstepLogo as ee,LogzioLogo as te,LokiLogo as oe,LumigoLogo as ne,MiddlewareLogo as ie,NewRelicLogo as re,ObserveLogo as ae,OdigosLogo as se,OneUptimeLogo as le,OpenObserveLogo as ce,OpsVerseLogo as de,OracleLogo as pe,PrometheusLogo as ue,QrynLogo as he,GigapipeLogo as me,QuickwitLogo as ge,AwsS3Logo as $e,SeqLogo as fe,SplunkLogo as xe,SignozLogo as be,SumoLogicLogo as ye,TelemetryHubLogo as we,TempoLogo as ke,TingyunLogo as ve,TraceloopLogo as Ce,UptraceLogo as Ee,VictoriaMetricsLogo as Se,AwsXrayLogo as Ae,NamespacesIcon as De,SourceIcon as Te,DestinationIcon as ze,ActionIcon as Fe,InstrumentationRuleIcon as Oe,CodeAttributesIcon as Ne,CustomInstrumentationIcon as Ie,HeadersCollectionIcon as _e,PayloadCollectionIcon as Be,LogsIcon as Re,MetricsIcon as Le,TracesIcon as Me,VmLogo as Pe,ISquareIcon as je,ExclamationCircleIcon as Ue,ExclamationTriangleIcon as We,VSquareIcon as Ve,XSquareIcon as He,QuestionCircleIcon as qe,VIcon as Ge,CopyIcon as Ke,XIcon as Ye,MinusIcon as Je,ListIcon as Xe,CodeIcon as Ze,ExtendArrowIcon as Qe,PlusIcon as et,EditIcon as tt,NoDataIcon as ot,EyeClosedIcon as nt,EyeOpenIcon as it,SearchIcon as rt,TrashIcon as at,EditedIcon as st,SortArrowsIcon as lt,NotebookIcon as ct,ArrowIcon as dt,ChevronUpIcon as pt,ChevronDownIcon as ut,DotsVerticalIcon as ht,YamlIcon as mt,DotIcon as gt,FilterIcon as $t}from"../icons.js";import{create as ft}from"zustand";import xt,{Fragment as bt,useMemo as yt,useState as wt,useEffect as kt,useRef as vt,createContext as Ct,useContext as Et,useCallback as St,forwardRef as At,memo as Dt}from"react";import Tt from"javascript-time-ago";import{p as zt,c as Ft,s as Ot,u as Nt,e as It}from"./vendor-0965fadc.js";import _t,{css as Bt,useTheme as Rt,ThemeProvider as Lt,keyframes as Mt}from"styled-components";import{Handle as Pt,Position as jt,ReactFlow as Ut,Controls as Wt}from"@xyflow/react";import Vt,{createPortal as Ht}from"react-dom";import{ErrorBoundary as qt}from"react-error-boundary";import Gt from"lottie-react";import{Highlight as Kt,themes as Yt}from"prism-react-renderer";const Jt=e=>e.charAt(0).toUpperCase()+e.slice(1),Xt=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),o=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,n])=>Array.isArray(n)?[e,t(n)]:"object"==typeof n&&null!==n?[e,o(n)]:[e,n]));return Object.entries(e).reduce((e,[n,i])=>{try{const r=JSON.parse(i);Array.isArray(r)?e[n]=JSON.stringify(t(r)):e[n]="object"==typeof r&&null!==r?JSON.stringify(o(r)):i}catch(r){"object"==typeof i&&null!==i?Array.isArray(i)?e[n]=JSON.stringify(t(i)):e[n]=JSON.stringify(o(i)):e[n]=i}return e},{})};var Zt;!function(e){e.SIGNALS="SIGNALS"}(Zt||(Zt={}));const Qt=(e,t,o)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[n,i,r]=e;if(n===Zt.SIGNALS)switch(i){case"INCLUDES":return t?.includes(r);case"EXCLUDES":return!t?.includes(r);default:return!0}const a=o.find(e=>e.name===n);if(!a)return!0;switch(i){case"===":case"==":return a.value===r;case"!==":case"!=":return a.value!==r;case">":return Number(a.value)>Number(r);case"<":return Number(a.value)<Number(r);case">=":return Number(a.value)>=Number(r);case"<=":return Number(a.value)<=Number(r);default:return!0}},eo=e=>JSON.parse(JSON.stringify(e)),to=(e,t)=>{let o=[...e];return t.monitors?.length&&(o=o.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),o},oo=(e,t)=>{let o=[...e];return t.monitors?.length&&(o=o.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),o},no=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[];var io,ro,ao,so,lo,co,po,uo,ho,mo,go,$o,fo,xo,bo,yo,wo,ko,vo,Co,Eo,So,Ao,Do,To,zo,Fo,Oo,No,Io,_o,Bo,Ro,Lo,Mo,Po,jo,Uo,Wo,Vo,Ho;!function(e){e.Attributes="attributes",e.Samplers="samplers"}(io||(io={})),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"}(ro||(ro={})),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"}(ao||(ao={})),function(e){e.Pod="pod",e.Namespace="namespace",e.Node="node"}(so||(so={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(lo||(lo={})),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"}(co||(co={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(po||(po={})),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"}(uo||(uo={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(ho||(ho={})),function(e){e.Ascending="ascending",e.Descending="descending"}(mo||(mo={})),function(e){e.Community="community",e.Cloud="cloud",e.Onprem="onprem"}(go||(go={})),function(e){e.K8s="k8s",e.Vm="vm"}($o||($o={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(fo||(fo={})),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"}(xo||(xo={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(bo||(bo={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule"}(yo||(yo={})),function(e){e.DataStream="DataStream"}(wo||(wo={})),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"}(ko||(ko={})),function(e){e.Text="text",e.Password="password",e.Number="number"}(vo||(vo={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(Co||(Co={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(Eo||(Eo={})),function(e){e.Loading="loading",e.Disabled="disabled"}(So||(So={})),function(e){e.Disabled="disabled",e.Unknown="unknown"}(Ao||(Ao={})),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"}(Do||(Do={})),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"}(To||(To={})),function(e){e.Labeled="labeled"}(zo||(zo={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(Fo||(Fo={})),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"}(Oo||(Oo={})),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"}(No||(No={})),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.DotNetLegacy="dotnet-legacy",e.DotNetEnterprise="dotnet-enterprise",e.RubyEnterprise="ruby-enterprise",e.PhpEnterprise="php-enterprise",e.CPlusPlusEnterprise="cplusplus-enterprise",e.MySqlEnterprise="mysql-enterprise"}(Io||(Io={})),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"}(_o||(_o={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(Bo||(Bo={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(Ro||(Ro={})),function(e){e.HeaderKeys="headerKeys"}(Lo||(Lo={})),function(e){e.Java="java",e.Golang="golang"}(Mo||(Mo={}));class qo{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 Go{packageName;functionName;receiverName;receiverMethodName;constructor(e,t,o,n){this.packageName=e,this.functionName=t||"",this.receiverName=o||"",this.receiverMethodName=n||""}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"}(Po||(Po={})),function(e){e.Healthy="Healthy",e.Updating="Updating",e.Degraded="Degraded",e.Failed="Failed",e.Down="Down",e.Unknown="Unknown"}(jo||(jo={})),function(e){e.Pending="Pending",e.Running="Running",e.Succeeded="Succeeded",e.Failed="Failed",e.Unknown="Unknown"}(Uo||(Uo={})),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"}(Wo||(Wo={})),function(e){e.Running="Running",e.Waiting="Waiting",e.Terminated="Terminated"}(Vo||(Vo={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces"}(Ho||(Ho={}));const Ko=(e,t)=>{let o=[...e];return t.namespaces?.length&&(o=o.filter(({namespace:e})=>!!t.namespaces?.find(({id:t})=>t===e))),t.kinds?.length&&(o=o.filter(({kind:e})=>!!t.kinds?.find(({id:t})=>t===e))),t.languages?.length&&(o=o.filter(({containers:e})=>!!t.languages?.find(({id:t})=>!!e?.find(({language:e})=>t===e)))),t.conditions?.length&&(o=o.filter(({conditions:e})=>!!t.conditions?.find(({id:t})=>!!e?.find(({type:e,reason:o})=>t===`${e}#${o}`)))),t.podsAgentInjectionStatus?.length&&(o=o.filter(({podsAgentInjectionStatus:e})=>!!t.podsAgentInjectionStatus?.find(({id:t})=>t===e?.reasonEnum||t===e?.message))),t.onlyErrors&&(o=o.filter(e=>!!e.conditions?.find(e=>e.status===Co.Error))),t.errors?.length&&(o=o.filter(e=>!!t.errors?.find(t=>!!e.conditions?.find(e=>e.message===t.id)))),o},Yo="default",Jo={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},Xo={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)'},Zo={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",SUMMARY:"Summary",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"},Qo={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"},en=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||t===Yo&&!e.dataStreamNames.length):[],tn=(e,t="",o={})=>{for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],r=t?`${t}.${n}`:n;null===i||"object"!=typeof i||Array.isArray(i)?Array.isArray(i)?i.forEach((e,t)=>{const n=`${r}[${t}]`;null!==e&&"object"==typeof e?tn(e,n,o):o[n]=e}):o[r]=i:tn(i,r,o)}return o},on=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]}`},nn=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`}},rn=()=>{const e=crypto.getRandomValues(new Uint8Array(16));let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,o=>{const n=e[t%16];return t++,("1"===o?n:"0"===o?63&n|128:15&n|64).toString(16)})},an=s=>{const l=s?.toLowerCase(),c=l?.includes(io.Samplers),d=l===io.Attributes;return c?e:d?t:{[ro.K8sAttributes]:n,[ro.AddClusterInfo]:i,[ro.DeleteAttributes]:r,[ro.PiiMasking]:t,[ro.RenameAttributes]:a,[ro.ErrorSampler]:e,[ro.ProbabilisticSampler]:e,[ro.LatencySampler]:e,[ro.ServiceNameSampler]:e,[ro.SpanAttributeSampler]:e}[s]||o},sn=e=>{const t=e?.filter(({status:e})=>e===Co.Error),o=e?.filter(({status:e})=>e===Co.Warning),n=e?.filter(({status:e})=>e===So.Disabled),i=e?.filter(({status:e})=>e===So.Loading),r=t.length>0,a=o.length>0,s=n.length>0;return{errors:t,hasErrors:r,warnings:o,hasWarnings:a,disableds:n,hasDisableds:s,loadings:i,hasLoadings:i.length>0,priorotizedStatus:r?Co.Error:a?Co.Warning:s?Co.Info:void 0}},ln=e=>{const t=e?.reduce((e,t)=>t.instrumented?e+1:e,0);return`${t}/${e?.length||0} instrumented`},cn=e=>({[xo.Java]:s,[xo.Go]:l,[xo.JavaScript]:c,[xo.Python]:d,[xo.DotNet]:p,[xo.CSharp]:u,[xo.CPlusPlus]:h,[xo.Php]:m,[xo.Ruby]:g,[xo.Rust]:$,[xo.Swift]:f,[xo.Elixir]:x,[xo.MySql]:b,[xo.Nginx]:y,[xo.Postgres]:w,[xo.Redis]:k,[xo.Kafka]:v,[xo.Ignored]:o,[xo.Unknown]:o,[xo.Processing]:o,[xo.NoContainers]:o,[xo.NoRunningPods]:o}[e]||o),dn=e=>e?.map(({language:e})=>cn(e))||[],pn=(e,t)=>{const o={[Oo.Alauda]:C,[Oo.AlibabaCloud]:E,[Oo.AppDynamics]:S,[Oo.Axiom]:A,[Oo.AzureBlob]:D,[Oo.AzureMonitor]:T,[Oo.BetterStack]:z,[Oo.Bonree]:F,[Oo.Causely]:O,[Oo.Checkly]:N,[Oo.Chronosphere]:I,[Oo.ClickHouse]:_,[Oo.CloudWatch]:B,[Oo.Coralogix]:R,[Oo.Dash0]:L,[Oo.Datadog]:M,[Oo.Dynamic]:P,[Oo.Dynatrace]:j,[Oo.ElasticApm]:U,[Oo.ElasticSearch]:W,[Oo.GoogleCloud]:V,[Oo.GoogleCloudOTLP]:V,[Oo.GrafanaCloudLoki]:H,[Oo.GrafanaCloudPrometheus]:H,[Oo.GrafanaCloudTempo]:H,[Oo.Greptime]:q,[Oo.Groundcover]:G,[Oo.Honeycomb]:K,[Oo.HyperDX]:Y,[Oo.Instana]:J,[Oo.Jaeger]:X,[Oo.Kafka]:v,[Oo.Kloudmate]:Z,[Oo.Last9]:Q,[Oo.Lightstep]:ee,[Oo.LogzIo]:te,[Oo.Loki]:oe,[Oo.Lumigo]:ne,[Oo.Middleware]:ie,[Oo.NewRelic]:re,[Oo.Observe]:ae,[Oo.Odigos]:se,[Oo.OneUptime]:le,[Oo.OpenObserve]:ce,[Oo.Opsverse]:de,[Oo.Oracle]:pe,[Oo.OTLP]:P,[Oo.OTLPHttp]:P,[Oo.Prometheus]:ue,[Oo.Qryn]:he,[Oo.QrynOss]:me,[Oo.Quickwit]:ge,[Oo.S3]:$e,[Oo.Seq]:fe,[Oo.Signalfx]:xe,[Oo.Signoz]:be,[Oo.Splunk]:xe,[Oo.SplunkSapm]:xe,[Oo.SplunkOtlp]:xe,[Oo.SumoLogic]:ye,[Oo.TelemetryHub]:we,[Oo.Tempo]:ke,[Oo.Tingyun]:ve,[Oo.Traceloop]:Ce,[Oo.Uptrace]:Ee,[Oo.VictoriaMetrics]:Se,[Oo.VictoriaMetricsCloud]:Se,[Oo.XRay]:Ae}[e];return o&&!t?{icon:o}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},un=e=>({[yo.Namespace]:De,[yo.Source]:Te,[yo.Destination]:ze,[yo.Action]:Fe,[yo.InstrumentationRule]:Oe}[e]),hn=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,mn=(e,t,o)=>{const{extended:n,prioritizeDisplayName:i}=o||{};let r="",a="";switch(t){case yo.InstrumentationRule:const t=e;r=t.type,a=t.ruleName;break;case yo.Source:const o=e;r=o.name,a=o.otelServiceName;break;case yo.Action:const n=e;r=n.type,a=n.name;break;case yo.Destination:const i=e;r=i.destinationType.displayName,a=i.name;break;case yo.Namespace:const s=e;r=s.name,a=s.name}return n?r+(a&&a!==r?` (${a})`:""):i&&a||r},gn=(e,t)=>{if(t===yo.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[o,n]=e.split("=");t[o]=n}),t}return e},$n=e=>({[Bo.CodeAttributes]:Ne,[Bo.CustomInstrumentation]:Ie,[Bo.HeadersCollection]:_e,[Bo.PayloadCollection]:Be,[Bo.UnknownType]:o}[e]||o),fn=e=>{const{numberOfInstances:t,containers:o}=e;if(!o)return t&&t>0?xo.Processing:xo.NoRunningPods;const n=o?.filter(e=>e.language!==xo.Ignored);if(!n.length)return xo.NoContainers;const i=n.find(e=>e.language!==xo.Unknown);return i?i.language:xo.Unknown},xn=(e,t,o)=>(t===yo.Source?e?.sources.find(e=>e.kind===o.kind&&e.name===o.name&&e.namespace===o.namespace):e?.destinations.find(e=>e.id===o))||{throughput:0},bn=e=>({[Ho.Logs]:Re,[Ho.Metrics]:Le,[Ho.Traces]:Me}[e]),yn=e=>e?{[$o.K8s]:n,[$o.Vm]:Pe}[e]:se,wn=e=>e?{[$o.K8s]:"Kubernetes Cluster",[$o.Vm]:"Virtual Machine"}[e]:"Unknown",kn=(e,t,o)=>{const n=e[t];return n?n.flatMap(e=>{const n=e[o],i=[];return void 0!==n&&(Array.isArray(n)?i.push(...n):i.push(n)),i.push(...kn(e,t,o)),i}):[]},vn=(e,t)=>{if(t===yo.Source){let t="";return Object.entries(e).forEach(([e,o])=>{t+=`${e}=${o}&`}),t.slice(0,-1),t}return e},Cn=(e,t,o)=>{switch(t){case Co.Default:return e.v2.colors.purple[o];case Co.Info:return e.v2.colors.blue[o];case Co.Error:return e.v2.colors.red[o];case Co.Warning:return e.v2.colors.yellow[o];case Co.Success:return e.v2.colors.green[o];case Ao.Disabled:case Ao.Unknown:return e.v2.colors.silver[o];default:return e.v2.colors.white[500]}},En=e=>{switch(e){case jo.Updating:case Uo.Pending:case Wo.ContainerCreating:case Vo.Waiting:return Co.Info;case jo.Healthy:case Uo.Succeeded:case Uo.Running:case Wo.Running:case Vo.Running:return Co.Success;case jo.Degraded:return Co.Warning;case jo.Failed:case Uo.Failed:case Wo.Error:case Wo.CrashLoopBackOff:case Wo.CreateContainerError:case Wo.CreateContainerConfigError:case Wo.ErrImagePull:case Wo.ErrImageNeverPull:case Wo.ImagePullBackOff:case Wo.InvalidImageName:case Wo.RegistryUnavailable:case Wo.NetworkNotReady:case Wo.OOMKilled:case Wo.ContainerCannotRun:case Vo.Terminated:case Wo.DeadlineExceeded:case Wo.StartError:return Co.Error;case jo.Down:case Wo.Completed:return Ao.Disabled;case jo.Unknown:case Uo.Unknown:default:return Ao.Unknown}},Sn=(e,t)=>({[Co.Default]:o=>se({fill:Cn(t,e,"300"),...o}),[Co.Info]:o=>je({fill:Cn(t,e,"400"),...o}),[Co.Error]:o=>Ue({fill:Cn(t,e,"500"),...o}),[Co.Warning]:o=>We({fill:Cn(t,e,"500"),...o}),[Co.Success]:o=>Ve({fill:Cn(t,e,"500"),...o}),[Ao.Disabled]:o=>He({fill:Cn(t,e,"400"),...o}),[Ao.Unknown]:o=>qe({fill:Cn(t,e,"300"),...o})}[e]),An=e=>{switch(e){case _o.Success:return Co.Success;case _o.Error:case _o.Failure:return Co.Error;case _o.Notice:return Co.Warning;case _o.Unsupported:case _o.Unknown:return Co.Info;case _o.Irrelevant:case _o.Disabled:return So.Disabled;case _o.Waiting:return So.Loading;case _o.Pending:default:return Co.Default}},Dn=(e,t)=>{const o=t.find(([t,o])=>e>=t&&(null===o||e<=o));return o?.[2]||null},Tn=({namespace:e,name:t,kind:o})=>({namespace:e,name:t,kind:o});function zn(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const Fn=(e,t)=>{const o=[],n=JSON.parse(JSON.stringify(e));for(const e of n){const n=zn(t.fields,{}),i=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==i&&o.push(...e.items[i].fields.map(e=>({...e,initialValue:n[e.name]})))}return o},On=(e,t)=>{const o=e=>e?.some(({healthy:e})=>e.status!==Co.Success);return e?.length?e.some(({instrumentationInstances:e})=>o(e)):o(t)??!1},Nn=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),In=e=>!!e&&(!(e.length>63)&&/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)),_n=(e,t=0)=>{const o=(new Date).getTime();return new Date(e).getTime()-o<=t},Bn=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},Rn=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,Ln=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,Mn=e=>Ln.test(e),Pn=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",jn=e=>e?.map(({status:e,type:t,reason:o,message:n,lastTransitionTime:i})=>({status:e,type:Pn(t),reason:o?Pn(o):"",message:n,lastTransitionTime:i}))||[],Un=(e,t)=>{const o=zn(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:o[e.name]??null})).filter(e=>null!==e.value):Object.entries(o).map(([e,t])=>({key:e,name:e,value:t}))},Wn=e=>e?Object.keys(e).filter(t=>e[t]):[],Vn=e=>e.replace(/[^\d]/g,""),Hn=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},qn=e=>{let t="";try{const o=JSON.parse(e);t=Array.isArray(o)?o.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof o&&null!==o?Object.entries(o).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(o){t=e}return t},Gn=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(o=>{const n=e[o];if(Array.isArray(n)){const e=n.filter(e=>null!=e&&""!==e);e.length>0&&(t[o]=e.map(e=>Gn(e)))}else if("object"==typeof n&&null!==n){const e=Gn(n);Object.keys(e).length>0&&(t[o]=e)}else[void 0,null,""].includes(n)||(t[o]=n)}),t},Kn=(e,t=2)=>JSON.stringify(e||{},null,t),Yn=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),Jn=e=>Object.entries(e).reduce((e,[t,o])=>(e[t]="string"==typeof o?o:JSON.stringify(o),e),{}),Xn=e=>{let t=e.toString().replace("v","").split("-")[0];t=t.match(/[\d.]+/)?.[0]||"";const o=t.split(".");return o.length>2&&(t=o.slice(0,2).join(".")),Number(t)};var Zn,Qn;!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"}(Zn||(Zn={})),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"}(Qn||(Qn={}));const ei=_t.p`
|
|
2
|
+
margin: 0;
|
|
3
|
+
color: ${({$color:e,theme:t})=>e||t.v2.colors.white[500]};
|
|
4
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
5
|
+
font-size: ${({theme:e,$size:t})=>e.v2.text.size[t]}px;
|
|
6
|
+
font-weight: ${({$weight:e})=>e};
|
|
7
|
+
text-align: ${({$align:e})=>e};
|
|
8
|
+
text-transform: ${({$transform:e})=>e};
|
|
9
|
+
line-height: ${({theme:e,$lineHeight:t,$size:o})=>t||`${e.v2.text.size[o]+2}px`};
|
|
10
|
+
|
|
11
|
+
${({$nowrap:e})=>e&&Bt`
|
|
12
|
+
text-wrap: nowrap;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
text-overflow: ellipsis;
|
|
16
|
+
`}
|
|
17
|
+
|
|
18
|
+
${({$underline:e})=>e&&Bt`
|
|
19
|
+
text-decoration: underline;
|
|
20
|
+
`}
|
|
21
|
+
`,ti=({children:e,variant:t=Zn.P,color:o,size:n=Qn.S,weight:i=400,align:r="left",lineHeight:a,transform:s,nowrap:l,underline:c,...d})=>{const p=e?.toString().split("\n")||[];return xt.createElement(ei,{as:t,$color:o,$size:n,$weight:i,$align:r,$lineHeight:a,$transform:s,$nowrap:l,$underline:c,...d},p.map((e,t)=>xt.createElement(bt,{key:`typography-${t}-${e}`},e,t!==p.length-1&&xt.createElement("br",null))))},oi=_t.div`
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
gap: 4px;
|
|
26
|
+
min-width: ${({$minWidth:e})=>e};
|
|
27
|
+
width: fit-content;
|
|
28
|
+
padding: 4px 8px;
|
|
29
|
+
border-radius: 100px;
|
|
30
|
+
background-color: ${({$backgroundColor:e})=>e};
|
|
31
|
+
`,ni=({label:e,leftIcon:t,rightIcon:o,status:n=Ao.Unknown,useSecondaryTone:i=!1,invertColors:r=!1,textSize:a,textColor:s,backgroundColor:l,minWidth:c="unset"})=>{const d=Rt(),p=n?[Ao.Disabled].includes(n)?Cn(d,n,r?"400":"700"):[Ao.Unknown].includes(n)?Cn(d,n,"600"):Cn(d,n,r?i?"400":"300":i?"700":"500"):d.v2.colors.grey[200],u=s||(r&&![Ao.Unknown].includes(n)?p:[Ao.Disabled].includes(n)?d.v2.colors.grey[400]:[Co.Error,Co.Warning,Co.Success].includes(n)?d.v2.colors.black[500]:d.v2.colors.white[500]),h=l||(r&&![Ao.Unknown].includes(n)?[Ao.Disabled].includes(n)?d.v2.colors.grey[700]:d.v2.colors.silver[600]:p);return xt.createElement(oi,{$backgroundColor:h,$minWidth:c},t&&xt.createElement(t,{fill:u,size:14}),xt.createElement(ti,{color:u,size:a||Qn.XXS,nowrap:!0},e),o&&xt.createElement(o,{fill:u,size:14}))},ii=ft(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})})),ri=[{label:"Attributes",icon:an(io.Attributes),items:[{type:ro.K8sAttributes,icon:an(ro.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:ro.AddClusterInfo,icon:an(ro.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:ro.DeleteAttributes,icon:an(ro.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:ro.RenameAttributes,icon:an(ro.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:ro.PiiMasking,icon:an(ro.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."}]},{label:"Samplers",icon:an(io.Samplers),items:[{type:ro.ErrorSampler,icon:an(io.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:ro.LatencySampler,icon:an(io.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:ro.ProbabilisticSampler,icon:an(io.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:ro.ServiceNameSampler,icon:an(io.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:ro.SpanAttributeSampler,icon:an(io.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."}]}],ai={DETECTED:{TITLE:"Detected by Odigos",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},EXISTS:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},MANAGED:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."},SELF_HOSTED:{TITLE:"Self-hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."}},si=[{type:Bo.CodeAttributes,icon:$n(Bo.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:[xo.Go,xo.Python]},{type:Bo.CustomInstrumentation,icon:$n(Bo.CustomInstrumentation),label:"Custom Instrumentation",description:"Define custom instrumentation for specific class and methods(i.e for Java) or explicit symbol(i.e. 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:[xo.Go,xo.Java]},{type:Bo.HeadersCollection,icon:$n(Bo.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:[xo.Go,xo.Java,xo.JavaScript]},{type:Bo.PayloadCollection,icon:$n(Bo.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:[xo.Go]}],li=[{id:Ho.Logs,value:"Logs"},{id:Ho.Metrics,value:"Metrics"},{id:Ho.Traces,value:"Traces"}],ci={[xo.Go]:"Go",[xo.Java]:"Java",[xo.JavaScript]:"Node.js",[xo.Python]:"Python",[xo.DotNet]:".NET",[xo.CSharp]:"C#",[xo.CPlusPlus]:"C++",[xo.Php]:"PHP",[xo.Ruby]:"Ruby",[xo.Rust]:"Rust",[xo.Swift]:"Swift",[xo.Elixir]:"Elixir",[xo.MySql]:"MySQL",[xo.Nginx]:"Nginx",[xo.Postgres]:"PostgreSQL",[xo.Redis]:"Redis",[xo.Kafka]:"Kafka",[xo.Ignored]:"Ignored",[xo.Unknown]:"Unknown",[xo.Processing]:"Processing",[xo.NoContainers]:"No Containers",[xo.NoRunningPods]:"No Running Pods"},di=[{id:xo.Go,value:ci[xo.Go],icon:cn(xo.Go)},{id:xo.Java,value:ci[xo.Java],icon:cn(xo.Java)},{id:xo.JavaScript,value:ci[xo.JavaScript],icon:cn(xo.JavaScript)},{id:xo.Python,value:ci[xo.Python],icon:cn(xo.Python)},{id:xo.Php,value:ci[xo.Php],icon:cn(xo.Php)},{id:xo.Ruby,value:ci[xo.Ruby],icon:cn(xo.Ruby)},{id:xo.Rust,value:ci[xo.Rust],icon:cn(xo.Rust)},{id:xo.DotNet,value:ci[xo.DotNet],icon:cn(xo.DotNet)},{id:xo.CSharp,value:ci[xo.CSharp],icon:cn(xo.CSharp)},{id:xo.CPlusPlus,value:ci[xo.CPlusPlus],icon:cn(xo.CPlusPlus)},{id:xo.Swift,value:ci[xo.Swift],icon:cn(xo.Swift)},{id:xo.Elixir,value:ci[xo.Elixir],icon:cn(xo.Elixir)}],pi={[xo.Go]:{community:[{id:Io.GolangCommunity,value:Io.GolangCommunity,icon:cn(xo.Go)}],enterprise:[{id:Io.GolangEnterprise,value:Io.GolangEnterprise,icon:cn(xo.Go)}]},[xo.JavaScript]:{community:[{id:Io.NodejsCommunity,value:Io.NodejsCommunity,icon:cn(xo.JavaScript)}],enterprise:[{id:Io.NodejsEnterprise,value:Io.NodejsEnterprise,icon:cn(xo.JavaScript)}]},[xo.Python]:{community:[{id:Io.PythonCommunity,value:Io.PythonCommunity,icon:cn(xo.Python)}],enterprise:[{id:Io.PythonEnterprise,value:Io.PythonEnterprise,icon:cn(xo.Python)}]},[xo.Java]:{community:[{id:Io.JavaCommunity,value:Io.JavaCommunity,icon:cn(xo.Java)}],enterprise:[{id:Io.JavaEnterprise,value:Io.JavaEnterprise,icon:cn(xo.Java)},{id:Io.JavaEbpfInstrumentations,value:Io.JavaEbpfInstrumentations,icon:cn(xo.Java)}]},[xo.DotNet]:{community:[{id:Io.DotNetCommunity,value:Io.DotNetCommunity,icon:cn(xo.DotNet)}],enterprise:[{id:Io.DotNetEnterprise,value:Io.DotNetEnterprise,icon:cn(xo.DotNet)}]},[xo.Ruby]:{community:[{id:Io.RubyCommunity,value:Io.RubyCommunity,icon:cn(xo.Ruby)}],enterprise:[{id:Io.RubyEnterprise,value:Io.RubyEnterprise,icon:cn(xo.Ruby)}]},[xo.Php]:{community:[{id:Io.PhpCommunity,value:Io.PhpCommunity,icon:cn(xo.Php)}],enterprise:[{id:Io.PhpEnterprise,value:Io.PhpEnterprise,icon:cn(xo.Php)}]},[xo.CSharp]:{community:[],enterprise:[{id:Io.CPlusPlusEnterprise,value:Io.CPlusPlusEnterprise,icon:cn(xo.CSharp)}]},[xo.MySql]:{community:[],enterprise:[{id:Io.MySqlEnterprise,value:Io.MySqlEnterprise,icon:cn(xo.MySql)}]},[xo.CPlusPlus]:{community:[],enterprise:[]},[xo.Rust]:{community:[],enterprise:[]},[xo.Swift]:{community:[],enterprise:[]},[xo.Elixir]:{community:[],enterprise:[]},[xo.Nginx]:{community:[],enterprise:[]},[xo.Postgres]:{community:[],enterprise:[]},[xo.Redis]:{community:[],enterprise:[]},[xo.Kafka]:{community:[],enterprise:[]},[xo.Ignored]:{community:[],enterprise:[]},[xo.Unknown]:{community:[],enterprise:[]},[xo.Processing]:{community:[],enterprise:[]},[xo.NoContainers]:{community:[],enterprise:[]},[xo.NoRunningPods]:{community:[],enterprise:[]}},ui=6048e5,hi=ft()(zt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:Jo.DARK_MODE,storage:"undefined"!=typeof window?Ft(()=>localStorage):void 0})),mi={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:""},gi=ft(e=>({...mi,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const o=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(o).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(mi)})),$i=ft(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),fi=ft(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,o)=>{const n=t===yo.Namespace?"namespacesLoading":t===yo.Source?"sourcesLoading":t===yo.Destination?"destinationsLoading":t===yo.Action?"actionsLoading":t===yo.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==n&&e({[n]:o})},setEntities:(t,o)=>{const n=t===yo.Namespace?"namespaces":t===yo.Source?"sources":t===yo.Destination?"destinations":t===yo.Action?"actions":t===yo.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e({[n]:o})},addEntities:(t,o)=>{const n=t===yo.Namespace?"namespaces":t===yo.Source?"sources":t===yo.Destination?"destinations":t===yo.Action?"actions":t===yo.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e(e=>{const t=[...e[n]];return o.forEach(e=>{const o=t.findIndex(t=>JSON.stringify(hn(t))===JSON.stringify(hn(e)));-1!==o?t[o]={...t[o],...e}:t.push(e)}),{[n]:t}})},removeEntities:(t,o)=>{const n=t===yo.Namespace?"namespaces":t===yo.Source?"sources":t===yo.Destination?"destinations":t===yo.Action?"actions":t===yo.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e(e=>{const i=[...e[n]];return o.forEach(e=>{const o=i.findIndex(o=>t===yo.Source?JSON.stringify(hn(o))===JSON.stringify(hn(e)):hn(o)===e);-1!==o&&i.splice(o,1)}),{[n]:i}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),xi=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),bi=ft(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:xi})),yi=ft(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),wi=ft((e,t)=>({notifications:[],addNotification:o=>{const n=new Date,i=`${n.getTime().toString()}${o.target?`#${o.target}`:""}`,{notifications:r}=t();r.some(e=>e.type===o.type&&e.title===o.title&&e.message===o.message&&!e.dismissed)||e(e=>({notifications:[{...o,id:i,time:n.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const o=e.notifications.findIndex(e=>e.id===t);return-1!==o&&(e.notifications[o].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const o=e.notifications.findIndex(e=>e.id===t);return-1!==o&&(e.notifications[o].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const o=e.notifications.findIndex(e=>e.id===t);return-1!==o&&e.notifications.splice(o,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}}));var ki;!function(e){e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting"}(ki||(ki={}));const vi=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),Ci=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),Ei=ft((e,t)=>({progress:{},setProgress:(o,n)=>{const i=t(),r=vi();return"number"==typeof n.total&&(r.total=n.total),"number"==typeof n.current&&(r.current=n.current),e({progress:{...i.progress,[o]:Ci(r)}})},addProgress:(o,n)=>{const i=t(),r=vi(o,i.progress);return r.current+=n,e({progress:{...i.progress,[o]:Ci(r)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),Si=ft(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),Ai={fetchedAllNamespaces:!1,availableSources:{},configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},Di=(e,t)=>e.destinationType.type!==t.destinationType.type,Ti=ft(e=>({...Ai,setFetchedAllNamespaces:t=>e({fetchedAllNamespaces:t}),setAvailableSources:t=>e({availableSources:t}),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=>Di(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const o=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(o).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>Di(e,t))})),clearStore:()=>e(()=>({...Ai}))})),zi={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"}},Fi={v2:zi.v2,darkMode:!0,colors:{...zi.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:zi.font_family},Oi={v2:zi.v2,darkMode:!1,colors:{...zi.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:zi.font_family},Ni=e=>e?Fi:Oi;var Ii=Object.freeze({__proto__:null,baseTheme:zi,darkModeTheme:Fi,getTheme:Ni,lightModeTheme:Oi});Ot('@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 _i={in:{left:Mt`
|
|
32
|
+
from { transform: translateX(-100%); }
|
|
33
|
+
to { transform: translateX(0); }
|
|
34
|
+
`,right:Mt`
|
|
35
|
+
from { transform: translateX(100%); }
|
|
36
|
+
to { transform: translateX(0); }
|
|
37
|
+
`,top:Mt`
|
|
38
|
+
from { transform: translateY(-100%); }
|
|
39
|
+
to { transform: translateY(0); }
|
|
40
|
+
`,bottom:Mt`
|
|
41
|
+
from { transform: translateY(100%); }
|
|
42
|
+
to { transform: translateY(0); }
|
|
43
|
+
`,center:Mt`
|
|
44
|
+
from { transform: translate(-50%, 100%); }
|
|
45
|
+
to { transform: translate(-50%, -50%); }
|
|
46
|
+
`},out:{left:Mt`
|
|
47
|
+
from { transform: translateX(0); }
|
|
48
|
+
to { transform: translateX(-100%); }
|
|
49
|
+
`,right:Mt`
|
|
50
|
+
from { transform: translateX(0); }
|
|
51
|
+
to { transform: translateX(100%); }
|
|
52
|
+
`,top:Mt`
|
|
53
|
+
from { transform: translateY(0); }
|
|
54
|
+
to { transform: translateY(-100%); }
|
|
55
|
+
`,bottom:Mt`
|
|
56
|
+
from { transform: translateY(0); }
|
|
57
|
+
to { transform: translateY(100%); }
|
|
58
|
+
`,center:Mt`
|
|
59
|
+
from { transform: translate(-50%, -50%); }
|
|
60
|
+
to { transform: translate(-50%, 100%); }
|
|
61
|
+
`}},Bi={in:Mt`
|
|
62
|
+
from {
|
|
63
|
+
width: 0%;
|
|
64
|
+
}
|
|
65
|
+
to {
|
|
66
|
+
width: 100%;
|
|
67
|
+
}
|
|
68
|
+
`,out:Mt`
|
|
69
|
+
from {
|
|
70
|
+
width: 100%;
|
|
71
|
+
}
|
|
72
|
+
to {
|
|
73
|
+
width: 0%;
|
|
74
|
+
}
|
|
75
|
+
`},Ri=Mt`
|
|
76
|
+
0% {
|
|
77
|
+
transform: scale(1);
|
|
78
|
+
opacity: 1;
|
|
79
|
+
}
|
|
80
|
+
75%, 100% {
|
|
81
|
+
transform: scale(2);
|
|
82
|
+
opacity: 0;
|
|
83
|
+
}
|
|
84
|
+
`,Li=Mt`
|
|
85
|
+
0% {
|
|
86
|
+
background-position: -500px 0;
|
|
87
|
+
}
|
|
88
|
+
100% {
|
|
89
|
+
background-position: 500px 0;
|
|
90
|
+
}
|
|
91
|
+
`,Mi={in:Mt`
|
|
92
|
+
from {
|
|
93
|
+
opacity: 0;
|
|
94
|
+
}
|
|
95
|
+
to {
|
|
96
|
+
opacity: 1;
|
|
97
|
+
}
|
|
98
|
+
`,out:Mt`
|
|
99
|
+
from {
|
|
100
|
+
opacity: 1;
|
|
101
|
+
}
|
|
102
|
+
to {
|
|
103
|
+
opacity: 0;
|
|
104
|
+
}
|
|
105
|
+
`},Pi={Provider:({children:e})=>{const{darkMode:t}=hi();return xt.createElement(Lt,{theme:Ni(t)},e)},useTheme:Rt,opacity:Object.freeze({__proto__:null,hex:{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"}}),palletes:Ii,animations:Object.freeze({__proto__:null,fade:Mi,ping:Ri,progress:Bi,shimmer:Li,slide:_i})},ji=_t.div`
|
|
106
|
+
color: ${({$color:e,theme:t})=>e||t.text.secondary};
|
|
107
|
+
font-size: ${({$size:e})=>void 0!==e?e:16}px;
|
|
108
|
+
font-weight: ${({$weight:e})=>void 0!==e?e:300};
|
|
109
|
+
text-align: ${({$align:e})=>e||"left"};
|
|
110
|
+
opacity: ${({$opacity:e})=>void 0!==e?e:1};
|
|
111
|
+
text-decoration: ${({$decoration:e})=>e||"none"};
|
|
112
|
+
text-transform: ${({$transform:e,$family:t})=>e||("secondary"===t?"uppercase":"none")};
|
|
113
|
+
font-family: ${({theme:e,$family:t="primary"})=>e.font_family[t]};
|
|
114
|
+
white-space: ${({$nowrap:e})=>e?"nowrap":"unset"};
|
|
115
|
+
text-wrap: ${({$nowrap:e})=>e?"nowrap":"unset"};
|
|
116
|
+
`,Ui=e=>{const t=e.match(/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/g);return t?.map(e=>{const[t,o,n]=e.split('"');return{original:e,href:o,label:n.replace("</a>","").replace(">","")}})},Wi=e=>{const t=e.match(/<strong[^>]*>(.*?)<\/strong>/g);return t?.map(e=>{const t=e.replace(/<strong[^>]*>/,"").replace(/<\/strong>/,"");return{original:e,label:t}})},Vi=(e,t)=>{const o=Ui(e);o?.forEach((t,o)=>{e=e.replace(t.original,`LINK-${o}###`)});const n=Wi(e);return n?.forEach((t,o)=>{e=e.replace(t.original,`STRONG-${o}###`)}),e.split(" ").map(e=>{if(e.includes("LINK-")){const[n,i]=e.split("###"),r=o?.[parseInt(n.replace("LINK-",""))];return xt.createElement(bt,{key:e},xt.createElement("a",{href:r?.href,target:"_blank",rel:"noreferrer",style:{color:t.colors.majestic_blue_soft}},r?.label),i?`${i} `:" ")}if(e.includes("STRONG-")){const[t,o]=e.split("###"),i=n?.[parseInt(t.replace("STRONG-",""))];return xt.createElement(bt,{key:e},xt.createElement("strong",{style:{fontWeight:600}},i?.label),o?`${o} `:" ")}return e+" "})},Hi=({children:e,color:t,size:o,weight:n,align:i,family:r,opacity:a,decoration:s,transform:l,nowrap:c,...d})=>{const p=Pi.useTheme(),u=yt(()=>(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 xt.createElement(ji,{$color:t,$size:o,$weight:n,$align:i,$family:r,$opacity:a,$decoration:s,$transform:l,$nowrap:c,...d},u.length?u.map((e,t)=>xt.createElement(bt,{key:`text-${t}-${e}`},Vi(e,p),t!==u.length-1?xt.createElement("br",null):null)):e)},qi=_t.div`
|
|
117
|
+
padding: 4px 0 0 0;
|
|
118
|
+
`,Gi=_t(Hi)`
|
|
119
|
+
font-size: 12px;
|
|
120
|
+
color: ${({theme:e})=>e.text.error};
|
|
121
|
+
`,Ki=({children:e})=>xt.createElement(qi,null,xt.createElement(Gi,null,e)),Yi=_t.div`
|
|
122
|
+
position: relative;
|
|
123
|
+
width: 100%;
|
|
124
|
+
`,Ji=_t.div`
|
|
125
|
+
width: calc(100% - 16px);
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
height: 36px;
|
|
129
|
+
gap: 8px;
|
|
130
|
+
padding-left: 12px;
|
|
131
|
+
transition: border-color 0.3s;
|
|
132
|
+
border-radius: 32px;
|
|
133
|
+
border: 1px solid ${({theme:e,$hasError:t})=>t?e.text.error:e.colors.border};
|
|
134
|
+
|
|
135
|
+
&:hover {
|
|
136
|
+
border-color: ${({theme:e,$hasError:t})=>t?e.text.error_secondary:e.colors.secondary};
|
|
137
|
+
}
|
|
138
|
+
&:focus-within {
|
|
139
|
+
border-color: ${({theme:e,$hasError:t})=>t?e.text.error_secondary:e.colors.secondary};
|
|
140
|
+
}
|
|
141
|
+
`,Xi=_t.input`
|
|
142
|
+
flex: 1;
|
|
143
|
+
border: none;
|
|
144
|
+
outline: none;
|
|
145
|
+
background: none;
|
|
146
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
147
|
+
font-size: 14px;
|
|
148
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
149
|
+
font-weight: 300;
|
|
150
|
+
&::placeholder {
|
|
151
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
152
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
153
|
+
opacity: 0.4;
|
|
154
|
+
font-size: 14px;
|
|
155
|
+
font-weight: 300;
|
|
156
|
+
line-height: 22px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&:disabled {
|
|
160
|
+
cursor: not-allowed;
|
|
161
|
+
}
|
|
162
|
+
`,Zi=_t.ul`
|
|
163
|
+
position: absolute;
|
|
164
|
+
max-height: 500px;
|
|
165
|
+
top: 32px;
|
|
166
|
+
border-radius: 24px;
|
|
167
|
+
width: calc(100% - 32px);
|
|
168
|
+
overflow-y: auto;
|
|
169
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
170
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
171
|
+
z-index: 9999;
|
|
172
|
+
padding: 12px;
|
|
173
|
+
`,Qi=_t.li`
|
|
174
|
+
width: calc(100% - 24px);
|
|
175
|
+
padding: 8px 12px;
|
|
176
|
+
cursor: ${({$isList:e})=>e?"default":"pointer"};
|
|
177
|
+
border-radius: 24px;
|
|
178
|
+
gap: 8px;
|
|
179
|
+
display: flex;
|
|
180
|
+
align-items: ${({$isList:e})=>e?"flex-start":"center"};
|
|
181
|
+
background: transparent;
|
|
182
|
+
&:hover {
|
|
183
|
+
background: ${({theme:e,$isList:t})=>!t&&e.colors.dropdown_bg_2};
|
|
184
|
+
}
|
|
185
|
+
`,er=_t.div`
|
|
186
|
+
width: 100%;
|
|
187
|
+
`,tr=_t.div`
|
|
188
|
+
display: flex;
|
|
189
|
+
width: 100%;
|
|
190
|
+
`,or=_t.div`
|
|
191
|
+
width: 1px;
|
|
192
|
+
height: 52px;
|
|
193
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
194
|
+
position: absolute;
|
|
195
|
+
left: 33px;
|
|
196
|
+
`,nr=_t.div`
|
|
197
|
+
display: flex;
|
|
198
|
+
flex-direction: column;
|
|
199
|
+
gap: 4px;
|
|
200
|
+
`,ir=_t(Hi)`
|
|
201
|
+
flex: 1;
|
|
202
|
+
font-size: 14px;
|
|
203
|
+
`,rr=_t(Hi)`
|
|
204
|
+
color: ${({theme:e})=>e.text.grey};
|
|
205
|
+
font-size: 10px;
|
|
206
|
+
line-height: 150%;
|
|
207
|
+
`,ar=_t.ul`
|
|
208
|
+
padding-left: 0px;
|
|
209
|
+
margin: 4px 0 0 0;
|
|
210
|
+
list-style: none;
|
|
211
|
+
width: 100%;
|
|
212
|
+
`,sr=(e,t)=>t?e.reduce((e,o)=>{if(o.items){const n=sr(o.items,t);n.length&&e.push({...o,items:n})}else o.label.toLowerCase().includes(t.toLowerCase())&&e.push(o);return e},[]):e,lr=({placeholder:e="Type to search...",options:t,selectedOption:o,onOptionSelect:n,defaultText:i,onTextChange:r,style:a,disabled:s,errorMessage:l,...c})=>{const[d,p]=wt(o?.label||i||""),[u,h]=wt(sr(t,d)),[m,g]=wt(!1);wt(-1),kt(()=>h(sr(t,d)),[t]);const $=o?.icon,f=e=>{e&&(p(e.label),r?.(e.label)),g(!e),n?.(e)};return xt.createElement(Yi,{style:a},xt.createElement(Ji,{$hasError:!!l},$&&xt.createElement($,null),xt.createElement(Xi,{type:"text",value:d,placeholder:e,onChange:e=>{e.stopPropagation();const o=e.target.value,n=sr(t,o),i=1===n.length&&n[0].label===o?n[0]:void 0;p(o),r?.(o),h(n),f(i)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:s,onBlur:()=>!s&&g(!1),onFocus:()=>!s&&g(!0),...c})),m&&u.length?xt.createElement(Zi,null,u.map(e=>xt.createElement(cr,{key:e.type||e.label,option:e,onClick:f}))):null,l&&xt.createElement(Ki,null,l))},cr=({option:e,renderIcon:t=!0,onClick:o})=>{const n=!!e.items&&e.items.length>0,i=e.icon;return xt.createElement(Qi,{"data-id":`option-${e.type||e.label}`,$isList:n,onMouseDown:()=>n?null:o(e)},i&&t&&xt.createElement(i,null),xt.createElement(er,null,xt.createElement(nr,null,xt.createElement(ir,null,e.label),xt.createElement(rr,null,e.description)),n&&xt.createElement(ar,null,e.items?.map(e=>xt.createElement(tr,{key:e.type||e.label},xt.createElement(or,null),xt.createElement(cr,{option:e,renderIcon:!1,onClick:o}))))))},dr=_t.span`
|
|
213
|
+
display: flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
justify-content: center;
|
|
216
|
+
|
|
217
|
+
min-height: 16px;
|
|
218
|
+
min-width: 16px;
|
|
219
|
+
width: fit-content;
|
|
220
|
+
padding: 4px;
|
|
221
|
+
gap: 2px;
|
|
222
|
+
|
|
223
|
+
border-radius: 50px;
|
|
224
|
+
border: 1px solid ${({theme:e,$filled:t,$status:o})=>o?e.text[o]+(t?"":Pi.opacity.hex["050"]):t?"transparent":e.colors.border};
|
|
225
|
+
background-color: ${({theme:e,$filled:t,$status:o})=>t?o?e.colors[o]:e.colors.majestic_blue:"transparent"};
|
|
226
|
+
color: ${({theme:e,$filled:t,$status:o})=>t&&o?e.text.secondary:t?e.text.white:o?e.text[o]:e.text.grey};
|
|
227
|
+
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
228
|
+
font-size: 12px;
|
|
229
|
+
white-space: nowrap;
|
|
230
|
+
|
|
231
|
+
${({theme:e,$filled:t,$status:o,$clickable:n})=>n&&`&:hover {\n cursor: pointer;\n background-color: ${o?e.colors[o]+Pi.opacity.hex["020"]:t?e.colors.majestic_blue_soft:e.colors.secondary+Pi.opacity.hex["020"]};\n }`}
|
|
232
|
+
`,pr=({label:e,filled:t,status:o,withIcon:n,onClick:i})=>{const r=Pi.useTheme(),a=o&&n?Sn(o,r):null;return xt.createElement(dr,{$filled:t,$status:o,$clickable:!!i,onClick:i},!!a&&xt.createElement(a,null),e)},ur=_t.div`
|
|
233
|
+
height: fit-content;
|
|
234
|
+
border: 2px solid transparent;
|
|
235
|
+
padding: 2px;
|
|
236
|
+
border-radius: 32px;
|
|
237
|
+
background-color: transparent;
|
|
238
|
+
transition: border-color 0.3s ease;
|
|
239
|
+
&:focus-within {
|
|
240
|
+
border-color: ${({theme:e})=>e.colors.secondary};
|
|
241
|
+
}
|
|
242
|
+
`,hr={primary:Bt`
|
|
243
|
+
border: 1px solid ${({theme:e})=>e.text.secondary+Pi.opacity.hex["024"]};
|
|
244
|
+
background: ${({theme:e})=>e.colors.secondary};
|
|
245
|
+
color: ${({theme:e})=>e.colors.primary};
|
|
246
|
+
&:hover {
|
|
247
|
+
background: ${({theme:e})=>e.colors.secondary+Pi.opacity.hex["080"]};
|
|
248
|
+
}
|
|
249
|
+
&:active {
|
|
250
|
+
background: ${({theme:e})=>e.text.secondary+Pi.opacity.hex["060"]};
|
|
251
|
+
}
|
|
252
|
+
`,secondary:Bt`
|
|
253
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
254
|
+
background: ${({theme:e})=>e.colors.primary};
|
|
255
|
+
color: ${({theme:e})=>e.colors.secondary};
|
|
256
|
+
&:hover {
|
|
257
|
+
border: 1px solid ${({theme:e})=>e.text.darker_grey};
|
|
258
|
+
background: ${({theme:e})=>e.colors.secondary+Pi.opacity.hex["010"]};
|
|
259
|
+
}
|
|
260
|
+
&:active {
|
|
261
|
+
border: 1px solid ${({theme:e})=>e.text.dark_grey};
|
|
262
|
+
background: ${({theme:e})=>e.colors.secondary+Pi.opacity.hex["015"]};
|
|
263
|
+
}
|
|
264
|
+
`,tertiary:Bt`
|
|
265
|
+
border-color: transparent;
|
|
266
|
+
background: transparent;
|
|
267
|
+
&:hover {
|
|
268
|
+
background: ${({theme:e})=>e.colors.dropdown_bg_2+Pi.opacity.hex["040"]};
|
|
269
|
+
}
|
|
270
|
+
&:active {
|
|
271
|
+
background: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
272
|
+
}
|
|
273
|
+
`,danger:Bt`
|
|
274
|
+
border-color: transparent;
|
|
275
|
+
background: ${({theme:e})=>e.text.error};
|
|
276
|
+
&:hover {
|
|
277
|
+
background: ${({theme:e})=>e.text.error+Pi.opacity.hex["090"]};
|
|
278
|
+
}
|
|
279
|
+
&:active {
|
|
280
|
+
background: ${({theme:e})=>e.text.error+Pi.opacity.hex["080"]};
|
|
281
|
+
}
|
|
282
|
+
`,warning:Bt`
|
|
283
|
+
border-color: transparent;
|
|
284
|
+
background: ${({theme:e})=>e.text.warning};
|
|
285
|
+
&:hover {
|
|
286
|
+
background: ${({theme:e})=>e.text.warning+Pi.opacity.hex["090"]};
|
|
287
|
+
}
|
|
288
|
+
&:active {
|
|
289
|
+
background: ${({theme:e})=>e.text.warning+Pi.opacity.hex["080"]};
|
|
290
|
+
}
|
|
291
|
+
`},mr=_t.button`
|
|
292
|
+
height: 36px;
|
|
293
|
+
border-radius: 32px;
|
|
294
|
+
cursor: pointer;
|
|
295
|
+
display: flex;
|
|
296
|
+
align-items: center;
|
|
297
|
+
justify-content: center;
|
|
298
|
+
gap: 8px;
|
|
299
|
+
padding: 0 12px;
|
|
300
|
+
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
301
|
+
text-transform: uppercase;
|
|
302
|
+
text-decoration: underline;
|
|
303
|
+
font-weight: 600;
|
|
304
|
+
outline: none;
|
|
305
|
+
${({$variant:e})=>e&&hr[e]}
|
|
306
|
+
${({disabled:e,$variant:t})=>e&&Bt`
|
|
307
|
+
opacity: 0.5;
|
|
308
|
+
cursor: not-allowed;
|
|
309
|
+
|
|
310
|
+
${"primary"===t?Bt`
|
|
311
|
+
color: ${({theme:e})=>e.colors.secondary};
|
|
312
|
+
background: ${({theme:e})=>e.text.secondary+Pi.opacity.hex["010"]};
|
|
313
|
+
&:hover {
|
|
314
|
+
background: ${({theme:e})=>e.text.secondary+Pi.opacity.hex["015"]};
|
|
315
|
+
}
|
|
316
|
+
`:""}
|
|
317
|
+
`}
|
|
318
|
+
`,gr=({children:e,variant:t="primary",onClick:o,...n})=>{const i=vt(null);return xt.createElement(ur,{$variant:t},xt.createElement(mr,{ref:i,$variant:t,onClick:e=>{o&&o(e),i.current?.blur()},...n},e))},$r=e=>{function t(){return void 0===e?{}:eo(e)}const[o,n]=wt(t()),[i,r]=wt({}),a=(e,t)=>Object.entries(e).every(([e,o])=>Array.isArray(o)?o.length===t[e].length&&o.every((o,n)=>a(o,t[e][n])):"object"==typeof o&&null!==o?a(o,t[e]):o===t[e]),s=yt(()=>void 0!==e&&!a(e,o),[e,o]);return kt(()=>{void 0!==e&&"{}"===JSON.stringify(o)&&n(t())},[e,o]),{formData:o,formErrors:i,areFormValuesEqual:a,isFormDirty:s,handleFormChange:(e,t,o)=>{if(e){const o=e.toString().split(".");1===o.length?n(o=>({...o,[e]:t})):n(e=>{const n=eo(e);let i=n;for(let e=0;e<o.length-1;e++){const t=o[e];i[t]&&"object"==typeof i[t]||(i[t]={}),i=i[t]}return i[o[o.length-1]]=t,n})}else o&&n({...o})},handleErrorChange:(e,t,o)=>{e?r(o=>({...o,[e]:t})):o&&r({...o})},resetFormData:e=>{n(e||t()),r({})}}},fr={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}},xr=()=>{const{addNotification:e}=wi(),{formData:t,formErrors:o,handleFormChange:n,handleErrorChange:i,resetFormData:r}=$r(fr);return{formData:t,formErrors:o,handleFormChange:n,resetFormData:r,validateForm:o=>{const n={};let r=!0;return Object.entries(t).forEach(([e,t])=>{switch(e){case"type":case"signals":Nn(t)&&(n[e]=Xo.FIELD_IS_REQUIRED)}}),r=!Object.values(n).length,!r&&o?.withAlert&&e({type:Co.Warning,title:o.alertTitle,message:Xo.REQUIRED_FIELDS,hideFromHistory:!0}),i(void 0,void 0,n),r},loadFormWithDrawerItem:({type:e,signals:t,fields:o})=>{const i={...eo(fr),type:e,signals:t};Object.entries(o).forEach(([e,t])=>{if(t)switch(e){case"actionName":i.name=t;break;case"type":case"notes":case"disabled":i[e]=t;break;case ao.CollectContainerAttributes:case ao.CollectReplicaSetAttributes:case ao.CollectWorkloadId:case ao.CollectClusterId:case ao.LabelsAttributes:case ao.AnnotationsAttributes:case ao.ClusterAttributes:case ao.OverwriteExistingValues:case ao.AttributeNamesToDelete:case ao.Renames:case ao.PiiCategories:case ao.FallbackSamplingRatio:case ao.SamplingPercentage:case ao.EndpointsFilters:case ao.ServicesNameFilters:case ao.AttributeFilters:i.fields||(i.fields={}),i.fields[e]=t}}),n(void 0,void 0,i)}}},br=e=>{kt(()=>{if(e){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])},yr=()=>{const{setCurrentModal:e}=yi(),{setDrawerType:t,setDrawerEntityId:o}=$i(),{setActiveNodeType:n,setActiveNodeId:i,activeNodeId:r}=ii();return{onClickNode:(a,s)=>{const{id:l,type:c,data:{id:d,type:p}}=s;switch(r===l?(n(null),i(null)):(n(c),i(l)),p){case yo.Source:case yo.Destination:case yo.Action:case yo.InstrumentationRule:t(p),o(d);break;case Fo.AddSource:e(yo.Source);break;case Fo.AddDestination:e(yo.Destination);break;case Fo.AddAction:e(yo.Action);break;case Fo.AddRule:e(yo.InstrumentationRule)}}}},wr=()=>{const{setDrawerType:e,setDrawerEntityId:t}=$i(),{markAsDismissed:o,markAsSeen:n}=wi();return{onClickNotification:(i,r)=>{const{id:a,crdType:s,target:l}=i,{dismissToast:c}=r||{};if(s&&l)switch(s){case yo.InstrumentationRule:e(yo.InstrumentationRule),t(gn(l,yo.InstrumentationRule));break;case yo.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(yo.Source),t(gn(l,yo.Source));break;case yo.Action:e(yo.Action),t(gn(l,yo.Action));break;case yo.Destination:case"Destination":e(yo.Destination),t(gn(l,yo.Destination))}n(a),c&&o(a)}}},kr=Ct({tier:void 0,version:void 0,isVersionSupported:!1,platformType:void 0}),vr=({children:e,tier:t,version:o,platformType:n})=>{const i=yt(()=>({tier:t,version:o,platformType:n}),[t,o,n]);return xt.createElement(kr.Provider,{value:i},e)},Cr=e=>{const t=Et(kr),o=!e||t.version&&Xn(t.version)>=Xn(e);return{...t,isVersionSupported:o}},Er=()=>{const{platformType:e}=Cr();return{isVm:e===$o.Vm}},Sr=()=>{const e=vt(null),[t,o]=wt(0),[n,i]=wt(0);return kt(()=>{const t=()=>{if(e.current){const{width:t,height:n}=e.current.getBoundingClientRect();o(t),i(n)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:n}};var Ar;!function(e){e[e.XS=16]="XS",e[e.S=18]="S",e[e.M=24]="M",e[e.L=32]="L"}(Ar||(Ar={}));const Dr=_t.div`
|
|
319
|
+
width: ${({$size:e})=>1.5*e}px;
|
|
320
|
+
height: ${({$size:e})=>1.5*e}px;
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
justify-content: center;
|
|
324
|
+
border-radius: 100%;
|
|
325
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
326
|
+
&:hover {
|
|
327
|
+
background: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
328
|
+
}
|
|
329
|
+
`,Tr=({icon:e,size:t=Ar.S,onClick:o,disabled:n})=>xt.createElement(Dr,{$size:t,$disabled:n,onClick:e=>{o&&!n&&(e.stopPropagation(),o(e))}},xt.createElement(e,{size:t})),zr=({onDone:e}={})=>{const[t,o]=wt(!1),[n,i]=wt(-1),r=St(async(n,r)=>{if(!t){if(o(!0),void 0!==r&&i(r),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(n)}catch(e){}else{const e=document.createElement("textarea");e.value=n,document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(e)}e?.(),setTimeout(()=>{o(!1),i(-1)},1e3)}},[t,e]);return{CopyButton:St(({value:e,size:o})=>{const n=t?Ge:Ke;return xt.createElement(Tr,{icon:n,size:o,onClick:()=>r(e)})},[t]),isCopied:t,copiedIndex:n,clickCopy:r}},Fr=e=>{const{addNotification:t}=wi(),{formData:o,handleFormChange:n,formErrors:i,handleErrorChange:r,resetFormData:a}=$r(e);return{formData:o,formErrors:i,handleFormChange:n,resetFormData:a,validateForm:e=>{const n={};let i=!0;return o.name?In(o.name)?n.name=void 0:(i=!1,n.name=Xo.ILLEGAL_K8S_LABEL):(i=!1,n.name=Xo.FIELD_IS_REQUIRED),!i&&e?.withAlert&&t({type:Co.Warning,title:e.alertTitle,message:Xo.REQUIRED_FIELDS,hideFromHistory:!0}),r(void 0,void 0,n),i},loadFormWithDrawerItem:({name:t})=>{const o={...eo(e),name:t};n(void 0,void 0,o)}}},Or={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},Nr=e=>{const{supportedSignals:t,preLoadedFields:o}=e||{},{addNotification:n}=wi(),{formData:i,formErrors:r,handleFormChange:a,handleErrorChange:s,resetFormData:l}=$r(Or),[c,d]=wt([]),[p,u]=wt([]);return kt(()=>{var e;u(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:o,componentProperties:n,displayName:i,initialValue:r,renderCondition:a}=e;if(o===ko.Dropdown){const e=zn(n,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,value:e})):Object.entries(e.values).map(([e,t])=>({id:e,value:t}));return{name:t,componentType:o,title:i,value:r,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:o,title:i,value:r,renderCondition:a,...zn(n,{})}})).map(e=>{if(o){const t="string"==typeof o?zn(o,{}):o;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,o]),kt(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[p]),kt(()=>{if(t&&0===Wn(i.exportedSignals).length){const{logs:e,metrics:o,traces:n}=t;a("exportedSignals",{logs:e.supported,metrics:o.supported,traces:n.supported})}},[t,i.exportedSignals]),{formData:i,formErrors:r,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let o=!0;return p.forEach(({name:e,value:n,required:i})=>{i&&!n&&(o=!1,t[e]=Xo.FIELD_IS_REQUIRED)}),!o&&e?.withAlert&&n({type:Co.Warning,title:e.alertTitle,message:Xo.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),o},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:o,exportedSignals:n,fields:i})=>{const r={...eo(Or),type:e,name:t,disabled:o,exportedSignals:n,fields:Object.entries(zn(i,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,r),r},yamlFields:c,setYamlFields:d,dynamicFields:p,setDynamicFields:u}},Ir=({items:e,rowHeight:t})=>{const o=vt(null),n=Nt({enabled:e.length>0,horizontal:!1,count:e.length,getScrollElement:()=>o.current,estimateSize:()=>t,overscan:Math.ceil(.05*e.length)});return{overflowRef:o,listHeight:n.getTotalSize(),listItems:n.getVirtualItems()}},_r={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[Po.HttpRequest]:null,[Po.HttpResponse]:null,[Po.DbQuery]:null,[Po.Messaging]:null},codeAttributes:{[Ro.Column]:null,[Ro.FilePath]:null,[Ro.Function]:null,[Ro.LineNumber]:null,[Ro.Namespace]:null,[Ro.StackTrace]:null},headersCollection:null,customInstrumentations:{[Mo.Java]:null,[Mo.Golang]:null}},Br=()=>{const{formData:e,formErrors:t,handleFormChange:o,handleErrorChange:n,resetFormData:i}=$r(_r);return{formData:e,formErrors:t,handleFormChange:o,resetFormData:i,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:n,payloadCollection:i,codeAttributes:r,headersCollection:a,customInstrumentations:s})=>{const l={...eo(_r),ruleName:e,notes:t,disabled:n};i&&(l.payloadCollection={[Po.HttpRequest]:i[Po.HttpRequest]?{}:null,[Po.HttpResponse]:i[Po.HttpResponse]?{}:null,[Po.DbQuery]:i[Po.DbQuery]?{}:null,[Po.Messaging]:i[Po.Messaging]?{}:null}),r&&(l.codeAttributes={[Ro.Column]:r[Ro.Column]||null,[Ro.FilePath]:r[Ro.FilePath]||null,[Ro.Function]:r[Ro.Function]||null,[Ro.LineNumber]:r[Ro.LineNumber]||null,[Ro.Namespace]:r[Ro.Namespace]||null,[Ro.StackTrace]:r[Ro.StackTrace]||null}),a&&(l.headersCollection=a),s&&(l.customInstrumentations={[Mo.Java]:s[Mo.Java]||null,[Mo.Golang]:s[Mo.Golang]||null}),o(void 0,void 0,l)}}},Rr=({active:e,key:t,withAltKey:o,withCtrlKey:n,withShiftKey:i,withMetaKey:r},a)=>(kt(()=>{const s=s=>{e&&t===s.key&&(!o||o&&s.altKey)&&(!n||n&&s.ctrlKey)&&(!i||i&&s.shiftKey)&&(!r||r&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),a(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,o,n,i,r,a]),null),Lr=(e,t)=>{kt(()=>{const o=o=>{e.current&&!e.current.contains(o.target)&&t()};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e,t])},Mr=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:o}={})=>{const n=vt(null),[i,r]=wt(!1),[a,s]=wt({top:0,left:0});return Lr(n,()=>{i&&(r(!1),o?.())}),{popupRef:n,popupOpen:i,setPopupOpen:r,popupPosition:a,handlePosition:(o,i)=>{const{innerWidth:r,innerHeight:a}=window;let l=i,c=o;l>=a/2&&(l+=-(n.current?.clientHeight||e)),c>=r/2&&(c+=-(n.current?.clientWidth||t)),s({top:l,left:c})}}},Pr=()=>({getItemSS:(e,t)=>{const o=sessionStorage.getItem(e);return o?zn(o,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),jr={otelServiceName:"",currentStreamName:""},Ur=()=>{const{formData:e,formErrors:t,handleFormChange:o,handleErrorChange:n,resetFormData:i}=$r(jr);return{formData:e,formErrors:t,handleFormChange:o,resetFormData:i,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const n={...eo(jr),otelServiceName:e||t||""};o(void 0,void 0,n)}}},Wr=(e,t,o)=>{const n="boolean"==typeof o,i=!!e.dataStreamNames?.length||!!e.currentStreamName?.length,r=i&&e.dataStreamNames?.includes(t)||e.currentStreamName===t,a=(n?o:e.selected&&(!i||r))||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:a,numberOfInstances:e.numberOfInstances}},Vr=(e,t,o)=>({...Wr(e,t,o),currentStreamName:t}),Hr=(e,t,o)=>{const n="boolean"==typeof o,i=e.dataStreamNames?.includes(t),r=(n?o:e.selected)||!1;return{namespace:e.name,selected:!(!i&&!n)&&r,currentStreamName:t}},qr=e=>{const{fetchSingleNamespace:t}=e||{},{namespaces:o}=fi(),{selectedStreamName:n}=gi(),i=vt(!1),{configuredSources:r,configuredFutureApps:a,availableSources:s,setAvailableSources:l,setFetchedAllNamespaces:c}=Ti(),[d,p]=wt(s),[u,h]=wt(""),[m,g]=wt(!1),[$,f]=wt([]),[x,b]=wt(""),[y,w]=wt(a),[k,v]=wt(((e,t,o)=>{const n={};return Object.entries(e).forEach(([e,t])=>{n[e]=t.map(e=>Vr(e,o))}),Object.entries(t).forEach(([e,t])=>{t.forEach(t=>{const i=n[e].findIndex(e=>e.name===t.name&&e.kind===t.kind),r=Vr(t,o);-1!==i?n[e][i]=r:n[e].push(r)})}),n})(s,r,n)),C=async(e,o)=>{if(t){if(h(e.name),$.includes(e.name))v(t=>({...t,[e.name]:t[e.name].map(e=>({...e,selected:"boolean"==typeof o?o:e.selected,currentStreamName:n}))}));else{const{data:i}=await t({namespaceName:e.name}),{name:r,sources:a=[]}=i?.computePlatform?.k8sActualNamespace||{};if(!r)return;const s=a.map(e=>Wr(e,n));f(e=>[...e,r]),l({...Ti.getState().availableSources,[r]:s}),p(e=>({...e,[r]:s})),v(e=>({...e,[r]:"boolean"!=typeof o&&e[r]?.length?e[r]:a.map(e=>Vr(e,n,o))}))}h("")}};kt(()=>(i.current=!0,o?.length&&!Ti.getState().fetchedAllNamespaces&&(p(e=>{const t={...e};return o.forEach(({name:e})=>t[e]=t[e]||[]),t}),v(e=>{const t={...e};return o.forEach(({name:e})=>t[e]=t[e]||[]),t}),w(e=>{const t={...e};return o.forEach(e=>t[e.name]=t[e.name]||Hr(e,n)),t}),(async()=>{for await(const e of o)i.current&&await C(e)})(),i.current&&c(!0)),()=>{i.current=!1}),[o,n]);const[E,S]=wt(""),[A,D]=wt(yo.Source),[T,z]=wt(!1),[F,O]=wt(!1),N=yt(()=>{const e=(e,t)=>!E||A!==t||A===t&&e.toLowerCase().includes(E),t={};return Object.entries(k).filter(([t])=>e(t,yo.Namespace)).forEach(([o,n])=>{const i=n.filter(t=>e(t.name,yo.Source)&&(!T||t.selected)&&(e=>!F||(e.numberOfInstances||0)>0)(t));(!E||E&&(A===yo.Namespace||A===yo.Source&&i.length))&&(t[o]=i)}),t},[k,E,A,T,F]);return{fetchingNamespace:u,fetchedNamespaces:$,availableSources:d,filteredNamespacesAndSources:N,getApiSourcesPayload:()=>{const e={};return Object.entries(k).forEach(([t,o])=>{o.forEach(o=>{const n=d[t]?.find(e=>e.name===o.name&&e.kind===o.kind);n?.selected!==o.selected&&(e[t]||(e[t]=[]),e[t].push(o))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries(y).forEach(([t,i])=>{const r=o?.find(e=>e.name===t);(i.selected&&!r?.dataStreamNames?.includes(n)||!i.selected&&r?.dataStreamNames?.includes(n))&&(e[t]=i)}),e},selectedNamespace:x,onSelectNamespace:(e,t)=>{const n=o.find(t=>t.name===e);if(n){const o="boolean"==typeof t;b(t=>t!==e||o?e:""),C(n,t),o&&g(!1)}},selectedAllNamespaces:m,onSelectAllNamespaces:e=>{g(e),o.forEach(t=>C(t,e))},selectedSources:k,onSelectSource:(e,t)=>{const o=t||x;if(!o)return;const i=[...k[o]||[]],r=i.findIndex(({name:t,kind:o})=>t===e.name&&o===e.kind);if(-1!==r){const e={...i[r],selected:!i[r].selected,currentStreamName:n};i[r]=e}else i.push({...e,selected:!0,currentStreamName:n});v(e=>({...e,[o]:i})),g(!1)},selectedFutureApps:y,onSelectFutureApps:(e,t)=>{const i=t||x;if(!i)return;const r=o.find(e=>e.name===t);r&&w(t=>({...t,[i]:Hr(r,n,e)}))},searchText:E,setSearchText:S,searchBy:A,setSearchBy:D,showSelectedOnly:T,setShowSelectedOnly:z,showRunningOnly:F,setShowRunningOnly:O}};try{Tt.addDefaultLocale(It)}catch(e){}const Gr=()=>{const e=vt(new Tt(It.locale));return{formatTimeAgo:St(t=>{try{return"string"==typeof t&&(t=t.replace("t","T").replace("z","Z")),e.current.format(new Date(t))}catch(e){return"-"}},[])}},Kr=_t.div`
|
|
330
|
+
flex: 1;
|
|
331
|
+
align-self: stretch;
|
|
332
|
+
display: flex;
|
|
333
|
+
flex-direction: column;
|
|
334
|
+
gap: 24px;
|
|
335
|
+
padding: 24px 24px 0 24px;
|
|
336
|
+
overflow-x: scroll;
|
|
337
|
+
`,Yr=_t.div`
|
|
338
|
+
position: relative;
|
|
339
|
+
|
|
340
|
+
// inherit all the properties of the parent (PageContent)
|
|
341
|
+
flex: inherit;
|
|
342
|
+
align-self: inherit;
|
|
343
|
+
display: inherit;
|
|
344
|
+
flex-direction: inherit;
|
|
345
|
+
gap: inherit;
|
|
346
|
+
overflow-x: inherit;
|
|
347
|
+
`,Jr=_t.div`
|
|
348
|
+
display: flex;
|
|
349
|
+
flex-direction: row;
|
|
350
|
+
flex-wrap: ${({$wrap:e="unset"})=>e};
|
|
351
|
+
align-items: ${({$alignItems:e="center"})=>e};
|
|
352
|
+
justify-content: ${({$justifyContent:e="unset"})=>e};
|
|
353
|
+
gap: ${({$gap:e=2})=>e}px;
|
|
354
|
+
width: ${({$width:e})=>e||"unset"};
|
|
355
|
+
padding: ${({$padding:e="unset"})=>e};
|
|
356
|
+
`,Xr=_t.div`
|
|
357
|
+
display: flex;
|
|
358
|
+
flex-direction: column;
|
|
359
|
+
flex-wrap: ${({$wrap:e="unset"})=>e};
|
|
360
|
+
align-items: ${({$alignItems:e="unset"})=>e};
|
|
361
|
+
justify-content: ${({$justifyContent:e="unset"})=>e};
|
|
362
|
+
gap: ${({$gap:e=2})=>e}px;
|
|
363
|
+
width: ${({$width:e})=>e||"unset"};
|
|
364
|
+
padding: ${({$padding:e="unset"})=>e};
|
|
365
|
+
`,Zr=_t(Xr)`
|
|
366
|
+
width: ${({$width:e})=>e||"100%"};
|
|
367
|
+
height: ${({$height:e})=>e||"unset"};
|
|
368
|
+
align-items: center;
|
|
369
|
+
justify-content: center;
|
|
370
|
+
`,Qr=_t.div`
|
|
371
|
+
display: flex;
|
|
372
|
+
flex-direction: column;
|
|
373
|
+
padding: 12px;
|
|
374
|
+
overflow-y: scroll;
|
|
375
|
+
`,ea=_t.div`
|
|
376
|
+
position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
|
|
377
|
+
top: 0;
|
|
378
|
+
left: 0;
|
|
379
|
+
right: 0;
|
|
380
|
+
bottom: 0;
|
|
381
|
+
z-index: 1000;
|
|
382
|
+
background: rgba(0, 0, 0, 0.6);
|
|
383
|
+
backdrop-filter: blur(2px);
|
|
384
|
+
`,ta=_t.div`
|
|
385
|
+
width: 800px;
|
|
386
|
+
min-height: ${({$minHeight:e})=>e||"unset"};
|
|
387
|
+
height: ${({$isNotModal:e})=>e?"fit-content":"calc(100vh - 350px)"};
|
|
388
|
+
margin: ${({$isNotModal:e})=>e?"64px 0 0 0":"64px 7vw 32px 7vw"};
|
|
389
|
+
padding: 0 2px;
|
|
390
|
+
overflow-y: scroll;
|
|
391
|
+
`,oa=_t(Xr)`
|
|
392
|
+
max-width: ${({$maxWidth:e})=>e||"unset"};
|
|
393
|
+
width: 100%;
|
|
394
|
+
`,na=_t(Jr)`
|
|
395
|
+
gap: 16px;
|
|
396
|
+
padding: 16px;
|
|
397
|
+
`,ia=_t.div`
|
|
398
|
+
width: 100%;
|
|
399
|
+
max-height: ${({$maxHeight:e})=>e||"unset"};
|
|
400
|
+
overflow-y: auto;
|
|
401
|
+
`,ra=_t.div`
|
|
402
|
+
position: fixed;
|
|
403
|
+
top: 50%;
|
|
404
|
+
left: 50%;
|
|
405
|
+
transform: translate(-50%, -50%);
|
|
406
|
+
z-index: 1000;
|
|
407
|
+
width: fit-content;
|
|
408
|
+
background: ${({theme:e})=>e.colors.translucent_bg};
|
|
409
|
+
border: ${({theme:e})=>`1px solid ${e.colors.border}`};
|
|
410
|
+
border-radius: 40px;
|
|
411
|
+
box-shadow: ${({theme:e})=>{const t=e.colors.primary+Pi.opacity.hex["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}`}};
|
|
412
|
+
animation-name: ${Pi.animations.slide.in.center};
|
|
413
|
+
`,aa=_t.div`
|
|
414
|
+
display: flex;
|
|
415
|
+
justify-content: space-between;
|
|
416
|
+
align-items: center;
|
|
417
|
+
height: 80px;
|
|
418
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
419
|
+
padding: 0 24px;
|
|
420
|
+
`,sa=_t.div`
|
|
421
|
+
cursor: pointer;
|
|
422
|
+
display: flex;
|
|
423
|
+
align-items: center;
|
|
424
|
+
gap: 8px;
|
|
425
|
+
`,la=_t.div`
|
|
426
|
+
display: flex;
|
|
427
|
+
align-items: center;
|
|
428
|
+
gap: 8px;
|
|
429
|
+
`,ca=_t(Zr)`
|
|
430
|
+
min-width: 350px;
|
|
431
|
+
min-height: 150px;
|
|
432
|
+
`,da=_t.div`
|
|
433
|
+
position: absolute;
|
|
434
|
+
left: 50%;
|
|
435
|
+
transform: translateX(-50%);
|
|
436
|
+
display: flex;
|
|
437
|
+
align-items: center;
|
|
438
|
+
justify-content: center;
|
|
439
|
+
width: 100%;
|
|
440
|
+
pointer-events: none;
|
|
441
|
+
`,pa=_t(Hi)`
|
|
442
|
+
text-transform: uppercase;
|
|
443
|
+
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
444
|
+
pointer-events: auto;
|
|
445
|
+
`,ua=_t(Hi)`
|
|
446
|
+
text-transform: uppercase;
|
|
447
|
+
font-weight: 500;
|
|
448
|
+
font-size: 14px;
|
|
449
|
+
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
450
|
+
text-decoration: underline;
|
|
451
|
+
cursor: pointer;
|
|
452
|
+
`,ha=({isOpen:e,noOverlay:t,header:o,actionComponent:n,onClose:i,children:r,closeOnEscape:a=!0})=>(Rr({key:"Escape",active:e&&a},()=>i()),br(e),e?Vt.createPortal(xt.createElement(xt.Fragment,null,xt.createElement(ea,{hidden:!e,onClick:i,style:{opacity:t?0:1}}),xt.createElement(ra,{"data-id":"modal"+(o?`-${o.title.replaceAll(" ","-")}`:"")},o&&xt.createElement(aa,null,xt.createElement(sa,{onClick:i},xt.createElement(Ye,null),xt.createElement(ua,null,"Cancel")),xt.createElement(da,null,xt.createElement(pa,null,o.title)),xt.createElement(la,null,n)),xt.createElement(ca,null,r))),document.body):null),ma=_t.div`
|
|
453
|
+
width: ${({$orientation:e,$thickness:t,$length:o})=>"vertical"===e?`${t}px`:o||"100%"};
|
|
454
|
+
height: ${({$orientation:e,$thickness:t,$length:o})=>"horizontal"===e?`${t}px`:o||"100%"};
|
|
455
|
+
margin: ${({$orientation:e,$margin:t})=>t||("horizontal"===e?"8px 0":"0 8px")};
|
|
456
|
+
background-color: ${({$type:e,theme:t})=>(e?t.text[e]:t.colors.border)+Pi.opacity.hex["050"]};
|
|
457
|
+
opacity: ${({$opacity:e})=>e||1};
|
|
458
|
+
`,ga=({orientation:e="horizontal",type:t,thickness:o=1,length:n,margin:i,opacity:r})=>xt.createElement(ma,{$orientation:e,$type:t,$thickness:o,$length:n,$margin:i,$opacity:r}),$a=_t.div`
|
|
459
|
+
position: absolute;
|
|
460
|
+
${({$top:e})=>void 0!==e&&`top: ${e}px;`}
|
|
461
|
+
${({$bottom:e})=>void 0!==e&&`bottom: ${e}px;`}
|
|
462
|
+
${({$left:e})=>void 0!==e&&`left: ${e}px;`}
|
|
463
|
+
${({$right:e})=>void 0!==e&&`right: ${e}px;`}
|
|
464
|
+
z-index: 9999;
|
|
465
|
+
|
|
466
|
+
background-color: ${({theme:e})=>e.colors.info};
|
|
467
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
468
|
+
border-radius: ${({$borderRadius:e})=>void 0!==e?e:"24px"};
|
|
469
|
+
max-width: ${({$maxWidth:e})=>void 0!==e?e:"unset"};
|
|
470
|
+
width: ${({$width:e})=>void 0!==e?e:"unset"};
|
|
471
|
+
|
|
472
|
+
${({$asPortal:e,$withPointerEvents:t})=>e&&!t&&"pointer-events: none;"}
|
|
473
|
+
`,fa=_t.div`
|
|
474
|
+
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
475
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
476
|
+
`,xa=_t.div`
|
|
477
|
+
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
478
|
+
`,ba=_t.div`
|
|
479
|
+
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
480
|
+
border-top: 1px solid ${({theme:e})=>e.colors.border};
|
|
481
|
+
`,ya=At(({isOpen:e,asPortal:t,...o},n)=>{const i=yt(()=>{const{children:e,top:i,bottom:r,left:a,right:s,borderRadius:l,padding:c,maxWidth:d,width:p,header:u,footer:h,withPointerEvents:m,...g}=o;return xt.createElement($a,{ref:n,$top:i,$bottom:r,$left:a,$right:s,$borderRadius:l,$padding:c,$maxWidth:d,$width:p,$asPortal:t,$withPointerEvents:m,...g},u&&xt.createElement(fa,{$padding:c},u),xt.createElement(xa,{$padding:c},e),h&&xt.createElement(ba,{$padding:c},h))},[n,o,t]);return e?t?Vt.createPortal(i,document.body):i:null});ya.displayName=ya.name;const wa=_t.div`
|
|
482
|
+
position: relative;
|
|
483
|
+
display: flex;
|
|
484
|
+
align-items: center;
|
|
485
|
+
gap: 4px;
|
|
486
|
+
// cursor: help;
|
|
487
|
+
`,ka=_t(Hi)`
|
|
488
|
+
word-break: break-word;
|
|
489
|
+
white-space: pre-wrap;
|
|
490
|
+
`,va=({withIcon:e,titleIcon:t,title:o,text:n,timestamp:i,children:r})=>{const a=Pi.useTheme(),{popupRef:s,popupOpen:l,setPopupOpen:c,popupPosition:d,handlePosition:p}=Mr({defaultClientHeight:40,defaultClientwidth:Math.min(7.5*(n?.length||0),300)}),u=yt(()=>!!Ui(n||"")?.length,[n]),h=e=>{const{type:t,clientX:o,clientY:n}=e;u?p(d.left||o,d.top||n):p(o,n),c("mouseleave"!==t)};return n?xt.createElement(wa,{onMouseEnter:h,onMouseMove:h,onMouseLeave:h},r,e&&xt.createElement(qe,{fill:a.v2.colors.silver[200]}),xt.createElement(ya,{ref:s,isOpen:l,top:d.top,left:d.left,asPortal:!0,withPointerEvents:u,onMouseEnter:u?h:void 0,maxWidth:"270px",borderRadius:"16px",padding:"8px 12px"},(!!t||!!o)&&xt.createElement(Jr,{style:{marginBottom:"4px"},$gap:4},t&&xt.createElement(t,{key:"icon",size:12,fill:a.text.secondary}),o&&xt.createElement(Hi,{key:"title",size:12,color:a.text.secondary},o)),xt.createElement(ka,{size:12,color:a.text.info},n),!!i&&xt.createElement(Hi,{size:10,color:a.text.darker_grey,family:"secondary",style:{marginTop:"8px"}},new Date(i).toLocaleString()))):xt.createElement(xt.Fragment,null,r)},Ca=_t.button`
|
|
491
|
+
position: relative;
|
|
492
|
+
width: ${({$size:e})=>e}px;
|
|
493
|
+
height: ${({$size:e})=>e}px;
|
|
494
|
+
border: ${({theme:e,$withBorder:t})=>t?`1px solid ${e.colors.border}`:"none"};
|
|
495
|
+
border-radius: 100%;
|
|
496
|
+
background-color: ${({$backgroundColor:e})=>e||"transparent"};
|
|
497
|
+
display: flex;
|
|
498
|
+
align-items: center;
|
|
499
|
+
justify-content: center;
|
|
500
|
+
cursor: pointer;
|
|
501
|
+
&:hover {
|
|
502
|
+
background-color: ${({theme:e,$backgroundColor:t})=>t?t+Pi.opacity.hex["070"]:e.colors.dropdown_bg_2};
|
|
503
|
+
}
|
|
504
|
+
`,Ea=_t.div`
|
|
505
|
+
position: absolute;
|
|
506
|
+
top: ${({$size:e})=>e/5}px;
|
|
507
|
+
right: ${({$size:e})=>e/5}px;
|
|
508
|
+
width: 6px;
|
|
509
|
+
height: 6px;
|
|
510
|
+
border-radius: 100%;
|
|
511
|
+
background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
|
|
512
|
+
|
|
513
|
+
&::after {
|
|
514
|
+
content: '';
|
|
515
|
+
position: absolute;
|
|
516
|
+
inset: 0;
|
|
517
|
+
border-radius: 100%;
|
|
518
|
+
background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
|
|
519
|
+
animation: ${Pi.animations.ping} 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
|
|
520
|
+
}
|
|
521
|
+
`,Sa=({children:e,onClick:t,tooltip:o,size:n=36,withPing:i,pingColor:r,withBorder:a,backgroundColor:s,...l})=>xt.createElement(va,{text:o},xt.createElement(Ca,{$size:n,$withBorder:a,$backgroundColor:s,onClick:t,...l},i&&xt.createElement(Ea,{$size:n,$color:r}),e)),Aa=_t.div`
|
|
522
|
+
position: relative;
|
|
523
|
+
&.animated {
|
|
524
|
+
overflow: hidden;
|
|
525
|
+
padding-bottom: 1px;
|
|
526
|
+
border-radius: 32px;
|
|
527
|
+
animation: ${({$isLeaving:e})=>e?Pi.animations.slide.out.bottom:Pi.animations.slide.in.bottom} ${({$duration:e})=>e/10}ms forwards;
|
|
528
|
+
}
|
|
529
|
+
`,Da=_t.div`
|
|
530
|
+
position: absolute;
|
|
531
|
+
bottom: -1px;
|
|
532
|
+
left: 0;
|
|
533
|
+
z-index: -1;
|
|
534
|
+
width: 100%;
|
|
535
|
+
height: 100%;
|
|
536
|
+
border-radius: 32px;
|
|
537
|
+
background-color: ${({$type:e,theme:t})=>t.text[e]};
|
|
538
|
+
animation: ${Pi.animations.progress.out} ${({$duration:e})=>""+(e-e/10)}ms forwards;
|
|
539
|
+
`,Ta=_t.div`
|
|
540
|
+
display: flex;
|
|
541
|
+
align-items: center;
|
|
542
|
+
flex: 1;
|
|
543
|
+
gap: 8px;
|
|
544
|
+
padding: 0 12px;
|
|
545
|
+
border-radius: 32px;
|
|
546
|
+
background-color: ${({$type:e,theme:t})=>t.colors[e]};
|
|
547
|
+
`,za=_t.div`
|
|
548
|
+
display: flex;
|
|
549
|
+
align-items: center;
|
|
550
|
+
margin: 0 auto 0 0;
|
|
551
|
+
padding: 8px 0;
|
|
552
|
+
max-width: ${({$withAction:e,$overrideMaxWidth:t})=>t||(e?"400px":"500px")};
|
|
553
|
+
min-height: 12px;
|
|
554
|
+
`,Fa=_t(Hi)`
|
|
555
|
+
font-size: 14px;
|
|
556
|
+
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
557
|
+
`,Oa=_t(Hi)`
|
|
558
|
+
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
559
|
+
font-size: 12px;
|
|
560
|
+
`,Na=_t(Jr)``,Ia=_t(Hi)`
|
|
561
|
+
text-transform: uppercase;
|
|
562
|
+
text-decoration: underline;
|
|
563
|
+
font-size: 12px;
|
|
564
|
+
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
565
|
+
white-space: nowrap;
|
|
566
|
+
cursor: pointer;
|
|
567
|
+
&:hover {
|
|
568
|
+
transform: scale(1.1);
|
|
569
|
+
transition: transform 0.3s;
|
|
570
|
+
}
|
|
571
|
+
`,_a=({type:e,icon:t,title:o,message:n,action:i,onClose:r,duration:a=5e3,overrideMaxWidth:s,style:l})=>{const c=Pi.useTheme(),[d,p]=wt(!1),u=vt(null),h=vt(null),m=e=>{r&&(p(!0),r({asSeen:e?.asSeen}))};kt(()=>(u.current=setTimeout(()=>m({asSeen:!1}),a),()=>{u.current&&clearTimeout(u.current)}),[a]);const g=t||Sn(e,c);return xt.createElement(Aa,{className:r?"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"}}},xt.createElement(Ta,{"data-id":"toast",$type:e,style:l},xt.createElement(g,{fill:c.text[e]}),xt.createElement(za,{$withAction:!!i,$overrideMaxWidth:s},o&&xt.createElement(Fa,{$type:e},o),o&&n&&xt.createElement(ga,{orientation:"vertical",type:e}),n&&xt.createElement(Oa,{$type:e},n)),(!!i||!!r)&&xt.createElement(Na,null,i&&xt.createElement(Ia,{"data-id":"toast-action",onClick:i.onClick},i.label),r&&xt.createElement(Sa,{"data-id":"toast-close",onClick:()=>m({asSeen:!0})},xt.createElement(Ye,{size:12})))),r&&xt.createElement(Da,{ref:h,$duration:a,$type:e}))},Ba=_t.div`
|
|
572
|
+
padding: 24px 32px;
|
|
573
|
+
`,Ra=_t.div`
|
|
574
|
+
padding: ${({$withNote:e})=>e?"12px 0px":"12px 0px 32px 0"};
|
|
575
|
+
`,La=_t(Hi)`
|
|
576
|
+
font-size: 20px;
|
|
577
|
+
line-height: 28px;
|
|
578
|
+
`,Ma=_t(Hi)`
|
|
579
|
+
color: ${({theme:e})=>e.text.grey};
|
|
580
|
+
width: 416px;
|
|
581
|
+
font-style: normal;
|
|
582
|
+
font-weight: 300;
|
|
583
|
+
line-height: 24px;
|
|
584
|
+
`,Pa=_t.div`
|
|
585
|
+
display: flex;
|
|
586
|
+
justify-content: space-between;
|
|
587
|
+
gap: 12px;
|
|
588
|
+
`,ja=_t(gr)`
|
|
589
|
+
width: 250px;
|
|
590
|
+
`,Ua=_t.div`
|
|
591
|
+
margin-bottom: 12px;
|
|
592
|
+
`,Wa=({isOpen:e,noOverlay:t,title:o="",description:n="",note:i,approveButton:r,denyButton:a,closeOnEscape:s=!0})=>{Rr({key:"Enter",active:e&&s},()=>r.onClick());const l=()=>a.onClick();return xt.createElement(ha,{isOpen:e,noOverlay:t,onClose:l},xt.createElement(Ba,null,xt.createElement(La,null,o),xt.createElement(Ra,{$withNote:!!i},xt.createElement(Ma,null,n)),!!i&&xt.createElement(Ua,null,xt.createElement(_a,{type:i.type,title:i.title,message:i.message})),xt.createElement(Pa,null,xt.createElement(ja,{"data-id":"approve",variant:r.variant||"primary",onClick:()=>r.onClick()},r.text),xt.createElement(ja,{"data-id":"deny",variant:a.variant||"secondary",onClick:l},a.text))))},Va=({isOpen:e,noOverlay:t,name:o,onApprove:n,onDeny:i})=>xt.createElement(Wa,{isOpen:e,noOverlay:t,title:"Cancel"+(o?` ${o}`:""),description:"Are you sure you want to cancel?",approveButton:{text:"Confirm",variant:Co.Warning,onClick:n},denyButton:{text:"Go Back",onClick:i}}),Ha=_t.div`
|
|
593
|
+
display: flex;
|
|
594
|
+
align-items: center;
|
|
595
|
+
gap: 8px;
|
|
596
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
597
|
+
opacity: ${({$disabled:e})=>e?.6:1};
|
|
598
|
+
`,qa=_t.div`
|
|
599
|
+
width: 18px;
|
|
600
|
+
height: 18px;
|
|
601
|
+
border-radius: 6px;
|
|
602
|
+
border: 1px dashed ${({$isChecked:e,$isPartiallyChecked:t,theme:o})=>e||t?"transparent":o.colors.secondary};
|
|
603
|
+
display: flex;
|
|
604
|
+
align-items: center;
|
|
605
|
+
justify-content: center;
|
|
606
|
+
background-color: ${({$isChecked:e,$isPartiallyChecked:t,theme:o})=>e?o.colors.majestic_blue:t?o.colors.majestic_blue_soft:o.colors.secondary+Pi.opacity.hex["020"]};
|
|
607
|
+
pointer-events: ${({$disabled:e})=>e?"none":"auto"};
|
|
608
|
+
transition: border 0.3s;
|
|
609
|
+
&:hover {
|
|
610
|
+
border: 1px solid ${({theme:e})=>e.colors.secondary};
|
|
611
|
+
}
|
|
612
|
+
`,Ga=({title:e,titleColor:t,tooltip:o,value:n=!1,partiallyChecked:i=!1,onChange:r,disabled:a,style:s,errorMessage:l,allowPropagation:c=!1})=>{const d=Pi.useTheme(),[p,u]=wt(n);return kt(()=>u(n),[n]),xt.createElement(Xr,null,xt.createElement(Ha,{"data-id":"checkbox"+(e?`-${e}`:""),$disabled:a,onClick:e=>{a||(c||e.stopPropagation(),r?r(!!i||!p):u(e=>!!i||!e))},style:s},xt.createElement(qa,{$isChecked:p,$isPartiallyChecked:i,$disabled:a},i?xt.createElement(Je,{fill:d.text.white}):p?xt.createElement(Ge,{fill:d.text.white}):null),e&&xt.createElement(va,{text:o,withIcon:!0},xt.createElement(Hi,{size:12,color:t||d.text.grey,style:{maxWidth:"90%"}},e))),!!l&&xt.createElement(Ki,null,l))},Ka=_t(Jr)`
|
|
613
|
+
gap: 0;
|
|
614
|
+
`,Ya=_t.button`
|
|
615
|
+
padding: 4px 8px;
|
|
616
|
+
background-color: ${({theme:e,$selected:t})=>t?e.colors.dropdown_bg_2:"transparent"};
|
|
617
|
+
border-radius: ${({$position:e})=>"left"===e?"32px 0px 0px 32px":"right"===e?"0px 32px 32px 0px":"0"};
|
|
618
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
619
|
+
display: flex;
|
|
620
|
+
align-items: center;
|
|
621
|
+
justify-content: center;
|
|
622
|
+
cursor: pointer;
|
|
623
|
+
&:hover {
|
|
624
|
+
border: 1px solid ${({theme:e})=>e.colors.secondary};
|
|
625
|
+
}
|
|
626
|
+
`,Ja=({isPrettyMode:e,setIsPrettyMode:t})=>xt.createElement(Ka,null,xt.createElement(Ya,{$position:"left",$selected:e,onClick:()=>t(!0)},xt.createElement(Xe,null)),xt.createElement(Ya,{$position:"right",$selected:!e,onClick:()=>t(!1)},xt.createElement(Ze,null))),Xa=_t.table`
|
|
627
|
+
border-collapse: collapse;
|
|
628
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
629
|
+
`,Za=_t.tbody``,Qa=_t.tr`
|
|
630
|
+
td:first-child {
|
|
631
|
+
padding-left: 0 !important;
|
|
632
|
+
}
|
|
633
|
+
td:last-child {
|
|
634
|
+
padding-right: 0 !important;
|
|
635
|
+
}
|
|
636
|
+
`,es=_t.td`
|
|
637
|
+
vertical-align: top;
|
|
638
|
+
padding: 4px 6px;
|
|
639
|
+
`,ts=_t(Hi)`
|
|
640
|
+
white-space: nowrap;
|
|
641
|
+
`,os=_t.span`
|
|
642
|
+
white-space: ${({$noWrap:e})=>e?"nowrap":"pre-wrap"};
|
|
643
|
+
overflow-wrap: break-word;
|
|
644
|
+
word-break: break-word;
|
|
645
|
+
word-wrap: break-word;
|
|
646
|
+
/* Fallback for older browsers */
|
|
647
|
+
-ms-word-break: break-all;
|
|
648
|
+
font-size: 12px;
|
|
649
|
+
`,ns=({language:e,code:t,theme:o,flatten:n,pretty:i})=>{const{darkMode:r}=Pi.useTheme(),a=o?Yt[o]:r?Yt.palenight:Yt.vsLight;let s="";if("json"===e){const e=zn(t,{}),o=Gn(e);s=Kn(n?tn(o):o)}else s=t;return i&&"json"===e?xt.createElement(is,{darkMode:r,str:s}):xt.createElement(Kt,{theme:a||(r?Yt.palenight:Yt.vsLight),language:e,code:s},({getLineProps:e,getTokenProps:t,tokens:o})=>xt.createElement("pre",null,o.map((o,n)=>xt.createElement("div",{key:`line-${n}`,...e({line:o})},o.map((e,o)=>xt.createElement(os,{key:`line-${n}-token-${o}`,...t({token:e})}))))))},is=({darkMode:e,str:t})=>{const o=Pi.useTheme();return xt.createElement(Kt,{theme:e?Yt.palenight:Yt.vsLight,language:"json",code:t},({getLineProps:e,getTokenProps:t,tokens:n})=>xt.createElement(Xa,null,xt.createElement(Za,null,n.map((n,i)=>{const r=(e=>{const t=["punctuation","plain","operator"];return e.filter(e=>!t.includes(e.types[0])).map(({types:e,content:t})=>{const o=[...e],n=["property","string"].includes(o[0])?t.replace(/"/g,""):t;return"string"===o[0]&&(["true","false"].includes(n.split("@")[0])&&(o[0]="boolean"),n.split("@")[0].match(/^[0-9]+$/)&&(o[0]="number")),{types:o,content:n}})})(n),a=e({line:r});return 1===r.length&&"property"===r[0].types[0]?xt.createElement(bt,{key:`line-${i}`},((e,t)=>{const n=new Array(2).fill(e=>xt.createElement(Qa,{...e},xt.createElement(es,null),xt.createElement(es,null)));return xt.createElement(bt,null,n.map((e,n)=>xt.createElement(e,{key:`empty-row-${t}-${n}`,style:0===n?{borderBottom:`1px solid ${o.colors.border}`}:{}})))})(0,i),xt.createElement(Qa,{...a},xt.createElement(es,null,xt.createElement(ts,null,r[0].content)),xt.createElement(es,null))):2===r.length?xt.createElement(Qa,{key:`line-${i}`,...a},r.map((e,n)=>{const{text:r,components:a}=((e,t)=>{const[o,...n]=e.split("@");return{text:o,components:n?.map((e,o)=>{if(!e.includes("="))return null;const[n,i]=e.split("=");switch(n){case"tooltip":return xt.createElement(va,{key:`${n}-${i}-${o}`,withIcon:!0,text:i});case"status":if("none"===i)return xt.createElement("div",{key:`${n}-${i}-${o}`,style:{width:16,height:16}});let e=Sn(i,t);return e||(e=Sn(Co.Warning,t)),xt.createElement(e,{key:`${n}-${i}-${o}`});default:return null}})?.filter(e=>!!e)||[]}})(e.content,o),s=0===n;return xt.createElement(es,{key:`line-${i}-token-${n}`},xt.createElement(Jr,null,xt.createElement(Jr,null,a),xt.createElement(os,{$noWrap:s,...t({token:e})},r)))})):(r.length,null)}))))},rs={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 as(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const o=(e.match(/^[0-9.]*/)||"").toString();t=o.includes(".")?parseFloat(o):parseInt(o,10);const n=(e.match(/[^0-9]*$/)||"").toString();return rs[n]?{value:t,unit:n}:{value:t,unit:"px"}}function ss(e){const t=as(e);return`${t.value}${t.unit}`}const ls=(()=>{const e="react-spinners-FadeLoader-fade";if("undefined"==typeof window||!window.document)return e;const t=document.createElement("style");document.head.appendChild(t);const o=t.sheet,n=`\n @keyframes ${e} {\n 50% {opacity: 0.3} 100% {opacity: 1}\n }\n `;return o&&o.insertRule(n,0),e})(),cs=({loading:e=!0,color:t,scale:o=1,speedMultiplier:n=1,cssOverride:i={},style:r={},...a})=>{const s=Pi.useTheme(),l=t||s.text.secondary;if(!e)return null;const{value:c}=as(2),d=c+4.2,p=d/2+d/5.5,u=4*d*o,h={position:"relative",width:`${u}px`,height:`${u}px`,scale:o,...r,...i},m=(e,t)=>({position:"absolute",width:ss(1.5),height:ss(4),borderRadius:ss(2),backgroundColor:l,transition:"2s",animationFillMode:"both",animation:`${ls} ${1.2/n}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return xt.createElement("span",{style:h,...a},xt.createElement("span",{style:{...m(1,0),top:`calc(50% + ${d}px)`,left:"50%"}}),xt.createElement("span",{style:{...m(2,-45),top:`calc(50% + ${p}px)`,left:`calc(50% + ${p}px)`}}),xt.createElement("span",{style:{...m(3,90),top:"50%",left:`calc(50% + ${d}px)`}}),xt.createElement("span",{style:{...m(4,45),top:`calc(50% + ${-1*p}px)`,left:`calc(50% + ${p}px)`}}),xt.createElement("span",{style:{...m(5,0),top:`calc(50% + ${-1*d}px)`,left:"50%"}}),xt.createElement("span",{style:{...m(6,-45),top:`calc(50% + ${-1*p}px)`,left:`calc(50% + ${-1*p}px)`}}),xt.createElement("span",{style:{...m(7,90),top:"50%",left:`calc(50% + ${-1*d}px)`}}),xt.createElement("span",{style:{...m(8,45),top:`calc(50% + ${p}px)`,left:`calc(50% + ${-1*p}px)`}}))},ds=_t.div`
|
|
650
|
+
margin: ${({$align:e})=>"right"===e?"auto 6px auto auto":"left"===e?"auto auto auto 6px":"auto"};
|
|
651
|
+
display: flex;
|
|
652
|
+
align-items: center;
|
|
653
|
+
justify-content: center;
|
|
654
|
+
`,ps=({extend:e,size:t=14,align:o="center"})=>xt.createElement(ds,{$align:o},xt.createElement(Qe,{size:t,rotate:e?180:0})),us=_t.div`
|
|
655
|
+
border-radius: 24px;
|
|
656
|
+
background-color: ${({theme:e,$status:t})=>t===Co.Error?e.text.error+Pi.opacity.hex["010"]:t===Co.Warning?e.text.warning+Pi.opacity.hex["010"]:e.colors.secondary+Pi.opacity.hex["005"]};
|
|
657
|
+
&:hover {
|
|
658
|
+
background-color: ${({theme:e,$status:t})=>t===Co.Error?e.text.error+Pi.opacity.hex["020"]:t===Co.Warning?e.text.warning+Pi.opacity.hex["020"]:e.colors.secondary+Pi.opacity.hex["010"]};
|
|
659
|
+
}
|
|
660
|
+
cursor: pointer;
|
|
661
|
+
transition: background 0.3s;
|
|
662
|
+
`,hs=_t.div`
|
|
663
|
+
display: flex;
|
|
664
|
+
align-items: center;
|
|
665
|
+
gap: 12px;
|
|
666
|
+
padding: 12px 18px;
|
|
667
|
+
`,ms=_t.div`
|
|
668
|
+
display: flex;
|
|
669
|
+
flex-direction: column;
|
|
670
|
+
gap: 8px;
|
|
671
|
+
padding: 6px 18px 12px 18px;
|
|
672
|
+
`,gs=_t.div`
|
|
673
|
+
display: flex;
|
|
674
|
+
align-items: center;
|
|
675
|
+
gap: 12px;
|
|
676
|
+
`,$s=_t(Hi)`
|
|
677
|
+
white-space: nowrap;
|
|
678
|
+
`,fs=_t(Xr)`
|
|
679
|
+
width: 16px;
|
|
680
|
+
`,xs=({conditions:e,headerLabelError:t="Something Failed",headerLabelWarning:o="Something isn't right",headerLabelSuccess:n="Everything Successful"})=>{const i=Pi.useTheme(),[r,a]=wt(!1),s=yt(()=>jn(e),[e]),{errors:l,hasErrors:c,warnings:d,hasWarnings:p,hasDisableds:u,hasLoadings:h}=yt(()=>sn(s),[s]);kt(()=>{a(c||p||u||h)},[c,p,u,h]);const m=(!s.length||h)&&!c&&!p&&!u,g=c?Co.Error:p?Co.Warning:u?Co.Info:Co.Success,$=Sn(g,i),f=c?t:p||u?o:m?"Loading...":n,x=c?i.text.error:p?i.text.warning:i.text.info,b=`(${c?l.length:p?d.length:s.length}/${s.length})`,y=c?i.text.error_secondary:p?i.text.warning_secondary:i.text.info_secondary,w=St(()=>a(e=>!e),[]);return xt.createElement(us,{onClick:w,$status:g},xt.createElement(hs,null,m?xt.createElement(cs,null):xt.createElement($,null),xt.createElement(Hi,{color:x,size:14},f),xt.createElement(Hi,{color:y,size:12,family:"secondary"},b),xt.createElement(ps,{extend:r,align:"right"})),r&&xt.createElement(ms,null,s.map(({status:e,type:t,reason:o,message:n,lastTransitionTime:r},a)=>{const s=e===So.Loading?()=>xt.createElement(cs,{scale:.8}):e===So.Disabled?Sn(Co.Info,i):Sn(e,i),l=e===So.Disabled?i.text.info:e===Co.Error?i.text.error:e===Co.Warning?i.text.warning:i.text.info,c=e===So.Disabled?i.text.info_secondary:e===Co.Error?i.text.error_secondary:e===Co.Warning?i.text.warning_secondary:i.text.info_secondary;return xt.createElement(gs,{key:`condition-${a}`},xt.createElement(fs,null,xt.createElement(s,null)),xt.createElement(Jr,{$gap:12,style:{width:"100%",justifyContent:"space-between"}},xt.createElement(Hi,{color:l,size:12},xt.createElement($s,{color:c,size:12,weight:700},t),n||o),xt.createElement($s,{color:l,size:12},new Date(r).toLocaleString())))})))},bs=_t.div`
|
|
681
|
+
display: flex;
|
|
682
|
+
align-items: center;
|
|
683
|
+
gap: ${({$size:e})=>e/3}px;
|
|
684
|
+
padding: ${({$size:e,$withBorder:t,$withBackground:o})=>t||o?`${e/(t?3:2)}px ${e/(t?1.5:1)}px`:"0"};
|
|
685
|
+
width: ${({$width:e})=>e||"fit-content"};
|
|
686
|
+
border-radius: 360px;
|
|
687
|
+
border: ${({$withBorder:e,$status:t,theme:o})=>e?`1px solid ${o.text[t]+Pi.opacity.hex["050"]}`:"none"};
|
|
688
|
+
background: ${({$withBackground:e,$status:t,theme:o})=>e?`linear-gradient(90deg, transparent 0%, ${o.text[t]+Pi.opacity.hex["030"]} 100%)`:"transparent"};
|
|
689
|
+
`,ys=_t.div`
|
|
690
|
+
display: flex;
|
|
691
|
+
align-items: center;
|
|
692
|
+
`,ws=_t.div`
|
|
693
|
+
display: flex;
|
|
694
|
+
align-items: center;
|
|
695
|
+
`,ks=({title:e,subtitle:t,status:o=Co.Default,forceIcon:n,withIcon:i,withBorder:r,withBackground:a,width:s,size:l=12,family:c="secondary",nowrap:d=!1})=>{const p=Pi.useTheme(),u=[So.Loading,So.Disabled].includes(o)?Co.Info:o,h=n?()=>xt.createElement(n,{size:l+2,fill:p.text[u]}):o===So.Loading?()=>xt.createElement(cs,{scale:.8}):()=>Sn(u,p)?.({size:l+2});return xt.createElement(bs,{$status:u,$width:s,$size:l,$withIcon:i,$withBorder:r,$withBackground:a},i&&xt.createElement(ys,null,xt.createElement(h,null)),(!!e||!!t)&&xt.createElement(ws,null,!!e&&xt.createElement(Hi,{size:l,family:c,color:p.text[u],nowrap:d},e),!!e&&!!t&&xt.createElement(ga,{orientation:"vertical",length:l-2+"px",type:u}),!!t&&xt.createElement(Hi,{size:l-2,family:c,color:p.text[`${u}_secondary`],nowrap:d},t)))},vs=({label:e,onClick:t,variant:o="tertiary",textProps:n,...i})=>{const r=Rt();return xt.createElement(gr,{onClick:t,variant:o,...i},xt.createElement(et,{fill:"primary"===o?r.text.primary:r.text.info}),xt.createElement(Hi,{size:14,family:"secondary",decoration:"underline",color:"primary"===o?r.text.primary:void 0,...n},e||Qo.ADD))},Cs=_t(Jr)`
|
|
696
|
+
width: 100%;
|
|
697
|
+
border-radius: 8px;
|
|
698
|
+
background-color: ${({theme:e})=>e.colors.secondary+Pi.opacity.hex["010"]};
|
|
699
|
+
pre {
|
|
700
|
+
color: ${({theme:e})=>e.text.default};
|
|
701
|
+
font-size: 12px;
|
|
702
|
+
overflow-x: auto;
|
|
703
|
+
width: 100%;
|
|
704
|
+
padding-left: 12px;
|
|
705
|
+
}
|
|
706
|
+
`,Es=({value:e,callbackCopyDone:t})=>{const{clickCopy:o,isCopied:n}=zr();return xt.createElement(Cs,null,xt.createElement("pre",null,e),xt.createElement(Sa,{onClick:n=>{n.stopPropagation(),o(e),t?.()},tooltip:n?"Copied!":"Copy"},n?xt.createElement(Ge,null):xt.createElement(Ke,null)))},Ss=({label:e,onClick:t,variant:o="tertiary",...n})=>{const i=Rt();return xt.createElement(gr,{onClick:t,variant:o,...n},xt.createElement(tt,{fill:"primary"===o?i.text.primary:i.text.info}),xt.createElement(Hi,{size:14,family:"secondary",decoration:"underline",color:"primary"===o?i.text.primary:void 0},e||Qo.EDIT))},As=({onClick:e})=>xt.createElement(_a,{type:Co.Default,icon:je,message:Zo.QUICK_BACK_TO_SUMMARY,action:{label:Zo.GO_TO_SUMMARY,onClick:e}}),Ds=_t(Hi)`
|
|
707
|
+
max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
|
|
708
|
+
white-space: nowrap;
|
|
709
|
+
overflow-x: auto;
|
|
710
|
+
|
|
711
|
+
&::after {
|
|
712
|
+
// This is to prevent the "browser default tooltip" from appearing when the title is too long
|
|
713
|
+
content: '';
|
|
714
|
+
display: block;
|
|
715
|
+
}
|
|
716
|
+
`,Ts=({maxWidth:e,text:t,textSize:o=16,textColor:n})=>{const[i,r]=wt(!1),a=vt(null);return kt(()=>{if(a.current){const{clientWidth:t}=a.current;r(t<1.05*(e-o)&&t>.95*(e-o))}},[e,o,t]),xt.createElement(Jr,{$gap:0},t&&xt.createElement(va,{text:i?t:void 0},xt.createElement(Ds,{ref:a,$maxWidth:e-o,size:o,color:n},t)),i&&xt.createElement(Ds,{$maxWidth:o,size:o,color:n},"..."))},zs=({src:e="",alt:t="",size:n=16})=>{const[i,r]=wt(!1);return e&&!i?xt.createElement("img",{src:e,alt:t,width:n,height:n,onError:()=>r(!0)}):xt.createElement(o,{size:n})},Fs=_t.div`
|
|
717
|
+
display: flex;
|
|
718
|
+
align-items: center;
|
|
719
|
+
justify-content: center;
|
|
720
|
+
width: ${({$size:e})=>e}px;
|
|
721
|
+
height: ${({$size:e})=>e}px;
|
|
722
|
+
border-radius: 8px;
|
|
723
|
+
background: ${({$status:e,theme:t})=>{const o=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${o} 0%, ${o+Pi.opacity.hex["030"]} 100%)`}};
|
|
724
|
+
`,Os=({icon:e,src:t="",alt:n="",status:i,size:r=36})=>xt.createElement(Fs,{$status:i,$size:r},t?xt.createElement(zs,{src:t,alt:n,size:r-12}):e?xt.createElement(e,{size:r-12}):xt.createElement(o,{size:r-12})),Ns=_t.div`
|
|
725
|
+
position: relative;
|
|
726
|
+
display: flex;
|
|
727
|
+
flex-wrap: wrap;
|
|
728
|
+
align-items: center;
|
|
729
|
+
justify-content: center;
|
|
730
|
+
width: ${({$size:e})=>e}px;
|
|
731
|
+
height: ${({$size:e})=>e}px;
|
|
732
|
+
`,Is=_t.div`
|
|
733
|
+
position: absolute;
|
|
734
|
+
top: ${({$top:e})=>e}px;
|
|
735
|
+
left: ${({$left:e})=>e}px;
|
|
736
|
+
z-index: ${({$zIndex:e})=>e};
|
|
737
|
+
display: flex;
|
|
738
|
+
align-items: center;
|
|
739
|
+
justify-content: center;
|
|
740
|
+
width: ${({$size:e})=>e}px;
|
|
741
|
+
height: ${({$size:e})=>e}px;
|
|
742
|
+
border-radius: 100%;
|
|
743
|
+
border: 1px solid ${({theme:e,$status:t})=>(t?e.text[t]:e.colors.border)+Pi.opacity.hex["030"]};
|
|
744
|
+
background: ${({$status:e,theme:t})=>{const o=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${o} 0%, ${o+Pi.opacity.hex["030"]} 100%)`}};
|
|
745
|
+
`,_s=({icons:e=[],iconSrcs:t=[],status:o,size:n=36,id:i})=>{const r=Pi.useTheme(),a=1===e.length||1===t.length?n-12:n/2.7;if(t.length>0)return xt.createElement(_s,{icons:t.map(e=>()=>xt.createElement(zs,{src:e,size:a})),status:o,size:n,id:i});if(1===e.length)return xt.createElement(Os,{icon:e[0],status:o,size:n});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 xt.createElement(Ns,{$status:o,$size:n},e.map((t,n)=>n>2?null:xt.createElement(Is,{key:`icon-${i}-${n}`,$status:o,$size:1.5*a,$top:s(n),$left:l(n),$zIndex:n+1},2===n&&e.length>3?xt.createElement(Hi,{family:"secondary",color:r.text.dark_grey,size:.8*a},"+",e.length-2):xt.createElement(t,{size:a}))))},Bs=li.map(({id:e})=>e),Rs=({monitors:e=Bs,withTooltips:t,withLabels:o,size:n=12,color:i})=>{const r=Pi.useTheme(),a=i||r.text.grey;return xt.createElement(Jr,{$gap:o?n:n/2},e.filter(e=>!!e).map(e=>{const i=e.toLowerCase(),r=Jt(i),s=bn(i);return s?xt.createElement(va,{key:i,text:t?r:""},xt.createElement(Jr,{$gap:n/3},xt.createElement(s,{size:o?n+2:n,fill:a}),o&&xt.createElement(Hi,{size:n,color:a},r))):null}))},Ls=_t.div`
|
|
746
|
+
visibility: hidden;
|
|
747
|
+
`,Ms=_t.div`
|
|
748
|
+
display: flex;
|
|
749
|
+
flex-direction: column;
|
|
750
|
+
align-self: stretch;
|
|
751
|
+
padding: 16px;
|
|
752
|
+
width: calc(100% - 32px);
|
|
753
|
+
border-radius: 16px;
|
|
754
|
+
background-color: ${({theme:e,$status:t,$bgColor:o})=>o||(t?e.text[t]+Pi.opacity.hex["010"]:e.colors.secondary+Pi.opacity.hex["005"])};
|
|
755
|
+
opacity: ${({$faded:e})=>e?.5:1};
|
|
756
|
+
|
|
757
|
+
${({theme:e,$status:t,$bgColorHover:o,$withClick:n})=>n?Bt`
|
|
758
|
+
&:hover {
|
|
759
|
+
cursor: pointer;
|
|
760
|
+
background-color: ${o||(t?e.text[t]+Pi.opacity.hex["020"]:e.colors.secondary+Pi.opacity.hex["010"])};
|
|
761
|
+
${Ls} {
|
|
762
|
+
visibility: visible;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
`:`\n &:hover {\n ${Ls} {\n visibility: visible;\n }\n }\n `}
|
|
766
|
+
`,Ps=_t.div`
|
|
767
|
+
display: flex;
|
|
768
|
+
align-items: center;
|
|
769
|
+
gap: 8px;
|
|
770
|
+
margin-left: auto;
|
|
771
|
+
`,js=_t(Hi)`
|
|
772
|
+
margin-right: 16px;
|
|
773
|
+
`,Us=_t(Hi)`
|
|
774
|
+
font-size: 10px;
|
|
775
|
+
color: ${({theme:e})=>e.text.grey};
|
|
776
|
+
`,Ws=({title:e,subTitle:t,hoverText:o,onClick:n,renderActions:i,iconProps:{icon:r,icons:a,iconSrc:s,iconSrcs:l}={},visualProps:{status:c,faded:d,bgColor:p,bgColorHover:u,monitors:h,monitorsWithLabels:m,componentsUnderTitles:g}={},checkboxProps:{withCheckbox:$,isCheckboxDisabled:f,isChecked:x,isLoading:b,onCheckboxChange:y}={},extendableProps:{withExtend:w,isExtended:k,renderExtended:v}={},...C})=>{const E=Pi.useTheme(),[S,A]=wt(k||!1),[D,T]=wt(0),z=vt(null),F=vt(null),O=vt(null);return kt(()=>{if(z.current){const e=z.current.clientWidth,t=F.current?.clientWidth||0;T(e-(($?125:85)+t))}},[$]),xt.createElement(Ms,{ref:z,$status:c,$faded:d,$bgColor:p,$bgColorHover:u,$withClick:!!n,onClick:n,...C},xt.createElement(Jr,{$gap:8},xt.createElement(Jr,{$gap:16},b?xt.createElement(cs,null):$?xt.createElement(Ga,{value:x,onChange:y,disabled:f}):null,a?.length||l?.length?xt.createElement(_s,{icons:a,iconSrcs:l,status:c,id:`${e}-${t}`}):r||s?xt.createElement(Os,{icon:r,src:s,status:c}):null),xt.createElement(Xr,{$gap:4},e&&xt.createElement(Ts,{maxWidth:D,text:e,textSize:14}),xt.createElement(Jr,{$gap:4},t&&xt.createElement(Ts,{maxWidth:D-(O.current?.clientWidth||0),text:t,textSize:10,textColor:E.text.grey}),h&&h.length>0&&xt.createElement(Jr,{$gap:4,ref:O},t&&xt.createElement(Us,null,"•"),xt.createElement(Rs,{monitors:h,withLabels:m,size:10}))),g&&g.length>0?xt.createElement(Jr,{$gap:4},g?.map((e,t)=>xt.createElement(bt,{key:`componentsUnderTitles-${t}`},e))):null),xt.createElement(Ps,{ref:F},!!o&&xt.createElement(Ls,null,xt.createElement(js,{size:14,family:"secondary"},o)),i&&i(),w&&xt.createElement(bt,null,xt.createElement(ga,{orientation:"vertical",length:"16px",margin:"0 2px"}),xt.createElement(Sa,{onClick:()=>A(e=>!e)},xt.createElement(ps,{extend:S}))))),S&&v&&xt.createElement(Xr,null,xt.createElement(ga,{margin:"16px 0"}),v()))},Vs=_t(Jr)`
|
|
777
|
+
width: 100%;
|
|
778
|
+
justify-content: space-between;
|
|
779
|
+
`,Hs=_t(Hi)`
|
|
780
|
+
font-size: 12px;
|
|
781
|
+
color: ${({theme:e})=>e.text.grey};
|
|
782
|
+
`,qs=_t(Hi)`
|
|
783
|
+
font-size: 10px;
|
|
784
|
+
color: ${({theme:e})=>e.text.darker_grey};
|
|
785
|
+
`,Gs=_t.div`
|
|
786
|
+
display: flex;
|
|
787
|
+
align-items: center;
|
|
788
|
+
gap: 8px;
|
|
789
|
+
margin-left: auto;
|
|
790
|
+
`,Ks=_t(Hi)`
|
|
791
|
+
font-size: 12px;
|
|
792
|
+
text-align: right;
|
|
793
|
+
`,Ys=({title:e,subTitle:t,tooltip:o,value:n})=>xt.createElement(Vs,null,xt.createElement(Xr,{$gap:4},xt.createElement(va,{text:o||""},e&&xt.createElement(Hs,{key:"title"},e),t&&xt.createElement(qs,{key:"subtitle"},t))),xt.createElement(Gs,null,n?.status?xt.createElement(ks,{status:"transitioning"===n.status?So.Loading:n.status,title:n.text||n.status,withBorder:!0,withIcon:!0}):xt.createElement(Ks,null,n?.text||"-"))),Js=_t(Xr)`
|
|
794
|
+
width: 100%;
|
|
795
|
+
`,Xs=({containerName:e,actualDevices:t,started:o,ready:n,instrumentationInstances:i})=>{const r=yt(()=>{const e=[];return o?.name&&e.push(xt.createElement(ks,{key:"started",status:Bn(o.value)?Hn(o.value)?Co.Success:Co.Error:Co.Default,title:o.name,withIcon:!0,withBorder:!0,size:8})),n?.name&&e.push(xt.createElement(ks,{key:"ready",status:Bn(n.value)?Hn(n.value)?Co.Success:Co.Error:Co.Default,title:n.name,withIcon:!0,withBorder:!0,size:8})),e},[o?.name,o?.value,n?.name,n?.value]);return xt.createElement(Ws,{title:e.value,subTitle:i.length?`${i.length} Instrumented Processes`:void 0,visualProps:{componentsUnderTitles:r},renderActions:()=>xt.createElement(ks,{status:Co.Info,title:"Instrumentation Device",subtitle:t.value&&"[]"!==t.value?t.value:"none",withBorder:!0}),extendableProps:{isExtended:!!i.length,renderExtended:()=>xt.createElement(Js,{$gap:24},i.map((e,t)=>xt.createElement(Js,{key:`process-${t}`,$gap:8},xt.createElement(Ys,{title:`Instrumented Process #${t+1}`,subTitle:e.message?.value||"",value:{status:e.healthy.status,text:e.healthy.status===Co.Success?"healthy":"unhealthy"}}),e.identifyingAttributes?.map(({name:e,value:t})=>xt.createElement(Ys,{key:`describe-${e}-${t}`,title:e,subTitle:"",value:{text:t,status:void 0}})))))}})},Zs=({title:e="Data not found",subTitle:t})=>{const o=Rt().v2.colors.grey[400];return xt.createElement(Zr,null,xt.createElement(Jr,{$gap:8},xt.createElement(ot,{fill:o}),xt.createElement(ti,{size:Qn.XS,color:o},e)),t&&xt.createElement(ti,{size:Qn.XXS,color:o},t))},Qs=_t(Xr)`
|
|
796
|
+
max-width: 300px;
|
|
797
|
+
padding: 12px;
|
|
798
|
+
border-radius: 12px;
|
|
799
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
800
|
+
justify-content: center;
|
|
801
|
+
`,el=Dt(({id:e,data:t})=>{const{title:o,subTitle:n}=t;return xt.createElement(Qs,{"data-id":e},xt.createElement(Zs,{title:o,subTitle:n}))});el.displayName=el.name;const tl=_t.div`
|
|
802
|
+
padding: 6px;
|
|
803
|
+
border-radius: 12px;
|
|
804
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
805
|
+
cursor: pointer;
|
|
806
|
+
`,ol=_t.div`
|
|
807
|
+
position: relative;
|
|
808
|
+
`,nl=_t(Jr)`
|
|
809
|
+
position: absolute;
|
|
810
|
+
bottom: -24px;
|
|
811
|
+
left: 50%;
|
|
812
|
+
transform: translateX(-50%);
|
|
813
|
+
gap: 4px;
|
|
814
|
+
`,il=_t.div`
|
|
815
|
+
position: absolute;
|
|
816
|
+
bottom: 100%;
|
|
817
|
+
left: 100%;
|
|
818
|
+
width: 300px;
|
|
819
|
+
padding: 12px;
|
|
820
|
+
border-radius: 16px;
|
|
821
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
822
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
823
|
+
`,rl=({title:e,value:t})=>{const o=Rt();return xt.createElement(Jr,{$justifyContent:"space-between"},xt.createElement(Hi,{size:12,color:o.text.info},e),xt.createElement(Hi,{size:12,family:"secondary"},t))},al=Dt(({id:e,data:t})=>{const{id:o,status:n,title:i,icons:r,serviceMapEntry:a}=t,{activeNodeType:s,activeNodeId:l}=ii(),c=Rt(),d=n===Co.Error?Sn(n,c):null;return xt.createElement(xt.Fragment,null,xt.createElement(Pt,{type:"source",position:jt.Bottom,style:{visibility:"hidden"}}),xt.createElement(Pt,{type:"target",position:jt.Top,style:{visibility:"hidden"}}),xt.createElement(ol,{"data-id":e},xt.createElement(tl,null,xt.createElement(_s,{id:o,icons:r,status:n})),xt.createElement(nl,null,d&&xt.createElement(d,null),xt.createElement(Ts,{maxWidth:100,text:i})),s===To.MapItem&&l===e&&xt.createElement(il,null,xt.createElement(Jr,{$gap:12},xt.createElement(_s,{id:o,icons:r,status:n}),xt.createElement(Hi,{size:20},i)),a&&a.services.length>0?a.services.map(({serviceName:e,requests:t,dateTime:n})=>xt.createElement("div",{key:`from-${o}-to-${e}`},xt.createElement(ga,null),xt.createElement(rl,{title:"Connected Service",value:e}),xt.createElement(rl,{title:"Outgoing Requests",value:t}),xt.createElement(rl,{title:"Last Requested At",value:new Date(n).toLocaleString()}))):xt.createElement(xt.Fragment,null,xt.createElement(ga,null),xt.createElement(Zs,{title:"No outgoing connections",subTitle:" "})))))});al.displayName=al.name;const sl=_t.div`
|
|
824
|
+
height: calc(100vh - 160px);
|
|
825
|
+
.react-flow__attribution {
|
|
826
|
+
visibility: hidden;
|
|
827
|
+
}
|
|
828
|
+
`,ll=_t.div`
|
|
829
|
+
button {
|
|
830
|
+
padding: 8px;
|
|
831
|
+
margin: 8px;
|
|
832
|
+
border-radius: 8px;
|
|
833
|
+
border: 1px solid ${({theme:e})=>e.colors.border} !important;
|
|
834
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
835
|
+
path {
|
|
836
|
+
fill: ${({theme:e})=>e.text.secondary};
|
|
837
|
+
}
|
|
838
|
+
&:hover {
|
|
839
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
`,cl={[To.MapItem]:al,[To.NoData]:el},dl=({nodes:e,edges:t,onNodesChange:o,onEdgesChange:n,fitView:i=!1,zoomOnScroll:r=!1})=>{const{onClickNode:a}=yr(),{setActiveNodeType:s,setActiveNodeId:l}=ii();return xt.createElement(sl,null,xt.createElement(Ut,{fitView:i,zoomOnScroll:r,nodes:e,nodeTypes:cl,edges:t,onNodeClick:a,onNodesChange:e=>{setTimeout(()=>o(e),0)},onEdgesChange:e=>{setTimeout(()=>n(e),0)},onBlur:()=>{s(null),l(null)},onlyRenderVisibleElements:!0},xt.createElement(ll,null,xt.createElement(Wt,{position:"bottom-right",orientation:"horizontal",showInteractive:!1,showZoom:!0,showFitView:!0,fitViewOptions:{duration:300,padding:.02,includeHiddenNodes:!0}}))))},pl=_t.div`
|
|
843
|
+
display: flex;
|
|
844
|
+
|
|
845
|
+
align-items: center;
|
|
846
|
+
gap: 6px;
|
|
847
|
+
margin-bottom: 4px;
|
|
848
|
+
`,ul=_t(Hi)`
|
|
849
|
+
font-size: 14px;
|
|
850
|
+
opacity: 0.8;
|
|
851
|
+
line-height: 22px;
|
|
852
|
+
overflow: hidden;
|
|
853
|
+
white-space: nowrap;
|
|
854
|
+
text-overflow: ellipsis;
|
|
855
|
+
color: ${({$status:e,theme:t})=>e?t.text[e]:t.text.secondary};
|
|
856
|
+
`,hl=_t(Hi)`
|
|
857
|
+
font-size: 12px;
|
|
858
|
+
color: ${({theme:e})=>e.text.darker_grey};
|
|
859
|
+
opacity: 0.8;
|
|
860
|
+
`,ml=({title:e,required:t,tooltip:o,style:n,status:i})=>e?xt.createElement(pl,{style:n},xt.createElement(va,{text:o,withIcon:!0},xt.createElement(ul,{$status:i},e),!t&&xt.createElement(hl,null,"(optional)"))):null,gl=_t.div`
|
|
861
|
+
display: flex;
|
|
862
|
+
flex-direction: column;
|
|
863
|
+
position: relative;
|
|
864
|
+
width: 100%;
|
|
865
|
+
`,$l=_t.div`
|
|
866
|
+
width: 100%;
|
|
867
|
+
display: flex;
|
|
868
|
+
align-items: center;
|
|
869
|
+
height: 36px;
|
|
870
|
+
gap: 12px;
|
|
871
|
+
transition: border-color 0.3s;
|
|
872
|
+
border-radius: 32px;
|
|
873
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
874
|
+
${({$disabled:e})=>e&&Bt`
|
|
875
|
+
cursor: not-allowed;
|
|
876
|
+
opacity: 0.6;
|
|
877
|
+
`}
|
|
878
|
+
${({$isActive:e,$hasError:t,$status:o})=>e?Bt`
|
|
879
|
+
border-color: ${({theme:e})=>e.colors.secondary};
|
|
880
|
+
`:t?Bt`
|
|
881
|
+
border-color: ${({theme:e})=>e.text.error};
|
|
882
|
+
`:o?Bt`
|
|
883
|
+
border-color: ${({theme:e})=>e.text[o]};
|
|
884
|
+
`:""}
|
|
885
|
+
&:hover {
|
|
886
|
+
border-color: ${({theme:e})=>e.colors.secondary};
|
|
887
|
+
}
|
|
888
|
+
&:focus-within {
|
|
889
|
+
border-color: ${({theme:e})=>e.colors.secondary};
|
|
890
|
+
}
|
|
891
|
+
`,fl=_t.input`
|
|
892
|
+
padding-left: ${({$hasIcon:e})=>e?"0":"16px"};
|
|
893
|
+
flex: 1;
|
|
894
|
+
min-width: 150px;
|
|
895
|
+
width: 100%;
|
|
896
|
+
border: none;
|
|
897
|
+
outline: none;
|
|
898
|
+
background: none;
|
|
899
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
900
|
+
font-size: 14px;
|
|
901
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
902
|
+
font-weight: 300;
|
|
903
|
+
&::placeholder {
|
|
904
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
905
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
906
|
+
opacity: 0.4;
|
|
907
|
+
font-size: 14px;
|
|
908
|
+
font-weight: 300;
|
|
909
|
+
line-height: 22px; /* 157.143% */
|
|
910
|
+
}
|
|
911
|
+
&:disabled {
|
|
912
|
+
cursor: not-allowed;
|
|
913
|
+
opacity: 0.6;
|
|
914
|
+
}
|
|
915
|
+
&::-webkit-inner-spin-button,
|
|
916
|
+
&::-webkit-outer-spin-button {
|
|
917
|
+
-webkit-appearance: none;
|
|
918
|
+
margin: 0;
|
|
919
|
+
}
|
|
920
|
+
`,xl=_t.div`
|
|
921
|
+
display: flex;
|
|
922
|
+
align-items: center;
|
|
923
|
+
margin-left: 12px;
|
|
924
|
+
`,bl=_t(xl)`
|
|
925
|
+
cursor: pointer;
|
|
926
|
+
`,yl=_t.button`
|
|
927
|
+
background-color: ${({theme:e})=>e.colors.primary};
|
|
928
|
+
border: none;
|
|
929
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
930
|
+
padding: 8px 16px;
|
|
931
|
+
border-radius: 20px;
|
|
932
|
+
cursor: pointer;
|
|
933
|
+
margin-left: 8px;
|
|
934
|
+
&:hover {
|
|
935
|
+
background-color: ${({theme:e})=>e.colors.secondary};
|
|
936
|
+
}
|
|
937
|
+
&:disabled {
|
|
938
|
+
background-color: ${({theme:e})=>e.colors.border};
|
|
939
|
+
cursor: not-allowed;
|
|
940
|
+
}
|
|
941
|
+
`,wl=({icon:e,buttonLabel:t,onButtonClick:o,hasError:n,errorMessage:i,title:r,tooltip:a,required:s,value:l,onChange:c,type:d=vo.Text,name:p,status:u,...h})=>{const m=Pi.useTheme(),g=d===vo.Password,[$,f]=wt(!1);return xt.createElement(gl,null,xt.createElement(ml,{title:r,required:s,tooltip:a,status:u}),xt.createElement($l,{$disabled:h.disabled,$hasError:n||!!i,$isActive:!!h.autoFocus,$status:u},g?xt.createElement(bl,{onClick:()=>f(e=>!e)},$?xt.createElement(nt,{size:14,fill:m.text.grey}):xt.createElement(it,{size:14,fill:m.text.grey})):e?xt.createElement(xl,null,xt.createElement(e,{size:14,fill:m.text.grey})):null,xt.createElement(fl,{"data-id":p,type:$||d===vo.Number?vo.Text:d,$hasIcon:!!e||g,name:p,value:l,onChange:e=>{e.stopPropagation(),d===vo.Number&&(e.target.value=Vn(e.target.value)),c?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},...h}),t&&o&&xt.createElement(yl,{onClick:o,disabled:h.disabled},t)),!!i&&xt.createElement(Ki,null,i))},kl=_t.div`
|
|
942
|
+
display: flex;
|
|
943
|
+
flex-direction: column;
|
|
944
|
+
min-width: 120px;
|
|
945
|
+
width: 100%;
|
|
946
|
+
opacity: ${({$disabled:e})=>e?.5:1};
|
|
947
|
+
`,vl=_t.div`
|
|
948
|
+
position: relative;
|
|
949
|
+
`,Cl=_t.div`
|
|
950
|
+
display: flex;
|
|
951
|
+
align-items: center;
|
|
952
|
+
justify-content: space-between;
|
|
953
|
+
height: 36px;
|
|
954
|
+
padding: ${({$isMulti:e,$hasSelections:t})=>e&&t?"0 16px 0 6px":"0 16px"};
|
|
955
|
+
border-radius: 32px;
|
|
956
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
957
|
+
|
|
958
|
+
${({$isOpen:e,$isMulti:t,theme:o})=>e&&!t?Bt`
|
|
959
|
+
border: 1px solid ${o.text.grey};
|
|
960
|
+
background: ${o.colors.dropdown_bg_2};
|
|
961
|
+
`:Bt`
|
|
962
|
+
border: 1px solid ${o.colors.border};
|
|
963
|
+
background: transparent;
|
|
964
|
+
`};
|
|
965
|
+
|
|
966
|
+
${({$hasError:e,$status:t})=>e?Bt`
|
|
967
|
+
border-color: ${({theme:e})=>e.text.error};
|
|
968
|
+
`:t?Bt`
|
|
969
|
+
border-color: ${({theme:e})=>e.text[t]};
|
|
970
|
+
`:""}
|
|
971
|
+
|
|
972
|
+
&:hover {
|
|
973
|
+
border-color: ${({$isMulti:e,$hasSelections:t,$disabled:o,theme:n})=>o?"auto":e&&t?n.colors.border:n.colors.secondary};
|
|
974
|
+
}
|
|
975
|
+
`,El=_t.div`
|
|
976
|
+
display: flex;
|
|
977
|
+
align-items: center;
|
|
978
|
+
gap: 4px;
|
|
979
|
+
`,Sl=({options:e,value:t,onSelect:o,onDeselect:n,title:i,tooltip:r,placeholder:a,disabled:s=!1,isMulti:l=!1,showSearch:c=!1,required:d=!1,errorMessage:p,hasError:u=!1,status:h})=>{const[m,g]=wt(!1),[$,f]=wt(!1),x=vt(null);Lr(x,()=>g(!1));const b=()=>{(()=>{if(x.current){const e=x.current.getBoundingClientRect().bottom+300>window.innerHeight;f(e)}})(),g(e=>!e)},y=Array.isArray(t)?t.length:0;return xt.createElement(kl,{$disabled:s},xt.createElement(ml,{title:i,required:d,tooltip:r,status:h}),xt.createElement(vl,{ref:x},xt.createElement(Cl,{$isOpen:m,$isMulti:l,$hasSelections:!!Array.isArray(t)&&!!t.length,$hasError:!!p||u,$status:h,$disabled:s,onClick:()=>!s&&b()},xt.createElement(zl,{value:t,placeholder:a,onDeselect:n}),xt.createElement(El,null,l&&xt.createElement(pr,{label:y,filled:!!y}),xt.createElement(ps,{extend:m}))),m&&xt.createElement(Nl,{openUpwards:$,options:e,value:t,onSelect:e=>{o?.(e),l||b()},onDeselect:e=>{n?.(e),l||b()},isMulti:l,showSearch:c})),!!p&&xt.createElement(Ki,null,p))},Al=_t(El)`
|
|
980
|
+
max-width: calc(100% - 50px);
|
|
981
|
+
overflow-x: auto;
|
|
982
|
+
`,Dl=_t(Hi)`
|
|
983
|
+
display: flex;
|
|
984
|
+
align-items: center;
|
|
985
|
+
gap: 2px;
|
|
986
|
+
padding: 4px 12px;
|
|
987
|
+
background: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
988
|
+
border-radius: 360px;
|
|
989
|
+
white-space: nowrap;
|
|
990
|
+
text-overflow: ellipsis;
|
|
991
|
+
img {
|
|
992
|
+
&:hover {
|
|
993
|
+
transform: scale(2);
|
|
994
|
+
transition: transform 0.3s;
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
`,Tl=_t(Hi)``,zl=({value:e,placeholder:t,onDeselect:o})=>{const n=Pi.useTheme();return Array.isArray(e)?e.length?xt.createElement(Al,null,e.map(e=>xt.createElement(Dl,{key:`multi-label-${e.id}`,size:14},e.value,xt.createElement(ga,{orientation:"vertical",length:"10px",margin:"0 4px"}),xt.createElement(Ye,{size:12,onClick:t=>{t.stopPropagation(),o?.(e)}})))):xt.createElement(Tl,{size:14,color:n.text.darker_grey},t):xt.createElement(Tl,{size:14,color:e?.value?void 0:n.text.darker_grey},e?.value||t)},Fl=_t.div`
|
|
998
|
+
position: absolute;
|
|
999
|
+
${({$openUpwards:e})=>e?"bottom":"top"}: calc(100% + 8px);
|
|
1000
|
+
left: 0;
|
|
1001
|
+
z-index: 1;
|
|
1002
|
+
display: flex;
|
|
1003
|
+
flex-direction: column;
|
|
1004
|
+
overflow-y: auto;
|
|
1005
|
+
width: calc(100% - 16px);
|
|
1006
|
+
max-height: 200px;
|
|
1007
|
+
gap: 8px;
|
|
1008
|
+
padding: 8px;
|
|
1009
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1010
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1011
|
+
border-radius: 24px;
|
|
1012
|
+
`,Ol=_t.div`
|
|
1013
|
+
display: flex;
|
|
1014
|
+
flex-direction: column;
|
|
1015
|
+
align-items: center;
|
|
1016
|
+
`,Nl=({openUpwards:e,options:t,value:o,onSelect:n,onDeselect:i,isMulti:r,showSearch:a})=>{const[s,l]=wt(""),c=t.filter(e=>e.value?.toLowerCase().includes(s?.toLowerCase()));return xt.createElement(Fl,{$openUpwards:e},a&&xt.createElement(Ol,null,xt.createElement(wl,{placeholder:"Search...",icon:rt,value:s,onChange:e=>l(e.target.value)}),xt.createElement(ga,{thickness:1,margin:"8px 0 0 0"})),0===c.length?xt.createElement(Zs,{subTitle:a&&s?void 0:" "}):c.map((e,t)=>xt.createElement(_l,{key:`dropdown-option-${e.id||t}`,option:e,value:o,isMulti:r,onSelect:n,onDeselect:i})))},Il=_t.div`
|
|
1017
|
+
padding: 8px 12px;
|
|
1018
|
+
cursor: pointer;
|
|
1019
|
+
display: flex;
|
|
1020
|
+
justify-content: space-between;
|
|
1021
|
+
align-items: center;
|
|
1022
|
+
border-radius: 32px;
|
|
1023
|
+
&:hover,
|
|
1024
|
+
&.selected {
|
|
1025
|
+
background: ${({theme:e})=>e.colors.majestic_blue+Pi.opacity.hex["024"]};
|
|
1026
|
+
}
|
|
1027
|
+
`,_l=({option:e,value:t,isMulti:o,onSelect:n,onDeselect:i})=>{const r=Pi.useTheme(),a=Array.isArray(t)?!!t?.find(t=>t.id===e.id):t?.id===e.id,s=t=>t?n?.(e):i?.(e);return o?xt.createElement(Il,{className:a?"selected":"",onClick:()=>s(!a)},xt.createElement(Ga,{title:e.value||"",titleColor:r.text.secondary,value:a,onChange:s,style:{width:"100%"}})):xt.createElement(Il,{className:a?"selected":"",onClick:()=>a?i?.(e):n?.(e)},xt.createElement(Jr,{$gap:8},e.icon&&xt.createElement(e.icon,null),xt.createElement(Hi,{size:14},e.value)),a&&xt.createElement(Ge,null))},Bl=_t(Xr)`
|
|
1028
|
+
gap: 12px;
|
|
1029
|
+
`,Rl=_t(Jr)`
|
|
1030
|
+
width: 100%;
|
|
1031
|
+
gap: 12px;
|
|
1032
|
+
align-items: flex-end;
|
|
1033
|
+
`,Ll=({clientX:e=0,flipX:t,clientY:o=0,flipY:n,isOpen:i,onClose:r,onSave:a,withDelete:s,onDelete:l,title:c,titleTooltip:d,warning:p,children:u})=>{const h=Pi.useTheme(),{popupRef:m,popupPosition:g,handlePosition:$}=Mr({onClickOutside:r});return Rr({key:"Enter",active:i},a),kt(()=>$(e,o),[e,o]),0===g.top&&0!==o||0===g.left&&0!==e?null:xt.createElement(ya,{ref:m,isOpen:i,top:n?void 0:g.top,bottom:n?g.top:void 0,left:t?void 0:g.left,right:t?g.left:void 0,padding:"24px"},xt.createElement(Bl,null,xt.createElement(va,{text:d,withIcon:!0},xt.createElement(Hi,{size:14},c)),xt.createElement(Rl,null,u,xt.createElement(Jr,{$gap:6},xt.createElement(Sa,{withBorder:!0,onClick:r,tooltip:"Cancel"},xt.createElement(Ye,null)),xt.createElement(Sa,{withBorder:!0,backgroundColor:h.colors.secondary,onClick:a,tooltip:"Save"},xt.createElement(Ge,{fill:h.text.primary})),s&&xt.createElement(Sa,{onClick:l,tooltip:"Undo"},xt.createElement(at,null)))),p&&xt.createElement(_a,{type:Co.Warning,message:p})))},Ml=_t.div`
|
|
1034
|
+
position: relative;
|
|
1035
|
+
`,Pl=({defaultLanguage:e=xo.Unknown,defaultVersion:t="",defaultOtelDistroName:o=null,handleSave:n})=>{const{tier:i}=Cr(),{addNotification:r}=wi(),{formData:a,handleFormChange:s,resetFormData:l}=$r({language:e,version:t,otelDistroName:o}),[c,d]=wt(!1),p=()=>{d(!1),l()},u=yt(()=>{if(!a.language)return[];const e=pi[a.language].community,t=i===go.Onprem?pi[a.language].enterprise:[];return e.concat(t)},[a.language,i]);return xt.createElement(Ml,null,xt.createElement(Sa,{tooltip:Zo.OVERRIDE_RUNTIME_DETAILS,size:32,onClick:()=>{d(!0)}},xt.createElement(tt,null)),xt.createElement(Ll,{flipX:!0,clientX:36,isOpen:c,onClose:p,onSave:async()=>{!a.version||Mn(a.version)?(await n({...a}),p()):r({type:Co.Warning,message:Xo.INVALID_VERSION,hideFromHistory:!0})},withDelete:!0,onDelete:async()=>{await n({language:null,version:"",otelDistroName:null}),p()},title:Zo.OVERRIDE_RUNTIME_DETAILS,warning:Zo.OVERRIDE_RUNTIME_WARNING},xt.createElement(Xr,{$gap:12},xt.createElement(Jr,{$gap:12},xt.createElement(Sl,{title:Zo.LANGUAGE,options:di,value:di.find(e=>e.id===a.language),onSelect:e=>{s("language",e.id),s("version",""),s("otelDistroName",null)},required:!0}),xt.createElement(wl,{title:Zo.RUNTIME_VERSION,placeholder:Zo.VERSION_PLACEHOLDER,value:a.version,onChange:e=>s("version",e.target.value),required:!1})),a.language&&xt.createElement(Sl,{title:"Otel Distro Name",options:u,value:u.find(e=>e.id===a.otelDistroName),onSelect:e=>s("otelDistroName",e.id),required:!1}))))},jl=_t(Jr)`
|
|
1036
|
+
width: 100%;
|
|
1037
|
+
justify-content: center;
|
|
1038
|
+
`,Ul=({containerName:e,language:t,runtimeVersion:o,overriden:n,instrumented:i,instrumentationMessage:r,otelDistroName:a,callbackRuntimeOverride:s})=>{const l=Rt(),c=i?Co.Success:r?Co.Info:Co.Warning,d=i?Eo.INSTRUMENTED:r?Eo.NOT_INSTRUMENTED:Eo.INSTRUMENTING;return xt.createElement(Ws,{title:e,subTitle:`${t?ci[t]:"no runtime info"}`+(o?` • Runtime Version: ${o}`:""),iconProps:{icon:cn(t)},extendableProps:{isExtended:!!r,renderExtended:()=>xt.createElement(jl,null,xt.createElement(Hi,{size:12,family:"secondary",color:l.text.info},Pn(r)))},renderActions:()=>xt.createElement(xt.Fragment,null,xt.createElement(ks,{status:c,title:d,subtitle:a||void 0,withIcon:!0,withBorder:!0}),n&&xt.createElement(ks,{status:Co.Default,forceIcon:st,title:Zo.OVERIDDEN,withIcon:!0,withBorder:!0}),s&&xt.createElement(Pl,{defaultLanguage:t,defaultVersion:o,defaultOtelDistroName:a,handleSave:t=>s({...t,containerName:e})}))})},Wl=_t.tr`
|
|
1039
|
+
cursor: ${({$withHover:e})=>e?"pointer":"default"};
|
|
1040
|
+
opacity: ${({$faded:e})=>e?.5:1};
|
|
1041
|
+
`,Vl=_t.td`
|
|
1042
|
+
position: relative;
|
|
1043
|
+
width: fit-content;
|
|
1044
|
+
padding: 16px 8px 16px ${({$isFirst:e})=>e?"16px":"8px"};
|
|
1045
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
1046
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1047
|
+
font-size: 14px;
|
|
1048
|
+
white-space: nowrap;
|
|
1049
|
+
`,Hl=_t(Hi)`
|
|
1050
|
+
font-size: 14px;
|
|
1051
|
+
color: ${({$color:e,theme:t})=>e??t.text.secondary};
|
|
1052
|
+
line-height: 16px;
|
|
1053
|
+
|
|
1054
|
+
overflow: hidden;
|
|
1055
|
+
overflow-wrap: break-word;
|
|
1056
|
+
white-space: wrap;
|
|
1057
|
+
text-wrap: wrap;
|
|
1058
|
+
text-overflow: ellipsis;
|
|
1059
|
+
display: -webkit-box;
|
|
1060
|
+
-webkit-line-clamp: 2;
|
|
1061
|
+
-webkit-box-orient: vertical;
|
|
1062
|
+
`,ql=_t.div`
|
|
1063
|
+
position: absolute;
|
|
1064
|
+
top: 0;
|
|
1065
|
+
left: 0;
|
|
1066
|
+
z-index: -1;
|
|
1067
|
+
width: ${({$width:e})=>e}px;
|
|
1068
|
+
height: ${({$height:e})=>e}px;
|
|
1069
|
+
border-radius: 16px;
|
|
1070
|
+
background-color: ${({theme:e,$hovered:t,$status:o})=>t?o?e.text[o]+Pi.opacity.hex["020"]:e.colors.majestic_blue+Pi.opacity.hex["030"]:o?e.text[o]+Pi.opacity.hex["010"]:e.colors.secondary+Pi.opacity.hex["005"]};
|
|
1071
|
+
`,Gl=({index:e,columns:t,cells:o,onClick:n,status:i,faded:r})=>{const{containerRef:a,containerHeight:s,containerWidth:l}=Sr(),[c,d]=wt(!1);return xt.createElement(Wl,{ref:a,onMouseEnter:()=>!!n&&d(!0),onMouseLeave:()=>!!n&&d(!1),onClick:()=>!!n&&n(),$withHover:!!n,$faded:r},t.map(({key:t},n)=>{const r=o.find(({columnKey:e})=>e===t);if(!r)return null;const{value:a,textColor:d,withTooltip:p,icon:u,component:h}=r;return xt.createElement(Vl,{key:`table-row-${t}-${a}-${e}-${n}`,$isFirst:0===n},u?xt.createElement(Os,{icon:u}):h?xt.createElement(h,null):xt.createElement(va,{text:p&&a?String(a):""},xt.createElement(Hl,{$color:d},Nn(a)?"-":a)),0===n&&xt.createElement(ql,{$height:s,$width:l,$top:s*e,$hovered:c,$status:i}))}))},Kl=_t.div`
|
|
1072
|
+
width: 100%;
|
|
1073
|
+
`,Yl=_t.table`
|
|
1074
|
+
position: relative;
|
|
1075
|
+
z-index: 0;
|
|
1076
|
+
width: 100%;
|
|
1077
|
+
border-collapse: separate;
|
|
1078
|
+
border-spacing: 0 12px;
|
|
1079
|
+
`,Jl=_t.thead`
|
|
1080
|
+
// only supported with "border-collapse: collapse;"
|
|
1081
|
+
// border-top: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1082
|
+
// border-bottom: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1083
|
+
`,Xl=_t.th`
|
|
1084
|
+
// only required with "border-collapse: separate;"
|
|
1085
|
+
border-top: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1086
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
1087
|
+
|
|
1088
|
+
padding: 8px;
|
|
1089
|
+
`,Zl=_t(Jr)`
|
|
1090
|
+
cursor: pointer;
|
|
1091
|
+
&:hover {
|
|
1092
|
+
* {
|
|
1093
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
`,Ql=_t(Hi)`
|
|
1097
|
+
color: ${({theme:e})=>e.text.darker_grey};
|
|
1098
|
+
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
1099
|
+
text-transform: uppercase;
|
|
1100
|
+
font-size: 12px;
|
|
1101
|
+
font-weight: 500;
|
|
1102
|
+
text-wrap: nowrap;
|
|
1103
|
+
`,ec=_t.tbody``,tc=({columns:e,rows:t})=>{const[o,n]=wt(mo.Ascending),[i,r]=wt("name"),a=St(e=>{i===e?n(e=>e===mo.Ascending?mo.Descending:mo.Ascending):(r(e),n(mo.Ascending))},[i]),s=yt(()=>{const n=(e,t)=>e.cells.find(({columnKey:e})=>e===t)?.value??null;return(i?[...t].sort((e,t)=>{const r=n(e,i),a=n(t,i);return(o===mo.Ascending?1:-1)*((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:"string"==typeof e&&"string"==typeof t?e.localeCompare(t):"boolean"==typeof e&&"boolean"==typeof t?e===t?0:e?1:-1:String(e).localeCompare(String(t)))(r,a)}):t).map(({status:t,faded:o,cells:n,onClick:i},r)=>xt.createElement(Gl,{key:`row-${r}`,index:r,columns:e,cells:n,onClick:i,status:t,faded:o}))},[e,t,i,o]);return xt.createElement(Kl,null,xt.createElement(Yl,null,xt.createElement(Jl,null,xt.createElement("tr",null,e.map(({key:e,title:t,sortable:o})=>xt.createElement(Xl,{key:`column-${e}`},o?xt.createElement(Zl,{onClick:()=>a(e)},xt.createElement(lt,null),xt.createElement(Ql,null,t)):xt.createElement(Ql,null,t))))),xt.createElement(ec,null,s)))};var oc;!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"}(oc||(oc={}));const nc=_t.div`
|
|
1104
|
+
display: flex;
|
|
1105
|
+
flex-wrap: wrap;
|
|
1106
|
+
gap: 16px 32px;
|
|
1107
|
+
width: 100%;
|
|
1108
|
+
`,ic=_t.div`
|
|
1109
|
+
display: flex;
|
|
1110
|
+
flex-direction: column;
|
|
1111
|
+
gap: 2px;
|
|
1112
|
+
width: ${({$width:e})=>e};
|
|
1113
|
+
`,rc=_t(Hi)`
|
|
1114
|
+
color: ${({theme:e})=>e.text.grey};
|
|
1115
|
+
font-size: 10px;
|
|
1116
|
+
line-height: 16px;
|
|
1117
|
+
`,ac=_t(Hi)`
|
|
1118
|
+
font-size: 12px;
|
|
1119
|
+
white-space: pre-wrap;
|
|
1120
|
+
`,sc=({data:e})=>xt.createElement(nc,null,e?.map(({type:e,title:t,titleIcon:o,tooltip:n,value:i},r)=>xt.createElement(ic,{key:`data-field-${t||(i?JSON.stringify(i):r)}`,$width:e&&[oc.Code,oc.Table].includes(e)?"inherit":e&&[oc.Loader,oc.Divider,oc.CopyText].includes(e)?"100%":"unset"},xt.createElement(va,{text:n,withIcon:!0},xt.createElement(Jr,{$alignItems:"center",$gap:4},o&&xt.createElement(o,{size:14}),!!t&&xt.createElement(rc,{transform:"capitalize"},t))),xt.createElement(lc,{type:e,value:i})))),lc=({type:e,value:t})=>{const o=Pi.useTheme();switch(e){case oc.Divider:return xt.createElement(ga,{length:"100%",margin:"0"});case oc.Loader:return xt.createElement(Zr,null,xt.createElement(cs,{scale:1.2}));case oc.Monitors:return xt.createElement(Rs,{monitors:t?.split(", ")||[],withLabels:!0,color:o.colors.secondary});case oc.Badge:{const{label:e,filled:o,...n}=zn(t,{label:"-",filled:!1});return xt.createElement(pr,{label:e,filled:o,...n})}case oc.Code:{const{language:e,code:o,...n}=zn(t,{language:"",code:""});return xt.createElement(ns,{language:e,code:o,...n})}case oc.Table:{const{columns:e,rows:o,...n}=zn(t,{columns:[],rows:[{status:void 0,cells:[]}]});return xt.createElement(tc,{columns:e,rows:o,...n})}case oc.ActiveStatus:return xt.createElement(ks,{status:"true"==t?Co.Success:Co.Error,title:"true"==t?Zo.ENABLED:Zo.DISABLED,size:10,withIcon:!0,withBorder:!0});case oc.CopyText:{const e="string"==typeof t?t:JSON.stringify(t);return xt.createElement(Es,{value:e})}default:return xt.createElement(ac,null,qn("string"==typeof t?t||"-":""))}},cc=_t.div`
|
|
1121
|
+
display: flex;
|
|
1122
|
+
flex-direction: column;
|
|
1123
|
+
align-items: flex-start;
|
|
1124
|
+
align-self: stretch;
|
|
1125
|
+
gap: 16px;
|
|
1126
|
+
padding: 24px;
|
|
1127
|
+
border-radius: 24px;
|
|
1128
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1129
|
+
background-color: ${({theme:e,$hovered:t})=>t?e.colors.secondary+Pi.opacity.hex["010"]:"transparent"};
|
|
1130
|
+
transition: background-color 0.3s;
|
|
1131
|
+
`,dc=_t.div`
|
|
1132
|
+
width: 100%;
|
|
1133
|
+
display: flex;
|
|
1134
|
+
flex-direction: column;
|
|
1135
|
+
gap: 4px;
|
|
1136
|
+
cursor: ${({$clickable:e})=>e?"pointer":"default"};
|
|
1137
|
+
`,pc=_t(Hi)`
|
|
1138
|
+
width: 100%;
|
|
1139
|
+
display: flex;
|
|
1140
|
+
align-items: center;
|
|
1141
|
+
gap: 8px;
|
|
1142
|
+
font-size: 16px;
|
|
1143
|
+
`,uc=_t(Hi)`
|
|
1144
|
+
font-size: 12px;
|
|
1145
|
+
color: ${({theme:e})=>e.text.grey};
|
|
1146
|
+
`,hc=_t(Jr)`
|
|
1147
|
+
margin-left: auto;
|
|
1148
|
+
gap: 8px;
|
|
1149
|
+
`,mc=({title:e="Details",titleBadge:t,titleIcon:o,description:n,action:i,withExtend:r,initialExtended:a=!1,data:s,children:l})=>{const[c,d]=wt(a),[p,u]=wt(!1);return xt.createElement(cc,{$hovered:p},e||o||n||i?xt.createElement(dc,{$clickable:r||!1,onClick:()=>r&&d(e=>!e),onMouseEnter:()=>r&&u(!0),onMouseLeave:()=>r&&u(!1)},xt.createElement(Jr,null,xt.createElement(Jr,{$alignItems:"center",$gap:8},o&&xt.createElement(Jr,{$alignItems:"center"},xt.createElement(o,{size:20})),!!e&&xt.createElement(pc,{transform:"capitalize"},e),t===So.Loading?xt.createElement(cs,null):void 0!==t&&xt.createElement(pr,{label:t})),(!!i||r)&&xt.createElement(hc,null,"function"==typeof i?xt.createElement(i,{hovered:p}):i,r&&xt.createElement(ps,{extend:c}))),!!n&&xt.createElement(uc,null,n)):null,(!r||r&&c)&&(l||xt.createElement(sc,{data:s})))},gc=_t.div`
|
|
1150
|
+
visibility: hidden;
|
|
1151
|
+
`,$c=_t(Jr)`
|
|
1152
|
+
align-self: stretch;
|
|
1153
|
+
width: calc(100% - 32px);
|
|
1154
|
+
padding: 16px;
|
|
1155
|
+
border-radius: 16px;
|
|
1156
|
+
background-color: ${({theme:e})=>e.colors.secondary+Pi.opacity.hex["005"]};
|
|
1157
|
+
${({theme:e,$withClick:t})=>t?Bt`
|
|
1158
|
+
&:hover {
|
|
1159
|
+
cursor: pointer;
|
|
1160
|
+
background-color: ${e.colors.secondary+Pi.opacity.hex["010"]};
|
|
1161
|
+
${gc} {
|
|
1162
|
+
visibility: visible;
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
`:`\n &:hover {\n ${gc} {\n visibility: visible;\n }\n }\n `}
|
|
1166
|
+
`,fc=_t(Jr)`
|
|
1167
|
+
margin-left: auto;
|
|
1168
|
+
gap: 8px;
|
|
1169
|
+
`,xc=_t(Hi)`
|
|
1170
|
+
font-size: 10px;
|
|
1171
|
+
color: ${({theme:e})=>e.text.grey};
|
|
1172
|
+
`,bc=({title:e,subTitle:t,icons:o,iconSrcs:n,onClick:i,renderActions:r})=>{const a=Pi.useTheme(),[s,l]=wt(0),c=vt(null),d=vt(null);return kt(()=>{if(c.current){const e=c.current.clientWidth,t=d.current?.clientWidth||0;l(e-(85+t))}},[]),xt.createElement($c,{ref:c,$gap:8,$withClick:!!i,onClick:i},xt.createElement(_s,{id:`${e}-${t}`,icons:o,iconSrcs:n}),e&&xt.createElement(Ts,{maxWidth:s/2,text:e,textSize:14}),e&&t&&xt.createElement(xc,null,"•"),t&&xt.createElement(Ts,{maxWidth:s/2,text:t,textSize:10,textColor:a.text.grey}),xt.createElement(fc,{ref:d},r&&xt.createElement(xt.Fragment,null,xt.createElement(ga,{orientation:"vertical",length:"24px",margin:"0"}),r())))},yc=({isOpen:e,noOverlay:t,name:o,type:n,isLastItem:i,onApprove:r,onDeny:a})=>{const s=n===yo.Source?"uninstrument":"delete";return xt.createElement(Wa,{isOpen:e,noOverlay:t,title:`${s.charAt(0).toUpperCase()+s.substring(1)}${o?` ${o}`:""}`,description:`Are you sure you want to ${s}?`,note:i?{type:Co.Warning,title:`You're about to ${s} the last ${n||o}`,message:""}:void 0,approveButton:{text:"Confirm",variant:"danger",onClick:r},denyButton:{text:"Go Back",onClick:a}})},wc=_t(gr)`
|
|
1173
|
+
display: flex;
|
|
1174
|
+
align-items: center;
|
|
1175
|
+
justify-content: center;
|
|
1176
|
+
font-size: 14px;
|
|
1177
|
+
gap: 6px;
|
|
1178
|
+
min-width: 100px;
|
|
1179
|
+
`,kc=({endpoint:e="/",variant:t="secondary"})=>xt.createElement(wc,{variant:t,onClick:()=>window.open(`https://docs.odigos.io${e}`,"_blank","noopener noreferrer")},xt.createElement(ct,{size:18}),"Docs"),vc=_t(Jr)`
|
|
1180
|
+
border-bottom: ${({$hideBorder:e,theme:t})=>e?"none":`1px solid ${t.colors.border}`};
|
|
1181
|
+
`,Cc=_t.div`
|
|
1182
|
+
display: flex;
|
|
1183
|
+
align-items: center;
|
|
1184
|
+
border-bottom: 2px solid ${({theme:e,$selected:t})=>t?e.colors.majestic_blue:"transparent"};
|
|
1185
|
+
cursor: pointer;
|
|
1186
|
+
`,Ec=_t(Hi)`
|
|
1187
|
+
padding: 12px;
|
|
1188
|
+
font-size: 14px;
|
|
1189
|
+
color: ${({theme:e,$selected:t})=>t?e.text.secondary:e.text.grey};
|
|
1190
|
+
`,Sc=({tabs:e,hideBorder:t=!1})=>e?.length?xt.createElement(vc,{$hideBorder:t},e.map(({label:e,icon:t,onClick:o,selected:n})=>xt.createElement(Cc,{key:`tab-${e}`,onClick:o,$selected:n},xt.createElement(Ec,{$selected:n},e),t&&xt.createElement(t,null)))):null,Ac=_t.section`
|
|
1191
|
+
padding: 0px 32px;
|
|
1192
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
1193
|
+
`,Dc=_t.div`
|
|
1194
|
+
height: 76px;
|
|
1195
|
+
display: flex;
|
|
1196
|
+
justify-content: space-between;
|
|
1197
|
+
flex-shrink: 0;
|
|
1198
|
+
align-self: stretch;
|
|
1199
|
+
`,Tc=_t.div`
|
|
1200
|
+
display: flex;
|
|
1201
|
+
align-items: center;
|
|
1202
|
+
gap: ${({$gap:e})=>e||16}px;
|
|
1203
|
+
`,zc=_t(Hi)`
|
|
1204
|
+
font-size: 18px;
|
|
1205
|
+
line-height: 26px;
|
|
1206
|
+
max-width: ${({$maxWidth:e})=>e};
|
|
1207
|
+
overflow: hidden;
|
|
1208
|
+
white-space: nowrap;
|
|
1209
|
+
text-overflow: ellipsis;
|
|
1210
|
+
`,Fc=_t(gr)`
|
|
1211
|
+
gap: 8px;
|
|
1212
|
+
`,Oc=_t(gr)``,Nc=({onClose:e,width:t,icons:o,iconSrcs:n,title:i,titleTooltip:r,replaceTitleWith:a,actions:s,actionButtons:l=[],tabs:c})=>xt.createElement(Ac,null,xt.createElement(Dc,null,xt.createElement(Tc,null,o?.length||n?.length?xt.createElement(_s,{icons:o,iconSrcs:n,id:`drawer-header-${i}`}):null,("function"==typeof a?xt.createElement(a,null):a||null)||xt.createElement(va,{text:r||i,withIcon:!!r},i&&xt.createElement(zc,{$maxWidth:`calc(${t} ${s||l.length?"/ 5":"- 192px"})`},i))),xt.createElement(Tc,{$gap:2},s,l.map((e,t)=>xt.createElement(Fc,{key:`header-action-button-${t}`,...e})),xt.createElement(Oc,{"data-id":"drawer-close",variant:"secondary",onClick:e},xt.createElement(Ye,{size:12})))),xt.createElement(Sc,{tabs:c,hideBorder:!0})),Ic=_t.div`
|
|
1213
|
+
display: flex;
|
|
1214
|
+
justify-content: space-between;
|
|
1215
|
+
gap: 8px;
|
|
1216
|
+
padding: 24px 18px 24px 32px;
|
|
1217
|
+
border-top: 1px solid ${({theme:e})=>e.colors.border};
|
|
1218
|
+
background-color: ${({theme:e})=>e.colors.translucent_bg};
|
|
1219
|
+
transform: translateY(100%);
|
|
1220
|
+
animation-name: ${Pi.animations.slide.in.bottom};
|
|
1221
|
+
`,_c=_t(Jr)`
|
|
1222
|
+
margin-right: auto;
|
|
1223
|
+
`,Bc=_t(Jr)`
|
|
1224
|
+
margin: 0 auto;
|
|
1225
|
+
`,Rc=_t(Jr)`
|
|
1226
|
+
margin-left: auto;
|
|
1227
|
+
`,Lc=_t(gr)`
|
|
1228
|
+
min-width: 140px;
|
|
1229
|
+
font-size: 14px;
|
|
1230
|
+
`,Mc=({isOpen:e,leftButtons:t=[],centerButtons:o=[],rightButtons:n=[]})=>e?xt.createElement(Ic,null,xt.createElement(_c,null,t.map((e,t)=>xt.createElement(Lc,{key:`footer-left-button-${t}`,...e}))),xt.createElement(Bc,null,o.map((e,t)=>xt.createElement(Lc,{key:`footer-center-button-${t}`,...e}))),xt.createElement(Rc,null,n.map((e,t)=>xt.createElement(Lc,{key:`footer-right-button-${t}`,...e})))):null,Pc=_t.div`
|
|
1231
|
+
position: fixed;
|
|
1232
|
+
top: 0;
|
|
1233
|
+
bottom: 0;
|
|
1234
|
+
${({$position:e})=>e}: 0;
|
|
1235
|
+
z-index: 1000;
|
|
1236
|
+
width: ${({$width:e})=>e};
|
|
1237
|
+
background: ${({theme:e})=>e.colors.translucent_bg};
|
|
1238
|
+
box-shadow: 0 2px 10px ${({theme:e})=>e.colors.primary+Pi.opacity.hex["010"]};
|
|
1239
|
+
overflow-y: auto;
|
|
1240
|
+
animation-name: ${({$position:e})=>Pi.animations.slide.in[e]};
|
|
1241
|
+
`,jc=_t.div`
|
|
1242
|
+
display: flex;
|
|
1243
|
+
flex-direction: column;
|
|
1244
|
+
height: 100%;
|
|
1245
|
+
`,Uc=_t.div`
|
|
1246
|
+
flex-grow: 1;
|
|
1247
|
+
padding: 24px 32px;
|
|
1248
|
+
overflow-y: auto;
|
|
1249
|
+
`,Wc=({isOpen:e,onClose:t,closeOnEscape:o=!0,position:n="right",width:i="300px",children:r,header:a,footer:s})=>(Rr({key:"Escape",active:e&&o},()=>t()),br(e),e?Vt.createPortal(xt.createElement(xt.Fragment,null,xt.createElement(ea,{hidden:!e,onClick:t}),xt.createElement(Pc,{"data-id":"drawer",$position:n,$width:i},xt.createElement(jc,null,xt.createElement(Nc,{onClose:t,width:i,...a}),xt.createElement(Uc,null,r),xt.createElement(Mc,{...s})))),document.body):null),Vc=({error:e})=>{const t=Pi.useTheme(),o={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 xt.createElement("div",{style:o.container},xt.createElement("h2",null,"Something went wrong!"),xt.createElement("pre",{style:o.errorMessage},e?.message||"Unknown Error"),xt.createElement("details",{style:o.errorStackWrapper},xt.createElement("summary",null,"Stack Trace"),xt.createElement("pre",{style:o.errorStack},e?.stack||"Unknown Stack")),xt.createElement("p",{style:o.infoText},"Try refreshing the page or contact support"),xt.createElement(gr,{variant:"secondary",onClick:()=>window.location.reload(),style:{fontSize:"1rem"}},"Reload"))},Hc=({children:e})=>xt.createElement(qt,{FallbackComponent:e=>xt.createElement(Pi.Provider,null,xt.createElement(Vc,{...e}))},e),qc=_t(Jr)`
|
|
1250
|
+
position: relative;
|
|
1251
|
+
width: calc(100% - 24px);
|
|
1252
|
+
padding: 12px;
|
|
1253
|
+
background-color: ${({theme:e})=>e.colors.dark_grey};
|
|
1254
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.border+Pi.opacity.hex["050"]};
|
|
1255
|
+
`,Gc=_t(Jr)`
|
|
1256
|
+
margin-right: auto;
|
|
1257
|
+
margin-left: 32px;
|
|
1258
|
+
gap: 12px;
|
|
1259
|
+
`,Kc=_t(Jr)`
|
|
1260
|
+
margin-left: auto;
|
|
1261
|
+
margin-right: 32px;
|
|
1262
|
+
gap: 12px;
|
|
1263
|
+
`,Yc=_t(Jr)`
|
|
1264
|
+
position: absolute;
|
|
1265
|
+
left: 50%;
|
|
1266
|
+
transform: translateX(-50%);
|
|
1267
|
+
gap: 12px;
|
|
1268
|
+
`,Jc=({left:e=[],center:t=[],right:o=[]})=>xt.createElement(qc,null,xt.createElement(Gc,null,e.map((e,t)=>e&&xt.createElement(bt,{key:t},e))),xt.createElement(Yc,null,t.map((e,t)=>e&&xt.createElement(bt,{key:t},e))),xt.createElement(Kc,null,o.map((e,t)=>e&&xt.createElement(bt,{key:t},e)))),Xc=_t(Hi)`
|
|
1269
|
+
color: ${({theme:e})=>e.text.grey};
|
|
1270
|
+
`,Zc=({icon:e,title:t,badge:o,badgeTooltip:n,loading:i})=>xt.createElement(Jr,{$gap:6},e&&xt.createElement(e,null),xt.createElement(Xc,{size:14},t),void 0!==o&&xt.createElement(va,{text:n},xt.createElement(pr,{label:o})),i&&xt.createElement(cs,null)),Qc=_t.div`
|
|
1271
|
+
width: fit-content;
|
|
1272
|
+
height: fit-content;
|
|
1273
|
+
padding: 4px;
|
|
1274
|
+
gap: 4px;
|
|
1275
|
+
border-radius: 32px;
|
|
1276
|
+
border: 1px solid ${({theme:e})=>e.colors.border+Pi.opacity.hex["070"]};
|
|
1277
|
+
|
|
1278
|
+
display: flex;
|
|
1279
|
+
flex-direction: ${({$orientation:e,$flip:t})=>("horizontal"===e?"row":"column")+(t?"-reverse":"")};
|
|
1280
|
+
align-items: center;
|
|
1281
|
+
justify-content: center;
|
|
1282
|
+
`,ed=_t.div`
|
|
1283
|
+
width: 32px;
|
|
1284
|
+
height: 32px;
|
|
1285
|
+
|
|
1286
|
+
border-radius: 100%;
|
|
1287
|
+
background-color: ${({theme:e,$selected:t})=>t?e.colors.majestic_blue+Pi.opacity.hex["070"]:e.colors.secondary+Pi.opacity.hex["012"]};
|
|
1288
|
+
transition: background-color 0.3s;
|
|
1289
|
+
|
|
1290
|
+
display: flex;
|
|
1291
|
+
align-items: center;
|
|
1292
|
+
justify-content: center;
|
|
1293
|
+
|
|
1294
|
+
cursor: pointer;
|
|
1295
|
+
`,td=({orientation:e="vertical",flip:t,mainIcons:o,subIcons:n})=>xt.createElement(Qc,{$orientation:e,$flip:t},o.map(({icon:e,selected:t,onClick:o,tooltip:n},i)=>xt.createElement(va,{key:`main-nav-icon-${i}`,text:n},xt.createElement(ed,{$selected:t,onClick:o},xt.createElement(e,{size:20})))),!!o.length&&!!n.length&&xt.createElement(ga,{orientation:"vertical"===e?"horizontal":"vertical",margin:"0",length:"20px"}),n.map(({icon:e,selected:t,onClick:o,tooltip:n},i)=>xt.createElement(va,{key:`sub-nav-icon-${i}`,text:n},xt.createElement(ed,{$selected:t,onClick:o},xt.createElement(e,{size:20}))))),od=_t.div`
|
|
1296
|
+
display: flex;
|
|
1297
|
+
flex-direction: column;
|
|
1298
|
+
width: 100%;
|
|
1299
|
+
`,nd=_t.div`
|
|
1300
|
+
display: flex;
|
|
1301
|
+
flex-direction: column;
|
|
1302
|
+
gap: 8px;
|
|
1303
|
+
`,id=_t.div`
|
|
1304
|
+
display: flex;
|
|
1305
|
+
align-items: center;
|
|
1306
|
+
gap: 16px;
|
|
1307
|
+
`,rd=_t(Sa)`
|
|
1308
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1309
|
+
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1310
|
+
`,ad=({initialValues:e=[],value:t,onChange:o,title:n,tooltip:i,required:r,errorMessage:a})=>{const[s,l]=wt(t||e);kt(()=>{s.length||l([""])},[]);const c=s.filter(e=>!!e.trim()),d=vt(JSON.stringify(c));kt(()=>{const e=JSON.stringify(c);d.current!==e&&(d.current=e,o&&o(c))},[c]);const p=(e,t)=>{l(o=>{const n=[...o];return n[t]=e,n})},u=s.length<=1,h=s.some(e=>""===e.trim()),m=u&&h;return xt.createElement(od,null,xt.createElement(ml,{title:n,required:r,tooltip:i}),xt.createElement(nd,null,s.map((e,t)=>{const o=t===s.length-1;return xt.createElement(id,{key:`input-list-${t}`},xt.createElement(wl,{value:e,onChange:e=>p(e.target.value,t),hasError:!!a,autoFocus:Nn(e)&&!u&&o}),t===s.length-1&&xt.createElement(rd,{withBorder:!0,size:30,$disabled:h,onClick:h?void 0:()=>{l(e=>{const t=[...e];return t.push(""),t})}},xt.createElement(et,null)),xt.createElement(rd,{size:30,$disabled:m,onClick:m?void 0:()=>(e=>{u?p("",e):l(t=>t.filter((t,o)=>o!==e))})(t)},xt.createElement(at,null)))})),!!a&&xt.createElement(Ki,null,a))},sd=({col:e,colIdx:t,row:o,rowIdx:n,rowsLength:i,maxWidth:r,handleChange:a,errorMessage:s,limitFieldsPerRow:l})=>{const{keyName:c,title:d,tooltip:p,placeholder:u,required:h,type:m,componentType:g,options:$,renderCondition:f}=e,x=o[c];return f&&!f(o)?null:xt.createElement("td",{key:`input-table-${n}-${c}`,style:{maxWidth:r,padding:"4px 6px 4px 0"}},(()=>{switch(g){case ko.Dropdown:const e=$?.find(e=>e.id===x);return xt.createElement(Sl,{title:l?d:void 0,tooltip:l?p:void 0,placeholder:u,required:h,options:$||[],value:e,onSelect:e=>a(c,e.id,n),onDeselect:()=>a(c,"",n),hasError:!!s&&(!h||h&&Nn(x))});case"multi-dropdown":const o=Array.isArray(x)&&$?.filter(e=>x.includes(e.id))||[];return xt.createElement(Sl,{title:l?d:void 0,tooltip:l?p:void 0,placeholder:u,required:h,options:$||[],value:o,isMulti:!0,onSelect:e=>{const t=[...Array.isArray(x)?x:[],e.id];a(c,t,n)},onDeselect:e=>{const t=(Array.isArray(x)?x:[]).filter(t=>t!==e.id);a(c,t,n)},hasError:!!s&&(!h||h&&Nn(x))});default:const g=i>1&&n===i-1&&0===t&&Nn(x);return xt.createElement(wl,{title:l?d:void 0,tooltip:l?p:void 0,placeholder:u,type:m,required:h,autoFocus:g,value:x,onChange:({target:{value:e}})=>a(c,e,n),style:{maxWidth:r,paddingLeft:10},hasError:!!s&&(!h||h&&Nn(x))})}})())},ld=_t.div`
|
|
1311
|
+
display: flex;
|
|
1312
|
+
flex-direction: column;
|
|
1313
|
+
width: 100%;
|
|
1314
|
+
`,cd=_t.button`
|
|
1315
|
+
margin-top: ${({$marginTop:e})=>e};
|
|
1316
|
+
background: none;
|
|
1317
|
+
border: none;
|
|
1318
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1319
|
+
opacity: ${({disabled:e})=>e?.5:1};
|
|
1320
|
+
`,dd=({columns:e,initialValues:t=[],value:o,onChange:n,errorMessage:i,limitFieldsPerRow:r,title:a=""})=>{const[s,l]=wt({}),[c,d]=wt(o||t),p=yt(()=>new Map(e.map(e=>[e.keyName,e])),[e]);kt(()=>{if(!c.length){const t={};e.forEach(({keyName:e})=>t[e]=""),l(t),d([t])}},[]);const u=c.filter(e=>{for(const[t,o]of Object.entries(e)){const n=p.get(t);if((!n?.renderCondition||n.renderCondition(e))&&n?.required&&Nn(o))return!1}return!0}),h=vt(JSON.stringify(u)),m=u.length!==c.length,g=`${Math.floor(640/((r||e.length)+.4))}px`;kt(()=>{const e=JSON.stringify(u);h.current!==e&&(h.current=e,n&&n(u))},[u]);const $=(e,t,o)=>{d(n=>{const i=eo(n);return i[o][e]=t,i})},f=yt(()=>{if(r){const t=[];for(let o=0;;o+=r){const n=e.slice(o,o+r);if(!n.length)break;t.push(n)}return t}return[e]},[r,e]);return xt.createElement(ld,null,xt.createElement(ml,{title:a}),xt.createElement("table",{style:{borderCollapse:"collapse"}},!r&&xt.createElement("thead",null,xt.createElement("tr",null,e.map(({title:e,tooltip:t,required:o})=>xt.createElement("th",{key:`input-table-head-${e}`,style:{maxWidth:g}},xt.createElement(ml,{title:e,required:o,tooltip:t}))),xt.createElement("th",null))),xt.createElement("tbody",null,c.map((t,o)=>xt.createElement(bt,{key:`input-table-row-${o}`},r&&o>0?xt.createElement("tr",null,xt.createElement("td",{colSpan:f.length},xt.createElement(ga,null))):null,f.map((n,a)=>xt.createElement("tr",{key:`input-table-matrix-${o}-${a}`},n.map((e,n)=>xt.createElement(sd,{key:`input-table-row-${o}-col-${n}`,col:e,colIdx:n,row:t,rowIdx:o,rowsLength:c.length,maxWidth:g,limitFieldsPerRow:r,errorMessage:i,handleChange:$})),0===a&&xt.createElement("td",null,xt.createElement(cd,{$marginTop:r?"24px":"0",onClick:()=>{return t=o,void(c.length>1?d(e=>e.filter((e,o)=>o!==t)):e.forEach(({keyName:e,type:o})=>$(e,o===vo.Number?"0":"",t)));var t}},xt.createElement(at,null))))))))),!!i&&xt.createElement(Ki,null,i),xt.createElement(vs,{onClick:()=>{d(e=>{const t=eo(e);return t.push(eo(s)),t})},disabled:m}))},pd=_t.div`
|
|
1321
|
+
display: flex;
|
|
1322
|
+
flex-direction: column;
|
|
1323
|
+
width: 100%;
|
|
1324
|
+
`,ud=_t.div`
|
|
1325
|
+
display: flex;
|
|
1326
|
+
flex-direction: column;
|
|
1327
|
+
gap: 8px;
|
|
1328
|
+
`,hd=_t.div`
|
|
1329
|
+
display: flex;
|
|
1330
|
+
align-items: center;
|
|
1331
|
+
gap: 8px;
|
|
1332
|
+
`,md=_t.div`
|
|
1333
|
+
width: 100%;
|
|
1334
|
+
max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
|
|
1335
|
+
`,gd=_t(Sa)`
|
|
1336
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1337
|
+
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1338
|
+
`,$d={key:"",value:""},fd=({initialKeyValuePairs:e=[],value:t,onChange:o,title:n,tooltip:i,disabled:r,required:a,errorMessage:s,keyPlaceholder:l="Key",valuePlaceholder:c="Value",inputMaxWidth:d=300})=>{const[p,u]=wt(t||e);kt(()=>{p.length||u([{...$d}])},[]);const h=p.filter(({key:e,value:t})=>!Nn(e.trim())&&!Nn(t.trim())),m=vt(JSON.stringify(h));kt(()=>{const e=JSON.stringify(h);m.current!==e&&(m.current=e,o&&o(h))},[h]);const g=(e,t,o)=>{u(n=>{const i=[...n];return i[o][e]=t,i})},$=p.length<=1,f=r||p.some(({key:e,value:t})=>""===e.trim()||""===t.trim()),x=r||$&&f;return xt.createElement(pd,null,xt.createElement(ml,{title:n,required:a,tooltip:i}),xt.createElement(ud,null,p.map(({key:e,value:t},o)=>xt.createElement(hd,{key:`key-value-input-list-${o}`},xt.createElement(md,{$maxWidth:d},xt.createElement(wl,{placeholder:l,disabled:r,value:e,onChange:e=>g("key",e.target.value,o),hasError:!!s&&(!a||a&&!e),autoFocus:Nn(t)&&!$&&o===p.length-1})),xt.createElement(md,{$maxWidth:o===p.length-1?d-38:d},xt.createElement(wl,{placeholder:c,disabled:r,value:t,onChange:e=>g("value",e.target.value,o),hasError:!!s&&(!a||a&&Nn(t)),autoFocus:!1})),o===p.length-1&&xt.createElement(gd,{withBorder:!0,size:30,$disabled:f,onClick:f?void 0:()=>{u(e=>{const t=[...e];return t.push({...$d}),t})}},xt.createElement(et,null)),xt.createElement(gd,{size:30,$disabled:x,onClick:x?void 0:()=>(e=>{$?(g("key","",e),g("value","",e)):u(t=>t.filter((t,o)=>o!==e))})(o)},xt.createElement(at,null))))),!!s&&xt.createElement(Ki,null,s))},xd=Mt`
|
|
1339
|
+
0% {
|
|
1340
|
+
background-position: 0% 50%;
|
|
1341
|
+
}
|
|
1342
|
+
100% {
|
|
1343
|
+
background-position: 100% 50%;
|
|
1344
|
+
}
|
|
1345
|
+
`,bd=_t(Hi)`
|
|
1346
|
+
background: ${({$textColor:e,$stripColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
|
|
1347
|
+
background-size: 250% 100%; /* Expand background to allow movement */
|
|
1348
|
+
background-clip: text;
|
|
1349
|
+
color: transparent;
|
|
1350
|
+
animation: ${xd} 1s reverse linear infinite;
|
|
1351
|
+
`,yd=({children:e="Loading...",textColor:t,stripColor:o,...n})=>{const i=Pi.useTheme(),r=t||i.v2.colors.white[500],a=o||i.v2.colors.black[500];return xt.createElement(bd,{$textColor:r,$stripColor:a,...n},e)},wd=_t.div`
|
|
1352
|
+
display: flex;
|
|
1353
|
+
flex-direction: ${({$isVertical:e})=>e?"column":"row"};
|
|
1354
|
+
gap: ${({$isVertical:e})=>e?"12px":"24px"};
|
|
1355
|
+
${({$hasError:e})=>e&&Bt`
|
|
1356
|
+
border: 1px solid ${({theme:e})=>e.text.error};
|
|
1357
|
+
border-radius: 32px;
|
|
1358
|
+
padding: 8px;
|
|
1359
|
+
`}
|
|
1360
|
+
`,kd=(e,t)=>!t?.length||!!t?.find(t=>t===e),vd=({isVertical:e,title:t="Monitors",required:o,errorMessage:n,allowedSignals:i,selectedSignals:r,setSelectedSignals:a})=>{const[s,l]=wt(1===r.length),c=vt(JSON.stringify(r));return kt(()=>{const e=r;e.length||li.forEach(({id:t})=>{kd(t,i)&&e.push(t)});const t=JSON.stringify(e);return c.current!==t&&(c.current=t,a(e),l(1===e.length)),()=>{c.current=""}},[i]),xt.createElement("div",null,t&&xt.createElement(ml,{title:t,required:o}),xt.createElement(wd,{$isVertical:e,$hasError:!!n},li.map(e=>{const t=kd(e.id,i),o=((e,t)=>!!t?.find(t=>t===e))(e.id,r);return t?xt.createElement(Ga,{key:e.id,title:e.value,disabled:!t||s&&o,value:o,onChange:t=>((e,t)=>{const o=e,n=t?[...r,o]:r.filter(e=>e!==o);a(n),l(1===n.length)})(e.id,t)}):null})),!!n&&xt.createElement(Ki,null,n))},Cd=_t.div`
|
|
1361
|
+
display: flex;
|
|
1362
|
+
gap: 8px;
|
|
1363
|
+
align-items: center;
|
|
1364
|
+
`,Ed=_t(gr)`
|
|
1365
|
+
display: flex;
|
|
1366
|
+
align-items: center;
|
|
1367
|
+
justify-content: center;
|
|
1368
|
+
gap: 8px;
|
|
1369
|
+
min-width: 90px;
|
|
1370
|
+
`,Sd=({buttons:e})=>{const t=Pi.useTheme(),o=({button:t,index:o})=>e.length>1&&0===o&&(t.icon||t.iconSrc),n=({button:e,rotate:o})=>e.icon?xt.createElement(e.icon,{size:14,rotate:o,fill:t.text[e.variant||"secondary"]}):e.iconSrc?xt.createElement("img",{src:e.iconSrc,alt:e.label,width:8,height:12}):null;return xt.createElement(Cd,null,e.map((e,t)=>xt.createElement(va,{key:t,text:e.tooltip||""},xt.createElement(Ed,{key:t,variant:e.variant||"secondary",onClick:e.onClick,disabled:e.disabled},o({button:e,index:t})&&n({button:e,rotate:0}),e.label,!o({button:e,index:t})&&n({button:e,rotate:180})))))},Ad=_t.div`
|
|
1371
|
+
height: ${({$height:e})=>e}px;
|
|
1372
|
+
width: 100%;
|
|
1373
|
+
overflow: auto;
|
|
1374
|
+
`,Dd=_t.div`
|
|
1375
|
+
height: ${({$height:e})=>e}px;
|
|
1376
|
+
width: 100%;
|
|
1377
|
+
position: relative;
|
|
1378
|
+
`,Td=_t.div`
|
|
1379
|
+
height: ${({$height:e})=>e}px;
|
|
1380
|
+
width: 100%;
|
|
1381
|
+
position: absolute;
|
|
1382
|
+
top: 0;
|
|
1383
|
+
left: 0;
|
|
1384
|
+
transform: translateY(${({$yOffset:e})=>e}px);
|
|
1385
|
+
`,zd=({containerHeight:e,elementHeight:t,elements:o})=>{const{overflowRef:n,listHeight:i,listItems:r}=Ir({items:o,rowHeight:t});return xt.createElement(Ad,{ref:n,$height:e},xt.createElement(Dd,{$height:i},r.map(({key:e,index:t,size:n,start:i})=>{const r=t>o.length-1,a=o[t];return xt.createElement(Td,{key:e,$height:n,$yOffset:i},r?xt.createElement(Zr,null,xt.createElement(yd,null)):a)})))},Fd=_t.div`
|
|
1386
|
+
display: flex;
|
|
1387
|
+
justify-content: space-between;
|
|
1388
|
+
align-items: center;
|
|
1389
|
+
gap: 16px;
|
|
1390
|
+
`,Od=_t.div`
|
|
1391
|
+
display: flex;
|
|
1392
|
+
flex-direction: column;
|
|
1393
|
+
gap: 4px;
|
|
1394
|
+
`,Nd=_t.div`
|
|
1395
|
+
display: flex;
|
|
1396
|
+
align-items: center;
|
|
1397
|
+
gap: 8px;
|
|
1398
|
+
`,Id=_t(Hi)``,_d=_t(Hi)``,Bd=({title:e,description:t,badgeLabel:o,icon:n,actionButton:i,size:r="medium"})=>{const a="small"===r?16:"medium"===r?20:24,s="small"===r?12:"medium"===r?14:16;return xt.createElement(Fd,null,xt.createElement(Od,null,xt.createElement(Nd,null,n&&xt.createElement(n,{size:a}),xt.createElement(Id,{weight:300,size:a},e),void 0!==o&&xt.createElement(pr,{label:o,filled:!!o})),xt.createElement(_d,{weight:200,opacity:.8,size:s},t)),i&&xt.createElement("div",null,i))},Rd=_t.div`
|
|
1399
|
+
position: relative;
|
|
1400
|
+
gap: 0;
|
|
1401
|
+
z-index: 0;
|
|
1402
|
+
display: grid;
|
|
1403
|
+
grid-template-columns: repeat(${({$count:e})=>e}, 1fr);
|
|
1404
|
+
`,Ld=_t.button`
|
|
1405
|
+
flex: 1;
|
|
1406
|
+
display: flex;
|
|
1407
|
+
align-items: center;
|
|
1408
|
+
justify-content: center;
|
|
1409
|
+
gap: 4px;
|
|
1410
|
+
padding: 6px 12px;
|
|
1411
|
+
background-color: transparent;
|
|
1412
|
+
border-radius: ${({$isFirstItem:e,$isLastItem:t})=>e?"32px 0px 0px 32px":t?"0px 32px 32px 0px":"0"};
|
|
1413
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1414
|
+
cursor: pointer;
|
|
1415
|
+
&:hover {
|
|
1416
|
+
border: 1px solid ${({theme:e})=>e.colors.secondary};
|
|
1417
|
+
}
|
|
1418
|
+
`,Md=_t.div`
|
|
1419
|
+
position: absolute;
|
|
1420
|
+
top: ${({$y:e})=>e}px;
|
|
1421
|
+
left: ${({$x:e})=>e}px;
|
|
1422
|
+
z-index: -1;
|
|
1423
|
+
width: ${({$width:e})=>e}px;
|
|
1424
|
+
height: ${({$height:e})=>e}px;
|
|
1425
|
+
background-color: ${({theme:e,$bgColor:t})=>t||e.colors.dropdown_bg_2};
|
|
1426
|
+
border-radius: ${({$isFirstItem:e,$isLastItem:t})=>e?"32px 0px 0px 32px":t?"0px 32px 32px 0px":"0"};
|
|
1427
|
+
transition: all 0.3s;
|
|
1428
|
+
`,Pd=({options:e=[],selected:t,setSelected:o})=>{const n=e.findIndex(e=>e.value===t),[i,r]=wt(e[n]?.selectedBgColor||""),[a,s]=wt({width:0,height:0}),[l,c]=wt({x:0,y:0}),d=vt(null);return kt(()=>{d.current&&(s({width:d.current.offsetWidth,height:d.current.offsetHeight}),c({x:d.current.offsetWidth*n,y:0}))},[t,n]),xt.createElement(Rd,{$count:e.length},e.map(({icon:n,label:i,value:a,selectedBgColor:s,selectedTextColor:l},c)=>{const p=t===a;return xt.createElement(Ld,{key:`segment-${i||c}-${a}`,ref:p?d:void 0,$isFirstItem:0===c,$isLastItem:c===e.length-1,onClick:()=>{o(a),r(s||"")}},n&&xt.createElement(n,null),i&&xt.createElement(Hi,{size:12,family:"secondary",decoration:"underline",color:p?l:void 0},i))}),xt.createElement(Md,{$bgColor:i,$width:a.width,$height:a.height,$x:l.x,$y:l.y,$isFirstItem:0===n,$isLastItem:n===e.length-1}))},jd=_t(gr)`
|
|
1429
|
+
gap: 8px;
|
|
1430
|
+
text-transform: none;
|
|
1431
|
+
text-decoration: none;
|
|
1432
|
+
border: ${({theme:e,$withBorder:t})=>`1px solid ${t?e.colors.border:"transparent"}`};
|
|
1433
|
+
&.not-selected {
|
|
1434
|
+
background-color: ${({theme:e,$color:t})=>t||e.colors.dropdown_bg_2+Pi.opacity.hex["060"]};
|
|
1435
|
+
&:hover {
|
|
1436
|
+
background-color: ${({theme:e,$hoverColor:t})=>t||e.colors.dropdown_bg_2};
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
&.selected {
|
|
1440
|
+
background-color: ${({theme:e})=>e.colors.majestic_blue+Pi.opacity.hex["030"]};
|
|
1441
|
+
}
|
|
1442
|
+
`,Ud=_t(Hi)`
|
|
1443
|
+
white-space: nowrap;
|
|
1444
|
+
overflow: hidden;
|
|
1445
|
+
text-overflow: ellipsis;
|
|
1446
|
+
font-size: 14px;
|
|
1447
|
+
`,Wd=({label:e,onClick:t,icon:o,iconSrc:n,badgeLabel:i,badgeFilled:r,isSelected:a,withBorder:s,color:l,hoverColor:c,style:d})=>{const p=Pi.useTheme();return xt.createElement(jd,{onClick:t,className:a?"selected":"not-selected",$withBorder:s,$color:l,$hoverColor:c,style:d},o&&xt.createElement("div",null,xt.createElement(o,{fill:p.text.info})),n&&xt.createElement("div",null,xt.createElement("img",{src:n,alt:"",width:16,height:16})),xt.createElement(Ud,null,e),a&&xt.createElement("div",null,xt.createElement(Ge,{fill:p.colors.majestic_blue_soft})),void 0!==i&&xt.createElement(pr,{label:i,filled:r||a}))},Vd=_t.div`
|
|
1448
|
+
display: flex;
|
|
1449
|
+
flex-direction: column;
|
|
1450
|
+
gap: 16px;
|
|
1451
|
+
${({$maxWidth:e})=>e&&`max-width: ${e};`}
|
|
1452
|
+
`,Hd=_t.div`
|
|
1453
|
+
display: flex;
|
|
1454
|
+
align-items: center;
|
|
1455
|
+
gap: 16px;
|
|
1456
|
+
`,qd=_t.div`
|
|
1457
|
+
width: 50px;
|
|
1458
|
+
height: 50px;
|
|
1459
|
+
border-radius: 8px;
|
|
1460
|
+
background: ${({theme:e})=>`linear-gradient(90deg, ${e.colors.dropdown_bg_2} 25%, ${e.colors.dropdown_bg_2} 50%, ${e.colors.border} 75%)`};
|
|
1461
|
+
background-size: 200% 100%;
|
|
1462
|
+
animation: ${Pi.animations.shimmer} 10s infinite linear;
|
|
1463
|
+
`,Gd=_t(Xr)`
|
|
1464
|
+
flex: 1;
|
|
1465
|
+
gap: 12px;
|
|
1466
|
+
`,Kd=_t.div`
|
|
1467
|
+
width: ${({$width:e})=>e};
|
|
1468
|
+
height: 16px;
|
|
1469
|
+
background: ${({theme:e})=>`linear-gradient(90deg, ${e.colors.dropdown_bg_2} 25%, ${e.colors.dropdown_bg_2} 50%, ${e.colors.border} 75%)`};
|
|
1470
|
+
background-size: 200% 100%;
|
|
1471
|
+
animation: ${Pi.animations.shimmer} 1.5s infinite linear;
|
|
1472
|
+
border-radius: 4px;
|
|
1473
|
+
`,Yd=({size:e=5,maxWidth:t})=>xt.createElement(Vd,{$maxWidth:t},[...Array(e)].map((e,t)=>xt.createElement(Hd,{key:t},xt.createElement(qd,null),xt.createElement(Gd,null,xt.createElement(Kd,{$width:"80%"}),xt.createElement(Kd,{$width:"100%"})))));var Jd;!function(e){e.Active="active",e.Disabled="disabled",e.Finished="finish"}(Jd||(Jd={}));const Xd=_t.div`
|
|
1474
|
+
display: flex;
|
|
1475
|
+
flex-direction: column;
|
|
1476
|
+
gap: 32px;
|
|
1477
|
+
`,Zd=_t.div`
|
|
1478
|
+
display: flex;
|
|
1479
|
+
gap: 16px;
|
|
1480
|
+
padding: 8px;
|
|
1481
|
+
opacity: ${({$state:e})=>e===Jd.Active?1:e===Jd.Disabled?.5:.8};
|
|
1482
|
+
transition: all 0.3s;
|
|
1483
|
+
`,Qd=_t(Jr)`
|
|
1484
|
+
justify-content: center;
|
|
1485
|
+
width: 24px;
|
|
1486
|
+
height: 24px;
|
|
1487
|
+
border-radius: 32px;
|
|
1488
|
+
border: ${({theme:e,$state:t})=>t===Jd.Disabled?`1px dashed ${e.text.dark_grey}`:`1px solid ${e.colors.secondary}`};
|
|
1489
|
+
opacity: ${({$state:e})=>e===Jd.Finished?.8:1};
|
|
1490
|
+
`,ep=_t(Xr)`
|
|
1491
|
+
justify-content: center;
|
|
1492
|
+
gap: 8px;
|
|
1493
|
+
`,tp=_t(Hi)``,op=_t(Hi)``,np=({data:e,currentStep:t=0})=>{const[o,n]=wt([]);return kt(()=>{n(e.map((e,o)=>o<t-1?{...e,state:Jd.Finished,subtitle:e.subtitle||Co.Success}:o===t-1?{...e,state:Jd.Active,subtitle:""}:{...e,state:Jd.Disabled,subtitle:""}))},[t,e]),xt.createElement(Xd,null,o.map((e,t)=>xt.createElement(Zd,{key:t,$state:e.state},xt.createElement(Qd,{$state:e.state},[Jd.Active,Jd.Disabled].includes(e.state)?xt.createElement(Hi,{size:12},e.stepNumber):e.state===Jd.Finished?xt.createElement(Ge,{size:20}):null),xt.createElement(ep,null,xt.createElement(tp,{family:"secondary"},e.title),e.subtitle&&xt.createElement(op,{size:10,weight:300},e.subtitle)))))},ip=_t(Jr)`
|
|
1494
|
+
width: fit-content;
|
|
1495
|
+
gap: 6px;
|
|
1496
|
+
padding: 6px 12px;
|
|
1497
|
+
border-radius: 360px;
|
|
1498
|
+
background-color: ${({$type:e,theme:t})=>t.colors[e]};
|
|
1499
|
+
`,rp=_t(Hi)`
|
|
1500
|
+
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
1501
|
+
`,ap=({type:e=Co.Info,icon:t,title:o,size:n,family:i,children:r,...a})=>xt.createElement(ip,{$type:e},t&&xt.createElement(t,null),xt.createElement(rp,{$type:e,size:n||12,family:i||"secondary",...a},r||o)),sp=_t.div`
|
|
1502
|
+
display: flex;
|
|
1503
|
+
flex-direction: column;
|
|
1504
|
+
position: relative;
|
|
1505
|
+
width: 100%;
|
|
1506
|
+
`,lp=_t.div`
|
|
1507
|
+
width: 100%;
|
|
1508
|
+
display: flex;
|
|
1509
|
+
align-items: center;
|
|
1510
|
+
gap: 12px;
|
|
1511
|
+
transition: border-color 0.3s;
|
|
1512
|
+
border-radius: 24px;
|
|
1513
|
+
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1514
|
+
${({$disabled:e})=>e&&Bt`
|
|
1515
|
+
background-color: ${({theme:e})=>e.colors.border};
|
|
1516
|
+
cursor: not-allowed;
|
|
1517
|
+
opacity: 0.6;
|
|
1518
|
+
`}
|
|
1519
|
+
|
|
1520
|
+
${({$hasError:e})=>e&&Bt`
|
|
1521
|
+
border-color: ${({theme:e})=>e.text.error};
|
|
1522
|
+
`}
|
|
1523
|
+
|
|
1524
|
+
${({$isActive:e})=>e&&Bt`
|
|
1525
|
+
border-color: ${({theme:e})=>e.colors.secondary};
|
|
1526
|
+
`}
|
|
1527
|
+
|
|
1528
|
+
&:hover {
|
|
1529
|
+
border-color: ${({theme:e})=>e.colors.secondary};
|
|
1530
|
+
}
|
|
1531
|
+
&:focus-within {
|
|
1532
|
+
border-color: ${({theme:e})=>e.colors.secondary};
|
|
1533
|
+
}
|
|
1534
|
+
`,cp=_t.textarea`
|
|
1535
|
+
flex: 1;
|
|
1536
|
+
border: none;
|
|
1537
|
+
outline: none;
|
|
1538
|
+
background: none;
|
|
1539
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
1540
|
+
font-size: 14px;
|
|
1541
|
+
padding: 12px 20px 0;
|
|
1542
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1543
|
+
font-weight: 300;
|
|
1544
|
+
line-height: 22px;
|
|
1545
|
+
&::placeholder {
|
|
1546
|
+
color: ${({theme:e})=>e.text.secondary};
|
|
1547
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1548
|
+
opacity: 0.4;
|
|
1549
|
+
font-size: 14px;
|
|
1550
|
+
font-weight: 300;
|
|
1551
|
+
line-height: 22px; /* 157.143% */
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
&:disabled {
|
|
1555
|
+
background-color: ${({theme:e})=>e.colors.border};
|
|
1556
|
+
cursor: not-allowed;
|
|
1557
|
+
}
|
|
1558
|
+
`,dp=({errorMessage:e,title:t,tooltip:o,required:n,onChange:i,name:r,...a})=>{const s=vt(null),l=e=>{s.current&&(s.current.style.height="auto",e&&(s.current.style.height=`${s.current.scrollHeight}px`))};return xt.createElement(sp,null,xt.createElement(ml,{title:t,required:n,tooltip:o}),xt.createElement(lp,{$disabled:a.disabled,$hasError:!!e,$isActive:!!a.autoFocus},xt.createElement(cp,{ref:s,"data-id":r,name:r,onFocus:()=>l(!0),onBlur:()=>l(!1),onChange:e=>{e.stopPropagation(),l(!0),i?.(e)},onKeyDown:e=>{e.stopPropagation()},...a})),!!e&&xt.createElement(Ki,null,e))},pp=_t.div`
|
|
1559
|
+
display: flex;
|
|
1560
|
+
align-items: center;
|
|
1561
|
+
gap: 12px;
|
|
1562
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1563
|
+
opacity: ${({$disabled:e})=>e?.6:1};
|
|
1564
|
+
`,up=_t.div`
|
|
1565
|
+
width: 24px;
|
|
1566
|
+
height: 12px;
|
|
1567
|
+
border: 1px ${({$isActive:e,theme:t})=>e?`solid ${t.colors.majestic_blue}`:`dashed ${t.text.grey}`};
|
|
1568
|
+
border-radius: 20px;
|
|
1569
|
+
display: flex;
|
|
1570
|
+
align-items: center;
|
|
1571
|
+
padding: 2px;
|
|
1572
|
+
background-color: transparent;
|
|
1573
|
+
pointer-events: ${({$disabled:e})=>e?"none":"auto"};
|
|
1574
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1575
|
+
opacity: ${({$isActive:e})=>e?1:.5};
|
|
1576
|
+
transition: border-color 0.3s, opacity 0.3s;
|
|
1577
|
+
&::before {
|
|
1578
|
+
content: '';
|
|
1579
|
+
width: 12px;
|
|
1580
|
+
height: 12px;
|
|
1581
|
+
border-radius: 50%;
|
|
1582
|
+
background-color: ${({$isActive:e,theme:t})=>e?t.colors.majestic_blue:t.colors.secondary};
|
|
1583
|
+
transform: ${({$isActive:e})=>e?"translateX(12px)":"translateX(0)"};
|
|
1584
|
+
transition: background-color 0.3s, transform 0.3s;
|
|
1585
|
+
}
|
|
1586
|
+
`,hp=({title:e,tooltip:t,initialValue:o=!1,onChange:n,disabled:i,allowPropagation:r=!1,flipHorizontally:a})=>{const[s,l]=wt(o);return kt(()=>l(o),[o]),xt.createElement(pp,{$disabled:i,onClick:e=>{i||(r||e.stopPropagation(),n?n(!s):l(e=>!e))}},!a&&xt.createElement(up,{$disabled:i,$isActive:s}),(e||t)&&xt.createElement(va,{text:t,withIcon:!0},e&&xt.createElement(Hi,{size:14},e)),a&&xt.createElement(up,{$disabled:i,$isActive:s}))};var mp={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 gp=_t.div`
|
|
1587
|
+
width: ${({$width:e})=>e}px;
|
|
1588
|
+
height: ${({$height:e})=>e}px;
|
|
1589
|
+
position: relative;
|
|
1590
|
+
`,$p=({width:e=620})=>{const{darkMode:t}=Pi.useTheme(),o=e/(620/220),n=e;return xt.createElement(gp,{$width:n,$height:o},xt.createElement(Gt,{autoplay:!0,loop:!0,animationData:mp,style:{width:o,height:n,transform:"rotate(-90deg)",position:"absolute",top:-(o-o/10),left:o-o/10,filter:t?"invert(0)":"invert(1)"}}))};var fp,xp;!function(e){e.Primary="primary",e.Secondary="secondary",e.Text="text"}(fp||(fp={})),function(e){e.S="small",e.M="medium",e.L="large"}(xp||(xp={}));const bp=_t.button`
|
|
1591
|
+
display: flex;
|
|
1592
|
+
align-items: center;
|
|
1593
|
+
justify-content: center;
|
|
1594
|
+
gap: 8px;
|
|
1595
|
+
${({$fullWidth:e})=>e&&Bt`
|
|
1596
|
+
width: 100%;
|
|
1597
|
+
`}
|
|
1598
|
+
border: none;
|
|
1599
|
+
border-radius: 6px;
|
|
1600
|
+
${({$size:e,$hasLabel:t})=>e===xp.S?Bt`
|
|
1601
|
+
height: 32px;
|
|
1602
|
+
${t?Bt`
|
|
1603
|
+
padding: 8px 16px;
|
|
1604
|
+
`:Bt`
|
|
1605
|
+
width: 32px;
|
|
1606
|
+
`}
|
|
1607
|
+
`:e===xp.M?Bt`
|
|
1608
|
+
height: 38px;
|
|
1609
|
+
${t?Bt`
|
|
1610
|
+
padding: 8px 18px;
|
|
1611
|
+
`:Bt`
|
|
1612
|
+
width: 38px;
|
|
1613
|
+
`}
|
|
1614
|
+
`:Bt`
|
|
1615
|
+
height: 44px;
|
|
1616
|
+
${t?Bt`
|
|
1617
|
+
padding: 8px 22px;
|
|
1618
|
+
`:Bt`
|
|
1619
|
+
width: 44px;
|
|
1620
|
+
`}
|
|
1621
|
+
`}
|
|
1622
|
+
|
|
1623
|
+
cursor: pointer;
|
|
1624
|
+
&:disabled {
|
|
1625
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
1626
|
+
cursor: not-allowed;
|
|
1627
|
+
}
|
|
1628
|
+
&:enabled {
|
|
1629
|
+
${({$withShadow:e})=>e?Bt`
|
|
1630
|
+
box-shadow: 0 0 11px 0 rgba(0, 0, 0, 0.32);
|
|
1631
|
+
`:""}
|
|
1632
|
+
${({$variant:e})=>e===fp.Primary?Bt`
|
|
1633
|
+
background-color: ${({theme:e})=>e.v2.colors.purple[500]};
|
|
1634
|
+
&:hover {
|
|
1635
|
+
background-color: ${({theme:e})=>e.v2.colors.purple[600]};
|
|
1636
|
+
}
|
|
1637
|
+
&:active {
|
|
1638
|
+
background-color: ${({theme:e})=>e.v2.colors.purple[700]};
|
|
1639
|
+
}
|
|
1640
|
+
`:e===fp.Secondary?Bt`
|
|
1641
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
1642
|
+
&:hover {
|
|
1643
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
1644
|
+
}
|
|
1645
|
+
&:active {
|
|
1646
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
1647
|
+
}
|
|
1648
|
+
`:e===fp.Text?Bt`
|
|
1649
|
+
background-color: transparent;
|
|
1650
|
+
&:hover {
|
|
1651
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
1652
|
+
}
|
|
1653
|
+
&:active {
|
|
1654
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
1655
|
+
}
|
|
1656
|
+
`:""}
|
|
1657
|
+
}
|
|
1658
|
+
`,yp=At(({label:e,leftIcon:t,rightIcon:o,variant:n=fp.Primary,size:i=xp.M,iconSize:r,loading:a,fullWidth:s,withShadow:l,disabled:c,onClick:d,...p},u)=>{const h=Pi.useTheme(),m=r||(i===xp.L?18:16),g=i===xp.L?Qn.S:Qn.XS,$=c?h.v2.colors.grey[400]:h.v2.colors.white[500];return xt.createElement(bp,{ref:u,$variant:n,$size:i,$fullWidth:s,$withShadow:l,$hasLabel:!!e,disabled:c,onClick:a?void 0:e=>{e.stopPropagation(),d?.(e)},...p},a?e?xt.createElement(yd,{size:h.v2.text.size[g],textColor:$}):xt.createElement(cs,null):xt.createElement(xt.Fragment,null,t&&xt.createElement(t,{size:m,fill:$}),e?xt.createElement(ti,{size:g,weight:500,color:$,nowrap:!0},e):null,o&&xt.createElement(o,{size:m,fill:$})))});yp.displayName=yp.name;const wp=_t.button`
|
|
1659
|
+
width: 100%;
|
|
1660
|
+
padding: 0;
|
|
1661
|
+
padding-right: 12px;
|
|
1662
|
+
display: flex;
|
|
1663
|
+
align-items: center;
|
|
1664
|
+
justify-content: flex-start;
|
|
1665
|
+
gap: 12px;
|
|
1666
|
+
border-radius: 8px;
|
|
1667
|
+
border: none;
|
|
1668
|
+
${({$hovered:e})=>e?Bt`
|
|
1669
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
1670
|
+
`:Bt`
|
|
1671
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
1672
|
+
`}
|
|
1673
|
+
overflow: hidden;
|
|
1674
|
+
cursor: pointer;
|
|
1675
|
+
&:disabled {
|
|
1676
|
+
cursor: not-allowed;
|
|
1677
|
+
}
|
|
1678
|
+
`,kp=_t.div`
|
|
1679
|
+
width: ${({$hasIcon:e})=>e?"56px":"0"};
|
|
1680
|
+
height: 56px;
|
|
1681
|
+
display: flex;
|
|
1682
|
+
align-items: center;
|
|
1683
|
+
justify-content: center;
|
|
1684
|
+
${({$hovered:e})=>e?Bt`
|
|
1685
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
1686
|
+
`:Bt`
|
|
1687
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
1688
|
+
`}
|
|
1689
|
+
`,vp=_t.div`
|
|
1690
|
+
width: ${({$hasIcon:e})=>e?"calc(100% - 56px)":"100%"};
|
|
1691
|
+
display: flex;
|
|
1692
|
+
justify-content: space-between;
|
|
1693
|
+
align-items: center;
|
|
1694
|
+
gap: 8px;
|
|
1695
|
+
`,Cp=({label:e,icon:t,loading:o,onClick:n})=>{const[i,r]=wt(!1);return xt.createElement(wp,{$hovered:i,type:"button",disabled:o,onClick:n,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},xt.createElement(kp,{$hovered:i,$hasIcon:!!t},t&&xt.createElement(t,{size:36})),xt.createElement(vp,{$hasIcon:!!t},o?xt.createElement(yd,{size:16}):xt.createElement(ti,{variant:Zn.Span,align:"center"},e),xt.createElement(dt,{rotate:90,size:24})))},Ep=({buttons:e})=>xt.createElement(Xr,{$gap:12},e.map(e=>xt.createElement(Cp,{key:e.label,...e}))),Sp=_t.div`
|
|
1696
|
+
display: flex;
|
|
1697
|
+
align-items: center;
|
|
1698
|
+
flex-wrap: wrap;
|
|
1699
|
+
width: calc(100% - 24px);
|
|
1700
|
+
padding: 4px 12px;
|
|
1701
|
+
border-radius: 12px;
|
|
1702
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
1703
|
+
`,Ap=_t.div`
|
|
1704
|
+
width: calc(${({$cellsPerRow:e})=>100/e+"%"} - 16px);
|
|
1705
|
+
margin: 8px;
|
|
1706
|
+
display: flex;
|
|
1707
|
+
flex-direction: column;
|
|
1708
|
+
gap: 4px;
|
|
1709
|
+
`,Dp=({cellsPerRow:e,items:t})=>{const o=Rt(),{CopyButton:n}=zr();return xt.createElement(Sp,null,t.map(({id:i,title:r,label:a,withCopy:s,badge:l})=>xt.createElement(Ap,{key:i,$cellsPerRow:e||t.length},xt.createElement(ti,{size:Qn.XXXS,color:o.v2.colors.silver[200],nowrap:!0},r),xt.createElement(Jr,{$gap:4},l&&xt.createElement(ni,{...l}),a&&xt.createElement(ti,{size:Qn.XS,nowrap:!0},a),s&&xt.createElement(n,{value:a||l?.label?.toString()||"",size:Ar.XS})))))};var Tp;!function(e){e.S="s",e.L="l"}(Tp||(Tp={}));const zp=_t.div`
|
|
1710
|
+
position: relative;
|
|
1711
|
+
z-index: 0;
|
|
1712
|
+
display: flex;
|
|
1713
|
+
align-items: center;
|
|
1714
|
+
gap: 2px;
|
|
1715
|
+
padding: 3px;
|
|
1716
|
+
border-radius: 8px;
|
|
1717
|
+
border: 1px solid ${({theme:e})=>e.v2.colors.grey[500]};
|
|
1718
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
1719
|
+
`,Fp=_t.button`
|
|
1720
|
+
flex: 1;
|
|
1721
|
+
display: flex;
|
|
1722
|
+
align-items: center;
|
|
1723
|
+
justify-content: center;
|
|
1724
|
+
gap: 8px;
|
|
1725
|
+
padding: ${({$size:e})=>e===Tp.S?"4px 8px":"8px 16px"};
|
|
1726
|
+
border-radius: 6px;
|
|
1727
|
+
border: none;
|
|
1728
|
+
background-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.black[500]:"transparent"};
|
|
1729
|
+
box-shadow: ${({$isSelected:e})=>e?"0 0 11px 0 rgba(0, 0, 0, 0.32)":"none"};
|
|
1730
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1731
|
+
&:hover {
|
|
1732
|
+
background-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.black[500]:e.v2.colors.silver[800]};
|
|
1733
|
+
}
|
|
1734
|
+
`,Op=({size:e=Tp.L,options:t=[],selected:o,setSelected:n,disabled:i})=>{const r=Rt(),a=i?r.v2.colors.grey[400]:r.v2.colors.white[500],s=e===Tp.S?Qn.XXS:Qn.XS,l=e===Tp.S?400:500;return xt.createElement(zp,{$count:t.length},t.map(({value:t,label:r,icon:c},d)=>{const p=o===t;return xt.createElement(Fp,{key:`segment-${r||d}-${t}`,onClick:()=>!i&&n(t),$isSelected:p,$disabled:i,$size:e},c&&xt.createElement(c,{fill:a}),r&&xt.createElement(ti,{size:s,weight:l,color:a,nowrap:!0},r))}))},Np=_t.div`
|
|
1735
|
+
min-width: ${({$width:e})=>e||"unset"};
|
|
1736
|
+
width: fit-content;
|
|
1737
|
+
padding: 6px 12px;
|
|
1738
|
+
display: flex;
|
|
1739
|
+
align-self: stretch;
|
|
1740
|
+
align-items: center;
|
|
1741
|
+
gap: 8px;
|
|
1742
|
+
border-radius: 6px;
|
|
1743
|
+
|
|
1744
|
+
border: none;
|
|
1745
|
+
border-radius: 6px;
|
|
1746
|
+
background: ${({$isHovered:e,$isActive:t,theme:o})=>e||t?o.v2.colors.silver[700]:o.v2.colors.silver[800]};
|
|
1747
|
+
`,Ip=_t.input`
|
|
1748
|
+
flex: 1;
|
|
1749
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1750
|
+
font-size: 14px;
|
|
1751
|
+
font-weight: 400;
|
|
1752
|
+
line-height: 20px;
|
|
1753
|
+
|
|
1754
|
+
cursor: text;
|
|
1755
|
+
color: ${({$textColor:e})=>e};
|
|
1756
|
+
&::placeholder {
|
|
1757
|
+
color: ${({$textColor:e})=>e};
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
overflow: hidden;
|
|
1761
|
+
text-overflow: ellipsis;
|
|
1762
|
+
white-space: nowrap;
|
|
1763
|
+
`,_p=({value:e,onChange:t,placeholder:o,width:n,segment:i})=>{const r=Pi.useTheme(),[a,s]=wt(!1),[l,c]=wt(!1),[d,p]=wt(!1),u=a?r.v2.colors.white[500]:r.v2.colors.silver[200],h=!!i?.options?.length,m=yt(()=>{if(h)return i?.options.find(e=>e.value===i.selected)?.label},[h,i?.options,i?.selected]),g=yt(()=>o||(h&&m?`Search by ${m.toLowerCase()}`:"Search..."),[o,h,m]);return xt.createElement(Np,{$width:n,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),$isHovered:l&&!d,$isActive:a},xt.createElement(rt,{size:18,fill:u}),xt.createElement(Ip,{"data-id":"search",name:"search",type:"text",placeholder:g,value:e,onChange:e=>{e.stopPropagation(),t(e.target.value)},onFocus:()=>s(!0),onBlur:()=>s(!1),$textColor:u}),h&&xt.createElement("div",{onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1)},xt.createElement(Op,{options:i.options,selected:i.selected,setSelected:i.setSelected,size:Tp.S})))};var Bp;!function(e){e.S="small",e.L="large"}(Bp||(Bp={}));const Rp=_t.div`
|
|
1764
|
+
width: fit-content;
|
|
1765
|
+
display: flex;
|
|
1766
|
+
align-items: center;
|
|
1767
|
+
gap: 8px;
|
|
1768
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1769
|
+
`,Lp=_t.div`
|
|
1770
|
+
width: ${({$size:e})=>e===Bp.S?"16px":"20px"};
|
|
1771
|
+
height: ${({$size:e})=>e===Bp.S?"16px":"20px"};
|
|
1772
|
+
display: flex;
|
|
1773
|
+
align-items: center;
|
|
1774
|
+
justify-content: center;
|
|
1775
|
+
border-radius: 4px;
|
|
1776
|
+
border: 1px solid ${({$borderColor:e})=>e};
|
|
1777
|
+
background-color: ${({$backgroundColor:e})=>e};
|
|
1778
|
+
`,Mp=({label:e,size:t=Bp.L,disabled:o,partiallyChecked:n,value:i,onChange:r})=>{const a=Pi.useTheme(),[s,l]=wt(!1),c=n||i,d=t===Bp.S?12:16,p=o?a.v2.colors.grey[400]:a.v2.colors.white[500],u=c?"transparent":o?a.v2.colors.grey[700]:s?a.v2.colors.silver[400]:a.v2.colors.silver[600],h=o?a.v2.colors.grey[600]:c?a.v2.colors.purple[500]:a.v2.colors.silver[900];return xt.createElement(Rp,{"data-id":"checkbox"+(e?`-${e}`:""),onClick:e=>{e.stopPropagation(),o||r(!!n||!i)},$disabled:o,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1)},xt.createElement(Lp,{$size:t,$borderColor:u,$backgroundColor:h},n?xt.createElement(Je,{size:d,fill:p}):i?xt.createElement(Ge,{size:d,fill:p}):null),e&&xt.createElement(ti,{size:t===Bp.S?Qn.XXS:Qn.XS,nowrap:!0},e))},Pp=_t.div`
|
|
1779
|
+
display: flex;
|
|
1780
|
+
flex-direction: ${({$direction:e})=>e===ho.Horizontal?"row":"column"};
|
|
1781
|
+
gap: ${({$direction:e})=>e===ho.Horizontal?16:8}px;
|
|
1782
|
+
`,jp=({direction:e=ho.Vertical,title:t,size:o,disabled:n,withSelectAll:i,options:r,values:a,setValues:s})=>{const l=o===Bp.S?Qn.XXS:Qn.XS,c=yt(()=>r.every(e=>a[e.id]),[r,a]),d=yt(()=>r.some(e=>a[e.id])&&r.some(e=>!a[e.id]),[r,a]),p=(e,t)=>{s(o=>{const n={...o};return e?n[e]=t:r.forEach(e=>n[e.id]=t),n})};return xt.createElement(Pp,{$direction:e},t&&i?xt.createElement(Mp,{label:t,partiallyChecked:d,value:c,onChange:e=>p("",e),size:o}):t&&!i?xt.createElement(ti,{size:l},t):null,r.map(e=>xt.createElement(Mp,{key:`${t}-checkbox-${e.id}`,...e,value:a[e.id],onChange:t=>p(e.id,t),disabled:n,size:o})))};var Up,Wp;!function(e){e.Left="left",e.Right="right"}(Up||(Up={})),function(e){e.Top="top",e.Bottom="bottom"}(Wp||(Wp={}));const Vp=_t.div`
|
|
1783
|
+
position: relative;
|
|
1784
|
+
`,Hp=_t.div`
|
|
1785
|
+
display: flex;
|
|
1786
|
+
flex-direction: column;
|
|
1787
|
+
gap: 0;
|
|
1788
|
+
min-width: 150px;
|
|
1789
|
+
width: fit-content;
|
|
1790
|
+
padding: 8px;
|
|
1791
|
+
border-radius: 6px;
|
|
1792
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
1793
|
+
box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.3);
|
|
1794
|
+
position: absolute;
|
|
1795
|
+
${({$alignX:e})=>`${e}: 0;`}
|
|
1796
|
+
${({$alignY:e,$withButton:t})=>`${e}: ${t?"calc(100% + 8px)":"0"};`}
|
|
1797
|
+
`,qp=_t.div`
|
|
1798
|
+
display: flex;
|
|
1799
|
+
align-items: center;
|
|
1800
|
+
gap: 8px;
|
|
1801
|
+
width: calc(100% - 16px);
|
|
1802
|
+
padding: 8px;
|
|
1803
|
+
border-radius: 6px;
|
|
1804
|
+
cursor: pointer;
|
|
1805
|
+
${({$selected:e})=>e?Bt`
|
|
1806
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
1807
|
+
`:Bt`
|
|
1808
|
+
background-color: transparent;
|
|
1809
|
+
&:hover {
|
|
1810
|
+
background-color: ${({theme:e})=>e.v2.colors.grey[700]};
|
|
1811
|
+
}
|
|
1812
|
+
`}
|
|
1813
|
+
`,Gp=({items:e,selectedIds:t,setSelectedIds:o,withMultiSelect:n,alignX:i,alignY:r,defaultOpen:a,buttonProps:s,iconButtonProps:l})=>{const c=Rt(),d=!!s||!!l,[p,u]=wt(a??!d),[h,m]=wt({x:i||Up.Left,y:r||Wp.Top}),g=e=>{u(e=>!e),m({x:i||(e.clientX>window.innerWidth/2?Up.Right:Up.Left),y:r||(e.clientY>window.innerHeight/2?Wp.Bottom:Wp.Top)})},$=e=>{o(t.includes(e)?t.filter(t=>t!==e):[...t,e]),d&&!n&&u(!1)},f=vt(null);return Lr(f,()=>u(!1)),xt.createElement(Vp,{ref:f},s&&xt.createElement(yp,{...s,rightIcon:p?pt:ut,onClick:g}),l&&xt.createElement(Tr,{...l,onClick:g}),p&&xt.createElement(Hp,{$withButton:d,$alignX:h.x,$alignY:h.y},e.map(e=>{if(!e)return null;const{id:o,label:n,icon:i,withCheckbox:r}=e,a=t.includes(o);return xt.createElement(qp,{key:o,$selected:a,onClick:()=>$(o)},r&&xt.createElement(Mp,{value:a,onChange:()=>$(o)}),i&&xt.createElement(i,{size:14,fill:c.v2.colors.white[500]}),xt.createElement(ti,{size:Qn.XS,nowrap:!0},n))})))};var Kp;!function(e){e.Button="button",e.ButtonDropData="button-drop-data"}(Kp||(Kp={}));const Yp=({onAnyClick:e,actions:t})=>xt.createElement(Jr,{$gap:8,$alignItems:"center"},t?.map(t=>{if(!t)return null;switch(t.type){case Kp.Button:return xt.createElement(yp,{key:t.id,...t.buttonProps,onClick:o=>{t.buttonProps?.onClick?.(o),e?.()}});case Kp.ButtonDropData:return xt.createElement(Gp,{key:t.id,...t.dropDataProps,items:t.dropDataProps?.items??[],withMultiSelect:!1,selectedIds:[],setSelectedIds:o=>{t.buttonProps?.onClick?.(o[0]),e?.()},buttonProps:t.buttonProps});default:return null}})),Jp=({icon:e,title:t,withCopy:o,badge:n,children:i})=>{const{CopyButton:r}=zr();return xt.createElement(Jr,{$gap:6,$alignItems:"center"},xt.createElement(e,{size:24}),xt.createElement(ti,{nowrap:!0},t),o&&xt.createElement(r,{value:t,size:Ar.XS}),n&&xt.createElement(ni,{...n}),i)};var Xp;!function(e){e.S="small",e.M="medium"}(Xp||(Xp={}));const Zp=_t.div`
|
|
1814
|
+
display: flex;
|
|
1815
|
+
flex-direction: column;
|
|
1816
|
+
gap: ${({$gap:e})=>e}px;
|
|
1817
|
+
width: ${({$padding:e})=>`calc(100% - ${2*e}px)`};
|
|
1818
|
+
padding: ${({$padding:e})=>e}px;
|
|
1819
|
+
border-radius: 16px;
|
|
1820
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
1821
|
+
`,Qp=({size:e=Xp.M,richTitle:t,search:o,actions:n,children:i})=>{const r=e===Xp.S?4:16,a=e===Xp.S?12:16;return xt.createElement(Zp,{$padding:a,$gap:r},xt.createElement(Jr,{$gap:r,$justifyContent:"space-between"},xt.createElement(Jp,{...t},o&&xt.createElement(_p,{...o})),xt.createElement(Yp,{actions:n??[]})),i)},eu=_t.div`
|
|
1822
|
+
flex: 1;
|
|
1823
|
+
align-self: stretch;
|
|
1824
|
+
display: flex;
|
|
1825
|
+
align-items: center;
|
|
1826
|
+
gap: 8px;
|
|
1827
|
+
padding: 16px;
|
|
1828
|
+
border-radius: 12px;
|
|
1829
|
+
background-color: ${({theme:e,$status:t})=>Cn(e,t,t===Ao.Unknown?"750":"500")};
|
|
1830
|
+
`,tu=_t.div`
|
|
1831
|
+
display: flex;
|
|
1832
|
+
align-items: center;
|
|
1833
|
+
justify-content: center;
|
|
1834
|
+
width: fit-content;
|
|
1835
|
+
height: fit-content;
|
|
1836
|
+
padding: 8px;
|
|
1837
|
+
border-radius: 12px;
|
|
1838
|
+
background-color: ${({theme:e,$status:t})=>t===Ao.Unknown?Cn(e,t,"800"):Cn(e,t,"900")+Pi.opacity.hex["015"]};
|
|
1839
|
+
`,ou=({status:e,icon:t,title:o,description:n})=>{const i=Rt(),r=t??Sn(e,i),a=[Co.Default,Co.Info,Ao.Disabled,Ao.Unknown].includes(e)?i.v2.colors.white[500]:i.v2.colors.black[500];return xt.createElement(eu,{$status:e},xt.createElement(tu,{$status:e},xt.createElement(r,{size:32,fill:a})),xt.createElement(Xr,{$gap:2,$justifyContent:"center"},xt.createElement(ti,{size:Qn.M,weight:500,color:a,nowrap:!0},o),xt.createElement(ti,{size:Qn.XXS,weight:300,color:a,nowrap:!0},n)))},nu=_t.div`
|
|
1840
|
+
flex: 1;
|
|
1841
|
+
align-self: stretch;
|
|
1842
|
+
display: flex;
|
|
1843
|
+
flex-direction: column;
|
|
1844
|
+
gap: 12px;
|
|
1845
|
+
padding: 12px;
|
|
1846
|
+
border-radius: 12px;
|
|
1847
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
1848
|
+
`,iu=["-","N/A"],ru=({title:e,cells:t})=>{const o=Rt();return xt.createElement(nu,null,xt.createElement(ti,{size:Qn.XXS,color:o.v2.colors.grey[150]},e),xt.createElement(Jr,{$gap:32},t.map(t=>xt.createElement(Xr,{key:`${e}-${t.label}-${t.value}`,$gap:2},!t.isLoading||t.value&&!iu.includes(t.value)?xt.createElement(ti,{size:t.label?Qn.M:Qn.L},t.value):xt.createElement(cs,{scale:.9}),t.label&&xt.createElement(ti,{size:Qn.XXS},t.label)))))},au=_t(Jr)`
|
|
1849
|
+
width: calc(100% - 20px);
|
|
1850
|
+
padding: 10px;
|
|
1851
|
+
border-radius: 6px;
|
|
1852
|
+
background-color: ${({theme:e})=>e.v2.colors.grey[800]};
|
|
1853
|
+
display: flex;
|
|
1854
|
+
align-items: center;
|
|
1855
|
+
justify-content: space-between;
|
|
1856
|
+
gap: 12px;
|
|
1857
|
+
`,su=_t.div`
|
|
1858
|
+
position: relative;
|
|
1859
|
+
width: ${({$hideCopy:e})=>e?"100%":"calc(100% - 24px - 12px)"};
|
|
1860
|
+
display: flex;
|
|
1861
|
+
align-items: center;
|
|
1862
|
+
gap: 4px;
|
|
1863
|
+
`,lu=_t.pre`
|
|
1864
|
+
flex: 1;
|
|
1865
|
+
margin: 0;
|
|
1866
|
+
padding: 0;
|
|
1867
|
+
font-size: 14px;
|
|
1868
|
+
color: #5ffb98; // TODO: add to theme
|
|
1869
|
+
overflow-x: auto;
|
|
1870
|
+
`,cu=_t.span`
|
|
1871
|
+
flex-shrink: 0;
|
|
1872
|
+
font-size: 14px;
|
|
1873
|
+
color: #5ffb98; // TODO: add to theme
|
|
1874
|
+
`,du=({value:e,hideCopy:t=!1,onDone:o})=>{const{CopyButton:n}=zr({onDone:o}),i=vt(null),[r,a]=wt(!1);return kt(()=>{const e=()=>{if(i.current){const{scrollWidth:e,clientWidth:t}=i.current;a(e>t)}};e();const t=new ResizeObserver(e);return i.current&&t.observe(i.current),()=>{t.disconnect()}},[e]),xt.createElement(au,null,xt.createElement(su,{$hideCopy:t},xt.createElement(lu,{ref:i},e),r&&xt.createElement(cu,null,"...")),!t&&xt.createElement(n,{value:e,size:Ar.XS}))},pu=_t.div`
|
|
1875
|
+
display: flex;
|
|
1876
|
+
align-items: center;
|
|
1877
|
+
justify-content: space-between;
|
|
1878
|
+
width: calc(100%);
|
|
1879
|
+
`,uu=_t.div`
|
|
1880
|
+
display: flex;
|
|
1881
|
+
align-items: center;
|
|
1882
|
+
gap: 16px;
|
|
1883
|
+
`,hu=_t.div`
|
|
1884
|
+
display: flex;
|
|
1885
|
+
align-items: center;
|
|
1886
|
+
justify-content: center;
|
|
1887
|
+
width: 36px;
|
|
1888
|
+
height: 36px;
|
|
1889
|
+
border-radius: 8px;
|
|
1890
|
+
background: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
1891
|
+
`,mu=_t.div`
|
|
1892
|
+
display: flex;
|
|
1893
|
+
align-items: center;
|
|
1894
|
+
gap: 12px;
|
|
1895
|
+
`,gu=({icon:e,title:t,actions:o,onClose:n,onCloseDisabled:i})=>xt.createElement(pu,null,xt.createElement(uu,null,xt.createElement(hu,null,xt.createElement(e,{size:24})),xt.createElement(ti,{size:Qn.S},t)),xt.createElement(mu,null,o?.length?xt.createElement(Tr,{icon:ht,size:Ar.M,onClick:()=>alert("todo")}):null,xt.createElement(Tr,{icon:Ye,size:Ar.M,onClick:n,disabled:i}))),$u=_t.div`
|
|
1896
|
+
position: fixed;
|
|
1897
|
+
top: 0;
|
|
1898
|
+
bottom: 0;
|
|
1899
|
+
${({$position:e})=>e}: 0;
|
|
1900
|
+
z-index: 1000;
|
|
1901
|
+
|
|
1902
|
+
display: flex;
|
|
1903
|
+
flex-direction: column;
|
|
1904
|
+
gap: 12px;
|
|
1905
|
+
|
|
1906
|
+
width: calc(${({$width:e})=>e} - 32px);
|
|
1907
|
+
padding: 12px;
|
|
1908
|
+
border-radius: ${({$position:e})=>"left"===e?"0 20px 20px 0":"20px 0 0 20px"};
|
|
1909
|
+
background: ${({theme:e})=>e.v2.colors.black[500]};
|
|
1910
|
+
box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
|
|
1911
|
+
overflow: hidden;
|
|
1912
|
+
|
|
1913
|
+
animation-name: ${({$position:e})=>Pi.animations.slide.in[e]};
|
|
1914
|
+
`,fu=_t.div`
|
|
1915
|
+
display: flex;
|
|
1916
|
+
flex-direction: column;
|
|
1917
|
+
gap: 12px;
|
|
1918
|
+
|
|
1919
|
+
height: calc(100% - ${56}px);
|
|
1920
|
+
overflow-y: auto;
|
|
1921
|
+
`,xu=({isOpen:e,hideOverlay:t=!1,position:o="right",width:n="40vw",header:i,children:r})=>(br(e),e?Ht(xt.createElement(xt.Fragment,null,!t&&xt.createElement(ea,{onClick:i.onCloseDisabled?void 0:i.onClose}),xt.createElement($u,{$position:o,$width:n},xt.createElement(gu,{...i}),xt.createElement(fu,null,r))),document.body):null),bu=_t.header`
|
|
1922
|
+
position: relative;
|
|
1923
|
+
width: calc(100% - 36px);
|
|
1924
|
+
padding: 12px 18px;
|
|
1925
|
+
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
1926
|
+
display: flex;
|
|
1927
|
+
align-items: center;
|
|
1928
|
+
justify-content: space-between;
|
|
1929
|
+
`,yu=_t(Jr)`
|
|
1930
|
+
position: absolute;
|
|
1931
|
+
left: 50%;
|
|
1932
|
+
transform: translateX(-50%);
|
|
1933
|
+
gap: 16px;
|
|
1934
|
+
`,wu=({left:e=[],center:t=[],right:o=[]})=>xt.createElement(bu,null,xt.createElement(Jr,{$gap:16},e),xt.createElement(yu,null,t),xt.createElement(Jr,{$gap:16},o)),ku=_t.div`
|
|
1935
|
+
display: flex;
|
|
1936
|
+
align-items: center;
|
|
1937
|
+
gap: 2px;
|
|
1938
|
+
width: fit-content;
|
|
1939
|
+
padding: 4px;
|
|
1940
|
+
border-radius: 8px;
|
|
1941
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
1942
|
+
box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.25);
|
|
1943
|
+
|
|
1944
|
+
position: absolute;
|
|
1945
|
+
right: ${({$right:e})=>e||"12px"};
|
|
1946
|
+
top: 50%;
|
|
1947
|
+
transform: translateY(-50%);
|
|
1948
|
+
`,vu=({isOpen:e,actions:t,positionRight:o})=>e?xt.createElement(ku,{$right:o},t.map(e=>e?xt.createElement(va,{key:e.id,text:e.tooltip||""},xt.createElement(yp,{...e,variant:fp.Secondary,size:xp.S,label:e.label})):null)):null,Cu=_t.span`
|
|
1949
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1950
|
+
font-size: 14px;
|
|
1951
|
+
font-weight: 400;
|
|
1952
|
+
color: ${({theme:e})=>e.text.error};
|
|
1953
|
+
`,Eu=_t.span`
|
|
1954
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1955
|
+
font-size: 14px;
|
|
1956
|
+
font-weight: 400;
|
|
1957
|
+
color: ${({theme:e})=>e.v2.colors.silver[200]};
|
|
1958
|
+
`,Su=_t.div`
|
|
1959
|
+
padding: 12px;
|
|
1960
|
+
display: flex;
|
|
1961
|
+
align-self: stretch;
|
|
1962
|
+
align-items: center;
|
|
1963
|
+
gap: 8px;
|
|
1964
|
+
border-radius: 6px;
|
|
1965
|
+
|
|
1966
|
+
border: 1px solid ${({theme:e,$disabled:t,$error:o})=>t?e.v2.colors.grey[600]:o?e.v2.colors.red[500]:e.v2.colors.silver[500]};
|
|
1967
|
+
background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
|
|
1968
|
+
${({$disabled:e,$error:t})=>!e&&!t&&Bt`
|
|
1969
|
+
&:hover,
|
|
1970
|
+
&:active,
|
|
1971
|
+
&:focus-within {
|
|
1972
|
+
border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
|
|
1973
|
+
}
|
|
1974
|
+
`}
|
|
1975
|
+
`,Au=_t.input`
|
|
1976
|
+
flex: 1;
|
|
1977
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
1978
|
+
font-size: 14px;
|
|
1979
|
+
font-weight: 400;
|
|
1980
|
+
line-height: 22px;
|
|
1981
|
+
|
|
1982
|
+
cursor: text;
|
|
1983
|
+
color: ${({theme:e})=>e.v2.colors.white[500]};
|
|
1984
|
+
&::placeholder {
|
|
1985
|
+
color: ${({theme:e})=>e.v2.colors.silver[200]};
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
&:disabled {
|
|
1989
|
+
cursor: not-allowed;
|
|
1990
|
+
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
1991
|
+
&::placeholder {
|
|
1992
|
+
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
overflow: hidden;
|
|
1997
|
+
text-overflow: ellipsis;
|
|
1998
|
+
white-space: nowrap;
|
|
1999
|
+
`,Du=_t.div`
|
|
2000
|
+
cursor: pointer;
|
|
2001
|
+
`,Tu=({label:e,required:t,tooltip:o,leftIcon:n,rightIcon:i,errorMessage:r,helpMessage:a,type:s=vo.Text,name:l,value:c,onChange:d,disabled:p,...u})=>{const h=Pi.useTheme(),m=s===vo.Password,[g,$]=wt(!1),f=c?h.v2.colors.white[500]:p?h.v2.colors.grey[400]:h.v2.colors.silver[200];return xt.createElement(Xr,{$gap:6},xt.createElement(Jr,{$justifyContent:"space-between"},e&&xt.createElement(Eu,null,e),xt.createElement(Jr,{$gap:10},o&&xt.createElement(va,{text:o,withIcon:!0}),t&&xt.createElement(Cu,null,"*"))),xt.createElement(Su,{$disabled:p,$error:!!r},n?xt.createElement(n,{size:18,fill:f}):null,xt.createElement(Au,{"data-id":l,type:g||s===vo.Number?vo.Text:s,name:l,value:c,onChange:e=>{e.stopPropagation(),s===vo.Number&&(e.target.value=Vn(e.target.value)),d?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:p,...u}),m?xt.createElement(Du,{onClick:()=>$(e=>!e)},g?xt.createElement(nt,{size:18,strokeWidth:2,fill:f}):xt.createElement(it,{size:18,strokeWidth:2,fill:f})):i?xt.createElement(i,{size:18,fill:f}):null),r?xt.createElement(Jr,{$gap:4},xt.createElement(je,{size:12,fill:h.v2.colors.red[500]}),xt.createElement(ti,{size:Qn.XXS,weight:400,color:h.v2.colors.red[500]},r)):a?xt.createElement(Jr,{$gap:4},xt.createElement(je,{size:12,fill:h.v2.colors.silver[200]}),xt.createElement(ti,{size:Qn.XXS,weight:400,color:h.v2.colors.silver[200]},a)):null)},zu=_t.div`
|
|
2002
|
+
position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
|
|
2003
|
+
top: 50%;
|
|
2004
|
+
left: 50%;
|
|
2005
|
+
transform: translate(-50%, -50%);
|
|
2006
|
+
z-index: 1000;
|
|
2007
|
+
width: fit-content;
|
|
2008
|
+
border-radius: 20px;
|
|
2009
|
+
background: ${({theme:e})=>e.v2.colors.black[500]};
|
|
2010
|
+
box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
|
|
2011
|
+
overflow: hidden;
|
|
2012
|
+
|
|
2013
|
+
animation-name: ${Pi.animations.slide.in.center};
|
|
2014
|
+
`,Fu=_t.div`
|
|
2015
|
+
position: relative;
|
|
2016
|
+
`,Ou=_t.div`
|
|
2017
|
+
position: absolute;
|
|
2018
|
+
top: 16px;
|
|
2019
|
+
left: 16px;
|
|
2020
|
+
`,Nu=({isOpen:e,hideOverlay:t=!1,relativeToParent:o=!1,onBack:n,onClose:i,children:r})=>{if(br(e),!e)return null;const a=xt.createElement(xt.Fragment,null,!t&&xt.createElement(ea,{$relativeToParent:o,onClick:i}),xt.createElement(zu,{$relativeToParent:o},xt.createElement(Fu,null,n&&xt.createElement(Ou,null,xt.createElement(Tr,{icon:e=>xt.createElement(dt,{rotate:-90,...e}),size:Ar.L,onClick:n})),r)));return o?a:Ht(a,document.body)},Iu=_t.div`
|
|
2021
|
+
min-width: 530px;
|
|
2022
|
+
`,_u=_t.div`
|
|
2023
|
+
display: flex;
|
|
2024
|
+
flex-direction: column;
|
|
2025
|
+
align-items: center;
|
|
2026
|
+
gap: 16px;
|
|
2027
|
+
padding: 24px;
|
|
2028
|
+
`,Bu=_t.div`
|
|
2029
|
+
display: flex;
|
|
2030
|
+
justify-content: center;
|
|
2031
|
+
gap: 16px;
|
|
2032
|
+
padding: 16px 24px;
|
|
2033
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
2034
|
+
`,Ru=({visual:e,title:t,description:o,isOpen:n,onClose:i,onDeny:r,denyLabel:a="Deny",onApprove:s,approveLabel:l="Approve",...c})=>{const d=Rt();return xt.createElement(Nu,{isOpen:n,onClose:i,...c},xt.createElement(Iu,null,xt.createElement(_u,null,e&&xt.createElement(e,null),xt.createElement(ti,{size:Qn.M,weight:500,color:d.v2.colors.white[500]},t),xt.createElement(Xr,{$alignItems:"center",$gap:4},o.split("\n").map(e=>xt.createElement(ti,{key:e,size:Qn.XS,weight:400,color:d.v2.colors.silver[200]},e)))),(r||s)&&xt.createElement(Bu,null,xt.createElement(yp,{variant:fp.Secondary,label:a,onClick:()=>{r?.(),i()}}),s&&xt.createElement(yp,{variant:fp.Primary,label:l,onClick:()=>{s(),i()}}))))},Lu=({isOpen:e,onClose:t,onDeny:o,onApprove:n})=>xt.createElement(Ru,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:e,onClose:t,onDeny:o,denyLabel:"Keep editing",onApprove:n,approveLabel:"Discard changes"}),Mu=({isOpen:e,onClose:t,onDeny:o,onApprove:n,action:i="delete",target:r})=>{const a=i.charAt(0).toUpperCase()+i.substring(1),s=r?.endsWith("s")?"these":"this";return xt.createElement(Ru,{title:`${a}${r?` ${r}`:""}?`,description:`Are you sure you want to ${i}${r?` ${s} ${r}`:""}?`,isOpen:e,onClose:t,onDeny:o,denyLabel:"Go back",onApprove:n,approveLabel:a})},Pu=434,ju=635,Uu=_t.div`
|
|
2035
|
+
width: ${434}px;
|
|
2036
|
+
height: ${635}px;
|
|
2037
|
+
display: flex;
|
|
2038
|
+
flex-direction: column;
|
|
2039
|
+
align-items: center;
|
|
2040
|
+
justify-content: center;
|
|
2041
|
+
padding: 16px;
|
|
2042
|
+
background: linear-gradient(180deg, #0b0517 2.82%, #190d31 100%);
|
|
2043
|
+
position: relative;
|
|
2044
|
+
`,Wu=_t.div`
|
|
2045
|
+
position: absolute;
|
|
2046
|
+
top: 50%;
|
|
2047
|
+
left: 50%;
|
|
2048
|
+
transform: translate(-50%, -50%);
|
|
2049
|
+
`,Vu=()=>xt.createElement(Uu,null,xt.createElement(Wu,null,xt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"464",height:"464",viewBox:"0 0 464 464",fill:"none"},xt.createElement("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)"}),xt.createElement("defs",null,xt.createElement("radialGradient",{id:"paint0_radial_164_65835",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(201.232 229.641) scale(231.217)"},xt.createElement("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),xt.createElement("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),xt.createElement("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),xt.createElement("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),xt.createElement("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),xt.createElement("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),xt.createElement("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),xt.createElement("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),xt.createElement("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"}))))),xt.createElement(Wu,null,xt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"432",height:"432",viewBox:"0 0 432 432",fill:"none"},xt.createElement("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)"}),xt.createElement("defs",null,xt.createElement("radialGradient",{id:"paint0_radial_164_65836",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(204.229 214.376) scale(216.276)"},xt.createElement("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),xt.createElement("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),xt.createElement("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),xt.createElement("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),xt.createElement("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),xt.createElement("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),xt.createElement("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),xt.createElement("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),xt.createElement("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),xt.createElement("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),xt.createElement("stop",{offset:"1",stopColor:"#7C3BFF"}))))),xt.createElement(Wu,null,xt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"374",height:"374",viewBox:"0 0 374 374",fill:"none"},xt.createElement("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)"}),xt.createElement("defs",null,xt.createElement("radialGradient",{id:"paint0_radial_164_65837",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(166.792 184.246) scale(186.963)"},xt.createElement("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),xt.createElement("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),xt.createElement("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),xt.createElement("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),xt.createElement("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),xt.createElement("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),xt.createElement("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),xt.createElement("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),xt.createElement("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),xt.createElement("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),xt.createElement("stop",{offset:"1",stopColor:"#7C3BFF"}))))),xt.createElement(Wu,null,xt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"257",height:"257",viewBox:"0 0 257 257",fill:"none"},xt.createElement("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)"}),xt.createElement("defs",null,xt.createElement("radialGradient",{id:"paint0_radial_164_65838",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(113.263 126.219) scale(128.08)"},xt.createElement("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),xt.createElement("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),xt.createElement("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),xt.createElement("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),xt.createElement("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),xt.createElement("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),xt.createElement("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),xt.createElement("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),xt.createElement("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),xt.createElement("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),xt.createElement("stop",{offset:"1",stopColor:"#7C3BFF"}))))),xt.createElement(Wu,null,xt.createElement(se,{size:112}))),Hu=_t.div`
|
|
2050
|
+
width: ${({$size:e})=>e}px;
|
|
2051
|
+
height: ${({$size:e})=>e}px;
|
|
2052
|
+
border-radius: 100%;
|
|
2053
|
+
background: ${({$color:e})=>e};
|
|
2054
|
+
display: flex;
|
|
2055
|
+
align-items: center;
|
|
2056
|
+
justify-content: center;
|
|
2057
|
+
`,qu=()=>xt.createElement(Hu,{$size:74,$color:"rgba(80, 246, 232, 0.10)"},xt.createElement(Hu,{$size:71,$color:"rgba(80, 246, 232, 0.20)"},xt.createElement(Hu,{$size:65,$color:"rgba(80, 246, 232, 0.40)"},xt.createElement(Hu,{$size:56,$color:"rgba(80, 246, 232, 0.60)"},xt.createElement(Hu,{$size:39,$color:"#50F6E8"},xt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none"},xt.createElement("path",{fill:"#151618",d:"M9.4844 0.730003C9.99694 -0.243259 11.4076 -0.24341 11.92 0.730003L11.9685 0.831353L14.3039 6.22012L20.153 6.77755C21.3553 6.89211 21.841 8.38683 20.9358 9.18621L16.5314 13.0731L17.8091 18.8079C18.0716 19.9868 16.8005 20.9109 15.7605 20.2969L10.7017 17.3093L5.64282 20.2969C4.60289 20.9104 3.33173 19.9866 3.59427 18.8079L4.87192 13.0741L0.468608 9.18621C-0.43662 8.38693 0.0482932 6.8924 1.25029 6.77755L7.09837 6.22012L9.43588 0.831353L9.4844 0.730003ZM8.55284 7.02876C8.35287 7.48992 7.9179 7.80589 7.41751 7.85357L2.03952 8.36571L6.09027 11.941C6.46691 12.2737 6.63296 12.7852 6.5237 13.2758L5.34956 18.5459L10.0008 15.8009L10.1669 15.7179C10.5087 15.574 10.8945 15.5741 11.2364 15.7179L11.4036 15.8009L16.0538 18.5459L14.8807 13.2758C14.7714 12.7851 14.9374 12.2737 15.3141 11.941L19.3627 8.36571L13.9858 7.85357C13.4855 7.80587 13.0505 7.4899 12.8505 7.02876L10.7017 2.07342L8.55284 7.02876Z"}))))))),Gu=_t.div`
|
|
2058
|
+
width: ${({$size:e})=>e}px;
|
|
2059
|
+
height: ${({$size:e})=>e}px;
|
|
2060
|
+
border-radius: 100%;
|
|
2061
|
+
background: ${({$color:e})=>e};
|
|
2062
|
+
display: flex;
|
|
2063
|
+
align-items: center;
|
|
2064
|
+
justify-content: center;
|
|
2065
|
+
`,Ku=()=>xt.createElement(Gu,{$size:126,$color:"rgba(80, 246, 232, 0.10)"},xt.createElement(Gu,{$size:121,$color:"rgba(80, 246, 232, 0.20)"},xt.createElement(Gu,{$size:111,$color:"rgba(80, 246, 232, 0.40)"},xt.createElement(Gu,{$size:95,$color:"rgba(80, 246, 232, 0.60)"},xt.createElement(Gu,{$size:67,$color:"#50F6E8"},xt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"46",height:"46",viewBox:"0 0 46 46",fill:"none"},xt.createElement("path",{fill:"#151618",d:"M36.0211 22.2763C36.0211 19.9012 36.0207 18.1909 35.9286 16.8405C35.8373 15.5029 35.6613 14.6218 35.3602 13.8949C34.4783 11.766 32.7865 10.0742 30.6576 9.19229C29.9307 8.89119 29.0496 8.71517 27.712 8.6239C26.3615 8.53176 24.6513 8.53133 22.2762 8.53133C19.9011 8.53133 18.1909 8.53176 16.8404 8.6239C15.5028 8.71517 14.6218 8.89119 13.8948 9.19229C11.7659 10.0742 10.0741 11.766 9.19223 13.8949C8.89113 14.6218 8.71512 15.5029 8.62385 16.8405C8.53171 18.1909 8.53128 19.9012 8.53128 22.2763C8.53128 24.6513 8.53171 26.3616 8.62385 27.712C8.71512 29.0496 8.89113 29.9307 9.19223 30.6576C10.0741 32.7865 11.7659 34.4783 13.8948 35.3602C14.6218 35.6613 15.5028 35.8373 16.8404 35.9286C18.1909 36.0207 19.9011 36.0212 22.2762 36.0212C24.6513 36.0212 26.3615 36.0207 27.712 35.9286C29.0496 35.8373 29.9306 35.6613 30.6576 35.3602C32.7865 34.4783 34.4783 32.7865 35.3602 30.6576C35.6613 29.9307 35.8373 29.0496 35.9286 27.712C36.0207 26.3616 36.0211 24.6513 36.0211 22.2763ZM28.8543 16.2147C29.4095 15.66 30.3097 15.66 30.8649 16.2147C31.4201 16.7699 31.4198 17.67 30.8649 18.2254L20.7543 28.3378C20.1992 28.8929 19.299 28.8925 18.7437 28.3378L14.5299 24.124C13.9747 23.5687 13.9746 22.6686 14.5299 22.1133C15.0851 21.5582 15.9852 21.5582 16.5405 22.1133L19.7472 25.32L28.8543 16.2147ZM38.8649 22.2763C38.8649 24.612 38.8651 26.435 38.7649 27.9046C38.6638 29.387 38.4559 30.6151 37.9873 31.7463C36.8168 34.5717 34.5716 36.8169 31.7462 37.9874C30.615 38.4559 29.387 38.6638 27.9045 38.765C26.435 38.8652 24.6119 38.865 22.2762 38.865C19.9405 38.865 18.1174 38.8652 16.6479 38.765C15.1654 38.6638 13.9374 38.4559 12.8062 37.9874C9.98077 36.8169 7.7356 34.5717 6.56507 31.7463C6.09651 30.6151 5.88862 29.387 5.78748 27.9046C5.68726 26.435 5.6875 24.612 5.6875 22.2763C5.6875 19.9405 5.68726 18.1175 5.78748 16.6479C5.88862 15.1655 6.09651 13.9375 6.56507 12.8063C7.7356 9.98082 9.98077 7.73565 12.8062 6.56513C13.9374 6.09656 15.1654 5.88868 16.6479 5.78753C18.1174 5.68731 19.9405 5.68755 22.2762 5.68755C24.6119 5.68755 26.435 5.68731 27.9045 5.78753C29.387 5.88868 30.615 6.09656 31.7462 6.56513C34.5716 7.73565 36.8168 9.98082 37.9873 12.8063C38.4559 13.9375 38.6638 15.1655 38.7649 16.6479C38.8651 18.1175 38.8649 19.9405 38.8649 22.2763Z"}))))))),Yu=({minSupportedVersion:e,currentVersion:t})=>xt.createElement(Ru,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:qu,title:"Upgrade Required",description:`To use this feature, please upgrade to Odigos v${e} or later.\nCurrent version: ${t}.`}),Ju=_t.div`
|
|
2066
|
+
padding: 0 12px;
|
|
2067
|
+
`,Xu=({yaml:e})=>{const{clickCopy:t,isCopied:o}=zr(),n=yt(()=>[{id:rn(),type:Kp.Button,buttonProps:{leftIcon:o?Ge:Ke,onClick:()=>t(e||""),disabled:o,size:xp.S,variant:fp.Secondary}}],[e,o]);return xt.createElement(Qp,{richTitle:{icon:mt,title:"YAML"},actions:n},xt.createElement(Ju,null,e?xt.createElement(ns,{code:e,language:"yaml",theme:"duotoneDark"}):xt.createElement(Zr,null,xt.createElement(Zs,{title:"No YAML found",subTitle:"The YAML for this resource is not available"}))))},Zu=_t.div`
|
|
2068
|
+
display: flex;
|
|
2069
|
+
align-items: center;
|
|
2070
|
+
justify-content: space-between;
|
|
2071
|
+
gap: 32px;
|
|
2072
|
+
|
|
2073
|
+
padding: 18px 16px;
|
|
2074
|
+
border-radius: 18px;
|
|
2075
|
+
background-color: ${({theme:e})=>e.v2.colors.black[500]+Pi.opacity.hex["095"]};
|
|
2076
|
+
box-shadow: 0 4px 16.7px 0 rgba(0, 0, 0, 0.83);
|
|
2077
|
+
|
|
2078
|
+
position: fixed;
|
|
2079
|
+
bottom: 0;
|
|
2080
|
+
left: 50%;
|
|
2081
|
+
animation-name: ${Pi.animations.slide.in.center};
|
|
2082
|
+
`,Qu=({isOpen:e,onClose:t,richTitle:o,actions:n})=>e?xt.createElement(Zu,null,xt.createElement(Jp,{...o}),xt.createElement(Yp,{onAnyClick:t,actions:n})):null,eh=_t.div`
|
|
2083
|
+
border-radius: 100%;
|
|
2084
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
2085
|
+
position: relative;
|
|
2086
|
+
`,th=_t.div`
|
|
2087
|
+
width: 80px;
|
|
2088
|
+
height: 80px;
|
|
2089
|
+
border-radius: 100%;
|
|
2090
|
+
border: 4px solid ${({theme:e})=>e.v2.colors.green[300]};
|
|
2091
|
+
border-right-color: transparent;
|
|
2092
|
+
border-left-color: transparent;
|
|
2093
|
+
border-bottom-color: transparent;
|
|
2094
|
+
animation: spin 1s linear infinite;
|
|
2095
|
+
@keyframes spin {
|
|
2096
|
+
to {
|
|
2097
|
+
transform: rotate(360deg);
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
`,oh=_t(ti)`
|
|
2101
|
+
position: absolute;
|
|
2102
|
+
top: 50%;
|
|
2103
|
+
left: 50%;
|
|
2104
|
+
transform: translate(-50%, -50%);
|
|
2105
|
+
`,nh=({percentage:e})=>xt.createElement(eh,null,xt.createElement(th,null),"number"==typeof e?xt.createElement(oh,{size:Qn.M,weight:500},`${e}%`):null),ih={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 rh(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const o=(e.match(/^[0-9.]*/)||"").toString();t=o.includes(".")?parseFloat(o):parseInt(o,10);const n=(e.match(/[^0-9]*$/)||"").toString();return ih[n]?{value:t,unit:n}:{value:t,unit:"px"}}function ah(e){const t=rh(e);return`${t.value}${t.unit}`}const sh=(()=>{const e="react-spinners-SpinnerOld-fade";if("undefined"==typeof window||!window.document)return e;const t=document.createElement("style");document.head.appendChild(t);const o=t.sheet,n=`\n @keyframes ${e} {\n 50% {opacity: 0.3} 100% {opacity: 1}\n }\n `;return o&&o.insertRule(n,0),e})(),lh=({loading:e=!0,color:t,scale:o=1,speedMultiplier:n=1,cssOverride:i={},style:r={},...a})=>{const s=Rt(),l=t||s.text.secondary;if(!e)return null;const{value:c}=rh(2),d=c+4.2,p=d/2+d/5.5,u=4*d*o,h={position:"relative",width:`${u}px`,height:`${u}px`,scale:o,...r,...i},m=(e,t)=>({position:"absolute",width:ah(1.5),height:ah(4),borderRadius:ah(2),backgroundColor:l,transition:"2s",animationFillMode:"both",animation:`${sh} ${1.2/n}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return xt.createElement("span",{style:h,...a},xt.createElement("span",{style:{...m(1,0),top:`calc(50% + ${d}px)`,left:"50%"}}),xt.createElement("span",{style:{...m(2,-45),top:`calc(50% + ${p}px)`,left:`calc(50% + ${p}px)`}}),xt.createElement("span",{style:{...m(3,90),top:"50%",left:`calc(50% + ${d}px)`}}),xt.createElement("span",{style:{...m(4,45),top:`calc(50% + ${-1*p}px)`,left:`calc(50% + ${p}px)`}}),xt.createElement("span",{style:{...m(5,0),top:`calc(50% + ${-1*d}px)`,left:"50%"}}),xt.createElement("span",{style:{...m(6,-45),top:`calc(50% + ${-1*p}px)`,left:`calc(50% + ${-1*p}px)`}}),xt.createElement("span",{style:{...m(7,90),top:"50%",left:`calc(50% + ${-1*d}px)`}}),xt.createElement("span",{style:{...m(8,45),top:`calc(50% + ${p}px)`,left:`calc(50% + ${-1*p}px)`}}))},ch=Mt`
|
|
2106
|
+
0% {
|
|
2107
|
+
background-position: 0% 50%;
|
|
2108
|
+
}
|
|
2109
|
+
100% {
|
|
2110
|
+
background-position: 100% 50%;
|
|
2111
|
+
}
|
|
2112
|
+
`,dh=_t(ti)`
|
|
2113
|
+
background: ${({$titleColor:e,$gradientColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
|
|
2114
|
+
background-size: 250% 100%; /* Expand background to allow movement */
|
|
2115
|
+
background-clip: text;
|
|
2116
|
+
color: transparent;
|
|
2117
|
+
animation: ${ch} 1s reverse linear infinite;
|
|
2118
|
+
`,ph=({icon:e,title:t,titleColor:o,titleSize:n=Qn.S,subTitle:i,subTitleColor:r,subTitleSize:a=Qn.XXXS,withGradient:s,gradientColor:l,withSpinner:c,prettySpinner:d,percentage:p})=>{const u=Pi.useTheme(),h=o||u.v2.colors.white[500],m=r||u.v2.colors.silver[200],g=l||u.v2.colors.black[500],$=xt.createElement(Jr,{$gap:4},e&&xt.createElement(e,null),s?xt.createElement(dh,{align:"center",size:n,$titleColor:h,$gradientColor:g},t):xt.createElement(ti,{align:"center",size:n,color:h},t));return c?xt.createElement(Xr,{$gap:16,$alignItems:"center"},c?d?xt.createElement(nh,{percentage:p}):xt.createElement(lh,{scale:2}):null,xt.createElement(Xr,{$gap:8,$alignItems:"center"},$,i?xt.createElement(ti,{align:"center",size:a,color:m},i):null)):$},uh=_t.aside`
|
|
2119
|
+
display: flex;
|
|
2120
|
+
flex-direction: column;
|
|
2121
|
+
gap: 8px;
|
|
2122
|
+
height: ${({$height:e})=>e};
|
|
2123
|
+
width: fit-content;
|
|
2124
|
+
padding: 16px 12px;
|
|
2125
|
+
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
2126
|
+
overflow-y: auto;
|
|
2127
|
+
`,hh=({height:e,icons:t})=>xt.createElement(uh,{$height:e},t.map(({id:e,selected:t,icon:o,onClick:n})=>xt.createElement(yp,{key:e,label:"",leftIcon:o,iconSize:24,onClick:n,variant:t?fp.Primary:fp.Text}))),mh=_t.div`
|
|
2128
|
+
display: flex;
|
|
2129
|
+
align-items: center;
|
|
2130
|
+
gap: 10px;
|
|
2131
|
+
${({$fullWidth:e})=>e&&Bt`
|
|
2132
|
+
width: calc(100% - 16px);
|
|
2133
|
+
`}
|
|
2134
|
+
padding: 4px 12px 4px 4px;
|
|
2135
|
+
border-radius: 8px;
|
|
2136
|
+
background-color: ${({theme:e,$status:t})=>Cn(e,t,[Co.Info].includes(t)?"1000":"900")};
|
|
2137
|
+
`,gh=_t.div`
|
|
2138
|
+
width: 32px;
|
|
2139
|
+
height: 32px;
|
|
2140
|
+
display: flex;
|
|
2141
|
+
align-items: center;
|
|
2142
|
+
justify-content: center;
|
|
2143
|
+
border-radius: 6px;
|
|
2144
|
+
background-color: ${({theme:e,$status:t})=>Cn(e,t,[Co.Info].includes(t)?"900":"800")};
|
|
2145
|
+
`,$h=_t.div`
|
|
2146
|
+
margin-left: auto;
|
|
2147
|
+
margin-right: 8px;
|
|
2148
|
+
cursor: pointer;
|
|
2149
|
+
&:hover {
|
|
2150
|
+
transform: scale(1.2);
|
|
2151
|
+
}
|
|
2152
|
+
`,fh=({status:e,message:t,action:o,fullWidth:n})=>{const i=Pi.useTheme(),r=Sn(e,i),a=Cn(i,e,e===Co.Default?"300":e===Co.Info?"400":"500");return xt.createElement(mh,{$status:e,$fullWidth:n},xt.createElement("div",null,xt.createElement(gh,{$status:e},xt.createElement(r,{size:24}))),xt.createElement(ti,{color:a,size:Qn.XXXS,weight:400},t),o&&xt.createElement($h,{onClick:o.onClick},xt.createElement(ti,{color:a,size:Qn.XXS,weight:500,underline:!0},o.label)))};var xh;!function(e){e.S="small",e.L="large"}(xh||(xh={}));const bh=_t.div`
|
|
2153
|
+
width: fit-content;
|
|
2154
|
+
display: flex;
|
|
2155
|
+
align-items: center;
|
|
2156
|
+
gap: 8px;
|
|
2157
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
2158
|
+
`,yh=_t.div`
|
|
2159
|
+
width: ${({$size:e})=>e===xh.S?"16px":"20px"};
|
|
2160
|
+
height: ${({$size:e})=>e===xh.S?"16px":"20px"};
|
|
2161
|
+
display: flex;
|
|
2162
|
+
align-items: center;
|
|
2163
|
+
justify-content: center;
|
|
2164
|
+
border-radius: 100%;
|
|
2165
|
+
border: 1px solid ${({$borderColor:e})=>e};
|
|
2166
|
+
background-color: ${({$backgroundColor:e})=>e};
|
|
2167
|
+
`,wh=({label:e,value:t,onChange:o,disabled:n,size:i=xh.L})=>{const r=Pi.useTheme(),[a,s]=wt(!1),l=t,c=i===xh.S?6:8,d=n?r.v2.colors.grey[400]:r.v2.colors.white[500],p=l?"transparent":n?r.v2.colors.grey[700]:a?r.v2.colors.silver[400]:r.v2.colors.silver[600],u=n?r.v2.colors.grey[600]:l?r.v2.colors.purple[500]:r.v2.colors.silver[900];return xt.createElement(bh,{"data-id":"radio"+(e?`-${e}`:""),onClick:e=>{e.stopPropagation(),n||o(!t)},$disabled:n,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1)},xt.createElement(yh,{$size:i,$borderColor:p,$backgroundColor:u},t?xt.createElement(gt,{size:c,fill:d}):null),e&&xt.createElement(ti,{size:i===xh.S?Qn.XXS:Qn.XS},e))},kh=_t.div`
|
|
2168
|
+
display: flex;
|
|
2169
|
+
flex-direction: ${({$flexDirection:e})=>e};
|
|
2170
|
+
gap: ${({$gap:e})=>e}px;
|
|
2171
|
+
`,vh=({label:e,direction:t,disabled:o,size:n,options:i,values:r,setValues:a})=>xt.createElement(kh,{$flexDirection:t===ho.Horizontal?"row":"column",$gap:t===ho.Horizontal?16:8},e&&xt.createElement(ti,null,e),i.map(t=>xt.createElement(wh,{key:`${e}-radio-${t.id}`,...t,value:r[t.id],onChange:e=>{return o=t.id,n=e,void a(e=>{const t={...e};return Object.keys(t).forEach(e=>t[e]=!1),t[o]=n,t});var o,n},disabled:o,size:n})));var Ch;!function(e){e.Data="data",e.Pretty="pretty"}(Ch||(Ch={}));const Eh=_t.div`
|
|
2172
|
+
// max-height: ${({$maxHeight:e})=>e};
|
|
2173
|
+
height: ${({$maxHeight:e})=>e};
|
|
2174
|
+
width: 100%;
|
|
2175
|
+
overflow: auto;
|
|
2176
|
+
`,Sh=_t.table`
|
|
2177
|
+
width: 100%;
|
|
2178
|
+
|
|
2179
|
+
${({$variant:e})=>{switch(e){case Ch.Data:return Bt`
|
|
2180
|
+
border-collapse: collapse;
|
|
2181
|
+
`;case Ch.Pretty:return Bt`
|
|
2182
|
+
border-collapse: separate;
|
|
2183
|
+
border-spacing: 0 8px;
|
|
2184
|
+
`;default:return""}}}
|
|
2185
|
+
`,Ah=_t.thead`
|
|
2186
|
+
position: sticky;
|
|
2187
|
+
top: 0;
|
|
2188
|
+
z-index: 1;
|
|
2189
|
+
`,Dh=_t.th`
|
|
2190
|
+
position: relative;
|
|
2191
|
+
min-width: ${({$minWidth:e})=>e||"auto"};
|
|
2192
|
+
padding: 18px 24px;
|
|
2193
|
+
border: none;
|
|
2194
|
+
border-radius: ${({$isFirst:e,$isLast:t})=>e?"4px 0 0 0":t?"0 4px 0 0":"0"};
|
|
2195
|
+
|
|
2196
|
+
${({$variant:e,$backgroundColor:t})=>{if(t)return Bt`
|
|
2197
|
+
background-color: ${t};
|
|
2198
|
+
`;switch(e){case Ch.Data:return Bt`
|
|
2199
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
2200
|
+
`;case Ch.Pretty:return Bt`
|
|
2201
|
+
background-color: transparent;
|
|
2202
|
+
`;default:return""}}}
|
|
2203
|
+
`,Th=_t.div`
|
|
2204
|
+
position: absolute;
|
|
2205
|
+
top: 50%;
|
|
2206
|
+
right: 0;
|
|
2207
|
+
transform: translateY(-50%);
|
|
2208
|
+
width: 1px;
|
|
2209
|
+
height: 18px;
|
|
2210
|
+
background: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
2211
|
+
`,zh=_t.tbody``,Fh=_t.td`
|
|
2212
|
+
position: relative;
|
|
2213
|
+
padding: 18px 24px;
|
|
2214
|
+
cursor: ${({$withClick:e})=>e?"pointer":"default"};
|
|
2215
|
+
|
|
2216
|
+
${({$variant:e,$selected:t,$hovered:o,$isLastRow:n,$isFirstCell:i,$isLastCell:r})=>{switch(e){case Ch.Data:return Bt`
|
|
2217
|
+
border: ${({theme:e})=>n?"none":`1px solid ${e.v2.colors.silver[500]}`};
|
|
2218
|
+
border-left: none;
|
|
2219
|
+
border-right: none;
|
|
2220
|
+
border-radius: ${n?i?"0 0 0 4px":r?"0 0 4px 0":"0":"0"};
|
|
2221
|
+
background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:o?e.v2.colors.silver[700]:e.v2.colors.silver[800]};
|
|
2222
|
+
`;case Ch.Pretty:return Bt`
|
|
2223
|
+
border: none;
|
|
2224
|
+
border-radius: ${i?"12px 0 0 12px":r?"0 12px 12px 0":"0"};
|
|
2225
|
+
background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:o?e.v2.colors.silver[700]:e.v2.colors.silver[900]};
|
|
2226
|
+
`;default:return""}}}
|
|
2227
|
+
`,Oh=_t.div`
|
|
2228
|
+
width: 100%;
|
|
2229
|
+
display: flex;
|
|
2230
|
+
align-items: center;
|
|
2231
|
+
justify-content: ${({$textAlign:e})=>"right"===e?"flex-end":"left"===e?"flex-start":"center"===e?"center":"unset"};
|
|
2232
|
+
gap: 4px;
|
|
2233
|
+
text-align: ${({$textAlign:e})=>e||"left"};
|
|
2234
|
+
`,Nh=({variant:e,columns:t,rows:o,getRowActions:n,rowActionsPushRightPosition:i,withCheckboxes:r})=>{const[a,s]=wt(null);return xt.createElement(xt.Fragment,null,o.map((l,c)=>{const{cells:d,onClick:p,isSelected:u=!1,onSelect:h,onDeselect:m,hideCheckbox:g}=l,$=a===c,f=n(l),x=(e,t)=>({$isLastRow:c===o.length-1,$isFirstCell:e,$isLastCell:t,$selected:u,$withClick:!!p,onClick:()=>p?.(),$hovered:!!p&&$,onMouseEnter:()=>s(c),onMouseLeave:()=>s(null)});return xt.createElement("tr",{key:`row-${c}`},r&&xt.createElement(Fh,{key:"checkbox-column",$variant:e,...x(!0,!1)},!g&&xt.createElement(Mp,{value:u,onChange:()=>u?m?.():h?.()})),t.map(({key:o,textAlign:n},a)=>{const s=d.find(e=>e.key===o),l=0===a&&!r,p=a===t.length-1;return xt.createElement(Fh,{key:`row-${c}-cell-${a}`,$variant:e,...x(l,p)},s?.component?xt.createElement(Jr,{$justifyContent:"right"===n?"flex-end":"flex-start"},xt.createElement(s.component,null)):xt.createElement(ti,{size:Qn.XS,align:n},s?.rawValue||"-"),f.length?xt.createElement(vu,{isOpen:$&&p,actions:f,positionRight:i}):null)}))}))},Ih=({columnKey:e,sortDirection:t,sortByKey:o,onSort:n})=>{const i=Rt(),r=o===e?i.v2.colors.white[500]:i.v2.colors.grey[400],a=t===mo.Ascending?0:180;return xt.createElement(Tr,{icon:e=>xt.createElement(dt,{fill:r,rotate:a,...e}),onClick:()=>n(e)})},_h=({columnKey:e,filters:t,onFilter:o,rowsUnfiltered:n})=>{const i=Rt(),r=t[e]?.length?i.v2.colors.white[500]:i.v2.colors.grey[400],a=yt(()=>Array.from(new Set(n.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})),[n,e]);return xt.createElement(Gp,{items:a,withMultiSelect:!0,selectedIds:t[e]?.map(e=>e.toString())??[],setSelectedIds:t=>o(e,t),defaultOpen:!1,iconButtonProps:{icon:e=>xt.createElement($t,{fill:r,...e})}})},Bh=({variant:e,backgroundColor:t,columns:o,rowsUnfiltered:n,sortDirection:i,sortByKey:r,onSort:a,filters:s,onFilter:l,withCheckboxes:c,partiallySelected:d,allSelected:p,onSelectAll:u})=>xt.createElement("tr",null,c&&xt.createElement(Dh,{key:"checkbox-column",$variant:e,$backgroundColor:t,$minWidth:24,$isFirst:!0,$isLast:!1},xt.createElement(Mp,{partiallyChecked:d&&!p,value:p||!1,onChange:u})),o.map(({key:d,label:p,noSort:u,noFilter:h,minWidth:m,textAlign:g},$)=>{const f=0===$&&!c,x=$===o.length-1;return xt.createElement(Dh,{key:`column-${d}`,$variant:e,$backgroundColor:t,$minWidth:m,$isFirst:f,$isLast:x},xt.createElement(Oh,{$textAlign:g},xt.createElement(ti,{size:Qn.XS,align:g},p),!u&&xt.createElement(Ih,{columnKey:d,sortDirection:i,sortByKey:r,onSort:a}),!h&&xt.createElement(_h,{columnKey:d,filters:s,onFilter:l,rowsUnfiltered:n})),!x&&e===Ch.Data&&xt.createElement(Th,null))})),Rh=({variant:e,maxHeight:t="unset",headerBackgroundColor:o,isLoading:n,columns:i,rows:r,getRowActions:a,rowActionsPushRightPosition:s,withCheckboxes:l})=>{const[c,d]=wt(mo.Ascending),[p,u]=wt(""),[h,m]=wt({}),g=St(e=>{u(e),d(e=>e===mo.Ascending?mo.Descending:mo.Ascending)},[]),$=St((e,t)=>{m(o=>({...o,[e]:t}))},[]),f=yt(()=>{const e=(e,t)=>{const o=e.cells.find(e=>e.key===t);return o&&(o.rawValue?.toString()||o.component?.({})?.props?.children?.toString())||""};return(p?[...r].sort((t,o)=>{const n=e(t,p),i=e(o,p);return(c===mo.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)))(n,i)}):r).filter(t=>{for(const[o,n]of Object.entries(h))if(n.length&&!n.includes(e(t,o)))return!1;return!0})},[r,p,c,h]),{partiallySelected:x,allSelected:b}=yt(()=>{const e=f.filter(e=>!e.hideCheckbox);return{partiallySelected:e.length>0&&e.some(e=>e.isSelected),allSelected:e.length>0&&e.every(e=>e.isSelected)}},[f]);return xt.createElement(Eh,{$maxHeight:t},xt.createElement(Sh,{$variant:e},xt.createElement(Ah,null,xt.createElement(Bh,{variant:e,backgroundColor:o,columns:i,rowsUnfiltered:r,sortDirection:c,sortByKey:p,onSort:g,filters:h,onFilter:$,withCheckboxes:l,partiallySelected:x,allSelected:b,onSelectAll:e=>{e?f.forEach(e=>!e.hideCheckbox&&e.onSelect?.()):f.forEach(e=>!e.hideCheckbox&&e.onDeselect?.())}})),xt.createElement(zh,null,xt.createElement(Nh,{variant:e,columns:i,rows:f,getRowActions:a||(()=>[]),rowActionsPushRightPosition:s,withCheckboxes:l}))),!f.length&&xt.createElement(Zr,{style:{marginTop:"0.5rem"}},n?xt.createElement(cs,{scale:1.2}):xt.createElement(Zs,null)))},Lh=_t.div`
|
|
2235
|
+
display: flex;
|
|
2236
|
+
align-items: center;
|
|
2237
|
+
justify-content: center;
|
|
2238
|
+
gap: 8px;
|
|
2239
|
+
width: fit-content;
|
|
2240
|
+
padding: 8px;
|
|
2241
|
+
border-radius: 4px;
|
|
2242
|
+
${({$disabled:e,$withClick:t})=>e?Bt`
|
|
2243
|
+
cursor: not-allowed;
|
|
2244
|
+
background-color: ${({theme:e})=>e.v2.colors.grey[800]};
|
|
2245
|
+
`:t?Bt`
|
|
2246
|
+
cursor: pointer;
|
|
2247
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[300]};
|
|
2248
|
+
&:hover {
|
|
2249
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[400]};
|
|
2250
|
+
}
|
|
2251
|
+
&:active {
|
|
2252
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
2253
|
+
}
|
|
2254
|
+
`:Bt`
|
|
2255
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[300]};
|
|
2256
|
+
`}
|
|
2257
|
+
`,Mh=({label:e,leftIcon:t,rightIcon:o,onClick:n,disabled:i})=>{const r=Pi.useTheme(),a=i?r.v2.colors.grey[400]:r.v2.colors.white[500];return xt.createElement(Lh,{$disabled:i,$withClick:!!n,onClick:()=>!i&&n?.()},t&&xt.createElement(t,{fill:a,size:16}),xt.createElement(ti,{color:a,size:Qn.XS,nowrap:!0},e),o&&xt.createElement(o,{fill:a,size:16}))};var Ph,jh,Uh;!function(e){e.Default="default",e.SuccessError="successError"}(Ph||(Ph={})),function(e){e.S="small",e.L="large"}(jh||(jh={})),function(e){e.Left="left",e.Right="right"}(Uh||(Uh={}));const Wh=_t.div`
|
|
2258
|
+
display: flex;
|
|
2259
|
+
align-items: center;
|
|
2260
|
+
gap: ${({$gap:e})=>e}px;
|
|
2261
|
+
`,Vh=_t.div`
|
|
2262
|
+
position: relative;
|
|
2263
|
+
display: flex;
|
|
2264
|
+
align-items: center;
|
|
2265
|
+
justify-content: space-between;
|
|
2266
|
+
|
|
2267
|
+
width: ${({$size:e})=>2*e+2}px;
|
|
2268
|
+
height: ${({$size:e})=>e}px;
|
|
2269
|
+
padding: ${4}px;
|
|
2270
|
+
border-radius: ${({$size:e})=>2*e}px;
|
|
2271
|
+
background-color: ${({$disabled:e,$onBgColor:t,$offBgColor:o,$variant:n,$value:i,theme:r})=>{if(e)return r.v2.colors.grey[800];if(t&&i)return t;if(o&&!i)return o;switch(n){case Ph.SuccessError:return i?r.v2.colors.green[500]:r.v2.colors.red[500];case Ph.Default:default:return i?r.v2.colors.purple[500]:r.v2.colors.grey[400]}}};
|
|
2272
|
+
|
|
2273
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
2274
|
+
`,Hh=_t.div`
|
|
2275
|
+
position: absolute;
|
|
2276
|
+
top: 50%;
|
|
2277
|
+
left: ${({$value:e,$size:t})=>e?`calc(100% - ${t}px - 4px)`:"4px"};
|
|
2278
|
+
transform: translateY(-50%);
|
|
2279
|
+
width: ${({$size:e})=>e}px;
|
|
2280
|
+
height: ${({$size:e})=>e}px;
|
|
2281
|
+
border-radius: 100%;
|
|
2282
|
+
background-color: ${({$color:e})=>e};
|
|
2283
|
+
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)"};
|
|
2284
|
+
`,qh=({variant:e=Ph.Default,size:t=jh.L,label:o,labelAlign:n=Uh.Left,tooltip:i,value:r,onChange:a,disabled:s,withIcon:l,onIcon:c=Ge,offIcon:d=Ye,onBgColor:p,offBgColor:u})=>{const h=Rt(),m=s?h.v2.colors.grey[400]:h.v2.colors.white[500],g=t===jh.S?10:16,$=t===jh.S?Qn.XXXS:Qn.S,f=t===jh.S?8:12;return xt.createElement(Wh,{$gap:f},o&&n===Uh.Left&&xt.createElement(ti,{size:$,nowrap:!0},o),xt.createElement(Vh,{$onBgColor:p,$offBgColor:u,$variant:e,$size:g,$value:r,$disabled:s,onClick:e=>{e.stopPropagation(),s||a(!r)}},xt.createElement(Hh,{$color:m,$size:g,$value:r,$disabled:s}),l&&xt.createElement(xt.Fragment,null,xt.createElement(c,{size:g,fill:m}),xt.createElement(d,{size:g,fill:m}))),o&&n===Uh.Right&&xt.createElement(ti,{size:$,nowrap:!0},o),i&&xt.createElement(va,{text:i,withIcon:!0}))},Gh=_t.div`
|
|
2285
|
+
display: flex;
|
|
2286
|
+
flex-direction: ${({$direction:e})=>e===ho.Horizontal?"row":"column"};
|
|
2287
|
+
gap: ${({$direction:e})=>e===ho.Horizontal?16:8}px;
|
|
2288
|
+
`,Kh=({direction:e=ho.Vertical,title:t,size:o,disabled:n,options:i,values:r,setValues:a})=>{const s=o===jh.S?Qn.XS:Qn.S;return xt.createElement(Gh,{$direction:e},t&&xt.createElement(ti,{size:s},t),i.map(e=>xt.createElement(qh,{key:`${t}-toggle-${e.id}`,...e,labelAlign:Uh.Right,value:r[e.id],onChange:t=>{return o=e.id,n=t,void a(e=>{const t={...e};return o?t[o]=n:i.forEach(e=>t[e.id]=n),t});var o,n},disabled:n,size:o})))};export{Yr as $,Kp as A,ni as B,Mp as C,Yo as D,yo as E,Xr as F,Up as G,Pi as H,Qu as I,En as J,Dp as K,ph as L,Tr as M,Zs as N,Ao as O,ki as P,du as Q,Jp as R,Co as S,ti as T,Op as U,Yp as V,ou as W,ru as X,Xu as Y,jo as Z,Cr as _,Jr as a,Yn as a$,Yu as a0,Zo as a1,oc as a2,ro as a3,so as a4,ml as a5,Ga as a6,Ki as a7,ao as a8,wl as a9,bo as aA,yi as aB,ha as aC,Sd as aD,ta as aE,_a as aF,Xo as aG,lr as aH,ga as aI,sn as aJ,ks as aK,jn as aL,So as aM,Sn as aN,bi as aO,to as aP,Os as aQ,mn as aR,Rs as aS,oa as aT,na as aU,Zc as aV,un as aW,ia as aX,tc as aY,$p as aZ,pr as a_,vo as aa,Nn as ab,dd as ac,hp as ad,fd as ae,ad as af,ko as ag,Hi as ah,Pd as ai,Bd as aj,kc as ak,vd as al,dp as am,$i as an,Rr as ao,Qo as ap,Wc as aq,yc as ar,Va as as,fi as at,xr as au,hn as av,ri as aw,an as ax,xs as ay,mc as az,Qn as b,yd as b$,gr as b0,Si as b1,Ws as b2,Wn as b3,on as b4,zd as b5,$n as b6,pn as b7,dn as b8,_o as b9,Un as bA,Qt as bB,zn as bC,Ho as bD,Nr as bE,Fn as bF,Jt as bG,ai as bH,np as bI,sc as bJ,xn as bK,Lo as bL,qo as bM,Mo as bN,Go as bO,Ro as bP,Po as bQ,Bo as bR,ap as bS,cn as bT,wi as bU,Br as bV,si as bW,Tn as bX,wr as bY,To as bZ,dl as b_,Yd as ba,Er as bb,Sr as bc,Ko as bd,en as be,oo as bf,no as bg,yr as bh,Mr as bi,ya as bj,Wd as bk,Qr as bl,Lr as bm,Pn as bn,Sl as bo,ci as bp,li as bq,Jo as br,Pr as bs,Fr as bt,Ti as bu,Sa as bv,ps as bw,vs as bx,As as by,wo as bz,va as c,Xn as c$,Ss as c0,td as c1,An as c2,On as c3,Es as c4,Ys as c5,Xs as c6,vu as c7,Bn as c8,Hn as c9,Eo as cA,Do as cB,zo as cC,Fo as cD,Oo as cE,Io as cF,Uo as cG,Wo as cH,Vo as cI,Xt as cJ,tn as cK,gn as cL,fn as cM,bn as cN,yn as cO,wn as cP,vn as cQ,Cn as cR,Dn as cS,In as cT,Rn as cU,Mn as cV,Vn as cW,qn as cX,Gn as cY,Kn as cZ,Jn as c_,Ur as ca,Ul as cb,No as cc,xo as cd,qr as ce,_s as cf,ln as cg,_n as ch,zr as ci,Ar as cj,Ll as ck,hi as cl,nn as cm,Ja as cn,kn as co,Ts as cp,io as cq,lo as cr,co as cs,po as ct,uo as cu,ho as cv,mo as cw,go as cx,$o as cy,fo as cz,qh as d,di as d0,pi as d1,ui as d2,ii as d3,vr as d4,br as d5,Ir as d6,al as d7,el as d8,ns as d9,Tu as dA,Nu as dB,hh as dC,xh as dD,wh as dE,vh as dF,Tp as dG,Mh as dH,Ph as dI,Uh as dJ,Kh as dK,Ru as dL,bc as da,Nc as db,Mc as dc,Hc as dd,Jc as de,zs as df,Sc as dg,Ui as dh,Wi as di,Vi as dj,Wa as dk,ea as dl,Pu as dm,ju as dn,Vu as dp,qu as dq,Ku as dr,Cp as ds,Ep as dt,Xp as du,Bp as dv,jp as dw,Wp as dx,Gp as dy,wu as dz,jh as e,Zn as f,Ei as g,eo as h,xu as i,Zr as j,_p as k,fh as l,yp as m,fp as n,Lu as o,$r as p,cs as q,Gr as r,Kr as s,Qp as t,gi as u,rn as v,xp as w,Rh as x,Ch as y,Mu as z};
|