prefect 3.6.16.dev5__py3-none-any.whl → 3.6.16.dev7__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 (286) hide show
  1. prefect/_build_info.py +3 -3
  2. prefect/cli/__init__.py +1 -0
  3. prefect/cli/cloud/asset.py +135 -0
  4. prefect/server/ui-v2/assets/artifact-card-BnPKAfkY.js +2 -0
  5. prefect/server/ui-v2/assets/artifact-card-BnPKAfkY.js.map +1 -0
  6. prefect/server/ui-v2/assets/artifact._id-vDOuIuta.js +2 -0
  7. prefect/server/ui-v2/assets/artifact._id-vDOuIuta.js.map +1 -0
  8. prefect/server/ui-v2/assets/automation-wizard-RlOhF90R.js +2 -0
  9. prefect/server/ui-v2/assets/automation-wizard-RlOhF90R.js.map +1 -0
  10. prefect/server/ui-v2/assets/automation._id-CEHa-X0X.js +2 -0
  11. prefect/server/ui-v2/assets/{automation._id-CMiura1b.js.map → automation._id-CEHa-X0X.js.map} +1 -1
  12. prefect/server/ui-v2/assets/{automation_._id.edit-Cbfcwa-K.js → automation_._id.edit-BRWAsELa.js} +2 -2
  13. prefect/server/ui-v2/assets/{automation_._id.edit-Cbfcwa-K.js.map → automation_._id.edit-BRWAsELa.js.map} +1 -1
  14. prefect/server/ui-v2/assets/{automations-header-BxPCOE-0.js → automations-header-Dr6v5dPp.js} +2 -2
  15. prefect/server/ui-v2/assets/{automations-header-BxPCOE-0.js.map → automations-header-Dr6v5dPp.js.map} +1 -1
  16. prefect/server/ui-v2/assets/base-job-template-form-section-C8_R96gO.js +2 -0
  17. prefect/server/ui-v2/assets/base-job-template-form-section-C8_R96gO.js.map +1 -0
  18. prefect/server/ui-v2/assets/block-type-details-tAkUWqs1.js +2 -0
  19. prefect/server/ui-v2/assets/block-type-details-tAkUWqs1.js.map +1 -0
  20. prefect/server/ui-v2/assets/block-type-logo-scnMsyY5.js +2 -0
  21. prefect/server/ui-v2/assets/{block-type-logo-DuvU7goV.js.map → block-type-logo-scnMsyY5.js.map} +1 -1
  22. prefect/server/ui-v2/assets/block._id-BY42cyjR.js +2 -0
  23. prefect/server/ui-v2/assets/block._id-BY42cyjR.js.map +1 -0
  24. prefect/server/ui-v2/assets/{block_._id.edit-C4SmoQ4y.js → block_._id.edit-n2jwU5yr.js} +2 -2
  25. prefect/server/ui-v2/assets/{block_._id.edit-C4SmoQ4y.js.map → block_._id.edit-n2jwU5yr.js.map} +1 -1
  26. prefect/server/ui-v2/assets/catalog-5_GoCKpb.js +2 -0
  27. prefect/server/ui-v2/assets/catalog-5_GoCKpb.js.map +1 -0
  28. prefect/server/ui-v2/assets/catalog_._slug-sZvt0fDy.js +2 -0
  29. prefect/server/ui-v2/assets/catalog_._slug-sZvt0fDy.js.map +1 -0
  30. prefect/server/ui-v2/assets/{catalog_._slug_.create-CgKL4TS2.js → catalog_._slug_.create-rboQmoyW.js} +2 -2
  31. prefect/server/ui-v2/assets/{catalog_._slug_.create-CgKL4TS2.js.map → catalog_._slug_.create-rboQmoyW.js.map} +1 -1
  32. prefect/server/ui-v2/assets/{collapsible-DZbPzSgr.js → collapsible-Lk7MRvBH.js} +2 -2
  33. prefect/server/ui-v2/assets/{collapsible-DZbPzSgr.js.map → collapsible-Lk7MRvBH.js.map} +1 -1
  34. prefect/server/ui-v2/assets/concurrency-limit._id-D5i9zZJh.js +2 -0
  35. prefect/server/ui-v2/assets/concurrency-limit._id-D5i9zZJh.js.map +1 -0
  36. prefect/server/ui-v2/assets/create-CtsA2QIl.js +2 -0
  37. prefect/server/ui-v2/assets/{create-BrNwbpVu.js.map → create-CtsA2QIl.js.map} +1 -1
  38. prefect/server/ui-v2/assets/{create-DWgkh2HT.js → create-DJPAEZ93.js} +2 -2
  39. prefect/server/ui-v2/assets/create-DJPAEZ93.js.map +1 -0
  40. prefect/server/ui-v2/assets/{data-table-QSHqmTar.js → data-table-bk-0xKWT.js} +2 -2
  41. prefect/server/ui-v2/assets/{data-table-QSHqmTar.js.map → data-table-bk-0xKWT.js.map} +1 -1
  42. prefect/server/ui-v2/assets/{delete-confirmation-dialog-dLycVNo4.js → delete-confirmation-dialog-BZg9EOfN.js} +2 -2
  43. prefect/server/ui-v2/assets/{delete-confirmation-dialog-dLycVNo4.js.map → delete-confirmation-dialog-BZg9EOfN.js.map} +1 -1
  44. prefect/server/ui-v2/assets/{deployment-action-header-CzvBTL6H.js → deployment-action-header-DwuMPgVg.js} +2 -2
  45. prefect/server/ui-v2/assets/{deployment-action-header-CzvBTL6H.js.map → deployment-action-header-DwuMPgVg.js.map} +1 -1
  46. prefect/server/ui-v2/assets/deployment-form-BpKkzEf2.js +3 -0
  47. prefect/server/ui-v2/assets/deployment-form-BpKkzEf2.js.map +1 -0
  48. prefect/server/ui-v2/assets/{deployment-links-CGjJpxJA.js → deployment-links-B67P-6Ph.js} +2 -2
  49. prefect/server/ui-v2/assets/{deployment-links-CGjJpxJA.js.map → deployment-links-B67P-6Ph.js.map} +1 -1
  50. prefect/server/ui-v2/assets/{deployment._id-DXrb6frJ.js → deployment._id-BVOBfMVf.js} +2 -2
  51. prefect/server/ui-v2/assets/deployment._id-BVOBfMVf.js.map +1 -0
  52. prefect/server/ui-v2/assets/deployment._id-KOMC9fpE.js +2 -0
  53. prefect/server/ui-v2/assets/deployment._id-KOMC9fpE.js.map +1 -0
  54. prefect/server/ui-v2/assets/deployment_._id.duplicate-BPk2SchT.js +2 -0
  55. prefect/server/ui-v2/assets/deployment_._id.duplicate-BPk2SchT.js.map +1 -0
  56. prefect/server/ui-v2/assets/deployment_._id.edit-Dv0M_huv.js +2 -0
  57. prefect/server/ui-v2/assets/deployment_._id.edit-Dv0M_huv.js.map +1 -0
  58. prefect/server/ui-v2/assets/deployment_._id.run-DFVA4Xhx.js +2 -0
  59. prefect/server/ui-v2/assets/{deployment_._id.run-CnacOmhY.js.map → deployment_._id.run-DFVA4Xhx.js.map} +1 -1
  60. prefect/server/ui-v2/assets/{dropdown-menu-B9LKPlz7.js → dropdown-menu-fRiq5bS-.js} +2 -2
  61. prefect/server/ui-v2/assets/{dropdown-menu-B9LKPlz7.js.map → dropdown-menu-fRiq5bS-.js.map} +1 -1
  62. prefect/server/ui-v2/assets/{event-resource-display-B42RIaiX.js → event-resource-display-C1ZAey-o.js} +2 -2
  63. prefect/server/ui-v2/assets/{event-resource-display-B42RIaiX.js.map → event-resource-display-C1ZAey-o.js.map} +1 -1
  64. prefect/server/ui-v2/assets/event._eventDate._eventId-CcbtP9Ag.js +2 -0
  65. prefect/server/ui-v2/assets/{event._eventDate._eventId-CKTuT_8S.js.map → event._eventDate._eventId-CcbtP9Ag.js.map} +1 -1
  66. prefect/server/ui-v2/assets/flow-run-graph-CycKStSg.js +2 -0
  67. prefect/server/ui-v2/assets/flow-run-graph-CycKStSg.js.map +1 -0
  68. prefect/server/ui-v2/assets/{flow-run._id-BKv9Meqc.js → flow-run._id-Dn9R_Tjy.js} +2 -2
  69. prefect/server/ui-v2/assets/flow-run._id-Dn9R_Tjy.js.map +1 -0
  70. prefect/server/ui-v2/assets/{flow-run._id-ZTkjj6bM.js → flow-run._id-Dwx7ojcj.js} +2 -2
  71. prefect/server/ui-v2/assets/flow-run._id-Dwx7ojcj.js.map +1 -0
  72. prefect/server/ui-v2/assets/flow-run._id-YzRd5jrC.js +4 -0
  73. prefect/server/ui-v2/assets/flow-run._id-YzRd5jrC.js.map +1 -0
  74. prefect/server/ui-v2/assets/flow-runs-pagination-DMLZFM1m.js +2 -0
  75. prefect/server/ui-v2/assets/flow-runs-pagination-DMLZFM1m.js.map +1 -0
  76. prefect/server/ui-v2/assets/flow._id-V6-Qhkwk.js +2 -0
  77. prefect/server/ui-v2/assets/flow._id-V6-Qhkwk.js.map +1 -0
  78. prefect/server/ui-v2/assets/{form-DOdmIC3A.js → form-Cl5Hk9bq.js} +2 -2
  79. prefect/server/ui-v2/assets/{form-DOdmIC3A.js.map → form-Cl5Hk9bq.js.map} +1 -1
  80. prefect/server/ui-v2/assets/{header-DcIuN5UN.js → header-BuI436ik.js} +2 -2
  81. prefect/server/ui-v2/assets/{header-DcIuN5UN.js.map → header-BuI436ik.js.map} +1 -1
  82. prefect/server/ui-v2/assets/{header-CnBwASd-.js → header-DcAQCxQl.js} +2 -2
  83. prefect/server/ui-v2/assets/{header-CnBwASd-.js.map → header-DcAQCxQl.js.map} +1 -1
  84. prefect/server/ui-v2/assets/{header-DxE-NzAK.js → header-qlcK4NLD.js} +2 -2
  85. prefect/server/ui-v2/assets/{header-DxE-NzAK.js.map → header-qlcK4NLD.js.map} +1 -1
  86. prefect/server/ui-v2/assets/index--Z69UYXV.js +2 -0
  87. prefect/server/ui-v2/assets/index--Z69UYXV.js.map +1 -0
  88. prefect/server/ui-v2/assets/{index-D0R9_LIL.js → index-BO4Qqsm8.js} +2 -2
  89. prefect/server/ui-v2/assets/index-BO4Qqsm8.js.map +1 -0
  90. prefect/server/ui-v2/assets/index-Bg45XS_V.js +2 -0
  91. prefect/server/ui-v2/assets/index-Bg45XS_V.js.map +1 -0
  92. prefect/server/ui-v2/assets/{index-BIBIJufF.js → index-BleYpDoN.js} +2 -2
  93. prefect/server/ui-v2/assets/index-BleYpDoN.js.map +1 -0
  94. prefect/server/ui-v2/assets/{index-DyOAqIOp.js → index-C63VUjOh.js} +2 -2
  95. prefect/server/ui-v2/assets/{index-DyOAqIOp.js.map → index-C63VUjOh.js.map} +1 -1
  96. prefect/server/ui-v2/assets/{index-DfKXdmko.js → index-C6LgWyJb.js} +2 -2
  97. prefect/server/ui-v2/assets/index-C6LgWyJb.js.map +1 -0
  98. prefect/server/ui-v2/assets/index-CE-bVgqj.js +2 -0
  99. prefect/server/ui-v2/assets/{index-DlAHvqFx.js.map → index-CE-bVgqj.js.map} +1 -1
  100. prefect/server/ui-v2/assets/{index-V_xTKaEb.js → index-CPpeVt8m.js} +13 -13
  101. prefect/server/ui-v2/assets/index-CPpeVt8m.js.map +1 -0
  102. prefect/server/ui-v2/assets/index-CYaUe0Ym.js +2 -0
  103. prefect/server/ui-v2/assets/index-CYaUe0Ym.js.map +1 -0
  104. prefect/server/ui-v2/assets/{index-C5RMFRyZ.js → index-Clbms0kg.js} +2 -2
  105. prefect/server/ui-v2/assets/index-Clbms0kg.js.map +1 -0
  106. prefect/server/ui-v2/assets/index-D13YFoYA.js +2 -0
  107. prefect/server/ui-v2/assets/index-D13YFoYA.js.map +1 -0
  108. prefect/server/ui-v2/assets/{index-Cx1qEoCK.js → index-D73a_nGu.js} +2 -2
  109. prefect/server/ui-v2/assets/{index-Cx1qEoCK.js.map → index-D73a_nGu.js.map} +1 -1
  110. prefect/server/ui-v2/assets/index-DJXBzX1E.css +1 -0
  111. prefect/server/ui-v2/assets/{index-BO60ehN6.js → index-DPPPaOr_.js} +2 -2
  112. prefect/server/ui-v2/assets/index-DPPPaOr_.js.map +1 -0
  113. prefect/server/ui-v2/assets/{index-DP8W-xJo.js → index-DU9ShbqW.js} +2 -2
  114. prefect/server/ui-v2/assets/index-DU9ShbqW.js.map +1 -0
  115. prefect/server/ui-v2/assets/index-DdR1lzZk.js +2 -0
  116. prefect/server/ui-v2/assets/index-DdR1lzZk.js.map +1 -0
  117. prefect/server/ui-v2/assets/{index-B9ttjsyu.js → index-ELo08q04.js} +2 -2
  118. prefect/server/ui-v2/assets/{index-B9ttjsyu.js.map → index-ELo08q04.js.map} +1 -1
  119. prefect/server/ui-v2/assets/{index-BTL1xHS9.js → index-cp6PTdHp.js} +2 -2
  120. prefect/server/ui-v2/assets/{index-BTL1xHS9.js.map → index-cp6PTdHp.js.map} +1 -1
  121. prefect/server/ui-v2/assets/{index-D6G96ToY.js → index-kM_g8J0u.js} +2 -2
  122. prefect/server/ui-v2/assets/{index-D6G96ToY.js.map → index-kM_g8J0u.js.map} +1 -1
  123. prefect/server/ui-v2/assets/{index-q5Y3hlDT.js → index-mYcm9Rkr.js} +2 -2
  124. prefect/server/ui-v2/assets/index-mYcm9Rkr.js.map +1 -0
  125. prefect/server/ui-v2/assets/{index-D9cOtoSU.js → index-yavn_NBp.js} +2 -2
  126. prefect/server/ui-v2/assets/index-yavn_NBp.js.map +1 -0
  127. prefect/server/ui-v2/assets/{json-input-YKJMJCcT.js → json-input-iUzf6BvZ.js} +2 -2
  128. prefect/server/ui-v2/assets/{json-input-YKJMJCcT.js.map → json-input-iUzf6BvZ.js.map} +1 -1
  129. prefect/server/ui-v2/assets/{key-value-RPUUqQ6F.js → key-value-DI27Dv4P.js} +2 -2
  130. prefect/server/ui-v2/assets/{key-value-RPUUqQ6F.js.map → key-value-DI27Dv4P.js.map} +1 -1
  131. prefect/server/ui-v2/assets/key._key-C-nk2nld.js +2 -0
  132. prefect/server/ui-v2/assets/key._key-C-nk2nld.js.map +1 -0
  133. prefect/server/ui-v2/assets/{lazy-markdown-B9vEkJ0h.js → lazy-markdown-D_y73qoD.js} +2 -2
  134. prefect/server/ui-v2/assets/{lazy-markdown-B9vEkJ0h.js.map → lazy-markdown-D_y73qoD.js.map} +1 -1
  135. prefect/server/ui-v2/assets/{login-C3PhSGQJ.js → login-DR_xuMmg.js} +2 -2
  136. prefect/server/ui-v2/assets/{login-C3PhSGQJ.js.map → login-DR_xuMmg.js.map} +1 -1
  137. prefect/server/ui-v2/assets/{markdown-input-Dei7u1qp.js → markdown-input-hzlzpUdj.js} +2 -2
  138. prefect/server/ui-v2/assets/{markdown-input-Dei7u1qp.js.map → markdown-input-hzlzpUdj.js.map} +1 -1
  139. prefect/server/ui-v2/assets/{python-example-snippet-DvulFxgw.js → python-example-snippet-d8bTNJ0J.js} +3 -3
  140. prefect/server/ui-v2/assets/{python-example-snippet-DvulFxgw.js.map → python-example-snippet-d8bTNJ0J.js.map} +1 -1
  141. prefect/server/ui-v2/assets/{python-input-niCawr8m.js → python-input-Bxdnzvx3.js} +2 -2
  142. prefect/server/ui-v2/assets/{python-input-niCawr8m.js.map → python-input-Bxdnzvx3.js.map} +1 -1
  143. prefect/server/ui-v2/assets/{radio-group-D55TQZsk.js → radio-group-0oOEMJCS.js} +2 -2
  144. prefect/server/ui-v2/assets/{radio-group-D55TQZsk.js.map → radio-group-0oOEMJCS.js.map} +1 -1
  145. prefect/server/ui-v2/assets/{route-error-state-Cu4m0LTX.js → route-error-state-BqbnZCc-.js} +2 -2
  146. prefect/server/ui-v2/assets/{route-error-state-Cu4m0LTX.js.map → route-error-state-BqbnZCc-.js.map} +1 -1
  147. prefect/server/ui-v2/assets/{schema-form-BQAcWW5k.js → schema-form-BD-WM4S0.js} +2 -2
  148. prefect/server/ui-v2/assets/{schema-form-BQAcWW5k.js.map → schema-form-BD-WM4S0.js.map} +1 -1
  149. prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-Cb4sTJle.js → schema-form-input-string-format-datetime-Dg3zVAp5.js} +4 -4
  150. prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-Cb4sTJle.js.map → schema-form-input-string-format-datetime-Dg3zVAp5.js.map} +1 -1
  151. prefect/server/ui-v2/assets/{settings-DV4ewZ_4.js → settings-Dm6yMLix.js} +2 -2
  152. prefect/server/ui-v2/assets/{settings-DV4ewZ_4.js.map → settings-Dm6yMLix.js.map} +1 -1
  153. prefect/server/ui-v2/assets/{sort-filter-DY7vgl7C.js → sort-filter-X6JyRc0-.js} +2 -2
  154. prefect/server/ui-v2/assets/{sort-filter-DY7vgl7C.js.map → sort-filter-X6JyRc0-.js.map} +1 -1
  155. prefect/server/ui-v2/assets/{table-ChOwO4Pk.js → table-Xyel2BEw.js} +2 -2
  156. prefect/server/ui-v2/assets/{table-ChOwO4Pk.js.map → table-Xyel2BEw.js.map} +1 -1
  157. prefect/server/ui-v2/assets/{tags-input-2KSBvO_K.js → tags-input-DqZ8v99z.js} +2 -2
  158. prefect/server/ui-v2/assets/{tags-input-2KSBvO_K.js.map → tags-input-DqZ8v99z.js.map} +1 -1
  159. prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-CNrP9yPQ.js → task-run-concurrency-limits-reset-dialog-5xFWeoYy.js} +2 -2
  160. prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-CNrP9yPQ.js.map → task-run-concurrency-limits-reset-dialog-5xFWeoYy.js.map} +1 -1
  161. prefect/server/ui-v2/assets/{task-run._id-cqXH0PMU.js → task-run._id-9DcrUEGz.js} +3 -3
  162. prefect/server/ui-v2/assets/{task-run._id-cqXH0PMU.js.map → task-run._id-9DcrUEGz.js.map} +1 -1
  163. prefect/server/ui-v2/assets/{task-run._id-CQGeAiBh.js → task-run._id-DJkoLl_e.js} +2 -2
  164. prefect/server/ui-v2/assets/task-run._id-DJkoLl_e.js.map +1 -0
  165. prefect/server/ui-v2/assets/task-runs-pagination-B2fSdB1t.js +2 -0
  166. prefect/server/ui-v2/assets/task-runs-pagination-B2fSdB1t.js.map +1 -0
  167. prefect/server/ui-v2/assets/{textarea-9v5uTuxg.js → textarea-DFEOJJdc.js} +2 -2
  168. prefect/server/ui-v2/assets/{textarea-9v5uTuxg.js.map → textarea-DFEOJJdc.js.map} +1 -1
  169. prefect/server/ui-v2/assets/{timezone-select-DPtR_b06.js → timezone-select-NViFNNLz.js} +2 -2
  170. prefect/server/ui-v2/assets/{timezone-select-DPtR_b06.js.map → timezone-select-NViFNNLz.js.map} +1 -1
  171. prefect/server/ui-v2/assets/{toggle-group-CBJphTE6.js → toggle-group-EMgSOoYH.js} +2 -2
  172. prefect/server/ui-v2/assets/{toggle-group-CBJphTE6.js.map → toggle-group-EMgSOoYH.js.map} +1 -1
  173. prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-BHgDXlwg.js +2 -0
  174. prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-BHgDXlwg.js.map +1 -0
  175. prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-BYY1b8yH.js → use-delete-block-document-confirmation-dialog-CxRkBKPg.js} +2 -2
  176. prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-BYY1b8yH.js.map → use-delete-block-document-confirmation-dialog-CxRkBKPg.js.map} +1 -1
  177. prefect/server/ui-v2/assets/use-flow-runs-selected-rows-Ck8nwx2q.js +2 -0
  178. prefect/server/ui-v2/assets/use-flow-runs-selected-rows-Ck8nwx2q.js.map +1 -0
  179. prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-BOTU5FPq.js → use-get-artifacts-flow-task-runs-D7Djt53s.js} +2 -2
  180. prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-BOTU5FPq.js.map → use-get-artifacts-flow-task-runs-D7Djt53s.js.map} +1 -1
  181. prefect/server/ui-v2/assets/{use-quick-run-DzSmbSlu.js → use-quick-run-Cpy0t7dX.js} +2 -2
  182. prefect/server/ui-v2/assets/{use-quick-run-DzSmbSlu.js.map → use-quick-run-Cpy0t7dX.js.map} +1 -1
  183. prefect/server/ui-v2/assets/{use-state-favicon-UFxhmhHr.js → use-state-favicon-CMsL9s6j.js} +2 -2
  184. prefect/server/ui-v2/assets/{use-state-favicon-UFxhmhHr.js.map → use-state-favicon-CMsL9s6j.js.map} +1 -1
  185. prefect/server/ui-v2/assets/use-stepper-CZZEx5js.js +2 -0
  186. prefect/server/ui-v2/assets/use-stepper-CZZEx5js.js.map +1 -0
  187. prefect/server/ui-v2/assets/{utilities-2FfCfMAV.js → utilities-D9BfvLg5.js} +2 -2
  188. prefect/server/ui-v2/assets/{utilities-2FfCfMAV.js.map → utilities-D9BfvLg5.js.map} +1 -1
  189. prefect/server/ui-v2/assets/work-pool-filter-dsJ6xeK6.js +2 -0
  190. prefect/server/ui-v2/assets/work-pool-filter-dsJ6xeK6.js.map +1 -0
  191. prefect/server/ui-v2/assets/{work-pool-queue-toggle-zSWhEFap.js → work-pool-queue-toggle-f_-cTWxB.js} +2 -2
  192. prefect/server/ui-v2/assets/{work-pool-queue-toggle-zSWhEFap.js.map → work-pool-queue-toggle-f_-cTWxB.js.map} +1 -1
  193. prefect/server/ui-v2/assets/{work-pool._workPoolName-BwIVfCIe.js → work-pool._workPoolName-zBqgkYLT.js} +2 -2
  194. prefect/server/ui-v2/assets/{work-pool._workPoolName-BwIVfCIe.js.map → work-pool._workPoolName-zBqgkYLT.js.map} +1 -1
  195. prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-j7cjgoJp.js → work-pool_._workPoolName.edit-B-8_CnfA.js} +2 -2
  196. prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-j7cjgoJp.js.map → work-pool_._workPoolName.edit-B-8_CnfA.js.map} +1 -1
  197. prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-BlFjSdoB.js → work-pool_._workPoolName.queue._workQueueName-DzrY1tMq.js} +2 -2
  198. prefect/server/ui-v2/assets/work-pool_._workPoolName.queue._workQueueName-DzrY1tMq.js.map +1 -0
  199. prefect/server/ui-v2/assets/{work-queue-icon-text-vWlRNW-b.js → work-queue-icon-text-BqqQ413o.js} +2 -2
  200. prefect/server/ui-v2/assets/{work-queue-icon-text-vWlRNW-b.js.map → work-queue-icon-text-BqqQ413o.js.map} +1 -1
  201. prefect/server/ui-v2/index.html +2 -2
  202. prefect/task_engine.py +26 -12
  203. prefect/workers/base.py +18 -1
  204. {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev7.dist-info}/METADATA +1 -1
  205. {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev7.dist-info}/RECORD +208 -207
  206. prefect/server/ui-v2/assets/artifact-card-DQfjRA2u.js +0 -2
  207. prefect/server/ui-v2/assets/artifact-card-DQfjRA2u.js.map +0 -1
  208. prefect/server/ui-v2/assets/artifact._id-BBhuX3px.js +0 -2
  209. prefect/server/ui-v2/assets/artifact._id-BBhuX3px.js.map +0 -1
  210. prefect/server/ui-v2/assets/automation-wizard-DeT-tz5i.js +0 -2
  211. prefect/server/ui-v2/assets/automation-wizard-DeT-tz5i.js.map +0 -1
  212. prefect/server/ui-v2/assets/automation._id-CMiura1b.js +0 -2
  213. prefect/server/ui-v2/assets/base-job-template-form-section-MeO0M71Y.js +0 -2
  214. prefect/server/ui-v2/assets/base-job-template-form-section-MeO0M71Y.js.map +0 -1
  215. prefect/server/ui-v2/assets/block-type-details-Bcb9qEO8.js +0 -2
  216. prefect/server/ui-v2/assets/block-type-details-Bcb9qEO8.js.map +0 -1
  217. prefect/server/ui-v2/assets/block-type-logo-DuvU7goV.js +0 -2
  218. prefect/server/ui-v2/assets/block._id-DFR6zmOy.js +0 -2
  219. prefect/server/ui-v2/assets/block._id-DFR6zmOy.js.map +0 -1
  220. prefect/server/ui-v2/assets/catalog-CPzaK8QS.js +0 -2
  221. prefect/server/ui-v2/assets/catalog-CPzaK8QS.js.map +0 -1
  222. prefect/server/ui-v2/assets/catalog_._slug-60h4tERz.js +0 -2
  223. prefect/server/ui-v2/assets/catalog_._slug-60h4tERz.js.map +0 -1
  224. prefect/server/ui-v2/assets/concurrency-limit._id-BFfR6_U0.js +0 -2
  225. prefect/server/ui-v2/assets/concurrency-limit._id-BFfR6_U0.js.map +0 -1
  226. prefect/server/ui-v2/assets/create-BrNwbpVu.js +0 -2
  227. prefect/server/ui-v2/assets/create-DWgkh2HT.js.map +0 -1
  228. prefect/server/ui-v2/assets/deployment-form-B33C7F2u.js +0 -3
  229. prefect/server/ui-v2/assets/deployment-form-B33C7F2u.js.map +0 -1
  230. prefect/server/ui-v2/assets/deployment._id-5rPcPD0T.js +0 -2
  231. prefect/server/ui-v2/assets/deployment._id-5rPcPD0T.js.map +0 -1
  232. prefect/server/ui-v2/assets/deployment._id-DXrb6frJ.js.map +0 -1
  233. prefect/server/ui-v2/assets/deployment_._id.duplicate-D7YLydeq.js +0 -2
  234. prefect/server/ui-v2/assets/deployment_._id.duplicate-D7YLydeq.js.map +0 -1
  235. prefect/server/ui-v2/assets/deployment_._id.edit-Daq0J0Ow.js +0 -2
  236. prefect/server/ui-v2/assets/deployment_._id.edit-Daq0J0Ow.js.map +0 -1
  237. prefect/server/ui-v2/assets/deployment_._id.run-CnacOmhY.js +0 -2
  238. prefect/server/ui-v2/assets/event._eventDate._eventId-CKTuT_8S.js +0 -2
  239. prefect/server/ui-v2/assets/flow-run-graph-OrT2Osbu.js +0 -2
  240. prefect/server/ui-v2/assets/flow-run-graph-OrT2Osbu.js.map +0 -1
  241. prefect/server/ui-v2/assets/flow-run._id-BKv9Meqc.js.map +0 -1
  242. prefect/server/ui-v2/assets/flow-run._id-DCYAnq0D.js +0 -4
  243. prefect/server/ui-v2/assets/flow-run._id-DCYAnq0D.js.map +0 -1
  244. prefect/server/ui-v2/assets/flow-run._id-ZTkjj6bM.js.map +0 -1
  245. prefect/server/ui-v2/assets/flow-runs-pagination-CykMKOhv.js +0 -2
  246. prefect/server/ui-v2/assets/flow-runs-pagination-CykMKOhv.js.map +0 -1
  247. prefect/server/ui-v2/assets/flow._id-DhrxqQmD.js +0 -2
  248. prefect/server/ui-v2/assets/flow._id-DhrxqQmD.js.map +0 -1
  249. prefect/server/ui-v2/assets/index-BIBIJufF.js.map +0 -1
  250. prefect/server/ui-v2/assets/index-BO60ehN6.js.map +0 -1
  251. prefect/server/ui-v2/assets/index-BS7fbJ2s.js +0 -2
  252. prefect/server/ui-v2/assets/index-BS7fbJ2s.js.map +0 -1
  253. prefect/server/ui-v2/assets/index-C5RMFRyZ.js.map +0 -1
  254. prefect/server/ui-v2/assets/index-D0R9_LIL.js.map +0 -1
  255. prefect/server/ui-v2/assets/index-D9cOtoSU.js.map +0 -1
  256. prefect/server/ui-v2/assets/index-DEpWUeaO.js +0 -2
  257. prefect/server/ui-v2/assets/index-DEpWUeaO.js.map +0 -1
  258. prefect/server/ui-v2/assets/index-DP8W-xJo.js.map +0 -1
  259. prefect/server/ui-v2/assets/index-DfKXdmko.js.map +0 -1
  260. prefect/server/ui-v2/assets/index-DiVKp6rW.js +0 -2
  261. prefect/server/ui-v2/assets/index-DiVKp6rW.js.map +0 -1
  262. prefect/server/ui-v2/assets/index-DlAHvqFx.js +0 -2
  263. prefect/server/ui-v2/assets/index-VNFzALsC.js +0 -2
  264. prefect/server/ui-v2/assets/index-VNFzALsC.js.map +0 -1
  265. prefect/server/ui-v2/assets/index-V_xTKaEb.js.map +0 -1
  266. prefect/server/ui-v2/assets/index-WIq8QUNT.js +0 -2
  267. prefect/server/ui-v2/assets/index-WIq8QUNT.js.map +0 -1
  268. prefect/server/ui-v2/assets/index-m9O-nIOl.css +0 -1
  269. prefect/server/ui-v2/assets/index-q5Y3hlDT.js.map +0 -1
  270. prefect/server/ui-v2/assets/key._key-CX8FwfwL.js +0 -2
  271. prefect/server/ui-v2/assets/key._key-CX8FwfwL.js.map +0 -1
  272. prefect/server/ui-v2/assets/task-run._id-CQGeAiBh.js.map +0 -1
  273. prefect/server/ui-v2/assets/task-runs-pagination-CYoOghEN.js +0 -2
  274. prefect/server/ui-v2/assets/task-runs-pagination-CYoOghEN.js.map +0 -1
  275. prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-DZplMJDW.js +0 -2
  276. prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-DZplMJDW.js.map +0 -1
  277. prefect/server/ui-v2/assets/use-flow-runs-selected-rows-1YE-VIgM.js +0 -2
  278. prefect/server/ui-v2/assets/use-flow-runs-selected-rows-1YE-VIgM.js.map +0 -1
  279. prefect/server/ui-v2/assets/use-stepper-CnGJHRLP.js +0 -2
  280. prefect/server/ui-v2/assets/use-stepper-CnGJHRLP.js.map +0 -1
  281. prefect/server/ui-v2/assets/work-pool-filter-CGfXNujK.js +0 -2
  282. prefect/server/ui-v2/assets/work-pool-filter-CGfXNujK.js.map +0 -1
  283. prefect/server/ui-v2/assets/work-pool_._workPoolName.queue._workQueueName-BlFjSdoB.js.map +0 -1
  284. {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev7.dist-info}/WHEEL +0 -0
  285. {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev7.dist-info}/entry_points.txt +0 -0
  286. {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev7.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"key-value-RPUUqQ6F.js","sources":["../../src/components/ui/key-value.tsx"],"sourcesContent":["import { toast } from \"sonner\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype KeyValueProps = {\n\tlabel: string;\n\tvalue: React.ReactNode;\n\tcopyable?: boolean;\n\tcopyValue?: string;\n};\n\nexport function KeyValue({ label, value, copyable, copyValue }: KeyValueProps) {\n\tconst handleCopy = () => {\n\t\tconst textToCopy = copyValue ?? (typeof value === \"string\" ? value : \"\");\n\t\tvoid navigator.clipboard.writeText(textToCopy);\n\t\ttoast.success(`${label} copied`);\n\t};\n\n\treturn (\n\t\t<dl className=\"flex flex-col gap-1\">\n\t\t\t<dt className=\"text-muted-foreground text-sm\">{label}</dt>\n\t\t\t<dd className=\"text-sm flex items-center gap-2\">\n\t\t\t\t{value}\n\t\t\t\t{copyable && (\n\t\t\t\t\t<Button variant=\"ghost\" size=\"icon\" onClick={handleCopy}>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</dd>\n\t\t</dl>\n\t);\n}\n"],"names":["KeyValue","label","value","copyable","copyValue","handleCopy","textToCopy","toast","jsxs","jsx","Button","Icon"],"mappings":"wGAWO,SAASA,EAAS,CAAE,MAAAC,EAAO,MAAAC,EAAO,SAAAC,EAAU,UAAAC,GAA4B,CAC9E,MAAMC,EAAa,IAAM,CACxB,MAAMC,EAAaF,IAAc,OAAOF,GAAU,SAAWA,EAAQ,IAChE,UAAU,UAAU,UAAUI,CAAU,EAC7CC,EAAM,QAAQ,GAAGN,CAAK,SAAS,CAChC,EAEA,OACCO,EAAAA,KAAC,KAAA,CAAG,UAAU,sBACb,SAAA,CAAAC,EAAAA,IAAC,KAAA,CAAG,UAAU,gCAAiC,SAAAR,EAAM,EACrDO,EAAAA,KAAC,KAAA,CAAG,UAAU,kCACZ,SAAA,CAAAN,EACAC,GACAM,EAAAA,IAACC,EAAA,CAAO,QAAQ,QAAQ,KAAK,OAAO,QAASL,EAC5C,eAACM,EAAA,CAAK,GAAG,OAAO,UAAU,SAAS,CAAA,CACpC,CAAA,CAAA,CAEF,CAAA,EACD,CAEF"}
