zenml-nightly 0.66.0.dev20240919__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.
Files changed (155) hide show
  1. zenml/VERSION +1 -1
  2. zenml/cli/__init__.py +7 -0
  3. zenml/cli/base.py +2 -2
  4. zenml/cli/pipeline.py +21 -0
  5. zenml/cli/utils.py +14 -11
  6. zenml/client.py +68 -3
  7. zenml/config/step_configurations.py +0 -5
  8. zenml/constants.py +3 -0
  9. zenml/enums.py +2 -0
  10. zenml/integrations/__init__.py +1 -0
  11. zenml/integrations/aws/flavors/sagemaker_orchestrator_flavor.py +76 -7
  12. zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +370 -115
  13. zenml/integrations/azure/orchestrators/azureml_orchestrator.py +157 -4
  14. zenml/integrations/constants.py +1 -0
  15. zenml/integrations/deepchecks/__init__.py +1 -1
  16. zenml/integrations/deepchecks/data_validators/deepchecks_data_validator.py +55 -14
  17. zenml/integrations/deepchecks/validation_checks.py +62 -5
  18. zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +207 -18
  19. zenml/integrations/lightning/__init__.py +1 -1
  20. zenml/integrations/lightning/flavors/lightning_orchestrator_flavor.py +9 -0
  21. zenml/integrations/lightning/orchestrators/lightning_orchestrator.py +18 -17
  22. zenml/integrations/lightning/orchestrators/lightning_orchestrator_entrypoint.py +2 -6
  23. zenml/integrations/mlflow/__init__.py +14 -15
  24. zenml/integrations/mlflow/steps/mlflow_registry.py +2 -0
  25. zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +38 -26
  26. zenml/integrations/skypilot_kubernetes/__init__.py +52 -0
  27. zenml/integrations/skypilot_kubernetes/flavors/__init__.py +26 -0
  28. zenml/integrations/skypilot_kubernetes/flavors/skypilot_orchestrator_kubernetes_vm_flavor.py +125 -0
  29. zenml/integrations/skypilot_kubernetes/orchestrators/__init__.py +25 -0
  30. zenml/integrations/skypilot_kubernetes/orchestrators/skypilot_kubernetes_vm_orchestrator.py +74 -0
  31. zenml/integrations/tensorboard/visualizers/tensorboard_visualizer.py +1 -1
  32. zenml/models/v2/base/filter.py +315 -149
  33. zenml/models/v2/base/scoped.py +5 -2
  34. zenml/models/v2/core/artifact_version.py +69 -8
  35. zenml/models/v2/core/model.py +43 -6
  36. zenml/models/v2/core/model_version.py +49 -1
  37. zenml/models/v2/core/model_version_artifact.py +18 -3
  38. zenml/models/v2/core/model_version_pipeline_run.py +18 -4
  39. zenml/models/v2/core/pipeline.py +108 -1
  40. zenml/models/v2/core/pipeline_run.py +172 -21
  41. zenml/models/v2/core/run_template.py +53 -1
  42. zenml/models/v2/core/stack.py +33 -5
  43. zenml/models/v2/core/step_run.py +7 -0
  44. zenml/new/pipelines/pipeline.py +4 -0
  45. zenml/new/pipelines/run_utils.py +4 -1
  46. zenml/orchestrators/base_orchestrator.py +41 -12
  47. zenml/stack/stack.py +11 -2
  48. zenml/utils/env_utils.py +54 -1
  49. zenml/utils/string_utils.py +50 -0
  50. zenml/zen_server/cloud_utils.py +33 -8
  51. zenml/zen_server/dashboard/assets/{404-iO8vpun1.js → 404-Y50hSt65.js} +1 -1
  52. zenml/zen_server/dashboard/assets/{@reactflow-B6kq9fJZ.js → @reactflow-ytavUpwh.js} +1 -1
  53. zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-xLR9a1iw.js +1 -0
  54. zenml/zen_server/dashboard/assets/{CodeSnippet-DNWdQmbo.js → CodeSnippet-IxXNxUDa.js} +2 -2
  55. zenml/zen_server/dashboard/assets/{CollapsibleCard-B2OVjWYE.js → CollapsibleCard-BhutZbBL.js} +1 -1
  56. zenml/zen_server/dashboard/assets/{Commands-DsoaVElZ.js → Commands-Bf-rd1z8.js} +1 -1
  57. zenml/zen_server/dashboard/assets/ComponentBadge-gKR1OIwG.js +1 -0
  58. zenml/zen_server/dashboard/assets/{CopyButton-BqE_-PHO.js → CopyButton-DcFHidFJ.js} +1 -1
  59. zenml/zen_server/dashboard/assets/{CsvVizualization-Dyasr2jU.js → CsvVizualization-QSbjrfxw.js} +1 -1
  60. zenml/zen_server/dashboard/assets/{DialogItem-Cz1VLRwa.js → DialogItem-Cd3HqST4.js} +1 -1
  61. zenml/zen_server/dashboard/assets/{Error-DorJD_va.js → Error-BhwdmqK7.js} +1 -1
  62. zenml/zen_server/dashboard/assets/{ExecutionStatus-CIfQTutR.js → ExecutionStatus-D6r6aK8J.js} +1 -1
  63. zenml/zen_server/dashboard/assets/{Helpbox-CmfvtNeq.js → Helpbox-0pBpTwTm.js} +1 -1
  64. zenml/zen_server/dashboard/assets/Infobox-BTK_EUKT.js +1 -0
  65. zenml/zen_server/dashboard/assets/{InlineAvatar-Ds2ZFHPc.js → InlineAvatar-CA3DFMcM.js} +1 -1
  66. zenml/zen_server/dashboard/assets/Partials-QLOZw624.js +1 -0
  67. zenml/zen_server/dashboard/assets/{ProviderIcon-BOQJgapd.js → ProviderIcon-C16CCIN4.js} +1 -1
  68. zenml/zen_server/dashboard/assets/{ProviderRadio-BsYBw9YA.js → ProviderRadio-D3FuCHf3.js} +1 -1
  69. zenml/zen_server/dashboard/assets/{SearchField-W3GXpLlI.js → SearchField-BzmfxS0L.js} +1 -1
  70. zenml/zen_server/dashboard/assets/SecretTooltip-BaMwHF-Q.js +1 -0
  71. zenml/zen_server/dashboard/assets/{SetPassword-B-0a8UCj.js → SetPassword-DuIC65H9.js} +1 -1
  72. zenml/zen_server/dashboard/assets/{Tick-i1DYsVcX.js → Tick-DJTCF0Re.js} +1 -1
  73. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-C6Zb7ASL.js → UpdatePasswordSchemas-CUm-DMpw.js} +1 -1
  74. zenml/zen_server/dashboard/assets/UsageReason-CKw0juLF.js +1 -0
  75. zenml/zen_server/dashboard/assets/{WizardFooter-BHbO7zOa.js → WizardFooter-Cv9ApYWU.js} +1 -1
  76. zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-BBEe6I9-.js → all-pipeline-runs-query-BA3R2Sey.js} +1 -1
  77. zenml/zen_server/dashboard/assets/{cloud-only-BuP4Kt_7.js → cloud-only-BB4BVa6E.js} +1 -1
  78. zenml/zen_server/dashboard/assets/{create-stack-B2x2d4r1.js → create-stack-F29xAUEx.js} +1 -1
  79. zenml/zen_server/dashboard/assets/delete-run-CP0pcJ3U.js +1 -0
  80. zenml/zen_server/dashboard/assets/{form-schemas-Bap0f854.js → form-schemas-BKXwSDK2.js} +1 -1
  81. zenml/zen_server/dashboard/assets/index-BhJ6ZJxv.css +1 -0
  82. zenml/zen_server/dashboard/assets/{index-B9wVwe7u.js → index-Ci0nJ8EZ.js} +5 -5
  83. zenml/zen_server/dashboard/assets/{index-DFi8BroH.js → index-D-mtoBj3.js} +1 -1
  84. zenml/zen_server/dashboard/assets/{login-mutation-DwxUz8VA.js → login-mutation-ax6iL2Mb.js} +1 -1
  85. zenml/zen_server/dashboard/assets/{not-found-D5i9DunU.js → not-found-DbjllLY_.js} +1 -1
  86. zenml/zen_server/dashboard/assets/{page-oS4hqS8M.js → page-3qPX9WYH.js} +1 -1
  87. zenml/zen_server/dashboard/assets/{page-iwoJnwPv.js → page-6mfzecin.js} +1 -1
  88. zenml/zen_server/dashboard/assets/{page-DGMa3ZQL.js → page-8kYmrh0B.js} +1 -1
  89. zenml/zen_server/dashboard/assets/page-B1n7_W7z.js +1 -0
  90. zenml/zen_server/dashboard/assets/page-BDg1F-Ug.js +6 -0
  91. zenml/zen_server/dashboard/assets/{page-xQG6GmFJ.js → page-BXarY9K2.js} +1 -1
  92. zenml/zen_server/dashboard/assets/page-BZZhLo2u.js +1 -0
  93. zenml/zen_server/dashboard/assets/page-Bbf_oBjn.js +1 -0
  94. zenml/zen_server/dashboard/assets/page-BjjuBvZG.js +9 -0
  95. zenml/zen_server/dashboard/assets/{page-J0s8Sq3N.js → page-BukXK1Aa.js} +1 -1
  96. zenml/zen_server/dashboard/assets/page-CHaQkFK5.js +1 -0
  97. zenml/zen_server/dashboard/assets/{page-BitfWsiW.js → page-CKHNAq7z.js} +1 -1
  98. zenml/zen_server/dashboard/assets/{page-DE03uZZR.js → page-CS0SYFK8.js} +1 -1
  99. zenml/zen_server/dashboard/assets/{page-WCQ659by.js → page-CvKnNK1S.js} +1 -1
  100. zenml/zen_server/dashboard/assets/{page-CrSdkteO.js → page-DGM1CbYT.js} +2 -2
  101. zenml/zen_server/dashboard/assets/{page-DQGCHKrQ.js → page-DMSLXKGT.js} +1 -1
  102. zenml/zen_server/dashboard/assets/page-DOmIZ2ra.js +1 -0
  103. zenml/zen_server/dashboard/assets/{page-DgM-N9RL.js → page-DRfcRK1w.js} +1 -1
  104. zenml/zen_server/dashboard/assets/page-DYVmJ9_w.js +3 -0
  105. zenml/zen_server/dashboard/assets/{page-BiF8hLbO.js → page-DcTjHmYZ.js} +1 -1
  106. zenml/zen_server/dashboard/assets/page-DuqYMYmH.js +1 -0
  107. zenml/zen_server/dashboard/assets/page-Dwow2doB.js +1 -0
  108. zenml/zen_server/dashboard/assets/{page-DQdwZZ9x.js → page-HkVBdZl6.js} +1 -1
  109. zenml/zen_server/dashboard/assets/{page-bimkItOg.js → page-MAXyfXBq.js} +1 -1
  110. zenml/zen_server/dashboard/assets/page-miU2rhYG.js +1 -0
  111. zenml/zen_server/dashboard/assets/page-p0BhSAWx.js +1 -0
  112. zenml/zen_server/dashboard/assets/{page-DFCK65G9.js → page-uORspyRu.js} +1 -1
  113. zenml/zen_server/dashboard/assets/persist-BxIR2XZs.js +1 -0
  114. zenml/zen_server/dashboard/assets/{persist-xsYgVtR1.js → persist-CfJMar_k.js} +1 -1
  115. zenml/zen_server/dashboard/assets/sharedSchema-vub0rii3.js +14 -0
  116. zenml/zen_server/dashboard/assets/stack-detail-query-DQcyzG-2.js +1 -0
  117. zenml/zen_server/dashboard/assets/tick-circle-m-hJG8i9.js +1 -0
  118. zenml/zen_server/dashboard/assets/{update-server-settings-mutation-DNqmQXDM.js → update-server-settings-mutation-FGVP7X2U.js} +1 -1
  119. zenml/zen_server/dashboard/assets/{url-DwbuKk1b.js → url-CbAPzsmT.js} +1 -1
  120. zenml/zen_server/dashboard/index.html +4 -4
  121. zenml/zen_server/dashboard_legacy/asset-manifest.json +4 -4
  122. zenml/zen_server/dashboard_legacy/index.html +1 -1
  123. zenml/zen_server/dashboard_legacy/{precache-manifest.290b95d5b43efa3368b3dc63d20c4782.js → precache-manifest.6d320abb70db612019dda6c4948e7a90.js} +4 -4
  124. zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
  125. zenml/zen_server/dashboard_legacy/static/js/{main.840d1bf0.chunk.js → main.fa9299d5.chunk.js} +2 -2
  126. zenml/zen_server/dashboard_legacy/static/js/{main.840d1bf0.chunk.js.map → main.fa9299d5.chunk.js.map} +1 -1
  127. zenml/zen_server/rbac/utils.py +6 -2
  128. zenml/zen_server/routers/runs_endpoints.py +89 -3
  129. zenml/zen_stores/sql_zen_store.py +1 -0
  130. {zenml_nightly-0.66.0.dev20240919.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/METADATA +8 -1
  131. {zenml_nightly-0.66.0.dev20240919.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/RECORD +134 -126
  132. zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-BXeSvmMY.js +0 -1
  133. zenml/zen_server/dashboard/assets/EditSecretDialog-Du423_3U.js +0 -1
  134. zenml/zen_server/dashboard/assets/Infobox-BL9NOS37.js +0 -1
  135. zenml/zen_server/dashboard/assets/Partials-DX-8iEa1.js +0 -1
  136. zenml/zen_server/dashboard/assets/UsageReason-CCnzmwS8.js +0 -1
  137. zenml/zen_server/dashboard/assets/index-6DYjZgDn.css +0 -1
  138. zenml/zen_server/dashboard/assets/page-BFuJICXM.js +0 -9
  139. zenml/zen_server/dashboard/assets/page-CDOQLrPC.js +0 -1
  140. zenml/zen_server/dashboard/assets/page-CEJWu1YO.js +0 -1
  141. zenml/zen_server/dashboard/assets/page-CIbehp7V.js +0 -1
  142. zenml/zen_server/dashboard/assets/page-CLiRGfWo.js +0 -1
  143. zenml/zen_server/dashboard/assets/page-CV44mQn9.js +0 -1
  144. zenml/zen_server/dashboard/assets/page-D5F3DJjm.js +0 -1
  145. zenml/zen_server/dashboard/assets/page-DI-qTWrm.js +0 -1
  146. zenml/zen_server/dashboard/assets/page-Dt8VgzbE.js +0 -1
  147. zenml/zen_server/dashboard/assets/page-oSqx9dkH.js +0 -1
  148. zenml/zen_server/dashboard/assets/page-p3GqEAUW.js +0 -1
  149. zenml/zen_server/dashboard/assets/page-qvcUVPE-.js +0 -1
  150. zenml/zen_server/dashboard/assets/persist-mEZN_fgH.js +0 -1
  151. zenml/zen_server/dashboard/assets/sharedSchema-BfZcy7aP.js +0 -14
  152. zenml/zen_server/dashboard/assets/stack-detail-query-CU4egfhp.js +0 -1
  153. {zenml_nightly-0.66.0.dev20240919.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/LICENSE +0 -0
  154. {zenml_nightly-0.66.0.dev20240919.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/WHEEL +0 -0
  155. {zenml_nightly-0.66.0.dev20240919.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/entry_points.txt +0 -0
@@ -1 +1 @@
1
- import{q as o}from"./@tanstack-QbMbTrh5.js";import{n,F as i,l as c,m as u}from"./index-B9wVwe7u.js";async function l({workspaceId:e}){const a=c(u.workspaces.detail(e)),t=await fetch(a,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(t.status===404&&n(),!t.ok){const r=await t.json().then(s=>Array.isArray(s.detail)?s.detail[1]:s.detail).catch(()=>`Error while fetching workspace ${e}`);throw new i({status:t.status,statusText:t.statusText,message:r})}return t.json()}const p={all:["workspaces"],workspaceDetail:e=>o({queryKey:[...p.all,e],queryFn:async()=>l({workspaceId:e})})};export{p as w};
1
+ import{q as o}from"./@tanstack-QbMbTrh5.js";import{n,F as i,l as c,m as u}from"./index-Ci0nJ8EZ.js";async function l({workspaceId:e}){const a=c(u.workspaces.detail(e)),t=await fetch(a,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(t.status===404&&n(),!t.ok){const r=await t.json().then(s=>Array.isArray(s.detail)?s.detail[1]:s.detail).catch(()=>`Error while fetching workspace ${e}`);throw new i({status:t.status,statusText:t.statusText,message:r})}return t.json()}const p={all:["workspaces"],workspaceDetail:e=>o({queryKey:[...p.all,e],queryFn:async()=>l({workspaceId:e})})};export{p as w};
@@ -1 +1 @@
1
- import{k as s,F as r,l as i,m as u}from"./index-B9wVwe7u.js";import{b as c}from"./@tanstack-QbMbTrh5.js";async function l(a){const e=i(u.login),t=await s(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a)});if(!t.ok){const o=await t.json().then(n=>n.detail).catch(()=>["","Failed to login"]);throw new r({status:t.status,statusText:t.statusText,message:o[1]||"Failed to login"})}return t.json()}function d(a){return c({mutationFn:async e=>l(e),...a})}export{d as u};
1
+ import{k as s,F as r,l as i,m as u}from"./index-Ci0nJ8EZ.js";import{b as c}from"./@tanstack-QbMbTrh5.js";async function l(a){const e=i(u.login),t=await s(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a)});if(!t.ok){const o=await t.json().then(n=>n.detail).catch(()=>["","Failed to login"]);throw new r({status:t.status,statusText:t.statusText,message:o[1]||"Failed to login"})}return t.json()}function d(a){return c({mutationFn:async e=>l(e),...a})}export{d as u};
@@ -1 +1 @@
1
- import{r as s,j as e}from"./@radix-DnFH_oo1.js";import{j as r,f as n}from"./index-B9wVwe7u.js";import{b as o}from"./@react-router-APVeuk-U.js";import"./@tanstack-QbMbTrh5.js";import"./@reactflow-B6kq9fJZ.js";const a=t=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L7.41421 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H7.41421L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z"})),l=a;function p(){const t=o();return e.jsx(e.Fragment,{children:e.jsxs("section",{className:"layout-container my-9 flex flex-col items-center gap-5",children:[e.jsx(r,{className:"h-[120px] w-[120px] fill-neutral-300"}),e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-2 text-display-xs font-semibold",children:"Error 404 - Run Not Found"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Oh no! It seems that the run you are looking for doesn't exist."})]}),e.jsxs(n,{intent:"primary",size:"lg",onClick:()=>t(-1),children:[e.jsx(l,{className:"h-5 w-5 fill-theme-text-negative"})," ",e.jsx("span",{children:"Go back"})]})]})})}export{p as default};
1
+ import{r as s,j as e}from"./@radix-DnFH_oo1.js";import{j as r,f as n}from"./index-Ci0nJ8EZ.js";import{b as o}from"./@react-router-APVeuk-U.js";import"./@tanstack-QbMbTrh5.js";import"./@reactflow-ytavUpwh.js";const a=t=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L7.41421 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H7.41421L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z"})),l=a;function p(){const t=o();return e.jsx(e.Fragment,{children:e.jsxs("section",{className:"layout-container my-9 flex flex-col items-center gap-5",children:[e.jsx(r,{className:"h-[120px] w-[120px] fill-neutral-300"}),e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-2 text-display-xs font-semibold",children:"Error 404 - Run Not Found"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Oh no! It seems that the run you are looking for doesn't exist."})]}),e.jsxs(n,{intent:"primary",size:"lg",onClick:()=>t(-1),children:[e.jsx(l,{className:"h-5 w-5 fill-theme-text-negative"})," ",e.jsx("span",{children:"Go back"})]})]})})}export{p as default};
@@ -1 +1 @@
1
- import{j as e,r}from"./@radix-DnFH_oo1.js";import{B as a,aD as n,V as l,e as i}from"./index-B9wVwe7u.js";import{C as m}from"./CodeSnippet-DNWdQmbo.js";import{I as c}from"./Infobox-BL9NOS37.js";import{c as d}from"./@react-router-APVeuk-U.js";import{C as x,m as p}from"./cloud-only-BuP4Kt_7.js";import"./@tanstack-QbMbTrh5.js";import"./@reactflow-B6kq9fJZ.js";import"./copy-CaGlDsUy.js";function u(){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 Model Control Plane and interact with your models in the Dashboard."})]})})}function f(){const[o]=d(),s=o.get("model");function t(){return s?`zenml model list --name='contains:${s}'`:"zenml model list"}return e.jsxs(a,{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 models"})]}),e.jsx(m,{code:t()})]})}const h="/assets/mcp-Cb1aMeoq.webp";function w(){const{setTourState:o,tourState:{tourActive:s}}=n();return r.useEffect(()=>{s&&o(t=>({...t,run:!0,stepIndex:t.stepIndex}))},[s]),e.jsxs("div",{children:[e.jsxs(l,{className:"flex items-center gap-1",children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"Models"}),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(u,{}),e.jsx(x,{feature:"model",image:{src:h,alt:"Screenshot of the ZenML Pro Model Control plane"},features:p}),e.jsx(f,{})]})]})}export{w as default};
1
+ import{j as e,r}from"./@radix-DnFH_oo1.js";import{B as a,aF as n,P as l,e as i}from"./index-Ci0nJ8EZ.js";import{C as m}from"./CodeSnippet-IxXNxUDa.js";import{I as c}from"./Infobox-BTK_EUKT.js";import{c as d}from"./@react-router-APVeuk-U.js";import{C as x,m as p}from"./cloud-only-BB4BVa6E.js";import"./@tanstack-QbMbTrh5.js";import"./@reactflow-ytavUpwh.js";import"./copy-CaGlDsUy.js";function u(){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 Model Control Plane and interact with your models in the Dashboard."})]})})}function f(){const[o]=d(),s=o.get("model");function t(){return s?`zenml model list --name='contains:${s}'`:"zenml model list"}return e.jsxs(a,{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 models"})]}),e.jsx(m,{code:t()})]})}const h="/assets/mcp-Cb1aMeoq.webp";function w(){const{setTourState:o,tourState:{tourActive:s}}=n();return r.useEffect(()=>{s&&o(t=>({...t,run:!0,stepIndex:t.stepIndex}))},[s]),e.jsxs("div",{children:[e.jsxs(l,{className:"flex items-center gap-1",children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"Models"}),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(u,{}),e.jsx(x,{feature:"model",image:{src:h,alt:"Screenshot of the ZenML Pro Model Control plane"},features:p}),e.jsx(f,{})]})]})}export{w as default};
@@ -1 +1 @@
1
- import{r as S,j as e}from"./@radix-DnFH_oo1.js";import{z as i,i as v,u as j,S as g,I as N,f as y,an as b,j as w,at as E,B as F}from"./index-B9wVwe7u.js";import{u as I}from"./update-server-settings-mutation-DNqmQXDM.js";import{t as P}from"./zod-uFd1wBcd.js";import{c as B}from"./@tanstack-QbMbTrh5.js";import{u as G}from"./index.esm-BE1uqCX5.js";import"./@react-router-APVeuk-U.js";import"./@reactflow-B6kq9fJZ.js";const k=i.object({serverName:i.string().min(1)});function q(){var a;const r=S.useId(),{toast:t}=v(),n=B(),{isError:o,isPending:l,data:m}=j({throwOnError:!0}),{mutate:c,isPending:u}=I({onError(s){b(s)&&t({status:"error",emphasis:"subtle",icon:e.jsx(w,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})},onSuccess:async()=>{await n.invalidateQueries({queryKey:E()}),t({status:"success",emphasis:"subtle",rounded:!0,description:"Server Settings updated successfully"}),p()}}),{handleSubmit:d,register:x,reset:p,formState:{isValid:f}}=G({resolver:P(k)});function h(s){c({server_name:s.serverName})}return o?null:l?e.jsx(g,{className:"h-[150px] max-w-[600px]"}):e.jsx("div",{className:"w-full max-w-[600px]",children:e.jsxs("form",{className:"space-y-2",onSubmit:d(h),children:[e.jsx("div",{className:"space-y-2",children:e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:r,className:"text-text-sm",children:"Server Name"}),e.jsx(N,{placeholder:(a=m.body)==null?void 0:a.server_name,...x("serverName"),id:r,className:"w-full"})]})}),e.jsx("div",{className:"flex justify-end",children:e.jsx(y,{disabled:u||!f,size:"md",intent:"primary",children:"Update"})})]})})}function O(){return e.jsxs(F,{className:"flex flex-col gap-5 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"General"}),e.jsx(q,{})]})}export{O as default};
1
+ import{r as S,j as e}from"./@radix-DnFH_oo1.js";import{z as i,i as v,u as j,S as g,I as N,f as y,ar as b,j as w,ax as E,B as F}from"./index-Ci0nJ8EZ.js";import{u as I}from"./update-server-settings-mutation-FGVP7X2U.js";import{t as P}from"./zod-uFd1wBcd.js";import{c as B}from"./@tanstack-QbMbTrh5.js";import{u as G}from"./index.esm-BE1uqCX5.js";import"./@react-router-APVeuk-U.js";import"./@reactflow-ytavUpwh.js";const k=i.object({serverName:i.string().min(1)});function q(){var a;const r=S.useId(),{toast:t}=v(),n=B(),{isError:o,isPending:l,data:m}=j({throwOnError:!0}),{mutate:c,isPending:u}=I({onError(s){b(s)&&t({status:"error",emphasis:"subtle",icon:e.jsx(w,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})},onSuccess:async()=>{await n.invalidateQueries({queryKey:E()}),t({status:"success",emphasis:"subtle",rounded:!0,description:"Server Settings updated successfully"}),p()}}),{handleSubmit:d,register:x,reset:p,formState:{isValid:f}}=G({resolver:P(k)});function h(s){c({server_name:s.serverName})}return o?null:l?e.jsx(g,{className:"h-[150px] max-w-[600px]"}):e.jsx("div",{className:"w-full max-w-[600px]",children:e.jsxs("form",{className:"space-y-2",onSubmit:d(h),children:[e.jsx("div",{className:"space-y-2",children:e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:r,className:"text-text-sm",children:"Server Name"}),e.jsx(N,{placeholder:(a=m.body)==null?void 0:a.server_name,...x("serverName"),id:r,className:"w-full"})]})}),e.jsx("div",{className:"flex justify-end",children:e.jsx(y,{disabled:u||!f,size:"md",intent:"primary",children:"Update"})})]})})}function O(){return e.jsxs(F,{className:"flex flex-col gap-5 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"General"}),e.jsx(q,{})]})}export{O as default};
@@ -1 +1 @@
1
- import{r as i,j as s}from"./@radix-DnFH_oo1.js";import{z as t,h as g,i as N,I as c,f as w,j as y,r as b,B as v}from"./index-B9wVwe7u.js";import{u as S}from"./login-mutation-DwxUz8VA.js";import{t as I}from"./zod-uFd1wBcd.js";import{u as L}from"./index.esm-BE1uqCX5.js";import{b as F,c as P}from"./@react-router-APVeuk-U.js";import"./@tanstack-QbMbTrh5.js";import"./@reactflow-B6kq9fJZ.js";const E=t.object({username:t.string().min(1),password:t.string().optional()});function A(){const l=F(),{setAuthState:m}=g(),{toast:u}=N(),a=i.useId(),r=i.useId(),[o]=P(),d=o.get("redirect"),x=o.get("username")??void 0,{register:n,handleSubmit:p,formState:{isValid:h}}=L({resolver:I(E),defaultValues:{username:x}}),f=S({onError:e=>{e instanceof Error&&u({status:"error",emphasis:"subtle",icon:s.jsx(y,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:e.message,rounded:!0})},onSuccess:async()=>{m("true"),l(d||b.home)}});function j(e){f.mutate({username:e.username.trim(),password:e.password})}return s.jsxs("form",{onSubmit:p(j),className:"space-y-5",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:a,className:"text-text-sm",children:"Username"}),s.jsx(c,{...n("username"),id:a,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:r,className:"text-text-sm",children:"Password"}),s.jsx(c,{...n("password"),id:r,type:"password",className:"w-full"})]})]}),s.jsx(w,{disabled:!h,className:"w-full text-center",size:"md",children:s.jsx("span",{className:"w-full",children:"Login"})})]})}function U(){return s.jsxs(v,{className:"flex w-full max-w-[540px] flex-col gap-5 p-7",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"mb-0.5 text-display-xs font-semibold",children:"Log in to your account"}),s.jsx("p",{className:"text-theme-text-secondary",children:"Please, fill in your details to log in to your ZenML account."})]}),s.jsx(A,{})]})}export{U as default};
1
+ import{r as i,j as s}from"./@radix-DnFH_oo1.js";import{z as t,h as g,i as N,I as c,f as w,j as y,r as b,B as v}from"./index-Ci0nJ8EZ.js";import{u as S}from"./login-mutation-ax6iL2Mb.js";import{t as I}from"./zod-uFd1wBcd.js";import{u as L}from"./index.esm-BE1uqCX5.js";import{b as F,c as P}from"./@react-router-APVeuk-U.js";import"./@tanstack-QbMbTrh5.js";import"./@reactflow-ytavUpwh.js";const E=t.object({username:t.string().min(1),password:t.string().optional()});function A(){const l=F(),{setAuthState:m}=g(),{toast:u}=N(),a=i.useId(),r=i.useId(),[o]=P(),d=o.get("redirect"),x=o.get("username")??void 0,{register:n,handleSubmit:p,formState:{isValid:h}}=L({resolver:I(E),defaultValues:{username:x}}),f=S({onError:e=>{e instanceof Error&&u({status:"error",emphasis:"subtle",icon:s.jsx(y,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:e.message,rounded:!0})},onSuccess:async()=>{m("true"),l(d||b.home)}});function j(e){f.mutate({username:e.username.trim(),password:e.password})}return s.jsxs("form",{onSubmit:p(j),className:"space-y-5",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:a,className:"text-text-sm",children:"Username"}),s.jsx(c,{...n("username"),id:a,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:r,className:"text-text-sm",children:"Password"}),s.jsx(c,{...n("password"),id:r,type:"password",className:"w-full"})]})]}),s.jsx(w,{disabled:!h,className:"w-full text-center",size:"md",children:s.jsx("span",{className:"w-full",children:"Login"})})]})}function U(){return s.jsxs(v,{className:"flex w-full max-w-[540px] flex-col gap-5 p-7",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"mb-0.5 text-display-xs font-semibold",children:"Log in to your account"}),s.jsx("p",{className:"text-theme-text-secondary",children:"Please, fill in your details to log in to your ZenML account."})]}),s.jsx(A,{})]})}export{U as default};
@@ -0,0 +1 @@
1
+ import{r as _,j as t}from"./@radix-DnFH_oo1.js";import{u as k,g as Je,S as Xe,C as oe,P as ie,W as et,L as tt}from"./ProviderRadio-D3FuCHf3.js";import{W as O,H as T,B as D,S as E}from"./WizardFooter-Cv9ApYWU.js";import{t as B}from"./zod-uFd1wBcd.js";import{z as h,l as je,m as ge,k as _e,n as Ee,F as ve,S as Y,I as W,f as w,ay as rt,az as st,aA as nt,aB as ot,aL as it,aC as at,ao as ct,a7 as lt,a9 as ut,ab as dt,d as ft,U as mt,i as Me,j as ht,r as xt,A as pt,b as yt,ac as jt}from"./index-Ci0nJ8EZ.js";import{b as y,C as b,u as $,F as V,a as gt}from"./index.esm-BE1uqCX5.js";import{C as Se,b as _t}from"./stack-detail-query-DQcyzG-2.js";import{R as H,a as K,u as vt}from"./create-stack-F29xAUEx.js";import{q as Re,a as J,b as St,j as Le,c as bt}from"./@tanstack-QbMbTrh5.js";import{o as Ct,s as wt}from"./url-CbAPzsmT.js";import{C as M}from"./ProviderIcon-C16CCIN4.js";import{a as Nt,s as qe}from"./sharedSchema-vub0rii3.js";import{S as Ft}from"./Lock-CmIn0szs.js";import{S as Pt}from"./plus-Bc8eLSDM.js";import{S as kt}from"./trash-DUWZWzse.js";import{S as At}from"./dots-horizontal-C6K59vUm.js";import{T as be}from"./Tick-DJTCF0Re.js";import{C as zt}from"./ComponentBadge-gKR1OIwG.js";import{e as It}from"./components-Br2ezRib.js";import{L as Ot}from"./@react-router-APVeuk-U.js";import"./persist-BxIR2XZs.js";import"./@reactflow-ytavUpwh.js";import"./layout-Dru15_XR.js";import"./rocket-SESCGQXm.js";import"./gcp-Dj6ntk0L.js";const Be=_.createContext(null);function Tt({children:e}){const[r,s]=_.useState({stackName:null,createdStackId:null,connectorConfig:null,fullstackResources:null,artifactStoreConfig:null,registryConfig:null,orchestratorConfig:null});return t.jsx(Be.Provider,{value:{data:r,setData:s},children:e})}function C(){const e=_.useContext(Be);if(e===null)throw new Error("useExistingInfraContext must be used within an ExistingInfraProvider");return e}const We=_.createContext(null);function Pe({children:e,initialSchema:r}){const[s,n]=_.useState(r);return t.jsx(We.Provider,{value:{schema:s,setSchema:n},children:e})}function X(){const e=_.useContext(We);if(!e)throw new Error("useSchemaContext must be used within a SchemaProvider");return e}const Dt=h.object({resourceId:h.string().min(1),flavor:h.string()});function Et(){return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(Se,{type:"artifact_store",className:"h-5 w-5 fill-primary-400"}),"Select your Artifact Store"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Choose one of the storages for the new Artifact Store."})]})}var $e=Symbol.for("immer-nothing"),ke=Symbol.for("immer-draftable"),j=Symbol.for("immer-state");function v(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var A=Object.getPrototypeOf;function z(e){return!!e&&!!e[j]}function F(e){var r;return e?Ve(e)||Array.isArray(e)||!!e[ke]||!!((r=e.constructor)!=null&&r[ke])||te(e)||re(e):!1}var Mt=Object.prototype.constructor.toString();function Ve(e){if(!e||typeof e!="object")return!1;const r=A(e);if(r===null)return!0;const s=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return s===Object?!0:typeof s=="function"&&Function.toString.call(s)===Mt}function U(e,r){ee(e)===0?Reflect.ownKeys(e).forEach(s=>{r(s,e[s],e)}):e.forEach((s,n)=>r(n,s,e))}function ee(e){const r=e[j];return r?r.type_:Array.isArray(e)?1:te(e)?2:re(e)?3:0}function de(e,r){return ee(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function Ze(e,r,s){const n=ee(e);n===2?e.set(r,s):n===3?e.add(s):e[r]=s}function Rt(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function te(e){return e instanceof Map}function re(e){return e instanceof Set}function N(e){return e.copy_||e.base_}function fe(e,r){if(te(e))return new Map(e);if(re(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const s=Ve(e);if(r===!0||r==="class_only"&&!s){const n=Object.getOwnPropertyDescriptors(e);delete n[j];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const i=o[a],u=n[i];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[i]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[i]})}return Object.create(A(e),n)}else{const n=A(e);if(n!==null&&s)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function Ce(e,r=!1){return se(e)||z(e)||!F(e)||(ee(e)>1&&(e.set=e.add=e.clear=e.delete=Lt),Object.freeze(e),r&&Object.entries(e).forEach(([s,n])=>Ce(n,!0))),e}function Lt(){v(2)}function se(e){return Object.isFrozen(e)}var qt={};function P(e){const r=qt[e];return r||v(0,e),r}var R;function He(){return R}function Bt(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ae(e,r){r&&(P("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function me(e){he(e),e.drafts_.forEach(Wt),e.drafts_=null}function he(e){e===R&&(R=e.parent_)}function ze(e){return R=Bt(R,e)}function Wt(e){const r=e[j];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function Ie(e,r){r.unfinalizedDrafts_=r.drafts_.length;const s=r.drafts_[0];return e!==void 0&&e!==s?(s[j].modified_&&(me(r),v(4)),F(e)&&(e=Q(r,e),r.parent_||G(r,e)),r.patches_&&P("Patches").generateReplacementPatches_(s[j].base_,e,r.patches_,r.inversePatches_)):e=Q(r,s,[]),me(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==$e?e:void 0}function Q(e,r,s){if(se(r))return r;const n=r[j];if(!n)return U(r,(o,a)=>Oe(e,n,r,o,a,s)),r;if(n.scope_!==e)return r;if(!n.modified_)return G(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let a=o,i=!1;n.type_===3&&(a=new Set(o),o.clear(),i=!0),U(a,(u,f)=>Oe(e,n,o,u,f,s,i)),G(e,o,!1),s&&e.patches_&&P("Patches").generatePatches_(n,s,e.patches_,e.inversePatches_)}return n.copy_}function Oe(e,r,s,n,o,a,i){if(z(o)){const u=a&&r&&r.type_!==3&&!de(r.assigned_,n)?a.concat(n):void 0,f=Q(e,o,u);if(Ze(s,n,f),z(f))e.canAutoFreeze_=!1;else return}else i&&s.add(o);if(F(o)&&!se(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Q(e,o),(!r||!r.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(s,n)&&G(e,o)}}function G(e,r,s=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ce(r,s)}function $t(e,r){const s=Array.isArray(e),n={type_:s?1:0,scope_:r?r.scope_:He(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=we;s&&(o=[n],a=L);const{revoke:i,proxy:u}=Proxy.revocable(o,a);return n.draft_=u,n.revoke_=i,u}var we={get(e,r){if(r===j)return e;const s=N(e);if(!de(s,r))return Vt(e,s,r);const n=s[r];return e.finalized_||!F(n)?n:n===ae(e.base_,r)?(ce(e),e.copy_[r]=pe(n,e)):n},has(e,r){return r in N(e)},ownKeys(e){return Reflect.ownKeys(N(e))},set(e,r,s){const n=Ke(N(e),r);if(n!=null&&n.set)return n.set.call(e.draft_,s),!0;if(!e.modified_){const o=ae(N(e),r),a=o==null?void 0:o[j];if(a&&a.base_===s)return e.copy_[r]=s,e.assigned_[r]=!1,!0;if(Rt(s,o)&&(s!==void 0||de(e.base_,r)))return!0;ce(e),xe(e)}return e.copy_[r]===s&&(s!==void 0||r in e.copy_)||Number.isNaN(s)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=s,e.assigned_[r]=!0),!0},deleteProperty(e,r){return ae(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,ce(e),xe(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const s=N(e),n=Reflect.getOwnPropertyDescriptor(s,r);return n&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:n.enumerable,value:s[r]}},defineProperty(){v(11)},getPrototypeOf(e){return A(e.base_)},setPrototypeOf(){v(12)}},L={};U(we,(e,r)=>{L[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});L.deleteProperty=function(e,r){return L.set.call(this,e,r,void 0)};L.set=function(e,r,s){return we.set.call(this,e[0],r,s,e[0])};function ae(e,r){const s=e[j];return(s?N(s):e)[r]}function Vt(e,r,s){var o;const n=Ke(r,s);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Ke(e,r){if(!(r in e))return;let s=A(e);for(;s;){const n=Object.getOwnPropertyDescriptor(s,r);if(n)return n;s=A(s)}}function xe(e){e.modified_||(e.modified_=!0,e.parent_&&xe(e.parent_))}function ce(e){e.copy_||(e.copy_=fe(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Zt=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,s,n)=>{if(typeof r=="function"&&typeof s!="function"){const a=s;s=r;const i=this;return function(f=a,...d){return i.produce(f,c=>s.call(this,c,...d))}}typeof s!="function"&&v(6),n!==void 0&&typeof n!="function"&&v(7);let o;if(F(r)){const a=ze(this),i=pe(r,void 0);let u=!0;try{o=s(i),u=!1}finally{u?me(a):he(a)}return Ae(a,n),Ie(o,a)}else if(!r||typeof r!="object"){if(o=s(r),o===void 0&&(o=r),o===$e&&(o=void 0),this.autoFreeze_&&Ce(o,!0),n){const a=[],i=[];P("Patches").generateReplacementPatches_(r,o,a,i),n(a,i)}return o}else v(1,r)},this.produceWithPatches=(r,s)=>{if(typeof r=="function")return(i,...u)=>this.produceWithPatches(i,f=>r(f,...u));let n,o;return[this.produce(r,s,(i,u)=>{n=i,o=u}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){F(e)||v(8),z(e)&&(e=Ht(e));const r=ze(this),s=pe(e,void 0);return s[j].isManual_=!0,he(r),s}finishDraft(e,r){const s=e&&e[j];(!s||!s.isManual_)&&v(9);const{scope_:n}=s;return Ae(n,r),Ie(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,r){let s;for(s=r.length-1;s>=0;s--){const o=r[s];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}s>-1&&(r=r.slice(s+1));const n=P("Patches").applyPatches_;return z(e)?n(e,r):this.produce(e,o=>n(o,r))}};function pe(e,r){const s=te(e)?P("MapSet").proxyMap_(e,r):re(e)?P("MapSet").proxySet_(e,r):$t(e,r);return(r?r.scope_:He()).drafts_.push(s),s}function Ht(e){return z(e)||v(10,e),Ue(e)}function Ue(e){if(!F(e)||se(e))return e;const r=e[j];let s;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,s=fe(e,r.scope_.immer_.useStrictShallowCopy_)}else s=fe(e,!0);return U(s,(n,o)=>{Ze(s,n,Ue(o))}),r&&(r.finalized_=!1),s}var g=new Zt,I=g.produce;g.produceWithPatches.bind(g);g.setAutoFreeze.bind(g);g.setUseStrictShallowCopy.bind(g);g.applyPatches.bind(g);g.createDraft.bind(g);g.finishDraft.bind(g);function Kt(){const{data:e,setData:r}=C(),{setCurrentStep:s}=k();if(!e.fullstackResources)return s(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const n=e.fullstackResources.components_resources_info.artifact_store,o=n.flatMap(i=>i.accessible_by_service_connector.map(u=>({...i,value:u})));function a({flavor:i,resourceId:u}){const f=n.find(d=>d.flavor===i);f&&(r(d=>I(d,c=>{c.artifactStoreConfig={flavor:i,configuration:Object.fromEntries(Object.keys(f.required_configuration||{}).map(m=>[m,u])),service_connector_resource_id:u}})),s(d=>d+1))}return{handleFormSubmit:a,flattenedInstances:o}}async function Ut(e){const r=je(ge.flavors.all)+(e?`?${Ct(e)}`:""),s=await _e(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&Ee(),!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching flavors");throw new ve({status:s.status,statusText:s.statusText,message:n})}return s.json()}const Qe={all:["flavors"],flavorList:e=>Re({queryKey:[...Qe.all,e],queryFn:async()=>Ut(e)})};function q({flavor:e,type:r,width:s=32,height:n=32,...o}){var i;const a=J({...Qe.flavorList({name:e,type:r})});return a.isError?null:a.isPending?t.jsx(Y,{style:{height:`${n}px`,width:`${s}px`}}):t.jsx("img",{width:s,height:n,alt:`${e} logo`,...o,src:wt(((i=a.data.items[0].body)==null?void 0:i.logo_url)??"")})}const Qt="artifact_store";function Gt(){const[e,r]=_.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:i,trigger:u,reset:f}=y(),{flattenedInstances:d,handleFormSubmit:c}=Kt(),m=d.filter(l=>l.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(W,{placeholder:"Search...",onChange:l=>{f(),r(l.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...a("flavor")}),t.jsx("ul",{className:"space-y-1",children:m.map(l=>t.jsx("li",{children:t.jsx(b,{name:"resourceId",control:s,render:({field:{onChange:x,...p}})=>t.jsxs(H,{"data-state":i("resourceId")===l.value?"selected":"unselected",htmlFor:l.value,children:[t.jsx(K,{id:l.value,type:"radio",...p,onChange:S=>{n("flavor",l.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),x(S.target.value),u()},value:l.value,name:"connector-radio"}),t.jsx(q,{type:Qt,width:24,height:24,flavor:l.flavor})," ",t.jsx("span",{children:l.value})]})})},l.value))})]})]})}function Yt(){const e=$({resolver:B(Dt),shouldUnregister:!0});return t.jsx(V,{...e,children:t.jsxs(O,{children:[t.jsx(T,{children:"Artifact Store"}),t.jsx(D,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(Et,{}),t.jsx(Gt,{})]})}),t.jsx(E,{children:t.jsx(Jt,{})})]})})}function Jt(){const e=y();return t.jsx(w,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}function Xt(e,r){const s=Object.keys(e).reduce((n,o)=>{var d,c;const a=e[o];let i;const u=Ge(o,r);switch(a.type||((c=(d=a.anyOf)==null?void 0:d.find(m=>m.type!==null))==null?void 0:c.type)){case"string":i=h.string().trim();break;case"boolean":i=h.boolean();break;case"array":i=h.array(h.string());break;default:i=h.string();break}return u&&(i=i.optional()),!u&&a.type==="string"&&i instanceof h.ZodString&&(i=i.min(1,"Required")),n[o]=i,n},{});return h.object(s)}function Ge(e,r){return!r.includes(e)}async function er(e){const r=je(ge.serviceConnectors.types.detail(e)),s=await _e(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&Ee(),!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching service connector type");throw new ve({status:s.status,statusText:s.statusText,message:n})}return s.json()}const Ne={connectorTypes:["service_connector_types"],serviceConnectorTypeDetail:e=>Re({queryKey:[...Ne.connectorTypes,e],queryFn:async()=>er(e)})},Ye=h.object({authMethod:h.string().min(1),stackName:Nt});function tr(){var c,m;const{data:e}=C(),{setCurrentStep:r}=k(),{control:s,watch:n,resetField:o}=y(),{setSchema:a}=X(),i=J({...Ne.serviceConnectorTypeDetail(((c=e.connectorConfig)==null?void 0:c.type)||"")});if(i.isError)return null;if(i.isPending)return t.jsx(Y,{className:"h-[40px] w-[100px]"});const u=i.data.auth_methods.filter(l=>l.auth_method!=="implicit").map(l=>({name:l.name,auth_method:l.auth_method}));if(!((m=e.connectorConfig)!=null&&m.type)){r(1);return}function f(){var Fe;const l=n("authMethod"),x=(Fe=i.data)==null?void 0:Fe.auth_methods.find(ne=>ne.auth_method===l);if(!x)return;const p=Xt(x.config_schema.properties,x.config_schema.required);a(Ye.merge(p)),Object.keys(p.shape).forEach(ne=>o(ne))}const d=e.connectorConfig.type||"";return t.jsx(b,{control:s,name:"authMethod",render:({field:{onChange:l,ref:x,...p}})=>t.jsxs(rt,{...p,onValueChange:S=>{l(S),f()},children:[t.jsx(st,{className:"w-fit border border-neutral-300 text-left text-text-md",children:t.jsx(nt,{className:"flex items-center gap-2",placeholder:"Select your Auth Method"})}),t.jsx(ot,{children:t.jsx(it,{viewportClassName:"max-h-[300px]",children:u.map(S=>t.jsx(at,{className:"space-x-2",value:S.auth_method,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(M,{provider:d}),t.jsx("div",{children:S.name})]})},S.auth_method))})})]})})}function rr(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(_t,{className:"h-5 w-5 fill-primary-400"}),"Select an Authentication Method"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Connect ZenML to your resources for seamless integration of cloud services into your ML pipelines."})]}),t.jsx(tr,{})]})}function sr({schema:e,name:r,isOptional:s}){var o,a;const n=e.type||((a=(o=e.anyOf)==null?void 0:o.find(i=>i.type!==null))==null?void 0:a.type);if(!n)return null;switch(n){case"string":return t.jsx(nr,{isOptional:s,schema:e,name:r});case"array":return t.jsx(or,{isOptional:s,schema:e,name:r});case"boolean":return t.jsx(ir,{isOptional:s,schema:e,name:r});default:return null}}function nr({name:e,schema:r,isOptional:s}){const n=y(),o=r.format==="password";return t.jsxs("div",{children:[t.jsxs("label",{htmlFor:e,className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx(b,{defaultValue:"",control:n.control,name:e,render:({field:a})=>t.jsx(W,{inputSize:"md",className:"w-full",id:e,...a,type:o?"password":"text"})})]})}function or({name:e,schema:r,isOptional:s}){const{control:n}=y(),{fields:o,append:a,remove:i}=gt({name:e,control:n});return t.jsxs("div",{className:"space-y-3",children:[t.jsxs("label",{className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx("ul",{className:"space-y-5",children:o.map((u,f)=>t.jsxs("li",{className:"flex w-full items-center gap-4 [&>div]:w-full",children:[t.jsx(b,{defaultValue:"",name:`${e}.${f}`,render:({field:d})=>t.jsx(W,{className:"w-full flex-1",inputSize:"md",...d})}),t.jsxs(w,{className:"h-7 w-7",emphasis:"subtle",size:"sm",type:"button",onClick:()=>i(f),children:[t.jsx(kt,{className:"h-5 w-5 fill-primary-900"}),t.jsx("span",{className:"sr-only",children:"remove"})]})]},u.id))}),t.jsxs(w,{className:"h-7 w-7",emphasis:"subtle",type:"button",onClick:()=>a(""),children:[t.jsx(Pt,{className:"h-5 w-5 fill-primary-900"}),t.jsx("p",{className:"sr-only",children:"Add Item"})]})]})}function ir({name:e,schema:r,isOptional:s}){const n=y(),o=r.default||!1;return t.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[t.jsxs("label",{htmlFor:e,className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx(b,{defaultValue:o,control:n.control,name:e,render:({field:{onChange:a,value:i,...u}})=>t.jsx(ct,{id:e,checked:i,onCheckedChange:f=>a(f),...u})})]})}function ar(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(Ft,{className:"h-5 w-5 fill-primary-400"}),"Add your Configuration"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Your credentials are securely stored and encrypted. ZenML uses these credentials to interact with your resources."})]}),t.jsx(cr,{})]})}function cr(){var f,d;const{data:e}=C(),{watch:r}=y(),s=J({...Ne.serviceConnectorTypeDetail(((f=e.connectorConfig)==null?void 0:f.type)||"")}),n=r("authMethod"),o=(d=s.data)==null?void 0:d.auth_methods.find(c=>c.auth_method===n);if(s.isError)return null;if(s.isPending)return t.jsx(Y,{className:"h-[200px] w-full"});if(!o)return null;const a=o.config_schema.properties,i=o.config_schema.required,u=Object.entries(a).sort(([c],[m])=>i.includes(c)&&!i.includes(m)?-1:!i.includes(c)&&i.includes(m)?1:0);return t.jsx("div",{className:"space-y-5",children:u.map(([c,m])=>t.jsx(sr,{isOptional:Ge(c,i),name:c,schema:m},c))})}function lr({open:e,loadingComponents:r}){var n,o;const{data:s}=C();return(n=s.connectorConfig)!=null&&n.type?t.jsx(lt,{open:e,children:t.jsxs(ut,{onPointerDownOutside:a=>a.preventDefault(),onEscapeKeyDown:a=>a.preventDefault(),className:"max-w-[600px]",children:[t.jsx("div",{className:"flex items-center justify-between border-b border-theme-border-moderate py-2 pl-5 pr-3",children:t.jsx(dt,{className:"text-text-lg",children:"Connecting and loading your components..."})}),t.jsxs("div",{className:"flex h-[200px] items-center justify-center gap-5 bg-primary-50",children:[t.jsx(ft,{className:"h-[60px] w-[60px]"}),t.jsx("div",{className:"flex h-[60px] w-[60px] items-center justify-center",children:t.jsx(At,{className:"h-5 w-5 fill-theme-text-tertiary"})}),t.jsx(M,{className:"h-[60px] w-[60px]",provider:s.connectorConfig.type})]}),t.jsxs("div",{className:"flex flex-col gap-1 px-7 pb-6 pt-5",children:[t.jsxs("p",{className:"text-theme-text-secondary",children:["We're securely connecting to ",Je(((o=s.connectorConfig)==null?void 0:o.type)||"aws")," ","and retrieving your custom components. This process typically takes about 30-60 seconds."]}),t.jsx(ur,{loadingComponents:r})]})]})}):null}function ur({loadingComponents:e}){const[r,s]=_.useState(!0),[n,o]=_.useState(!0);return _.useEffect(()=>{const a=setTimeout(()=>{s(!1)},Math.floor(Math.random()*1e3)+500),i=setTimeout(()=>{o(!1)},1500);return()=>{clearTimeout(a),clearTimeout(i)}},[]),t.jsxs("ul",{className:"mt-3 space-y-3 text-theme-text-secondary",children:[t.jsxs(ue,{children:[t.jsx(le,{loading:r}),"Establishing a secure connection"]}),t.jsxs(ue,{children:[t.jsx(le,{loading:n}),"Authenticating your account"]}),t.jsxs(ue,{children:[t.jsx(le,{loading:e}),"Fetching your existing components"]})]})}function le({loading:e}){return e?t.jsx(mt,{className:"h-5 w-5 border-2"}):t.jsx(be,{className:"h-5 w-5",tickClasses:"w-3 h-3"})}function ue({children:e}){return t.jsx("li",{className:"flex items-center gap-1",children:e})}async function dr({payload:e}){const r=je(ge.serviceConnectors.fullStackResources),s=await _e(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching service connector type");throw new ve({status:s.status,statusText:s.statusText,message:n})}return s.json()}function fr(e){return St({...e,mutationFn:async({payload:r})=>dr({payload:r})})}function mr(e){return new Promise(r=>setTimeout(r,e))}function hr(){const{setCurrentStep:e}=k(),[r,s]=_.useState(!0),{toast:n}=Me(),{setData:o,data:a}=C(),i=fr({onSuccess:async f=>{o(d=>I(d,c=>{c.fullstackResources=f})),s(!1),await mr(200),e(d=>d+1)},onError:f=>{n({status:"error",emphasis:"subtle",description:f.message,rounded:!0})}});return{handleFormSubmit:({authMethod:f,stackName:d,...c})=>{Object.keys(c).forEach(l=>{(c[l]===""||c[l]===null||c[l]===void 0||Array.isArray(c[l])&&c[l].length===0)&&delete c[l]});const m=I(a,l=>{l.stackName=d,l.connectorConfig&&(l.connectorConfig.auth_method=f,l.connectorConfig.configuration={...c})});o(m),m.connectorConfig&&i.mutate({payload:m.connectorConfig})},fullStackResources:i,loadingComponents:r}}function xr(){const{handleSubmit:e,formState:{isSubmitting:r}}=y(),{handleFormSubmit:s,fullStackResources:n,loadingComponents:o}=hr();return t.jsxs("form",{onSubmit:e(s),id:"connect-form",children:[t.jsx(lr,{loadingComponents:o,open:r||n.isPending}),t.jsx(rr,{}),t.jsx(Xe,{}),t.jsx(ar,{})]})}function pr(){const{schema:e}=X(),r=$({shouldUnregister:!0,mode:"onChange",resolver:B(e)});return t.jsx(V,{...r,children:t.jsxs(O,{children:[t.jsx(T,{children:"Connect to your Cloud"}),t.jsx(D,{children:t.jsx(xr,{})}),t.jsx(E,{children:t.jsx(yr,{})})]})})}function yr(){const{formState:{isValid:e,isSubmitting:r}}=y(),s=!!Le();return t.jsx(w,{className:"justify-center gap-2",disabled:!e||s||r,form:"connect-form",size:"md",children:s||r?"Loading...":"Next"})}function jr(){const{data:e,setData:r}=C(),s=bt(),{toast:n}=Me(),{setCurrentStep:o}=k(),{mutate:a}=vt({onError:d=>{d instanceof Error&&n({status:"error",emphasis:"subtle",icon:t.jsx(ht,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess:async d=>{r(c=>I(c,m=>{m.createdStackId=d.id})),o(c=>c+1),s.invalidateQueries({queryKey:qe.all})}});if(!e.fullstackResources)return o(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const i=e.fullstackResources.components_resources_info.container_registry,u=i.flatMap(d=>d.accessible_by_service_connector.map(c=>({...d,value:c})));function f({flavor:d,resourceId:c}){const m=i.find(x=>x.flavor===d);if(!m)return;const l=I(e,x=>{x.registryConfig={flavor:d,configuration:Object.fromEntries(Object.keys(m.required_configuration||{}).map(p=>[p,c])),service_connector_resource_id:c}});r(l),a({workspaceId:"default",payload:{name:l.stackName||Math.random().toString(36).substring(7),service_connectors:l.connectorConfig?[l.connectorConfig]:[],components:{orchestrator:[{...l.orchestratorConfig,service_connector_index:0}],artifact_store:[{...l.artifactStoreConfig,service_connector_index:0}],container_registry:[{...l.registryConfig,service_connector_index:0}]}}})}return{handleFormSubmit:f,flattenedInstances:u}}const gr="container_registry";function _r(){const[e,r]=_.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:i,trigger:u,reset:f}=y(),{flattenedInstances:d,handleFormSubmit:c}=jr(),m=d.filter(l=>l.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(W,{placeholder:"Search...",onChange:l=>{f(),r(l.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...a("flavor")}),t.jsx("ul",{className:"space-y-1",children:m.map(l=>t.jsx("li",{children:t.jsx(b,{name:"resourceId",control:s,render:({field:{onChange:x,...p}})=>t.jsxs(H,{"data-state":i("resourceId")===l.value?"selected":"unselected",htmlFor:l.value,children:[t.jsx(K,{id:l.value,type:"radio",...p,onChange:S=>{n("flavor",l.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),x(S.target.value),u()},value:l.value,name:"connector-radio"}),t.jsx(q,{width:24,height:24,type:gr,flavor:l.flavor})," ",t.jsx("span",{children:l.value})]})})},l.value))})]})]})}function vr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(Se,{type:"container_registry",className:"h-5 w-5 fill-primary-400"}),"Select your Container Registry"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the Container Registries for your new stack"})]})})}const Sr=h.object({flavor:h.string().min(1),resourceId:h.string().min(1)});function br(){const e=$({resolver:B(Sr),shouldUnregister:!0});return t.jsx(V,{...e,children:t.jsxs(O,{children:[t.jsx(T,{children:"Container Registry"}),t.jsx(D,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(vr,{}),t.jsx(_r,{})]})}),t.jsx(E,{children:t.jsx(Cr,{})})]})})}function Cr(){const e=y(),r=!!Le();return t.jsxs(w,{className:"justify-center gap-2",disabled:!e.formState.isValid||r,form:"artifact-store-form",size:"md",children:[r&&t.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),r?"Loading...":"Next"]})}function wr(){var a;const{data:e,setData:r}=C(),{setCurrentStep:s}=k();if(!e.fullstackResources)return s(2),{orchestrators:[],handleFormSubmit:()=>{}};const n=((a=e.fullstackResources.components_resources_info)==null?void 0:a.orchestrator)||[];function o({flavor:i,resourceId:u,...f}){const d=n.find(c=>c.flavor===i);d&&(r(c=>{const m=d!=null&&d.use_resource_value_as_fixed_config?Object.fromEntries(Object.keys(d.required_configuration||{}).map(l=>[l,u])):{...f};return I(c,l=>{l.orchestratorConfig={flavor:i,configuration:m,service_connector_resource_id:u}})}),s(c=>c+1))}return{orchestrators:n,handleFormSubmit:o}}const ye=h.object({flavor:h.string().min(1),resourceId:h.string().min(1)});function Nr(e){const r=Object.keys(e).reduce((s,n)=>(s[n]=h.string().trim().min(1),s),{});return h.object(r)}const Z="kubernetes",Te="orchestrator";function Fr(){const{orchestrators:e,handleFormSubmit:r}=wr(),{setSchema:s}=X(),{control:n,watch:o,setValue:a,register:i,reset:u,handleSubmit:f}=y(),d=o("flavor");return t.jsxs("form",{onSubmit:f(r),id:"artifact-store-form",children:[d!==Z&&t.jsx("input",{...i("resourceId"),type:"hidden"}),t.jsx("ul",{className:"space-y-1",children:e.map((c,m)=>t.jsxs("li",{children:[t.jsx(b,{control:n,name:"flavor",render:({field:{onChange:l,...x}})=>t.jsxs(H,{"data-state":d===c.flavor?"selected":"unselected",htmlFor:c.flavor,children:[t.jsx(K,{onChange:p=>{u({flavor:c.flavor}),c.use_resource_value_as_fixed_config===!0&&s(ye),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&s(ye.merge(Nr(c.required_configuration))),c.flavor!==Z&&c.accessible_by_service_connector.length>0&&a("resourceId",c.accessible_by_service_connector[0]),l(p)},...x,id:c.flavor,type:"radio",value:c.flavor,name:"orchestrator-flavor-radio"}),t.jsx(q,{width:24,height:24,type:Te,flavor:c.flavor}),t.jsx("span",{children:c.flavor_display_name})]})}),d===c.flavor&&(c.flavor===Z||c.use_resource_value_as_fixed_config===!1)&&t.jsxs("div",{className:"space-y-3 py-5 pl-8",children:[c.flavor===Z&&t.jsx("ul",{className:"space-y-1",children:c.accessible_by_service_connector.map(l=>t.jsx("li",{children:t.jsx(b,{control:n,name:"resourceId",render:({field:x})=>t.jsxs(H,{"data-state":o("resourceId")===l?"selected":"unselected",htmlFor:l,children:[t.jsx(K,{...x,id:l,type:"radio",value:l,name:"instance-radio"}),t.jsx(q,{type:Te,width:24,height:24,flavor:c.flavor}),t.jsx("span",{children:l})]})})},l))}),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&Object.keys(c.required_configuration).length>=1&&t.jsx("div",{children:Object.entries(c.required_configuration).map(([l,x])=>t.jsx("div",{children:t.jsx(b,{name:l,control:n,render:({field:p})=>t.jsxs("div",{children:[t.jsx("label",{htmlFor:l,className:"text-text-sm",children:x}),t.jsx(W,{...p,inputSize:"md",required:!0,className:"w-full",id:l})]})})},l))})]})]},m))})]})}function Pr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(Se,{type:"orchestrator",className:"h-5 w-5 fill-primary-400"}),"Select your Orchestrator"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the connected orchestrators for your new stack"})]})})}function kr(){const{schema:e}=X(),r=$({resolver:B(e),shouldUnregister:!0,defaultValues:{resourceId:""}});return t.jsx(V,{...r,children:t.jsxs(O,{children:[t.jsx(T,{children:"Orchestrator"}),t.jsxs(D,{children:[t.jsx(Pr,{}),t.jsx(Fr,{})]}),t.jsx(E,{children:t.jsx(Ar,{})})]})})}function Ar(){const e=y();return t.jsx(w,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const zr=h.object({provider:h.string().min(1)});function Ir(){var a;const{setData:e,data:r}=C(),{setCurrentStep:s}=k(),n=$({resolver:B(zr),defaultValues:{provider:((a=r.connectorConfig)==null?void 0:a.type)||""}});function o(i){e(u=>({...u,connectorConfig:{type:i.provider,auth_method:""}})),s(u=>u+1)}return t.jsx(V,{...n,children:t.jsxs(O,{children:[t.jsx(T,{children:"Select Your Existing Cloud Infrastructure"}),t.jsx(D,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where you have existing infrastructure to connect with ZenML. This will allow you to integrate your current cloud resources with ZenML for model deployment and management."})]}),t.jsxs("form",{id:"provider-form",onSubmit:n.handleSubmit(o),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",children:[t.jsx(oe,{id:"aws-provider",...n.register("provider"),value:"aws",children:t.jsx(ie,{icon:t.jsx(M,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"Connect your existing S3, ECR, and Sagemaker components to ZenML"})}),t.jsx(oe,{id:"gcp-provider",...n.register("provider"),value:"gcp",children:t.jsx(ie,{icon:t.jsx(M,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Link your GCS, Artifact Registry, and Vertex AI components to ZenML"})}),t.jsx(oe,{id:"azure-provider",...n.register("provider"),value:"azure",children:t.jsx(ie,{icon:t.jsx(M,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Integrate ZenML with your Blob Storage, Container Registry, and Azure ML"})})]})]})}),t.jsx(E,{children:t.jsx(Or,{})})]})})}function Or(){const{formState:{isValid:e}}=y();return t.jsx(w,{form:"provider-form",disabled:!e,size:"md",children:"Next"})}function Tr(){var o;const{data:e}=C(),r=J({...qe.stackDetail(e.createdStackId||""),throwOnError:!0});if(r.isError)return null;if(r.isPending)return t.jsx(Y,{className:"h-[200px] w-full"});const s=r.data,n=It((o=r.data.metadata)==null?void 0:o.components);return t.jsxs(O,{children:[t.jsx(T,{children:"Your stack"}),t.jsx(D,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsx("p",{className:"text-theme-text-secondary",children:"Here you can review the created stack and stack components. Now you can start running pipelines using this new configuration."}),t.jsxs("div",{className:"divide-y divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[t.jsx(Er,{stack:s}),n.map(a=>t.jsx(Mr,{component:a},a.id))]})]})}),t.jsx(E,{displayCancel:!1,children:t.jsx(Dr,{})})]})}function Dr(){return t.jsx(w,{size:"md",asChild:!0,children:t.jsx(Ot,{to:xt.stacks.overview,children:"Finish"})})}function Er({stack:e}){return t.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 font-semibold",children:[t.jsx(be,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(pt,{type:"square",size:"lg",children:t.jsx(yt,{size:"lg",children:e.name[0]})}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]})}function Mr({component:e}){var r,s,n,o;return t.jsxs("div",{className:"flex items-center justify-between py-3 pl-9 pr-5",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(be,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(q,{width:24,height:24,flavor:((r=e.body)==null?void 0:r.flavor)||"",type:((s=e.body)==null?void 0:s.type)||"orchestrator"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg font-semibold",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),t.jsx(zt,{type:((n=e.body)==null?void 0:n.type)||"alerter",children:jt((o=e.body)==null?void 0:o.type)})]},e.id)}function Rr(){const{currentStep:e}=k();if(e===1)return t.jsx(Ir,{});if(e===2)return t.jsx(Pe,{initialSchema:Ye,children:t.jsx(pr,{})});if(e===3)return t.jsx(Yt,{});if(e===4)return t.jsx(Pe,{initialSchema:ye,children:t.jsx(kr,{})});if(e===5)return t.jsx(br,{});if(e===6)return t.jsx(Tr,{})}const De=["Infrastructure Type","Cloud Provider","Connect your Cloud","Artifact Store","Orchestrator","Container Registry"];function us(){return t.jsx(et,{maxSteps:De.length+1,initialStep:1,children:t.jsx(Tt,{children:t.jsxs("section",{className:"layout-container flex flex-col gap-5 py-5 xl:flex-row",children:[t.jsx(tt,{entries:De}),t.jsx("div",{className:"w-full",children:t.jsx(Rr,{})})]})})})}export{us as default};
@@ -0,0 +1,6 @@
1
+ import{r as l,j as e}from"./@radix-DnFH_oo1.js";import{b as p,u as y,a as D,S as v,E as S}from"./SecretTooltip-BaMwHF-Q.js";import{a as h,c as w}from"./@tanstack-QbMbTrh5.js";import{ar as N,aE as b,ai as E,aj as k,ak as T,I as g,al as V,am as L,f as C,D as A,q as K,s as O,S as H,a7 as B,a8 as R,G as M,N as q,B as z}from"./index-Ci0nJ8EZ.js";import{C as F}from"./CopyButton-DcFHidFJ.js";import{S as I}from"./dots-horizontal-C6K59vUm.js";import{S as Q}from"./trash-DUWZWzse.js";import{A as P}from"./AlertDialogDropdownItem-xLR9a1iw.js";import{g as Z}from"./@react-router-APVeuk-U.js";import"./plus-Bc8eLSDM.js";import"./url-CbAPzsmT.js";import"./zod-uFd1wBcd.js";import"./index.esm-BE1uqCX5.js";import"./CodeSnippet-IxXNxUDa.js";import"./copy-CaGlDsUy.js";import"./@reactflow-ytavUpwh.js";const _=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99995 9C7.99995 5.13401 11.134 2 14.9999 2C18.8659 2 21.9999 5.13401 21.9999 9C21.9999 12.866 18.8659 16 14.9999 16C14.6816 16 14.3677 15.9787 14.0597 15.9373C13.8347 15.907 13.6939 15.8883 13.5912 15.8784C13.5729 15.8766 13.5579 15.8753 13.5458 15.8745C13.5428 15.8771 13.5395 15.8801 13.5359 15.8833C13.4825 15.9321 13.4121 16.0021 13.2862 16.128L11.7071 17.7071C11.5195 17.8946 11.2652 18 10.9999 18H9.99995V19C9.99995 19.5523 9.55223 20 8.99995 20H7.99995V21C7.99995 21.5523 7.55223 22 6.99995 22L4.56803 22C4.31565 22 4.06987 22.0001 3.86172 21.9831C3.63312 21.9644 3.36339 21.9203 3.09197 21.782C2.71564 21.5903 2.40968 21.2843 2.21793 20.908C2.07964 20.6366 2.03557 20.3668 2.01689 20.1382C1.99988 19.9301 1.99991 19.6843 1.99994 19.4319L1.99995 17.6627C1.99995 17.6462 1.9999 17.6291 1.99985 17.6117C1.99935 17.4218 1.99871 17.1827 2.05521 16.9473C2.1042 16.7432 2.18501 16.5482 2.29467 16.3692C2.42112 16.1629 2.59067 15.9942 2.72532 15.8603C2.73768 15.848 2.74975 15.836 2.76147 15.8243L7.87197 10.7138C7.99789 10.5878 8.06789 10.5175 8.1166 10.464C8.11984 10.4604 8.1228 10.4572 8.12549 10.4541C8.12461 10.442 8.12336 10.427 8.12159 10.4087C8.11168 10.3061 8.09292 10.1653 8.06267 9.94028C8.02127 9.63227 7.99995 9.31836 7.99995 9ZM7.99995 18V17C7.99995 16.4477 8.44766 16 8.99995 16H10.5857L11.872 14.7138C11.889 14.6967 11.9065 14.6791 11.9244 14.6611C12.1036 14.4807 12.3216 14.2613 12.5701 14.1224C12.8036 13.9919 12.9981 13.9262 13.2628 13.8884C13.4562 13.8607 13.6445 13.8742 13.7834 13.8876C13.928 13.9016 14.1065 13.9256 14.3084 13.9527L14.3262 13.9551C14.5461 13.9847 14.771 14 14.9999 14C17.7614 14 19.9999 11.7614 19.9999 9C19.9999 6.23858 17.7614 4 14.9999 4C12.2385 4 9.99995 6.23858 9.99995 9C9.99995 9.22899 10.0153 9.45388 10.0448 9.67379L10.0472 9.6916C10.0744 9.89344 10.0984 10.072 10.1123 10.2165C10.1258 10.3555 10.1393 10.5438 10.1116 10.7372C10.0737 11.0019 10.008 11.1964 9.87753 11.4298C9.73863 11.6783 9.5192 11.8963 9.33879 12.0756C9.32083 12.0934 9.30326 12.1109 9.28619 12.128L4.17568 17.2385C4.08305 17.3311 4.03699 17.3775 4.00494 17.4126C4.0041 17.4135 4.0033 17.4144 4.00253 17.4153C4.00247 17.4164 4.00241 17.4176 4.00236 17.4189C4.00019 17.4664 3.99995 17.5317 3.99995 17.6627V19.4C3.99995 19.6965 4.00072 19.8588 4.01025 19.9754C4.01063 19.98 4.01101 19.9844 4.01139 19.9885C4.01554 19.9889 4.01994 19.9893 4.02458 19.9897C4.14117 19.9992 4.30342 20 4.59995 20H5.99995V19C5.99995 18.4477 6.44766 18 6.99995 18H7.99995ZM13.9999 7C13.9999 6.44772 14.4477 6 14.9999 6C15.7662 6 16.5357 6.29309 17.1213 6.87868C17.7068 7.46425 17.9999 8.23372 17.9999 8.99991C18 9.5522 17.5523 9.99993 17 9.99994C16.4477 9.99996 16 9.55226 15.9999 8.99997C15.9999 8.74251 15.9025 8.48834 15.7071 8.29289C15.5116 8.09743 15.2574 8 14.9999 8C14.4477 8 13.9999 7.55229 13.9999 7Z"}));function $({secretId:s,keyName:r}){const{data:t,isLoading:a,isError:u}=h({...p.secretDetail(s)}),i=w(),{mutate:c}=y({onError(d){N(d)&&b({status:"error",emphasis:"subtle",description:d.message,rounded:!0})},onSuccess(){i.invalidateQueries({queryKey:["secrets"]}),i.invalidateQueries({queryKey:["secretDetail",s]})}}),[n,m]=l.useState(""),x=()=>{var d;if(t){const f={...(d=t.body)==null?void 0:d.values};delete f[r];const j={name:t.name,scope:"workspace",values:f};c({id:s,body:j})}};function o(d){m(d.target.value)}return a?e.jsx("div",{children:"Loading..."}):u?e.jsx("div",{children:"Error loading secret details"}):e.jsxs(E,{children:[e.jsx(k,{children:e.jsx(T,{children:"Delete Key"})}),e.jsxs("div",{className:"gap-5 p-5",children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Are you sure you want to delete this key?"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"This action cannot be undone."}),e.jsx("h3",{className:"font-inter text-sm mb-1 mt-4 text-left font-medium leading-5",children:"Please type DELETE to confirm"}),e.jsx(g,{name:"key",onChange:o,className:"w-full",required:!0,value:n})]}),e.jsxs(V,{className:"gap-[10px]",children:[e.jsx(L,{asChild:!0,children:e.jsx(C,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(C,{intent:"danger",type:"button",onClick:x,disabled:n!=="DELETE",children:"Delete"})]})]})}function G({secretId:s,keyName:r}){const[t,a]=l.useState(!1),[u,i]=l.useState(!1),c=l.useRef(null),n=l.useRef(null);function m(){n.current=c.current}function x(o){if(o===!1){a(!1),setTimeout(()=>{i(o)},200);return}i(o)}return e.jsxs(A,{onOpenChange:a,open:t,children:[e.jsx(K,{ref:c,children:e.jsx(I,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(O,{hidden:u,onCloseAutoFocus:o=>{n.current&&(n.current.focus(),n.current=null,o.preventDefault())},align:"end",sideOffset:7,children:e.jsx(P,{onSelect:m,onOpenChange:x,triggerChildren:"Delete ",icon:e.jsx(Q,{}),children:e.jsx($,{secretId:s,keyName:r})})})]})}const U=({value:s})=>{const[r,t]=l.useState(!1),a=typeof s=="string"?s:"",u="•".repeat(a.length);return e.jsxs("div",{className:"flex items-center gap-2 space-x-2",children:[e.jsx(v,{onClick:()=>t(!r),className:"h-4 w-4 flex-shrink-0"}),e.jsx("span",{children:r?a:u})]})};function J(s,r){return[{id:"key",header:"Key",accessorKey:"key",cell:({row:t})=>{const a=`from zenml.client import Client
2
+ secret = Client().get_secret(${r})
3
+
4
+ # 'secret.secret_values' will contain a dictionary with all key-value pairs within your secret.
5
+ secret.secret_values["${t.original.key}"]
6
+ `;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(_,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsx("div",{className:"flex flex-col",children:e.jsx("div",{className:"flex items-center space-x-1",children:e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t.original.key}),e.jsx(D,{code:a})]})})})]})}},{id:"value",header:"Value",accessorKey:"value",cell:({row:t})=>e.jsx(U,{value:t.getValue("value")})},{id:"actions",header:"",cell:({row:t})=>e.jsx(G,{secretId:s,keyName:t.original.key})}]}function W({secretId:s}){var c;const[r,t]=l.useState(""),a=h({...p.secretDetail(s)});if(a.isPending)return e.jsx(H,{className:"h-[200px] w-full"});if(a.isError)return e.jsx("div",{children:a.error.message});const i=Object.entries(((c=a.data.body)==null?void 0:c.values)||{}).map(([n,m])=>({key:n,value:m})).filter(n=>n.key.toLowerCase().includes(r.toLowerCase()));return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[e.jsx(g,{type:"text",placeholder:"Search Keys...",value:r,onChange:n=>t(n.target.value),inputSize:"md"}),e.jsxs(B,{children:[e.jsx(R,{asChild:!0,children:e.jsx(C,{size:"sm",intent:"primary",children:"Edit Keys"})}),e.jsx(S,{secretId:s,isSecretNameEditable:!1,dialogTitle:"Edit keys"})]})]}),e.jsx("div",{className:"w-full",children:e.jsx(M,{columns:J(s,a.data.name),data:i})})]})}function Ce(){const{secretId:s}=Z(),{setCurrentBreadcrumbData:r}=q(),{data:t}=h({...p.secretDetail(s||"")});return l.useEffect(()=>{t&&r({segment:"secretsDetail",data:{name:t.name,id:t.id}})},[t]),e.jsx(e.Fragment,{children:e.jsxs(z,{className:"space-y-5 p-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:t==null?void 0:t.name}),e.jsxs("div",{className:"group/copybutton flex items-center space-x-1",children:[e.jsx("div",{className:"text-theme-text-secondary",children:s==null?void 0:s.slice(0,8)}),e.jsx(F,{copyText:s})]})]}),e.jsx(W,{secretId:s||""})]})})}export{Ce as default};
@@ -1 +1 @@
1
- import{j as e}from"./@radix-DnFH_oo1.js";import{B as o,az as n}from"./index-B9wVwe7u.js";import{I as r}from"./Infobox-BL9NOS37.js";import{H as a}from"./Helpbox-CmfvtNeq.js";import{V as s,g as c}from"./Commands-DsoaVElZ.js";import"./@tanstack-QbMbTrh5.js";import"./@react-router-APVeuk-U.js";import"./@reactflow-B6kq9fJZ.js";import"./help-CwN931fX.js";import"./CodeSnippet-DNWdQmbo.js";import"./copy-CaGlDsUy.js";const l=[{command:"zenml code-repository register <NAME> --type=<CODE_REPOSITORY_TYPE] [--CODE_REPOSITORY_OPTIONS]",description:"Register a code repository"},{command:"zenml code-repository register <NAME> --type=custom --source=<CODE_REPOSITORY_SOURCE> [--CODE_REPOSITORY_OPTIONS]",description:"Use a custom repository "},{command:"zenml code-repository list",description:"List your registered code repositories"},{command:"zenml code-repository delete <REPOSITORY_NAME_OR_ID>",description:"Delete a code repository that you have previously registered"}],d="/assets/repos-video-D8kpu60k.svg";function m(){return e.jsx(r,{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:"We are creating a new Repositories experience"}),e.jsx("p",{children:"In the meanwhile you can use the CLI to add and manage your repos."})]})})}function p(){const t="https://zenml.portal.trainn.co/share/koVfVubiXfXLXtVcDAqPyg/embed?autoplay=false";return e.jsxs(o,{className:"flex flex-col-reverse items-stretch overflow-hidden md:flex-row",children:[e.jsxs("div",{className:"w-full p-7 md:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Learn More about Repositories"}),e.jsx("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:"Get started with ZenML Repositories for streamlined pipeline versioning and faster Docker builds."}),e.jsx(s,{videoLink:t,buttonText:"Watch the Starter Guide (2 min)"})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx(s,{fallbackImage:e.jsx("img",{src:d,alt:"Purple squares with text indicating a starter guide for secrets",className:"h-full w-full"}),videoLink:t,isButton:!1})})]})}function x(){return e.jsxs("section",{className:"space-y-5 pl-8 pr-5",children:[e.jsx(r,{className:"text-text-md",intent:"neutral",children:"Code repositories enable ZenML to keep track of the code version that you use for your pipeline runs. Additionally, running a pipeline which is tracked in a registered code repository can decrease the time it takes Docker to build images for containerized stack components."}),l.map((t,i)=>e.jsx(e.Fragment,{children:c(t)},i)),e.jsx(a,{text:"Check all the commands and find more about Repositories in our Docs",link:"https://docs.zenml.io/how-to/setting-up-a-project-repository/connect-your-git-repository"})]})}function k(){return e.jsxs(o,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Repositories"}),e.jsx(m,{}),e.jsx(p,{}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{}),"Administering your Code Repositories"]}),e.jsx(x,{})]})}export{k as default};
1
+ import{j as e}from"./@radix-DnFH_oo1.js";import{B as o,aD as n}from"./index-Ci0nJ8EZ.js";import{I as r}from"./Infobox-BTK_EUKT.js";import{H as a}from"./Helpbox-0pBpTwTm.js";import{V as s,g as c}from"./Commands-Bf-rd1z8.js";import"./@tanstack-QbMbTrh5.js";import"./@react-router-APVeuk-U.js";import"./@reactflow-ytavUpwh.js";import"./help-CwN931fX.js";import"./CodeSnippet-IxXNxUDa.js";import"./copy-CaGlDsUy.js";const l=[{command:"zenml code-repository register <NAME> --type=<CODE_REPOSITORY_TYPE] [--CODE_REPOSITORY_OPTIONS]",description:"Register a code repository"},{command:"zenml code-repository register <NAME> --type=custom --source=<CODE_REPOSITORY_SOURCE> [--CODE_REPOSITORY_OPTIONS]",description:"Use a custom repository "},{command:"zenml code-repository list",description:"List your registered code repositories"},{command:"zenml code-repository delete <REPOSITORY_NAME_OR_ID>",description:"Delete a code repository that you have previously registered"}],d="/assets/repos-video-D8kpu60k.svg";function m(){return e.jsx(r,{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:"We are creating a new Repositories experience"}),e.jsx("p",{children:"In the meanwhile you can use the CLI to add and manage your repos."})]})})}function p(){const t="https://zenml.portal.trainn.co/share/koVfVubiXfXLXtVcDAqPyg/embed?autoplay=false";return e.jsxs(o,{className:"flex flex-col-reverse items-stretch overflow-hidden md:flex-row",children:[e.jsxs("div",{className:"w-full p-7 md:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Learn More about Repositories"}),e.jsx("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:"Get started with ZenML Repositories for streamlined pipeline versioning and faster Docker builds."}),e.jsx(s,{videoLink:t,buttonText:"Watch the Starter Guide (2 min)"})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx(s,{fallbackImage:e.jsx("img",{src:d,alt:"Purple squares with text indicating a starter guide for secrets",className:"h-full w-full"}),videoLink:t,isButton:!1})})]})}function x(){return e.jsxs("section",{className:"space-y-5 pl-8 pr-5",children:[e.jsx(r,{className:"text-text-md",intent:"neutral",children:"Code repositories enable ZenML to keep track of the code version that you use for your pipeline runs. Additionally, running a pipeline which is tracked in a registered code repository can decrease the time it takes Docker to build images for containerized stack components."}),l.map((t,i)=>e.jsx(e.Fragment,{children:c(t)},i)),e.jsx(a,{text:"Check all the commands and find more about Repositories in our Docs",link:"https://docs.zenml.io/how-to/setting-up-a-project-repository/connect-your-git-repository"})]})}function k(){return e.jsxs(o,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Repositories"}),e.jsx(m,{}),e.jsx(p,{}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{}),"Administering your Code Repositories"]}),e.jsx(x,{})]})}export{k as default};
@@ -0,0 +1 @@
1
+ import{r as c,j as e}from"./@radix-DnFH_oo1.js";import{a9 as A,aa as E,ab as P,F as M,l as U,m as q,i as W,r as N,j as Q,ai as Y,ak as G,as as K,am as V,f as x,D as S,q as Z,s as J,V as X,a7 as ee,a8 as se,ac as R,ad as b,ae as C,Y as te,Z as ae,$ as re,S as u,A as I,b as z,B as ne,z as g,G as ie,N as ce,aF as le,P as oe}from"./index-Ci0nJ8EZ.js";import{S as de}from"./plus-Bc8eLSDM.js";import{S as me}from"./refresh-hfgWPeto.js";import{S as xe,P as ue}from"./SearchField-BzmfxS0L.js";import{s as h}from"./sharedSchema-vub0rii3.js";import{b as he,c as pe,a as f}from"./@tanstack-QbMbTrh5.js";import{b as fe,L as k,c as je}from"./@react-router-APVeuk-U.js";import{C as v}from"./CopyButton-DcFHidFJ.js";import{D as ge}from"./DisplayDate-DkCy54Bp.js";import{I as Ne}from"./InlineAvatar-CA3DFMcM.js";import{S as ye}from"./dots-horizontal-C6K59vUm.js";import{D as we,S as be}from"./DialogItem-Cd3HqST4.js";import{S as ke}from"./trash-DUWZWzse.js";import{I as y}from"./Infobox-BTK_EUKT.js";import{C as p}from"./CodeSnippet-IxXNxUDa.js";import{A as ve}from"./AlertDialogDropdownItem-xLR9a1iw.js";import{C as Se}from"./CollapsibleCard-BhutZbBL.js";import{F as Ce}from"./chevron-right-double-c9H46Kl8.js";import{e as D}from"./components-Br2ezRib.js";import{s as De}from"./url-CbAPzsmT.js";import{N as T}from"./NumberBox-CrN0_kqI.js";import{C as Te}from"./ComponentBadge-gKR1OIwG.js";import{p as F,c as Ae}from"./persist-BxIR2XZs.js";import{p as O,c as Ee}from"./persist-CfJMar_k.js";import"./@reactflow-ytavUpwh.js";import"./index-5GJ5ysEZ.js";import"./stack-detail-query-DQcyzG-2.js";import"./layout-Dru15_XR.js";import"./rocket-SESCGQXm.js";import"./copy-CaGlDsUy.js";import"./chevron-down-Cwb-W_B_.js";const $=c.forwardRef(({closeModal:s,name:t,...a},r)=>e.jsxs(A,{...a,ref:r,children:[e.jsx(E,{children:e.jsx(P,{children:"Update Stack"})}),e.jsxs("div",{className:"space-y-5 p-7",children:[e.jsx(Pe,{action:"update"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Update a stack"}),e.jsx(p,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml stack update ${t} -o NEW_ORCHESTRATOR_NAME`})]})]})]}));$.displayName="UpdateStackDialog";function Pe({action:s}){function t(){switch(s){case"delete":return"delete";case"update":return"update";case"describe":return"get details of"}}return e.jsx(y,{children:e.jsx("div",{className:"flex w-full flex-wrap justify-between gap-2",children:e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-text-sm font-semibold",children:"We are working on the new Stacks experience."}),e.jsxs("p",{className:"truncate text-text-sm",children:["Meanwhile you can use the CLI to ",t()," your stack."]})]})})})}async function Re({stackId:s},t){const a=U(q.stacks.detail(s)),r=await fetch(a,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json",...t?{Authorization:`Bearer ${t}`}:{}}});if(!r.ok){const n=await r.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>`Error while deleting stack ${s}`);throw new M({status:r.status,statusText:r.statusText,message:n})}return r.json()}function Ie(s){return he({...s,mutationFn:async({stackId:t})=>Re({stackId:t})})}function ze(s){const{toast:t}=W(),a=pe(),r=fe(),n=Ie({onSuccess:async()=>{a.invalidateQueries({queryKey:h.all}),r(N.stacks.overview)},onError:l=>{t({status:"error",emphasis:"subtle",icon:e.jsx(Q,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:l.message,rounded:!0})}});function i(){n.mutate({stackId:s})}return{handleDelete:i,deleteStack:n}}const B=c.forwardRef(({closeModal:s,name:t,stackId:a,...r},n)=>{const{handleDelete:i,deleteStack:l}=ze(a);return e.jsxs(Y,{...r,className:"p-0",ref:n,children:[e.jsxs(G,{className:"m-0 py-2 pl-5 pr-3 text-text-lg font-semibold",children:["Delete ",t]}),e.jsx("div",{className:"border-y border-theme-border-moderate px-5 py-5",children:e.jsxs(K,{children:["Are you sure you want to delete this stack? ",e.jsx("br",{}),"This action cannot be undone."]})}),e.jsxs("div",{className:"flex justify-end gap-3 px-5 py-3",children:[e.jsx(V,{onClick:()=>s==null?void 0:s(),asChild:!0,children:e.jsx(x,{intent:"secondary",children:"Cancel"})}),e.jsxs(x,{disabled:l.isPending,type:"button",onClick:()=>i(),intent:"danger",children:[l.isPending&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-error"}),"Delete"]})]})]})});B.displayName="DeleteStackDialog";function Fe({name:s,id:t}){const[a,r]=c.useState(!1),[n,i]=c.useState(!1),l=c.useRef(null),d=c.useRef(null);function o(){d.current=l.current}function m(j){r(j),j===!1&&i(!1)}return e.jsx(S,{open:n,onOpenChange:i,children:e.jsxs(S,{children:[e.jsx(Z,{className:"z-10",ref:l,children:e.jsx(ye,{className:"h-5 w-5 fill-theme-text-secondary"})}),e.jsxs(J,{hidden:a,onCloseAutoFocus:j=>{d.current&&(d.current.focus(),d.current=null,j.preventDefault())},className:"z-10",align:"end",sideOffset:1,children:[e.jsx(we,{onSelect:o,onOpenChange:m,icon:e.jsx(be,{className:"h-3 w-3 !fill-neutral-400"}),triggerChildren:"Update",children:e.jsx($,{name:s,className:"lg:min-w-[600px]",closeModal:()=>m(!1)})}),e.jsx(ve,{onSelect:o,onOpenChange:m,icon:e.jsx(ke,{className:"h-3 w-3 !fill-neutral-400"}),triggerChildren:"Delete",children:e.jsx(B,{stackId:t,name:s,className:"lg:min-w-[600px]",closeModal:()=>m(!1)})})]})]})})}function Oe(){return e.jsx("div",{className:"flex h-9 items-center border-b border-theme-border-moderate bg-theme-surface-primary px-4 py-3",children:e.jsxs(X,{className:"focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[e.jsx(Ce,{className:"h-5 w-5 fill-neutral-500"}),e.jsx("span",{className:"sr-only",children:"Close"})]})})}const L=c.forwardRef(({name:s,children:t,type:a,...r},n)=>e.jsxs(ee,{children:[e.jsx(se,{asChild:!0,children:t}),e.jsxs(A,{className:"w-fit max-w-fit",...r,ref:n,children:[e.jsx(E,{children:e.jsx(P,{children:R(a||"")})}),e.jsxs("div",{className:"space-y-5 p-7",children:[e.jsx($e,{type:a}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Describe your ",b(a)]}),e.jsx(p,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml ${C(a)} describe ${s}`})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Update your ",b(a)]}),e.jsx(p,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml ${C(a)} update ${s}`})]})]})]})]}));L.displayName="ComponentFallbackDialog";function $e({type:s}){return e.jsx(y,{children:e.jsx("div",{className:"flex w-full flex-wrap justify-between gap-2",children:e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-text-sm font-semibold",children:"We are working on the new Stacks experience."}),e.jsxs("p",{className:"truncate text-text-sm",children:["Meanwhile you can use the CLI to manage your ",b(s),"."]})]})})})}const _=c.createContext(null);function Be({children:s}){const[t,a]=c.useState([]);return e.jsx(_.Provider,{value:{integrations:t,setIntegrations:a},children:s})}function H(){const s=c.useContext(_);if(s===null)throw new Error("useIntegrationsContext must be used within an AuthProvider");return s}function Le({children:s,stackId:t,stackName:a}){return e.jsxs(te,{children:[e.jsx(ae,{children:s}),e.jsx(re,{className:"w-[1000px] overflow-y-auto",children:e.jsxs(Be,{children:[e.jsx(Oe,{}),e.jsx(_e,{stackId:t}),e.jsx(Ue,{name:a}),e.jsx(He,{stackId:t})]})})]})}function _e({stackId:s}){const t=f({...h.stackDetail(s)});return t.isError?null:t.isPending?e.jsx("div",{className:"p-5",children:e.jsx(u,{className:"h-6 w-full"})}):e.jsxs("div",{className:"flex items-center space-x-2 border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:[e.jsx(I,{type:"square",size:"lg",children:e.jsx(z,{size:"lg",children:t.data.name[0]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[e.jsx("p",{className:"mb-0.5 text-text-sm text-theme-text-secondary",children:t.data.id}),e.jsx(v,{copyText:t.data.id})]}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx("h2",{className:"text-display-xs font-semibold",children:t.data.name})})]})]})}function He({stackId:s}){var n;const{setIntegrations:t}=H(),a=f({...h.stackDetail(s)});if(c.useEffect(()=>{var d;if(!a.data)return;const l=D((d=a.data.metadata)==null?void 0:d.components).map(o=>{var m;return(m=o.body)==null?void 0:m.integration}).filter(o=>!!o&&o!=="built-in"&&o!=="custom");l.length>=1&&t(o=>Array.from(new Set([...o,...l])))},[a.data]),a.isError)return null;if(a.isPending)return e.jsx("div",{className:"p-5",children:e.jsx(u,{className:"h-[300px] w-full"})});const r=D((n=a.data.metadata)==null?void 0:n.components);return e.jsx("ul",{className:"space-y-5 p-5",children:r.map(i=>e.jsx("li",{children:e.jsx(Me,{component:i})},i.id))})}function Me({component:s}){var t,a,r,n,i;return e.jsxs(ne,{className:"flex items-center justify-between p-5",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("img",{width:32,height:32,alt:`${(t=s.body)==null?void 0:t.flavor} logo`,src:De(((a=s.body)==null?void 0:a.logo_url)||"")}),e.jsxs("div",{children:[e.jsx(L,{type:((r=s.body)==null?void 0:r.type)||"orchestrator",name:s.name,children:e.jsx("button",{className:"text-text-xl",children:s.name})}),e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:s.id.split("-")[0]}),e.jsx(v,{copyText:s.id})]})]})]}),e.jsx(Te,{type:((n=s.body)==null?void 0:n.type)||"orchestrator",children:R(((i=s.body)==null?void 0:i.type)||"")})]})}function Ue({name:s}){const{integrations:t}=H();return e.jsx("section",{className:"px-5 pt-5",children:e.jsx(Se,{title:e.jsx("span",{className:"text-text-lg",children:"Set this stack"}),children:e.jsxs("ul",{className:"space-y-5",children:[e.jsxs("li",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{children:"1"}),e.jsx("p",{className:"font-semibold",children:"Set your stack"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Set the stack as active on your client"}),e.jsx(p,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml stack set ${s}`})]})]}),t.length>=1&&e.jsxs("li",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{children:"2"}),e.jsx("p",{className:"font-semibold",children:"Install the integrations"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Install the required integrations to run pipelines in your stack"}),e.jsx(p,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml integration install ${t.join(" ")}`})]})]})]})})})}function qe(){return[{id:"name",header:"Stack",accessorFn:s=>({name:s.name,id:s.id}),cell:({getValue:s})=>{const{name:t,id:a}=s();return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(I,{type:"square",size:"md",children:e.jsx(z,{size:"md",children:t[0]})}),e.jsxs("div",{children:[e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(Le,{stackName:t,stackId:a,children:e.jsx("h2",{className:"text-text-md font-semibold",children:t})})}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:a.split("-")[0]}),e.jsx(v,{copyText:a})]})]})]})}},{id:"created",header:"Created at",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(ge,{dateString:s()})})},{id:"author",header:"Author",accessorFn:s=>{var t;return{author:(t=s.body)==null?void 0:t.user}},cell:({getValue:s})=>{const{author:t}=s();return t?e.jsx(Ne,{username:t.name}):null}},{id:"actions",header:"",accessorFn:s=>({name:s.name,id:s.id}),cell:({getValue:s})=>{const{id:t,name:a}=s();return e.jsx(Fe,{name:a,id:t})}}]}function We({setHasResumeableStack:s}){const{success:t,data:a}=F(),r=f({...h.stackDeploymentStack({provider:(a==null?void 0:a.provider)||"aws",stack_name:(a==null?void 0:a.stackName)||"",date_start:a==null?void 0:a.timestamp}),enabled:t,throwOnError:!0});return c.useEffect(()=>{r.data&&(Ae(),s(!1))},[r.data]),!t||r.isError?null:r.isPending?e.jsx(u,{className:"h-[70px] w-full"}):e.jsx(y,{className:"w-full",children:e.jsxs("section",{className:"flex flex-wrap items-center justify-between gap-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"font-semibold",children:"You have a Stack provision incomplete"}),e.jsx("p",{className:"text-text-sm",children:"Return to the setup and finish the configuration on your cloud provider"})]}),e.jsx("div",{children:e.jsx(x,{className:"w-fit bg-theme-surface-primary",intent:"primary",emphasis:"subtle",asChild:!0,children:e.jsx(k,{to:N.stacks.create.newInfra,children:e.jsx("span",{children:"Review Stack"})})})})]})})}const w=1,Qe=g.object({page:g.coerce.number().min(w).optional().default(w).catch(w),name:g.string().optional(),operator:g.enum(["and","or"]).optional()});function Ye(){const[s]=je(),{page:t,name:a,operator:r}=Qe.parse({page:s.get("page")||void 0,name:s.get("name")||void 0});return{page:t,name:a,logical_operator:r}}function Ge({setHasResumeableTerraform:s}){const{success:t,data:a}=O(),r=f({...h.stackDeploymentStack({provider:(a==null?void 0:a.provider)||"aws",stack_name:(a==null?void 0:a.stackName)||"",date_start:a==null?void 0:a.timestamp}),enabled:t,throwOnError:!0});return c.useEffect(()=>{r.data&&(Ee(),s(!1))},[r.data]),!t||r.isError?null:r.isPending?e.jsx(u,{className:"h-[70px] w-full"}):e.jsx(y,{className:"w-full",children:e.jsxs("section",{className:"flex flex-wrap items-center justify-between gap-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"font-semibold",children:"You have a Terraform Stack provision incomplete"}),e.jsx("p",{className:"text-text-sm",children:"Return to the setup and finish the configuration on your cloud provider"})]}),e.jsx("div",{children:e.jsx(x,{className:"w-fit bg-theme-surface-primary",intent:"primary",emphasis:"subtle",asChild:!0,children:e.jsx(k,{to:N.stacks.create.terraform,children:e.jsx("span",{children:"Review Stack"})})})})]})})}function Ke(){const[s,t]=c.useState(F().success),[a,r]=c.useState(O().success),n=Ye(),{refetch:i,data:l}=f({...h.stackList({...n,sort_by:"desc:updated"}),throwOnError:!0});return e.jsx("section",{className:"p-5",children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-y-4",children:[e.jsx(xe,{searchParams:n}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs(x,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>i(),children:[e.jsx(me,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]}),e.jsx(x,{size:"md",asChild:!0,children:e.jsxs(k,{to:N.stacks.create.index,children:[e.jsx(de,{className:"h-5 w-5 shrink-0 fill-white"}),e.jsx("span",{children:"New Stack"})]})})]})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[s&&e.jsx(We,{setHasResumeableStack:t}),a&&e.jsx(Ge,{setHasResumeableTerraform:r}),e.jsx("div",{className:"w-full",children:l?e.jsx(ie,{columns:qe(),data:l.items}):e.jsx(u,{className:"h-[500px] w-full"})}),l?l.total_pages>1&&e.jsx(ue,{searchParams:n,paginate:l}):e.jsx(u,{className:"h-[36px] w-[300px]"})]})]})})}function As(){const{setCurrentBreadcrumbData:s}=ce(),{setTourState:t,tourState:{tourActive:a}}=le();return c.useEffect(()=>{a&&t(r=>({...r,run:!0,stepIndex:r.stepIndex}))},[a]),c.useEffect(()=>{s({segment:"stacks",data:null})},[]),e.jsxs("div",{children:[e.jsx(Ve,{}),e.jsx(Ke,{})]})}function Ve(){return e.jsx(oe,{children:e.jsx("h1",{className:"text-display-xs font-semibold",children:"Stacks"})})}export{As as default};
@@ -0,0 +1 @@
1
+ import{r as d,j as e,aw as N,ax as B,ay as V,az as Z}from"./@radix-DnFH_oo1.js";import{l as q,m as H,k as K,n as G,F as W,a7 as J,a8 as X,a9 as Y,aa as ee,ab as te,ac as x,ae as se,z as l,T as re,v as ae,w as ne,W as oe,x as ie,I as E,U as ce,f as k,ad as le,r as O,i as de,j as me,Q as pe}from"./index-Ci0nJ8EZ.js";import{b as m,C as ue,u as he,F as xe}from"./index.esm-BE1uqCX5.js";import{i as fe,h as ge,j as je,a as ke,c as be}from"./@tanstack-QbMbTrh5.js";import{o as ye,s as ve}from"./url-CbAPzsmT.js";import{d as Ne}from"./index-5GJ5ysEZ.js";import{R as we,a as Se,u as Ce}from"./create-stack-F29xAUEx.js";import{C as Le}from"./CodeSnippet-IxXNxUDa.js";import{a as _e,s as Te}from"./sharedSchema-vub0rii3.js";import{C as P}from"./stack-detail-query-DQcyzG-2.js";import{D as ze}from"./DisplayDate-DkCy54Bp.js";import{I as Fe}from"./InlineAvatar-CA3DFMcM.js";import{S as Me}from"./check-circle-DOoS4yhF.js";import{L as Ie,b as Ae}from"./@react-router-APVeuk-U.js";import{w as De}from"./index-D-mtoBj3.js";import{t as $e}from"./zod-uFd1wBcd.js";import"./@reactflow-ytavUpwh.js";import"./copy-CaGlDsUy.js";import"./layout-Dru15_XR.js";import"./rocket-SESCGQXm.js";async function Ee(t){const s=q(H.components.all)+(t?`?${ye(t)}`:""),r=await K(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&G(),!r.ok){const n=await r.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching stack components");throw new W({status:r.status,statusText:r.statusText,message:n})}return r.json()}const Q={all:["components"],componentListInfinite:t=>fe({queryKey:[...Q.all,t],queryFn:async({pageParam:s})=>Ee({...t,page:s}),getNextPageParam:s=>s.index<s.total_pages?s.index+1:null,initialPageParam:1})},R=d.forwardRef(({closeModal:t,type:s,children:r,...n},o)=>e.jsxs(J,{children:[e.jsx(X,{asChild:!0,children:r}),e.jsxs(Y,{className:"max-w-2xl",...n,ref:o,children:[e.jsx(ee,{children:e.jsx(te,{children:"Create New "})}),e.jsx("div",{className:"space-y-5 overflow-auto p-7",children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Create a new ",x(s)]}),e.jsx(Le,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml ${se(s)} register ${s.toUpperCase()}_NAME --flavor=${s.toUpperCase()}_FLAVOR [--${s.toUpperCase()}_OPTIONS]`})]})})]})]}));R.displayName="UpdateStackDialog";const y=["orchestrator","artifact_store","container_registry","step_operator","model_deployer","feature_store","experiment_tracker","alerter","annotator","data_validator","image_builder","model_registry"],b=l.object({id:l.string().trim().min(1),name:l.string().trim().min(1),logoUrl:l.string().trim().min(1)}),Oe=y.reduce((t,s)=>(t[s]=b.nullable(),t),{}),Pe=l.object({stackName:_e,components:l.object({...Oe,orchestrator:b,artifact_store:b})}),w={helpLink:"https://docs.zenml.io/stack-components/orchestrators",description:"An orchestrator is a special kind of backend that manages the running of each step of the pipeline. Orchestrators administer the actual pipeline runs. By default, ZenML initializes your repository with an orchestrator that runs everything on your local machine."},S={helpLink:"https://docs.zenml.io/stack-components/artifact-stores",description:"The Artifact Store is a central component in any MLOps stack. As the name suggests, it acts as a data persistence layer where artifacts (e.g. datasets, models) ingested or generated by the machine learning pipelines are stored."},C={helpLink:"https://docs.zenml.io/stack-components/container-registries",description:"Container registry is used to store container images that are built to run machine learning pipelines in remote environments. Containerization of the pipeline code creates a portable environment that allows code to run in an isolated manner."},L={description:"Step operators allow you to run individual steps in a custom environment different from the default one used by your active orchestrator.",helpLink:"https://docs.zenml.io/stack-components/step-operators"},_={description:"Model deployers are stack components responsible for online model serving. They are responsible for deploying models to a remote server. Model deployers also act as a registry for models that are served with ZenML.",helpLink:"https://docs.zenml.io/stack-components/model-deployers"},T={description:"ZenML supports connecting to a Redis-backed Feast feature store as a stack component integration.",helpLink:"https://docs.zenml.io/stack-components/feature-stores"},z={description:"Experiment trackers let you track your ML experiments by logging the parameters and allowing you to compare between different runs.",helpLink:"https://docs.zenml.io/stack-components/experiment-trackers"},F={description:"Alerters allow you to send messages to chat services (like Slack, Discord, Mattermost, etc.) from within your pipelines. This is useful to immediately get notified when failures happen, for general monitoring/reporting, and also for building human-in-the-loop ML.",helpLink:"https://docs.zenml.io/stack-components/alerters "},M={description:"Annotators are a stack component that enables the use of data annotation as part of your ZenML stack and pipelines.",helpLink:"https://docs.zenml.io/stack-components/annotators"},I={description:"Data Validators used in ZenML pipelines usually generate data profiles and data quality check reports that are versioned and stored in the Artifact Store and can be retrieved and visualized later.",helpLink:"https://docs.zenml.io/stack-components/data-validators"},A={description:"The image builder is an essential part of most remote MLOps stacks. It is used to build container images such that your machine-learning pipelines and steps can be executed in remote environments.",helpLink:"https://docs.zenml.io/stack-components/image-builders"},D={description:"Model registries are centralized storage solutions for managing and tracking machine learning models across various stages of development and deployment.",helpLink:"https://docs.zenml.io/stack-components/model-registries"};function Qe({type:t}){const{description:s,link:r}=Re(t);return e.jsx(re,{children:e.jsxs(ae,{delayDuration:200,children:[e.jsxs(ne,{children:[e.jsx(oe,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"}),e.jsxs("div",{className:"sr-only",children:["Info for ",t]})]}),e.jsxs(ie,{align:"start",side:"bottom",className:"flex max-w-xl flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:s}),e.jsx("a",{className:"link mt-2 text-primary-400",target:"_blank",href:r,children:"Learn more"})]})]})})}function Re(t){switch(t){case"orchestrator":return{description:w.description,link:w.helpLink};case"alerter":return{description:F.description,link:F.helpLink};case"annotator":return{description:M.description,link:M.helpLink};case"artifact_store":return{description:S.description,link:S.helpLink};case"container_registry":return{description:C.description,link:C.helpLink};case"data_validator":return{description:I.description,link:I.helpLink};case"experiment_tracker":return{description:z.description,link:z.helpLink};case"feature_store":return{description:T.description,link:T.helpLink};case"image_builder":return{description:A.description,link:A.helpLink};case"model_deployer":return{description:_.description,link:_.helpLink};case"model_registry":return{description:D.description,link:D.helpLink};case"step_operator":return{description:L.description,link:L.helpLink}}}function Ue(){return e.jsxs(e.Fragment,{children:[y.map(t=>e.jsx(N,{className:"h-full space-y-5 p-5",value:t,children:e.jsx(Ze,{type:t})},t)),e.jsx(N,{className:"h-full",value:"",children:e.jsx("div",{className:"flex h-full w-full items-center justify-center text-theme-text-tertiary",children:"Select a category to add a new component"})})]})}function Be({type:t,search:s}){const r=ge({...Q.componentListInfinite({sort_by:"desc:updated",type:t,...s?{name:`contains:${s}`}:{}})}),{control:n,watch:o,setValue:c}=m();return r.isError?e.jsx("p",{children:"Error while fetching Components"}):r.isPending?e.jsx("div",{className:"flex w-full flex-1 items-center justify-center",children:e.jsx(ce,{})}):e.jsxs("div",{className:"space-y-1",children:[e.jsx("ul",{className:"space-y-1",children:r.data.pages.map(i=>i.items.map(a=>e.jsx("li",{children:e.jsx(ue,{name:`components.${t}.id`,control:n,render:({field:{onChange:g,...j}})=>{var p,u,f,h;return e.jsxs(we,{className:"justify-between bg-theme-surface-primary font-medium","data-state":o(`components.${t}.id`)===a.id?"selected":"unselected",htmlFor:a.id,children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(Se,{...j,id:a.id,type:"radio",value:a.id,onChange:U=>{var v;c(`components.${t}.name`,a.name),c(`components.${t}.logoUrl`,((v=a.body)==null?void 0:v.logo_url)||""),g(U)},checked:o(`components.${t}.id`)===a.id,name:t}),e.jsx("img",{alt:"flavor icon",src:ve(((p=a.body)==null?void 0:p.logo_url)||""),width:24,height:24}),e.jsxs("div",{className:"min-w-0 truncate",children:[e.jsx("div",{className:"truncate font-semibold",children:a.name}),e.jsx("div",{className:"truncate text-text-xs text-theme-text-secondary",children:a.id.split("-")[0]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-text-sm",children:[((f=(u=a.body)==null?void 0:u.user)==null?void 0:f.name)&&e.jsx(Fe,{username:a.body.user.name}),((h=a.body)==null?void 0:h.updated)&&e.jsx("div",{className:"whitespace-nowrap text-theme-text-secondary",children:e.jsx(ze,{short:!0,dateString:a.body.updated})})]})]})}})},a.id)))}),e.jsx(He,{type:t}),r.hasNextPage&&e.jsx(k,{onClick:()=>r.fetchNextPage(),type:"button",size:"md",intent:"secondary",emphasis:"subtle",className:"flex w-full items-center justify-center bg-theme-surface-primary",children:e.jsxs("div",{className:"flex items-center gap-1",children:[r.isFetchingNextPage&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Load more"]})})]})}function Ve({type:t}){return e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(P,{className:"h-5 w-5 fill-primary-400",type:t}),e.jsx("h2",{className:"text-text-lg font-semibold",children:x(t)}),e.jsx(Qe,{type:t})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Select a existing ",le(t)," from your server:"]})]})}function Ze({type:t}){const[s,r]=d.useState("");return e.jsxs(e.Fragment,{children:[e.jsx(Ve,{type:t}),e.jsx(qe,{search:s,setSearch:r}),e.jsx(Be,{search:s,type:t})]})}function qe({setSearch:t,search:s}){const[r,n]=d.useState(s),o=d.useCallback(Ne(t,500),[]);d.useEffect(()=>()=>{o.cancel()},[o]);function c(i){n(i),o(i)}return e.jsx(E,{value:r,onChange:i=>c(i.target.value),placeholder:"Search..."})}function He({type:t}){return e.jsx(R,{type:t,children:e.jsxs("button",{className:"w-full rounded-md border border-dashed border-neutral-300 bg-theme-surface-tertiary py-5 text-theme-text-secondary",children:["New ",x(t)]})})}function Ke({type:t}){const{watch:s,formState:{errors:r}}=m(),n=s(`components.${t}`),o=n&&n.id;return e.jsx("div",{"data-error":!o&&r.components&&r.components[t]?"true":"false","data-filled":o?"true":"false",className:"flex h-[110px] flex-col items-center justify-center space-y-2 truncate whitespace-nowrap rounded-md border border-theme-border-moderate bg-theme-surface-secondary py-5 text-center text-text-sm text-theme-text-secondary transition-all duration-150 hover:bg-theme-surface-primary hover:shadow-sm data-[error=true]:border-theme-text-error data-[filled=true]:border-success-400 data-[filled=true]:bg-theme-surface-primary data-[state=active]:bg-theme-surface-primary group-data-[state=active]/trigger:bg-theme-surface-primary group-data-[state=active]/trigger:shadow-md data-[error=false]:data-[filled=false]:group-data-[state=active]/trigger:border-theme-border-bold",children:o?e.jsx(Ge,{type:t}):e.jsx(We,{type:t})})}function Ge({type:t}){const{watch:s}=m(),r=s(`components.${t}`);return r&&r.id?e.jsxs("div",{className:"flex flex-col items-center gap-2 text-text-sm",children:[e.jsx("img",{width:24,height:24,src:r.logoUrl,alt:`Icon of ${r.name}`}),e.jsxs("div",{className:"space-y-0.25",children:[e.jsx("div",{className:"text-theme-text-primary",children:r.name}),e.jsx("div",{className:"text-text-xs text-theme-text-tertiary",children:x(t)})]})]}):null}function We({type:t}){return e.jsxs(e.Fragment,{children:[e.jsx(P,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong",type:t}),e.jsx("span",{children:x(t)})]})}function Je(){return e.jsxs("div",{className:"flex h-full flex-col justify-between space-y-5",children:[e.jsxs("div",{className:"space-y-5 p-5",children:[e.jsx(et,{}),e.jsx(Xe,{})]}),e.jsx(Ye,{})]})}function Xe(){const{watch:t,resetField:s}=m();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-text-lg font-semibold",children:"Add Components"}),e.jsxs("p",{className:"text-theme-text-secondary",children:["All stacks have at minimum an orchestrator and an artifact store."," ",e.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://docs.zenml.io/stack-components/component-guide",className:"link text-primary-400",children:"Learn more"})]})]}),e.jsx(B,{children:e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:y.map(r=>e.jsxs("div",{className:"relative",children:[e.jsx(V,{className:"group/trigger w-full",value:r,children:e.jsx(Ke,{type:r})}),t(`components.${r}.id`)&&e.jsx("button",{type:"button",onClick:n=>{n.preventDefault(),s(`components.${r}`)},className:"absolute right-[-12px] top-[-12px] flex aspect-square h-[28px] w-[28px] items-center justify-center rounded-rounded bg-theme-surface-primary",children:e.jsx(Me,{className:"h-5 w-5 shrink-0 fill-success-400"})})]},r))})})]})}function Ye(){const{formState:{isSubmitting:t}}=m(),s=!!je();return e.jsxs("div",{className:"flex items-center justify-end space-x-2 border-t border-theme-border-moderate p-5",children:[e.jsx(k,{asChild:!0,intent:"secondary",size:"md",children:e.jsx(Ie,{to:O.stacks.create.index,children:"Cancel"})}),e.jsxs(k,{className:"flex items-center gap-1",disabled:t||s,size:"md",children:[(s||t)&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Stack"]})]})}function et(){var r;const{register:t,formState:{errors:s}}=m();return e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-text-sm",htmlFor:"stack-name",children:"Stack Name"}),e.jsx(E,{id:"stack-name",className:`${s.stackName?"border-red-500":""} w-full`,placeholder:"zenml-stack",...t("stackName")}),s.stackName&&e.jsx("p",{className:"text-text-xs text-red-500",children:(r=s.stackName.message)==null?void 0:r.toString()})]})}function tt(){const t=ke({...De.workspaceDetail("default")}),{toast:s}=de(),r=Ae(),n=be(),o=Ce({onSuccess:async()=>{n.invalidateQueries({queryKey:Te.all}),r(O.stacks.overview)},onError:a=>{s({status:"error",emphasis:"subtle",icon:e.jsx(me,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:a.message,rounded:!0})}});function c(a){var p;const g=Object.entries(a.components).reduce((u,[f,h])=>(h&&(u[f]=[h.id]),u),{}),j={name:a.stackName,components:g};o.mutate({workspaceId:((p=t.data)==null?void 0:p.id)||"",payload:j})}const i=he({resolver:$e(Pe),defaultValues:{components:{alerter:null,orchestrator:{},annotator:null,artifact_store:{},container_registry:null,data_validator:null,experiment_tracker:null,feature_store:null,model_registry:null,image_builder:null,model_deployer:null,step_operator:null},stackName:""}});return{createManualStack:c,form:i}}function vt(){const[t,s]=d.useState(""),{createManualStack:r,form:n}=tt();return e.jsx(xe,{...n,children:e.jsx(Z,{value:t,onValueChange:s,className:"h-full",children:e.jsxs("form",{onSubmit:n.handleSubmit(r),className:"flex h-[calc(100vh_-_4rem_-_4rem_-_2px)] flex-1 flex-col divide-y divide-theme-border-moderate xl:flex-row-reverse xl:divide-x xl:divide-y-0 xl:divide-x-reverse",children:[e.jsx($,{className:"h-full flex-1 bg-theme-surface-primary",children:e.jsx(Je,{})}),e.jsx($,{children:e.jsx(Ue,{})})]})})})}function $({className:t,...s}){return e.jsx("div",{className:pe("w-full overflow-y-auto xl:w-1/2",t),...s})}export{vt as default};