mage-ai 0.9.74__py3-none-any.whl → 0.9.75__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.

Potentially problematic release.


This version of mage-ai might be problematic. Click here for more details.

Files changed (329) hide show
  1. mage_ai/ai/llm_pipeline_wizard.py +6 -4
  2. mage_ai/ai/openai_client.py +7 -5
  3. mage_ai/data_integrations/destinations/constants.py +1 -0
  4. mage_ai/data_preparation/models/block/__init__.py +4 -4
  5. mage_ai/data_preparation/models/constants.py +1 -1
  6. mage_ai/data_preparation/models/pipeline.py +5 -0
  7. mage_ai/data_preparation/templates/data_exporters/streaming/elasticsearch.yaml +3 -0
  8. mage_ai/data_preparation/templates/data_loaders/streaming/nats.yaml +6 -3
  9. mage_ai/io/base.py +29 -1
  10. mage_ai/io/oracledb.py +2 -4
  11. mage_ai/io/postgres.py +38 -19
  12. mage_ai/io/utils.py +18 -0
  13. mage_ai/orchestration/db/__init__.py +3 -3
  14. mage_ai/server/constants.py +1 -1
  15. mage_ai/server/frontend_dist/404.html +3 -3
  16. mage_ai/server/frontend_dist/_next/static/38-PtskJFUTYUpRhT1qF_/_buildManifest.js +1 -0
  17. mage_ai/server/frontend_dist/_next/static/chunks/{1187-839336d276186105.js → 1187-4560c3895e1d7099.js} +1 -1
  18. mage_ai/server/frontend_dist/_next/static/chunks/{1598-0adca9dce3ba4c60.js → 1598-cbf3f5a6078fc3f5.js} +1 -1
  19. mage_ai/server/frontend_dist/_next/static/chunks/2717-638a944d24d5abde.js +1 -0
  20. mage_ai/server/frontend_dist/_next/static/chunks/3548-36f746b1824004f2.js +1 -0
  21. mage_ai/server/frontend_dist/_next/static/chunks/{3763-39a5174f6a3924db.js → 3763-aabe2703076636b0.js} +1 -1
  22. mage_ai/server/frontend_dist/_next/static/chunks/3782-3e2acb5ed45b582b.js +1 -0
  23. mage_ai/server/frontend_dist/_next/static/chunks/449-f689774546860ca4.js +1 -0
  24. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/5627-d5e559859dd0e1e0.js → frontend_dist/_next/static/chunks/5627-10e76bafa5a26f5f.js} +1 -1
  25. mage_ai/server/frontend_dist/_next/static/chunks/{5699-e49718dfc9eb2854.js → 5699-e99379e332bd0b41.js} +1 -1
  26. mage_ai/server/frontend_dist/_next/static/chunks/{7966-163da2621b8c987c.js → 7966-a5a7db345ce81263.js} +1 -1
  27. mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-5bdff745074fb350.js → _app-13bf3b7dcef50c29.js} +2 -2
  28. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/compute-ed67fa8e81662e8b.js → frontend_dist/_next/static/chunks/pages/compute-9e2dea78024e3bb4.js} +1 -1
  29. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/files-e0ecd7ced09a63b2.js → frontend_dist/_next/static/chunks/pages/files-e08c7fe76f968f9c.js} +1 -1
  30. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-c7a729477ecda50e.js → [...slug]-30c3807057a4e65b.js} +1 -1
  31. mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-fd6ae6a358a60a0c.js → global-data-products-8dcb3b31af9e0e39.js} +1 -1
  32. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-8e50243797a7fe59.js → frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-85a64b64d27214b6.js} +1 -1
  33. mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-hooks-d0c003446332dc0d.js → global-hooks-4ff959d51b8a9502.js} +1 -1
  34. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{files-a69ed8e9f814490c.js → files-d08a460641d0efaa.js} +1 -1
  35. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{overview-1aad7093c6d39257.js → overview-aae747f487e08d51.js} +1 -1
  36. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{pipeline-runs-528d30e0d13b0cc7.js → pipeline-runs-09a842d64a6ada62.js} +1 -1
  37. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{settings-fb9201d9cf63031d.js → settings-2e98e57d9376a458.js} +1 -1
  38. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/{[user]-000f5a980a07da39.js → [user]-7be6e41ad66089bb.js} +1 -1
  39. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-e4e613f6e817a733.js → frontend_dist/_next/static/chunks/pages/manage/users/new-4c088833063bfa07.js} +1 -1
  40. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{users-a5e9d77ed5b50205.js → users-b99379d0aa6a8c25.js} +1 -1
  41. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage-34d718b8a4066c23.js → frontend_dist/_next/static/chunks/pages/manage-868fcd8cbeb265f0.js} +1 -1
  42. mage_ai/server/frontend_dist/_next/static/chunks/pages/{oauth-3bfd1b8d7f036726.js → oauth-6ceceb62191dfe8a.js} +1 -1
  43. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-e51cd04bd4d1fffe.js +1 -0
  44. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-5f8c100e648efa8a.js → pipeline-runs-2d0136b51b57de93.js} +1 -1
  45. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-688c652f3296bb9c.js → [...slug]-1ad5238742e25b4c.js} +1 -1
  46. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-bd11e87d026bfbf9.js +1 -0
  47. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-1236e36d39b1637d.js → dashboard-0f4f47f721b0723f.js} +1 -1
  48. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-432da20df91511fb.js +1 -0
  49. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-fe91dfb0091f6bc6.js +1 -0
  50. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-0d68d4bf6290fefb.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-cf794b2d22a80f31.js} +1 -1
  51. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-9254358d58f07714.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-a964caef91bed9e1.js} +1 -1
  52. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-821001e690caebe2.js → monitors-80bebb4401eefe25.js} +1 -1
  53. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-2eae7cb017027682.js +1 -0
  54. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d4b2a0800a66b33.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-e3d7fdfeb7f806f7.js} +1 -1
  55. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{settings-cd49372ae1702963.js → settings-0abf8a1b7243f93b.js} +1 -1
  56. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-707ed8ca942ca802.js +1 -0
  57. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-259143ed3cf59e31.js → [...slug]-8429f17d4146e1ec.js} +1 -1
  58. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-193045d9836d8d80.js +1 -0
  59. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-b578b075a8d857e3.js → frontend_dist/_next/static/chunks/pages/pipelines-38187954b6ec4b40.js} +1 -1
  60. mage_ai/server/frontend_dist/_next/static/chunks/pages/platform/global-hooks/{[...slug]-5eeec927e4202b63.js → [...slug]-6834ae87bd668cb2.js} +1 -1
  61. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks-fbe9ad995d46d837.js → frontend_dist/_next/static/chunks/pages/platform/global-hooks-b3f7309a23e592b2.js} +1 -1
  62. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/{profile-fc659962d4015cb3.js → profile-f8b7374385e1f1bf.js} +1 -1
  63. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-8de68502a9afa299.js +1 -0
  64. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-a4f88c334414402b.js → frontend_dist/_next/static/chunks/pages/settings/platform/settings-50fb6a34f3913f1f.js} +1 -1
  65. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-4deb9579ef99a3c6.js → [...slug]-2e5c098c21ea32b7.js} +1 -1
  66. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-e0cda2f2bfce8d61.js → permissions-54e4b15b9585bfc4.js} +1 -1
  67. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-040f83d75d0f6537.js +1 -0
  68. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-910257d16c604ebd.js → [...slug]-95088f43034e3c95.js} +1 -1
  69. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{roles-4f7a0756806cee34.js → roles-e9149e1fcf218f42.js} +1 -1
  70. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-208d6f955204d704.js → sync-data-75b67ae4a00818ef.js} +1 -1
  71. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-c89dc67e5a1706a8.js → [...slug]-557dda05ca6c6124.js} +1 -1
  72. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-5212c01a9dc558da.js → users-3ee783f5139c76a1.js} +1 -1
  73. mage_ai/server/frontend_dist/_next/static/chunks/pages/{sign-in-054b33312d3193c3.js → sign-in-593c40985d63fcf7.js} +1 -1
  74. mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/{[...slug]-b6ed6a5d818bfd20.js → [...slug]-252c4b6b818345d5.js} +1 -1
  75. mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-852357bc983af2ea.js → templates-ca528bc607753ab8.js} +1 -1
  76. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/terminal-1f9c56d671bbc67d.js → frontend_dist/_next/static/chunks/pages/terminal-287362c1defcc96b.js} +1 -1
  77. mage_ai/server/frontend_dist/_next/static/chunks/pages/test-2f83af8c9f1378fe.js +1 -0
  78. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-d9de73fb799efed8.js +1 -0
  79. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/version-control-ae3469b992a341d6.js → frontend_dist/_next/static/chunks/pages/version-control-573f0225d7a703ed.js} +1 -1
  80. mage_ai/server/frontend_dist/_next/static/chunks/{webpack-b9a067f3bd0a3a05.js → webpack-0bc44da590c7cf85.js} +1 -1
  81. mage_ai/server/frontend_dist/block-layout.html +3 -3
  82. mage_ai/server/frontend_dist/compute.html +6 -6
  83. mage_ai/server/frontend_dist/files.html +6 -6
  84. mage_ai/server/frontend_dist/global-data-products/[...slug].html +6 -6
  85. mage_ai/server/frontend_dist/global-data-products.html +6 -6
  86. mage_ai/server/frontend_dist/global-hooks/[...slug].html +6 -6
  87. mage_ai/server/frontend_dist/global-hooks.html +6 -6
  88. mage_ai/server/frontend_dist/index.html +3 -3
  89. mage_ai/server/frontend_dist/manage/files.html +6 -6
  90. mage_ai/server/frontend_dist/manage/overview.html +6 -6
  91. mage_ai/server/frontend_dist/manage/pipeline-runs.html +6 -6
  92. mage_ai/server/frontend_dist/manage/settings.html +6 -6
  93. mage_ai/server/frontend_dist/manage/users/[user].html +6 -6
  94. mage_ai/server/frontend_dist/manage/users/new.html +6 -6
  95. mage_ai/server/frontend_dist/manage/users.html +6 -6
  96. mage_ai/server/frontend_dist/manage.html +6 -6
  97. mage_ai/server/frontend_dist/oauth.html +5 -5
  98. mage_ai/server/frontend_dist/overview.html +6 -6
  99. mage_ai/server/frontend_dist/pipeline-runs.html +6 -6
  100. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +6 -6
  101. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +6 -6
  102. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +6 -6
  103. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +3 -3
  104. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +6 -6
  105. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +6 -6
  106. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
  107. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +6 -6
  108. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +6 -6
  109. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +6 -6
  110. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +6 -6
  111. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +6 -6
  112. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +6 -6
  113. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +6 -6
  114. mage_ai/server/frontend_dist/pipelines/[pipeline].html +3 -3
  115. mage_ai/server/frontend_dist/pipelines.html +6 -6
  116. mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +6 -6
  117. mage_ai/server/frontend_dist/platform/global-hooks.html +6 -6
  118. mage_ai/server/frontend_dist/settings/account/profile.html +6 -6
  119. mage_ai/server/frontend_dist/settings/platform/preferences.html +6 -6
  120. mage_ai/server/frontend_dist/settings/platform/settings.html +6 -6
  121. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +6 -6
  122. mage_ai/server/frontend_dist/settings/workspace/permissions.html +6 -6
  123. mage_ai/server/frontend_dist/settings/workspace/preferences.html +6 -6
  124. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +6 -6
  125. mage_ai/server/frontend_dist/settings/workspace/roles.html +6 -6
  126. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +6 -6
  127. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +6 -6
  128. mage_ai/server/frontend_dist/settings/workspace/users.html +6 -6
  129. mage_ai/server/frontend_dist/settings.html +3 -3
  130. mage_ai/server/frontend_dist/sign-in.html +7 -7
  131. mage_ai/server/frontend_dist/templates/[...slug].html +6 -6
  132. mage_ai/server/frontend_dist/templates.html +6 -6
  133. mage_ai/server/frontend_dist/terminal.html +6 -6
  134. mage_ai/server/frontend_dist/test.html +3 -3
  135. mage_ai/server/frontend_dist/triggers.html +6 -6
  136. mage_ai/server/frontend_dist/v2/canvas.html +2 -2
  137. mage_ai/server/frontend_dist/v2.html +2 -2
  138. mage_ai/server/frontend_dist/version-control.html +6 -6
  139. mage_ai/server/frontend_dist_base_path_template/404.html +3 -3
  140. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1187-839336d276186105.js → 1187-4560c3895e1d7099.js} +1 -1
  141. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1598-0adca9dce3ba4c60.js → 1598-cbf3f5a6078fc3f5.js} +1 -1
  142. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-638a944d24d5abde.js +1 -0
  143. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-36f746b1824004f2.js +1 -0
  144. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3763-39a5174f6a3924db.js → 3763-aabe2703076636b0.js} +1 -1
  145. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-3e2acb5ed45b582b.js +1 -0
  146. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/449-f689774546860ca4.js +1 -0
  147. mage_ai/server/{frontend_dist/_next/static/chunks/5627-d5e559859dd0e1e0.js → frontend_dist_base_path_template/_next/static/chunks/5627-10e76bafa5a26f5f.js} +1 -1
  148. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5699-e49718dfc9eb2854.js → 5699-e99379e332bd0b41.js} +1 -1
  149. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7966-163da2621b8c987c.js → 7966-a5a7db345ce81263.js} +1 -1
  150. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-90de19bc03f1484b.js → _app-0392ef723ea2c6f8.js} +2 -2
  151. mage_ai/server/{frontend_dist/_next/static/chunks/pages/compute-ed67fa8e81662e8b.js → frontend_dist_base_path_template/_next/static/chunks/pages/compute-9e2dea78024e3bb4.js} +1 -1
  152. mage_ai/server/{frontend_dist/_next/static/chunks/pages/files-e0ecd7ced09a63b2.js → frontend_dist_base_path_template/_next/static/chunks/pages/files-e08c7fe76f968f9c.js} +1 -1
  153. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-c7a729477ecda50e.js → [...slug]-30c3807057a4e65b.js} +1 -1
  154. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-fd6ae6a358a60a0c.js → global-data-products-8dcb3b31af9e0e39.js} +1 -1
  155. mage_ai/server/{frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-8e50243797a7fe59.js → frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-85a64b64d27214b6.js} +1 -1
  156. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-hooks-d0c003446332dc0d.js → global-hooks-4ff959d51b8a9502.js} +1 -1
  157. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{files-a69ed8e9f814490c.js → files-d08a460641d0efaa.js} +1 -1
  158. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{overview-1aad7093c6d39257.js → overview-aae747f487e08d51.js} +1 -1
  159. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{pipeline-runs-528d30e0d13b0cc7.js → pipeline-runs-09a842d64a6ada62.js} +1 -1
  160. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{settings-fb9201d9cf63031d.js → settings-2e98e57d9376a458.js} +1 -1
  161. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/{[user]-000f5a980a07da39.js → [user]-7be6e41ad66089bb.js} +1 -1
  162. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users/new-e4e613f6e817a733.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-4c088833063bfa07.js} +1 -1
  163. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{users-a5e9d77ed5b50205.js → users-b99379d0aa6a8c25.js} +1 -1
  164. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage-34d718b8a4066c23.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage-868fcd8cbeb265f0.js} +1 -1
  165. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{oauth-3bfd1b8d7f036726.js → oauth-6ceceb62191dfe8a.js} +1 -1
  166. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-e51cd04bd4d1fffe.js +1 -0
  167. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipeline-runs-5f8c100e648efa8a.js → pipeline-runs-2d0136b51b57de93.js} +1 -1
  168. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-688c652f3296bb9c.js → [...slug]-1ad5238742e25b4c.js} +1 -1
  169. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-bd11e87d026bfbf9.js +1 -0
  170. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-1236e36d39b1637d.js → dashboard-0f4f47f721b0723f.js} +1 -1
  171. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-432da20df91511fb.js +1 -0
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-fe91dfb0091f6bc6.js +1 -0
  173. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-0d68d4bf6290fefb.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-cf794b2d22a80f31.js} +1 -1
  174. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-9254358d58f07714.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-a964caef91bed9e1.js} +1 -1
  175. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-821001e690caebe2.js → monitors-80bebb4401eefe25.js} +1 -1
  176. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-2eae7cb017027682.js +1 -0
  177. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d4b2a0800a66b33.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-e3d7fdfeb7f806f7.js} +1 -1
  178. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{settings-cd49372ae1702963.js → settings-0abf8a1b7243f93b.js} +1 -1
  179. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-707ed8ca942ca802.js +1 -0
  180. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-259143ed3cf59e31.js → [...slug]-8429f17d4146e1ec.js} +1 -1
  181. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-193045d9836d8d80.js +1 -0
  182. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines-b578b075a8d857e3.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-38187954b6ec4b40.js} +1 -1
  183. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks/{[...slug]-5eeec927e4202b63.js → [...slug]-6834ae87bd668cb2.js} +1 -1
  184. mage_ai/server/{frontend_dist/_next/static/chunks/pages/platform/global-hooks-fbe9ad995d46d837.js → frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks-b3f7309a23e592b2.js} +1 -1
  185. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/{profile-fc659962d4015cb3.js → profile-f8b7374385e1f1bf.js} +1 -1
  186. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-8de68502a9afa299.js +1 -0
  187. mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/settings-a4f88c334414402b.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-50fb6a34f3913f1f.js} +1 -1
  188. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-4deb9579ef99a3c6.js → [...slug]-2e5c098c21ea32b7.js} +1 -1
  189. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-e0cda2f2bfce8d61.js → permissions-54e4b15b9585bfc4.js} +1 -1
  190. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-040f83d75d0f6537.js +1 -0
  191. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-910257d16c604ebd.js → [...slug]-95088f43034e3c95.js} +1 -1
  192. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{roles-4f7a0756806cee34.js → roles-e9149e1fcf218f42.js} +1 -1
  193. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{sync-data-208d6f955204d704.js → sync-data-75b67ae4a00818ef.js} +1 -1
  194. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-c89dc67e5a1706a8.js → [...slug]-557dda05ca6c6124.js} +1 -1
  195. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-5212c01a9dc558da.js → users-3ee783f5139c76a1.js} +1 -1
  196. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{sign-in-054b33312d3193c3.js → sign-in-593c40985d63fcf7.js} +1 -1
  197. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/{[...slug]-b6ed6a5d818bfd20.js → [...slug]-252c4b6b818345d5.js} +1 -1
  198. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{templates-852357bc983af2ea.js → templates-ca528bc607753ab8.js} +1 -1
  199. mage_ai/server/{frontend_dist/_next/static/chunks/pages/terminal-1f9c56d671bbc67d.js → frontend_dist_base_path_template/_next/static/chunks/pages/terminal-287362c1defcc96b.js} +1 -1
  200. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-2f83af8c9f1378fe.js +1 -0
  201. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-d9de73fb799efed8.js +1 -0
  202. mage_ai/server/{frontend_dist/_next/static/chunks/pages/version-control-ae3469b992a341d6.js → frontend_dist_base_path_template/_next/static/chunks/pages/version-control-573f0225d7a703ed.js} +1 -1
  203. mage_ai/server/frontend_dist_base_path_template/_next/static/dxnSzgIvSG4Ke5LM-tPQX/_buildManifest.js +1 -0
  204. mage_ai/server/frontend_dist_base_path_template/block-layout.html +3 -3
  205. mage_ai/server/frontend_dist_base_path_template/compute.html +6 -6
  206. mage_ai/server/frontend_dist_base_path_template/files.html +6 -6
  207. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +6 -6
  208. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +6 -6
  209. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +6 -6
  210. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +6 -6
  211. mage_ai/server/frontend_dist_base_path_template/index.html +3 -3
  212. mage_ai/server/frontend_dist_base_path_template/manage/files.html +6 -6
  213. mage_ai/server/frontend_dist_base_path_template/manage/overview.html +6 -6
  214. mage_ai/server/frontend_dist_base_path_template/manage/pipeline-runs.html +6 -6
  215. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +6 -6
  216. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +6 -6
  217. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +6 -6
  218. mage_ai/server/frontend_dist_base_path_template/manage/users.html +6 -6
  219. mage_ai/server/frontend_dist_base_path_template/manage.html +6 -6
  220. mage_ai/server/frontend_dist_base_path_template/oauth.html +5 -5
  221. mage_ai/server/frontend_dist_base_path_template/overview.html +6 -6
  222. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +6 -6
  223. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +6 -6
  224. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +6 -6
  225. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +6 -6
  226. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +3 -3
  227. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +6 -6
  228. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +6 -6
  229. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
  230. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +6 -6
  231. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +6 -6
  232. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +6 -6
  233. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +6 -6
  234. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +6 -6
  235. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +6 -6
  236. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +6 -6
  237. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +3 -3
  238. mage_ai/server/frontend_dist_base_path_template/pipelines.html +6 -6
  239. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +6 -6
  240. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +6 -6
  241. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +6 -6
  242. mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +6 -6
  243. mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +6 -6
  244. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +6 -6
  245. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +6 -6
  246. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +6 -6
  247. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +6 -6
  248. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +6 -6
  249. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +6 -6
  250. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +6 -6
  251. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +6 -6
  252. mage_ai/server/frontend_dist_base_path_template/settings.html +3 -3
  253. mage_ai/server/frontend_dist_base_path_template/sign-in.html +7 -7
  254. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +6 -6
  255. mage_ai/server/frontend_dist_base_path_template/templates.html +6 -6
  256. mage_ai/server/frontend_dist_base_path_template/terminal.html +6 -6
  257. mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
  258. mage_ai/server/frontend_dist_base_path_template/triggers.html +6 -6
  259. mage_ai/server/frontend_dist_base_path_template/v2/canvas.html +2 -2
  260. mage_ai/server/frontend_dist_base_path_template/v2.html +2 -2
  261. mage_ai/server/frontend_dist_base_path_template/version-control.html +6 -6
  262. mage_ai/server/server.py +9 -0
  263. mage_ai/services/teams/config.py +13 -2
  264. mage_ai/services/teams/teams.py +13 -11
  265. mage_ai/shared/constants.py +3 -1
  266. mage_ai/shared/enum.py +2 -5
  267. mage_ai/shared/environments.py +27 -3
  268. mage_ai/streaming/sinks/elasticsearch.py +15 -5
  269. mage_ai/tests/api/endpoints/test_blocks.py +1 -101
  270. mage_ai/tests/api/endpoints/test_configuration_options.py +1 -48
  271. mage_ai/tests/api/endpoints/test_configuration_options_project_platform.py +68 -0
  272. mage_ai/tests/api/endpoints/test_custom_designs.py +1 -106
  273. mage_ai/tests/api/endpoints/test_custom_designs_project_platform.py +132 -0
  274. mage_ai/tests/api/endpoints/test_dbt_blocks.py +111 -0
  275. mage_ai/tests/api/endpoints/test_file_contents.py +0 -48
  276. mage_ai/tests/api/endpoints/test_file_contents_with_project_platform.py +66 -0
  277. mage_ai/tests/api/endpoints/test_pipelines.py +0 -134
  278. mage_ai/tests/api/endpoints/test_pipelines_with_project_platform.py +143 -0
  279. mage_ai/tests/data_preparation/models/block/hook/test_hook_block.py +3 -3
  280. mage_ai/tests/data_preparation/models/test_block.py +7 -0
  281. mage_ai/tests/data_preparation/test_repo_manager.py +0 -63
  282. mage_ai/tests/data_preparation/test_repo_manager_project_platform.py +67 -0
  283. mage_ai/tests/data_preparation/test_variable_manager.py +0 -51
  284. mage_ai/tests/data_preparation/test_variable_manager_project_platform.py +41 -0
  285. mage_ai/tests/io/create_table/test_postgresql.py +27 -0
  286. mage_ai/tests/orchestration/notification/test_config.py +3 -3
  287. mage_ai-0.9.75.dist-info/METADATA +377 -0
  288. {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/RECORD +296 -289
  289. {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/WHEEL +1 -1
  290. mage_ai/server/frontend_dist/_next/static/chunks/1557-1ad0c64c2d08e569.js +0 -1
  291. mage_ai/server/frontend_dist/_next/static/chunks/2717-d65056b6b5e124eb.js +0 -1
  292. mage_ai/server/frontend_dist/_next/static/chunks/3548-b2c5edfb710886a6.js +0 -1
  293. mage_ai/server/frontend_dist/_next/static/chunks/3782-4b3091e550f809a2.js +0 -1
  294. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-69af3253ad0d0d89.js +0 -1
  295. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-fe112809feb25b05.js +0 -1
  296. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e9ca358209cdf93d.js +0 -1
  297. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-a29f1615d2e7d330.js +0 -1
  298. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-6d382ae5bad9745c.js +0 -1
  299. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-135be8974f7f5f2b.js +0 -1
  300. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-3af13e89adff4d6c.js +0 -1
  301. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-058d283ee178c038.js +0 -1
  302. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-7b02bb70462144cb.js +0 -1
  303. mage_ai/server/frontend_dist/_next/static/chunks/pages/test-86b12cc12d4a625f.js +0 -1
  304. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-2481c40b18d5b6d4.js +0 -1
  305. mage_ai/server/frontend_dist/_next/static/pLWT6Sqd09xYpufCVIqnz/_buildManifest.js +0 -1
  306. mage_ai/server/frontend_dist_base_path_template/_next/static/JQewSAObpbhO0wrdAM6Ng/_buildManifest.js +0 -1
  307. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-1ad0c64c2d08e569.js +0 -1
  308. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-d65056b6b5e124eb.js +0 -1
  309. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-b2c5edfb710886a6.js +0 -1
  310. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-4b3091e550f809a2.js +0 -1
  311. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-69af3253ad0d0d89.js +0 -1
  312. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-fe112809feb25b05.js +0 -1
  313. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e9ca358209cdf93d.js +0 -1
  314. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-a29f1615d2e7d330.js +0 -1
  315. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-6d382ae5bad9745c.js +0 -1
  316. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-135be8974f7f5f2b.js +0 -1
  317. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-3af13e89adff4d6c.js +0 -1
  318. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-058d283ee178c038.js +0 -1
  319. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-7b02bb70462144cb.js +0 -1
  320. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-86b12cc12d4a625f.js +0 -1
  321. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-2481c40b18d5b6d4.js +0 -1
  322. mage_ai-0.9.74.dist-info/METADATA +0 -544
  323. /mage_ai/server/frontend_dist/_next/static/{pLWT6Sqd09xYpufCVIqnz → 38-PtskJFUTYUpRhT1qF_}/_ssgManifest.js +0 -0
  324. /mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-5bdff745074fb350.js.LICENSE.txt → _app-13bf3b7dcef50c29.js.LICENSE.txt} +0 -0
  325. /mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-90de19bc03f1484b.js.LICENSE.txt → _app-0392ef723ea2c6f8.js.LICENSE.txt} +0 -0
  326. /mage_ai/server/frontend_dist_base_path_template/_next/static/{JQewSAObpbhO0wrdAM6Ng → dxnSzgIvSG4Ke5LM-tPQX}/_ssgManifest.js +0 -0
  327. {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/LICENSE +0 -0
  328. {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/entry_points.txt +0 -0
  329. {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3112],{80754:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return D}});var n=r(77837),o=r(38860),i=r.n(o),c=r(93808),u=r(82394),s=r(75582),l=r(82684),a=r(83455),d=r(21764),f=r(32013),p=r(98777),j=r(71180),h=r(15338),v=r(55485),g=r(88543),m=r(38276),b=r(30160),Z=r(35686),x=r(77417),O=r(72473),P=r(70515),y=r(81728),w=r(42122),S=r(72619),_=r(23780),k=r(28598);function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var E=function(){var e,t=(0,_.VI)(null,{},[],{uuid:"Platform/Settings"}),r=((0,s.Z)(t,1)[0],(0,x.Z)()),n=r.project,o=r.rootProject,i=(0,l.useState)(null),c=i[0],I=i[1],E=(0,l.useState)(!1),T=(E[0],E[1]),N=(0,l.useState)(null),R=N[0],D=N[1],B=(0,l.useCallback)((function(e){I(e),T(!0)}),[I,T]);(0,l.useEffect)((function(){o&&!c&&I(null==o?void 0:o.platform_settings),n&&!R&&D(null==n?void 0:n.name)}),[o]);var A=(0,l.useMemo)((function(){var e=(0,y.RA)((0,y.Y6)());return(0,k.jsx)(j.ZP,{beforeIcon:(0,k.jsx)(O.Add,{}),compact:!0,onClick:function(){return B((function(t){return C(C({},t),{},{projects:C(C({},null==c?void 0:c.projects),{},(0,u.Z)({},e,{}))})}))},secondary:!0,small:!0,children:"Register project"})}),[c]),F=(0,a.Db)(Z.ZP.projects.useUpdate(null==o?void 0:o.name),{onSuccess:function(e){return(0,S.wD)(e,{callback:function(e){var t=e.project;B((function(e){return C(C(C({},e),t),{},{features:C(C({},null==e?void 0:e.features),{},{override:!(null==t||!t.features_override||(0,w.Qr)(null==t?void 0:t.features_override))})})})),d.Am.success("Platform settings successfully saved.",{position:d.Am.POSITION.BOTTOM_RIGHT,toastId:"platform-settings-success-".concat(null==t?void 0:t.name)})}})}}),M=(0,s.Z)(F,2),H=M[0],W=M[1].isLoading;return(0,k.jsxs)(m.Z,{p:P.cd,children:[(0,k.jsx)(g.Z,{headerChildren:(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(m.Z,{ml:P.cd}),A]}),title:"Projects",children:(0,k.jsx)(f.Z,{noBorder:!0,noBoxShadow:!0,visibleMappingForced:Object.keys((null==c?void 0:c.projects)||{}).reduce((function(e,t,r){return C(C({},e),{},(0,u.Z)({},String(r),!0))}),{}),children:Object.entries((null==c?void 0:c.projects)||{}).map((function(e){var t=(0,s.Z)(e,2),r=t[0],n=t[1],o=n.path,i=n.uuid;return(0,k.jsxs)(p.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,k.jsx)(v.ZP,{alignItems:"center",children:(0,k.jsx)(b.ZP,{large:!0,monospace:!0,children:r})}),titleXPadding:P.cd*P.iI,titleYPadding:P.cd*P.iI,children:[(0,k.jsx)(g.S,{description:"Unique name of project.",textInput:{fullWidth:!1,monospace:!0,onChange:function(e){return B((function(t){return C(C({},t),{},{projects:C(C({},null==c?void 0:c.projects),{},(0,u.Z)({},r,C(C({},n),{},{uuid:e.target.value})))})}))},placeholder:r,value:i},title:"Name"}),(0,k.jsx)(g.S,{description:(0,k.jsxs)(b.ZP,{muted:!0,small:!0,children:["Relative path to the project directory starting from the root project directory.",(0,k.jsx)("br",{}),"If blank, the default path will be the project name."]}),textInput:{fullWidth:!1,monospace:!0,onChange:function(e){return B((function(t){return C(C({},t),{},{projects:C(C({},null==c?void 0:c.projects),{},(0,u.Z)({},r,C(C({},n),{},{path:e.target.value})))})}))},placeholder:r,value:o||""},title:"Path"}),(0,k.jsx)(g.S,{description:"The currently selected project.",title:"Currently selected project",toggleSwitch:{checked:r===R,onCheck:function(){return D(r===R?null:r)}}}),(0,k.jsx)(h.Z,{light:!0}),(0,k.jsx)(g.S,{children:(0,k.jsx)(j.ZP,{compact:!0,noBorder:!0,onClick:function(){B((function(e){return C(C({},e),{},{projects:(0,w.gR)(null==c?void 0:c.projects,[r])})}))},small:!0,children:"Deregister project"})})]},r)}))})}),(0,k.jsx)(m.Z,{mt:P.HN}),(0,k.jsx)(g.Z,{title:"Features",children:(0,k.jsx)(g.S,{description:(0,k.jsxs)(b.ZP,{muted:!0,small:!0,children:["If this setting is toggled, the feature flags that are set from the root project",(0,k.jsx)("br",{}),"will override the feature flags of all sub-projects."]}),title:"Override all project features",toggleSwitch:{checked:null==c||null===(e=c.features)||void 0===e?void 0:e.override,onCheck:function(){return B((function(e){var t;return C(C({},e),{},{features:C(C({},null==e?void 0:e.features),{},{override:!(null!=c&&null!==(t=c.features)&&void 0!==t&&t.override)})})}))}}})}),(0,k.jsx)(m.Z,{my:P.HN,children:(0,k.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,k.jsx)("div",{}),(0,k.jsx)(j.ZP,{beforeIcon:(0,k.jsx)(O.Save,{}),loading:W,onClick:function(){return H({project:{activate_project:R,platform_settings:c,root_project:!0}})},primary:!0,children:"Save settings"})]})})]})},T=r(28274),N=r(24755);function R(){return(0,k.jsx)(T.Z,{uuidItemSelected:N.B2.SETTINGS,uuidWorkspaceSelected:N.Pl.PROJECT_PLATFORM,children:(0,k.jsx)(E,{})})}R.getInitialProps=(0,n.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var D=(0,c.Z)(R)},39863:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/platform/settings",function(){return r(80754)}])},80022:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(61049);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(12539),o=r(80022);function i(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[1557,5699,9774,2888,179],(function(){return t=39863,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3112],{80754:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return D}});var n=r(77837),o=r(38860),i=r.n(o),c=r(93808),u=r(82394),s=r(75582),l=r(82684),a=r(83455),d=r(21764),f=r(32013),p=r(98777),j=r(71180),h=r(15338),v=r(55485),g=r(88543),m=r(38276),b=r(30160),Z=r(35686),x=r(77417),O=r(72473),P=r(70515),y=r(81728),w=r(42122),S=r(72619),_=r(23780),k=r(28598);function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var E=function(){var e,t=(0,_.VI)(null,{},[],{uuid:"Platform/Settings"}),r=((0,s.Z)(t,1)[0],(0,x.Z)()),n=r.project,o=r.rootProject,i=(0,l.useState)(null),c=i[0],I=i[1],E=(0,l.useState)(!1),T=(E[0],E[1]),N=(0,l.useState)(null),R=N[0],D=N[1],B=(0,l.useCallback)((function(e){I(e),T(!0)}),[I,T]);(0,l.useEffect)((function(){o&&!c&&I(null==o?void 0:o.platform_settings),n&&!R&&D(null==n?void 0:n.name)}),[o]);var A=(0,l.useMemo)((function(){var e=(0,y.RA)((0,y.Y6)());return(0,k.jsx)(j.ZP,{beforeIcon:(0,k.jsx)(O.Add,{}),compact:!0,onClick:function(){return B((function(t){return C(C({},t),{},{projects:C(C({},null==c?void 0:c.projects),{},(0,u.Z)({},e,{}))})}))},secondary:!0,small:!0,children:"Register project"})}),[c]),F=(0,a.Db)(Z.ZP.projects.useUpdate(null==o?void 0:o.name),{onSuccess:function(e){return(0,S.wD)(e,{callback:function(e){var t=e.project;B((function(e){return C(C(C({},e),t),{},{features:C(C({},null==e?void 0:e.features),{},{override:!(null==t||!t.features_override||(0,w.Qr)(null==t?void 0:t.features_override))})})})),d.Am.success("Platform settings successfully saved.",{position:d.Am.POSITION.BOTTOM_RIGHT,toastId:"platform-settings-success-".concat(null==t?void 0:t.name)})}})}}),M=(0,s.Z)(F,2),H=M[0],W=M[1].isLoading;return(0,k.jsxs)(m.Z,{p:P.cd,children:[(0,k.jsx)(g.Z,{headerChildren:(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(m.Z,{ml:P.cd}),A]}),title:"Projects",children:(0,k.jsx)(f.Z,{noBorder:!0,noBoxShadow:!0,visibleMappingForced:Object.keys((null==c?void 0:c.projects)||{}).reduce((function(e,t,r){return C(C({},e),{},(0,u.Z)({},String(r),!0))}),{}),children:Object.entries((null==c?void 0:c.projects)||{}).map((function(e){var t=(0,s.Z)(e,2),r=t[0],n=t[1],o=n.path,i=n.uuid;return(0,k.jsxs)(p.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,k.jsx)(v.ZP,{alignItems:"center",children:(0,k.jsx)(b.ZP,{large:!0,monospace:!0,children:r})}),titleXPadding:P.cd*P.iI,titleYPadding:P.cd*P.iI,children:[(0,k.jsx)(g.S,{description:"Unique name of project.",textInput:{fullWidth:!1,monospace:!0,onChange:function(e){return B((function(t){return C(C({},t),{},{projects:C(C({},null==c?void 0:c.projects),{},(0,u.Z)({},r,C(C({},n),{},{uuid:e.target.value})))})}))},placeholder:r,value:i},title:"Name"}),(0,k.jsx)(g.S,{description:(0,k.jsxs)(b.ZP,{muted:!0,small:!0,children:["Relative path to the project directory starting from the root project directory.",(0,k.jsx)("br",{}),"If blank, the default path will be the project name."]}),textInput:{fullWidth:!1,monospace:!0,onChange:function(e){return B((function(t){return C(C({},t),{},{projects:C(C({},null==c?void 0:c.projects),{},(0,u.Z)({},r,C(C({},n),{},{path:e.target.value})))})}))},placeholder:r,value:o||""},title:"Path"}),(0,k.jsx)(g.S,{description:"The currently selected project.",title:"Currently selected project",toggleSwitch:{checked:r===R,onCheck:function(){return D(r===R?null:r)}}}),(0,k.jsx)(h.Z,{light:!0}),(0,k.jsx)(g.S,{children:(0,k.jsx)(j.ZP,{compact:!0,noBorder:!0,onClick:function(){B((function(e){return C(C({},e),{},{projects:(0,w.gR)(null==c?void 0:c.projects,[r])})}))},small:!0,children:"Deregister project"})})]},r)}))})}),(0,k.jsx)(m.Z,{mt:P.HN}),(0,k.jsx)(g.Z,{title:"Features",children:(0,k.jsx)(g.S,{description:(0,k.jsxs)(b.ZP,{muted:!0,small:!0,children:["If this setting is toggled, the feature flags that are set from the root project",(0,k.jsx)("br",{}),"will override the feature flags of all sub-projects."]}),title:"Override all project features",toggleSwitch:{checked:null==c||null===(e=c.features)||void 0===e?void 0:e.override,onCheck:function(){return B((function(e){var t;return C(C({},e),{},{features:C(C({},null==e?void 0:e.features),{},{override:!(null!=c&&null!==(t=c.features)&&void 0!==t&&t.override)})})}))}}})}),(0,k.jsx)(m.Z,{my:P.HN,children:(0,k.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,k.jsx)("div",{}),(0,k.jsx)(j.ZP,{beforeIcon:(0,k.jsx)(O.Save,{}),loading:W,onClick:function(){return H({project:{activate_project:R,platform_settings:c,root_project:!0}})},primary:!0,children:"Save settings"})]})})]})},T=r(28274),N=r(24755);function R(){return(0,k.jsx)(T.Z,{uuidItemSelected:N.B2.SETTINGS,uuidWorkspaceSelected:N.Pl.PROJECT_PLATFORM,children:(0,k.jsx)(E,{})})}R.getInitialProps=(0,n.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var D=(0,c.Z)(R)},39863:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/platform/settings",function(){return r(80754)}])},80022:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(61049);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(12539),o=r(80022);function i(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[449,5699,9774,2888,179],(function(){return t=39863,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[609],{5149:function(n,r,u){"use strict";u.r(r);var t=u(77837),e=u(38860),s=u.n(e),i=u(58146),a=u(93808),c=u(28598);function o(n){var r=n.slug;return(0,c.jsx)(i.Z,{slug:r})}o.getInitialProps=function(){var n=(0,t.Z)(s().mark((function n(r){var u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.query.slug,n.abrupt("return",{slug:null==u?void 0:u[0]});case 2:case"end":return n.stop()}}),n)})));return function(r){return n.apply(this,arguments)}}(),r.default=(0,a.Z)(o)},79877:function(n,r,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/permissions/[...slug]",function(){return u(5149)}])}},function(n){n.O(0,[1557,5699,7779,9774,2888,179],(function(){return r=79877,n(n.s=r);var r}));var r=n.O();_N_E=r}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[609],{5149:function(n,r,u){"use strict";u.r(r);var t=u(77837),e=u(38860),s=u.n(e),i=u(58146),a=u(93808),c=u(28598);function o(n){var r=n.slug;return(0,c.jsx)(i.Z,{slug:r})}o.getInitialProps=function(){var n=(0,t.Z)(s().mark((function n(r){var u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.query.slug,n.abrupt("return",{slug:null==u?void 0:u[0]});case 2:case"end":return n.stop()}}),n)})));return function(r){return n.apply(this,arguments)}}(),r.default=(0,a.Z)(o)},79877:function(n,r,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/permissions/[...slug]",function(){return u(5149)}])}},function(n){n.O(0,[449,5699,7779,9774,2888,179],(function(){return r=79877,n(n.s=r);var r}));var r=n.O();_N_E=r}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4085],{34331:function(e,n,t){"use strict";t.r(n);var i=t(77837),r=t(38860),s=t.n(r),u=t(82684),c=t(34376),o=t(71180),d=t(15338),l=t(55485),a=t(58146),p=t(93808),m=t(28274),f=t(38276),h=t(75499),x=t(30160),j=t(35686),_=t(72473),P=t(70515),Z=t(24755),v=t(3917),w=t(36717),b=t(28598);function k(){var e=(0,c.useRouter)(),n=(0,u.useState)(!1),t=n[0],i=n[1],r=j.ZP.permissions.list({_limit:1e3}).data,s=(0,u.useMemo)((function(){return(null==r?void 0:r.permissions)||[]}),[r]),p=[{bold:!t,label:function(){return"Permissions"}}];return t?(p[0].onClick=function(){return i(!1)},p.push({bold:!0,label:function(){return"New permission"}})):p[0].linkProps={href:"/settings/workspace/permissions"},(0,b.jsxs)(m.Z,{appendBreadcrumbs:!0,breadcrumbs:p,title:"Permissions",uuidItemSelected:Z.B2.PERMISSIONS,uuidWorkspaceSelected:Z.Pl.USER_MANAGEMENT,children:[t&&(0,b.jsx)(a.Z,{contained:!0,onCancel:function(){return i(!1)}}),!t&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Z,{p:P.cd,children:(0,b.jsx)(o.ZP,{beforeIcon:(0,b.jsx)(_.Locked,{}),onClick:function(){return i(!0)},primary:!0,children:"Add new permission"})}),(0,b.jsx)(d.Z,{light:!0}),(0,b.jsx)(h.Z,{columnFlex:[3,1,null,6,null,null],columns:[{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{uuid:"Access"},{uuid:"Last updated"},{rightAligned:!0,uuid:"Created at"}],onClickRow:function(n){var t,i=null===(t=s[n])||void 0===t?void 0:t.id;e.push("/settings/workspace/permissions/".concat(i))},rows:null==s?void 0:s.map((function(e){var n=e.access,t=e.created_at,i=e.entity,r=e.entity_id,s=e.entity_name,u=e.entity_type,c=(e.id,e.updated_at),o=(e.user,n?(0,w.q)(n):[]),d=(null==o?void 0:o.length)||0;return[(0,b.jsx)(x.ZP,{monospace:!0,children:s||i},"entityName"),(0,b.jsx)(x.ZP,{default:!0,monospace:!!u,children:u||"-"},"entityType"),(0,b.jsx)(x.ZP,{default:!0,monospace:!!r,children:r||"-"},"entityID"),(0,b.jsx)("div",{children:d>=1&&(0,b.jsx)(l.ZP,{alignItems:"center",flexWrap:"wrap",children:null==o?void 0:o.map((function(e,n){return(0,b.jsx)("div",{children:(0,b.jsxs)(x.ZP,{default:!0,monospace:!0,small:!0,children:[e,d>=2&&n<d-1&&(0,b.jsx)(x.ZP,{inline:!0,muted:!0,small:!0,children:", "})]})},e)}))})},"access"),(0,b.jsx)(x.ZP,{monospace:!0,default:!0,children:c&&(0,v.d$)(c)},"updatedAt"),(0,b.jsx)(x.ZP,{monospace:!0,default:!0,rightAligned:!0,children:t&&(0,v.d$)(t)},"createdAt")]})),uuid:"permissions"})]})]})}k.getInitialProps=(0,i.Z)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,p.Z)(k)},36717:function(e,n,t){"use strict";t.d(n,{q:function(){return s}});var i=t(75582),r=t(36288);function s(e){return Object.entries(r.K4).reduce((function(n,t){var r=(0,i.Z)(t,2),s=r[0],u=r[1];return e&Number(s)?n.concat(u):n}),[])}},65960:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/permissions",function(){return t(34331)}])}},function(e){e.O(0,[1557,5699,7779,9774,2888,179],(function(){return n=65960,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4085],{34331:function(e,n,t){"use strict";t.r(n);var i=t(77837),r=t(38860),s=t.n(r),u=t(82684),c=t(34376),o=t(71180),d=t(15338),l=t(55485),a=t(58146),p=t(93808),m=t(28274),f=t(38276),h=t(75499),x=t(30160),j=t(35686),_=t(72473),P=t(70515),Z=t(24755),v=t(3917),w=t(36717),b=t(28598);function k(){var e=(0,c.useRouter)(),n=(0,u.useState)(!1),t=n[0],i=n[1],r=j.ZP.permissions.list({_limit:1e3}).data,s=(0,u.useMemo)((function(){return(null==r?void 0:r.permissions)||[]}),[r]),p=[{bold:!t,label:function(){return"Permissions"}}];return t?(p[0].onClick=function(){return i(!1)},p.push({bold:!0,label:function(){return"New permission"}})):p[0].linkProps={href:"/settings/workspace/permissions"},(0,b.jsxs)(m.Z,{appendBreadcrumbs:!0,breadcrumbs:p,title:"Permissions",uuidItemSelected:Z.B2.PERMISSIONS,uuidWorkspaceSelected:Z.Pl.USER_MANAGEMENT,children:[t&&(0,b.jsx)(a.Z,{contained:!0,onCancel:function(){return i(!1)}}),!t&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Z,{p:P.cd,children:(0,b.jsx)(o.ZP,{beforeIcon:(0,b.jsx)(_.Locked,{}),onClick:function(){return i(!0)},primary:!0,children:"Add new permission"})}),(0,b.jsx)(d.Z,{light:!0}),(0,b.jsx)(h.Z,{columnFlex:[3,1,null,6,null,null],columns:[{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{uuid:"Access"},{uuid:"Last updated"},{rightAligned:!0,uuid:"Created at"}],onClickRow:function(n){var t,i=null===(t=s[n])||void 0===t?void 0:t.id;e.push("/settings/workspace/permissions/".concat(i))},rows:null==s?void 0:s.map((function(e){var n=e.access,t=e.created_at,i=e.entity,r=e.entity_id,s=e.entity_name,u=e.entity_type,c=(e.id,e.updated_at),o=(e.user,n?(0,w.q)(n):[]),d=(null==o?void 0:o.length)||0;return[(0,b.jsx)(x.ZP,{monospace:!0,children:s||i},"entityName"),(0,b.jsx)(x.ZP,{default:!0,monospace:!!u,children:u||"-"},"entityType"),(0,b.jsx)(x.ZP,{default:!0,monospace:!!r,children:r||"-"},"entityID"),(0,b.jsx)("div",{children:d>=1&&(0,b.jsx)(l.ZP,{alignItems:"center",flexWrap:"wrap",children:null==o?void 0:o.map((function(e,n){return(0,b.jsx)("div",{children:(0,b.jsxs)(x.ZP,{default:!0,monospace:!0,small:!0,children:[e,d>=2&&n<d-1&&(0,b.jsx)(x.ZP,{inline:!0,muted:!0,small:!0,children:", "})]})},e)}))})},"access"),(0,b.jsx)(x.ZP,{monospace:!0,default:!0,children:c&&(0,v.d$)(c)},"updatedAt"),(0,b.jsx)(x.ZP,{monospace:!0,default:!0,rightAligned:!0,children:t&&(0,v.d$)(t)},"createdAt")]})),uuid:"permissions"})]})]})}k.getInitialProps=(0,i.Z)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,p.Z)(k)},36717:function(e,n,t){"use strict";t.d(n,{q:function(){return s}});var i=t(75582),r=t(36288);function s(e){return Object.entries(r.K4).reduce((function(n,t){var r=(0,i.Z)(t,2),s=r[0],u=r[1];return e&Number(s)?n.concat(u):n}),[])}},65960:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/permissions",function(){return t(34331)}])}},function(e){e.O(0,[449,5699,7779,9774,2888,179],(function(){return n=65960,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3853],{55729:function(e,t,n){"use strict";n.d(t,{Z:function(){return H}});var r=n(82394),i=n(75582),o=n(82684),c=n(83455),s=n(71180),l=n(15338),u=n(97618),a=n(55485),d=n(85854),p=n(48670),f=n(65956),j=n(82359),h=n(88543),g=n(38276),v=n(30160),m=n(17488),Z=n(69650),b=n(12468),y=n(35686),O=n(77417),_=n(9518),x=n(44897),P=n(42631),w=n(70515),E=_.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],P.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||x.Z.background).codeArea,";\n ")})),k=n(72473),C=n(72191),S=n(70320),D=n(81728),N=n(42122),I=n(72619),L=n(23780),T=n(28598);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var H=function(e){var t,n,_,x=e.cancelButtonText,P=e.contained,A=e.header,H=e.onCancel,B=e.onSaveSuccess,R=e.rootProject,U=(0,L.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),V=(0,i.Z)(U,1)[0],W=(0,o.useState)(null),G=W[0],K=W[1],F=(0,o.useState)(!1),X=F[0],Y=F[1],q=(0,O.Z)(),z=q.fetchProjects,J=q.project,Q=q.projectPlatformActivated,$=q.rootProject,ee=(0,o.useMemo)((function(){return R?$:J}),[J,$,R]),te=ee||{},ne=te.name,re=te.openai_api_key,ie=te.project_uuid,oe=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){G||K(ee)}),[ee,G]);var ce=(0,c.Db)(y.ZP.projects.useUpdate(ne),{onSuccess:function(e){return(0,I.wD)(e,{callback:function(e){var t,n=e.project;z(),K(n),Y(!1),(0,S.hY)(null==n||null===(t=n.features)||void 0===t?void 0:t[j.d.LOCAL_TIMEZONE]),B&&(null==B||B(n))},onErrorCallback:function(e,t){return V({errors:t,response:e})}})}}),se=(0,i.Z)(ce,2),le=se[0],ue=se[1].isLoading,ae=(0,o.useCallback)((function(e){return le({project:M(M({},e),{},{root_project:R})})}),[R,le]),de=(0,T.jsxs)(T.Fragment,{children:[A,(0,T.jsxs)(f.Z,{noPadding:!0,children:[(0,T.jsxs)(g.Z,{p:w.cd,children:[(0,T.jsx)(g.Z,{mb:1,children:(0,T.jsx)(d.Z,{level:5,children:"Project name"})}),(0,T.jsx)(v.ZP,{default:!0,monospace:!0,children:ne})]}),(0,T.jsx)(l.Z,{light:!0}),(0,T.jsxs)(g.Z,{p:w.cd,children:[(0,T.jsx)(g.Z,{mb:1,children:(0,T.jsx)(d.Z,{level:5,children:"Project UUID"})}),(0,T.jsx)(v.ZP,{default:!!ie,monospace:!0,muted:!ie,children:ie||"Not required"})]}),(0,T.jsx)(l.Z,{light:!0}),(0,T.jsx)(g.Z,{p:w.cd,children:(0,T.jsxs)(a.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,T.jsxs)(u.Z,{flexDirection:"column",children:[(0,T.jsx)(g.Z,{mb:1,children:(0,T.jsx)(d.Z,{level:5,children:"Help improve Mage"})}),(0,T.jsxs)(v.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,T.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,T.jsx)(g.Z,{mr:w.cd}),(0,T.jsx)(Z.Z,{checked:null==G?void 0:G.help_improve_mage,compact:!0,id:"help_improve_mage_toggle",onCheck:function(){return K((function(e){return M(M({},e),{},{help_improve_mage:!(null!=G&&G.help_improve_mage)})}))}})]})})]}),(0,T.jsx)(g.Z,{mt:w.HN}),(0,T.jsx)(h.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,T.jsx)(h.S,{description:"Every time a trigger is created or updated in this pipeline, automatically persist it in code.",title:"Save triggers in code automatically",toggleSwitch:{checked:!(null==G||null===(t=G.pipelines)||void 0===t||null===(n=t.settings)||void 0===n||null===(_=n.triggers)||void 0===_||!_.save_in_code_automatically),onCheck:function(e){return K((function(t){var n,r,i,o,c,s;return M(M({},t),{},{pipelines:M(M({},null==t?void 0:t.pipelines),{},{settings:M(M({},null==t||null===(n=t.pipelines)||void 0===n?void 0:n.settings),{},{triggers:M(M({},null==t||null===(r=t.pipelines)||void 0===r||null===(i=r.settings)||void 0===i?void 0:i.triggers),{},{save_in_code_automatically:e(null==t||null===(o=t.pipelines)||void 0===o||null===(c=o.settings)||void 0===c||null===(s=c.triggers)||void 0===s?void 0:s.save_in_code_automatically)})})})})}))}}})}),(0,T.jsx)(g.Z,{mt:w.HN}),(0,T.jsx)(f.Z,{noPadding:!0,overflowVisible:!0,children:(0,T.jsxs)(g.Z,{p:w.cd,children:[(0,T.jsx)(g.Z,{mb:1,children:(0,T.jsxs)(d.Z,{level:5,children:["Features ",(0,T.jsx)(p.Z,{bold:!0,href:"https://docs.mage.ai/development/project/features",largeSm:!0,openNewWindow:!0,children:"(docs)"})]})}),Object.entries((0,N.gR)(null==G?void 0:G.features,[j.d.CODE_BLOCK_V2,j.d.COMMAND_CENTER,j.d.COMPUTE_MANAGEMENT,j.d.CUSTOM_DESIGN,j.d.DBT_V2,j.d.GLOBAL_HOOKS,j.d.NOTEBOOK_BLOCK_OUTPUT_SPLIT_VIEW])||{}).map((function(e,t){var n=(0,i.Z)(e,2),o=n[0],c=n[1],s=Q&&!R&&(null==ee?void 0:ee.features_override)&&o in(null==ee?void 0:ee.features_override);return(0,T.jsx)(g.Z,{mt:0===t?0:1,children:(0,T.jsxs)(a.ZP,{alignItems:"center",children:[(0,T.jsxs)(u.Z,{flex:1,children:[(0,T.jsx)(Z.Z,{disabled:s,checked:!!c,compact:!0,onCheck:function(){return K((function(e){return M(M({},e),{},{features:M(M({},null==G?void 0:G.features),{},(0,r.Z)({},o,!c))})}))}}),(0,T.jsx)(g.Z,{mr:w.cd}),(0,T.jsxs)(u.Z,{children:[(0,T.jsx)(v.ZP,{default:!c,monospace:!0,children:(0,D.vg)(o)}),o===j.d.LOCAL_TIMEZONE&&(0,T.jsx)(g.Z,{ml:1,children:(0,T.jsx)(b.Z,M({},S.EB))})]})]}),s&&(0,T.jsx)(v.ZP,{monospace:!0,muted:!0,small:!0,children:"overridden"})]})},o)}))]})}),(0,T.jsx)(g.Z,{mt:w.HN}),(0,T.jsx)(f.Z,{noPadding:!0,children:(0,T.jsxs)(g.Z,{p:w.cd,children:[(0,T.jsx)(g.Z,{mb:1,children:(0,T.jsx)(d.Z,{level:5,children:"OpenAI"})}),re&&!X?(0,T.jsxs)(a.ZP,M(M({},a.A0),{},{children:[(0,T.jsx)(v.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,T.jsx)(s.ZP,{iconOnly:!0,onClick:function(){return Y(!0)},secondary:!0,title:"Edit",children:(0,T.jsx)(k.Edit,{size:C.bL})})]})):(0,T.jsx)(m.Z,{disabled:oe,label:oe?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return K((function(t){return M(M({},t),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null==G?void 0:G.openai_api_key)||""})]})}),(0,T.jsx)(g.Z,{mt:w.HN}),(0,T.jsxs)(a.ZP,{alignItems:"center",children:[(0,T.jsx)(s.ZP,{id:"save-project-settings",loading:ue,onClick:function(){var e={features:null==G?void 0:G.features,help_improve_mage:null==G?void 0:G.help_improve_mage,openai_api_key:null==G?void 0:G.openai_api_key,pipelines:null==G?void 0:G.pipelines};!0===(null==ee?void 0:ee.help_improve_mage)&&!1===(null==G?void 0:G.help_improve_mage)&&(e.deny_improve_mage=!0),ae(e)},primary:!0,children:"Save project settings"}),H&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(g.Z,{mr:w.cd}),(0,T.jsx)(s.ZP,{onClick:H,secondary:!0,children:x||"Cancel"})]})]})]});return P?(0,T.jsx)(E,{children:de}):de}},46568:function(e,t,n){"use strict";var r=n(82394),i=n(26304),o=(n(82684),n(33591)),c=n(28598),s=["children","fullHeight","gutter","style"];function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,l=e.style,a=void 0===l?{}:l,d=(0,i.Z)(e,s),p=u({},a);return r&&(p.paddingLeft=r,p.paddingRight=p.paddingLeft),n&&(p.height="100%"),(0,c.jsx)(o.Col,u(u({},d),{},{style:p,children:t}))}},82682:function(e,t,n){"use strict";var r=n(82394),i=n(26304),o=n(82684),c=n(33591),s=n(28598),l=["children","fullHeight","gutter","justifyContent","style"];function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,u=e.justifyContent,d=e.style,p=void 0===d?{}:d,f=(0,i.Z)(e,l),j=a({},p);return r&&(j.marginLeft=-1*r,j.marginRight=j.marginLeft),n&&(j.height="100%"),(0,s.jsx)(c.Row,a(a({},f),{},{justifyContent:u,style:j,children:o.Children.map(t,(function(e,t){return e&&o.cloneElement(e,{gutter:r,key:t})}))}))}},61316:function(e,t,n){"use strict";n.r(t);var r=n(77837),i=n(38860),o=n.n(i),c=n(82684),s=n(34376),l=n(46568),u=n(55729),a=n(93808),d=n(82682),p=n(28274),f=n(38276),j=n(35686),h=n(70515),g=n(24755),v=n(28598);function m(){var e=(0,s.useRouter)(),t=j.ZP.statuses.list().data,n=(0,c.useMemo)((function(){var e;return null==t||null===(e=t.statuses)||void 0===e?void 0:e[0]}),[t]);return(0,c.useEffect)((function(){null!=n&&n.is_instance_manager&&e.replace("/manage/settings")}),[null==n?void 0:n.is_instance_manager,e]),(0,v.jsx)(p.Z,{uuidItemSelected:g.HY,uuidWorkspaceSelected:g.WH,children:(0,v.jsx)(f.Z,{p:h.cd,children:(0,v.jsx)(d.Z,{justifyContent:"center",children:(0,v.jsx)(l.Z,{xl:8,xxl:6,children:(0,v.jsx)(u.Z,{})})})})})}m.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,a.Z)(m)},33323:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/preferences",function(){return n(61316)}])},80022:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},15544:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},13692:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(61049);function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,r.Z)(e,t)}},93189:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(12539),i=n(80022);function o(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[449,5699,9774,2888,179],(function(){return t=33323,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6875],{2591:function(n,r,u){"use strict";u.r(r);var t=u(77837),e=u(38860),s=u.n(e),i=u(93808),a=u(17022),c=u(28598);function o(n){var r=n.slug;return(0,c.jsx)(a.Z,{slug:r})}o.getInitialProps=function(){var n=(0,t.Z)(s().mark((function n(r){var u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.query.slug,n.abrupt("return",{slug:null==u?void 0:u[0]});case 2:case"end":return n.stop()}}),n)})));return function(r){return n.apply(this,arguments)}}(),r.default=(0,i.Z)(o)},44981:function(n,r,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/roles/[...slug]",function(){return u(2591)}])}},function(n){n.O(0,[1557,5699,1376,9774,2888,179],(function(){return r=44981,n(n.s=r);var r}));var r=n.O();_N_E=r}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6875],{2591:function(n,r,u){"use strict";u.r(r);var t=u(77837),e=u(38860),s=u.n(e),i=u(93808),a=u(17022),c=u(28598);function o(n){var r=n.slug;return(0,c.jsx)(a.Z,{slug:r})}o.getInitialProps=function(){var n=(0,t.Z)(s().mark((function n(r){var u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.query.slug,n.abrupt("return",{slug:null==u?void 0:u[0]});case 2:case"end":return n.stop()}}),n)})));return function(r){return n.apply(this,arguments)}}(),r.default=(0,i.Z)(o)},44981:function(n,r,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/roles/[...slug]",function(){return u(2591)}])}},function(n){n.O(0,[449,5699,1376,9774,2888,179],(function(){return r=44981,n(n.s=r);var r}));var r=n.O();_N_E=r}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2344],{53795:function(e,n,r){"use strict";r.r(n);var s=r(77837),t=r(75582),o=r(38860),i=r.n(o),u=r(21764),c=r(82684),a=r(83455),l=r(34376),d=r(71180),p=r(15338),f=r(55485),h=r(48670),m=r(63637),x=r(93808),j=r(17022),k=r(28274),w=r(38276),Z=r(75499),b=r(30160),g=r(12468),_=r(35686),v=r(70515),C=r(24755),P=r(3917),I=r(76417),T=r(72619),A=r(95924),O=r(28598);function E(){var e=(0,l.useRouter)(),n=(0,c.useState)(!1),r=n[0],s=n[1],o=_.ZP.roles.list().data,i=(0,c.useMemo)((function(){return(null==o?void 0:o.roles)||[]}),[o]),x=[{bold:!r,label:function(){return"Roles"}}];r?(x[0].onClick=function(){return s(!1)},x.push({bold:!0,label:function(){return"New role"}})):x[0].linkProps={href:"/settings/workspace/roles"};var E=(0,a.Db)(_.ZP.seeds.useCreate(),{onSuccess:function(e){return(0,T.wD)(e,{callback:function(){u.Am.success("Started creating default roles and permissions. Check back later to see the roles.",{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:"seed-create-success"})},onErrorCallback:function(e){var n=e.error,r=n.errors,s=n.exception,t=n.message,o=n.type;u.Am.error((null==r?void 0:r.error)||s||t,{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),N=(0,t.Z)(E,2),S=N[0],R=N[1].isLoading;return(0,O.jsxs)(k.Z,{appendBreadcrumbs:!0,breadcrumbs:x,title:"Roles",uuidItemSelected:C.B2.ROLES,uuidWorkspaceSelected:C.Pl.USER_MANAGEMENT,children:[r&&(0,O.jsx)(j.Z,{contained:!0,onCancel:function(){return s(!1)}}),!r&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(w.Z,{p:v.cd,children:(0,O.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,O.jsx)(d.ZP,{beforeIcon:(0,O.jsx)(m.Z,{}),onClick:function(){return s(!0)},primary:!0,children:"Add new role"}),(0,O.jsx)(w.Z,{mr:v.cd}),(0,O.jsx)(g.Z,{appearBefore:!0,fullSize:!0,description:(0,O.jsxs)(b.ZP,{default:!0,children:["This will create 6 roles and 100s of permissions",(0,O.jsx)("br",{}),"that Mage normally uses when user defined",(0,O.jsx)("br",{}),"permissions isn’t turned on."]}),lightBackground:!0,widthFitContent:!0,children:(0,O.jsx)(d.ZP,{compact:!0,loading:R,onClick:function(){return S({seed:{permissions:!0,roles:!0}})},secondary:!0,small:!0,children:"Create default roles and permissions"})})]})}),(0,O.jsx)(p.Z,{light:!0}),(0,O.jsx)(Z.Z,{columnFlex:[1,1,1,null],columns:[{uuid:"Role"},{uuid:"Created by"},{uuid:"Last updated"},{rightAligned:!0,uuid:"Created at"}],onClickRow:function(n){var r,s=null===(r=i[n])||void 0===r?void 0:r.id;e.push("/settings/workspace/roles/".concat(s))},rows:null==i?void 0:i.map((function(n){var r=n.created_at,s=(n.id,n.name),t=n.updated_at,o=n.user;return[(0,O.jsx)(b.ZP,{children:s},"name"),o?(0,O.jsx)(h.Z,{default:!0,onClick:function(n){(0,A.j)(n),e.push("/settings/workspace/users/".concat(null==o?void 0:o.id))},children:(0,I.s)(o)}):(0,O.jsx)("div",{},"user"),(0,O.jsx)(b.ZP,{monospace:!0,default:!0,children:t&&(0,P.d$)(t)},"updatedAt"),(0,O.jsx)(b.ZP,{monospace:!0,default:!0,rightAligned:!0,children:r&&(0,P.d$)(r)},"createdAt")]})),uuid:"roles"})]})]})}E.getInitialProps=(0,s.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,x.Z)(E)},8619:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/roles",function(){return r(53795)}])}},function(e){e.O(0,[1557,5699,1376,9774,2888,179],(function(){return n=8619,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2344],{53795:function(e,n,r){"use strict";r.r(n);var s=r(77837),t=r(75582),o=r(38860),i=r.n(o),u=r(21764),c=r(82684),a=r(83455),l=r(34376),d=r(71180),p=r(15338),f=r(55485),h=r(48670),m=r(63637),x=r(93808),j=r(17022),k=r(28274),w=r(38276),Z=r(75499),b=r(30160),g=r(12468),_=r(35686),v=r(70515),C=r(24755),P=r(3917),I=r(76417),T=r(72619),A=r(95924),O=r(28598);function E(){var e=(0,l.useRouter)(),n=(0,c.useState)(!1),r=n[0],s=n[1],o=_.ZP.roles.list().data,i=(0,c.useMemo)((function(){return(null==o?void 0:o.roles)||[]}),[o]),x=[{bold:!r,label:function(){return"Roles"}}];r?(x[0].onClick=function(){return s(!1)},x.push({bold:!0,label:function(){return"New role"}})):x[0].linkProps={href:"/settings/workspace/roles"};var E=(0,a.Db)(_.ZP.seeds.useCreate(),{onSuccess:function(e){return(0,T.wD)(e,{callback:function(){u.Am.success("Started creating default roles and permissions. Check back later to see the roles.",{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:"seed-create-success"})},onErrorCallback:function(e){var n=e.error,r=n.errors,s=n.exception,t=n.message,o=n.type;u.Am.error((null==r?void 0:r.error)||s||t,{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),N=(0,t.Z)(E,2),S=N[0],R=N[1].isLoading;return(0,O.jsxs)(k.Z,{appendBreadcrumbs:!0,breadcrumbs:x,title:"Roles",uuidItemSelected:C.B2.ROLES,uuidWorkspaceSelected:C.Pl.USER_MANAGEMENT,children:[r&&(0,O.jsx)(j.Z,{contained:!0,onCancel:function(){return s(!1)}}),!r&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(w.Z,{p:v.cd,children:(0,O.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,O.jsx)(d.ZP,{beforeIcon:(0,O.jsx)(m.Z,{}),onClick:function(){return s(!0)},primary:!0,children:"Add new role"}),(0,O.jsx)(w.Z,{mr:v.cd}),(0,O.jsx)(g.Z,{appearBefore:!0,fullSize:!0,description:(0,O.jsxs)(b.ZP,{default:!0,children:["This will create 6 roles and 100s of permissions",(0,O.jsx)("br",{}),"that Mage normally uses when user defined",(0,O.jsx)("br",{}),"permissions isn’t turned on."]}),lightBackground:!0,widthFitContent:!0,children:(0,O.jsx)(d.ZP,{compact:!0,loading:R,onClick:function(){return S({seed:{permissions:!0,roles:!0}})},secondary:!0,small:!0,children:"Create default roles and permissions"})})]})}),(0,O.jsx)(p.Z,{light:!0}),(0,O.jsx)(Z.Z,{columnFlex:[1,1,1,null],columns:[{uuid:"Role"},{uuid:"Created by"},{uuid:"Last updated"},{rightAligned:!0,uuid:"Created at"}],onClickRow:function(n){var r,s=null===(r=i[n])||void 0===r?void 0:r.id;e.push("/settings/workspace/roles/".concat(s))},rows:null==i?void 0:i.map((function(n){var r=n.created_at,s=(n.id,n.name),t=n.updated_at,o=n.user;return[(0,O.jsx)(b.ZP,{children:s},"name"),o?(0,O.jsx)(h.Z,{default:!0,onClick:function(n){(0,A.j)(n),e.push("/settings/workspace/users/".concat(null==o?void 0:o.id))},children:(0,I.s)(o)}):(0,O.jsx)("div",{},"user"),(0,O.jsx)(b.ZP,{monospace:!0,default:!0,children:t&&(0,P.d$)(t)},"updatedAt"),(0,O.jsx)(b.ZP,{monospace:!0,default:!0,rightAligned:!0,children:r&&(0,P.d$)(r)},"createdAt")]})),uuid:"roles"})]})]})}E.getInitialProps=(0,s.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,x.Z)(E)},8619:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/roles",function(){return r(53795)}])}},function(e){e.O(0,[449,5699,1376,9774,2888,179],(function(){return n=8619,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2403],{79264:function(e,n,t){"use strict";var i=t(82394),r=t(75582),l=t(82684),s=t(21764),o=t(46568),c=t(97618),a=t(68562),u=t(82682),d=t(30160),h=t(17488),p=t(36300),f=t(72473),b=t(31748),y=t(79633),m=t(70515),j=t(72619),g=t(33834),v=t(83455),x=t(35686),Z=t(28598);n.Z=function(e){var n=e.copyText,t=e.deleteVariable,_=e.disableKeyEdit,w=e.editStateInit,O=void 0!==w&&w,k=e.fetchVariables,P=e.focusKey,C=e.hideEdit,S=e.obfuscate,T=e.onEnterCallback,I=e.onEscapeCallback,E=e.pipelineUUID,M=e.updateVariable,D=e.variable||{},q=D.uuid,G=D.value,N=(0,l.useRef)(null),H=(0,l.useRef)(null),A=(0,l.useState)(!1),R=A[0],W=A[1],z=(0,l.useState)(q),L=z[0],U=z[1],V=(0,l.useState)(G),B=V[0],F=V[1],Y=(0,l.useState)(O),J=Y[0],K=Y[1],X=(0,v.Db)(x.ZP.variables.pipelines.useUpdate(E,q),{onSuccess:function(e){return(0,j.wD)(e,{callback:function(){K(!1),k()}})}}),$=(0,r.Z)(X,1)[0],Q=(0,l.useCallback)((function(e){if("Enter"===e.key){var n=B;try{n=JSON.parse(B)}catch(e){}M?L&&B&&(null==M||M((0,i.Z)({},L,B)),K(!1)):$({variable:{name:L,value:n}}),(0,g.ez)(),null==T||T()}else"Escape"===e.key&&((0,g.ez)(),K(!1),null==I||I())}),[T,I,M,$,L,B]),ee=(0,l.useCallback)((function(){(0,g.ez)(),t()}),[t]);(0,l.useEffect)((function(){var e,n;J&&(P?null==N||null===(e=N.current)||void 0===e||e.focus():null==H||null===(n=H.current)||void 0===n||n.focus())}),[J,P]);var ne=n||"kwargs['".concat(q,"']");return(0,Z.jsx)("div",{onMouseEnter:function(){return W(!0)},onMouseLeave:function(){return W(!1)},children:(0,Z.jsxs)(u.Z,{children:[(0,Z.jsx)(o.Z,{hiddenSmDown:!0,md:1,children:(0,Z.jsx)(p.qZ,{noPadding:!0,children:(0,Z.jsx)(a.ZP,{backgroundColor:b.qJ,borderless:!0,centerText:!0,muted:!0,onClick:function(){navigator.clipboard.writeText(ne),s.Am.success("Successfully copied to clipboard.",{position:s.Am.POSITION.BOTTOM_RIGHT,toastId:q})},small:!0,uuid:"Sidekick/GlobalVariables/".concat(q),withIcon:!0,children:(0,Z.jsx)(f.Copy,{size:2.5*m.iI})})})}),(0,Z.jsx)(o.Z,{md:S?9:4,children:J&&!_?(0,Z.jsx)(p.qZ,{children:(0,Z.jsx)(h.Z,{borderless:!0,compact:!0,fullWidth:!0,monospace:!0,onChange:function(e){U(e.target.value),e.preventDefault()},onKeyDown:Q,paddingHorizontal:0,placeholder:"variable",ref:N,small:!0,value:L})}):(0,Z.jsx)(p.qZ,{children:(0,Z.jsx)(d.ZP,{color:y.Or,monospace:!0,small:!0,title:q,children:q})})}),(0,Z.jsx)(o.Z,{md:S?2:7,children:J?(0,Z.jsx)(p.qZ,{children:(0,Z.jsx)(h.Z,{borderless:!0,compact:!0,fullWidth:!0,monospace:!0,onChange:function(e){F(e.target.value),e.preventDefault()},onKeyDown:Q,paddingHorizontal:0,placeholder:"enter value",ref:H,small:!0,value:B})}):(0,Z.jsxs)(p.qZ,{children:[S?(0,Z.jsx)(d.ZP,{monospace:!0,small:!0,children:R?"*":"*******"}):(0,Z.jsx)(d.ZP,{monospace:!0,small:!0,title:G.toString(),children:G.toString()}),(0,Z.jsxs)(c.Z,{children:[!C&&R&&(0,Z.jsx)(a.ZP,{backgroundColor:b.qJ,borderless:!0,inline:!0,muted:!0,onClick:function(){K(!0)},small:!0,uuid:"Sidekick/GlobalVariables/edit_".concat(q),withIcon:!0,children:(0,Z.jsx)(f.Edit,{size:2.5*m.iI})}),t&&R&&(0,Z.jsx)(a.ZP,{backgroundColor:b.qJ,borderless:!0,inline:!0,muted:!0,onClick:ee,small:!0,uuid:"Sidekick/GlobalVariables/delete_".concat(q),withIcon:!0,children:(0,Z.jsx)(f.Trash,{size:2.5*m.iI})})]})]})})]})})}},36300:function(e,n,t){"use strict";t.d(n,{kA:function(){return a},qZ:function(){return u}});var i=t(9518),r=t(2842),l=t(4982),s=t(61896),o=t(47041),c=t(70515),a=(c.iI,l.O$,c.iI,s.dN,i.default.div.withConfig({displayName:"indexstyle__SidekickContainerStyle",componentId:"sc-cr39lf-0"})(["height:calc(100vh - ","px - ","px);width:fit-content;",""],r.Wi,o.nn,(function(e){return e.fullWidth&&"\n width: 100%;\n "})),i.default.div.withConfig({displayName:"indexstyle__PaddingContainerStyle",componentId:"sc-cr39lf-1"})(["padding:","px;",""],2*c.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "})),i.default.table.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-cr39lf-2"})(["",""],(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")}))),u=i.default.td.withConfig({displayName:"indexstyle__CellStyle",componentId:"sc-cr39lf-3"})(["display:flex;align-items:center;justify-content:space-between;border:1px solid #1C1C1C;height:100%;",""],(function(e){return!e.noPadding&&"\n padding: 0 ".concat(2*c.iI,"px;\n ")}))},46568:function(e,n,t){"use strict";var i=t(82394),r=t(26304),l=(t(82684),t(33591)),s=t(28598),o=["children","fullHeight","gutter","style"];function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,i=e.gutter,c=e.style,u=void 0===c?{}:c,d=(0,r.Z)(e,o),h=a({},u);return i&&(h.paddingLeft=i,h.paddingRight=h.paddingLeft),t&&(h.height="100%"),(0,s.jsx)(l.Col,a(a({},d),{},{style:h,children:n}))}},82682:function(e,n,t){"use strict";var i=t(82394),r=t(26304),l=t(82684),s=t(33591),o=t(28598),c=["children","fullHeight","gutter","justifyContent","style"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,i=e.gutter,a=e.justifyContent,d=e.style,h=void 0===d?{}:d,p=(0,r.Z)(e,c),f=u({},h);return i&&(f.marginLeft=-1*i,f.marginRight=f.marginLeft),t&&(f.height="100%"),(0,o.jsx)(s.Row,u(u({},p),{},{justifyContent:a,style:f,children:l.Children.map(n,(function(e,n){return e&&l.cloneElement(e,{gutter:i,key:n})}))}))}},60480:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return F}});var i,r=t(77837),l=t(82394),s=t(75582),o=t(38860),c=t.n(o),a=t(82684),u=t(12691),d=t.n(u),h=t(21764),p=t(83455),f=t(71180),b=t(90299),y=t(70652),m=t(50724),j=t(15338),g=t(82555),v=t(55485),x=t(85854),Z=t(48670),_=t(93808),w=t(44085),O=t(28274),k=t(38276);!function(e){e.SSH="ssh",e.HTTPS="https"}(i||(i={}));var P=[{autoComplete:"remote_repo_link",label:"Remote repo url",required:!0,uuid:"remote_repo_link"},{autoComplete:"repo_path",label:"Local directory path",labelDescription:"Defaults to Python's os.getcwd() if omitted. Mage will create this local directory if it doesn't already exist.",uuid:"repo_path"}],C=[{autoComplete:"username",label:"Username",uuid:"username"},{autoComplete:"email",label:"Email",uuid:"email"},{autoComplete:"ssh_public_key",label:"SSH public key in base64",type:"password",uuid:"ssh_public_key"},{autoComplete:"ssh_private_key",label:"SSH private key in base64",type:"password",uuid:"ssh_private_key"}],S=[{autoComplete:"username",label:"Username",required:!0,uuid:"username"},{autoComplete:"email",label:"Email",required:!0,uuid:"email"},{autoComplete:"access_token",label:"Access token",labelDescription:"Add your Git access token to authenticate with your provided username. The access token will be stored as a Mage secret. You will see the secret below if you have already added it.",required:!0,type:"password",uuid:"access_token"}],T=[{autoComplete:"branch",label:"Branch name",required:!0,uuid:"branch"}],I=t(30160),E=t(17488),M=t(79264),D=t(35686),q=t(70515),G=t(24755),N=t(15610),H=t(72619),A=t(69419),R=t(28598);function W(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?W(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):W(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var L={label:function(){return"One-way Git Sync"},uuid:"git_sync"},U={label:function(){return"Git Actions"},uuid:"git_integration"},V=[L,U];function B(){var e=D.ZP.syncs.list(),n=e.data,t=e.mutate,r=(0,a.useState)(null),o=r[0],c=r[1],u=(0,a.useState)(null),_=u[0],W=u[1],B=(0,a.useState)(null),F=B[0],Y=B[1];(0,a.useEffect)((function(){if(n){var e,t=null==n||null===(e=n.syncs)||void 0===e?void 0:e[0];W(null==t?void 0:t.user_git_settings),c(t)}}),[n]);var J=(0,a.useMemo)((function(){if(n){var e,t=null==n||null===(e=n.syncs)||void 0===e?void 0:e[0];return!(null==t||!t.branch)}return!1}),[n]),K=D.ZP.git_branches.detail("test",{_format:"with_basic_details"},{revalidateOnFocus:!1}),X=K.data,$=(K.mutate,(0,a.useMemo)((function(){return(null==X?void 0:X.git_branch)||{}}),[X]).is_git_integration_enabled),Q=(0,p.Db)(D.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){var n=e.sync;n&&(c(n),window.location.reload(),h.Am.success("Sync saved",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"}))},onErrorCallback:function(e,n){return Y({errors:n,response:e})}})}}),ee=(0,s.Z)(Q,2),ne=ee[0],te=ee[1].isLoading,ie=(0,p.Db)(D.ZP.syncs.useUpdate("git"),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){e.sync&&h.Am.success("Success!",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"})},onErrorCallback:function(e,n){return Y({errors:n,response:e})}})}}),re=(0,s.Z)(ie,2),le=re[0],se=re[1].isLoading,oe=(0,p.Db)((function(e){return D.ZP.secrets.useDelete(e)()}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(){t()},onErrorCallback:function(e){var n=e.error,t=(n.errors,n.message);setErrorMessages((function(e){return e.concat(t)}))}})}}),ce=(0,s.Z)(oe,1)[0],ae=(0,a.useMemo)((function(){return(null==o?void 0:o.auth_type)||i.SSH}),[null==o?void 0:o.auth_type]),ue=(0,a.useMemo)((function(){return ae===i.HTTPS?S:C}),[ae]),de=D.ZP.statuses.list().data,he=(0,a.useMemo)((function(){var e,n;return null==de||null===(e=de.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.require_user_authentication}),[de]),pe=(0,a.useMemo)((function(){return V}),[]),fe=(0,a.useState)(),be=fe[0],ye=fe[1];(0,a.useEffect)((function(){be||ye($?U:L)}),[$,be]);var me=(0,a.useMemo)((function(){var e,n=c,t=o;(null==be?void 0:be.uuid)===U.uuid&&he&&(n=W,t=_);var i=Object.entries(t||{}).filter((function(e){var n=(0,s.Z)(e,2),t=n[0],i=n[1];return t.endsWith("_secret_name")&&!!i}));return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("form",{children:ue.map((function(e){var i,r,s=e.autoComplete,o=e.disabled,c=e.label,a=e.labelDescription,u=e.required,d=e.type,p=e.uuid;return r="ssh_public_key"===p?(0,R.jsx)(k.Z,{mb:1,children:(0,R.jsxs)(I.ZP,{small:!0,children:["Run ",(0,R.jsx)(Z.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n && echo"),h.Am.success("Successfully copied to clipboard.",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n && echo"})," in terminal to get base64 encoded public key and paste the result here. The key will be stored as a Mage secret. You will see the secret below if you have already added it."]})}):"ssh_private_key"===p?(0,R.jsx)(k.Z,{mb:1,children:(0,R.jsxs)(I.ZP,{small:!0,children:["Follow same steps as the public key, but run ",(0,R.jsx)(Z.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"),h.Am.success("Successfully copied to clipboard.",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"})," instead. The key will be stored as a Mage secret. You will see the secret below if you have already added it."]})}):a&&(0,R.jsx)(k.Z,{mb:1,children:(0,R.jsx)(I.ZP,{small:!0,children:a})}),(0,R.jsxs)(k.Z,{mt:2,children:[r,(0,R.jsx)(E.Z,{autoComplete:s,disabled:o,label:c,onChange:function(e){n((function(n){return z(z({},n),{},(0,l.Z)({},p,e.target.value))}))},primary:!0,required:u,setContentOnMount:!0,type:d,value:(null===(i=t)||void 0===i?void 0:i[p])||""})]},p)}))}),(0,R.jsx)(k.Z,{mb:1,mt:q.Mq,children:(0,R.jsx)(x.Z,{level:5,children:"Git secrets"})}),i&&i.length>0?i.map((function(e){var n=(0,s.Z)(e,2),t=(n[0],n[1]);return(0,R.jsx)(M.Z,{deleteVariable:function(){return ce(t)},hideEdit:!0,obfuscate:!0,variable:{uuid:t,value:"placeholder"}},t)})):(0,R.jsxs)(I.ZP,{children:["You have no Git secrets saved for ",null==be||null===(e=be.label)||void 0===e?void 0:e.call(be)]})]})}),[ue,ce,he,be,W,c,o,_]),je=(0,A.iV)();(0,a.useEffect)((function(){null!=je&&je.tab&&ye(pe.find((function(e){return e.uuid===(null==je?void 0:je.tab)})))}),[je,pe]);var ge=(0,a.useMemo)((function(){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(k.Z,{mt:q.Mq,children:[(0,R.jsxs)(I.ZP,{inline:!0,children:["To learn more about One-way git sync, click"," "]}),(0,R.jsx)(Z.Z,{bold:!0,href:"https://docs.mage.ai/production/data-sync/git-sync",openNewWindow:!0,children:"here"})]}),(0,R.jsx)(k.Z,{mt:q.Mq,children:(0,R.jsx)(I.ZP,{bold:!0,children:"Sync with a specified branch. These settings will be saved at the project level."})}),(0,R.jsx)("form",{children:T.map((function(e){var n=e.autoComplete,t=e.disabled,i=e.label,r=e.required,s=e.type,a=e.uuid;return(0,R.jsx)(k.Z,{mt:2,children:(0,R.jsx)(E.Z,{autoComplete:n,disabled:t,label:i,onChange:function(e){c((function(n){return z(z({},n),{},(0,l.Z)({},a,e.target.value))}))},primary:!0,required:r,setContentOnMount:!0,type:s,value:(null==o?void 0:o[a])||""})},a)}))}),(0,R.jsx)(v.ZP,{alignItems:"center",children:(0,R.jsx)(k.Z,{mt:2,children:(0,R.jsx)(y.Z,{checked:null==o?void 0:o.sync_submodules,label:"Include submodules",onClick:function(){c((function(e){return z(z({},e),{},{sync_submodules:!(null!=o&&o.sync_submodules)})}))}})})}),(0,R.jsx)(k.Z,{mt:2,children:(0,R.jsx)(x.Z,{level:5,children:"Additional sync settings"})}),(0,R.jsx)(v.ZP,{alignItems:"center",children:(0,R.jsx)(k.Z,{mt:2,children:(0,R.jsx)(y.Z,{checked:null==o?void 0:o.sync_on_pipeline_run,label:"Sync before each trigger run",onClick:function(){c((function(e){return z(z({},e),{},{sync_on_pipeline_run:!(null!=o&&o.sync_on_pipeline_run)})}))}})})}),(0,R.jsx)(v.ZP,{alignItems:"center",children:(0,R.jsx)(k.Z,{mt:2,children:(0,R.jsx)(y.Z,{checked:null==o?void 0:o.sync_on_start,label:"Sync on server start up",onClick:function(){c((function(e){return z(z({},e),{},{sync_on_start:!(null!=o&&o.sync_on_start)})}))}})})}),(0,R.jsx)(k.Z,{mt:q.Mq,children:(0,R.jsx)(I.ZP,{bold:!0,children:"Configure the Git authentication credentials that will be used to sync with the specified Git repository."})}),me]})}),[o,me]),ve=(0,a.useMemo)((function(){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(k.Z,{mt:q.Mq,children:[!$&&(0,R.jsx)(k.Z,{mb:1,children:(0,R.jsx)(I.ZP,{bold:!0,warning:!0,children:"When One-way git sync is enabled, you will be unable to access the Git Actions modal. If you want to bypass this safeguard, set the GIT_ENABLE_GIT_INTEGRATION environment variable."})}),(0,R.jsxs)(I.ZP,{bold:!0,children:["We recommend using the ",(0,R.jsx)(d(),{as:"/version-control",href:"/version-control",children:(0,R.jsx)(Z.Z,{bold:!0,inline:!0,children:"version control app"})})," unless you have a specific need to use the Git Actions modal."]})]}),(0,R.jsx)(k.Z,{mt:q.Mq,children:(0,R.jsx)(I.ZP,{children:"These fields are required to help Mage configure your Git settings. These settings will be specific to your user."})}),me]})}),[$,me]);return(0,R.jsx)(O.Z,{uuidItemSelected:G.fF,uuidWorkspaceSelected:G.WH,children:(0,R.jsxs)(k.Z,{p:q.cd,style:{width:"600px"},children:[(0,R.jsx)(x.Z,{children:"Git repository settings"}),(0,R.jsx)(k.Z,{mt:1,children:(0,R.jsx)(I.ZP,{bold:!0,children:"Authentication type"})}),(0,R.jsx)(k.Z,{mt:1,children:(0,R.jsx)(w.Z,{compact:!0,label:"Authentication type",onChange:function(e){var n=e.target.value;c((function(e){return z(z({},e),{},{auth_type:n})}))},value:ae,children:Object.entries(i).map((function(e){var n=(0,s.Z)(e,2),t=n[0],i=n[1];return(0,R.jsx)("option",{value:i,children:t},i)}))})}),(0,R.jsx)(k.Z,{mt:q.Mq,children:ae===i.SSH&&(0,R.jsxs)(I.ZP,{bold:!0,children:["You will need to ",(0,R.jsx)(Z.Z,{href:"https://docs.mage.ai/development/git/configure#generate-ssh-token",openNewWindow:!0,children:"set up your SSH key"})," if you have not done so already."]})}),(0,R.jsx)("form",{children:P.map((function(e){var n=e.autoComplete,t=e.disabled,i=e.label,r=e.labelDescription,s=e.required,a=e.type,u=e.uuid;return(0,R.jsxs)(k.Z,{mt:2,children:[r&&(0,R.jsx)(k.Z,{mb:1,children:(0,R.jsx)(I.ZP,{small:!0,children:r})}),(0,R.jsx)(E.Z,{autoComplete:n,disabled:t,label:i,onChange:function(e){c((function(n){return z(z({},n),{},(0,l.Z)({},u,e.target.value))}))},primary:!0,required:s,setContentOnMount:!0,type:a,value:(null==o?void 0:o[u])||""})]},u)}))}),(0,R.jsx)(k.Z,{mt:q.Mq,children:(0,R.jsx)(j.Z,{light:!0})}),(0,R.jsx)(b.Z,{onClickTab:function(e){var n=e.uuid;(0,N.u)({tab:n})},selectedTabUUID:null==be?void 0:be.uuid,tabs:pe,underlineStyle:!0}),(0,R.jsx)(j.Z,{light:!0}),(0,R.jsxs)(k.Z,{ml:2,children:[L.uuid===(null==be?void 0:be.uuid)&&ge,U.uuid===(null==be?void 0:be.uuid)&&ve]}),(0,R.jsx)(k.Z,{mt:q.HN,children:(0,R.jsx)(f.ZP,{loading:te,onClick:function(){return ne({sync:z(z({},o),{},{user_git_settings:_})})},primary:!0,children:"Save repository settings"})}),F&&(0,R.jsx)(m.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==Y?void 0:Y(null)},children:(0,R.jsx)(g.Z,z(z({},F),{},{onClose:function(){return null==Y?void 0:Y(null)}}))}),J&&(0,R.jsxs)(k.Z,{mt:q.HN,children:[(0,R.jsx)(x.Z,{children:"Synchronize code from remote repository"}),(0,R.jsxs)(k.Z,{mt:1,children:[(0,R.jsxs)(I.ZP,{children:["Running the sync from this page will run a one time sync with the remote repository.",(0,R.jsx)("br",{}),"This may ",(0,R.jsx)(I.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," your existing data, so make sure you’ve committed or backed up your current changes."]}),(0,R.jsx)(k.Z,{mt:2}),(0,R.jsxs)(I.ZP,{children:["Reset will tell Mage to try to clone your repository from remote. This will also ",(0,R.jsx)(I.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," all your local changes and reset any settings you may have configured for your local Git repo. This may be helpful if you are having issues syncing your repository."]})]}),(0,R.jsx)(k.Z,{mt:2,children:(0,R.jsxs)(v.ZP,{children:[(0,R.jsx)(f.ZP,{loading:se,onClick:function(){return le({sync:{action_type:"sync_data"}})},warning:!0,children:"Synchronize code"}),(0,R.jsx)(k.Z,{ml:2}),(0,R.jsx)(f.ZP,{danger:!0,loading:se,onClick:function(){return le({sync:{action_type:"reset"}})},children:"Reset repository"})]})})]})]})})}B.getInitialProps=(0,r.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var F=(0,_.Z)(B)},37056:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/sync-data",function(){return t(60480)}])}},function(e){e.O(0,[125,1799,140,1557,5699,8095,4982,9774,2888,179],(function(){return n=37056,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2403],{79264:function(e,n,t){"use strict";var i=t(82394),r=t(75582),l=t(82684),s=t(21764),o=t(46568),c=t(97618),a=t(68562),u=t(82682),d=t(30160),h=t(17488),p=t(36300),f=t(72473),b=t(31748),y=t(79633),m=t(70515),j=t(72619),g=t(33834),v=t(83455),x=t(35686),Z=t(28598);n.Z=function(e){var n=e.copyText,t=e.deleteVariable,_=e.disableKeyEdit,w=e.editStateInit,O=void 0!==w&&w,k=e.fetchVariables,P=e.focusKey,C=e.hideEdit,S=e.obfuscate,T=e.onEnterCallback,I=e.onEscapeCallback,E=e.pipelineUUID,M=e.updateVariable,D=e.variable||{},q=D.uuid,G=D.value,N=(0,l.useRef)(null),H=(0,l.useRef)(null),A=(0,l.useState)(!1),R=A[0],W=A[1],z=(0,l.useState)(q),L=z[0],U=z[1],V=(0,l.useState)(G),B=V[0],F=V[1],Y=(0,l.useState)(O),J=Y[0],K=Y[1],X=(0,v.Db)(x.ZP.variables.pipelines.useUpdate(E,q),{onSuccess:function(e){return(0,j.wD)(e,{callback:function(){K(!1),k()}})}}),$=(0,r.Z)(X,1)[0],Q=(0,l.useCallback)((function(e){if("Enter"===e.key){var n=B;try{n=JSON.parse(B)}catch(e){}M?L&&B&&(null==M||M((0,i.Z)({},L,B)),K(!1)):$({variable:{name:L,value:n}}),(0,g.ez)(),null==T||T()}else"Escape"===e.key&&((0,g.ez)(),K(!1),null==I||I())}),[T,I,M,$,L,B]),ee=(0,l.useCallback)((function(){(0,g.ez)(),t()}),[t]);(0,l.useEffect)((function(){var e,n;J&&(P?null==N||null===(e=N.current)||void 0===e||e.focus():null==H||null===(n=H.current)||void 0===n||n.focus())}),[J,P]);var ne=n||"kwargs['".concat(q,"']");return(0,Z.jsx)("div",{onMouseEnter:function(){return W(!0)},onMouseLeave:function(){return W(!1)},children:(0,Z.jsxs)(u.Z,{children:[(0,Z.jsx)(o.Z,{hiddenSmDown:!0,md:1,children:(0,Z.jsx)(p.qZ,{noPadding:!0,children:(0,Z.jsx)(a.ZP,{backgroundColor:b.qJ,borderless:!0,centerText:!0,muted:!0,onClick:function(){navigator.clipboard.writeText(ne),s.Am.success("Successfully copied to clipboard.",{position:s.Am.POSITION.BOTTOM_RIGHT,toastId:q})},small:!0,uuid:"Sidekick/GlobalVariables/".concat(q),withIcon:!0,children:(0,Z.jsx)(f.Copy,{size:2.5*m.iI})})})}),(0,Z.jsx)(o.Z,{md:S?9:4,children:J&&!_?(0,Z.jsx)(p.qZ,{children:(0,Z.jsx)(h.Z,{borderless:!0,compact:!0,fullWidth:!0,monospace:!0,onChange:function(e){U(e.target.value),e.preventDefault()},onKeyDown:Q,paddingHorizontal:0,placeholder:"variable",ref:N,small:!0,value:L})}):(0,Z.jsx)(p.qZ,{children:(0,Z.jsx)(d.ZP,{color:y.Or,monospace:!0,small:!0,title:q,children:q})})}),(0,Z.jsx)(o.Z,{md:S?2:7,children:J?(0,Z.jsx)(p.qZ,{children:(0,Z.jsx)(h.Z,{borderless:!0,compact:!0,fullWidth:!0,monospace:!0,onChange:function(e){F(e.target.value),e.preventDefault()},onKeyDown:Q,paddingHorizontal:0,placeholder:"enter value",ref:H,small:!0,value:B})}):(0,Z.jsxs)(p.qZ,{children:[S?(0,Z.jsx)(d.ZP,{monospace:!0,small:!0,children:R?"*":"*******"}):(0,Z.jsx)(d.ZP,{monospace:!0,small:!0,title:G.toString(),children:G.toString()}),(0,Z.jsxs)(c.Z,{children:[!C&&R&&(0,Z.jsx)(a.ZP,{backgroundColor:b.qJ,borderless:!0,inline:!0,muted:!0,onClick:function(){K(!0)},small:!0,uuid:"Sidekick/GlobalVariables/edit_".concat(q),withIcon:!0,children:(0,Z.jsx)(f.Edit,{size:2.5*m.iI})}),t&&R&&(0,Z.jsx)(a.ZP,{backgroundColor:b.qJ,borderless:!0,inline:!0,muted:!0,onClick:ee,small:!0,uuid:"Sidekick/GlobalVariables/delete_".concat(q),withIcon:!0,children:(0,Z.jsx)(f.Trash,{size:2.5*m.iI})})]})]})})]})})}},36300:function(e,n,t){"use strict";t.d(n,{kA:function(){return a},qZ:function(){return u}});var i=t(9518),r=t(2842),l=t(4982),s=t(61896),o=t(47041),c=t(70515),a=(c.iI,l.O$,c.iI,s.dN,i.default.div.withConfig({displayName:"indexstyle__SidekickContainerStyle",componentId:"sc-cr39lf-0"})(["height:calc(100vh - ","px - ","px);width:fit-content;",""],r.Wi,o.nn,(function(e){return e.fullWidth&&"\n width: 100%;\n "})),i.default.div.withConfig({displayName:"indexstyle__PaddingContainerStyle",componentId:"sc-cr39lf-1"})(["padding:","px;",""],2*c.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "})),i.default.table.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-cr39lf-2"})(["",""],(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")}))),u=i.default.td.withConfig({displayName:"indexstyle__CellStyle",componentId:"sc-cr39lf-3"})(["display:flex;align-items:center;justify-content:space-between;border:1px solid #1C1C1C;height:100%;",""],(function(e){return!e.noPadding&&"\n padding: 0 ".concat(2*c.iI,"px;\n ")}))},46568:function(e,n,t){"use strict";var i=t(82394),r=t(26304),l=(t(82684),t(33591)),s=t(28598),o=["children","fullHeight","gutter","style"];function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,i=e.gutter,c=e.style,u=void 0===c?{}:c,d=(0,r.Z)(e,o),h=a({},u);return i&&(h.paddingLeft=i,h.paddingRight=h.paddingLeft),t&&(h.height="100%"),(0,s.jsx)(l.Col,a(a({},d),{},{style:h,children:n}))}},82682:function(e,n,t){"use strict";var i=t(82394),r=t(26304),l=t(82684),s=t(33591),o=t(28598),c=["children","fullHeight","gutter","justifyContent","style"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,i=e.gutter,a=e.justifyContent,d=e.style,h=void 0===d?{}:d,p=(0,r.Z)(e,c),f=u({},h);return i&&(f.marginLeft=-1*i,f.marginRight=f.marginLeft),t&&(f.height="100%"),(0,o.jsx)(s.Row,u(u({},p),{},{justifyContent:a,style:f,children:l.Children.map(n,(function(e,n){return e&&l.cloneElement(e,{gutter:i,key:n})}))}))}},60480:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return F}});var i,r=t(77837),l=t(82394),s=t(75582),o=t(38860),c=t.n(o),a=t(82684),u=t(12691),d=t.n(u),h=t(21764),p=t(83455),f=t(71180),b=t(90299),y=t(70652),m=t(50724),j=t(15338),g=t(82555),v=t(55485),x=t(85854),Z=t(48670),_=t(93808),w=t(44085),O=t(28274),k=t(38276);!function(e){e.SSH="ssh",e.HTTPS="https"}(i||(i={}));var P=[{autoComplete:"remote_repo_link",label:"Remote repo url",required:!0,uuid:"remote_repo_link"},{autoComplete:"repo_path",label:"Local directory path",labelDescription:"Defaults to Python's os.getcwd() if omitted. Mage will create this local directory if it doesn't already exist.",uuid:"repo_path"}],C=[{autoComplete:"username",label:"Username",uuid:"username"},{autoComplete:"email",label:"Email",uuid:"email"},{autoComplete:"ssh_public_key",label:"SSH public key in base64",type:"password",uuid:"ssh_public_key"},{autoComplete:"ssh_private_key",label:"SSH private key in base64",type:"password",uuid:"ssh_private_key"}],S=[{autoComplete:"username",label:"Username",required:!0,uuid:"username"},{autoComplete:"email",label:"Email",required:!0,uuid:"email"},{autoComplete:"access_token",label:"Access token",labelDescription:"Add your Git access token to authenticate with your provided username. The access token will be stored as a Mage secret. You will see the secret below if you have already added it.",required:!0,type:"password",uuid:"access_token"}],T=[{autoComplete:"branch",label:"Branch name",required:!0,uuid:"branch"}],I=t(30160),E=t(17488),M=t(79264),D=t(35686),q=t(70515),G=t(24755),N=t(15610),H=t(72619),A=t(69419),R=t(28598);function W(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?W(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):W(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var L={label:function(){return"One-way Git Sync"},uuid:"git_sync"},U={label:function(){return"Git Actions"},uuid:"git_integration"},V=[L,U];function B(){var e=D.ZP.syncs.list(),n=e.data,t=e.mutate,r=(0,a.useState)(null),o=r[0],c=r[1],u=(0,a.useState)(null),_=u[0],W=u[1],B=(0,a.useState)(null),F=B[0],Y=B[1];(0,a.useEffect)((function(){if(n){var e,t=null==n||null===(e=n.syncs)||void 0===e?void 0:e[0];W(null==t?void 0:t.user_git_settings),c(t)}}),[n]);var J=(0,a.useMemo)((function(){if(n){var e,t=null==n||null===(e=n.syncs)||void 0===e?void 0:e[0];return!(null==t||!t.branch)}return!1}),[n]),K=D.ZP.git_branches.detail("test",{_format:"with_basic_details"},{revalidateOnFocus:!1}),X=K.data,$=(K.mutate,(0,a.useMemo)((function(){return(null==X?void 0:X.git_branch)||{}}),[X]).is_git_integration_enabled),Q=(0,p.Db)(D.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){var n=e.sync;n&&(c(n),window.location.reload(),h.Am.success("Sync saved",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"}))},onErrorCallback:function(e,n){return Y({errors:n,response:e})}})}}),ee=(0,s.Z)(Q,2),ne=ee[0],te=ee[1].isLoading,ie=(0,p.Db)(D.ZP.syncs.useUpdate("git"),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){e.sync&&h.Am.success("Success!",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"})},onErrorCallback:function(e,n){return Y({errors:n,response:e})}})}}),re=(0,s.Z)(ie,2),le=re[0],se=re[1].isLoading,oe=(0,p.Db)((function(e){return D.ZP.secrets.useDelete(e)()}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(){t()},onErrorCallback:function(e){var n=e.error,t=(n.errors,n.message);setErrorMessages((function(e){return e.concat(t)}))}})}}),ce=(0,s.Z)(oe,1)[0],ae=(0,a.useMemo)((function(){return(null==o?void 0:o.auth_type)||i.SSH}),[null==o?void 0:o.auth_type]),ue=(0,a.useMemo)((function(){return ae===i.HTTPS?S:C}),[ae]),de=D.ZP.statuses.list().data,he=(0,a.useMemo)((function(){var e,n;return null==de||null===(e=de.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.require_user_authentication}),[de]),pe=(0,a.useMemo)((function(){return V}),[]),fe=(0,a.useState)(),be=fe[0],ye=fe[1];(0,a.useEffect)((function(){be||ye($?U:L)}),[$,be]);var me=(0,a.useMemo)((function(){var e,n=c,t=o;(null==be?void 0:be.uuid)===U.uuid&&he&&(n=W,t=_);var i=Object.entries(t||{}).filter((function(e){var n=(0,s.Z)(e,2),t=n[0],i=n[1];return t.endsWith("_secret_name")&&!!i}));return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("form",{children:ue.map((function(e){var i,r,s=e.autoComplete,o=e.disabled,c=e.label,a=e.labelDescription,u=e.required,d=e.type,p=e.uuid;return r="ssh_public_key"===p?(0,R.jsx)(k.Z,{mb:1,children:(0,R.jsxs)(I.ZP,{small:!0,children:["Run ",(0,R.jsx)(Z.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n && echo"),h.Am.success("Successfully copied to clipboard.",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n && echo"})," in terminal to get base64 encoded public key and paste the result here. The key will be stored as a Mage secret. You will see the secret below if you have already added it."]})}):"ssh_private_key"===p?(0,R.jsx)(k.Z,{mb:1,children:(0,R.jsxs)(I.ZP,{small:!0,children:["Follow same steps as the public key, but run ",(0,R.jsx)(Z.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"),h.Am.success("Successfully copied to clipboard.",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"})," instead. The key will be stored as a Mage secret. You will see the secret below if you have already added it."]})}):a&&(0,R.jsx)(k.Z,{mb:1,children:(0,R.jsx)(I.ZP,{small:!0,children:a})}),(0,R.jsxs)(k.Z,{mt:2,children:[r,(0,R.jsx)(E.Z,{autoComplete:s,disabled:o,label:c,onChange:function(e){n((function(n){return z(z({},n),{},(0,l.Z)({},p,e.target.value))}))},primary:!0,required:u,setContentOnMount:!0,type:d,value:(null===(i=t)||void 0===i?void 0:i[p])||""})]},p)}))}),(0,R.jsx)(k.Z,{mb:1,mt:q.Mq,children:(0,R.jsx)(x.Z,{level:5,children:"Git secrets"})}),i&&i.length>0?i.map((function(e){var n=(0,s.Z)(e,2),t=(n[0],n[1]);return(0,R.jsx)(M.Z,{deleteVariable:function(){return ce(t)},hideEdit:!0,obfuscate:!0,variable:{uuid:t,value:"placeholder"}},t)})):(0,R.jsxs)(I.ZP,{children:["You have no Git secrets saved for ",null==be||null===(e=be.label)||void 0===e?void 0:e.call(be)]})]})}),[ue,ce,he,be,W,c,o,_]),je=(0,A.iV)();(0,a.useEffect)((function(){null!=je&&je.tab&&ye(pe.find((function(e){return e.uuid===(null==je?void 0:je.tab)})))}),[je,pe]);var ge=(0,a.useMemo)((function(){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(k.Z,{mt:q.Mq,children:[(0,R.jsxs)(I.ZP,{inline:!0,children:["To learn more about One-way git sync, click"," "]}),(0,R.jsx)(Z.Z,{bold:!0,href:"https://docs.mage.ai/production/data-sync/git-sync",openNewWindow:!0,children:"here"})]}),(0,R.jsx)(k.Z,{mt:q.Mq,children:(0,R.jsx)(I.ZP,{bold:!0,children:"Sync with a specified branch. These settings will be saved at the project level."})}),(0,R.jsx)("form",{children:T.map((function(e){var n=e.autoComplete,t=e.disabled,i=e.label,r=e.required,s=e.type,a=e.uuid;return(0,R.jsx)(k.Z,{mt:2,children:(0,R.jsx)(E.Z,{autoComplete:n,disabled:t,label:i,onChange:function(e){c((function(n){return z(z({},n),{},(0,l.Z)({},a,e.target.value))}))},primary:!0,required:r,setContentOnMount:!0,type:s,value:(null==o?void 0:o[a])||""})},a)}))}),(0,R.jsx)(v.ZP,{alignItems:"center",children:(0,R.jsx)(k.Z,{mt:2,children:(0,R.jsx)(y.Z,{checked:null==o?void 0:o.sync_submodules,label:"Include submodules",onClick:function(){c((function(e){return z(z({},e),{},{sync_submodules:!(null!=o&&o.sync_submodules)})}))}})})}),(0,R.jsx)(k.Z,{mt:2,children:(0,R.jsx)(x.Z,{level:5,children:"Additional sync settings"})}),(0,R.jsx)(v.ZP,{alignItems:"center",children:(0,R.jsx)(k.Z,{mt:2,children:(0,R.jsx)(y.Z,{checked:null==o?void 0:o.sync_on_pipeline_run,label:"Sync before each trigger run",onClick:function(){c((function(e){return z(z({},e),{},{sync_on_pipeline_run:!(null!=o&&o.sync_on_pipeline_run)})}))}})})}),(0,R.jsx)(v.ZP,{alignItems:"center",children:(0,R.jsx)(k.Z,{mt:2,children:(0,R.jsx)(y.Z,{checked:null==o?void 0:o.sync_on_start,label:"Sync on server start up",onClick:function(){c((function(e){return z(z({},e),{},{sync_on_start:!(null!=o&&o.sync_on_start)})}))}})})}),(0,R.jsx)(k.Z,{mt:q.Mq,children:(0,R.jsx)(I.ZP,{bold:!0,children:"Configure the Git authentication credentials that will be used to sync with the specified Git repository."})}),me]})}),[o,me]),ve=(0,a.useMemo)((function(){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(k.Z,{mt:q.Mq,children:[!$&&(0,R.jsx)(k.Z,{mb:1,children:(0,R.jsx)(I.ZP,{bold:!0,warning:!0,children:"When One-way git sync is enabled, you will be unable to access the Git Actions modal. If you want to bypass this safeguard, set the GIT_ENABLE_GIT_INTEGRATION environment variable."})}),(0,R.jsxs)(I.ZP,{bold:!0,children:["We recommend using the ",(0,R.jsx)(d(),{as:"/version-control",href:"/version-control",children:(0,R.jsx)(Z.Z,{bold:!0,inline:!0,children:"version control app"})})," unless you have a specific need to use the Git Actions modal."]})]}),(0,R.jsx)(k.Z,{mt:q.Mq,children:(0,R.jsx)(I.ZP,{children:"These fields are required to help Mage configure your Git settings. These settings will be specific to your user."})}),me]})}),[$,me]);return(0,R.jsx)(O.Z,{uuidItemSelected:G.fF,uuidWorkspaceSelected:G.WH,children:(0,R.jsxs)(k.Z,{p:q.cd,style:{width:"600px"},children:[(0,R.jsx)(x.Z,{children:"Git repository settings"}),(0,R.jsx)(k.Z,{mt:1,children:(0,R.jsx)(I.ZP,{bold:!0,children:"Authentication type"})}),(0,R.jsx)(k.Z,{mt:1,children:(0,R.jsx)(w.Z,{compact:!0,label:"Authentication type",onChange:function(e){var n=e.target.value;c((function(e){return z(z({},e),{},{auth_type:n})}))},value:ae,children:Object.entries(i).map((function(e){var n=(0,s.Z)(e,2),t=n[0],i=n[1];return(0,R.jsx)("option",{value:i,children:t},i)}))})}),(0,R.jsx)(k.Z,{mt:q.Mq,children:ae===i.SSH&&(0,R.jsxs)(I.ZP,{bold:!0,children:["You will need to ",(0,R.jsx)(Z.Z,{href:"https://docs.mage.ai/development/git/configure#generate-ssh-token",openNewWindow:!0,children:"set up your SSH key"})," if you have not done so already."]})}),(0,R.jsx)("form",{children:P.map((function(e){var n=e.autoComplete,t=e.disabled,i=e.label,r=e.labelDescription,s=e.required,a=e.type,u=e.uuid;return(0,R.jsxs)(k.Z,{mt:2,children:[r&&(0,R.jsx)(k.Z,{mb:1,children:(0,R.jsx)(I.ZP,{small:!0,children:r})}),(0,R.jsx)(E.Z,{autoComplete:n,disabled:t,label:i,onChange:function(e){c((function(n){return z(z({},n),{},(0,l.Z)({},u,e.target.value))}))},primary:!0,required:s,setContentOnMount:!0,type:a,value:(null==o?void 0:o[u])||""})]},u)}))}),(0,R.jsx)(k.Z,{mt:q.Mq,children:(0,R.jsx)(j.Z,{light:!0})}),(0,R.jsx)(b.Z,{onClickTab:function(e){var n=e.uuid;(0,N.u)({tab:n})},selectedTabUUID:null==be?void 0:be.uuid,tabs:pe,underlineStyle:!0}),(0,R.jsx)(j.Z,{light:!0}),(0,R.jsxs)(k.Z,{ml:2,children:[L.uuid===(null==be?void 0:be.uuid)&&ge,U.uuid===(null==be?void 0:be.uuid)&&ve]}),(0,R.jsx)(k.Z,{mt:q.HN,children:(0,R.jsx)(f.ZP,{loading:te,onClick:function(){return ne({sync:z(z({},o),{},{user_git_settings:_})})},primary:!0,children:"Save repository settings"})}),F&&(0,R.jsx)(m.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==Y?void 0:Y(null)},children:(0,R.jsx)(g.Z,z(z({},F),{},{onClose:function(){return null==Y?void 0:Y(null)}}))}),J&&(0,R.jsxs)(k.Z,{mt:q.HN,children:[(0,R.jsx)(x.Z,{children:"Synchronize code from remote repository"}),(0,R.jsxs)(k.Z,{mt:1,children:[(0,R.jsxs)(I.ZP,{children:["Running the sync from this page will run a one time sync with the remote repository.",(0,R.jsx)("br",{}),"This may ",(0,R.jsx)(I.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," your existing data, so make sure you’ve committed or backed up your current changes."]}),(0,R.jsx)(k.Z,{mt:2}),(0,R.jsxs)(I.ZP,{children:["Reset will tell Mage to try to clone your repository from remote. This will also ",(0,R.jsx)(I.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," all your local changes and reset any settings you may have configured for your local Git repo. This may be helpful if you are having issues syncing your repository."]})]}),(0,R.jsx)(k.Z,{mt:2,children:(0,R.jsxs)(v.ZP,{children:[(0,R.jsx)(f.ZP,{loading:se,onClick:function(){return le({sync:{action_type:"sync_data"}})},warning:!0,children:"Synchronize code"}),(0,R.jsx)(k.Z,{ml:2}),(0,R.jsx)(f.ZP,{danger:!0,loading:se,onClick:function(){return le({sync:{action_type:"reset"}})},children:"Reset repository"})]})})]})]})})}B.getInitialProps=(0,r.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var F=(0,_.Z)(B)},37056:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/sync-data",function(){return t(60480)}])}},function(e){e.O(0,[125,1799,140,449,5699,8095,4982,9774,2888,179],(function(){return n=37056,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8011],{49597:function(n,r,u){"use strict";u.r(r);var t=u(77837),e=u(38860),s=u.n(e),i=u(93808),a=u(37361),c=u(28598);function o(n){var r=n.slug;return(0,c.jsx)(a.Z,{slug:r})}o.getInitialProps=function(){var n=(0,t.Z)(s().mark((function n(r){var u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.query.slug,n.abrupt("return",{slug:null==u?void 0:u[0]});case 2:case"end":return n.stop()}}),n)})));return function(r){return n.apply(this,arguments)}}(),r.default=(0,i.Z)(o)},23292:function(n,r,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/users/[...slug]",function(){return u(49597)}])}},function(n){n.O(0,[1557,5699,3958,9774,2888,179],(function(){return r=23292,n(n.s=r);var r}));var r=n.O();_N_E=r}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8011],{49597:function(n,r,u){"use strict";u.r(r);var t=u(77837),e=u(38860),s=u.n(e),i=u(93808),a=u(37361),c=u(28598);function o(n){var r=n.slug;return(0,c.jsx)(a.Z,{slug:r})}o.getInitialProps=function(){var n=(0,t.Z)(s().mark((function n(r){var u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.query.slug,n.abrupt("return",{slug:null==u?void 0:u[0]});case 2:case"end":return n.stop()}}),n)})));return function(r){return n.apply(this,arguments)}}(),r.default=(0,i.Z)(o)},23292:function(n,r,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/users/[...slug]",function(){return u(49597)}])}},function(n){n.O(0,[449,5699,3958,9774,2888,179],(function(){return r=23292,n(n.s=r);var r}));var r=n.O();_N_E=r}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2287],{87992:function(e,n,r){"use strict";r.r(n);var u=r(77837),s=r(38860),t=r.n(s),i=r(82684),a=r(34376),l=r(71180),d=r(15338),c=r(93808),o=r(28274),f=r(38276),m=r(75499),p=r(30160),h=r(37361),_=r(35686),w=r(72473),x=r(70515),v=r(24755),P=r(3917),Z=r(50178),j=r(28598);function b(){var e=(0,a.useRouter)(),n=(0,i.useState)(!1),r=n[0],u=n[1],s=(0,Z.PR)(null==e?void 0:e.basePath)||{},t=(s.id,s.owner),c=_.ZP.users.list({},{revalidateOnFocus:!1}).data,b=(0,i.useMemo)((function(){return(null==c?void 0:c.users)||[]}),[null==c?void 0:c.users]),k=[{bold:!r,label:function(){return"Users"}}];return r?(k[0].onClick=function(){return u(!1)},k.push({bold:!0,label:function(){return"New user"}})):k[0].linkProps={href:"/settings/workspace/users"},(0,j.jsxs)(o.Z,{appendBreadcrumbs:!0,breadcrumbs:k,title:"Users",uuidItemSelected:v.B2.USERS,uuidWorkspaceSelected:v.Pl.USER_MANAGEMENT,children:[r&&(0,j.jsx)(h.Z,{contained:!0,onCancel:function(){return u(!1)}}),!r&&(0,j.jsxs)(j.Fragment,{children:[t&&(0,j.jsx)(f.Z,{p:x.cd,children:(0,j.jsx)(l.ZP,{beforeIcon:(0,j.jsx)(w.AddUserSmileyFace,{}),onClick:function(){return u(!0)},primary:!0,children:"Add new user"})}),(0,j.jsx)(d.Z,{light:!0}),(0,j.jsx)(m.Z,{columnFlex:[null,1,1,1,1,null,null],columns:[{label:function(){return""},uuid:"avatar"},{uuid:"Username"},{uuid:"First name"},{uuid:"Last name"},{uuid:"Email"},{uuid:"Role"},{rightAligned:!0,uuid:"Created"}],onClickRow:function(n){var r,u=null===(r=b[n])||void 0===r?void 0:r.id;e.push("/settings/workspace/users/".concat(u))},rows:b.map((function(e){var n=e.avatar,r=e.created_at,u=e.email,s=e.first_name,t=e.last_name,i=e.roles_display,a=e.roles_new,l=e.username,d=a||[];return d.sort((function(e,n){return e.id-n.id})),[(0,j.jsx)(p.ZP,{large:!0,rightAligned:!0,children:n},"avatar"),(0,j.jsx)(p.ZP,{children:l||"-"},"username"),(0,j.jsx)(p.ZP,{default:!0,children:s||"-"},"firstName"),(0,j.jsx)(p.ZP,{default:!0,children:t||"-"},"lastName"),(0,j.jsx)(p.ZP,{default:!0,children:u},"email"),(0,j.jsx)(p.ZP,{default:!0,children:d.length>0?d[0].name:i},"roles"),(0,j.jsx)(p.ZP,{default:!0,monospace:!0,children:r&&(0,P.d$)(r)},"created")]})),uuid:"pipeline-runs"})]})]})}b.getInitialProps=(0,u.Z)(t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,c.Z)(b)},48673:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/users",function(){return r(87992)}])}},function(e){e.O(0,[1557,5699,3958,9774,2888,179],(function(){return n=48673,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2287],{87992:function(e,n,r){"use strict";r.r(n);var u=r(77837),s=r(38860),t=r.n(s),i=r(82684),a=r(34376),l=r(71180),d=r(15338),c=r(93808),o=r(28274),f=r(38276),m=r(75499),p=r(30160),h=r(37361),_=r(35686),w=r(72473),x=r(70515),v=r(24755),P=r(3917),Z=r(50178),j=r(28598);function b(){var e=(0,a.useRouter)(),n=(0,i.useState)(!1),r=n[0],u=n[1],s=(0,Z.PR)(null==e?void 0:e.basePath)||{},t=(s.id,s.owner),c=_.ZP.users.list({},{revalidateOnFocus:!1}).data,b=(0,i.useMemo)((function(){return(null==c?void 0:c.users)||[]}),[null==c?void 0:c.users]),k=[{bold:!r,label:function(){return"Users"}}];return r?(k[0].onClick=function(){return u(!1)},k.push({bold:!0,label:function(){return"New user"}})):k[0].linkProps={href:"/settings/workspace/users"},(0,j.jsxs)(o.Z,{appendBreadcrumbs:!0,breadcrumbs:k,title:"Users",uuidItemSelected:v.B2.USERS,uuidWorkspaceSelected:v.Pl.USER_MANAGEMENT,children:[r&&(0,j.jsx)(h.Z,{contained:!0,onCancel:function(){return u(!1)}}),!r&&(0,j.jsxs)(j.Fragment,{children:[t&&(0,j.jsx)(f.Z,{p:x.cd,children:(0,j.jsx)(l.ZP,{beforeIcon:(0,j.jsx)(w.AddUserSmileyFace,{}),onClick:function(){return u(!0)},primary:!0,children:"Add new user"})}),(0,j.jsx)(d.Z,{light:!0}),(0,j.jsx)(m.Z,{columnFlex:[null,1,1,1,1,null,null],columns:[{label:function(){return""},uuid:"avatar"},{uuid:"Username"},{uuid:"First name"},{uuid:"Last name"},{uuid:"Email"},{uuid:"Role"},{rightAligned:!0,uuid:"Created"}],onClickRow:function(n){var r,u=null===(r=b[n])||void 0===r?void 0:r.id;e.push("/settings/workspace/users/".concat(u))},rows:b.map((function(e){var n=e.avatar,r=e.created_at,u=e.email,s=e.first_name,t=e.last_name,i=e.roles_display,a=e.roles_new,l=e.username,d=a||[];return d.sort((function(e,n){return e.id-n.id})),[(0,j.jsx)(p.ZP,{large:!0,rightAligned:!0,children:n},"avatar"),(0,j.jsx)(p.ZP,{children:l||"-"},"username"),(0,j.jsx)(p.ZP,{default:!0,children:s||"-"},"firstName"),(0,j.jsx)(p.ZP,{default:!0,children:t||"-"},"lastName"),(0,j.jsx)(p.ZP,{default:!0,children:u},"email"),(0,j.jsx)(p.ZP,{default:!0,children:d.length>0?d[0].name:i},"roles"),(0,j.jsx)(p.ZP,{default:!0,monospace:!0,children:r&&(0,P.d$)(r)},"created")]})),uuid:"pipeline-runs"})]})]})}b.getInitialProps=(0,u.Z)(t().mark((function e(){return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,c.Z)(b)},48673:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/users",function(){return r(87992)}])}},function(e){e.O(0,[449,5699,3958,9774,2888,179],(function(){return n=48673,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1312],{66316:function(e,t,r){"use strict";r.d(t,{Z:function(){return j}});var n=r(82394),i=r(70613),o=r(31557),c=r(33591),u=r(38276),s=r(70515),a=r(28598);var l=function(e){var t=e.children,r=e.width,n=void 0===r?12:r;return(0,a.jsx)(u.Z,{px:s.zC,children:(0,a.jsx)(c.Row,{children:(0,a.jsx)(c.Col,{lg:n,md:Math.min(12,Math.round(1.5*(12-n))),sm:Math.min(12,Math.round(1.75*(12-n))),xs:12,children:t})})})},d=r(9518),f=r(46684),p=d.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-jcgu5l-0"})(["padding-top:","px;",""],f.Mz,(function(e){return e.fullHeight&&"\n height: calc(100vh);\n "}));function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var j=function(e){var t=e.children,r=e.headerProps,n=e.title;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{title:n}),(0,a.jsx)(o.Z,g({},r)),(0,a.jsx)(l,{children:(0,a.jsx)(p,{fullHeight:!0,children:t})})]})}},46568:function(e,t,r){"use strict";var n=r(82394),i=r(26304),o=(r(82684),r(33591)),c=r(28598),u=["children","fullHeight","gutter","style"];function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.Z=function(e){var t=e.children,r=e.fullHeight,n=e.gutter,s=e.style,l=void 0===s?{}:s,d=(0,i.Z)(e,u),f=a({},l);return n&&(f.paddingLeft=n,f.paddingRight=f.paddingLeft),r&&(f.height="100%"),(0,c.jsx)(o.Col,a(a({},d),{},{style:f,children:t}))}},82682:function(e,t,r){"use strict";var n=r(82394),i=r(26304),o=r(82684),c=r(33591),u=r(28598),s=["children","fullHeight","gutter","justifyContent","style"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.Z=function(e){var t=e.children,r=e.fullHeight,n=e.gutter,a=e.justifyContent,d=e.style,f=void 0===d?{}:d,p=(0,i.Z)(e,s),h=l({},f);return n&&(h.marginLeft=-1*n,h.marginRight=h.marginLeft),r&&(h.height="100%"),(0,u.jsx)(c.Row,l(l({},p),{},{justifyContent:a,style:h,children:o.Children.map(t,(function(e,t){return e&&o.cloneElement(e,{gutter:n,key:t})}))}))}},94542:function(e,t,r){"use strict";r.d(t,{J:function(){return o},X:function(){return c}});var n=r(46568),i=r(82682),o=n.Z,c=i.Z},91769:function(e,t,r){"use strict";r.d(t,{f:function(){return v},h:function(){return j}});var n=r(82394),i=r(82684),o=r(34376),c=r(68562),u=r(72473),s=r(70515),a=r(69419),l=r(53808),d=r(28598);var f=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),f=n.url,p=n.redirect_query_params,h=void 0===p?{}:p;return(0,d.jsx)(d.Fragment,{children:f&&(0,d.jsx)(c.ZP,{beforeElement:(0,d.jsx)(u.GoogleIcon,{size:2*s.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(f).state;(0,l.t8)(e,h),r.push(f)},uuid:"SignForm/google",children:"Sign in with Google"})})};var p=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),f=n.url,p=n.redirect_query_params,h=void 0===p?{}:p;return(0,d.jsx)(d.Fragment,{children:f&&(0,d.jsx)(c.ZP,{beforeElement:(0,d.jsx)(u.MicrosoftIcon,{size:2*s.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(f).state;h&&(0,l.t8)(e,h),r.push(f)},uuid:"SignForm/active_directory",children:"Sign in with Microsoft"})})};var h=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),u=n.url,s=n.redirect_query_params,f=void 0===s?{}:s;return(0,d.jsx)(d.Fragment,{children:u&&(0,d.jsx)(c.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(u).state;(0,l.t8)(e,f),r.push(u)},uuid:"SignForm/oidc_generic",children:"Sign in with OIDC"})})};var g,j,b=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),u=n.url,s=n.redirect_query_params,f=void 0===s?{}:s;return(0,d.jsx)(d.Fragment,{children:u&&(0,d.jsx)(c.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(u).state;(0,l.t8)(e,f),r.push(u)},uuid:"SignForm/okta",children:"Sign in with Okta"})})};!function(e){e.ACTIVE_DIRECTORY="active_directory",e.AZURE_DEVOPS="azure_devops",e.BITBUCKET="bitbucket",e.GITHUB="github",e.GITLAB="gitlab",e.GOOGLE="google",e.OIDC_GENERIC="oidc_generic",e.OKTA="okta"}(j||(j={}));var v=(g={},(0,n.Z)(g,j.ACTIVE_DIRECTORY,p),(0,n.Z)(g,j.GOOGLE,f),(0,n.Z)(g,j.OIDC_GENERIC,h),(0,n.Z)(g,j.OKTA,b),g)},13180:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return L}});var n=r(77837),i=r(38860),o=r.n(i),c=r(66316),u=r(82394),s=r(75582),a=r(82684),l=r(83455),d=r(34376),f=r(40761),p=r(55485),h=r(85854),g=r(68562),j=r(38276),b=r(30160),v=r(17488),O=r(35686),y=r(9518),m=r(44897),x=r(42631),w=r(70515),P=y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-641xul-0"})(["border-radius:","px;padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;width:100%;",""],x.TR,21*w.iI,w.Vj,w.Vj,w.Vj,(function(e){return"\n background-color: ".concat((e.theme.background||m.Z.background).panel,";\n ")})),Z=y.default.div.withConfig({displayName:"indexstyle__BackgroundImageStyle",componentId:"sc-641xul-1"})(["border-radius:","px;font-size:0;overflow:hidden;",""],x.D7,(function(e){return e.src&&"\n background-image: url(".concat(e.src,");\n background-size: cover;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n ")})),C=r(94542),_=r(39643),k=r(91769),E=r(42122),S=r(72619),D=r(42041),R=r(69419),I=r(50178),M=r(28598);function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var V="email",F="password";var G=function(e){var t=e.title,r=(0,d.useRouter)(),n=(0,a.useState)(null),i=n[0],o=n[1],c=(0,a.useState)({}),y=c[0],m=c[1],x=(0,l.Db)(O.ZP.sessions.useCreate(),{onSuccess:function(e){return(0,S.wD)(e,{callback:function(e){var t=e.session,n=t.token,i=t.user,o=null==r?void 0:r.basePath;(0,I.av)(i,o),f.Z.storeToken(n,(function(){var e="".concat(o,"/"),t=(0,R.iV)(window.location.href),r=(0,R.uM)((0,E.gR)(t,["redirect_url","access_token","provider"]));t.redirect_url&&(e="".concat(t.redirect_url,"?").concat(r)),window.location.href=e}),o)},onErrorCallback:function(e){var t=e.error;o(t)}})}}),T=(0,s.Z)(x,2),G=T[0],H=T[1].isLoading,L=(0,a.useCallback)((function(e){return f.Z.logout((function(){return G(e)}),null==r?void 0:r.basePath)}),[G,null==r?void 0:r.basePath]),N=O.ZP.oauths.list({redirect_uri:encodeURIComponent(window.location.href)}).data,A=(0,a.useMemo)((function(){var e;return null==N||null===(e=N.oauths)||void 0===e?void 0:e.reduce((function(e,t){return e[t.provider]=t,e}),{})}),[N]),U=(0,R.iV)()||{},q=U.access_token,B=U.provider;return(0,a.useEffect)((function(){var e;q&&B&&G({session:(e={},(0,u.Z)(e,"provider",B),(0,u.Z)(e,"token",q),e)})}),[q,G,B]),(0,M.jsxs)(C.X,{fullHeight:!0,children:[(0,M.jsx)(C.J,{lg:6,md:12,children:(0,M.jsx)(p.ZP,{flexDirection:"column",fullHeight:!0,fullWidth:!0,justifyContent:"center",children:(0,M.jsx)(j.Z,{px:{xl:5*w.zC,xs:w.zC},py:w.zC,children:(0,M.jsxs)(P,{children:[(0,M.jsx)(h.Z,{yellow:!0,children:t}),(0,M.jsxs)("form",{children:[(0,M.jsxs)(j.Z,{mt:3,children:[(0,M.jsx)(v.Z,{autoComplete:"username",label:"Email",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return m((function(t){return z(z({},t),{},(0,u.Z)({},V,e.target.value))}))},primary:!i,value:y[V]}),(0,M.jsx)(j.Z,{mt:2,children:(0,M.jsx)(v.Z,{autoComplete:"current-password",label:"Password",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return m((function(t){return z(z({},t),{},(0,u.Z)({},F,e.target.value))}))},primary:!i,type:"password",value:y[F]})})]}),i&&(0,M.jsx)(j.Z,{mt:2,children:(0,M.jsx)(b.ZP,{danger:!0,children:i.message})}),(0,M.jsx)(j.Z,{mt:3,children:(0,M.jsx)(g.ZP,{bold:!0,inline:!0,keyTextGroups:[[_.Lz]],keyboardShortcutValidation:function(e){var t=e.keyMapping;return(0,D.y)([_.Uq],t)},large:!0,loading:H,noHoverUnderline:!0,onClick:function(){return L({session:y})},selected:!0,uuid:"SignForm/action",wind:!0,children:"Sign into Mage"})}),Object.entries(k.f).map((function(e){var t=(0,s.Z)(e,2),r=t[0],n=t[1];return(0,M.jsx)(M.Fragment,{children:(null==A?void 0:A[r])&&(0,M.jsx)(j.Z,{mt:4,children:(0,M.jsx)(n,{oauthResponse:null==A?void 0:A[r]})})})}))]})]})})})}),(0,M.jsx)(C.J,{hiddenLgDown:!0,lg:6,style:{flex:1},children:(0,M.jsx)(j.Z,{fullHeight:!0,fullWidth:!0,px:w.zC,py:w.zC+8,children:(0,M.jsx)(Z,{src:"".concat(null==r?void 0:r.basePath,"/images/sessions/abstract.png"),children:"Sign in abstract image"})})})]})};function H(){return(0,M.jsx)(c.Z,{headerProps:{hideActions:!0},title:"Sign in",children:(0,M.jsx)(G,{title:"👋 Sign in"})})}H.getInitialProps=(0,n.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var L=H},6821:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/sign-in",function(){return r(13180)}])}},function(e){e.O(0,[1557,9774,2888,179],(function(){return t=6821,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1312],{66316:function(e,t,r){"use strict";r.d(t,{Z:function(){return j}});var n=r(82394),i=r(70613),o=r(92272),c=r(33591),u=r(38276),s=r(70515),a=r(28598);var l=function(e){var t=e.children,r=e.width,n=void 0===r?12:r;return(0,a.jsx)(u.Z,{px:s.zC,children:(0,a.jsx)(c.Row,{children:(0,a.jsx)(c.Col,{lg:n,md:Math.min(12,Math.round(1.5*(12-n))),sm:Math.min(12,Math.round(1.75*(12-n))),xs:12,children:t})})})},d=r(9518),f=r(46684),p=d.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-jcgu5l-0"})(["padding-top:","px;",""],f.Mz,(function(e){return e.fullHeight&&"\n height: calc(100vh);\n "}));function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var j=function(e){var t=e.children,r=e.headerProps,n=e.title;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{title:n}),(0,a.jsx)(o.Z,g({},r)),(0,a.jsx)(l,{children:(0,a.jsx)(p,{fullHeight:!0,children:t})})]})}},46568:function(e,t,r){"use strict";var n=r(82394),i=r(26304),o=(r(82684),r(33591)),c=r(28598),u=["children","fullHeight","gutter","style"];function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.Z=function(e){var t=e.children,r=e.fullHeight,n=e.gutter,s=e.style,l=void 0===s?{}:s,d=(0,i.Z)(e,u),f=a({},l);return n&&(f.paddingLeft=n,f.paddingRight=f.paddingLeft),r&&(f.height="100%"),(0,c.jsx)(o.Col,a(a({},d),{},{style:f,children:t}))}},82682:function(e,t,r){"use strict";var n=r(82394),i=r(26304),o=r(82684),c=r(33591),u=r(28598),s=["children","fullHeight","gutter","justifyContent","style"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.Z=function(e){var t=e.children,r=e.fullHeight,n=e.gutter,a=e.justifyContent,d=e.style,f=void 0===d?{}:d,p=(0,i.Z)(e,s),h=l({},f);return n&&(h.marginLeft=-1*n,h.marginRight=h.marginLeft),r&&(h.height="100%"),(0,u.jsx)(c.Row,l(l({},p),{},{justifyContent:a,style:h,children:o.Children.map(t,(function(e,t){return e&&o.cloneElement(e,{gutter:n,key:t})}))}))}},94542:function(e,t,r){"use strict";r.d(t,{J:function(){return o},X:function(){return c}});var n=r(46568),i=r(82682),o=n.Z,c=i.Z},91769:function(e,t,r){"use strict";r.d(t,{f:function(){return v},h:function(){return j}});var n=r(82394),i=r(82684),o=r(34376),c=r(68562),u=r(72473),s=r(70515),a=r(69419),l=r(53808),d=r(28598);var f=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),f=n.url,p=n.redirect_query_params,h=void 0===p?{}:p;return(0,d.jsx)(d.Fragment,{children:f&&(0,d.jsx)(c.ZP,{beforeElement:(0,d.jsx)(u.GoogleIcon,{size:2*s.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(f).state;(0,l.t8)(e,h),r.push(f)},uuid:"SignForm/google",children:"Sign in with Google"})})};var p=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),f=n.url,p=n.redirect_query_params,h=void 0===p?{}:p;return(0,d.jsx)(d.Fragment,{children:f&&(0,d.jsx)(c.ZP,{beforeElement:(0,d.jsx)(u.MicrosoftIcon,{size:2*s.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(f).state;h&&(0,l.t8)(e,h),r.push(f)},uuid:"SignForm/active_directory",children:"Sign in with Microsoft"})})};var h=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),u=n.url,s=n.redirect_query_params,f=void 0===s?{}:s;return(0,d.jsx)(d.Fragment,{children:u&&(0,d.jsx)(c.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(u).state;(0,l.t8)(e,f),r.push(u)},uuid:"SignForm/oidc_generic",children:"Sign in with OIDC"})})};var g,j,b=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),u=n.url,s=n.redirect_query_params,f=void 0===s?{}:s;return(0,d.jsx)(d.Fragment,{children:u&&(0,d.jsx)(c.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(u).state;(0,l.t8)(e,f),r.push(u)},uuid:"SignForm/okta",children:"Sign in with Okta"})})};!function(e){e.ACTIVE_DIRECTORY="active_directory",e.AZURE_DEVOPS="azure_devops",e.BITBUCKET="bitbucket",e.GITHUB="github",e.GITLAB="gitlab",e.GOOGLE="google",e.OIDC_GENERIC="oidc_generic",e.OKTA="okta"}(j||(j={}));var v=(g={},(0,n.Z)(g,j.ACTIVE_DIRECTORY,p),(0,n.Z)(g,j.GOOGLE,f),(0,n.Z)(g,j.OIDC_GENERIC,h),(0,n.Z)(g,j.OKTA,b),g)},13180:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return L}});var n=r(77837),i=r(38860),o=r.n(i),c=r(66316),u=r(82394),s=r(75582),a=r(82684),l=r(83455),d=r(34376),f=r(40761),p=r(55485),h=r(85854),g=r(68562),j=r(38276),b=r(30160),v=r(17488),O=r(35686),y=r(9518),m=r(44897),x=r(42631),w=r(70515),P=y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-641xul-0"})(["border-radius:","px;padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;width:100%;",""],x.TR,21*w.iI,w.Vj,w.Vj,w.Vj,(function(e){return"\n background-color: ".concat((e.theme.background||m.Z.background).panel,";\n ")})),Z=y.default.div.withConfig({displayName:"indexstyle__BackgroundImageStyle",componentId:"sc-641xul-1"})(["border-radius:","px;font-size:0;overflow:hidden;",""],x.D7,(function(e){return e.src&&"\n background-image: url(".concat(e.src,");\n background-size: cover;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n ")})),C=r(94542),_=r(39643),k=r(91769),E=r(42122),S=r(72619),D=r(42041),R=r(69419),I=r(50178),M=r(28598);function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var V="email",F="password";var G=function(e){var t=e.title,r=(0,d.useRouter)(),n=(0,a.useState)(null),i=n[0],o=n[1],c=(0,a.useState)({}),y=c[0],m=c[1],x=(0,l.Db)(O.ZP.sessions.useCreate(),{onSuccess:function(e){return(0,S.wD)(e,{callback:function(e){var t=e.session,n=t.token,i=t.user,o=null==r?void 0:r.basePath;(0,I.av)(i,o),f.Z.storeToken(n,(function(){var e="".concat(o,"/"),t=(0,R.iV)(window.location.href),r=(0,R.uM)((0,E.gR)(t,["redirect_url","access_token","provider"]));t.redirect_url&&(e="".concat(t.redirect_url,"?").concat(r)),window.location.href=e}),o)},onErrorCallback:function(e){var t=e.error;o(t)}})}}),T=(0,s.Z)(x,2),G=T[0],H=T[1].isLoading,L=(0,a.useCallback)((function(e){return f.Z.logout((function(){return G(e)}),null==r?void 0:r.basePath)}),[G,null==r?void 0:r.basePath]),N=O.ZP.oauths.list({redirect_uri:encodeURIComponent(window.location.href)}).data,A=(0,a.useMemo)((function(){var e;return null==N||null===(e=N.oauths)||void 0===e?void 0:e.reduce((function(e,t){return e[t.provider]=t,e}),{})}),[N]),U=(0,R.iV)()||{},q=U.access_token,B=U.provider;return(0,a.useEffect)((function(){var e;q&&B&&G({session:(e={},(0,u.Z)(e,"provider",B),(0,u.Z)(e,"token",q),e)})}),[q,G,B]),(0,M.jsxs)(C.X,{fullHeight:!0,children:[(0,M.jsx)(C.J,{lg:6,md:12,children:(0,M.jsx)(p.ZP,{flexDirection:"column",fullHeight:!0,fullWidth:!0,justifyContent:"center",children:(0,M.jsx)(j.Z,{px:{xl:5*w.zC,xs:w.zC},py:w.zC,children:(0,M.jsxs)(P,{children:[(0,M.jsx)(h.Z,{yellow:!0,children:t}),(0,M.jsxs)("form",{children:[(0,M.jsxs)(j.Z,{mt:3,children:[(0,M.jsx)(v.Z,{autoComplete:"username",label:"Email",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return m((function(t){return z(z({},t),{},(0,u.Z)({},V,e.target.value))}))},primary:!i,value:y[V]}),(0,M.jsx)(j.Z,{mt:2,children:(0,M.jsx)(v.Z,{autoComplete:"current-password",label:"Password",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return m((function(t){return z(z({},t),{},(0,u.Z)({},F,e.target.value))}))},primary:!i,type:"password",value:y[F]})})]}),i&&(0,M.jsx)(j.Z,{mt:2,children:(0,M.jsx)(b.ZP,{danger:!0,children:i.message})}),(0,M.jsx)(j.Z,{mt:3,children:(0,M.jsx)(g.ZP,{bold:!0,inline:!0,keyTextGroups:[[_.Lz]],keyboardShortcutValidation:function(e){var t=e.keyMapping;return(0,D.y)([_.Uq],t)},large:!0,loading:H,noHoverUnderline:!0,onClick:function(){return L({session:y})},selected:!0,uuid:"SignForm/action",wind:!0,children:"Sign into Mage"})}),Object.entries(k.f).map((function(e){var t=(0,s.Z)(e,2),r=t[0],n=t[1];return(0,M.jsx)(M.Fragment,{children:(null==A?void 0:A[r])&&(0,M.jsx)(j.Z,{mt:4,children:(0,M.jsx)(n,{oauthResponse:null==A?void 0:A[r]})})})}))]})]})})})}),(0,M.jsx)(C.J,{hiddenLgDown:!0,lg:6,style:{flex:1},children:(0,M.jsx)(j.Z,{fullHeight:!0,fullWidth:!0,px:w.zC,py:w.zC+8,children:(0,M.jsx)(Z,{src:"".concat(null==r?void 0:r.basePath,"/images/sessions/abstract.png"),children:"Sign in abstract image"})})})]})};function H(){return(0,M.jsx)(c.Z,{headerProps:{hideActions:!0},title:"Sign in",children:(0,M.jsx)(G,{title:"👋 Sign in"})})}H.getInitialProps=(0,n.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var L=H},6821:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/sign-in",function(){return r(13180)}])}},function(e){e.O(0,[449,9774,2888,179],(function(){return t=6821,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6568],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return Z}});var n=r(82394),o=r(21831),i=r(82684),u=r(50724),s=r(82555),c=r(97618),f=r(70613),d=r(31557),a=r(68899),l=r(28598);function p(e,t){var r=e.children,n=e.noPadding;return(0,l.jsx)(a.HS,{noPadding:n,ref:t,children:r})}var h=i.forwardRef(p),b=r(62547),m=r(82571),j=r(77417),v=r(46684),w=r(75375);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,i=e.afterHidden,p=e.afterWidth,O=e.afterWidthOverride,g=e.appendBreadcrumbs,Z=e.before,x=e.beforeHeader,A=e.beforeWidth,P=e.breadcrumbs,_=e.children,C=e.contained,B=e.errors,H=e.headerMenuItems,W=e.headerOffset,k=e.hideAfterCompletely,E=e.mainContainerHeader,M=e.navigationItems,T=e.setAfterHidden,R=e.setAfterWidth,D=e.setBeforeWidth,N=e.setErrors,I=e.subheaderChildren,S=e.subheaderNoPadding,z=e.title,F=e.uuid,X=(0,w.Z)(F,{beforeResizeOffset:w.H,setWidthAfter:R,setWidthBefore:D,widthAfter:p,widthBefore:A,widthOverrideAfter:O}),q=X.mainContainerRef,U=X.mousedownActiveAfter,V=X.mousedownActiveBefore,G=X.setMousedownActiveAfter,J=X.setMousedownActiveBefore,K=X.setWidthAfter,L=X.setWidthBefore,Q=X.widthAfter,Y=X.widthBefore,$=(0,j.Z)().project,ee=[];return P&&ee.push.apply(ee,(0,o.Z)(P)),null!=P&&P.length&&!g||!$||null!=P&&P.length||ee.unshift({bold:!g,label:function(){return z}}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(f.Z,{title:z}),(0,l.jsx)(d.Z,{breadcrumbs:ee,menuItems:H}),(0,l.jsxs)(a.Nk,{ref:t,children:[0!==(null==M?void 0:M.length)&&(0,l.jsx)(a.lm,{showMore:!0,children:(0,l.jsx)(m.Z,{navigationItems:M,showMore:!0})}),(0,l.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(b.Z,{after:r,afterHeader:n,afterHeightOffset:v.Mz,afterHidden:i,afterMousedownActive:U,afterWidth:Q,before:Z,beforeHeader:x,beforeHeightOffset:v.Mz,beforeMousedownActive:V,beforeWidth:Z?Y:a.k1,contained:C,headerOffset:W,hideAfterCompletely:!r||k,leftOffset:Z?a.k1:null,mainContainerHeader:E,mainContainerRef:q,setAfterHidden:T,setAfterMousedownActive:G,setAfterWidth:K,setBeforeMousedownActive:J,setBeforeWidth:L,children:[I&&(0,l.jsx)(h,{noPadding:S,children:I}),_]})})]}),B&&(0,l.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==N?void 0:N(null)},children:(0,l.jsx)(s.Z,y(y({},B),{},{onClose:function(){return null==N?void 0:N(null)}}))})]})}var Z=i.forwardRef(g)},14759:function(e,t,r){"use strict";r.r(t);var n=r(77837),o=r(38860),i=r.n(o),u=r(82684),s=r(44898),c=r(94629),f=r(88328),d=r(93808),a=r(38276),l=r(4190),p=r(5755),h=r(35686),b=r(70515),m=r(69419),j=r(28598);function v(e){var t,r=e.objectType,n=e.slug,o=(0,m.iV)().object_type,i=(0,u.useState)(null),d=i[0],v=i[1],w=o||r||s.Z,O=s.R===w,y=h.ZP.custom_templates.detail(n&&encodeURIComponent(n),{object_type:w}).data;return(0,u.useEffect)((function(){y&&v(null==y?void 0:y.custom_template)}),[y]),(0,j.jsxs)(c.Z,{addProjectBreadcrumbToCustomBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Templates"},linkProps:{href:O?"/templates?object_type=".concat(s.R):"/templates"}},{bold:!0,label:function(){return n}}],title:n,uuid:"TemplatesDetail/index",children:[!y&&(0,j.jsx)(a.Z,{p:b.cd,children:(0,j.jsx)(l.Z,{inverted:!0})}),d&&(0,j.jsxs)(j.Fragment,{children:[(!w||s.Z===w)&&(0,j.jsx)(p.Z,{template:d},null==d||null===(t=d.content)||void 0===t?void 0:t.slice(0,40)),O&&(0,j.jsx)(f.Z,{template:d})]})]})}v.getInitialProps=function(){var e=(0,n.Z)(i().mark((function e(t){var r,n,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.query,n=r.object_type,o=r.slug,e.abrupt("return",{objectType:n,slug:o});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.default=(0,d.Z)(v)},45082:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates/[...slug]",function(){return r(14759)}])},80022:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(61049);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(12539),o=r(80022);function i(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[1557,4241,9774,2888,179],(function(){return t=45082,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6568],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return Z}});var n=r(82394),o=r(21831),i=r(82684),u=r(50724),s=r(82555),c=r(97618),f=r(70613),d=r(92272),a=r(68899),l=r(28598);function p(e,t){var r=e.children,n=e.noPadding;return(0,l.jsx)(a.HS,{noPadding:n,ref:t,children:r})}var h=i.forwardRef(p),b=r(62547),m=r(82571),j=r(77417),v=r(46684),w=r(75375);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,i=e.afterHidden,p=e.afterWidth,O=e.afterWidthOverride,g=e.appendBreadcrumbs,Z=e.before,x=e.beforeHeader,A=e.beforeWidth,P=e.breadcrumbs,_=e.children,C=e.contained,B=e.errors,H=e.headerMenuItems,W=e.headerOffset,k=e.hideAfterCompletely,E=e.mainContainerHeader,M=e.navigationItems,T=e.setAfterHidden,R=e.setAfterWidth,D=e.setBeforeWidth,N=e.setErrors,I=e.subheaderChildren,S=e.subheaderNoPadding,z=e.title,F=e.uuid,X=(0,w.Z)(F,{beforeResizeOffset:w.H,setWidthAfter:R,setWidthBefore:D,widthAfter:p,widthBefore:A,widthOverrideAfter:O}),q=X.mainContainerRef,U=X.mousedownActiveAfter,V=X.mousedownActiveBefore,G=X.setMousedownActiveAfter,J=X.setMousedownActiveBefore,K=X.setWidthAfter,L=X.setWidthBefore,Q=X.widthAfter,Y=X.widthBefore,$=(0,j.Z)().project,ee=[];return P&&ee.push.apply(ee,(0,o.Z)(P)),null!=P&&P.length&&!g||!$||null!=P&&P.length||ee.unshift({bold:!g,label:function(){return z}}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(f.Z,{title:z}),(0,l.jsx)(d.Z,{breadcrumbs:ee,menuItems:H}),(0,l.jsxs)(a.Nk,{ref:t,children:[0!==(null==M?void 0:M.length)&&(0,l.jsx)(a.lm,{showMore:!0,children:(0,l.jsx)(m.Z,{navigationItems:M,showMore:!0})}),(0,l.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(b.Z,{after:r,afterHeader:n,afterHeightOffset:v.Mz,afterHidden:i,afterMousedownActive:U,afterWidth:Q,before:Z,beforeHeader:x,beforeHeightOffset:v.Mz,beforeMousedownActive:V,beforeWidth:Z?Y:a.k1,contained:C,headerOffset:W,hideAfterCompletely:!r||k,leftOffset:Z?a.k1:null,mainContainerHeader:E,mainContainerRef:q,setAfterHidden:T,setAfterMousedownActive:G,setAfterWidth:K,setBeforeMousedownActive:J,setBeforeWidth:L,children:[I&&(0,l.jsx)(h,{noPadding:S,children:I}),_]})})]}),B&&(0,l.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==N?void 0:N(null)},children:(0,l.jsx)(s.Z,y(y({},B),{},{onClose:function(){return null==N?void 0:N(null)}}))})]})}var Z=i.forwardRef(g)},14759:function(e,t,r){"use strict";r.r(t);var n=r(77837),o=r(38860),i=r.n(o),u=r(82684),s=r(44898),c=r(94629),f=r(88328),d=r(93808),a=r(38276),l=r(4190),p=r(5755),h=r(35686),b=r(70515),m=r(69419),j=r(28598);function v(e){var t,r=e.objectType,n=e.slug,o=(0,m.iV)().object_type,i=(0,u.useState)(null),d=i[0],v=i[1],w=o||r||s.Z,O=s.R===w,y=h.ZP.custom_templates.detail(n&&encodeURIComponent(n),{object_type:w}).data;return(0,u.useEffect)((function(){y&&v(null==y?void 0:y.custom_template)}),[y]),(0,j.jsxs)(c.Z,{addProjectBreadcrumbToCustomBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Templates"},linkProps:{href:O?"/templates?object_type=".concat(s.R):"/templates"}},{bold:!0,label:function(){return n}}],title:n,uuid:"TemplatesDetail/index",children:[!y&&(0,j.jsx)(a.Z,{p:b.cd,children:(0,j.jsx)(l.Z,{inverted:!0})}),d&&(0,j.jsxs)(j.Fragment,{children:[(!w||s.Z===w)&&(0,j.jsx)(p.Z,{template:d},null==d||null===(t=d.content)||void 0===t?void 0:t.slice(0,40)),O&&(0,j.jsx)(f.Z,{template:d})]})]})}v.getInitialProps=function(){var e=(0,n.Z)(i().mark((function e(t){var r,n,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.query,n=r.object_type,o=r.slug,e.abrupt("return",{objectType:n,slug:o});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.default=(0,d.Z)(v)},45082:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates/[...slug]",function(){return r(14759)}])},80022:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(61049);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(12539),o=r(80022);function i(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[449,4241,9774,2888,179],(function(){return t=45082,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5240],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return A}});var n=r(82394),o=r(21831),i=r(82684),u=r(50724),s=r(82555),f=r(97618),c=r(70613),d=r(31557),a=r(68899),l=r(28598);function h(e,t){var r=e.children,n=e.noPadding;return(0,l.jsx)(a.HS,{noPadding:n,ref:t,children:r})}var p=i.forwardRef(h),b=r(62547),w=r(82571),m=r(77417),j=r(46684),v=r(75375);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,i=e.afterHidden,h=e.afterWidth,O=e.afterWidthOverride,g=e.appendBreadcrumbs,A=e.before,Z=e.beforeHeader,P=e.beforeWidth,_=e.breadcrumbs,x=e.children,B=e.contained,C=e.errors,H=e.headerMenuItems,M=e.headerOffset,W=e.hideAfterCompletely,k=e.mainContainerHeader,E=e.navigationItems,T=e.setAfterHidden,N=e.setAfterWidth,R=e.setBeforeWidth,D=e.setErrors,S=e.subheaderChildren,I=e.subheaderNoPadding,z=e.title,U=e.uuid,X=(0,v.Z)(U,{beforeResizeOffset:v.H,setWidthAfter:N,setWidthBefore:R,widthAfter:h,widthBefore:P,widthOverrideAfter:O}),F=X.mainContainerRef,V=X.mousedownActiveAfter,q=X.mousedownActiveBefore,G=X.setMousedownActiveAfter,J=X.setMousedownActiveBefore,K=X.setWidthAfter,L=X.setWidthBefore,Q=X.widthAfter,Y=X.widthBefore,$=(0,m.Z)().project,ee=[];return _&&ee.push.apply(ee,(0,o.Z)(_)),null!=_&&_.length&&!g||!$||null!=_&&_.length||ee.unshift({bold:!g,label:function(){return z}}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.Z,{title:z}),(0,l.jsx)(d.Z,{breadcrumbs:ee,menuItems:H}),(0,l.jsxs)(a.Nk,{ref:t,children:[0!==(null==E?void 0:E.length)&&(0,l.jsx)(a.lm,{showMore:!0,children:(0,l.jsx)(w.Z,{navigationItems:E,showMore:!0})}),(0,l.jsx)(f.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(b.Z,{after:r,afterHeader:n,afterHeightOffset:j.Mz,afterHidden:i,afterMousedownActive:V,afterWidth:Q,before:A,beforeHeader:Z,beforeHeightOffset:j.Mz,beforeMousedownActive:q,beforeWidth:A?Y:a.k1,contained:B,headerOffset:M,hideAfterCompletely:!r||W,leftOffset:A?a.k1:null,mainContainerHeader:k,mainContainerRef:F,setAfterHidden:T,setAfterMousedownActive:G,setAfterWidth:K,setBeforeMousedownActive:J,setBeforeWidth:L,children:[S&&(0,l.jsx)(p,{noPadding:I,children:S}),x]})})]}),C&&(0,l.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==D?void 0:D(null)},children:(0,l.jsx)(s.Z,y(y({},C),{},{onClose:function(){return null==D?void 0:D(null)}}))})]})}var A=i.forwardRef(g)},60820:function(e,t,r){"use strict";r.r(t);var n=r(77837),o=r(38860),i=r.n(o),u=r(82684),s=r(60523),f=r(94629),c=r(93808),d=r(32929),a=r(44898),l=r(69419),h=r(28598);function p(){var e=(0,u.useState)(!1),t=e[0],r=e[1],n=(0,u.useState)(null),o=n[0],i=n[1],c=(0,u.useState)(null),p=c[0],b=c[1],w=(0,l.iV)();(0,u.useEffect)((function(){var e=w.new,t=w.object_type,n=w.pipeline_uuid;t&&i(t),n&&b(n),r(!!e)}),[w]);var m=(0,u.useMemo)((function(){var e=[t?"New":"Browse"];return o&&e.push(o),p&&e.push(p),e}),[t,o,p]),j=(0,u.useMemo)((function(){return a.R===o}),[o]);return(0,h.jsx)(f.Z,{addProjectBreadcrumbToCustomBreadcrumbs:t,breadcrumbs:t?[{label:function(){return"Templates"},linkProps:{href:j?"/templates?object_type=".concat(a.R):"/templates"}},{bold:!0,label:function(){return"New"}}]:null,title:"Templates",uuid:"Templates/index",children:(0,h.jsx)(s.Z,{defaultTab:j?d.A2:null,objectType:o,pipelineUUID:p,showAddingNewTemplates:t},m.join("_"))})}p.getInitialProps=(0,n.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,c.Z)(p)},87710:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates",function(){return r(60820)}])},80022:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(61049);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(12539),o=r(80022);function i(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[1557,4241,523,9774,2888,179],(function(){return t=87710,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5240],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return A}});var n=r(82394),o=r(21831),i=r(82684),u=r(50724),s=r(82555),f=r(97618),c=r(70613),d=r(92272),a=r(68899),l=r(28598);function h(e,t){var r=e.children,n=e.noPadding;return(0,l.jsx)(a.HS,{noPadding:n,ref:t,children:r})}var p=i.forwardRef(h),b=r(62547),w=r(82571),m=r(77417),j=r(46684),v=r(75375);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,i=e.afterHidden,h=e.afterWidth,O=e.afterWidthOverride,g=e.appendBreadcrumbs,A=e.before,Z=e.beforeHeader,P=e.beforeWidth,_=e.breadcrumbs,x=e.children,B=e.contained,C=e.errors,H=e.headerMenuItems,M=e.headerOffset,W=e.hideAfterCompletely,k=e.mainContainerHeader,E=e.navigationItems,T=e.setAfterHidden,N=e.setAfterWidth,R=e.setBeforeWidth,D=e.setErrors,S=e.subheaderChildren,I=e.subheaderNoPadding,z=e.title,U=e.uuid,X=(0,v.Z)(U,{beforeResizeOffset:v.H,setWidthAfter:N,setWidthBefore:R,widthAfter:h,widthBefore:P,widthOverrideAfter:O}),F=X.mainContainerRef,V=X.mousedownActiveAfter,q=X.mousedownActiveBefore,G=X.setMousedownActiveAfter,J=X.setMousedownActiveBefore,K=X.setWidthAfter,L=X.setWidthBefore,Q=X.widthAfter,Y=X.widthBefore,$=(0,m.Z)().project,ee=[];return _&&ee.push.apply(ee,(0,o.Z)(_)),null!=_&&_.length&&!g||!$||null!=_&&_.length||ee.unshift({bold:!g,label:function(){return z}}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.Z,{title:z}),(0,l.jsx)(d.Z,{breadcrumbs:ee,menuItems:H}),(0,l.jsxs)(a.Nk,{ref:t,children:[0!==(null==E?void 0:E.length)&&(0,l.jsx)(a.lm,{showMore:!0,children:(0,l.jsx)(w.Z,{navigationItems:E,showMore:!0})}),(0,l.jsx)(f.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(b.Z,{after:r,afterHeader:n,afterHeightOffset:j.Mz,afterHidden:i,afterMousedownActive:V,afterWidth:Q,before:A,beforeHeader:Z,beforeHeightOffset:j.Mz,beforeMousedownActive:q,beforeWidth:A?Y:a.k1,contained:B,headerOffset:M,hideAfterCompletely:!r||W,leftOffset:A?a.k1:null,mainContainerHeader:k,mainContainerRef:F,setAfterHidden:T,setAfterMousedownActive:G,setAfterWidth:K,setBeforeMousedownActive:J,setBeforeWidth:L,children:[S&&(0,l.jsx)(p,{noPadding:I,children:S}),x]})})]}),C&&(0,l.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==D?void 0:D(null)},children:(0,l.jsx)(s.Z,y(y({},C),{},{onClose:function(){return null==D?void 0:D(null)}}))})]})}var A=i.forwardRef(g)},60820:function(e,t,r){"use strict";r.r(t);var n=r(77837),o=r(38860),i=r.n(o),u=r(82684),s=r(60523),f=r(94629),c=r(93808),d=r(32929),a=r(44898),l=r(69419),h=r(28598);function p(){var e=(0,u.useState)(!1),t=e[0],r=e[1],n=(0,u.useState)(null),o=n[0],i=n[1],c=(0,u.useState)(null),p=c[0],b=c[1],w=(0,l.iV)();(0,u.useEffect)((function(){var e=w.new,t=w.object_type,n=w.pipeline_uuid;t&&i(t),n&&b(n),r(!!e)}),[w]);var m=(0,u.useMemo)((function(){var e=[t?"New":"Browse"];return o&&e.push(o),p&&e.push(p),e}),[t,o,p]),j=(0,u.useMemo)((function(){return a.R===o}),[o]);return(0,h.jsx)(f.Z,{addProjectBreadcrumbToCustomBreadcrumbs:t,breadcrumbs:t?[{label:function(){return"Templates"},linkProps:{href:j?"/templates?object_type=".concat(a.R):"/templates"}},{bold:!0,label:function(){return"New"}}]:null,title:"Templates",uuid:"Templates/index",children:(0,h.jsx)(s.Z,{defaultTab:j?d.A2:null,objectType:o,pipelineUUID:p,showAddingNewTemplates:t},m.join("_"))})}p.getInitialProps=(0,n.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,c.Z)(p)},87710:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates",function(){return r(60820)}])},80022:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(61049);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(12539),o=r(80022);function i(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[449,4241,523,9774,2888,179],(function(){return t=87710,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4841],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var n=r(82394),o=r(21831),i=r(82684),u=r(50724),c=r(82555),f=r(97618),s=r(70613),a=r(31557),d=r(68899),l=r(28598);function h(e,t){var r=e.children,n=e.noPadding;return(0,l.jsx)(d.HS,{noPadding:n,ref:t,children:r})}var p=i.forwardRef(h),b=r(62547),O=r(82571),v=r(77417),w=r(46684),y=r(75375);function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Z(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,i=e.afterHidden,h=e.afterWidth,j=e.afterWidthOverride,Z=e.appendBreadcrumbs,g=e.before,P=e.beforeHeader,x=e.beforeWidth,A=e.breadcrumbs,k=e.children,_=e.contained,M=e.errors,B=e.headerMenuItems,C=e.headerOffset,E=e.hideAfterCompletely,H=e.mainContainerHeader,W=e.navigationItems,R=e.setAfterHidden,D=e.setAfterWidth,I=e.setBeforeWidth,N=e.setErrors,S=e.subheaderChildren,T=e.subheaderNoPadding,z=e.title,X=e.uuid,q=(0,y.Z)(X,{beforeResizeOffset:y.H,setWidthAfter:D,setWidthBefore:I,widthAfter:h,widthBefore:x,widthOverrideAfter:j}),G=q.mainContainerRef,F=q.mousedownActiveAfter,L=q.mousedownActiveBefore,Y=q.setMousedownActiveAfter,J=q.setMousedownActiveBefore,K=q.setWidthAfter,Q=q.setWidthBefore,U=q.widthAfter,V=q.widthBefore,$=(0,v.Z)().project,ee=[];return A&&ee.push.apply(ee,(0,o.Z)(A)),null!=A&&A.length&&!Z||!$||null!=A&&A.length||ee.unshift({bold:!Z,label:function(){return z}}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.Z,{title:z}),(0,l.jsx)(a.Z,{breadcrumbs:ee,menuItems:B}),(0,l.jsxs)(d.Nk,{ref:t,children:[0!==(null==W?void 0:W.length)&&(0,l.jsx)(d.lm,{showMore:!0,children:(0,l.jsx)(O.Z,{navigationItems:W,showMore:!0})}),(0,l.jsx)(f.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(b.Z,{after:r,afterHeader:n,afterHeightOffset:w.Mz,afterHidden:i,afterMousedownActive:F,afterWidth:U,before:g,beforeHeader:P,beforeHeightOffset:w.Mz,beforeMousedownActive:L,beforeWidth:g?V:d.k1,contained:_,headerOffset:C,hideAfterCompletely:!r||E,leftOffset:g?d.k1:null,mainContainerHeader:H,mainContainerRef:G,setAfterHidden:R,setAfterMousedownActive:Y,setAfterWidth:K,setBeforeMousedownActive:J,setBeforeWidth:Q,children:[S&&(0,l.jsx)(p,{noPadding:T,children:S}),k]})})]}),M&&(0,l.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==N?void 0:N(null)},children:(0,l.jsx)(c.Z,m(m({},M),{},{onClose:function(){return null==N?void 0:N(null)}}))})]})}var g=i.forwardRef(Z)},93808:function(e,t,r){"use strict";r.d(t,{Z:function(){return k}});var n=r(77837),o=r(26304),i=r(62243),u=r(29385),c=r(80022),f=r(13692),s=r(93189),a=r(15544),d=r(82394),l=r(38860),h=r.n(l),p=r(82684),b=r(56663),O=r.n(b),v=r(40761),w=r(34661),y=r(36105),j=r(50178),m=r(69419),Z=r(28598),g=["auth"];function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){(0,d.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,a.Z)(e);if(t){var o=(0,a.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,s.Z)(this,r)}}function k(e){return function(t){(0,f.Z)(a,t);var r,s=A(a);function a(){var e;(0,i.Z)(this,a);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e=s.call.apply(s,[this].concat(r)),(0,d.Z)((0,c.Z)(e),"state",{auth:new v.Z(e.props.token)}),e}return(0,u.Z)(a,[{key:"componentDidMount",value:function(){this.setState({auth:new v.Z(this.props.token)})}},{key:"render",value:function(){var t=this.props,r=(t.auth,(0,o.Z)(t,g));return(0,Z.jsx)(e,x({auth:this.state.auth},r))}}],[{key:"getInitialProps",value:(r=(0,n.Z)(h().mark((function t(r){var n,o,i,u,c,f,s,a,d;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=O()(r),o=(0,j.ex)(r),i=o.id,u=n[w.Mv],c=n[y.qt],f=new v.Z(u),s=x(x({},r),{},{auth:f,currentGroupId:i,theme:c}),(0,j.YB)(r)&&f.isExpired&&(console.log("OAuth token has expired."),a=x(x({},r.query),{},{redirect_url:r.asPath}),(0,m.nL)("/sign-in?".concat((0,m.uM)(a)),r.res)),!e.getInitialProps){t.next=12;break}return t.next=10,e.getInitialProps(s);case 10:return d=t.sent,t.abrupt("return",x(x({},d),{},{auth:f,currentGroupId:i,theme:c}));case 12:return t.abrupt("return",s);case 13:case"end":return t.stop()}}),t)}))),function(e){return r.apply(this,arguments)})}]),a}(p.Component)}},74805:function(e,t,r){"use strict";r.r(t);var n=r(77837),o=r(38860),i=r.n(o),u=(r(82684),r(94629)),c=r(15305),f=r(93808),s=r(16682),a=r(82677),d=r(28598);function l(){return(0,d.jsx)(u.Z,{title:"Terminal",uuid:"terminal/index",children:(0,d.jsx)(c.Z,{containerRef:null,headerOffset:a.Mz,onMount:function(){return!0},uuid:s.X9.PortalTerminal})})}l.getInitialProps=(0,n.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,f.Z)(l)},27271:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/terminal",function(){return r(74805)}])},80022:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(61049);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(12539),o=r(80022);function i(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[1557,9774,2888,179],(function(){return t=27271,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4841],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var n=r(82394),o=r(21831),i=r(82684),u=r(50724),c=r(82555),f=r(97618),s=r(70613),a=r(92272),d=r(68899),l=r(28598);function h(e,t){var r=e.children,n=e.noPadding;return(0,l.jsx)(d.HS,{noPadding:n,ref:t,children:r})}var p=i.forwardRef(h),b=r(62547),O=r(82571),v=r(77417),w=r(46684),y=r(75375);function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Z(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,i=e.afterHidden,h=e.afterWidth,j=e.afterWidthOverride,Z=e.appendBreadcrumbs,g=e.before,P=e.beforeHeader,x=e.beforeWidth,A=e.breadcrumbs,k=e.children,_=e.contained,M=e.errors,B=e.headerMenuItems,C=e.headerOffset,E=e.hideAfterCompletely,H=e.mainContainerHeader,W=e.navigationItems,R=e.setAfterHidden,D=e.setAfterWidth,I=e.setBeforeWidth,N=e.setErrors,S=e.subheaderChildren,T=e.subheaderNoPadding,z=e.title,X=e.uuid,q=(0,y.Z)(X,{beforeResizeOffset:y.H,setWidthAfter:D,setWidthBefore:I,widthAfter:h,widthBefore:x,widthOverrideAfter:j}),G=q.mainContainerRef,F=q.mousedownActiveAfter,L=q.mousedownActiveBefore,Y=q.setMousedownActiveAfter,J=q.setMousedownActiveBefore,K=q.setWidthAfter,Q=q.setWidthBefore,U=q.widthAfter,V=q.widthBefore,$=(0,v.Z)().project,ee=[];return A&&ee.push.apply(ee,(0,o.Z)(A)),null!=A&&A.length&&!Z||!$||null!=A&&A.length||ee.unshift({bold:!Z,label:function(){return z}}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.Z,{title:z}),(0,l.jsx)(a.Z,{breadcrumbs:ee,menuItems:B}),(0,l.jsxs)(d.Nk,{ref:t,children:[0!==(null==W?void 0:W.length)&&(0,l.jsx)(d.lm,{showMore:!0,children:(0,l.jsx)(O.Z,{navigationItems:W,showMore:!0})}),(0,l.jsx)(f.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(b.Z,{after:r,afterHeader:n,afterHeightOffset:w.Mz,afterHidden:i,afterMousedownActive:F,afterWidth:U,before:g,beforeHeader:P,beforeHeightOffset:w.Mz,beforeMousedownActive:L,beforeWidth:g?V:d.k1,contained:_,headerOffset:C,hideAfterCompletely:!r||E,leftOffset:g?d.k1:null,mainContainerHeader:H,mainContainerRef:G,setAfterHidden:R,setAfterMousedownActive:Y,setAfterWidth:K,setBeforeMousedownActive:J,setBeforeWidth:Q,children:[S&&(0,l.jsx)(p,{noPadding:T,children:S}),k]})})]}),M&&(0,l.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==N?void 0:N(null)},children:(0,l.jsx)(c.Z,m(m({},M),{},{onClose:function(){return null==N?void 0:N(null)}}))})]})}var g=i.forwardRef(Z)},93808:function(e,t,r){"use strict";r.d(t,{Z:function(){return k}});var n=r(77837),o=r(26304),i=r(62243),u=r(29385),c=r(80022),f=r(13692),s=r(93189),a=r(15544),d=r(82394),l=r(38860),h=r.n(l),p=r(82684),b=r(56663),O=r.n(b),v=r(40761),w=r(34661),y=r(36105),j=r(50178),m=r(69419),Z=r(28598),g=["auth"];function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){(0,d.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,a.Z)(e);if(t){var o=(0,a.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,s.Z)(this,r)}}function k(e){return function(t){(0,f.Z)(a,t);var r,s=A(a);function a(){var e;(0,i.Z)(this,a);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e=s.call.apply(s,[this].concat(r)),(0,d.Z)((0,c.Z)(e),"state",{auth:new v.Z(e.props.token)}),e}return(0,u.Z)(a,[{key:"componentDidMount",value:function(){this.setState({auth:new v.Z(this.props.token)})}},{key:"render",value:function(){var t=this.props,r=(t.auth,(0,o.Z)(t,g));return(0,Z.jsx)(e,x({auth:this.state.auth},r))}}],[{key:"getInitialProps",value:(r=(0,n.Z)(h().mark((function t(r){var n,o,i,u,c,f,s,a,d;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=O()(r),o=(0,j.ex)(r),i=o.id,u=n[w.Mv],c=n[y.qt],f=new v.Z(u),s=x(x({},r),{},{auth:f,currentGroupId:i,theme:c}),(0,j.YB)(r)&&f.isExpired&&(console.log("OAuth token has expired."),a=x(x({},r.query),{},{redirect_url:r.asPath}),(0,m.nL)("/sign-in?".concat((0,m.uM)(a)),r.res)),!e.getInitialProps){t.next=12;break}return t.next=10,e.getInitialProps(s);case 10:return d=t.sent,t.abrupt("return",x(x({},d),{},{auth:f,currentGroupId:i,theme:c}));case 12:return t.abrupt("return",s);case 13:case"end":return t.stop()}}),t)}))),function(e){return r.apply(this,arguments)})}]),a}(p.Component)}},74805:function(e,t,r){"use strict";r.r(t);var n=r(77837),o=r(38860),i=r.n(o),u=(r(82684),r(94629)),c=r(15305),f=r(93808),s=r(16682),a=r(82677),d=r(28598);function l(){return(0,d.jsx)(u.Z,{title:"Terminal",uuid:"terminal/index",children:(0,d.jsx)(c.Z,{containerRef:null,headerOffset:a.Mz,onMount:function(){return!0},uuid:s.X9.PortalTerminal})})}l.getInitialProps=(0,n.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,f.Z)(l)},27271:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/terminal",function(){return r(74805)}])},80022:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(61049);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(12539),o=r(80022);function i(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[449,9774,2888,179],(function(){return t=27271,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5378],{16488:function(n,e,t){"use strict";t.d(e,{IJ:function(){return m},M8:function(){return C},Uc:function(){return N},XM:function(){return b},_U:function(){return p},eI:function(){return E},gU:function(){return T},lO:function(){return w},ri:function(){return h},tL:function(){return S},vJ:function(){return _},xH:function(){return O}});var r,u=t(82394),o=t(92083),i=t.n(o),c=t(3917),l=t(30229),s=t(4383),a=t(42122),f=t(86735);function d(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function v(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?d(Object(t),!0).forEach((function(e){(0,u.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var p=function(n){return!!n&&!Object.values(l.U5).includes(n)};function m(n){return null==n?void 0:n.reduce((function(n,e){var t=e.block_uuid,r=e.completed_at,o=e.started_at,c=e.status,l=null;o&&r&&(l=i()(r).valueOf()-i()(o).valueOf());return v(v({},n),{},(0,u.Z)({},t,{runtime:l,status:c}))}),{})}var g,h=function(n){var e=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:l.Xm.TIME},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:l.Xm.API}];return n?e.slice(0,1):e};function O(n){var e=(0,a.gR)(n,[l.gm.INTERVAL,l.gm.TYPE]),t=n[l.gm.INTERVAL];t&&(e["schedule_interval[]"]=encodeURIComponent(t));var r=n[l.gm.TYPE];return r&&(e["schedule_type[]"]=r),e}function E(n){return n?new Date(i()(n).valueOf()):null}function N(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return e?(0,c.XG)(n,e,t):function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"!=typeof n)return n;var t=n.split("+")[0];return i()(E(t)).format(e||c.Nx)}(n,t)}!function(n){n.DAY="day",n.HOUR="hour",n.MINUTE="minute",n.SECOND="second"}(g||(g={}));var S=(r={},(0,u.Z)(r,g.DAY,86400),(0,u.Z)(r,g.HOUR,3600),(0,u.Z)(r,g.MINUTE,60),(0,u.Z)(r,g.SECOND,1),r);function T(n){var e=g.SECOND,t=n;return n%86400==0?(t/=86400,e=g.DAY):n%3600==0?(t/=3600,e=g.HOUR):n%60==0&&(t/=60,e=g.MINUTE),{time:t,unit:e}}function _(n,e){return n*S[e]}function b(n,e,t){var r,u=i()(n);return u.set("hour",+(null==e?void 0:e.hour)||0),u.set("minute",+(null==e?void 0:e.minute)||0),u.set("second",0),r=u.format(c.TD),null!=t&&t.includeSeconds&&(r=r.concat(":00")),null!=t&&t.localTimezone&&(r=u.format(c.lE),null!=t&&t.convertToUtc&&(r=(0,c.d$)(r,{includeSeconds:null==t?void 0:t.includeSeconds,utcFormat:!0}))),r}function C(n){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t="",r=(0,s.XF)();return e?t="".concat(r,"/api/pipeline_schedules/").concat(null==n?void 0:n.id,"/api_trigger"):(t="".concat(r,"/api/pipeline_schedules/").concat(null==n?void 0:n.id,"/pipeline_runs"),null!=n&&n.token&&(t="".concat(t,"/").concat(n.token))),t}function x(n,e,t){return n.match(/[*,-/]/)?{additionalOffset:0,cronValue:n}:function(n,e,t){var r=t.indexOf(n),u=0;if(e<0)for(var o=0;o>e;o--)0===r?(r=t.length-1,u-=1):r-=1;else if(e>0)for(var i=0;i<e;i++)r===t.length-1?(r=0,u+=1):r+=1;var c="number"==typeof t[r]?t[r]:n;return{additionalOffset:u,cronValue:String(c)}}(+n,e,t)}var j=(0,f.m5)(60),P=(0,f.m5)(24),Z=(0,c.Cs)();function w(n,e){if(!n)return n;var t=i()().local().format("Z"),r=t.split(":"),u="-"===t[0],o=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),c=Number(r[1]);(u&&!e||!u&&e)&&(o=-o,c=-c);var l=n.split(" "),s=l[0],a=l[1],f=l[2],d=x(s,c,j),v=x(a,o+d.additionalOffset,P);if(l[0]=d.cronValue,l[1]=v.cronValue,0!==(null==v?void 0:v.additionalOffset)){var p=x(f,v.additionalOffset,Z);l[2]=p.cronValue}return l.join(" ")}},51697:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return A}});var r,u,o,i,c,l=t(77837),s=t(38860),a=t.n(s),f=t(89565),d=t.n(f),v=t(82684),p=t(38276),m=t(55485),g=t(97618),h=t(2367),O=t(21831),E=t(75582),N=t(83455),S=t(35686);!function(n){n[n.CONNECTING=0]="CONNECTING",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"}(r||(r={})),function(n){n.DATA="data",n.STDOUT="stdout"}(u||(u={})),function(n){n.EXECUTION="execution",n.EXECUTION_STATUS="execution_status",n.TASK="task",n.TASK_STATUS="task_status"}(o||(o={})),function(n){n.ERROR="error",n.FAILURE="failure",n.RUNNING="running",n.SUCCESS="success"}(i||(i={})),function(n){n.CLOSED="closed",n.CONNECTING="connecting",n.OPEN="open",n.RECONNECTING="reconnecting"}(c||(c={}));var T=t(4383),_=t(72619),b=t(87432),C=t(81728);function x(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{autoReconnect:!0,maxConnectionAttempts:10},t=e.autoReconnect,u=e.maxConnectionAttempts,o=(0,v.useRef)(u),i=(0,v.useRef)(null),l=(0,v.useRef)(null),s=(0,v.useState)([]),a=s[0],f=s[1],d=(0,v.useState)([]),p=d[0],m=d[1],g=(0,v.useState)([]),h=g[0],x=g[1],j=(0,v.useState)(c.CONNECTING),P=j[0],Z=j[1],w=(0,N.Db)((function(e){return m((function(n){return[].concat((0,O.Z)(n),[null])})),S.ZP.code_executions.useCreate()({code_execution:{message:null==e?void 0:e.message,message_request_uuid:(0,C.Mp)(),timestamp:Number(new Date),uuid:n}})}),{onSuccess:function(n){return(0,_.wD)(n,{callback:function(n){(0,b.L1)()&&console.log("useEventStreams.createMessage",n),null!=n&&n.server_sent_event&&x((function(e){return[].concat((0,O.Z)(e),[null==n?void 0:n.server_sent_event])}))},onErrorCallback:function(n){f((function(e){return[].concat((0,O.Z)(e),[n])}))}})}}),I=(0,E.Z)(w,2),y=I[0],D=I[1].isLoading;function U(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||(null==i?void 0:i.current);n&&(null==n||n.close()),null!=i&&i.current&&(i.current=null),Z(c.CLOSED)}function R(n,e){if(e<=0)console.log("Max reconnection attempts reached. Stopping reconnection.");else{var u=e;null!=i&&i.current&&(r.OPEN===(null==i?void 0:i.current.readyState)?(Z(c.OPEN),u=null==o?void 0:o.current,clearTimeout(null==l?void 0:l.current)):U());var s=null==i?void 0:i.current;s||(console.log("Connecting to server..."),i.current=new EventSource((0,T.if)(n)),(s=null==i?void 0:i.current)&&(s.onopen=function(n){(0,b.L1)()&&console.log("useEventStreams.onopen",s,n),Z(c.OPEN)},s.onmessage=function(e){(0,b.L1)()&&console.log("useEventStreams.onmessage",e);var t=JSON.parse(e.data);t.uuid===n&&m((function(n){return[].concat((0,O.Z)(n),[t])}))},s.onerror=function(e){console.error("EventSource failed with error: ",e),f((function(n){return[].concat((0,O.Z)(n),[e])})),U(),t&&(Z(c.RECONNECTING),clearTimeout(null==l?void 0:l.current),l.current=setTimeout((function(){console.log("Reconnecting to server witth ".concat(u," attempt(s) remaining...")),R(n,u-1)}),1e3*(Math.max(0,(null==o?void 0:o.current)-u)+1)))}))}}return(0,v.useEffect)((function(){R(n,1+(t&&(null==o?void 0:o.current)||0));var e=null==i?void 0:i.current;return function(){U(e)}}),[t,n]),{errors:a,events:p,loading:D,messages:h,recentEvent:null==p?void 0:p[(null==p?void 0:p.length)-1],sendMessage:y,status:P}}var j=t(3917),P=t(92083),Z=t.n(P),w=t(35576),I=t(16488),y=t(70320),D=t(71180),U=t(30160),R=t(28598);function k(n){var e=n.error,t=(0,h.Z)({response:{error:e},stackTraceVisible:!0,tracebackVisible:!0}),r=t.displayMessage,u=t.exception,o=t.links,i=t.stackTrace,c=t.traceback;return(0,R.jsxs)("div",{children:[(0,R.jsx)(U.ZP,{bold:!0,large:!0,children:"Error"}),r&&(0,R.jsx)(p.Z,{mt:1,children:r}),u&&(0,R.jsx)(p.Z,{mt:1,children:u}),c&&(0,R.jsx)(p.Z,{mt:2,children:c}),i&&(0,R.jsx)(p.Z,{mt:2,children:i}),o]})}function M(n){var e=n.uuid,t=(0,y.qB)(),r=(0,v.useState)(""),o=r[0],i=r[1],c=x(e),l=c.errors,s=c.events,a=c.loading,f=c.sendMessage,p=c.status;null!=l&&l.length&&console.log(l);var h=(0,v.useMemo)((function(){var n,e;return null==s||null===(n=s[(null==s?void 0:s.length)-1])||void 0===n||null===(e=n.result)||void 0===e?void 0:e.error}),[s]),O=(0,v.useMemo)((function(){return null==s?void 0:s.filter((function(n){return!!n}))}),[s]),E=(0,v.useMemo)((function(){var n;return(null==O||null===(n=O.filter((function(n){var e;return(null==n||null===(e=n.result)||void 0===e?void 0:e.type)===u.STDOUT})))||void 0===n?void 0:n.length)||0}),[O]);return console.log(s),(0,R.jsxs)("div",{children:[h&&(0,R.jsx)(k,{error:h}),null==O?void 0:O.map((function(n,e){if(!n)return null;var r=n.event_uuid,u=n.result,o=n.timestamp,i=u||{output:null,output_text:null},c=(i.output,i.output_text),l=(0,C.NE)("",String(E).length-String(e).length,"&nbsp;")+"[".concat(e,"]");return(0,R.jsx)("div",{children:(0,R.jsxs)(m.ZP,{alignItems:"flex-start",fullWidth:!0,justifyContent:"space-between",children:[(0,R.jsx)(g.Z,{children:(0,R.jsxs)(U.ZP,{monospace:!0,preWrap:!0,children:[(0,R.jsx)(U.ZP,{default:!0,inline:!0,monospace:!0,children:(0,R.jsx)("span",{dangerouslySetInnerHTML:{__html:l}})})," ",(0,R.jsx)(d(),{children:c})]})}),(0,R.jsx)(U.ZP,{monospace:!0,muted:!0,children:(0,I.Uc)(Z()(o).format(j.BL),t,j.BL)})]})},r)})),(0,R.jsx)(w.Z,{autoGrow:!0,label:"Message",monospace:!0,name:"message",onChange:function(n){return i(n.target.value)},rows:12}),(0,R.jsxs)(D.ZP,{loading:a,onClick:function(){return f({message:o})},children:["Send Message (",p,")"]})]})}M.getInitialProps=function(){var n=(0,l.Z)(a().mark((function n(e){var t;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.query.uuid,n.abrupt("return",{uuid:t});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();var A=M},91185:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/test",function(){return t(51697)}])}},function(n){n.O(0,[9774,2888,179],(function(){return e=91185,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[585],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return Z}});var n=r(82394),o=r(21831),i=r(82684),u=r(50724),c=r(82555),s=r(97618),a=r(70613),l=r(92272),f=r(68899),d=r(28598);function p(e,t){var r=e.children,n=e.noPadding;return(0,d.jsx)(f.HS,{noPadding:n,ref:t,children:r})}var h=i.forwardRef(p),v=r(62547),b=r(82571),g=r(77417),O=r(46684),m=r(75375);function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function P(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,i=e.afterHidden,p=e.afterWidth,j=e.afterWidthOverride,P=e.appendBreadcrumbs,Z=e.before,w=e.beforeHeader,x=e.beforeWidth,k=e.breadcrumbs,A=e.children,E=e.contained,C=e.errors,_=e.headerMenuItems,D=e.headerOffset,I=e.hideAfterCompletely,M=e.mainContainerHeader,R=e.navigationItems,S=e.setAfterHidden,T=e.setAfterWidth,N=e.setBeforeWidth,B=e.setErrors,H=e.subheaderChildren,U=e.subheaderNoPadding,W=e.title,L=e.uuid,F=(0,m.Z)(L,{beforeResizeOffset:m.H,setWidthAfter:T,setWidthBefore:N,widthAfter:p,widthBefore:x,widthOverrideAfter:j}),V=F.mainContainerRef,X=F.mousedownActiveAfter,Y=F.mousedownActiveBefore,z=F.setMousedownActiveAfter,J=F.setMousedownActiveBefore,Q=F.setWidthAfter,G=F.setWidthBefore,q=F.widthAfter,$=F.widthBefore,K=(0,g.Z)().project,ee=[];return k&&ee.push.apply(ee,(0,o.Z)(k)),null!=k&&k.length&&!P||!K||null!=k&&k.length||ee.unshift({bold:!P,label:function(){return W}}),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(a.Z,{title:W}),(0,d.jsx)(l.Z,{breadcrumbs:ee,menuItems:_}),(0,d.jsxs)(f.Nk,{ref:t,children:[0!==(null==R?void 0:R.length)&&(0,d.jsx)(f.lm,{showMore:!0,children:(0,d.jsx)(b.Z,{navigationItems:R,showMore:!0})}),(0,d.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,d.jsxs)(v.Z,{after:r,afterHeader:n,afterHeightOffset:O.Mz,afterHidden:i,afterMousedownActive:X,afterWidth:q,before:Z,beforeHeader:w,beforeHeightOffset:O.Mz,beforeMousedownActive:Y,beforeWidth:Z?$:f.k1,contained:E,headerOffset:D,hideAfterCompletely:!r||I,leftOffset:Z?f.k1:null,mainContainerHeader:M,mainContainerRef:V,setAfterHidden:S,setAfterMousedownActive:z,setAfterWidth:Q,setBeforeMousedownActive:J,setBeforeWidth:G,children:[H&&(0,d.jsx)(h,{noPadding:U,children:H}),A]})})]}),C&&(0,d.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==B?void 0:B(null)},children:(0,d.jsx)(c.Z,y(y({},C),{},{onClose:function(){return null==B?void 0:B(null)}}))})]})}var Z=i.forwardRef(P)},16488:function(e,t,r){"use strict";r.d(t,{IJ:function(){return v},M8:function(){return x},Uc:function(){return j},XM:function(){return w},_U:function(){return h},eI:function(){return m},gU:function(){return P},lO:function(){return _},ri:function(){return g},tL:function(){return y},vJ:function(){return Z},xH:function(){return O}});var n,o=r(82394),i=r(92083),u=r.n(i),c=r(3917),s=r(30229),a=r(4383),l=r(42122),f=r(86735);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){(0,o.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var h=function(e){return!!e&&!Object.values(s.U5).includes(e)};function v(e){return null==e?void 0:e.reduce((function(e,t){var r=t.block_uuid,n=t.completed_at,i=t.started_at,c=t.status,s=null;i&&n&&(s=u()(n).valueOf()-u()(i).valueOf());return p(p({},e),{},(0,o.Z)({},r,{runtime:s,status:c}))}),{})}var b,g=function(e){var t=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:s.Xm.TIME},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:s.Xm.API}];return e?t.slice(0,1):t};function O(e){var t=(0,l.gR)(e,[s.gm.INTERVAL,s.gm.TYPE]),r=e[s.gm.INTERVAL];r&&(t["schedule_interval[]"]=encodeURIComponent(r));var n=e[s.gm.TYPE];return n&&(t["schedule_type[]"]=n),t}function m(e){return e?new Date(u()(e).valueOf()):null}function j(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t?(0,c.XG)(e,t,r):function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"!=typeof e)return e;var r=e.split("+")[0];return u()(m(r)).format(t||c.Nx)}(e,r)}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(b||(b={}));var y=(n={},(0,o.Z)(n,b.DAY,86400),(0,o.Z)(n,b.HOUR,3600),(0,o.Z)(n,b.MINUTE,60),(0,o.Z)(n,b.SECOND,1),n);function P(e){var t=b.SECOND,r=e;return e%86400==0?(r/=86400,t=b.DAY):e%3600==0?(r/=3600,t=b.HOUR):e%60==0&&(r/=60,t=b.MINUTE),{time:r,unit:t}}function Z(e,t){return e*y[t]}function w(e,t,r){var n,o=u()(e);return o.set("hour",+(null==t?void 0:t.hour)||0),o.set("minute",+(null==t?void 0:t.minute)||0),o.set("second",0),n=o.format(c.TD),null!=r&&r.includeSeconds&&(n=n.concat(":00")),null!=r&&r.localTimezone&&(n=o.format(c.lE),null!=r&&r.convertToUtc&&(n=(0,c.d$)(n,{includeSeconds:null==r?void 0:r.includeSeconds,utcFormat:!0}))),n}function x(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n=(0,a.XF)();return t?r="".concat(n,"/api/pipeline_schedules/").concat(null==e?void 0:e.id,"/api_trigger"):(r="".concat(n,"/api/pipeline_schedules/").concat(null==e?void 0:e.id,"/pipeline_runs"),null!=e&&e.token&&(r="".concat(r,"/").concat(e.token))),r}function k(e,t,r){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,t,r){var n=r.indexOf(e),o=0;if(t<0)for(var i=0;i>t;i--)0===n?(n=r.length-1,o-=1):n-=1;else if(t>0)for(var u=0;u<t;u++)n===r.length-1?(n=0,o+=1):n+=1;var c="number"==typeof r[n]?r[n]:e;return{additionalOffset:o,cronValue:String(c)}}(+e,t,r)}var A=(0,f.m5)(60),E=(0,f.m5)(24),C=(0,c.Cs)();function _(e,t){if(!e)return e;var r=u()().local().format("Z"),n=r.split(":"),o="-"===r[0],i=3===n[0].length?Number(n[0].slice(1)):Number(n[0]),c=Number(n[1]);(o&&!t||!o&&t)&&(i=-i,c=-c);var s=e.split(" "),a=s[0],l=s[1],f=s[2],d=k(a,c,A),p=k(l,i+d.additionalOffset,E);if(s[0]=d.cronValue,s[1]=p.cronValue,0!==(null==p?void 0:p.additionalOffset)){var h=k(f,p.additionalOffset,C);s[2]=h.cronValue}return s.join(" ")}},55072:function(e,t,r){"use strict";r.d(t,{Et:function(){return d},Q:function(){return f}});r(82684);var n=r(71180),o=r(55485),i=r(38276),u=r(31748),c=r(72473),s=r(79633),a=r(70515),l=r(28598),f=30,d=9;t.ZP=function(e){var t=e.page,r=e.maxPages,f=e.onUpdate,d=e.totalPages,p=[],h=r;if(h>d)p=Array.from({length:d},(function(e,t){return t}));else{var v=Math.floor(h/2),b=t-v;t+v>=d?(b=d-h+2,h-=2):t-v<=0?(b=0,h-=2):(h-=4,b=t-Math.floor(h/2)),p=Array.from({length:h},(function(e,t){return t+b}))}return(0,l.jsx)(l.Fragment,{children:d>0&&(0,l.jsxs)(o.ZP,{alignItems:"center",children:[(0,l.jsx)(n.ZP,{disabled:0===t,onClick:function(){return f(t-1)},children:(0,l.jsx)(c.PaginateArrowLeft,{size:1.5*a.iI,stroke:u.Av})}),!p.includes(0)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.Z,{ml:1,children:(0,l.jsx)(n.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return f(0)},children:1})},0),!p.includes(1)&&(0,l.jsx)(i.Z,{ml:1,children:(0,l.jsx)(n.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),p.map((function(e){return(0,l.jsx)(i.Z,{ml:1,children:(0,l.jsx)(n.ZP,{backgroundColor:e===t&&s.a$,borderLess:!0,noBackground:!0,notClickable:e===t,onClick:function(){e!==t&&f(e)},children:e+1})},e)})),!p.includes(d-1)&&(0,l.jsxs)(l.Fragment,{children:[!p.includes(d-2)&&(0,l.jsx)(i.Z,{ml:1,children:(0,l.jsx)(n.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,l.jsx)(i.Z,{ml:1,children:(0,l.jsx)(n.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return f(d-1)},children:d})},d-1)]}),(0,l.jsx)(i.Z,{ml:1}),(0,l.jsx)(n.ZP,{disabled:t===d-1,onClick:function(){return f(t+1)},children:(0,l.jsx)(c.PaginateArrowRight,{size:1.5*a.iI,stroke:u.Av})})]})})}},93808:function(e,t,r){"use strict";r.d(t,{Z:function(){return A}});var n=r(77837),o=r(26304),i=r(62243),u=r(29385),c=r(80022),s=r(13692),a=r(93189),l=r(15544),f=r(82394),d=r(38860),p=r.n(d),h=r(82684),v=r(56663),b=r.n(v),g=r(40761),O=r(34661),m=r(36105),j=r(50178),y=r(69419),P=r(28598),Z=["auth"];function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){(0,f.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,l.Z)(e);if(t){var o=(0,l.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,a.Z)(this,r)}}function A(e){return function(t){(0,s.Z)(l,t);var r,a=k(l);function l(){var e;(0,i.Z)(this,l);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e=a.call.apply(a,[this].concat(r)),(0,f.Z)((0,c.Z)(e),"state",{auth:new g.Z(e.props.token)}),e}return(0,u.Z)(l,[{key:"componentDidMount",value:function(){this.setState({auth:new g.Z(this.props.token)})}},{key:"render",value:function(){var t=this.props,r=(t.auth,(0,o.Z)(t,Z));return(0,P.jsx)(e,x({auth:this.state.auth},r))}}],[{key:"getInitialProps",value:(r=(0,n.Z)(p().mark((function t(r){var n,o,i,u,c,s,a,l,f;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=b()(r),o=(0,j.ex)(r),i=o.id,u=n[O.Mv],c=n[m.qt],s=new g.Z(u),a=x(x({},r),{},{auth:s,currentGroupId:i,theme:c}),(0,j.YB)(r)&&s.isExpired&&(console.log("OAuth token has expired."),l=x(x({},r.query),{},{redirect_url:r.asPath}),(0,y.nL)("/sign-in?".concat((0,y.uM)(l)),r.res)),!e.getInitialProps){t.next=12;break}return t.next=10,e.getInitialProps(a);case 10:return f=t.sent,t.abrupt("return",x(x({},f),{},{auth:s,currentGroupId:i,theme:c}));case 12:return t.abrupt("return",a);case 13:case"end":return t.stop()}}),t)}))),function(e){return r.apply(this,arguments)})}]),l}(h.Component)}},77174:function(e,t,r){"use strict";r.r(t);var n=r(77837),o=r(82394),i=r(75582),u=r(38860),c=r.n(u),s=r(82684),a=r(34376),l=r(94629),f=r(55485),d=r(55072),p=r(93808),h=r(82359),v=r(44085),b=r(38276),g=r(4190),O=r(30160),m=r(29624),j=r(35686),y=r(30229),P=r(70515),Z=r(15610),w=r(69419),x=r(70320),k=r(28598);function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function E(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){(0,o.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function C(){var e=(0,a.useRouter)(),t=(0,s.useState)(null),r=t[0],n=t[1],o=(0,w.iV)(),u=null!=o&&o.page?o.page:0,c=(null==o?void 0:o.order_by)||y.kJ.CREATED_AT,p=j.ZP.projects.list().data,A=(0,s.useMemo)((function(){var e;return null==p||null===(e=p.projects)||void 0===e?void 0:e[0]}),[p]),C=((0,s.useMemo)((function(){var e;return(0,x.hY)(null==A||null===(e=A.features)||void 0===e?void 0:e[h.d.LOCAL_TIMEZONE])}),[null==A?void 0:A.features]),{_limit:d.Q,_offset:u*d.Q,order_by:c}),_=j.ZP.pipeline_schedules.list(C,{refreshInterval:7500,revalidateOnFocus:!0}),D=_.data,I=_.mutate,M=(0,s.useMemo)((function(){return(null==D?void 0:D.pipeline_schedules)||[]}),[D]),R=(0,s.useMemo)((function(){var e;return(null==D||null===(e=D.metadata)||void 0===e?void 0:e.count)||[]}),[D]);return(0,k.jsxs)(l.Z,{errors:r,setErrors:n,title:"Triggers",uuid:"triggers/index",children:[(0,k.jsx)(b.Z,{mx:2,my:1,children:(0,k.jsxs)(f.ZP,{alignItems:"center",children:[(0,k.jsx)(O.ZP,{bold:!0,default:!0,large:!0,children:"Sort by:"}),(0,k.jsx)(b.Z,{mr:1}),(0,k.jsx)(v.Z,{compact:!0,defaultColor:!0,fitContent:!0,onChange:function(e){e.preventDefault(),(0,Z.u)({order_by:e.target.value,page:0})},paddingRight:4*P.iI,placeholder:"Select column",value:c||y.kJ.CREATED_AT,children:Object.entries(y.TR).map((function(e){var t=(0,i.Z)(e,2),r=t[0],n=t[1];return(0,k.jsx)("option",{value:r,children:n},r)}))})]})}),D?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(m.Z,{fetchPipelineSchedules:I,highlightRowOnHover:!0,includeCreatedAtColumn:!0,includePipelineColumn:!0,pipelineSchedules:M,setErrors:n,stickyHeader:!0}),(0,k.jsx)(b.Z,{p:2,children:(0,k.jsx)(d.ZP,{maxPages:9,onUpdate:function(t){var r=Number(t),n=E(E({},o),{},{page:r>=0?r:0});e.push("/triggers","/triggers?".concat((0,w.uM)(n)))},page:Number(u),totalPages:Math.ceil(R/d.Q)})})]}):(0,k.jsx)(b.Z,{m:2,children:(0,k.jsx)(g.Z,{inverted:!0,large:!0})})]})}C.getInitialProps=(0,n.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,p.Z)(C)},59733:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/triggers",function(){return r(77174)}])},80022:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(61049);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(12539),o=r(80022);function i(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[449,9624,9774,2888,179],(function(){return t=59733,e(e.s=t);var t}));var t=e.O();_N_E=t}]);