zenml-nightly 0.66.0.dev20240923__py3-none-any.whl → 0.66.0.dev20240927__py3-none-any.whl
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.
- zenml/VERSION +1 -1
- zenml/cli/__init__.py +7 -0
- zenml/cli/base.py +2 -2
- zenml/cli/pipeline.py +21 -0
- zenml/cli/utils.py +14 -11
- zenml/client.py +68 -3
- zenml/config/step_configurations.py +0 -5
- zenml/constants.py +3 -0
- zenml/enums.py +2 -0
- zenml/integrations/__init__.py +1 -0
- zenml/integrations/aws/flavors/sagemaker_orchestrator_flavor.py +76 -7
- zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +370 -115
- zenml/integrations/azure/orchestrators/azureml_orchestrator.py +157 -4
- zenml/integrations/constants.py +1 -0
- zenml/integrations/deepchecks/__init__.py +1 -1
- zenml/integrations/deepchecks/data_validators/deepchecks_data_validator.py +55 -14
- zenml/integrations/deepchecks/validation_checks.py +62 -5
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +207 -18
- zenml/integrations/lightning/__init__.py +1 -1
- zenml/integrations/lightning/flavors/lightning_orchestrator_flavor.py +9 -0
- zenml/integrations/lightning/orchestrators/lightning_orchestrator.py +18 -17
- zenml/integrations/lightning/orchestrators/lightning_orchestrator_entrypoint.py +2 -6
- zenml/integrations/mlflow/steps/mlflow_registry.py +2 -0
- zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +38 -26
- zenml/integrations/skypilot_kubernetes/__init__.py +52 -0
- zenml/integrations/skypilot_kubernetes/flavors/__init__.py +26 -0
- zenml/integrations/skypilot_kubernetes/flavors/skypilot_orchestrator_kubernetes_vm_flavor.py +125 -0
- zenml/integrations/skypilot_kubernetes/orchestrators/__init__.py +25 -0
- zenml/integrations/skypilot_kubernetes/orchestrators/skypilot_kubernetes_vm_orchestrator.py +74 -0
- zenml/integrations/tensorboard/visualizers/tensorboard_visualizer.py +1 -1
- zenml/models/v2/base/filter.py +315 -149
- zenml/models/v2/base/scoped.py +5 -2
- zenml/models/v2/core/artifact_version.py +69 -8
- zenml/models/v2/core/model.py +43 -6
- zenml/models/v2/core/model_version.py +49 -1
- zenml/models/v2/core/model_version_artifact.py +18 -3
- zenml/models/v2/core/model_version_pipeline_run.py +18 -4
- zenml/models/v2/core/pipeline.py +108 -1
- zenml/models/v2/core/pipeline_run.py +172 -21
- zenml/models/v2/core/run_template.py +53 -1
- zenml/models/v2/core/stack.py +33 -5
- zenml/models/v2/core/step_run.py +7 -0
- zenml/new/pipelines/pipeline.py +4 -0
- zenml/new/pipelines/run_utils.py +4 -1
- zenml/orchestrators/base_orchestrator.py +41 -12
- zenml/stack/stack.py +11 -2
- zenml/utils/env_utils.py +54 -1
- zenml/utils/string_utils.py +50 -0
- zenml/zen_server/cloud_utils.py +33 -8
- zenml/zen_server/dashboard/assets/{404-iO8vpun1.js → 404-Y50hSt65.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-B6kq9fJZ.js → @reactflow-ytavUpwh.js} +1 -1
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-xLR9a1iw.js +1 -0
- zenml/zen_server/dashboard/assets/{CodeSnippet-DNWdQmbo.js → CodeSnippet-IxXNxUDa.js} +2 -2
- zenml/zen_server/dashboard/assets/{CollapsibleCard-B2OVjWYE.js → CollapsibleCard-BhutZbBL.js} +1 -1
- zenml/zen_server/dashboard/assets/{Commands-DsoaVElZ.js → Commands-Bf-rd1z8.js} +1 -1
- zenml/zen_server/dashboard/assets/ComponentBadge-gKR1OIwG.js +1 -0
- zenml/zen_server/dashboard/assets/{CopyButton-BqE_-PHO.js → CopyButton-DcFHidFJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{CsvVizualization-Dyasr2jU.js → CsvVizualization-QSbjrfxw.js} +1 -1
- zenml/zen_server/dashboard/assets/{DialogItem-Cz1VLRwa.js → DialogItem-Cd3HqST4.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-DorJD_va.js → Error-BhwdmqK7.js} +1 -1
- zenml/zen_server/dashboard/assets/{ExecutionStatus-CIfQTutR.js → ExecutionStatus-D6r6aK8J.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-CmfvtNeq.js → Helpbox-0pBpTwTm.js} +1 -1
- zenml/zen_server/dashboard/assets/Infobox-BTK_EUKT.js +1 -0
- zenml/zen_server/dashboard/assets/{InlineAvatar-Ds2ZFHPc.js → InlineAvatar-CA3DFMcM.js} +1 -1
- zenml/zen_server/dashboard/assets/Partials-QLOZw624.js +1 -0
- zenml/zen_server/dashboard/assets/{ProviderIcon-BOQJgapd.js → ProviderIcon-C16CCIN4.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderRadio-BsYBw9YA.js → ProviderRadio-D3FuCHf3.js} +1 -1
- zenml/zen_server/dashboard/assets/{SearchField-W3GXpLlI.js → SearchField-BzmfxS0L.js} +1 -1
- zenml/zen_server/dashboard/assets/SecretTooltip-BaMwHF-Q.js +1 -0
- zenml/zen_server/dashboard/assets/{SetPassword-B-0a8UCj.js → SetPassword-DuIC65H9.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tick-i1DYsVcX.js → Tick-DJTCF0Re.js} +1 -1
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-C6Zb7ASL.js → UpdatePasswordSchemas-CUm-DMpw.js} +1 -1
- zenml/zen_server/dashboard/assets/UsageReason-CKw0juLF.js +1 -0
- zenml/zen_server/dashboard/assets/{WizardFooter-BHbO7zOa.js → WizardFooter-Cv9ApYWU.js} +1 -1
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-BBEe6I9-.js → all-pipeline-runs-query-BA3R2Sey.js} +1 -1
- zenml/zen_server/dashboard/assets/{cloud-only-BuP4Kt_7.js → cloud-only-BB4BVa6E.js} +1 -1
- zenml/zen_server/dashboard/assets/{create-stack-B2x2d4r1.js → create-stack-F29xAUEx.js} +1 -1
- zenml/zen_server/dashboard/assets/delete-run-CP0pcJ3U.js +1 -0
- zenml/zen_server/dashboard/assets/{form-schemas-Bap0f854.js → form-schemas-BKXwSDK2.js} +1 -1
- zenml/zen_server/dashboard/assets/index-BhJ6ZJxv.css +1 -0
- zenml/zen_server/dashboard/assets/{index-B9wVwe7u.js → index-Ci0nJ8EZ.js} +5 -5
- zenml/zen_server/dashboard/assets/{index-DFi8BroH.js → index-D-mtoBj3.js} +1 -1
- zenml/zen_server/dashboard/assets/{login-mutation-DwxUz8VA.js → login-mutation-ax6iL2Mb.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-D5i9DunU.js → not-found-DbjllLY_.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-oS4hqS8M.js → page-3qPX9WYH.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-iwoJnwPv.js → page-6mfzecin.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DGMa3ZQL.js → page-8kYmrh0B.js} +1 -1
- zenml/zen_server/dashboard/assets/page-B1n7_W7z.js +1 -0
- zenml/zen_server/dashboard/assets/page-BDg1F-Ug.js +6 -0
- zenml/zen_server/dashboard/assets/{page-xQG6GmFJ.js → page-BXarY9K2.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BZZhLo2u.js +1 -0
- zenml/zen_server/dashboard/assets/page-Bbf_oBjn.js +1 -0
- zenml/zen_server/dashboard/assets/page-BjjuBvZG.js +9 -0
- zenml/zen_server/dashboard/assets/{page-J0s8Sq3N.js → page-BukXK1Aa.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CHaQkFK5.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BitfWsiW.js → page-CKHNAq7z.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DE03uZZR.js → page-CS0SYFK8.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-WCQ659by.js → page-CvKnNK1S.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CrSdkteO.js → page-DGM1CbYT.js} +2 -2
- zenml/zen_server/dashboard/assets/{page-DQGCHKrQ.js → page-DMSLXKGT.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DOmIZ2ra.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DgM-N9RL.js → page-DRfcRK1w.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DYVmJ9_w.js +3 -0
- zenml/zen_server/dashboard/assets/{page-BiF8hLbO.js → page-DcTjHmYZ.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DuqYMYmH.js +1 -0
- zenml/zen_server/dashboard/assets/page-Dwow2doB.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DQdwZZ9x.js → page-HkVBdZl6.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-bimkItOg.js → page-MAXyfXBq.js} +1 -1
- zenml/zen_server/dashboard/assets/page-miU2rhYG.js +1 -0
- zenml/zen_server/dashboard/assets/page-p0BhSAWx.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DFCK65G9.js → page-uORspyRu.js} +1 -1
- zenml/zen_server/dashboard/assets/persist-BxIR2XZs.js +1 -0
- zenml/zen_server/dashboard/assets/{persist-xsYgVtR1.js → persist-CfJMar_k.js} +1 -1
- zenml/zen_server/dashboard/assets/sharedSchema-vub0rii3.js +14 -0
- zenml/zen_server/dashboard/assets/stack-detail-query-DQcyzG-2.js +1 -0
- zenml/zen_server/dashboard/assets/tick-circle-m-hJG8i9.js +1 -0
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-DNqmQXDM.js → update-server-settings-mutation-FGVP7X2U.js} +1 -1
- zenml/zen_server/dashboard/assets/{url-DwbuKk1b.js → url-CbAPzsmT.js} +1 -1
- zenml/zen_server/dashboard/index.html +4 -4
- zenml/zen_server/dashboard_legacy/asset-manifest.json +4 -4
- zenml/zen_server/dashboard_legacy/index.html +1 -1
- zenml/zen_server/dashboard_legacy/{precache-manifest.290b95d5b43efa3368b3dc63d20c4782.js → precache-manifest.6d320abb70db612019dda6c4948e7a90.js} +4 -4
- zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
- zenml/zen_server/dashboard_legacy/static/js/{main.840d1bf0.chunk.js → main.fa9299d5.chunk.js} +2 -2
- zenml/zen_server/dashboard_legacy/static/js/{main.840d1bf0.chunk.js.map → main.fa9299d5.chunk.js.map} +1 -1
- zenml/zen_server/routers/runs_endpoints.py +89 -3
- zenml/zen_stores/sql_zen_store.py +1 -0
- {zenml_nightly-0.66.0.dev20240923.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/METADATA +8 -1
- {zenml_nightly-0.66.0.dev20240923.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/RECORD +132 -124
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-BXeSvmMY.js +0 -1
- zenml/zen_server/dashboard/assets/EditSecretDialog-Du423_3U.js +0 -1
- zenml/zen_server/dashboard/assets/Infobox-BL9NOS37.js +0 -1
- zenml/zen_server/dashboard/assets/Partials-DX-8iEa1.js +0 -1
- zenml/zen_server/dashboard/assets/UsageReason-CCnzmwS8.js +0 -1
- zenml/zen_server/dashboard/assets/index-6DYjZgDn.css +0 -1
- zenml/zen_server/dashboard/assets/page-BFuJICXM.js +0 -9
- zenml/zen_server/dashboard/assets/page-CDOQLrPC.js +0 -1
- zenml/zen_server/dashboard/assets/page-CEJWu1YO.js +0 -1
- zenml/zen_server/dashboard/assets/page-CIbehp7V.js +0 -1
- zenml/zen_server/dashboard/assets/page-CLiRGfWo.js +0 -1
- zenml/zen_server/dashboard/assets/page-CV44mQn9.js +0 -1
- zenml/zen_server/dashboard/assets/page-D5F3DJjm.js +0 -1
- zenml/zen_server/dashboard/assets/page-DI-qTWrm.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dt8VgzbE.js +0 -1
- zenml/zen_server/dashboard/assets/page-oSqx9dkH.js +0 -1
- zenml/zen_server/dashboard/assets/page-p3GqEAUW.js +0 -1
- zenml/zen_server/dashboard/assets/page-qvcUVPE-.js +0 -1
- zenml/zen_server/dashboard/assets/persist-mEZN_fgH.js +0 -1
- zenml/zen_server/dashboard/assets/sharedSchema-BfZcy7aP.js +0 -14
- zenml/zen_server/dashboard/assets/stack-detail-query-CU4egfhp.js +0 -1
- {zenml_nightly-0.66.0.dev20240923.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.66.0.dev20240923.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.66.0.dev20240923.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
const __vite__fileDeps=["assets/CsvVizualization-QSbjrfxw.js","assets/@radix-DnFH_oo1.js","assets/index-Ci0nJ8EZ.js","assets/@tanstack-QbMbTrh5.js","assets/@react-router-APVeuk-U.js","assets/@reactflow-ytavUpwh.js","assets/@reactflow-C26Olbza.css","assets/index-BhJ6ZJxv.css","assets/MarkdownVisualization-DS05sfBm.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
2
|
+
var ts=Object.defineProperty;var rs=(e,t,r)=>t in e?ts(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var v=(e,t,r)=>(rs(e,typeof t!="symbol"?t+"":t,r),r);import{r as x,j as s,g as ss}from"./@radix-DnFH_oo1.js";import{O as De,k as xe,n as Le,F as ee,l as se,m as ne,Q as Kt,S as g,T as A,v as z,w as F,x as H,y as T,r as Ee,t as et,R as Qt,_ as Xt,j as ue,f as k,U as tt,V as Jt,e as pe,H as rt,J as st,K as O,W as he,X as nt,L as S,Y as er,Z as tr,$ as rr,a0 as ge,a1 as je,a2 as Ce,a3 as be,a4 as ns,a5 as as,B as sr,A as is,b as ls,a6 as at,a7 as os,a8 as cs,a9 as ds,aa as us,ab as hs,ac as nr,ad as fs,ae as ms,af as ps,i as xs,o as gs,D as wt,q as js,s as Cs,ag as bs,N as ys,P as ws,E as vs,z as vt,c as Ns,ah as Es}from"./index-Ci0nJ8EZ.js";import{S as _s,a as ks,u as ar}from"./stack-detail-query-DQcyzG-2.js";import{F as ir}from"./chevron-right-double-c9H46Kl8.js";import{a as te,c as lr,q as Ls}from"./@tanstack-QbMbTrh5.js";import{E as ae}from"./Error-BhwdmqK7.js";import{D as _e}from"./DisplayDate-DkCy54Bp.js";import{a as Re,E as oe,b as or,g as Os}from"./ExecutionStatus-D6r6aK8J.js";import{I as it}from"./InlineAvatar-CA3DFMcM.js";import{L as Ie,g as $,b as lt,c as cr}from"./@react-router-APVeuk-U.js";import{C as I}from"./CodeSnippet-IxXNxUDa.js";import{C as P}from"./CollapsibleCard-BhutZbBL.js";import{E as W}from"./EmptyState-Cs3DEmso.js";import{s as dr}from"./url-CbAPzsmT.js";import{I as Oe}from"./Infobox-BTK_EUKT.js";import{H as Nt,P as Et,u as ot,a as ur,b as Ss,g as Ts,p as Is,S as Ps,B as $s,c as Ms,d as Ds,e as Rs}from"./@reactflow-ytavUpwh.js";import{S as Vs}from"./plus-Bc8eLSDM.js";import{S as As}from"./refresh-hfgWPeto.js";import{S as zs}from"./code-browser-BJYErIjr.js";import{S as hr}from"./logs-GiDJXbLS.js";import{S as ye}from"./chevron-down-Cwb-W_B_.js";import{S as Fs}from"./docker-BFAFXr2_.js";import{C as K}from"./CopyButton-DcFHidFJ.js";import{C as Hs}from"./ComponentBadge-gKR1OIwG.js";import{S as Bs}from"./dots-horizontal-C6K59vUm.js";import{S as Gs}from"./trash-DUWZWzse.js";import{S as Zs}from"./tick-circle-m-hJG8i9.js";import{u as qs,D as Us,a as Ys}from"./delete-run-CP0pcJ3U.js";import"./layout-Dru15_XR.js";import"./rocket-SESCGQXm.js";import"./check-circle-DOoS4yhF.js";import"./copy-CaGlDsUy.js";import"./zod-uFd1wBcd.js";import"./index.esm-BE1uqCX5.js";const Ws=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 2C3.55228 2 4 2.44772 4 3V21C4 21.5523 3.55228 22 3 22C2.44772 22 2 21.5523 2 21V3C2 2.44772 2.44772 2 3 2ZM14.7071 4.29289C15.0976 4.68342 15.0976 5.31658 14.7071 5.70711L9.41421 11H21C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H9.41421L14.7071 18.2929C15.0976 18.6834 15.0976 19.3166 14.7071 19.7071C14.3166 20.0976 13.6834 20.0976 13.2929 19.7071L6.29289 12.7071C5.90237 12.3166 5.90237 11.6834 6.29289 11.2929L13.2929 4.29289C13.6834 3.90237 14.3166 3.90237 14.7071 4.29289Z"})),Ks=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.5971 1.18505C11.8629 1.13038 12.1371 1.13038 12.4029 1.18505C12.7102 1.24824 12.9848 1.40207 13.2032 1.52436C13.2235 1.53575 13.2433 1.54687 13.2627 1.55761L12.7846 2.41823L13.2627 1.55761L20.6627 5.66872C20.6831 5.68009 20.7042 5.6917 20.7258 5.70359C20.9569 5.8309 21.2476 5.99097 21.4707 6.23315L21.1563 6.52296L21.4707 6.23315C21.6637 6.44253 21.8097 6.6907 21.899 6.96105C22.0024 7.27375 22.0011 7.60553 22.0002 7.8694C22.0001 7.89406 22 7.91813 22 7.94153V12.0001C22 12.5524 21.5523 13.0001 21 13.0001C20.4477 13.0001 20 12.5524 20 12.0001V8.69955L17.0029 10.3646C16.992 10.3709 16.9811 10.377 16.9701 10.3829L13 12.5885L13 20.4443C13.3511 20.4447 13.6916 20.6302 13.8742 20.9589C14.1424 21.4417 13.9684 22.0505 13.4856 22.3187L13.2627 22.4426C13.2433 22.4533 13.2235 22.4644 13.2032 22.4758C12.9848 22.5981 12.7102 22.7519 12.4029 22.8151C12.1371 22.8698 11.8629 22.8698 11.5971 22.8151C11.2898 22.7519 11.0152 22.5981 10.7968 22.4758C10.7765 22.4644 10.7567 22.4533 10.7373 22.4426L3.33733 18.3314C3.31688 18.3201 3.2958 18.3085 3.27421 18.2966C3.04308 18.1693 2.75245 18.0092 2.52927 17.767C2.33632 17.5576 2.1903 17.3095 2.10097 17.0391C1.99765 16.7264 1.99886 16.3946 1.99982 16.1308C1.99991 16.1061 2 16.082 2 16.0586V7.94153C2 7.91813 1.99991 7.89406 1.99982 7.8694C1.99886 7.60553 1.99765 7.27375 2.10097 6.96105C2.1903 6.69069 2.33632 6.44253 2.52927 6.23315C2.75244 5.99098 3.04306 5.8309 3.27419 5.7036C3.29579 5.6917 3.31687 5.68009 3.33733 5.66872L3.33733 5.66872L6.99904 3.63444C7.00862 3.62891 7.01828 3.62354 7.02802 3.61834L10.7373 1.55761C10.7567 1.54687 10.7765 1.53575 10.7968 1.52437C11.0152 1.40207 11.2898 1.24824 11.5971 1.18505ZM7.5 5.64404L5.05914 7.00008L12 10.8561L14.4408 9.50006L7.5 5.64404ZM16.5 8.3561L9.55913 4.50008L11.7086 3.30592C11.8602 3.22174 11.9375 3.1792 11.9952 3.15136C11.9969 3.15056 11.9985 3.1498 12 3.14907C12.0015 3.1498 12.0031 3.15056 12.0048 3.15136C12.0625 3.1792 12.1398 3.22173 12.2914 3.30592L18.9408 7.00006L16.5 8.3561ZM11 12.5885L4 8.69959V16.0586C4 16.2416 4.00042 16.3353 4.0045 16.4031C4.00462 16.4051 4.00475 16.407 4.00487 16.4088C4.0064 16.4098 4.00802 16.4108 4.00971 16.4119C4.067 16.4484 4.14867 16.4943 4.30862 16.5831L3.82297 17.4573L4.30862 16.5831L11 20.3006L11 12.5885ZM19 16.0001C17.8954 16.0001 17 16.8955 17 18.0001C17 19.1047 17.8954 20.0001 19 20.0001C20.1046 20.0001 21 19.1047 21 18.0001C21 16.8955 20.1046 16.0001 19 16.0001ZM15 18.0001C15 15.7909 16.7909 14.0001 19 14.0001C21.2091 14.0001 23 15.7909 23 18.0001C23 18.8713 22.7215 19.6775 22.2486 20.3344L22.7071 20.793C23.0976 21.1835 23.0976 21.8167 22.7071 22.2072C22.3166 22.5977 21.6834 22.5977 21.2929 22.2072L20.7052 21.6195C20.1879 21.8636 19.6099 22.0001 19 22.0001C16.7909 22.0001 15 20.2092 15 18.0001Z"})),Qs=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.77687 1.00001C2.78469 1.00001 2.79241 1.00001 2.80001 1.00001H6.20001C6.20762 1.00001 6.21533 1.00001 6.22315 1.00001C6.34227 0.999961 6.48452 0.999906 6.60984 1.01015C6.75506 1.02201 6.96305 1.05245 7.181 1.1635C7.46324 1.30731 7.69271 1.53678 7.83652 1.81903C7.94757 2.03697 7.97801 2.24496 7.98988 2.39018C8.00012 2.5155 8.00006 2.65776 8.00002 2.77687C8.00001 2.78469 8.00001 2.79241 8.00001 2.80001V6.20001C8.00001 6.20762 8.00001 6.21533 8.00002 6.22315C8.00006 6.34227 8.00012 6.48452 7.98988 6.60984C7.97801 6.75506 7.94757 6.96305 7.83652 7.181C7.69271 7.46324 7.46324 7.69271 7.181 7.83652C6.96305 7.94757 6.75506 7.97801 6.60984 7.98988C6.48452 8.00012 6.34227 8.00006 6.22315 8.00002C6.21533 8.00001 6.20762 8.00001 6.20001 8.00001H2.80001C2.79241 8.00001 2.78469 8.00001 2.77687 8.00002C2.65776 8.00006 2.5155 8.00012 2.39018 7.98988C2.24496 7.97801 2.03697 7.94757 1.81903 7.83652C1.53678 7.69271 1.30731 7.46324 1.1635 7.181C1.05245 6.96305 1.02201 6.75506 1.01015 6.60984C0.999906 6.48452 0.999961 6.34227 1.00001 6.22315C1.00001 6.21533 1.00001 6.20762 1.00001 6.20001V2.80001C1.00001 2.79241 1.00001 2.78469 1.00001 2.77687C0.999961 2.65776 0.999906 2.5155 1.01015 2.39018C1.02201 2.24496 1.05245 2.03697 1.1635 1.81903C1.30731 1.53678 1.53678 1.30731 1.81903 1.1635C2.03697 1.05245 2.24496 1.02201 2.39018 1.01015C2.5155 0.999906 2.65776 0.999961 2.77687 1.00001ZM3.00001 3.00001V6.00001H6.00001V3.00001H3.00001ZM19.5322 5.52394C19.2488 5.50079 18.8766 5.50001 18.3 5.50001H11C10.4477 5.50001 10 5.0523 10 4.50001C10 3.94773 10.4477 3.50001 11 3.50001L18.3386 3.50001C18.8657 3.49999 19.3205 3.49998 19.695 3.53058C20.0904 3.56288 20.4836 3.6342 20.862 3.82699C21.4265 4.11461 21.8854 4.57356 22.173 5.13804C22.3658 5.51642 22.4371 5.90964 22.4694 6.30498C22.5 6.67955 22.5 7.13431 22.5 7.66145V9.032C22.5 9.47065 22.5 9.84914 22.4787 10.1624C22.4562 10.4922 22.4067 10.8221 22.2717 11.1481C21.9672 11.8832 21.3831 12.4672 20.6481 12.7717C20.3221 12.9067 19.9922 12.9562 19.6624 12.9787C19.3491 13 18.9706 13 18.532 13H18.5C17.9477 13 17.5 12.5523 17.5 12C17.5 11.4477 17.9477 11 18.5 11C18.9796 11 19.2893 10.9995 19.5263 10.9833C19.7542 10.9677 19.8411 10.9411 19.8827 10.9239C20.1277 10.8224 20.3224 10.6277 20.4239 10.3827C20.4411 10.3411 20.4677 10.2543 20.4833 10.0263C20.4995 9.78927 20.5 9.47964 20.5 9.00001V7.70001C20.5 7.12346 20.4992 6.75118 20.4761 6.46785C20.4539 6.19618 20.4162 6.09547 20.391 6.04602C20.2951 5.85786 20.1422 5.70488 19.954 5.60901C19.9046 5.58381 19.8038 5.54613 19.5322 5.52394ZM10.2769 8.50001C10.2847 8.50001 10.2924 8.50001 10.3 8.50001H13.7C13.7076 8.50001 13.7153 8.50001 13.7232 8.50001C13.8423 8.49996 13.9845 8.49991 14.1098 8.51015C14.2551 8.52201 14.4631 8.55245 14.681 8.6635C14.9632 8.80731 15.1927 9.03678 15.3365 9.31903C15.4476 9.53697 15.478 9.74496 15.4899 9.89018C15.5001 10.0155 15.5001 10.1578 15.5 10.2769C15.5 10.2847 15.5 10.2924 15.5 10.3V13.7C15.5 13.7076 15.5 13.7153 15.5 13.7231C15.5001 13.8423 15.5001 13.9845 15.4899 14.1098C15.478 14.2551 15.4476 14.4631 15.3365 14.681C15.1927 14.9632 14.9632 15.1927 14.681 15.3365C14.4631 15.4476 14.2551 15.478 14.1098 15.4899C13.9845 15.5001 13.8423 15.5001 13.7231 15.5C13.7153 15.5 13.7076 15.5 13.7 15.5H10.3C10.2924 15.5 10.2847 15.5 10.2769 15.5C10.1578 15.5001 10.0155 15.5001 9.89018 15.4899C9.74496 15.478 9.53697 15.4476 9.31903 15.3365C9.03678 15.1927 8.80731 14.9632 8.6635 14.681C8.55245 14.4631 8.52201 14.2551 8.51015 14.1098C8.49991 13.9845 8.49996 13.8423 8.50001 13.7232C8.50001 13.7153 8.50001 13.7076 8.50001 13.7V10.3C8.50001 10.2924 8.50001 10.2847 8.50001 10.2769C8.49996 10.1578 8.49991 10.0155 8.51015 9.89018C8.52201 9.74496 8.55245 9.53697 8.6635 9.31903C8.80731 9.03678 9.03678 8.80731 9.31903 8.6635C9.53697 8.55245 9.74496 8.52201 9.89018 8.51015C10.0155 8.49991 10.1578 8.49996 10.2769 8.50001ZM10.5 10.5V13.5H13.5V10.5H10.5ZM5.46802 11H5.50001C6.0523 11 6.50001 11.4477 6.50001 12C6.50001 12.5523 6.0523 13 5.50001 13C5.02039 13 4.71075 13.0006 4.47377 13.0167C4.24577 13.0323 4.15894 13.0589 4.11733 13.0761C3.8723 13.1776 3.67763 13.3723 3.57613 13.6173C3.5589 13.6589 3.53228 13.7458 3.51672 13.9738C3.50055 14.2108 3.50001 14.5204 3.50001 15V16.3C3.50001 16.8766 3.50079 17.2488 3.52394 17.5322C3.54614 17.8038 3.58381 17.9046 3.60901 17.954C3.70488 18.1422 3.85786 18.2951 4.04602 18.391C4.09547 18.4162 4.19618 18.4539 4.46785 18.4761C4.75119 18.4992 5.12346 18.5 5.70001 18.5H13C13.5523 18.5 14 18.9477 14 19.5C14 20.0523 13.5523 20.5 13 20.5H5.66145C5.13431 20.5 4.67955 20.5 4.30498 20.4694C3.90964 20.4371 3.51642 20.3658 3.13804 20.173C2.57356 19.8854 2.11461 19.4265 1.82699 18.862C1.6342 18.4836 1.56288 18.0904 1.53058 17.695C1.49998 17.3205 1.49999 16.8657 1.50001 16.3386L1.50001 14.968C1.5 14.5294 1.49999 14.1509 1.52136 13.8376C1.54387 13.5078 1.59337 13.1779 1.72837 12.852C2.03286 12.1169 2.61688 11.5329 3.35196 11.2284C3.67789 11.0934 4.0078 11.0439 4.33763 11.0214C4.65089 11 5.02937 11 5.46802 11ZM17.7769 16H21.2231C21.3423 16 21.4845 15.9999 21.6098 16.0101C21.7551 16.022 21.9631 16.0525 22.181 16.1635C22.4632 16.3073 22.6927 16.5368 22.8365 16.819C22.9476 17.037 22.978 17.245 22.9899 17.3902C23.0001 17.5155 23.0001 17.6577 23 17.7769C23 17.7847 23 17.7924 23 17.8V21.2C23 21.2076 23 21.2153 23 21.2232C23.0001 21.3423 23.0001 21.4845 22.9899 21.6098C22.978 21.7551 22.9476 21.9631 22.8365 22.181C22.6927 22.4632 22.4632 22.6927 22.181 22.8365C21.9631 22.9476 21.7551 22.978 21.6098 22.9899C21.4845 23.0001 21.3423 23.0001 21.2232 23C21.2153 23 21.2076 23 21.2 23H17.8C17.7924 23 17.7847 23 17.7769 23C17.6577 23.0001 17.5155 23.0001 17.3902 22.9899C17.245 22.978 17.037 22.9476 16.819 22.8365C16.5368 22.6927 16.3073 22.4632 16.1635 22.181C16.0525 21.9631 16.022 21.7551 16.0101 21.6098C15.9999 21.4845 16 21.3423 16 21.2231V17.7769C16 17.6578 15.9999 17.5155 16.0101 17.3902C16.022 17.245 16.0525 17.037 16.1635 16.819C16.3073 16.5368 16.5368 16.3073 16.819 16.1635C17.037 16.0525 17.245 16.022 17.3902 16.0101C17.5155 15.9999 17.6578 16 17.7769 16ZM18 18V21H21V18H18Z"})),_t=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.16146 2H17.8385C18.3657 1.99998 18.8205 1.99997 19.195 2.03057C19.5904 2.06287 19.9836 2.13419 20.362 2.32698C20.9265 2.6146 21.3854 3.07354 21.673 3.63803C21.8658 4.01641 21.9371 4.40963 21.9694 4.80497C22 5.17954 22 5.6343 22 6.16144V17.8386C22 18.3657 22 18.8205 21.9694 19.195C21.9371 19.5904 21.8658 19.9836 21.673 20.362C21.3854 20.9265 20.9265 21.3854 20.362 21.673C19.9836 21.8658 19.5904 21.9371 19.195 21.9694C18.8205 22 18.3657 22 17.8386 22H6.16144C5.6343 22 5.17954 22 4.80497 21.9694C4.40963 21.9371 4.01641 21.8658 3.63803 21.673C3.07354 21.3854 2.6146 20.9265 2.32698 20.362C2.13419 19.9836 2.06287 19.5904 2.03057 19.195C1.99997 18.8205 1.99998 18.3657 2 17.8385V6.16146C1.99998 5.63431 1.99997 5.17955 2.03057 4.80497C2.06287 4.40963 2.13419 4.01641 2.32698 3.63803C2.6146 3.07354 3.07354 2.6146 3.63803 2.32698C4.01641 2.13419 4.40963 2.06287 4.80497 2.03057C5.17955 1.99997 5.63431 1.99998 6.16146 2ZM4 10.4649V17.8C4 18.3766 4.00078 18.7488 4.02393 19.0322C4.04612 19.3038 4.0838 19.4045 4.109 19.454C4.20487 19.6422 4.35785 19.7951 4.54601 19.891C4.59546 19.9162 4.69617 19.9539 4.96784 19.9761C5.25117 19.9992 5.62345 20 6.2 20H8L8 15.5681C7.99997 15.3157 7.99994 15.0699 8.01695 14.8618C8.03562 14.6332 8.07969 14.3634 8.21799 14.092C8.40974 13.7157 8.7157 13.4097 9.09202 13.218C9.36344 13.0797 9.63318 13.0356 9.86177 13.0169C10.0699 12.9999 10.3157 13 10.5681 13H13.4319C13.6843 13 13.9301 12.9999 14.1382 13.0169C14.3668 13.0356 14.6366 13.0797 14.908 13.218C15.2843 13.4097 15.5903 13.7157 15.782 14.092C15.9203 14.3634 15.9644 14.6332 15.9831 14.8618C16.0001 15.0699 16 15.3157 16 15.5681L16 20H17.8C18.3766 20 18.7488 19.9992 19.0322 19.9761C19.3038 19.9539 19.4045 19.9162 19.454 19.891C19.6422 19.7951 19.7951 19.6422 19.891 19.454C19.9162 19.4045 19.9539 19.3038 19.9761 19.0322C19.9992 18.7488 20 18.3766 20 17.8V10.4649C19.4117 10.8052 18.7286 11 18 11C16.8053 11 15.7329 10.4762 15 9.64583C14.2671 10.4762 13.1947 11 12 11C10.8053 11 9.73295 10.4762 9 9.64582C8.26706 10.4762 7.19469 11 6 11C5.27143 11 4.58835 10.8052 4 10.4649ZM10 7C10 8.10457 10.8954 9 12 9C13.1046 9 14 8.10457 14 7C14 6.44772 14.4477 6 15 6C15.5523 6 16 6.44772 16 7C16 8.10457 16.8954 9 18 9C19.1046 9 20 8.10457 20 7V6.2C20 5.62345 19.9992 5.25118 19.9761 4.96784C19.9539 4.69617 19.9162 4.59546 19.891 4.54601C19.7951 4.35785 19.6422 4.20487 19.454 4.109C19.4045 4.0838 19.3038 4.04612 19.0322 4.02393C18.7488 4.00078 18.3766 4 17.8 4H6.2C5.62345 4 5.25117 4.00078 4.96784 4.02393C4.69617 4.04612 4.59546 4.0838 4.54601 4.109C4.35785 4.20487 4.20487 4.35785 4.109 4.54601C4.0838 4.59546 4.04612 4.69617 4.02393 4.96784C4.00078 5.25117 4 5.62345 4 6.2V7C4 8.10457 4.89543 9 6 9C7.10457 9 8 8.10457 8 7C8 6.44772 8.44772 6 9 6C9.55229 6 10 6.44772 10 7ZM14 20V15.6C14 15.3035 13.9992 15.1412 13.9897 15.0246C13.9893 15.02 13.9889 15.0156 13.9886 15.0115C13.9844 15.0111 13.98 15.0107 13.9754 15.0103C13.8588 15.0008 13.6965 15 13.4 15H10.6C10.3035 15 10.1412 15.0008 10.0246 15.0103C10.02 15.0107 10.0156 15.0111 10.0114 15.0115C10.0111 15.0156 10.0107 15.02 10.0103 15.0246C10.0008 15.1412 10 15.3035 10 15.6V20H14Z"}));function fr({artifactType:e,className:t}){switch(e){case"DataAnalysisArtifact":return s.jsx(Ks,{className:t});case"DataArtifact":return s.jsx(ks,{className:t});case"ModelArtifact":return s.jsx(Qs,{className:t});case"SchemaArtifact":return s.jsx(_s,{className:t});case"ServiceArtifact":return s.jsx(_t,{className:t});case"StatisticsArtifact":return s.jsx(_t,{className:t});default:return s.jsx(De,{className:t})}}const We=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755ZM12 6C12.5523 6 13 6.44772 13 7V17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17V7C11 6.44772 11.4477 6 12 6ZM16 10C16.5523 10 17 10.4477 17 11V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V11C15 10.4477 15.4477 10 16 10ZM8 12C8.55229 12 9 12.4477 9 13V17C9 17.5523 8.55229 18 8 18C7.44772 18 7 17.5523 7 17V13C7 12.4477 7.44772 12 8 12Z"})),mr=x.createContext(null);function Xs({children:e}){const[t,r]=x.useState(!1);return s.jsx(mr.Provider,{value:{isVisualizationConfirmed:t,setVisualizationConfirmed:r},children:e})}function Js(){const e=x.useContext(mr);if(!e)throw new Error("useArtifactLoadConfirmationContext must be used within a VisualizationConfirmProvider");return e}function en({versionId:e}){return["artifact_versions",e]}async function tn({versionId:e}){const t=se(ne.artifactVersions.detail(e)),r=await xe(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&Le(),!r.ok)throw new ee({message:`Error while fetching artifact version ${e}`,status:r.status,statusText:r.statusText});return r.json()}function we(e,t){return te({queryKey:en(e),queryFn:()=>tn(e),...t})}const rn=e=>x.createElement("svg",{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 2.22222C5.70445 2.22222 2.22222 5.70445 2.22222 10C2.22222 14.2955 5.70445 17.7778 10 17.7778C14.2955 17.7778 17.7778 14.2955 17.7778 10C17.7778 5.70445 14.2955 2.22222 10 2.22222ZM0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10Z",fill:"#D1D5DB"}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.7778 10C17.7778 5.70445 14.2955 2.22222 10 2.22222V0C15.5228 0 20 4.47715 20 10H17.7778Z",fill:"#7A3EF4"})),sn=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755ZM6.29289 8.29289C6.68342 7.90237 7.31658 7.90237 7.70711 8.29289L10.7071 11.2929C11.0976 11.6834 11.0976 12.3166 10.7071 12.7071L7.70711 15.7071C7.31658 16.0976 6.68342 16.0976 6.29289 15.7071C5.90237 15.3166 5.90237 14.6834 6.29289 14.2929L8.58579 12L6.29289 9.70711C5.90237 9.31658 5.90237 8.68342 6.29289 8.29289ZM12 15C12 14.4477 12.4477 14 13 14H17C17.5523 14 18 14.4477 18 15C18 15.5523 17.5523 16 17 16H13C12.4477 16 12 15.5523 12 15Z"}));function R({children:e,className:t,...r}){return s.jsx("dt",{...r,className:Kt("col-span-1 flex min-w-0 items-center truncate text-theme-text-secondary",t),children:e})}function V({children:e,className:t,...r}){return s.jsx("dd",{...r,className:Kt("col-span-2 flex h-6 w-full min-w-0 items-center truncate text-neutral-700",t),children:e})}function j({label:e,value:t}){return s.jsxs(s.Fragment,{children:[s.jsx(R,{children:e}),s.jsx(V,{children:t})]})}function nn({componentId:e}){return["components",e]}async function an({componentId:e}){const t=se(ne.components.detail(e)),r=await xe(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&Le(),!r.ok)throw new ee({message:`Error while fetching component ${e}`,status:r.status,statusText:r.statusText});return r.json()}function ln(e,t){return te({queryKey:nn(e),queryFn:()=>an(e),...t})}function on({runId:e}){return["runs",e]}async function cn({runId:e}){const t=se(ne.runs.detail(e)),r=await xe(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&Le(),!r.ok)throw new ee({message:`Error while fetching pipeline run ${e}`,status:r.status,statusText:r.statusText});return r.json()}function M(e,t){return te({queryKey:on(e),queryFn:()=>cn(e),...t})}function dn({stepId:e}){return["steps",e]}async function un({stepId:e}){const t=se(ne.steps.detail(e)),r=await xe(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&Le(),!r.ok)throw new ee({message:`Error while fetching step ${e}`,status:r.status,statusText:r.statusText});return r.json()}function ve(e,t){return te({queryKey:dn(e),queryFn:()=>un(e),...t})}function hn({artifactVersionId:e}){var a,i,l,o,c,d,u,h,m,f,p;const t=we({versionId:e}),r=(i=(a=t.data)==null?void 0:a.body)==null?void 0:i.producer_pipeline_run_id,n=(o=(l=t.data)==null?void 0:l.metadata)==null?void 0:o.producer_step_run_id;return t.isPending?s.jsx(g,{className:"h-[500px] w-full"}):t.isError?s.jsx(ae,{err:t.error}):s.jsx(P,{initialOpen:!0,title:"Details",children:s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[r&&s.jsx(mn,{producerRunId:r}),n&&s.jsx(fn,{producerStepId:n}),s.jsx(j,{label:"Materializer",value:s.jsx(A,{children:s.jsxs(z,{children:[s.jsx(F,{className:"cursor-default",children:(c=t.data.body)==null?void 0:c.materializer.attribute}),s.jsxs(H,{align:"start",children:[(d=t.data.body)==null?void 0:d.materializer.module,".",(u=t.data.body)==null?void 0:u.materializer.attribute]})]})})}),s.jsx(j,{label:"Type",value:(h=t.data.body)==null?void 0:h.type}),s.jsx(j,{label:"Author",value:s.jsx("div",{className:"inline-flex items-center gap-1",children:s.jsx(it,{username:((f=(m=t.data.body)==null?void 0:m.user)==null?void 0:f.name)||""})})}),s.jsx(j,{label:"Updated",value:s.jsx(_e,{dateString:((p=t.data.body)==null?void 0:p.updated)||""})})]})})}function fn({producerStepId:e}){const t=ve({stepId:e});return t.isPending?s.jsx(j,{label:"Producer Step",value:s.jsx(g,{className:"h-5 w-full"})}):t.isError?null:s.jsx(j,{label:"Producer Step",value:s.jsx(s.Fragment,{children:t.data?s.jsxs(T,{color:Re("completed"),className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx(oe,{className:"mr-1 fill-current",status:"completed"}),t.data.name]}):s.jsx(g,{className:"h-full w-[150px]"})})})}function mn({producerRunId:e}){var r,n,a,i,l,o;const t=M({runId:e});return t.isPending?s.jsx(j,{label:s.jsx(g,{className:"h-5 w-full"}),value:s.jsx(g,{className:"h-5 w-full"})}):t.isError?null:s.jsxs(s.Fragment,{children:[s.jsx(j,{label:"Pipeline",value:s.jsx(Ie,{to:Ee.pipelines.namespace(encodeURIComponent((n=(r=t.data.body)==null?void 0:r.pipeline)==null?void 0:n.name)),children:s.jsxs(T,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx(et,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(i=(a=t.data.body)==null?void 0:a.pipeline)==null?void 0:i.name]})})}),s.jsx(j,{label:"Producer Run",value:s.jsx(Ie,{to:Ee.runs.detail(e),children:s.jsxs(T,{color:Re((l=t.data.body)==null?void 0:l.status),className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[((o=t.data.body)==null?void 0:o.status)==="running"?s.jsx(rn,{className:"mr-1 h-4 w-4 border-[2px]"}):s.jsx(sn,{className:"mr-1 h-4 w-4 fill-current"}),e]})})})]})}function pn({artifactVersionId:e}){var c,d,u,h,m,f;const{data:t,isPending:r,isError:n,error:a}=we({versionId:e}),i=(c=t==null?void 0:t.metadata)==null?void 0:c.artifact_store_id,{data:l,isSuccess:o}=ln({componentId:i},{enabled:!!i});return n?s.jsx(ae,{err:a}):r?s.jsx(g,{className:"h-[500px] w-full"}):s.jsx(P,{initialOpen:!0,title:"Data",children:s.jsxs("dl",{className:"grid w-full grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(R,{className:"col-span-3",children:"URI"}),s.jsx(V,{className:"col-span-3 h-auto",children:s.jsx(I,{fullWidth:!0,codeClasses:"truncate",code:((d=t.body)==null?void 0:d.uri)||""})}),((u=t.metadata)==null?void 0:u.artifact_store_id)&&s.jsx(j,{label:"Artifact Store",value:s.jsx(s.Fragment,{children:o?s.jsx(T,{emphasis:"subtle",rounded:!1,color:"grey",className:"text-theme-text-primary",children:l==null?void 0:l.name}):s.jsx(g,{className:"h-6 w-12"})})}),s.jsx(j,{label:"Data Type",value:s.jsx(T,{className:"flex w-fit items-center text-theme-text-primary",color:"grey",emphasis:"subtle",rounded:!1,children:s.jsx(A,{children:s.jsxs(z,{children:[s.jsx(F,{className:"cursor-auto",children:(h=t.body)==null?void 0:h.data_type.attribute}),s.jsxs(H,{children:[(m=t.body)==null?void 0:m.data_type.module,".",(f=t.body)==null?void 0:f.data_type.attribute," "]})]})})})})]})})}function xn({artifactVersionId:e}){function t(r){return`from zenml.client import Client
|
3
|
+
|
4
|
+
artifact = Client().get_artifact_version('${r}')
|
5
|
+
loaded_artifact = artifact.load()`}return s.jsx(P,{initialOpen:!0,title:"Code",children:s.jsx(I,{fullWidth:!0,highlightCode:!0,wrap:!0,code:t(e)})})}function gn({artifactVersionId:e}){const{data:t,isError:r,error:n}=we({versionId:e});return r?s.jsx(ae,{err:n}):s.jsxs("div",{className:"space-y-5",children:[t?s.jsx(hn,{artifactVersionId:t.id}):s.jsx(g,{className:"h-[500px] rounded-md lg:col-span-2"}),t?s.jsx(pn,{artifactVersionId:t.id}):s.jsx(g,{className:"h-[500px] rounded-md lg:col-span-2"}),t?s.jsx(xn,{artifactVersionId:t.id}):s.jsx(g,{className:"h-[500px] rounded-md lg:col-span-2"})]})}function re({title:e,data:t,intent:r="primary",isInitialOpen:n=!1,contentClassName:a,children:i,className:l}){const o={},c={},d={},u=/^<class\s+'.*'>$/;for(const[m,f]of Object.entries(t||{}))typeof f=="object"&&f!==null&&!Array.isArray(f)?o[m]=f:Array.isArray(f)?d[m]=f:c[m]=f;const h=Object.entries(c);return h.sort((m,f)=>m[0].localeCompare(f[0])),s.jsxs(P,{contentClassName:a,className:l,initialOpen:n,intent:r,title:e,children:[Object.keys(t||{}).length===0?s.jsx("p",{children:"Not available"}):s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:h.map(([m,f])=>s.jsx(j,{label:s.jsx(A,{children:s.jsxs(z,{children:[s.jsx(F,{className:"cursor-default truncate",children:m}),s.jsx(H,{className:"max-w-[480px]",children:m})]})}),value:s.jsx(s.Fragment,{children:typeof f=="boolean"?s.jsx("div",{className:"py-1",children:JSON.stringify(f)}):u.test(f)?s.jsx(I,{className:"py-1",highlightCode:!0,code:f}):f===null?s.jsx("div",{className:"overflow-x-auto",children:"null"}):s.jsx("div",{className:"overflow-x-auto py-1",children:f})})},m))}),Object.entries(d).map(([m,f])=>s.jsx(jn,{title:m,value:f},m)),Object.entries(o).map(([m,f])=>s.jsx(re,{intent:"secondary",title:m,data:f},m))]}),i]})}function jn({title:e,value:t}){const r=t.filter(a=>!Array.isArray(a)&&typeof a!="object"||a===null),n=t.filter(a=>Array.isArray(a)||typeof a=="object");return s.jsx(s.Fragment,{children:s.jsxs(P,{intent:"secondary",title:e,children:[r.length>0&&s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 truncate md:grid-cols-3 md:gap-y-4",children:Object.entries(r).map(([a,i])=>s.jsx(j,{label:s.jsx(A,{children:s.jsxs(z,{children:[s.jsx(F,{className:"cursor-default truncate",children:a}),s.jsx(H,{className:"max-w-[480px]",children:a})]})}),value:s.jsx("div",{className:"py-1",children:Qt(i)})},a))}),n.length>0&&s.jsx("ul",{className:"space-y-4",children:n.map((a,i)=>s.jsx("li",{children:s.jsx(re,{intent:"secondary",title:i,data:a},i)},i))})]},e)})}function ct({metadata:e}){const t=Object.values(e||{}).filter(r=>r.body.type==="dict");return s.jsx(s.Fragment,{children:t.map(r=>s.jsx(re,{data:r.body.value,title:r.body.key},r.id))})}function Ve({metadata:e,title:t}){const r=Object.entries(e||{}),n=/^<class\s+'.*'>$/,a=r.filter(([l,o])=>o.body.type!=="dict");if(a.length===0)return null;a.sort((l,o)=>l[0].localeCompare(o[0]));const i=l=>l<1024?l+" bytes":l<Math.pow(1024,2)?(l/1024).toFixed(2)+" KB":l<Math.pow(1024,3)?(l/Math.pow(1024,2)).toFixed(2)+" MB":(l/Math.pow(1024,3)).toFixed(2)+" GB";return s.jsx("div",{children:s.jsx(P,{initialOpen:!0,title:t||"Uncategorized",children:s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:a.map(([l,o])=>s.jsx(j,{label:s.jsx(A,{children:s.jsxs(z,{children:[s.jsx(F,{className:"cursor-default truncate",children:o.body.key}),s.jsx(H,{className:"max-w-[480px]",children:o.body.key})]})}),value:s.jsx(s.Fragment,{children:n.test(o.body.value)?s.jsx(I,{className:"py-1",highlightCode:!0,code:o.body.value}):o.body.type==="StorageSize"?s.jsx("div",{className:"py-1",children:i(o.body.value)}):o.body.type==="Uri"?s.jsx("a",{className:"py-1 underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:o.body.value,children:o.body.value}):s.jsx("div",{className:"py-1",children:o.body.value})})},o.id))})})})}function Cn({artifactVersionId:e}){var a,i;const{data:t,isError:r,error:n}=we({versionId:e});return r?s.jsx(ae,{err:n}):t!=null&&t.metadata?s.jsxs("div",{className:"flex flex-col gap-5",children:[t?s.jsx(Ve,{metadata:(a=t.metadata)==null?void 0:a.run_metadata}):s.jsx(g,{className:"h-9 w-full"}),t?s.jsx(ct,{metadata:(i=t.metadata)==null?void 0:i.run_metadata}):s.jsx(g,{className:"h-9 w-full"})]}):s.jsx(W,{icon:s.jsx(De,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsx("div",{className:"text-center",children:s.jsx("h1",{className:"mb-2 text-display-xs font-semibold",children:"No Metadata Found for this Artifact"})})})}function pr({versionId:e}){return["artifact_versions",e,"visualize"]}async function bn({versionId:e},t){const r=se(ne.artifactVersions.visualize(e)),n=await xe(r,{method:"GET",headers:{"Content-Type":"application/json"},signal:t});if(n.status===404){const a=await n.json().then(i=>i.detail).catch(()=>["","Failed to fetch artifact visualization"]);throw new ee({message:a[1]||"Failed to fetch artifact visualization",status:n.status,statusText:n.statusText})}if(!n.ok)throw new ee({message:`Error while fetching artifact visualization for version ${e}`,status:n.status,statusText:n.statusText});return n.json()}function yn(e,t){return te({queryKey:pr(e),queryFn:({signal:r})=>bn(e,r),...t})}function wn({content:e}){const t=x.useRef(null),r=()=>{var n;if(t.current){const a=(n=t.current.contentWindow)==null?void 0:n.document.documentElement.scrollHeight;t.current.height=a?`${a}px`:"100%"}};return x.useEffect(()=>(r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}),[]),s.jsx("div",{children:s.jsx("iframe",{className:"w-full",title:"Secure HTML Content",ref:t,srcDoc:e,onLoad:r})})}function vn({content:e}){return s.jsx("div",{className:"flex items-center justify-center",children:s.jsx("img",{src:dr("data:image/png;base64,"+e),alt:"Visualization for artifact"})})}const Nn=x.lazy(()=>Xt(()=>import("./CsvVizualization-QSbjrfxw.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),En=x.lazy(()=>Xt(()=>import("./MarkdownVisualization-DS05sfBm.js"),__vite__mapDeps([8,1])));function _n({artifactVersionId:e,artifactName:t}){const[r,n]=x.useState(!1),{isVisualizationConfirmed:a,setVisualizationConfirmed:i}=Js(),l=lr(),{data:o,isError:c,error:d,isPending:u}=yn({versionId:e},{retry:!1,enabled:!r});return r?s.jsx(W,{icon:s.jsx(ue,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"flex flex-col items-center text-center",children:[s.jsx("p",{className:"mb-5 text-text-lg text-theme-text-secondary",children:"Loading the visualization cancelled"}),s.jsx(k,{size:"md",onClick:()=>n(!1),children:"Load Visualization"})]})}):c?d.status===501?s.jsxs(W,{icon:s.jsx(ue,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:[s.jsx("p",{children:"This artifact cannot be visualized because it cannot be loaded from the artifact store. This might happen if your ZenML server does not have the artifact stores dependencies installed or if the server is not authenticated to access it. For more information, see our"}),s.jsx("a",{rel:"noopener noreferrer",target:"_blank",href:"https://docs.zenml.io/stack-components/artifact-stores/custom",children:"docs"})]}):s.jsx(W,{icon:s.jsx(ue,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsx("div",{className:"text-center",children:s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:d.message})})}):u?s.jsxs("div",{className:"flex flex-col items-center gap-7 py-12",children:[s.jsx(tt,{}),s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("p",{className:"mb-5 text-display-xs",children:"Loading Visualization"}),s.jsx(k,{onClick:()=>{l.cancelQueries({queryKey:pr({versionId:e})}),n(!0)},intent:"secondary",size:"md",children:"Cancel"})]})]}):a?s.jsxs("div",{children:[s.jsx("div",{className:"flex justify-end",children:s.jsx(xr,{artifactName:t,...o})}),s.jsxs("div",{children:[o.type==="image"&&s.jsx(vn,{content:o.value}),o.type==="html"&&s.jsx(wn,{content:o.value}),o.type==="markdown"&&s.jsx(En,{content:o.value}),o.type==="csv"&&s.jsx(Nn,{content:o.value})]})]}):s.jsx(kn,{artifactName:t,setConfirmed:i,...o})}function kn({artifactName:e,setConfirmed:t,...r}){return s.jsxs("div",{className:"flex flex-col items-center justify-center gap-8",children:[s.jsx(Oe,{children:"This preview may contain harmful code. Only proceed if you trust the source. Loading content from untrusted sources can pose risks. If unsure, avoid loading."}),s.jsxs("div",{className:"flex justify-center gap-4",children:[s.jsx(k,{size:"md",onClick:()=>t(!0),children:"Load Preview"}),s.jsx(xr,{...r,buttonIntent:"secondary",artifactName:e})]})]})}function xr({type:e,value:t,artifactName:r,buttonIntent:n="primary"}){const a={image:"png",html:"html",markdown:"md",csv:"csv"},i={image:"image/png",html:"text/html",markdown:"text/markdown",csv:"text/csv"};function l(){const c=atob(t),d=new Array(c.length);for(let h=0;h<c.length;h++)d[h]=c.charCodeAt(h);return new Uint8Array(d)}function o(){try{const c=new Blob([e==="image"?l():t],{type:i[e]}),d=window.URL.createObjectURL(c),u=document.createElement("a");u.href=d,u.download=`${r}.`+a[e],u.click()}catch(c){console.error(c)}}return s.jsx(k,{intent:n,size:"md",className:"mb-4",onClick:o,children:"Download"})}const Ln=5*1024*1024;function On({artifactVersionId:e}){var c,d,u,h,m,f;const[t,r]=x.useState(!1),{data:n,isPending:a,isError:i,error:l}=we({versionId:e});if(i)return s.jsx(W,{icon:s.jsx(We,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsx("div",{className:"text-center",children:s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:l.message})})});if(a)return s.jsx(g,{className:"h-[300px] w-full"});const o=(h=(u=(d=(c=n.metadata)==null?void 0:c.run_metadata)==null?void 0:d.storage_size)==null?void 0:u.body)==null?void 0:h.value;return(m=n.metadata)!=null&&m.visualizations&&n.metadata.visualizations.length<1?s.jsx(W,{icon:s.jsx(We,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No visualizations found"}),s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no visualizations available for this artifact version."})]})}):s.jsx("div",{children:o<Ln||t?s.jsx(_n,{artifactName:((f=n.body)==null?void 0:f.artifact.name)||"artifact",artifactVersionId:e}):s.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center",children:[s.jsx("p",{className:"mb-4",children:"Artifact Visualization is larger than 5MB. Confirm to proceed:"}),s.jsx(k,{onClick:()=>r(!0),size:"md",children:"Confirm"})]})})}function Sn({artifactVersionId:e}){var n,a,i;const{data:t}=we({versionId:e}),r=(n=t==null?void 0:t.body)==null?void 0:n.version;return s.jsxs("div",{children:[s.jsx("div",{className:"flex h-9 items-center border-b border-theme-border-moderate bg-theme-surface-primary px-4 py-3",children:s.jsxs(Jt,{className:"focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(ir,{className:"h-5 w-5 fill-neutral-500"}),s.jsx("span",{className:"sr-only",children:"Close"})]})}),s.jsxs("div",{className:"border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:[t?s.jsx("p",{className:"mb-0.5 text-text-sm text-theme-text-secondary",children:e}):s.jsx(g,{className:"w-9"}),t?s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(fr,{artifactType:((a=t.body)==null?void 0:a.type)||"BaseArtifact",className:"h-5 w-5 fill-theme-surface-strong"}),s.jsx("h2",{className:"text-display-xs font-semibold",children:(i=t.body)==null?void 0:i.artifact.name}),s.jsx(pe,{color:r?"light-purple":"light-grey",rounded:!1,children:r||"None"})]}):s.jsx(g,{className:"h-6 w-7"})]}),s.jsx("div",{className:"p-5",children:s.jsx(Xs,{children:s.jsxs(rt,{defaultValue:"overview",children:[s.jsxs(st,{children:[s.jsxs(O,{className:"flex items-center gap-2 text-text-md",value:"overview",children:[s.jsx(he,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Overview"})]}),s.jsxs(O,{className:"flex items-center gap-2 truncate text-text-md",value:"metadata",children:[s.jsx(nt,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Metadata"})]}),s.jsxs(O,{className:"flex items-center gap-2 text-text-md",value:"visualization",children:[s.jsx(We,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Visualization"})]})]}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"overview",children:s.jsx(gn,{artifactVersionId:e})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:s.jsx(Cn,{artifactVersionId:e})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"visualization",children:s.jsx(On,{artifactVersionId:e})})]})})})]})}function Tn({children:e,artifactVersionId:t,onOpenChange:r}){return s.jsxs(er,{onOpenChange:r,children:[s.jsx(tr,{asChild:!0,children:e}),s.jsx(rr,{className:"w-[1000px] overflow-y-auto",children:s.jsx(Sn,{artifactVersionId:t})})]})}function Ae({children:e}){return s.jsxs(s.Fragment,{children:[s.jsx(Nt,{style:{border:"transparent",top:0,background:"transparent",width:0,height:0},type:"target",position:Et.Top}),s.jsx("div",{className:"flex w-[300px] items-center justify-center",children:e}),s.jsx(Nt,{isConnectable:!1,type:"source",style:{border:"transparent",bottom:0,background:"transparent",width:0,height:0},position:Et.Bottom})]})}function In({data:e,selected:t}){var i,l;const{unselectNodesAndEdges:r}=ot(o=>({unselectNodesAndEdges:o.unselectNodesAndEdges}));function n(o){o||setTimeout(()=>{r()},100)}function a(o){const c=o.split(".");return c[c.length-1]}return s.jsx(Ae,{children:s.jsx(Tn,{onOpenChange:n,artifactVersionId:e.id,children:s.jsxs("button",{"data-selected":!!t,className:"group flex h-[50px] min-w-0 max-w-[300px] items-center justify-center gap-1 rounded-rounded border border-primary-100 bg-primary-25 py-1 pl-1 pr-2 transition-all duration-200 hover:border-primary-400 data-[selected=true]:border-primary-500 data-[selected=true]:bg-primary-500",children:[s.jsx("div",{className:"rounded-rounded bg-primary-50 p-0.5 group-data-[selected=true]:bg-white/20",children:s.jsx(fr,{className:"h-4 w-4 fill-primary-400 group-data-[selected=true]:fill-theme-text-negative",artifactType:((i=e.body)==null?void 0:i.type)||"BaseArtifact"})}),s.jsxs("div",{className:"min-w-0 text-left",children:[s.jsx("p",{className:"truncate text-text-sm font-semibold text-theme-text-brand group-data-[selected=true]:text-theme-text-negative",children:e.name}),s.jsx("p",{className:"truncate text-text-xs text-theme-text-secondary group-data-[selected=true]:text-white/70",children:a(((l=e.body)==null?void 0:l.data_type.attribute)||"")})]})]})})})}const Pn=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2L8 2C8.55229 2 9 2.44772 9 3C9 3.55229 8.55229 4 8 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V8C4 8.55229 3.55229 9 3 9C2.44772 9 2 8.55229 2 8L2 7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H16C15.4477 4 15 3.55229 15 3C15 2.44772 15.4477 2 16 2L16.2413 2C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43598C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V8C22 8.55229 21.5523 9 21 9C20.4477 9 20 8.55229 20 8V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755ZM3 15C3.55229 15 4 15.4477 4 16V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H8C8.55229 20 9 20.4477 9 21C9 21.5523 8.55229 22 8 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413L2 16C2 15.4477 2.44772 15 3 15ZM21 15C21.5523 15 22 15.4477 22 16V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H16C15.4477 22 15 21.5523 15 21C15 20.4477 15.4477 20 16 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V16C20 15.4477 20.4477 15 21 15Z"})),$n=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z"}));function Mn({refetch:e}){const{fitView:t,zoomIn:r,zoomOut:n}=ur();return s.jsxs("div",{"aria-label":"Dag Controls",className:"absolute left-4 top-4 z-10 flex flex-col gap-1",children:[s.jsxs("div",{className:"divide-y divide-neutral-300 overflow-hidden rounded-md border border-neutral-300",children:[s.jsx("div",{children:s.jsx(k,{onClick:()=>r(),emphasis:"subtle",className:"rounded-sharp border-none p-0.5",intent:"secondary",children:s.jsx(Vs,{className:"h-5 w-5 bg-theme-surface-primary fill-theme-text-primary"})})}),s.jsx("div",{children:s.jsx(k,{onClick:()=>n(),emphasis:"subtle",className:"rounded-sharp border-none bg-theme-surface-primary p-0.5",intent:"secondary",children:s.jsx($n,{className:"h-5 w-5 fill-theme-text-primary"})})})]}),s.jsx(k,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>t(),emphasis:"subtle",intent:"secondary",children:s.jsx(Pn,{className:"h-5 w-5 fill-theme-text-primary"})}),s.jsxs(k,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>{e()},emphasis:"subtle",intent:"secondary",children:[s.jsx("span",{className:"sr-only",children:"Refresh"}),s.jsx(As,{className:"h-5 w-5 fill-theme-text-primary"})]})]})}function Dn({data:e}){const t=e.status==="failed",r=e.status==="completed";return s.jsx(Ae,{children:s.jsx(A,{children:s.jsxs(z,{children:[s.jsx(F,{children:s.jsxs("div",{className:"flex h-[50px] min-w-0 max-w-[300px] items-center justify-center gap-1 rounded-rounded border border-primary-100 bg-primary-25 p-1 opacity-50",children:[s.jsx("div",{className:"rounded-rounded bg-primary-50 p-0.5",children:s.jsx(oe,{status:t?"failed":r?"completed":"running",className:"h-4 w-4 fill-primary-400"})}),s.jsx("p",{className:"truncate",children:e.label})]})}),s.jsx(H,{className:"z-20 max-w-xs text-center",children:"This artifact is not generated yet. It will not be created if the preceding steps fail."})]})})})}function Rn({data:e}){const t=e.status==="failed",r=e.status==="completed";return s.jsx(Ae,{children:s.jsx(A,{children:s.jsxs(z,{children:[s.jsx(F,{children:s.jsxs("div",{className:"flex h-[50px] max-w-[300px] items-center gap-1 rounded-md border border-theme-border-moderate bg-theme-surface-primary p-1 pr-2 opacity-50",children:[s.jsx("div",{className:"rounded-sm bg-warning-50 p-0.5",children:s.jsx(oe,{status:t?"failed":r?"completed":"running",className:"h-4 w-4 fill-theme-text-warning"})}),s.jsx("p",{className:"truncate",children:e.label})]})}),s.jsxs(H,{className:"z-20 max-w-xs text-center",children:["This is a future step with pending execution.",s.jsx("br",{}),"It may not run if preceding steps fail."]})]})})})}const kt=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Vn(e,t,r,n){const a=Math.min(kt(e,t)/2,kt(t,r)/2,n),{x:i,y:l}=t;if(e.x===i&&i===r.x||e.y===l&&l===r.y)return`L${i} ${l}`;if(e.y===l){const d=e.x<r.x?-1:1,u=e.y<r.y?1:-1;return`L ${i+a*d},${l}Q ${i},${l} ${i},${l+a*u}`}const o=e.x<r.x?1:-1,c=e.y<r.y?-1:1;return`L ${i},${l+a*c}Q ${i},${l} ${i+a*o},${l}`}function He(e){return{x:e[0],y:e[1]}}const An=e=>(t,r,n)=>{const a=e.borderRadius;let i=`M ${t.x}, ${t.y} `;const l=n.reduce((o,c,d)=>{let u="";if(d>0&&d<n.length-1)u=Vn(He(n[d-1]),He(c),He(n[d+1]),a);else{const[h,m]=c;u=`${d===0?"M":"L"}${h} ${m}`}return o+=u,o},"");return i+=l,i+=`L ${r.x}, ${r.y} `,i};function zn(e){const t=Ss(),r=Ts({nodes:t,sourcePosition:e.sourcePosition,targetPosition:e.targetPosition,sourceX:e.sourceX,sourceY:e.sourceY,targetX:e.targetX,targetY:e.targetY,options:{drawEdge:An({borderRadius:10}),generatePath:Is,gridRatio:t.length>20?6:t.length>10?3:2}});return r===null?s.jsx(Ps,{...e}):s.jsx($s,{...e,path:r.svgPathString})}const gr=e=>x.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.29292 1.29292C2.56075 1.02509 2.95692 0.931566 3.31625 1.05134L6.31626 2.05134C6.7246 2.18746 7.00003 2.5696 7.00003 3.00003V5.58581L10.11 8.69574C10.0377 8.30745 10 7.9077 10 7.50003C10 3.91018 12.9102 1.00003 16.5 1.00003C17.6867 1.00003 18.8019 1.31894 19.7614 1.87638C20.0298 2.03232 20.2105 2.30406 20.2506 2.61187C20.2907 2.91968 20.1856 3.22865 19.9661 3.44815L17.3385 6.07576C17.1288 6.28544 17.0146 6.40072 16.9389 6.48989C16.9359 6.49344 16.9331 6.49682 16.9304 6.50003C16.9331 6.50323 16.9359 6.50661 16.9389 6.51016C17.0146 6.59933 17.1288 6.71461 17.3385 6.92429L17.5758 7.16155C17.7854 7.37123 17.9007 7.48541 17.9899 7.56111C17.9934 7.56412 17.9968 7.56696 18 7.56962C18.0032 7.56696 18.0066 7.56412 18.0102 7.56111C18.0993 7.48541 18.2146 7.37123 18.4243 7.16155L20.8822 4.70364C21.1187 4.46713 21.4578 4.36452 21.7858 4.43023C22.1137 4.49594 22.3871 4.72126 22.5142 5.03063C22.8277 5.7933 23 6.62779 23 7.50003C23 10.5046 20.9614 13.0331 18.1919 13.7777L21.2071 16.7928C22.4261 18.0117 22.4261 19.9881 21.2071 21.207C19.9882 22.426 18.0119 22.426 16.7929 21.207L12.0001 16.4142L7.20713 21.2071C5.98818 22.4261 4.01187 22.4261 2.79292 21.2071C1.57397 19.9882 1.57397 18.0119 2.79292 16.7929L9.08581 10.5L5.58581 7.00003H3.00003C2.5696 7.00003 2.18746 6.7246 2.05134 6.31626L1.05134 3.31625C0.931566 2.95692 1.02509 2.56075 1.29292 2.29292L2.29292 1.29292ZM5.00003 5.00003V3.72079L3.27012 3.14415L3.14415 3.27012L3.72079 5.00003H5.00003ZM11.2062 11.2081L4.20714 18.2071C3.76923 18.645 3.76923 19.355 4.20714 19.7929C4.64504 20.2308 5.35502 20.2308 5.79292 19.7929L12.9499 12.6359C12.9689 12.617 12.9882 12.5975 13.0079 12.5776C13.0487 12.5366 13.0913 12.4937 13.1355 12.4504L13.2326 12.3533C13.3452 12.2406 13.4665 12.1456 13.5937 12.0668C13.6314 12.0423 13.6697 12.0194 13.7087 11.9985C13.8064 11.9462 13.9249 11.8887 14.0691 11.8448C14.2133 11.8009 14.3438 11.7827 14.4541 11.7718C14.4756 11.7696 14.497 11.768 14.5184 11.7668C14.7885 11.7445 15.0574 11.7719 15.3055 11.84C15.4095 11.8686 15.515 11.8935 15.622 11.9146C15.6224 11.9147 15.6228 11.9148 15.6233 11.9149C15.6427 11.9187 15.6621 11.9224 15.6816 11.926C15.8091 11.9493 15.9384 11.9674 16.0696 11.9798C16.211 11.9932 16.3546 12 16.5 12C18.9853 12 21 9.98531 21 7.50003C21 7.47163 20.9998 7.44329 20.9992 7.41502L19.816 8.5983C19.6375 8.77679 19.4637 8.95062 19.3045 9.08579C19.1297 9.23422 18.9078 9.39379 18.6181 9.48793C18.2164 9.61844 17.7837 9.61844 17.382 9.48793C17.0923 9.39379 16.8704 9.23422 16.6955 9.08579C16.5363 8.95062 16.3625 8.7768 16.1841 8.59832L15.9017 8.31596C15.7233 8.13751 15.5494 7.96373 15.4143 7.80452C15.2658 7.62967 15.1063 7.40778 15.0121 7.11806C14.8816 6.71637 14.8816 6.28368 15.0121 5.88199C15.1063 5.59228 15.2658 5.37038 15.4143 5.19554C15.5494 5.03633 15.7232 4.86255 15.9017 4.68412L17.4792 3.10665C17.1643 3.03685 16.8367 3.00003 16.5 3.00003C14.0147 3.00003 12 5.01475 12 7.50003C12 7.80093 12.0294 8.09398 12.0852 8.37677L12.0888 8.39527C12.1337 8.62253 12.1727 8.82052 12.1978 8.97939C12.2214 9.12834 12.2493 9.33506 12.2283 9.54599C12.2173 9.65623 12.1991 9.78675 12.1552 9.93093C12.1114 10.0751 12.0538 10.1937 12.0015 10.2913C11.8581 10.5594 11.6197 10.7962 11.4224 10.9921C11.4025 11.0119 11.3831 11.0312 11.3642 11.0501L11.2081 11.2062C11.2078 11.2065 11.2074 11.2068 11.2071 11.2071C11.2068 11.2074 11.2065 11.2078 11.2062 11.2081ZM13.4143 15L18.2071 19.7928C18.645 20.2307 19.355 20.2307 19.7929 19.7928C20.2308 19.3549 20.2308 18.6449 19.7929 18.207L15.5109 13.9251C15.4187 13.911 15.3272 13.895 15.2363 13.8771C14.9852 13.8275 14.825 13.7961 14.7082 13.7777C14.6855 13.7741 14.667 13.7714 14.652 13.7694C14.6484 13.7726 14.6444 13.7762 14.64 13.7802C14.5816 13.8331 14.5053 13.9089 14.3727 14.0416C14.3699 14.0444 14.367 14.0472 14.3642 14.0501L13.4143 15Z"}));function Fn({stepId:e}){var i;const{data:t,isPending:r,isError:n,error:a}=ve({stepId:e});return n?s.jsx(ae,{err:a}):r?s.jsx(g,{className:"h-[300px] w-full"}):s.jsx(P,{initialOpen:!0,title:"Code",children:s.jsx(I,{fullWidth:!0,highlightCode:!0,wrap:!0,code:((i=t==null?void 0:t.metadata)==null?void 0:i.source_code)||""})})}const Hn=e=>x.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.7587 4.31292e-07L8 9.08129e-07C8.55229 9.08129e-07 9 0.447716 9 1C9 1.55229 8.55229 2 8 2H5.8C4.94342 2 4.36113 2.00078 3.91104 2.03755C3.47262 2.07337 3.24842 2.1383 3.09202 2.21799C2.7157 2.40973 2.40973 2.7157 2.21799 3.09202C2.1383 3.24842 2.07337 3.47262 2.03755 3.91104C2.00078 4.36113 2 4.94342 2 5.8V14.2C2 15.0566 2.00078 15.6389 2.03755 16.089C2.07337 16.5274 2.1383 16.7516 2.21799 16.908C2.40973 17.2843 2.7157 17.5903 3.09202 17.782C3.24842 17.8617 3.47262 17.9266 3.91104 17.9624C4.36113 17.9992 4.94342 18 5.8 18H14.2C15.0566 18 15.6389 17.9992 16.089 17.9624C16.5274 17.9266 16.7516 17.8617 16.908 17.782C17.2843 17.5903 17.5903 17.2843 17.782 16.908C17.8617 16.7516 17.9266 16.5274 17.9624 16.089C17.9992 15.6389 18 15.0566 18 14.2V12C18 11.4477 18.4477 11 19 11C19.5523 11 20 11.4477 20 12V14.2413C20 15.0463 20 15.7106 19.9558 16.2518C19.9099 16.8139 19.8113 17.3306 19.564 17.816C19.1805 18.5686 18.5686 19.1805 17.816 19.564C17.3306 19.8113 16.8139 19.9099 16.2518 19.9558C15.7106 20 15.0463 20 14.2413 20H5.75868C4.95372 20 4.28936 20 3.74817 19.9558C3.18608 19.9099 2.66937 19.8113 2.18404 19.564C1.43139 19.1805 0.819468 18.5686 0.435975 17.816C0.188684 17.3306 0.0901197 16.8139 0.0441945 16.2518C-2.28137e-05 15.7106 -1.23241e-05 15.0463 4.31292e-07 14.2413V5.7587C-1.23241e-05 4.95373 -2.28137e-05 4.28937 0.0441945 3.74817C0.0901197 3.18608 0.188684 2.66937 0.435975 2.18404C0.819468 1.43139 1.43139 0.819468 2.18404 0.435975C2.66937 0.188684 3.18608 0.0901197 3.74817 0.0441945C4.28937 -2.28137e-05 4.95373 -1.23241e-05 5.7587 4.31292e-07ZM12 1.00001C12 0.447726 12.4477 1.04449e-05 13 1.04449e-05H19C19.5523 1.04449e-05 20 0.447725 20 1.00001L20 7.00001C20 7.55229 19.5523 8.00001 19 8.00001C18.4477 8.00001 18 7.5523 18 7.00001L18 3.41422L10.7071 10.7071C10.3166 11.0976 9.68342 11.0976 9.29289 10.7071C8.90237 10.3166 8.90237 9.68342 9.29289 9.29289L16.5858 2.00001H13C12.4477 2.00001 12 1.5523 12 1.00001Z"}));function jr({data:e}){const[t,r]=x.useState(!0);return s.jsxs(ge,{open:t,onOpenChange:r,children:[s.jsx(je,{intent:"primary",className:"flex items-center gap-[10px]",children:s.jsxs(Ce,{className:"flex w-full items-center gap-[10px]",children:[s.jsx(ye,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Docker Image"]})}),s.jsxs(be,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(j,{label:"Docker Image",value:s.jsxs("div",{className:"flex justify-between",children:[s.jsxs(T,{className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx(Fs,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),ns(e.image)]}),s.jsxs("div",{className:"align-center mr-1 flex",children:[s.jsx("a",{className:"cursor-pointer",rel:"noopener noreferrer",target:"_blank",href:`https://${e.image}`,children:s.jsx(Hn,{className:"mr-1 mt-0.5 h-5 w-5 fill-theme-text-tertiary"})}),s.jsx(K,{copyText:e.image,isVisible:!0,copyTitle:"Copy url"})]})]})}),s.jsx(j,{label:"Contains Code",value:s.jsx(T,{color:e.contains_code?"green":"grey",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:e.contains_code?"Available":"None"})})]}),e.dockerfile&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Dockerfile"}),s.jsx(I,{fullWidth:!0,wrap:!0,code:e.dockerfile})]}),e.requirements&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Requirements"}),s.jsx(I,{fullWidth:!0,wrap:!0,code:e.requirements})]})]})]})}function Bn({buildId:e}){return["pipeline-builds",e]}async function Gn({buildId:e},t){const r=se(ne.runs.detail(e)),n=await fetch(r,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",...t&&{Authorization:`Bearer ${t}`}}});if(!n.ok)throw new ee({message:`Error while fetching pipeline build ${e}`,status:n.status,statusText:n.statusText});return n.json()}function Cr(e,t){return te({queryKey:Bn(e),queryFn:()=>Gn(e),...t})}function Zn({stepId:e}){var m,f,p,C,w,E,G,Z,q,U,Y,b;const{data:t,isPending:r,isError:n,error:a}=ve({stepId:e}),i=Object.values(((f=(m=t==null?void 0:t.metadata)==null?void 0:m.config)==null?void 0:f.extra)||{}),{runId:l}=$(),{data:o}=M({runId:l},{throwOnError:!0,enabled:!!l}),{data:c}=Cr({buildId:(C=(p=o==null?void 0:o.body)==null?void 0:p.build)==null?void 0:C.id},{enabled:!!((E=(w=o==null?void 0:o.body)==null?void 0:w.build)!=null&&E.id)}),u=(()=>{var _;const y=(_=c==null?void 0:c.metadata)==null?void 0:_.images;if(!y)return null;if(Object.keys(y).length===1&&Object.keys(y)[0]!=="orchestrator")return Object.keys(y)[0];for(const D in y)if(D!=="orchestrator"&&D.split(".")[1]!=="orchestrator")return D;return"orchestrator"})(),h=u&&((Z=(G=c==null?void 0:c.metadata)==null?void 0:G.images)==null?void 0:Z[u]);return n?s.jsx(ae,{err:a}):r?s.jsxs("div",{className:"space-y-5",children:[s.jsx(g,{className:"h-[200]"}),s.jsx(g,{className:"h-[200px]"}),s.jsx(g,{className:"h-[200px]"})]}):s.jsxs("div",{className:"space-y-5",children:[((q=t.metadata)==null?void 0:q.run_metadata)&&s.jsx(Ve,{title:"Metadata",metadata:(U=t.metadata)==null?void 0:U.run_metadata}),s.jsx(Lt,{data:(b=(Y=t.metadata)==null?void 0:Y.config)==null?void 0:b.parameters,title:"Parameters"}),h?s.jsx(jr,{data:h}):null,s.jsx(qn,{id:t.id}),i.length>0?s.jsx(Lt,{data:i,title:"Extra"}):null]})}function Lt({data:e,title:t}){return Object.keys(e).length>0?s.jsx(P,{initialOpen:!0,title:t,children:s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:Object.entries(e).map(([n,a])=>typeof a!="object"&&s.jsx(j,{label:s.jsx(A,{children:s.jsxs(z,{children:[s.jsx(F,{className:"cursor-default truncate",children:n}),s.jsx(H,{className:"max-w-[480px]",children:n})]})}),value:s.jsx("div",{children:Qt(a)})},n))})}):s.jsx(P,{initialOpen:!0,title:t,children:s.jsx("p",{className:"text-theme-text-secondary",children:"No data available"})})}function qn({id:e}){function t(r){return`from zenml.client import Client
|
6
|
+
artifact = Client().get_pipeline_run('${r}')
|
7
|
+
config = run.config()`}return s.jsxs(P,{initialOpen:!0,title:"Code",children:[s.jsx("h2",{className:"mb-2 text-text-md text-theme-text-secondary",children:"Get config programmatically"}),s.jsx(I,{fullWidth:!0,highlightCode:!0,wrap:!0,code:t(e)})]})}function br(e,t){if(!e||!t)return"";const r=new Date(e),n=new Date(t);if(isNaN(r.getTime())||isNaN(n.getTime()))return"";const a=Math.abs(n.getTime()-r.getTime()),i=Math.floor(a/(1e3*60)),l=Math.floor(a%(1e3*60)/1e3);return`${i}min ${l}s`}const Un=e=>x.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0083 2C6.47396 2 2 6.58331 2 12.2535C2 16.786 4.86662 20.6226 8.84338 21.9805C9.34058 22.0826 9.5227 21.7599 9.5227 21.4885C9.5227 21.2508 9.50631 20.436 9.50631 19.587C6.72225 20.1983 6.14249 18.3647 6.14249 18.3647C5.69508 17.1764 5.03215 16.871 5.03215 16.871C4.12092 16.2429 5.09852 16.2429 5.09852 16.2429C6.1093 16.3108 6.63969 17.2954 6.63969 17.2954C7.53432 18.857 8.97592 18.4158 9.55588 18.1441C9.63865 17.482 9.90394 17.0237 10.1856 16.7691C7.96514 16.5314 5.62891 15.6487 5.62891 11.7102C5.62891 10.5898 6.02634 9.67309 6.65608 8.96018C6.55672 8.7056 6.20866 7.65289 6.75564 6.24394C6.75564 6.24394 7.60069 5.97228 9.5061 7.29644C10.3219 7.07199 11.1632 6.95782 12.0083 6.95685C12.8533 6.95685 13.7148 7.07581 14.5102 7.29644C16.4159 5.97228 17.2609 6.24394 17.2609 6.24394C17.8079 7.65289 17.4596 8.7056 17.3603 8.96018C18.0066 9.67309 18.3876 10.5898 18.3876 11.7102C18.3876 15.6487 16.0514 16.5143 13.8143 16.7691C14.179 17.0916 14.4936 17.7026 14.4936 18.6703C14.4936 20.0453 14.4773 21.1489 14.4773 21.4883C14.4773 21.7599 14.6596 22.0826 15.1566 21.9808C19.1333 20.6224 22 16.786 22 12.2535C22.0163 6.58331 17.526 2 12.0083 2Z",fill:"#0D061D"}));function Yn({repositoryId:e}){return["code_repositories",e]}async function Wn({repositoryId:e}){const t=se(ne.code_repositories.detail(e)),r=await fetch(t,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(r.status===404&&Le(),!r.ok)throw new ee({message:`Error while fetching code repository ${e}`,status:r.status,statusText:r.statusText});return r.json()}function Kn(e,t){return te({queryKey:Yn(e),queryFn:()=>Wn(e),...t})}function yr({repositoryId:e,commit:t}){var o;const{data:r,isPending:n,isError:a}=Kn({repositoryId:e},{enabled:!!e}),i=(o=r==null?void 0:r.metadata)==null?void 0:o.config,l=()=>{var u,h,m,f;let c=r==null?void 0:r.name,d="";return((h=(u=r==null?void 0:r.body)==null?void 0:u.source)==null?void 0:h.attribute)==="GitHubCodeRepository"?(c=`${i==null?void 0:i.owner}/${i==null?void 0:i.repository}`,d=`https://www.github.com/${c}`):((f=(m=r==null?void 0:r.body)==null?void 0:m.source)==null?void 0:f.attribute)==="GitLabCodeRepository"&&(c=`${i==null?void 0:i.group}/${i==null?void 0:i.project}`,d=`https://www.gitlab.com/${c}`),s.jsxs("a",{target:"_blank",rel:"noopener noreferrer",className:`flex items-center ${d?"":"pointer-events-none"}`,onClick:p=>p.stopPropagation(),href:d,children:[s.jsx(Un,{className:"mr-1 h-5 w-5 fill-theme-text-brand"}),c]})};return!e||!t?s.jsx("p",{children:"Not available"}):n?s.jsx(g,{className:"h-6"}):a?null:s.jsxs("div",{className:"group/copybutton mr-1",children:[s.jsxs(T,{color:"grey",className:"inline-flex items-center font-semibold text-neutral-900",rounded:!1,emphasis:"subtle",children:[l(),s.jsx("div",{className:"ml-1 rounded-sm bg-neutral-200 px-1 py-0.25",children:as(t,10)})]}),s.jsx(K,{copyText:t})]})}function Qn({stepId:e,runId:t}){var h,m,f,p,C,w,E,G,Z,q,U,Y,b,y,_,D,ie,L,X,J,le,ce,Fe,me,Se,xt,gt,jt,Ct,bt,yt;const{data:r,isError:n,isPending:a,error:i}=ve({stepId:e}),{data:l}=M({runId:t}),o=(f=(m=(h=l==null?void 0:l.body)==null?void 0:h.code_reference)==null?void 0:m.body)==null?void 0:f.code_repository;if(n)return s.jsx(ae,{err:i});if(a)return s.jsx(g,{className:"h-[300px] w-full"});const c=(C=(p=r.metadata)==null?void 0:p.config)==null?void 0:C.enable_cache,d=(E=(w=r.metadata)==null?void 0:w.config)==null?void 0:E.enable_artifact_metadata,u=(Z=(G=r.metadata)==null?void 0:G.config)==null?void 0:Z.enable_artifact_visualization;return s.jsx(P,{initialOpen:!0,title:"Details",children:s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(j,{label:"Id",value:s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[r.id,s.jsx(K,{copyText:r.id})]})}),s.jsx(j,{label:"Status",value:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsxs(T,{color:Re((q=r.body)==null?void 0:q.status),rounded:!0,emphasis:"subtle",className:"flex w-fit items-center gap-1 capitalize",children:[s.jsx(oe,{className:"fill-current",status:(U=r.body)==null?void 0:U.status}),(Y=r.body)==null?void 0:Y.status]}),typeof c=="boolean"&&s.jsx(pe,{size:"sm",color:c?"green":"grey",children:c?"Enable cache":"Disabled cache"})]})}),l?s.jsxs(s.Fragment,{children:[s.jsx(j,{label:"Pipeline",value:s.jsx(Ie,{to:Ee.pipelines.namespace(encodeURIComponent((y=(b=l.body)==null?void 0:b.pipeline)==null?void 0:y.name)),children:s.jsxs(T,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx(et,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(D=(_=l.body)==null?void 0:_.pipeline)==null?void 0:D.name]})})}),s.jsx(j,{label:s.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[s.jsx("span",{className:"truncate",children:"Repository/Commit"}),s.jsx(A,{children:s.jsxs(z,{children:[s.jsxs(F,{className:"cursor-default",children:[s.jsx(he,{className:"h-3 w-3 fill-theme-text-secondary"}),s.jsx("span",{className:"sr-only",children:"Info"})]}),s.jsx(H,{className:"w-full max-w-md whitespace-normal",children:"Git hash of code repository. Only set if pipeline was run in a clean git repository connected to your ZenML server."})]})})]}),value:(ie=l.body)!=null&&ie.code_reference?s.jsx(yr,{repositoryId:o==null?void 0:o.id,commit:(L=l.body.code_reference.body)==null?void 0:L.commit}):"Not available"}),s.jsx(R,{className:(X=l.metadata)!=null&&X.code_path?"col-span-3":"",children:s.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[s.jsx("span",{children:"Code Path"}),s.jsx(A,{children:s.jsxs(z,{children:[s.jsxs(F,{className:"cursor-default",children:[s.jsx(he,{className:"h-3 w-3 fill-theme-text-secondary"}),s.jsx("span",{className:"sr-only",children:"Info"})]}),s.jsx(H,{className:"w-full max-w-md whitespace-normal",children:"Path to where code was uploaded in the artifact store. Only set on a pipeline with a non-local orchestrator and if Repository/Commit is not set"})]})})]})}),s.jsx(V,{className:(J=l.metadata)!=null&&J.code_path?"col-span-3 h-auto":"",children:(le=l.metadata)!=null&&le.code_path?s.jsx(I,{code:l.metadata.code_path}):"Not available"})]}):s.jsx(g,{className:"h-6 w-full"}),s.jsx(j,{label:"Cache key",value:s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[(ce=r.metadata)==null?void 0:ce.cache_key,s.jsx(K,{copyText:(Fe=r.metadata)==null?void 0:Fe.cache_key})]})}),s.jsx(j,{label:"Author",value:s.jsx("div",{className:"inline-flex items-center gap-1",children:s.jsx(it,{username:(Se=(me=r.body)==null?void 0:me.user)==null?void 0:Se.name})})}),s.jsx(j,{label:"Start Time",value:(xt=r.metadata)!=null&&xt.start_time?s.jsx(_e,{dateString:(gt=r.metadata)==null?void 0:gt.start_time}):"Not available"}),s.jsx(j,{label:"End Time",value:(jt=r.metadata)!=null&&jt.end_time?s.jsx(_e,{dateString:(Ct=r.metadata)==null?void 0:Ct.end_time}):"Not available"}),s.jsx(j,{label:"Duration",value:br(((bt=r.metadata)==null?void 0:bt.start_time)||"",((yt=r.metadata)==null?void 0:yt.end_time)||"")}),s.jsx(j,{label:"Artifact metadata",value:s.jsx(pe,{size:"sm",color:d?"green":"grey",children:d?"Enable":"Disabled"})}),s.jsx(j,{label:"Artifact visualization",value:s.jsx(pe,{size:"sm",color:u?"green":"grey",children:u?"Enable":"Disabled"})})]})})}function Xn({className:e}){var c,d,u,h,m;const{runId:t}=$(),{data:r,isPending:n,isError:a}=M({runId:t},{throwOnError:!0}),i=(d=(c=r==null?void 0:r.metadata)==null?void 0:c.run_metadata)==null?void 0:d.orchestrator_url,l=(h=(u=r==null?void 0:r.metadata)==null?void 0:u.run_metadata)==null?void 0:h.orchestrator_logs_url,o=(m=r==null?void 0:r.metadata)==null?void 0:m.orchestrator_run_id;return a?s.jsx("p",{children:"Failed to fetch Orchestrator Card"}):n?s.jsx(g,{className:"h-[150px] w-full"}):s.jsx(P,{className:e,initialOpen:!0,title:"Orchestrator",children:s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(j,{label:"Orchestrator URL",value:i?s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[s.jsx("a",{className:"truncate underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:i.body.value,children:i.body.value}),s.jsx(K,{copyText:i.body.value})]}):"Not available"}),s.jsx(j,{label:"Orchestrator Logs",value:l&&typeof l.body.value=="string"?s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[s.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:l.body.value,children:l.body.value}),s.jsx(K,{copyText:l.body.value})]}):"Not available"}),s.jsx(j,{label:"Orchestrator Run ID",value:o?s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[o,s.jsx(K,{copyText:o})]}):"Not available"})]})})}function Jn({stepId:e}){return["logs",e]}async function ea({stepId:e}){const t=se(ne.steps.logs(e)),r=await xe(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){const n=await r.json().catch(()=>({}));throw new ee({message:n.detail[1].includes("File")&&n.detail[1]||`The logs for step ${e} cannot be fetched or this pipeline run ran locally and logs were not tracked`,status:r.status,statusText:r.statusText})}return r.json()}function ta(e,t){return te({queryKey:Jn(e),queryFn:()=>ea(e),...t})}const ra=()=>s.jsx("section",{className:"flex h-[calc(100vh_-_270px)] items-center justify-center",children:s.jsxs("div",{className:"flex flex-col items-center justify-center",children:[s.jsxs("div",{className:"relative mb-2 flex items-center justify-center",children:[s.jsx(tt,{className:"h-[120px] w-[120px]"}),s.jsx(na,{})]}),s.jsx("h2",{className:"my-3 text-center text-display-xs font-semibold",children:"Loading the Logs"}),s.jsxs("p",{className:"text-center text-text-lg text-theme-text-secondary",children:["It can take up to a few minutes. ",s.jsx("br",{})," Please wait while we fetch logs from the artifact store."]})]})});function sa({stepId:e,stepDetail:t}){var o,c;const r=(c=(o=t==null?void 0:t.metadata)==null?void 0:o.config)==null?void 0:c.enable_step_logs,{data:n,isPending:a,isError:i,error:l}=ta({stepId:e});return i?s.jsx(ae,{err:l}):a?s.jsx(ra,{}):s.jsx(P,{initialOpen:!0,title:"Logs",children:typeof r=="boolean"&&r===!1?s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:s.jsx(j,{label:"Enable logs",value:"Disabled"})}):s.jsx(I,{codeClasses:"whitespace-pre-line",fullWidth:!0,wrap:!0,code:n||""})})}function na(){return s.jsx("div",{className:"absolute rounded-rounded bg-primary-25 p-3",children:s.jsx(hr,{className:"h-7 w-7 fill-primary-400"})})}function aa({stepId:e}){var i;const{data:t,isPending:r,isError:n,error:a}=ve({stepId:e});return r?s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(g,{className:"h-9 w-full"}),s.jsx(g,{className:"h-9 w-full"})]}):n?s.jsx(ae,{err:a}):!((i=t.metadata)!=null&&i.run_metadata)||Object.keys(t.metadata.run_metadata).length===0?s.jsx(W,{icon:s.jsx(De,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available for this step."})]})}):s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(Ve,{metadata:t.metadata.run_metadata}),s.jsx(ct,{metadata:t.metadata.run_metadata})]})}function ia({stack:e}){return s.jsxs(sr,{className:"flex items-center justify-between gap-3 px-5 py-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(is,{type:"square",size:"md",children:s.jsx(ls,{size:"md",children:e.name[0]})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-text-lg",children:e.name}),s.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),s.jsxs(T,{rounded:!1,className:"inline-flex shrink items-center gap-0.5 truncate",color:"turquoise",emphasis:"subtle",children:[s.jsx(at,{className:"h-4 w-4 shrink-0 fill-current"}),s.jsx("div",{className:"truncate",children:"Stack"})]})]})}const Ke=x.forwardRef(({name:e,children:t,type:r,...n},a)=>s.jsxs(os,{children:[s.jsx(cs,{asChild:!0,children:t}),s.jsxs(ds,{className:"w-fit max-w-3xl",...n,ref:a,children:[s.jsx(us,{children:s.jsx(hs,{children:nr(r||"")})}),s.jsxs("div",{className:"space-y-5 truncate p-7",children:[s.jsx(Oe,{children:s.jsx("div",{className:"flex w-full flex-wrap justify-between gap-2",children:s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"truncate text-text-sm font-semibold",children:"We are working on the new Stacks experience."}),s.jsx("p",{className:"truncate text-text-sm",children:"Meanwhile you can use the CLI to check the details of your component."})]})})}),s.jsxs("div",{className:"space-y-1 truncate",children:[s.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Describe your ",fs(r)]}),s.jsx(I,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml ${ms(r)} describe ${e}`})]})]})]})]}));Ke.displayName="ComponentInfoDialog";function la({component:e,run:t}){var a,i,l,o,c,d;const r=`${(a=e.body)==null?void 0:a.type}.${(i=e.body)==null?void 0:i.flavor}`,n=((o=(l=t.metadata)==null?void 0:l.config.settings)==null?void 0:o[r])??void 0;return!n||Object.keys(n).length===0?s.jsx(Ke,{name:e.name,type:((c=e.body)==null?void 0:c.type)||"orchestrator",children:s.jsx("button",{className:"w-full",children:s.jsx(sr,{className:"flex items-center justify-between gap-3 px-5 py-3 text-left",children:s.jsx(Ot,{component:e})})})}):s.jsx(re,{intent:"primary",contentClassName:"pl-[60px]",className:"w-full",isInitialOpen:!1,title:s.jsx("div",{className:"flex w-full items-center justify-between gap-3 text-left",children:s.jsx(Ot,{component:e})}),data:n,children:s.jsx(Ke,{name:e.name,type:((d=e.body)==null?void 0:d.type)||"orchestrator",children:s.jsx(k,{intent:"secondary",emphasis:"subtle",className:"mx-auto flex w-fit justify-center text-text-sm text-theme-text-secondary",children:"See Component Details"})})})}function Ot({component:e}){var t,r,n,a;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("img",{width:32,height:32,alt:`${(t=e.body)==null?void 0:t.flavor} logo`,src:dr(((r=e.body)==null?void 0:r.logo_url)||"")}),s.jsxs("div",{children:[s.jsx("p",{className:"text-text-lg",children:e.name}),s.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),s.jsx(Hs,{type:((n=e.body)==null?void 0:n.type)||"orchestrator",children:nr(((a=e.body)==null?void 0:a.type)||"")})]})}function wr({stack:e,run:t}){var r;return s.jsxs("div",{className:"space-y-5",children:[s.jsx(oa,{}),s.jsx(ia,{stack:e}),s.jsx("ul",{className:"space-y-5",children:Object.values(((r=e.metadata)==null?void 0:r.components)||{}).map(n=>s.jsx("li",{className:"w-full",children:s.jsx(la,{component:n[0],run:t})},n[0].id))})]})}function oa(){return s.jsx(Oe,{className:"truncate",children:s.jsx("p",{className:"truncate",children:"Current run-specific stack settings. Click on a component for full default settings."})})}function ca(){var n,a,i;const{runId:e}=$(),t=M({runId:e},{throwOnError:!0});if(t.isPending)return s.jsx(g,{className:"h-[250px] w-full"});if(t.isError)return s.jsx("p",{children:"Something went wrong fetching the run"});const r=(i=(a=(n=t.data)==null?void 0:n.body)==null?void 0:a.stack)==null?void 0:i.id;return r?s.jsx(da,{run:t.data,stackId:r}):s.jsx(W,{icon:s.jsx(ue,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-display-xs font-semibold",children:"No Stack"}),s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There is no stack associated with this run."})]})})}function da({stackId:e,run:t}){const{data:r,isError:n,isPending:a}=ar({stackId:e});return a?s.jsx(g,{className:"h-[250px] w-full"}):n?s.jsx("p",{children:"Failed to fetch Stack"}):s.jsx(wr,{stack:r,run:t})}function ua(e){if(!e)return"light-grey";switch(e){case"completed":return"green";default:return"light-grey"}}function ha({stepId:e}){var i,l,o;const{runId:t}=$(),{data:r}=ve({stepId:e}),n=(i=r==null?void 0:r.body)==null?void 0:i.status,a=(o=(l=r==null?void 0:r.metadata)==null?void 0:l.config)==null?void 0:o.enable_cache;return s.jsxs("div",{children:[s.jsx("div",{className:"flex h-9 items-center border-b border-theme-border-moderate bg-theme-surface-primary px-4 py-3",children:s.jsxs(Jt,{className:"focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(ir,{className:"h-5 w-5 fill-neutral-500"}),s.jsx("span",{className:"sr-only",children:"Close"})]})}),s.jsx("div",{className:"flex justify-between border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:s.jsx("div",{children:r?s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:`rounded-sm p-0.5 ${or(n)}`,children:s.jsx(oe,{status:n,className:"h-4 w-4"})}),s.jsx("h2",{className:"text-display-xs font-semibold",children:r.name}),s.jsx(pe,{size:"sm",color:ua(n),children:n||"None"}),typeof a=="boolean"&&s.jsx(pe,{size:"sm",color:a?"green":"grey",children:a?"Enable cache":"Disabled cache"})]}):s.jsx(g,{className:"h-6 w-7"})})}),s.jsx("div",{className:"p-5",children:s.jsxs(rt,{defaultValue:"overview",children:[s.jsxs(st,{children:[s.jsxs(O,{className:"flex items-center gap-2 truncate text-text-md",value:"overview",children:[s.jsx(he,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Overview"})]}),s.jsxs(O,{className:"flex items-center gap-2 truncate text-text-md",value:"stack",children:[s.jsx(at,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Stack"})]}),s.jsxs(O,{className:"flex items-center gap-2 truncate text-text-md",value:"code",children:[s.jsx(zs,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Code"})]}),s.jsxs(O,{className:"flex items-center gap-2 truncate text-text-md",value:"logs",children:[s.jsx(hr,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Logs"})]}),s.jsxs(O,{className:"flex items-center gap-2 truncate text-text-md",value:"config",children:[s.jsx(gr,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Configuration"})]}),s.jsxs(O,{className:"flex items-center gap-2 text-text-md",value:"metadata",children:[s.jsx(nt,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Metadata"})]})]}),s.jsxs(S,{className:"m-0 mt-5 space-y-5 border-0 bg-transparent p-0",value:"overview",children:[s.jsx(Qn,{runId:t,stepId:e}),s.jsx(Xn,{})]}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"stack",children:s.jsx(ca,{})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"code",children:s.jsx(Fn,{stepId:e})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"logs",children:s.jsx(sa,{stepId:e,stepDetail:r})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"config",children:s.jsx(Zn,{stepId:e})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:s.jsx(aa,{stepId:e})})]})})]})}function fa({children:e,stepId:t,onOpenChange:r}){return s.jsxs(er,{onOpenChange:r,children:[s.jsx(tr,{asChild:!0,children:e}),s.jsx(rr,{className:"w-[1000px] overflow-y-auto",children:s.jsx(ha,{stepId:t})})]})}const ma=e=>({unselectAll:e.unselectNodesAndEdges});function pa({data:e,selected:t}){var a,i,l,o;const{unselectAll:r}=ot(ma);function n(c){c||setTimeout(()=>{r()},100)}return s.jsx(Ae,{children:s.jsx(fa,{onOpenChange:n,stepId:e.id,children:s.jsx("button",{"data-selected":!!t,className:ps("h-[50px] max-w-[300px] rounded-md border bg-theme-surface-primary transition-all duration-200 hover:shadow-md data-[selected=true]:shadow-md",{"border-theme-border-moderate hover:border-neutral-400 data-[selected=true]:border-theme-border-bold":((a=e.body)==null?void 0:a.status)!=="failed","border-error-200":((i=e.body)==null?void 0:i.status)==="failed"}),children:s.jsxs("div",{className:"flex items-center gap-1 py-1 pl-1 pr-2",children:[s.jsx("div",{className:`rounded-sm p-0.5 ${or((l=e.body)==null?void 0:l.status)}`,children:s.jsx(oe,{status:(o=e.body)==null?void 0:o.status,className:"h-4 w-4"})}),s.jsx("p",{className:"truncate font-semibold",children:e.name})]})})})})}function xa(e,t,r,n){ja(t,e).forEach(i=>{var m,f;const[l,o]=i.id.split("--"),c=r[l];if(!c)return;const d=Ca(e,i),u=(m=c.body)==null?void 0:m.inputs,h=(f=c.body)==null?void 0:f.outputs;d?ba(d,l,o,u,h,n):(e.push(i),ya(i,l,o,u,h,n))})}function ga(e){return e.type==="artifact"||e.type==="step"}function Pe(e,t,r){return e.some(n=>n.source===t&&n.target===r)}function ja(e,t){return e.filter(r=>!t.some(n=>n.id===r.id))}function Ca(e,t){return e.find(r=>ga(r)&&r.data.id===t.data.id)}function ba(e,t,r,n,a,i){n&&r in n&&!Pe(i,e.id,t)&&$e(i,e.id,t,`${t}--${r}`),a&&r in a&&!Pe(i,t,e.id)&&$e(i,t,e.id,`${t}--${r}`)}function $e(e,t,r,n){e.push({id:n,source:t,target:r})}function ya(e,t,r,n,a,i){n&&r in n&&!Pe(i,e.id,t)&&$e(i,e.id,t,`${t}--${r}`),a&&r in a&&!Pe(i,t,e.id)&&$e(i,t,e.id,`${t}--${r}`)}function wa(e){const t=[],r=[];function n(i,l,o){t.push({id:i,type:l,data:{label:o,status:"running"}})}function a(i,l){r.push({id:`${i}--${l}`,source:i,target:l})}return Object.keys(e).forEach(i=>{const l=e[i];t.push({id:i,type:"previewStep",data:{label:i,status:"running"}}),Object.keys(l.config.outputs||{}).forEach(f=>{const p=`${i}--${f}`;n(p,"previewArtifact",f),a(i,p)});const o=l.spec.inputs??{};Object.keys(o).forEach(f=>{const p=o[f],C=`${p.step_name}--${p.output_name}`;a(C,i)});const c=l.config.external_input_artifacts||{};Object.keys(c).forEach(f=>{const p=`${i}--${f}`;n(p,"previewArtifact",f),a(p,i)});const d=l.config.model_artifacts_or_metadata||{};Object.keys(d).forEach(f=>{const p=`${i}--${f}`;n(p,"previewArtifact",f),a(p,i)});const u=l.config.client_lazy_loaders||{};Object.keys(u).forEach(f=>{const p=`${i}--${f}`;n(p,"previewArtifact",f),a(p,i)}),(l.spec.upstream_steps||[]).filter(f=>!Object.values(o).some(p=>p.step_name===f)).forEach(f=>a(f,i))}),{nodes:t,edges:r}}function va(e){const t=[];return Object.keys(e).forEach(r=>{var l,o;const n=e[r];t.push({id:r,type:"step",data:n});const a=(l=n.body)==null?void 0:l.outputs;Object.entries(a||{}).forEach(([c,d])=>{const u=`${r}--${c}`;t.push({id:u,type:"artifact",data:{...d,name:c}})});const i=(o=n.body)==null?void 0:o.inputs;Object.entries(i||{}).forEach(([c,d])=>{const u=`${r}--${c}`;t.find(h=>h.id===u)||t.push({id:u,type:"artifact",data:{...d,name:c}})})}),t}var Na="\0",de="\0",St="";let Ea=class{constructor(t){v(this,"_isDirected",!0);v(this,"_isMultigraph",!1);v(this,"_isCompound",!1);v(this,"_label");v(this,"_defaultNodeLabelFn",()=>{});v(this,"_defaultEdgeLabelFn",()=>{});v(this,"_nodes",{});v(this,"_in",{});v(this,"_preds",{});v(this,"_out",{});v(this,"_sucs",{});v(this,"_edgeObjs",{});v(this,"_edgeLabels",{});v(this,"_nodeCount",0);v(this,"_edgeCount",0);v(this,"_parent");v(this,"_children");t&&(this._isDirected=t.hasOwnProperty("directed")?t.directed:!0,this._isMultigraph=t.hasOwnProperty("multigraph")?t.multigraph:!1,this._isCompound=t.hasOwnProperty("compound")?t.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[de]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return this._defaultNodeLabelFn=t,typeof t!="function"&&(this._defaultNodeLabelFn=()=>t),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var t=this;return this.nodes().filter(r=>Object.keys(t._in[r]).length===0)}sinks(){var t=this;return this.nodes().filter(r=>Object.keys(t._out[r]).length===0)}setNodes(t,r){var n=arguments,a=this;return t.forEach(function(i){n.length>1?a.setNode(i,r):a.setNode(i)}),this}setNode(t,r){return this._nodes.hasOwnProperty(t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=de,this._children[t]={},this._children[de][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return this._nodes.hasOwnProperty(t)}removeNode(t){var r=this;if(this._nodes.hasOwnProperty(t)){var n=a=>r.removeEdge(r._edgeObjs[a]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach(function(a){r.setParent(a)}),delete this._children[t]),Object.keys(this._in[t]).forEach(n),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r===void 0)r=de;else{r+="";for(var n=r;n!==void 0;n=this.parent(n))if(n===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==de)return r}}children(t=de){if(this._isCompound){var r=this._children[t];if(r)return Object.keys(r)}else{if(t===de)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Object.keys(r)}successors(t){var r=this._sucs[t];if(r)return Object.keys(r)}neighbors(t){var r=this.predecessors(t);if(r){const a=new Set(r);for(var n of this.successors(t))a.add(n);return Array.from(a.values())}}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach(function([l,o]){t(l)&&r.setNode(l,o)}),Object.values(this._edgeObjs).forEach(function(l){r.hasNode(l.v)&&r.hasNode(l.w)&&r.setEdge(l,n.edge(l))});var a={};function i(l){var o=n.parent(l);return o===void 0||r.hasNode(o)?(a[l]=o,o):o in a?a[o]:i(o)}return this._isCompound&&r.nodes().forEach(l=>r.setParent(l,i(l))),r}setDefaultEdgeLabel(t){return this._defaultEdgeLabelFn=t,typeof t!="function"&&(this._defaultEdgeLabelFn=()=>t),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,r){var n=this,a=arguments;return t.reduce(function(i,l){return a.length>1?n.setEdge(i,l,r):n.setEdge(i,l),l}),this}setEdge(){var t,r,n,a,i=!1,l=arguments[0];typeof l=="object"&&l!==null&&"v"in l?(t=l.v,r=l.w,n=l.name,arguments.length===2&&(a=arguments[1],i=!0)):(t=l,r=arguments[1],n=arguments[3],arguments.length>2&&(a=arguments[2],i=!0)),t=""+t,r=""+r,n!==void 0&&(n=""+n);var o=Ne(this._isDirected,t,r,n);if(this._edgeLabels.hasOwnProperty(o))return i&&(this._edgeLabels[o]=a),this;if(n!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[o]=i?a:this._defaultEdgeLabelFn(t,r,n);var c=_a(this._isDirected,t,r,n);return t=c.v,r=c.w,Object.freeze(c),this._edgeObjs[o]=c,Tt(this._preds[r],t),Tt(this._sucs[t],r),this._in[r][o]=c,this._out[t][o]=c,this._edgeCount++,this}edge(t,r,n){var a=arguments.length===1?Be(this._isDirected,arguments[0]):Ne(this._isDirected,t,r,n);return this._edgeLabels[a]}edgeAsObj(){const t=this.edge(...arguments);return typeof t!="object"?{label:t}:t}hasEdge(t,r,n){var a=arguments.length===1?Be(this._isDirected,arguments[0]):Ne(this._isDirected,t,r,n);return this._edgeLabels.hasOwnProperty(a)}removeEdge(t,r,n){var a=arguments.length===1?Be(this._isDirected,arguments[0]):Ne(this._isDirected,t,r,n),i=this._edgeObjs[a];return i&&(t=i.v,r=i.w,delete this._edgeLabels[a],delete this._edgeObjs[a],It(this._preds[r],t),It(this._sucs[t],r),delete this._in[r][a],delete this._out[t][a],this._edgeCount--),this}inEdges(t,r){var n=this._in[t];if(n){var a=Object.values(n);return r?a.filter(i=>i.v===r):a}}outEdges(t,r){var n=this._out[t];if(n){var a=Object.values(n);return r?a.filter(i=>i.w===r):a}}nodeEdges(t,r){var n=this.inEdges(t,r);if(n)return n.concat(this.outEdges(t,r))}};function Tt(e,t){e[t]?e[t]++:e[t]=1}function It(e,t){--e[t]||delete e[t]}function Ne(e,t,r,n){var a=""+t,i=""+r;if(!e&&a>i){var l=a;a=i,i=l}return a+St+i+St+(n===void 0?Na:n)}function _a(e,t,r,n){var a=""+t,i=""+r;if(!e&&a>i){var l=a;a=i,i=l}var o={v:a,w:i};return n&&(o.name=n),o}function Be(e,t){return Ne(e,t.v,t.w,t.name)}var dt=Ea,ka="2.2.2",La={Graph:dt,version:ka},Oa=dt,Sa={write:Ta,read:$a};function Ta(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Ia(e),edges:Pa(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function Ia(e){return e.nodes().map(function(t){var r=e.node(t),n=e.parent(t),a={v:t};return r!==void 0&&(a.value=r),n!==void 0&&(a.parent=n),a})}function Pa(e){return e.edges().map(function(t){var r=e.edge(t),n={v:t.v,w:t.w};return t.name!==void 0&&(n.name=t.name),r!==void 0&&(n.value=r),n})}function $a(e){var t=new Oa(e.options).setGraph(e.value);return e.nodes.forEach(function(r){t.setNode(r.v,r.value),r.parent&&t.setParent(r.v,r.parent)}),e.edges.forEach(function(r){t.setEdge({v:r.v,w:r.w,name:r.name},r.value)}),t}var Ma=Da;function Da(e){var t={},r=[],n;function a(i){t.hasOwnProperty(i)||(t[i]=!0,n.push(i),e.successors(i).forEach(a),e.predecessors(i).forEach(a))}return e.nodes().forEach(function(i){n=[],a(i),n.length&&r.push(n)}),r}let Ra=class{constructor(){v(this,"_arr",[]);v(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(t){return t.key})}has(t){return this._keyIndices.hasOwnProperty(t)}priority(t){var r=this._keyIndices[t];if(r!==void 0)return this._arr[r].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(t,r){var n=this._keyIndices;if(t=String(t),!n.hasOwnProperty(t)){var a=this._arr,i=a.length;return n[t]=i,a.push({key:t,priority:r}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key}decrease(t,r){var n=this._keyIndices[t];if(r>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+r);this._arr[n].priority=r,this._decrease(n)}_heapify(t){var r=this._arr,n=2*t,a=n+1,i=t;n<r.length&&(i=r[n].priority<r[i].priority?n:i,a<r.length&&(i=r[a].priority<r[i].priority?a:i),i!==t&&(this._swap(t,i),this._heapify(i)))}_decrease(t){for(var r=this._arr,n=r[t].priority,a;t!==0&&(a=t>>1,!(r[a].priority<n));)this._swap(t,a),t=a}_swap(t,r){var n=this._arr,a=this._keyIndices,i=n[t],l=n[r];n[t]=l,n[r]=i,a[l.key]=t,a[i.key]=r}};var vr=Ra,Va=vr,Nr=za,Aa=()=>1;function za(e,t,r,n){return Fa(e,String(t),r||Aa,n||function(a){return e.outEdges(a)})}function Fa(e,t,r,n){var a={},i=new Va,l,o,c=function(d){var u=d.v!==l?d.v:d.w,h=a[u],m=r(d),f=o.distance+m;if(m<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+d+" Weight: "+m);f<h.distance&&(h.distance=f,h.predecessor=l,i.decrease(u,f))};for(e.nodes().forEach(function(d){var u=d===t?0:Number.POSITIVE_INFINITY;a[d]={distance:u},i.add(d,u)});i.size()>0&&(l=i.removeMin(),o=a[l],o.distance!==Number.POSITIVE_INFINITY);)n(l).forEach(c);return a}var Ha=Nr,Ba=Ga;function Ga(e,t,r){return e.nodes().reduce(function(n,a){return n[a]=Ha(e,a,t,r),n},{})}var Er=Za;function Za(e){var t=0,r=[],n={},a=[];function i(l){var o=n[l]={onStack:!0,lowlink:t,index:t++};if(r.push(l),e.successors(l).forEach(function(u){n.hasOwnProperty(u)?n[u].onStack&&(o.lowlink=Math.min(o.lowlink,n[u].index)):(i(u),o.lowlink=Math.min(o.lowlink,n[u].lowlink))}),o.lowlink===o.index){var c=[],d;do d=r.pop(),n[d].onStack=!1,c.push(d);while(l!==d);a.push(c)}}return e.nodes().forEach(function(l){n.hasOwnProperty(l)||i(l)}),a}var qa=Er,Ua=Ya;function Ya(e){return qa(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}var Wa=Qa,Ka=()=>1;function Qa(e,t,r){return Xa(e,t||Ka,r||function(n){return e.outEdges(n)})}function Xa(e,t,r){var n={},a=e.nodes();return a.forEach(function(i){n[i]={},n[i][i]={distance:0},a.forEach(function(l){i!==l&&(n[i][l]={distance:Number.POSITIVE_INFINITY})}),r(i).forEach(function(l){var o=l.v===i?l.w:l.v,c=t(l);n[i][o]={distance:c,predecessor:i}})}),a.forEach(function(i){var l=n[i];a.forEach(function(o){var c=n[o];a.forEach(function(d){var u=c[i],h=l[d],m=c[d],f=u.distance+h.distance;f<m.distance&&(m.distance=f,m.predecessor=h.predecessor)})})}),n}function _r(e){var t={},r={},n=[];function a(i){if(r.hasOwnProperty(i))throw new Qe;t.hasOwnProperty(i)||(r[i]=!0,t[i]=!0,e.predecessors(i).forEach(a),delete r[i],n.push(i))}if(e.sinks().forEach(a),Object.keys(t).length!==e.nodeCount())throw new Qe;return n}class Qe extends Error{constructor(){super(...arguments)}}var kr=_r;_r.CycleException=Qe;var Pt=kr,Ja=ei;function ei(e){try{Pt(e)}catch(t){if(t instanceof Pt.CycleException)return!1;throw t}return!0}var Lr=ti;function ti(e,t,r){Array.isArray(t)||(t=[t]);var n=e.isDirected()?o=>e.successors(o):o=>e.neighbors(o),a=r==="post"?ri:si,i=[],l={};return t.forEach(o=>{if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);a(o,n,l,i)}),i}function ri(e,t,r,n){for(var a=[[e,!1]];a.length>0;){var i=a.pop();i[1]?n.push(i[0]):r.hasOwnProperty(i[0])||(r[i[0]]=!0,a.push([i[0],!0]),Or(t(i[0]),l=>a.push([l,!1])))}}function si(e,t,r,n){for(var a=[e];a.length>0;){var i=a.pop();r.hasOwnProperty(i)||(r[i]=!0,n.push(i),Or(t(i),l=>a.push(l)))}}function Or(e,t){for(var r=e.length;r--;)t(e[r],r,e);return e}var ni=Lr,ai=ii;function ii(e,t){return ni(e,t,"post")}var li=Lr,oi=ci;function ci(e,t){return li(e,t,"pre")}var di=dt,ui=vr,hi=fi;function fi(e,t){var r=new di,n={},a=new ui,i;function l(c){var d=c.v===i?c.w:c.v,u=a.priority(d);if(u!==void 0){var h=t(c);h<u&&(n[d]=i,a.decrease(d,h))}}if(e.nodeCount()===0)return r;e.nodes().forEach(function(c){a.add(c,Number.POSITIVE_INFINITY),r.setNode(c)}),a.decrease(e.nodes()[0],0);for(var o=!1;a.size()>0;){if(i=a.removeMin(),n.hasOwnProperty(i))r.setEdge(i,n[i]);else{if(o)throw new Error("Input graph is not connected: "+e);o=!0}e.nodeEdges(i).forEach(l)}return r}var mi={components:Ma,dijkstra:Nr,dijkstraAll:Ba,findCycles:Ua,floydWarshall:Wa,isAcyclic:Ja,postorder:ai,preorder:oi,prim:hi,tarjan:Er,topsort:kr},$t=La,Q={Graph:$t.Graph,json:Sa,alg:mi,version:$t.version};let pi=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,r=t._prev;if(r!==t)return Mt(r),r}enqueue(t){let r=this._sentinel;t._prev&&t._next&&Mt(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){let t=[],r=this._sentinel,n=r._prev;for(;n!==r;)t.push(JSON.stringify(n,xi)),n=n._prev;return"["+t.join(", ")+"]"}};function Mt(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function xi(e,t){if(e!=="_next"&&e!=="_prev")return t}var gi=pi;let ji=Q.Graph,Ci=gi;var bi=wi;let yi=()=>1;function wi(e,t){if(e.nodeCount()<=1)return[];let r=Ni(e,t||yi);return vi(r.graph,r.buckets,r.zeroIdx).flatMap(a=>e.outEdges(a.v,a.w))}function vi(e,t,r){let n=[],a=t[t.length-1],i=t[0],l;for(;e.nodeCount();){for(;l=i.dequeue();)Ge(e,t,r,l);for(;l=a.dequeue();)Ge(e,t,r,l);if(e.nodeCount()){for(let o=t.length-2;o>0;--o)if(l=t[o].dequeue(),l){n=n.concat(Ge(e,t,r,l,!0));break}}}return n}function Ge(e,t,r,n,a){let i=a?[]:void 0;return e.inEdges(n.v).forEach(l=>{let o=e.edge(l),c=e.node(l.v);a&&i.push({v:l.v,w:l.w}),c.out-=o,Xe(t,r,c)}),e.outEdges(n.v).forEach(l=>{let o=e.edge(l),c=l.w,d=e.node(c);d.in-=o,Xe(t,r,d)}),e.removeNode(n.v),i}function Ni(e,t){let r=new ji,n=0,a=0;e.nodes().forEach(o=>{r.setNode(o,{v:o,in:0,out:0})}),e.edges().forEach(o=>{let c=r.edge(o.v,o.w)||0,d=t(o),u=c+d;r.setEdge(o.v,o.w,u),a=Math.max(a,r.node(o.v).out+=d),n=Math.max(n,r.node(o.w).in+=d)});let i=Ei(a+n+3).map(()=>new Ci),l=n+1;return r.nodes().forEach(o=>{Xe(i,l,r.node(o))}),{graph:r,buckets:i,zeroIdx:l}}function Xe(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Ei(e){const t=[];for(let r=0;r<e;r++)t.push(r);return t}let Sr=Q.Graph;var N={addBorderNode:$i,addDummyNode:Tr,asNonCompoundGraph:ki,buildLayerMatrix:Ti,intersectRect:Si,mapValues:zi,maxRank:Ir,normalizeRanks:Ii,notime:Ri,partition:Mi,pick:Ai,predecessorWeights:Oi,range:$r,removeEmptyRanks:Pi,simplify:_i,successorWeights:Li,time:Di,uniqueId:Pr,zipObject:ut};function Tr(e,t,r,n){let a;do a=Pr(n);while(e.hasNode(a));return r.dummy=t,e.setNode(a,r),a}function _i(e){let t=new Sr().setGraph(e.graph());return e.nodes().forEach(r=>t.setNode(r,e.node(r))),e.edges().forEach(r=>{let n=t.edge(r.v,r.w)||{weight:0,minlen:1},a=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+a.weight,minlen:Math.max(n.minlen,a.minlen)})}),t}function ki(e){let t=new Sr({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(r=>{e.children(r).length||t.setNode(r,e.node(r))}),e.edges().forEach(r=>{t.setEdge(r,e.edge(r))}),t}function Li(e){let t=e.nodes().map(r=>{let n={};return e.outEdges(r).forEach(a=>{n[a.w]=(n[a.w]||0)+e.edge(a).weight}),n});return ut(e.nodes(),t)}function Oi(e){let t=e.nodes().map(r=>{let n={};return e.inEdges(r).forEach(a=>{n[a.v]=(n[a.v]||0)+e.edge(a).weight}),n});return ut(e.nodes(),t)}function Si(e,t){let r=e.x,n=e.y,a=t.x-r,i=t.y-n,l=e.width/2,o=e.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");let c,d;return Math.abs(i)*l>Math.abs(a)*o?(i<0&&(o=-o),c=o*a/i,d=o):(a<0&&(l=-l),c=l,d=l*i/a),{x:r+c,y:n+d}}function Ti(e){let t=$r(Ir(e)+1).map(()=>[]);return e.nodes().forEach(r=>{let n=e.node(r),a=n.rank;a!==void 0&&(t[a][n.order]=r)}),t}function Ii(e){let t=Math.min(...e.nodes().map(r=>{let n=e.node(r).rank;return n===void 0?Number.MAX_VALUE:n}));e.nodes().forEach(r=>{let n=e.node(r);n.hasOwnProperty("rank")&&(n.rank-=t)})}function Pi(e){let t=Math.min(...e.nodes().map(i=>e.node(i).rank)),r=[];e.nodes().forEach(i=>{let l=e.node(i).rank-t;r[l]||(r[l]=[]),r[l].push(i)});let n=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((i,l)=>{i===void 0&&l%a!==0?--n:i!==void 0&&n&&i.forEach(o=>e.node(o).rank+=n)})}function $i(e,t,r,n){let a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=n),Tr(e,"border",a,t)}function Ir(e){return Math.max(...e.nodes().map(t=>{let r=e.node(t).rank;return r===void 0?Number.MIN_VALUE:r}))}function Mi(e,t){let r={lhs:[],rhs:[]};return e.forEach(n=>{t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function Di(e,t){let r=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-r)+"ms")}}function Ri(e,t){return t()}let Vi=0;function Pr(e){var t=++Vi;return toString(e)+t}function $r(e,t,r=1){t==null&&(t=e,e=0);let n=i=>i<t;r<0&&(n=i=>t<i);const a=[];for(let i=e;n(i);i+=r)a.push(i);return a}function Ai(e,t){const r={};for(const n of t)e[n]!==void 0&&(r[n]=e[n]);return r}function zi(e,t){let r=t;return typeof t=="string"&&(r=n=>n[t]),Object.entries(e).reduce((n,[a,i])=>(n[a]=r(i,a),n),{})}function ut(e,t){return e.reduce((r,n,a)=>(r[n]=t[a],r),{})}let Fi=bi,Hi=N.uniqueId;var Bi={run:Gi,undo:qi};function Gi(e){(e.graph().acyclicer==="greedy"?Fi(e,r(e)):Zi(e)).forEach(n=>{let a=e.edge(n);e.removeEdge(n),a.forwardName=n.name,a.reversed=!0,e.setEdge(n.w,n.v,a,Hi("rev"))});function r(n){return a=>n.edge(a).weight}}function Zi(e){let t=[],r={},n={};function a(i){n.hasOwnProperty(i)||(n[i]=!0,r[i]=!0,e.outEdges(i).forEach(l=>{r.hasOwnProperty(l.w)?t.push(l):a(l.w)}),delete r[i])}return e.nodes().forEach(a),t}function qi(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.reversed){e.removeEdge(t);let n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}let Ui=N;var Yi={run:Wi,undo:Qi};function Wi(e){e.graph().dummyChains=[],e.edges().forEach(t=>Ki(e,t))}function Ki(e,t){let r=t.v,n=e.node(r).rank,a=t.w,i=e.node(a).rank,l=t.name,o=e.edge(t),c=o.labelRank;if(i===n+1)return;e.removeEdge(t);let d,u,h;for(h=0,++n;n<i;++h,++n)o.points=[],u={width:0,height:0,edgeLabel:o,edgeObj:t,rank:n},d=Ui.addDummyNode(e,"edge",u,"_d"),n===c&&(u.width=o.width,u.height=o.height,u.dummy="edge-label",u.labelpos=o.labelpos),e.setEdge(r,d,{weight:o.weight},l),h===0&&e.graph().dummyChains.push(d),r=d;e.setEdge(r,a,{weight:o.weight},l)}function Qi(e){e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeLabel,a;for(e.setEdge(r.edgeObj,n);r.dummy;)a=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=a,r=e.node(t)})}var ze={longestPath:Xi,slack:Ji};function Xi(e){var t={};function r(n){var a=e.node(n);if(t.hasOwnProperty(n))return a.rank;t[n]=!0;var i=Math.min(...e.outEdges(n).map(l=>l==null?Number.POSITIVE_INFINITY:r(l.w)-e.edge(l).minlen));return i===Number.POSITIVE_INFINITY&&(i=0),a.rank=i}e.sources().forEach(r)}function Ji(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var e1=Q.Graph,Me=ze.slack,Mr=t1;function t1(e){var t=new e1({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var a,i;r1(t,e)<n;)a=s1(t,e),i=t.hasNode(a.v)?Me(e,a):-Me(e,a),n1(t,e,i);return t}function r1(e,t){function r(n){t.nodeEdges(n).forEach(a=>{var i=a.v,l=n===i?a.w:i;!e.hasNode(l)&&!Me(t,a)&&(e.setNode(l,{}),e.setEdge(n,l,{}),r(l))})}return e.nodes().forEach(r),e.nodeCount()}function s1(e,t){return t.edges().reduce((n,a)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(a.v)!==e.hasNode(a.w)&&(i=Me(t,a)),i<n[0]?[i,a]:n},[Number.POSITIVE_INFINITY,null])[1]}function n1(e,t,r){e.nodes().forEach(n=>t.node(n).rank+=r)}var a1=Mr,Dt=ze.slack,i1=ze.longestPath,l1=Q.alg.preorder,o1=Q.alg.postorder,c1=N.simplify,d1=fe;fe.initLowLimValues=ft;fe.initCutValues=ht;fe.calcCutValue=Dr;fe.leaveEdge=Vr;fe.enterEdge=Ar;fe.exchangeEdges=zr;function fe(e){e=c1(e),i1(e);var t=a1(e);ft(t),ht(t,e);for(var r,n;r=Vr(t);)n=Ar(t,e,r),zr(t,e,r,n)}function ht(e,t){var r=o1(e,e.nodes());r=r.slice(0,r.length-1),r.forEach(n=>u1(e,t,n))}function u1(e,t,r){var n=e.node(r),a=n.parent;e.edge(r,a).cutvalue=Dr(e,t,r)}function Dr(e,t,r){var n=e.node(r),a=n.parent,i=!0,l=t.edge(r,a),o=0;return l||(i=!1,l=t.edge(a,r)),o=l.weight,t.nodeEdges(r).forEach(c=>{var d=c.v===r,u=d?c.w:c.v;if(u!==a){var h=d===i,m=t.edge(c).weight;if(o+=h?m:-m,f1(e,r,u)){var f=e.edge(r,u).cutvalue;o+=h?-f:f}}}),o}function ft(e,t){arguments.length<2&&(t=e.nodes()[0]),Rr(e,{},1,t)}function Rr(e,t,r,n,a){var i=r,l=e.node(n);return t[n]=!0,e.neighbors(n).forEach(o=>{t.hasOwnProperty(o)||(r=Rr(e,t,r,o,n))}),l.low=i,l.lim=r++,a?l.parent=a:delete l.parent,r}function Vr(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function Ar(e,t,r){var n=r.v,a=r.w;t.hasEdge(n,a)||(n=r.w,a=r.v);var i=e.node(n),l=e.node(a),o=i,c=!1;i.lim>l.lim&&(o=l,c=!0);var d=t.edges().filter(u=>c===Rt(e,e.node(u.v),o)&&c!==Rt(e,e.node(u.w),o));return d.reduce((u,h)=>Dt(t,h)<Dt(t,u)?h:u)}function zr(e,t,r,n){var a=r.v,i=r.w;e.removeEdge(a,i),e.setEdge(n.v,n.w,{}),ft(e),ht(e,t),h1(e,t)}function h1(e,t){var r=e.nodes().find(a=>!t.node(a).parent),n=l1(e,r);n=n.slice(1),n.forEach(a=>{var i=e.node(a).parent,l=t.edge(a,i),o=!1;l||(l=t.edge(i,a),o=!0),t.node(a).rank=t.node(i).rank+(o?l.minlen:-l.minlen)})}function f1(e,t,r){return e.hasEdge(t,r)}function Rt(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var m1=ze,Fr=m1.longestPath,p1=Mr,x1=d1,g1=j1;function j1(e){switch(e.graph().ranker){case"network-simplex":Vt(e);break;case"tight-tree":b1(e);break;case"longest-path":C1(e);break;default:Vt(e)}}var C1=Fr;function b1(e){Fr(e),p1(e)}function Vt(e){x1(e)}var y1=w1;function w1(e){let t=N1(e);e.graph().dummyChains.forEach(r=>{let n=e.node(r),a=n.edgeObj,i=v1(e,t,a.v,a.w),l=i.path,o=i.lca,c=0,d=l[c],u=!0;for(;r!==a.w;){if(n=e.node(r),u){for(;(d=l[c])!==o&&e.node(d).maxRank<n.rank;)c++;d===o&&(u=!1)}if(!u){for(;c<l.length-1&&e.node(d=l[c+1]).minRank<=n.rank;)c++;d=l[c]}e.setParent(r,d),r=e.successors(r)[0]}})}function v1(e,t,r,n){let a=[],i=[],l=Math.min(t[r].low,t[n].low),o=Math.max(t[r].lim,t[n].lim),c,d;c=r;do c=e.parent(c),a.push(c);while(c&&(t[c].low>l||o>t[c].lim));for(d=c,c=n;(c=e.parent(c))!==d;)i.push(c);return{path:a.concat(i.reverse()),lca:d}}function N1(e){let t={},r=0;function n(a){let i=r;e.children(a).forEach(n),t[a]={low:i,lim:r++}}return e.children().forEach(n),t}let Je=N;var E1={run:_1,cleanup:O1};function _1(e){let t=Je.addDummyNode(e,"root",{},"_root"),r=k1(e),n=Math.max(...Object.values(r))-1,a=2*n+1;e.graph().nestingRoot=t,e.edges().forEach(l=>e.edge(l).minlen*=a);let i=L1(e)+1;e.children().forEach(l=>Hr(e,t,a,i,n,r,l)),e.graph().nodeRankFactor=a}function Hr(e,t,r,n,a,i,l){let o=e.children(l);if(!o.length){l!==t&&e.setEdge(t,l,{weight:0,minlen:r});return}let c=Je.addBorderNode(e,"_bt"),d=Je.addBorderNode(e,"_bb"),u=e.node(l);e.setParent(c,l),u.borderTop=c,e.setParent(d,l),u.borderBottom=d,o.forEach(h=>{Hr(e,t,r,n,a,i,h);let m=e.node(h),f=m.borderTop?m.borderTop:h,p=m.borderBottom?m.borderBottom:h,C=m.borderTop?n:2*n,w=f!==p?1:a-i[l]+1;e.setEdge(c,f,{weight:C,minlen:w,nestingEdge:!0}),e.setEdge(p,d,{weight:C,minlen:w,nestingEdge:!0})}),e.parent(l)||e.setEdge(t,c,{weight:0,minlen:a+i[l]})}function k1(e){var t={};function r(n,a){var i=e.children(n);i&&i.length&&i.forEach(l=>r(l,a+1)),t[n]=a}return e.children().forEach(n=>r(n,1)),t}function L1(e){return e.edges().reduce((t,r)=>t+e.edge(r).weight,0)}function O1(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(r=>{var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}let S1=N;var T1=I1;function I1(e){function t(r){let n=e.children(r),a=e.node(r);if(n.length&&n.forEach(t),a.hasOwnProperty("minRank")){a.borderLeft=[],a.borderRight=[];for(let i=a.minRank,l=a.maxRank+1;i<l;++i)At(e,"borderLeft","_bl",r,a,i),At(e,"borderRight","_br",r,a,i)}}e.children().forEach(t)}function At(e,t,r,n,a,i){let l={width:0,height:0,rank:i,borderType:t},o=a[t][i-1],c=S1.addDummyNode(e,"border",l,r);a[t][i]=c,e.setParent(c,n),o&&e.setEdge(o,c,{weight:1})}var P1={adjust:$1,undo:M1};function $1(e){let t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Br(e)}function M1(e){let t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&D1(e),(t==="lr"||t==="rl")&&(R1(e),Br(e))}function Br(e){e.nodes().forEach(t=>zt(e.node(t))),e.edges().forEach(t=>zt(e.edge(t)))}function zt(e){let t=e.width;e.width=e.height,e.height=t}function D1(e){e.nodes().forEach(t=>Ze(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);r.points.forEach(Ze),r.hasOwnProperty("y")&&Ze(r)})}function Ze(e){e.y=-e.y}function R1(e){e.nodes().forEach(t=>qe(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);r.points.forEach(qe),r.hasOwnProperty("x")&&qe(r)})}function qe(e){let t=e.x;e.x=e.y,e.y=t}let V1=N;var A1=z1;function z1(e){let t={},r=e.nodes().filter(o=>!e.children(o).length),n=Math.max(...r.map(o=>e.node(o).rank)),a=V1.range(n+1).map(()=>[]);function i(o){if(t[o])return;t[o]=!0;let c=e.node(o);a[c.rank].push(o),e.successors(o).forEach(i)}return r.sort((o,c)=>e.node(o).rank-e.node(c).rank).forEach(i),a}let F1=N.zipObject;var H1=B1;function B1(e,t){let r=0;for(let n=1;n<t.length;++n)r+=G1(e,t[n-1],t[n]);return r}function G1(e,t,r){let n=F1(r,r.map((d,u)=>u)),a=t.flatMap(d=>e.outEdges(d).map(u=>({pos:n[u.w],weight:e.edge(u).weight})).sort((u,h)=>u.pos-h.pos)),i=1;for(;i<r.length;)i<<=1;let l=2*i-1;i-=1;let o=new Array(l).fill(0),c=0;return a.forEach(d=>{let u=d.pos+i;o[u]+=d.weight;let h=0;for(;u>0;)u%2&&(h+=o[u+1]),u=u-1>>1,o[u]+=d.weight;c+=d.weight*h}),c}var Z1=q1;function q1(e,t=[]){return t.map(r=>{let n=e.inEdges(r);if(n.length){let a=n.reduce((i,l)=>{let o=e.edge(l),c=e.node(l.v);return{sum:i.sum+o.weight*c.order,weight:i.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}let U1=N;var Y1=W1;function W1(e,t){let r={};e.forEach((a,i)=>{let l=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i};a.barycenter!==void 0&&(l.barycenter=a.barycenter,l.weight=a.weight)}),t.edges().forEach(a=>{let i=r[a.v],l=r[a.w];i!==void 0&&l!==void 0&&(l.indegree++,i.out.push(r[a.w]))});let n=Object.values(r).filter(a=>!a.indegree);return K1(n)}function K1(e){let t=[];function r(a){return i=>{i.merged||(i.barycenter===void 0||a.barycenter===void 0||i.barycenter>=a.barycenter)&&Q1(a,i)}}function n(a){return i=>{i.in.push(a),--i.indegree===0&&e.push(i)}}for(;e.length;){let a=e.pop();t.push(a),a.in.reverse().forEach(r(a)),a.out.forEach(n(a))}return t.filter(a=>!a.merged).map(a=>U1.pick(a,["vs","i","barycenter","weight"]))}function Q1(e,t){let r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}let X1=N;var J1=el;function el(e,t){let r=X1.partition(e,u=>u.hasOwnProperty("barycenter")),n=r.lhs,a=r.rhs.sort((u,h)=>h.i-u.i),i=[],l=0,o=0,c=0;n.sort(tl(!!t)),c=Ft(i,a,c),n.forEach(u=>{c+=u.vs.length,i.push(u.vs),l+=u.barycenter*u.weight,o+=u.weight,c=Ft(i,a,c)});let d={vs:i.flat(!0)};return o&&(d.barycenter=l/o,d.weight=o),d}function Ft(e,t,r){let n;for(;t.length&&(n=t[t.length-1]).i<=r;)t.pop(),e.push(n.vs),r++;return r}function tl(e){return(t,r)=>t.barycenter<r.barycenter?-1:t.barycenter>r.barycenter?1:e?r.i-t.i:t.i-r.i}let rl=Z1,sl=Y1,nl=J1;var al=Gr;function Gr(e,t,r,n){let a=e.children(t),i=e.node(t),l=i?i.borderLeft:void 0,o=i?i.borderRight:void 0,c={};l&&(a=a.filter(m=>m!==l&&m!==o));let d=rl(e,a);d.forEach(m=>{if(e.children(m.v).length){let f=Gr(e,m.v,r,n);c[m.v]=f,f.hasOwnProperty("barycenter")&&ll(m,f)}});let u=sl(d,r);il(u,c);let h=nl(u,n);if(l&&(h.vs=[l,h.vs,o].flat(!0),e.predecessors(l).length)){let m=e.node(e.predecessors(l)[0]),f=e.node(e.predecessors(o)[0]);h.hasOwnProperty("barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+m.order+f.order)/(h.weight+2),h.weight+=2}return h}function il(e,t){e.forEach(r=>{r.vs=r.vs.flatMap(n=>t[n]?t[n].vs:n)})}function ll(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}let ol=Q.Graph,cl=N;var dl=ul;function ul(e,t,r){let n=hl(e),a=new ol({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(i=>e.node(i));return e.nodes().forEach(i=>{let l=e.node(i),o=e.parent(i);(l.rank===t||l.minRank<=t&&t<=l.maxRank)&&(a.setNode(i),a.setParent(i,o||n),e[r](i).forEach(c=>{let d=c.v===i?c.w:c.v,u=a.edge(d,i),h=u!==void 0?u.weight:0;a.setEdge(d,i,{weight:e.edge(c).weight+h})}),l.hasOwnProperty("minRank")&&a.setNode(i,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]}))}),a}function hl(e){for(var t;e.hasNode(t=cl.uniqueId("_root")););return t}var fl=ml;function ml(e,t,r){let n={},a;r.forEach(i=>{let l=e.parent(i),o,c;for(;l;){if(o=e.parent(l),o?(c=n[o],n[o]=l):(c=a,a=l),c&&c!==l){t.setEdge(c,l);return}l=o}})}let pl=A1,xl=H1,gl=al,jl=dl,Cl=fl,bl=Q.Graph,Te=N;var yl=Zr;function Zr(e,t){if(t&&typeof t.customOrder=="function"){t.customOrder(e,Zr);return}let r=Te.maxRank(e),n=Ht(e,Te.range(1,r+1),"inEdges"),a=Ht(e,Te.range(r-1,-1,-1),"outEdges"),i=pl(e);if(Bt(e,i),t&&t.disableOptimalOrderHeuristic)return;let l=Number.POSITIVE_INFINITY,o;for(let c=0,d=0;d<4;++c,++d){wl(c%2?n:a,c%4>=2),i=Te.buildLayerMatrix(e);let u=xl(e,i);u<l&&(d=0,o=Object.assign({},i),l=u)}Bt(e,o)}function Ht(e,t,r){return t.map(function(n){return jl(e,n,r)})}function wl(e,t){let r=new bl;e.forEach(function(n){let a=n.graph().root,i=gl(n,a,r,t);i.vs.forEach((l,o)=>n.node(l).order=o),Cl(n,r,i.vs)})}function Bt(e,t){Object.values(t).forEach(r=>r.forEach((n,a)=>e.node(n).order=a))}let vl=Q.Graph,ke=N;var Nl={positionX:kl,findType1Conflicts:qr,findType2Conflicts:Ur,addConflict:mt,hasConflict:Yr,verticalAlignment:Wr,horizontalCompaction:Kr,alignCoordinates:Xr,findSmallestWidthAlignment:Qr,balance:Jr};function qr(e,t){let r={};function n(a,i){let l=0,o=0,c=a.length,d=i[i.length-1];return i.forEach((u,h)=>{let m=El(e,u),f=m?e.node(m).order:c;(m||u===d)&&(i.slice(o,h+1).forEach(p=>{e.predecessors(p).forEach(C=>{let w=e.node(C),E=w.order;(E<l||f<E)&&!(w.dummy&&e.node(p).dummy)&&mt(r,C,p)})}),o=h+1,l=f)}),i}return t.length&&t.reduce(n),r}function Ur(e,t){let r={};function n(i,l,o,c,d){let u;ke.range(l,o).forEach(h=>{u=i[h],e.node(u).dummy&&e.predecessors(u).forEach(m=>{let f=e.node(m);f.dummy&&(f.order<c||f.order>d)&&mt(r,m,u)})})}function a(i,l){let o=-1,c,d=0;return l.forEach((u,h)=>{if(e.node(u).dummy==="border"){let m=e.predecessors(u);m.length&&(c=e.node(m[0]).order,n(l,d,h,o,c),d=h,o=c)}n(l,d,l.length,c,i.length)}),l}return t.length&&t.reduce(a),r}function El(e,t){if(e.node(t).dummy)return e.predecessors(t).find(r=>e.node(r).dummy)}function mt(e,t,r){if(t>r){let a=t;t=r,r=a}let n=e[t];n||(e[t]=n={}),n[r]=!0}function Yr(e,t,r){if(t>r){let n=t;t=r,r=n}return!!e[t]&&e[t].hasOwnProperty(r)}function Wr(e,t,r,n){let a={},i={},l={};return t.forEach(o=>{o.forEach((c,d)=>{a[c]=c,i[c]=c,l[c]=d})}),t.forEach(o=>{let c=-1;o.forEach(d=>{let u=n(d);if(u.length){u=u.sort((m,f)=>l[m]-l[f]);let h=(u.length-1)/2;for(let m=Math.floor(h),f=Math.ceil(h);m<=f;++m){let p=u[m];i[d]===d&&c<l[p]&&!Yr(r,d,p)&&(i[p]=d,i[d]=a[d]=a[p],c=l[p])}}})}),{root:a,align:i}}function Kr(e,t,r,n,a){let i={},l=_l(e,t,r,a),o=a?"borderLeft":"borderRight";function c(h,m){let f=l.nodes(),p=f.pop(),C={};for(;p;)C[p]?h(p):(C[p]=!0,f.push(p),f=f.concat(m(p))),p=f.pop()}function d(h){i[h]=l.inEdges(h).reduce((m,f)=>Math.max(m,i[f.v]+l.edge(f)),0)}function u(h){let m=l.outEdges(h).reduce((p,C)=>Math.min(p,i[C.w]-l.edge(C)),Number.POSITIVE_INFINITY),f=e.node(h);m!==Number.POSITIVE_INFINITY&&f.borderType!==o&&(i[h]=Math.max(i[h],m))}return c(d,l.predecessors.bind(l)),c(u,l.successors.bind(l)),Object.keys(n).forEach(h=>i[h]=i[r[h]]),i}function _l(e,t,r,n){let a=new vl,i=e.graph(),l=Ll(i.nodesep,i.edgesep,n);return t.forEach(o=>{let c;o.forEach(d=>{let u=r[d];if(a.setNode(u),c){var h=r[c],m=a.edge(h,u);a.setEdge(h,u,Math.max(l(e,d,c),m||0))}c=d})}),a}function Qr(e,t){return Object.values(t).reduce((r,n)=>{let a=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(n).forEach(([o,c])=>{let d=Ol(e,o)/2;a=Math.max(c+d,a),i=Math.min(c-d,i)});const l=a-i;return l<r[0]&&(r=[l,n]),r},[Number.POSITIVE_INFINITY,null])[1]}function Xr(e,t){let r=Object.values(t),n=Math.min(...r),a=Math.max(...r);["u","d"].forEach(i=>{["l","r"].forEach(l=>{let o=i+l,c=e[o];if(c===t)return;let d=Object.values(c),u=n-Math.min(...d);l!=="l"&&(u=a-Math.max(...d)),u&&(e[o]=ke.mapValues(c,h=>h+u))})})}function Jr(e,t){return ke.mapValues(e.ul,(r,n)=>{if(t)return e[t.toLowerCase()][n];{let a=Object.values(e).map(i=>i[n]).sort((i,l)=>i-l);return(a[1]+a[2])/2}})}function kl(e){let t=ke.buildLayerMatrix(e),r=Object.assign(qr(e,t),Ur(e,t)),n={},a;["u","d"].forEach(l=>{a=l==="u"?t:Object.values(t).reverse(),["l","r"].forEach(o=>{o==="r"&&(a=a.map(h=>Object.values(h).reverse()));let c=(l==="u"?e.predecessors:e.successors).bind(e),d=Wr(e,a,r,c),u=Kr(e,a,d.root,d.align,o==="r");o==="r"&&(u=ke.mapValues(u,h=>-h)),n[l+o]=u})});let i=Qr(e,n);return Xr(n,i),Jr(n,e.graph().align)}function Ll(e,t,r){return(n,a,i)=>{let l=n.node(a),o=n.node(i),c=0,d;if(c+=l.width/2,l.hasOwnProperty("labelpos"))switch(l.labelpos.toLowerCase()){case"l":d=-l.width/2;break;case"r":d=l.width/2;break}if(d&&(c+=r?d:-d),d=0,c+=(l.dummy?t:e)/2,c+=(o.dummy?t:e)/2,c+=o.width/2,o.hasOwnProperty("labelpos"))switch(o.labelpos.toLowerCase()){case"l":d=o.width/2;break;case"r":d=-o.width/2;break}return d&&(c+=r?d:-d),d=0,c}}function Ol(e,t){return e.node(t).width}let es=N,Sl=Nl.positionX;var Tl=Il;function Il(e){e=es.asNonCompoundGraph(e),Pl(e),Object.entries(Sl(e)).forEach(([t,r])=>e.node(t).x=r)}function Pl(e){let t=es.buildLayerMatrix(e),r=e.graph().ranksep,n=0;t.forEach(a=>{const i=a.reduce((l,o)=>{const c=e.node(o).height;return l>c?l:c},0);a.forEach(l=>e.node(l).y=n+i/2),n+=i+r})}let Gt=Bi,Zt=Yi,$l=g1,Ml=N.normalizeRanks,Dl=y1,Rl=N.removeEmptyRanks,qt=E1,Vl=T1,Ut=P1,Al=yl,zl=Tl,B=N,Fl=Q.Graph;var Hl=Bl;function Bl(e,t){let r=t&&t.debugTiming?B.time:B.notime;r("layout",()=>{let n=r(" buildLayoutGraph",()=>Jl(e));r(" runLayout",()=>Gl(n,r)),r(" updateInputGraph",()=>Zl(e,n))})}function Gl(e,t){t(" makeSpaceForEdgeLabels",()=>eo(e)),t(" removeSelfEdges",()=>co(e)),t(" acyclic",()=>Gt.run(e)),t(" nestingGraph.run",()=>qt.run(e)),t(" rank",()=>$l(B.asNonCompoundGraph(e))),t(" injectEdgeLabelProxies",()=>to(e)),t(" removeEmptyRanks",()=>Rl(e)),t(" nestingGraph.cleanup",()=>qt.cleanup(e)),t(" normalizeRanks",()=>Ml(e)),t(" assignRankMinMax",()=>ro(e)),t(" removeEdgeLabelProxies",()=>so(e)),t(" normalize.run",()=>Zt.run(e)),t(" parentDummyChains",()=>Dl(e)),t(" addBorderSegments",()=>Vl(e)),t(" order",()=>Al(e)),t(" insertSelfEdges",()=>uo(e)),t(" adjustCoordinateSystem",()=>Ut.adjust(e)),t(" position",()=>zl(e)),t(" positionSelfEdges",()=>ho(e)),t(" removeBorderNodes",()=>oo(e)),t(" normalize.undo",()=>Zt.undo(e)),t(" fixupEdgeLabelCoords",()=>io(e)),t(" undoCoordinateSystem",()=>Ut.undo(e)),t(" translateGraph",()=>no(e)),t(" assignNodeIntersects",()=>ao(e)),t(" reversePoints",()=>lo(e)),t(" acyclic.undo",()=>Gt.undo(e))}function Zl(e,t){e.nodes().forEach(r=>{let n=e.node(r),a=t.node(r);n&&(n.x=a.x,n.y=a.y,n.rank=a.rank,t.children(r).length&&(n.width=a.width,n.height=a.height))}),e.edges().forEach(r=>{let n=e.edge(r),a=t.edge(r);n.points=a.points,a.hasOwnProperty("x")&&(n.x=a.x,n.y=a.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}let ql=["nodesep","edgesep","ranksep","marginx","marginy"],Ul={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Yl=["acyclicer","ranker","rankdir","align"],Wl=["width","height"],Yt={width:0,height:0},Kl=["minlen","weight","width","height","labeloffset"],Ql={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Xl=["labelpos"];function Jl(e){let t=new Fl({multigraph:!0,compound:!0}),r=Ye(e.graph());return t.setGraph(Object.assign({},Ul,Ue(r,ql),B.pick(r,Yl))),e.nodes().forEach(n=>{let a=Ye(e.node(n));const i=Ue(a,Wl);Object.keys(Yt).forEach(l=>{i[l]===void 0&&(i[l]=Yt[l])}),t.setNode(n,i),t.setParent(n,e.parent(n))}),e.edges().forEach(n=>{let a=Ye(e.edge(n));t.setEdge(n,Object.assign({},Ql,Ue(a,Kl),B.pick(a,Xl)))}),t}function eo(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(r=>{let n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function to(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.width&&r.height){let n=e.node(t.v),i={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};B.addDummyNode(e,"edge-proxy",i,"_ep")}})}function ro(e){let t=0;e.nodes().forEach(r=>{let n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=Math.max(t,n.maxRank))}),e.graph().maxRank=t}function so(e){e.nodes().forEach(t=>{let r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function no(e){let t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,a=0,i=e.graph(),l=i.marginx||0,o=i.marginy||0;function c(d){let u=d.x,h=d.y,m=d.width,f=d.height;t=Math.min(t,u-m/2),r=Math.max(r,u+m/2),n=Math.min(n,h-f/2),a=Math.max(a,h+f/2)}e.nodes().forEach(d=>c(e.node(d))),e.edges().forEach(d=>{let u=e.edge(d);u.hasOwnProperty("x")&&c(u)}),t-=l,n-=o,e.nodes().forEach(d=>{let u=e.node(d);u.x-=t,u.y-=n}),e.edges().forEach(d=>{let u=e.edge(d);u.points.forEach(h=>{h.x-=t,h.y-=n}),u.hasOwnProperty("x")&&(u.x-=t),u.hasOwnProperty("y")&&(u.y-=n)}),i.width=r-t+l,i.height=a-n+o}function ao(e){e.edges().forEach(t=>{let r=e.edge(t),n=e.node(t.v),a=e.node(t.w),i,l;r.points?(i=r.points[0],l=r.points[r.points.length-1]):(r.points=[],i=a,l=n),r.points.unshift(B.intersectRect(n,i)),r.points.push(B.intersectRect(a,l))})}function io(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.hasOwnProperty("x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function lo(e){e.edges().forEach(t=>{let r=e.edge(t);r.reversed&&r.points.reverse()})}function oo(e){e.nodes().forEach(t=>{if(e.children(t).length){let r=e.node(t),n=e.node(r.borderTop),a=e.node(r.borderBottom),i=e.node(r.borderLeft[r.borderLeft.length-1]),l=e.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(l.x-i.x),r.height=Math.abs(a.y-n.y),r.x=i.x+r.width/2,r.y=n.y+r.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function co(e){e.edges().forEach(t=>{if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function uo(e){var t=B.buildLayerMatrix(e);t.forEach(r=>{var n=0;r.forEach((a,i)=>{var l=e.node(a);l.order=i+n,(l.selfEdges||[]).forEach(o=>{B.addDummyNode(e,"selfedge",{width:o.label.width,height:o.label.height,rank:l.rank,order:i+ ++n,e:o.e,label:o.label},"_se")}),delete l.selfEdges})})}function ho(e){e.nodes().forEach(t=>{var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),a=n.x+n.width/2,i=n.y,l=r.x-a,o=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:a+2*l/3,y:i-o},{x:a+5*l/6,y:i-o},{x:a+l,y:i},{x:a+5*l/6,y:i+o},{x:a+2*l/3,y:i+o}],r.label.x=r.x,r.label.y=r.y}})}function Ue(e,t){return B.mapValues(B.pick(e,t),Number)}function Ye(e){var t={};return e&&Object.entries(e).forEach(([r,n])=>{typeof r=="string"&&(r=r.toLowerCase()),t[r]=n}),t}let fo=N,mo=Q.Graph;var po={debugOrdering:xo};function xo(e){let t=fo.buildLayerMatrix(e),r=new mo({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(n=>{r.setNode(n,{label:n}),r.setParent(n,"layer"+e.node(n).rank)}),e.edges().forEach(n=>r.setEdge(n.v,n.w,{},n.name)),t.forEach((n,a)=>{let i="layer"+a;r.setNode(i,{rank:"same"}),n.reduce((l,o)=>(r.setEdge(l,o,{style:"invis"}),o))}),r}var go="1.1.2",jo={graphlib:Q,layout:Hl,debug:po,util:{time:N.time,notime:N.notime},version:go};const Wt=ss(jo),Co=300,bo=50,yo=50;function wo(e,t){const r=new Wt.graphlib.Graph().setDefaultEdgeLabel(()=>({}));return r.setGraph({rankdir:"TB",ranksep:25,nodesep:10}),!e||!t?{nodes:[],edges:[]}:e.length<1?{nodes:[],edges:[]}:(t.forEach(n=>{r.setEdge(n.source,n.target)}),e.forEach(n=>{r.setNode(n.id,{width:Co,height:n.type==="step"?yo:bo})}),Wt.layout(r),{nodes:e.map(n=>{const{x:a,y:i}=r.node(n.id);return{...n,position:{x:a,y:i}}}),edges:t.map(n=>({...n,type:e.length>30?"smoothstep":"smart"}))})}async function vo({deploymentId:e},t){const r=se(ne.pipeline_deployments.detail(e)),n=await fetch(r,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",...t&&{Authorization:`Bearer ${t}`}}});if(!n.ok){const a=await n.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>`Error while fetching pipeline deployment ${e}`);throw new ee({status:n.status,statusText:n.statusText,message:a})}return n.json()}const pt={all:["pipeline_deployments"],detail:e=>Ls({queryKey:[...pt.all,e],queryFn:async()=>vo({deploymentId:e})})};function No(){var C,w,E,G,Z,q,U,Y;const{runId:e}=$(),t=M({runId:e},{refetchInterval:b=>{var y,_;return((_=(y=b.state.data)==null?void 0:y.body)==null?void 0:_.status)==="running"?3e3:!1}}),r=te({...pt.detail((w=(C=t.data)==null?void 0:C.body)==null?void 0:w.deployment_id),enabled:!!((G=(E=t.data)==null?void 0:E.body)!=null&&G.deployment_id)}),{fitView:n}=ur(),{width:a,height:i}=ot(b=>({width:b.width,height:b.height})),[l,o,c]=Ms([]),[d,u,h]=Ds([]),m=x.useMemo(()=>{var b,y;return wa(((y=(b=r.data)==null?void 0:b.metadata)==null?void 0:y.step_configurations)??{})},[(q=(Z=r.data)==null?void 0:Z.metadata)==null?void 0:q.step_configurations]),f=x.useMemo(()=>{var b,y;return va(((y=(b=t.data)==null?void 0:b.metadata)==null?void 0:y.steps)??{})},[(Y=(U=t.data)==null?void 0:U.metadata)==null?void 0:Y.steps]),p=x.useCallback(()=>{var D,ie;const b=m.nodes.map(L=>{var J,le;const X=f.find(ce=>ce.id===L.id);return X?{...L,...X}:{...L,data:{...L.data,status:((le=(J=t.data)==null?void 0:J.body)==null?void 0:le.status)??"running"}}});xa(b,f,(ie=(D=t.data)==null?void 0:D.metadata)==null?void 0:ie.steps,m.edges);const y=m.edges.map(L=>{const X=f.find(J=>J.id===L.target);return{...L,style:{stroke:X?"#9CA3AF":"#D1D5DB",strokeWidth:2}}}),_=wo(b,y);o([..._.nodes]),u([..._.edges]),window.requestAnimationFrame(()=>{n()})},[n,o,u,m,f,t.data]);return x.useEffect(()=>{n()},[a,i]),x.useEffect(()=>{const b=setTimeout(()=>{n({duration:200})},100);return()=>{clearTimeout(b)}},[r.data,t.data]),x.useLayoutEffect(()=>{p()},[p]),{pipelineRun:t,pipelineDeployment:r,nodes:l,edges:d,onNodesChange:c,onEdgesChange:h}}const Eo={step:pa,artifact:In,previewStep:Rn,previewArtifact:Dn},_o={smart:zn};function ko(){const{pipelineDeployment:e,pipelineRun:t,nodes:r,edges:n,onEdgesChange:a,onNodesChange:i}=No();return t.isError||e.isError?s.jsx(W,{icon:s.jsx(ue,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsx("p",{className:"text-center",children:"There was an error loading the DAG visualization."})}):t.isPending||e.isPending?s.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[s.jsx(tt,{}),s.jsx("div",{className:"mt-4 flex flex-col items-center",children:s.jsx("p",{className:"mb-5 text-display-xs",children:"Loading DAG Visualization"})})]}):s.jsx(Rs,{minZoom:-2,connectOnClick:!1,nodesDraggable:!1,nodesConnectable:!1,edgeTypes:_o,nodeTypes:Eo,nodes:r,edges:n,edgesFocusable:!1,multiSelectionKeyCode:null,onNodesChange:i,onEdgesChange:a,fitView:!0,children:s.jsx(Mn,{refetch:()=>{t.refetch(),e.refetch()}})})}function Lo({open:e,setOpen:t}){const{toast:r}=xs(),n=lt(),a=lr(),{runId:i}=$(),{mutate:l}=qs({onSuccess:async()=>{a.invalidateQueries({queryKey:["runs"]}),r({status:"success",emphasis:"subtle",icon:s.jsx(Zs,{className:"h-5 w-5 shrink-0 fill-success-700"}),description:"Run deleted successfully",rounded:!0}),t(!1),n(Ee.pipelines.overview)},onError:c=>{r({status:"error",emphasis:"subtle",icon:s.jsx(ue,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:c.message,rounded:!0})}});async function o(){l({runId:i})}return s.jsx(gs,{open:e,onOpenChange:t,children:s.jsx(Us,{title:"Delete Run",handleDelete:()=>o(),children:s.jsxs(Ys,{children:[s.jsx("p",{children:"Are you sure?"}),s.jsx("p",{children:"This action cannot be undone."}),s.jsx("p",{children:"Deleting a run here does not guarantee that this run will get deleted in the underlying orchestrator."})]})})})}function Oo(){const[e,t]=x.useState(!1),[r,n]=x.useState(!1);return s.jsxs(s.Fragment,{children:[s.jsx(Lo,{setOpen:t,open:e}),s.jsx(wt,{modal:r,open:r,onOpenChange:n,children:s.jsxs(wt,{children:[s.jsxs(js,{className:"z-10",children:[s.jsx(Bs,{className:"h-5 w-5 shrink-0 fill-theme-text-secondary"}),s.jsx("p",{className:"sr-only",children:"Run Actions"})]}),s.jsx(Cs,{className:"z-10",align:"end",sideOffset:1,children:s.jsxs(bs,{onClick:()=>t(!0),className:"space-x-2",children:[s.jsx(Gs,{className:"h-3 w-3 fill-neutral-400"}),s.jsx("p",{children:"Delete"})]})})]})})]})}function So(){var a,i;const{runId:e}=$(),{setCurrentBreadcrumbData:t}=ys(),{data:r,isSuccess:n}=M({runId:e},{throwOnError:!0});return x.useEffect(()=>{var l;r&&((l=r.body)!=null&&l.pipeline?t({segment:"runs",data:r}):t({segment:"runsNoPipelines",data:r}))},[r]),s.jsxs(ws,{className:"flex items-center justify-between",children:[s.jsx("div",{className:"flex items-center gap-1 truncate",children:n?s.jsxs(s.Fragment,{children:[s.jsx(vs,{className:`h-5 w-5 shrink-0 ${Os((a=r==null?void 0:r.body)==null?void 0:a.status)}`}),s.jsx("h1",{className:"min-w-0 truncate text-display-xs font-semibold",children:r==null?void 0:r.name}),s.jsx(oe,{className:"h-5 w-5 shrink-0",status:(i=r==null?void 0:r.body)==null?void 0:i.status})]}):s.jsxs(s.Fragment,{children:[s.jsx(g,{className:"h-5 w-5"}),s.jsx(g,{className:"h-6 w-[250px]"}),s.jsx(g,{className:"h-5 w-5"})]})}),s.jsx(Oo,{})]})}const To=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 2C21.5523 2 22 2.44772 22 3V21C22 21.5523 21.5523 22 21 22C20.4477 22 20 21.5523 20 21V3C20 2.44772 20.4477 2 21 2ZM9.29289 4.29289C9.68342 3.90237 10.3166 3.90237 10.7071 4.29289L17.7071 11.2929C17.8946 11.4804 18 11.7348 18 12C18 12.2652 17.8946 12.5196 17.7071 12.7071L10.7071 19.7071C10.3166 20.0976 9.68342 20.0976 9.29289 19.7071C8.90237 19.3166 8.90237 18.6834 9.29289 18.2929L14.5858 13H3C2.44772 13 2 12.5523 2 12C2 11.4477 2.44772 11 3 11H14.5858L9.29289 5.70711C8.90237 5.31658 8.90237 4.68342 9.29289 4.29289Z"}));function Io({runId:e}){const[t,r]=x.useState(!0),n=`from zenml.client import Client
|
8
|
+
run = Client().get_pipeline_run('${e}')
|
9
|
+
config = run.config`;return s.jsxs(ge,{open:t,onOpenChange:r,children:[s.jsx(je,{className:"flex items-center gap-[10px]",children:s.jsxs(Ce,{className:"flex w-full items-center gap-[10px]",children:[s.jsx(ye,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Code"]})}),s.jsxs(be,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[s.jsx("p",{className:"mb-2 text-theme-text-secondary",children:"Get config programmatically"}),s.jsx(I,{fullWidth:!0,highlightCode:!0,wrap:!0,code:n})]})]})}function Po({run:e}){var n,a;const[t,r]=x.useState(!0);return s.jsxs(ge,{open:t,onOpenChange:r,children:[s.jsx(je,{intent:"primary",className:"flex items-center gap-[10px]",children:s.jsxs(Ce,{className:"flex w-full items-center gap-[10px]",children:[s.jsx(ye,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Environment"]})}),s.jsxs(be,{className:"space-y-3 border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[s.jsx(re,{isInitialOpen:!0,intent:"secondary",title:"Client Environment",data:(n=e.metadata)==null?void 0:n.client_environment}),s.jsx(re,{isInitialOpen:!0,intent:"secondary",title:"Orchestrator Environment",data:(a=e.metadata)==null?void 0:a.orchestrator_environment})]})]})}function $o({deploymentId:e}){var l,o;const[t,r]=x.useState(!0),{isLoading:n,isError:a,data:i}=te({...pt.detail(e),enabled:!!e});return e?n?s.jsx(g,{className:"h-[150px] w-full"}):a?null:s.jsx(re,{isInitialOpen:!0,title:"Pipeline Parameters",data:(o=(l=i==null?void 0:i.metadata)==null?void 0:l.pipeline_spec)==null?void 0:o.parameters}):s.jsxs(ge,{open:t,onOpenChange:r,children:[s.jsxs(je,{intent:"primary",className:"flex items-center gap-[10px]",children:[s.jsx(Ce,{children:s.jsx(ye,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`})}),"Pipeline Parameters"]}),s.jsx(be,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:"Not available"})]})}function Mo(){var i,l,o,c,d,u,h,m,f,p,C,w;const{runId:e}=$(),{data:t,isError:r,isPending:n}=M({runId:e},{throwOnError:!0}),{data:a}=Cr({buildId:(l=(i=t==null?void 0:t.body)==null?void 0:i.build)==null?void 0:l.id},{enabled:!!((c=(o=t==null?void 0:t.body)==null?void 0:o.build)!=null&&c.id)});return r?null:n?s.jsxs("div",{className:"space-y-5",children:[s.jsx(g,{className:"h-[56px] w-full"}),s.jsx(g,{className:"h-[56px] w-full"}),s.jsx(g,{className:"h-[56px] w-full"}),s.jsx(g,{className:"h-[56px] w-full"})]}):s.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[s.jsx($o,{deploymentId:((d=t.body)==null?void 0:d.deployment_id)??void 0}),((h=(u=a==null?void 0:a.metadata)==null?void 0:u.images)==null?void 0:h.orchestrator)&&s.jsx(jr,{data:(f=(m=a==null?void 0:a.metadata)==null?void 0:m.images)==null?void 0:f.orchestrator}),s.jsx(Io,{runId:e}),s.jsx(Po,{run:t}),s.jsx(re,{isInitialOpen:!0,title:"Extra",data:(p=t.metadata)==null?void 0:p.config.extra}),s.jsx(re,{isInitialOpen:!0,title:"Resources",data:((w=(C=t.metadata)==null?void 0:C.config.settings)==null?void 0:w.resources)||{}})]})}function Do(){var n,a,i;const{runId:e}=$(),{data:t,isError:r}=M({runId:e},{throwOnError:!0});return r?s.jsx("p",{children:"Failed to fetch pipeline run"}):t&&Object.entries(((n=t.metadata)==null?void 0:n.run_metadata)||{}).length<1?s.jsx(W,{icon:s.jsx(De,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available."})]})}):s.jsxs("section",{className:"flex flex-col gap-5",children:[t?s.jsx(Ve,{metadata:(a=t.metadata)==null?void 0:a.run_metadata}):s.jsx(g,{className:"h-[200px] w-full"}),t?s.jsx(ct,{metadata:(i=t.metadata)==null?void 0:i.run_metadata}):s.jsx(g,{className:"h-[200px] w-full"})]})}function Ro(){return s.jsx(Oe,{className:"truncate",intent:"error",children:s.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[s.jsx("p",{className:"truncate",children:"Pipeline run failed. Check orchestrator logs for error details and troubleshooting steps."}),s.jsx(k,{intent:"danger",asChild:!0,children:s.jsx("a",{href:"#orchestrator-collapsible",children:"Review"})})]})})}function Vo(){return s.jsx(Oe,{className:"truncate",children:s.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[s.jsx("p",{children:"Pipeline run initializing. Check orchestrator URL and logs for real-time status updates."}),s.jsx(k,{asChild:!0,children:s.jsx("a",{href:"#orchestrator-collapsible",children:"Review"})})]})})}function Ao(){var o,c,d;const{runId:e}=$(),{data:t,isError:r,isPending:n}=M({runId:e}),a=(o=t==null?void 0:t.metadata)==null?void 0:o.run_metadata,i=a==null?void 0:a.orchestrator_url,l=a==null?void 0:a.orchestrator_logs_url;return r?null:n?s.jsx(g,{className:"h-[100px]"}):((c=t.body)==null?void 0:c.status)==="initializing"&&(l||i)?s.jsx(Vo,{}):((d=t.body)==null?void 0:d.status)==="failed"&&l?s.jsx(Ro,{}):null}function zo(){var c,d,u,h,m,f,p,C,w,E,G,Z,q,U,Y,b,y,_,D,ie,L,X,J,le,ce;const{runId:e}=$(),[t,r]=x.useState(!0),[n]=cr(),a=lt(),{data:i,isError:l,isPending:o}=M({runId:e},{throwOnError:!0});return x.useEffect(()=>{if(!n.get("tab")){const me=new URL(window.location.href);me.searchParams.set("tab","overview");const Se=`${me.pathname}${me.search}`;a(Se,{replace:!0})}},[n,a]),l?null:o?s.jsx(g,{className:"h-[200px] w-full"}):s.jsxs(ge,{open:t,onOpenChange:r,children:[s.jsx(je,{className:"flex items-center gap-[10px]",children:s.jsxs(Ce,{className:"flex w-full items-center gap-[10px]",children:[s.jsx(ye,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),s.jsx("span",{children:"Details"})]})}),s.jsx(be,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(R,{children:"Id"}),s.jsx(V,{children:s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[i.id,s.jsx(K,{copyText:i.id})]})}),s.jsx(R,{children:"Status"}),s.jsx(V,{children:s.jsxs(T,{className:"inline-flex items-center gap-0.5",emphasis:"subtle",color:Re((c=i.body)==null?void 0:c.status),children:[s.jsx(oe,{className:"fill-current",status:(d=i.body)==null?void 0:d.status}),(u=i.body)==null?void 0:u.status]})}),s.jsx(R,{children:"Pipeline"}),s.jsx(V,{children:(h=i.body)!=null&&h.pipeline?s.jsx(Ie,{to:Ee.pipelines.namespace(encodeURIComponent((f=(m=i.body)==null?void 0:m.pipeline)==null?void 0:f.name)),children:s.jsxs(T,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx(et,{className:"h-4 w-4 fill-theme-text-brand"}),(C=(p=i.body)==null?void 0:p.pipeline)==null?void 0:C.name]})}):"Not available"}),s.jsx(R,{children:s.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[s.jsx("span",{className:"truncate",children:"Repository/Commit"}),s.jsx(A,{children:s.jsxs(z,{children:[s.jsxs(F,{className:"cursor-default",children:[s.jsx(he,{className:"h-3 w-3 fill-theme-text-secondary"}),s.jsx("span",{className:"sr-only",children:"Info"})]}),s.jsx(H,{className:"w-full max-w-md whitespace-normal",children:"Git hash of code repository. Only set if pipeline was run in a clean git repository connected to your ZenML server."})]})})]})}),s.jsx(V,{children:(w=i.body)!=null&&w.code_reference?s.jsx(yr,{repositoryId:(G=(E=i.body)==null?void 0:E.code_reference.body)==null?void 0:G.code_repository.id,commit:(Z=i.body.code_reference.body)==null?void 0:Z.commit}):"Not available"}),s.jsx(R,{className:(q=i.metadata)!=null&&q.code_path?"col-span-3":"",children:s.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[s.jsx("span",{children:"Code Path"}),s.jsx(A,{children:s.jsxs(z,{children:[s.jsxs(F,{className:"cursor-default",children:[s.jsx(he,{className:"h-3 w-3 fill-theme-text-secondary"}),s.jsx("span",{className:"sr-only",children:"Info"})]}),s.jsx(H,{className:"w-full max-w-md whitespace-normal",children:"Path to where code was uploaded in the artifact store. Only set on a pipeline with a non-local orchestrator and if Repository/Commit is not set"})]})})]})}),s.jsx(V,{className:(U=i.metadata)!=null&&U.code_path?"col-span-3 h-auto":"",children:(Y=i.metadata)!=null&&Y.code_path?s.jsx(I,{code:i.metadata.code_path}):"Not available"}),s.jsx(R,{children:"Author"}),s.jsx(V,{children:s.jsx("div",{className:"inline-flex items-center gap-1",children:s.jsx(it,{username:((y=(b=i.body)==null?void 0:b.user)==null?void 0:y.name)||""})})}),s.jsx(R,{children:"Start Time"}),s.jsx(V,{children:(_=i.metadata)!=null&&_.start_time?s.jsx(_e,{dateString:(D=i.metadata)==null?void 0:D.start_time}):"Not available"}),s.jsx(R,{children:"End Time"}),s.jsx(V,{children:(ie=i.metadata)!=null&&ie.end_time?s.jsx(_e,{dateString:(L=i.metadata)==null?void 0:L.end_time}):"Not available"}),s.jsx(R,{children:"Duration"}),s.jsx(V,{children:(X=i.metadata)!=null&&X.start_time&&((J=i.metadata)!=null&&J.end_time)?br((le=i.metadata)==null?void 0:le.start_time,(ce=i.metadata)==null?void 0:ce.end_time):"Not available"})]})})]})}function Fo(){var u,h;const{runId:e}=$(),[t,r]=x.useState(!0),{data:n,isError:a,isPending:i}=M({runId:e}),l=(u=n==null?void 0:n.metadata)==null?void 0:u.run_metadata,o=l==null?void 0:l.orchestrator_url,c=(h=n==null?void 0:n.metadata)==null?void 0:h.orchestrator_run_id,d=l==null?void 0:l.orchestrator_logs_url;return a?null:i?s.jsx(g,{className:"h-[200px]"}):s.jsxs(ge,{open:t,onOpenChange:r,children:[s.jsx(je,{className:"flex items-center gap-[10px]",children:s.jsxs(Ce,{className:"flex w-full",children:[s.jsx(ye,{className:` ${t?"":"-rotate-90"} mr-2 h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),s.jsx("p",{id:"orchestrator-collapsible",children:"Orchestrator"})]})}),s.jsx(be,{className:"space-y-3 border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(j,{label:"Orchestrator URL",value:o&&typeof o.body.value=="string"?s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[s.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:o.body.value,children:o.body.value}),s.jsx(K,{copyText:o.body.value})]}):"Not available"}),s.jsx(j,{label:"Orchestrator Logs",value:d&&typeof d.body.value=="string"?s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[s.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:d.body.value,children:d.body.value}),s.jsx(K,{copyText:d.body.value})]}):"Not available"}),s.jsx(j,{label:"Orchestrator Run ID",value:c?s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[c,s.jsx(K,{copyText:c})]}):"Not available"})]})})]})}function Ho(){return s.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[s.jsx(Ao,{}),s.jsx(zo,{}),s.jsx(Fo,{})]})}const Bo=vt.object({tab:vt.enum(["overview","configuration","metadata","stack"]).optional().default("overview").catch("overview")});function Go(){const[e]=cr(),{tab:t}=Bo.parse({tab:e.get("tab")||void 0});return t}function Zo(){var n,a,i;const{runId:e}=$(),t=M({runId:e},{throwOnError:!0});if(t.isPending)return s.jsx(g,{className:"h-[250px] w-full"});if(t.isError)return s.jsx("p",{children:"Something went wrong fetching the run"});const r=(i=(a=(n=t.data)==null?void 0:n.body)==null?void 0:a.stack)==null?void 0:i.id;return r?s.jsx(qo,{run:t.data,stackId:r}):s.jsx(W,{icon:s.jsx(ue,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-display-xs font-semibold",children:"No Stack"}),s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There is no stack associated with this run."})]})})}function qo({stackId:e,run:t}){const{data:r,isError:n,isPending:a}=ar({stackId:e});return a?s.jsx(g,{className:"h-[250px] w-full"}):n?s.jsx("p",{children:"Failed to fetch Stack"}):s.jsx(wr,{stack:r,run:t})}function Uo({setIsPanelOpen:e}){return s.jsxs("div",{className:"flex items-center gap-4 border-b border-theme-border-moderate bg-theme-surface-primary px-5 py-4",children:[s.jsx(k,{className:"flex h-6 w-6 items-center justify-center bg-transparent p-0.5",intent:"secondary",onClick:()=>e(!1),children:s.jsx(To,{className:"h-5 w-5 fill-theme-text-secondary"})}),s.jsx("span",{className:"text-text-xl",children:"Run Insights"})]})}function Yo(){const e=Go(),t=lt();function r(n){const a=new URLSearchParams;a.set("tab",n),t(`?${a.toString()}`)}return s.jsx("div",{className:"flex flex-col gap-5 p-5",children:s.jsxs(rt,{value:e,onValueChange:r,children:[s.jsxs(st,{children:[s.jsxs(O,{className:"flex items-center gap-2 truncate text-text-md",value:"overview",children:[s.jsx(he,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Overview"})]}),s.jsxs(O,{className:"flex items-center gap-2 truncate text-text-md",value:"stack",children:[s.jsx(at,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Stack"})]}),s.jsxs(O,{className:"flex items-center gap-2 truncate text-text-md",value:"configuration",children:[s.jsx(gr,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Configuration"})]}),s.jsxs(O,{className:"flex items-center gap-2 text-text-md",value:"metadata",children:[s.jsx(nt,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Metadata"})]})]}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"overview",children:s.jsx(Ho,{})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"stack",children:s.jsx(Zo,{})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"configuration",children:s.jsx(Mo,{})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:s.jsx(Do,{})})]})})}function $c(){var a;const e=Ns(),t=Es(((a=e.data)==null?void 0:a.deployment_type)||"other"),[r,n]=x.useState(!0);return s.jsxs("div",{children:[s.jsx(So,{}),s.jsxs("div",{className:`flex ${t?"h-[calc(100vh_-_4rem_-_4rem_-_4rem_-_2px)]":"h-[calc(100vh_-_4rem_-_4rem_-_2px)]"} w-full`,children:[s.jsxs("div",{className:`relative bg-white/40 transition-all duration-500 ${r?"w-1/2":"w-full"}`,children:[s.jsx(ko,{}),s.jsx(Wo,{isPanelOpen:r,setIsPanelOpen:n})]}),s.jsxs("div",{"aria-hidden":!r,className:`h-full min-w-0 overflow-x-hidden text-ellipsis whitespace-nowrap bg-theme-surface-secondary transition-all duration-500 ${r?"w-1/2 border-l border-theme-border-moderate":"w-0 overflow-x-hidden border-transparent"}`,children:[s.jsx(Uo,{setIsPanelOpen:n}),s.jsx(Yo,{})]})]})]})}function Wo({isPanelOpen:e,setIsPanelOpen:t}){return s.jsx(k,{intent:"secondary",className:`absolute right-4 top-4 h-7 w-7 items-center justify-center border border-neutral-300 bg-transparent p-0.5 ${e?"hidden":"flex"}`,onClick:()=>t(!0),children:s.jsx(Ws,{className:"h-5 w-5 fill-theme-text-primary"})})}export{$c as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e}from"./@radix-DnFH_oo1.js";import{u as m,S as o,A as x,a as d,g as f,b as u,r,c as h,d as p,
|
1
|
+
import{j as e}from"./@radix-DnFH_oo1.js";import{u as m,S as o,A as x,a as d,g as f,b as u,r,c as h,d as p,av as v,au as g}from"./index-Ci0nJ8EZ.js";import{a as j,h as N,O as b}from"./@react-router-APVeuk-U.js";import{I as w}from"./InlineAvatar-CA3DFMcM.js";import"./@tanstack-QbMbTrh5.js";import"./@reactflow-ytavUpwh.js";function y({children:s,isActiveOverride:t,...a}){const n=j(),i=t?t(n.pathname):!1;return e.jsx(N,{...a,className:({isActive:l})=>` ${i||l?"bg-primary-50 text-theme-text-brand":"hover:bg-neutral-200"} block rounded-md px-4 py-1 text-text-sm font-semibold `,children:s})}function c({items:s}){return e.jsx("nav",{className:"flex w-full flex-col items-center",children:e.jsx("ul",{className:"flex w-full flex-row flex-wrap items-center gap-1 lg:flex-col lg:items-start",children:s.map(t=>e.jsx("li",{className:"lg:w-full",children:e.jsx(y,{end:!0,to:t.href,isActiveOverride:t.isActiveOverride,children:t.name})},t.name))})})}function S(){var n,i,l;const{data:s,isError:t,isPending:a}=m({throwOnError:!0});return a?e.jsx(o,{className:"h-9 w-full"}):t?null:e.jsxs("div",{className:"flex w-full items-center gap-2 rounded-md border border-theme-border-moderate bg-theme-surface-primary p-2",children:[e.jsxs(x,{size:"md",type:"square",children:[e.jsx(d,{src:f(((n=s.body)==null?void 0:n.server_name)||"default")}),e.jsx(u,{size:"md",children:((i=s.body)==null?void 0:i.server_name[0])||"D"})]}),e.jsx("p",{className:"truncate text-text-sm font-semibold",children:(l=s.body)==null?void 0:l.server_name})]})}function I(){function s(){return[{name:"General",href:r.settings.general},{name:"Members",href:r.settings.members},{name:"Repositories",href:r.settings.repositories.overview},{name:"Secrets",href:r.settings.secrets.overview,isActiveOverride:a=>a.startsWith(r.settings.secrets.overview)},{name:"Connectors",href:r.settings.connectors.overview},{name:"Notifications",href:r.settings.notifications}]}const t=s();return e.jsx(c,{items:t})}function A(){function s(){return[{name:"Profile",href:r.settings.profile}]}const t=s();return e.jsx(c,{items:t})}function k(){const{data:s,isPending:t,isError:a}=h();return t?e.jsx(o,{className:"h-[70px] w-full"}):a?null:e.jsxs("div",{className:"rounded-md border border-theme-border-moderate bg-theme-surface-primary p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center",children:[e.jsx(p,{className:"h-4 w-4 fill-theme-text-brand"}),e.jsx("p",{className:"ml-2 text-text-sm font-semibold",children:"Open source"})]}),e.jsxs("p",{className:"mb-1 text-text-sm text-theme-text-tertiary",children:["ZenML v",s.version]}),e.jsxs("p",{className:"text-text-sm text-theme-text-tertiary",children:["UI Version ","v0.26.1"]})]})}function U(){const{data:s}=v();return e.jsxs("div",{className:"layout-container flex flex-col gap-7 pt-5 lg:flex-row lg:px-10",children:[e.jsxs("div",{className:"flex shrink-0 flex-col gap-4 lg:w-[200px]",children:[e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-text-xs font-semibold uppercase text-theme-text-tertiary",children:"Server"}),e.jsx(S,{}),e.jsx(I,{})]}),s?e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-text-xs font-semibold uppercase text-theme-text-tertiary",children:"Account"}),e.jsx(w,{username:g(s)})]}):e.jsx(o,{className:"h-[70px] w-full"}),e.jsx("div",{className:"flex flex-col gap-4",children:e.jsx(A,{})}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-text-xs font-semibold uppercase text-theme-text-tertiary",children:"Version"}),e.jsx(k,{})]})]}),e.jsx("div",{className:"w-full",children:e.jsx(b,{})})]})}export{U as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as i,j as e}from"./@radix-DnFH_oo1.js";import{l as O,m as E,k as ne,n as ae,F as _,i as F,o as L,p as M,f,D as B,q as I,s as z,C as $,t as re,r as h,T as q,v as Z,w as U,x as H,y as R,E as k,z as m,G,S as C,B as le,H as ie,J as oe,K as ce,e as de,L as S,M as ue,N as me,P as pe}from"./index-Ci0nJ8EZ.js";import{L as x,c as v,b as he}from"./@react-router-APVeuk-U.js";import{S as K}from"./refresh-hfgWPeto.js";import{S as Q,P as V}from"./SearchField-BzmfxS0L.js";import{q as xe,b as fe,c as J,a as je}from"./@tanstack-QbMbTrh5.js";import{o as ge}from"./url-CbAPzsmT.js";import{S as P}from"./trash-DUWZWzse.js";import{D as w,a as N,u as be}from"./delete-run-CP0pcJ3U.js";import{C as y}from"./CopyButton-DcFHidFJ.js";import{g as W,E as X,a as Ce}from"./ExecutionStatus-D6r6aK8J.js";import{S as Y}from"./dots-horizontal-C6K59vUm.js";import{A as ee}from"./AlertDialogDropdownItem-xLR9a1iw.js";import{u as ye}from"./all-pipeline-runs-query-BA3R2Sey.js";import{D as ve}from"./DisplayDate-DkCy54Bp.js";import{I as Pe}from"./InlineAvatar-CA3DFMcM.js";import{I as we}from"./Infobox-BTK_EUKT.js";import"./@reactflow-ytavUpwh.js";import"./chevron-right-double-c9H46Kl8.js";import"./index-5GJ5ysEZ.js";import"./zod-uFd1wBcd.js";import"./index.esm-BE1uqCX5.js";import"./copy-CaGlDsUy.js";import"./check-circle-DOoS4yhF.js";const Ne=s=>i.createElement("svg",{viewBox:"0 0 60 60",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},i.createElement("g",{id:"dataflow-02"},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5 7.5C11.1193 7.5 10 8.61929 10 10C10 11.3807 11.1193 12.5 12.5 12.5C13.8807 12.5 15 11.3807 15 10C15 8.61929 13.8807 7.5 12.5 7.5ZM5 10C5 5.85786 8.35787 2.5 12.5 2.5C15.7655 2.5 18.5436 4.58702 19.5732 7.5L40.4268 7.5C41.4564 4.58702 44.2345 2.5 47.5 2.5C51.6421 2.5 55 5.85786 55 10C55 14.1421 51.6421 17.5 47.5 17.5C44.2345 17.5 41.4564 15.413 40.4268 12.5L32.5 12.5V27.5H40.4268C41.4564 24.587 44.2345 22.5 47.5 22.5C51.6421 22.5 55 25.8579 55 30C55 34.1421 51.6421 37.5 47.5 37.5C44.2345 37.5 41.4564 35.413 40.4268 32.5H32.5V38C32.5 40.1415 32.502 41.5972 32.5939 42.7224C32.6834 43.8185 32.8457 44.379 33.045 44.77C33.5243 45.7108 34.2892 46.4757 35.2301 46.955C35.6211 47.1543 36.1816 47.3166 37.2776 47.4061C38.103 47.4736 39.1062 47.4926 40.4275 47.4979C41.4577 44.586 44.2352 42.5 47.5 42.5C51.6421 42.5 55 45.8579 55 50C55 54.1421 51.6421 57.5 47.5 57.5C44.2338 57.5 41.4552 55.4121 40.4261 52.4982C39.0579 52.4929 37.8787 52.4719 36.8704 52.3895C35.4652 52.2747 34.1734 52.0283 32.9601 51.4101C31.0785 50.4513 29.5487 48.9215 28.5899 47.0399C27.9717 45.8266 27.7253 44.5348 27.6105 43.1296C27.4999 41.7766 27.5 40.1157 27.5 38.1032V12.5L19.5732 12.5C18.5436 15.413 15.7655 17.5 12.5 17.5C8.35787 17.5 5 14.1421 5 10ZM47.5 7.5C46.1193 7.5 45 8.61929 45 10C45 11.3807 46.1193 12.5 47.5 12.5C48.8807 12.5 50 11.3807 50 10C50 8.61929 48.8807 7.5 47.5 7.5ZM47.5 27.5C46.1193 27.5 45 28.6193 45 30C45 31.3807 46.1193 32.5 47.5 32.5C48.8807 32.5 50 31.3807 50 30C50 28.6193 48.8807 27.5 47.5 27.5ZM47.5 47.5C46.1193 47.5 45 48.6193 45 50C45 51.3807 46.1193 52.5 47.5 52.5C48.8807 52.5 50 51.3807 50 50C50 48.6193 48.8807 47.5 47.5 47.5Z"})));async function Se({params:s}){const t=O(E.pipelines.all+"?"+ge(s)),n=await ne(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(n.status===404&&ae(),!n.ok)throw new _({message:"Error while fetching pipelines",status:n.status,statusText:n.statusText});return n.json()}const A={all:["pipelines"],pipelineList:s=>xe({queryKey:[...A.all,s],queryFn:async()=>Se({params:s})})};async function De({pipelineId:s}){const t=O(E.pipelines.detail(s)),n=await fetch(t,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!n.ok){const a=await n.json().then(r=>r.detail).catch(()=>`Failed to delete pipeline ${s}`);throw new _({status:n.status,statusText:n.statusText,message:a})}return n.json()}function Te(s){return fe({mutationFn:De,...s})}const se=i.createContext(null);function Re({children:s}){const[t,n]=i.useState([]),a=J(),{toast:r}=F(),l=Te(),o=async c=>{try{const d=c.map(p=>l.mutateAsync({pipelineId:p}));await Promise.all(d),r({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),await a.invalidateQueries({queryKey:A.all}),n([])}catch(d){console.error("Failed to delete some pipelines:",d)}};return e.jsx(se.Provider,{value:{selectedPipelines:t,setSelectedPipelines:n,bulkDeletePipelines:o},children:s})}function g(){const s=i.useContext(se);if(!s)throw new Error("usePipelinesSelectorContext must be used within a PipelinesSelectorProvider");return s}function ke(){const[s,t]=i.useState(!1),{bulkDeletePipelines:n,selectedPipelines:a}=g();async function r(){await n(a),t(!1)}return e.jsxs(L,{open:s,onOpenChange:t,children:[e.jsx(M,{children:e.jsxs(f,{className:"rounded-sharp border-none bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(P,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(w,{title:`Delete Pipeline${a.length>=2?"s":""}`,handleDelete:r,children:e.jsxs(N,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Ae(){const{selectedPipelines:s}=g();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${s==null?void 0:s.length} Pipeline${(s==null?void 0:s.length)>1?"s":""} selected`}),e.jsx(ke,{})]})}function Oe({id:s}){const[t,n]=i.useState(!1),[a,r]=i.useState(!1),l=i.useRef(null),o=i.useRef(null),{bulkDeletePipelines:c}=g();async function d(){await c([s]),j(!1)}function p(){o.current=l.current}function j(u){if(u===!1){r(!1),setTimeout(()=>{n(u)},200);return}n(u)}return e.jsxs(B,{onOpenChange:r,open:a,children:[e.jsx(I,{ref:l,children:e.jsx(Y,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(z,{hidden:t,onCloseAutoFocus:u=>{o.current&&(o.current.focus(),o.current=null,u.preventDefault())},align:"end",sideOffset:7,children:e.jsx(ee,{onSelect:p,open:t,onOpenChange:j,triggerChildren:"Delete",icon:e.jsx(P,{fill:"red"}),children:e.jsx(w,{title:"Delete Pipeline",handleDelete:d,children:e.jsxs(N,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}const Ee=({id:s})=>{const{selectedPipelines:t,setSelectedPipelines:n}=g(),a=(r,l)=>{n(o=>r?[...o,l]:o.filter(c=>c!==l))};return e.jsx($,{id:s,onCheckedChange:r=>a(r,s),checked:t.includes(s),className:"h-3 w-3"})};function _e(){return[{id:"check",header:"",meta:{width:"1%"},cell:({row:s})=>e.jsx(Ee,{id:s.original.id})},{id:"name",header:"Pipeline",cell:({row:s})=>{var t,n,a;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(re,{className:`h-5 w-5 ${W((t=s.original.body)==null?void 0:t.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(x,{to:h.pipelines.namespace(encodeURIComponent(s.original.name)),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:s.original.name})}),e.jsx(q,{children:e.jsxs(Z,{children:[e.jsx(U,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(X,{status:(n=s.original.body)==null?void 0:n.latest_run_status})}),e.jsx(H,{className:"z-20 capitalize",children:(a=s.original.body)==null?void 0:a.latest_run_status})]})}),e.jsx(y,{copyText:s.original.name})]}),e.jsxs(x,{to:h.pipelines.namespace(encodeURIComponent(s.original.name)),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:s.original.id.split("-")[0]}),e.jsx(y,{copyText:s.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:s=>{var t,n;return{status:(t=s.body)==null?void 0:t.latest_run_status,runId:(n=s.body)==null?void 0:n.latest_run_id}},cell:({getValue:s})=>{const{runId:t,status:n}=s();return!t||!n?e.jsx("div",{children:"No run"}):e.jsx(x,{to:h.runs.detail(t),children:e.jsxs(R,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:Ce(n),children:[e.jsx(k,{className:"h-3 w-3 fill-current"}),t==null?void 0:t.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:s})=>e.jsx(Oe,{id:s.original.id})}]}const D=1,Fe=m.object({page:m.coerce.number().min(D).optional().default(D).catch(D),name:m.string().optional(),operator:m.enum(["and","or"]).optional()});function Le(){const[s]=v(),{page:t,name:n,operator:a}=Fe.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0});return{page:t,name:n,logical_operator:a}}function Me(){const s=Le(),{selectedPipelines:t}=g(),{data:n,refetch:a}=je({...A.pipelineList({...s,sort_by:"desc:latest_run"}),throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[t.length?e.jsx(Ae,{}):e.jsx(Q,{searchParams:s}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(f,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>a(),children:[e.jsx(K,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:n?e.jsx(G,{columns:_e(),data:n.items}):e.jsx(C,{className:"h-[500px] w-full"})}),n?n.total_pages>1&&e.jsx(V,{searchParams:s,paginate:n}):e.jsx(C,{className:"h-[36px] w-[300px]"})]})]})}const te=i.createContext(null);function Be({children:s}){const[t,n]=i.useState([]),a=J(),{toast:r}=F(),l=be(),o=async c=>{try{const d=c.map(p=>l.mutateAsync({runId:p}));await Promise.all(d),r({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),await a.invalidateQueries({queryKey:["runs"]}),n([])}catch(d){console.error("Failed to delete some runs:",d)}};return e.jsx(te.Provider,{value:{selectedRuns:t,setSelectedRuns:n,bulkDeleteRuns:o},children:s})}function b(){const s=i.useContext(te);if(!s)throw new Error("useRunsSelectorContext must be used within a RunsSelectorProvider");return s}function Ie(){const[s,t]=i.useState(!1),{bulkDeleteRuns:n,selectedRuns:a}=b();async function r(){await n(a),t(!1)}return e.jsxs(L,{open:s,onOpenChange:t,children:[e.jsx(M,{children:e.jsxs(f,{className:"rounded-sharp border-none bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(P,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(w,{title:`Delete Run${a.length>=2?"s":""}`,handleDelete:r,children:e.jsxs(N,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function ze(){const{selectedRuns:s}=b();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${s==null?void 0:s.length} Run${(s==null?void 0:s.length)>1?"s":""} selected`}),e.jsx(Ie,{})]})}function $e({id:s}){const[t,n]=i.useState(!1),[a,r]=i.useState(!1),l=i.useRef(null),o=i.useRef(null),{bulkDeleteRuns:c}=b();async function d(){await c([s]),j(!1)}function p(){o.current=l.current}function j(u){if(u===!1){r(!1),setTimeout(()=>{n(u)},200);return}n(u)}return e.jsxs(B,{onOpenChange:r,open:a,children:[e.jsx(I,{ref:l,children:e.jsx(Y,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(z,{hidden:t,onCloseAutoFocus:u=>{o.current&&(o.current.focus(),o.current=null,u.preventDefault())},align:"end",sideOffset:7,children:e.jsx(ee,{onSelect:p,open:t,onOpenChange:j,triggerChildren:"Delete",icon:e.jsx(P,{fill:"red"}),children:e.jsx(w,{title:"Delete Run",handleDelete:d,children:e.jsxs(N,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}const qe=({id:s})=>{const{selectedRuns:t,setSelectedRuns:n}=b(),a=(r,l)=>{n(o=>r?[...o,l]:o.filter(c=>c!==l))};return e.jsx($,{id:s,onCheckedChange:r=>a(r,s),checked:t.includes(s),className:"h-3 w-3"})},Ze=[{id:"check",header:"",meta:{width:"1%"},accessorFn:s=>({id:s.id}),cell:({getValue:s})=>{const{id:t}=s();return e.jsx(qe,{id:t})}},{id:"name",header:"Run",accessorFn:s=>{var t;return{id:s.id,name:s.name,status:(t=s.body)==null?void 0:t.status}},cell:({getValue:s})=>{const{name:t,status:n,id:a}=s();return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(k,{className:`h-5 w-5 ${W(n)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(x,{to:h.runs.detail(a),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t})}),e.jsx(q,{children:e.jsxs(Z,{children:[e.jsx(U,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(X,{status:n})}),e.jsx(H,{className:"z-20 capitalize",children:n})]})}),e.jsx(y,{copyText:t})]}),e.jsxs(x,{to:h.runs.detail(a),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:a.split("-")[0]}),e.jsx(y,{copyText:a})]})]})]})}},{id:"pipeline",header:"Pipeline",accessorFn:s=>{var t,n;return(n=(t=s.body)==null?void 0:t.pipeline)==null?void 0:n.name},cell:({getValue:s})=>{const t=s();return t?e.jsx(x,{to:h.pipelines.namespace(t),children:e.jsx(R,{color:"purple",className:"inline-flex items-center gap-0.5 truncate",rounded:!1,emphasis:"subtle",children:t})}):null}},{id:"stack",header:"Stack",accessorFn:s=>{var t,n,a,r;return{name:(n=(t=s.body)==null?void 0:t.stack)==null?void 0:n.name,id:(r=(a=s.body)==null?void 0:a.stack)==null?void 0:r.id}},cell:({getValue:s})=>{const{name:t,id:n}=s();return!t||!n?null:e.jsx(R,{rounded:!1,className:"inline-block",color:"turquoise",emphasis:"subtle",children:t})}},{id:"created-at",header:"Created at",accessorFn:s=>{var t;return{date:(t=s.body)==null?void 0:t.created}},cell:({getValue:s})=>{const{date:t}=s();return e.jsx(ve,{dateString:t})}},{id:"author",header:"Author",accessorFn:s=>{var t,n,a,r,l;return{name:((a=(n=(t=s.body)==null?void 0:t.user)==null?void 0:n.body)==null?void 0:a.full_name)||((l=(r=s.body)==null?void 0:r.user)==null?void 0:l.name)}},cell:({getValue:s})=>{const{name:t}=s();return e.jsx(Pe,{username:t})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:s})=>e.jsx($e,{id:s.original.id})}],T=1,Ue=m.object({page:m.coerce.number().min(T).optional().default(T).catch(T),name:m.string().optional(),operator:m.enum(["and","or"]).optional(),status:m.enum(["pending","running","completed"]).optional()});function He(){const[s]=v(),{page:t,name:n,operator:a,status:r}=Ue.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0,status:s.get("status")||void 0});return{page:t,name:n,logical_operator:a,status:r}}function Ge(){const{selectedRuns:s}=b(),t=He(),{data:n,refetch:a}=ye({params:{...t,sort_by:"desc:updated"}});return e.jsxs("div",{className:"mt-5 flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[s.length?e.jsx(ze,{}):e.jsx(Q,{searchParams:t}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(f,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>a(),children:[e.jsx(K,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:n?e.jsx(G,{columns:Ze,data:n.items}):e.jsx(C,{className:"h-[500px] w-full"})}),n?n.total_pages>1&&e.jsx(V,{searchParams:t,paginate:n}):e.jsx(C,{className:"h-[36px] w-[300px]"})]})]})}const Ke=m.object({tab:m.enum(["pipelines","runs","templates"]).optional().default("pipelines").catch("pipelines")});function Qe(){const[s]=v(),{tab:t}=Ke.parse({tab:s.get("tab")||void 0});return t}const Ve="/assets/templates-1S_8WeSK.webp";function Je(){return e.jsxs("div",{className:"layout-container space-y-5",children:[e.jsx(We,{}),e.jsx(Ye,{})]})}function We(){return e.jsx(we,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"This is a ZenML Pro feature. "}),e.jsx("p",{children:"Upgrade to ZenML Pro to access the Templates and save settings and run pipelines from the dashboard."})]})})}const Xe=["Run pipelines from the dashboard with Templates","Re-run a pipeline easily from the UI","Model and Artifact Control Plane Dashboard","Managed ZenML server on your VPC or hosted on our servers","Social SSO, RBAC, and User Management","CI/CD/CT, and more!"];function Ye(){return e.jsxs(le,{className:"relative overflow-hidden px-7 py-5",children:[e.jsxs("div",{className:"max-w-[450px] space-y-4",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Access Advanced Template Features with ZenML Pro"}),e.jsx("ul",{className:"space-y-2",children:Xe.map((s,t)=>e.jsx("li",{className:"text-text-md text-theme-text-secondary",children:s},t))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(f,{size:"md",asChild:!0,children:e.jsx("a",{href:"https://cloud.zenml.io/signup",target:"_blank",rel:"noopener noreferrer",children:"Upgrade to ZenML Pro"})}),e.jsx(f,{emphasis:"minimal",size:"md",children:e.jsx("a",{href:"https://www.zenml.io/pro",target:"_blank",rel:"noopener noreferrer",children:"Learn more"})})]})]}),e.jsx("img",{className:"absolute right-0 top-0 hidden translate-x-[30%] scale-75 md:translate-y-[30%] lg:block xl:-translate-y-[5%]",src:Ve,alt:"Screenshot of Zenml Pro Templates Feature"})]})}const es=[{value:"pipelines",label:"Pipelines",icon:Ne},{value:"runs",label:"Runs",icon:k},{value:"templates",label:"Templates",icon:ue}];function ss(){const[s]=v(),t=Qe(),n=he();i.useEffect(()=>{if(!s.get("tab")){const l=new URLSearchParams(s);l.set("tab","pipelines"),n(`?${l.toString()}`,{replace:!0})}},[n,s]);function a(r){const l=new URLSearchParams;l.set("tab",r),n(`?${l.toString()}`)}return e.jsx("div",{className:"p-5",children:e.jsxs(ie,{onValueChange:a,value:t,children:[e.jsx(oe,{children:es.map(r=>e.jsxs(ce,{className:"flex items-center gap-2 text-text-md",value:r.value.toLowerCase(),children:[e.jsx(r.icon,{className:`h-5 w-5 ${t===r.value?"fill-primary-400":"fill-theme-text-tertiary"}`}),r.label,r.value==="templates"&&e.jsx(de,{className:"rounded-sm font-semibold text-primary-500",color:"purple",size:"sm",children:"New"})]},r.value))}),e.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"pipelines",children:e.jsx(Re,{children:e.jsx(Me,{})})}),e.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"runs",children:e.jsx(Be,{children:e.jsx(Ge,{})})}),e.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"templates",children:e.jsx(Je,{})})]})})}function Ss(){const{setCurrentBreadcrumbData:s}=me();return i.useEffect(()=>{s({segment:"pipelines",data:null})},[]),e.jsxs("div",{children:[e.jsx(pe,{children:e.jsx("h1",{className:"text-display-xs font-semibold",children:"Pipelines"})}),e.jsx(ss,{})]})}export{Ss as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e}from"./@radix-DnFH_oo1.js";import{B as r,
|
1
|
+
import{j as e}from"./@radix-DnFH_oo1.js";import{B as r,P as o,e as i}from"./index-Ci0nJ8EZ.js";import{C as n}from"./CodeSnippet-IxXNxUDa.js";import{I as c}from"./Infobox-BTK_EUKT.js";import{c as l}from"./@react-router-APVeuk-U.js";import{C as m,a as f}from"./cloud-only-BB4BVa6E.js";import"./@tanstack-QbMbTrh5.js";import"./@reactflow-ytavUpwh.js";import"./copy-CaGlDsUy.js";function x(){return e.jsx(c,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"This is a ZenML Pro feature. "}),e.jsx("p",{children:"Upgrade to ZenML Pro to access the Artifact Control Plane and interact with your artifacts in the Dashboard."})]})})}function d(){const[s]=l(),t=s.get("artifact");function a(){return t?`zenml artifact list --name='contains:${t}'`:"zenml artifact list"}return e.jsxs(r,{className:"flex flex-wrap justify-between p-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-text-xl font-semibold",children:"Staying Open Source? "}),e.jsx("p",{className:"text-theme-text-secondary",children:"No problem! Use this CLI command to list your artifacts"})]}),e.jsx(n,{code:a()})]})}const p="/assets/acp-DOsXjFc7.webp";function w(){return e.jsxs("div",{children:[e.jsxs(o,{className:"flex items-center gap-1",children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"Artifacts"}),e.jsx(i,{color:"purple",rounded:!0,size:"sm",children:e.jsx("span",{className:"font-semibold text-primary-500",children:"Pro"})})]}),e.jsxs("div",{className:"layout-container space-y-5 py-5",children:[e.jsx(x,{}),e.jsx(m,{feature:"artifact",image:{src:p,alt:"Screenshot of the ZenML Pro Artifact Control plane"},features:f}),e.jsx(d,{})]})]})}export{w as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e,r as f}from"./@radix-DnFH_oo1.js";import{
|
1
|
+
import{j as e,r as f}from"./@radix-DnFH_oo1.js";import{P as j,t as g,z as o,E as b,r as i,T as y,v as N,w as v,x as P,y as p,f as S,G as T,S as x,N as k}from"./index-Ci0nJ8EZ.js";import{c as C,L as c,g as h}from"./@react-router-APVeuk-U.js";import{S as E}from"./refresh-hfgWPeto.js";import{u as R}from"./all-pipeline-runs-query-BA3R2Sey.js";import{S as _,P as D}from"./SearchField-BzmfxS0L.js";import{C as u}from"./CopyButton-DcFHidFJ.js";import{D as F}from"./DisplayDate-DkCy54Bp.js";import{g as w,E as A}from"./ExecutionStatus-D6r6aK8J.js";import{I}from"./InlineAvatar-CA3DFMcM.js";import"./@tanstack-QbMbTrh5.js";import"./@reactflow-ytavUpwh.js";import"./url-CbAPzsmT.js";import"./dots-horizontal-C6K59vUm.js";import"./chevron-right-double-c9H46Kl8.js";import"./index-5GJ5ysEZ.js";import"./copy-CaGlDsUy.js";import"./check-circle-DOoS4yhF.js";function z({namespace:s}){return e.jsx(j,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(g,{className:"h-5 w-5 fill-neutral-400"}),e.jsx("h1",{className:"text-display-xs font-semibold",children:decodeURIComponent(s)})]})})}const l=1,B=o.object({page:o.coerce.number().min(l).optional().default(l).catch(l),name:o.string().optional(),operator:o.enum(["and","or"]).optional()});function L(){const[s]=C(),{page:a,name:r,operator:t}=B.parse({page:s.get("page")||void 0,name:s.get("name")||void 0});return{page:a,name:r,logical_operator:t}}function U(){return[{id:"run",header:"Run",accessorFn:s=>{var a;return{name:s.name,id:s.id,status:(a=s.body)==null?void 0:a.status}},cell:({getValue:s})=>{const{name:a,status:r,id:t}=s();return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(b,{className:`h-5 w-5 shrink-0 ${w(r)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(c,{to:i.runs.detail(t),className:"flex items-center gap-1",children:e.jsx("h2",{className:"text-text-md font-semibold",children:a})}),e.jsx(y,{children:e.jsxs(N,{children:[e.jsx(v,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(A,{status:r})}),e.jsx(P,{className:"z-20 capitalize",children:r})]})}),e.jsx(u,{copyText:a})]}),e.jsxs(c,{to:i.runs.detail(t),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:t.split("-")[0]}),e.jsx(u,{copyText:t})]})]})]})}},{id:"stack",header:"Stack",accessorFn:s=>{var a,r,t,n;return{name:(r=(a=s.body)==null?void 0:a.stack)==null?void 0:r.name,id:(n=(t=s.body)==null?void 0:t.stack)==null?void 0:n.id}},cell:({getValue:s})=>{const{name:a,id:r}=s();return!a||!r?null:e.jsx(c,{to:i.stacks.overview,children:e.jsx(p,{rounded:!1,className:"inline-block",color:"turquoise",emphasis:"subtle",children:a})})}},{id:"repository",header:"Repository",accessorFn:s=>{var a,r,t,n,m,d;return{name:(t=(r=(a=s.body)==null?void 0:a.code_reference)==null?void 0:r.body)==null?void 0:t.code_repository.name,id:(d=(m=(n=s.body)==null?void 0:n.code_reference)==null?void 0:m.body)==null?void 0:d.code_repository.id}},cell:({getValue:s})=>{const{name:a,id:r}=s();return!a||!r?null:e.jsx("div",{children:e.jsx(p,{rounded:!1,className:"inline-block",color:"grey",emphasis:"subtle",children:a})})}},{id:"created",header:"Created at",accessorFn:s=>{var a;return(a=s.body)==null?void 0:a.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(F,{dateString:s()})})},{id:"author",header:"Author",accessorFn:s=>{var a;return{author:(a=s.body)==null?void 0:a.user}},cell:({getValue:s})=>{const{author:a}=s();return e.jsx(I,{username:a.name})}}]}function G(){const{namespace:s}=h(),a=L(),r=U(),{data:t,refetch:n}=R({params:{pipeline_name:decodeURIComponent(s),...a,sort_by:"desc:updated"}},{throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5 p-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(_,{searchParams:a}),e.jsxs(S,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>n(),children:[e.jsx(E,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:t?e.jsx(T,{columns:r,data:t.items}):e.jsx(x,{className:"h-[500px] w-full"})}),t?t.total_pages>1&&e.jsx(D,{searchParams:a,paginate:t}):e.jsx(x,{className:"h-[36px] w-[300px]"})]})]})}function ne(){const{namespace:s}=h(),{setCurrentBreadcrumbData:a}=k();return f.useEffect(()=>{s&&a({segment:"pipeline_detail",data:{name:s}})},[s]),e.jsxs("div",{children:[e.jsx(z,{namespace:s}),e.jsx(G,{})]})}export{ne as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e}from"./@radix-DnFH_oo1.js";import{u as i,A as o,a as c,g as d,b as x,S as a,c as m,d as u,B as n,r as f,e as h,f as p}from"./index-
|
1
|
+
import{j as e}from"./@radix-DnFH_oo1.js";import{u as i,A as o,a as c,g as d,b as x,S as a,c as m,d as u,B as n,r as f,e as h,f as p}from"./index-Ci0nJ8EZ.js";import{C as j}from"./CodeSnippet-IxXNxUDa.js";import{S as g}from"./link-external-BT2L8hAQ.js";import{L as v}from"./@react-router-APVeuk-U.js";import"./@tanstack-QbMbTrh5.js";import"./@reactflow-ytavUpwh.js";import"./copy-CaGlDsUy.js";const w="/assets/cloud-squares-DeRLMopf.svg",b="/assets/codespaces-BitYDX9d.gif";function N(){var r,t,l;const{data:s}=i({throwOnError:!0});return e.jsx("div",{className:"w-full items-center border-b border-theme-border-moderate bg-white py-5",children:e.jsx("div",{className:"layout-container flex flex-col flex-wrap items-center justify-between md:flex-row",children:e.jsxs("div",{className:"flex flex-col items-center gap-5 md:flex-row",children:[s?e.jsxs(o,{size:"xxl",type:"square",children:[e.jsx(c,{alt:"Logo displayed for the server",src:d(((r=s.body)==null?void 0:r.server_name)||"default",64)}),e.jsx(x,{size:"xxl",children:((t=s.body)==null?void 0:t.server_name[0])||"D"})]}):e.jsx(a,{className:"h-[96px] w-[96px]"}),e.jsx("div",{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row",children:[s?e.jsx("h1",{className:"mb-1 text-display-xs font-semibold",children:((l=s.body)==null?void 0:l.server_name)||"default"}):e.jsx(a,{className:"h-full w-8"}),e.jsx("div",{className:"flex flex-row flex-wrap gap-0.5",children:e.jsx(y,{})})]})})]})})})}function y(){const{data:s,isError:r,isPending:t}=m({throwOnError:!0});return r?null:t?e.jsx(a,{className:"w-6"}):e.jsxs("div",{className:"flex h-6 items-center gap-0.5 rounded-md border border-theme-border-moderate px-1 py-0.5 text-text-sm text-theme-text-secondary",children:[e.jsx(u,{className:"h-4 w-4 fill-theme-text-brand"}),s.version]})}function G(){return e.jsxs("div",{children:[e.jsx(N,{}),e.jsxs("div",{className:"layout-container space-y-5 py-5",children:[e.jsx(L,{}),e.jsx(C,{})]})]})}function L(){return e.jsxs(n,{className:"flex flex-col-reverse overflow-hidden lg:flex-row",children:[e.jsxs("div",{className:"w-full px-7 py-5 lg:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Welcome to ZenML"}),e.jsxs("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:["You successfully installed ZenML dashboard. ",e.jsx("br",{}),"Now you can get started with your new ZenML server.",e.jsx("br",{}),"To get started"," ",e.jsx(v,{className:"link text-theme-text-brand",to:f.onboarding,children:"checkout the onboarding guide"}),"."]}),e.jsx("hr",{className:"mb-5 mt-5 w-[100px]"}),e.jsxs("div",{className:"",children:[e.jsx("p",{className:"mb-1 text-text-sm",children:"Copy your ZenML server URL"}),e.jsx("div",{className:"",children:e.jsx(j,{codeClasses:"truncate",className:"truncate",code:`zenml connect --url=${window.location.origin}`})})]})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx("img",{alt:"illustration of different purple squares",src:w,className:"h-full w-full"})})]})}function C(){return e.jsxs(n,{className:"flex flex-col-reverse items-center overflow-hidden md:max-h-[200px] md:flex-row",children:[e.jsxs("div",{className:"w-full space-y-3 px-7 py-5 xl:w-4/5",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(h,{className:"text-text-xs font-semibold",color:"green",children:"NEW"}),e.jsx("h2",{className:"text-text-xl font-semibold",children:"VS Code Quickstart with ZenML"})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Get started quickly with ZenML using GitHub Codespaces!",e.jsx("br",{}),"You can run our quickstart guide in a pre-configured environment."]}),e.jsx(p,{size:"sm",className:"w-fit",emphasis:"subtle",asChild:!0,children:e.jsxs("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/zenml-io/zenml",children:["Visit our GitHub repo ",e.jsx(g,{className:"h-5 w-5"})]})})]}),e.jsx("img",{className:"object-contain",src:b,alt:"Gif explaining how to setup codespaces"})]})}export{G as default};
|