1
+ {"version":3,"file":"key-value-DI27Dv4P.js","sources":["../../src/components/ui/key-value.tsx"],"sourcesContent":["import { toast } from \"sonner\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype KeyValueProps = {\n\tlabel: string;\n\tvalue: React.ReactNode;\n\tcopyable?: boolean;\n\tcopyValue?: string;\n};\n\nexport function KeyValue({ label, value, copyable, copyValue }: KeyValueProps) {\n\tconst handleCopy = () => {\n\t\tconst textToCopy = copyValue ?? (typeof value === \"string\" ? value : \"\");\n\t\tvoid navigator.clipboard.writeText(textToCopy);\n\t\ttoast.success(`${label} copied`);\n\t};\n\n\treturn (\n\t\t<dl className=\"flex flex-col gap-1\">\n\t\t\t<dt className=\"text-muted-foreground text-sm\">{label}</dt>\n\t\t\t<dd className=\"text-sm flex items-center gap-2\">\n\t\t\t\t{value}\n\t\t\t\t{copyable && (\n\t\t\t\t\t<Button variant=\"ghost\" size=\"icon\" onClick={handleCopy}>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</dd>\n\t\t</dl>\n\t);\n}\n"],"names":["KeyValue","label","value","copyable","copyValue","handleCopy","textToCopy","toast","jsxs","jsx","Button","Icon"],"mappings":"wGAWO,SAASA,EAAS,CAAE,MAAAC,EAAO,MAAAC,EAAO,SAAAC,EAAU,UAAAC,GAA4B,CAC9E,MAAMC,EAAa,IAAM,CACxB,MAAMC,EAAaF,IAAc,OAAOF,GAAU,SAAWA,EAAQ,IAChE,UAAU,UAAU,UAAUI,CAAU,EAC7CC,EAAM,QAAQ,GAAGN,CAAK,SAAS,CAChC,EAEA,OACCO,EAAAA,KAAC,KAAA,CAAG,UAAU,sBACb,SAAA,CAAAC,EAAAA,IAAC,KAAA,CAAG,UAAU,gCAAiC,SAAAR,EAAM,EACrDO,EAAAA,KAAC,KAAA,CAAG,UAAU,kCACZ,SAAA,CAAAN,EACAC,GACAM,EAAAA,IAACC,EAAA,CAAO,QAAQ,QAAQ,KAAK,OAAO,QAASL,EAC5C,eAACM,EAAA,CAAK,GAAG,OAAO,UAAU,SAAS,CAAA,CACpC,CAAA,CAAA,CAEF,CAAA,EACD,CAEF"}
@@ -0,0 +1,2 @@
1
+ import{j as e,r as l,L as d,s as m}from"./vendor-tanstack-BdLtprmr.js";import{aZ as r,D as u,I as x,B as f,g as p,h as i,bv as h,bE as j,C as b,aP as v,dy as g,by as N}from"./index-CPpeVt8m.js";import{u as y}from"./use-get-artifacts-flow-task-runs-D7Djt53s.js";import{L as w}from"./lazy-markdown-D_y73qoD.js";import{aF as k,aG as _,aH as C,aI as M,aJ as T,aK as z}from"./vendor-radix-CJc458uP.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./vendor-date-Cl1Jav-N.js";function I({className:s,...t}){return e.jsx(k,{"data-slot":"menubar",className:r("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",s),...t})}function L({...s}){return e.jsx(_,{"data-slot":"menubar-menu",...s})}function A({...s}){return e.jsx(z,{"data-slot":"menubar-portal",...s})}function B({className:s,...t}){return e.jsx(C,{"data-slot":"menubar-trigger",className:r("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",s),...t})}function E({className:s,align:t="start",alignOffset:a=-4,sideOffset:n=8,...c}){return e.jsx(A,{children:e.jsx(M,{"data-slot":"menubar-content",align:t,alignOffset:a,sideOffset:n,className:r("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] overflow-hidden rounded-md border p-1 shadow-md",s),...c})})}function R({className:s,inset:t,variant:a="default",...n}){return e.jsx(T,{"data-slot":"menubar-item","data-inset":t,"data-variant":a,className:r("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),...n})}const D=({artifactKey:s,pageHeader:t})=>{const a=l.useCallback(()=>{navigator.clipboard.writeText(s)},[s]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(F,{artifactKey:s}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(u,{id:"artifacts-guide",label:"Documentation"}),e.jsx(I,{children:e.jsxs(L,{children:[e.jsx(B,{className:"px-1",children:e.jsx(x,{id:"EllipsisVertical"})}),e.jsx(E,{children:e.jsx(R,{onClick:a,children:"Copy Id"})})]})})]})]}),t&&e.jsxs("div",{className:"",children:[e.jsx("h2",{className:"text-3xl font-semibold tracking-tight my-4 font-bold prose lg:prose-xl",children:e.jsx(w,{children:t})}),e.jsx("hr",{})]})]})},F=({artifactKey:s})=>e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(f,{children:e.jsxs(p,{children:[e.jsx(i,{children:e.jsx(h,{to:"/artifacts",className:"text-xl font-semibold",children:"Artifacts"})}),e.jsx(j,{}),e.jsx(i,{className:"text-xl font-semibold",children:s})]})})}),P=({artifact:s})=>{const t=l.useMemo(()=>s.id?.split("-")[0],[s.id]);return e.jsxs(b,{"data-testid":`timeline-card-${s.id}`,className:"flex flex-col p-4 m-2 transition-transform hover:translate-x-2 grow",children:[e.jsx(d,{to:"/artifacts/artifact/$id",params:{id:s.id??""},children:e.jsx("p",{className:"text-base font-bold text-blue-700 hover:underline",children:t})}),s.flow_run&&e.jsxs("p",{className:"text-sm",children:["Flow run:"," ",e.jsx(d,{className:"text-blue-700 hover:underline",to:"/runs/flow-run/$id",params:{id:s.flow_run_id??""},children:s.flow_run?.name})]}),s.task_run&&e.jsxs("p",{className:"text-sm",children:["Task run:"," ",e.jsx(d,{className:"text-blue-700 hover:underline",to:"/runs/task-run/$id",params:{id:s.task_run_id??""},children:s.task_run?.name})]})]})},$=({artifact:s})=>{const[t,a]=v(s.created??"","dateTime").split(" at ");return e.jsxs("div",{"data-testid":`timeline-row-${s.id}`,className:"flex",children:[e.jsxs("div",{className:"flex flex-col items-end justify-items-start pt-4",style:{width:"128px"},children:[e.jsx("p",{className:"text-base",children:a}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),e.jsx("div",{className:"w-10 flex flex-col",children:e.jsx("div",{className:"w-5 h-full border-r border-gray-200",children:e.jsx("div",{className:"size-4 rounded-full bg-white my-5 mx-auto border-2",style:{margin:"20px calc(50% + 2px)"}})})}),e.jsx("div",{className:"grow mt-1",children:e.jsx(P,{artifact:s})})]})},H=({artifacts:s})=>e.jsxs("div",{children:[s.map(t=>e.jsx($,{artifact:t},t.id)),e.jsxs("div",{className:"flex border-b",children:[e.jsx("div",{className:"flex flex-col items-end justify-items-start pt-4",style:{width:"128px",height:"88px"}}),e.jsx("div",{className:"w-10 flex flex-col",children:e.jsx("div",{className:"w-5 h-full border-r border-gray-200 pt-3",children:e.jsx("div",{className:"size-8 rounded-full bg-white my-5 mx-auto border-2 flex justify-center items-center",style:{margin:"20px calc(50% - 6px)"},children:e.jsx("div",{className:"size-4 rounded-full border-2 border-black relative"})})})}),e.jsx("div",{style:{padding:"33px 0 0 5px"},children:e.jsxs("p",{className:"text-lg",children:["Created ",e.jsx("span",{className:"font-bold",children:s[0].key})]})})]})]}),S=({artifactKey:s,artifacts:t})=>e.jsxs("div",{children:[e.jsx(D,{artifactKey:s,pageHeader:t[0]?.description??void 0}),e.jsx(H,{artifacts:t})]}),o=s=>({artifacts:{operator:"and_",key:{like_:s}},sort:"CREATED_DESC",offset:0});function U(){const{key:s}=g.useParams(),{data:t}=m(N(o(s))),a=y(o(s));return e.jsx("div",{children:e.jsx(S,{artifactKey:s,artifacts:a??t})})}export{U as component};
2
+ //# sourceMappingURL=key._key-C-nk2nld.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"key._key-C-nk2nld.js","sources":["../../src/components/ui/menubar.tsx","../../src/components/artifacts/key/artifacts-key-header.tsx","../../src/components/artifacts/key/timeline/timelineCard.tsx","../../src/components/artifacts/key/timeline/timelineRow.tsx","../../src/components/artifacts/key/timeline/timelineContainer.tsx","../../src/components/artifacts/key/artifacts-key-page.tsx","../../src/routes/artifacts/key.$key.tsx?tsr-split=component"],"sourcesContent":["import * as MenubarPrimitive from \"@radix-ui/react-menubar\";\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nfunction Menubar({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Root>) {\n\treturn (\n\t\t<MenubarPrimitive.Root\n\t\t\tdata-slot=\"menubar\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarMenu({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n\treturn <MenubarPrimitive.Menu data-slot=\"menubar-menu\" {...props} />;\n}\n\nfunction MenubarGroup({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n\treturn <MenubarPrimitive.Group data-slot=\"menubar-group\" {...props} />;\n}\n\nfunction MenubarPortal({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n\treturn <MenubarPrimitive.Portal data-slot=\"menubar-portal\" {...props} />;\n}\n\nfunction MenubarRadioGroup({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n\treturn (\n\t\t<MenubarPrimitive.RadioGroup data-slot=\"menubar-radio-group\" {...props} />\n\t);\n}\n\nfunction MenubarTrigger({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Trigger>) {\n\treturn (\n\t\t<MenubarPrimitive.Trigger\n\t\t\tdata-slot=\"menubar-trigger\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarContent({\n\tclassName,\n\talign = \"start\",\n\talignOffset = -4,\n\tsideOffset = 8,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Content>) {\n\treturn (\n\t\t<MenubarPortal>\n\t\t\t<MenubarPrimitive.Content\n\t\t\t\tdata-slot=\"menubar-content\"\n\t\t\t\talign={align}\n\t\t\t\talignOffset={alignOffset}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] overflow-hidden rounded-md border p-1 shadow-md\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</MenubarPortal>\n\t);\n}\n\nfunction MenubarItem({\n\tclassName,\n\tinset,\n\tvariant = \"default\",\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Item> & {\n\tinset?: boolean;\n\tvariant?: \"default\" | \"destructive\";\n}) {\n\treturn (\n\t\t<MenubarPrimitive.Item\n\t\t\tdata-slot=\"menubar-item\"\n\t\t\tdata-inset={inset}\n\t\t\tdata-variant={variant}\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarCheckboxItem({\n\tclassName,\n\tchildren,\n\tchecked,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>) {\n\treturn (\n\t\t<MenubarPrimitive.CheckboxItem\n\t\t\tdata-slot=\"menubar-checkbox-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tchecked={checked}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n\t\t\t\t<MenubarPrimitive.ItemIndicator>\n\t\t\t\t\t<CheckIcon className=\"size-4\" />\n\t\t\t\t</MenubarPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</MenubarPrimitive.CheckboxItem>\n\t);\n}\n\nfunction MenubarRadioItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.RadioItem>) {\n\treturn (\n\t\t<MenubarPrimitive.RadioItem\n\t\t\tdata-slot=\"menubar-radio-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n\t\t\t\t<MenubarPrimitive.ItemIndicator>\n\t\t\t\t\t<CircleIcon className=\"size-2 fill-current\" />\n\t\t\t\t</MenubarPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</MenubarPrimitive.RadioItem>\n\t);\n}\n\nfunction MenubarLabel({\n\tclassName,\n\tinset,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Label> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<MenubarPrimitive.Label\n\t\t\tdata-slot=\"menubar-label\"\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn(\n\t\t\t\t\"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarSeparator({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Separator>) {\n\treturn (\n\t\t<MenubarPrimitive.Separator\n\t\t\tdata-slot=\"menubar-separator\"\n\t\t\tclassName={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarShortcut({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"menubar-shortcut\"\n\t\t\tclassName={cn(\n\t\t\t\t\"text-muted-foreground ml-auto text-xs tracking-widest\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarSub({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n\treturn <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />;\n}\n\nfunction MenubarSubTrigger({\n\tclassName,\n\tinset,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<MenubarPrimitive.SubTrigger\n\t\t\tdata-slot=\"menubar-sub-trigger\"\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronRightIcon className=\"ml-auto h-4 w-4\" />\n\t\t</MenubarPrimitive.SubTrigger>\n\t);\n}\n\nfunction MenubarSubContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.SubContent>) {\n\treturn (\n\t\t<MenubarPrimitive.SubContent\n\t\t\tdata-slot=\"menubar-sub-content\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tMenubar,\n\tMenubarPortal,\n\tMenubarMenu,\n\tMenubarTrigger,\n\tMenubarContent,\n\tMenubarGroup,\n\tMenubarSeparator,\n\tMenubarLabel,\n\tMenubarItem,\n\tMenubarShortcut,\n\tMenubarCheckboxItem,\n\tMenubarRadioGroup,\n\tMenubarRadioItem,\n\tMenubarSub,\n\tMenubarSubTrigger,\n\tMenubarSubContent,\n};\n","import { useCallback } from \"react\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\nimport { Icon } from \"@/components/ui/icons\";\nimport { LazyMarkdown } from \"@/components/ui/lazy-markdown\";\nimport {\n\tMenubar,\n\tMenubarContent,\n\tMenubarItem,\n\tMenubarMenu,\n\tMenubarTrigger,\n} from \"@/components/ui/menubar\";\n\ntype ArtifactsKeyHeaderProps = {\n\tartifactKey: string;\n\tpageHeader?: string;\n};\n\nexport const ArtifactsKeyHeader = ({\n\tartifactKey,\n\tpageHeader,\n}: ArtifactsKeyHeaderProps) => {\n\tconst handleCopyId = useCallback(() => {\n\t\tvoid navigator.clipboard.writeText(artifactKey);\n\t}, [artifactKey]);\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t<Header artifactKey={artifactKey} />\n\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t<DocsLink id=\"artifacts-guide\" label=\"Documentation\" />\n\t\t\t\t\t{/* <Button variant=\"outline\" className=\"px-1\"><Icon id=\"EllipsisVertical\" /></Button> */}\n\t\t\t\t\t<Menubar>\n\t\t\t\t\t\t<MenubarMenu>\n\t\t\t\t\t\t\t<MenubarTrigger className=\"px-1\">\n\t\t\t\t\t\t\t\t<Icon id=\"EllipsisVertical\" />\n\t\t\t\t\t\t\t</MenubarTrigger>\n\t\t\t\t\t\t\t<MenubarContent>\n\t\t\t\t\t\t\t\t<MenubarItem onClick={handleCopyId}>Copy Id</MenubarItem>\n\t\t\t\t\t\t\t</MenubarContent>\n\t\t\t\t\t\t</MenubarMenu>\n\t\t\t\t\t</Menubar>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{pageHeader && (\n\t\t\t\t<div className=\"\">\n\t\t\t\t\t<h2 className=\"text-3xl font-semibold tracking-tight my-4 font-bold prose lg:prose-xl\">\n\t\t\t\t\t\t<LazyMarkdown>{pageHeader}</LazyMarkdown>\n\t\t\t\t\t</h2>\n\t\t\t\t\t<hr />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nconst Header = ({ artifactKey }: ArtifactsKeyHeaderProps) => (\n\t<div className=\"flex items-center gap-2\">\n\t\t<Breadcrumb>\n\t\t\t<BreadcrumbList>\n\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t<BreadcrumbLink to=\"/artifacts\" className=\"text-xl font-semibold\">\n\t\t\t\t\t\tArtifacts\n\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t\t<BreadcrumbSeparator />\n\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t{artifactKey}\n\t\t\t\t</BreadcrumbItem>\n\t\t\t</BreadcrumbList>\n\t\t</Breadcrumb>\n\t</div>\n);\n","import { Link } from \"@tanstack/react-router\";\nimport { useMemo } from \"react\";\nimport type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { Card } from \"@/components/ui/card\";\n\nexport type ArtifactTimelineCardProps = {\n\tartifact: ArtifactWithFlowRunAndTaskRun;\n};\n\nexport const ArtifactTimelineCard = ({\n\tartifact,\n}: ArtifactTimelineCardProps) => {\n\tconst artifactTitle = useMemo(() => {\n\t\treturn artifact.id?.split(\"-\")[0];\n\t}, [artifact.id]);\n\n\treturn (\n\t\t<Card\n\t\t\tdata-testid={`timeline-card-${artifact.id}`}\n\t\t\tclassName=\"flex flex-col p-4 m-2 transition-transform hover:translate-x-2 grow\"\n\t\t>\n\t\t\t<Link to=\"/artifacts/artifact/$id\" params={{ id: artifact.id ?? \"\" }}>\n\t\t\t\t<p className=\"text-base font-bold text-blue-700 hover:underline\">\n\t\t\t\t\t{artifactTitle}\n\t\t\t\t</p>\n\t\t\t</Link>\n\t\t\t{artifact.flow_run && (\n\t\t\t\t<p className=\"text-sm\">\n\t\t\t\t\tFlow run:{\" \"}\n\t\t\t\t\t<Link\n\t\t\t\t\t\tclassName=\"text-blue-700 hover:underline\"\n\t\t\t\t\t\tto={\"/runs/flow-run/$id\"}\n\t\t\t\t\t\tparams={{ id: artifact.flow_run_id ?? \"\" }}\n\t\t\t\t\t>\n\t\t\t\t\t\t{artifact.flow_run?.name}\n\t\t\t\t\t</Link>\n\t\t\t\t</p>\n\t\t\t)}\n\t\t\t{artifact.task_run && (\n\t\t\t\t<p className=\"text-sm\">\n\t\t\t\t\tTask run:{\" \"}\n\t\t\t\t\t<Link\n\t\t\t\t\t\tclassName=\"text-blue-700 hover:underline\"\n\t\t\t\t\t\tto={\"/runs/task-run/$id\"}\n\t\t\t\t\t\tparams={{ id: artifact.task_run_id ?? \"\" }}\n\t\t\t\t\t>\n\t\t\t\t\t\t{artifact.task_run?.name}\n\t\t\t\t\t</Link>\n\t\t\t\t</p>\n\t\t\t)}\n\t\t</Card>\n\t);\n};\n","import type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { formatDate } from \"@/utils/date\";\nimport { ArtifactTimelineCard } from \"./timelineCard\";\n\nexport type TimelineRowProps = {\n\tartifact: ArtifactWithFlowRunAndTaskRun;\n};\n\nexport const TimelineRow = ({ artifact }: TimelineRowProps) => {\n\tconst [date, time] = formatDate(artifact.created ?? \"\", \"dateTime\").split(\n\t\t\" at \",\n\t);\n\treturn (\n\t\t<div data-testid={`timeline-row-${artifact.id}`} className=\"flex\">\n\t\t\t<div\n\t\t\t\tclassName=\"flex flex-col items-end justify-items-start pt-4\"\n\t\t\t\tstyle={{ width: \"128px\" }}\n\t\t\t>\n\t\t\t\t<p className=\"text-base\">{time}</p>\n\t\t\t\t<p className=\"text-sm text-muted-foreground\">{date}</p>\n\t\t\t</div>\n\t\t\t<div className=\"w-10 flex flex-col\">\n\t\t\t\t<div className=\"w-5 h-full border-r border-gray-200\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"size-4 rounded-full bg-white my-5 mx-auto border-2\"\n\t\t\t\t\t\tstyle={{ margin: \"20px calc(50% + 2px)\" }}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"grow mt-1\">\n\t\t\t\t<ArtifactTimelineCard artifact={artifact} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { TimelineRow } from \"./timelineRow\";\n\nexport type TimelineContainerProps = {\n\tartifacts: ArtifactWithFlowRunAndTaskRun[];\n};\n\nexport const TimelineContainer = ({ artifacts }: TimelineContainerProps) => {\n\treturn (\n\t\t<div>\n\t\t\t{artifacts.map((artifact) => (\n\t\t\t\t<TimelineRow key={artifact.id} artifact={artifact} />\n\t\t\t))}\n\t\t\t<div className=\"flex border-b\">\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"flex flex-col items-end justify-items-start pt-4\"\n\t\t\t\t\tstyle={{ width: \"128px\", height: \"88px\" }}\n\t\t\t\t/>\n\t\t\t\t<div className=\"w-10 flex flex-col\">\n\t\t\t\t\t<div className=\"w-5 h-full border-r border-gray-200 pt-3\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"size-8 rounded-full bg-white my-5 mx-auto border-2 flex justify-center items-center\"\n\t\t\t\t\t\t\tstyle={{ margin: \"20px calc(50% - 6px)\" }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"size-4 rounded-full border-2 border-black relative\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div style={{ padding: \"33px 0 0 5px\" }}>\n\t\t\t\t\t<p className=\"text-lg\">\n\t\t\t\t\t\tCreated <span className=\"font-bold\">{artifacts[0].key}</span>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { ArtifactsKeyHeader } from \"./artifacts-key-header\";\nimport { TimelineContainer } from \"./timeline/timelineContainer\";\n\ntype ArtifactsKeyPageProps = {\n\tartifactKey: string;\n\tartifacts: ArtifactWithFlowRunAndTaskRun[];\n};\n\nexport const ArtifactsKeyPage = ({\n\tartifactKey,\n\tartifacts,\n}: ArtifactsKeyPageProps) => {\n\treturn (\n\t\t<div>\n\t\t\t<ArtifactsKeyHeader\n\t\t\t\tartifactKey={artifactKey}\n\t\t\t\tpageHeader={artifacts[0]?.description ?? undefined}\n\t\t\t/>\n\t\t\t<TimelineContainer artifacts={artifacts} />\n\t\t</div>\n\t);\n};\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { createFileRoute } from \"@tanstack/react-router\";\nimport { type ArtifactsFilter, buildListArtifactsQuery } from \"@/api/artifacts\";\nimport { useFilterArtifactsFlowTaskRuns } from \"@/api/artifacts/use-get-artifacts-flow-task-runs/use-get-artifacts-flow-task-runs\";\nimport { ArtifactsKeyPage } from \"@/components/artifacts/key/artifacts-key-page\";\nimport { PrefectLoading } from \"@/components/ui/loading\";\n\nconst buildFilterBody = (key: string): ArtifactsFilter => ({\n\tartifacts: {\n\t\toperator: \"and_\", // Logical operator for combining filters\n\t\tkey: {\n\t\t\tlike_: key, // Filter by artifact name\n\t\t},\n\t},\n\tsort: \"CREATED_DESC\",\n\toffset: 0,\n});\n\nexport const Route = createFileRoute(\"/artifacts/key/$key\")({\n\tcomponent: RouteComponent,\n\tloader: async ({ context, params }) => {\n\t\tconst { key } = params;\n\n\t\tconst artifacts = await context.queryClient.ensureQueryData(\n\t\t\tbuildListArtifactsQuery(buildFilterBody(key)),\n\t\t);\n\n\t\treturn { artifacts };\n\t},\n\twrapInSuspense: true,\n\tpendingComponent: PrefectLoading,\n});\n\nfunction RouteComponent() {\n\tconst { key } = Route.useParams();\n\n\tconst { data: artifacts } = useSuspenseQuery(\n\t\tbuildListArtifactsQuery(buildFilterBody(key)),\n\t);\n\n\tconst artifactWithMetadata = useFilterArtifactsFlowTaskRuns(\n\t\tbuildFilterBody(key),\n\t);\n\treturn (\n\t\t<div>\n\t\t\t<ArtifactsKeyPage\n\t\t\t\tartifactKey={key} // can't use \"key\" as it is a reserved word\n\t\t\t\tartifacts={artifactWithMetadata ?? artifacts}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"names":["Menubar","className","props","jsx","MenubarPrimitive.Root","cn","MenubarMenu","MenubarPrimitive.Menu","MenubarPortal","MenubarPrimitive.Portal","MenubarTrigger","MenubarPrimitive.Trigger","MenubarContent","align","alignOffset","sideOffset","MenubarPrimitive.Content","MenubarItem","inset","variant","MenubarPrimitive.Item","ArtifactsKeyHeader","artifactKey","pageHeader","handleCopyId","useCallback","jsxs","Fragment","Header","DocsLink","Icon","LazyMarkdown","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbSeparator","ArtifactTimelineCard","artifact","artifactTitle","useMemo","Card","Link","TimelineRow","date","time","formatDate","TimelineContainer","artifacts","ArtifactsKeyPage","buildFilterBody","key","operator","like_","sort","offset","RouteComponent","Route","useParams","data","useSuspenseQuery","buildListArtifactsQuery","artifactWithMetadata","useFilterArtifactsFlowTaskRuns"],"mappings":"2hBAMA,SAASA,EAAQ,CAChB,UAAAC,EACA,GAAGC,CACJ,EAAuD,CACtD,OACCC,EAAAA,IAACC,EAAA,CACA,YAAU,UACV,UAAWC,EACV,4EACAJ,CAAA,EAEA,GAAGC,CAAA,CAAA,CAGP,CAEA,SAASI,EAAY,CACpB,GAAGJ,CACJ,EAAuD,CACtD,aAAQK,EAAA,CAAsB,YAAU,eAAgB,GAAGL,EAAO,CACnE,CAQA,SAASM,EAAc,CACtB,GAAGN,CACJ,EAAyD,CACxD,aAAQO,EAAA,CAAwB,YAAU,iBAAkB,GAAGP,EAAO,CACvE,CAUA,SAASQ,EAAe,CACvB,UAAAT,EACA,GAAGC,CACJ,EAA0D,CACzD,OACCC,EAAAA,IAACQ,EAAA,CACA,YAAU,kBACV,UAAWN,EACV,0MACAJ,CAAA,EAEA,GAAGC,CAAA,CAAA,CAGP,CAEA,SAASU,EAAe,CACvB,UAAAX,EACA,MAAAY,EAAQ,QACR,YAAAC,EAAc,GACd,WAAAC,EAAa,EACb,GAAGb,CACJ,EAA0D,CACzD,aACEM,EAAA,CACA,SAAAL,EAAAA,IAACa,EAAA,CACA,YAAU,kBACV,MAAAH,EACA,YAAAC,EACA,WAAAC,EACA,UAAWV,EACV,yZACAJ,CAAA,EAEA,GAAGC,CAAA,CAAA,EAEN,CAEF,CAEA,SAASe,EAAY,CACpB,UAAAhB,EACA,MAAAiB,EACA,QAAAC,EAAU,UACV,GAAGjB,CACJ,EAGG,CACF,OACCC,EAAAA,IAACiB,EAAA,CACA,YAAU,eACV,aAAYF,EACZ,eAAcC,EACd,UAAWd,EACV,+oBACAJ,CAAA,EAEA,GAAGC,CAAA,CAAA,CAGP,CCrFO,MAAMmB,EAAqB,CAAC,CAClC,YAAAC,EACA,WAAAC,CACD,IAA+B,CAC9B,MAAMC,EAAeC,EAAAA,YAAY,IAAM,CACjC,UAAU,UAAU,UAAUH,CAAW,CAC/C,EAAG,CAACA,CAAW,CAAC,EAEhB,OACCI,EAAAA,KAAAC,WAAA,CACC,SAAA,CAAAD,EAAAA,KAAC,MAAA,CAAI,UAAU,oCACd,SAAA,CAAAvB,MAACyB,GAAO,YAAAN,EAA0B,EAClCI,EAAAA,KAAC,MAAA,CAAI,UAAU,8BACd,SAAA,CAAAvB,EAAAA,IAAC0B,EAAA,CAAS,GAAG,kBAAkB,MAAM,gBAAgB,EAErD1B,EAAAA,IAACH,EAAA,CACA,SAAA0B,EAAAA,KAACpB,EAAA,CACA,SAAA,CAAAH,EAAAA,IAACO,GAAe,UAAU,OACzB,eAACoB,EAAA,CAAK,GAAG,mBAAmB,CAAA,CAC7B,QACClB,EAAA,CACA,SAAAT,MAACc,GAAY,QAASO,EAAc,mBAAO,CAAA,CAC5C,CAAA,CAAA,CACD,CAAA,CACD,CAAA,CAAA,CACD,CAAA,EACD,EACCD,GACAG,EAAAA,KAAC,MAAA,CAAI,UAAU,GACd,SAAA,CAAAvB,EAAAA,IAAC,MAAG,UAAU,yEACb,SAAAA,MAAC4B,EAAA,CAAc,WAAW,CAAA,CAC3B,QACC,KAAA,CAAA,CAAG,CAAA,CAAA,CACL,CAAA,EAEF,CAEF,EAEMH,EAAS,CAAC,CAAE,YAAAN,CAAA,IACjBnB,EAAAA,IAAC,MAAA,CAAI,UAAU,0BACd,SAAAA,EAAAA,IAAC6B,EAAA,CACA,SAAAN,EAAAA,KAACO,EAAA,CACA,SAAA,CAAA9B,EAAAA,IAAC+B,EAAA,CACA,eAACC,EAAA,CAAe,GAAG,aAAa,UAAU,wBAAwB,qBAElE,CAAA,CACD,QACCC,EAAA,EAAoB,EACrBjC,EAAAA,IAAC+B,EAAA,CAAe,UAAU,wBACxB,SAAAZ,CAAA,CACF,CAAA,CAAA,CACD,EACD,EACD,ECrEYe,EAAuB,CAAC,CACpC,SAAAC,CACD,IAAiC,CAChC,MAAMC,EAAgBC,EAAAA,QAAQ,IACtBF,EAAS,IAAI,MAAM,GAAG,EAAE,CAAC,EAC9B,CAACA,EAAS,EAAE,CAAC,EAEhB,OACCZ,EAAAA,KAACe,EAAA,CACA,cAAa,iBAAiBH,EAAS,EAAE,GACzC,UAAU,sEAEV,SAAA,CAAAnC,MAACuC,EAAA,CAAK,GAAG,0BAA0B,OAAQ,CAAE,GAAIJ,EAAS,IAAM,EAAA,EAC/D,SAAAnC,EAAAA,IAAC,IAAA,CAAE,UAAU,oDACX,WACF,EACD,EACCmC,EAAS,UACTZ,OAAC,IAAA,CAAE,UAAU,UAAU,SAAA,CAAA,YACZ,IACVvB,EAAAA,IAACuC,EAAA,CACA,UAAU,gCACV,GAAI,qBACJ,OAAQ,CAAE,GAAIJ,EAAS,aAAe,EAAA,EAErC,WAAS,UAAU,IAAA,CAAA,CACrB,EACD,EAEAA,EAAS,UACTZ,OAAC,IAAA,CAAE,UAAU,UAAU,SAAA,CAAA,YACZ,IACVvB,EAAAA,IAACuC,EAAA,CACA,UAAU,gCACV,GAAI,qBACJ,OAAQ,CAAE,GAAIJ,EAAS,aAAe,EAAA,EAErC,WAAS,UAAU,IAAA,CAAA,CACrB,CAAA,CACD,CAAA,CAAA,CAAA,CAIJ,EC5CaK,EAAc,CAAC,CAAE,SAAAL,KAAiC,CAC9D,KAAM,CAACM,EAAMC,CAAI,EAAIC,EAAWR,EAAS,SAAW,GAAI,UAAU,EAAE,MACnE,MAAA,EAED,OACCZ,OAAC,OAAI,cAAa,gBAAgBY,EAAS,EAAE,GAAI,UAAU,OAC1D,SAAA,CAAAZ,EAAAA,KAAC,MAAA,CACA,UAAU,mDACV,MAAO,CAAE,MAAO,OAAA,EAEhB,SAAA,CAAAvB,EAAAA,IAAC,IAAA,CAAE,UAAU,YAAa,SAAA0C,EAAK,EAC/B1C,EAAAA,IAAC,IAAA,CAAE,UAAU,gCAAiC,SAAAyC,CAAA,CAAK,CAAA,CAAA,CAAA,QAEnD,MAAA,CAAI,UAAU,qBACd,SAAAzC,MAAC,MAAA,CAAI,UAAU,sCACd,SAAAA,EAAAA,IAAC,MAAA,CACA,UAAU,qDACV,MAAO,CAAE,OAAQ,sBAAA,CAAuB,CAAA,EAE1C,CAAA,CACD,QACC,MAAA,CAAI,UAAU,YACd,SAAAA,EAAAA,IAACkC,EAAA,CAAqB,SAAAC,EAAoB,CAAA,CAC3C,CAAA,EACD,CAEF,EC3BaS,EAAoB,CAAC,CAAE,UAAAC,YAEjC,MAAA,CACC,SAAA,CAAAA,EAAU,IAAKV,GACfnC,EAAAA,IAACwC,GAA8B,SAAAL,CAAA,EAAbA,EAAS,EAAwB,CACnD,EACDZ,EAAAA,KAAC,MAAA,CAAI,UAAU,gBACd,SAAA,CAAAvB,EAAAA,IAAC,MAAA,CACA,UAAU,mDACV,MAAO,CAAE,MAAO,QAAS,OAAQ,MAAA,CAAO,CAAA,QAExC,MAAA,CAAI,UAAU,qBACd,SAAAA,MAAC,MAAA,CAAI,UAAU,2CACd,SAAAA,EAAAA,IAAC,MAAA,CACA,UAAU,sFACV,MAAO,CAAE,OAAQ,sBAAA,EAEjB,SAAAA,EAAAA,IAAC,MAAA,CAAI,UAAU,oDAAA,CAAqD,CAAA,CAAA,EAEtE,CAAA,CACD,EACAA,EAAAA,IAAC,MAAA,CAAI,MAAO,CAAE,QAAS,gBACtB,SAAAuB,EAAAA,KAAC,IAAA,CAAE,UAAU,UAAU,SAAA,CAAA,iBACb,OAAA,CAAK,UAAU,YAAa,SAAAsB,EAAU,CAAC,EAAE,GAAA,CAAI,CAAA,CAAA,CACvD,CAAA,CACD,CAAA,CAAA,CACD,CAAA,EACD,ECzBWC,EAAmB,CAAC,CAChC,YAAA3B,EACA,UAAA0B,CACD,WAEG,MAAA,CACA,SAAA,CAAA7C,EAAAA,IAACkB,EAAA,CACA,YAAAC,EACA,WAAY0B,EAAU,CAAC,GAAG,aAAe,MAAA,CAAA,EAE1C7C,MAAC4C,GAAkB,UAAAC,CAAA,CAAsB,CAAA,EAC1C,ECbIE,EAAmBC,IAAkC,CAC1DH,UAAW,CACVI,SAAU,OACVD,IAAK,CACJE,MAAOF,CAAAA,CACR,EAEDG,KAAM,eACNC,OAAQ,CACT,GAiBA,SAASC,GAAiB,CACzB,KAAM,CAAEL,IAAAA,CAAAA,EAAQM,EAAMC,UAAAA,EAEhB,CAAEC,KAAMX,CAAAA,EAAcY,EAC3BC,EAAwBX,EAAgBC,CAAG,CAAC,CAC7C,EAEMW,EAAuBC,EAC5Bb,EAAgBC,CAAG,CACpB,EACA,aACE,MAAA,CACA,SAAAhD,EAAAA,IAAC8C,EAAA,CACA,YAAaE,EACb,UAAWW,GAAwBd,CAAAA,CAAAA,EAErC,CAEF"}
@@ -1,3 +1,3 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-markdown-8KPnbPlQ.js","assets/vendor-tanstack-BdLtprmr.js","assets/vendor-react-HBv6Kpyp.js"])))=>i.map(i=>d[i]);
2
- import{cf as r,b9 as _}from"./index-V_xTKaEb.js";import{r as e,j as s}from"./vendor-tanstack-BdLtprmr.js";function c({children:a,...i}){const[o,u]=e.useState(null),[n,l]=e.useState(null);return e.useEffect(()=>{Promise.all([r(()=>import("./vendor-markdown-8KPnbPlQ.js").then(t=>t.i),__vite__mapDeps([0,1,2])),r(()=>import("./vendor-markdown-8KPnbPlQ.js").then(t=>t.a),__vite__mapDeps([0,1,2]))]).then(([t,m])=>{u(()=>t.default),l(()=>m.default)})},[]),!o||!n?s.jsx(_,{className:"min-h-[100px]"}):s.jsx(o,{remarkPlugins:[n],...i,children:a})}export{c as L};
3
- //# sourceMappingURL=lazy-markdown-B9vEkJ0h.js.map
2
+ import{ce as r,b8 as _}from"./index-CPpeVt8m.js";import{r as e,j as s}from"./vendor-tanstack-BdLtprmr.js";function c({children:a,...i}){const[o,u]=e.useState(null),[n,l]=e.useState(null);return e.useEffect(()=>{Promise.all([r(()=>import("./vendor-markdown-8KPnbPlQ.js").then(t=>t.i),__vite__mapDeps([0,1,2])),r(()=>import("./vendor-markdown-8KPnbPlQ.js").then(t=>t.a),__vite__mapDeps([0,1,2]))]).then(([t,m])=>{u(()=>t.default),l(()=>m.default)})},[]),!o||!n?s.jsx(_,{className:"min-h-[100px]"}):s.jsx(o,{remarkPlugins:[n],...i,children:a})}export{c as L};
3
+ //# sourceMappingURL=lazy-markdown-D_y73qoD.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";0GAQO,SAASA,EAAa,CAAE,SAAAC,EAAU,GAAGC,GAA4B,CACvE,KAAM,CAACC,EAAWC,CAAY,EAC7BC,WAA8C,IAAI,EAC7C,CAACC,EAAQC,CAAS,EAAIF,WAE1B,IAAI,EAWN,OATAG,YAAU,IAAM,CACV,QAAQ,IAAI,CAAAC,EAAA,IAAC,OAAO,+BAAgB,OAAAC,KAAA,mCAAG,OAAO,+BAAY,wCAAC,CAAC,EAAE,KAClE,CAAC,CAACC,EAAIC,CAAG,IAAM,CACdR,EAAa,IAAMO,EAAG,OAAO,EAC7BJ,EAAU,IAAMK,EAAI,OAAO,CAC5B,EAEF,EAAG,EAAE,EAED,CAACT,GAAa,CAACG,EACXO,MAACC,EAAA,CAAS,UAAU,gBAAgB,EAI3CD,MAACV,GAAU,cAAe,CAACG,CAAM,EAAI,GAAGJ,EACtC,SAAAD,EACF,CAEF","names":["LazyMarkdown","children","props","Component","setComponent","useState","plugin","setPlugin","useEffect","__vitePreload","n","md","gfm","jsx","Skeleton"],"ignoreList":[],"sources":["../../src/components/ui/lazy-markdown.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport type { Options } from \"react-markdown\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\n\ntype LazyMarkdownProps = Omit<Options, \"children\"> & {\n\tchildren: string;\n};\n\nexport function LazyMarkdown({ children, ...props }: LazyMarkdownProps) {\n\tconst [Component, setComponent] =\n\t\tuseState<React.ComponentType<Options> | null>(null);\n\tconst [plugin, setPlugin] = useState<\n\t\ttypeof import(\"remark-gfm\").default | null\n\t>(null);\n\n\tuseEffect(() => {\n\t\tvoid Promise.all([import(\"react-markdown\"), import(\"remark-gfm\")]).then(\n\t\t\t([md, gfm]) => {\n\t\t\t\tsetComponent(() => md.default);\n\t\t\t\tsetPlugin(() => gfm.default);\n\t\t\t},\n\t\t);\n\t}, []);\n\n\tif (!Component || !plugin) {\n\t\treturn <Skeleton className=\"min-h-[100px]\" />;\n\t}\n\n\treturn (\n\t\t<Component remarkPlugins={[plugin]} {...props}>\n\t\t\t{children}\n\t\t</Component>\n\t);\n}\n"],"file":"lazy-markdown-B9vEkJ0h.js"}
1
+ {"version":3,"mappings":";0GAQO,SAASA,EAAa,CAAE,SAAAC,EAAU,GAAGC,GAA4B,CACvE,KAAM,CAACC,EAAWC,CAAY,EAC7BC,WAA8C,IAAI,EAC7C,CAACC,EAAQC,CAAS,EAAIF,WAE1B,IAAI,EAWN,OATAG,YAAU,IAAM,CACV,QAAQ,IAAI,CAAAC,EAAA,IAAC,OAAO,+BAAgB,OAAAC,KAAA,mCAAG,OAAO,+BAAY,wCAAC,CAAC,EAAE,KAClE,CAAC,CAACC,EAAIC,CAAG,IAAM,CACdR,EAAa,IAAMO,EAAG,OAAO,EAC7BJ,EAAU,IAAMK,EAAI,OAAO,CAC5B,EAEF,EAAG,EAAE,EAED,CAACT,GAAa,CAACG,EACXO,MAACC,EAAA,CAAS,UAAU,gBAAgB,EAI3CD,MAACV,GAAU,cAAe,CAACG,CAAM,EAAI,GAAGJ,EACtC,SAAAD,EACF,CAEF","names":["LazyMarkdown","children","props","Component","setComponent","useState","plugin","setPlugin","useEffect","__vitePreload","n","md","gfm","jsx","Skeleton"],"ignoreList":[],"sources":["../../src/components/ui/lazy-markdown.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport type { Options } from \"react-markdown\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\n\ntype LazyMarkdownProps = Omit<Options, \"children\"> & {\n\tchildren: string;\n};\n\nexport function LazyMarkdown({ children, ...props }: LazyMarkdownProps) {\n\tconst [Component, setComponent] =\n\t\tuseState<React.ComponentType<Options> | null>(null);\n\tconst [plugin, setPlugin] = useState<\n\t\ttypeof import(\"remark-gfm\").default | null\n\t>(null);\n\n\tuseEffect(() => {\n\t\tvoid Promise.all([import(\"react-markdown\"), import(\"remark-gfm\")]).then(\n\t\t\t([md, gfm]) => {\n\t\t\t\tsetComponent(() => md.default);\n\t\t\t\tsetPlugin(() => gfm.default);\n\t\t\t},\n\t\t);\n\t}, []);\n\n\tif (!Component || !plugin) {\n\t\treturn <Skeleton className=\"min-h-[100px]\" />;\n\t}\n\n\treturn (\n\t\t<Component remarkPlugins={[plugin]} {...props}>\n\t\t\t{children}\n\t\t</Component>\n\t);\n}\n"],"file":"lazy-markdown-D_y73qoD.js"}
@@ -1,2 +1,2 @@
1
- import{j as e,r as o,d as p,N as h}from"./vendor-tanstack-BdLtprmr.js";import{l as g,C as j,m as v,n as L,o as w,p as C,q as b,R as N,r as R,P as S}from"./index-V_xTKaEb.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./vendor-date-Cl1Jav-N.js";function P({className:t="size-11"}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 76 76",className:t,"aria-label":"Prefect Logo",children:[e.jsx("title",{children:"Prefect Logo"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M37.987 49.464 15.89 38v22.944l.013-.006L38 72.402V49.457z",clipRule:"evenodd"})]})}function d({redirectTo:t="/dashboard"}){const[s,u]=o.useState(""),[i,n]=o.useState(""),[r,l]=o.useState(!1),{login:f}=g(),m=p(),x=a=>{a.preventDefault(),!(r||!s.trim())&&(l(!0),n(""),f(s).then(c=>{c.success?m({to:t}):(n(c.error??"Authentication failed"),l(!1))}))};return e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsxs(j,{className:"w-full max-w-[400px]",children:[e.jsxs(v,{className:"flex flex-col items-center gap-4",children:[e.jsx(P,{className:"size-16"}),e.jsx(L,{children:"Login"})]}),e.jsx(w,{children:e.jsxs("form",{onSubmit:x,className:"flex flex-col gap-4",children:[e.jsx(C,{type:"password",placeholder:"admin:pass",value:s,onChange:a=>u(a.target.value),autoFocus:!0,disabled:r}),i&&e.jsx("p",{className:"text-sm text-destructive",children:i}),e.jsx(b,{type:"submit",disabled:r,className:"w-full",children:r?"Logging in...":"Login"})]})})]})})}function I(){const{redirectTo:t}=N.useSearch(),s=R();return s?s.isLoading?e.jsx(S,{}):s.isAuthenticated?e.jsx(h,{to:t??"/dashboard",replace:!0}):e.jsx(d,{redirectTo:t}):e.jsx(d,{redirectTo:t})}export{I as component};
2
- //# sourceMappingURL=login-C3PhSGQJ.js.map
1
+ import{j as e,r as o,d as p,N as h}from"./vendor-tanstack-BdLtprmr.js";import{l as g,C as j,m as v,n as L,o as w,p as C,q as b,R as N,r as R,P as S}from"./index-CPpeVt8m.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./vendor-date-Cl1Jav-N.js";function P({className:t="size-11"}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 76 76",className:t,"aria-label":"Prefect Logo",children:[e.jsx("title",{children:"Prefect Logo"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M37.987 49.464 15.89 38v22.944l.013-.006L38 72.402V49.457z",clipRule:"evenodd"})]})}function d({redirectTo:t="/dashboard"}){const[s,u]=o.useState(""),[i,n]=o.useState(""),[r,l]=o.useState(!1),{login:f}=g(),m=p(),x=a=>{a.preventDefault(),!(r||!s.trim())&&(l(!0),n(""),f(s).then(c=>{c.success?m({to:t}):(n(c.error??"Authentication failed"),l(!1))}))};return e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsxs(j,{className:"w-full max-w-[400px]",children:[e.jsxs(v,{className:"flex flex-col items-center gap-4",children:[e.jsx(P,{className:"size-16"}),e.jsx(L,{children:"Login"})]}),e.jsx(w,{children:e.jsxs("form",{onSubmit:x,className:"flex flex-col gap-4",children:[e.jsx(C,{type:"password",placeholder:"admin:pass",value:s,onChange:a=>u(a.target.value),autoFocus:!0,disabled:r}),i&&e.jsx("p",{className:"text-sm text-destructive",children:i}),e.jsx(b,{type:"submit",disabled:r,className:"w-full",children:r?"Logging in...":"Login"})]})})]})})}function I(){const{redirectTo:t}=N.useSearch(),s=R();return s?s.isLoading?e.jsx(S,{}):s.isAuthenticated?e.jsx(h,{to:t??"/dashboard",replace:!0}):e.jsx(d,{redirectTo:t}):e.jsx(d,{redirectTo:t})}export{I as component};
2
+ //# sourceMappingURL=login-DR_xuMmg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"login-C3PhSGQJ.js","sources":["../../src/components/ui/prefect-logo.tsx","../../src/components/auth/login-page.tsx","../../src/routes/login.tsx?tsr-split=component"],"sourcesContent":["interface PrefectLogoProps {\n\tclassName?: string;\n}\n\nexport function PrefectLogo({ className = \"size-11\" }: PrefectLogoProps) {\n\treturn (\n\t\t<svg\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tfill=\"none\"\n\t\t\tviewBox=\"0 0 76 76\"\n\t\t\tclassName={className}\n\t\t\taria-label=\"Prefect Logo\"\n\t\t>\n\t\t\t<title>Prefect Logo</title>\n\t\t\t<path\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\td=\"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\td=\"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\td=\"M37.987 49.464 15.89 38v22.944l.013-.006L38 72.402V49.457z\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t/>\n\t\t</svg>\n\t);\n}\n","import { useNavigate } from \"@tanstack/react-router\";\nimport { type FormEvent, useState } from \"react\";\nimport { useAuth } from \"@/auth\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { PrefectLogo } from \"@/components/ui/prefect-logo\";\n\ninterface LoginPageProps {\n\tredirectTo?: string;\n}\n\nexport function LoginPage({ redirectTo = \"/dashboard\" }: LoginPageProps) {\n\tconst [password, setPassword] = useState(\"\");\n\tconst [error, setError] = useState(\"\");\n\tconst [isSubmitting, setIsSubmitting] = useState(false);\n\tconst { login } = useAuth();\n\tconst navigate = useNavigate();\n\n\tconst handleSubmit = (e: FormEvent) => {\n\t\te.preventDefault();\n\t\tif (isSubmitting || !password.trim()) return;\n\n\t\tsetIsSubmitting(true);\n\t\tsetError(\"\");\n\n\t\tvoid login(password).then((result) => {\n\t\t\tif (result.success) {\n\t\t\t\tvoid navigate({ to: redirectTo });\n\t\t\t} else {\n\t\t\t\tsetError(result.error ?? \"Authentication failed\");\n\t\t\t\tsetIsSubmitting(false);\n\t\t\t}\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className=\"flex items-center justify-center min-h-screen\">\n\t\t\t<Card className=\"w-full max-w-[400px]\">\n\t\t\t\t<CardHeader className=\"flex flex-col items-center gap-4\">\n\t\t\t\t\t<PrefectLogo className=\"size-16\" />\n\t\t\t\t\t<CardTitle>Login</CardTitle>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<form onSubmit={handleSubmit} className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\tplaceholder=\"admin:pass\"\n\t\t\t\t\t\t\tvalue={password}\n\t\t\t\t\t\t\tonChange={(e) => setPassword(e.target.value)}\n\t\t\t\t\t\t\tautoFocus\n\t\t\t\t\t\t\tdisabled={isSubmitting}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{error && <p className=\"text-sm text-destructive\">{error}</p>}\n\t\t\t\t\t\t<Button type=\"submit\" disabled={isSubmitting} className=\"w-full\">\n\t\t\t\t\t\t\t{isSubmitting ? \"Logging in...\" : \"Login\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</form>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t</div>\n\t);\n}\n","import { createFileRoute, Navigate, redirect } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { z } from \"zod\";\nimport { useAuthSafe } from \"@/auth\";\nimport { LoginPage } from \"@/components/auth/login-page\";\nimport { PrefectLoading } from \"@/components/ui/loading\";\n\nconst loginSearchSchema = z.object({\n\tredirectTo: z.string().optional(),\n});\n\nexport const Route = createFileRoute(\"/login\")({\n\tvalidateSearch: zodValidator(loginSearchSchema),\n\tbeforeLoad: ({ context, search }) => {\n\t\t// If already authenticated, redirect away from login page\n\t\tif (!context.auth.isLoading && context.auth.isAuthenticated) {\n\t\t\tredirect({ to: search.redirectTo ?? \"/dashboard\", throw: true });\n\t\t}\n\t},\n\tcomponent: LoginRouteComponent,\n});\n\nfunction LoginRouteComponent() {\n\tconst { redirectTo } = Route.useSearch();\n\tconst auth = useAuthSafe();\n\n\t// If auth context is not available (e.g., in tests), just render the login page\n\tif (!auth) {\n\t\treturn <LoginPage redirectTo={redirectTo} />;\n\t}\n\n\t// Show loading state while auth is initializing\n\tif (auth.isLoading) {\n\t\treturn <PrefectLoading />;\n\t}\n\n\t// Redirect to dashboard if already authenticated\n\t// (This handles the case where beforeLoad didn't catch it due to loading state)\n\tif (auth.isAuthenticated) {\n\t\treturn <Navigate to={redirectTo ?? \"/dashboard\"} replace={true} />;\n\t}\n\n\treturn <LoginPage redirectTo={redirectTo} />;\n}\n"],"names":["PrefectLogo","className","jsxs","jsx","LoginPage","redirectTo","password","setPassword","useState","error","setError","isSubmitting","setIsSubmitting","login","useAuth","navigate","useNavigate","handleSubmit","e","result","Card","CardHeader","CardTitle","CardContent","Input","Button","LoginRouteComponent","Route","useSearch","auth","useAuthSafe","isLoading","PrefectLoading","isAuthenticated","Navigate"],"mappings":"+VAIO,SAASA,EAAY,CAAE,UAAAC,EAAY,WAA+B,CACxE,OACCC,EAAAA,KAAC,MAAA,CACA,MAAM,6BACN,KAAK,OACL,QAAQ,YACR,UAAAD,EACA,aAAW,eAEX,SAAA,CAAAE,EAAAA,IAAC,SAAM,SAAA,cAAA,CAAY,EACnBA,EAAAA,IAAC,OAAA,CACA,KAAK,eACL,SAAS,UACT,EAAE,gFACF,SAAS,SAAA,CAAA,EAEVA,EAAAA,IAAC,OAAA,CACA,KAAK,eACL,SAAS,UACT,EAAE,gFACF,SAAS,SAAA,CAAA,EAEVA,EAAAA,IAAC,OAAA,CACA,KAAK,eACL,SAAS,UACT,EAAE,6DACF,SAAS,SAAA,CAAA,CACV,CAAA,CAAA,CAGH,CCtBO,SAASC,EAAU,CAAE,WAAAC,EAAa,cAAgC,CACxE,KAAM,CAACC,EAAUC,CAAW,EAAIC,EAAAA,SAAS,EAAE,EACrC,CAACC,EAAOC,CAAQ,EAAIF,EAAAA,SAAS,EAAE,EAC/B,CAACG,EAAcC,CAAe,EAAIJ,EAAAA,SAAS,EAAK,EAChD,CAAE,MAAAK,CAAA,EAAUC,EAAA,EACZC,EAAWC,EAAA,EAEXC,EAAgBC,GAAiB,CACtCA,EAAE,eAAA,EACE,EAAAP,GAAgB,CAACL,EAAS,UAE9BM,EAAgB,EAAI,EACpBF,EAAS,EAAE,EAENG,EAAMP,CAAQ,EAAE,KAAMa,GAAW,CACjCA,EAAO,QACLJ,EAAS,CAAE,GAAIV,EAAY,GAEhCK,EAASS,EAAO,OAAS,uBAAuB,EAChDP,EAAgB,EAAK,EAEvB,CAAC,EACF,EAEA,aACE,MAAA,CAAI,UAAU,gDACd,SAAAV,EAAAA,KAACkB,EAAA,CAAK,UAAU,uBACf,SAAA,CAAAlB,EAAAA,KAACmB,EAAA,CAAW,UAAU,mCACrB,SAAA,CAAAlB,EAAAA,IAACH,EAAA,CAAY,UAAU,SAAA,CAAU,EACjCG,EAAAA,IAACmB,GAAU,SAAA,OAAA,CAAK,CAAA,EACjB,QACCC,EAAA,CACA,SAAArB,OAAC,QAAK,SAAUe,EAAc,UAAU,sBACvC,SAAA,CAAAd,EAAAA,IAACqB,EAAA,CACA,KAAK,WACL,YAAY,aACZ,MAAOlB,EACP,SAAWY,GAAMX,EAAYW,EAAE,OAAO,KAAK,EAC3C,UAAS,GACT,SAAUP,CAAA,CAAA,EAEVF,GAASN,EAAAA,IAAC,IAAA,CAAE,UAAU,2BAA4B,SAAAM,EAAM,EACzDN,EAAAA,IAACsB,EAAA,CAAO,KAAK,SAAS,SAAUd,EAAc,UAAU,SACtD,SAAAA,EAAe,gBAAkB,OAAA,CACnC,CAAA,CAAA,CACD,CAAA,CACD,CAAA,CAAA,CACD,CAAA,CACD,CAEF,CCxCA,SAASe,GAAsB,CAC9B,KAAM,CAAErB,WAAAA,CAAAA,EAAesB,EAAMC,UAAAA,EACvBC,EAAOC,EAAAA,EAGb,OAAKD,EAKDA,EAAKE,gBACAC,EAAA,EAAc,EAKnBH,EAAKI,sBACAC,EAAA,CAAS,GAAI7B,GAAc,aAAc,QAAS,GAAK,EAGzDF,MAACC,GAAU,WAAAC,EAAuB,EAdjCF,MAACC,GAAU,WAAAC,EAAuB,CAe3C"}
1
+ {"version":3,"file":"login-DR_xuMmg.js","sources":["../../src/components/ui/prefect-logo.tsx","../../src/components/auth/login-page.tsx","../../src/routes/login.tsx?tsr-split=component"],"sourcesContent":["interface PrefectLogoProps {\n\tclassName?: string;\n}\n\nexport function PrefectLogo({ className = \"size-11\" }: PrefectLogoProps) {\n\treturn (\n\t\t<svg\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tfill=\"none\"\n\t\t\tviewBox=\"0 0 76 76\"\n\t\t\tclassName={className}\n\t\t\taria-label=\"Prefect Logo\"\n\t\t>\n\t\t\t<title>Prefect Logo</title>\n\t\t\t<path\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\td=\"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\td=\"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\td=\"M37.987 49.464 15.89 38v22.944l.013-.006L38 72.402V49.457z\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t/>\n\t\t</svg>\n\t);\n}\n","import { useNavigate } from \"@tanstack/react-router\";\nimport { type FormEvent, useState } from \"react\";\nimport { useAuth } from \"@/auth\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { PrefectLogo } from \"@/components/ui/prefect-logo\";\n\ninterface LoginPageProps {\n\tredirectTo?: string;\n}\n\nexport function LoginPage({ redirectTo = \"/dashboard\" }: LoginPageProps) {\n\tconst [password, setPassword] = useState(\"\");\n\tconst [error, setError] = useState(\"\");\n\tconst [isSubmitting, setIsSubmitting] = useState(false);\n\tconst { login } = useAuth();\n\tconst navigate = useNavigate();\n\n\tconst handleSubmit = (e: FormEvent) => {\n\t\te.preventDefault();\n\t\tif (isSubmitting || !password.trim()) return;\n\n\t\tsetIsSubmitting(true);\n\t\tsetError(\"\");\n\n\t\tvoid login(password).then((result) => {\n\t\t\tif (result.success) {\n\t\t\t\tvoid navigate({ to: redirectTo });\n\t\t\t} else {\n\t\t\t\tsetError(result.error ?? \"Authentication failed\");\n\t\t\t\tsetIsSubmitting(false);\n\t\t\t}\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className=\"flex items-center justify-center min-h-screen\">\n\t\t\t<Card className=\"w-full max-w-[400px]\">\n\t\t\t\t<CardHeader className=\"flex flex-col items-center gap-4\">\n\t\t\t\t\t<PrefectLogo className=\"size-16\" />\n\t\t\t\t\t<CardTitle>Login</CardTitle>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<form onSubmit={handleSubmit} className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\tplaceholder=\"admin:pass\"\n\t\t\t\t\t\t\tvalue={password}\n\t\t\t\t\t\t\tonChange={(e) => setPassword(e.target.value)}\n\t\t\t\t\t\t\tautoFocus\n\t\t\t\t\t\t\tdisabled={isSubmitting}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{error && <p className=\"text-sm text-destructive\">{error}</p>}\n\t\t\t\t\t\t<Button type=\"submit\" disabled={isSubmitting} className=\"w-full\">\n\t\t\t\t\t\t\t{isSubmitting ? \"Logging in...\" : \"Login\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</form>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t</div>\n\t);\n}\n","import { createFileRoute, Navigate, redirect } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { z } from \"zod\";\nimport { useAuthSafe } from \"@/auth\";\nimport { LoginPage } from \"@/components/auth/login-page\";\nimport { PrefectLoading } from \"@/components/ui/loading\";\n\nconst loginSearchSchema = z.object({\n\tredirectTo: z.string().optional(),\n});\n\nexport const Route = createFileRoute(\"/login\")({\n\tvalidateSearch: zodValidator(loginSearchSchema),\n\tbeforeLoad: ({ context, search }) => {\n\t\t// If already authenticated, redirect away from login page\n\t\tif (!context.auth.isLoading && context.auth.isAuthenticated) {\n\t\t\tredirect({ to: search.redirectTo ?? \"/dashboard\", throw: true });\n\t\t}\n\t},\n\tcomponent: LoginRouteComponent,\n});\n\nfunction LoginRouteComponent() {\n\tconst { redirectTo } = Route.useSearch();\n\tconst auth = useAuthSafe();\n\n\t// If auth context is not available (e.g., in tests), just render the login page\n\tif (!auth) {\n\t\treturn <LoginPage redirectTo={redirectTo} />;\n\t}\n\n\t// Show loading state while auth is initializing\n\tif (auth.isLoading) {\n\t\treturn <PrefectLoading />;\n\t}\n\n\t// Redirect to dashboard if already authenticated\n\t// (This handles the case where beforeLoad didn't catch it due to loading state)\n\tif (auth.isAuthenticated) {\n\t\treturn <Navigate to={redirectTo ?? \"/dashboard\"} replace={true} />;\n\t}\n\n\treturn <LoginPage redirectTo={redirectTo} />;\n}\n"],"names":["PrefectLogo","className","jsxs","jsx","LoginPage","redirectTo","password","setPassword","useState","error","setError","isSubmitting","setIsSubmitting","login","useAuth","navigate","useNavigate","handleSubmit","e","result","Card","CardHeader","CardTitle","CardContent","Input","Button","LoginRouteComponent","Route","useSearch","auth","useAuthSafe","isLoading","PrefectLoading","isAuthenticated","Navigate"],"mappings":"+VAIO,SAASA,EAAY,CAAE,UAAAC,EAAY,WAA+B,CACxE,OACCC,EAAAA,KAAC,MAAA,CACA,MAAM,6BACN,KAAK,OACL,QAAQ,YACR,UAAAD,EACA,aAAW,eAEX,SAAA,CAAAE,EAAAA,IAAC,SAAM,SAAA,cAAA,CAAY,EACnBA,EAAAA,IAAC,OAAA,CACA,KAAK,eACL,SAAS,UACT,EAAE,gFACF,SAAS,SAAA,CAAA,EAEVA,EAAAA,IAAC,OAAA,CACA,KAAK,eACL,SAAS,UACT,EAAE,gFACF,SAAS,SAAA,CAAA,EAEVA,EAAAA,IAAC,OAAA,CACA,KAAK,eACL,SAAS,UACT,EAAE,6DACF,SAAS,SAAA,CAAA,CACV,CAAA,CAAA,CAGH,CCtBO,SAASC,EAAU,CAAE,WAAAC,EAAa,cAAgC,CACxE,KAAM,CAACC,EAAUC,CAAW,EAAIC,EAAAA,SAAS,EAAE,EACrC,CAACC,EAAOC,CAAQ,EAAIF,EAAAA,SAAS,EAAE,EAC/B,CAACG,EAAcC,CAAe,EAAIJ,EAAAA,SAAS,EAAK,EAChD,CAAE,MAAAK,CAAA,EAAUC,EAAA,EACZC,EAAWC,EAAA,EAEXC,EAAgBC,GAAiB,CACtCA,EAAE,eAAA,EACE,EAAAP,GAAgB,CAACL,EAAS,UAE9BM,EAAgB,EAAI,EACpBF,EAAS,EAAE,EAENG,EAAMP,CAAQ,EAAE,KAAMa,GAAW,CACjCA,EAAO,QACLJ,EAAS,CAAE,GAAIV,EAAY,GAEhCK,EAASS,EAAO,OAAS,uBAAuB,EAChDP,EAAgB,EAAK,EAEvB,CAAC,EACF,EAEA,aACE,MAAA,CAAI,UAAU,gDACd,SAAAV,EAAAA,KAACkB,EAAA,CAAK,UAAU,uBACf,SAAA,CAAAlB,EAAAA,KAACmB,EAAA,CAAW,UAAU,mCACrB,SAAA,CAAAlB,EAAAA,IAACH,EAAA,CAAY,UAAU,SAAA,CAAU,EACjCG,EAAAA,IAACmB,GAAU,SAAA,OAAA,CAAK,CAAA,EACjB,QACCC,EAAA,CACA,SAAArB,OAAC,QAAK,SAAUe,EAAc,UAAU,sBACvC,SAAA,CAAAd,EAAAA,IAACqB,EAAA,CACA,KAAK,WACL,YAAY,aACZ,MAAOlB,EACP,SAAWY,GAAMX,EAAYW,EAAE,OAAO,KAAK,EAC3C,UAAS,GACT,SAAUP,CAAA,CAAA,EAEVF,GAASN,EAAAA,IAAC,IAAA,CAAE,UAAU,2BAA4B,SAAAM,EAAM,EACzDN,EAAAA,IAACsB,EAAA,CAAO,KAAK,SAAS,SAAUd,EAAc,UAAU,SACtD,SAAAA,EAAe,gBAAkB,OAAA,CACnC,CAAA,CAAA,CACD,CAAA,CACD,CAAA,CAAA,CACD,CAAA,CACD,CAEF,CCxCA,SAASe,GAAsB,CAC9B,KAAM,CAAErB,WAAAA,CAAAA,EAAesB,EAAMC,UAAAA,EACvBC,EAAOC,EAAAA,EAGb,OAAKD,EAKDA,EAAKE,gBACAC,EAAA,EAAc,EAKnBH,EAAKI,sBACAC,EAAA,CAAS,GAAI7B,GAAc,aAAc,QAAS,GAAK,EAGzDF,MAACC,GAAU,WAAAC,EAAuB,EAdjCF,MAACC,GAAU,WAAAC,EAAuB,CAe3C"}
@@ -1,2 +1,2 @@
1
- import{c as h,r as c,j as o}from"./vendor-tanstack-BdLtprmr.js";import{u as g,m as x,E as b}from"./vendor-codemirror-DDrdK9VD.js";import{a_ as w,q as v,I as y,y as C}from"./index-V_xTKaEb.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./vendor-date-Cl1Jav-N.js";const j=[x(),b.lineWrapping],E=h.forwardRef(({className:l,value:r,onChange:u,copy:p=!1,onBlur:N,disabled:s,hideLineNumbers:f=!1,...m},i)=>{const e=c.useRef(null);let n;s&&(n={lineNumbers:!f,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1});const{setContainer:a}=g({container:e.current,extensions:j,value:r,onChange:u,indentWithTab:!1,editable:!s,basicSetup:n});c.useEffect(()=>{e.current&&a(e.current)},[a]);const d=t=>{C.success("Copied to clipboard"),navigator.clipboard.writeText(t)};return o.jsx("div",{className:w("rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative",l),ref:t=>{e.current=t,typeof i=="function"?i(t):i&&(i.current=t)},...m,children:p&&r&&o.jsx(v,{onClick:()=>d(r),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:o.jsx(y,{id:"Copy",className:"size-2"})})})});E.displayName="MarkdownInput";export{E as MarkdownInput};
2
- //# sourceMappingURL=markdown-input-Dei7u1qp.js.map
1
+ import{c as h,r as c,j as o}from"./vendor-tanstack-BdLtprmr.js";import{u as g,m as x,E as b}from"./vendor-codemirror-DDrdK9VD.js";import{aZ as w,q as v,I as y,y as C}from"./index-CPpeVt8m.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./vendor-date-Cl1Jav-N.js";const j=[x(),b.lineWrapping],E=h.forwardRef(({className:l,value:r,onChange:u,copy:p=!1,onBlur:N,disabled:s,hideLineNumbers:f=!1,...m},i)=>{const e=c.useRef(null);let n;s&&(n={lineNumbers:!f,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1});const{setContainer:a}=g({container:e.current,extensions:j,value:r,onChange:u,indentWithTab:!1,editable:!s,basicSetup:n});c.useEffect(()=>{e.current&&a(e.current)},[a]);const d=t=>{C.success("Copied to clipboard"),navigator.clipboard.writeText(t)};return o.jsx("div",{className:w("rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative",l),ref:t=>{e.current=t,typeof i=="function"?i(t):i&&(i.current=t)},...m,children:p&&r&&o.jsx(v,{onClick:()=>d(r),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:o.jsx(y,{id:"Copy",className:"size-2"})})})});E.displayName="MarkdownInput";export{E as MarkdownInput};
2
+ //# sourceMappingURL=markdown-input-hzlzpUdj.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"markdown-input-Dei7u1qp.js","sources":["../../src/components/ui/markdown-input.tsx"],"sourcesContent":["import { markdown } from \"@codemirror/lang-markdown\";\nimport {\n\ttype BasicSetupOptions,\n\tEditorView,\n\tuseCodeMirror,\n} from \"@uiw/react-codemirror\";\nimport React, { useEffect, useRef } from \"react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"@/utils\";\nimport { Button } from \"./button\";\nimport { Icon } from \"./icons\";\n\nconst extensions = [markdown(), EditorView.lineWrapping];\n\ntype MarkdownInputProps = React.ComponentProps<\"div\"> & {\n\tvalue?: string;\n\tonChange?: (value: string) => void;\n\tonBlur?: () => void;\n\tdisabled?: boolean;\n\tclassName?: string;\n\thideLineNumbers?: boolean;\n\tcopy?: boolean;\n};\n\nexport const MarkdownInput = React.forwardRef<\n\tHTMLDivElement,\n\tMarkdownInputProps\n>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tcopy = false,\n\t\t\tonBlur,\n\t\t\tdisabled,\n\t\t\thideLineNumbers = false,\n\t\t\t...props\n\t\t},\n\t\tforwardedRef,\n\t) => {\n\t\tconst editor = useRef<HTMLDivElement | null>(null);\n\t\t// Setting `basicSetup` messes up the tab order. We only change the basic setup\n\t\t// if the input is disabled, so we leave it undefined to maintain the tab order.\n\t\tlet basicSetup: BasicSetupOptions | undefined;\n\t\tif (disabled) {\n\t\t\tbasicSetup = {\n\t\t\t\tlineNumbers: !hideLineNumbers,\n\t\t\t\thighlightActiveLine: false,\n\t\t\t\tfoldGutter: false,\n\t\t\t\thighlightActiveLineGutter: false,\n\t\t\t};\n\t\t}\n\t\tconst { setContainer } = useCodeMirror({\n\t\t\tcontainer: editor.current,\n\t\t\textensions,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tonBlur,\n\t\t\tindentWithTab: false,\n\t\t\teditable: !disabled,\n\t\t\tbasicSetup,\n\t\t});\n\n\t\tuseEffect(() => {\n\t\t\tif (editor.current) {\n\t\t\t\tsetContainer(editor.current);\n\t\t\t}\n\t\t}, [setContainer]);\n\n\t\tconst handleCopy = (_value: string) => {\n\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\tvoid navigator.clipboard.writeText(_value);\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={(node) => {\n\t\t\t\t\teditor.current = node;\n\t\t\t\t\tif (typeof forwardedRef === \"function\") {\n\t\t\t\t\t\tforwardedRef(node);\n\t\t\t\t\t} else if (forwardedRef) {\n\t\t\t\t\t\tforwardedRef.current = node;\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{copy && value && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={() => handleCopy(value)}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"absolute top-0 right-0 z-10\"\n\t\t\t\t\t\taria-label=\"copy\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-2\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nMarkdownInput.displayName = \"MarkdownInput\";\n"],"names":["extensions","markdown","EditorView","MarkdownInput","React","className","value","onChange","copy","onBlur","disabled","hideLineNumbers","props","forwardedRef","editor","useRef","basicSetup","setContainer","useCodeMirror","useEffect","handleCopy","_value","toast","jsx","cn","node","Button","Icon"],"mappings":"iXAYA,MAAMA,EAAa,CAACC,IAAYC,EAAW,YAAY,EAY1CC,EAAgBC,EAAM,WAIlC,CACC,CACC,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,KAAAC,EAAO,GACP,OAAAC,EACA,SAAAC,EACA,gBAAAC,EAAkB,GAClB,GAAGC,CAAA,EAEJC,IACI,CACJ,MAAMC,EAASC,EAAAA,OAA8B,IAAI,EAGjD,IAAIC,EACAN,IACHM,EAAa,CACZ,YAAa,CAACL,EACd,oBAAqB,GACrB,WAAY,GACZ,0BAA2B,EAAA,GAG7B,KAAM,CAAE,aAAAM,CAAA,EAAiBC,EAAc,CACtC,UAAWJ,EAAO,QAClB,WAAAd,EACA,MAAAM,EACA,SAAAC,EAEA,cAAe,GACf,SAAU,CAACG,EACX,WAAAM,CAAA,CACA,EAEDG,EAAAA,UAAU,IAAM,CACXL,EAAO,SACVG,EAAaH,EAAO,OAAO,CAE7B,EAAG,CAACG,CAAY,CAAC,EAEjB,MAAMG,EAAcC,GAAmB,CACtCC,EAAM,QAAQ,qBAAqB,EAC9B,UAAU,UAAU,UAAUD,CAAM,CAC1C,EAEA,OACCE,EAAAA,IAAC,MAAA,CACA,UAAWC,EACV,8HACAnB,CAAA,EAED,IAAMoB,GAAS,CACdX,EAAO,QAAUW,EACb,OAAOZ,GAAiB,WAC3BA,EAAaY,CAAI,EACPZ,IACVA,EAAa,QAAUY,EAEzB,EACC,GAAGb,EAEH,YAAQN,GACRiB,EAAAA,IAACG,EAAA,CACA,QAAS,IAAMN,EAAWd,CAAK,EAC/B,QAAQ,QACR,KAAK,OACL,UAAU,8BACV,aAAW,OAEX,SAAAiB,EAAAA,IAACI,EAAA,CAAK,GAAG,OAAO,UAAU,QAAA,CAAS,CAAA,CAAA,CACpC,CAAA,CAIJ,CACD,EAEAxB,EAAc,YAAc"}
1
+ {"version":3,"file":"markdown-input-hzlzpUdj.js","sources":["../../src/components/ui/markdown-input.tsx"],"sourcesContent":["import { markdown } from \"@codemirror/lang-markdown\";\nimport {\n\ttype BasicSetupOptions,\n\tEditorView,\n\tuseCodeMirror,\n} from \"@uiw/react-codemirror\";\nimport React, { useEffect, useRef } from \"react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"@/utils\";\nimport { Button } from \"./button\";\nimport { Icon } from \"./icons\";\n\nconst extensions = [markdown(), EditorView.lineWrapping];\n\ntype MarkdownInputProps = React.ComponentProps<\"div\"> & {\n\tvalue?: string;\n\tonChange?: (value: string) => void;\n\tonBlur?: () => void;\n\tdisabled?: boolean;\n\tclassName?: string;\n\thideLineNumbers?: boolean;\n\tcopy?: boolean;\n};\n\nexport const MarkdownInput = React.forwardRef<\n\tHTMLDivElement,\n\tMarkdownInputProps\n>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tcopy = false,\n\t\t\tonBlur,\n\t\t\tdisabled,\n\t\t\thideLineNumbers = false,\n\t\t\t...props\n\t\t},\n\t\tforwardedRef,\n\t) => {\n\t\tconst editor = useRef<HTMLDivElement | null>(null);\n\t\t// Setting `basicSetup` messes up the tab order. We only change the basic setup\n\t\t// if the input is disabled, so we leave it undefined to maintain the tab order.\n\t\tlet basicSetup: BasicSetupOptions | undefined;\n\t\tif (disabled) {\n\t\t\tbasicSetup = {\n\t\t\t\tlineNumbers: !hideLineNumbers,\n\t\t\t\thighlightActiveLine: false,\n\t\t\t\tfoldGutter: false,\n\t\t\t\thighlightActiveLineGutter: false,\n\t\t\t};\n\t\t}\n\t\tconst { setContainer } = useCodeMirror({\n\t\t\tcontainer: editor.current,\n\t\t\textensions,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tonBlur,\n\t\t\tindentWithTab: false,\n\t\t\teditable: !disabled,\n\t\t\tbasicSetup,\n\t\t});\n\n\t\tuseEffect(() => {\n\t\t\tif (editor.current) {\n\t\t\t\tsetContainer(editor.current);\n\t\t\t}\n\t\t}, [setContainer]);\n\n\t\tconst handleCopy = (_value: string) => {\n\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\tvoid navigator.clipboard.writeText(_value);\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={(node) => {\n\t\t\t\t\teditor.current = node;\n\t\t\t\t\tif (typeof forwardedRef === \"function\") {\n\t\t\t\t\t\tforwardedRef(node);\n\t\t\t\t\t} else if (forwardedRef) {\n\t\t\t\t\t\tforwardedRef.current = node;\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{copy && value && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={() => handleCopy(value)}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"absolute top-0 right-0 z-10\"\n\t\t\t\t\t\taria-label=\"copy\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-2\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nMarkdownInput.displayName = \"MarkdownInput\";\n"],"names":["extensions","markdown","EditorView","MarkdownInput","React","className","value","onChange","copy","onBlur","disabled","hideLineNumbers","props","forwardedRef","editor","useRef","basicSetup","setContainer","useCodeMirror","useEffect","handleCopy","_value","toast","jsx","cn","node","Button","Icon"],"mappings":"iXAYA,MAAMA,EAAa,CAACC,IAAYC,EAAW,YAAY,EAY1CC,EAAgBC,EAAM,WAIlC,CACC,CACC,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,KAAAC,EAAO,GACP,OAAAC,EACA,SAAAC,EACA,gBAAAC,EAAkB,GAClB,GAAGC,CAAA,EAEJC,IACI,CACJ,MAAMC,EAASC,EAAAA,OAA8B,IAAI,EAGjD,IAAIC,EACAN,IACHM,EAAa,CACZ,YAAa,CAACL,EACd,oBAAqB,GACrB,WAAY,GACZ,0BAA2B,EAAA,GAG7B,KAAM,CAAE,aAAAM,CAAA,EAAiBC,EAAc,CACtC,UAAWJ,EAAO,QAClB,WAAAd,EACA,MAAAM,EACA,SAAAC,EAEA,cAAe,GACf,SAAU,CAACG,EACX,WAAAM,CAAA,CACA,EAEDG,EAAAA,UAAU,IAAM,CACXL,EAAO,SACVG,EAAaH,EAAO,OAAO,CAE7B,EAAG,CAACG,CAAY,CAAC,EAEjB,MAAMG,EAAcC,GAAmB,CACtCC,EAAM,QAAQ,qBAAqB,EAC9B,UAAU,UAAU,UAAUD,CAAM,CAC1C,EAEA,OACCE,EAAAA,IAAC,MAAA,CACA,UAAWC,EACV,8HACAnB,CAAA,EAED,IAAMoB,GAAS,CACdX,EAAO,QAAUW,EACb,OAAOZ,GAAiB,WAC3BA,EAAaY,CAAI,EACPZ,IACVA,EAAa,QAAUY,EAEzB,EACC,GAAGb,EAEH,YAAQN,GACRiB,EAAAA,IAACG,EAAA,CACA,QAAS,IAAMN,EAAWd,CAAK,EAC/B,QAAQ,QACR,KAAK,OACL,UAAU,8BACV,aAAW,OAEX,SAAAiB,EAAAA,IAACI,EAAA,CAAK,GAAG,OAAO,UAAU,QAAA,CAAS,CAAA,CAAA,CACpC,CAAA,CAIJ,CACD,EAEAxB,EAAc,YAAc"}
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/python-input-niCawr8m.js","assets/vendor-tanstack-BdLtprmr.js","assets/vendor-react-HBv6Kpyp.js","assets/vendor-codemirror-DDrdK9VD.js","assets/index-V_xTKaEb.js","assets/vendor-radix-CJc458uP.js","assets/vendor-recharts-CY3PKigC.js","assets/vendor-forms-BlFSCfFw.js","assets/vendor-date-Cl1Jav-N.js","assets/index-m9O-nIOl.css"])))=>i.map(i=>d[i]);
2
- import{j as e,r as s}from"./vendor-tanstack-BdLtprmr.js";import{b9 as p,cf as i}from"./index-V_xTKaEb.js";const a=s.lazy(()=>i(()=>import("./python-input-niCawr8m.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(t=>({default:t.PythonInput})));function c({className:t,...n}){return e.jsx(s.Suspense,{fallback:e.jsx(p,{className:`min-h-[200px] ${t??""}`}),children:e.jsx(a,{className:t,...n})})}function h({codeExample:t,name:n}){const o=s.useMemo(()=>{const[,r=""]=t.match(/```python([\S\s]*?)```/)??[];return r.replace("BLOCK_NAME",n??"block-name").trim()},[t,n]);return e.jsx("div",{className:"flex flex-col gap-4",children:e.jsx(c,{className:"p-2",value:o,disabled:!0,copy:!0,hideLineNumbers:!0})})}export{h as P};
3
- //# sourceMappingURL=python-example-snippet-DvulFxgw.js.map
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/python-input-Bxdnzvx3.js","assets/vendor-tanstack-BdLtprmr.js","assets/vendor-react-HBv6Kpyp.js","assets/vendor-codemirror-DDrdK9VD.js","assets/index-CPpeVt8m.js","assets/vendor-radix-CJc458uP.js","assets/vendor-recharts-CY3PKigC.js","assets/vendor-forms-BlFSCfFw.js","assets/vendor-date-Cl1Jav-N.js","assets/index-DJXBzX1E.css"])))=>i.map(i=>d[i]);
2
+ import{j as e,r as s}from"./vendor-tanstack-BdLtprmr.js";import{b8 as p,ce as i}from"./index-CPpeVt8m.js";const a=s.lazy(()=>i(()=>import("./python-input-Bxdnzvx3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(t=>({default:t.PythonInput})));function c({className:t,...n}){return e.jsx(s.Suspense,{fallback:e.jsx(p,{className:`min-h-[200px] ${t??""}`}),children:e.jsx(a,{className:t,...n})})}function h({codeExample:t,name:n}){const o=s.useMemo(()=>{const[,r=""]=t.match(/```python([\S\s]*?)```/)??[];return r.replace("BLOCK_NAME",n??"block-name").trim()},[t,n]);return e.jsx("div",{className:"flex flex-col gap-4",children:e.jsx(c,{className:"p-2",value:o,disabled:!0,copy:!0,hideLineNumbers:!0})})}export{h as P};
3
+ //# sourceMappingURL=python-example-snippet-d8bTNJ0J.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";0GAIA,MAAMA,EAAkBC,OAAK,IAAAC,EAAA,IAC5B,OAAO,4BAAgB,0CAAE,KAAMC,IAAS,CAAE,QAASA,EAAI,aAAc,CACtE,EAIO,SAASC,EAAgB,CAAE,UAAAC,EAAW,GAAGC,GAA+B,CAC9E,OACCC,MAACC,WAAA,CACA,SAAUD,MAACE,EAAA,CAAS,UAAW,iBAAiBJ,GAAa,EAAE,GAAI,EAEnE,SAAAE,MAACP,EAAA,CAAgB,UAAAK,EAAuB,GAAGC,CAAA,CAAO,GAGrD,CCXO,SAASI,EAAmB,CAClC,YAAAC,EACA,KAAAC,CACD,EAA4B,CAC3B,MAAMC,EAAUC,UAAQ,IAAM,CAC7B,KAAM,EAAGC,EAAiB,EAAE,EAC3BJ,EAAY,MAAM,wBAAwB,GAAK,GAKhD,OAJsBI,EAAe,QACpC,aACAH,GAAQ,cAEY,MACtB,EAAG,CAACD,EAAaC,CAAI,CAAC,EAEtB,OACCL,MAAC,OAAI,UAAU,sBACd,SAAAA,MAACS,EAAA,CACA,UAAU,MACV,MAAOH,EACP,SAAQ,GACR,KAAI,GACJ,gBAAe,KAEjB,CAEF","names":["PythonInputLazy","lazy","__vitePreload","mod","LazyPythonInput","className","props","jsx","Suspense","Skeleton","PythonBlockSnippet","codeExample","name","snippet","useMemo","genericSnippet","PythonInput"],"ignoreList":[],"sources":["../../src/components/ui/python-input-lazy.tsx","../../src/components/blocks/python-example-snippet.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport { lazy, Suspense } from \"react\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\n\nconst PythonInputLazy = lazy(() =>\n\timport(\"./python-input\").then((mod) => ({ default: mod.PythonInput })),\n);\n\ntype LazyPythonInputProps = ComponentProps<typeof PythonInputLazy>;\n\nexport function LazyPythonInput({ className, ...props }: LazyPythonInputProps) {\n\treturn (\n\t\t<Suspense\n\t\t\tfallback={<Skeleton className={`min-h-[200px] ${className ?? \"\"}`} />}\n\t\t>\n\t\t\t<PythonInputLazy className={className} {...props} />\n\t\t</Suspense>\n\t);\n}\n","import { useMemo } from \"react\";\nimport { LazyPythonInput as PythonInput } from \"@/components/ui/python-input-lazy\";\n\ntype PythonBlockSnippetProps = {\n\tcodeExample: string;\n\tname: string | undefined | null;\n};\nexport function PythonBlockSnippet({\n\tcodeExample,\n\tname,\n}: PythonBlockSnippetProps) {\n\tconst snippet = useMemo(() => {\n\t\tconst [, genericSnippet = \"\"] =\n\t\t\tcodeExample.match(/```python([\\S\\s]*?)```/) ?? [];\n\t\tconst customSnippet = genericSnippet.replace(\n\t\t\t\"BLOCK_NAME\",\n\t\t\tname ?? \"block-name\",\n\t\t);\n\t\treturn customSnippet.trim();\n\t}, [codeExample, name]);\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<PythonInput\n\t\t\t\tclassName=\"p-2\"\n\t\t\t\tvalue={snippet}\n\t\t\t\tdisabled\n\t\t\t\tcopy\n\t\t\t\thideLineNumbers\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"file":"python-example-snippet-DvulFxgw.js"}
1
+ {"version":3,"mappings":";0GAIA,MAAMA,EAAkBC,OAAK,IAAAC,EAAA,IAC5B,OAAO,4BAAgB,0CAAE,KAAMC,IAAS,CAAE,QAASA,EAAI,aAAc,CACtE,EAIO,SAASC,EAAgB,CAAE,UAAAC,EAAW,GAAGC,GAA+B,CAC9E,OACCC,MAACC,WAAA,CACA,SAAUD,MAACE,EAAA,CAAS,UAAW,iBAAiBJ,GAAa,EAAE,GAAI,EAEnE,SAAAE,MAACP,EAAA,CAAgB,UAAAK,EAAuB,GAAGC,CAAA,CAAO,GAGrD,CCXO,SAASI,EAAmB,CAClC,YAAAC,EACA,KAAAC,CACD,EAA4B,CAC3B,MAAMC,EAAUC,UAAQ,IAAM,CAC7B,KAAM,EAAGC,EAAiB,EAAE,EAC3BJ,EAAY,MAAM,wBAAwB,GAAK,GAKhD,OAJsBI,EAAe,QACpC,aACAH,GAAQ,cAEY,MACtB,EAAG,CAACD,EAAaC,CAAI,CAAC,EAEtB,OACCL,MAAC,OAAI,UAAU,sBACd,SAAAA,MAACS,EAAA,CACA,UAAU,MACV,MAAOH,EACP,SAAQ,GACR,KAAI,GACJ,gBAAe,KAEjB,CAEF","names":["PythonInputLazy","lazy","__vitePreload","mod","LazyPythonInput","className","props","jsx","Suspense","Skeleton","PythonBlockSnippet","codeExample","name","snippet","useMemo","genericSnippet","PythonInput"],"ignoreList":[],"sources":["../../src/components/ui/python-input-lazy.tsx","../../src/components/blocks/python-example-snippet.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport { lazy, Suspense } from \"react\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\n\nconst PythonInputLazy = lazy(() =>\n\timport(\"./python-input\").then((mod) => ({ default: mod.PythonInput })),\n);\n\ntype LazyPythonInputProps = ComponentProps<typeof PythonInputLazy>;\n\nexport function LazyPythonInput({ className, ...props }: LazyPythonInputProps) {\n\treturn (\n\t\t<Suspense\n\t\t\tfallback={<Skeleton className={`min-h-[200px] ${className ?? \"\"}`} />}\n\t\t>\n\t\t\t<PythonInputLazy className={className} {...props} />\n\t\t</Suspense>\n\t);\n}\n","import { useMemo } from \"react\";\nimport { LazyPythonInput as PythonInput } from \"@/components/ui/python-input-lazy\";\n\ntype PythonBlockSnippetProps = {\n\tcodeExample: string;\n\tname: string | undefined | null;\n};\nexport function PythonBlockSnippet({\n\tcodeExample,\n\tname,\n}: PythonBlockSnippetProps) {\n\tconst snippet = useMemo(() => {\n\t\tconst [, genericSnippet = \"\"] =\n\t\t\tcodeExample.match(/```python([\\S\\s]*?)```/) ?? [];\n\t\tconst customSnippet = genericSnippet.replace(\n\t\t\t\"BLOCK_NAME\",\n\t\t\tname ?? \"block-name\",\n\t\t);\n\t\treturn customSnippet.trim();\n\t}, [codeExample, name]);\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<PythonInput\n\t\t\t\tclassName=\"p-2\"\n\t\t\t\tvalue={snippet}\n\t\t\t\tdisabled\n\t\t\t\tcopy\n\t\t\t\thideLineNumbers\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"file":"python-example-snippet-d8bTNJ0J.js"}
@@ -1,2 +1,2 @@
1
- import{c as d,r as c,j as s}from"./vendor-tanstack-BdLtprmr.js";import{u as g,p as x,E as y}from"./vendor-codemirror-DDrdK9VD.js";import{a_ as b,q as v,I as C,y as j}from"./index-V_xTKaEb.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./vendor-date-Cl1Jav-N.js";const w=[x(),y.lineWrapping],E=d.forwardRef(({className:l,value:o,onChange:p,copy:u=!1,onBlur:N,disabled:r,hideLineNumbers:h=!1,...f},i)=>{const e=c.useRef(null);let n;r&&(n={lineNumbers:!h,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1});const{setContainer:a}=g({container:e.current,extensions:w,value:o,onChange:p,indentWithTab:!1,editable:!r,basicSetup:n});c.useEffect(()=>{e.current&&a(e.current)},[a]);const m=t=>{j.success("Copied to clipboard"),navigator.clipboard.writeText(t)};return s.jsx("div",{className:b("rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative",l),ref:t=>{e.current=t,typeof i=="function"?i(t):i&&(i.current=t)},...f,children:u&&o&&s.jsx(v,{onClick:()=>m(o),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:s.jsx(C,{id:"Copy",className:"size-2"})})})});E.displayName="PythonInput";export{E as PythonInput};
2
- //# sourceMappingURL=python-input-niCawr8m.js.map
1
+ import{c as d,r as c,j as s}from"./vendor-tanstack-BdLtprmr.js";import{u as g,p as x,E as y}from"./vendor-codemirror-DDrdK9VD.js";import{aZ as b,q as v,I as C,y as j}from"./index-CPpeVt8m.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./vendor-date-Cl1Jav-N.js";const w=[x(),y.lineWrapping],E=d.forwardRef(({className:l,value:o,onChange:p,copy:u=!1,onBlur:N,disabled:r,hideLineNumbers:h=!1,...f},i)=>{const e=c.useRef(null);let n;r&&(n={lineNumbers:!h,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1});const{setContainer:a}=g({container:e.current,extensions:w,value:o,onChange:p,indentWithTab:!1,editable:!r,basicSetup:n});c.useEffect(()=>{e.current&&a(e.current)},[a]);const m=t=>{j.success("Copied to clipboard"),navigator.clipboard.writeText(t)};return s.jsx("div",{className:b("rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative",l),ref:t=>{e.current=t,typeof i=="function"?i(t):i&&(i.current=t)},...f,children:u&&o&&s.jsx(v,{onClick:()=>m(o),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:s.jsx(C,{id:"Copy",className:"size-2"})})})});E.displayName="PythonInput";export{E as PythonInput};
2
+ //# sourceMappingURL=python-input-Bxdnzvx3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"python-input-niCawr8m.js","sources":["../../src/components/ui/python-input.tsx"],"sourcesContent":["import { python } from \"@codemirror/lang-python\";\nimport {\n\ttype BasicSetupOptions,\n\tEditorView,\n\tuseCodeMirror,\n} from \"@uiw/react-codemirror\";\nimport React, { useEffect, useRef } from \"react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"@/utils\";\nimport { Button } from \"./button\";\nimport { Icon } from \"./icons\";\n\nconst extensions = [python(), EditorView.lineWrapping];\n\ntype PythonInputProps = React.ComponentProps<\"div\"> & {\n\tvalue?: string;\n\tonChange?: (value: string) => void;\n\tonBlur?: () => void;\n\tdisabled?: boolean;\n\tclassName?: string;\n\thideLineNumbers?: boolean;\n\tcopy?: boolean;\n};\n\nexport const PythonInput = React.forwardRef<HTMLDivElement, PythonInputProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tcopy = false,\n\t\t\tonBlur,\n\t\t\tdisabled,\n\t\t\thideLineNumbers = false,\n\t\t\t...props\n\t\t},\n\t\tforwardedRef,\n\t) => {\n\t\tconst editor = useRef<HTMLDivElement | null>(null);\n\t\t// Setting `basicSetup` messes up the tab order. We only change the basic setup\n\t\t// if the input is disabled, so we leave it undefined to maintain the tab order.\n\t\tlet basicSetup: BasicSetupOptions | undefined;\n\t\tif (disabled) {\n\t\t\tbasicSetup = {\n\t\t\t\tlineNumbers: !hideLineNumbers,\n\t\t\t\thighlightActiveLine: false,\n\t\t\t\tfoldGutter: false,\n\t\t\t\thighlightActiveLineGutter: false,\n\t\t\t};\n\t\t}\n\t\tconst { setContainer } = useCodeMirror({\n\t\t\tcontainer: editor.current,\n\t\t\textensions,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tonBlur,\n\t\t\tindentWithTab: false,\n\t\t\teditable: !disabled,\n\t\t\tbasicSetup,\n\t\t});\n\n\t\tuseEffect(() => {\n\t\t\tif (editor.current) {\n\t\t\t\tsetContainer(editor.current);\n\t\t\t}\n\t\t}, [setContainer]);\n\n\t\tconst handleCopy = (_value: string) => {\n\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\tvoid navigator.clipboard.writeText(_value);\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={(node) => {\n\t\t\t\t\teditor.current = node;\n\t\t\t\t\tif (typeof forwardedRef === \"function\") {\n\t\t\t\t\t\tforwardedRef(node);\n\t\t\t\t\t} else if (forwardedRef) {\n\t\t\t\t\t\tforwardedRef.current = node;\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{copy && value && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={() => handleCopy(value)}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"absolute top-0 right-0 z-10\"\n\t\t\t\t\t\taria-label=\"copy\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-2\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nPythonInput.displayName = \"PythonInput\";\n"],"names":["extensions","python","EditorView","PythonInput","React","className","value","onChange","copy","onBlur","disabled","hideLineNumbers","props","forwardedRef","editor","useRef","basicSetup","setContainer","useCodeMirror","useEffect","handleCopy","_value","toast","jsx","cn","node","Button","Icon"],"mappings":"iXAYA,MAAMA,EAAa,CAACC,IAAUC,EAAW,YAAY,EAYxCC,EAAcC,EAAM,WAChC,CACC,CACC,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,KAAAC,EAAO,GACP,OAAAC,EACA,SAAAC,EACA,gBAAAC,EAAkB,GAClB,GAAGC,CAAA,EAEJC,IACI,CACJ,MAAMC,EAASC,EAAAA,OAA8B,IAAI,EAGjD,IAAIC,EACAN,IACHM,EAAa,CACZ,YAAa,CAACL,EACd,oBAAqB,GACrB,WAAY,GACZ,0BAA2B,EAAA,GAG7B,KAAM,CAAE,aAAAM,CAAA,EAAiBC,EAAc,CACtC,UAAWJ,EAAO,QAClB,WAAAd,EACA,MAAAM,EACA,SAAAC,EAEA,cAAe,GACf,SAAU,CAACG,EACX,WAAAM,CAAA,CACA,EAEDG,EAAAA,UAAU,IAAM,CACXL,EAAO,SACVG,EAAaH,EAAO,OAAO,CAE7B,EAAG,CAACG,CAAY,CAAC,EAEjB,MAAMG,EAAcC,GAAmB,CACtCC,EAAM,QAAQ,qBAAqB,EAC9B,UAAU,UAAU,UAAUD,CAAM,CAC1C,EAEA,OACCE,EAAAA,IAAC,MAAA,CACA,UAAWC,EACV,8HACAnB,CAAA,EAED,IAAMoB,GAAS,CACdX,EAAO,QAAUW,EACb,OAAOZ,GAAiB,WAC3BA,EAAaY,CAAI,EACPZ,IACVA,EAAa,QAAUY,EAEzB,EACC,GAAGb,EAEH,YAAQN,GACRiB,EAAAA,IAACG,EAAA,CACA,QAAS,IAAMN,EAAWd,CAAK,EAC/B,QAAQ,QACR,KAAK,OACL,UAAU,8BACV,aAAW,OAEX,SAAAiB,EAAAA,IAACI,EAAA,CAAK,GAAG,OAAO,UAAU,QAAA,CAAS,CAAA,CAAA,CACpC,CAAA,CAIJ,CACD,EAEAxB,EAAY,YAAc"}
1
+ {"version":3,"file":"python-input-Bxdnzvx3.js","sources":["../../src/components/ui/python-input.tsx"],"sourcesContent":["import { python } from \"@codemirror/lang-python\";\nimport {\n\ttype BasicSetupOptions,\n\tEditorView,\n\tuseCodeMirror,\n} from \"@uiw/react-codemirror\";\nimport React, { useEffect, useRef } from \"react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"@/utils\";\nimport { Button } from \"./button\";\nimport { Icon } from \"./icons\";\n\nconst extensions = [python(), EditorView.lineWrapping];\n\ntype PythonInputProps = React.ComponentProps<\"div\"> & {\n\tvalue?: string;\n\tonChange?: (value: string) => void;\n\tonBlur?: () => void;\n\tdisabled?: boolean;\n\tclassName?: string;\n\thideLineNumbers?: boolean;\n\tcopy?: boolean;\n};\n\nexport const PythonInput = React.forwardRef<HTMLDivElement, PythonInputProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tcopy = false,\n\t\t\tonBlur,\n\t\t\tdisabled,\n\t\t\thideLineNumbers = false,\n\t\t\t...props\n\t\t},\n\t\tforwardedRef,\n\t) => {\n\t\tconst editor = useRef<HTMLDivElement | null>(null);\n\t\t// Setting `basicSetup` messes up the tab order. We only change the basic setup\n\t\t// if the input is disabled, so we leave it undefined to maintain the tab order.\n\t\tlet basicSetup: BasicSetupOptions | undefined;\n\t\tif (disabled) {\n\t\t\tbasicSetup = {\n\t\t\t\tlineNumbers: !hideLineNumbers,\n\t\t\t\thighlightActiveLine: false,\n\t\t\t\tfoldGutter: false,\n\t\t\t\thighlightActiveLineGutter: false,\n\t\t\t};\n\t\t}\n\t\tconst { setContainer } = useCodeMirror({\n\t\t\tcontainer: editor.current,\n\t\t\textensions,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tonBlur,\n\t\t\tindentWithTab: false,\n\t\t\teditable: !disabled,\n\t\t\tbasicSetup,\n\t\t});\n\n\t\tuseEffect(() => {\n\t\t\tif (editor.current) {\n\t\t\t\tsetContainer(editor.current);\n\t\t\t}\n\t\t}, [setContainer]);\n\n\t\tconst handleCopy = (_value: string) => {\n\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\tvoid navigator.clipboard.writeText(_value);\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={(node) => {\n\t\t\t\t\teditor.current = node;\n\t\t\t\t\tif (typeof forwardedRef === \"function\") {\n\t\t\t\t\t\tforwardedRef(node);\n\t\t\t\t\t} else if (forwardedRef) {\n\t\t\t\t\t\tforwardedRef.current = node;\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{copy && value && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={() => handleCopy(value)}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"absolute top-0 right-0 z-10\"\n\t\t\t\t\t\taria-label=\"copy\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-2\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nPythonInput.displayName = \"PythonInput\";\n"],"names":["extensions","python","EditorView","PythonInput","React","className","value","onChange","copy","onBlur","disabled","hideLineNumbers","props","forwardedRef","editor","useRef","basicSetup","setContainer","useCodeMirror","useEffect","handleCopy","_value","toast","jsx","cn","node","Button","Icon"],"mappings":"iXAYA,MAAMA,EAAa,CAACC,IAAUC,EAAW,YAAY,EAYxCC,EAAcC,EAAM,WAChC,CACC,CACC,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,KAAAC,EAAO,GACP,OAAAC,EACA,SAAAC,EACA,gBAAAC,EAAkB,GAClB,GAAGC,CAAA,EAEJC,IACI,CACJ,MAAMC,EAASC,EAAAA,OAA8B,IAAI,EAGjD,IAAIC,EACAN,IACHM,EAAa,CACZ,YAAa,CAACL,EACd,oBAAqB,GACrB,WAAY,GACZ,0BAA2B,EAAA,GAG7B,KAAM,CAAE,aAAAM,CAAA,EAAiBC,EAAc,CACtC,UAAWJ,EAAO,QAClB,WAAAd,EACA,MAAAM,EACA,SAAAC,EAEA,cAAe,GACf,SAAU,CAACG,EACX,WAAAM,CAAA,CACA,EAEDG,EAAAA,UAAU,IAAM,CACXL,EAAO,SACVG,EAAaH,EAAO,OAAO,CAE7B,EAAG,CAACG,CAAY,CAAC,EAEjB,MAAMG,EAAcC,GAAmB,CACtCC,EAAM,QAAQ,qBAAqB,EAC9B,UAAU,UAAU,UAAUD,CAAM,CAC1C,EAEA,OACCE,EAAAA,IAAC,MAAA,CACA,UAAWC,EACV,8HACAnB,CAAA,EAED,IAAMoB,GAAS,CACdX,EAAO,QAAUW,EACb,OAAOZ,GAAiB,WAC3BA,EAAaY,CAAI,EACPZ,IACVA,EAAa,QAAUY,EAEzB,EACC,GAAGb,EAEH,YAAQN,GACRiB,EAAAA,IAACG,EAAA,CACA,QAAS,IAAMN,EAAWd,CAAK,EAC/B,QAAQ,QACR,KAAK,OACL,UAAU,8BACV,aAAW,OAEX,SAAAiB,EAAAA,IAACI,EAAA,CAAK,GAAG,OAAO,UAAU,QAAA,CAAS,CAAA,CAAA,CACpC,CAAA,CAIJ,CACD,EAEAxB,EAAY,YAAc"}
@@ -1,2 +1,2 @@
1
- import{r as o,j as r}from"./vendor-tanstack-BdLtprmr.js";import{ap as i,aq as t,ar as l}from"./vendor-radix-CJc458uP.js";import{a_ as c,d6 as n}from"./index-V_xTKaEb.js";const d=o.forwardRef(({className:a,...s},e)=>r.jsx(i,{className:c("grid gap-2",a),...s,ref:e}));d.displayName=i.displayName;const m=o.forwardRef(({className:a,...s},e)=>r.jsx(t,{ref:e,className:c("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),...s,children:r.jsx(l,{className:"flex items-center justify-center",children:r.jsx(n,{className:"h-2.5 w-2.5 fill-current text-current"})})}));m.displayName=t.displayName;export{d as R,m as a};
2
- //# sourceMappingURL=radio-group-D55TQZsk.js.map
1
+ import{r as o,j as r}from"./vendor-tanstack-BdLtprmr.js";import{ap as i,aq as t,ar as l}from"./vendor-radix-CJc458uP.js";import{aZ as c,d5 as n}from"./index-CPpeVt8m.js";const d=o.forwardRef(({className:a,...s},e)=>r.jsx(i,{className:c("grid gap-2",a),...s,ref:e}));d.displayName=i.displayName;const m=o.forwardRef(({className:a,...s},e)=>r.jsx(t,{ref:e,className:c("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),...s,children:r.jsx(l,{className:"flex items-center justify-center",children:r.jsx(n,{className:"h-2.5 w-2.5 fill-current text-current"})})}));m.displayName=t.displayName;export{d as R,m as a};
2
+ //# sourceMappingURL=radio-group-0oOEMJCS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group-D55TQZsk.js","sources":["../../src/components/ui/radio-group.tsx"],"sourcesContent":["import * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { Circle } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nconst RadioGroup = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<RadioGroupPrimitive.Root\n\t\t\tclassName={cn(\"grid gap-2\", className)}\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t/>\n\t);\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<RadioGroupPrimitive.Item\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n\t\t\t\t<Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\n\t\t\t</RadioGroupPrimitive.Indicator>\n\t\t</RadioGroupPrimitive.Item>\n\t);\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"],"names":["RadioGroup","React.forwardRef","className","props","ref","jsx","RadioGroupPrimitive.Root","cn","RadioGroupItem","RadioGroupPrimitive.Item","RadioGroupPrimitive.Indicator","Circle"],"mappings":"0KAMA,MAAMA,EAAaC,EAAAA,WAGjB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAA,EAASC,IAE1BC,EAAAA,IAACC,EAAA,CACA,UAAWC,EAAG,aAAcL,CAAS,EACpC,GAAGC,EACJ,IAAAC,CAAA,CAAA,CAGF,EACDJ,EAAW,YAAcM,EAAyB,YAElD,MAAME,EAAiBP,EAAAA,WAGrB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAA,EAASC,IAE1BC,EAAAA,IAACI,EAAA,CACA,IAAAL,EACA,UAAWG,EACV,2OACAL,CAAA,EAEA,GAAGC,EAEJ,SAAAE,EAAAA,IAACK,EAAA,CAA8B,UAAU,mCACxC,SAAAL,EAAAA,IAACM,EAAA,CAAO,UAAU,uCAAA,CAAwC,CAAA,CAC3D,CAAA,CAAA,CAGF,EACDH,EAAe,YAAcC,EAAyB"}
1
+ {"version":3,"file":"radio-group-0oOEMJCS.js","sources":["../../src/components/ui/radio-group.tsx"],"sourcesContent":["import * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { Circle } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nconst RadioGroup = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<RadioGroupPrimitive.Root\n\t\t\tclassName={cn(\"grid gap-2\", className)}\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t/>\n\t);\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<RadioGroupPrimitive.Item\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n\t\t\t\t<Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\n\t\t\t</RadioGroupPrimitive.Indicator>\n\t\t</RadioGroupPrimitive.Item>\n\t);\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"],"names":["RadioGroup","React.forwardRef","className","props","ref","jsx","RadioGroupPrimitive.Root","cn","RadioGroupItem","RadioGroupPrimitive.Item","RadioGroupPrimitive.Indicator","Circle"],"mappings":"0KAMA,MAAMA,EAAaC,EAAAA,WAGjB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAA,EAASC,IAE1BC,EAAAA,IAACC,EAAA,CACA,UAAWC,EAAG,aAAcL,CAAS,EACpC,GAAGC,EACJ,IAAAC,CAAA,CAAA,CAGF,EACDJ,EAAW,YAAcM,EAAyB,YAElD,MAAME,EAAiBP,EAAAA,WAGrB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAA,EAASC,IAE1BC,EAAAA,IAACI,EAAA,CACA,IAAAL,EACA,UAAWG,EACV,2OACAL,CAAA,EAEA,GAAGC,EAEJ,SAAAE,EAAAA,IAACK,EAAA,CAA8B,UAAU,mCACxC,SAAAL,EAAAA,IAACM,EAAA,CAAO,UAAU,uCAAA,CAAwC,CAAA,CAC3D,CAAA,CAAA,CAGF,EACDH,EAAe,YAAcC,EAAyB"}
@@ -1,2 +1,2 @@
1
- import{r as s,j as e}from"./vendor-tanstack-BdLtprmr.js";import{C as f,o as R,cg as h,q as g,ch as j,a_ as p}from"./index-V_xTKaEb.js";const N=5e3,v=3e4;function u(a){const t=N*2**a;return Math.min(t,v)}function E({error:a,onRetry:t}){const r=s.useRef(0),[m,l]=s.useState(u(0)/1e3),[c,n]=s.useState(!1),d=s.useCallback(()=>{n(!0),t(),r.current+=1;const i=u(r.current);l(i/1e3),setTimeout(()=>n(!1),500)},[t]),x=s.useCallback(()=>{n(!0),t(),r.current=0,l(u(0)/1e3),setTimeout(()=>n(!1),500)},[t]);return s.useEffect(()=>{const i=setInterval(()=>{l(o=>o<=1?(d(),o):o-1)},1e3);return()=>clearInterval(i)},[d]),e.jsx(f,{className:"mx-auto max-w-md",children:e.jsxs(R,{className:"flex flex-col items-center gap-4 pt-6 text-center",children:[e.jsx("div",{className:"rounded-full bg-destructive/10 p-3",children:e.jsx(h,{className:"size-8 text-destructive"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-lg font-semibold",children:a.message}),a.details&&e.jsx("p",{className:"text-sm text-muted-foreground",children:a.details})]}),e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsxs(g,{onClick:x,disabled:c,variant:"outline",className:"gap-2",children:[e.jsx(j,{className:p("size-4",c&&"animate-spin")}),c?"Retrying...":"Retry"]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Retrying in ",m,"s"]})]})]})})}export{E as R};
2
- //# sourceMappingURL=route-error-state-Cu4m0LTX.js.map
1
+ import{r as s,j as e}from"./vendor-tanstack-BdLtprmr.js";import{C as f,o as R,cf as g,q as h,cg as j,aZ as p}from"./index-CPpeVt8m.js";const N=5e3,v=3e4;function u(a){const t=N*2**a;return Math.min(t,v)}function E({error:a,onRetry:t}){const r=s.useRef(0),[m,l]=s.useState(u(0)/1e3),[c,n]=s.useState(!1),d=s.useCallback(()=>{n(!0),t(),r.current+=1;const i=u(r.current);l(i/1e3),setTimeout(()=>n(!1),500)},[t]),x=s.useCallback(()=>{n(!0),t(),r.current=0,l(u(0)/1e3),setTimeout(()=>n(!1),500)},[t]);return s.useEffect(()=>{const i=setInterval(()=>{l(o=>o<=1?(d(),o):o-1)},1e3);return()=>clearInterval(i)},[d]),e.jsx(f,{className:"mx-auto max-w-md",children:e.jsxs(R,{className:"flex flex-col items-center gap-4 pt-6 text-center",children:[e.jsx("div",{className:"rounded-full bg-destructive/10 p-3",children:e.jsx(g,{className:"size-8 text-destructive"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-lg font-semibold",children:a.message}),a.details&&e.jsx("p",{className:"text-sm text-muted-foreground",children:a.details})]}),e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsxs(h,{onClick:x,disabled:c,variant:"outline",className:"gap-2",children:[e.jsx(j,{className:p("size-4",c&&"animate-spin")}),c?"Retrying...":"Retry"]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Retrying in ",m,"s"]})]})]})})}export{E as R};
2
+ //# sourceMappingURL=route-error-state-BqbnZCc-.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"route-error-state-Cu4m0LTX.js","sources":["../../src/components/ui/route-error-state.tsx"],"sourcesContent":["import { AlertCircle, RefreshCw } from \"lucide-react\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport type { ServerError } from \"@/api/error-utils\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent } from \"@/components/ui/card\";\nimport { cn } from \"@/utils\";\n\nconst BASE_RETRY_INTERVAL_MS = 5000;\nconst MAX_RETRY_INTERVAL_MS = 30000;\n\nfunction getRetryInterval(attempt: number): number {\n\tconst interval = BASE_RETRY_INTERVAL_MS * 2 ** attempt;\n\treturn Math.min(interval, MAX_RETRY_INTERVAL_MS);\n}\n\ntype RouteErrorStateProps = {\n\terror: ServerError;\n\tonRetry: () => void;\n};\n\nexport function RouteErrorState({ error, onRetry }: RouteErrorStateProps) {\n\tconst retryAttemptRef = useRef(0);\n\tconst [secondsUntilRetry, setSecondsUntilRetry] = useState(\n\t\tgetRetryInterval(0) / 1000,\n\t);\n\tconst [isRetrying, setIsRetrying] = useState(false);\n\n\tconst handleAutoRetry = useCallback(() => {\n\t\tsetIsRetrying(true);\n\t\tonRetry();\n\t\tretryAttemptRef.current += 1;\n\t\tconst nextInterval = getRetryInterval(retryAttemptRef.current);\n\t\tsetSecondsUntilRetry(nextInterval / 1000);\n\t\tsetTimeout(() => setIsRetrying(false), 500);\n\t}, [onRetry]);\n\n\tconst handleManualRetry = useCallback(() => {\n\t\tsetIsRetrying(true);\n\t\tonRetry();\n\t\tretryAttemptRef.current = 0;\n\t\tsetSecondsUntilRetry(getRetryInterval(0) / 1000);\n\t\tsetTimeout(() => setIsRetrying(false), 500);\n\t}, [onRetry]);\n\n\tuseEffect(() => {\n\t\tconst interval = setInterval(() => {\n\t\t\tsetSecondsUntilRetry((prev) => {\n\t\t\t\tif (prev <= 1) {\n\t\t\t\t\thandleAutoRetry();\n\t\t\t\t\treturn prev;\n\t\t\t\t}\n\t\t\t\treturn prev - 1;\n\t\t\t});\n\t\t}, 1000);\n\n\t\treturn () => clearInterval(interval);\n\t}, [handleAutoRetry]);\n\n\treturn (\n\t\t<Card className=\"mx-auto max-w-md\">\n\t\t\t<CardContent className=\"flex flex-col items-center gap-4 pt-6 text-center\">\n\t\t\t\t<div className=\"rounded-full bg-destructive/10 p-3\">\n\t\t\t\t\t<AlertCircle className=\"size-8 text-destructive\" />\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t<h2 className=\"text-lg font-semibold\">{error.message}</h2>\n\t\t\t\t\t{error.details && (\n\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">{error.details}</p>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex flex-col items-center gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={handleManualRetry}\n\t\t\t\t\t\tdisabled={isRetrying}\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tclassName=\"gap-2\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<RefreshCw className={cn(\"size-4\", isRetrying && \"animate-spin\")} />\n\t\t\t\t\t\t{isRetrying ? \"Retrying...\" : \"Retry\"}\n\t\t\t\t\t</Button>\n\n\t\t\t\t\t<p className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\tRetrying in {secondsUntilRetry}s\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n}\n"],"names":["BASE_RETRY_INTERVAL_MS","MAX_RETRY_INTERVAL_MS","getRetryInterval","attempt","interval","RouteErrorState","error","onRetry","retryAttemptRef","useRef","secondsUntilRetry","setSecondsUntilRetry","useState","isRetrying","setIsRetrying","handleAutoRetry","useCallback","nextInterval","handleManualRetry","useEffect","prev","Card","jsxs","CardContent","jsx","AlertCircle","Button","RefreshCw","cn"],"mappings":"uIAOA,MAAMA,EAAyB,IACzBC,EAAwB,IAE9B,SAASC,EAAiBC,EAAyB,CAClD,MAAMC,EAAWJ,EAAyB,GAAKG,EAC/C,OAAO,KAAK,IAAIC,EAAUH,CAAqB,CAChD,CAOO,SAASI,EAAgB,CAAE,MAAAC,EAAO,QAAAC,GAAiC,CACzE,MAAMC,EAAkBC,EAAAA,OAAO,CAAC,EAC1B,CAACC,EAAmBC,CAAoB,EAAIC,EAAAA,SACjDV,EAAiB,CAAC,EAAI,GAAA,EAEjB,CAACW,EAAYC,CAAa,EAAIF,EAAAA,SAAS,EAAK,EAE5CG,EAAkBC,EAAAA,YAAY,IAAM,CACzCF,EAAc,EAAI,EAClBP,EAAA,EACAC,EAAgB,SAAW,EAC3B,MAAMS,EAAef,EAAiBM,EAAgB,OAAO,EAC7DG,EAAqBM,EAAe,GAAI,EACxC,WAAW,IAAMH,EAAc,EAAK,EAAG,GAAG,CAC3C,EAAG,CAACP,CAAO,CAAC,EAENW,EAAoBF,EAAAA,YAAY,IAAM,CAC3CF,EAAc,EAAI,EAClBP,EAAA,EACAC,EAAgB,QAAU,EAC1BG,EAAqBT,EAAiB,CAAC,EAAI,GAAI,EAC/C,WAAW,IAAMY,EAAc,EAAK,EAAG,GAAG,CAC3C,EAAG,CAACP,CAAO,CAAC,EAEZY,OAAAA,EAAAA,UAAU,IAAM,CACf,MAAMf,EAAW,YAAY,IAAM,CAClCO,EAAsBS,GACjBA,GAAQ,GACXL,EAAA,EACOK,GAEDA,EAAO,CACd,CACF,EAAG,GAAI,EAEP,MAAO,IAAM,cAAchB,CAAQ,CACpC,EAAG,CAACW,CAAe,CAAC,QAGlBM,EAAA,CAAK,UAAU,mBACf,SAAAC,EAAAA,KAACC,EAAA,CAAY,UAAU,oDACtB,SAAA,CAAAC,EAAAA,IAAC,OAAI,UAAU,qCACd,eAACC,EAAA,CAAY,UAAU,0BAA0B,CAAA,CAClD,EAEAH,EAAAA,KAAC,MAAA,CAAI,UAAU,YACd,SAAA,CAAAE,EAAAA,IAAC,KAAA,CAAG,UAAU,wBAAyB,SAAAlB,EAAM,QAAQ,EACpDA,EAAM,SACNkB,EAAAA,IAAC,KAAE,UAAU,gCAAiC,WAAM,OAAA,CAAQ,CAAA,EAE9D,EAEAF,EAAAA,KAAC,MAAA,CAAI,UAAU,mCACd,SAAA,CAAAA,EAAAA,KAACI,EAAA,CACA,QAASR,EACT,SAAUL,EACV,QAAQ,UACR,UAAU,QAEV,SAAA,CAAAW,MAACG,GAAU,UAAWC,EAAG,SAAUf,GAAc,cAAc,EAAG,EACjEA,EAAa,cAAgB,OAAA,CAAA,CAAA,EAG/BS,EAAAA,KAAC,IAAA,CAAE,UAAU,gCAAgC,SAAA,CAAA,eAC/BZ,EAAkB,GAAA,CAAA,CAChC,CAAA,CAAA,CACD,CAAA,CAAA,CACD,CAAA,CACD,CAEF"}
1
+ {"version":3,"file":"route-error-state-BqbnZCc-.js","sources":["../../src/components/ui/route-error-state.tsx"],"sourcesContent":["import { AlertCircle, RefreshCw } from \"lucide-react\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport type { ServerError } from \"@/api/error-utils\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent } from \"@/components/ui/card\";\nimport { cn } from \"@/utils\";\n\nconst BASE_RETRY_INTERVAL_MS = 5000;\nconst MAX_RETRY_INTERVAL_MS = 30000;\n\nfunction getRetryInterval(attempt: number): number {\n\tconst interval = BASE_RETRY_INTERVAL_MS * 2 ** attempt;\n\treturn Math.min(interval, MAX_RETRY_INTERVAL_MS);\n}\n\ntype RouteErrorStateProps = {\n\terror: ServerError;\n\tonRetry: () => void;\n};\n\nexport function RouteErrorState({ error, onRetry }: RouteErrorStateProps) {\n\tconst retryAttemptRef = useRef(0);\n\tconst [secondsUntilRetry, setSecondsUntilRetry] = useState(\n\t\tgetRetryInterval(0) / 1000,\n\t);\n\tconst [isRetrying, setIsRetrying] = useState(false);\n\n\tconst handleAutoRetry = useCallback(() => {\n\t\tsetIsRetrying(true);\n\t\tonRetry();\n\t\tretryAttemptRef.current += 1;\n\t\tconst nextInterval = getRetryInterval(retryAttemptRef.current);\n\t\tsetSecondsUntilRetry(nextInterval / 1000);\n\t\tsetTimeout(() => setIsRetrying(false), 500);\n\t}, [onRetry]);\n\n\tconst handleManualRetry = useCallback(() => {\n\t\tsetIsRetrying(true);\n\t\tonRetry();\n\t\tretryAttemptRef.current = 0;\n\t\tsetSecondsUntilRetry(getRetryInterval(0) / 1000);\n\t\tsetTimeout(() => setIsRetrying(false), 500);\n\t}, [onRetry]);\n\n\tuseEffect(() => {\n\t\tconst interval = setInterval(() => {\n\t\t\tsetSecondsUntilRetry((prev) => {\n\t\t\t\tif (prev <= 1) {\n\t\t\t\t\thandleAutoRetry();\n\t\t\t\t\treturn prev;\n\t\t\t\t}\n\t\t\t\treturn prev - 1;\n\t\t\t});\n\t\t}, 1000);\n\n\t\treturn () => clearInterval(interval);\n\t}, [handleAutoRetry]);\n\n\treturn (\n\t\t<Card className=\"mx-auto max-w-md\">\n\t\t\t<CardContent className=\"flex flex-col items-center gap-4 pt-6 text-center\">\n\t\t\t\t<div className=\"rounded-full bg-destructive/10 p-3\">\n\t\t\t\t\t<AlertCircle className=\"size-8 text-destructive\" />\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t<h2 className=\"text-lg font-semibold\">{error.message}</h2>\n\t\t\t\t\t{error.details && (\n\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">{error.details}</p>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex flex-col items-center gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={handleManualRetry}\n\t\t\t\t\t\tdisabled={isRetrying}\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tclassName=\"gap-2\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<RefreshCw className={cn(\"size-4\", isRetrying && \"animate-spin\")} />\n\t\t\t\t\t\t{isRetrying ? \"Retrying...\" : \"Retry\"}\n\t\t\t\t\t</Button>\n\n\t\t\t\t\t<p className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\tRetrying in {secondsUntilRetry}s\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n}\n"],"names":["BASE_RETRY_INTERVAL_MS","MAX_RETRY_INTERVAL_MS","getRetryInterval","attempt","interval","RouteErrorState","error","onRetry","retryAttemptRef","useRef","secondsUntilRetry","setSecondsUntilRetry","useState","isRetrying","setIsRetrying","handleAutoRetry","useCallback","nextInterval","handleManualRetry","useEffect","prev","Card","jsxs","CardContent","jsx","AlertCircle","Button","RefreshCw","cn"],"mappings":"uIAOA,MAAMA,EAAyB,IACzBC,EAAwB,IAE9B,SAASC,EAAiBC,EAAyB,CAClD,MAAMC,EAAWJ,EAAyB,GAAKG,EAC/C,OAAO,KAAK,IAAIC,EAAUH,CAAqB,CAChD,CAOO,SAASI,EAAgB,CAAE,MAAAC,EAAO,QAAAC,GAAiC,CACzE,MAAMC,EAAkBC,EAAAA,OAAO,CAAC,EAC1B,CAACC,EAAmBC,CAAoB,EAAIC,EAAAA,SACjDV,EAAiB,CAAC,EAAI,GAAA,EAEjB,CAACW,EAAYC,CAAa,EAAIF,EAAAA,SAAS,EAAK,EAE5CG,EAAkBC,EAAAA,YAAY,IAAM,CACzCF,EAAc,EAAI,EAClBP,EAAA,EACAC,EAAgB,SAAW,EAC3B,MAAMS,EAAef,EAAiBM,EAAgB,OAAO,EAC7DG,EAAqBM,EAAe,GAAI,EACxC,WAAW,IAAMH,EAAc,EAAK,EAAG,GAAG,CAC3C,EAAG,CAACP,CAAO,CAAC,EAENW,EAAoBF,EAAAA,YAAY,IAAM,CAC3CF,EAAc,EAAI,EAClBP,EAAA,EACAC,EAAgB,QAAU,EAC1BG,EAAqBT,EAAiB,CAAC,EAAI,GAAI,EAC/C,WAAW,IAAMY,EAAc,EAAK,EAAG,GAAG,CAC3C,EAAG,CAACP,CAAO,CAAC,EAEZY,OAAAA,EAAAA,UAAU,IAAM,CACf,MAAMf,EAAW,YAAY,IAAM,CAClCO,EAAsBS,GACjBA,GAAQ,GACXL,EAAA,EACOK,GAEDA,EAAO,CACd,CACF,EAAG,GAAI,EAEP,MAAO,IAAM,cAAchB,CAAQ,CACpC,EAAG,CAACW,CAAe,CAAC,QAGlBM,EAAA,CAAK,UAAU,mBACf,SAAAC,EAAAA,KAACC,EAAA,CAAY,UAAU,oDACtB,SAAA,CAAAC,EAAAA,IAAC,OAAI,UAAU,qCACd,eAACC,EAAA,CAAY,UAAU,0BAA0B,CAAA,CAClD,EAEAH,EAAAA,KAAC,MAAA,CAAI,UAAU,YACd,SAAA,CAAAE,EAAAA,IAAC,KAAA,CAAG,UAAU,wBAAyB,SAAAlB,EAAM,QAAQ,EACpDA,EAAM,SACNkB,EAAAA,IAAC,KAAE,UAAU,gCAAiC,WAAM,OAAA,CAAQ,CAAA,EAE9D,EAEAF,EAAAA,KAAC,MAAA,CAAI,UAAU,mCACd,SAAA,CAAAA,EAAAA,KAACI,EAAA,CACA,QAASR,EACT,SAAUL,EACV,QAAQ,UACR,UAAU,QAEV,SAAA,CAAAW,MAACG,GAAU,UAAWC,EAAG,SAAUf,GAAc,cAAc,EAAG,EACjEA,EAAa,cAAgB,OAAA,CAAA,CAAA,EAG/BS,EAAAA,KAAC,IAAA,CAAE,UAAU,gCAAgC,SAAA,CAAA,eAC/BZ,EAAkB,GAAA,CAAA,CAChC,CAAA,CAAA,CACD,CAAA,CAAA,CACD,CAAA,CACD,CAEF"}
@@ -1,2 +1,2 @@
1
- import{r as f,j as r,s as J}from"./vendor-tanstack-BdLtprmr.js";import{u as Pe}from"./use-debounce-callback-Dk7Ebi48.js";import{bL as Z,C as ee,q as L,I as ne,ag as te,ah as re,ai as se,aj as oe,al as ie,ak as ae,an as z,bt as De,am as X,di as Fe,dm as Ee,b9 as Q,G as Ve,p as W,L as ce,aa as Ae,cU as Me,cV as Te,a_ as $e,ax as Be,cW as Ke,cX as Le,i as Ue}from"./index-V_xTKaEb.js";import{D as Je,a as ze,b as Re,d as C,e as We}from"./dropdown-menu-B9LKPlz7.js";import{m as U,c as D,i as fe,p as Ge,g as qe,d as Qe,C as Ye,e as He,f as me,D as Xe,h as Ze,S as en,v as nn,s as tn,K as rn,P as sn,j as on,B as an,k as cn,l as ln}from"./schema-form-input-string-format-datetime-Cb4sTJle.js";import{H as un,a4 as dn,e as fn,f as he}from"./vendor-date-Cl1Jav-N.js";import{T as mn,a as hn}from"./toggle-group-CBJphTE6.js";import{B as xn}from"./block-type-logo-DuvU7goV.js";import{T as jn}from"./textarea-9v5uTuxg.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./zod-B1GLD-Zc.js";import"./timezone-select-DPtR_b06.js";import"./form-DOdmIC3A.js";const pn=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],bn=Z("eye-off",pn);const gn=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],yn=Z("eye",gn);const Sn=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],_n=Z("grip-vertical",Sn);function k(e){return e!==void 0}function N(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&!un(e)}function O(e){return Array.isArray(e)}function vn(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null&&Object.keys(e).length===0}function A(e){return"$ref"in e}function ge(e){return"anyOf"in e&&k(e.anyOf)}function wn(e){return"oneOf"in e&&k(e.oneOf)}function kn(e){return"allOf"in e&&k(e.allOf)}function In(e){return"items"in e&&k(e.items)}function Nn(e){return"definitions"in e&&N(e.definitions)}function M(e,n){if(Nn(e)){const t=n.replace("#/definitions/",""),s=e.definitions?.[t];if(!s)throw new Error(`Definition not found for ${n}`);return s}if("$defs"in e&&N(e.$defs)){const t=n.replace("#/$defs/",""),s=e.$defs?.[t];if(!s)throw new Error(`Definition not found for ${n}`);return s}throw new Error("Schema does not contain definitions")}function ye(e,n){if(A(e)&&typeof e.$ref=="string"){const{$ref:t,...s}=e;return U({},M(n,t),s)}return e}function Cn({property:e,value:n,onValueChange:t,errors:s,id:o}){const{schema:i}=D(),c=f.useMemo(()=>{const{allOf:a,...d}=e,u=a.reduce((h,p)=>{if(A(p)){const l=M(i,p.$ref);return U({},h,l)}return U({},h,p)},{});return U({},u,d)},[e,i]);return r.jsx(ue,{value:n,onValueChange:t,errors:s,property:c,id:o})}function On({value:e,property:n,schema:t}){const s=k(e)?e:n.default;if(!k(s))return 0;const o=Pn(n,t);switch(typeof s){case"string":return o.findIndex(i=>i.type==="string");case"number":return o.findIndex(i=>i.type==="number"||i.type==="integer");case"boolean":return o.findIndex(i=>i.type==="boolean");case"object":return Dn(s,o);default:return-1}}function Pn(e,n){return e.anyOf?e.anyOf.map(t=>A(t)?M(n,t.$ref):t):[]}function Dn(e,n){return N(e)?Fn(e,n):O(e)?n.findIndex(t=>t.type==="array"):e===null?n.findIndex(t=>t.type==="null"):-1}function Fn(e,n){if(vn(e))return n.findIndex(i=>i.type==="object");const t=Object.keys(e),[s,o]=n.reduce(([i,c],a,d)=>{if(!("properties"in a)||!a.properties)return[i,c];const u=Object.keys(a.properties),h=t.filter(p=>u.includes(p)).length;return h>c?[d,h]:[i,c]},[0,0]);return o===0?-1:s}const En={null:"None",string:"str",boolean:"bool",integer:"int",number:"float",array:"list",object:"dict"};function Vn(e){if(e.type&&typeof e.type=="string")return En[e.type]}function le(e,n){if(A(e)){const s=M(n,e.$ref);return le(s,n)}const t=Vn(e)??"Field";return e.title??e.format??t}function Y({value:e,property:n,onValueChange:t,errors:s}){const{schema:o}=D(),[i,c]=f.useState(On({value:e,property:n,schema:o})),a=f.useRef(new Map);function d(u){const h=Number.parseInt(u,10);if(Number.isNaN(h))throw new Error(`Invalid index: ${u}`);a.current.set(i,e),c(h),t(a.current.get(h))}return r.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[r.jsx(mn,{size:"sm",variant:"outline",type:"single",value:i.toString(),onValueChange:d,className:"justify-start",children:n.anyOf.map((u,h)=>{const p=le(u,o);return r.jsx(hn,{value:h.toString(),children:p},p)})}),r.jsx(ee,{className:"p-2",children:r.jsx(Ce,{value:e,property:n.anyOf[i],onValueChange:t,errors:s,showLabel:!1,nested:!1,required:!1})})]})}const g=[];for(let e=0;e<256;++e)g.push((e+256).toString(16).slice(1));function An(e,n=0){return(g[e[n+0]]+g[e[n+1]]+g[e[n+2]]+g[e[n+3]]+"-"+g[e[n+4]]+g[e[n+5]]+"-"+g[e[n+6]]+g[e[n+7]]+"-"+g[e[n+8]]+g[e[n+9]]+"-"+g[e[n+10]]+g[e[n+11]]+g[e[n+12]]+g[e[n+13]]+g[e[n+14]]+g[e[n+15]]).toLowerCase()}let H;const Mn=new Uint8Array(16);function Tn(){if(!H){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");H=crypto.getRandomValues.bind(crypto)}return H(Mn)}const $n=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xe={randomUUID:$n};function Bn(e,n,t){e=e||{};const s=e.random??e.rng?.()??Tn();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,An(s)}function je(e,n,t){return xe.randomUUID&&!e?xe.randomUUID():Bn(e)}function Kn(e){return typeof e=="string"}function Se(e){return N(e)&&"property"in e}function _e(e){return N(e)&&"index"in e}function ve({errors:e}){const n=f.useMemo(()=>e.filter(t=>Kn(t)),[e]);return n.length===0?null:n.length===1?r.jsx("p",{className:"text-red-500 text-sm",children:n[0]}):r.jsx("ul",{className:"list-disc text-red-500 text-sm pl-4",children:n.map(t=>r.jsx("li",{children:t},t))})}function we(e){return K(e)?e.__prefect_kind:null}function K(e,n){return N(e)&&fe(e.__prefect_kind)?fe(n)?e.__prefect_kind===n:!0:!1}function Ln({value:e,property:n,schema:t,to:s}){const o=we(e);try{switch(o){case"json":return Un({json:e,property:n,schema:t,to:s});case"jinja":return Jn({jinja:e,property:n,schema:t,to:s});case"workspace_variable":return zn({workspaceVariable:e,to:s});case null:return Rn({value:e,property:n,schema:t,to:s});default:throw new Error(`Unknown prefect kind value: ${o}`)}}catch(i){console.error(i);return}}function Un({json:e,property:n,schema:t,to:s}){switch(s){case"jinja":return{__prefect_kind:"jinja",template:e.value};case"json":return e;case"workspace_variable":return{__prefect_kind:"workspace_variable",variable_name:void 0};case null:if(e.value===void 0)return;try{const o=JSON.parse(e.value);return G({value:o,property:n,schema:t})}catch{throw new ke("json",null)}default:throw new Error(`mapSchemaValueJson missing case for kind: ${s}`)}}function Jn({jinja:e,property:n,schema:t,to:s}){switch(s){case"jinja":return e;case"json":return{__prefect_kind:"json",value:e.template};case"workspace_variable":return{__prefect_kind:"workspace_variable",variable_name:void 0};case null:if(e.template===void 0)return;try{const o=JSON.parse(e.template);return G({value:o,property:n,schema:t})}catch{throw new ke("jinja",null)}default:throw new Error(`mapSchemaValueJson missing case for kind: ${s}`)}}function zn({workspaceVariable:e,to:n}){switch(n){case"workspace_variable":return e;case"jinja":return{__prefect_kind:"jinja",template:void 0};case"json":return{__prefect_kind:"json",value:void 0};case null:return;default:throw new Error(`mapSchemaValueWorkspaceVariable missing case for kind: ${n}`)}}function Rn({value:e,property:n,schema:t,to:s}){switch(s){case"jinja":return{__prefect_kind:"jinja",template:e===void 0?void 0:JSON.stringify(e,null,2)};case"json":return{__prefect_kind:"json",value:e===void 0?void 0:JSON.stringify(e,null,2)};case"workspace_variable":return{__prefect_kind:"workspace_variable",variable_name:void 0};case null:return G({value:e,property:n,schema:t});default:throw new Error(`mapSchemaValueNull missing case for kind: ${s}`)}}function G({value:e,property:n,schema:t}){return O(n)?n.map(o=>R({value:e,property:o,schema:t})).find(o=>o!==void 0):R({value:e,property:n,schema:t})}function R({value:e,property:n,schema:t}){const s=ye(n,t);if(ge(s))return G({value:e,property:s.anyOf,schema:t});switch(s.type){case"null":return null;case"string":return typeof e=="string"?e:void 0;case"boolean":return typeof e=="boolean"?e:void 0;case"number":return typeof e=="number"?e:void 0;case"integer":return typeof e=="number"?Math.round(e):void 0;case"array":return Wn({value:e,property:s,schema:t});case"object":return Gn({value:e,property:s,schema:t});default:if(O(s.type)){console.error(new Error("Array types are not supported for schema coercing values to schema properties"));return}throw new Error(`Unsupported property type: ${s.type}`)}}function Wn({value:e,property:n,schema:t}){return O(e)?[...e].map(o=>R({value:o,property:n,schema:t})):void 0}function Gn({value:e,property:n,schema:t}){if(!N(e))return;if(n.properties===void 0)return e;const s={...e};for(const[o,i]of Object.entries(n.properties))R({value:e[o],property:i,schema:t})===void 0&&delete s[o];return s}class ke extends Error{constructor(n,t){super(`Unable to convert prefect kind value from "${n}" to "${t??"null"}"`)}}const Ie=({value:e,onValueChange:n,property:t,children:s,disableKinds:o,defaultValue:i,hasDefaultValue:c})=>{const{schema:a,kinds:d}=D(),[u,h]=f.useState(!1),p=!c||JSON.stringify(e)===JSON.stringify(i);function l(){c&&n(i)}function x(v){const S=Ln({value:e,property:t,schema:a,to:v});n(S)}const y=f.useMemo(()=>{const v=we(e);return Ge.filter(S=>S!==v&&(d.includes(S)||S===null)&&!o)},[e,d,o]);return r.jsxs(Je,{open:u,onOpenChange:h,children:[r.jsx(ze,{asChild:!0,children:r.jsxs(L,{variant:"ghost","data-open":u,className:"h-8 w-8 p-0",children:[r.jsx("span",{className:"sr-only",children:"Open menu"}),r.jsx(ne,{id:"MoreVertical",className:"size-4"})]})}),r.jsxs(Re,{align:"end",children:[y.map(v=>r.jsx(C,{onClick:()=>x(v),children:qe(v)},v)),c&&r.jsx(C,{onClick:l,disabled:p,children:"Use default value"}),r.jsx(We,{}),s]})]})};function qn({itemKey:e,items:n,value:t,onValueChange:s,errors:o,onDelete:i,first:c,last:a,canMove:d,moveUp:u,moveDown:h,moveToTop:p,moveToBottom:l}){const{schema:x}=D(),y=f.useId(),{attributes:v,listeners:S,setNodeRef:I,transform:F,transition:E,isDragging:$}=Qe({id:e,disabled:!d}),B={transform:Ye.Transform.toString(F),transition:E,opacity:$?.5:1},w=f.useMemo(()=>O(n)?{anyOf:n}:A(n)?M(x,n.$ref):n,[n,x]);return r.jsxs("div",{ref:I,style:B,className:"grid grid-cols-[auto_1fr_auto] gap-2",children:[d?r.jsx("button",{type:"button",className:"flex items-center justify-center cursor-grab text-muted-foreground hover:text-foreground focus:outline-none","aria-label":"Drag to reorder",...v,...S,children:r.jsx(_n,{className:"h-5 w-5"})}):r.jsx("div",{className:"w-5"}),r.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[r.jsx(ue,{value:t,onValueChange:s,property:w,errors:o,id:y}),r.jsx(ve,{errors:o})]}),r.jsxs(Ie,{value:t,onValueChange:s,property:n,children:[r.jsx(C,{onClick:i,children:"Delete"}),d&&!c&&r.jsxs(r.Fragment,{children:[r.jsx(C,{onClick:p,children:"Move to top"}),r.jsx(C,{onClick:u,children:"Move up"})]}),d&&!a&&r.jsxs(r.Fragment,{children:[r.jsx(C,{onClick:h,children:"Move down"}),r.jsx(C,{onClick:l,children:"Move to bottom"})]})]})]})}function Qn({property:e,values:n,onValuesChange:t,errors:s}){const o=n===void 0||n.length===0,i=e.maxItems===void 0||(n?.length??0)<(e.maxItems??Number.POSITIVE_INFINITY),c=O(e.prefixItems)?e.prefixItems.length:0,a=He(me(sn),me(rn,{coordinateGetter:tn})),[d,u]=f.useState(n?.map(m=>({key:je(),value:m}))??[]);function h(m){return O(e.prefixItems)&&m<e.prefixItems.length?e.prefixItems[m]:e.items??{type:"string"}}function p(m){return s.filter(b=>_e(b)&&b.index===m).flatMap(b=>b.errors)}function l(m){return m===0}function x(m){return m===(n?.length??0)-1}function y(m){return!(O(e.prefixItems)&&m<e.prefixItems.length)}function v(m,b){u(d.map(j=>j.key===m?{...j,value:b}:j))}function S(){const m=[...d,{key:je(),value:void 0}];u(m),t(m.map(({value:b})=>b))}function I(m,b){const j=[...d];j.splice(b,0,j.splice(m,1)[0]),u(j),t(j.map(({value:V})=>V))}function F(m){I(m,0)}function E(m){I(m,d.length-1)}function $(m){const b=d.filter(j=>j.key!==m);u(b),t(b.map(({value:j})=>j))}function B(m){const{active:b,over:j}=m;if(j&&b.id!==j.id){const V=d.findIndex(q=>q.key===b.id),de=d.findIndex(q=>q.key===j.id);V!==-1&&de!==-1&&I(V,de)}}const w=d.slice(c).map(m=>m.key);return r.jsxs(ee,{className:"flex flex-col gap-2 p-2",children:[o&&r.jsx("p",{className:"text-sm text-subdued italic",children:"No items in this list"}),r.jsx(Xe,{sensors:a,collisionDetection:Ze,onDragEnd:B,children:r.jsx(en,{items:w,strategy:nn,children:d?.map(({key:m,value:b},j)=>r.jsx(qn,{itemKey:m,items:h(j),value:b,onValueChange:V=>v(m,V),errors:p(j),onDelete:()=>$(m),first:l(j),last:x(j),canMove:y(j),moveUp:()=>I(j,j-1),moveDown:()=>I(j,j+1),moveToTop:()=>F(j),moveToBottom:()=>E(j)},m))})}),i&&r.jsx("div",{className:"flex justify-end",children:r.jsx(L,{size:"sm",variant:"outline",onClick:S,children:"Add item"})}),!i&&r.jsx("p",{className:"text-sm text-subdued text-right",children:"You can't add more items"})]})}function T({property:e,id:n,...t}){const[s,o]=f.useState(""),i=f.useMemo(()=>Object.fromEntries(Object.entries(e.enum).filter(([,l])=>String(l).toLowerCase().includes(s.toLowerCase()))),[e.enum,s]),c=!!(t.multiple?t.values?.length:t.value),a=t.multiple?t.values?.join(", "):String(t.value);function d(l){const x=i[l];return t.multiple?t.values?.includes(x):t.value===x}function u(l){o("");const x=i[l];return t.multiple?p(x):h(x)}function h(l){if(t.multiple)throw new Error("onSingleSelect called on multiple value input");t.onValueChange(l)}function p(l){if(!t.multiple)throw new Error("onMultipleSelect called on single value input");if(!t.values){t.onValuesChange([l]);return}if(t.values?.includes(l)){t.onValuesChange(t.values.filter(x=>x!==l));return}t.onValuesChange([...t.values,l])}return r.jsxs(te,{children:[r.jsx(re,{selected:c,"aria-label":`Select ${e.title}`,id:n,children:c?a:"Select"}),r.jsxs(se,{children:[r.jsx(oe,{value:s,onValueChange:o,placeholder:"Search..."}),r.jsx(ie,{children:"No values found"}),r.jsx(ae,{children:Object.entries(i).map(([l,x])=>r.jsx(z,{value:l,onSelect:u,selected:d(l),closeOnSelect:!t.multiple,children:String(x)},l))})]})]})}function P(e){return"enum"in e&&Array.isArray(e.enum)&&e.enum.every(n=>on(typeof n))}function _(e,n){if(typeof e==typeof n())return e}function Yn(e){if(N(e))return e}function Hn(e){return _(e,String)??_(e,Number)??_(e,Boolean)}function Ne(e,n){if(n===void 0&&Array.isArray(e))return e;if(Array.isArray(e))switch(n){case String:return e.map(t=>_(t,String)).filter(t=>t!==void 0);case Number:return e.map(t=>_(t,Number)).filter(t=>t!==void 0);case Boolean:return e.map(t=>_(t,Boolean)).filter(t=>t!==void 0);case"primitive":return e.map(t=>_(t,String)??_(t,Number)??_(t,Boolean)).filter(t=>t!==void 0);default:throw new Error(`Invalid array type: ${n}`)}}function Xn({values:e,property:n,onValuesChange:t,errors:s,id:o}){const{schema:i}=D();function c(a){if(a===void 0||a.length===0){t(void 0);return}t(a)}if(In(n)&&N(n.items)){let a=n.items;if(A(a)&&(a=M(i,a.$ref)),P(a)){const d={...n,...a};return r.jsx(T,{multiple:!0,values:Ne(e,"primitive"),property:d,onValuesChange:c,id:o})}}return r.jsx(Qn,{property:n,values:e,onValuesChange:c,errors:s})}const Zn=({blockTypeSlug:e,selectedBlockDocumentId:n,onSelect:t,onCreateNew:s})=>r.jsx(f.Suspense,{children:r.jsx(et,{blockTypeSlug:e,selectedBlockDocumentId:n,onSelect:t,onCreateNew:s})}),et=({blockTypeSlug:e,selectedBlockDocumentId:n,onSelect:t,onCreateNew:s})=>{const[o,i]=f.useState(""),c=f.useDeferredValue(o),{data:a}=J(De({offset:0,sort:"BLOCK_TYPE_AND_NAME_ASC",include_secrets:!1,block_types:{slug:{any_:[e]}},block_documents:{operator:"and_",is_anonymous:{eq_:!1},...c?{name:{like_:c}}:{}},limit:50})),d=f.useMemo(()=>a.filter(h=>h.name?.toLowerCase().includes(c.toLowerCase())),[a,c]),u=f.useMemo(()=>a.find(h=>h.id===n),[a,n]);return r.jsxs(te,{children:[r.jsx(re,{selected:!!n,"aria-label":"Select a block",children:u?.name??"Select a block..."}),r.jsxs(se,{children:[r.jsx(oe,{value:o,onValueChange:i,placeholder:"Search for a block..."}),r.jsx(ie,{children:"No block found"}),r.jsxs(ae,{children:[r.jsx(X,{children:d.map(h=>r.jsx(z,{selected:n===h.id,onSelect:p=>{t(p),i("")},value:h.id,children:h.name},h.id))}),s&&r.jsx(X,{children:r.jsxs(z,{onSelect:()=>{s(),i("")},value:"__create_new__",closeOnSelect:!0,children:[r.jsx(ne,{id:"Plus",className:"mr-2 size-4"}),"Create new block"]})})]})]})]})};function nt({value:e,onValueChange:n,blockTypeSlug:t,id:s}){return r.jsx(f.Suspense,{fallback:r.jsx(tt,{}),children:r.jsx(rt,{value:e,onValueChange:n,blockTypeSlug:t,id:s})})}function tt(){return r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Q,{className:"size-8 rounded"}),r.jsx(Q,{className:"h-9 flex-1"}),r.jsx(Q,{className:"h-9 w-20"})]})}function rt({value:e,onValueChange:n,blockTypeSlug:t,id:s}){const[o,i]=f.useState(!1),{data:c}=J(Fe(t)),{data:a}=J(Ee({block_types:{slug:{any_:[t]}},block_documents:{operator:"and_",is_anonymous:{eq_:!1}},include_secrets:!1,sort:"BLOCK_TYPE_AND_NAME_ASC",offset:0})),d=a>0,u=e?.$ref,h=l=>{n(l?{$ref:l}:void 0)},p=l=>{n({$ref:l})};return r.jsxs("div",{id:s,className:"flex items-center gap-2",children:[r.jsx(xn,{logoUrl:c.logo_url,alt:c.name}),d&&r.jsx("div",{className:"flex-1",children:r.jsx(Zn,{blockTypeSlug:t,selectedBlockDocumentId:u,onSelect:h,onCreateNew:()=>i(!0)})}),r.jsxs(L,{type:"button",variant:"outline",onClick:()=>i(!0),children:["Add",r.jsx(ne,{id:"Plus",className:"ml-2 size-4"})]}),r.jsx(an,{open:o,onOpenChange:i,blockTypeSlug:t,onCreated:p})]})}function st({value:e,onValueChange:n,property:t,id:s}){function o(i){n(_(i,Boolean))}return P(t)?r.jsx(T,{multiple:!1,value:e,property:t,onValueChange:n,id:s}):r.jsx(Ve,{checked:e,onCheckedChange:o,id:s})}function ot({value:e,onValueChange:n,property:t,id:s}){if(P(t))return r.jsx(T,{multiple:!1,value:e,property:t,onValueChange:n,id:s});function o(i){n(i===""?void 0:Number(i))}return r.jsx(W,{type:"number",min:t.minimum,max:t.maximum,value:e??"",step:"1",onChange:i=>o(i.target.value),id:s})}function it(){return r.jsx("p",{className:"text-subdued text-sm",children:'Property is type "None"'})}function at({value:e,onValueChange:n,property:t,id:s}){if(P(t))return r.jsx(T,{multiple:!1,value:e,property:t,onValueChange:n,id:s});function o(i){n(i===""?void 0:Number(i))}return r.jsx(W,{type:"number",min:t.minimum,max:t.maximum,value:e??"",onChange:i=>o(i.target.value),id:s})}function ct({value:e,onValueChange:n,id:t}){const s=o=>{(typeof o=="string"||o===void 0)&&n({__prefect_kind:"jinja",template:o||void 0})};return r.jsx(ce,{value:e.template,onChange:s,id:t})}function lt({value:e,onValueChange:n,id:t}){const s=o=>{(typeof o=="string"||o===void 0)&&n({__prefect_kind:"json",value:o||void 0})};return r.jsx(ce,{value:e.value,onChange:s,id:t})}const ut=({selectedVariableName:e,onSelect:n})=>r.jsx(f.Suspense,{children:r.jsx(dt,{selectedVariableName:e,onSelect:n})}),dt=({selectedVariableName:e,onSelect:n})=>{const[t,s]=f.useState(""),o=f.useDeferredValue(t),{data:i}=J(Ae({offset:0,sort:"NAME_ASC",variables:o?{operator:"and_",name:{like_:o}}:void 0,limit:50})),c=f.useMemo(()=>i.filter(a=>a.name.toLowerCase().includes(o.toLowerCase())),[i,o]);return r.jsxs(te,{children:[r.jsx(re,{selected:!!e,"aria-label":"Select a variable",children:e??"Select a variable..."}),r.jsxs(se,{children:[r.jsx(oe,{value:t,onValueChange:s,placeholder:"Search for a variable..."}),r.jsx(ie,{children:"No variable found"}),r.jsx(ae,{children:r.jsx(X,{children:c.map(a=>r.jsx(z,{selected:e===a.name,onSelect:d=>{n(d),s("")},value:a.name,children:a.name},a.id))})})]})]})};function ft({value:e,onValueChange:n,id:t}){const s=o=>{n({__prefect_kind:"workspace_variable",variable_name:o})};return r.jsx("div",{id:t,children:r.jsx(ut,{selectedVariableName:e.variable_name,onSelect:s})})}const pe="yyyy-MM-dd";function mt({value:e,onValueChange:n,id:t}){const s=e?dn(e,pe,fn()):void 0,[o,i]=f.useState(s);function c(a){i(a),n(a?he(a,pe):void 0)}return r.jsxs(Me,{children:[r.jsx(Te,{asChild:!0,children:r.jsxs(L,{variant:"outline",className:$e("justify-start text-left font-normal w-full",!o&&"text-muted-foreground"),id:t,children:[r.jsx(Be,{className:"mr-2 h-4 w-4"}),o?he(o,"PPP"):r.jsx("span",{children:"Pick a date"})]})}),r.jsx(Ke,{className:"w-auto p-0",children:r.jsx(Le,{mode:"single",selected:o,onSelect:c,required:!0,autoFocus:!0})})]})}function ht({value:e,onValueChange:n,id:t}){const s=o=>{(typeof o=="string"||o===void 0)&&n(o||void 0)};return r.jsx(ce,{value:e,onChange:s,id:t})}function xt({value:e,onValueChange:n,id:t}){const[s,o]=f.useState(!1),i=c=>{n(c.target.value||void 0)};return r.jsxs("div",{className:"relative",children:[r.jsx(W,{id:t,type:s?"text":"password",value:e??"",onChange:i,autoComplete:"off",className:"pr-10"}),r.jsx(L,{type:"button",variant:"ghost",size:"icon",className:"absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7",onClick:()=>o(!s),"aria-label":s?"Hide password":"Show password",children:s?r.jsx(bn,{className:"h-4 w-4"}):r.jsx(yn,{className:"h-4 w-4"})})]})}function jt({value:e,onValueChange:n,id:t}){function s(o){const i=o.target.value;if(i===""){n(void 0);return}const c=Number(i);Number.isNaN(c)||n(String(c))}return r.jsx(W,{type:"number",value:e??"",onChange:s,id:t,placeholder:"Duration in seconds",min:0})}function pt({value:e,onValueChange:n,property:t,id:s}){function o(i){n(i||void 0)}return P(t)?r.jsx(T,{multiple:!1,value:e,property:t,onValueChange:o,id:s}):t.format==="date"?r.jsx(mt,{value:e,onValueChange:o,id:s}):t.format==="date-time"?r.jsx(cn,{value:e,onValueChange:o,id:s}):t.format==="json-string"?r.jsx(ht,{value:e,onValueChange:o,id:s}):t.format==="time-delta"?r.jsx(jt,{value:e,onValueChange:o,id:s}):t.format==="password"?r.jsx(xt,{value:e,onValueChange:o,id:s}):r.jsx(jn,{value:e??"",rows:1,className:"min-h-min",onChange:i=>o(i.target.value),id:s})}function bt({value:e,onValueChange:n,property:t,id:s}){return f.useEffect(()=>{P(t)||n({__prefect_kind:"json"})},[t,n]),P(t)?r.jsx(T,{multiple:!1,value:Hn(e),property:t,onValueChange:n,id:s}):null}function ue({value:e,onValueChange:n,errors:t,property:s,id:o,nested:i=!0}){if(K(e)){if(K(e,"json"))return r.jsx(lt,{value:e,onValueChange:n,id:o});if(K(e,"jinja"))return r.jsx(ct,{value:e,onValueChange:n,id:o});if(K(e,"workspace_variable"))return r.jsx(ft,{value:e,onValueChange:n,id:o});throw new Error(`Prefect kind not implemented: ${e.__prefect_kind}`)}if("block_type_slug"in s){const c=s.block_type_slug;if(typeof c=="string")return r.jsx(nt,{value:e,onValueChange:n,blockTypeSlug:c,id:o})}if(ge(s))return r.jsx(Y,{value:e,property:s,onValueChange:n,errors:t});if(wn(s)){const c={...s,anyOf:s.oneOf};return r.jsx(Y,{value:e,property:c,onValueChange:n,errors:t})}if(Array.isArray(s.type)){const c={...s,anyOf:Object.values(s.type).map(a=>({type:a}))};return r.jsx(Y,{value:e,property:c,onValueChange:n,errors:t})}if(kn(s))return r.jsx(Cn,{value:e,onValueChange:n,errors:t,property:s,id:o});if(s.type==="string")return r.jsx(pt,{value:_(e,String),onValueChange:n,property:s,id:o});if(s.type==="integer")return r.jsx(ot,{value:_(e,Number),onValueChange:n,property:s,id:o});if(s.type==="number")return r.jsx(at,{value:_(e,Number),onValueChange:n,property:s,id:o});if(s.type==="boolean")return r.jsx(st,{value:_(e,Boolean),onValueChange:n,property:s,id:o});if(s.type==="object")return r.jsx(Oe,{values:Yn(e),property:s,onValuesChange:n,errors:t,nested:i});if(s.type==="array")return r.jsx(Xn,{values:Ne(e),property:s,onValuesChange:n,errors:t,id:o});if(s.type==="null")return r.jsx(it,{});if(s.type===void 0)return r.jsx(bt,{value:e,onValueChange:n,property:s,id:o});throw new Error(`Schema type not implemented: ${String(s.type)}`)}function be({property:e}){const n=f.useMemo(()=>e.description?.replace(/\n(?!\n)/g," "),[e.description]);return n&&r.jsx("p",{className:"text-sm text-gray-500",children:n})}function gt({property:e,required:n,id:t}){const{schema:s}=D(),o=f.useMemo(()=>{const i=le(e,s);return n?i:`${i} (Optional)`},[e,n,s]);return r.jsx(Ue,{htmlFor:t,children:o})}function Ce({property:e,value:n,onValueChange:t,required:s,errors:o,showLabel:i=!0,nested:c=!0}){const{schema:a,skipDefaultValueInitialization:d}=D(),u=f.useMemo(()=>ye(e,a),[e,a]),h=f.useMemo(()=>!k(u.type),[u.type]),p=f.useMemo(()=>o.filter(w=>Se(w)||_e(w)),[o]),[l,x]=f.useState(!1),[y,v]=f.useState(B),[S,I]=f.useState(!1),F=f.useId(),E=f.useCallback(w=>{v(w),t(w)},[t]),$=f.useCallback(()=>{const w=!S;I(w),t(w?void 0:y)},[S,t,y]);f.useEffect(()=>{l||d||(k(u.default)&&!k(n)&&t(u.default),x(!0))},[l,d,t,u.default,n]);function B(){if(k(n))return n;if(k(u.default)&&!d)return u.default}return r.jsxs("div",{className:"flex flex-col gap-2 group",children:[i&&r.jsxs("div",{className:"grid grid-cols-[1fr_auto] items-center gap-2",children:[r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx(gt,{property:u,required:s,id:F}),r.jsx(be,{property:u})]}),r.jsx("div",{className:"ml-auto",children:r.jsx(Ie,{value:n,onValueChange:E,property:u,disableKinds:h,defaultValue:u.default,hasDefaultValue:k(u.default),children:r.jsx(C,{onClick:$,children:S?"Include value":"Omit value"})})})]}),!i&&r.jsx(be,{property:u}),r.jsx("fieldset",{disabled:S,children:r.jsx(ue,{property:u,value:y,onValueChange:E,errors:p,id:F,nested:c})}),r.jsx(ve,{errors:o})]})}function yt(e,n){return(e.position??0)-(n.position??0)}function Oe({values:e,onValuesChange:n,property:t,errors:s,nested:o}){const i=f.useRef([]),c=Pe(f.useCallback(()=>{const l={...e};for(const{key:x,value:y}of i.current)l[x]=y,y===void 0&&delete l[x];if(i.current=[],Object.keys(l).length===0){n(void 0);return}n(l)},[e,n]),10);function a(l,x){i.current.push({key:l,value:x}),c()}function d(l){return e?.[l]}function u(l){return s.filter(Se).filter(x=>x.property===l).flatMap(x=>x.errors)}const h=f.useMemo(()=>Object.entries(t.properties??{}).sort(([,l],[,x])=>yt(l,x)),[t.properties]),p=r.jsx("div",{className:"flex flex-col gap-4",children:h.map(([l,x])=>r.jsx(Ce,{value:d(l),onValueChange:y=>a(l,y),property:x,errors:u(l),required:!!t.required?.includes(l)},l))});return o?r.jsx(ee,{className:"p-2",children:p}):p}const St=({children:e,...n})=>r.jsx(ln.Provider,{value:n,children:e}),$t=({schema:e,kinds:n,skipDefaultValueInitialization:t,values:s,onValuesChange:o,errors:i})=>{const c={schema:e,kinds:n,skipDefaultValueInitialization:t},a=f.useCallback(u=>{if(u===void 0){o({});return}o(u)},[o]),d={values:s,property:e,onValuesChange:a,errors:i};return r.jsx("div",{className:"flex flex-col gap-4",children:r.jsx(St,{...c,children:r.jsx(Oe,{...d,nested:!1})})})};export{$t as SchemaForm};
2
- //# sourceMappingURL=schema-form-BQAcWW5k.js.map
1
+ import{r as f,j as r,s as J}from"./vendor-tanstack-BdLtprmr.js";import{u as Pe}from"./use-debounce-callback-Dk7Ebi48.js";import{bK as X,C as ee,q as L,I as ne,ag as te,ah as re,ai as se,aj as oe,al as ie,ak as ae,an as z,bs as De,am as Z,dh as Fe,dl as Ee,b8 as Q,G as Ve,p as W,L as ce,aa as Ae,cT as Me,cU as Te,aZ as $e,aw as Ke,cV as Be,cW as Le,i as Ue}from"./index-CPpeVt8m.js";import{D as Je,a as ze,b as Re,d as C,e as We}from"./dropdown-menu-fRiq5bS-.js";import{m as U,c as D,i as fe,p as Ge,g as qe,d as Qe,C as Ye,e as He,f as me,D as Ze,h as Xe,S as en,v as nn,s as tn,K as rn,P as sn,j as on,B as an,k as cn,l as ln}from"./schema-form-input-string-format-datetime-Dg3zVAp5.js";import{H as un,a4 as dn,e as fn,f as he}from"./vendor-date-Cl1Jav-N.js";import{T as mn,a as hn}from"./toggle-group-EMgSOoYH.js";import{B as xn}from"./block-type-logo-scnMsyY5.js";import{T as jn}from"./textarea-DFEOJJdc.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./zod-B1GLD-Zc.js";import"./timezone-select-NViFNNLz.js";import"./form-Cl5Hk9bq.js";const pn=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],bn=X("eye-off",pn);const gn=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],yn=X("eye",gn);const Sn=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],_n=X("grip-vertical",Sn);function k(e){return e!==void 0}function N(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&!un(e)}function O(e){return Array.isArray(e)}function vn(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null&&Object.keys(e).length===0}function A(e){return"$ref"in e}function ge(e){return"anyOf"in e&&k(e.anyOf)}function wn(e){return"oneOf"in e&&k(e.oneOf)}function kn(e){return"allOf"in e&&k(e.allOf)}function In(e){return"items"in e&&k(e.items)}function Nn(e){return"definitions"in e&&N(e.definitions)}function M(e,n){if(Nn(e)){const t=n.replace("#/definitions/",""),s=e.definitions?.[t];if(!s)throw new Error(`Definition not found for ${n}`);return s}if("$defs"in e&&N(e.$defs)){const t=n.replace("#/$defs/",""),s=e.$defs?.[t];if(!s)throw new Error(`Definition not found for ${n}`);return s}throw new Error("Schema does not contain definitions")}function ye(e,n){if(A(e)&&typeof e.$ref=="string"){const{$ref:t,...s}=e;return U({},M(n,t),s)}return e}function Cn({property:e,value:n,onValueChange:t,errors:s,id:o}){const{schema:i}=D(),c=f.useMemo(()=>{const{allOf:a,...d}=e,u=a.reduce((h,p)=>{if(A(p)){const l=M(i,p.$ref);return U({},h,l)}return U({},h,p)},{});return U({},u,d)},[e,i]);return r.jsx(ue,{value:n,onValueChange:t,errors:s,property:c,id:o})}function On({value:e,property:n,schema:t}){const s=k(e)?e:n.default;if(!k(s))return 0;const o=Pn(n,t);switch(typeof s){case"string":return o.findIndex(i=>i.type==="string");case"number":return o.findIndex(i=>i.type==="number"||i.type==="integer");case"boolean":return o.findIndex(i=>i.type==="boolean");case"object":return Dn(s,o);default:return-1}}function Pn(e,n){return e.anyOf?e.anyOf.map(t=>A(t)?M(n,t.$ref):t):[]}function Dn(e,n){return N(e)?Fn(e,n):O(e)?n.findIndex(t=>t.type==="array"):e===null?n.findIndex(t=>t.type==="null"):-1}function Fn(e,n){if(vn(e))return n.findIndex(i=>i.type==="object");const t=Object.keys(e),[s,o]=n.reduce(([i,c],a,d)=>{if(!("properties"in a)||!a.properties)return[i,c];const u=Object.keys(a.properties),h=t.filter(p=>u.includes(p)).length;return h>c?[d,h]:[i,c]},[0,0]);return o===0?-1:s}const En={null:"None",string:"str",boolean:"bool",integer:"int",number:"float",array:"list",object:"dict"};function Vn(e){if(e.type&&typeof e.type=="string")return En[e.type]}function le(e,n){if(A(e)){const s=M(n,e.$ref);return le(s,n)}const t=Vn(e)??"Field";return e.title??e.format??t}function Y({value:e,property:n,onValueChange:t,errors:s}){const{schema:o}=D(),[i,c]=f.useState(On({value:e,property:n,schema:o})),a=f.useRef(new Map);function d(u){const h=Number.parseInt(u,10);if(Number.isNaN(h))throw new Error(`Invalid index: ${u}`);a.current.set(i,e),c(h),t(a.current.get(h))}return r.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[r.jsx(mn,{size:"sm",variant:"outline",type:"single",value:i.toString(),onValueChange:d,className:"justify-start",children:n.anyOf.map((u,h)=>{const p=le(u,o);return r.jsx(hn,{value:h.toString(),children:p},p)})}),r.jsx(ee,{className:"p-2",children:r.jsx(Ce,{value:e,property:n.anyOf[i],onValueChange:t,errors:s,showLabel:!1,nested:!1,required:!1})})]})}const g=[];for(let e=0;e<256;++e)g.push((e+256).toString(16).slice(1));function An(e,n=0){return(g[e[n+0]]+g[e[n+1]]+g[e[n+2]]+g[e[n+3]]+"-"+g[e[n+4]]+g[e[n+5]]+"-"+g[e[n+6]]+g[e[n+7]]+"-"+g[e[n+8]]+g[e[n+9]]+"-"+g[e[n+10]]+g[e[n+11]]+g[e[n+12]]+g[e[n+13]]+g[e[n+14]]+g[e[n+15]]).toLowerCase()}let H;const Mn=new Uint8Array(16);function Tn(){if(!H){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");H=crypto.getRandomValues.bind(crypto)}return H(Mn)}const $n=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xe={randomUUID:$n};function Kn(e,n,t){e=e||{};const s=e.random??e.rng?.()??Tn();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,An(s)}function je(e,n,t){return xe.randomUUID&&!e?xe.randomUUID():Kn(e)}function Bn(e){return typeof e=="string"}function Se(e){return N(e)&&"property"in e}function _e(e){return N(e)&&"index"in e}function ve({errors:e}){const n=f.useMemo(()=>e.filter(t=>Bn(t)),[e]);return n.length===0?null:n.length===1?r.jsx("p",{className:"text-red-500 text-sm",children:n[0]}):r.jsx("ul",{className:"list-disc text-red-500 text-sm pl-4",children:n.map(t=>r.jsx("li",{children:t},t))})}function we(e){return B(e)?e.__prefect_kind:null}function B(e,n){return N(e)&&fe(e.__prefect_kind)?fe(n)?e.__prefect_kind===n:!0:!1}function Ln({value:e,property:n,schema:t,to:s}){const o=we(e);try{switch(o){case"json":return Un({json:e,property:n,schema:t,to:s});case"jinja":return Jn({jinja:e,property:n,schema:t,to:s});case"workspace_variable":return zn({workspaceVariable:e,to:s});case null:return Rn({value:e,property:n,schema:t,to:s});default:throw new Error(`Unknown prefect kind value: ${o}`)}}catch(i){console.error(i);return}}function Un({json:e,property:n,schema:t,to:s}){switch(s){case"jinja":return{__prefect_kind:"jinja",template:e.value};case"json":return e;case"workspace_variable":return{__prefect_kind:"workspace_variable",variable_name:void 0};case null:if(e.value===void 0)return;try{const o=JSON.parse(e.value);return G({value:o,property:n,schema:t})}catch{throw new ke("json",null)}default:throw new Error(`mapSchemaValueJson missing case for kind: ${s}`)}}function Jn({jinja:e,property:n,schema:t,to:s}){switch(s){case"jinja":return e;case"json":return{__prefect_kind:"json",value:e.template};case"workspace_variable":return{__prefect_kind:"workspace_variable",variable_name:void 0};case null:if(e.template===void 0)return;try{const o=JSON.parse(e.template);return G({value:o,property:n,schema:t})}catch{throw new ke("jinja",null)}default:throw new Error(`mapSchemaValueJson missing case for kind: ${s}`)}}function zn({workspaceVariable:e,to:n}){switch(n){case"workspace_variable":return e;case"jinja":return{__prefect_kind:"jinja",template:void 0};case"json":return{__prefect_kind:"json",value:void 0};case null:return;default:throw new Error(`mapSchemaValueWorkspaceVariable missing case for kind: ${n}`)}}function Rn({value:e,property:n,schema:t,to:s}){switch(s){case"jinja":return{__prefect_kind:"jinja",template:e===void 0?void 0:JSON.stringify(e,null,2)};case"json":return{__prefect_kind:"json",value:e===void 0?void 0:JSON.stringify(e,null,2)};case"workspace_variable":return{__prefect_kind:"workspace_variable",variable_name:void 0};case null:return G({value:e,property:n,schema:t});default:throw new Error(`mapSchemaValueNull missing case for kind: ${s}`)}}function G({value:e,property:n,schema:t}){return O(n)?n.map(o=>R({value:e,property:o,schema:t})).find(o=>o!==void 0):R({value:e,property:n,schema:t})}function R({value:e,property:n,schema:t}){const s=ye(n,t);if(ge(s))return G({value:e,property:s.anyOf,schema:t});switch(s.type){case"null":return null;case"string":return typeof e=="string"?e:void 0;case"boolean":return typeof e=="boolean"?e:void 0;case"number":return typeof e=="number"?e:void 0;case"integer":return typeof e=="number"?Math.round(e):void 0;case"array":return Wn({value:e,property:s,schema:t});case"object":return Gn({value:e,property:s,schema:t});default:if(O(s.type)){console.error(new Error("Array types are not supported for schema coercing values to schema properties"));return}throw new Error(`Unsupported property type: ${s.type}`)}}function Wn({value:e,property:n,schema:t}){return O(e)?[...e].map(o=>R({value:o,property:n,schema:t})):void 0}function Gn({value:e,property:n,schema:t}){if(!N(e))return;if(n.properties===void 0)return e;const s={...e};for(const[o,i]of Object.entries(n.properties))R({value:e[o],property:i,schema:t})===void 0&&delete s[o];return s}class ke extends Error{constructor(n,t){super(`Unable to convert prefect kind value from "${n}" to "${t??"null"}"`)}}const Ie=({value:e,onValueChange:n,property:t,children:s,disableKinds:o,defaultValue:i,hasDefaultValue:c})=>{const{schema:a,kinds:d}=D(),[u,h]=f.useState(!1),p=!c||JSON.stringify(e)===JSON.stringify(i);function l(){c&&n(i)}function x(v){const S=Ln({value:e,property:t,schema:a,to:v});n(S)}const y=f.useMemo(()=>{const v=we(e);return Ge.filter(S=>S!==v&&(d.includes(S)||S===null)&&!o)},[e,d,o]);return r.jsxs(Je,{open:u,onOpenChange:h,children:[r.jsx(ze,{asChild:!0,children:r.jsxs(L,{variant:"ghost","data-open":u,className:"h-8 w-8 p-0",children:[r.jsx("span",{className:"sr-only",children:"Open menu"}),r.jsx(ne,{id:"MoreVertical",className:"size-4"})]})}),r.jsxs(Re,{align:"end",children:[y.map(v=>r.jsx(C,{onClick:()=>x(v),children:qe(v)},v)),c&&r.jsx(C,{onClick:l,disabled:p,children:"Use default value"}),r.jsx(We,{}),s]})]})};function qn({itemKey:e,items:n,value:t,onValueChange:s,errors:o,onDelete:i,first:c,last:a,canMove:d,moveUp:u,moveDown:h,moveToTop:p,moveToBottom:l}){const{schema:x}=D(),y=f.useId(),{attributes:v,listeners:S,setNodeRef:I,transform:F,transition:E,isDragging:$}=Qe({id:e,disabled:!d}),K={transform:Ye.Transform.toString(F),transition:E,opacity:$?.5:1},w=f.useMemo(()=>O(n)?{anyOf:n}:A(n)?M(x,n.$ref):n,[n,x]);return r.jsxs("div",{ref:I,style:K,className:"grid grid-cols-[auto_1fr_auto] gap-2",children:[d?r.jsx("button",{type:"button",className:"flex items-center justify-center cursor-grab text-muted-foreground hover:text-foreground focus:outline-none","aria-label":"Drag to reorder",...v,...S,children:r.jsx(_n,{className:"h-5 w-5"})}):r.jsx("div",{className:"w-5"}),r.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[r.jsx(ue,{value:t,onValueChange:s,property:w,errors:o,id:y}),r.jsx(ve,{errors:o})]}),r.jsxs(Ie,{value:t,onValueChange:s,property:n,children:[r.jsx(C,{onClick:i,children:"Delete"}),d&&!c&&r.jsxs(r.Fragment,{children:[r.jsx(C,{onClick:p,children:"Move to top"}),r.jsx(C,{onClick:u,children:"Move up"})]}),d&&!a&&r.jsxs(r.Fragment,{children:[r.jsx(C,{onClick:h,children:"Move down"}),r.jsx(C,{onClick:l,children:"Move to bottom"})]})]})]})}function Qn({property:e,values:n,onValuesChange:t,errors:s}){const o=n===void 0||n.length===0,i=e.maxItems===void 0||(n?.length??0)<(e.maxItems??Number.POSITIVE_INFINITY),c=O(e.prefixItems)?e.prefixItems.length:0,a=He(me(sn),me(rn,{coordinateGetter:tn})),[d,u]=f.useState(n?.map(m=>({key:je(),value:m}))??[]);function h(m){return O(e.prefixItems)&&m<e.prefixItems.length?e.prefixItems[m]:e.items??{type:"string"}}function p(m){return s.filter(b=>_e(b)&&b.index===m).flatMap(b=>b.errors)}function l(m){return m===0}function x(m){return m===(n?.length??0)-1}function y(m){return!(O(e.prefixItems)&&m<e.prefixItems.length)}function v(m,b){u(d.map(j=>j.key===m?{...j,value:b}:j))}function S(){const m=[...d,{key:je(),value:void 0}];u(m),t(m.map(({value:b})=>b))}function I(m,b){const j=[...d];j.splice(b,0,j.splice(m,1)[0]),u(j),t(j.map(({value:V})=>V))}function F(m){I(m,0)}function E(m){I(m,d.length-1)}function $(m){const b=d.filter(j=>j.key!==m);u(b),t(b.map(({value:j})=>j))}function K(m){const{active:b,over:j}=m;if(j&&b.id!==j.id){const V=d.findIndex(q=>q.key===b.id),de=d.findIndex(q=>q.key===j.id);V!==-1&&de!==-1&&I(V,de)}}const w=d.slice(c).map(m=>m.key);return r.jsxs(ee,{className:"flex flex-col gap-2 p-2",children:[o&&r.jsx("p",{className:"text-sm text-subdued italic",children:"No items in this list"}),r.jsx(Ze,{sensors:a,collisionDetection:Xe,onDragEnd:K,children:r.jsx(en,{items:w,strategy:nn,children:d?.map(({key:m,value:b},j)=>r.jsx(qn,{itemKey:m,items:h(j),value:b,onValueChange:V=>v(m,V),errors:p(j),onDelete:()=>$(m),first:l(j),last:x(j),canMove:y(j),moveUp:()=>I(j,j-1),moveDown:()=>I(j,j+1),moveToTop:()=>F(j),moveToBottom:()=>E(j)},m))})}),i&&r.jsx("div",{className:"flex justify-end",children:r.jsx(L,{size:"sm",variant:"outline",onClick:S,children:"Add item"})}),!i&&r.jsx("p",{className:"text-sm text-subdued text-right",children:"You can't add more items"})]})}function T({property:e,id:n,...t}){const[s,o]=f.useState(""),i=f.useMemo(()=>Object.fromEntries(Object.entries(e.enum).filter(([,l])=>String(l).toLowerCase().includes(s.toLowerCase()))),[e.enum,s]),c=!!(t.multiple?t.values?.length:t.value),a=t.multiple?t.values?.join(", "):String(t.value);function d(l){const x=i[l];return t.multiple?t.values?.includes(x):t.value===x}function u(l){o("");const x=i[l];return t.multiple?p(x):h(x)}function h(l){if(t.multiple)throw new Error("onSingleSelect called on multiple value input");t.onValueChange(l)}function p(l){if(!t.multiple)throw new Error("onMultipleSelect called on single value input");if(!t.values){t.onValuesChange([l]);return}if(t.values?.includes(l)){t.onValuesChange(t.values.filter(x=>x!==l));return}t.onValuesChange([...t.values,l])}return r.jsxs(te,{children:[r.jsx(re,{selected:c,"aria-label":`Select ${e.title}`,id:n,children:c?a:"Select"}),r.jsxs(se,{children:[r.jsx(oe,{value:s,onValueChange:o,placeholder:"Search..."}),r.jsx(ie,{children:"No values found"}),r.jsx(ae,{children:Object.entries(i).map(([l,x])=>r.jsx(z,{value:l,onSelect:u,selected:d(l),closeOnSelect:!t.multiple,children:String(x)},l))})]})]})}function P(e){return"enum"in e&&Array.isArray(e.enum)&&e.enum.every(n=>on(typeof n))}function _(e,n){if(typeof e==typeof n())return e}function Yn(e){if(N(e))return e}function Hn(e){return _(e,String)??_(e,Number)??_(e,Boolean)}function Ne(e,n){if(n===void 0&&Array.isArray(e))return e;if(Array.isArray(e))switch(n){case String:return e.map(t=>_(t,String)).filter(t=>t!==void 0);case Number:return e.map(t=>_(t,Number)).filter(t=>t!==void 0);case Boolean:return e.map(t=>_(t,Boolean)).filter(t=>t!==void 0);case"primitive":return e.map(t=>_(t,String)??_(t,Number)??_(t,Boolean)).filter(t=>t!==void 0);default:throw new Error(`Invalid array type: ${n}`)}}function Zn({values:e,property:n,onValuesChange:t,errors:s,id:o}){const{schema:i}=D();function c(a){if(a===void 0||a.length===0){t(void 0);return}t(a)}if(In(n)&&N(n.items)){let a=n.items;if(A(a)&&(a=M(i,a.$ref)),P(a)){const d={...n,...a};return r.jsx(T,{multiple:!0,values:Ne(e,"primitive"),property:d,onValuesChange:c,id:o})}}return r.jsx(Qn,{property:n,values:e,onValuesChange:c,errors:s})}const Xn=({blockTypeSlug:e,selectedBlockDocumentId:n,onSelect:t,onCreateNew:s})=>r.jsx(f.Suspense,{children:r.jsx(et,{blockTypeSlug:e,selectedBlockDocumentId:n,onSelect:t,onCreateNew:s})}),et=({blockTypeSlug:e,selectedBlockDocumentId:n,onSelect:t,onCreateNew:s})=>{const[o,i]=f.useState(""),c=f.useDeferredValue(o),{data:a}=J(De({offset:0,sort:"BLOCK_TYPE_AND_NAME_ASC",include_secrets:!1,block_types:{slug:{any_:[e]}},block_documents:{operator:"and_",is_anonymous:{eq_:!1},...c?{name:{like_:c}}:{}},limit:50})),d=f.useMemo(()=>a.filter(h=>h.name?.toLowerCase().includes(c.toLowerCase())),[a,c]),u=f.useMemo(()=>a.find(h=>h.id===n),[a,n]);return r.jsxs(te,{children:[r.jsx(re,{selected:!!n,"aria-label":"Select a block",children:u?.name??"Select a block..."}),r.jsxs(se,{children:[r.jsx(oe,{value:o,onValueChange:i,placeholder:"Search for a block..."}),r.jsx(ie,{children:"No block found"}),r.jsxs(ae,{children:[r.jsx(Z,{children:d.map(h=>r.jsx(z,{selected:n===h.id,onSelect:p=>{t(p),i("")},value:h.id,children:h.name},h.id))}),s&&r.jsx(Z,{children:r.jsxs(z,{onSelect:()=>{s(),i("")},value:"__create_new__",closeOnSelect:!0,children:[r.jsx(ne,{id:"Plus",className:"mr-2 size-4"}),"Create new block"]})})]})]})]})};function nt({value:e,onValueChange:n,blockTypeSlug:t,id:s}){return r.jsx(f.Suspense,{fallback:r.jsx(tt,{}),children:r.jsx(rt,{value:e,onValueChange:n,blockTypeSlug:t,id:s})})}function tt(){return r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Q,{className:"size-8 rounded"}),r.jsx(Q,{className:"h-9 flex-1"}),r.jsx(Q,{className:"h-9 w-20"})]})}function rt({value:e,onValueChange:n,blockTypeSlug:t,id:s}){const[o,i]=f.useState(!1),{data:c}=J(Fe(t)),{data:a}=J(Ee({block_types:{slug:{any_:[t]}},block_documents:{operator:"and_",is_anonymous:{eq_:!1}},include_secrets:!1,sort:"BLOCK_TYPE_AND_NAME_ASC",offset:0})),d=a>0,u=e?.$ref,h=l=>{n(l?{$ref:l}:void 0)},p=l=>{n({$ref:l})};return r.jsxs("div",{id:s,className:"flex items-center gap-2",children:[r.jsx(xn,{logoUrl:c.logo_url,alt:c.name}),d&&r.jsx("div",{className:"flex-1",children:r.jsx(Xn,{blockTypeSlug:t,selectedBlockDocumentId:u,onSelect:h,onCreateNew:()=>i(!0)})}),r.jsxs(L,{type:"button",variant:"outline",onClick:()=>i(!0),children:["Add",r.jsx(ne,{id:"Plus",className:"ml-2 size-4"})]}),r.jsx(an,{open:o,onOpenChange:i,blockTypeSlug:t,onCreated:p})]})}function st({value:e,onValueChange:n,property:t,id:s}){function o(i){n(_(i,Boolean))}return P(t)?r.jsx(T,{multiple:!1,value:e,property:t,onValueChange:n,id:s}):r.jsx(Ve,{checked:e,onCheckedChange:o,id:s})}function ot({value:e,onValueChange:n,property:t,id:s}){if(P(t))return r.jsx(T,{multiple:!1,value:e,property:t,onValueChange:n,id:s});function o(i){n(i===""?void 0:Number(i))}return r.jsx(W,{type:"number",min:t.minimum,max:t.maximum,value:e??"",step:"1",onChange:i=>o(i.target.value),id:s})}function it(){return r.jsx("p",{className:"text-subdued text-sm",children:'Property is type "None"'})}function at({value:e,onValueChange:n,property:t,id:s}){if(P(t))return r.jsx(T,{multiple:!1,value:e,property:t,onValueChange:n,id:s});function o(i){n(i===""?void 0:Number(i))}return r.jsx(W,{type:"number",min:t.minimum,max:t.maximum,value:e??"",onChange:i=>o(i.target.value),id:s})}function ct({value:e,onValueChange:n,id:t}){const s=o=>{(typeof o=="string"||o===void 0)&&n({__prefect_kind:"jinja",template:o||void 0})};return r.jsx(ce,{value:e.template,onChange:s,id:t})}function lt({value:e,onValueChange:n,id:t}){const s=o=>{(typeof o=="string"||o===void 0)&&n({__prefect_kind:"json",value:o||void 0})};return r.jsx(ce,{value:e.value,onChange:s,id:t})}const ut=({selectedVariableName:e,onSelect:n})=>r.jsx(f.Suspense,{children:r.jsx(dt,{selectedVariableName:e,onSelect:n})}),dt=({selectedVariableName:e,onSelect:n})=>{const[t,s]=f.useState(""),o=f.useDeferredValue(t),{data:i}=J(Ae({offset:0,sort:"NAME_ASC",variables:o?{operator:"and_",name:{like_:o}}:void 0,limit:50})),c=f.useMemo(()=>i.filter(a=>a.name.toLowerCase().includes(o.toLowerCase())),[i,o]);return r.jsxs(te,{children:[r.jsx(re,{selected:!!e,"aria-label":"Select a variable",children:e??"Select a variable..."}),r.jsxs(se,{children:[r.jsx(oe,{value:t,onValueChange:s,placeholder:"Search for a variable..."}),r.jsx(ie,{children:"No variable found"}),r.jsx(ae,{children:r.jsx(Z,{children:c.map(a=>r.jsx(z,{selected:e===a.name,onSelect:d=>{n(d),s("")},value:a.name,children:a.name},a.id))})})]})]})};function ft({value:e,onValueChange:n,id:t}){const s=o=>{n({__prefect_kind:"workspace_variable",variable_name:o})};return r.jsx("div",{id:t,children:r.jsx(ut,{selectedVariableName:e.variable_name,onSelect:s})})}const pe="yyyy-MM-dd";function mt({value:e,onValueChange:n,id:t}){const s=e?dn(e,pe,fn()):void 0,[o,i]=f.useState(s);function c(a){i(a),n(a?he(a,pe):void 0)}return r.jsxs(Me,{children:[r.jsx(Te,{asChild:!0,children:r.jsxs(L,{variant:"outline",className:$e("justify-start text-left font-normal w-full",!o&&"text-muted-foreground"),id:t,children:[r.jsx(Ke,{className:"mr-2 h-4 w-4"}),o?he(o,"PPP"):r.jsx("span",{children:"Pick a date"})]})}),r.jsx(Be,{className:"w-auto p-0",children:r.jsx(Le,{mode:"single",selected:o,onSelect:c,required:!0,autoFocus:!0})})]})}function ht({value:e,onValueChange:n,id:t}){const s=o=>{(typeof o=="string"||o===void 0)&&n(o||void 0)};return r.jsx(ce,{value:e,onChange:s,id:t})}function xt({value:e,onValueChange:n,id:t}){const[s,o]=f.useState(!1),i=c=>{n(c.target.value||void 0)};return r.jsxs("div",{className:"relative",children:[r.jsx(W,{id:t,type:s?"text":"password",value:e??"",onChange:i,autoComplete:"off",className:"pr-10"}),r.jsx(L,{type:"button",variant:"ghost",size:"icon",className:"absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7",onClick:()=>o(!s),"aria-label":s?"Hide password":"Show password",children:s?r.jsx(bn,{className:"h-4 w-4"}):r.jsx(yn,{className:"h-4 w-4"})})]})}function jt({value:e,onValueChange:n,id:t}){function s(o){const i=o.target.value;if(i===""){n(void 0);return}const c=Number(i);Number.isNaN(c)||n(String(c))}return r.jsx(W,{type:"number",value:e??"",onChange:s,id:t,placeholder:"Duration in seconds",min:0})}function pt({value:e,onValueChange:n,property:t,id:s}){function o(i){n(i||void 0)}return P(t)?r.jsx(T,{multiple:!1,value:e,property:t,onValueChange:o,id:s}):t.format==="date"?r.jsx(mt,{value:e,onValueChange:o,id:s}):t.format==="date-time"?r.jsx(cn,{value:e,onValueChange:o,id:s}):t.format==="json-string"?r.jsx(ht,{value:e,onValueChange:o,id:s}):t.format==="time-delta"?r.jsx(jt,{value:e,onValueChange:o,id:s}):t.format==="password"?r.jsx(xt,{value:e,onValueChange:o,id:s}):r.jsx(jn,{value:e??"",rows:1,className:"min-h-min",onChange:i=>o(i.target.value),id:s})}function bt({value:e,onValueChange:n,property:t,id:s}){return f.useEffect(()=>{P(t)||n({__prefect_kind:"json"})},[t,n]),P(t)?r.jsx(T,{multiple:!1,value:Hn(e),property:t,onValueChange:n,id:s}):null}function ue({value:e,onValueChange:n,errors:t,property:s,id:o,nested:i=!0}){if(B(e)){if(B(e,"json"))return r.jsx(lt,{value:e,onValueChange:n,id:o});if(B(e,"jinja"))return r.jsx(ct,{value:e,onValueChange:n,id:o});if(B(e,"workspace_variable"))return r.jsx(ft,{value:e,onValueChange:n,id:o});throw new Error(`Prefect kind not implemented: ${e.__prefect_kind}`)}if("block_type_slug"in s){const c=s.block_type_slug;if(typeof c=="string")return r.jsx(nt,{value:e,onValueChange:n,blockTypeSlug:c,id:o})}if(ge(s))return r.jsx(Y,{value:e,property:s,onValueChange:n,errors:t});if(wn(s)){const c={...s,anyOf:s.oneOf};return r.jsx(Y,{value:e,property:c,onValueChange:n,errors:t})}if(Array.isArray(s.type)){const c={...s,anyOf:Object.values(s.type).map(a=>({type:a}))};return r.jsx(Y,{value:e,property:c,onValueChange:n,errors:t})}if(kn(s))return r.jsx(Cn,{value:e,onValueChange:n,errors:t,property:s,id:o});if(s.type==="string")return r.jsx(pt,{value:_(e,String),onValueChange:n,property:s,id:o});if(s.type==="integer")return r.jsx(ot,{value:_(e,Number),onValueChange:n,property:s,id:o});if(s.type==="number")return r.jsx(at,{value:_(e,Number),onValueChange:n,property:s,id:o});if(s.type==="boolean")return r.jsx(st,{value:_(e,Boolean),onValueChange:n,property:s,id:o});if(s.type==="object")return r.jsx(Oe,{values:Yn(e),property:s,onValuesChange:n,errors:t,nested:i});if(s.type==="array")return r.jsx(Zn,{values:Ne(e),property:s,onValuesChange:n,errors:t,id:o});if(s.type==="null")return r.jsx(it,{});if(s.type===void 0)return r.jsx(bt,{value:e,onValueChange:n,property:s,id:o});throw new Error(`Schema type not implemented: ${String(s.type)}`)}function be({property:e}){const n=f.useMemo(()=>e.description?.replace(/\n(?!\n)/g," "),[e.description]);return n&&r.jsx("p",{className:"text-sm text-gray-500",children:n})}function gt({property:e,required:n,id:t}){const{schema:s}=D(),o=f.useMemo(()=>{const i=le(e,s);return n?i:`${i} (Optional)`},[e,n,s]);return r.jsx(Ue,{htmlFor:t,children:o})}function Ce({property:e,value:n,onValueChange:t,required:s,errors:o,showLabel:i=!0,nested:c=!0}){const{schema:a,skipDefaultValueInitialization:d}=D(),u=f.useMemo(()=>ye(e,a),[e,a]),h=f.useMemo(()=>!k(u.type),[u.type]),p=f.useMemo(()=>o.filter(w=>Se(w)||_e(w)),[o]),[l,x]=f.useState(!1),[y,v]=f.useState(K),[S,I]=f.useState(!1),F=f.useId(),E=f.useCallback(w=>{v(w),t(w)},[t]),$=f.useCallback(()=>{const w=!S;I(w),t(w?void 0:y)},[S,t,y]);f.useEffect(()=>{l||d||(k(u.default)&&!k(n)&&t(u.default),x(!0))},[l,d,t,u.default,n]);function K(){if(k(n))return n;if(k(u.default)&&!d)return u.default}return r.jsxs("div",{className:"flex flex-col gap-2 group",children:[i&&r.jsxs("div",{className:"grid grid-cols-[1fr_auto] items-center gap-2",children:[r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx(gt,{property:u,required:s,id:F}),r.jsx(be,{property:u})]}),r.jsx("div",{className:"ml-auto",children:r.jsx(Ie,{value:n,onValueChange:E,property:u,disableKinds:h,defaultValue:u.default,hasDefaultValue:k(u.default),children:r.jsx(C,{onClick:$,children:S?"Include value":"Omit value"})})})]}),!i&&r.jsx(be,{property:u}),r.jsx("fieldset",{disabled:S,children:r.jsx(ue,{property:u,value:y,onValueChange:E,errors:p,id:F,nested:c})}),r.jsx(ve,{errors:o})]})}function yt(e,n){return(e.position??0)-(n.position??0)}function Oe({values:e,onValuesChange:n,property:t,errors:s,nested:o}){const i=f.useRef([]),c=Pe(f.useCallback(()=>{const l={...e};for(const{key:x,value:y}of i.current)l[x]=y,y===void 0&&delete l[x];if(i.current=[],Object.keys(l).length===0){n(void 0);return}n(l)},[e,n]),10);function a(l,x){i.current.push({key:l,value:x}),c()}function d(l){return e?.[l]}function u(l){return s.filter(Se).filter(x=>x.property===l).flatMap(x=>x.errors)}const h=f.useMemo(()=>Object.entries(t.properties??{}).sort(([,l],[,x])=>yt(l,x)),[t.properties]),p=r.jsx("div",{className:"flex flex-col gap-4",children:h.map(([l,x])=>r.jsx(Ce,{value:d(l),onValueChange:y=>a(l,y),property:x,errors:u(l),required:!!t.required?.includes(l)},l))});return o?r.jsx(ee,{className:"p-2",children:p}):p}const St=({children:e,...n})=>r.jsx(ln.Provider,{value:n,children:e}),$t=({schema:e,kinds:n,skipDefaultValueInitialization:t,values:s,onValuesChange:o,errors:i})=>{const c={schema:e,kinds:n,skipDefaultValueInitialization:t},a=f.useCallback(u=>{if(u===void 0){o({});return}o(u)},[o]),d={values:s,property:e,onValuesChange:a,errors:i};return r.jsx("div",{className:"flex flex-col gap-4",children:r.jsx(St,{...c,children:r.jsx(Oe,{...d,nested:!1})})})};export{$t as SchemaForm};
2
+ //# sourceMappingURL=schema-form-BD-WM4S0.js.map