mage-ai 0.9.17__py3-none-any.whl → 0.9.19__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/api/middleware.py +9 -6
- mage_ai/api/policies/PageBlockLayoutPolicy.py +46 -0
- mage_ai/api/policies/PipelinePolicy.py +1 -0
- mage_ai/api/presenters/PageBlockLayoutPresenter.py +12 -0
- mage_ai/api/resources/FileContentResource.py +4 -3
- mage_ai/api/resources/PageBlockLayoutResource.py +22 -0
- mage_ai/api/resources/PipelineResource.py +60 -13
- mage_ai/data_preparation/executors/k8s_pipeline_executor.py +14 -1
- mage_ai/data_preparation/models/block/dbt/__init__.py +2 -0
- mage_ai/data_preparation/models/block/dbt/utils/__init__.py +2 -1
- mage_ai/presenters/__init__.py +0 -0
- mage_ai/presenters/block_layout/__init__.py +0 -0
- mage_ai/presenters/block_layout/constants.py +1 -0
- mage_ai/presenters/block_layout/page.py +86 -0
- mage_ai/presenters/constants.py +2 -0
- mage_ai/server/api/v1.py +16 -0
- 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/DTEnEDO68KRvd3eboRuhE/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1484-e209ef2f20fcfc81.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4250-9944d52bed19617c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-d12c3b172bd25751.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-a214672a55b1ce9f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-bf8a8f58e19dca2d.js +1 -0
- 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 +2 -2
- 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 +2 -2
- 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/IH3dqMU16smA5y2jlNbyO/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1484-e209ef2f20fcfc81.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4250-9944d52bed19617c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-d12c3b172bd25751.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-a214672a55b1ce9f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-bf8a8f58e19dca2d.js +1 -0
- 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 +2 -2
- 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 +2 -2
- 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 +6 -0
- {mage_ai-0.9.17.dist-info → mage_ai-0.9.19.dist-info}/METADATA +6 -6
- {mage_ai-0.9.17.dist-info → mage_ai-0.9.19.dist-info}/RECORD +120 -110
- mage_ai/server/frontend_dist/_next/static/1DZSWnWcVE2obH85IV0op/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1484-65c543b9350ab7a0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-7f790238fe70d9ab.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-158c1a93ac7a951a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-cbaf371216a70d43.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1484-65c543b9350ab7a0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-7f790238fe70d9ab.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-158c1a93ac7a951a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-cbaf371216a70d43.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/soS0jKSs4SMF0J72xdj2L/_buildManifest.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{1DZSWnWcVE2obH85IV0op → DTEnEDO68KRvd3eboRuhE}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist/_next/static/{1DZSWnWcVE2obH85IV0op → DTEnEDO68KRvd3eboRuhE}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{soS0jKSs4SMF0J72xdj2L → IH3dqMU16smA5y2jlNbyO}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{soS0jKSs4SMF0J72xdj2L → IH3dqMU16smA5y2jlNbyO}/_ssgManifest.js +0 -0
- {mage_ai-0.9.17.dist-info → mage_ai-0.9.19.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.17.dist-info → mage_ai-0.9.19.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.17.dist-info → mage_ai-0.9.19.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.17.dist-info → mage_ai-0.9.19.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1484],{67429:function(e,n,t){var o=t(82394),i=t(21831),r=t(82684),u=t(16115),l=t(41150),c=t(28598);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function s(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,o.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.highlightedItemIndexInitial,t=void 0===n?null:n,o=e.itemGroups,a=e.noResultGroups,d=e.onHighlightItemIndexChange,f=e.onMouseEnterItem,p=e.onMouseLeaveItem,m=e.onSelectItem,h=e.renderEmptyState,v=e.searchQuery,b=e.selectedItem,g=e.setItemRefs,x=e.uuid,j=(0,r.useState)(!0),C=j[0],_=j[1],O=(0,r.useMemo)((function(){var e=[],n=o.reduce((function(n,t){var o=t.items.filter((function(e){return!v||function(e,n){return e.searchQueries.filter((function(e){return String(e).toLowerCase().includes(n.toLowerCase())})).length>=1}(e,v)}));return 0===o.length?n:(e.push.apply(e,(0,i.Z)(o)),n.concat(s(s({},t),{},{items:o})))}),[]);return{itemGroups:n,itemsFlattened:e}}),[o,v]),Z=O.itemGroups,k=O.itemsFlattened;a&&0===k.length&&(Z.push.apply(Z,(0,i.Z)(a)),k.push.apply(k,(0,i.Z)(a.reduce((function(e,n){var t=n.items;return e.concat(t)}),[]))));var y=(0,r.useRef)(null);y.current=k.map((function(){return(0,r.createRef)()}));var E=(0,r.useState)(t),T=E[0],I=E[1],A=(0,r.useCallback)((function(e){null===d||void 0===d||d(e),I(e)}),[d,I]),R=k[T],S=(0,l.y)(),P=S.registerOnKeyDown,w=S.unregisterOnKeyDown;(0,r.useEffect)((function(){return function(){return w(x)}}),[w,x]),null===P||void 0===P||P(x,(function(e,n,t){var o,i=!0,r=k.length,l=k.findIndex((function(e,o){var i=e.keyboardShortcutValidation;return null===i||void 0===i?void 0:i({keyHistory:t,keyMapping:n},o)})),c=n[u.Gs]&&!n[u.XR]&&!b;return-1!==l?(e.preventDefault(),m(k[l]),_(i),A(l)):(n[u.Uq]||c)&&k[T]?(c&&e.preventDefault(),m(k[T]),_(i),A(T)):(n[u.Bu]?(i=!1,o=null===T?r-1:T-1):n[u.kD]?(i=!1,o=null===T?0:T+1):n[u.vP]&&A(null),"undefined"!==typeof o&&(o>=r?o=0:o<=-1&&(o=r-1),o>=0&&o<=r-1?(A(o),e.preventDefault()):A(null)),void _(i))}),[T,k,b,A,_]),(0,r.useEffect)((function(){null===g||void 0===g||g(y)}),[y,k,g]),(0,r.useEffect)((function(){var e=null===T||"undefined"===typeof T||T>=k.length;(null===v||void 0===v?void 0:v.length)>=1&&e&&A(0)}),[T,k,v,A]);var D=(0,r.useCallback)((function(){return _(!0)}),[_]);return(0,r.useEffect)((function(){return window.addEventListener("mousemove",D),function(){window.removeEventListener("mousemove",D)}}),[D]),0===Z.length&&h?h():(0,c.jsx)(c.Fragment,{children:Z.map((function(e,n){var t=e.items,o=e.renderItem,i=e.renderGroupHeader,r=e.uuid,u=n>=1?Z.slice(0,n).reduce((function(e,n){return e+n.items.length}),0):0,l=t.map((function(e,n){var t=e.itemObject,i=e.value,r=i===(null===R||void 0===R?void 0:R.value),l=n+u,a=(null===t||void 0===t?void 0:t.id)||(null===t||void 0===t?void 0:t.uuid);return(0,c.jsx)("div",{id:"item-".concat(i,"-").concat(a),onMouseMove:function(){return C&&A(l)},ref:y.current[l],children:o(e,{highlighted:r,onClick:function(){return m(e)},onMouseEnter:function(){return null===f||void 0===f?void 0:f(e)},onMouseLeave:function(){return null===p||void 0===p?void 0:p(e)}},n,l)},"item-".concat(i,"-").concat(a))}));return l.length>=1&&(0,c.jsxs)("div",{children:[null===i||void 0===i?void 0:i(),l]},r||"group-uuid-".concat(n))}))})}},78759:function(e,n,t){t.d(n,{G8:function(){return p},SR:function(){return h},VR:function(){return a},_H:function(){return v},x8:function(){return m}});var o,i,r,u,l,c,a,s=t(82394),d=t(42451);!function(e){e.COLUMNS="columns",e.METRICS="metrics",e.NUMBER="number"}(a||(a={}));var f={noCode:[{label:function(){return"time column"},settings:{maxValues:1},type:a.COLUMNS,uuid:d.eN},{label:function(){return"time interval"},options:[d.aE.ORIGINAL,d.aE.SECOND,d.aE.MINUTE,d.aE.HOUR,d.aE.DAY,d.aE.WEEK,d.aE.MONTH,d.aE.YEAR],uuid:d.Yg},{label:function(){return"metrics"},type:a.METRICS,uuid:d.bE}]},p=(o={},(0,s.Z)(o,d.oV.BAR_CHART,{noCode:[{label:function(){return"group by columns"},type:a.COLUMNS,uuid:d.eN},{label:function(){return"metrics"},type:a.METRICS,uuid:d.bE},{autoRun:!0,label:function(){return"chart style"},options:[d.JT.HORIZONTAL,d.JT.VERTICAL],uuid:d.R8},{autoRun:!0,label:function(){return"sort direction"},options:[null,d.MP.ASCENDING,d.MP.DESCENDING],uuid:d.$1}],code:[{label:function(){return"variable name of x-axis values"},monospace:!0,uuid:d.a3},{label:function(){return"variable name of y-axis values"},monospace:!0,uuid:d.rj}]}),(0,s.Z)(o,d.oV.HISTOGRAM,{noCode:[{label:function(){return"number column for chart"},settings:{maxValues:1},type:a.COLUMNS,uuid:d.eN},{autoRun:!0,label:function(){return"Number of buckets"},type:a.NUMBER,uuid:d.m7}],code:[{label:function(){return"variable name of values"},monospace:!0,uuid:d.a3}]}),(0,s.Z)(o,d.oV.LINE_CHART,{noCode:[{label:function(){return"group by columns"},settings:{maxValues:1},type:a.COLUMNS,uuid:d.eN},{label:function(){return"metrics"},type:a.METRICS,uuid:d.bE}],code:[{label:function(){return"variable name of x-axis values"},monospace:!0,uuid:d.a3},{label:function(){return"variable name of y-axis values"},monospace:!0,uuid:d.rj},{label:function(){return"labels of lines in chart (comma separated)"},uuid:d.e}]}),(0,s.Z)(o,d.oV.PIE_CHART,{noCode:[{label:function(){return"column for chart"},settings:{maxValues:1},type:a.COLUMNS,uuid:d.eN},{autoRun:!0,label:function(){return"Number of slices"},type:a.NUMBER,uuid:d.m7}],code:[{label:function(){return"variable name of values"},monospace:!0,uuid:d.a3}]}),(0,s.Z)(o,d.oV.TABLE,{noCode:[{label:function(){return"columns"},type:a.COLUMNS,uuid:d.eN},{label:function(){return"max number of rows"},type:a.NUMBER,uuid:d.PG}],code:[{label:function(){return"variable name of columns"},monospace:!0,uuid:d.a3},{label:function(){return"variable name of rows"},monospace:!0,uuid:d.rj}]}),(0,s.Z)(o,d.oV.TIME_SERIES_BAR_CHART,f),(0,s.Z)(o,d.oV.TIME_SERIES_LINE_CHART,f),o),m=(i={},(0,s.Z)(i,d.oV.BAR_CHART,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.a3,"x"),(0,s.Z)(n,d.rj,"y"),(0,s.Z)(n,d.R8,d.JT.VERTICAL),n},content:function(e){return"columns = df_1.columns\nx = df_1.columns[:7]\ny = [[v] for v in [len(df_1[col].unique()) for col in x]]\n"}}),(0,s.Z)(i,d.oV.HISTOGRAM,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.m7,10),(0,s.Z)(n,d.a3,"x"),n},content:function(e){return"columns = df_1.columns\ncol = list(filter(lambda x: df_1[x].dtype == float or df_1[x].dtype == int, columns))[0]\nx = df_1[col]\n"}}),(0,s.Z)(i,d.oV.LINE_CHART,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.a3,"x"),(0,s.Z)(n,d.rj,"y"),n},content:function(e){return"columns = df_1.columns\ncols = list(filter(lambda x: df_1[x].dtype == float or df_1[x].dtype == int, columns))\nx = df_1[cols[0]]\ny = [df_1[cols[1]]]\n"}}),(0,s.Z)(i,d.oV.PIE_CHART,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.m7,7),(0,s.Z)(n,d.a3,"x"),n},content:function(e){return"x = df_1[df_1.columns[0]]"}}),(0,s.Z)(i,d.oV.TABLE,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.PG,10),(0,s.Z)(n,d.a3,"x"),(0,s.Z)(n,d.rj,"y"),n},content:function(e){return"x = df_1.columns\ny = df_1.to_numpy()"}}),(0,s.Z)(i,d.oV.TIME_SERIES_BAR_CHART,{configuration:function(e){return(0,s.Z)({},d.Yg,d.aE.ORIGINAL)}}),(0,s.Z)(i,d.oV.TIME_SERIES_LINE_CHART,{configuration:function(e){return(0,s.Z)({},d.Yg,d.aE.ORIGINAL)}}),i),h=(c={},(0,s.Z)(c,d.oV.BAR_CHART,(r={},(0,s.Z)(r,d.a3,(function(){return"must be a list of booleans, dates, integers, floats, or strings."})),(0,s.Z)(r,d.rj,(function(){return"must be a list of lists containing integers or floats."})),r)),(0,s.Z)(c,d.oV.HISTOGRAM,(0,s.Z)({},d.a3,(function(){return"must be a list of integers or floats."}))),(0,s.Z)(c,d.oV.LINE_CHART,(u={},(0,s.Z)(u,d.a3,(function(){return"must be a list of integers or floats."})),(0,s.Z)(u,d.rj,(function(){return"must be a list of lists containing integers or floats. Each list is a single line in the chart."})),u)),(0,s.Z)(c,d.oV.PIE_CHART,(0,s.Z)({},d.a3,(function(){return"must be a list of booleans, dates, integers, floats, or strings."}))),(0,s.Z)(c,d.oV.TABLE,(l={},(0,s.Z)(l,d.a3,(function(){return"must be a list of strings."})),(0,s.Z)(l,d.rj,(function(){return"must be a list of lists containing booleans, dates, integers, floats, or strings."})),l)),c),v=[{label:function(){return"% of missing values"},widgetTemplate:function(e){var n,t=e.block;return{name:"missing values for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.a3,"columns_with_mising_values"),(0,s.Z)(n,d.rj,"percentage_of_missing_values"),(0,s.Z)(n,d.R8,d.JT.HORIZONTAL),(0,s.Z)(n,d.$1,d.MP.DESCENDING),(0,s.Z)(n,"chart_type",d.oV.BAR_CHART),n),content:"number_of_rows = len(df_1.index)\ncolumns_with_mising_values = []\npercentage_of_missing_values = []\nfor col in df_1.columns:\n missing = df_1[col].isna().sum()\n if missing > 0:\n columns_with_mising_values.append(col)\n percentage_of_missing_values.append(100 * missing / number_of_rows)\n"}}},{label:function(){return"Unique values"},widgetTemplate:function(e){var n,t=e.block;return{name:"unique values for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.a3,"columns"),(0,s.Z)(n,d.rj,"number_of_unique_values"),(0,s.Z)(n,d.R8,d.JT.HORIZONTAL),(0,s.Z)(n,d.$1,d.MP.DESCENDING),(0,s.Z)(n,"chart_type",d.oV.BAR_CHART),n),content:"columns = df_1.columns\nnumber_of_unique_values = [df_1[col].nunique() for col in columns]\n"}}},{label:function(){return"Most frequent values"},widgetTemplate:function(e){var n,t=e.block;return{name:"most frequent values for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.JJ,3e3),(0,s.Z)(n,d.ED,"column_index"),(0,s.Z)(n,d.a3,"columns"),(0,s.Z)(n,d.rj,"rows"),(0,s.Z)(n,"chart_type",d.oV.TABLE),n),content:"columns = ['mode value', 'frequency', '% of values']\n\ncolumn_index = []\nrows = []\nfor col in df_1.columns:\n value_counts = df_1[col].value_counts()\n if len(value_counts.index) == 0:\n continue\n column_value = value_counts.index[0]\n value = value_counts[column_value]\n number_of_rows = df_1[col].count()\n column_index.append(col)\n rows.append([\n column_value,\n f'{round(100 * value / number_of_rows, 2)}%',\n value,\n ])\n"}}},{label:function(){return"Summary overview"},widgetTemplate:function(e){var n,t=e.block;return{name:"summary overview for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.JJ,3e3),(0,s.Z)(n,d.ED,"stats"),(0,s.Z)(n,d.a3,"headers"),(0,s.Z)(n,d.rj,"rows"),(0,s.Z)(n,"chart_type",d.oV.TABLE),n),content:"from mage_ai.data_cleaner.column_types.column_type_detector import infer_column_types\n\n\nheaders = ['value']\nstats = ['Columns', 'Rows']\nrows = [[len(df_1.columns)], [len(df_1.index)]]\n\ncol_counts = {}\nfor col, col_type in infer_column_types(df_1).items():\n col_type_name = col_type.value\n if not col_counts.get(col_type_name):\n col_counts[col_type_name] = 0\n col_counts[col_type_name] += 1\n\nfor col_type, count in sorted(col_counts.items()):\n stats.append(f'# of {col_type}')\n rows.append([count])\n"}}},{label:function(){return"Feature profiles"},widgetTemplate:function(e){var n,t=e.block;return{name:"feature profiles for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.JJ,3e3),(0,s.Z)(n,d.ED,"stats"),(0,s.Z)(n,d.a3,"columns"),(0,s.Z)(n,d.rj,"rows"),(0,s.Z)(n,"chart_type",d.oV.TABLE),n),content:"from mage_ai.data_cleaner.column_types.column_type_detector import infer_column_types\nimport statistics\n\n\ncolumns_and_types = infer_column_types(df_1).items()\ncolumns = [t[0] for t in columns_and_types]\nstats = ['Type', 'Missing values', 'Unique values', 'Min', 'Max', 'Mean', 'Median', 'Mode']\nrows = [[] for _ in stats]\n\nfor col, col_type in columns_and_types:\n series = df_1[col]\n min_value = None\n max_value = None\n mean = None\n median = None\n\n not_null = series[series.notnull()]\n\n if col_type.value in ['number', 'number_with_decimals']:\n count = len(not_null.index)\n if count >= 1:\n mean = round(not_null.sum() / count, 2)\n median = sorted(not_null)[int(count / 2)]\n min_value = round(series.min(), 2)\n max_value = round(series.max(), 2)\n else:\n min_value = not_null.astype(str).min()\n max_value = not_null.astype(str).max()\n\n _, mode = sorted(\n [(v, k) for k, v in not_null.value_counts().items()],\n reverse=True,\n )[0]\n\n for idx, value in enumerate([\n col_type.value,\n len(series[series.isna()].index),\n len(series.unique()),\n min_value,\n max_value,\n mean,\n median,\n mode,\n ]):\n rows[idx].append(value)\n"}}}]},22782:function(e,n,t){t.d(n,{MB:function(){return m},Nk:function(){return a},T5:function(){return s},_A:function(){return f},a3:function(){return p},wx:function(){return d}});var o=t(38626),i=t(23831),r=t(44162),u=t(73942),l=t(49125),c=t(19711),a=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-n38rkq-0"})([""," border-left-style:solid;border-left-width:2px;border-right-style:solid;border-right-width:2px;overflow:hidden;"," "," ",""],r.Kf,(function(e){return e.addBottomPadding&&"\n padding-bottom: ".concat(2*l.tr,"px;\n ")}),(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).table,";\n ")}),(function(e){return!e.executedAndIdle&&"\n border-bottom-left-radius: ".concat(u.n_,"px;\n border-bottom-right-radius: ").concat(u.n_,"px;\n border-bottom-style: solid;\n border-bottom-width: 2px;\n ")})),s=o.default.div.withConfig({displayName:"indexstyle__OutputRowStyle",componentId:"sc-n38rkq-1"})([""," "," ",""],(function(e){return e.first&&"\n padding-top: ".concat(l.iI*l.cd,"px;\n ")}),(function(e){return e.last&&"\n padding-bottom: ".concat(l.iI*l.cd,"px;\n ")}),(function(e){return e.contained&&"\n padding-left: ".concat(r.oh,"px;\n padding-right: ").concat(l.iI*l.cd,"px;\n ")})),d=o.default.div.withConfig({displayName:"indexstyle__HTMLOutputStyle",componentId:"sc-n38rkq-2"})([""," table{"," border-left-style:solid;border-left-width:2px;border-right-style:solid;border-right-width:2px;}td,th{padding:0 8px;}a{","}"],c.IH,r.Kf,(function(e){return"\n color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),f=o.default.div.withConfig({displayName:"indexstyle__ExtraInfoStyle",componentId:"sc-n38rkq-3"})([""," border-bottom-style:solid;border-bottom-width:2px;border-left-style:solid;border-left-width:2px;border-right-style:solid;border-right-width:2px;",""],r.Kf,(function(e){return"\n background-color: ".concat((e.theme.borders||i.Z.borders).light,";\n border-bottom-left-radius: ").concat(u.n_,"px;\n border-bottom-right-radius: ").concat(u.n_,"px;\n ")})),p=o.default.div.withConfig({displayName:"indexstyle__ExtraInfoContentStyle",componentId:"sc-n38rkq-4"})(["padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;"],l.iI,r.oh,l.iI*l.cd,l.iI),m=o.default.div.withConfig({displayName:"indexstyle__ExtraInfoBorderStyle",componentId:"sc-n38rkq-5"})(["height:1px;width:100%;",""],(function(e){return"\n border-top: 1px solid ".concat((e.theme.borders||i.Z.borders).medium,";\n ")}))},65051:function(e,n,t){var o=t(21831),i=t(82394),r=t(75582),u=t(82684),l=t(89565),c=t.n(l),a=t(62302),s=t(83455),d=t(35490),f=t(86422),p=t(60328),m=t(16634),h=t(57722),v=t(62976),b=t(48952),g=t(34744),x=t(93461),j=t(67971),C=t(82635),_=t(98781),O=t(66176),Z=t(86673),k=t(19711),y=t(46261),E=t(82531),T=t(66166),I=t(22341),A=t(22782),R=t(73828),S=t(35033),P=t(49125),w=t(94353),D=t(37391),M=t(93005),N=t(60701),B=t(43482),L=t(90211),U=t(96510),F=t(28598);function G(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function H(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?G(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var z={appearAbove:!0,appearBefore:!0,block:!0,size:null,widthFitContent:!0},Q={basic:!0,iconOnly:!0,noPadding:!0,transparent:!0};n.Z=function(e){var n=e.block,t=e.blockMetadata,i=e.buttonTabs,l=e.collapsed,G=e.contained,q=void 0===G||G,W=e.dynamicBlock,K=e.dynamicChildBlock,V=e.hasError,Y=e.hasOutput,X=e.hideExtraInfo,J=e.isInProgress,$=e.mainContainerWidth,ee=e.messages,ne=e.openSidekickView,te=e.pipeline,oe=e.runCount,ie=e.runEndTime,re=e.runStartTime,ue=e.selected,le=e.selectedTab,ce=e.setCollapsed,ae=e.setErrors,se=e.setOutputBlocks,de=e.setSelectedOutputBlock,fe=e.setSelectedTab,pe=n||{},me=pe.status,he=pe.type,ve=pe.uuid,be=(0,u.useMemo)((function(){return(null===ee||void 0===ee?void 0:ee.length)||0}),[ee]),ge=f.DA.EXECUTED===me||!J&&0===oe&&be>=1||!J&&oe>=1&&ie>=re,xe=(0,u.useState)(),je=xe[0],Ce=xe[1],_e=(0,u.useState)(),Oe=_e[0],Ze=_e[1],ke=(0,u.useState)(null),ye=ke[0],Ee=ke[1],Te=(0,u.useMemo)((function(){var e,n;return null===(e=new d.Z)||void 0===e||null===(n=e.decodedToken)||void 0===n?void 0:n.token}),[]),Ie=(0,s.Db)((function(){return E.ZP.block_outputs.pipelines.downloads.detailAsync(null===te||void 0===te?void 0:te.uuid,ve,{token:Te},{onDownloadProgress:function(e){return Ee((Number((null===e||void 0===e?void 0:e.loaded)||0)/1e6).toFixed(3))},responseType:w.E.BLOB})}),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(e){(0,B.uS)(e,"".concat(ve,".").concat(R.Lu.CSV))},onErrorCallback:function(e,n){return null===ae||void 0===ae?void 0:ae({errors:n,response:e})}})}}),Ae=(0,r.Z)(Ie,2),Re=Ae[0],Se=Ae[1].isLoading;(0,u.useEffect)((function(){J||Ze(100)}),[J]);var Pe=function(e){return Array.isArray(e)?e.join("\n"):e},we=(0,u.useMemo)((function(){return ee.reduce((function(e,n){var t=e.at(-1);if(C.jU.includes(null===t||void 0===t?void 0:t.type)&&(null===t||void 0===t?void 0:t.type)===n.type&&!Pe(null===n||void 0===n?void 0:n.data).match(S.Lz)){if(Array.isArray(t.data))t.data.concat(n.data);else if("string"===typeof t.data){var o=Pe(n.data)||"";t.data=[t.data,o].join("\n")}}else C.jU.includes(null===n||void 0===n?void 0:n.type)&&!Pe(null===n||void 0===n?void 0:n.data).match(S.Lz)?e.push(H(H({},n),{},{data:Pe(n.data)})):e.push(H({},n));return e}),[])}),[ee]),De=(0,u.useMemo)((function(){return(0,F.jsx)(O.Z,{progress:Oe})}),[Oe]),Me=f.tf.DBT===(null===n||void 0===n?void 0:n.type),Ne=(0,T.Z)(V);(0,u.useEffect)((function(){Me&&!Ne&&V&&fe(M.Rj)}),[V,Ne,Me,fe]);var Be=(0,u.useMemo)((function(){var e=function(e,n){var t=e.columns,o=e.index,i=e.rows,r=e.shape,u=n.borderTop,l=n.selected;return r&&Ce(r),i.length>=1&&(0,F.jsx)(v.Z,{columns:t,disableScrolling:!l,index:o,maxHeight:60*P.iI,noBorderBottom:!0,noBorderLeft:!0,noBorderRight:!0,noBorderTop:!u,rows:i,width:$-(2+P.cd*P.iI*2+2+D.nn)},"data-table-".concat(o))},n=[],t=[],i=[];return null===we||void 0===we||we.forEach((function(r,u){var l=r.data,s=r.type;if(l&&0!==(null===l||void 0===l?void 0:l.length)){var d=[];d=(d=Array.isArray(l)?l:[l]).filter((function(e){return e}));var f=[];d.forEach((function(e){if(s===C.Gi.TEXT_HTML)f.push(e);else if(e&&"string"===typeof e){var n=e.split("\n");f.push.apply(f,(0,o.Z)(n))}else"object"===typeof f&&f.push(e)}));var p=f.length,m=[];f.forEach((function(n,o){var r,l={contained:q,first:0===u&&0===o,last:u===we.length-1&&o===p-1},d=u>=1;if("string"===typeof n&&n.match(S.Gr)){var f=n.split("\n"),h=[];f.forEach((function(e){if(e.match(S.Gr)){var t=e.split(S.Vc),o=t[t.length-1];(0,L.Pb)(o)&&i.push(JSON.parse(o))}else h.push(e);n=h.length>=1?h.join("\n"):null}))}if(null!==n){if("string"===typeof n&&n.match(S.Lz)){var v=n.split(S.gr),b=v[v.length-1],g=b.split("FloatProgress");if(v.length>=2&&(b=g[0]),(0,L.Pb)(b)){var x=JSON.parse(b),j=x.data,_=x.type;if(C.Gi.TABLE===_){!0;var O=e(j,{borderTop:d,selected:ue});t.push(O),Me||(r=O)}}}else if(s===C.Gi.TABLE){!0;var Z=e((0,L.Pb)(n)?JSON.parse(n):n,{borderTop:d,selected:ue});t.push(Z),Me||(r=Z)}else if(C.jU.includes(s)){var y,E=null===(y=n)||void 0===y?void 0:y.split("\\n");r=(0,F.jsx)(A.T5,H(H({},l),{},{children:E.map((function(e){return(0,F.jsx)(k.ZP,{monospace:!0,preWrap:!0,children:(0,F.jsx)(c(),{children:e})},e)}))}))}else if(s===C.Gi.TEXT_HTML)n&&(r=(0,F.jsx)(A.T5,H(H({},l),{},{children:(0,F.jsx)(A.wx,{monospace:!0,children:(0,F.jsx)(a.Z,{html:n})})})));else if(s===C.Gi.IMAGE_PNG)r=(0,F.jsx)("div",{style:{backgroundColor:"white"},children:(0,F.jsx)("img",{alt:"Image ".concat(u," from code output"),src:"data:image/png;base64, ".concat(n)})});else if(s===C.Gi.PROGRESS){var T=parseInt(n);Ze(T>90?90:T)}r&&m.push((0,F.jsx)("div",{children:r},"code-output-".concat(u,"-").concat(o)))}})),m.length>=1&&n.push(m)}})),J&&(null===te||void 0===te?void 0:te.type)===_.qL.PYSPARK&&n.unshift([(0,F.jsx)(A.T5,{contained:!0,children:(0,F.jsx)(Z.Z,{mt:1,children:De})},"progress_bar")]),{content:n,tableContent:t,testContent:i}}),[we,q,Me,J,$,te,De,ue]),Le=Be.content,Ue=Be.tableContent,Fe=Be.testContent,Ge=(null===je||void 0===je?void 0:je[1])||0,He=Ge>30?" (30 out of ".concat(Ge," columns displayed)"):"",ze=(0,u.useMemo)((function(){var e;if(Me&&le){var n=le.uuid;if(M.$m.uuid===n)(null===Ue||void 0===Ue?void 0:Ue.length)>=1?e=Ue:J||(e=(0,F.jsx)(Z.Z,{px:2,py:1,children:(0,F.jsx)(k.ZP,{muted:!0,children:V?"Error, check logs.":"No preview to display yet, try running the block."})}));else if(M.Rj.uuid===n)(null===Le||void 0===Le?void 0:Le.length)>=1?e=Le:J||(e=(0,F.jsx)(Z.Z,{px:2,py:1,children:(0,F.jsx)(k.ZP,{muted:!0,children:V?"Error, check logs.":"No logs to display yet, try running the block."})}));else if(M.Jt.uuid===n){var o,r=null===t||void 0===t||null===(o=t.dbt)||void 0===o?void 0:o.sql;e=r?(0,F.jsx)(h.Z,{autoHeight:!0,language:R.Lu.SQL,padding:!0,readOnly:!0,value:r,width:"100%"}):null}else if(M.gM.uuid===n){var u,l=null===t||void 0===t||null===(u=t.dbt)||void 0===u?void 0:u.lineage;e=l?(0,F.jsx)(b.Z,{disabled:!0,enablePorts:!1,height:55*P.iI,pannable:ue,pipeline:H(H({},te),{},{blocks:l}),zoomable:ue}):null}}else e=Le;return(0,F.jsxs)(F.Fragment,{children:[i,e]})}),[t,i,Le,V,Me,J,te,ue,le,Ue]);return i||V||Y?(0,F.jsxs)(F.Fragment,{children:[q&&(0,F.jsxs)(A.Nk,{addBottomPadding:J&&(null===te||void 0===te?void 0:te.type)===_.qL.PYSPARK,blockType:he,dynamicBlock:W,dynamicChildBlock:K,executedAndIdle:ge,hasError:V,selected:ue,children:[!l&&(null===Fe||void 0===Fe?void 0:Fe.length)>=1&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Z.Z,{py:2,children:(0,F.jsx)(A.T5,{contained:!0,children:Fe.map((function(e,n){var t=e.error,o=e.message,i=e.stacktrace;return(0,F.jsxs)(Z.Z,{mt:n>=1?3:0,children:[(0,F.jsx)(k.ZP,{monospace:!0,preWrap:!0,children:(0,F.jsx)(c(),{children:"".concat(o).concat(t?" "+t:"")})}),null===i||void 0===i?void 0:i.map((function(e){return(0,F.jsx)(k.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:(0,F.jsx)(c(),{children:e})},e)}))]},o)}))})}),(0,F.jsx)(Z.Z,{mb:V?2:0,children:(0,F.jsx)(g.Z,{medium:!0})})]}),!l&&ze]}),!q&&ze,ge&&!X&&(0,F.jsxs)(A._A,{blockType:he,dynamicBlock:W,dynamicChildBlock:K,hasError:V,selected:ue,children:[(0,F.jsx)(A.MB,{}),(0,F.jsxs)(j.ZP,{justifyContent:"space-between",children:[ce&&(0,F.jsx)(x.Z,{alignItems:"center",px:1,children:(0,F.jsx)(p.Z,H(H({},Q),{},{onClick:function(){return ce(!l)},children:l?(0,F.jsxs)(j.ZP,{alignItems:"center",children:[(0,F.jsx)(I._M,{muted:!0,size:2*P.iI}),"\xa0",(0,F.jsx)(k.ZP,{default:!0,children:"Expand output"})]}):(0,F.jsxs)(j.ZP,{alignItems:"center",children:[(0,F.jsx)(I.Kh,{muted:!0,size:2*P.iI}),je&&(0,F.jsx)(Z.Z,{ml:2,children:(0,F.jsx)(k.ZP,{children:"".concat(je[0]," rows x ").concat(je[1]," columns").concat(He)})})]})}))}),(0,F.jsx)(A.a3,{children:(0,F.jsxs)(j.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,F.jsx)(y.Z,H(H({},z),{},{label:oe>=1&&re?"Last run at ".concat(new Date(re.valueOf()).toLocaleString()):V?"Block executed with errors":"Block executed successfully",children:(0,F.jsxs)(j.ZP,{alignItems:"center",children:[oe>=1&&Number(ie)>Number(re)&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(k.ZP,{small:!0,children:[(Number(ie)-Number(re))/1e3,"s"]}),(0,F.jsx)(Z.Z,{mr:1})]}),!V&&(0,F.jsx)(I.Jr,{size:2*P.iI,success:!0}),V&&(0,F.jsx)(m.Z,{danger:!0,size:2*P.iI,children:(0,F.jsx)(k.ZP,{bold:!0,monospace:!0,small:!0,children:"!"})})]})})),!V&&!f.Qj.includes(he)&&(0,F.jsx)(Z.Z,{pl:2,children:(0,F.jsxs)(j.ZP,{alignItems:"center",children:[(0,F.jsx)(y.Z,H(H({},z),{},{label:"Expand table",children:(0,F.jsx)(p.Z,H(H({},Q),{},{onClick:function(){(0,B.OF)(null===te||void 0===te?void 0:te.uuid,ve),null===ne||void 0===ne||ne(N.cH.DATA),null===se||void 0===se||se((function(e){return e.find((function(e){return e.uuid===ve}))?e:(null===de||void 0===de||de(n),e.concat(n))}))},children:(0,F.jsx)(I.M0,{muted:!0,size:1.75*P.iI})}))})),(0,F.jsx)(Z.Z,{pl:2}),(0,F.jsx)(y.Z,H(H({},z),{},{forceVisible:Se,label:Se?"".concat(ye||0,"mb downloaded..."):"Save output as CSV file",children:(0,F.jsx)(p.Z,H(H({},Q),{},{compact:!0,loading:Se,onClick:function(){Ee(null),Re()},children:(0,F.jsx)(I.vc,{muted:!0,size:1.75*P.iI})}))}))]})})]})})]})]})]}):null}},93005:function(e,n,t){t.d(n,{$m:function(){return i},C:function(){return a},Jt:function(){return u},Rj:function(){return r},Xy:function(){return c},gM:function(){return l},vT:function(){return s}});var o=t(49125),i={uuid:"Preview results"},r={uuid:"Logs"},u={uuid:"SQL"},l={uuid:"Lineage"},c=function(e){var n,t,o=e.metadata,c=[r,u];return(null===o||void 0===o||null===(n=o.dbt)||void 0===n||null===(t=n.block)||void 0===t?void 0:t.snapshot)||(c.unshift(i),c.push(l)),c},a=2.5*o.iI,s="CodeBlock_HiddenBlock"},95689:function(e,n,t){t.d(n,{z:function(){return Fe},Z:function(){return He}});var o=t(21831),i=t(75582),r=t(82394),u=t(12691),l=t.n(u),c=t(82684),a=t(38626),s=t(10975),d=t(14567),f=t(83455),p=t(28317),m=t(18283),h=t(60328),v=t(67971),b=t(86673),g=t(19711),x=t(44162),j=t(28598);var C=function(e){var n=e.blocks,t=e.onClick,o=(0,c.useContext)(a.ThemeContext);return(0,j.jsx)(v.ZP,{alignItems:"center",children:null===n||void 0===n?void 0:n.map((function(e){var n=e.color,i=e.type,r=e.uuid,u=(0,x.qn)(i,{blockColor:n,theme:o}).accentLight;return(0,j.jsx)(b.Z,{ml:1,mt:1,children:(0,j.jsx)(h.Z,{backgroundColor:u,compact:!0,onClick:function(){return t(e)},small:!0,children:(0,j.jsx)(g.ZP,{monospace:!0,small:!0,children:r})})},r)}))})},_=t(93461),O=t(45419),Z=t(60701),k=t(24224);function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}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 T=function(e){var n=e.block,t=e.blocks,o=e.openSidekickView,r=e.pipeline,u=(0,c.useMemo)((function(){return(0,k.HK)(t,(function(e){return e.uuid}))}),[t]),l=(0,c.useMemo)((function(){var e;return null===n||void 0===n||null===(e=n.callback_blocks)||void 0===e?void 0:e.reduce((function(e,n){var t=null===u||void 0===u?void 0:u[n];return t?e.concat(t):e}),[])}),[n,u]),a=(0,c.useMemo)((function(){var e;return null===n||void 0===n||null===(e=n.conditional_blocks)||void 0===e?void 0:e.reduce((function(e,n){var t=null===u||void 0===u?void 0:u[n];return t?e.concat(t):e}),[])}),[n,u]),s=(0,c.useMemo)((function(){var e,t=[];return null===(e=Object.entries((null===r||void 0===r?void 0:r.extensions)||{}))||void 0===e||e.forEach((function(e){var o=(0,i.Z)(e,2),r=o[0],l=o[1].blocks;null===l||void 0===l||l.forEach((function(e){var o=e.upstream_blocks,i=e.uuid;if(null!==o&&void 0!==o&&o.includes(null===n||void 0===n?void 0:n.uuid)){var l=null===u||void 0===u?void 0:u[i];l&&t.push(E(E({},l),{},{extension_uuid:r}))}}))})),t}),[n,u,r]);return(0,j.jsxs)(j.Fragment,{children:[(null===a||void 0===a?void 0:a.length)>=1&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(_.Z,{flexDirection:"column",children:[(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(g.ZP,{bold:!0,muted:!0,children:"Conditionals"})}),(0,j.jsx)(C,{blocks:a,onClick:function(e){var n=e.uuid;return o(Z.cH.ADDON_BLOCKS,!0,{addon:O.Q.CONDITIONAL,blockUUID:n})}})]})}),(null===l||void 0===l?void 0:l.length)>=1&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(_.Z,{flexDirection:"column",children:[(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(g.ZP,{bold:!0,muted:!0,children:"Callbacks"})}),(0,j.jsx)(C,{blocks:l,onClick:function(e){var n=e.uuid;return o(Z.cH.ADDON_BLOCKS,!0,{addon:O.Q.CALLBACK,blockUUID:n})}})]})}),(null===s||void 0===s?void 0:s.length)>=1&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(_.Z,{flexDirection:"column",children:[(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(g.ZP,{bold:!0,muted:!0,children:"Extensions"})}),(0,j.jsx)(C,{blocks:s,onClick:function(e){var n=e.extension_uuid,t=e.uuid;return o(Z.cH.EXTENSIONS,!0,{blockUUID:t,extension:n})}})]})})]})},I=t(86422),A=t(32316),R=t(38341),S=t(16634),P=t(57722),w=t(65051),D=t(62084),M=t(42451),N=t(78759),B=t(49125),L=t(90211);function U(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function F(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?U(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):U(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var G=function(e){var n=e.addWidget,t=e.block,i=e.left,r=e.rightOffset,u=e.onClickCallback,l=e.open,a=e.parentRef,s=e.runBlock,d=e.topOffset,f=(0,c.useMemo)((function(){return M.CK.map((function(e){var o,i,r={configuration:{chart_type:e},language:t.language,type:I.tf.CHART,upstream_blocks:t?[t.uuid]:null},u=N.x8[e],l=(null===u||void 0===u||null===(o=u.configuration)||void 0===o?void 0:o.call(u,r))||{},c=I.t6.SQL===(null===t||void 0===t?void 0:t.language)?null:(null===u||void 0===u||null===(i=u.content)||void 0===i?void 0:i.call(u,r))||null,a=e;return t&&(a="".concat(a," for ").concat(t.uuid)),{label:function(){return(0,L.vg)(e)},onClick:function(){return n(F(F({},r),{},{name:"".concat(a," ").concat((0,L.Mp)()),configuration:F(F({},r.configuration),l),content:c}),{onCreateCallback:function(e){t&&I.t6.SQL!==t.language&&([I.DA.EXECUTED,I.DA.UPDATED].includes(t.status)?null===s||void 0===s||s({block:e,code:c,disableReset:!0}):null===s||void 0===s||s({block:t,runDownstream:!0}))}})},uuid:e}}))}),[M.CK,t,s]),p=(0,c.useMemo)((function(){return N._H.map((function(e){var o=e.label,i=F(F({},(0,e.widgetTemplate)({block:t})),{},{language:t.language,type:I.tf.CHART,upstream_blocks:t?[t.uuid]:null});return{label:o,onClick:function(){return n(i,{onCreateCallback:function(e){t&&I.t6.SQL!==t.language&&([I.DA.EXECUTED,I.DA.UPDATED].includes(t.status)?null===s||void 0===s||s({block:e,code:e.content,disableReset:!0}):null===s||void 0===s||s({block:t,runDownstream:!0}))}})},uuid:o()}}))}),[N._H,n,t,s]),m=[{isGroupingTitle:!0,label:function(){return"Custom charts"},uuid:"custom_charts"}].concat((0,o.Z)(f));return I.t6.SQL!==t.language&&m.push.apply(m,[{isGroupingTitle:!0,label:function(){return"Templates"},uuid:"chart_templates"}].concat((0,o.Z)(p))),(0,j.jsx)(D.Z,{items:m,left:i,onClickCallback:u,open:l,parentRef:a,rightOffset:r,topOffset:d,uuid:"CommandButtons/add_charts",width:25*B.iI})},H=t(47999),z=t(40656),Q=a.default.svg.withConfig({displayName:"Convert__SVGStyle",componentId:"sc-fmw0vr-0"})([""]),q=function(e){var n=e.fill,t=e.opacity,o=e.size,i=void 0===o?z.C:o,r=e.style,u=e.viewBox,l=void 0===u?"0 0 12 12":u;return(0,j.jsxs)(Q,{fill:n,height:i,opacity:t,style:r,viewBox:l,width:i,children:[(0,j.jsx)("path",{clipRule:"evenodd",d:"M2.5 1C1.67157 1 1 1.67157 1 2.5v.0625c0 .27614-.223858.5-.5.5s-.5-.22386-.5-.5V2.5C0 1.11929 1.11929 0 2.5 0h7C10.8807 0 12 1.11929 12 2.5v7c0 1.3807-1.1193 2.5-2.5 2.5h-7C1.11929 12 0 10.8807 0 9.5v-.0625c0-.27614.223858-.5.5-.5s.5.22386.5.5V9.5c0 .8284.67157 1.5 1.5 1.5h7c.8284 0 1.5-.6716 1.5-1.5v-7c0-.82843-.6716-1.5-1.5-1.5h-7z",fill:"url(#paint0_linear_1332_60037)",fillRule:"evenodd"}),(0,j.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.05806 3.55806c.24408-.24408.6398-.24408.88388 0l2 2c.24408.24408.24408.6398 0 .88388l-2 2c-.24408.24408-.6398.24408-.88388 0-.24408-.24408-.24408-.6398 0-.88388l.93306-.93306H1C.654822 6.625.375 6.34518.375 6s.279822-.625.625-.625h5.99112l-.93306-.93306c-.24408-.24408-.24408-.6398 0-.88388z",fill:"#fff"}),(0,j.jsx)("defs",{children:(0,j.jsxs)("linearGradient",{id:"paint0_linear_1332_60037",x1:"-.618557",y1:"-.000001",x2:"10.5709",y2:".83113",gradientUnits:"userSpaceOnUse",children:[(0,j.jsx)("stop",{stopColor:"#FFCC19"}),(0,j.jsx)("stop",{offset:".585938",stopColor:"#2ECDF7"}),(0,j.jsx)("stop",{offset:"1",stopColor:"#9E7BFF"})]})})]})},W=t(30264),K=t(79749),V=t(33572),Y=t(10919),X=t(29237),J=t(54283),$=t(46261),ee=t(82531),ne=t(23831),te=t(82635),oe=t(22341),ie=t(93005),re=t(16115),ue=t(98781),le=t(75968),ce=t(54405),ae=t(96510),se=t(9728);function de(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function fe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?de(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var pe,me=function(e){var n,t,o=e.addNewBlock,r=e.addWidget,u=e.block,l=e.blockContent,s=e.blocks,d=e.deleteBlock,p=e.executionState,m=e.fetchFileTree,C=e.fetchPipeline,_=e.hideExtraButtons,O=e.interruptKernel,y=e.isEditingBlock,E=e.openSidekickView,T=e.pipeline,A=e.project,R=e.runBlock,P=e.setBlockContent,w=e.setIsEditingBlock,M=e.savePipelineContent,N=e.setErrors,L=e.setOutputCollapsed,U=e.showConfigureProjectModal,F=(0,se.VI)(null,{},[],{uuid:"CommandButtons/".concat(null===u||void 0===u?void 0:u.uuid)}),z=(0,i.Z)(F,1)[0],Q=u.all_upstream_blocks_executed,de=void 0===Q||Q,pe=u.color,me=u.metadata,he=u.type,ve=u.uuid,be=(0,c.useRef)(null),ge=(0,c.useRef)(null),xe=(0,c.useRef)(null),je=(0,c.useRef)(null),Ce=(0,c.useRef)(null),_e=null===T||void 0===T?void 0:T.type,Oe=(0,c.useState)(!1),Ze=Oe[0],ke=Oe[1],ye=(0,c.useState)(!1),Ee=ye[0],Te=ye[1],Ie=(0,c.useState)(!1),Ae=Ie[0],Re=Ie[1],Se=(0,c.useState)(!1),Pe=Se[0],we=Se[1],De=(0,c.useState)(!1),Me=De[0],Ne=De[1],Be=(0,c.useContext)(a.ThemeContext),Le=te.uF.IDLE!==p,Ue=(0,x.qn)(he,{blockColor:pe,theme:Be}).accent,Fe=(0,c.useMemo)((function(){return _e===ue.qL.STREAMING}),[_e]),Ge=(0,c.useMemo)((function(){return _e===ue.qL.INTEGRATION}),[_e]),He=(0,c.useMemo)((function(){return(0,le.Ts)(u,s,"CommandButtons",o).map((function(e){return fe(fe({},e),{},{onClick:function(){return M().then((function(){return e.onClick()}))}})}))}),[o,u,s,M]),ze=(0,c.useMemo)((function(){return(0,k.HK)(s,(function(e){return e.uuid}))}),[s]),Qe=(0,c.useMemo)((function(){return I.tf.DBT===(null===u||void 0===u?void 0:u.type)}),[u]),qe=(0,c.useMemo)((function(){return I.tf.MARKDOWN===(null===u||void 0===u?void 0:u.type)}),[u]),We=(0,f.Db)(ee.ZP.pipelines.useUpdate(null===T||void 0===T?void 0:T.uuid),{onSuccess:function(e){return(0,ae.wD)(e,{callback:function(){C()},onErrorCallback:function(e,n){return N({errors:n,response:e})}})}}),Ke=(0,i.Z)(We,2),Ve=Ke[0],Ye=Ke[1].isLoading,Xe=(0,f.Db)(ee.ZP.llms.useCreate(),{onSuccess:function(e){return(0,ae.wD)(e,{callback:function(e){var n=e.llm;null!==n&&void 0!==n&&n.response&&P&&(null===P||void 0===P||P(null===n||void 0===n?void 0:n.response))},onErrorCallback:function(e,n){return z({errors:n,response:e})}})}}),Je=(0,i.Z)(Xe,2),$e=Je[0],en=(Je[1].isLoading,(0,c.useMemo)((function(){var e=!(null!==A&&void 0!==A&&A.openai_api_key),n=function(e){null===U||void 0===U||U({header:(0,j.jsx)(b.Z,{mb:B.HN,children:(0,j.jsxs)(X.Z,{children:[(0,j.jsx)(g.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate blocks using AI."}),(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(g.ZP,{warning:!0,children:["Read ",(0,j.jsx)(Y.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI\u2019s documentation"})," to get your API key."]})})]})}),onSaveSuccess:function(n){null!==n&&void 0!==n&&n.openai_api_key&&Ve({pipeline:{llm:e}})}})},t={request:{block_uuid:null===u||void 0===u?void 0:u.uuid,pipeline_uuid:null===T||void 0===T?void 0:T.uuid}};return[{label:function(){return"Document block (beta)"},onClick:function(){t.use_case=V.z.GENERATE_DOC_FOR_BLOCK,e?n(t):Ve({pipeline:{llm:t}})},uuid:"Document block"},{label:function(){return"Document pipeline and all blocks (beta)"},onClick:function(){t.use_case=V.z.GENERATE_DOC_FOR_PIPELINE,e?n(t):Ve({pipeline:{llm:t}})},uuid:"Document pipeline and all blocks"},{label:function(){return"Add comments in code (beta)"},onClick:function(){e?n(t):$e({llm:{request:{block_code:l},use_case:V.z.GENERATE_COMMENT_FOR_CODE}})},uuid:"Add comments in code"}]}),[u,l,$e,T,A,U,Ve]));return(0,j.jsxs)(v.ZP,{alignItems:"center",children:[te.uF.QUEUED===p&&(0,j.jsx)(J.Z,{color:(Be||ne.Z).content.active,type:"cylon"}),te.uF.BUSY===p&&(0,j.jsx)(J.Z,{color:(Be||ne.Z).content.active}),R&&!Le&&!Fe&&(0,j.jsxs)(j.Fragment,{children:[!Qe&&(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:(0,j.jsxs)(g.ZP,{children:["Run block \xa0 \xa0",(0,j.jsx)(K.Z,{inline:!0,keyTextGroups:[[(0,ce.V5)()?re.RJ:re.hE,re.Lz]],monospace:!0,uuidForKey:ve})]}),size:3*B.iI,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){de?R({block:u}):Re(!0)},children:(0,j.jsx)(S.Z,{color:Ue,size:3*B.iI,children:(0,j.jsx)(oe.Py,{black:!0,size:1.5*B.iI})})})}),Qe&&(0,j.jsx)(h.Z,{backgroundColor:Ue,beforeIcon:(0,j.jsx)(oe.Py,{size:1.5*B.iI}),compact:!0,onClick:function(){de?R({block:u}):Re(!0)},small:!0,children:null!==me&&void 0!==me&&null!==(n=me.dbt)&&void 0!==n&&null!==(t=n.block)&&void 0!==t&&t.snapshot?"Run snapshot":"Compile & preview"}),(0,j.jsx)(H.Z,{disableEscape:!0,onClickOutside:function(){return Re(!1)},open:Ae,children:(0,j.jsx)(D.Z,{items:[{label:function(){return"Execute block"},onClick:function(){return R({block:u})},uuid:"execute_block"},{label:function(){return"Execute with upstream blocks"},onClick:function(){return R({block:u,runUpstream:!0})},uuid:"execute_upstream"}],onClickCallback:function(){return Re(!1)},open:Ae,parentRef:xe,rightOffset:13.25*B.iI,topOffset:4.5*B.iI,uuid:"execute_actions",width:25*B.iI})})]}),Le&&(0,j.jsx)(b.Z,{ml:B.cd,children:(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:(0,j.jsxs)(g.ZP,{children:["Interrupt kernel \xa0 \xa0",(0,j.jsx)(K.Z,{inline:!0,keyTextGroups:[[re.kA],[re.kA]],monospace:!0,uuidForKey:ve})]}),size:ie.C,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return O()},children:(0,j.jsx)(S.Z,{borderSize:1.5,size:ie.C,children:(0,j.jsx)(oe.x8,{size:1*B.iI})})})})}),!_&&I.tf.SCRATCHPAD===u.type&&!Fe&&(0,j.jsx)(b.Z,{ml:B.cd,children:(0,j.jsx)(W.Z,{items:He,onClickCallback:function(){return Te(!1)},onClickOutside:function(){return Te(!1)},open:Ee,parentRef:ge,rightOffset:0,topOffset:4,uuid:"CommandButtons/convert_block",children:(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:(0,j.jsx)(g.ZP,{children:"Convert block"}),size:ie.C,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return Te(!Ee)},ref:ge,children:(0,j.jsx)(q,{size:ie.C})})})})}),!_&&[I.tf.DATA_LOADER,I.tf.TRANSFORMER].includes(u.type)&&!Fe&&!Ge&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{ml:B.cd,ref:be,children:(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:"Add chart",size:2.25*B.iI,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return ke((function(e){return!e}))},children:(0,j.jsx)(oe.GQ,{size:2.25*B.iI})})})}),r&&(0,j.jsx)(H.Z,{disableEscape:!0,onClickOutside:function(){return ke(!1)},open:Ze,children:(0,j.jsx)(G,{addWidget:r,block:u,onClickCallback:function(){return ke(!1)},open:Ze,parentRef:be,rightOffset:9*B.iI,runBlock:R,topOffset:2*B.iI})})]}),!_&&qe&&(0,j.jsx)(b.Z,{ml:B.cd,children:(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:y?"Close editor":"Edit",size:ie.C,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return w((function(e){return!e}))},children:y?(0,j.jsx)(oe.Jr,{size:ie.C,success:!0}):(0,j.jsx)(oe.I8,{size:ie.C})})})}),!_&&I.tf.GLOBAL_DATA_PRODUCT!==(null===u||void 0===u?void 0:u.type)&&(0,j.jsx)("div",{ref:Ce,children:(0,j.jsxs)(b.Z,{ml:B.cd,children:[Ye&&(0,j.jsx)(J.Z,{inverted:!0,small:!0}),!Ye&&(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:(0,j.jsx)(g.ZP,{children:"AI actions"}),size:ie.C,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return Ne((function(e){return!e}))},children:(0,j.jsx)(oe.xq,{default:!0,size:ie.C})})})]})}),!_&&(0,j.jsx)(H.Z,{disableEscape:!0,onClickOutside:function(){return Ne(!1)},open:Me,children:(0,j.jsx)(D.Z,{items:en,onClickCallback:function(){return Ne(!1)},open:Me,parentRef:Ce,rightOffset:4.75*B.iI,topOffset:2*B.iI,uuid:"FileHeaderMenu/AI_actions"})}),!_&&(0,j.jsx)(b.Z,{ml:B.cd,children:(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:"View and edit settings for this block",size:ie.C,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return null===E||void 0===E?void 0:E(Z.cH.BLOCK_SETTINGS)},children:(0,j.jsx)(oe.JG,{default:!0,size:ie.C})})})}),!_&&(0,j.jsx)("div",{ref:je,children:(0,j.jsx)(b.Z,{ml:B.cd,children:(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:(0,j.jsx)(g.ZP,{children:"More actions"}),size:ie.C,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return we((function(e){return!e}))},children:(0,j.jsx)(S.Z,{borderSize:1.5,default:!0,size:ie.C,children:(0,j.jsx)(oe.mH,{default:!0,size:B.iI})})})})})}),!_&&(0,j.jsx)(H.Z,{disableEscape:!0,onClickOutside:function(){return we(!1)},open:Pe,children:(0,j.jsx)(D.Z,{items:(0,le.J8)(u,R,d,L,Fe||Ge,{addNewBlock:o,blocksMapping:ze,fetchFileTree:m,fetchPipeline:C,savePipelineContent:M,updatePipeline:Ve}),onClickCallback:function(){return we(!1)},open:Pe,parentRef:je,rightOffset:4.75*B.iI,topOffset:2*B.iI,uuid:"FileHeaderMenu/file_items"})})]})};!function(e){e.APPEND="append",e.FAIL="fail",e.REPLACE="replace"}(pe||(pe={}));var he,ve=[pe.APPEND,pe.FAIL,pe.REPLACE];!function(e){e.BIGQUERY="bigquery",e.CLICKHOUSE="clickhouse",e.DRUID="druid",e.MYSQL="mysql",e.POSTGRES="postgres",e.REDSHIFT="redshift",e.SNOWFLAKE="snowflake",e.TRINO="trino"}(he||(he={}));var be=t(34744),ge=t(96016),xe=t(55378),je=t(82944),Ce=t(87815),_e=t(66653);function Oe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Ze(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Oe(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Oe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ke=function(e){var n=e.block,t=e.blockConfiguration,o=e.blockRefs,i=e.blocks,u=e.updateBlockConfiguration,l=(0,c.useContext)(a.ThemeContext),s=I.t6.R===(null===n||void 0===n?void 0:n.language),d=I.t6.SQL===(null===n||void 0===n?void 0:n.language),f=null===i||void 0===i?void 0:i.find((function(e){var n=e.language;return I.t6.PYTHON===n})),p=(0,c.useMemo)((function(){var e=[null];return d&&f?e.push.apply(e,[null,1]):e.push(1),e}),[f,d]),m=(0,c.useMemo)((function(){var e=[{tooltipMessage:null,uuid:"Variable"},{tooltipMessage:null,uuid:"Block"}];return d&&f&&e.push({tooltipMessage:"Customize the full table name that this block gets created in. Include database, schema, and table name where applicable.",uuid:"Table name"}),e}),[f,d]),h=(0,c.useMemo)((function(){return null===i||void 0===i?void 0:i.map((function(e,n){var i,c=e.color,a=e.language,p=e.type,m=e.uuid,h=(0,x.qn)(p,{blockColor:c,theme:l}).accent,v=I.t6.PYTHON===a;i=d?"{{ df_".concat(n+1," }}"):s?"df".concat(n+1):"data".concat(n>=1?"_".concat(n+1):null);var b=[(0,j.jsx)(g.ZP,{default:!0,monospace:!0,small:!0,children:i},"variable-".concat(m)),(0,j.jsx)(Y.Z,{color:h,onClick:function(){var e,n,t=null===o||void 0===o||null===(e=o.current)||void 0===e?void 0:e["".concat(p,"s/").concat(m,".py")];null===t||void 0===t||null===(n=t.current)||void 0===n||n.scrollIntoView()},preventDefault:!0,small:!0,children:(0,j.jsx)(g.ZP,{color:h,monospace:!0,small:!0,children:m})},"block-".concat(m))];if(d){var C="table-name-input-".concat(m),_=(null===t||void 0===t?void 0:t[M.Yf])||{},O=(null===_||void 0===_?void 0:_[m])||{};v?b.push((0,j.jsx)(je.Z,{borderless:!0,compact:!0,monospace:!0,onChange:function(e){var n=e.target.value;u((0,r.Z)({},M.Yf,Ze(Ze({},_),{},(0,r.Z)({},m,Ze(Ze({},O),{},(0,r.Z)({},M.aZ,n))))))},onClick:_e.j,placeholder:"[database_optional].[schema_optional].[table]",small:!0,value:(null===O||void 0===O?void 0:O[M.aZ])||""},C)):f&&b.push((0,j.jsx)(g.ZP,{italic:!0,muted:!0,small:!0,children:"Table name is defined in upstream block."},C))}return b}))}),[f,t,o,i,s,d,l,u]);return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(Ce.Z,{columnFlex:p,columns:m,compact:!0,noBorder:!0,rows:h,uuid:"CodeBlock/UpstreamBlockSettings/".concat(null===n||void 0===n?void 0:n.uuid)})})},ye=t(59582),Ee=t(66166),Te=t(31524),Ie=t(32365),Ae=t(84212),Re=t(80636),Se=t(91427),Pe=t(25958),we=t(43482),De=t(51504),Me=t(7715),Ne=t(87323),Be=t(41150);function Le(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Ue(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Le(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Le(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Fe=1e3;function Ge(e,n){var t,u,C,O,y=e.addNewBlock,E=e.addNewBlockMenuOpenIdx,D=e.addWidget,N=e.allBlocks,U=e.allowCodeBlockShortcuts,F=e.autocompleteItems,G=e.block,H=e.blockIdx,z=e.blockRefs,Q=e.blockTemplates,q=e.blocks,K=void 0===q?[]:q,V=e.dataProviders,X=e.defaultValue,J=void 0===X?"":X,ne=e.deleteBlock,ce=e.disableDrag,se=e.disableShortcuts,de=e.executionState,fe=e.extraContent,Ce=e.fetchFileTree,Oe=e.fetchPipeline,Ze=e.globalDataProducts,Le=e.height,Ge=e.hideExtraCommandButtons,He=e.hideExtraConfiguration,ze=e.hideHeaderInteractiveInformation,Qe=e.hideRunButton,qe=e.interruptKernel,We=e.mainContainerRef,Ke=e.mainContainerWidth,Ve=e.messages,Ye=void 0===Ve?[]:Ve,Xe=e.noDivider,Je=e.onCallbackChange,$e=e.onChange,en=e.onClickAddSingleDBTModel,nn=e.onDrop,tn=e.openSidekickView,on=e.pipeline,rn=e.project,un=e.runBlock,ln=e.runningBlocks,cn=e.savePipelineContent,an=e.selected,sn=e.setAddNewBlockMenuOpenIdx,dn=e.setAnyInputFocused,fn=e.setCreatingNewDBTModel,pn=e.setEditingBlock,mn=e.setErrors,hn=e.setOutputBlocks,vn=e.setSelected,bn=e.setSelectedBlock,gn=e.setSelectedOutputBlock,xn=e.setTextareaFocused,jn=e.showBrowseTemplates,Cn=e.showConfigureProjectModal,_n=e.showGlobalDataProducts,On=e.showUpdateBlockModal,Zn=e.textareaFocused,kn=e.widgets,yn=(0,c.useContext)(a.ThemeContext),En=G||{},Tn=En.callback_content,In=En.configuration,An=void 0===In?{}:In,Rn=En.color,Sn=En.error,Pn=En.has_callback,wn=En.language,Dn=En.name,Mn=En.pipelines,Nn=En.replicated_block,Bn=En.type,Ln=En.upstream_blocks,Un=void 0===Ln?[]:Ln,Fn=En.uuid,Gn=(0,c.useMemo)((function(){return An}),[An]),Hn=(0,c.useMemo)((function(){var e;return(null===(e=Object.values(Mn||{}))||void 0===e?void 0:e.length)||1}),[Mn]),zn=(0,c.useMemo)((function(){return null===Gn||void 0===Gn?void 0:Gn.global_data_product}),[Gn]),Qn=(0,c.useMemo)((function(){return(0,k.HK)(Ze||[],(function(e){return e.uuid}))}),[Ze]),qn=(0,c.useState)(!1),Wn=qn[0],Kn=qn[1],Vn=(0,c.useState)(null),Yn=Vn[0],Xn=Vn[1],Jn=(0,c.useState)(!1),$n=Jn[0],et=Jn[1],nt=(0,c.useState)(!1),tt=nt[0],ot=nt[1],it=(0,c.useState)(J),rt=it[0],ut=it[1],lt=(0,c.useState)(null),ct=lt[0],at=lt[1],st=on||{},dt=st.type,ft=st.uuid,pt=(0,c.useMemo)((function(){return ue.qL.STREAMING===dt}),[dt]),mt=I.tf.DBT===Bn,ht=I.t6.SQL===wn,vt=I.t6.R===wn,bt=I.tf.MARKDOWN===Bn,gt=Gn[M.mW];ht&&void 0===gt&&(gt=Fe);var xt=(0,c.useState)(Ue(Ue({},Gn),{},(t={},(0,r.Z)(t,M.cH,Gn[M.cH]),(0,r.Z)(t,M.Sv,Gn[M.Sv]),(0,r.Z)(t,M.sc,Gn[M.sc]),(0,r.Z)(t,M.BD,Gn[M.BD]),(0,r.Z)(t,M.m$,Gn[M.m$]),(0,r.Z)(t,M.Pi,Gn[M.Pi]||{}),(0,r.Z)(t,M.Mv,Gn[M.Mv]),(0,r.Z)(t,M.eW,Gn[M.eW]),(0,r.Z)(t,M.nq,Gn[M.nq]||pe.APPEND),(0,r.Z)(t,M.mW,gt),(0,r.Z)(t,M.bk,Gn[M.bk]),(0,r.Z)(t,M.Mi,!!Gn[M.Mi]),t))),jt=xt[0],Ct=xt[1],_t=(0,c.useState)(null),Ot=_t[0],Zt=_t[1],kt=(0,c.useState)(bt),yt=kt[0],Et=kt[1],Tt=(0,c.useState)(!1),It=Tt[0],At=Tt[1],Rt=(0,c.useState)(0),St=Rt[0],Pt=Rt[1],wt=(0,c.useState)(null),Dt=wt[0],Mt=wt[1],Nt=(0,c.useState)(null),Bt=Nt[0],Lt=Nt[1],Ut=(0,c.useState)(Ye),Ft=Ut[0],Gt=Ut[1],Ht=(0,c.useState)((0,ie.Xy)(G)[0]),zt=Ht[0],Qt=Ht[1],qt=(0,s.c)((function(){return{collect:function(e){return{isDragging:!!e.isDragging()}},item:G,type:ie.vT}}),[G]),Wt=(0,i.Z)(qt,2),Kt=Wt[0],Vt=Wt[1],Yt=(0,d.L)((function(){return{accept:ie.vT,drop:function(e){return null===nn||void 0===nn?void 0:nn(G,e)}}}),[G]),Xt=(0,i.Z)(Yt,2)[1],Jt=(0,c.useMemo)((function(){var e;return(null===G||void 0===G||null===(e=G.metadata)||void 0===e?void 0:e.dbt)||{project:null,projects:{}}}),[G]),$t=(0,c.useMemo)((function(){return Jt.projects||{}}),[Jt]),eo=(0,c.useMemo)((function(){return Jt.project||jt[M.eW]}),[jt,Jt]),no=(0,c.useMemo)((function(){return $t[eo]||{target:null,targets:[]}}),[eo,$t]),to=(0,c.useMemo)((function(){return no.targets||[]}),[no]),oo=(0,c.useMemo)((function(){return jt[M.Mv]}),[jt]),io=eo?null!==no&&void 0!==no&&no.target?(0,k.sE)(to,(function(e){return e===no.target})):"Select target":"Select project first",ro=(0,c.useState)(oo&&!(null!==to&&void 0!==to&&to.includes(oo))),uo=ro[0],lo=ro[1],co=(0,c.useState)(null),ao=co[0],so=co[1];(0,c.useEffect)((function(){Tn!==ao&&so(Tn)}),[ao,Tn]);var fo=(0,Ee.Z)(G);(0,c.useEffect)((function(){if(JSON.stringify(G)!=JSON.stringify(fo)){var e,n=(0,we.Rt)([G]).messages,t=null===n||void 0===n||null===(e=n[Bn])||void 0===e?void 0:e[Fn];(null===t||void 0===t?void 0:t.length)>=1&&Gt(t)}}),[G,Bn,Fn,fo,Gt]);var po=(0,Ee.Z)(Ye);(0,c.useEffect)((function(){"undefined"!==typeof Ye&&Ye.length!==(null===po||void 0===po?void 0:po.length)&&Gt(Ye)}),[Ye,po,Gt]);var mo=(0,c.useMemo)((function(){var e=new Set;return null===V||void 0===V||V.forEach((function(n){var t=n.profiles;e=new Set([].concat((0,o.Z)(e),(0,o.Z)(t)))})),(0,o.Z)(e)}),[V]),ho=(0,c.useMemo)((function(){return"".concat(ft,"/").concat(Fn,"/codeCollapsed")}),[ft,Fn]),vo=(0,c.useMemo)((function(){return"".concat(ft,"/").concat(Fn,"/outputCollapsed")}),[ft,Fn]);(0,c.useEffect)((function(){ot((0,Se.U2)(ho,!1)),At((0,Se.U2)(vo,!1))}),[ho,vo]);var bo=(0,c.useRef)(null),go=(0,c.useMemo)((function(){return(0,k.HK)(K,(function(e){return e.uuid}))}),[K]),xo=(0,c.useMemo)((function(){return!(null===kn||void 0===kn||!kn.find((function(e){return e.upstream_blocks.includes(Fn)})))}),[Fn,kn]),jo=(0,c.useCallback)((function(e){var n=e||{},t=n.block,o=n.code,i=n.disableReset,r=n.runDownstream,u=n.runIncompleteUpstream,l=n.runSettings,c=n.runUpstream,a=n.runTests;if(null===a||"undefined"===typeof a){var s=(t||{}).type;a=[I.tf.DATA_LOADER,I.tf.DATA_EXPORTER,I.tf.TRANSFORMER].includes(s)}mt&&ie.Rj!==zt&&Qt(ie.Rj),null===un||void 0===un||un({block:t,code:o||rt,runDownstream:r||xo,runIncompleteUpstream:u||!1,runSettings:l,runTests:a||!1,runUpstream:c||!1}),i||(Pt(1+Number(St)),Mt(null),At(!1))}),[rt,xo,mt,un,St,zt,Pt,Mt,Qt]),Co=!(null===ln||void 0===ln||!ln.find((function(e){return e.uuid===Fn})))||(null===Ft||void 0===Ft?void 0:Ft.length)>=1&&de!==te.uF.IDLE;(0,c.useEffect)((function(){Co&&Lt(Number(new Date))}),[Co,Lt]);var _o=(0,Ee.Z)(de);(0,c.useEffect)((function(){de===te.uF.IDLE&&de!==_o&&Mt(Number(new Date))}),[de,_o,Mt]);var Oo=(0,c.useCallback)((function(e){var n=e.editorRect.top,t=e.position.lineNumberTop;if(null!==We&&void 0!==We&&We.current){var o=We.current.getBoundingClientRect().height;if(n+t>o){var i=We.current.scrollTop+(t-o+n);We.current.scrollTo(0,i)}else if(t+n<Ie.aU){var r=We.current.scrollTop+(t+n-Ie.aU);We.current.scrollTo(0,r)}}}),[We]),Zo=(0,c.useMemo)((function(){return(0,le.h5)(Ft,Ot)}),[Ot,Ft]),ko=(0,le.oI)(Zo),yo=ko.hasError,Eo=ko.hasOutput,To=(0,x.qn)(Bn,{blockColor:Rn,theme:yn}).accent,Io=(null===Un||void 0===Un?void 0:Un.length)||0,Ao=(0,Ne.cU)([G],K)[0],Ro=Ao.dynamic,So=Ao.dynamicUpstreamBlock,Po=Ao.reduceOutput,wo=Ao.reduceOutputUpstreamBlock,Do=(0,c.useMemo)((function(){return(0,le._o)({block:G,dynamic:Ro,dynamicUpstreamBlock:So,hasError:yo,reduceOutput:Po,reduceOutputUpstreamBlock:wo,selected:an})}),[G,Ro,So,yo,Po,wo,an]),Mo=Do.borderColorShareProps,No=Do.tags,Bo=(0,c.useCallback)((function(){an||(null===dn||void 0===dn||dn(!1),null===vn||void 0===vn||vn(!0))}),[an,dn,vn]),Lo=ee.ZP.blocks.pipelines.detail(ft,ie.gM.uuid===(null===zt||void 0===zt?void 0:zt.uuid)||ie.Jt.uuid===(null===zt||void 0===zt?void 0:zt.uuid)?encodeURIComponent(Fn):null,{_format:"dbt"},{revalidateOnFocus:!0}),Uo=Lo.data,Fo=Lo.mutate,Go=(0,c.useMemo)((function(){var e;return(null===Uo||void 0===Uo||null===(e=Uo.block)||void 0===e?void 0:e.metadata)||{}}),[Uo]),Ho=(0,f.Db)(ee.ZP.blocks.pipelines.useUpdate(ft,Fn),{onError:function(e){var n=(0,ae.qQ)(e).messages;Zt(n)},onSuccess:function(e){return(0,ae.wD)(e,{callback:function(e){Oe(),Ce(),ut(rt),null!==e&&void 0!==e&&e.block&&bn(null===e||void 0===e?void 0:e.block)},onErrorCallback:function(e,n){return mn({errors:n,response:e})}})}}),zo=(0,i.Z)(Ho,1)[0],Qo="CodeBlock/".concat(Fn),qo=(0,Be.y)(),Wo=qo.registerOnKeyDown,Ko=qo.unregisterOnKeyDown;(0,c.useEffect)((function(){return function(){Ko(Qo)}}),[Ko,Qo]),Wo(Qo,(function(e,n){se&&!U||an&&!Qe&&((0,De.y)([re.zX,re.Uq],n)||(0,De.y)([re.PQ,re.Uq],n)?jo({block:G}):(0,De.y)([re.XR,re.Uq],n)&&y&&(e.preventDefault(),y({language:wn,type:Bn,upstream_blocks:[Fn]}),jo({block:G})))}),[y,G,Qe,jo,an,zo]),(0,c.useEffect)((function(){var e;return Bt&&(e=setInterval((function(){return at(Number(new Date))}),1e3)),ct&&!Co&&clearInterval(e),function(){return clearInterval(e)}}),[ct,Co,Bt]);var Vo=(0,c.useCallback)((function(e){var n,t=(n={},(0,r.Z)(n,I.tf.CUSTOM,Object.values(I.Lq).reduce((function(n,t){return(null===e||void 0===e?void 0:e.color)!==t&&n.push({label:function(){return(0,j.jsx)(_.Z,{alignItems:"center",children:(0,j.jsxs)(g.ZP,{noWrapping:!0,children:["Change color to ",(0,j.jsx)(g.ZP,{color:(0,x.qn)(I.tf.CUSTOM,{blockColor:t}).accent,inline:!0,children:t})]})})},onClick:function(){zo({block:Ue(Ue({},e),{},{color:t})})},uuid:t}),n}),[])),(0,r.Z)(n,I.tf.SCRATCHPAD,(0,o.Z)((0,le.Ts)(e,K,"block_menu/scratchpad",y)).map((function(e){return Ue(Ue({},e),{},{onClick:function(){return cn().then((function(){return e.onClick()}))}})}))),n);return t[e.type]}),[y,K,cn,zo]),Yo=(0,c.useMemo)((function(){return Nn&&(null===go||void 0===go?void 0:go[Nn])}),[go,Nn]),Xo=(0,c.useMemo)((function(){if(Nn)return null;if(I.tf.GLOBAL_DATA_PRODUCT===Bn){var e=null===Qn||void 0===Qn?void 0:Qn[null===zn||void 0===zn?void 0:zn.uuid];return(0,j.jsxs)(x.y9,{children:[(0,j.jsxs)(b.Z,{mb:B.cd,mt:1,children:[(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"UUID"}),(0,j.jsx)(g.ZP,{monospace:!0,children:null===e||void 0===e?void 0:e.uuid})]}),(0,j.jsxs)(b.Z,{mb:B.cd,children:[(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:(0,L.kC)((null===e||void 0===e?void 0:e.object_type)||"")}),(0,j.jsx)(l(),{as:"/pipelines/".concat(null===e||void 0===e?void 0:e.object_uuid,"/edit"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,j.jsx)(Y.Z,{monospace:!0,openNewWindow:!0,children:null===e||void 0===e?void 0:e.object_uuid})})]}),(0,j.jsxs)(b.Z,{mb:1,children:[(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Override global data product settings"}),(0,j.jsx)(Y.Z,{monospace:!0,onClick:function(){return tn(Z.cH.BLOCK_SETTINGS)},children:"Customize block settings"})]})]})}return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(P.Z,{autoHeight:!0,autocompleteProviders:Yn,block:G,height:Le,language:wn,onChange:function(e){ut(e),null===$e||void 0===$e||$e(e)},onDidChangeCursorPosition:Oo,placeholder:I.tf.DBT===Bn&&I.t6.YAML===wn?"e.g. --select ".concat(eo||"project","/models --exclude ").concat(eo||"project","/models/some_dir"):"Start typing here...",selected:an,setSelected:vn,setTextareaFocused:xn,shortcuts:Qe?[]:[function(e,n){return(0,Re.Q)(e,(function(){Qe||jo({block:G,code:n.getValue()})}))}],textareaFocused:Zn,value:rt,width:"100%"}),Pn&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(be.Z,{}),(0,j.jsxs)(b.Z,{mt:1,children:[(0,j.jsxs)(x.y9,{normalPadding:!0,children:[(0,j.jsx)(g.ZP,{small:!0,children:"Callback block: define @on_success or @on_failure callbacks for this block."}),(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:["kwargs",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:" \u2192 "}),"global variables"]})]}),(0,j.jsx)(P.Z,{autoHeight:!0,autocompleteProviders:Yn,language:"python",onChange:function(e){so(e),null===Je||void 0===Je||Je(e)},onDidChangeCursorPosition:Oo,placeholder:"Start typing here...",selected:an,setSelected:vn,setTextareaFocused:xn,textareaFocused:Zn,value:ao,width:"100%"})]})]})]})}),[Yn,G,wn,Bn,ao,rt,eo,zn,Qn,Pn,Le,Qe,Je,$e,Oo,tn,Nn,jo,an,ut,vn,xn,Zn]);(0,c.useEffect)((function(){F&&Xn({python:(0,ye.Z)({autocompleteItems:F,block:G,blocks:K,pipeline:on})})}),[F,G,K,on]);var Jo=(0,c.useMemo)((function(){return mt?(0,j.jsx)(b.Z,{py:1,children:(0,j.jsx)(A.Z,{onClickTab:function(e){Qt(e),ie.gM.uuid!==e.uuid&&ie.Jt.uuid!==e.uuid||Fo()},selectedTabUUID:null===zt||void 0===zt?void 0:zt.uuid,small:!0,tabs:(0,ie.Xy)(G)})}):null}),[G,Fo,mt,zt]),$o=(0,c.useMemo)((function(){return(0,j.jsx)(w.Z,Ue(Ue({},Mo),{},{block:G,blockMetadata:Go,buttonTabs:Jo,collapsed:It,hasOutput:Eo,isInProgress:Co,mainContainerWidth:Ke,messages:Zo,openSidekickView:tn,pipeline:on,runCount:St,runEndTime:Dt,runStartTime:Bt,selected:an,selectedTab:zt,setCollapsed:function(e){At((function(){return(0,Se.t8)(vo,e),e}))},setErrors:mn,setOutputBlocks:hn,setSelectedOutputBlock:gn,setSelectedTab:Qt}))}),[G,Go,Mo,Jo,Eo,Co,Ke,Zo,tn,It,vo,on,St,Dt,Bt,an,zt,mn,hn,At,gn]),ei=(0,c.useCallback)((function(){return et(!1)}),[]),ni=(0,c.useRef)(null),ti=(0,c.useCallback)((function(e){clearTimeout(ni.current),Ct((function(n){return Ue(Ue({},n),e)})),ni.current=setTimeout((function(){var n=Ue(Ue({},jt),e);("undefined"!==typeof n[M.cH]&&"undefined"!==n[M.sc]||"undefined"!==typeof n[M.Mv]||"undefined"!==typeof n[M.eW]||"undefined"!==typeof n[M.mW])&&cn({block:{configuration:n,uuid:Fn}})}),1e3)}),[Fn,jt,cn]),oi=Te.zJ.BIGQUERY===jt[M.cH]||Te.zJ.SNOWFLAKE===jt[M.cH],ii=(0,c.useMemo)((function(){return(null===K||void 0===K?void 0:K.length)||0}),[K]),ri=(0,c.useMemo)((function(){return rt?(0,j.jsx)(ge.Z,{children:rt}):(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,children:"Double-click to edit"})})}),[rt]);(0,c.useEffect)((function(){bt&&yt&&!an&&Et(!1)}),[yt,bt,an]);var ui=(0,c.useMemo)((function(){return(0,j.jsx)(je.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){dn(!1)}),300)},onChange:function(e){dn(!0),ti((0,r.Z)({},M.mW,+e.target.value)),e.preventDefault()},onClick:_e.j,onFocus:function(){dn(!0)},small:!0,type:"number",value:jt[M.mW]||"",width:11*B.iI})}),[jt,dn,ti]);return(0,j.jsx)("div",{ref:Xt,children:(0,j.jsxs)("div",{ref:n,style:{position:"relative",zIndex:H===E?ii+9:null},children:[(0,j.jsxs)("div",{style:{position:"relative"},children:[(0,j.jsx)(x.nz,Ue(Ue({},Ue(Ue({},Mo),Kt)),{},{bottomBorder:bt,onClick:function(){return Bo()},ref:ce?null:Vt,zIndex:ii+1-(H||0),children:(0,j.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,j.jsxs)(_.Z,{alignItems:"center",flex:1,children:[(0,j.jsxs)(v.ZP,{alignItems:"center",children:[(0,j.jsx)(m.Z,{monospace:!0,children:I.tf.GLOBAL_DATA_PRODUCT===(null===G||void 0===G?void 0:G.type)?"GDP":I.dO[wn]}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(S.Z,{color:To,size:1.5*B.iI,square:!0}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(W.Z,{items:Vo(G),onClickCallback:ei,onClickOutside:ei,open:$n,parentRef:bo,uuid:"CodeBlock/block_menu",children:(0,j.jsx)(g.ZP,{color:To,monospace:!0,noWrapping:!0,children:null===(u=mt?I.tf.DBT:I.V4[Bn])||void 0===u?void 0:u.toUpperCase()})}),!ze&&[I.tf.CUSTOM,I.tf.SCRATCHPAD].includes(Bn)&&(0,j.jsxs)(j.Fragment,{children:["\xa0",(0,j.jsx)(h.Z,{basic:!0,iconOnly:!0,noPadding:!0,onClick:function(){return et(!0)},transparent:!0,children:(0,j.jsx)(oe.K5,{muted:!0})})]})]}),!ze&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mr:B.cd}),(0,j.jsx)(oe.iU,{size:1.5*B.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsxs)(v.ZP,{alignItems:"center",children:[mt&&I.t6.YAML!==wn&&(0,j.jsx)($.Z,{block:!0,label:(0,Pe.$1)(G,{fullPath:!0}),size:null,children:(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,children:(0,Pe.$1)(G)})}),(!mt||I.t6.YAML===wn)&&(0,j.jsx)(Y.Z,{default:!0,monospace:!0,noWrapping:!0,onClick:function(){return On(G,Dn)},preventDefault:!0,sameColorAsText:!0,children:Fn})]}),(0,j.jsx)(b.Z,{mr:2}),!I.iZ.includes(Bn)&&Ke>800&&(0,j.jsx)($.Z,{appearBefore:!0,block:!0,label:"\n ".concat((0,L._6)("parent block",Io),". ").concat(0===Io?"Click to select 1 or more blocks to depend on.":"Edit parent blocks.","\n "),size:null,widthFitContent:Io>=1,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){vn(!0),pn({upstreamBlocks:{block:G,values:null===Un||void 0===Un?void 0:Un.map((function(e){return{uuid:e}}))}})},children:(0,j.jsxs)(v.ZP,{alignItems:"center",children:[0===Io&&(0,j.jsx)(oe.Jj,{size:3*B.iI}),Io>=1&&(0,j.jsx)(oe.eV,{size:3*B.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsxs)(g.ZP,{default:!0,monospace:Io>=1,noWrapping:!0,small:!0,underline:0===Io,children:[0===Io&&"Edit parents",Io>=1&&(0,L._6)("parent",Io)]})]})})}),Hn>=2&&Ke>725&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{ml:2}),(0,j.jsx)($.Z,{block:!0,label:"This block is used in ".concat(Hn," pipelines."),size:null,widthFitContent:!0,children:(0,j.jsxs)(v.ZP,{alignItems:"center",children:[(0,j.jsx)(oe.BG,{size:14}),(0,j.jsx)(b.Z,{ml:1}),(0,j.jsxs)(Y.Z,{default:!0,monospace:!0,noWrapping:!0,onClick:function(){return tn(Z.cH.BLOCK_SETTINGS)},preventDefault:!0,small:!0,children:[Hn," pipelines"]})]})})]})]})]}),un&&(0,j.jsx)(me,{addNewBlock:y,addWidget:D,block:G,blockContent:rt,blocks:K,deleteBlock:ne,executionState:de,fetchFileTree:Ce,fetchPipeline:Oe,hideExtraButtons:Ge,interruptKernel:qe,isEditingBlock:yt,openSidekickView:tn,pipeline:on,project:rn,runBlock:Qe?null:jo,savePipelineContent:cn,setBlockContent:function(e){ut(e),null===$e||void 0===$e||$e(e)},setErrors:mn,setIsEditingBlock:Et,setOutputCollapsed:At,showConfigureProjectModal:Cn}),!Ge&&(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(h.Z,{basic:!0,iconOnly:!0,noPadding:!0,onClick:function(){ot((function(e){return(0,Se.t8)(ho,!e),!e})),tt||At((function(){return(0,Se.t8)(vo,!0),!0}))},transparent:!0,children:tt?(0,j.jsx)(oe._M,{muted:!0,size:2*B.iI}):(0,j.jsx)(oe.Kh,{muted:!0,size:2*B.iI})})})]})})),(0,j.jsxs)(x.Nk,{onClick:function(){return Bo()},children:[(0,j.jsxs)(x.jv,Ue(Ue({},Mo),{},{className:an&&Zn?"selected":null,hasOutput:!!Jo||Eo,lightBackground:bt&&!yt,onClick:Bo,onDoubleClick:function(){bt&&!yt&&Et(!0)},children:[!He&&I.tf.DBT===Bn&&!tt&&(0,j.jsxs)(x.y9,{normalPadding:!0,children:[(0,j.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,j.jsxs)(_.Z,{alignItems:"center",children:[I.t6.YAML===wn&&(0,j.jsx)(xe.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){dn(!1)}),300)},onChange:function(e){var n;ti((n={},(0,r.Z)(n,M.Mv,""),(0,r.Z)(n,M.eW,e.target.value),n)),e.preventDefault()},onClick:_e.j,onFocus:function(){dn(!0)},placeholder:"Project",small:!0,value:jt[M.eW]||"",children:Object.keys($t||{}).map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))}),I.t6.YAML!==wn&&(0,j.jsx)(g.ZP,{monospace:!0,small:!0,children:eo}),(0,j.jsx)(b.Z,{mr:2}),(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Target"}),(0,j.jsx)("span",{children:"\xa0"}),!uo&&(0,j.jsx)(xe.Z,{compact:!0,disabled:!eo,monospace:!0,onBlur:function(){return setTimeout((function(){dn(!1)}),300)},onChange:function(e){ti((0,r.Z)({},M.Mv,e.target.value)),e.preventDefault()},onClick:_e.j,onFocus:function(){dn(!0)},placeholder:io,small:!0,value:oo||"",children:null===to||void 0===to?void 0:to.map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))}),uo&&(0,j.jsx)(je.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){dn(!1)}),300)},onChange:function(e){ti((0,r.Z)({},M.Mv,e.target.value)),e.preventDefault()},onClick:_e.j,onFocus:function(){dn(!0)},placeholder:eo?(null===no||void 0===no?void 0:no.target)||"Enter target":"Select project first",small:!0,value:oo||"",width:21*B.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(v.ZP,{alignItems:"center",children:(0,j.jsx)($.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["Manually type the name of the target you want to use in the profile.",(0,j.jsx)("br",{}),"Interpolate environment variables and global variables using the following syntax:",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:"{{ env_var('NAME') }}"})," or ",(0,j.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:"{{ variables('NAME') }}"})]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(v.ZP,{alignItems:"center",children:[(0,j.jsx)(R.Z,{checked:uo,label:(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:"Manually enter target"}),onClick:function(e){(0,_e.j)(e),lo(!uo),uo&&ti((0,r.Z)({},M.Mv,null))}}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(oe.kI,{muted:!0})]})})})]}),I.t6.YAML!==wn&&!(null!==Jt&&void 0!==Jt&&null!==(C=Jt.block)&&void 0!==C&&C.snapshot)&&(0,j.jsxs)(v.ZP,{alignItems:"center",children:[(0,j.jsx)($.Z,{appearBefore:!0,block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["Limit the number of results that are returned",(0,j.jsx)("br",{}),"when running this block in the notebook.",(0,j.jsx)("br",{}),"This limit won\u2019t affect the number of results",(0,j.jsx)("br",{}),"returned when running the pipeline end-to-end."]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(v.ZP,{alignItems:"center",children:[(0,j.jsx)(oe.kI,{muted:!0}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Sample limit"}),(0,j.jsx)("span",{children:"\xa0"})]})}),ui,(0,j.jsx)(b.Z,{mr:1})]})]}),I.t6.YAML===wn&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(v.ZP,{alignItems:"center",children:[(0,j.jsxs)(_.Z,{alignItems:"center",flex:1,children:[(0,j.jsx)(g.ZP,{default:!0,monospace:!0,small:!0,children:"dbt"}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(je.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){dn(!1)}),300)},onChange:function(e){ti((0,r.Z)({},M.Pi,Ue(Ue({},null===jt||void 0===jt?void 0:jt[M.Pi]),{},(0,r.Z)({},M.pA,e.target.value)))),e.preventDefault()},onClick:_e.j,onFocus:function(){dn(!0)},placeholder:"command",small:!0,value:(null===jt||void 0===jt||null===(O=jt[M.Pi])||void 0===O?void 0:O[M.pA])||"",width:10*B.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(g.ZP,{monospace:!0,small:!0,children:"[type your --select and --exclude syntax below]"}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:["(paths start from ",(null===jt||void 0===jt?void 0:jt[M.eW])||"project"," folder)"]})]}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:(0,j.jsx)(Y.Z,{href:"https://docs.getdbt.com/reference/node-selection/syntax#examples",openNewWindow:!0,small:!0,children:"Examples"})}),(0,j.jsx)(b.Z,{mr:1})]})})]}),!He&&ht&&!tt&&I.tf.DBT!==Bn&&(0,j.jsx)(x.y9,{normalPadding:!0,children:(0,j.jsxs)(v.ZP,{flexWrap:"wrap",style:{marginTop:"-8px"},children:[(0,j.jsxs)(v.ZP,{style:{marginTop:"8px"},children:[(0,j.jsx)(xe.Z,{compact:!0,label:"Connection",onChange:function(e){return ti((0,r.Z)({},M.cH,e.target.value))},onClick:_e.j,small:!0,value:jt[M.cH],children:null===V||void 0===V?void 0:V.map((function(e){var n=e.id,t=e.value;return(0,j.jsx)("option",{value:t,children:n},n)}))}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(xe.Z,{compact:!0,label:"Profile",onChange:function(e){return ti((0,r.Z)({},M.sc,e.target.value))},onClick:_e.j,small:!0,value:jt[M.sc],children:null===mo||void 0===mo?void 0:mo.map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(v.ZP,{alignItems:"center",children:(0,j.jsx)($.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["If checked, you\u2019ll have to write your own custom",(0,j.jsx)("br",{}),"CREATE TABLE commands and INSERT commands.",(0,j.jsx)("br",{}),"Separate your commands using a semi-colon: ",(0,j.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:";"})]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(v.ZP,{alignItems:"center",children:[(0,j.jsx)(R.Z,{checked:jt[M.Mi],label:(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:"Use raw SQL"}),onClick:function(e){(0,_e.j)(e),ti((0,r.Z)({},M.Mi,!jt[M.Mi]))}}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(oe.kI,{muted:!0})]})})}),!jt[M.Mi]&&(0,j.jsxs)(j.Fragment,{children:[oi&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(v.ZP,{alignItems:"center",children:(0,j.jsx)(je.Z,{compact:!0,label:"Database",monospace:!0,onBlur:function(){return setTimeout((function(){dn(!1)}),300)},onChange:function(e){ti((0,r.Z)({},M.Sv,e.target.value)),e.preventDefault()},onClick:_e.j,onFocus:function(){dn(!0)},small:!0,value:jt[M.Sv],width:10*B.iI})})]}),(0,j.jsx)(b.Z,{mr:1}),![he.CLICKHOUSE,he.MYSQL].includes(jt[M.cH])&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)($.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["Schema that is used when creating a table and inserting values.",(0,j.jsx)("br",{}),"This field is required."]}),size:null,widthFitContent:!0,children:(0,j.jsx)(v.ZP,{alignItems:"center",children:(0,j.jsx)(je.Z,{compact:!0,label:"Schema",monospace:!0,onBlur:function(){return setTimeout((function(){dn(!1)}),300)},onChange:function(e){ti((0,r.Z)({},M.BD,e.target.value)),e.preventDefault()},onClick:_e.j,onFocus:function(){dn(!0)},small:!0,value:jt[M.BD],width:10*B.iI})})}),(0,j.jsx)(b.Z,{mr:1})]}),(0,j.jsx)($.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["This value will be used as the table name.",(0,j.jsx)("br",{}),"If blank, the default table name will be:",(0,j.jsx)("br",{}),(0,j.jsxs)(g.ZP,{inline:!0,monospace:!0,children:[ft,"_",Fn]}),(0,j.jsx)("br",{}),"This field is optional."]}),size:null,widthFitContent:!0,children:(0,j.jsx)(v.ZP,{alignItems:"center",children:(0,j.jsx)(je.Z,{compact:!0,label:"Table (optional)",monospace:!0,onBlur:function(){return setTimeout((function(){dn(!1)}),300)},onChange:function(e){ti((0,r.Z)({},M.m$,e.target.value)),e.preventDefault()},onClick:_e.j,onFocus:function(){dn(!0)},small:!0,value:jt[M.m$],width:20*B.iI})})})]}),(0,j.jsx)(b.Z,{mr:1})]}),!jt[M.Mi]&&(0,j.jsxs)(v.ZP,{alignItems:"center",style:{marginTop:"8px"},children:[(0,j.jsx)($.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["Limit the number of results that are returned",(0,j.jsx)("br",{}),"when running this block in the notebook.",(0,j.jsx)("br",{}),"This limit won\u2019t affect the number of results",(0,j.jsx)("br",{}),"returned when running the pipeline end-to-end."]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(v.ZP,{alignItems:"center",children:[(0,j.jsx)(oe.kI,{muted:!0}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Limit"}),(0,j.jsx)("span",{children:"\xa0"})]})}),ui,(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)($.Z,{autoWidth:!0,block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["How do you want to handle existing data with the same",oi?" database,":""," schema, and table name?",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{bold:!0,inline:!0,monospace:!0,children:"Append"}),": add rows to the existing table.",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{bold:!0,inline:!0,monospace:!0,children:"Replace"}),": delete the existing data.",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{bold:!0,inline:!0,monospace:!0,children:"Fail"}),": raise an error during execution."]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(v.ZP,{alignItems:"center",children:[(0,j.jsx)(oe.kI,{muted:!0}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Write policy:"}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(xe.Z,{compact:!0,label:"strategy",onChange:function(e){return ti((0,r.Z)({},M.nq,e.target.value))},onClick:_e.j,small:!0,value:jt[M.nq],children:null===ve||void 0===ve?void 0:ve.map((function(e){return(0,j.jsx)("option",{value:e,children:(0,L.kC)(e)},e)}))})]})}),(0,j.jsx)(b.Z,{mr:1})]}),(null===jt||void 0===jt?void 0:jt[M.cH])===he.TRINO&&Un.length>=1&&(0,j.jsxs)(v.ZP,{alignItems:"center",style:{marginTop:"8px"},children:[(0,j.jsx)($.Z,{appearBefore:!0,block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["If checked, upstream blocks that aren\u2019t SQL blocks",(0,j.jsx)("br",{}),"will have their data exported into a table that is",(0,j.jsx)("br",{}),"uniquely named upon each block run. For example,",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:"[pipeline_uuid]_[block_uuid]_[unique_timestamp]"}),"."]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(v.ZP,{alignItems:"center",children:[(0,j.jsx)(R.Z,{checked:jt[M.bk],label:(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:"Unique upstream table names"}),onClick:function(e){(0,_e.j)(e),ti((0,r.Z)({},M.bk,!jt[M.bk]))}}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(oe.kI,{muted:!0})]})}),(0,j.jsx)(b.Z,{mr:1})]})]})}),No.length>=1&&(0,j.jsx)(x.y9,{normalPadding:!0,children:(0,j.jsx)(v.ZP,{children:No.map((function(e,n){var t=e.description,o=e.title;return(0,j.jsx)(b.Z,{ml:n>=1?1:0,children:(0,j.jsx)($.Z,{block:!0,description:t,size:null,widthFitContent:!0,children:(0,j.jsx)(m.Z,{children:o})})},o)}))})}),Un.length>=1&&!tt&&I.f2.includes(Bn)&&!pt&&!Nn&&(0,j.jsxs)(x.y9,{normalPadding:!0,children:[(0,j.jsx)(b.Z,{mr:1,children:(0,j.jsxs)(g.ZP,{muted:!0,small:!0,children:[!ht&&"Positional arguments for ".concat(vt?"":"decorated ","function:"),ht&&(0,j.jsxs)(j.Fragment,{children:["The interpolated tables below are available in queries from upstream blocks.",(0,j.jsx)("br",{}),"Example: ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,small:!0,children:"SELECT * FROM {{ df_1 }}"})," to insert all rows from ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,small:!0,children:null===Un||void 0===Un?void 0:Un[0]})," into a table."]})]})}),(0,j.jsxs)(b.Z,{mt:1,children:[!ht&&!vt&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[I.tf.DATA_EXPORTER===Bn&&"@data_exporter",I.tf.DATA_LOADER===Bn&&"@data_loader",I.tf.TRANSFORMER===Bn&&"@transformer",I.tf.CUSTOM===Bn&&"@custom"]}),(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:["def ",(I.tf.DATA_EXPORTER===Bn?"export_data":I.tf.DATA_LOADER===Bn&&"load_data")||I.tf.TRANSFORMER===Bn&&"transform"||I.tf.CUSTOM===Bn&&"transform_custom","(",Un.map((function(e,n){return n>=1?"data_".concat(n+1):"data"})).join(", "),"):"]})]}),vt&&(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[I.tf.DATA_EXPORTER===Bn?"export_data":I.tf.TRANSFORMER===Bn&&"transform","\xa0\u2190 function(",Un.map((function(e,n){return"df_".concat(n+1)})).join(", "),"):"]})}),ht&&(null===Un||void 0===Un?void 0:Un.length)>=1&&(0,j.jsx)(ke,{block:G,blockConfiguration:jt,blockRefs:z,blocks:null===Un||void 0===Un?void 0:Un.map((function(e){return null===go||void 0===go?void 0:go[e]})),updateBlockConfiguration:ti}),!ht&&Un.map((function(e,n){var t=go[e],o=(0,x.qn)(null===t||void 0===t?void 0:t.type,{blockColor:null===t||void 0===t?void 0:t.color,theme:yn}).accent,i="{{ df_".concat(n+1," }}");return(0,j.jsxs)("div",{children:[!ht&&!vt&&(0,j.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:["\xa0\xa0\xa0\xa0data",n>=1?"_".concat(n+1):null]}),ht&&(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:i}),vt&&(0,j.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:["\xa0\xa0\xa0\xa0","df".concat(n+1)]})," ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"\u2192"})," ",(0,j.jsx)(Y.Z,{color:o,onClick:function(){var e,n,o=null===z||void 0===z||null===(e=z.current)||void 0===e?void 0:e["".concat(null===t||void 0===t?void 0:t.type,"s/").concat(null===t||void 0===t?void 0:t.uuid,".py")];null===o||void 0===o||null===(n=o.current)||void 0===n||n.scrollIntoView()},preventDefault:!0,small:!0,children:(0,j.jsx)(g.ZP,{color:o,inline:!0,monospace:!0,small:!0,children:e})})]},e)}))]})]}),!Sn&&(0,j.jsx)(j.Fragment,{children:tt?(0,j.jsx)(b.Z,{px:1,children:(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,children:["(",(0,L._6)("line",null===rt||void 0===rt?void 0:rt.split(/\r\n|\r|\n/).length)," collapsed)"]})}):!bt||yt?Yo?(0,j.jsx)(b.Z,{px:1,children:(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,children:["Replicated from block ",(0,j.jsx)(Y.Z,{color:(0,x.qn)(null===Yo||void 0===Yo?void 0:Yo.type,{blockColor:null===Yo||void 0===Yo?void 0:Yo.color,theme:yn}).accent,onClick:function(e){var n,t;(0,_e.j)(e);var o=null===z||void 0===z||null===(n=z.current)||void 0===n?void 0:n["".concat(null===Yo||void 0===Yo?void 0:Yo.type,"s/").concat(null===Yo||void 0===Yo?void 0:Yo.uuid,".py")];null===o||void 0===o||null===(t=o.current)||void 0===t||t.scrollIntoView()},preventDefault:!0,children:(0,j.jsx)(g.ZP,{color:(0,x.qn)(null===Yo||void 0===Yo?void 0:Yo.type,{blockColor:null===Yo||void 0===Yo?void 0:Yo.color,theme:yn}).accent,inline:!0,monospace:!0,children:null===Yo||void 0===Yo?void 0:Yo.uuid})})]})}):Xo:ri}),fe&&c.cloneElement(fe,{runBlockAndTrack:jo}),Sn&&(0,j.jsxs)(b.Z,{p:B.cd,children:[(0,j.jsx)(g.ZP,{bold:!0,danger:!0,children:null===Sn||void 0===Sn?void 0:Sn.error}),(0,j.jsx)(g.ZP,{muted:!0,children:null===Sn||void 0===Sn?void 0:Sn.message})]}),Co&&ct&&ct>Bt&&(0,j.jsx)(x.HC,{children:(0,j.jsxs)(g.ZP,{muted:!0,children:["".concat(Math.round((ct-Bt)/1e3)),"s"]})}),!tt&&![I.tf.CALLBACK,I.tf.CONDITIONAL,I.tf.EXTENSION].includes(Bn)&&(0,j.jsx)(T,{block:G,blocks:N,openSidekickView:tn,pipeline:on})]})),$o]})]}),!Xe&&(0,j.jsxs)(x.gE,{additionalZIndex:ii-H,onMouseEnter:function(){return Kn(!0)},onMouseLeave:function(){Kn(!1),null===sn||void 0===sn||sn(null)},children:[Wn&&y&&(0,j.jsx)(b.Z,{mt:2,mx:2,style:{width:"100%"},children:(0,j.jsx)(p.Z,{addNewBlock:function(e){var n=e.content,t=e.configuration,o=(0,le.eY)(G,e),i=(0,le.fA)(on,G,e).map((function(e){var n=Ue({},go[e]||{}),t=n.upstream_blocks;return t&&(n.upstream_blocks=t.filter((function(e){return e!==Fn}))),n}));return[I.tf.DATA_LOADER,I.tf.TRANSFORMER].includes(Bn)&&I.tf.SCRATCHPAD===e.type&&(n="from mage_ai.data_preparation.variable_manager import get_variable\n\n\n df = get_variable('".concat(ft,"', '").concat(Fn,"', 'output_0')")),n=(0,Ae.X7)(e,n),I.t6.SQL===wn&&(t=Ue(Ue({},(0,Me.GL)(Gn,[M.cH,M.Sv,M.sc,M.BD,M.nq])),t)),I.t6.SQL===e.language&&(n=(0,Ae.SF)(n)),y(Ue(Ue({},e),{},{configuration:t,content:n,upstream_blocks:o}),i)},blockIdx:H,blockTemplates:Q,compact:!0,hideCustom:pt,hideDbt:pt,onClickAddSingleDBTModel:en,pipeline:on,project:rn,setAddNewBlockMenuOpenIdx:sn,setCreatingNewDBTModel:fn,showBrowseTemplates:jn,showConfigureProjectModal:Cn,showGlobalDataProducts:_n})}),(0,j.jsx)(x.t1,{className:"block-divider-inner"})]})]})})}var He=c.forwardRef(Ge)},59582:function(e,n,t){t.d(n,{Z:function(){return v}});var o,i=t(21831),r=t(86422),u=t(82394),l=t(75582),c=t(17717);!function(e){e.DATA_EXPORTER="data_exporter",e.DATA_LOADER="data_loader",e.MAGE_LIBRARY="mage_library",e.TRANSFORMER="transformer",e.USER_LIBRARY="user_library"}(o||(o={}));var a=t(5677);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=t(24224);function p(e,n){var t=e;t.includes("__init__")||t.push("__init__");var o,i=t.length;return(0,f.w6)(i).forEach((function(e,r){if(o)return o;var u=t.slice(0,i-r).join(c.sep);o=n["".concat(u,".py")]})),o}function m(e,n,t){var o,i,r;return((null===(o=t.outputs)||void 0===o||null===(i=o[0])||void 0===i||null===(r=i.sample_data)||void 0===r?void 0:r.columns)||[]).map((function(t){return{label:"".concat(t," column"),kind:e.languages.CompletionItemKind.Variable,insertText:"'".concat(t,"'"),range:n}}))}function h(e,n){var t=e.word.split(""),o=new RegExp(t.reduce((function(e,n,o){var i=t[o+1],r=i?"^".concat(i):"";return e+"".concat(n,"[w ").concat(r,"]*")}),""));return n.reduce((function(e,n){return n.label.match(o)?e.concat(n):e}),[])}function v(e){var n=e.autocompleteItems,t=e.block,u=e.blocks,s=e.pipeline,v=t.type,b=t.upstream_blocks,g=(0,f.HK)(n,(function(e){return e.id}));return function(t){return function(x,j){var C=[],_=x.getValueInRange({endColumn:j.column,endLineNumber:j.lineNumber,startColumn:1,startLineNumber:1}),O=x.getWordUntilPosition(j),Z=O.endColumn,k=O.startColumn,y={endColumn:Z,endLineNumber:j.lineNumber,startColumn:k,startLineNumber:j.lineNumber},E=function(e,n,t){var o=(0,a.Yn)(e),i=(0,a.M4)(e,n),r=o.find((function(e){var n=e.variableName;return i.match(new RegExp(n))}));if(r){var u=r.assignmentValue,l=(0,a.S0)(e)[u];if(l){var c,s=p(l.split(" as ")[0].replace("from ","").replace("import ","").split(" ").reduce((function(e,n){return n.trim()?e.concat(n):e}),[]).join(".").split("."),t),d=(0,a.rW)(l,u);return null===s||void 0===s||null===(c=s.methods_for_class)||void 0===c?void 0:c[d]}}return[]}(_,y,g);if((null===E||void 0===E?void 0:E.length)>=1){var T=h(O,E.map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.Method,label:e,range:y}})));if(T.length>=1)return{suggestions:T}}var I=function(e,n,t){var o=(0,a.M4)(e,n);if(o=o.match(/([\w_]+)./)){var i=(0,a.S0)(e)[o[1]];if(i){var r=p(i.split(" as ")[0].replace("from ","").replace("import ","").split(" ").reduce((function(e,n){return n.trim()?e.concat(n):e}),[]).join(".").split("."),t);if(null!==r&&void 0!==r&&r.functions)return null===r||void 0===r?void 0:r.functions}}return[]}(_,y,g);if((null===I||void 0===I?void 0:I.length)>=1){var A=h(O,I.map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.Function,label:e,range:y}})));if(A.length>=1)return{suggestions:A}}if((null===b||void 0===b?void 0:b.length)>=1){var R=new RegExp("\n@".concat(v));_.match(R)&&C.push.apply(C,(0,i.Z)(h(O,function(e,n,t){var o=t.block,i=t.blocks,r=o.upstream_blocks,u=(0,f.HK)(i,(function(e){return e.uuid}));return r.map((function(t,o){var i=u[t].type,r=0===o?"output_0":"args[".concat(o-1,"]");return{label:"df ".concat(t," ").concat(i," block"),kind:e.languages.CompletionItemKind.Variable,documentation:"Variable for ".concat(i," ").concat(t," data."),insertText:r,range:n}}))}(t,y,e))))}if(O.word.match(/i|f/)){var S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,t=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,u=(arguments.length>2?arguments[2]:void 0).word,s=new Set,f={};e.forEach((function(e){var n=e.group,t=e.id,i=e.imports;if([o.MAGE_LIBRARY,o.USER_LIBRARY].includes(n)){var r=t;r.match(/__init__.py/)&&(r=r.replace(/\/__init__.py/,"")),r=r.split(".py")[0].replaceAll(c.sep,"."),f[r]=e}var u=t.replace(".py","").replace("/__init__","").split(c.sep);if(1===u.length)s.add("import ".concat(u[0]));else if(u.length>=2){var l=u.slice(0,u.length-1).join(".");s.add("from ".concat(l," import ").concat(u[u.length-1]))}i.forEach((function(e){return s.add(e)}))}));var p,m="i"===u,h="f"===u,v=m?"import":h?"from":"",b=(0,a.M4)(n,r);if(m&&b.match(/from/)&&(p=b.match(/from ([A-Za-z0-9_.]+) /)[1]),p&&f[p]){var g=f[p],x=g.classes,j=g.constants,C=g.files,_=g.functions,O=[];return[[j,t.languages.CompletionItemKind.Constant],[x,t.languages.CompletionItemKind.Class],[_,t.languages.CompletionItemKind.Function]].forEach((function(e){var n=(0,l.Z)(e,2),t=n[0],o=n[1];t.forEach((function(e){O.push({filterText:"import ".concat(e),insertText:"import ".concat(e),kind:o,label:e,range:r})}))})),C.forEach((function(e){var n=e.split(c.sep),o=n[n.length-1].split(".py")[0];O.push({filterText:"import ".concat(o),insertText:"import ".concat(o),kind:t.languages.CompletionItemKind.Variable,label:o,range:r})})),O}return(0,i.Z)(s).map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.File,label:e,range:r}})).concat(Object.entries(f).map((function(e){var n=(0,l.Z)(e,2),o=n[0];return n[1],{filterText:"".concat(v," ").concat(o),insertText:"".concat(v," ").concat(o," "),kind:t.languages.CompletionItemKind.File,label:"".concat(o),range:d({},r)}})))}(n,_,O,t,y,e);C.push.apply(C,(0,i.Z)(S))}if(r.tf.CHART===v||r.tf.SCRATCHPAD===v){var P=[];if(r.tf.CHART===v?b.forEach((function(e,n){P.push({block:u.find((function(n){var t=n.uuid;return e===t})),matchIndex:0,variableName:"df_".concat(n+1)})})):r.tf.SCRATCHPAD===v&&function(e,n){return e.map((function(e){return{block:e,regex:new RegExp("([\\w_]+)[ ]*=[ ]*get_variable\\('".concat(n.uuid,"', '").concat(e.uuid,"', 'output_0'\\)"),"g")}}))}(u,s).forEach((function(e){var n=e.block,t=e.regex,o=_.matchAll(t);(0,i.Z)(o).forEach((function(e){var t=null===e||void 0===e?void 0:e.index,o=null===e||void 0===e?void 0:e[1];o&&P.push({block:n,matchIndex:t,variableName:o})}))})),P.length>=1){var w,D=null===(w=_.split("\n")[j.lineNumber-1])||void 0===w?void 0:w.slice(0,O.startColumn-1);if(D){var M=[];if(P.forEach((function(e){var n=e.block,o=e.matchIndex,i=e.variableName,r=new RegExp("".concat(i,"\\["));D.match(r)&&M.push({items:m(t,y,n),matchIndex:o})})),M.length>=1)return{suggestions:h(O,(0,f.YC)(M,"matchIndex",{ascending:!1})[0].items)}}}1===k&&(r.tf.CHART===v?C.push.apply(C,(0,i.Z)(h(O,b.map((function(e,n){var o="df_".concat(n+1);return{label:"".concat(o," ").concat(e," block"),kind:t.languages.CompletionItemKind.Snippet,insertText:o,range:y}}))))):r.tf.SCRATCHPAD===v&&C.push.apply(C,(0,i.Z)(h(O,function(e,n,t){var o=t.block,i=t.blocks,u=t.pipeline;return i.reduce((function(t,i){var l=i.type,c=i.uuid;return o.uuid!==c&&[r.tf.DATA_LOADER,r.tf.TRANSFORMER].includes(l)?t.concat({label:"df ".concat(c," ").concat(l," block"),kind:e.languages.CompletionItemKind.Snippet,documentation:"Get the data from ".concat(l," block ").concat(c,"."),insertText:"from mage_ai.data_preparation.variable_manager import get_variable\n\n\ndf = get_variable('".concat(u.uuid,"', '").concat(c,"', 'output_0')\n"),range:n}):t}),[])}(t,y,e)))))}var N=new Set;u.concat({content:_}).forEach((function(e){var n=e.content;(0,i.Z)(n.matchAll("([A-Za-z_0-9]+)","g")).forEach((function(e){return N.add(e[1])}))}));var B=(0,i.Z)(N);if(B.length){var L=B.map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.Variable,label:e,range:y}}));C.push.apply(C,(0,i.Z)(h(O,L)))}return{suggestions:C}}}}},57541:function(e,n,t){t.d(n,{A2:function(){return v},dP:function(){return b},hS:function(){return j},iK:function(){return g},n9:function(){return h},qy:function(){return x}});var o,i=t(26304),r=t(82394),u=t(75090),l=t(86422),c=t(22341),a=t(98781),s=t(44162),d=["uuid"],f=["uuid"];function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function m(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var h={uuid:"Blocks"},v={uuid:"Pipelines"},b=[h,v],g=(o={},(0,r.Z)(o,l.tf.CALLBACK,c.AQ),(0,r.Z)(o,l.tf.CHART,c.GQ),(0,r.Z)(o,l.tf.CONDITIONAL,c.hW),(0,r.Z)(o,l.tf.CUSTOM,c.VS),(0,r.Z)(o,l.tf.DATA_EXPORTER,c.zS),(0,r.Z)(o,l.tf.DATA_LOADER,c.rH),(0,r.Z)(o,l.tf.DBT,c.xE),(0,r.Z)(o,l.tf.EXTENSION,c.Bf),(0,r.Z)(o,l.tf.MARKDOWN,c.$B),(0,r.Z)(o,l.tf.SENSOR,c.LM),(0,r.Z)(o,l.tf.TRANSFORMER,c.Sv),o),x=[{Icon:c.zQ,uuid:"All templates"}].concat([{uuid:l.tf.DATA_LOADER},{uuid:l.tf.TRANSFORMER},{selectedIconProps:{inverted:!0},uuid:l.tf.DATA_EXPORTER},{uuid:l.tf.SENSOR},{selectedIconProps:{inverted:!0},uuid:l.tf.CUSTOM},{uuid:l.tf.CHART},{selectedIconProps:{inverted:!0},uuid:l.tf.CALLBACK},{selectedIconProps:{inverted:!0},uuid:l.tf.CONDITIONAL},{uuid:l.tf.EXTENSION},{selectedBackgroundColor:null,uuid:l.tf.DBT},{selectedIconProps:{inverted:!0},uuid:l.tf.MARKDOWN}].map((function(e){var n=e.uuid,t=(0,i.Z)(e,d);return m({Icon:g[n],filterTemplates:function(e){return null===e||void 0===e?void 0:e.filter((function(e){return e.block_type===n}))},label:function(){return l.V4[n]},selectedBackgroundColor:function(e){return(0,s.qn)(n,{theme:e}).accent},uuid:n},t)}))),j=[{Icon:c.zQ,uuid:"All templates"}].concat([{Icon:c.X5,uuid:a.qL.PYTHON},{Icon:c.ZG,uuid:a.qL.INTEGRATION},{Icon:u.Z,uuid:a.qL.STREAMING}].map((function(e){var n=e.uuid,t=(0,i.Z)(e,f);return m({filterTemplates:function(e){return null===e||void 0===e?void 0:e.filter((function(e){var t;return(null===e||void 0===e||null===(t=e.pipeline)||void 0===t?void 0:t.type)===n}))},label:function(){return a.G7[n]},uuid:n},t)})))},38639:function(e,n,t){t.d(n,{EN:function(){return y},FX:function(){return E},HS:function(){return C},Nk:function(){return m},Rd:function(){return p},SL:function(){return k},Tj:function(){return Z},UE:function(){return O},Yf:function(){return v},ZG:function(){return s},bC:function(){return h},n5:function(){return f},n8:function(){return _},w5:function(){return j},wj:function(){return g},wl:function(){return b},ze:function(){return x}});var o=t(38626),i=t(23831),r=t(73942),u=t(3055),l=t(49125),c=t(90880),a=t(37391),s=2.5*l.iI,d=40*l.iI,f=10*l.iI,p=o.default.div.withConfig({displayName:"indexstyle__ContainedStyle",componentId:"sc-8sk2qr-0"})([""," overflow:auto;"," "," ",""],a.w5,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).page,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height-f,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width-f,"px;\n ")})),m=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-8sk2qr-1"})(["height:100%;position:relative;"]),h=o.default.div.withConfig({displayName:"indexstyle__NavigationStyle",componentId:"sc-8sk2qr-2"})(["position:fixed;width:","px;z-index:1;"," "," ",""],d,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).panel,";\n border-right: 1px solid ").concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height-f,"px;\n ")}),(function(e){return!e.height&&"\n height: 100%;\n "})),v=o.default.div.withConfig({displayName:"indexstyle__TabsStyle",componentId:"sc-8sk2qr-3"})(["padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;",""],1*l.iI,l.cd*l.iI,l.cd*l.iI,1*l.iI,(function(e){return"\n border-bottom: 1px solid ".concat((e.theme.borders||i.Z.borders).light,";\n ")})),b=o.default.div.withConfig({displayName:"indexstyle__LinksContainerStyle",componentId:"sc-8sk2qr-4"})([""," overflow:auto;position:fixed;width:","px;",""],a.w5,d,(function(e){return"\n height: calc(100% - ".concat(55+(null!==e&&void 0!==e&&e.contained?f:u.Mz)+((null===e||void 0===e?void 0:e.heightOffset)||0),"px);\n ")})),g=o.default.div.withConfig({displayName:"indexstyle__NavLinkStyle",componentId:"sc-8sk2qr-5"})([""," padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;&:hover{cursor:pointer;}",""],(0,c.eR)(),1*l.iI,l.cd*l.iI,l.cd*l.iI,1*l.iI,(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||i.Z.background).codeTextarea,";\n ")})),x=o.default.div.withConfig({displayName:"indexstyle__IconStyle",componentId:"sc-8sk2qr-6"})([""," border-radius:","px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],(0,c.eR)(),r.n_,5*l.iI,1.25*l.iI,1.25*l.iI,5*l.iI,(function(e){return!e.backgroundColor&&"\n background-color: ".concat((e.theme.background||i.Z.background).chartBlock,";\n ")}),(function(e){return e.backgroundColor&&"\n background-color: ".concat(e.backgroundColor,";\n ")})),j=o.default.div.withConfig({displayName:"indexstyle__ContentStyle",componentId:"sc-8sk2qr-7"})(["margin-left:","px;"],d),C=o.default.div.withConfig({displayName:"indexstyle__SubheaderStyle",componentId:"sc-8sk2qr-8"})(["padding:","px;",""],l.cd*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).panel,";\n border-bottom: 1px solid ").concat((e.theme.borders||i.Z.borders).light,";\n ")})),_=o.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-8sk2qr-9"})(["display:flex;flex-wrap:wrap;padding:","px;"],.75*l.iI),O=o.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-8sk2qr-10"})(["border-radius:","px;margin:","px;padding:","px;width:","px;&:hover{cursor:pointer;}",""],r.n_,.75*l.iI,2.5*l.iI,50*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).panel,";\n border: 1px solid ").concat((e.theme.background||i.Z.background).chartBlock,";\n box-shadow: ").concat((e.theme.shadow||i.Z.shadow).frame,";\n ")})),Z=o.default.div.withConfig({displayName:"indexstyle__CardTitleStyle",componentId:"sc-8sk2qr-11"})(["height:","px;"],2.5*l.iI),k=o.default.div.withConfig({displayName:"indexstyle__CardDescriptionStyle",componentId:"sc-8sk2qr-12"})(["height:","px;margin-top:","px;"],2.5*l.iI*2,1*l.iI),y=o.default.div.withConfig({displayName:"indexstyle__TagsStyle",componentId:"sc-8sk2qr-13"})(["height:","px;margin-top:","px;overflow:hidden;"],3.5*l.iI,.5*l.iI),E=o.default.div.withConfig({displayName:"indexstyle__BreadcrumbsStyle",componentId:"sc-8sk2qr-14"})(["padding-bottom:","px;padding-top:","px;",""],1*l.iI,1*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).panel,";\n border-bottom: 1px solid ").concat((e.theme.borders||i.Z.borders).light,";\n ")}))},49666:function(e,n,t){t.d(n,{Z:function(){return L}});var o=t(82394),i=t(75582),r=t(12691),u=t.n(r),l=t(21764),c=t(82684),a=t(83455),s=t(34376),d=t(60328),f=t(32316),p=t(18908),m=t(48952),h=t(93461),v=t(67971),b=t(10919),g=t(86673),x=t(19711),j=t(38435),C=t(82944),_=t(32063),O=t(82531),Z=t(29499),k=t(66166),y=t(3055),E={uuid:"Define"},T={uuid:"Document"},I=[E,T],A=t(49125),R=t(41422),S=t(72454),P=t(96510),w=t(9728),D=t(24141),M=t(28598);function N(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function B(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?N(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var L=function(e){var n=e.defaultTab,t=e.onMutateSuccess,o=e.pipelineUUID,r=e.template,N=e.templateAttributes,L=e.templateUUID,U=(0,D.i)().height,F=(y.Mz,(0,s.useRouter)()),G=(0,w.VI)(null,{},[],{uuid:"CustomTemplates/PipelineTemplateDetail"}),H=(0,i.Z)(G,1)[0],z=(0,c.useState)(!1),Q=z[0],q=z[1],W=(0,c.useState)(!1),K=W[0],V=W[1],Y=(0,c.useState)(N),X=Y[0],J=Y[1],$=(0,c.useCallback)((function(e){V(!0),J(e)}),[]),ee=(0,k.Z)(r);(0,c.useEffect)((function(){(null===ee||void 0===ee?void 0:ee.template_uuid)!==(null===r||void 0===r?void 0:r.template_uuid)&&J(r)}),[r,ee]);var ne=(0,c.useMemo)((function(){return null===r||void 0===r?void 0:r.pipeline}),[r]),te=(0,c.useMemo)((function(){return(null===ne||void 0===ne?void 0:ne.blocks)||[]}),[ne]),oe=(0,c.useMemo)((function(){return!r&&!L}),[r,L]),ie=(0,c.useState)(n?I.find((function(e){return e.uuid===(null===n||void 0===n?void 0:n.uuid)})):I[0]),re=ie[0],ue=ie[1],le=(0,c.useMemo)((function(){return!!oe&&!(null!==X&&void 0!==X&&X.template_uuid)}),[oe,X]),ce=(0,c.useState)(!1),ae=ce[0],se=ce[1],de=(0,c.useState)(oe?400:300),fe=de[0],pe=de[1],me=(0,a.Db)(O.ZP.custom_templates.useCreate(),{onSuccess:function(e){return(0,P.wD)(e,{callback:function(e){var n=e.custom_template;t&&(null===t||void 0===t||t()),q(!0),setTimeout((function(){F.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(null===n||void 0===n?void 0:n.template_uuid),"?object_type=").concat(p.R))}),1)},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),he=(0,i.Z)(me,2),ve=he[0],be=he[1].isLoading,ge=(0,a.Db)(O.ZP.custom_templates.useUpdate(r?encodeURIComponent(null===r||void 0===r?void 0:r.template_uuid):L&&encodeURIComponent(L),{object_type:p.R}),{onSuccess:function(e){return(0,P.wD)(e,{callback:function(e){var n=e.custom_template;t&&(null===t||void 0===t||t()),null!==r&&void 0!==r&&r.template_uuid&&(null===n||void 0===n?void 0:n.template_uuid)!==(null===r||void 0===r?void 0:r.template_uuid)||L&&(null===n||void 0===n?void 0:n.template_uuid)!==L?F.replace("/templates/[...slug]","/templates/".concat(encodeURIComponent(null===n||void 0===n?void 0:n.template_uuid),"?object_type=").concat(p.R)):(J(n),V(!1),l.Am.success("Template successfully saved.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"custom_pipeline_template"}))},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),xe=(0,i.Z)(ge,2),je=xe[0],Ce=xe[1].isLoading,_e=(0,c.useCallback)((function(){var e={custom_template:B(B({},X),{},{object_type:p.R})};oe?ve(B(B({},e),{},{custom_template:B(B({},null===e||void 0===e?void 0:e.custom_template),{},{pipeline_uuid:o})})):je(e)}),[ve,oe,o,X,je]),Oe=(0,c.useMemo)((function(){return(0,M.jsx)(M.Fragment,{})}),[]),Ze=(0,c.useMemo)((function(){return(0,M.jsxs)(v.ZP,{flexDirection:"column",fullHeight:!0,children:[(0,M.jsx)(R.Yf,{children:(0,M.jsx)(f.Z,{noPadding:!0,onClickTab:function(e){ue(e)},selectedTabUUID:null===re||void 0===re?void 0:re.uuid,tabs:I})}),(0,M.jsxs)(h.Z,{flexDirection:"column",children:[E.uuid===(null===re||void 0===re?void 0:re.uuid)&&(0,M.jsxs)(M.Fragment,{children:[o&&(0,M.jsx)(g.Z,{mt:A.cd,px:A.cd,children:(0,M.jsxs)(x.ZP,{default:!0,children:["This pipeline template will be based off the pipeline ",(0,M.jsx)(u(),{as:"/pipelines/".concat(o),href:"/pipelines/[pipeline]",passHref:!0,children:(0,M.jsx)(b.Z,{bold:!0,default:!0,inline:!0,monospace:!0,openNewWindow:!0,children:o})}),"."]})}),(0,M.jsxs)(g.Z,{mt:A.cd,px:A.cd,children:[(0,M.jsxs)(g.Z,{mb:1,children:[(0,M.jsx)(x.ZP,{bold:!0,children:"Template UUID"}),(0,M.jsx)(x.ZP,{muted:!0,small:!0,children:"Unique identifier for custom template. The UUID will also determine where the custom template file is stored in the project. You can use nested folder names in the template\u2019s UUID."})]}),(0,M.jsx)(C.Z,{monospace:!0,onChange:function(e){return $((function(n){return B(B({},n),{},{template_uuid:e.target.value})}))},placeholder:"e.g. some_template_name",primary:!0,setContentOnMount:!0,value:(null===X||void 0===X?void 0:X.template_uuid)||""})]})]}),T.uuid===(null===re||void 0===re?void 0:re.uuid)&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(g.Z,{mt:A.cd,px:A.cd,children:[(0,M.jsxs)(g.Z,{mb:1,children:[(0,M.jsx)(x.ZP,{bold:!0,children:"Name"}),(0,M.jsx)(x.ZP,{muted:!0,small:!0,children:"A human readable name for your template."})]}),(0,M.jsx)(C.Z,{onChange:function(e){return $((function(n){return B(B({},n),{},{name:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===X||void 0===X?void 0:X.name)||""})]}),(0,M.jsx)(g.Z,{mt:A.cd,px:A.cd,children:(0,M.jsx)(j.Z,{label:"Description",onChange:function(e){return $((function(n){return B(B({},n),{},{description:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===X||void 0===X?void 0:X.description)||""})})]})]}),(0,M.jsx)(R.ig,{children:(0,M.jsx)(g.Z,{p:A.cd,children:(0,M.jsx)(v.ZP,{children:(0,M.jsxs)(d.Z,{disabled:le,fullWidth:!0,loading:be||Ce,onClick:function(){return _e()},primary:!0,children:[!oe&&"Save template",oe&&"Create new template"]})})})})]})}),[le,be,Ce,oe,o,_e,null===re||void 0===re?void 0:re.uuid,$,X]),ke=(0,Z.Z)({shouldWarn:!Q&&K,warningMessage:"You have unsaved changes. Are you sure you want to leave?"}).ConfirmLeaveModal;return(0,M.jsxs)(_.Z,{after:Oe,before:Ze,beforeHidden:ae,beforeWidth:fe,leftOffset:S.k1,setBeforeHidden:se,setBeforeWidth:pe,children:[(0,M.jsx)(ke,{}),(0,M.jsx)(m.Z,{blocks:te,height:U,heightOffset:y.Mz,noStatus:!0,pipeline:ne})]})}},41422:function(e,n,t){t.d(n,{Nk:function(){return c},Yf:function(){return s},bC:function(){return a},ig:function(){return d},w5:function(){return f}});var o=t(38626),i=t(23831),r=t(49125),u=t(38639),l=(r.iI,40*r.iI),c=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-axgvn9-0"})(["height:100%;position:relative;"]),a=o.default.div.withConfig({displayName:"indexstyle__NavigationStyle",componentId:"sc-axgvn9-1"})(["overflow:auto;position:fixed;width:","px;z-index:1;"," "," ",""],l,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).panel,";\n border-right: 1px solid ").concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height-u.n5,"px;\n ")}),(function(e){return!e.height&&"\n height: 100%;\n "})),s=o.default.div.withConfig({displayName:"indexstyle__TabsStyle",componentId:"sc-axgvn9-2"})(["padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;width:100%;",""],1*r.iI,r.cd*r.iI,r.cd*r.iI,1*r.iI,(function(e){return"\n border-bottom: 1px solid ".concat((e.theme.borders||i.Z.borders).light,";\n ")})),d=o.default.div.withConfig({displayName:"indexstyle__ButtonsStyle",componentId:"sc-axgvn9-3"})(["margin-top:","px;width:100%;",""],r.cd*r.iI,(function(e){return"\n border-top: 1px solid ".concat((e.theme.borders||i.Z.borders).light,";\n ")})),f=o.default.div.withConfig({displayName:"indexstyle__ContentStyle",componentId:"sc-axgvn9-4"})(["margin-left:","px;"],l)},62749:function(e,n,t){t.d(n,{Z:function(){return q}});var o=t(82394),i=t(75582),r=t(56085),u=t(82684),l=t(65701),c=t(1254),a=t(21764),s=t(83455),d=t(34376),f=t(35490),p=t(60328),m=t(32316),h=t(95689),v=t(18908),b=t(93461),g=t(67971),x=t(86673),j=t(55378),C=t(19711),_=t(38435),O=t(82944),Z=t(82531),k=t(29499),y=t(66166),E=t(86422),T=t(41422),I=t(82635),A=t(16115),R={uuid:"Define"},S={uuid:"Document"},P=[R,S],w=t(94353),D=t(49125),M=t(98781),N=t(28799),B=t(96510),L=t(51504),U=t(9728),F=t(41150),G=t(24141),H=t(28598);function z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Q(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?z(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var q=function(e){var n=e.contained,t=e.defaultTab,z=e.heightOffset,q=e.onCancel,W=e.onCreateCustomTemplate,K=e.onMutateSuccess,V=e.template,Y=e.templateAttributes,X=e.templateUUID,J=(0,G.i)().height,$=(0,d.useRouter)(),ee=(0,U.VI)(null,{},[],{uuid:"CustomTemplates/TemplateDetail"}),ne=(0,i.Z)(ee,1)[0],te=(0,u.useState)(Number(new Date)),oe=te[0],ie=te[1],re=(0,u.useState)(!1),ue=re[0],le=re[1],ce=(0,u.useState)(!1),ae=ce[0],se=ce[1],de=(0,u.useState)(t?P.find((function(e){return e.uuid===(null===t||void 0===t?void 0:t.uuid)})):P[0]),fe=de[0],pe=de[1],me=(0,u.useState)(!1),he=me[0],ve=me[1],be=(0,u.useState)(Y),ge=be[0],xe=be[1],je=(0,u.useCallback)((function(e){ve(!0),xe(e)}),[]),Ce=Z.ZP.custom_templates.detail(!V&&X&&encodeURIComponent(X),{object_type:v.Z}).data,_e=(0,u.useMemo)((function(){return V||(null===Ce||void 0===Ce?void 0:Ce.custom_template)}),[Ce,V]),Oe=(0,y.Z)(_e);(0,u.useEffect)((function(){(null===Oe||void 0===Oe?void 0:Oe.template_uuid)!==(null===_e||void 0===_e?void 0:_e.template_uuid)&&(ie(Number(new Date)),xe(_e),se(!0))}),[_e,Oe]);var Ze=(0,s.Db)(Z.ZP.custom_templates.useCreate(),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(e){var n=e.custom_template;K&&(null===K||void 0===K||K()),W?null===W||void 0===W||W(n):(le(!0),setTimeout((function(){$.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(null===n||void 0===n?void 0:n.template_uuid)))}),1))},onErrorCallback:function(e,n){return ne({errors:n,response:e})}})}}),ke=(0,i.Z)(Ze,2),ye=ke[0],Ee=ke[1].isLoading,Te=(0,s.Db)(Z.ZP.custom_templates.useUpdate(V?encodeURIComponent(null===V||void 0===V?void 0:V.template_uuid):X&&encodeURIComponent(X),{object_type:v.Z}),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(e){var n=e.custom_template;K&&(null===K||void 0===K||K()),xe(n),ve(!1),a.Am.success("Template successfully saved.",{position:a.Am.POSITION.BOTTOM_RIGHT,toastId:"custom_block_template"})},onErrorCallback:function(e,n){return ne({errors:n,response:e})}})}}),Ie=(0,i.Z)(Te,2),Ae=Ie[0],Re=Ie[1].isLoading,Se=(0,u.useMemo)((function(){return E.tf.MARKDOWN===(null===ge||void 0===ge?void 0:ge.block_type)}),[null===ge||void 0===ge?void 0:ge.block_type]),Pe=!V&&!X,we=(0,u.useMemo)((function(){return!!Pe&&(!(null!==ge&&void 0!==ge&&ge.template_uuid)||!(null!==ge&&void 0!==ge&&ge.block_type)||!Se&&!(null!==ge&&void 0!==ge&&ge.language))}),[Se,Pe,ge]),De=Z.ZP.kernels.list({},{refreshInterval:5e3,revalidateOnFocus:!0}),Me=De.data,Ne=De.mutate,Be=null===Me||void 0===Me?void 0:Me.kernels,Le=(null===Be||void 0===Be?void 0:Be.find((function(e){return e.name===M.a_[M.qL.PYTHON]})))||(null===Be||void 0===Be?void 0:Be[0]),Ue=(0,s.Db)(Z.ZP.kernels.useUpdate(null===Le||void 0===Le?void 0:Le.id),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(){return Ne()},onErrorCallback:function(e,n){return ne({errors:n,response:e})}})}}),Fe=(0,i.Z)(Ue,1)[0],Ge=(0,u.useCallback)((function(){Fe({kernel:{action_type:"interrupt"}}),Ke([])}),[Fe]),He=(0,u.useState)({}),ze=He[0],Qe=He[1],qe=(0,u.useState)([]),We=qe[0],Ke=qe[1],Ve=(0,u.useMemo)((function(){return{language:null===ge||void 0===ge?void 0:ge.language,name:null===ge||void 0===ge?void 0:ge.name,type:null===ge||void 0===ge?void 0:ge.block_type,uuid:null===ge||void 0===ge?void 0:ge.template_uuid}}),[ge]),Ye=(0,u.useMemo)((function(){return new f.Z}),[]),Xe=(0,u.useMemo)((function(){return{api_key:w.l,token:Ye.decodedToken.token}}),[Ye]),Je=(0,r.ZP)((0,N.Ib)(),{onClose:function(){return console.log("socketUrlPublish closed")},onMessage:function(e){if(e){var n=JSON.parse(e.data),t=n.execution_state,i=n.uuid;if(!i)return;Qe((function(e){var t=e[i]||[];return Q(Q({},e),{},(0,o.Z)({},i,t.concat(n)))})),I.uF.BUSY===t?Ke((function(e){return e.find((function(e){var n=e.uuid;return i===n}))||!Ve?e:e.concat(Ve)})):I.uF.IDLE===t&&Ke((function(e){return e.filter((function(e){var n=e.uuid;return i!==n}))}))}},onOpen:function(){return console.log("socketUrlPublish opened")},reconnectAttempts:10,reconnectInterval:3e3,shouldReconnect:function(){return console.log("Attempting to reconnect..."),!0}}).sendMessage,$e=(0,u.useCallback)((function(e){var n=e.block,t=e.code,o=e.ignoreAlreadyRunning,i=e.runDownstream,r=void 0!==i&&i,u=e.runIncompleteUpstream,l=void 0!==u&&u,c=e.runSettings,a=void 0===c?{}:c,s=e.runTests,d=void 0!==s&&s,f=e.runUpstream,p=n.extension_uuid,m=n.upstream_blocks,h=n.uuid;We.find((function(e){var n=e.uuid;return h===n}))&&!o||(Je(JSON.stringify(Q(Q({},Xe),{},{code:t,extension_uuid:p,run_downstream:r,run_incomplete_upstream:l,run_settings:a,run_tests:d,run_upstream:f,type:n.type,upstream_blocks:m,uuid:h}))),Qe((function(e){return delete e[h],e})),Ke((function(e){return e.find((function(e){var n=e.uuid;return h===n}))?e:e.concat(n)})))}),[We,Je,Qe,Ke,Xe]),en=(0,u.useMemo)((function(){return We.reduce((function(e,n,t){return Q(Q({},e),{},(0,o.Z)({},n.uuid,Q(Q({},n),{},{priority:t})))}),{})}),[We]),nn=(0,u.useMemo)((function(){if(!ae)return(0,H.jsx)("div",{});var e=en[null===Ve||void 0===Ve?void 0:Ve.uuid],n=e?0===e.priority?I.uF.BUSY:I.uF.QUEUED:I.uF.IDLE;return(0,H.jsx)(h.Z,{block:Ve,defaultValue:null===ge||void 0===ge?void 0:ge.content,disableDrag:!0,executionState:n,hideExtraCommandButtons:!0,hideExtraConfiguration:!0,hideHeaderInteractiveInformation:!0,interruptKernel:Ge,messages:null===ze||void 0===ze?void 0:ze[null===Ve||void 0===Ve?void 0:Ve.uuid],noDivider:!0,onChange:function(e){return je((function(n){return Q(Q({},n),{},{content:e})}))},runBlock:$e,runningBlocks:We,selected:!0,setErrors:ne,textareaFocused:!0},String(oe))}),[Ve,oe,Ge,ze,ae,$e,We,en,je,ne,ge]),tn=(0,u.useCallback)((function(){var e={custom_template:Q(Q({},ge),{},{language:Se?E.t6.MARKDOWN:null===ge||void 0===ge?void 0:ge.language,object_type:v.Z})};Pe?ye(e):Ae(e)}),[ye,Se,Pe,ge,Ae]),on="CustomTemplates/TemplateDetail",rn=(0,F.y)(),un=rn.registerOnKeyDown,ln=rn.unregisterOnKeyDown;(0,u.useEffect)((function(){return function(){ln(on)}}),[ln,on]),un(on,(function(e,n){if(he&&(0,L.y)([A.zX,A.hS],n)){e.preventDefault();"undefined"!==typeof location&&window.confirm("You have changes that are unsaved. Click cancel and save your changes before reloading page.")&&location.reload()}else((0,L.y)([A.zX,A.Um],n)||(0,L.y)([A.PQ,A.Um],n))&&(e.preventDefault(),tn())}),[tn,he]);var cn=(0,u.useMemo)((function(){return J-z}),[J,z]),an=(0,k.Z)({shouldWarn:!ue&&he,warningMessage:"You have unsaved changes. Are you sure you want to leave?"}).ConfirmLeaveModal;return(0,H.jsxs)(T.Nk,{children:[(0,H.jsx)(an,{}),(0,H.jsx)(T.bC,{height:n?cn:null,children:(0,H.jsxs)(g.ZP,{flexDirection:"column",fullHeight:!0,children:[(0,H.jsx)(T.Yf,{children:(0,H.jsx)(m.Z,{noPadding:!0,onClickTab:function(e){pe(e)},selectedTabUUID:null===fe||void 0===fe?void 0:fe.uuid,tabs:Pe?P.slice(0,1):P})}),(0,H.jsxs)(b.Z,{flexDirection:"column",children:[R.uuid===(null===fe||void 0===fe?void 0:fe.uuid)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(x.Z,{mt:D.cd,px:D.cd,children:[(0,H.jsxs)(x.Z,{mb:1,children:[(0,H.jsx)(C.ZP,{bold:!0,children:"Template UUID"}),(0,H.jsx)(C.ZP,{muted:!0,small:!0,children:"Unique identifier for custom template. The UUID will also determine where the custom template file is stored in the project. You can use nested folder names in the template\u2019s UUID."})]}),(0,H.jsx)(O.Z,{monospace:!0,onChange:function(e){return je((function(n){return Q(Q({},n),{},{template_uuid:e.target.value})}))},placeholder:"e.g. some_template_name",primary:!0,setContentOnMount:!0,value:(null===ge||void 0===ge?void 0:ge.template_uuid)||""})]}),(0,H.jsx)(x.Z,{mt:D.cd,px:D.cd,children:(0,H.jsx)(j.Z,{label:"Block type",onChange:function(e){return je((function(n){return Q(Q({},n),{},{block_type:e.target.value,language:E.tf.MARKDOWN===e.target.value?E.t6.MARKDOWN:null===n||void 0===n?void 0:n.language})}))},primary:!0,value:(null===ge||void 0===ge?void 0:ge.block_type)||"",children:Object.values(E.tf).map((function(e){return(0,H.jsx)("option",{value:e,children:E.V4[e]},e)}))})}),!Se&&(0,H.jsx)(x.Z,{mt:D.cd,px:D.cd,children:(0,H.jsx)(j.Z,{label:"Language",onChange:function(e){return je((function(n){return Q(Q({},n),{},{language:e.target.value})}))},primary:!0,value:(null===ge||void 0===ge?void 0:ge.language)||"",children:Object.values(E.t6).map((function(e){return(0,H.jsx)("option",{value:e,children:E.LE[e]},e)}))})})]}),S.uuid===(null===fe||void 0===fe?void 0:fe.uuid)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(x.Z,{mt:D.cd,px:D.cd,children:[(0,H.jsxs)(x.Z,{mb:1,children:[(0,H.jsx)(C.ZP,{bold:!0,children:"Name"}),(0,H.jsx)(C.ZP,{muted:!0,small:!0,children:"A human readable name for your template."})]}),(0,H.jsx)(O.Z,{onChange:function(e){return je((function(n){return Q(Q({},n),{},{name:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===ge||void 0===ge?void 0:ge.name)||""})]}),(0,H.jsx)(x.Z,{mt:D.cd,px:D.cd,children:(0,H.jsx)(_.Z,{label:"Description",onChange:function(e){return je((function(n){return Q(Q({},n),{},{description:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===ge||void 0===ge?void 0:ge.description)||""})})]})]}),(0,H.jsx)(T.ig,{children:(0,H.jsx)(x.Z,{p:D.cd,children:(0,H.jsxs)(g.ZP,{children:[(0,H.jsxs)(p.Z,{disabled:we,fullWidth:!0,loading:Ee||Re,onClick:function(){return tn()},primary:!0,children:[!Pe&&"Save template",Pe&&"Create new template"]}),q&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(x.Z,{mr:1}),(0,H.jsx)(p.Z,{onClick:q,secondary:!0,children:"Cancel"})]})]})})})]})}),(0,H.jsx)(T.w5,{children:(0,H.jsx)(x.Z,{p:D.cd,children:(0,H.jsx)(l.W,{backend:c.PD,children:nn})})})]})}},19140:function(e,n,t){t.d(n,{W4:function(){return d},Wx:function(){return s},ZG:function(){return a}});var o=t(38626),i=t(23831),r=t(86422),u=t(73942),l=t(49125),c=t(44162),a=l.cd*l.iI,s=o.default.div.withConfig({displayName:"indexstyle__IconContainerStyle",componentId:"sc-oyfjzc-0"})(["align-items:center;border-radius:","px;border:1px solid transparent;display:flex;justify-content:center;"," "," "," "," "," "," "," "," "," ",""],u.BG,(function(e){return e.border&&"\n border: 1px dotted ".concat((e.theme.content||i.Z.content).active,";\n ")}),(function(e){return e.grey&&"\n background-color: ".concat((0,c.qn)(r.tf.SCRATCHPAD,e).accent,";\n ")}),(function(e){return e.blue&&"\n background-color: ".concat((0,c.qn)(r.tf.DATA_LOADER,e).accent,";\n ")}),(function(e){return e.purple&&"\n background-color: ".concat((0,c.qn)(r.tf.TRANSFORMER,e).accent,";\n ")}),(function(e){return e.sky&&"\n background-color: ".concat((0,c.qn)(r.tf.MARKDOWN,e).accent,";\n ")}),(function(e){return e.teal&&"\n background-color: ".concat((0,c.qn)(r.tf.EXTENSION,e).accent,";\n ")}),(function(e){return e.rose&&"\n background-color: ".concat((0,c.qn)(r.tf.CALLBACK,e).accent,";\n ")}),(function(e){return e.yellow&&"\n background-color: ".concat((0,c.qn)(r.tf.DATA_EXPORTER,e).accent,";\n ")}),(function(e){return!e.compact&&"\n height: ".concat(a+l.iI/2,"px;\n width: ").concat(a+l.iI/2,"px;\n ")}),(function(e){return e.compact&&"\n height: ".concat(a/2+l.iI,"px;\n width: ").concat(a/2+l.iI,"px;\n ")})),d=o.default.div.withConfig({displayName:"indexstyle__ButtonWrapper",componentId:"sc-oyfjzc-1"})(["position:relative;margin-bottom:","px;margin-right:","px;",""],l.iI,l.iI,(function(e){return e.increasedZIndex&&"\n z-index: 3;\n "}))},28317:function(e,n,t){t.d(n,{Z:function(){return ve}});var o=t(82394),i=t(21831),r=t(82684),u=t(75582),l=t(83455),c=t(67429),a=t(72470),s=t(60328),d=t(47999),f=t(93461),p=t(67971),m=t(30264),h=t(79749),v=t(10919),b=t(28598);var g=function(e){var n=e.fill,t=void 0===n?"white":n,o=e.size;return(0,b.jsxs)("svg",{fill:"none",height:o,viewBox:"0 0 20 21",width:o,xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("g",{clipPath:"url(#clip0_11802_82284)",children:(0,b.jsx)("path",{clipRule:"evenodd",d:"M10 20.0024C15.5228 20.0024 20 15.5253 20 10.0024C20 4.47959 15.5228 0.00244141 10 0.00244141C4.47715 0.00244141 0 4.47959 0 10.0024C0 15.5253 4.47715 20.0024 10 20.0024ZM10 18.5024C11.5782 18.5024 13.0559 18.0723 14.3224 17.323C14.3144 17.3061 14.307 17.2888 14.3002 17.2712L11.5045 10.0024H8.49587L5.70021 17.2712C5.69339 17.2889 5.68596 17.3062 5.67796 17.3231C6.94434 18.0724 8.42195 18.5024 10 18.5024ZM11.6336 6.15938L15.5784 16.416C17.3685 14.8577 18.5 12.5622 18.5 10.0024C18.5 5.30802 14.6944 1.50244 10 1.50244C5.30558 1.50244 1.5 5.30802 1.5 10.0024C1.5 12.5623 2.63162 14.8579 4.4219 16.4163L8.36685 6.15939C8.94212 4.66367 11.0583 4.66367 11.6336 6.15938Z",fill:t,fillRule:"evenodd"})}),(0,b.jsx)("defs",{children:(0,b.jsx)("clipPath",{id:"clip0_11802_82284",children:(0,b.jsx)("rect",{fill:t,height:"20",transform:"translate(0 0.00244141)",width:"20"})})})]})},x=t(29237),j=t(91835),C=t(93812),_=t(40656),O=t(22341);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var y,E=function(e){var n=(0,j.Z)({},e),t=(null===n||void 0===n?void 0:n.size)||_.C,o=(0,O.J_)([{clipRule:"evenodd",d:"M15.4697 1.47202C16.3149 0.62684 17.6852 0.62684 18.5304 1.47202C19.3756 2.3172 19.3756 3.6875 18.5304 4.53268L10.7445 12.3186C10.5002 12.5629 10.1891 12.7294 9.85027 12.7972L9.11804 12.9436C7.89353 13.1885 6.81392 12.1089 7.05882 10.8844L7.20527 10.1522C7.27302 9.81337 7.43954 9.50222 7.68384 9.25792L15.4697 1.47202ZM17.4697 2.53268C17.2104 2.27329 16.7898 2.27329 16.5304 2.53268L14.7522 4.31085L15.6916 5.25019L17.4697 3.47202C17.7291 3.21263 17.7291 2.79207 17.4697 2.53268ZM14.6309 6.31085L13.6916 5.37151L8.7445 10.3186C8.7096 10.3535 8.68582 10.3979 8.67614 10.4463L8.52969 11.1786C8.4947 11.3535 8.64893 11.5077 8.82386 11.4727L9.5561 11.3263C9.60449 11.3166 9.64894 11.2928 9.68384 11.2579L14.6309 6.31085Z",fillRule:"evenodd"},{clipRule:"evenodd",d:"M2.12221 16.4212C1.89178 16.7635 1.42775 16.8555 1.08405 16.6264C0.739408 16.3966 0.646278 15.931 0.876042 15.5863L1.50008 16.0023C0.876042 15.5863 0.87632 15.5859 0.876609 15.5855L0.877248 15.5845L0.878742 15.5823L0.882593 15.5766L0.893746 15.5605C0.902714 15.5476 0.914758 15.5306 0.929868 15.51C0.96007 15.4687 1.00264 15.4126 1.05749 15.345C1.16699 15.2102 1.32669 15.0283 1.53609 14.8278C1.95274 14.4289 2.58034 13.9427 3.41428 13.6164C5.14688 12.9384 7.5533 13.0314 10.475 15.4219C13.0533 17.5314 14.8969 17.4384 16.0393 16.9914C16.6428 16.7552 17.109 16.3976 17.4267 16.0934C17.5845 15.9424 17.7021 15.8078 17.7782 15.7142C17.8161 15.6675 17.8434 15.6313 17.8598 15.6089C17.868 15.5977 17.8735 15.5899 17.8762 15.586C17.8769 15.585 17.8774 15.5843 17.8777 15.5838L17.877 15.5849C18.1069 15.2409 18.5717 15.1487 18.9161 15.3783C19.2608 15.6081 19.3539 16.0737 19.1241 16.4184L18.5001 16.0023C19.1241 16.4184 19.1238 16.4188 19.1236 16.4192L19.1229 16.4202L19.1214 16.4224L19.1176 16.4281L19.1064 16.4442C19.0974 16.4571 19.0854 16.4741 19.0703 16.4947C19.0401 16.536 18.9975 16.5921 18.9427 16.6597C18.8332 16.7945 18.6735 16.9764 18.4641 17.1769C18.0474 17.5758 17.4198 18.062 16.5859 18.3883C14.8533 19.0663 12.4469 18.9733 9.52515 16.5828C6.94686 14.4733 5.10328 14.5663 3.96088 15.0133C3.35732 15.2495 2.89117 15.6071 2.57345 15.9113C2.41566 16.0623 2.29802 16.1969 2.22197 16.2905C2.18405 16.3372 2.15679 16.3734 2.14036 16.3958C2.13215 16.407 2.12668 16.4148 2.12396 16.4187C2.12332 16.4196 2.12254 16.4207 2.12221 16.4212ZM2.12221 16.4212C2.1222 16.4212 2.12221 16.4212 2.12221 16.4212V16.4212Z",fillRule:"evenodd"}],{viewBox:"0 0 20 21"});return(0,b.jsxs)(C.ZP,k(k({},n),{},{size:t,viewBox:null,children:[(0,b.jsx)("g",{clipPath:"url(#clip0_11826_796)",id:"Type / Scratchpad",children:(0,b.jsx)("g",{id:"Vector",children:o(k(k({},n),{},{size:t}))})}),(0,b.jsx)("defs",{children:(0,b.jsx)("clipPath",{id:"clip0_11826_796",children:(0,b.jsx)("rect",{fill:"white",height:"20",transform:"translate(0 0.00244141)",width:"20"})})})]}))};!function(e){e.BLOCK_ACTION_OBJECTS="block_action_objects"}(y||(y={}));var T=t(86673),I=t(19711),A=t(82944),R=t(46261),S=t(82531),P=t(86422),w=t(57541),D=t(38626),M=t(23831),N=t(73942),B=t(49125),L=t(37391),U=t(90880),F=B.cd*B.iI,G=D.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1mqygp5-0"})([""," border-radius:","px;"," "," "," "," ",""],(0,U.eR)(),N.n_,(function(e){return"\n background-color: ".concat((e.theme.background||M.Z.background).dashboard,";\n box-shadow: ").concat((e.theme.shadow||M.Z.shadow).frame,";\n ")}),(function(e){return!e.focused&&"\n border: 1px solid ".concat((e.theme.interactive||M.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.focused&&"\n border: 1px solid ".concat((e.theme.interactive||M.Z.interactive).hoverBorder,";\n ")}),(function(e){return!e.compact&&"\n padding-left: ".concat(2.5*B.iI,"px;\n padding-right: ").concat(2.5*B.iI,"px;\n ")}),(function(e){return e.compact&&"\n padding-left: ".concat(1.5*B.iI,"px;\n padding-right: ").concat(1.5*B.iI,"px;\n ")})),H=D.default.div.withConfig({displayName:"indexstyle__DividerStyle",componentId:"sc-1mqygp5-1"})(["height:","px;width:1px;",""],F,(function(e){return"\n background-color: ".concat((e.theme.interactive||M.Z.interactive).defaultBorder,";\n ")})),z=D.default.div.withConfig({displayName:"indexstyle__ButtonWrapper",componentId:"sc-1mqygp5-2"})(["position:relative;"," "," ",""],(function(e){return e.increasedZIndex&&"\n z-index: 3;\n "}),(function(e){return!e.compact&&"\n margin-bottom: ".concat(2.5*B.iI,"px;\n margin-top: ").concat(2.5*B.iI,"px;\n ")}),(function(e){return e.compact&&"\n margin-bottom: ".concat(1.5*B.iI,"px;\n margin-top: ").concat(1.5*B.iI,"px;\n ")})),Q=D.default.div.withConfig({displayName:"indexstyle__TextInputFocusAreaStyle",componentId:"sc-1mqygp5-3"})(["width:100%;&:hover{cursor:text;}"," ",""],(function(e){return!e.compact&&"\n height: ".concat(2.5*B.iI,"px;\n ")}),(function(e){return e.compact&&"\n height: ".concat(1.5*B.iI,"px;\n ")})),q=D.default.div.withConfig({displayName:"indexstyle__SearchStyle",componentId:"sc-1mqygp5-4"})(["position:relative;width:100%;"]),W=D.default.div.withConfig({displayName:"indexstyle__DropdownStyle",componentId:"sc-1mqygp5-5"})([""," border-radius:","px;max-height:","px;overflow:auto;position:absolute;width:100%;z-index:1;"," ",""],L.w5,N.BG,40*B.iI,(function(e){return"\n background-color: ".concat((e.theme.background||M.Z.background).popup,";\n box-shadow: ").concat((e.theme.shadow||M.Z.shadow).popup,";\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset,"px;\n ")})),K=D.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-1mqygp5-6"})(["align-items:center;display:flex;justify-content:space-between;padding:","px ","px;position:relative;z-index:2;&:hover{cursor:pointer;}",""],1.5*B.iI,2.5*B.iI,(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||M.Z.interactive).hoverBackground,";\n ")})),V=t(16115),Y=t(11366),X=t(91427),J=t(44162),$=t(84212),ee=t(96510),ne=t(66653),te=t(9728),oe=t(41150);function ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function re(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ue=function(e){var n,t=e.addNewBlock,o=e.blockIdx,i=e.blockTemplatesByBlockType,j=e.compact,C=e.focused,_=e.itemsDBT,Z=e.pipelineType,k=e.project,D=e.searchTextInputRef,M=e.setAddNewBlockMenuOpenIdx,N=e.setFocused,L=e.showBrowseTemplates,U=e.showConfigureProjectModal,ie=e.showGlobalDataProducts,ue=(0,r.useRef)(null),le=(0,r.useRef)(null),ce=(0,r.useRef)(null),ae=(0,r.useRef)(null),se="undefined"!==typeof D?D:ae,de=(0,r.useMemo)((function(){return"AddNewBlocksV2/".concat(o)}),[o]),fe=(0,te.VI)(null,{},[],{uuid:"AddNewBlocksV2/".concat(o)}),pe=(0,u.Z)(fe,1)[0],me=(0,r.useState)(null),he=me[0],ve=me[1],be=(0,r.useState)(!1),ge=be[0],xe=be[1],je=(0,r.useState)(null),Ce=je[0],_e=je[1],Oe=(0,r.useState)(null),Ze=Oe[0],ke=Oe[1],ye=(0,r.useState)(null),Ee=ye[0],Te=ye[1],Ie=(0,r.useCallback)((function(e){Te(e),(0,X.t8)(Y.Ch,e)}),[]);(0,r.useEffect)((function(){if(null===Ee){var e=(0,X.U2)(Y.Ch,!1);Ie(e)}}),[Ie,Ee]);var Ae=(0,r.useMemo)((function(){return"undefined"!==typeof C?C:ge}),[C,ge]),Re=(0,r.useCallback)((function(e){return"undefined"!==typeof N?N(e):xe(e)}),[N,xe]),Se=(0,oe.y)(),Pe=Se.registerOnKeyDown,we=Se.unregisterOnKeyDown;(0,r.useEffect)((function(){return function(){return we(de)}}),[we,de]),null===Pe||void 0===Pe||Pe(de,(function(e,n){var t;Ae&&(n[V.vP]&&(Re(!1),null===se||void 0===se||null===(t=se.current)||void 0===t||t.blur()))}),[Ae,se]);var De=(0,r.useCallback)((function(){return ve(null)}),[]),Me=(0,r.useCallback)((function(e){return null===M||void 0===M?void 0:M((function(n){return null===n||he!==e?o:null}))}),[o,he,M]),Ne=(0,r.useMemo)((function(){var e,n;return null===(e=(0,$.hr)(t,P.tf.DATA_LOADER,Z,{blockTemplatesByBlockType:i,v2:!0}))||void 0===e||null===(n=e.find((function(e){return e.uuid==="".concat(P.tf.DATA_LOADER,"/").concat(P.t6.PYTHON)})))||void 0===n?void 0:n.items}),[t,i,Z]),Be=(0,r.useMemo)((function(){var e,n;return null===(e=(0,$.hr)(t,P.tf.DATA_EXPORTER,Z,{blockTemplatesByBlockType:i,v2:!0}))||void 0===e||null===(n=e.find((function(e){return e.uuid==="".concat(P.tf.DATA_EXPORTER,"/").concat(P.t6.PYTHON)})))||void 0===n?void 0:n.items}),[t,i,Z]),Le=(0,r.useMemo)((function(){var e,n;return null===(e=(0,$.hr)(t,P.tf.TRANSFORMER,Z,{blockTemplatesByBlockType:i,v2:!0}))||void 0===e||null===(n=e.find((function(e){return e.uuid==="".concat(P.tf.TRANSFORMER,"/").concat(P.t6.PYTHON)})))||void 0===n?void 0:n.items}),[t,i,Z]),Ue=(0,r.useMemo)((function(){var e,n;return null===(e=(0,$.hr)(t,P.tf.SENSOR,Z,{blockTemplatesByBlockType:i,v2:!0}))||void 0===e||null===(n=e.find((function(e){return e.uuid==="".concat(P.tf.SENSOR,"/").concat(P.t6.PYTHON)})))||void 0===n?void 0:n.items}),[t,i,Z]),Fe=(0,r.useCallback)((function(e){return[{isGroupingTitle:!0,label:function(){return"SQL"},uuid:"".concat(P.t6.SQL,"/").concat(e,"/group")},{label:function(){return"Base template (generic)"},onClick:function(){t({language:P.t6.SQL,type:e})},uuid:"".concat(P.t6.SQL,"/").concat(e,"/Base template (generic)")},{isGroupingTitle:!0,label:function(){return"R"},uuid:"".concat(P.t6.R,"/").concat(e,"/group")},{label:function(){return"Base template (generic)"},onClick:function(){t({language:P.t6.R,type:e})},uuid:"".concat(P.t6.R,"/").concat(e,"/Base template (generic)")}]}),[t]),Ge=(0,r.useMemo)((function(){return[{beforeIcon:(0,b.jsx)(O.rH,{fill:(0,J.qn)(P.tf.DATA_LOADER).accent,size:F}),items:[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(P.t6.PYTHON).concat(P.tf.DATA_LOADER,"/group")}].concat(Ne).concat(Fe(P.tf.DATA_LOADER)),label:function(){return P.V4[P.tf.DATA_LOADER]},uuid:"".concat(P.tf.DATA_LOADER,"/").concat(P.t6.PYTHON)},{beforeIcon:(0,b.jsx)(O.Sv,{fill:(0,J.qn)(P.tf.TRANSFORMER).accent,size:F}),items:[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(P.t6.PYTHON).concat(P.tf.TRANSFORMER,"/group")}].concat(Le).concat(Fe(P.tf.TRANSFORMER)),label:function(){return P.V4[P.tf.TRANSFORMER]},uuid:"".concat(P.tf.TRANSFORMER,"/").concat(P.t6.PYTHON)},{beforeIcon:(0,b.jsx)(O.zS,{fill:(0,J.qn)(P.tf.DATA_EXPORTER).accent,size:F}),items:[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(P.t6.PYTHON).concat(P.tf.DATA_EXPORTER,"/group")}].concat(Be).concat(Fe(P.tf.DATA_EXPORTER)),label:function(){return P.V4[P.tf.DATA_EXPORTER]},uuid:"".concat(P.tf.DATA_EXPORTER,"/").concat(P.t6.PYTHON)},{beforeIcon:(0,b.jsx)(O.LM,{fill:(0,J.qn)(P.tf.SENSOR).accent,size:F}),items:[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(P.t6.PYTHON).concat(P.tf.SENSOR,"/group")}].concat(Ue),label:function(){return P.V4[P.tf.SENSOR]},uuid:"".concat(P.tf.SENSOR,"/").concat(P.t6.PYTHON)},{beforeIcon:(0,b.jsx)(O.xE,{fill:(0,J.qn)(P.tf.DBT).accent,size:F}),items:_,label:function(){return P.V4[P.tf.DBT]},uuid:P.tf.DBT},{beforeIcon:(0,b.jsx)(O.ie,{size:F}),label:function(){return P.V4[P.tf.GLOBAL_DATA_PRODUCT]},onClick:function(){return ie({addNewBlock:t})},uuid:P.tf.GLOBAL_DATA_PRODUCT},{isGroupingTitle:!0,label:function(){return"Custom templates"},uuid:"custom_templates"},{beforeIcon:(0,b.jsx)(O.zQ,{default:!0,size:F}),label:function(){return"Browse templates"},onClick:function(){return L({addNewBlock:t})},uuid:"browse_templates"},{beforeIcon:(0,b.jsx)(O.o0,{default:!0,size:F}),label:function(){return"Create new template"},onClick:function(){return L({addNew:!0,addNewBlock:t})},uuid:"create_template"}]}),[t,Fe,Be,Ne,_,Ue,Le,L,ie]),He=(0,r.useMemo)((function(){return[{beforeIcon:(0,b.jsx)(O.VS,{default:!0,size:F}),label:function(){return"Python block"},onClick:function(){t({language:P.t6.PYTHON,type:P.tf.CUSTOM})},uuid:"Python"},{beforeIcon:(0,b.jsx)(O.VS,{default:!0,size:F}),label:function(){return"SQL block"},onClick:function(){t({language:P.t6.SQL,type:P.tf.CUSTOM})},uuid:"SQL"},{beforeIcon:(0,b.jsx)(O.VS,{default:!0,size:F}),label:function(){return"R block"},onClick:function(){t({language:P.t6.R,type:P.tf.CUSTOM})},uuid:"R"},{beforeIcon:(0,b.jsx)(E,{default:!0,size:F}),label:function(){return"Scratchpad"},onClick:function(){t({language:P.t6.PYTHON,type:P.tf.SCRATCHPAD})},uuid:"scratchpad"}]}),[t]),ze=(0,l.Db)(S.ZP.search_results.useCreate(),{onSuccess:function(e){return(0,ee.wD)(e,{callback:function(e){var n=e.search_result;ke(n)},onErrorCallback:function(e,n){return pe({errors:n,response:e})}})}}),Qe=(0,u.Z)(ze,1)[0],qe=(0,r.useCallback)((function(e){clearTimeout(ce.current);var n=e.target.value;_e(n),n?ce.current=setTimeout((function(){Qe({search_result:{pipeline_type:Z,query:n,ratio:70,type:y.BLOCK_ACTION_OBJECTS}})}),500):ke(null)}),[Qe,Z,ce]),We=(0,r.useMemo)((function(){return(null===Ze||void 0===Ze?void 0:Ze.results)||[]}),[Ze]),Ke=(0,r.useMemo)((function(){var e=null===Ze||void 0===Ze?void 0:Ze.uuid,n=null===We||void 0===We?void 0:We.map((function(n){return{itemObject:n,searchQueries:[e],value:null===n||void 0===n?void 0:n.uuid}}));if(e){var t={itemObject:{description:e,object_type:a.L.GENERATE_BLOCK,title:"Generate block using AI (beta)"},searchQueries:[e],value:"generate_block"};Ee?n.push(t):n.unshift(t)}return n}),[We,Ze,Ee]),Ve=(0,r.useMemo)((function(){return(0,b.jsx)(Q,{compact:j,onClick:function(){var e;return null===se||void 0===se||null===(e=se.current)||void 0===e?void 0:e.focus()}})}),[j,se]),Ye=(0,r.useMemo)((function(){return!(null===k||void 0===k||!k.openai_api_key)}),[k]);return(0,b.jsx)(d.Z,{onClickOutside:De,open:!0,children:(0,b.jsx)(G,{compact:j,focused:Ae,children:(0,b.jsxs)(p.ZP,{alignItems:"center",children:[(0,b.jsx)(z,{compact:j,increasedZIndex:0===he,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:Ge,onClickCallback:De,open:0===he,parentRef:ue,uuid:"button_templates",children:(0,b.jsx)(R.Z,{block:!0,label:"Add a block from a template",size:null,widthFitContent:!0,children:(0,b.jsx)(s.Z,{beforeIcon:(0,b.jsx)(O.zQ,{secondary:0===he,size:F}),noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){e.preventDefault(),ve((function(e){return 0===e?null:0})),Me(0)},children:"Templates"})})})}),(0,b.jsx)(T.Z,{mr:3}),(0,b.jsx)(z,{compact:j,increasedZIndex:1===he,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:He,onClickCallback:De,open:1===he,parentRef:le,uuid:"button_custom",children:(0,b.jsx)(R.Z,{block:!0,label:"Add a blank custom block or scratchpad block",size:null,widthFitContent:!0,children:(0,b.jsx)(s.Z,{beforeIcon:(0,b.jsx)(O.cW,{secondary:1===he,size:F}),noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){e.preventDefault(),ve((function(e){return 1===e?null:1})),Me(1)},children:"Custom"})})})}),(0,b.jsx)(T.Z,{mr:3}),(0,b.jsx)(z,{compact:j,increasedZIndex:0===he,children:(0,b.jsx)(R.Z,{block:!0,label:"Add a markdown block for documentation",size:null,widthFitContent:!0,children:(0,b.jsx)(s.Z,{beforeIcon:(0,b.jsx)(g,{size:F}),noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){e.preventDefault(),t({language:P.t6.MARKDOWN,type:P.tf.MARKDOWN})},children:"Markdown"})})}),(0,b.jsx)(T.Z,{mr:3}),(0,b.jsx)(H,{}),(0,b.jsx)(T.Z,{mr:3}),(0,b.jsxs)(q,{children:[Ve,(0,b.jsxs)(p.ZP,{alignItems:"center",fullWidth:!0,children:[(0,b.jsx)(A.Z,{fullWidth:!0,noBackground:!0,noBorder:!0,onBlur:function(){return setTimeout((function(){return Re(!1)}),150)},onChange:qe,onFocus:function(){return Re(!0)},paddingHorizontal:0,paddingVertical:0,placeholder:"Search for a block...",ref:se,value:Ce||""}),(0,b.jsx)(h.Z,{addPlusSignBetweenKeys:!0,disabled:!0,keyTextGroups:[[V.RJ,V.ZS]]})]}),Ve,(0,b.jsx)(W,{topOffset:(null===se||void 0===se||null===(n=se.current)||void 0===n?void 0:n.getBoundingClientRect().height)+(j?1.5*B.iI:2.5*B.iI),children:(0,b.jsx)(c.Z,{itemGroups:[{items:Ae?Ke:[],renderItem:function(e,n){var t=e.itemObject,o=t.block_type,i=t.description,r=t.language,u=t.object_type,l=t.title,c={fill:(0,J.qn)(o).accent,size:F},s=w.iK[o],d=a.L.GENERATE_BLOCK===u;d&&(s=O.xq,c.default=!1,c.fill=null,c.warning=!0);var p="".concat(l).concat(i?": "+i:"").slice(0,80);return(0,b.jsxs)(K,re(re({},n),{},{onClick:function(e){var t;(0,ne.j)(e),null===n||void 0===n||null===(t=n.onClick)||void 0===t||t.call(n,e)},children:[(0,b.jsxs)(f.Z,{alignItems:"center",flex:1,children:[s&&(0,b.jsx)(s,re({default:!(null!==c&&void 0!==c&&c.fill)},c)),(0,b.jsx)(T.Z,{mr:2}),(0,b.jsx)(I.ZP,{default:!0,overflowWrap:!0,textOverflow:!0,children:p})]}),(0,b.jsx)(T.Z,{mr:1}),(0,b.jsx)(I.ZP,{monospace:!0,muted:!0,uppercase:!0,children:d?"AI":P.dO[r]}),(0,b.jsx)(T.Z,{mr:1}),a.L.BLOCK_FILE===u&&(0,b.jsx)(O.$B,{muted:!0,size:F}),a.L.CUSTOM_BLOCK_TEMPLATE===u&&(0,b.jsx)(O.zQ,{muted:!0,size:F}),a.L.MAGE_TEMPLATE===u&&(0,b.jsx)(O.m1,{muted:!0,size:F}),d&&Ye&&(0,b.jsx)(O.xq,{muted:!0,size:F}),d&&!Ye&&(0,b.jsx)(O.uy,{muted:!0,size:F})]}))}}],onSelectItem:function(e){var n=e.itemObject,o=n.object_type;a.L.GENERATE_BLOCK!==o||Ye?(t({block_action_object:n,require_unique_name:!1}),_e(null),ke(null)):null===U||void 0===U||U({cancelButtonText:"Set this up later",header:(0,b.jsx)(T.Z,{mb:B.HN,children:(0,b.jsxs)(x.Z,{children:[(0,b.jsx)(I.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate blocks using AI."}),(0,b.jsx)(T.Z,{mt:1,children:(0,b.jsxs)(I.ZP,{warning:!0,children:["Read ",(0,b.jsx)(v.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI\u2019s documentation"})," to get your API key."]})})]})}),onCancel:function(){Ie(!0)},onSaveSuccess:function(e){null!==e&&void 0!==e&&e.openai_api_key&&(t({block_action_object:n}),_e(null),ke(null))}})},uuid:de})})]})]})})})};var le=function(e){var n=e.size;return(0,b.jsx)("svg",{fill:"none",height:n,preserveAspectRatio:"xMidYMid",viewBox:"0 0 256 256",width:n,xmlns:"http://www.w3.org/2000/svg",children:(0,b.jsx)("path",{d:"M245.121138,10.6473813 C251.139129,16.4340053 255.074133,24.0723342 256,32.4050489 C256,35.8769778 255.074133,38.1917867 252.990862,42.5895822 C250.907876,46.9873778 225.215147,91.4286933 217.57696,103.696213 C213.179164,110.871609 210.864356,119.435947 210.864356,127.768462 C210.864356,136.3328 213.179164,144.6656 217.57696,151.840996 C225.215147,164.108516 250.907876,208.781084 252.990862,213.179164 C255.074133,217.57696 256,219.659947 256,223.131876 C255.074133,231.464676 251.370667,239.103147 245.352676,244.658347 C239.565938,250.676338 231.927751,254.611342 223.826489,255.305671 C220.35456,255.305671 218.039751,254.379804 213.873493,252.296533 C209.706951,250.213262 164.340053,225.215147 152.072249,217.57696 C151.146382,217.113884 150.220516,216.419556 149.063396,215.95648 L88.4195556,180.079502 C89.8082133,191.652693 94.9006222,202.763093 103.233138,210.864356 C104.853618,212.484551 106.473813,213.873493 108.325547,215.262151 C106.936604,215.95648 105.316409,216.651093 103.927751,217.57696 C91.6599467,225.215147 46.9873778,250.907876 42.5895822,252.990862 C38.1917867,255.074133 36.1085156,256 32.4050489,256 C24.0723342,255.074133 16.4340053,251.370667 10.8788338,245.352676 C4.86075733,239.565938 0.925858133,231.927751 0,223.594951 C0.231464676,220.123022 1.1573248,216.651093 3.00905244,213.641956 C5.09223822,209.24416 30.7848533,164.571307 38.42304,152.303787 C42.82112,145.128391 45.1356444,136.795591 45.1356444,128.231538 C45.1356444,119.6672 42.82112,111.3344 38.42304,104.159004 C30.7848533,91.4286933 4.86075733,46.75584 3.00905244,42.3580444 C1.1573248,39.3489067 0.231464676,35.8769778 0,32.4050489 C0.925858133,24.0723342 4.62930489,16.4340053 10.6473813,10.6473813 C16.4340053,4.62930489 24.0723342,0.925858133 32.4050489,0 C35.8769778,0.231464676 39.3489067,1.1573248 42.5895822,3.00905244 C46.2930489,4.62930489 78.9293511,23.6094009 96.28928,33.7939911 L100.224284,36.1085156 C101.612942,37.0343822 102.770347,37.7287111 103.696213,38.1917867 L105.547947,39.3489067 L167.348907,75.9204978 C165.960249,62.0324978 158.784853,49.3019022 147.674453,40.7378489 C149.063396,40.04352 150.683591,39.3489067 152.072249,38.42304 C164.340053,30.7848533 209.012622,4.86075733 213.410418,3.00905244 C216.419556,1.1573248 219.891484,0.231464676 223.594951,0 C231.696213,0.925858133 239.334684,4.62930489 245.121138,10.6473813 Z M131.240391,144.434062 L144.434062,131.240391 C146.285796,129.388658 146.285796,126.611342 144.434062,124.759609 L131.240391,111.565938 C129.388658,109.714204 126.611342,109.714204 124.759609,111.565938 L111.565938,124.759609 C109.714204,126.611342 109.714204,129.388658 111.565938,131.240391 L124.759609,144.434062 C126.379804,146.054258 129.388658,146.054258 131.240391,144.434062 Z",fill:"#FF694A"})})},ce=t(11135),ae=t(98781),se=t(46336),de=t(80906),fe=t(19140),pe=t(88859);function me(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function he(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?me(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):me(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ve=function(e){var n=e.addNewBlock,t=e.blockIdx,o=e.blockTemplates,u=e.compact,l=e.focusedAddNewBlockSearch,c=e.hideCustom,a=e.hideDataExporter,s=(e.hideDataLoader,e.hideDbt),f=e.hideMarkdown,h=e.hideScratchpad,v=e.hideSensor,g=e.hideTransformer,x=e.hideTransformerDataSources,j=e.onClickAddSingleDBTModel,C=e.pipeline,_=e.project,Z=e.searchTextInputRef,k=e.setAddNewBlockMenuOpenIdx,y=e.setCreatingNewDBTModel,E=e.setFocusedAddNewBlockSearch,T=e.showBrowseTemplates,I=e.showConfigureProjectModal,A=e.showGlobalDataProducts,S=(0,r.useState)(null),w=S[0],D=S[1],M=(0,r.useRef)(null),N=(0,r.useRef)(null),L=(0,r.useRef)(null),U=(0,r.useRef)(null),F=(0,r.useRef)(null),G=(0,r.useRef)(null),H=(0,r.useRef)(null),z={compact:u,inline:!0},Q=null===C||void 0===C?void 0:C.type,q=Q===ae.qL.STREAMING,W=u?fe.ZG/2:fe.ZG,K=25*B.iI,V=(0,r.useMemo)((function(){return(0,$.q_)(pe.c1,de.qs.COLUMN,n)}),[n]),Y=(0,r.useMemo)((function(){return(0,$.q_)(pe.Wt,de.qs.ROW,n)}),[n]),X=(0,r.useMemo)((function(){var e=[{label:function(){return"Generic (no template)"},onClick:function(){n({language:P.t6.PYTHON,type:P.tf.TRANSFORMER})},uuid:"generic_transformer_action"},{bold:!0,items:Y,label:function(){return"Row actions"},uuid:"row_actions_grouping"},{isGroupingTitle:!0,label:function(){return"Column actions"},uuid:"column_actions_grouping"}].concat((0,i.Z)(V));return x||e.splice(1,0,{bold:!0,items:(0,$.hr)(n,P.tf.TRANSFORMER,Q),label:function(){return"Data sources"},uuid:"data_sources_grouping"}),e}),[n,V,x,Q,Y]),J=(0,r.useCallback)((function(){return D(null)}),[]),ee=(0,r.useCallback)((function(e){return null===k||void 0===k?void 0:k((function(n){return null===n||w!==e?t:null}))}),[t,w,k]),ne=ae.qL.PYSPARK===Q,te=(0,r.useMemo)((function(){return(0,$.oM)(o,n)}),[n,o]),oe=(0,r.useMemo)((function(){return(0,$.hr)(n,P.tf.DATA_LOADER,Q,{blockTemplatesByBlockType:te,showBrowseTemplates:T})}),[n,te,Q,T]),ie=(0,r.useMemo)((function(){return(0,$.hr)(n,P.tf.DATA_EXPORTER,Q,{blockTemplatesByBlockType:te,showBrowseTemplates:T})}),[n,te,Q,T]),re=(0,r.useMemo)((function(){return ne||ae.qL.INTEGRATION===Q?X:q?[{items:(0,$.hr)(n,P.tf.TRANSFORMER,Q),label:function(){return"Python"},uuid:"transformers/python"}].concat((0,i.Z)((0,$.hr)(n,P.tf.TRANSFORMER,Q,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T}))):[{items:X,label:function(){return"Python"},uuid:"transformers/python_all"}].concat((0,i.Z)((0,$.qs)(n,P.tf.TRANSFORMER)),(0,i.Z)((0,$.hr)(n,P.tf.TRANSFORMER,Q,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T})))}),[n,X,te,ne,q,Q,T]),me=(0,r.useMemo)((function(){return[{label:function(){return"New model"},onClick:function(){null===y||void 0===y||y(!0),null===j||void 0===j||j(t)},uuid:"dbt/new_model"},{label:function(){return"Single model or snapshot (from file)"},onClick:function(){return null===j||void 0===j?void 0:j(t)},uuid:"dbt/single_model"},{label:function(){return"All models (w/ optional exclusion)"},onClick:function(){return n({configuration:{dbt:{command:"run"}},language:P.t6.YAML,type:P.tf.DBT})},uuid:"dbt/all_models"},{label:function(){return"Generic dbt command"},onClick:function(){return n({configuration:{dbt:{command:null}},language:P.t6.YAML,type:P.tf.DBT})},uuid:"dbt/generic_command"}]}),[n,t,j,y]);return(0,r.useMemo)((function(){var e;return ae.qL.PYTHON===Q&&!ne&&(null===_||void 0===_||null===(e=_.features)||void 0===e?void 0:e[se.d.ADD_NEW_BLOCK_V2])}),[ne,Q,_])?(0,b.jsx)(ue,{addNewBlock:n,blockIdx:t,blockTemplatesByBlockType:te,compact:u,focused:l,itemsDBT:me,pipelineType:Q,project:_,searchTextInputRef:Z,setAddNewBlockMenuOpenIdx:k,setFocused:E,showBrowseTemplates:T,showConfigureProjectModal:I,showGlobalDataProducts:A}):(0,b.jsx)(p.ZP,{flexWrap:"wrap",inline:!0,children:(0,b.jsx)(d.Z,{onClickOutside:J,open:!0,children:(0,b.jsxs)(p.ZP,{flexWrap:"wrap",children:[!a&&(0,b.jsx)(fe.W4,{increasedZIndex:0===w,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:oe,onClickCallback:J,open:0===w,parentRef:M,uuid:"data_loader_button",children:(0,b.jsx)(ce.ZP,he(he({},z),{},{beforeElement:(0,b.jsx)(fe.Wx,{blue:!0,compact:u,children:(0,b.jsx)(O.mm,{size:W})}),onClick:function(e){e.preventDefault(),D((function(e){return 0===e?null:0})),ee(0)},uuid:"AddNewBlocks/Data_loader",children:"Data loader"}))})}),!g&&(0,b.jsx)(fe.W4,{increasedZIndex:1===w,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:re,onClickCallback:J,open:1===w,parentRef:N,uuid:"transformer_button",children:(0,b.jsx)(ce.ZP,he(he({},z),{},{beforeElement:(0,b.jsx)(fe.Wx,{compact:u,purple:!0,children:(0,b.jsx)(O.mm,{size:W})}),onClick:function(e){e.preventDefault(),D((function(e){return 1===e?null:1})),ee(1)},uuid:"AddNewBlocks/Transformer",children:"Transformer"}))})}),!a&&(0,b.jsx)(fe.W4,{increasedZIndex:2===w,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:ie,onClickCallback:J,open:2===w,parentRef:L,uuid:"data_exporter_button",children:(0,b.jsx)(ce.ZP,he(he({},z),{},{beforeElement:(0,b.jsx)(fe.Wx,{compact:u,yellow:!0,children:(0,b.jsx)(O.mm,{inverted:!0,size:W})}),onClick:function(e){e.preventDefault(),D((function(e){return 2===e?null:2})),ee(2)},uuid:"AddNewBlocks/Data_exporter",children:"Data exporter"}))})}),!s&&(0,b.jsx)(fe.W4,{increasedZIndex:3===w,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:[].concat((0,i.Z)(me),(0,i.Z)((0,$.hr)(n,P.tf.DBT,Q,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T}))),onClickCallback:J,open:3===w,parentRef:U,uuid:"dbt_button",children:(0,b.jsx)(ce.ZP,he(he({},z),{},{beforeElement:(0,b.jsx)(le,{size:fe.ZG*(u?.75:1.25)}),onClick:function(e){e.preventDefault(),D((function(e){return 3===e?null:3})),ee(3)},uuid:"AddNewBlocks/DBT",children:"DBT model"}))})}),!c&&(0,b.jsx)(fe.W4,{increasedZIndex:4===w,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:[{items:(0,$.Bd)(n,P.tf.CUSTOM,P.t6.PYTHON),label:function(){return"Python"},uuid:"custom_block_python"},{items:(0,$.Bd)(n,P.tf.CUSTOM,P.t6.SQL),label:function(){return"SQL"},uuid:"custom_block_sql"}].concat((0,i.Z)((0,$.hr)(n,P.tf.CUSTOM,Q,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T}))),onClickCallback:J,open:4===w,parentRef:F,uuid:"custom_block_button",children:(0,b.jsx)(R.Z,{block:!0,label:"Add a custom code block with a designated color.",maxWidth:K,size:null,children:(0,b.jsx)(ce.ZP,he(he({},z),{},{beforeElement:(0,b.jsx)(fe.Wx,{compact:u,grey:!0,children:(0,b.jsx)(O.mm,{inverted:!0,size:W})}),onClick:function(e){e.preventDefault(),D((function(e){return 4===e?null:4})),ee(4)},uuid:"AddNewBlocks/Scratchpad",children:"Custom"}))})})}),!h&&(0,b.jsx)(fe.W4,{children:(0,b.jsx)(R.Z,{block:!0,label:"Write experimental code that doesn\u2019t get executed when you run your pipeline.",maxWidth:K,size:null,children:(0,b.jsx)(ce.ZP,he(he({},z),{},{beforeElement:(0,b.jsx)(fe.Wx,{border:!0,compact:u,children:(0,b.jsx)(O.mm,{size:W})}),onClick:function(e){e.preventDefault(),n({type:P.tf.SCRATCHPAD})},uuid:"AddNewBlocks/Scratchpad",children:"Scratchpad"}))})}),!h&&(0,b.jsx)(fe.W4,{children:(0,b.jsx)(R.Z,{block:!0,label:"Add a global data product block",maxWidth:K,size:null,children:(0,b.jsx)(ce.ZP,he(he({},z),{},{beforeElement:(0,b.jsx)(fe.Wx,{compact:u,children:(0,b.jsx)(O.ie,{size:W})}),onClick:function(e){e.preventDefault(),A({addNewBlock:n})},uuid:"AddNewBlocks/GlobalDataProducts",children:"Global data product"}))})}),!q&&!v&&(0,b.jsx)(fe.W4,{increasedZIndex:6===w,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:[].concat((0,i.Z)((0,$.hr)(n,P.tf.SENSOR,Q)),(0,i.Z)((0,$.hr)(n,P.tf.SENSOR,Q,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T}))),onClickCallback:J,open:6===w,parentRef:G,uuid:"sensor_button",children:(0,b.jsx)(ce.ZP,he(he({},z),{},{beforeElement:(0,b.jsx)(fe.Wx,{compact:u,children:(0,b.jsx)(O.LM,{pink:!0,size:fe.ZG*(u?.75:1.25)})}),onClick:function(e){e.preventDefault(),D((function(e){return 6===e?null:6})),ee(6)},uuid:"AddNewBlocks/Sensor",children:"Sensor"}))})}),!f&&(0,b.jsx)(fe.W4,{increasedZIndex:7===w,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:[{label:function(){return"Generic (no template)"},onClick:function(){n({language:P.t6.MARKDOWN,type:P.tf.MARKDOWN})},uuid:"generic_markdown"}].concat((0,i.Z)((0,$.hr)(n,P.tf.MARKDOWN,Q,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T}))),onClickCallback:J,open:7===w,parentRef:H,uuid:"markdown_button",children:(0,b.jsx)(ce.ZP,he(he({},z),{},{beforeElement:(0,b.jsx)(fe.Wx,{compact:u,sky:!0,children:(0,b.jsx)(O.mm,{inverted:!0,size:W})}),onClick:function(e){e.preventDefault(),D((function(e){return 7===e?null:7})),ee(7)},uuid:"AddNewBlocks/Markdown",children:"Markdown"}))})})]})})})}},84212:function(e,n,t){t.d(n,{Bd:function(){return k},SF:function(){return y},X7:function(){return E},hr:function(){return _},oM:function(){return C},q_:function(){return Z},qs:function(){return j}});var o=t(21831),i=t(82394),r=t(67971),u=t(19711),l=t(88859),c=t(22341),a=t(86422),s=t(31524),d=t(98781),f=t(90211),p=t(44162),m=t(24224),h=t(28598);function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var b=function(e,n,t){var o=t===d.qL.STREAMING&&(e===a.tf.DATA_LOADER||e===a.tf.DATA_EXPORTER);return(function(e){var n;return e===d.qL.STREAMING?(n={},(0,i.Z)(n,a.tf.DATA_LOADER,[s.ZP.AMAZON_SQS,s.ZP.AZURE_EVENT_HUB,s.ZP.GOOGLE_CLOUD_PUBSUB,s.ZP.KAFKA,s.ZP.KINESIS,s.ZP.RABBITMQ]),(0,i.Z)(n,a.tf.DATA_EXPORTER,[s.ZP.AZURE_DATA_LAKE,s.ZP.DUMMY,s.ZP.S3,s.ZP.KAFKA,s.ZP.KINESIS,s.ZP.MONGODB,s.ZP.OPENSEARCH,s.ZP.ELASTICSEARCH]),(0,i.Z)(n,a.tf.TRANSFORMER,[s.ZP.GENERIC]),n):s.cp}(t)[e]||[]).map((function(t){return{indent:e===a.tf.TRANSFORMER,label:function(){return s.MV[t]},onClick:function(){n({config:{data_source:t===s.ZP.GENERIC?null:t},language:o?a.t6.YAML:a.t6.PYTHON,type:e})},uuid:"".concat(e,"/").concat(t)}}))};function g(e,n){return{label:function(){return"SQL"},onClick:function(){return e({language:a.t6.SQL,type:n})},uuid:"".concat(n,"/sql")}}function x(e,n){return{label:function(){return"R"},onClick:function(){return e({language:a.t6.R,type:n})},uuid:"".concat(n,"/r")}}var j=function(e,n){return[g(e,n),x(e,n)]};function C(e,n){var t={};return null===e||void 0===e||e.forEach((function(e){var o=e.block_type,r=e.description,u=e.groups,l=e.language,c=e.name,a=e.path,s=e.template_variables;t[o]||(t[o]={}),t[o][l]||(t[o][l]={items:[],label:function(){return l},uuid:"".concat(o,"/").concat(l)});var d={label:function(){return c},onClick:function(){return n({config:{template_path:a,template_variables:s},language:l,type:o})},tooltip:function(){return r},uuid:a};if((null===u||void 0===u?void 0:u.length)>=1){var f=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({},t[o][l]),p=[null],m=[f];u.forEach((function(e,n){var t="".concat(o,"/").concat(l,"/").concat(u.slice(0,n+1).join("/")),i=m[n],r=i.items.findIndex((function(e){var n=e.uuid;return t===n})),c=r>=0?i.items[r]:null;c||(c={items:[],label:function(){return e},uuid:t}),p.push(r),m.push(c)})),p.push(-1),m.push(d);var h=m.length;t[o][l]=m.reduce((function(e,n,t){var o=h-t,i=m[o-2],r=m[o-1],u=p[o-1];return i?(u>=0?i.items[u]=r:i.items.push(r),i):r}),{})}else t[o][l].items.push(d)})),t}var _=function(e,n,t,o){var i=o||{},r=i.blockTemplatesByBlockType,u=i.languages,l=i.onlyCustomTemplate,c=i.showBrowseTemplates,s={};null!==o&&void 0!==o&&o.v2||(s=Object.fromEntries(a.Ut.map((function(n){return[n,b(n,e,t)]}))));var f={label:function(){return"Custom template"},onClick:function(){return c({addNewBlock:e,blockType:n,language:a.t6.SQL})},uuid:"".concat(n,"/custom_template")};if(l)return[f];if(t===d.qL.PYSPARK||t===d.qL.STREAMING)return s[n];var p,h,v=(null===r||void 0===r||null===(p=r[n])||void 0===p||null===(h=p[a.t6.PYTHON])||void 0===h?void 0:h.items)||[],j=[{items:(0,m.YC)((s[n]||[]).concat(v),(function(e){return(0,e.label)()})),label:function(){return"Python"},uuid:"".concat(n,"/").concat(a.t6.PYTHON)}];return(!u||null!==u&&void 0!==u&&u.includes(a.t6.SQL))&&j.push(g(e,n)),(!u||null!==u&&void 0!==u&&u.includes(a.t6.R))&&j.push(x(e,n)),![a.tf.MARKDOWN,a.tf.SCRATCHPAD].includes(n)&&c&&j.push(f),j};function O(e,n,t){return e.map((function(e){return{indent:!0,label:function(){return l.NX[n][e]},onClick:function(){t({config:{action_type:e,axis:n},language:a.t6.PYTHON,type:a.tf.TRANSFORMER})},uuid:"".concat(n,"_").concat(e)}})).sort((function(e,n){return e.label().localeCompare(n.label())}))}function Z(e,n,t){var i=[];return e.forEach((function(e){if(e!==l._G.MISC)i.push({indent:!0,items:O(l.d9[n][e],n,t),label:function(){return e},uuid:"".concat(n,"_grouping_").concat((0,f.RA)(e))});else{var r=O(l.d9[n][e],n,t);i.push.apply(i,(0,o.Z)(r))}})),i}var k=function(e,n,t){return Object.values(a.Lq).map((function(o){return{label:function(){return(0,h.jsxs)(r.ZP,{alignItems:"center",children:[(0,h.jsx)(c.mm,{fill:(0,p.qn)(a.tf.CUSTOM,{blockColor:o}).accent,size:16}),"\xa0",(0,h.jsx)(u.ZP,{children:(0,f.kC)(o)})]})},leftAligned:!0,onClick:function(){e({color:o,language:t,type:n})},uuid:"".concat(t,"_").concat(o)}}))},y=function(e){return"-- Docs: https://docs.mage.ai/guides/sql-blocks\n"+(e||"")};function E(e,n){var t=n;return a.tf.SCRATCHPAD===e.type&&(t='"""\nNOTE: Scratchpad blocks are used only for experimentation and testing out code.\nThe code written here will not be executed as part of the pipeline.\n"""\n'+(n||"")),t}},43482:function(e,n,t){t.d(n,{Dp:function(){return p},OF:function(){return m},Q9:function(){return v},Rt:function(){return s},h8:function(){return h},k1:function(){return d},uS:function(){return b}});var o=t(21831),i=t(82394),r=t(91427),u=t(24224),l=t(90211);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}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}function s(e){var n={},t={};return null===e||void 0===e||e.forEach((function(e){var o=e.content,i=e.outputs,r=e.type,u=e.uuid;(null===i||void 0===i?void 0:i.length)>=1&&(n[u]=i.map((function(e){var n=e||{},t=n.sample_data,o=n.shape,i=n.text_data,r=n.type;return t?{data:a({shape:o},t),type:r}:i&&(0,l.Pb)(i)?JSON.parse(i):i}))),t[r]||(t[r]={}),t[r][u]=o})),{content:t,messages:n}}function d(e,n,t){e.forEach((function(e){(0,r.t8)("".concat(t,"/").concat(e.uuid,"/codeCollapsed"),(0,r.Od)("".concat(n,"/").concat(e.uuid,"/codeCollapsed"))),(0,r.t8)("".concat(t,"/").concat(e.uuid,"/outputCollapsed"),(0,r.Od)("".concat(n,"/").concat(e.uuid,"/outputCollapsed")))}))}function f(e){return"".concat(e,"/").concat(r.kP)}function p(e){return(0,r.U2)(f(e),[])}function m(e,n){var t=p(e);t.includes(n)||(0,r.t8)(f(e),[].concat((0,o.Z)(t),[n]))}function h(e,n){var t=p(e).filter((function(e){return e!==n}));(0,r.t8)(f(e),t)}function v(e,n){var t=(0,u.HK)(n,(function(e){return e.uuid}));return e.map((function(e){return t[e]})).filter((function(e){return!!e}))}var b=function(e,n){var t=window.URL.createObjectURL(e),o=document.createElement("a");o.href=t,o.download=n,document.body.appendChild(o),o.click(),o.remove()}},80906:function(e,n,t){var o,i,r,u;t.d(n,{Q0:function(){return o},qs:function(){return i}}),function(e){e.ADD="add",e.AVERAGE="average",e.CLEAN_COLUMN_NAME="clean_column_name",e.COUNT="count",e.COUNT_DISTINCT="count_distinct",e.CUSTOM="custom",e.DIFF="diff",e.DROP_DUPLICATE="drop_duplicate",e.EXPAND_COLUMN="expand_column",e.EXPLODE="explode",e.FILTER="filter",e.FIRST="first",e.FIX_SYNTAX_ERRORS="fix_syntax_errors",e.GROUP="group",e.IMPUTE="impute",e.JOIN="join",e.LAST="last",e.LIMIT="limit",e.MAX="max",e.MEDIAN="median",e.MIN="min",e.MODE="mode",e.NORMALIZE="normalize",e.REFORMAT="reformat",e.REMOVE="remove",e.REMOVE_OUTLIERS="remove_outliers",e.SCALE="scale",e.SELECT="select",e.SHIFT_DOWN="shift_down",e.SHIFT_UP="shift_up",e.SORT="sort",e.STANDARDIZE="standardize",e.SUM="sum",e.UNION="union",e.UPDATE_TYPE="update_type",e.UPDATE_VALUE="update_value"}(o||(o={})),function(e){e.COLUMN="column",e.ROW="row"}(i||(i={})),function(e){e.NOT_APPLIED="not_applied",e.COMPLETED="completed"}(r||(r={})),function(e){e.FEATURE="feature"}(u||(u={}))},45419:function(e,n,t){var o;t.d(n,{Q:function(){return o}}),function(e){e.CALLBACK="callbacks",e.CONDITIONAL="conditionals"}(o||(o={}))},72470:function(e,n,t){var o;t.d(n,{L:function(){return o}}),function(e){e.BLOCK_FILE="block_file",e.CUSTOM_BLOCK_TEMPLATE="custom_block_template",e.GENERATE_BLOCK="generate_block",e.MAGE_TEMPLATE="mage_template"}(o||(o={}))},42451:function(e,n,t){t.d(n,{$1:function(){return v},BD:function(){return j},CK:function(){return D},ED:function(){return c},JJ:function(){return l},JT:function(){return P},MP:function(){return M},Mi:function(){return I},Mv:function(){return _},PG:function(){return s},Pi:function(){return A},R8:function(){return r},Sv:function(){return g},Tv:function(){return S},Yf:function(){return E},Yg:function(){return f},a3:function(){return m},aE:function(){return N},aZ:function(){return T},bE:function(){return d},bk:function(){return y},bn:function(){return B},c0:function(){return L},cH:function(){return b},e:function(){return a},eN:function(){return u},eW:function(){return O},m$:function(){return C},m7:function(){return i},mW:function(){return k},nq:function(){return Z},oV:function(){return o},pA:function(){return R},rj:function(){return h},sc:function(){return x},v8:function(){return p}});var o,i="buckets",r="chart_style",u="group_by",l="height",c="index",a="legend_labels",s="limit",d="metrics",f="time_interval",p="width_percentage",m="x",h="y",v="y_sort_order",b="data_provider",g="data_provider_database",x="data_provider_profile",j="data_provider_schema",C="data_provider_table",_="dbt_profile_target",O="dbt_project_name",Z="export_write_policy",k="limit",y="unique_upstream_table_name",E="upstream_block_configuration",T="table_name",I="use_raw_sql",A="dbt",R="command",S=[m,h];!function(e){e.BAR_CHART="bar chart",e.HISTOGRAM="histogram",e.LINE_CHART="line chart",e.PIE_CHART="pie chart",e.TABLE="table",e.TIME_SERIES_BAR_CHART="time series bar chart",e.TIME_SERIES_LINE_CHART="time series line chart"}(o||(o={}));var P,w,D=[o.BAR_CHART,o.HISTOGRAM,o.LINE_CHART,o.PIE_CHART,o.TABLE,o.TIME_SERIES_BAR_CHART,o.TIME_SERIES_LINE_CHART];!function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(P||(P={})),function(e){e.AVERAGE="average",e.COUNT="count",e.COUNT_DISTINCT="count_distinct",e.MAX="max",e.MEDIAN="median",e.MIN="min",e.MODE="mode",e.SUM="sum"}(w||(w={}));var M,N,B=[w.AVERAGE,w.COUNT,w.COUNT_DISTINCT,w.MAX,w.MEDIAN,w.MIN,w.MODE,w.SUM];function L(e){return"".concat(e.aggregation,"(").concat(e.column,")")}!function(e){e.ASCENDING="ascending",e.DESCENDING="descending"}(M||(M={})),function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.MONTH="month",e.ORIGINAL="original",e.SECOND="second",e.WEEK="week",e.YEAR="year"}(N||(N={}))},18908:function(e,n,t){t.d(n,{R:function(){return i},Z:function(){return o}});var o="blocks",i="pipelines"},31524:function(e,n,t){t.d(n,{MV:function(){return c},cp:function(){return a},zJ:function(){return r}});var o,i,r,u=t(82394),l=t(86422);!function(e){e.AMAZON_SQS="amazon_sqs",e.API="api",e.AZURE_BLOB_STORAGE="azure_blob_storage",e.AZURE_DATA_LAKE="azure_data_lake",e.AZURE_EVENT_HUB="azure_event_hub",e.BIGQUERY="bigquery",e.DRUID="druid",e.DUMMY="dummy",e.FILE="file",e.GENERIC="generic",e.GOOGLE_CLOUD_PUBSUB="google_cloud_pubsub",e.GOOGLE_CLOUD_STORAGE="google_cloud_storage",e.KAFKA="kafka",e.KINESIS="kinesis",e.MONGODB="mongodb",e.MYSQL="mysql",e.OPENSEARCH="opensearch",e.ORACLEDB="oracledb",e.POSTGRES="postgres",e.RABBITMQ="rabbitmq",e.REDSHIFT="redshift",e.S3="s3",e.SNOWFLAKE="snowflake",e.ELASTICSEARCH="elasticsearch"}(r||(r={}));var c=(o={},(0,u.Z)(o,r.AMAZON_SQS,"Amazon SQS"),(0,u.Z)(o,r.API,"API"),(0,u.Z)(o,r.AZURE_BLOB_STORAGE,"Azure Blob Storage"),(0,u.Z)(o,r.AZURE_DATA_LAKE,"Azure Data Lake"),(0,u.Z)(o,r.AZURE_EVENT_HUB,"Azure Event Hub"),(0,u.Z)(o,r.BIGQUERY,"Google BigQuery"),(0,u.Z)(o,r.DRUID,"Druid"),(0,u.Z)(o,r.DUMMY,"Dummy"),(0,u.Z)(o,r.FILE,"Local file"),(0,u.Z)(o,r.GENERIC,"Generic (no template)"),(0,u.Z)(o,r.GOOGLE_CLOUD_PUBSUB,"Google Cloud PubSub"),(0,u.Z)(o,r.GOOGLE_CLOUD_STORAGE,"Google Cloud Storage"),(0,u.Z)(o,r.KAFKA,"Kafka"),(0,u.Z)(o,r.KINESIS,"Kinesis"),(0,u.Z)(o,r.MONGODB,"MongoDB"),(0,u.Z)(o,r.MYSQL,"MySQL"),(0,u.Z)(o,r.OPENSEARCH,"OpenSearch"),(0,u.Z)(o,r.ORACLEDB,"OracleDB"),(0,u.Z)(o,r.POSTGRES,"PostgreSQL"),(0,u.Z)(o,r.RABBITMQ,"RabbitMQ"),(0,u.Z)(o,r.REDSHIFT,"Amazon Redshift"),(0,u.Z)(o,r.S3,"Amazon S3"),(0,u.Z)(o,r.SNOWFLAKE,"Snowflake"),(0,u.Z)(o,r.ELASTICSEARCH,"ElasticSearch"),o),a=(i={},(0,u.Z)(i,l.tf.DATA_LOADER,[r.GENERIC,r.FILE,r.API,r.AZURE_BLOB_STORAGE,r.BIGQUERY,r.DRUID,r.GOOGLE_CLOUD_STORAGE,r.MYSQL,r.ORACLEDB,r.POSTGRES,r.REDSHIFT,r.S3,r.SNOWFLAKE]),(0,u.Z)(i,l.tf.DATA_EXPORTER,[r.GENERIC,r.FILE,r.S3,r.AZURE_BLOB_STORAGE,r.GOOGLE_CLOUD_STORAGE,r.REDSHIFT,r.BIGQUERY,r.SNOWFLAKE,r.MYSQL,r.POSTGRES]),(0,u.Z)(i,l.tf.TRANSFORMER,[r.REDSHIFT,r.BIGQUERY,r.SNOWFLAKE,r.POSTGRES]),(0,u.Z)(i,l.tf.SENSOR,[r.GENERIC,r.S3,r.REDSHIFT,r.BIGQUERY,r.SNOWFLAKE,r.MYSQL,r.POSTGRES]),i);n.ZP=r},33572:function(e,n,t){var o;t.d(n,{z:function(){return o}}),function(e){e.GENERATE_BLOCK_WITH_DESCRIPTION="generate_block_with_description",e.GENERATE_COMMENT_FOR_CODE="generate_comment_for_code",e.GENERATE_DOC_FOR_BLOCK="generate_doc_for_block",e.GENERATE_DOC_FOR_PIPELINE="generate_doc_for_pipeline",e.GENERATE_PIPELINE_WITH_DESCRIPTION="generate_pipeline_with_description"}(o||(o={}))},46336:function(e,n,t){var o,i;t.d(n,{d:function(){return o},k:function(){return i}}),function(e){e.ADD_NEW_BLOCK_V2="add_new_block_v2"}(o||(o={})),function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(i||(i={}))},88859:function(e,n,t){t.d(n,{NX:function(){return h},Wt:function(){return m},_G:function(){return c},c1:function(){return p},d9:function(){return f}});var o,i,r,u,l,c,a=t(82394),s=t(80906),d=(s.Q0.AVERAGE,s.Q0.CLEAN_COLUMN_NAME,s.Q0.COUNT,s.Q0.COUNT_DISTINCT,s.Q0.CUSTOM,s.Q0.DIFF,s.Q0.FIRST,s.Q0.FIX_SYNTAX_ERRORS,s.Q0.IMPUTE,s.Q0.LAST,s.Q0.MAX,s.Q0.MEDIAN,s.Q0.MIN,s.Q0.NORMALIZE,s.Q0.REFORMAT,s.Q0.REMOVE,s.Q0.REMOVE_OUTLIERS,s.Q0.SELECT,s.Q0.SHIFT_DOWN,s.Q0.SHIFT_UP,s.Q0.STANDARDIZE,s.Q0.SUM,[s.Q0.DROP_DUPLICATE,s.Q0.FILTER,s.Q0.SORT,s.Q0.REMOVE]);!function(e){e.AGGREGATE="Aggregate",e.FORMATTING="Formatting",e.COLUMN_REMOVAL="Column removal",e.SHIFT_ROWS="Shift rows in a column",e.MISC="Miscellaneous",e.FEATURE_SCALING="Feature Scaling"}(c||(c={}));var f=(i={},(0,a.Z)(i,s.qs.COLUMN,(o={},(0,a.Z)(o,c.AGGREGATE,[s.Q0.AVERAGE,s.Q0.COUNT,s.Q0.COUNT_DISTINCT,s.Q0.FIRST,s.Q0.LAST,s.Q0.MAX,s.Q0.MEDIAN,s.Q0.MIN,s.Q0.SUM]),(0,a.Z)(o,c.FORMATTING,[s.Q0.CLEAN_COLUMN_NAME,s.Q0.FIX_SYNTAX_ERRORS,s.Q0.REFORMAT]),(0,a.Z)(o,c.COLUMN_REMOVAL,[s.Q0.REMOVE,s.Q0.SELECT]),(0,a.Z)(o,c.SHIFT_ROWS,[s.Q0.SHIFT_DOWN,s.Q0.SHIFT_UP]),(0,a.Z)(o,c.MISC,[s.Q0.DIFF,s.Q0.IMPUTE,s.Q0.REMOVE_OUTLIERS]),(0,a.Z)(o,c.FEATURE_SCALING,[s.Q0.NORMALIZE,s.Q0.STANDARDIZE]),o)),(0,a.Z)(i,s.qs.ROW,(0,a.Z)({},c.MISC,[].concat(d))),i),p=Object.keys(f[s.qs.COLUMN]),m=[c.MISC],h=(l={},(0,a.Z)(l,s.qs.COLUMN,(r={},(0,a.Z)(r,s.Q0.ADD,"Add column"),(0,a.Z)(r,s.Q0.AVERAGE,"Aggregate by average value"),(0,a.Z)(r,s.Q0.CLEAN_COLUMN_NAME,"Clean column name"),(0,a.Z)(r,s.Q0.COUNT_DISTINCT,"Aggregate by distinct count"),(0,a.Z)(r,s.Q0.COUNT,"Aggregate by total count"),(0,a.Z)(r,s.Q0.DIFF,"Difference"),(0,a.Z)(r,s.Q0.FIRST,"Aggregate by first value"),(0,a.Z)(r,s.Q0.FIX_SYNTAX_ERRORS,"Fix syntax errors"),(0,a.Z)(r,s.Q0.IMPUTE,"Fill in missing values"),(0,a.Z)(r,s.Q0.NORMALIZE,"Normalize Data"),(0,a.Z)(r,s.Q0.STANDARDIZE,"Standardize Data"),(0,a.Z)(r,s.Q0.LAST,"Aggregate by last value"),(0,a.Z)(r,s.Q0.MAX,"Aggregate by maximum value"),(0,a.Z)(r,s.Q0.MEDIAN,"Aggregate by median value"),(0,a.Z)(r,s.Q0.MIN,"Aggregate by mininum value"),(0,a.Z)(r,s.Q0.REFORMAT,"Reformat"),(0,a.Z)(r,s.Q0.REMOVE_OUTLIERS,"Remove outliers"),(0,a.Z)(r,s.Q0.REMOVE,"Remove column(s)"),(0,a.Z)(r,s.Q0.SELECT,"Keep columns"),(0,a.Z)(r,s.Q0.SHIFT_DOWN,"Shift rows down in a column"),(0,a.Z)(r,s.Q0.SHIFT_UP,"Shift rows up in a column"),(0,a.Z)(r,s.Q0.SUM,"Aggregate by sum of values"),r)),(0,a.Z)(l,s.qs.ROW,(u={},(0,a.Z)(u,s.Q0.DROP_DUPLICATE,"Drop duplicates"),(0,a.Z)(u,s.Q0.FILTER,"Filter"),(0,a.Z)(u,s.Q0.SORT,"Sort"),(0,a.Z)(u,s.Q0.REMOVE,"Remove rows"),u)),l)},30264:function(e,n,t){var o=t(82394),i=t(26304),r=(t(82684),t(47999)),u=t(62084),l=t(28598),c=["children","items","open","onClickCallback","onClickOutside","parentRef","uuid"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function s(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,o.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.items,o=e.open,a=e.onClickCallback,d=e.onClickOutside,f=e.parentRef,p=e.uuid,m=(0,i.Z)(e,c),h=(0,l.jsxs)("div",{style:{position:"relative",zIndex:d?3:2},children:[(0,l.jsx)("div",{ref:f,children:n}),(0,l.jsx)(u.Z,s(s({},m),{},{items:t,onClickCallback:a,open:o,parentRef:f,uuid:p}))]});return d?(0,l.jsx)(r.Z,{onClickOutside:d,open:!0,children:h}):h}},96016:function(e,n,t){t.d(n,{Z:function(){return g}});var o=t(68792),i=t(5882),r=t(87372),u=t(10919),l=t(19711),c=t(23831),a=t(38626),s=t(2005),d=t(49125),f=t(73942),p=t(31012),m=t(37391),h="0.75em",v=a.default.div.withConfig({displayName:"indexstyle__MarkdownContainer",componentId:"sc-j72mol-0"})(["font-family:",";margin:0 ","px;overflow:auto;"," "," p{margin:0.5em 0;}blockquote{margin:"," 0;padding:","px 0;","}blockquote:before{content:'';font-size:","px;line-height:0.1em;margin-right:0.25em;vertical-align:-0.4em;}blockquote p{display:inline;}pre{border-radius:","px;white-space:pre;margin:"," 0;padding:","px;overflow-x:auto;"," "," span{padding:0;}}ul,ol{margin-bottom:",";padding-left:","px;}li{","}li > input[type='checkbox']{pointer-events:none;}table{"," margin:",";thead{font-family:",";","}th,td{padding:","px ","px;","}}"],s.ry,d.iI,m.w5,(function(e){return"\n color: ".concat((e.theme||c.Z).content.active,";\n ")}),h,d.iI,(function(e){return"\n border-left: ".concat(.5*d.iI,"px solid ").concat((e.theme||c.Z).content.active,";\n ")}),3*d.l4,f.BG,h,d.iI,m.w5,(function(e){return"\n background-color: ".concat((e.theme||c.Z).interactive.defaultBorder,";\n ")}),h,3*d.iI,p.iD,p.iD,h,s.nF,(function(e){return"\n border-bottom: ".concat(f.YF,"px solid ").concat((e.theme||c.Z).content.active,";\n ")}),.5*d.iI,.75*d.iI,(function(e){return"\n border: ".concat(f.YF,"px solid ").concat((e.theme||c.Z).content.muted,";\n ")})),b=t(28598);var g=function(e){var n=e.children;return(0,b.jsx)(v,{children:(0,b.jsx)(o.D,{components:{a:function(e){var n=e.children,t=e.href;return(0,b.jsx)(u.Z,{href:t,inline:!0,openNewWindow:!0,primary:!0,children:n})},code:function(e){var n=e.children;return(0,b.jsx)(l.ZP,{backgroundColor:c.Z.interactive.defaultBorder,inline:!0,monospace:!0,pre:!0,style:{fontSize:"13px"},children:n})},em:function(e){var n=e.children;return(0,b.jsx)(l.ZP,{inline:!0,italic:!0,children:n})},h1:function(e){var n=e.children;return(0,b.jsx)(r.Z,{level:1,children:n})},h2:function(e){var n=e.children;return(0,b.jsx)(r.Z,{level:2,children:n})},h3:function(e){var n=e.children;return(0,b.jsx)(r.Z,{level:3,children:n})},h4:function(e){var n=e.children;return(0,b.jsx)(r.Z,{level:4,children:n})},h5:function(e){var n=e.children;return(0,b.jsx)(r.Z,{level:5,children:n})},p:function(e){var n=e.children;return(0,b.jsx)(l.ZP,{children:n})},strong:function(e){var n=e.children;return(0,b.jsx)(l.ZP,{bold:!0,inline:!0,children:n})}},remarkPlugins:[i.Z],children:n})})}},75090:function(e,n,t){var o=t(28598);n.Z=function(e){var n=e.fill,t=void 0===n?"white":n,i=e.size;return(0,o.jsxs)("svg",{fill:"none",height:i,viewBox:"0 0 20 20",width:i,xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsxs)("g",{clipPath:"url(#clip0_11802_82850)",children:[(0,o.jsx)("path",{d:"M15.6276 1.73378C15.97 1.96689 16.022 2.44136 15.7638 2.76532C15.5057 3.08929 15.0355 3.13958 14.69 2.91102C13.3636 2.0334 11.8126 1.54269 10.2126 1.50266C8.36175 1.45636 6.54643 2.01561 5.04253 3.09541C3.53863 4.1752 2.4284 5.71649 1.8806 7.48498C1.40702 9.01387 1.37618 10.6403 1.7837 12.1777C1.88982 12.5781 1.69185 13.0076 1.30237 13.1486C0.912892 13.2896 0.479935 13.0887 0.368517 12.6897C-0.147093 10.8435 -0.122519 8.88224 0.447763 7.04116C1.09223 4.96057 2.39838 3.14729 4.16768 1.87695C5.93697 0.606601 8.07265 -0.0513415 10.2501 0.00312922C12.1769 0.0513296 14.0431 0.655033 15.6276 1.73378Z",fill:t}),(0,o.jsx)("path",{d:"M13.2714 5.89383C13.5295 5.56986 13.4781 5.09341 13.1245 4.87771C12.2306 4.33247 11.2055 4.02828 10.15 4.00188C8.84359 3.9692 7.56218 4.36396 6.50061 5.12617C5.43903 5.88838 4.65534 6.97634 4.26866 8.22469C3.95628 9.23316 3.91679 10.3017 4.14767 11.323C4.23901 11.727 4.67403 11.928 5.06351 11.787C5.45299 11.6461 5.64766 11.216 5.57323 10.8086C5.44361 10.0989 5.48588 9.36461 5.70149 8.66852C5.9915 7.73226 6.57927 6.91628 7.37545 6.34463C8.17164 5.77297 9.13269 5.4769 10.1125 5.50141C10.841 5.51963 11.5503 5.71432 12.1813 6.06401C12.5436 6.26478 13.0133 6.2178 13.2714 5.89383Z",fill:t}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M10 7.5C8.61929 7.5 7.5 8.61929 7.5 10C7.5 11.3807 8.61929 12.5 10 12.5C11.3807 12.5 12.5 11.3807 12.5 10C12.5 8.61929 11.3807 7.5 10 7.5ZM9 10C9 10.5523 9.44772 11 10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10Z",fill:t,fillRule:"evenodd"}),(0,o.jsx)("path",{d:"M6.87554 15.1223C6.52192 14.9066 6.47052 14.4301 6.72863 14.1062C6.98673 13.7822 7.45642 13.7352 7.81872 13.936C8.44971 14.2857 9.15897 14.4804 9.88746 14.4986C10.8673 14.5231 11.8284 14.227 12.6245 13.6554C13.4207 13.0837 14.0085 12.2677 14.2985 11.3315C14.5141 10.6354 14.5564 9.90111 14.4268 9.19144C14.3523 8.78397 14.547 8.35395 14.9365 8.21295C15.326 8.07196 15.761 8.27297 15.8523 8.67699C16.0832 9.69826 16.0437 10.7668 15.7313 11.7753C15.3447 13.0237 14.561 14.1116 13.4994 14.8738C12.4378 15.636 11.1564 16.0308 9.84995 15.9981C8.79455 15.9717 7.76942 15.6675 6.87554 15.1223Z",fill:t}),(0,o.jsx)("path",{d:"M4.23615 17.2347C3.97805 17.5586 4.03001 18.0331 4.37241 18.2662C5.95691 19.345 7.82314 19.9487 9.74992 19.9969C11.9274 20.0513 14.063 19.3934 15.8323 18.1231C17.6016 16.8527 18.9078 15.0394 19.5522 12.9588C20.1225 11.1178 20.1471 9.15647 19.6315 7.31026C19.5201 6.91131 19.0871 6.7104 18.6976 6.85139C18.3082 6.99238 18.1102 7.42188 18.2163 7.82227C18.6238 9.35971 18.593 10.9861 18.1194 12.515C17.5716 14.2835 16.4614 15.8248 14.9575 16.9046C13.4536 17.9844 11.6382 18.5436 9.78743 18.4973C8.18738 18.4573 6.63645 17.9666 5.30996 17.089C4.96451 16.8604 4.49426 16.9107 4.23615 17.2347Z",fill:t})]}),(0,o.jsx)("defs",{children:(0,o.jsx)("clipPath",{id:"clip0_11802_82850",children:(0,o.jsx)("rect",{fill:t,height:"20",width:"20"})})})]})}},11366:function(e,n,t){t.d(n,{Ch:function(){return u},H8:function(){return o},Tz:function(){return l},g6:function(){return i},vF:function(){return r}});var o="pipeline_edit_before_tab_selected",i="pipeline_edit_hidden_blocks",r="pipeline_edit_block_output_logs",u="setup_ai_later",l="auto_scroll_logs"},29499:function(e,n,t){var o=t(75582),i=t(82684),r=t(34376),u=t(60328),l=t(67971),c=t(29237),a=t(86673),s=t(19711),d=t(99497),f=t(28598);n.Z=function(e){var n=e.shouldWarn,t=e.warningMessage,p=(0,r.useRouter)(),m=(0,i.useState)(!1),h=m[0],v=m[1],b=(0,i.useState)({isModalOpen:!1,nextRoute:null}),g=b[0],x=b[1];(0,i.useEffect)((function(){var e=function(e){if(n)return e.preventDefault(),(e||window.event).returnValue="Are you sure you want to leave?"};return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}),[n]),(0,i.useEffect)((function(){var e=function(e){if(n&&!h)throw x({isModalOpen:!0,nextRoute:e}),p.events.emit("routeChangeError"),"navigation aborted"};p.events.on("routeChangeStart",e);var t=function(){return p.events.off("routeChangeStart",e)};if(h){if(!g.nextRoute)return;return p.push(g.nextRoute),t}return t}),[g,h,p,n]);var j=(0,d.dd)((function(){return(0,f.jsxs)(c.Z,{children:[(0,f.jsx)(s.ZP,{children:t}),(0,f.jsx)(a.Z,{mt:2,children:(0,f.jsxs)(l.ZP,{alignItems:"center",children:[(0,f.jsx)(u.Z,{onClick:function(){return v(!0)},primary:!0,children:"Leave"}),(0,f.jsx)(a.Z,{mr:1}),(0,f.jsx)(u.Z,{onClick:function(){x({isModalOpen:!1,nextRoute:null})},secondary:!0,children:"Cancel"})]})})]})}),{},[t],{background:!0,hideCallback:function(){x({isModalOpen:!1,nextRoute:null})},uuid:"stale_pipeline_message"}),C=(0,o.Z)(j,2),_=C[0],O=C[1];(0,i.useEffect)((function(){g.isModalOpen?_():O()}),[O,g.isModalOpen,_]);return{ConfirmLeaveModal:function(){return(0,f.jsx)("div",{})}}}},87323:function(e,n,t){t.d(n,{cU:function(){return u}});var o=t(82684),i=t(24224);function r(e,n){return function(e,n,t){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{includeAllNodes:!1},r=(0,i.HK)(t,(function(e){return e.uuid})),u=(o||{}).includeAllNodes,l=[];function c(t){if(t){var o=(t[n]||[]).reduce((function(n,t){return e.uuid===t?n:n.concat(r[t])}),[]);(0===o.length||u&&e.uuid!==t.uuid)&&l.push(t),o.forEach((function(e){c(e)}))}}return c(e),l}(e,"upstream_blocks",n,{includeAllNodes:!0})}function u(e,n){return(0,o.useMemo)((function(){return e.map((function(t){var o=function(e,n){var t=r(e,n),o=t.filter((function(n){var t=n.configuration,o=n.uuid;return(null===t||void 0===t?void 0:t.dynamic)&&o!==(null===e||void 0===e?void 0:e.uuid)})),i=t.filter((function(n){var t=n.configuration,o=n.uuid;return(null===t||void 0===t?void 0:t.reduce_output)&&o!==(null===e||void 0===e?void 0:e.uuid)}));return{dynamicUpstreamBlock:o[0],dynamicUpstreamBlocks:o,reduceOutputUpstreamBlock:i[0],reduceOutputUpstreamBlocks:i}}(t,n),i=o.dynamicUpstreamBlock,u=o.dynamicUpstreamBlocks,l=o.reduceOutputUpstreamBlock,c=o.reduceOutputUpstreamBlocks,a=(t||{}).configuration||{},s=a.dynamic,d=a.reduce_output;return{block:t,blocksToUse:e,dynamic:!!s,dynamicUpstreamBlock:i,dynamicUpstreamBlocks:u,reduceOutput:!!d,reduceOutputUpstreamBlock:l,reduceOutputUpstreamBlocks:c}}))}),[n,null===n||void 0===n?void 0:n.map((function(e){var n=e.configuration;return null===n||void 0===n?void 0:n.dynamic})),null===n||void 0===n?void 0:n.map((function(e){var n=e.configuration;return null===n||void 0===n?void 0:n.reduce_output})),null===n||void 0===n?void 0:n.map((function(e){return e.upstream_blocks}))])}},35033:function(e,n,t){t.d(n,{Gr:function(){return i},Lz:function(){return o},Vc:function(){return u},gr:function(){return r}});var o=/\[__internal_output__\]/,i=/\[__internal_test__\]/,r="[__internal_output__]",u="[__internal_test__]"},54405:function(e,n,t){var o;t.d(n,{V5:function(){return r}}),function(e){e.ANDROID="Android",e.CHROME_OS="ChromeOS",e.IOS="iOS",e.LINUX="Linux",e.MAC="macOS",e.WINDOWS="Windows"}(o||(o={}));var i=o;function r(){return function(){var e,n,t,o,r,u,l,c=i.MAC,a=null===(e=window)||void 0===e||null===(n=e.navigator)||void 0===n?void 0:n.userAgent,s=(null===(t=window)||void 0===t||null===(o=t.navigator)||void 0===o||null===(r=o.userAgentData)||void 0===r?void 0:r.platform)||(null===(u=window)||void 0===u||null===(l=u.navigator)||void 0===l?void 0:l.platform);return s?["macOS","Macintosh","MacIntel","MacPPC","Mac68K"].includes(s)?c=i.MAC:["Win32","Win64","Windows","WinCE"].includes(s)?c=i.WINDOWS:["iPhone","iPad","iPod"].includes(s)&&(c=i.IOS):a&&(a.includes("Macintosh")?c=i.MAC:a.includes("Windows")?c=i.WINDOWS:a.includes("Linux")&&a.includes("X11")?c=i.LINUX:/(iPhone|iPad)/.test(a)?c=i.IOS:a.includes("Android")&&a.includes("Mobi")?c=i.ANDROID:a.includes("CrOS")&&(c=i.CHROME_OS)),c}()===i.MAC}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4250],{20773:function(e,n,t){var r=t(82394),i=t(82684),o=t(60328),c=t(67971),l=t(11135),d=t(33572),a=t(86673),u=t(19711),s=t(38435),p=t(82944),f=t(22341),h=t(68579),v=t(49125),b=t(90211),j=t(28598);function m(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 x(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n,t,r,m,g=e.createPipeline,Z=e.isLoading,y=e.onClose,O=(0,i.useRef)(null),P=(0,i.useState)(!1),w=P[0],I=P[1],k=(0,i.useState)({name:(0,b.Y6)()}),C=k[0],_=k[1];return(0,i.useEffect)((function(){var e;null===O||void 0===O||null===(e=O.current)||void 0===e||e.focus()}),[]),(0,j.jsxs)(h.Nk,{children:[(0,j.jsx)(h.I5,{children:(0,j.jsx)(c.ZP,{alignItems:"center",justifyContent:"center",children:(0,j.jsx)(f.xq,{size:5*v.iI,warning:!0})})}),(0,j.jsx)(h.gI,{children:(0,j.jsxs)(a.Z,{py:1,children:[(0,j.jsx)(a.Z,{mb:1,children:(0,j.jsx)(u.ZP,{default:!0,children:"New pipeline"})}),(0,j.jsx)(u.ZP,{textOverflow:!0,children:"Using AI"})]})}),(0,j.jsxs)(h.gI,{children:[(0,j.jsx)(u.ZP,{default:!0,children:"Name"}),(0,j.jsx)(p.Z,{alignRight:!0,noBackground:!0,noBorder:!0,onChange:function(e){return _((function(n){return x(x({},n),{},{name:e.target.value})}))},paddingVertical:v.iI,placeholder:"Enter pipeline name...",value:(null===C||void 0===C?void 0:C.name)||""})]}),(0,j.jsx)(h.gI,{children:(0,j.jsxs)(c.ZP,{flexDirection:"column",fullWidth:!0,children:[(0,j.jsx)(a.Z,{mb:2,pt:1,children:(0,j.jsx)(u.ZP,{default:!0,children:"Describe what the pipeline should do"})}),(0,j.jsxs)(a.Z,{pb:1,pr:v.cd,children:[(0,j.jsx)(s.Z,{fullWidth:!0,onChange:function(e){return _((function(n){return x(x({},n),{},{llm:{request:{pipeline_description:e.target.value},use_case:d.z.GENERATE_PIPELINE_WITH_DESCRIPTION}})}))},placeholder:"Type the pipeline purpose...",ref:O,rows:8,value:(null===C||void 0===C||null===(n=C.llm)||void 0===n||null===(t=n.request)||void 0===t?void 0:t.pipeline_description)||""}),(Z||w)&&(0,j.jsx)(a.Z,{mt:1,children:(0,j.jsx)(u.ZP,{warning:!0,children:"Pipeline is being generated using AI based on your description above..."})})]})]})}),(0,j.jsx)(h.$b,{children:(0,j.jsxs)(c.ZP,{fullWidth:!0,children:[(0,j.jsx)(l.ZP,{bold:!0,centerText:!0,disabled:!(null!==C&&void 0!==C&&C.name)||!(null!==C&&void 0!==C&&null!==(r=C.llm)&&void 0!==r&&null!==(m=r.request)&&void 0!==m&&m.pipeline_description),loading:Z||w,onClick:function(){I(!0),g({pipeline:C}).then((function(){return I(!1)}))},primary:!0,tabIndex:0,uuid:"AIControlPanel/CreatePipeline",children:"Create pipeline"}),y&&(0,j.jsx)(a.Z,{ml:1,children:(0,j.jsx)(o.Z,{onClick:y,tabIndex:0,children:"Cancel"})})]})})]})}},1210:function(e,n,t){t.d(n,{Z:function(){return w}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),l=t(49894),d=t(93461),a=t(57384),u=t(41424),s=t(72454),p=t(28598);function f(e,n){var t=e.children;return(0,p.jsx)(s.HS,{ref:n,children:t})}var h=o.forwardRef(f),v=t(32063),b=t(85019),j=t(82531),m=t(66166),x=t(3055),g=t(49125),Z=t(91427),y=t(24141);function O(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 P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var w=function(e){var n,t=e.addProjectBreadcrumbToCustomBreadcrumbs,r=e.after,f=e.afterHidden,O=e.afterWidth,w=e.afterWidthOverride,I=e.before,k=e.beforeWidth,C=e.breadcrumbs,_=e.children,S=e.errors,N=e.headerMenuItems,E=e.headerOffset,D=e.mainContainerHeader,B=e.navigationItems,M=e.setErrors,A=e.subheaderChildren,T=e.title,H=e.uuid,R=(0,y.i)().width,W="dashboard_after_width_".concat(H),q="dashboard_before_width_".concat(H),z=(0,o.useRef)(null),F=(0,o.useState)(w?O:(0,Z.U2)(W,O)),L=F[0],U=F[1],G=(0,o.useState)(!1),V=G[0],Y=G[1],$=(0,o.useState)(I?Math.max((0,Z.U2)(q,k),13*g.iI):null),K=$[0],Q=$[1],X=(0,o.useState)(!1),J=X[0],ee=X[1],ne=(0,o.useState)(null)[1],te=j.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=[];C?(t&&oe.push(ie),oe.push.apply(oe,(0,i.Z)(C))):(null===re||void 0===re?void 0:re.length)>=1&&oe.push.apply(oe,[ie,{bold:!0,label:function(){return T}}]),(0,o.useEffect)((function(){null===z||void 0===z||!z.current||V||J||null===ne||void 0===ne||ne(z.current.getBoundingClientRect().width)}),[V,L,J,K,z,ne,R]),(0,o.useEffect)((function(){V||(0,Z.t8)(W,L)}),[f,V,L,W]),(0,o.useEffect)((function(){J||(0,Z.t8)(q,K)}),[J,K,q]);var ce=(0,m.Z)(O);return(0,o.useEffect)((function(){w&&ce!==O&&U(O)}),[w,O,ce]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(a.Z,{title:T}),(0,p.jsx)(u.Z,{breadcrumbs:oe,menuItems:N,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,p.jsxs)(s.Nk,{children:[0!==(null===B||void 0===B?void 0:B.length)&&(0,p.jsx)(s.lm,{showMore:!0,children:(0,p.jsx)(b.Z,{navigationItems:B,showMore:!0})}),(0,p.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(v.Z,{after:r,afterHeightOffset:x.Mz,afterHidden:f,afterMousedownActive:V,afterWidth:L,before:I,beforeHeightOffset:x.Mz,beforeMousedownActive:J,beforeWidth:s.k1+(I?K:0),headerOffset:E,hideAfterCompletely:!0,leftOffset:I?s.k1:null,mainContainerHeader:D,mainContainerRef:z,setAfterMousedownActive:Y,setAfterWidth:U,setBeforeMousedownActive:ee,setBeforeWidth:Q,children:[A&&(0,p.jsx)(h,{children:A}),_]})})]}),S&&(0,p.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===M||void 0===M?void 0:M(null)},children:(0,p.jsx)(l.Z,P(P({},S),{},{onClose:function(){return null===M||void 0===M?void 0:M(null)}}))})]})}},21390:function(e,n,t){t.d(n,{d:function(){return u}});var r=t(75090),i=t(22341),o=t(98781),c=t(49125),l=t(90211),d=t(28598),a=1.5*c.iI,u=function(e,n){var t=[{beforeIcon:(0,d.jsx)(i.X5,{}),label:function(){return"Standard (batch)"},onClick:function(){return e({pipeline:{name:(0,l.Y6)()}})},uuid:"Pipelines/NewPipelineMenu/standard"},{beforeIcon:(0,d.jsx)(i.ZG,{}),label:function(){return"Data integration"},onClick:function(){return e({pipeline:{name:(0,l.Y6)(),type:o.qL.INTEGRATION}})},uuid:"Pipelines/NewPipelineMenu/integration"},{beforeIcon:(0,d.jsx)(r.Z,{size:a}),label:function(){return"Streaming"},onClick:function(){return e({pipeline:{name:(0,l.Y6)(),type:o.qL.STREAMING}})},uuid:"Pipelines/NewPipelineMenu/streaming"}];return null!==n&&void 0!==n&&n.showBrowseTemplates&&t.push({beforeIcon:(0,d.jsx)(i.zQ,{}),label:function(){return"From a template"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showBrowseTemplates)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/custom_template"}),null!==n&&void 0!==n&&n.showAIModal&&t.push({beforeIcon:(0,d.jsx)(i.xq,{}),label:function(){return"Using AI (beta)"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showAIModal)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/AI_modal"}),t}},68579:function(e,n,t){t.d(n,{$b:function(){return u},I5:function(){return d},Nk:function(){return l},gI:function(){return a}});var r=t(38626),i=t(23831),o=t(73942),c=t(49125),l=r.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-h093u4-0"})([""," ",""],(function(e){return!e.width&&"\n width: ".concat(40*c.iI,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),d=r.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-h093u4-1"})(["padding:","px;",""],2.5*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||i.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||i.Z.interactive).defaultBorder,";\n border-top-left-radius: ").concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n border-top: 1px solid ").concat((e.theme.interactive||i.Z.interactive).defaultBorder,";\n ")})),a=r.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-h093u4-2"})(["align-items:center;justify-content:space-between;",""],(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||i.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||i.Z.interactive).defaultBorder,";\n border-top: 1px solid ").concat((e.theme.interactive||i.Z.interactive).defaultBorder,";\n display: ").concat((null===e||void 0===e?void 0:e.display)||"flex",";\n padding-bottom: ").concat(1*c.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n padding-left: ").concat(c.cd*c.iI,"px;\n padding-top: ").concat(1*c.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n ")})),u=r.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-h093u4-3"})(["padding:","px ","px;",""],2.5*c.iI,2*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).panel,";\n border-bottom-left-radius: ").concat(o.n_,"px;\n border-bottom-right-radius: ").concat(o.n_,"px;\n border-bottom: 1px solid ").concat((e.theme.interactive||i.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||i.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||i.Z.interactive).defaultBorder,";\n ")}))},21853:function(e,n,t){t.d(n,{Z:function(){return _}});var r=t(82394),i=t(75582),o=t(82684),c=t(83455),l=t(60328),d=t(34744),a=t(93461),u=t(67971),s=t(87372),p=t(10919),f=t(29237),h=t(86673),v=t(19711),b=t(82944),j=t(70902),m=t(82531),x=t(38626),g=t(23831),Z=t(73942),y=t(49125),O=x.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],Z.n_,y.cd*y.iI,(function(e){return"\n background-color: ".concat((e.theme.background||g.Z.background).codeArea,";\n ")})),P=t(96510),w=t(9728),I=t(28598);function k(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?k(Object(t),!0).forEach((function(n){(0,r.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}var _=function(e){var n=e.cancelButtonText,t=e.contained,x=e.header,g=e.onCancel,Z=e.onSaveSuccess,k=(0,w.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),_=(0,i.Z)(k,1)[0],S=(0,o.useState)(null),N=S[0],E=S[1],D=m.ZP.projects.list(),B=D.data,M=D.mutate,A=(0,o.useMemo)((function(){var e;return null===B||void 0===B||null===(e=B.projects)||void 0===e?void 0:e[0]}),[B]),T=A||{},H=T.name,R=T.project_uuid;(0,o.useEffect)((function(){N||E(A)}),[A,N]);var W=(0,c.Db)(m.ZP.projects.useUpdate(H),{onSuccess:function(e){return(0,P.wD)(e,{callback:function(e){var n=e.project;M(),E(n),Z&&(null===Z||void 0===Z||Z(n))},onErrorCallback:function(e,n){return _({errors:n,response:e})}})}}),q=(0,i.Z)(W,2),z=q[0],F=q[1].isLoading,L=(0,o.useCallback)((function(e){return z({project:e})}),[z]),U=(0,I.jsxs)(I.Fragment,{children:[x,(0,I.jsxs)(f.Z,{noPadding:!0,children:[(0,I.jsxs)(h.Z,{p:y.cd,children:[(0,I.jsx)(h.Z,{mb:1,children:(0,I.jsx)(s.Z,{level:5,children:"Project name"})}),(0,I.jsx)(v.ZP,{default:!0,monospace:!0,children:H})]}),(0,I.jsx)(d.Z,{light:!0}),(0,I.jsxs)(h.Z,{p:y.cd,children:[(0,I.jsx)(h.Z,{mb:1,children:(0,I.jsx)(s.Z,{level:5,children:"Project UUID"})}),(0,I.jsx)(v.ZP,{default:!!R,monospace:!0,muted:!R,children:R||"Not required"})]}),(0,I.jsx)(d.Z,{light:!0}),(0,I.jsx)(h.Z,{p:y.cd,children:(0,I.jsxs)(u.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,I.jsxs)(a.Z,{flexDirection:"column",children:[(0,I.jsx)(h.Z,{mb:1,children:(0,I.jsx)(s.Z,{level:5,children:"Help improve Mage"})}),(0,I.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,I.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,I.jsx)(h.Z,{mr:y.cd}),(0,I.jsx)(j.Z,{checked:null===N||void 0===N?void 0:N.help_improve_mage,onCheck:function(){return E((function(e){return C(C({},e),{},{help_improve_mage:!(null!==N&&void 0!==N&&N.help_improve_mage)})}))}})]})})]}),(0,I.jsx)(h.Z,{mt:y.HN}),(0,I.jsx)(f.Z,{noPadding:!0,children:(0,I.jsxs)(h.Z,{p:y.cd,children:[(0,I.jsx)(h.Z,{mb:1,children:(0,I.jsx)(s.Z,{level:5,children:"Features"})}),Object.entries((null===N||void 0===N?void 0:N.features)||{}).map((function(e){var n=(0,i.Z)(e,2),t=n[0],o=n[1];return(0,I.jsxs)(u.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,I.jsx)(v.ZP,{default:!0,monospace:!0,children:t}),(0,I.jsx)(h.Z,{mr:y.cd}),(0,I.jsx)(j.Z,{checked:!!o,onCheck:function(){return E((function(e){return C(C({},e),{},{features:C(C({},null===N||void 0===N?void 0:N.features),{},(0,r.Z)({},t,!o))})}))}})]},t)}))]})}),(0,I.jsx)(h.Z,{mt:y.HN}),(0,I.jsx)(f.Z,{noPadding:!0,children:(0,I.jsxs)(h.Z,{p:y.cd,children:[(0,I.jsx)(h.Z,{mb:1,children:(0,I.jsx)(s.Z,{level:5,children:"OpenAI"})}),(0,I.jsx)(b.Z,{label:"API key",monospace:!0,onChange:function(e){return E((function(n){return C(C({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===N||void 0===N?void 0:N.openai_api_key)||""})]})}),(0,I.jsx)(h.Z,{mt:y.HN}),(0,I.jsxs)(u.ZP,{alignItems:"center",children:[(0,I.jsx)(l.Z,{loading:F,onClick:function(){L({features:null===N||void 0===N?void 0:N.features,help_improve_mage:null===N||void 0===N?void 0:N.help_improve_mage,openai_api_key:null===N||void 0===N?void 0:N.openai_api_key})},primary:!0,children:"Save project settings"}),g&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(h.Z,{mr:y.cd}),(0,I.jsx)(l.Z,{onClick:g,secondary:!0,children:n||"Cancel"})]})]})]});return t?(0,I.jsx)(O,{children:U}):U}},50316:function(e,n,t){t.d(n,{B:function(){return p}});var r=t(82394),i=t(30264),o=t(11135),c=t(22341),l=t(99994),d=t(49125),a=t(28598);function u(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 s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var p={bold:!0,greyBorder:!0,paddingBottom:9,paddingTop:9};n.Z=function(e){var n=e.addButtonMenuOpen,t=e.addButtonMenuRef,r=e.isLoading,u=e.label,f=e.menuItems,h=e.onClick,v=e.onClickCallback;return(0,a.jsx)(i.Z,{disableKeyboardShortcuts:!0,items:f,onClickCallback:v,onClickOutside:v,open:n,parentRef:t,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/NewItemMenu",children:(0,a.jsx)(o.ZP,s(s({},p),{},{background:l.eW,beforeElement:(0,a.jsx)(c.mm,{size:2.5*d.iI}),loading:r,onClick:function(e){e.preventDefault(),null===h||void 0===h||h()},uuid:"shared/AddButton/index",children:u}))})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1709],{98677:function(n,e,t){"use strict";function r(n,e,t){n=+n,e=+e,t=(i=arguments.length)<2?(e=n,n=0,1):i<3?1:+t;for(var r=-1,i=0|Math.max(0,Math.ceil((e-n)/t)),o=new Array(i);++r<i;)o[r]=n+r*t;return o}t.d(e,{Z:function(){return a}});var i=t(8208),o=t(8162);function c(){var n,e,t=(0,o.Z)().unknown(void 0),u=t.domain,a=t.range,l=0,s=1,d=!1,f=0,p=0,h=.5;function m(){var t=u().length,i=s<l,o=i?s:l,c=i?l:s;n=(c-o)/Math.max(1,t-f+2*p),d&&(n=Math.floor(n)),o+=(c-o-n*(t-f))*h,e=n*(1-f),d&&(o=Math.round(o),e=Math.round(e));var m=r(t).map((function(e){return o+n*e}));return a(i?m.reverse():m)}return delete t.unknown,t.domain=function(n){return arguments.length?(u(n),m()):u()},t.range=function(n){return arguments.length?([l,s]=n,l=+l,s=+s,m()):[l,s]},t.rangeRound=function(n){return[l,s]=n,l=+l,s=+s,d=!0,m()},t.bandwidth=function(){return e},t.step=function(){return n},t.round=function(n){return arguments.length?(d=!!n,m()):d},t.padding=function(n){return arguments.length?(f=Math.min(1,p=+n),m()):f},t.paddingInner=function(n){return arguments.length?(f=Math.min(1,n),m()):f},t.paddingOuter=function(n){return arguments.length?(p=+n,m()):p},t.align=function(n){return arguments.length?(h=Math.max(0,Math.min(1,n)),m()):h},t.copy=function(){return c(u(),[l,s]).round(d).paddingInner(f).paddingOuter(p).align(h)},i.o.apply(m(),arguments)}var u=(0,t(93342).Z)("domain","range","reverse","align","padding","round");function a(n){return u(c(),n)}},81354:function(n,e,t){"use strict";t.d(e,{Z:function(){return g}});var r=t(82684),i=t(63588),o=t.n(i),c=t(75823),u=t(29989),a=t(62072),l=t(53989),s=t(13004),d=t(18246),f=t(59309),p=t(65743),h=["data","className","top","left","x","y0","y1","xScale","yScale","color","keys","value","order","offset","children"];function m(){return m=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},m.apply(this,arguments)}function g(n){var e=n.data,t=n.className,i=n.top,g=n.left,x=n.x,v=n.y0,b=void 0===v?a.l8:v,Z=n.y1,y=void 0===Z?a.xf:Z,j=n.xScale,w=n.yScale,k=n.color,_=n.keys,P=n.value,I=n.order,C=n.offset,O=n.children,M=function(n,e){if(null==n)return{};var t,r,i={},o=Object.keys(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||(i[t]=n[t]);return i}(n,h),T=(0,c.Z)();_&&T.keys(_),P&&(0,s.Z)(T.value,P),I&&T.order((0,d.ZP)(I)),C&&T.offset((0,f.ZP)(C));var S=T(e),N=(0,l.Z)(j),B=S.map((function(n,e){var t=n.key;return{index:e,key:t,bars:n.map((function(e,r){var i=(w(b(e))||0)-(w(y(e))||0),o=w(y(e)),c="bandwidth"in j?j(x(e.data)):Math.max((j(x(e.data))||0)-N/2);return{bar:e,key:t,index:r,height:i,width:N,x:c||0,y:o||0,color:k(n.key,r)}}))}}));return O?r.createElement(r.Fragment,null,O(B)):r.createElement(u.Z,{className:o()("visx-bar-stack",t),top:i,left:g},B.map((function(n){return n.bars.map((function(e){return r.createElement(p.Z,m({key:"bar-stack-"+n.index+"-"+e.index,x:e.x,y:e.y,height:e.height,width:e.width,fill:e.color},M))}))})))}},62072:function(n,e,t){"use strict";function r(n){return null==n?void 0:n[0]}function i(n){return null==n?void 0:n[1]}t.d(e,{l8:function(){return r},xf:function(){return i}})},53989:function(n,e,t){"use strict";function r(n){if("bandwidth"in n)return n.bandwidth();var e=n.range(),t=n.domain();return Math.abs(e[e.length-1]-e[0])/t.length}t.d(e,{Z:function(){return r}})},59309:function(n,e,t){"use strict";t.d(e,{ZP:function(){return l}});var r=t(12759),i=t(27500),o=t(82610),c=t(34812),u=t(77944),a={expand:r.Z,diverging:i.Z,none:o.Z,silhouette:c.Z,wiggle:u.Z};Object.keys(a);function l(n){return n&&a[n]||a.none}},18246:function(n,e,t){"use strict";t.d(e,{ZP:function(){return l}});var r=t(39586),i=t(25516),o=t(54164),c=t(8512),u=t(2010),a={ascending:r.Z,descending:i.Z,insideout:o.Z,none:c.Z,reverse:u.Z};Object.keys(a);function l(n){return n&&a[n]||a.none}},13946:function(n,e,t){"use strict";t.d(e,{t:function(){return r}});var r=Array.prototype.slice},27500:function(n,e,t){"use strict";function r(n,e){if((u=n.length)>0)for(var t,r,i,o,c,u,a=0,l=n[e[0]].length;a<l;++a)for(o=c=0,t=0;t<u;++t)(i=(r=n[e[t]][a])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=c,r[0]=c+=i):(r[0]=0,r[1]=i)}t.d(e,{Z:function(){return r}})},12759:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(82610);function i(n,e){if((i=n.length)>0){for(var t,i,o,c=0,u=n[0].length;c<u;++c){for(o=t=0;t<i;++t)o+=n[t][c][1]||0;if(o)for(t=0;t<i;++t)n[t][c][1]/=o}(0,r.Z)(n,e)}}},82610:function(n,e,t){"use strict";function r(n,e){if((i=n.length)>1)for(var t,r,i,o=1,c=n[e[0]],u=c.length;o<i;++o)for(r=c,c=n[e[o]],t=0;t<u;++t)c[t][1]+=c[t][0]=isNaN(r[t][1])?r[t][0]:r[t][1]}t.d(e,{Z:function(){return r}})},34812:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(82610);function i(n,e){if((t=n.length)>0){for(var t,i=0,o=n[e[0]],c=o.length;i<c;++i){for(var u=0,a=0;u<t;++u)a+=n[u][i][1]||0;o[i][1]+=o[i][0]=-a/2}(0,r.Z)(n,e)}}},77944:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(82610);function i(n,e){if((o=n.length)>0&&(i=(t=n[e[0]]).length)>0){for(var t,i,o,c=0,u=1;u<i;++u){for(var a=0,l=0,s=0;a<o;++a){for(var d=n[e[a]],f=d[u][1]||0,p=(f-(d[u-1][1]||0))/2,h=0;h<a;++h){var m=n[e[h]];p+=(m[u][1]||0)-(m[u-1][1]||0)}l+=f,s+=p*f}t[u-1][1]+=t[u-1][0]=c,l&&(c-=s/l)}t[u-1][1]+=t[u-1][0]=c,(0,r.Z)(n,e)}}},34128:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(8512);function i(n){var e=n.map(o);return(0,r.Z)(n).sort((function(n,t){return e[n]-e[t]}))}function o(n){for(var e,t=-1,r=0,i=n.length,o=-1/0;++t<i;)(e=+n[t][1])>o&&(o=e,r=t);return r}},39586:function(n,e,t){"use strict";t.d(e,{S:function(){return o},Z:function(){return i}});var r=t(8512);function i(n){var e=n.map(o);return(0,r.Z)(n).sort((function(n,t){return e[n]-e[t]}))}function o(n){for(var e,t=0,r=-1,i=n.length;++r<i;)(e=+n[r][1])&&(t+=e);return t}},25516:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(39586);function i(n){return(0,r.Z)(n).reverse()}},54164:function(n,e,t){"use strict";t.d(e,{Z:function(){return o}});var r=t(34128),i=t(39586);function o(n){var e,t,o=n.length,c=n.map(i.S),u=(0,r.Z)(n),a=0,l=0,s=[],d=[];for(e=0;e<o;++e)t=u[e],a<l?(a+=c[t],s.push(t)):(l+=c[t],d.push(t));return d.reverse().concat(s)}},8512:function(n,e,t){"use strict";function r(n){for(var e=n.length,t=new Array(e);--e>=0;)t[e]=e;return t}t.d(e,{Z:function(){return r}})},2010:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(8512);function i(n){return(0,r.Z)(n).reverse()}},75823:function(n,e,t){"use strict";t.d(e,{Z:function(){return a}});var r=t(13946),i=t(90875),o=t(82610),c=t(8512);function u(n,e){return n[e]}function a(){var n=(0,i.Z)([]),e=c.Z,t=o.Z,a=u;function l(r){var i,o,c=n.apply(this,arguments),u=r.length,l=c.length,s=new Array(l);for(i=0;i<l;++i){for(var d,f=c[i],p=s[i]=new Array(u),h=0;h<u;++h)p[h]=d=[0,+a(r[h],f,h,r)],d.data=r[h];p.key=f}for(i=0,o=e(s);i<l;++i)s[o[i]].index=i;return t(s,o),s}return l.keys=function(e){return arguments.length?(n="function"===typeof e?e:(0,i.Z)(r.t.call(e)),l):n},l.value=function(n){return arguments.length?(a="function"===typeof n?n:(0,i.Z)(+n),l):a},l.order=function(n){return arguments.length?(e=null==n?c.Z:"function"===typeof n?n:(0,i.Z)(r.t.call(n)),l):e},l.offset=function(n){return arguments.length?(t=null==n?o.Z:n,l):t},l}},40030:function(n,e,t){"use strict";var r=t(38626),i=t(23831),o=r.default.div.withConfig({displayName:"PageSectionHeader",componentId:"sc-1wznrcv-0"})(["left:0;position:sticky;top:0;width:100%;z-index:3;",""],(function(n){return"\n background-color: ".concat(n.backgroundColor||(n.theme.background||i.Z.background).page,";\n border-bottom: 1px solid ").concat((n.theme.borders||i.Z.borders).medium,";\n ")}));e.Z=o},98636:function(n,e,t){"use strict";t.d(e,{g:function(){return x},Z:function(){return v}});var r=t(82684),i=t(38626),o=t(23831),c=t(73942),u=t(37391),a=t(49125),l=1.5*a.iI,s=1.5*a.iI,d=i.default.div.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-13p7y8j-0"})(["border-radius:","px;overflow:hidden;width:100%;"," "," "," ",""],c.n_,(function(n){return n.width&&"\n width: ".concat(n.width,"px;\n ")}),(function(n){return"\n background-color: ".concat((n.theme||o.Z).background.page,";\n border: ").concat(c.YF,"px ").concat(c.M8," ").concat((n.theme||o.Z).interactive.defaultBorder,";\n box-shadow: ").concat((n.theme||o.Z).shadow.frame,";\n ")}),(function(n){return n.noBackground&&"\n background-color: transparent;\n "}),(function(n){return n.noBoxShadow&&"\n box-shadow: none;\n "})),f=i.default.div.withConfig({displayName:"indexstyle__RowContainerStyle",componentId:"sc-13p7y8j-1"})(["overflow:auto;border-bottom-left-radius:","px;border-bottom-right-radius:","px;"," "," "," ",""],c.n_,c.n_,u.w5,(function(n){return n.maxHeight>0&&"\n max-height: ".concat(n.maxHeight,"px;\n ")}),(function(n){return n.minHeight>0&&"\n min-height: ".concat(n.minHeight,"px;\n ")}),(function(n){return n.scrollable&&"\n margin-bottom: ".concat(a.iI,"px;\n overflow-y: auto;\n padding-top: ").concat(3,"px;\n padding-left: ").concat(3,"px;\n padding-right: ").concat(3,"px;\n ")})),p=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-13p7y8j-2"})(["border-top-left-radius:","px;border-top-right-radius:","px;padding:","px ","px;",""],c.n_,c.n_,l,2*a.iI,(function(n){return"\n border-bottom: ".concat(c.YF,"px ").concat(c.M8," ").concat((n.theme.interactive||o.Z.interactive).defaultBorder,";\n ")})),h=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-13p7y8j-3"})(["padding:","px ","px;"," "," "," "," "," ",""],s,2*a.iI,(function(n){return"\n border-bottom: ".concat(c.YF,"px ").concat(c.M8," ").concat((n.theme||o.Z).borders.medium2,";\n ")}),(function(n){return n.sameColorBorders&&"\n border-bottom-color: ".concat((n.theme||o.Z).interactive.defaultBorder,";\n ")}),(function(n){return n.noHorizontalPadding&&"\n padding-left: 0;\n padding-right: 0;\n "}),(function(n){return n.condensed&&"\n padding-top: ".concat(9,"px;\n padding-bottom: ").concat(9,"px;\n ")}),(function(n){return n.secondary&&"\n background-color: ".concat((n.theme.background||o.Z.background).row2,";\n ")}),(function(n){return n.last&&n.noBorder&&"\n border-bottom-left-radius: ".concat(c.n_,"px;\n border-bottom-right-radius: ").concat(c.n_,"px;\n border-bottom: none;\n ")})),m=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-13p7y8j-4"})(["border-bottom-left-radius:","px;border-bottom-right-radius:","px;padding:","px ","px;",""],c.n_,c.n_,l,2*a.iI,(function(n){return"\n border-top: ".concat(c.YF,"px ").concat(c.M8," ").concat((n.theme||o.Z).borders.medium2,";\n ")})),g=t(28598),x=h;var v=function(n){var e=n.alternating,t=n.children,i=n.footer,o=n.header,c=n.maxHeight,u=n.minHeight,a=n.noBackground,l=n.noBoxShadow,s=n.sameColorBorders,h=n.scrollable,x=n.width,v=[].concat(t).filter((function(n){return null!==n}));return(0,g.jsxs)(d,{noBackground:a,noBoxShadow:l,width:x,children:[o&&(0,g.jsx)(p,{children:o}),(0,g.jsx)(f,{maxHeight:c,minHeight:u,scrollable:h,children:r.Children.map(v,(function(n,t){return n&&r.cloneElement(n,{last:t===v.length-1,sameColorBorders:s,secondary:e&&t%2===1})}))}),i&&(0,g.jsx)(m,{children:i})]})}},95820:function(n,e,t){"use strict";t.d(e,{i:function(){return s}});t(82684);var r=t(38626),i=(t(93461),t(67971),t(10919),t(86673),t(47329)),o=t.n(i);o().node,o().node,o().node.isRequired,o().bool,o().string.isRequired;t(19711);var c=t(31969),u=t(2005),a=t(49125),l=t(73942),s=(t(28598),"tab");r.default.div.withConfig({displayName:"Tabs__TabHeaderContainerStyle",componentId:"sc-rojme5-0"})(["",""],(function(n){return n.containerWidthPercentage&&"\n width: ".concat(n.containerWidthPercentage,"%;\n ")})),r.default.div.withConfig({displayName:"Tabs__TabHeader",componentId:"sc-rojme5-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;margin-right:","px;position:relative;z-index:2;"," "," ",""],l.BG,l.BG,6*a.iI,(function(n){return n.noBottomBorder&&"\n border-bottom: none;\n "}),(function(n){return n.active&&"\n border-bottom: ".concat(a.cd,"px solid;\n border-color: ").concat((n.theme.interactive||c.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.fullWidth&&"\n width: 100%;\n "})),r.default.div.withConfig({displayName:"Tabs__LinkStyle",componentId:"sc-rojme5-2"})(["align-items:center;display:flex;"," "," ",""],(function(n){return n.bold&&"\n font-family: ".concat(u.nF,";\n ")}),(function(n){return n.fullWidth&&"\n justify-content: center;\n "}),(function(n){return!n.disabled&&"\n &:hover {\n path {\n fill: ".concat((n.theme.content||c.Z.interactive).linkPrimary," !important;\n }\n }\n ")}))},39352:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return In}});var r=t(77837),i=t(75582),o=t(82394),c=t(38860),u=t.n(c),a=t(83455),l=t(82684),s=t(34376),d=t(92083),f=t.n(d),p=t(20773),h=t(50316),m=t(67591),g=t(2485),x=t(32316),v=t(1210),b=t(67971),Z=t(87372),y=t(10919),j=t(93461),w=t(86673),k=t(19711),_=t(38626),P=t(23831),I=t(73942),C=t(49125),O=12.5*C.iI,M=8*C.iI,T=5*C.iI,S=3*C.iI,N=_.default.div.withConfig({displayName:"indexstyle__TileContainerStyle",componentId:"sc-c3nc3q-0"})(["padding:","px;border-radius:","px;height:","px;width:","px;"," ",""],2.5*C.iI,I.TR,O,O,(function(n){return"\n background-color: ".concat((n.theme||P.Z).background.chartBlock,";\n ")}),(function(n){return n.compact&&"\n height: ".concat(M,"px;\n width: ").concat(M,"px;\n ")})),B=t(28598);var A=function(n){var e=n.Icon,t=n.compact,r=n.label;return(0,B.jsx)(N,{compact:t,children:(0,B.jsxs)(b.ZP,{alignItems:"center",flexDirection:"column",justifyContent:"center",children:[(0,B.jsx)(e,{size:t?S:T}),(0,B.jsx)(w.Z,{mb:"4px"}),(0,B.jsx)(k.ZP,{bold:!0,small:t,children:r})]})})},E=_.default.div.withConfig({displayName:"indexstyle__MetricsSummaryContainerStyle",componentId:"sc-nu65g1-0"})(["width:100%;padding:","px;border-radius:","px;",""],2*C.iI,I.n_,(function(n){return"\n border: ".concat(I.YF,"px ").concat(I.M8," ").concat((n.theme||P.Z).interactive.defaultBorder,";\n box-shadow: ").concat((n.theme||P.Z).shadow.frame,";\n ")})),R=t(98781),D=t(66050),H=t(90211),L=t(84779),Y=t(24224);var F=function(n){var e=n.pipelineRunCountByPipelineType,t=(0,l.useMemo)((function(){if(!e)return[];var n=JSON.parse(JSON.stringify(e)),t=n[R.qL.PYTHON]||{};return Object.entries(n[R.qL.PYSPARK]||{}).forEach((function(n){var e=(0,i.Z)(n,2),r=e[0],o=e[1];t[r]?t[r]+=o:t[r]=o})),n[R.qL.PYTHON]=t,delete n[R.qL.PYSPARK],(0,Y.mr)(Object.entries(n).filter((function(n){var e=(0,i.Z)(n,2),t=(e[0],e[1]);return 0!==Object.keys(t).length})))}),[e]);return(0,B.jsxs)(E,{children:[(0,B.jsx)(k.ZP,{bold:!0,large:!0,children:"Pipeline run metrics"}),(0,B.jsx)(w.Z,{mb:2}),(0,B.jsx)(b.ZP,{alignItems:"center",justifyContent:"space-between",children:t.map((function(n,e){var r=(0,i.Z)(n,2),o=r[0],c=r[1];return(0,B.jsxs)(j.Z,{alignItems:"center",flex:"1",justifyContent:"space-between",style:0!==e?{borderLeft:"1px solid ".concat(P.Z.interactive.defaultBorder)}:null,children:[(0,B.jsx)(w.Z,{pl:0!==e?3:0,children:(0,B.jsx)(A,{Icon:R.Mj[o],label:R.G7[o]})}),(0,Y.mr)(Object.entries(c)).map((function(n,e){var t=(0,i.Z)(n,2),r=t[0],o=t[1];return(0,B.jsxs)(j.Z,{flexDirection:"column",children:[(0,B.jsx)(k.ZP,{children:(0,H.kC)(r)}),(0,B.jsx)(k.ZP,{bold:!0,danger:r===D.V.FAILED&&o>0,xlarge:!0,children:(0,L.uf)(o)})]},"".concat(r,"_").concat(e))})),(0,B.jsx)(w.Z,{pr:e!==t.length-1?2:0})]},"".concat(o,"_metric"))}))})]})},q=t(40030),z=t(29237),V=t(21853),W=t(41788),G=t(54283),U=t(12691),X=t.n(U),K=t(60328),J=t(98636),Q=t(72454),$=t(95820),nn=t(42305),en=t(59e3),tn=40*C.iI,rn=40*C.iI;var on=function(n){var e=n.pipelineType,t=n.pipelineRuns,r=void 0===t?[]:t,i=(0,s.useRouter)(),o=(0,en.iV)(),c=(null===o||void 0===o?void 0:o[$.i])||nn.vk.TODAY,u=e===R.LM,a=u?R.LM:R.G7[e],l=R.Mj[e],d=r.length,f=0===d?"":"(".concat(d,")");return(0,B.jsx)(J.Z,{footer:(0,B.jsx)(b.ZP,{alignItems:"center",justifyContent:"center",children:(0,B.jsx)(X(),{as:"/pipeline-runs?status=failed",href:"/pipeline-runs",passHref:!0,children:(0,B.jsx)(y.Z,{sameColorAsText:!0,children:"View more"})})}),header:(0,B.jsxs)(b.ZP,{alignItems:"center",children:[(0,B.jsx)(K.Z,{beforeIcon:(0,B.jsx)(l,{size:2.5*C.iI}),compact:!0,notClickable:!0,children:(0,H.kC)(a)}),(0,B.jsx)(w.Z,{ml:2}),(0,B.jsxs)(k.ZP,{bold:!0,children:["Latest ",u?"":"".concat((0,H.wX)(a)," "),"pipeline run failures ",f]})]}),maxHeight:tn,minHeight:rn,children:0===d?(0,B.jsx)(b.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"center",children:(0,B.jsx)(w.Z,{px:5,py:10,children:(0,B.jsxs)(b.ZP,{alignItems:"center",flexDirection:"column",children:[(0,B.jsx)(Q.Hn,{imageUrl:"".concat(i.basePath,"/images/blocks/grey_block.webp")}),(0,B.jsx)(w.Z,{mb:3}),(0,B.jsxs)(k.ZP,{large:!0,children:["No ",u?"":"".concat((0,H.wX)(a)," "),"pipeline run failures for ",nn.s8[c]]})]})})}):r.map((function(n){var e=n.created_at,t=n.id,r=n.pipeline_uuid;return(0,B.jsx)(J.g,{children:(0,B.jsxs)(b.ZP,{alignItems:"center",children:[(0,B.jsx)(X(),{as:"/pipelines/".concat(r),href:"/pipelines/[pipeline]",passHref:!0,children:(0,B.jsx)(y.Z,{monospace:!0,sameColorAsText:!0,small:!0,children:r})}),(0,B.jsx)(k.ZP,{monospace:!0,small:!0,children:"\xa0>\xa0"}),(0,B.jsx)(X(),{as:"/pipelines/".concat(r,"/runs/").concat(t),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,B.jsxs)(y.Z,{danger:!0,monospace:!0,sameColorAsText:!0,small:!0,children:["Run created on ",e]})})]})},"pipeline_run_".concat(t))}))})},cn=t(82531),un=t(66166),an=t(92953),ln=t(9728),sn=t(3645),dn=t(57541),fn=t(22341),pn={Icon:fn.LE,label:function(){return(0,H.kC)(nn.s8[nn.vk.TODAY])},uuid:nn.vk.TODAY},hn={Icon:fn.ks,label:function(){return(0,H.kC)(nn.s8[nn.vk.WEEK])},uuid:nn.vk.WEEK},mn={Icon:fn.zE,label:function(){return(0,H.kC)(nn.s8[nn.vk.MONTH])},uuid:nn.vk.MONTH},gn=[pn,hn,mn],xn=t(17150),vn=t(21390),bn=t(33766),Zn=t(96510),yn=t(99497);function jn(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 wn(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?jn(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):jn(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var kn={mt:2,mx:3},_n={refreshInterval:6e4,revalidateOnFocus:!1};function Pn(){var n,e=(0,en.iV)(),t=(0,s.useRouter)(),r=(0,l.useRef)(null),c=(0,l.useState)(pn),u=c[0],d=c[1],j=(0,l.useState)(!1),_=j[0],I=j[1],O=(0,l.useState)(null),M=O[0],T=O[1],S=null===u||void 0===u?void 0:u.uuid,N=(0,un.Z)(u);(0,l.useEffect)((function(){var n=e[$.i];n&&d(gn.find((function(e){return e.uuid===n})))}),[e,u,N]);var A=(0,l.useMemo)((function(){return(0,nn.jV)(S,{isoString:!0})}),[S]),E=(0,l.useMemo)((function(){return{group_by_pipeline_type:1,start_time:A}}),[A]),L=cn.ZP.monitor_stats.detail(sn.h.PIPELINE_RUN_COUNT,E,wn({},_n)),W=L.data,U=L.isValidating,X=L.mutate,K=cn.ZP.pipeline_runs.list({_limit:50,include_pipeline_type:1,"order_by[]":"created_at desc",start_timestamp:(0,nn.A5)(A),status:D.V.FAILED},wn({},_n)).data,J=(0,l.useMemo)((function(){return((null===K||void 0===K?void 0:K.pipeline_runs)||[]).filter((function(n){return null!==n.pipeline_type}))}),[null===K||void 0===K?void 0:K.pipeline_runs]),Q=(0,l.useMemo)((function(){return(0,Y.vM)(J,(function(n){return n.pipeline_type}))}),[J]),tn=Q.integration,rn=void 0===tn?[]:tn,fn=Q.python,hn=void 0===fn?[]:fn,mn=Q.streaming,jn=void 0===mn?[]:mn;(0,l.useEffect)((function(){N&&(null===u||void 0===u?void 0:u.uuid)!==(null===N||void 0===N?void 0:N.uuid)&&X()}),[X,u,N]);var Pn,In=(0,l.useMemo)((function(){return(0,nn.Y_)(nn.yD[S]+1)}),[S]),Cn=(0,l.useMemo)((function(){var n,e=(null===W||void 0===W||null===(n=W.monitor_stat)||void 0===n?void 0:n.stats)||{};return(0,xn.i)(e,In)}),[null===W||void 0===W||null===(n=W.monitor_stat)||void 0===n?void 0:n.stats,In]),On=Cn.pipelineRunCountByPipelineType,Mn=Cn.totalPipelineRunCount,Tn=Cn.ungroupedPipelineRunData,Sn=(0,l.useMemo)((function(){return(0,nn.Ro)(nn.yD[S],{endDateOnly:S===nn.vk.TODAY})}),[S]),Nn=(Pn=function(n){return t.push("/pipelines/[pipeline]/edit","/pipelines/".concat(n,"/edit"))},(0,a.Db)(cn.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,Zn.wD)(n,{callback:function(n){var e=n.pipeline.uuid;null===Pn||void 0===Pn||Pn(e)},onErrorCallback:function(n,e){return T({errors:e,response:n})}})}})),Bn=(0,i.Z)(Nn,2),An=Bn[0],En=Bn[1].isLoading,Rn=cn.ZP.projects.list(),Dn=Rn.data,Hn=Rn.mutate,Ln=(0,l.useMemo)((function(){var n;return null===Dn||void 0===Dn||null===(n=Dn.projects)||void 0===n?void 0:n[0]}),[Dn]),Yn=(0,yn.dd)((function(){return(0,B.jsx)(ln.BC,{children:(0,B.jsx)(g.Z,{contained:!0,onClickCustomTemplate:function(n){An({pipeline:{custom_template_uuid:null===n||void 0===n?void 0:n.template_uuid,name:(0,H.Y6)()}}).then((function(){zn()}))},showBreadcrumbs:!0,tabs:[dn.A2]})})}),{},[],{background:!0,uuid:"browse_templates"}),Fn=(0,i.Z)(Yn,2),qn=Fn[0],zn=Fn[1],Vn=(0,yn.dd)((function(n){var e=n.cancelButtonText,t=(n.header,n.onCancel),r=n.onSaveSuccess;return(0,B.jsx)(ln.BC,{children:(0,B.jsx)(V.Z,{cancelButtonText:e,contained:!0,header:(0,B.jsx)(w.Z,{mb:C.HN,children:(0,B.jsxs)(z.Z,{children:[(0,B.jsx)(k.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate pipelines using AI."}),(0,B.jsx)(w.Z,{mt:1,children:(0,B.jsxs)(k.ZP,{warning:!0,children:["Read ",(0,B.jsx)(y.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI\u2019s documentation"})," to get your API key."]})})]})}),onCancel:function(){null===t||void 0===t||t(),Un()},onSaveSuccess:function(n){Hn(),Un(),null===r||void 0===r||r(n)}})})}),{},[Hn],{background:!0,uuid:"configure_project"}),Wn=(0,i.Z)(Vn,2),Gn=Wn[0],Un=Wn[1],Xn=(0,yn.dd)((function(){return(0,B.jsx)(ln.BC,{children:(0,B.jsx)(p.Z,{createPipeline:An,isLoading:En,onClose:Qn})})}),{},[An,En],{background:!0,disableClickOutside:!0,disableCloseButton:!0,uuid:"AI_modal"}),Kn=(0,i.Z)(Xn,2),Jn=Kn[0],Qn=Kn[1],$n=(0,l.useMemo)((function(){return(0,vn.d)(An,{showAIModal:function(){null!==Ln&&void 0!==Ln&&Ln.openai_api_key?Jn():Gn({onSaveSuccess:function(){Jn()}})},showBrowseTemplates:qn})}),[An,Ln,Jn,qn,Gn]),ne=(0,l.useMemo)((function(){return(0,B.jsx)(h.Z,{addButtonMenuOpen:_,addButtonMenuRef:r,isLoading:En,label:"New pipeline",menuItems:$n,onClick:function(){return I((function(n){return!n}))},onClickCallback:function(){return I(!1)}})}),[_,En,$n]);return(0,B.jsxs)(v.Z,{errors:M,setErrors:T,title:"Overview",uuid:"overview/index",children:[(0,B.jsx)(q.Z,{backgroundColor:P.Z.background.panel,children:(0,B.jsx)(w.Z,{py:2,children:(0,B.jsxs)(b.ZP,{alignItems:"center",children:[(0,B.jsx)(w.Z,{ml:3,children:ne}),(0,B.jsx)(x.Z,{onClickTab:function(n){var e=n.uuid;(0,bn.u7)((0,o.Z)({},$.i,e),{replaceParams:!0})},regularSizeText:!0,selectedTabUUID:S,tabs:gn})]})})}),(0,B.jsxs)(w.Z,{mx:3,my:2,children:[(0,B.jsxs)(Z.Z,{level:4,children:[S===nn.vk.TODAY&&"".concat((0,H.kC)(nn.vk.TODAY),": ").concat(Sn),S!==nn.vk.TODAY&&"".concat((0,H.kC)(nn.s8[S]),": ").concat(Sn)]}),(0,B.jsx)(w.Z,{mt:2,children:U?(0,B.jsx)(w.Z,{mx:2,my:11,children:(0,B.jsx)(G.Z,{inverted:!0})}):(0,B.jsx)(F,{pipelineRunCountByPipelineType:On})}),(0,B.jsxs)(w.Z,{mt:2,children:[(0,B.jsx)(w.Z,{ml:2,children:(0,B.jsxs)(k.ZP,{bold:!0,large:!0,children:[U?"--":Mn," total pipeline runs"]})}),(0,B.jsx)(w.Z,{mt:1,children:(0,B.jsx)(m.Z,{backgroundColor:P.Z.background.panel,colors:an.NU,data:Tn,getXValue:function(n){return n.date},height:200,keys:an.hu,margin:{bottom:30,left:35,right:0,top:10},tooltipLeftOffset:an.CD,xLabelFormat:function(n){return f()(n).format("MMM DD")}})})]})]}),(0,B.jsx)(w.Z,wn(wn({},kn),{},{children:(0,B.jsxs)(b.ZP,{alignItems:"center",justifyContent:"center",children:[(0,B.jsx)(on,{pipelineRuns:J,pipelineType:R.LM}),(0,B.jsx)(w.Z,{ml:2}),(0,B.jsx)(on,{pipelineRuns:hn,pipelineType:R.qL.PYTHON})]})})),(0,B.jsx)(w.Z,wn(wn({},kn),{},{children:(0,B.jsxs)(b.ZP,{alignItems:"center",justifyContent:"center",children:[(0,B.jsx)(on,{pipelineRuns:rn,pipelineType:R.qL.INTEGRATION}),(0,B.jsx)(w.Z,{ml:2}),(0,B.jsx)(on,{pipelineRuns:jn,pipelineType:R.qL.STREAMING})]})})),(0,B.jsx)(w.Z,{mb:2})]})}Pn.getInitialProps=(0,r.Z)(u().mark((function n(){return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{});case 1:case"end":return n.stop()}}),n)})));var In=(0,W.Z)(Pn)},84779:function(n,e,t){"use strict";t.d(e,{JI:function(){return o},uf:function(){return i}});var r=t(75582),i=function(n){var e=String(n).split("."),t=(0,r.Z)(e,2),i=t[0],o=t[1];return"".concat(i.replace(/\B(?=(\d{3})+(?!\d))/g,",")).concat(o?".".concat(o):"")};function o(n){var e=Math.floor(Date.now()/1e3);return n>0?e-n:e}},56655:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overview",function(){return t(39352)}])}},function(n){n.O(0,[844,9902,426,1774,8792,8789,4259,5896,9055,2714,1424,1005,7815,6422,8952,7722,4822,3391,1484,2485,4250,6786,9774,2888,179],(function(){return e=56655,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
|