mage-ai 0.9.13__py3-none-any.whl → 0.9.15__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.
- mage_ai/ai/generator.py +1 -1
- mage_ai/ai/generator_cmds.py +1 -1
- mage_ai/ai/llm_pipeline_wizard.py +31 -17
- mage_ai/api/policies/PipelineRunPolicy.py +1 -0
- mage_ai/api/presenters/BlockRunPresenter.py +4 -1
- mage_ai/api/presenters/PipelineRunPresenter.py +2 -0
- mage_ai/api/resources/BlockRunResource.py +18 -12
- mage_ai/api/resources/GitBranchResource.py +8 -1
- mage_ai/api/resources/PipelineResource.py +30 -14
- mage_ai/api/resources/PipelineRunResource.py +8 -5
- mage_ai/data_integrations/sources/constants.py +1 -0
- mage_ai/data_preparation/executors/block_executor.py +5 -7
- mage_ai/data_preparation/git/__init__.py +18 -0
- mage_ai/data_preparation/models/block/__init__.py +13 -1
- mage_ai/data_preparation/models/block/dbt/utils/__init__.py +5 -2
- mage_ai/data_preparation/models/block/integration/__init__.py +1 -1
- mage_ai/data_preparation/models/custom_templates/utils.py +14 -4
- mage_ai/data_preparation/models/variable.py +5 -2
- mage_ai/data_preparation/templates/constants.py +16 -0
- mage_ai/data_preparation/templates/data_exporters/mssql.py +32 -0
- mage_ai/data_preparation/templates/data_loaders/mssql.py +27 -0
- mage_ai/io/base.py +5 -0
- mage_ai/io/mssql.py +1 -0
- mage_ai/orchestration/db/models/base.py +15 -15
- mage_ai/orchestration/db/models/oauth.py +35 -4
- mage_ai/orchestration/db/models/schedules.py +4 -0
- mage_ai/orchestration/pipeline_scheduler.py +12 -6
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/404.html.html +2 -2
- mage_ai/server/frontend_dist/_next/static/chunks/{1005-ee665ba499795660.js → 1005-a2f0e3ee378ef02b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1424-fca78f21a81a7183.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2786-756b3834d10b8711.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3391-e1578fe1bdb5a557.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/6299-9b785c07dacf22b3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7496-7e4dd11e3f3b8e79.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8952-050e60a8b1eaa32a.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/9605-e40d076d9fc36d83.js → frontend_dist/_next/static/chunks/9605-9332e1686c46da7d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-ccc78f4c29a2a431.js → _app-9dae6fa5126cf001.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-03841b6dd7d240f6.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-6e2c0e3f818fd4de.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-6e59dc4e57dd2680.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-02295848c811e26a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-4a2671811a153411.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-ddaca2c267def72a.js → syncs-484581ae34a1c596.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ce11db27e4af7869.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-91889109af36a793.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-ff1faac7a72b1af1.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-624a2d7cbe6303b4.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/triggers-eee16a91f281f92d.js → frontend_dist/_next/static/chunks/pages/triggers-71bbb30dd9b57f80.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/gJQ7p6K0VGDZzX1HXtRED → frontend_dist/_next/static/h5mR3pjfn_EQy348CZ_ok}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist/files.html +2 -2
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-data-products.html +2 -2
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/settings.html +2 -2
- mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist/manage/users.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/overview.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +11 -11
- mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist/templates.html +2 -2
- mage_ai/server/frontend_dist/terminal.html +2 -2
- mage_ai/server/frontend_dist/test.html +3 -3
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/frontend_dist/version-control.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/404.html.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1005-ee665ba499795660.js → 1005-a2f0e3ee378ef02b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1424-fca78f21a81a7183.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2786-756b3834d10b8711.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3391-e1578fe1bdb5a557.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6299-9b785c07dacf22b3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7496-7e4dd11e3f3b8e79.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8952-050e60a8b1eaa32a.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/9605-e40d076d9fc36d83.js → frontend_dist_base_path_template/_next/static/chunks/9605-9332e1686c46da7d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-ccc78f4c29a2a431.js → _app-9dae6fa5126cf001.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-03841b6dd7d240f6.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-6e2c0e3f818fd4de.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-6e59dc4e57dd2680.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-02295848c811e26a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-4a2671811a153411.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-ddaca2c267def72a.js → syncs-484581ae34a1c596.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ce11db27e4af7869.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-91889109af36a793.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-ff1faac7a72b1af1.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-624a2d7cbe6303b4.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/triggers-eee16a91f281f92d.js → frontend_dist_base_path_template/_next/static/chunks/pages/triggers-71bbb30dd9b57f80.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/O4HzlRY2U3Q47jF8s3D-E → frontend_dist_base_path_template/_next/static/xykYLW_ARw5SevdiponLI}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
- mage_ai/server/server.py +12 -1
- mage_ai/services/spark/spark.py +75 -2
- mage_ai/shared/retry.py +1 -1
- mage_ai/tests/data_preparation/models/custom_templates/__init__.py +0 -0
- mage_ai/tests/data_preparation/models/custom_templates/test_utils.py +36 -0
- mage_ai/tests/data_preparation/models/test_block.py +48 -0
- mage_ai/tests/services/spark/__init__.py +0 -0
- mage_ai/tests/services/spark/test_spark.py +52 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/METADATA +1 -1
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/RECORD +164 -159
- mage_ai/server/frontend_dist/_next/static/chunks/1424-846b754e84e6eac1.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2786-ba6f486fcaf52ba0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3391-6f0a0a5c254cd7f2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6299-fcb702d0f3d3291b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7496-7d0f9adf0b333801.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8952-9d6fa18fa9378989.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-2dc2a0dfc0ff620d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-6577159a0af52a78.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-615ab9e61f0f39ed.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-df014ddb14ebcef4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1424-846b754e84e6eac1.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2786-ba6f486fcaf52ba0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3391-6f0a0a5c254cd7f2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6299-fcb702d0f3d3291b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7496-7d0f9adf0b333801.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8952-9d6fa18fa9378989.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-2dc2a0dfc0ff620d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-6577159a0af52a78.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-615ab9e61f0f39ed.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-df014ddb14ebcef4.js +0 -1
- mage_ai/tests/orchestration/db/test_models.py +0 -710
- /mage_ai/server/frontend_dist/_next/static/{O4HzlRY2U3Q47jF8s3D-E → h5mR3pjfn_EQy348CZ_ok}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist/_next/static/{O4HzlRY2U3Q47jF8s3D-E → h5mR3pjfn_EQy348CZ_ok}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{gJQ7p6K0VGDZzX1HXtRED → xykYLW_ARw5SevdiponLI}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{gJQ7p6K0VGDZzX1HXtRED → xykYLW_ARw5SevdiponLI}/_ssgManifest.js +0 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7869],{48591:function(e,n,t){"use strict";var i=t(21831),r=t(75582),o=t(82684),u=t(37958);n.Z=function(e){var n=e.children,t=e.uuid,l=e.uuids,c=void 0===l?[]:l,s=(0,u.j)("apiReloads"),a=(0,r.Z)(s,1)[0],d=(0,i.Z)(c);t&&d.push(t);var f=d.map((function(e){return String(a[e])||"-"})).join("_");return o.cloneElement(n,{key:f})}},1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var i=t(82394),r=t(21831),o=t(82684),u=t(47999),l=t(49894),c=t(93461),s=t(57384),a=t(41424),d=t(72454),f=t(28598);function v(e,n){var t=e.children;return(0,f.jsx)(d.HS,{ref:n,children:t})}var p=o.forwardRef(v),h=t(32063),b=t(85019),m=t(82531),g=t(66166),j=t(3055),O=t(49125),y=t(91427),x=t(24141);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 C(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,i.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 Z=function(e){var n,t=e.addProjectBreadcrumbToCustomBreadcrumbs,i=e.after,v=e.afterHidden,w=e.afterWidth,Z=e.afterWidthOverride,P=e.before,S=e.beforeWidth,k=e.breadcrumbs,D=e.children,M=e.errors,E=e.headerMenuItems,_=e.headerOffset,I=e.mainContainerHeader,R=e.navigationItems,T=e.setErrors,F=e.subheaderChildren,A=e.title,N=e.uuid,H=(0,x.i)().width,U="dashboard_after_width_".concat(N),W="dashboard_before_width_".concat(N),Y=(0,o.useRef)(null),V=(0,o.useState)(Z?w:(0,y.U2)(U,w)),z=V[0],L=V[1],B=(0,o.useState)(!1),K=B[0],X=B[1],G=(0,o.useState)(P?Math.max((0,y.U2)(W,S),13*O.iI):null),J=G[0],Q=G[1],q=(0,o.useState)(!1),$=q[0],ee=q[1],ne=(0,o.useState)(null)[1],te=m.ZP.projects.list({},{revalidateOnFocus:!1}).data,ie=null===te||void 0===te?void 0:te.projects,re={label:function(){var e;return null===ie||void 0===ie||null===(e=ie[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},oe=[];k?(t&&oe.push(re),oe.push.apply(oe,(0,r.Z)(k))):(null===ie||void 0===ie?void 0:ie.length)>=1&&oe.push.apply(oe,[re,{bold:!0,label:function(){return A}}]),(0,o.useEffect)((function(){null===Y||void 0===Y||!Y.current||K||$||null===ne||void 0===ne||ne(Y.current.getBoundingClientRect().width)}),[K,z,$,J,Y,ne,H]),(0,o.useEffect)((function(){K||(0,y.t8)(U,z)}),[v,K,z,U]),(0,o.useEffect)((function(){$||(0,y.t8)(W,J)}),[$,J,W]);var ue=(0,g.Z)(w);return(0,o.useEffect)((function(){Z&&ue!==w&&L(w)}),[Z,w,ue]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.Z,{title:A}),(0,f.jsx)(a.Z,{breadcrumbs:oe,menuItems:E,project:null===ie||void 0===ie?void 0:ie[0],version:null===ie||void 0===ie||null===(n=ie[0])||void 0===n?void 0:n.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===R||void 0===R?void 0:R.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:R,showMore:!0})}),(0,f.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(h.Z,{after:i,afterHeightOffset:j.Mz,afterHidden:v,afterMousedownActive:K,afterWidth:z,before:P,beforeHeightOffset:j.Mz,beforeMousedownActive:$,beforeWidth:d.k1+(P?J:0),headerOffset:_,hideAfterCompletely:!0,leftOffset:P?d.k1:null,mainContainerHeader:I,mainContainerRef:Y,setAfterMousedownActive:X,setAfterWidth:L,setBeforeMousedownActive:ee,setBeforeWidth:Q,children:[F&&(0,f.jsx)(p,{children:F}),D]})})]}),M&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===T||void 0===T?void 0:T(null)},children:(0,f.jsx)(l.Z,C(C({},M),{},{onClose:function(){return null===T||void 0===T?void 0:T(null)}}))})]})}},91207:function(e,n,t){"use strict";t.d(n,{Z:function(){return A}});var i=t(82394),r=t(75582),o=t(17717),u=t(82684),l=t(37958),c=t(83455),s=t(35490),a=t(86422),d=t(60328),f=t(38626),v=t(93461),p=t(67971),h=t(28598),b=f.default.div.withConfig({displayName:"ButtonGroup__ButtonGroupStyle",componentId:"sc-15vbmc8-0"})([""]),m=f.default.div.withConfig({displayName:"ButtonGroup__VerticalDivider",componentId:"sc-15vbmc8-1"})(["width:1px;"]),g=function(e){var n=e.children,t=e.divider,i=u.Children.toArray(n).length;return(0,h.jsx)(b,{children:(0,h.jsx)(p.ZP,{children:u.Children.map(n,(function(e,n){return e&&(0,h.jsxs)(v.Z,{children:[n>=1&&t&&(0,h.jsx)(m,{}),u.cloneElement(e,{borderRadiusLeft:i>=2&&0===n,borderRadiusRight:i>=2&&n===i-1,halfPaddingLeft:i>=2&&0!==n,halfPaddingRight:i>=2&&n!==i-1,noBorder:i>=2&&n>0&&n<i-1,noBorderRight:i>=2&&n!==i-1})]},"button-group-child-".concat(n))}))})})},j=t(57722),O=t(73828),y=t(11135),x=t(98781),w=t(86673),C=t(82531),Z=t(16115),P=t(94353),S=t(60701),k=t(55512),D=t(24224),M=t(32821),E=t(90211),_=t(96510),I=t(51504),R=t(41150);function T(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 F(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?T(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var A=function(e){var n=e.active,t=e.addNewBlock,f=e.disableRefreshWarning,v=e.fetchPipeline,b=e.fetchVariables,m=e.filePath,T=e.hideHeaderButtons,A=e.onContentChange,N=e.onUpdateFileSuccess,H=e.openSidekickView,U=e.pipeline,W=e.saveFile,Y=e.selectedFilePath,V=e.sendTerminalMessage,z=e.setDisableShortcuts,L=e.setErrors,B=e.setFilesTouched,K=e.setSelectedBlock,X=(0,l.j)("apiReloads"),G=(0,r.Z)(X,2)[1],J=(0,u.useState)(null),Q=J[0],q=J[1],$=(0,u.useState)(!1),ee=$[0],ne=($[1],(0,u.useRef)(null)),te=(0,u.useMemo)((function(){return new s.Z}),[]),ie=(0,u.useMemo)((function(){return{api_key:P.l,token:te.decodedToken.token}}),[te]),re=C.ZP.statuses.list().data,oe=(0,u.useMemo)((function(){var e,n;return null===re||void 0===re||null===(e=re.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.repo_path}),[re]),ue=C.ZP.file_contents.detail(m).data;(0,u.useEffect)((function(){null!==ue&&void 0!==ue&&ue.file_content&&q(ue.file_content)}),[ue]);var le=(0,u.useState)(null===Q||void 0===Q?void 0:Q.content),ce=le[0],se=le[1],ae=(0,u.useCallback)((function(e){se(e),A&&(null===A||void 0===A||A(e))}),[A]),de=(0,u.useState)(!1),fe=de[0],ve=de[1];(0,u.useEffect)((function(){n&&z&&(null===z||void 0===z||z(!0))}),[n,z]),(0,u.useEffect)((function(){var e;Y&&(null===ne||void 0===ne||null===(e=ne.current)||void 0===e||e.scrollIntoView())}),[Y]);var pe=(0,c.Db)(C.ZP.file_contents.useUpdate((null===Q||void 0===Q?void 0:Q.path)&&encodeURIComponent(null===Q||void 0===Q?void 0:Q.path)),{onSuccess:function(e){return(0,_.wD)(e,{callback:function(e){var n=e.file_content;G((function(e){return F(F({},e),{},(0,i.Z)({},"FileVersions/".concat(null===Q||void 0===Q?void 0:Q.path),Number(new Date)))})),N&&(null===N||void 0===N||N(n))},onErrorCallback:function(e,n){return null===L||void 0===L?void 0:L({errors:n,response:e})}})}}),he=(0,r.Z)(pe,1)[0],be=(0,u.useCallback)((function(e,n){if(W)return W(e,n);he({file_content:F(F({},n),{},{content:e})}).then((function(){decodeURIComponent(m).split(o.sep).pop()===O.dT.METADATA_YAML&&b&&(null===b||void 0===b||b())})),B((function(e){return F(F({},e),{},(0,i.Z)({},null===n||void 0===n?void 0:n.path,!1))})),ve(!1)}),[b,m,W,B,he]),me=(0,u.useMemo)((function(){return(0,k.lU)()}),[]),ge=(0,u.useMemo)((function(){var e,n,t,i;return null===(null===Q||void 0===Q||null===(e=Q.path)||void 0===e?void 0:e.match(me))?O.Lu.TXT:null===Q||void 0===Q||null===(n=Q.path)||void 0===n||null===(t=n.match(me))||void 0===t||null===(i=t[0])||void 0===i?void 0:i.split(".")[1]}),[me,Q]),je=(0,u.useMemo)((function(){if(null!==Q&&void 0!==Q&&Q.path)return(0,h.jsx)(j.Z,{autoHeight:!0,language:O.nB[ge],onChange:function(e){ae(e),B((function(e){return F(F({},e),{},(0,i.Z)({},null===Q||void 0===Q?void 0:Q.path,!0))})),ve(!0)},onSave:function(e){be(e,Q)},selected:!0,textareaFocused:!0,value:(0,E.Pb)(null===Q||void 0===Q?void 0:Q.content)?JSON.stringify(JSON.parse(null===Q||void 0===Q?void 0:Q.content),null,2):null===Q||void 0===Q?void 0:Q.content,width:"100%"})}),[Q,ge,be,ae,B]),Oe=null!==U&&void 0!==U&&U.blocks?(0,D.sE)(null===U||void 0===U?void 0:U.blocks,(function(e){var n=e.type;return a.tf.DATA_EXPORTER===n})):null,ye=(0,c.Db)(C.ZP.blocks.pipelines.useUpdate(null===U||void 0===U?void 0:U.uuid,null===Oe||void 0===Oe?void 0:Oe.uuid),{onSuccess:function(e){return(0,_.wD)(e,{callback:function(){null===v||void 0===v||v()}})}}),xe=(0,r.Z)(ye,1)[0],we=t&&U&&(ge===O.Lu.PY||ge===O.Lu.SQL||(ge===O.Lu.YAML||ge===O.Lu.R)&&(0,M.V3)(Q,null===Q||void 0===Q?void 0:Q.path))&&(0,k.ck)(Q.path.split(o.sep))!==a.tf.SCRATCHPAD&&(0,M.lr)(Q)&&(0,h.jsx)(d.Z,{onClick:function(){var e=(null===U||void 0===U?void 0:U.type)===x.qL.INTEGRATION,n=(0,k.TU)(Q,oe,U);t(n,(function(n){e&&Oe&&xe({block:F(F({},Oe),{},{upstream_blocks:[n.uuid]})}),null===K||void 0===K||K(n)}))},primary:!0,children:"Add to current pipeline"}),Ce=V&&(0,h.jsx)(w.Z,{m:2,children:(0,h.jsx)(y.ZP,{disabled:!oe,inline:!0,loading:ee,onClick:function(){null===H||void 0===H||H(S.cH.TERMINAL),null===V||void 0===V||V(JSON.stringify(F(F({},ie),{},{command:["stdin","pip install -r ".concat(oe,"/requirements.txt\r")]})))},title:oe?"Pip install packages from your saved requirements.txt file (\u2318+S to save).":"Please use right panel terminal to install packages.",uuid:"FileEditor/InstallPackages",children:"Install packages"})}),Ze="FileEditor/".concat(null===Q||void 0===Q?void 0:Q.path),Pe=(0,R.y)(),Se=Pe.registerOnKeyDown,ke=Pe.unregisterOnKeyDown;return(0,u.useEffect)((function(){return function(){ke(Ze)}}),[ke,Ze]),Se(Ze,(function(e,t){if(n&&!f)if((0,I.y)([Z.zX,Z.Um],t)||(0,I.y)([Z.PQ,Z.Um],t))e.preventDefault(),be(ce,Q);else if(fe&&(0,I.y)([Z.zX,Z.hS],t)){e.preventDefault();var i="".concat(Q.path," has changes that are unsaved. ")+"Click cancel and save your changes before reloading page.";"undefined"!==typeof location&&window.confirm(i)&&location.reload()}}),[n,ce,f,Q,be,fe]),(0,h.jsxs)("div",{ref:ne,children:[!T&&(0,h.jsx)(w.Z,{p:2,children:(0,h.jsxs)(p.ZP,{justifyContent:"space-between",children:[(0,h.jsxs)(g,{children:[we,(0,h.jsx)(d.Z,{disabled:!ce,onClick:function(e){e.preventDefault(),be(ce,Q)},title:ce?null:"No changes have been made to this file.",children:"Save file content"})]}),H&&(0,h.jsx)(g,{children:(0,h.jsx)(d.Z,{compact:!0,onClick:function(){H(S.cH.FILE_VERSIONS)},small:!0,title:"View previous changes to this file.",children:"Show versions"})})]})}),je,m===O.dT.REQS_TXT&&Ce]})}},23351:function(e,n,t){"use strict";var i=t(82394),r=t(75582),o=t(17717),u=t(37958),l=t(82684),c=t(83455),s=t(60328),a=t(57722),d=t(73828),f=t(93461),v=t(67971),p=t(87372),h=t(86673),b=t(54283),m=t(87815),g=t(19711),j=t(82531),O=t(49125),y=t(55512),x=t(42305),w=t(90211),C=t(96510),Z=t(66653),P=t(24224),S=t(28598);function k(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 D(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.onActionCallback,t=e.selectedBlock,k=e.selectedFilePath,M=e.setErrors,E=e.width,_=(0,u.j)("apiReloads"),I=(0,r.Z)(_,2)[1],R=j.ZP.file_versions.files.list(k&&encodeURIComponent(k)),T=R.data,F=R.mutate,A=(0,l.useMemo)((function(){return(null===T||void 0===T?void 0:T.file_versions)||[]}),[T]),N=(0,l.useState)(null),H=N[0],U=N[1],W=(0,l.useMemo)((function(){return null===A||void 0===A?void 0:A[H]}),[H,A]),Y=j.ZP.file_contents.detail(W?encodeURIComponent(W.path):null).data,V=(0,l.useMemo)((function(){return null===Y||void 0===Y?void 0:Y.file_content}),[Y]),z=(0,l.useMemo)((function(){return(0,y.lU)()}),[]),L=(0,l.useMemo)((function(){var e,n,t;return null===k||void 0===k||null===(e=k.match(z))||void 0===e||null===(n=e[0])||void 0===n||null===(t=n.split("."))||void 0===t?void 0:t[1]}),[k,z]),B=(0,c.Db)(j.ZP.file_contents.useUpdate(k&&encodeURIComponent(k)),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(e){var t;k&&F();var r=null===e||void 0===e||null===(t=e.file_content)||void 0===t?void 0:t.path,u="FileEditor/".concat(r);if(r){var l=r.split(o.sep);if("pipelines"===l[0]){var c=l.slice(1,l.length-1).join(o.sep);u="PipelineDetail/".concat(c)}}I((function(e){return D(D({},e),{},(0,i.Z)({},u,Number(new Date)))})),U((function(e){return e+1})),null===n||void 0===n||n(null===e||void 0===e?void 0:e.file_content)},onErrorCallback:function(e,n){return M({errors:n,response:e})}})}}),K=(0,r.Z)(B,2),X=K[0],G=K[1].isLoading,J=(0,l.useMemo)((function(){var e=A.map((function(e){var n=e.name,t=e.path;return[(0,S.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,S.jsxs)(f.Z,{flex:1,children:[(0,S.jsx)(g.ZP,{default:!0,monospace:!0,children:(0,x.JX)(n,{withSeconds:!0})}),(0,S.jsx)(h.Z,{px:2*O.cd,children:(0,S.jsx)(g.ZP,{monospace:!0,children:n})})]}),W&&(null===W||void 0===W?void 0:W.path)===t&&(0,S.jsx)(s.Z,{compact:!0,loading:G,onClick:function(e){(0,Z.j)(e),X({file_content:{version:n}})},small:!0,children:"Replace with this version"})]},n)]}));if(W){var n=(0,S.jsx)(h.Z,{p:O.cd,children:(0,S.jsx)(b.Z,{},"spinner")});if(V&&(null===V||void 0===V?void 0:V.path)===(null===W||void 0===W?void 0:W.path)){var t=V.content,i=void 0===t?"":t;n=(0,S.jsx)(a.Z,{autoHeight:!0,language:d.nB[L],padding:!0,readOnly:!0,value:(0,w.Pb)(i)?JSON.stringify(JSON.parse(i),null,2):i,width:E})}e=(0,P.Hk)([n],H+1,e)}return e}),[V,L,A,G,W,H,X,E]);return(0,S.jsxs)("div",{style:{width:E},children:[(0,S.jsxs)(h.Z,{p:O.cd,children:[(0,S.jsx)(p.Z,{level:5,children:"File versions"}),(0,S.jsx)(g.ZP,{inline:!0,monospace:!0,children:k?decodeURIComponent(k):null===t||void 0===t?void 0:t.uuid})]}),(0,S.jsx)(m.Z,{buildRowProps:function(e){if(W&&H+1===e)return{renderCell:function(e){return e},renderRow:function(e){return e}}},columnFlex:[1],columns:[{uuid:"Version"}],isSelectedRow:function(e){var n;return(null===(n=A[e])||void 0===n?void 0:n.name)===(null===W||void 0===W?void 0:W.name)},onClickRow:function(e){W?e===H?U(null):e<H?U(e):e>H+1&&U(e-1):U(e)},rows:J})]})}},38488:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var i=t(82394),r=t(26304),o=t(82684),u=t(38626),l=t(16634),c=t(67971),s=t(10919),a=t(86673),d=t(19711),f=t(46261),v=t(23831),p=t(22341),h=t(28347),b=t(49125),m=t(33766),g=t(66653),j=t(28598);var O=function(e){var n=e.filePath,t=e.filesTouched,i=void 0===t?{}:t,r=e.isLast,u=e.onClickTab,O=e.onClickTabClose,y=e.renderTabTitle,x=e.savePipelineContent,w=e.selected,C=e.themeContext,Z=(0,o.useState)(!1),P=Z[0],S=Z[1];return(0,j.jsx)(c.ZP,{flexDirection:"column",fullHeight:!0,onClick:function(e){e.preventDefault(),w||(u?u(n):(null===x||void 0===x||x(),(0,m.u7)({file_path:encodeURIComponent(n)})))},onMouseEnter:function(){return S(!0)},onMouseLeave:function(){return S(!1)},children:(0,j.jsx)(h.Gb,{last:r,selected:w,children:(0,j.jsxs)(c.ZP,{alignItems:"center",fullHeight:!0,children:[(0,j.jsx)(f.Z,{appearAbove:!0,appearBefore:!0,label:n,size:null,widthFitContent:!0,children:(0,j.jsxs)(c.ZP,{alignItems:"center",fullHeight:!0,children:[!i[n]&&(0,j.jsx)(p.iU,{muted:!w,size:1.5*b.iI}),i[n]&&(0,j.jsx)(f.Z,{label:"Unsaved changes",size:null,widthFitContent:!0,children:(0,j.jsx)("div",{style:{padding:1},children:(0,j.jsx)(l.Z,{borderColor:(C||v.Z).borders.danger,size:1.25*b.iI})})}),(0,j.jsx)(a.Z,{mr:1}),(0,j.jsx)(d.ZP,{muted:!w,children:y?y(n):n})]})}),(0,j.jsx)(a.Z,{mr:2}),(0,j.jsx)(f.Z,{label:"Close",size:null,widthFitContent:!0,children:(0,j.jsxs)(s.Z,{autoHeight:!0,block:!0,noHoverUnderline:!0,noOutline:!0,onClick:function(e){(0,g.j)(e),null===O||void 0===O||O(n)},preventDefault:!0,children:[(P||w)&&(0,j.jsx)(p.x8,{muted:!w,size:1.25*b.iI}),!P&&!w&&(0,j.jsx)("div",{style:{width:1.25*b.iI}})]})})]})})})},y=t(24224),x=["filePaths","isSelectedFilePath","onClickTabClose","selectedFilePath"];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 C(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,i.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 Z=function(e){var n=e.filePaths,t=e.isSelectedFilePath,i=e.onClickTabClose,l=e.selectedFilePath,s=(0,r.Z)(e,x),a=(0,o.useContext)(u.ThemeContext),d=(0,o.useMemo)((function(){return n.map((function(e){return decodeURIComponent(e)}))}),[n]),f=(0,o.useMemo)((function(){return null===d||void 0===d?void 0:d.length}),[d]);return(0,j.jsx)(c.ZP,{alignItems:"center",justifyContent:"flex-start",children:null===d||void 0===d?void 0:d.map((function(e,n){var r=t?t(e,l):l===encodeURIComponent(e);return(0,o.createElement)(O,C(C({},s),{},{filePath:e,isLast:n===f-1,key:e,onClickTabClose:function(e){if(i)i(e);else{var n=(0,y.Od)(d,(function(n){return n===e})).map((function(e){return encodeURIComponent(e)}));(0,m.u7)({file_path:n[n.length-1]||null,"file_paths[]":n},{pushHistory:!0})}},selected:r,themeContext:a}))}))})}},28347:function(e,n,t){"use strict";t.d(n,{Gb:function(){return f},fm:function(){return a},lO:function(){return s},rK:function(){return d},zn:function(){return c}});var i=t(38626),r=t(23831),o=t(82386),u=t(49125),l=t(37391),c=300,s=i.default.div.withConfig({displayName:"indexstyle__PipelineContainerStyle",componentId:"sc-1sv9513-0"})([".pipeline-detail-enter-active{opacity:1;transition:opacity ","ms linear;}.pipeline-detail-enter-done{opacity:0;transition:opacity ","ms linear;}"],c,c),a=i.default.div.withConfig({displayName:"indexstyle__OverlayStyle",componentId:"sc-1sv9513-1"})(["height:100vh;opacity:1;position:fixed;width:100vw;z-index:9999;",""],(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")})),d=i.default.div.withConfig({displayName:"indexstyle__PipelineHeaderStyle",componentId:"sc-1sv9513-2"})(["height:","px;position:sticky;top:","px;width:100%;z-index:5;"," "," "," ",""],o.Wi,o.Wi,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom: 1px solid ").concat((e.theme.borders||r.Z.borders).medium,";\n ")}),(function(e){return e.relativePosition&&"\n position: relative;\n "}),(function(e){return e.secondary&&"\n height: ".concat(37,"px;\n top: ").concat(o.Wi,"px;\n overflow-x: auto;\n z-index: 3;\n ")}),(0,l.y$)()),f=i.default.div.withConfig({displayName:"indexstyle__FileTabStyle",componentId:"sc-1sv9513-3"})(["border-right:1px solid transparent;height:100%;padding:","px ","px;"," "," ",""],u.iI,u.cd*u.iI,(function(e){return"\n &:hover {\n cursor: default;\n\n p {\n color: ".concat((e.theme.content||r.Z.content).active," !important;\n cursor: default;\n }\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.interactive||r.Z.interactive).hoverBackground,";\n ")}),(function(e){return!e.selected&&!e.last&&"\n border-color: ".concat((e.theme.borders||r.Z.borders).light," !important;\n ")}))},55389:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Q}});var i=t(77837),r=t(38860),o=t.n(r),u=t(82394),l=t(75582),c=t(17717),s=t(82684),a=t(37958),d=t(83455),f=t(48591),v=t(1210),p=t(46299),h=t(91207),b=t(47999),m=t(67971),g=t(62084),j=t(19711),O=t(16115),y=t(64318),x=t(54405),w=t(41150),C=t(28598);var Z=function(e){var n=e.children,t=e.fileVersionsVisible,i=e.onSave,r=e.setFilesVersionsVisible,o=(0,s.useState)(null),u=o[0],l=o[1],c=(0,s.useRef)(null),a=(0,s.useRef)(null),d=(0,s.useMemo)((function(){return[{disabled:!i,keyTextGroups:[[(0,x.V5)()?O.RJ:O.hE,O.SS]],label:function(){return"Save"},onClick:function(){return i?i():null},uuid:"save"}]}),[i]),f=(0,s.useMemo)((function(){return[{label:function(){return t?"Hide versions":"Show versions"},onClick:function(){return r(!t)},uuid:"versions"}]}),[t,r]),v="FileHeaderMenu/index",p=(0,w.y)(),h=p.registerOnKeyDown,Z=p.unregisterOnKeyDown;return(0,s.useEffect)((function(){return function(){Z(v)}}),[Z,v]),h(v,(function(e,n){null!==u&&(n[O.QK]?l((function(e){return 0===e?2:e-1})):n[O.DY]&&l((function(e){return 2===e?0:e+1})))}),[u,l]),(0,C.jsx)(b.Z,{onClickOutside:function(){return l(null)},open:!0,style:{position:"relative"},children:(0,C.jsxs)(m.ZP,{children:[(0,C.jsxs)("div",{style:{position:"relative"},children:[(0,C.jsx)(y.u,{highlighted:0===u,onClick:function(){return l((function(e){return 0===e?null:0}))},onMouseEnter:function(){return l((function(e){return null!==e?0:null}))},ref:c,children:(0,C.jsx)(j.ZP,{children:"File"})}),(0,C.jsx)(g.Z,{items:d,onClickCallback:function(){return l(null)},open:0===u,parentRef:c,uuid:"FileHeaderMenu/file"})]}),(0,C.jsxs)("div",{style:{position:"relative"},children:[(0,C.jsx)(y.u,{highlighted:1===u,onClick:function(){return l((function(e){return 1===e?null:1}))},onMouseEnter:function(){return l((function(e){return null!==e?1:null}))},ref:a,children:(0,C.jsx)(j.ZP,{children:"Edit"})}),(0,C.jsx)(g.Z,{items:f,onClickCallback:function(){return l(null)},open:1===u,parentRef:a,uuid:"FileHeaderMenu/edit"})]}),n]})})},P=t(38488),S=t(23351),k=t(82531),D=t(38626),M=t(23831),E=t(82386),_=t(3055),I=t(37391),R=72-E.uX+_.Mz,T=D.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-11pty4f-0"})(["height:","px;top:","px;z-index:3;",""],72,_.Mz,(function(e){return"\n background-color: ".concat((e.theme.background||M.Z.background).codeArea,";\n ")})),F=D.default.div.withConfig({displayName:"indexstyle__MenuStyle",componentId:"sc-11pty4f-1"})(["height:","px;position:relative;z-index:1;",""],36,(function(e){return"\n border-bottom: 1px solid ".concat((e.theme.borders||M.Z.borders).medium,";\n ")})),A=D.default.div.withConfig({displayName:"indexstyle__TabsStyle",componentId:"sc-11pty4f-2"})([""," height:","px;overflow-x:auto;position:sticky;width:100%;z-index:0;"],(0,I.y$)(),36),N=t(91427),H=t(24224),U="open_files";function W(e){(0,N.t8)(U,e)}var Y=t(96510),V=t(51504),z=t(9728);function L(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 B(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function K(e){var n=e.split(c.sep);return n[n.length-1]}var X=function(){var e=(0,a.j)("apiReloads"),n=(0,l.Z)(e,2)[1],t=(0,s.useRef)(null),i=(0,s.useRef)(null),r=(0,s.useCallback)((function(e){i.current||(i.current={}),i.current=B(B({},i.current),e)}),[i]),o=(0,s.useState)([]),c=o[0],b=o[1],m=(0,s.useState)(null),g=m[0],j=m[1],y=(0,s.useState)({}),x=y[0],D=y[1],M=(0,s.useState)(!1),E=M[0],_=M[1],I=(0,s.useMemo)((function(){return c.reduce((function(e,n){var t=K(n);return e[t]||(e[t]=[]),e[t].push(n),e}),{})}),[c]),L=(0,s.useCallback)((function(e){W(e),b(e)}),[]),X=(0,s.useCallback)((function(e){L(function(e){var n=(0,N.U2)(U,[]);return n.includes(e)||n.push(e),W(n),n}(e))}),[L]),G=(0,s.useCallback)((function(e){r((0,u.Z)({},e,null)),D((function(n){return B(B({},n),{},(0,u.Z)({},e,!1))}));var n=function(e){var n=(0,N.U2)(U,[]),t=(0,H.Od)(n,(function(n){return n===e}));return W(t),t}(e);L(n),g===e&&(null===n||void 0===n?void 0:n.length)>=1&&j(n[n.length-1]),0===(null===n||void 0===n?void 0:n.length)&&j(null)}),[g,r,L]),J=(0,s.useCallback)((function(e,n){n||(X(e),j(e))}),[X]);(0,s.useEffect)((function(){var e=(0,N.U2)(U,[]);L(e),j((function(n){return!n&&(null===e||void 0===e?void 0:e.length)>=1?e[0]:n}))}),[L]);var Q=k.ZP.files.list(),q=Q.data,$=Q.mutate,ee=(0,s.useMemo)((function(){return(null===q||void 0===q?void 0:q.files)||[]}),[q]),ne=(0,z.VI)(null,{},[],{uuid:"FilesPage"}),te=(0,l.Z)(ne,1)[0],ie="Files/index",re=(0,w.y)(),oe=(re.disableGlobalKeyboardShortcuts,re.registerOnKeyDown),ue=re.unregisterOnKeyDown;(0,s.useEffect)((function(){return function(){ue(ie)}}),[ue,ie]),oe(ie,(function(e,n){var t=Object.entries(x).reduce((function(e,n){var t=(0,l.Z)(n,2),i=t[0];return t[1]?e.concat(i):e}),[]);if((0,V.y)([O.zX,O.hS],n)&&(null===t||void 0===t?void 0:t.length)>=1){e.preventDefault();var i="You have changes that are unsaved: ".concat(t.join(", "),". ")+"Click cancel and save your changes before reloading page.";"undefined"!==typeof location&&window.confirm(i)&&location.reload()}}),[x]);var le=(0,s.useMemo)((function(){return(0,C.jsx)(P.Z,{filePaths:c,filesTouched:x,isSelectedFilePath:function(e,n){return e===n},onClickTab:function(e){return j(e)},onClickTabClose:function(e){return G(e)},renderTabTitle:function(e){var n=K(e),t=I[n];return t&&(null===t||void 0===t?void 0:t.length)>=2?e:n},selectedFilePath:g})}),[x,c,I,G,g]),ce=(0,s.useMemo)((function(){return(0,C.jsx)(p.Z,{fetchFileTree:$,files:ee,onClickFile:function(e){return J(e)},onClickFolder:function(e){return J(e,!0)},onCreateFile:function(e){var n=e.path;return J(n)},ref:t,setErrors:te})}),[$,t,ee,J,te]),se=(0,d.Db)((function(e){return k.ZP.file_contents.useUpdate((null===e||void 0===e?void 0:e.path)&&encodeURIComponent(null===e||void 0===e?void 0:e.path))({file_content:e})}),{onSuccess:function(e){return(0,Y.wD)(e,{callback:function(e){var t=e.file_content;n((function(e){return B(B({},e),{},(0,u.Z)({},"FileVersions/".concat(null===t||void 0===t?void 0:t.path),Number(new Date)))})),r((0,u.Z)({},null===t||void 0===t?void 0:t.path,null))},onErrorCallback:function(e,n){return te({errors:n,response:e})}})}}),ae=(0,l.Z)(se,1)[0],de=(0,s.useCallback)((function(e,n){ae(B(B({},n),{},{content:e})),D((function(e){return B(B({},e),{},(0,u.Z)({},null===n||void 0===n?void 0:n.path,!1))}))}),[D,ae]),fe=(0,s.useMemo)((function(){return null===c||void 0===c?void 0:c.map((function(e){return(0,C.jsx)("div",{style:{display:g===e?null:"none"},children:(0,C.jsx)(f.Z,{uuid:"FileEditor/".concat(decodeURIComponent(e)),children:(0,C.jsx)(h.Z,{active:g===e,disableRefreshWarning:!0,filePath:e?encodeURIComponent(e):null,hideHeaderButtons:!0,onContentChange:function(n){return r((0,u.Z)({},e,n))},saveFile:de,selectedFilePath:g,setErrors:te,setFilesTouched:D})})},e)}))}),[c,de,g,r,te]),ve=(0,s.useMemo)((function(){return(0,C.jsx)(Z,{fileVersionsVisible:E,onSave:function(){var e,n;(null===i||void 0===i||null===(e=i.current)||void 0===e||null===(n=e[g])||void 0===n?void 0:n.length)>=1&&de(i.current[g],{path:g})},setFilesVersionsVisible:_})}),[i,E,de,g,_]);return(0,C.jsx)(v.Z,{after:(0,C.jsx)(f.Z,{uuid:"FileVersions/".concat(g?decodeURIComponent(g):""),children:(0,C.jsx)(S.Z,{selectedFilePath:g,setErrors:te})}),afterHidden:!(E&&g),before:ce,headerOffset:R,mainContainerHeader:(null===c||void 0===c?void 0:c.length)>=1&&(0,C.jsxs)(T,{children:[(0,C.jsx)(F,{children:ve}),(0,C.jsx)(A,{children:le})]}),title:"Files",uuid:"Files/index",children:fe})},G=t(41788);function J(){return(0,C.jsx)(X,{})}J.getInitialProps=(0,i.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 Q=(0,G.Z)(J)},37958:function(e,n,t){"use strict";t.d(n,{j:function(){return i}});var i=(0,t(44152).r)({apiReloads:{}}).useGlobalState},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return j},AY:function(){return O},BP:function(){return g},JX:function(){return m},OC:function(){return d},Pc:function(){return y},Ro:function(){return x},Tz:function(){return b},Y_:function(){return C},d$:function(){return h},jV:function(){return w},lJ:function(){return Z},n1:function(){return v},s8:function(){return s},vk:function(){return o},yD:function(){return a}});var i,r,o,u=t(82394),l=t(92083),c=t.n(l);!function(e){e.TODAY="today",e.WEEK="week",e.MONTH="month"}(o||(o={}));var s=(i={},(0,u.Z)(i,o.TODAY,"today"),(0,u.Z)(i,o.WEEK,"last 7 days"),(0,u.Z)(i,o.MONTH,"last 30 days"),i),a=(r={},(0,u.Z)(r,o.TODAY,0),(0,u.Z)(r,o.WEEK,6),(0,u.Z)(r,o.MONTH,29),r),d="YYYY-MM-DD HH:mm:ss",f="YYYY-MM-DD HH:mm",v="YYYY-MM-DD",p="MMMM D, YYYY";function h(e,n){var t=n.dayAgo,i=n.includeSeconds,r=n.utcFormat,o=c()(e),u=f;return r&&(o=o.utc()),t&&(o=o.subtract(1,"days")),i&&(u=d),o.format(u)}function b(e){var n=h((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==e&&void 0!==e&&e.dateObj?new Date(n):n}function m(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c().unix(e).format(null!==n&&void 0!==n&&n.withSeconds?d:f)}function g(e,n,t){return c()(e).utc().hours(+n).minutes(+t).format()}function j(e){return c()(e).unix()}function O(e,n,t,i){var r="".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t);return i?"".concat(r,":").concat(i):r}function y(e){var n=c().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function x(e,n){var t=c().utc(),i=c().utc();null!==n&&void 0!==n&&n.localTime&&(t=c()().local(),i=c()().local());var r=(t=t.subtract(e,"days")).format(p),o=i.format(p);return null!==n&&void 0!==n&&n.endDateOnly?o:"".concat(r," - ").concat(o)}function w(e,n){var t=null!==n&&void 0!==n&&n.localTime?c()().local():c().utc();if(e===o.WEEK){var i=a[o.WEEK];t=t.subtract(i,"days")}else if(e===o.MONTH){var r=a[o.MONTH];t=t.subtract(r,"days")}return null!==n&&void 0!==n&&n.isoString?t.startOf("day").toISOString():t.startOf("day").format(d)}function C(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90,n=new Date,t=[],i=0;i<e;i++)t.unshift(n.toISOString().split("T")[0]),n.setDate(n.getDate()-1);return t}function Z(e){return e.padStart(2,"0")}},54405:function(e,n,t){"use strict";var i;t.d(n,{V5:function(){return o}}),function(e){e.ANDROID="Android",e.CHROME_OS="ChromeOS",e.IOS="iOS",e.LINUX="Linux",e.MAC="macOS",e.WINDOWS="Windows"}(i||(i={}));var r=i;function o(){return function(){var e,n,t,i,o,u,l,c=r.MAC,s=null===(e=window)||void 0===e||null===(n=e.navigator)||void 0===n?void 0:n.userAgent,a=(null===(t=window)||void 0===t||null===(i=t.navigator)||void 0===i||null===(o=i.userAgentData)||void 0===o?void 0:o.platform)||(null===(u=window)||void 0===u||null===(l=u.navigator)||void 0===l?void 0:l.platform);return a?["macOS","Macintosh","MacIntel","MacPPC","Mac68K"].includes(a)?c=r.MAC:["Win32","Win64","Windows","WinCE"].includes(a)?c=r.WINDOWS:["iPhone","iPad","iPod"].includes(a)&&(c=r.IOS):s&&(s.includes("Macintosh")?c=r.MAC:s.includes("Windows")?c=r.WINDOWS:s.includes("Linux")&&s.includes("X11")?c=r.LINUX:/(iPhone|iPad)/.test(s)?c=r.IOS:s.includes("Android")&&s.includes("Mobi")?c=r.ANDROID:s.includes("CrOS")&&(c=r.CHROME_OS)),c}()===r.MAC}},99017:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/files",function(){return t(55389)}])}},function(e){e.O(0,[844,9902,8789,7011,5643,1424,1005,7815,6422,7722,3391,6299,9774,2888,179],(function(){return n=99017,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([[3512],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return P}});var r=t(82394),i=t(21831),o=t(82684),u=t(47999),l=t(49894),c=t(93461),a=t(57384),s=t(41424),d=t(72454),f=t(28598);function p(e,n){var t=e.children;return(0,f.jsx)(d.HS,{ref:n,children:t})}var v=o.forwardRef(p),h=t(32063),b=t(85019),g=t(82531),m=t(66166),S=t(3055),O=t(49125),j=t(91427),T=t(24141);function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function E(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var P=function(e){var n,t=e.addProjectBreadcrumbToCustomBreadcrumbs,r=e.after,p=e.afterHidden,y=e.afterWidth,P=e.afterWidthOverride,k=e.before,w=e.beforeWidth,Z=e.breadcrumbs,_=e.children,R=e.errors,L=e.headerMenuItems,x=e.headerOffset,M=e.mainContainerHeader,A=e.navigationItems,D=e.setErrors,C=e.subheaderChildren,N=e.title,I=e.uuid,B=(0,T.i)().width,Y="dashboard_after_width_".concat(I),U="dashboard_before_width_".concat(I),W=(0,o.useRef)(null),F=(0,o.useState)(P?y:(0,j.U2)(Y,y)),H=F[0],Q=F[1],X=(0,o.useState)(!1),V=X[0],G=X[1],J=(0,o.useState)(k?Math.max((0,j.U2)(U,w),13*O.iI):null),$=J[0],K=J[1],q=(0,o.useState)(!1),z=q[0],ee=q[1],ne=(0,o.useState)(null)[1],te=g.ZP.projects.list({},{revalidateOnFocus:!1}).data,re=null===te||void 0===te?void 0:te.projects,ie={label:function(){var e;return null===re||void 0===re||null===(e=re[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},oe=[];Z?(t&&oe.push(ie),oe.push.apply(oe,(0,i.Z)(Z))):(null===re||void 0===re?void 0:re.length)>=1&&oe.push.apply(oe,[ie,{bold:!0,label:function(){return N}}]),(0,o.useEffect)((function(){null===W||void 0===W||!W.current||V||z||null===ne||void 0===ne||ne(W.current.getBoundingClientRect().width)}),[V,H,z,$,W,ne,B]),(0,o.useEffect)((function(){V||(0,j.t8)(Y,H)}),[p,V,H,Y]),(0,o.useEffect)((function(){z||(0,j.t8)(U,$)}),[z,$,U]);var ue=(0,m.Z)(y);return(0,o.useEffect)((function(){P&&ue!==y&&Q(y)}),[P,y,ue]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.Z,{title:N}),(0,f.jsx)(s.Z,{breadcrumbs:oe,menuItems:L,project:null===re||void 0===re?void 0:re[0],version:null===re||void 0===re||null===(n=re[0])||void 0===n?void 0:n.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===A||void 0===A?void 0:A.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:A,showMore:!0})}),(0,f.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(h.Z,{after:r,afterHeightOffset:S.Mz,afterHidden:p,afterMousedownActive:V,afterWidth:H,before:k,beforeHeightOffset:S.Mz,beforeMousedownActive:z,beforeWidth:d.k1+(k?$:0),headerOffset:x,hideAfterCompletely:!0,leftOffset:k?d.k1:null,mainContainerHeader:M,mainContainerRef:W,setAfterMousedownActive:G,setAfterWidth:Q,setBeforeMousedownActive:ee,setBeforeWidth:K,children:[C&&(0,f.jsx)(v,{children:C}),_]})})]}),R&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===D||void 0===D?void 0:D(null)},children:(0,f.jsx)(l.Z,E(E({},R),{},{onClose:function(){return null===D||void 0===D?void 0:D(null)}}))})]})}},32821:function(e,n,t){"use strict";t.d(n,{IO:function(){return f},V3:function(){return d},a9:function(){return l},jN:function(){return a},lr:function(){return s},u$:function(){return p}});var r=t(17717),i=t(86422),o=t(73828),u=t(90211);function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=n||(t?null:null===e||void 0===e?void 0:e.name);if(null!==e&&void 0!==e&&e.parent){var o=[e.parent.name];return(null===i||void 0===i?void 0:i.length)>=1&&o.push(i),l(e.parent,o.join(r.sep))}return i}function c(e){return null===e||void 0===e?void 0:e.split(r.sep).slice(1).join(r.sep)}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=l(e,n,t);return c(r)}function s(e){var n,t,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=l(e,c).split(r.sep);if(!s)return null;if(1===s.length)(s=null===e||void 0===e||null===(t=e.path)||void 0===t?void 0:t.split(r.sep))&&(n=s[0]===i.tf.CUSTOM?s[0]:(0,u.C5)(s[0]||""));else if(s[1]===i.tf.CUSTOM)n=s[1];else{var d=s[1];n=i.tf.DBT===d?d:(0,u.C5)(d||"")}if(!s||i.tf.DBT===n)return null;var f="";f=s.length>=3?s.slice(2,s.length).join(r.sep):s[s.length-1];var p=["\\.".concat(o.Lu.PY),"\\.".concat(o.Lu.R),"\\.".concat(o.Lu.SQL),"\\.".concat(o.Lu.YAML),"\\.".concat(o.Lu.YML)].join("|"),v=new RegExp("".concat(p,"$")),h=a?i.Q3:i.$W;if(h.concat(i.tf.DBT).includes(n)&&f.match(v)){var b=f.lastIndexOf("."),g=f.slice(b+1);return{language:o.nB[g],type:n,uuid:f.slice(0,b)}}}function d(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=l(e,n).split(r.sep);if(t[1]){var c=(0,u.C5)(t[n?0:1]);t[1]===i.tf.DBT&&(c=i.tf.DBT);var a=t[t.length-1],s=new RegExp(".".concat(o.Lu.YAML,"$")),d=new RegExp(".".concat(o.Lu.R,"$")),f=new RegExp(".".concat(o.Lu.SQL,"$")),p=new RegExp(".".concat(o.Lu.MD,"$"));if(a.match(s)&&i.VZ.includes(c))return{type:c,uuid:a.replace(s,"")};if(a.match(d)&&i.J8.includes(c))return{type:c,uuid:a.replace(d,"")};if(a.match(f)&&i.HX.includes(c)){var v=a.replace(/[.]/g,"_"),h=c===i.tf.DBT?t.slice(2,-1).join("_").concat("_".concat(v)):a.replace(f,"");return{type:c,uuid:h}}return a.match(p)&&c===i.tf.MARKDOWN?{type:c,uuid:a.replace(p,"")}:void 0}}function f(e,n){var t=e.split("."),i=t[t.length-1];o.n6.includes(i)&&t.pop();var u=t.join("").split(r.sep),l=u.slice(1,u.length).join("");return n.find((function(e){return e.uuid===l}))}function p(e){var n=e||{},t=n.language,r=n.name,l=n.type;if(r&&t&&l){var c=l===i.tf.CUSTOM?l:"".concat(l,"s"),a=o.JD[t],s=(0,u.kE)(r);return"".concat(c,"/").concat(s,".").concat(a)}}},91207:function(e,n,t){"use strict";t.d(n,{Z:function(){return N}});var r=t(82394),i=t(75582),o=t(17717),u=t(82684),l=t(37958),c=t(83455),a=t(35490),s=t(86422),d=t(60328),f=t(38626),p=t(93461),v=t(67971),h=t(28598),b=f.default.div.withConfig({displayName:"ButtonGroup__ButtonGroupStyle",componentId:"sc-15vbmc8-0"})([""]),g=f.default.div.withConfig({displayName:"ButtonGroup__VerticalDivider",componentId:"sc-15vbmc8-1"})(["width:1px;"]),m=function(e){var n=e.children,t=e.divider,r=u.Children.toArray(n).length;return(0,h.jsx)(b,{children:(0,h.jsx)(v.ZP,{children:u.Children.map(n,(function(e,n){return e&&(0,h.jsxs)(p.Z,{children:[n>=1&&t&&(0,h.jsx)(g,{}),u.cloneElement(e,{borderRadiusLeft:r>=2&&0===n,borderRadiusRight:r>=2&&n===r-1,halfPaddingLeft:r>=2&&0!==n,halfPaddingRight:r>=2&&n!==r-1,noBorder:r>=2&&n>0&&n<r-1,noBorderRight:r>=2&&n!==r-1})]},"button-group-child-".concat(n))}))})})},S=t(57722),O=t(73828),j=t(11135),T=t(98781),y=t(86673),E=t(82531),P=t(16115),k=t(94353),w=t(60701),Z=t(55512),_=t(24224),R=t(32821),L=t(90211),x=t(96510),M=t(51504),A=t(41150);function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var N=function(e){var n=e.active,t=e.addNewBlock,f=e.disableRefreshWarning,p=e.fetchPipeline,b=e.fetchVariables,g=e.filePath,D=e.hideHeaderButtons,N=e.onContentChange,I=e.onUpdateFileSuccess,B=e.openSidekickView,Y=e.pipeline,U=e.saveFile,W=e.selectedFilePath,F=e.sendTerminalMessage,H=e.setDisableShortcuts,Q=e.setErrors,X=e.setFilesTouched,V=e.setSelectedBlock,G=(0,l.j)("apiReloads"),J=(0,i.Z)(G,2)[1],$=(0,u.useState)(null),K=$[0],q=$[1],z=(0,u.useState)(!1),ee=z[0],ne=(z[1],(0,u.useRef)(null)),te=(0,u.useMemo)((function(){return new a.Z}),[]),re=(0,u.useMemo)((function(){return{api_key:k.l,token:te.decodedToken.token}}),[te]),ie=E.ZP.statuses.list().data,oe=(0,u.useMemo)((function(){var e,n;return null===ie||void 0===ie||null===(e=ie.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.repo_path}),[ie]),ue=E.ZP.file_contents.detail(g).data;(0,u.useEffect)((function(){null!==ue&&void 0!==ue&&ue.file_content&&q(ue.file_content)}),[ue]);var le=(0,u.useState)(null===K||void 0===K?void 0:K.content),ce=le[0],ae=le[1],se=(0,u.useCallback)((function(e){ae(e),N&&(null===N||void 0===N||N(e))}),[N]),de=(0,u.useState)(!1),fe=de[0],pe=de[1];(0,u.useEffect)((function(){n&&H&&(null===H||void 0===H||H(!0))}),[n,H]),(0,u.useEffect)((function(){var e;W&&(null===ne||void 0===ne||null===(e=ne.current)||void 0===e||e.scrollIntoView())}),[W]);var ve=(0,c.Db)(E.ZP.file_contents.useUpdate((null===K||void 0===K?void 0:K.path)&&encodeURIComponent(null===K||void 0===K?void 0:K.path)),{onSuccess:function(e){return(0,x.wD)(e,{callback:function(e){var n=e.file_content;J((function(e){return C(C({},e),{},(0,r.Z)({},"FileVersions/".concat(null===K||void 0===K?void 0:K.path),Number(new Date)))})),I&&(null===I||void 0===I||I(n))},onErrorCallback:function(e,n){return null===Q||void 0===Q?void 0:Q({errors:n,response:e})}})}}),he=(0,i.Z)(ve,1)[0],be=(0,u.useCallback)((function(e,n){if(U)return U(e,n);he({file_content:C(C({},n),{},{content:e})}).then((function(){decodeURIComponent(g).split(o.sep).pop()===O.dT.METADATA_YAML&&b&&(null===b||void 0===b||b())})),X((function(e){return C(C({},e),{},(0,r.Z)({},null===n||void 0===n?void 0:n.path,!1))})),pe(!1)}),[b,g,U,X,he]),ge=(0,u.useMemo)((function(){return(0,Z.lU)()}),[]),me=(0,u.useMemo)((function(){var e,n,t,r;return null===(null===K||void 0===K||null===(e=K.path)||void 0===e?void 0:e.match(ge))?O.Lu.TXT:null===K||void 0===K||null===(n=K.path)||void 0===n||null===(t=n.match(ge))||void 0===t||null===(r=t[0])||void 0===r?void 0:r.split(".")[1]}),[ge,K]),Se=(0,u.useMemo)((function(){if(null!==K&&void 0!==K&&K.path)return(0,h.jsx)(S.Z,{autoHeight:!0,language:O.nB[me],onChange:function(e){se(e),X((function(e){return C(C({},e),{},(0,r.Z)({},null===K||void 0===K?void 0:K.path,!0))})),pe(!0)},onSave:function(e){be(e,K)},selected:!0,textareaFocused:!0,value:(0,L.Pb)(null===K||void 0===K?void 0:K.content)?JSON.stringify(JSON.parse(null===K||void 0===K?void 0:K.content),null,2):null===K||void 0===K?void 0:K.content,width:"100%"})}),[K,me,be,se,X]),Oe=null!==Y&&void 0!==Y&&Y.blocks?(0,_.sE)(null===Y||void 0===Y?void 0:Y.blocks,(function(e){var n=e.type;return s.tf.DATA_EXPORTER===n})):null,je=(0,c.Db)(E.ZP.blocks.pipelines.useUpdate(null===Y||void 0===Y?void 0:Y.uuid,null===Oe||void 0===Oe?void 0:Oe.uuid),{onSuccess:function(e){return(0,x.wD)(e,{callback:function(){null===p||void 0===p||p()}})}}),Te=(0,i.Z)(je,1)[0],ye=t&&Y&&(me===O.Lu.PY||me===O.Lu.SQL||(me===O.Lu.YAML||me===O.Lu.R)&&(0,R.V3)(K,null===K||void 0===K?void 0:K.path))&&(0,Z.ck)(K.path.split(o.sep))!==s.tf.SCRATCHPAD&&(0,R.lr)(K)&&(0,h.jsx)(d.Z,{onClick:function(){var e=(null===Y||void 0===Y?void 0:Y.type)===T.qL.INTEGRATION,n=(0,Z.TU)(K,oe,Y);t(n,(function(n){e&&Oe&&Te({block:C(C({},Oe),{},{upstream_blocks:[n.uuid]})}),null===V||void 0===V||V(n)}))},primary:!0,children:"Add to current pipeline"}),Ee=F&&(0,h.jsx)(y.Z,{m:2,children:(0,h.jsx)(j.ZP,{disabled:!oe,inline:!0,loading:ee,onClick:function(){null===B||void 0===B||B(w.cH.TERMINAL),null===F||void 0===F||F(JSON.stringify(C(C({},re),{},{command:["stdin","pip install -r ".concat(oe,"/requirements.txt\r")]})))},title:oe?"Pip install packages from your saved requirements.txt file (\u2318+S to save).":"Please use right panel terminal to install packages.",uuid:"FileEditor/InstallPackages",children:"Install packages"})}),Pe="FileEditor/".concat(null===K||void 0===K?void 0:K.path),ke=(0,A.y)(),we=ke.registerOnKeyDown,Ze=ke.unregisterOnKeyDown;return(0,u.useEffect)((function(){return function(){Ze(Pe)}}),[Ze,Pe]),we(Pe,(function(e,t){if(n&&!f)if((0,M.y)([P.zX,P.Um],t)||(0,M.y)([P.PQ,P.Um],t))e.preventDefault(),be(ce,K);else if(fe&&(0,M.y)([P.zX,P.hS],t)){e.preventDefault();var r="".concat(K.path," has changes that are unsaved. ")+"Click cancel and save your changes before reloading page.";"undefined"!==typeof location&&window.confirm(r)&&location.reload()}}),[n,ce,f,K,be,fe]),(0,h.jsxs)("div",{ref:ne,children:[!D&&(0,h.jsx)(y.Z,{p:2,children:(0,h.jsxs)(v.ZP,{justifyContent:"space-between",children:[(0,h.jsxs)(m,{children:[ye,(0,h.jsx)(d.Z,{disabled:!ce,onClick:function(e){e.preventDefault(),be(ce,K)},title:ce?null:"No changes have been made to this file.",children:"Save file content"})]}),B&&(0,h.jsx)(m,{children:(0,h.jsx)(d.Z,{compact:!0,onClick:function(){B(w.cH.FILE_VERSIONS)},small:!0,title:"View previous changes to this file.",children:"Show versions"})})]})}),Se,g===O.dT.REQS_TXT&&Ee]})}},55512:function(e,n,t){"use strict";t.d(n,{TU:function(){return f},ck:function(){return s},lU:function(){return d}});var r=t(21831),i=t(17717),o=t(86422),u=t(98781),l=t(73828),c=t(24224),a=t(90211),s=function(e){var n=e[0];return n===o.tf.DBT||n===o.tf.CUSTOM?n:e[0].slice(0,-1)};function d(){return new RegExp(Object.keys(l.nB).map((function(e){return".(".concat(e,")$")})).join("|"))}function f(e,n,t){var f,p,v=null===e||void 0===e||null===(f=e.path.match(d())[0])||void 0===f?void 0:f.split(".")[1],h=t.type===u.qL.INTEGRATION,b=(0,c.sE)(null===t||void 0===t?void 0:t.blocks,(function(e){var n=e.type;return o.tf.DATA_EXPORTER===n})),g=e.path.replace(n,"").split(i.sep),m=e.path.split(i.sep)[0]===o.tf.DBT,S=(p=g)[0]===o.tf.DBT?p.slice(1).join(i.sep):function(e){return e.at(-1)}(p).split(".")[0];if(g.length>=3&&!m){var O=g.slice(1,g.length-1).join(i.sep);S="".concat(O,"/").concat(S)}var j=s(e.path.split(i.sep)),T={configuration:{file_path:m?S:null},language:l.nB[v],name:(0,a.wE)(S),type:j};if(j===o.tf.CUSTOM&&(T.color=o.Lq.TEAL),h){var y=(0,c.sE)(t.blocks,(function(e){var n=e.type;return o.tf.DATA_LOADER===n})),E=(0,c.sE)(t.blocks,(function(e){var n=e.type;return o.tf.TRANSFORMER===n})),P=[];E?P.push(E.uuid):null!==b&&void 0!==b&&b.upstream_blocks?P.push.apply(P,(0,r.Z)(b.upstream_blocks)):y&&P.push(y.uuid),T.upstream_blocks=P}return T}},84392:function(e,n,t){"use strict";t.d(n,{HF:function(){return u},L6:function(){return r}});var r,i=t(46336),o=t(22341);function u(e,n,t){var u=e.owner,l=(e.roles,[{Icon:o.Vz,id:r.WORKSPACES,isSelected:function(){return r.WORKSPACES===t},label:function(){return"Workspaces"},linkProps:{href:"/manage"}}]);return u&&l.push({Icon:o.NO,id:r.USERS,isSelected:function(){return r.USERS===t},label:function(){return"Users"},linkProps:{href:"/manage/users"}}),n==i.k.MAIN&&l.push({Icon:o.Zr,id:r.SETTINGS,isSelected:function(){return r.SETTINGS===t},label:function(){return"Settings"},linkProps:{href:"/manage/settings"}}),l}!function(e){e.WORKSPACES="workspaces",e.USERS="users",e.SETTINGS="settings"}(r||(r={}))},3849:function(e,n,t){"use strict";var r=t(82684),i=t(1210),o=t(82531),u=t(49125),l=t(84392),c=t(9736),a=t(28598);n.Z=function(e){var n=e.before,t=e.breadcrumbs,s=void 0===t?[]:t,d=e.children,f=e.errors,p=e.pageName,v=e.subheaderChildren,h=o.ZP.statuses.list().data,b=(0,r.useMemo)((function(){var e,n;return null===h||void 0===h||null===(e=h.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.project_type}),[h]),g=(0,c.PR)()||{};return(0,a.jsx)(i.Z,{before:n,beforeWidth:n?50*u.iI:0,breadcrumbs:s,errors:f,navigationItems:(0,l.HF)(g,b,p),subheaderChildren:v,title:"Workspaces",uuid:"workspaces/index",children:d})}},73828:function(e,n,t){"use strict";t.d(n,{JD:function(){return h},Lu:function(){return o},PF:function(){return f},dT:function(){return u},n6:function(){return a},nB:function(){return v},oy:function(){return p},xF:function(){return d}});var r,i,o,u,l=t(82394),c=t(86422);!function(e){e.CSV="csv",e.JSON="json",e.MD="md",e.PY="py",e.R="r",e.SQL="sql",e.TXT="txt",e.YAML="yaml",e.YML="yml"}(o||(o={})),function(e){e.INIT_PY="__init__.py",e.METADATA_YAML="metadata.yaml",e.REQS_TXT="requirements.txt"}(u||(u={}));var a=[o.PY,o.SQL],s=[o.JSON,o.MD,o.PY,o.R,o.SQL,o.TXT,o.YAML,o.YML],d=new RegExp(s.map((function(e){return".".concat(e,"$")})).join("|")),f=(new RegExp(s.map((function(e){return".".concat(e,"$")})).join("|")),"charts"),p="pipelines",v=(r={},(0,l.Z)(r,o.MD,c.t6.MARKDOWN),(0,l.Z)(r,o.JSON,o.JSON),(0,l.Z)(r,o.PY,c.t6.PYTHON),(0,l.Z)(r,o.R,c.t6.R),(0,l.Z)(r,o.SQL,c.t6.SQL),(0,l.Z)(r,o.TXT,"text"),(0,l.Z)(r,o.YAML,c.t6.YAML),(0,l.Z)(r,o.YML,c.t6.YAML),r),h=(i={},(0,l.Z)(i,c.t6.MARKDOWN,o.MD),(0,l.Z)(i,c.t6.PYTHON,o.PY),(0,l.Z)(i,c.t6.R,o.R),(0,l.Z)(i,c.t6.SQL,o.SQL),(0,l.Z)(i,c.t6.YAML,o.YAML),(0,l.Z)(i,"text",o.TXT),i)},46336:function(e,n,t){"use strict";var r,i;t.d(n,{d:function(){return r},k:function(){return i}}),function(e){e.ADD_NEW_BLOCK_V2="add_new_block_v2"}(r||(r={})),function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(i||(i={}))},3938:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(38860),o=t.n(i),u=t(82684),l=t(91207),c=t(41788),a=t(3849),s=t(84392),d=t(28598);function f(){var e=(0,u.useState)(null),n=e[0];e[1];return(0,d.jsx)(a.Z,{breadcrumbs:[{label:function(){return"Workspaces"},linkProps:{as:"/manage",href:"/manage"}},{bold:!0,label:function(){return"Settings"}}],errors:n,pageName:s.L6.SETTINGS,children:(0,d.jsx)(l.Z,{active:!0,filePath:"metadata.yaml",selectedFilePath:"metadata.yaml",setFilesTouched:function(){return null}})})}f.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)}))),n.default=(0,c.Z)(f)},37958:function(e,n,t){"use strict";t.d(n,{j:function(){return r}});var r=(0,t(44152).r)({apiReloads:{}}).useGlobalState},1116:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage/settings",function(){return t(3938)}])}},function(e){e.O(0,[844,9902,8789,4398,1424,1005,6422,7722,9774,2888,179],(function(){return n=1116,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|